Thứ Sáu, 8 tháng 11, 2013

Thứ Hai, 4 tháng 11, 2013

Thứ Bảy, 2 tháng 11, 2013

Ulr link seo

SEO LINK VI/___.HTML EN/___.HTML

Cách gọi file font không cùng domain

Hỏi: Vì sao khi gọi thuộc tính @font-face trong css thuộc một server hay domain khác lại không được?


Trước khi chỉnh sửa
Chỉnh sửa thành công



Đáp:

Ứng dụng cho lấy font Arsome ở server khác.

 Thêm dòng lệnh trong file .htaccess

<FilesMatch "\.(ttf|ttc|otf|eot|woff)$">
    <IfModule mod_headers.c>
        Header set Access-Control-Allow-Origin "*"
    </IfModule>
</FilesMatch>

FontViewer - Bạn đang gặp rắc rối về font chữ ? - Hãy thử phần mềm này

Giao diện phần mềm fontviewer

Icon software
Tên phần mềm: Font viewer
Link download: http://www.mediafire.com/?a64q3cy8v3y1od6


Thứ Năm, 31 tháng 10, 2013

Thứ Hai, 21 tháng 10, 2013

Thứ Sáu, 18 tháng 10, 2013

photoshop - save each layer to file


File > Scripts > Export Layers to Files.


Thứ Năm, 17 tháng 10, 2013

Free Email Templates

http://www.campaignmonitor.com/templates/all/

http://templates.mailchimp.com/

Thứ Tư, 16 tháng 10, 2013

Nối chuỗi trong sql

concat

$db->sql_query("UPDATE ".$prefix."dfsa SET bbb='$gcountnnn' , aaa=concat(aaa,'|".$domain."') WHERE 3333='$3333'");

Thứ Tư, 4 tháng 9, 2013

IDE - Sublime Text Công cụ lập trình hay ho

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" 




Thêm tag cho code html

ALT + Shift + w 

<div> content </div>

Thứ Bảy, 31 tháng 8, 2013

Lấy youtube tự động




http://www.mediafire.com/download/qku5721x0ygmgdr/GetVideoYouTube.1.1.rar

Thứ Ba, 27 tháng 8, 2013

Sử dụng Gmail Delay Send - Auto post group facebook

Viết xong cho vào group Gmail Delay Send / To Send
 
Send vào email HoiThichNgheVaThucHanhLoiBut@groups.facebook.com để post bài trong group

Thứ Hai, 26 tháng 8, 2013

Cantasia

Cantasia

Thứ Bảy, 24 tháng 8, 2013

Xương sống trang bighost.vn

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="StyleSheet" href="style/bootstrap/css/bootstrap.css" type="text/css">
<link rel="StyleSheet" href="style/style.css" type="text/css">
<title>Untitled Document</title>
</head>

<body>
<div class="bodyful">
    <div class="header_box">
        <h1>logo </h1>
        <div class="login_box">
            login
        </div>
        <div class="tt_box">
            thongtin
        </div>
    </div>
    <div class="menu_box">
        <div class="menu_ul">
            <ul>
                <li><a href="#">1</a></li>
                <li><a href="#">1</a></li>
                <li><a href="#">1</a></li>
                <li><a href="#">1</a></li>
            </ul>
        </div>
        <div class="line_menu">
            san pham
           
            cart
           
            search
        </div>
    </div>
    <div class="serch_box">
        <form>
            <input />
            <button type="submit">Search</button>
        </form>
    </div>
    <div class="slide_box">
        <div class="slider_nivo">
            <img src="" /> <img src="" /> <img src="" /> <img src="" />
        </div>
    </div>
    <div class="thongbao_box">
        <div class="row-fluid">
            <div class="span4">
                <img src="" />
                <h1>sssssss</h1>
                aaaaaaaaaaaa <a href="#">Shop now</a>
            </div>
            <div class="span4">
                <img src="" />
                <h1>sssssss</h1>
                aaaaaaaaaaaa <a href="#">Shop now</a>
            </div>
            <div class="span4">
                <img src="" />
                <h1>sssssss</h1>
                aaaaaaaaaaaa <a href="#">Shop now</a>
            </div>
        </div>
    </div>
    <div class="thongtin_box">
        <img src="" />
        <h1>noiasdf </h1>
        <p> lskdjfal;skdfj </p>
    </div>
    <div class="footer_box">
        <div class="row-fluid">
            <div class="span4">
                <strong>Thoong tin cong ty</strong> asdfasdfsd<br />
                asdfasdf<br />
                asdfsadf<br />
                asdf<br />
                network ...
            </div>
            <div class="span4">
                <strong>dat hang </strong>
                <ul>
                    <li><a href="#">aaaa</a></li>
                    <li><a href="#">aaaa</a></li>
                    <li><a href="#">aaaa</a></li>
                    <li><a href="#">aaaa</a></li>
                </ul>
            </div>
            <div class="span4">
                <strong>vihan corp</strong> asdfasdfsd<br />
                asdfasdf<br />
                asdfsadf<br />
                asdf<br />
            </div>
        </div>
        <div class="quangcao_box">
            <ul>
                <li><a href="#"><img src="" /></a></li>
                <li><a href="#"><img src="" /></a></li>
                <li><a href="#"><img src="" /></a></li>
                <li><a href="#"><img src="" /></a></li>
                <li><a href="#"><img src="" /></a></li>
            </ul>
        </div>
        <div class="tacgia_box">
            <img src="" /> asl;dkfjsl;kdfj<br />
            asdfasdf<br />
            asdfsdf<br />
        </div>
    </div>
