Integrated development environment (IDE)
Sublime Text 2
Sublime Text 3 - Beta
Thêm một snippet trong sublime Text
Tool > New Snippet
Thay đổi font chữ trong IDE
Preferences > Setting - User
Thêm vào thuộc tính font-face:"tahoma"
Kiến thức là vô biên, vì vậy hãy chia sẻ nó. Trên đây là một số công cụ và source mình sưu tầm được. Mong là nó sẽ hữu ích đối với bạn !
Code Google
$('a#exportPage').on('click',function(){
var contentMap = {};
$('[id^="appendHeading"]').each(function(){
contentMap[this.id] = $(this).text();
});
for(id in contentMap)
$("#PrintIds").append("ObjectID:" + id + "Content:" + contentMap[id]);
$.ajax({
url: "post.php",
type: "post",
data: {
objectID: id,
content: contentMap[id]
},
success: function(){
alert("success");
},
error:function(){
alert("failure");
}
});
});
And this PHP:<?php
if ($_POST['objectID'] || $_POST['content']) {
$myFile = "test.css";
$stringData = $_POST['objectID'] || $_POST['content'];
file_put_contents($myFile,$stringData);
}
?>
<body> <div class="main"> <div class="adv"> </div><!--banner quảng cáo bên trái--> <div class="content"> </div><!--phần nội dung trang--> <div class="adv"> </div><!--banner quảng cáo bên phải--> </div></body> CSS.main{ width:1200px; margin:auto;}.adv{ float:left; width:150px; height:250px; background-color:#e1e1e1; margin-top:20px;}.content{ float:left; width:860px; margin-left:20px; margin-right:20px; height:3000px; background-color:#e1e1e1;} $(window).scroll(function(){ t = parseInt($(window).scrollTop()) + 20; $('.adv').stop().animate({marginTop:t},400);})<div id="clockTimestamp" class="hidden"><?=$_SERVER['REQUEST_TIME'];?></div>
<div id="clock"></div>
function getServerTime() {
var time = $('#clockTimestamp').html()*1000;
time = new Date(time);
return time;
}
function getServerTime() {
var time = null;
$.ajax(
{
url: '../../_ajax/getServerTime.php',
async: false,
dataType: 'text',
success: function(text) {
time = new Date(text);
},
error: function(http, message, exc) {
time = new Date();
}
});
return time;
}
jjj
<?phpecho strrev("Hello world!"); // outputs "!dlrow olleH"?>^^
<?php
$re = '/hello/'; // biểu thức chính quy cho một string có chuỗi “hello” ở trong đó.$str = 'hello world';
if(preg_match($re, $str)) {
echo 'Yes';
}?>
<?php
$re = '/^hello/'; // biểu thức chính quy cho một string bắt đầu bởi chuỗi “hello”$str = 'hello world';
if(preg_match($re, $str)) {
echo 'Yes';
}
else {
echo 'No';
}?>
<?php
$re = '/hello$/'; // biểu thức chính quy cho một string kết thúc bởi chuỗi “hello”$str = 'hello world';
if(preg_match($re, $str)) {
echo 'Yes';
}
else {
echo 'No';
}?>
<?php
$re = '/^ab*$/'; $str = 'abbc';
if(preg_match($re, $str)) {
echo 'Yes';
}
else {
echo 'No';
}?>
<?php
$re = '/^.{3}$/';
//Biểu thức chính quy cho một chuỗi có đúng 3 ký tự bất kỳ.$str = '&#%';
if(preg_match($re, $str)) {
echo 'Yes';
}
else {
echo 'No';
}?>
<?php
$re = '/^\w+$/';
// một string toàn ký tự A->Z, a->z, 0->9$str = 'quya*';
if(preg_match($re, $str)) {
echo 'Yes';
}
else {
echo 'No';
}?>
<?php
$re = '/\w+$/';$str = '*quya';
echo preg_replace($re, 'hi', $str);?>