Thứ Hai, 30 tháng 11, 2015

Research about amazon server

https://namvuhn.wordpress.com/2015/08/04/aws-tim-hieu-ve-dich-vu-amazon-ec2/
http://codingsoup.com/2014/02/aws-tu-khi-dang-ky-dich-vu-den-hoan-thanh-website-phpapache/
http://quantrimang.com/tim-hieu-ve-dich-vu-amazon-ec2-83626

http://www.ibm.com/developerworks/vn/library/ar-cloudaws1/
http://www.ibm.com/developerworks/vn/library/ar-cloudaws2/



Compute
EC2
Virtual Servers in the Cloud

EC2 Container Service
Run and Manage Docker Containers

Elastic Beanstalk
Run and Manage Web Apps

Lambda
Run Code in Response to Events

Storage & Content Delivery 
S3
Scalable Storage in the Cloud

CloudFront
Global Content Delivery Network

Elastic File System
Fully Managed File System for EC2

Glacier
Archive Storage in the Cloud

Import/Export Snowball
Large Scale Data Transport

Storage Gateway
Integrates On-Premises IT Environments with Cloud Storage

Database
 RDS
Managed Relational Database Service

DynamoDB
Predictable and Scalable NoSQL Data Store

ElastiCache
In-Memory Cache

Redshift
Managed Petabyte-Scale Data Warehouse Service

Networking
 VPC
Isolated Cloud Resources

Direct Connect
Dedicated Network Connection to AWS

Route 53
Scalable DNS and Domain Name Registration

Developer Tools
 CodeCommit
Store Code in Private Git Repositories

CodeDeploy
Automate Code Deployments

CodePipeline
Release Software using Continuous Delivery

Management Tools
 CloudWatch
Monitor Resources and Applications

CloudFormation
Create and Manage Resources with Templates

CloudTrail
Track User Activity and API Usage

Config
Track Resource Inventory and Changes

OpsWorks
Automate Operations with Chef

Service Catalog
Create and Use Standardized Products

Trusted Advisor
Optimize Performance and Security

Security & Identity
 Identity & Access Management
Manage User Access and Encryption Keys

Directory Service
Host and Manage Active Directory

Inspector
Analyze Application Security

WAF
Filter Malicious Web Traffic

Analytics
EMR
Managed Hadoop Framework

Data Pipeline
Orchestration for Data-Driven Workflows

Elasticsearch Service
Run and Scale Elasticsearch Clusters

Kinesis
Work with Real-time Streaming data

Machine Learning
Build Smart Applications Quickly and Easily

Internet of Things
AWS IoT
Connect Devices to the cloud


Mobile Services
Mobile Hub
Build, Test, and Monitor Mobile apps

Cognito
User Identity and App Data Synchronization

Device Farm
Test Android, Fire OS, and iOS apps on real devices in the Cloud

Mobile Analytics
Collect, View and Export App Analytics

SNS
Push Notification Service

Application Services
API Gateway
Build, Deploy and Manage APIs

AppStream
Low Latency Application Streaming

CloudSearch
Managed Search Service

Elastic Transcoder
Easy-to-use Scalable Media Transcoding

SES
Email Sending Service

SQS
Message Queue Service

SWF
Workflow Service for Coordinating Application Components


Enterprise Applications
WorkSpaces
Desktops in the Cloud

WorkDocs
Secure Enterprise Storage and Sharing Service

WorkMail
Secure Email and Calendaring Service

Thứ Tư, 25 tháng 11, 2015

Response a excel file in symfony2

<?php

namespace inSing\AdminBundle\Controller;

use inSing\DataSourceBundle\Utilities\Constant;
use inSing\DataSourceBundle\Repository\TemplateRepository;
use inSing\DataSourceBundle\Repository\TemplateZoneRepository;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\HttpFoundation\BinaryFileResponse;
use Symfony\Component\HttpFoundation\ResponseHeaderBag;

class ExportController extends PageManagerController
{
    /**
     * save page detail
     * @author tri.van
     */
    public function mainAction($page_id = null) {

    $pathFile = dirname(__FILE__).'/../Command/cli/extract_reviews/user_reviews_2015-11-20_15_08_55.xlsx';

        // check if file exists
        $fs = new FileSystem();
        if (!$fs->exists($pathFile)) {
            throw $this->createNotFoundException();
        }

        // prepare BinaryFileResponse
        $response = new \Symfony\Component\HttpFoundation\BinaryFileResponse($pathFile);
        $response->trustXSendfileTypeHeader();
        $response->setContentDisposition(
            ResponseHeaderBag::DISPOSITION_INLINE,
            'user_reviews_2015-11-20_15_08_55sss.xlsx',
            iconv('UTF-8', 'ASCII//TRANSLIT', 'user_reviews_2015-11-20_15_08_55sss.xlsx')
        );

        return $response;
   }
}