</div>
</body>
</html>

Thứ Sáu, 23 tháng 8, 2013

Thứ Ba, 20 tháng 8, 2013

Function list for notepad ++ php





###########################
Bước 1 Đăng ký thủ tục id =1
            <association langID = "1" id="php_function"/>

###########################
 Bước 2 Định hướng lấy tên function
             <parser id="php_function" displayName="Php" commentExpr="((/\*.*?\*)/|(//.*?$))">
                <function
                    mainExpr="^[\t ]*((static|const|virtual)[\s]+)?[\w:]+([\s]+[\w]+)?([\s]+|\*[\s]+|[\s]+\*|[\s]+\*[\s]+)([\w_]+[\s]*::)?(?!(if|while|for))[\w_]+[\s]*\([^\)\(]*\)([\s]*const[\s]*)?[\n\s]*\{"
                    displayMode="$functionName">
                    <functionName>
                        <nameExpr expr="(?!(if|while|for))[\w_~]+[\s]*\("/>
                        <nameExpr expr="(?!(if|while|for))[\w_~]+"/>
                    </functionName>
                </function>
            </parser>   
###########################

Thứ Hai, 19 tháng 8, 2013

Function thumbs 1.1

function thumbs($outpath,$inpath,$outimg,$inimg,$insize) {
    if(@copy("".$outpath."/".$outimg."", "".$inpath."/".$inimg."")) {
        $f_name = end(explode(".", $inimg));
        $f_extension = strtolower($f_name);
        if ($f_extension == "jpg" && extension_loaded("gd")) {
            $src_img= ImageCreateFromJpeg("".$inpath."/".$inimg."");
            $src_width= ImagesX($src_img);
            $src_height= ImagesY($src_img);
            $dest_width = $insize;
            $dest_height = $src_height/($src_width/$dest_width);
            $dest_img=ImageCreateTrueColor($dest_width, $dest_height);
            ImageCopyResampled($dest_img, $src_img, 0, 0, 0, 0, $dest_width, $dest_height, $src_width, $src_height);
            ImageJpeg($dest_img, "".$inpath."/".$inimg."", 100);
            ImageDestroy($dest_img);   
        }
        if ($f_extension == "png" && extension_loaded("gd")) {
            $src_img= imagecreatefrompng("".$inpath."/".$inimg."");
            $src_width= imagesx($src_img);
            $src_height= imagesy($src_img);
            $dest_width = $insize;
            $dest_height = $src_height/($src_width/$dest_width);
            $dest_img=imagecreatetruecolor($dest_width, $dest_height);
            imagecopyresampled($dest_img, $src_img, 0, 0, 0, 0, $dest_width, $dest_height, $src_width, $src_height);
            imagepng($dest_img, "".$inpath."/".$inimg."");
            imagedestroy($dest_img);   
        }   
        if ($f_extension == "gif" && extension_loaded("gd")) {
            $src_img= imagecreatefromgif("".$inpath."/".$inimg."");
            $src_width= imagesx($src_img);
            $src_height= imagesy($src_img);
            $dest_width = $insize;
            $dest_height = $src_height/($src_width/$dest_width);
            $dest_img=imagecreatetruecolor($dest_width, $dest_height);
            imagecopyresampled($dest_img, $src_img, 0, 0, 0, 0, $dest_width, $dest_height, $src_width, $src_height);
            imagegif($dest_img, "".$inpath."/".$inimg."", 100);
            imagedestroy($dest_img);   
        }               
    }
}

Thứ Tư, 14 tháng 8, 2013

Ứng dụng SQLite trong website data chỉ trong 1 file ^^



http://www.mediafire.com/?27hy3a59wu43km4

Connect data

$namefile = 'sqlitedb.sqlite';
try {
    $dblite = new PDO('sqlite:' . $namefile);
} catch (Exception $e) {
    die($e);
}
function do_query($sql){
    global $dblite;   
    $row3=$dblite->query($sql);
    return $row3;
}
function get_data($sql){
    global $dblite;
    $row3=$dblite->query($sql);
    $data=array();
    foreach ($row3 as $row) {
        $data[]=$row;
    }   
    return $data;
} 
Query Sql

    $data=get_data("select * from user ");

    for($i=0;$i<sizeof($data);$i++){
        echo "<p>".($i+1)." - <strong>".$data[$i]["ten"]."</strong> - ".$data[$i]["email"]."</p>";
    }




Thứ Hai, 12 tháng 8, 2013

Kết thúc một ngày với 2 công việc khá thụ vị


^^
Mình thích làm Jquery + PHP

http://cbah.org.vn/sinhnhat/
http://babylovevn.com/

