This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Without Event Delegation | |
$('button').click(function() { | |
console.log('click this button') | |
}); | |
$('body').click(function() { | |
$(this).append('<button>hello im new button</button>') | |
$('button').click(function(event) { | |
console.log('click this button') | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.baimes.utils; | |
import java.io.*; | |
/** | |
* Created by Ds_Kidd on 2015/4/3 0003. | |
* 将文件转换为byte数组,一般用于图片,视屏,及音频 | |
*/ | |
public class FileToByteArr { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs"), | |
port = process.argv[2] || 3000, | |
mimeTypes = { | |
'asc' : 'text/plain', | |
'au' : 'audio/basic', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DI.HB_NAME, D.DESTINATION_CODE, CI.COUNTRY_CODE | |
FROM DESTINATION_ID as DI | |
JOIN DESTINATION as D | |
ON D.DESTINATION_CODE = DI.DESTINATION_CODE | |
JOIN COUNTRY_ID as CI | |
ON CI.COUNTRY_CODE = D.COUNTRY_CODE | |
WHERE (CI.COUNTRY_CODE = 'ID') | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Set up Git Configuration */ | |
git config --global user.email "[email protected]" | |
git config --global user.name "Your Name" | |
git config --global core.editor "vi" | |
git config --global color.ui true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Source : http://jsfiddle.net/ysq3m/ | |
<div ng-app="myApp" ng-controller="myCtrl"> | |
<div test1 test2> </div> | |
</div> | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
source : http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
<div ng-controller="MyCtrl"> | |
{{hellos}} | |
</div> | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases. | |
# Much of this was originally copied from: | |
# http://natelandau.com/my-mac-osx-bash_profile/ | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$pathTo = "/Applications/XAMPP/xamppfiles/htdocs/zmg-development/upload_src/directory/"; | |
$img_src = $_POST['img_src']; | |
$img_name = $_POST['img_name']; | |
$data = base64_decode(preg_replace('#^data:image/[^;]+;base64,#', '', $img_src)); | |
$file = $pathTo . $img_name; | |
$success = file_put_contents($file, $data); | |
OlderNewer