This file contains hidden or 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
| #import <UIKit/UIKit.h> | |
| @interface MBRoundProgressView : UIView | |
| - (void)setProgress:(float)progress; | |
| - (float)progress; | |
| @end |
This file contains hidden or 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 mysql= require('mysql'); | |
| var client = mysql.createClient({ | |
| user: 'root', | |
| password: 'root', | |
| host: 'localhost' | |
| }); | |
| client.query('USE sample'); |
This file contains hidden or 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
| function callback_test(callback) { | |
| for(var i=0;i<=10;i++){ | |
| callback(i); | |
| } | |
| } | |
| callback_test(function(result) { | |
| console.log(result); | |
| callback_test(function(result2){ | |
| console.log(result2); |
This file contains hidden or 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
| exports.division=function(num1,num2,callback) { | |
| if(num2 <=0 ) { | |
| callback("num2 shouldn't be less than or equal zero"); | |
| } | |
| callback (null,num1/num2); | |
| } |
This file contains hidden or 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
| function division(num1,num2,callback) { | |
| if(num2 <=0 ) { | |
| callback("num2 shouldn't be less than or equal zero"); | |
| } | |
| callback (null,num1/num2); | |
| } | |
| division(5,4,function(err,result) { | |
| if(err==null) { | |
| console.log(result); |
This file contains hidden or 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
| function sum(num1,num2,callback) { | |
| callback(num1+num2); | |
| } | |
| sum(5,4,function(result) { | |
| output=result; | |
| }); |
This file contains hidden or 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
| function sum(num1,num2) { | |
| return num1+num2; | |
| } | |
| result=sum(5,3); |
This file contains hidden or 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
| $php wayne.php | |
| <a href='javascript:;' onclick='Player.URL="video/5-AVSEQ01.dat";Player.controls.play()'><img src='style/image/play.jpg' id='play_button'></a> |
This file contains hidden or 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
| <?php | |
| //mysql init | |
| mysql_connect('localhost', 'root', 'password'); | |
| mysql_select_db('mydb'); | |
| //Init for UTF8 | |
| mysql_query("SET NAMES utf8"); | |
This file contains hidden or 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 sys = require ('sys'), | |
| url = require('url'), | |
| http = require('http'), | |
| qs = require('querystring'); | |
| http.createServer(function (req, res) { | |
| keyword=/\/keyword\/([A-Za-z0-9]+)$/ | |
| data=/\/keyword\/([A-Za-z0-9]+)\/data\/([A-Za-z0-9]+)$/; |