Weather app with react-native

Cuối tuần rảnh rỗi, tìm chút gì đó để làm, thoát ra những gì quen thuộc.

Chào các bạn.

React Native là một framework cho phép các lập trình viên xây dựng các ứng dụng trên nền tảng Android và iOS sử dụng ngôn ngữ lập trình javascript nhưng mang lại trải nghiệm native app thực sự.

Continue reading Weather app with react-native

Javascript hữu ích

JavaScript là một ngôn ngữ lập trình của HTML và WEB. Nó là nhẹ và được sử dụng phổ biến nhất như là một phần của các trang web, mà sự thi hành của chúng cho phép Client-Side script tương tác với người sử dụng và tạo các trang web động. Nó là một ngôn ngữ chương trình thông dịch với các khả năng hướng đối tượng.

Continue reading Javascript hữu ích

60+ Best HTML Admin & Dashboard Templates 2017

The UI of a web application is extremely important to it’s success, a poor user experience can make using the product a chore whereas a great interface can speed up productivity, reduce customer support queries and increase customer retention. If you are the creator of a web app, SAAS, online software or just need an admin section for your website users, then investing a good admin dashboard theme can be a very wise investment.

In this collection we are looking at pre-made admin dashboard templates, these have been coded with technologies such as HTML5 and CSS3, making use of frameworks such as Bootstrap, jQuery, Angular JS, React and others. They are all beautifully designed so will make your product look highly professional so you can can show it off in marketing screenshots and videos. They also include many different types of features such as charts, graphs, maps, overlays and more so you can tailor them to your product’s needs.

Take a look below at our collection of over 60 of the Best HTML Admin and Dashboard Templates.


StartUI – a full featured, premium web application admin dashboard built with Twitter Bootstrap 4, JQuery and CSS (Less). It comes with a lot of ready to use components ideal for building your web application, CMS, CRM, admin panel, eCommerce dashboard, or any other type of application backend. StartUI coded highly responsive for your mobile phone & tablets. Completely modular with many unique features, it will help you build your next awesome product.


More Info & Demo


Umega is a fully responsive admin dashboard template, easy customization and lightweight which is basically designed for the developers. It follows the best practices using the latest technologies and I really hope that you will enjoy working with it.


More Info & Demo


Marino – Bootstrap 4 Dashboard UI Kit


More Info & Demo


MyAdmin Template is fully responsive premium bootstrap admin template ideal for your business. MyAdmin can used for all type of web applications, such as custom admin panel, project management system, admin dashboard, application backend, CMS, CRM, etc.


More Info & Demo


Tectonic is a beautifully designed admin dashboard template that caters to a wide range of necessities. With over 250 demos, Tectonic is easily one of the most complete admin themes out there.


More Info & Demo


Infinity is a responsive Bootstrap 3.3.6 Admin Template. It provides you with a vast collection of ready to use code snippets and utilities many custom pages and a collection of applications and widgets.


More Info & Demo


Aero Admin is a Material Design based admin template. Using the Materialize CSS framework, we provide a clean and customizable dashboard to meet all your needs. Aero Admin was developed with passion to another passionate developers.


More Info & Demo