Thứ Năm, 1 tháng 8, 2013

Cách chống spam nick diễn đàn vbb

Tạo ra file  son.php với nội dung
<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="script/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css" />
<title>Trả lời câu hỏi</title>
</head>

<body>
<center>

<h1>Để tránh đăng ký ảo ! mời bạn trả lời một số câu hỏi bên dưới !</h1>

<form action='son.php' method='post'>
<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3kkf3lWuy5RmRUUrXHIg38hk0Dp34j46EdzVD-X39tmZDB9BboPAYzOBpDxb3lrsiRCKfY4JTFBTHM7GLDrivMqdABK8yfV_f7seIKf5E9mfBiPGhVDhSQ2Fka2tE9TxIoA8xhwJirAE/s320/tom-jerry9789789.jpg" />
<div><strong><h3>Câu hỏi 1: Tên con mèo hay đuổi chuột Jerry tên gì ?</h3></strong></div>
<strong>Trả lời:</strong> <input type='text' name='pass'><br>
<img src="http://www.corleydogtraining.co.uk/Dog1.jpg" />
<div><strong><h3>Câu hỏi 2: Con chó có đuôi không ? (có/không): ?</h3></strong></div>
<strong>Trả lời:</strong> <input type='text' name='pass2'><br>
<input type='submit' name='ok' value='Bước thứ 2'>
</form>
<br>
<?php error_reporting(0);
    if(isset($_POST['ok'])) {
        if(strtolower($_POST['pass'])==strtolower('tom') && (strtolower($_POST['pass2'])==strtolower('co')||strtolower($_POST['pass2'])==strtolower('có'))){
           
            $_SESSION['nhappassok1123'] = $_POST['pass'];
            echo '<br>Ok. Vui lòng chờ 1 giây để chuyển ...';
            echo '<meta http-equiv="Refresh" Content="0; url=http://traitimthienthan.com/diendan/register1.php">';
            exit;
        }
        else {
            echo '<b>Lỗii:</b> Bạn nhập không đúng xin nhập lại';
        }
    }
   
?>
</center>
</body>
</html>
***********************
copy vào phần đầu của file register.php

<?php
session_start();
if (!isset($_SESSION['nhappassok1123'])){
    include 'son.php';
    exit;
}

==========================================

Cách 2:
Đổi tên file register.php thành tên khác
Nhớ đổi tên trong template
+ email xác nhận thành viên

Cách cấu hình SMTP trong VBB


Thứ Tư, 31 tháng 7, 2013

Chuyển biến Jquery thành Json và save file + php



download
http://www.mediafire.com/?sptrqocto870cg8

Thứ Ba, 30 tháng 7, 2013

Jquery AJAX Save to file

$('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);
}
?>

Thứ Ba, 23 tháng 7, 2013

Lấy url hiện tại



function curPageURL() {
 $pageURL = 'http';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
 return $pageURL;
}

Thứ Hai, 1 tháng 7, 2013

List Function in file

 



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style>
    input[type="text"]{
        width:400px;
    }
    textarea{
        width:400px;
        height:400px;
    }
</style>
</head>

<body>

<form>
    <div>Url: <input type="text" name="url"  value="<?php echo $_GET["url"] ; ?>"/></div>
    <div>list: <textarea name="list"><?php echo $_GET["list"] ; ?></textarea></div>
    <div><input type="submit" /></div>
</form>
<?php

if($_GET["url"]){
    $string_file=str_replace(" ","",$_GET["url"]);
    echo "<h3>".$string_file."</h3>";  
    $data_f=get_defined_functions_in_file($string_file);
    for($i=0;$i<sizeof($data_f);$i++){
        echo "<div>".$data_f[$i]."</div>";
    }
}
if($_GET["list"]){
    $array_l=explode(",",str_replace(" ","",$_GET["list"]));
    for($j=0;$j<sizeof($array_l);$j++){
        $string_file=$array_l[$j];
        echo "<h3>".$string_file."</h3>";  
        $data_f=get_defined_functions_in_file($string_file);
        for($i=0;$i<sizeof($data_f);$i++){
            echo "<div>".$data_f[$i]."</div>";
        }
    }
}
function get_defined_functions_in_file($file) {
    $source = file_get_contents($file);
    $tokens = token_get_all($source);

    $functions = array();
    $nextStringIsFunc = false;
    $inClass = false;
    $bracesCount = 0;

    foreach($tokens as $token) {
        switch($token[0]) {
            case T_CLASS:
                $inClass = true;
                break;
            case T_FUNCTION:
                if(!$inClass) $nextStringIsFunc = true;
                break;

            case T_STRING:
                if($nextStringIsFunc) {
                    $nextStringIsFunc = false;
                    $functions[] = $token[1];
                }
                break;

            // Anonymous functions
            case '(':
            case ';':
                $nextStringIsFunc = false;
                break;

            // Exclude Classes
            case '{':
                if($inClass) $bracesCount++;
                break;

            case '}':
                if($inClass) {
                    $bracesCount--;
                    if($bracesCount === 0) $inClass = false;
                }
                break;
        }
    }

    return $functions;
}
 ?>
</body>
</html>