Thứ Sáu, 13 tháng 11, 2015

10 Best JavaScript Frameworks and Libraries of 2015

JavaScript is the internet’s most used client-side scripting language. 88.9% of all websites and web apps use JavaScript in one form or the other for animations, user interactions, optimizing page load speeds and even for security purposes. JavaScript is also the most popular language for GitHub repositories
Naturally, with such a large user base Javascript has tons of tools to help improve your code and generally make coding JS faster and easier. In this post we will be discussing the 10 Best JavaScript Frameworks and Libraries for 2015.

The difference between Frameworks and Libraries

Often when discussing any programming related technology, the words Frameworks and Libraries are used interchangeably. However, there is a difference between the two. A library is a collection of functions which your code can call whenever it needs them. Libraries can save lots of time by providing pre-written code for commonly used functions.
framework is often a collection of software libraries which provide a proper, defined interface to application programming (i.e. creating apps). Frameworks are different from libraries due to some unique features like inversion of control. This basically means that in a framework, unlike in libraries or normal user applications, the overall program’s flow of control is not dictated by the caller, but by the framework.

5 Best JavaScript Frameworks


Best JavaScript Framework of 2015

1. AngularJS


AngularJS is an open-source web app development framework by Google, based on JavaScript. AngularJS aims to be for dynamic web applications what HTML is for static web pages. AngularJS extends HTML, and has extremely powerful features like deep linking, and client side form validation without any extra JavaScript code. AngularJS provides server communication too, so you do not have to worry about using more software and thus more programming languages, for the backend of your app.
Angular even lets you create new HTML elements, using a feature called directives. Components are one of the most useful features of AngularJS. Using Components you can create code that is easily reusable. It also lets you hide complex DOM structures, CSS, and behaviors.
Visit Site

2. Backbone.js


One of 2015’s most popular frameworks, Backbone.js, as the name suggests, gives structure to web applications. Backbone uses data represented in models. Models can be created, validated, destroyed and saved to the server. UI actions cause changes to the models, and when this happens the Views which display the models’ state get re – rendered.
You can read more about how models, key-value bindings, and views (which can perform declarative event handling) come together to form Backbone’s API, in their documentation.

3. Ember.js


Ember.js features Handlebars integrated templates that automatically update as the underlying model data changes. One of Ember’s more powerful features is Components. Using, Components you can create your own app-specific HTML tags, where you can use Handlebars to create the markup and Javascript to implement custom behavior.
Ember uses jQuery to fetch data models from the server, so if you know jQuery, you can easily retrieve JSON stored on the server.
Visit Site

4. Knockout


Knockout is a MV (Model – View) Javascript Framework  which specializes in easy declarative bindings, automatic UI updation (on change in the model state) as well as powerful templating features. Knockout is built on pure Javascript, without any external dependencies. It also happens to work on most browsers, including really out-dated browsers like Internet Explorer (v6).
Visit Site

5. Skel


Skel is an extremely lightweight Javascript framework. Its total size is only  24kb as opposed to 39kb for AngularJS and 54kb for Knockout. Skel is perfectly suitable for developing both web apps as well as responsive websites. It even includes a CSS grid system, which you can read about on their documentation.  Skel also has some great features like normalization of browser styles and API functions.
Visit Site

5 Best Javascript Libraries


Best Javascript Libraries of 2015

1. jQuery


In today’s web, jQuery is to Javascript, what Javascript is to client-side scripting languages. It has an astounding 95% market share when compared against other Javascript libraries. jQuery is used mainly for animations and simple website effects, like transforming elements, changing CSS properties, and utilizing event handlers.
The fact that it is small, packed with features, easy to get started with and still manages to give great performance, makes jQuery a hit with developers everywhere. jQuery even supports user-created plugins. It is undoubtedly the numero uno of Javascript libraries.
Visit Site

2. Modernizr