Metrika is a responsive material design built specifically for AngularJs. Using Google’s own Material Design framework for Angular with custom services, directives, icons and styling ( together with the power of Bootstrap for making layout as easy as ever. Create your own Material themes with color combinations and bringing true material components into bootstrap.


More Info & Demo


Rainbow is a colorful responsive admin web App built with Bootstrap & AngularJS. It uses Sass CSS which makes it easy to modify.


More Info & Demo


Milestone is an elegant and creative Bootstrap 4 admin template that comes out of the box with a myriad of layout options and features to help you build your next dashboard. Milestone features a huge set of reusable components, a tonne of plugins, different layouts and is easy to customise to individual needs.


More Info & Demo


Uplon is a fully responsive premium web UI kit built with awesome bootstrap v4. It comes with super clean user interfaces, many ready to use and highly customizable components and widgets. The power of SASS and easy code allows any developer to turn this theme into real web application.


More Info & Demo

Clean UI

Clean UI – a modern professional admin template, based on Bootstrap 4 framework. Clean UI is a powerful and super flexible tool, which suits best for any kind of web application: Web Applications; CRM; CMS; Admin Panels; Dashboards; etc. Clean UI is fully responsive, which means that it looks perfect on mobiles and tablets. Template includes Angular Starter Kit – a set of templates, that will make your developer’s life much easier.


More Info & Demo


LearnPlus is a beautifully crafted user interface for modern Learning web applications. LearnPlus includes examples for all the website pages possibly needed for a LMS application, covering the most important roles in any learning application, the student and the instructor.


More Info & Demo


AdminK is a fully responsive and 100% Retina ready bootstrap admin template. The template is perfect for your business, because it can used for all type of web applications, such as custom admin panel, project management system, admin dashboard, application backend, CMS, CRM, etc.


More Info & Demo


Horizon is a responsive dark admin template powered by Twitter Bootstrap Framework. Horizon has a simple set of UI elements and plugins to get your work done in the fastest time possible, with a user friendly and clean design to appeal to your customers.


More Info & Demo

Elite Admin

Eliteadmin is a premium admin dashboard template with flat design. It is fully responsive admin dashboard template built with Bootstrap 3.3.7 Framework, HTML5 and CSS3, Media query. It has a huge collection of reusable UI components and integrated with latest jQuery plugins. It can be used for all type of Web applications like custom admin panel, app backend, CMS or CRM.


More Info & Demo


The Alpha UI Framework is a premium Web Application Admin Dashboard built on top of MaterializeCSS Framework. It was created to be the most functional, clean and well designed template for any types of backend applications. We have carefully designed all common elements.


More Info & Demo

Material Design

Material is a Google Material Design inspired admin template built with Angular & Bootstrap.


More Info & Demo


Boooya – powerful admin template based on newest technologies. This template is fully responsive and retina ready. It means that you can easily build your web application and be sure that it will work well on all devices. Also its included with unique plugins that developed specially for Boooya temaplte. In downloaded package you will find .less files, documentation, clean and commented source code. Atlant is easy to use and customize, also you will find lots of ready to use elements.


More Info & Demo

Varello Admin

VarelloAdmin is a fully-responsive, well-featured and highly-polished dark admin template. It includes both Static HTML and Laravel 5.2 Blade versions (includes application routes and controllers). It is a good fit for any kind of back-end application, whether it is administrative, statistical, management, CMS, dashboard, messaging, and much more. It is built for multi-purpose admin systems, and has been rigorously designed and tested to work responsively across Large/Medium Desktop, Tablet and Mobile devices, and in all modern browsers. This ensures it looks good, no matter the device you are using.


More Info & Demo


Mara is a Material Design Multipurpose Admin Template with a huge collection of material design elements built on Materialize framework. Mara can be used for any type of web applications: custom admin panels, admin dashboards, CMS, CRM, SAAS and websites: CMSs, SAAS, CRM, HRMS, Support & Social network, Blog, E-commerce site, Personal page, Business site, Magazine.


More Info & Demo


Bootstrap Responsive Admin Web App with AngularJs


More Info & Demo


Zircos is a premium, fully responsive web app UI kit. It has flat design and built with Bootstrap 3.3.7, HTML5, CSS3 and Jquery. It comes with bunch of reusable UI widgets, components, ready made pages. The clean and modular code will allow you to easily build any web application.


More Info & Demo


Boost is a responsive bootstrap admin dashboard template built with Twitter Bootstrap Framework and it has a huge collection of reusable UI components and integrated with jQuery plugins also. It is also easy to use and modify that is suitable to your needs and can be implemented to your desire projects such Project Management System, CRM, HRMS, Real Estate, Ecommerce, Loan Management System, Billing Management System and more.


More Info & Demo


Building a single page application in Javascript? Interested in moving to React/Redux? Don’t start from scratch – build a scalable , highly polished admin application with React/Redux and Bootstrap that works great on mobile and tablet as well as desktop.


More Info & Demo


Deluxe is a Admin Template built with Bootstrap Framework is designed in the style flattening like material design. Deluxe has a huge collection of plugins and UI components and works seamlessly on all major web browsers, tablets and phones.


More Info & Demo


Float admin is a clean and powerful admin template based on Bootstrap3. It is built with modern technologies like sass, compass, ruby, bootstrap3, html5 and css3. Clean code and SASS files allows you to create and modify easily as per requirements. The template is fully responsive and easily fit into any devices. Huge collection of pre-made pages, plugins, UI elements, Jquery UI, SASS files, Light and dark skins, Landing page, 4+ layout options and many more advanced features make it the best choice for any web applications.


More Info & Demo

CSK Admin

Contains 300+ Pages, 20+Dashboards, 3+ Ecommerce Templates, 5+ Landing Pages & many more to come. Coming AngularJS Version


More Info & Demo


Penguin is a clean and fully responsive Web app kit and admin dashboard template for developers


More Info & Demo


Rayan is a responsive bootstrap admin dashboard template built with Twitter Bootstrap Framework and it has a huge collection of reusable UI components and integrated with jQuery plugins also. Rayan can be used for applications (CMS, CRM, Custom Admin Application, Admin Dashboard). Rayan template works on all major web browsers, Desktop, iPhone, iPad, Tablet and is any smart phone friendly.


More Info & Demo


Beagle is a responsive admin template based on the famous Bootstrap framework, made it with love in every pixel, with tons of beautiful features ready to use.


More Info & Demo


Omega – Responsive Massive Admin Pack


More Info & Demo


COLOURcode has been born from decades of professional experience developing admin applications and designing interfaces. It is a new kind of admin template that will suit any application type, although it was specifically designed for those who like to use colour to boost usability through context and association. It is fully responsive, based on the latest Bootstrap 3, and has been extensively tested with recent desktop and mobile browsers. The CSS is constructed from Sass-based structured stylesheets, and the JavaScript is constructed from an easily extended custom modular framework with jQuery.


More Info & Demo


Dashboard UI KIT for modern web application.


More Info & Demo


Teamwork is a fully responsive and multipurpose Admin Template. The combination of SASS and Compass make it flexible and user friendly. Teamwork has large collection of features, UI elements, widgets, icons and libraries that make it multipurpose.


More Info & Demo


Admin9 is admin HTML template. Built with bootstrap and our creative designs. It comes with many predefined pages and component styled. We also include carts and tables. Clean code and CSS allows you to create and modify easily as per requirements. This is specially designed for large screens.


More Info & Demo


Pacificonis is a premium admin dashboard template based on Bootstrap. There are a huge of powerful components build with SASS CSS which makes it easy to modify. It has a huge collection of reusable UI components and integrated with latest jQuery plugins. It can be easily integrated into your projects, allowing you to create solutions for your future designs quickly.


More Info & Demo


ARISE Admin Theme is a premium template comes with FIVE unique designs. It is fully responsive admin dashboard built with Bootstrap 3+ Framework, HTML5, CSS3 and Sass. It has a huge collection of reusable UI components and integrated with latest jQuery plugins. It can be used for all type of web applications like custom admin panel, project management system, admin dashboard, Backend application or CRM.


More Info & Demo


AFRO is a fully responsive dashboard admin built with the Bootstrap Framework. It has tons of features and ready-to-use UI elements, widgets, charts and pages which are Highly customizable and easy to use.


More Info & Demo


Elephant is a front-end template created to help you develop modern web applications, fast and in a professional manner. Built on top of Bootstrap, it includes a large collection of HTML, CSS, and JS components that is simple to use and easy to customise. The file structure in the Elephant is similar to the HTML5 Boilerplate file structure, where the intention is for developers not to have problems and not waste time by trying to decrypt the fantasy, which is brought to you when buying a new product.


More Info & Demo


Master is a beautifully admin template. It is fully responsive theme built with Bootstrap 3.3.7, HTML and uses Sass CSS which makes it easy to modify.


More Info & Demo


Peak – Material design Bootstrap 4 admin template


More Info & Demo


Nexus is a professional, modern, complete and flexible Admin template that can be used to build all kind of projects: Web Applications, Backend Websites, Custom Admin Panels, Admin Dashboards, CMS, CRM or even a Portfolio, Blog, Business Website. I encourage you to have a good look at live preview and discover all the included features!


More Info & Demo


Trata admin is a responsive admin & dashboard theme.this theme is build and powered with Twitter bootstrap 3.3.6. It has tons of features and ready-to-use UI elements, widgets, charts and pages which are Highly customizable and easy to use.


More Info & Demo


Fit2Go – beautiful gym fitness admin template is a bootstrap based admin template crafted targeting gyms, fitness and wellness centers. It comes with two modules Admin and User/Subscriber. Admin section contains all pages required to manage a fitness center with beautiful UI. It contains 20+ pages where gym owners can check finances, members and manage courses, events, news, holidays etc.


More Info & Demo


Meteor – a responsive and multipurpose admin dashboard template, based on latest Twitter Bootstrap framework. It’s super flexible and user friendly, as it’s compatible with any device. We put a lot of time and effort to create such a template, with many kinds of different layout variations and yet 3 layers, as many others are coming soon for the next updates. They can be changed just by changing a line of code, so you haven’t to worry about choosing another one! This makes Meteor an easily customizable tool for anyone.


More Info & Demo


Neptune is a full featured dashboard UI kit for web application development built with Bootstrap 4. Comes with lots of ready to use widgets and components.


More Info & Demo


Xadmino is a bootstrap based fully responsive admin template. It comes with lots of reusable and beautiful UI elements, widgets and features. It allows developer to easily build a super awesome web application.


More Info & Demo


Ninja Admin is a fully featured premium admin template built with Bootstrap 3.3.7, HTML5, CSS3 and jQuery, beautiful features ready to use.


More Info & Demo


Kenny Admin is a WebApp template for admin dashboards and control panels. It is a responsive HTML template that is based on the CSS Sass framework Bootstrap 3.3.6 It utilizes all of the Bootstrap components in its design and re-styles many commonly used plugins to create a consistent design that can be used as a user interface for backend applications. Kenny Admin is based on a modular design, which allows it to be easily customized and built upon.


More Info & Demo


CoreNG is a Angular 2 theme built from the ground up with Angular CLI as your all in one build system and the Google backed Angular Material 2! We’ve put a lot of time into this theme, and we will continue to put in even more! When you buy this theme, you also get access to our private Git repository so you can follow along faster with updates, even contribute to the development of this theme.


More Info & Demo


The Magna is a premium Web Application Admin Dashboard built on top of MaterializeCSS Framework. It was created to be the most functional, clean and well designed template for any types of backend applications. We have carefully designed all common elements.


More Info & Demo

Disclosure: Some of the links in this post may be “affiliate links.” This means if you click on the link and purchase an item, We will receive an affiliate commission

Continue reading 60+ Best HTML Admin & Dashboard Templates 2017

Remove Duplicates from JavaScript Array

Khi làm việc với mảng, chúng ta thường hay gặp vấn đề trùng dữ liệu, và không muốn chúng hiển thị ra bên ngoài. Khi đó phát sinh nhu cầu làm sao lọc lại dữ liệu đó, bỏ qua những dữ liệu bị trùng. Hướng dẫn sau đây sẽ giúp chúng ta thực hiện việc đó dễ dàng
Continue reading Remove Duplicates from JavaScript Array

Resize ảnh với HTML5 FileReader

Khi lập trình web, các vấn đề liên quan đến hình ảnh được sử dụng thường xuyên, ví dụ upload hình ảnh sản phẩm, banner, logo….

Từ đây nảy sinh vài vấn đề như: muốn thấy hình ảnh đại diện ngay khi chọn file. Resize hình ảnh để tiết kiệm dung lượng…. Trước khi HTML5 ra đời, chúng ta thường hay giải quyết mọi thứ trên server, tức là upload ảnh lên server, sau đó xử lý. VD: dùng ajax để upload ảnh lên server, sau đó trả về ảnh đại diện…. Điều này dẫn đến tốn thời gian xử lý cho máy chủ, hoặc file lớn, mạng chậm thì user phải chờ đợi rất lâu.

Thật may mắn khi HTML5 ra đời, nó giúp chúng ta cả 2 việc trên luôn. Đó là preview (xem trước) hình ảnh ngay khi vừa chọn xong, đồng thời resize ảnh luôn ngay trên trình duyệt. Sau đó chúng ta chỉ việc upload mã base64 này lên server, và convert lại thành hình ảnh là xong, hoặc lưu luôn base64 vào database cũng ok.

HTML sử dụng API FileReader, nó có thể đọc file ảnh, file txt, khá là thú vị.

Code chọn ảnh xong hiển thị ảnh đại diện

<input id="imageFile" name="imageFile" type="file" class="imageFile"  accept="image/*"   /> 
<img src="" id="preview"  >

Code javascript

$(document).ready(function() {

    $('#imageFile').change(function(evt) {

        var files =;
        var file = files[0];

        if (file) {
            var reader = new FileReader();
            reader.onload = function(e) {
                document.getElementById('preview').src =;

Các bạn chú ý, có sử dụng jQuery

Code resize hình ảnh

<input id="imageFile" name="imageFile" type="file" class="imageFile"  accept="image/*"   /> 
<input type="button" value="Resize Image"  onclick="ResizeImage()"/> 
<img src="" id="preview"  >
<img src="" id="output">

Code javascript

function ResizeImage() {
    if (window.File && window.FileReader && window.FileList && window.Blob) {
        var filesToUploads = document.getElementById('imageFile').files;
        var file = filesToUploads[0];
        if (file) {

            var reader = new FileReader();
            // Set the image once loaded into file reader
            reader.onload = function(e) {

                var img = document.createElement("img");
                img.src =;

                var canvas = document.createElement("canvas");
                var ctx = canvas.getContext("2d");
                ctx.drawImage(img, 0, 0);

                var MAX_WIDTH = 400;
                var MAX_HEIGHT = 400;
                var width = img.width;
                var height = img.height;

                if (width > height) {
                    if (width > MAX_WIDTH) {
                        height *= MAX_WIDTH / width;
                        width = MAX_WIDTH;
                } else {
                    if (height > MAX_HEIGHT) {
                        width *= MAX_HEIGHT / height;
                        height = MAX_HEIGHT;
                canvas.width = width;
                canvas.height = height;
                var ctx = canvas.getContext("2d");
                ctx.drawImage(img, 0, 0, width, height);

                dataurl = canvas.toDataURL(file.type);
                document.getElementById('output').src = dataurl;


    } else {
        alert('The File APIs are not fully supported in this browser.');

See the Pen Resize Image with HTML5 File Reader by tuanitpro (@tuanitpro) on CodePen.

Chúc các bạn thành công.

CSDL tên Quốc gia, tỉnh thành phố thị xã quận huyện, xã phường Việt Nam

  • Thông tin 245quốc gia trên thế giới
  • Thông tin 64 tỉnh thành  phố Việt Nam
  • Thông tin 697 quận huyện / thị xã
  • Thông tin 11110 xã phường

Nguồn tài liệu tham khảo: cổng thông tin điện tử các tỉnh thành, quận huyện, từ điển bách khoa toàn thư điện tử Wikipedia.
Định dạng dữ liệu: bảng cơ sở dữ liệu SQL
Mục đích: chia sẻ giúp các bạn webmaster đang muốn lấy một nguồn thông tin chuẩn mực về tên các đơn vị hành chính cho các dự án website, cổng thông tin điện tử ….



Chúc các bạn thành công

Bootstrap modal not working with Kendo DropdownList

When using bootstrap modal with Kendo Dropdownlist, it not working. DropdownList auto Close. How to fix it

// Popup extension.
// Sets up kendo popups (used in all sorts of widgets) to check if the widget
// is being included in a bootstrap modal. If so, the popup should append to
// the modal instead of the page body.
// For the most part, popups work fine without this. However, DropdownList with
// a filter option does not. This is because the filter attempts to focus on
// filter input, which is outside the modal By default, Bootstrap modal will
// block this. It has an option to allow, but then it must be remembered to add
// everywhere.
// This allows filtered dropdownlists to 'just work'.
// See for alternate solutions:
(function ($, kendo) {

        _init = kendo.ui.Popup.fn.init;

    var Popup = kendo.ui.Popup.extend({
        init: function (element, options) {
            // Only set appendTo if nothing was manually set in the options.
            if (options.appendTo === undefined) {
                // Find the nearest parent bootstrap modal, if any.
                var parentModal = $(options.anchor).closest('.modal');

                // Found one!
                if (parentModal.length > 0) {
                    options.appendTo = parentModal[0];

            // Call the base constructor.
  , element, options);

}(window.kendo.jQuery, window.kendo));


Đọc toàn bộ dữ liệu trong Google Apps script

Hướng dẫn sau giúp bạn đọc toàn bộ dữ liệu trong 1 file google sheet, bằng ngôn ngữ Google Apps script. Sau đó chưa chúng vào một mảng để sử dụng cho mục đích khác.  Trong ví dụ chỉ đọc những ô có chứa dữ liệu.

function getSupplierData(){  
      var codeApp = SpreadsheetApp.openById(googleSheetId);
      var sheet = codeApp.getSheetByName(sheetName);       
      var lastColumn = sheet.getLastColumn();
      var lastRow = sheet.getLastRow();
      var range = sheet.getRange(rowStart,1,lastRow,lastColumn);
      var data = range.getValues();
      var rows=[];
      for(var i in data){
          for(var j = 0; j<lastColumn; j++){
            if(data[i][j] !=='') {
               var item = {name: data[i][j]};         
     return rows;