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 | |
| // passed by reference | |
| fixFilesArray($_FILES['fieldname']); | |
| // all fixed | |
| var_dump($_FILES['fieldname']); |
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
| <!doctype html> | |
| <!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
| <html> | |
| <head> | |
| <title>iOS 8 web app</title> | |
| <!-- CONFIGURATION --> |
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() { | |
| /* == GLOBAL DECLERATIONS == */ | |
| TouchMouseEvent = { | |
| DOWN: "touchmousedown", | |
| UP: "touchmouseup", | |
| MOVE: "touchmousemove" | |
| } | |
| /* == EVENT LISTENERS == */ |
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 parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
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
| /* | |
| Allows for ajax requests to be run synchronously in a queue | |
| Usage:: | |
| var queue = new $.AjaxQueue(); | |
| queue.add({ | |
| url: 'url', |
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
| <html> | |
| <head> | |
| <title>Line Graph with Dual-scaled Axes using SVG and d3.js</title> | |
| <script src="http://mbostock.github.com/d3/d3.v2.js"></script> | |
| <style> | |
| /* tell the SVG path to be a thin blue line without any area fill */ | |
| path { | |
| stroke-width: 1; | |
| fill: none; | |
| } |
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 CleanWordHTML = function ( str ) | |
| { | |
| str = str.replace(/<o:p>\s*<\/o:p>/g, "") ; | |
| str = str.replace(/<o:p>.*?<\/o:p>/g, " ") ; | |
| str = str.replace( /\s*mso-[^:]+:[^;"]+;?/gi, "" ) ; | |
| str = str.replace( /\s*MARGIN: 0cm 0cm 0pt\s*;/gi, "" ) ; | |
| str = str.replace( /\s*MARGIN: 0cm 0cm 0pt\s*"/gi, "\"" ) ; | |
| str = str.replace( /\s*TEXT-INDENT: 0cm\s*;/gi, "" ) ; | |
| str = str.replace( /\s*TEXT-INDENT: 0cm\s*"/gi, "\"" ) ; | |
| str = str.replace( /\s*TEXT-ALIGN: [^\s;]+;?"/gi, "\"" ) ; |
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
| <script type="text/ng-template" id="one.html"> | |
| <div>This is first template</div> | |
| </script> | |
| <script type="text/ng-template" id="two.html"> | |
| <div>This is second template</div> | |
| </script> |
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 | |
| namespace app\extensions\helper; | |
| use Assetic\AssetWriter; | |
| use Assetic\AssetManager; | |
| use Assetic\FilterManager; | |
| use Assetic\Asset\AssetCache; | |
| use Assetic\Asset\AssetCollection; | |
| use Assetic\Asset\FileAsset; |
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
| app.filter('bytes', function() { | |
| return function(bytes, precision) { | |
| if (isNaN(parseFloat(bytes)) || !isFinite(bytes)) return '-'; | |
| if (typeof precision === 'undefined') precision = 1; | |
| var units = ['bytes', 'kB', 'MB', 'GB', 'TB', 'PB'], | |
| number = Math.floor(Math.log(bytes) / Math.log(1024)); | |
| return (bytes / Math.pow(1024, Math.floor(number))).toFixed(precision) + ' ' + units[number]; | |
| } | |
| }); |