After jQuery, Modernizr is the most used Javascript library. Modernizr’s job is to detect what HTML and CSS technologies your browser supports. After detecting, Modernizr creates an object with all the properties stored as Boolean values.It then creates classes in the <html> element to explain exactly what is supported and what is not. Modernizr can be used alongside with pretty much anything.
Additionally, Modernizr also supports a script loader, so you can use polyfills to support some never functionalities to an older browser.
Visit Site

3. MooTools


MooTools is a collection of different Javascript libraries that allows you to write flexible code with greater ease, using its APIs. MooTools has extensive documentation and a large number of useful features (Event handlers, creation of new DOM elements,selection of DOM elements, etc) thus making it an excellent tool for web development.
Visit Site

4. YUI


The YUI library is an open source CSS and Javascript library for front-end development. YUI was developed by Yahoo, but as of now the YUI library is no longer being maintained. It can still be downloaded from the YUI website.
Visit Site

5. Dojo


The Dojo Toolkit consists of several Javascript libraries whose main aim is to make it easier to develop websites and web applications. Dojo is small and extremely fast. It also has a widget library ‘dijit’ and a 2D vector graphics API called Dojo GFX, that lets you develop without worrying about your browser’s native graphic technologies.

What database actually FACEBOOK uses?

Hello everyone…..

This is my first blog post and I don’t know how to write it but still I am trying. So fasten your seat belt and get ready for the roller coaster that I will ride with you all with some of the questions which arises sometimes in our mind.  

My today’s question is “What database actually Facebook uses?”
 
A billion of people are using FACEBOOK.Users are expressing themselves and interacting with their peer and friends through wall posts, uploading their photos, passing information’s about events and other meaningful information and for that reason facebook needs a large scalable database.
 
I could imagine that is why it is a very popular Google search keyword. 

I have searched a lot on this topic and come out at a conclusion that Facebook use several database techniques. The challenge for Facebook’s engineers has been to keep the site up and running smoothly in spite of handling close to billion active users.
This article takes a look at some of the software and techniques they use to accomplish their mission.

MYSQL::

Facebook primarily uses MySQL for structured data storage such as wall posts, user information, timeline etc.  This data is replicated between their various data centers.
 

 

MEMCACHED ::

It is also important to note that Facebook makes heavy use of Memcached,a memory caching system that is used to speed up dynamic database driven websites by caching data and objects in RAM to reduce reading time.Memcached is Facebook’s primary form of caching and greatly reduces the database load. Having a
caching system allows Facebook to be as fast as it is at recalling your data.
 
If it doesn’t have to go to the database it will just fetch your data from the cache based on your user ID.

 

 

HAYSTACK :: 

The Photos application is one of Facebook’s most popular features. Up to date, users
have uploaded over 15 billion photos which make Facebook the biggest photo sharing website. For each uploaded photo, Facebook generates and stores four images of different sizes, which translates to a total of 60 billion images and 1.5PB of storage. The current growth rate is 220 million new photos per week, which translates to 25TB of additional storage consumed weekly.
Implements a HTTP based photo server which stores photos in a generic object store called Haystack.
 

 

CASSANDRA ::

 The Apache Cassandra database is the right choice when you need scalability and  high availability without compromising performance. Facebook uses it for its Inbox search.
 

 

SCRIBE ::

 Scribe is a flexible logging system that Facebook uses for a multitude of purposes
internally. It’s been built to be able to handle logging at the scale of Facebook, and automatically handles new logging categories as they show up.
 


 

VARNISH :

:

 Varnish is an HTTP accelerator which can act as a load balancer and also cache content which can then be served lightning-fast. Facebook uses Varnish to serve photos and profile pictures,handling billions of requests every day.

 

HIPHOP FOR PHP ::

 HipHop for PHP is a set of PHP execution engines. HipHop was developed by Facebook and was released as open source in early 2010. To date, Facebook has achieved morethan a 6x reduction in CPU utilization for the site using HipHop as compared with Apache and Zend PHP.Facebook is able to move fast and maintain a high number of engineers who are able to work across the entire codebase.
 
 
So, while “What database does Facebook use?” seems like a simple question, you can see that FACEBOOK developers have added a variety of other systems to make it truly web scalable over their 500million users.

Học lập trình web căn bản với PHP

Bài 1: Các kiến thức căn bản Part 1:  https://jimmyvan88.blogspot.com/2012/05/can-ban-lap-trinh-web-voi-php-bai-1-cac.html Part 2:  https://...