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
/** | |
* usage: | |
* <form name="form"> | |
* <input type="file" multiple name="uploads" filelistread limit="8" ng-model="uploads" /> | |
* <label ng-show="form.uploads.$error.limit">上传文件数量限制最多为8个</label> | |
* </form> | |
*/ | |
angular.module('testapp', []).directive("filelistread", function() { | |
return { | |
require: 'ngModel', |
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
/** | |
* multiple files upload | |
* usage: | |
* <form name="form"> | |
* <input type="file" multiple name="uploads" filelistread limit="8" ng-model="uploads" /> | |
* <label ng-show="form.uploads.$error.limit">上传文件数量限制最多为8个</label> | |
* </form> | |
*/ | |
angular.module('testapp', []).directive("filelistread", function() { | |
return { |
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
<?php | |
require_once("HTML/QuickForm2.php"); | |
require_once("HTML/QuickForm2/Renderer.php"); | |
$languages = array( | |
"" => "Choose Languages:", | |
"C#" => "C#", | |
"JavaScript" => "JavaScript", | |
"Perl" => "Perl", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>testUpload</title> | |
</head> | |
<body> | |
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" | |
enctype="multipart/form-data"> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>testUpload2</title> | |
</head> | |
<body> | |
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" | |
enctype="multipart/form-data"> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>testHTTPUpload</title> | |
</head> | |
<body> | |
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST" | |
enctype="multipart/form-data"> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>testCalcSubnet</title> | |
</head> | |
<body> | |
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST"> | |
IP Address: | |
<br/><input type="text" name="ip[]" size="3" maxlength="3" /> |
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
<?php | |
class MySQLSessionHandler { | |
private $_dblink; | |
private $_sessionName; | |
private $_sessionTable; | |
CONST SESS_EXPIRE = 3600; |
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
import sublime | |
import sublime_plugin | |
import re | |
class CompactExpandCssCommand(sublime_plugin.TextCommand): | |
def run(self, edit, action='compact'): | |
rule_starts = self.view.find_all('\{') | |
rule_ends = self.view.find_all('\}') |
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
(function() { | |
var hidden = "hidden"; | |
// Standards: | |
if (hidden in document) | |
document.addEventListener("visibilitychange", onchange); | |
else if ((hidden = "mozHidden") in document) | |
document.addEventListener("mozvisibilitychange", onchange); | |
else if ((hidden = "webkitHidden") in document) | |
document.addEventListener("webkitvisibilitychange", onchange); | |
else if ((hidden = "msHidden") in document) |
OlderNewer