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
| http://www.google.com/fonts/ | |
| <link href='http://fonts.googleapis.com/css?family=Iceland' rel='stylesheet' type='text/css'> | |
| @media screen { | |
| @font-face { | |
| font-family: 'Iceland'; | |
| font-style: normal; | |
| font-weight: 400; | |
| src: local('Iceland'), local('Iceland-Regular'), url('http://themes.googleusercontent.com/static/fonts/iceland/v1/F6LYTZLHrG9BNYXRjU7RSw.woff') format('woff'); |
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
| localStorage.setItem("exampleItem", "This is a great example."); | |
| localStorage.getItem("exampleItem"); | |
| localStorage.removeItem("exampleItem"); |
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
| { | |
| "font_size": 12, | |
| "ignored_packages": | |
| [ | |
| "Vintage" | |
| ], | |
| "todo": | |
| { | |
| /*"file_exclude_patterns":["*.css", "*.po", "*.mo"],*/ | |
| "folder_exclude_patterns": ["build","ext","images"], |
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() { | |
| try { | |
| var a = new Uint8Array(1); | |
| return; //no need | |
| } catch(e) { } | |
| function subarray(start, end) { | |
| return this.slice(start, 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 createRingBuffer = function(length){ | |
| var start = 0, buffer = []; | |
| for (var i=0; i<length; i++) | |
| buffer[i] = -10; | |
| return { | |
| get : function(key){return buffer[(start+key) % length];}, | |
| push : function(item){ |
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 obj = {a:1, 'b':'foo', c:[false,null, {d:{e:1.3e5}}]}; | |
| var str = JSON.stringify(obj, undefined, 2); // indentation level = 2 | |
| See the MDN Docs for further details (e.g. on the second argument); | |
| If you need syntax highlighting, you might use some regex magic like so: | |
| function syntaxHighlight(json) { | |
| if (typeof json != 'string') { | |
| json = JSON.stringify(json, undefined, 2); | |
| } |
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 listaNUHSAS=['AN1000038583','AN0326435212','AN0408397178','AN0404408155','AN0415331870','AN0415531870']; | |
| function esNUHSAValido(nuhsa) | |
| { | |
| var re = /AN\d{10}/gi; | |
| if (!re.test(nuhsa)) | |
| return false; | |
| var b=parseInt(nuhsa.substr(2,8)); | |
| var c=parseInt(nuhsa.substr(10,2)); |
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
| importPackage(Packages.net.lingala.zip4j); | |
| var zipFile = new Packages.net.lingala.zip4j.core.ZipFile("d:\\test.zip"); | |
| var filesToAdd = new java.util.ArrayList(); | |
| filesToAdd.add(new java.io.File("d:\\test.dcm")); | |
| var parameters = new Packages.net.lingala.zip4j.model.ZipParameters(); | |
| //parameters.setCompressionMethod(Packages.net.lingala.zip4j.util.Zip4jConstants.COMP_STORE); // set compression method to store compression | |
| parameters.setEncryptFiles(true); |
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 replaceNode(&$srcNode, &$dstNode,&$xmlDoc) | |
| { | |
| $newNode = $xmlDoc->importNode($srcNode, true); | |
| $dstNode->parentNode->replaceChild($newNode,$dstNode); | |
| } | |
| function importNode(&$newNode, &$refNode,&$xmlDoc) | |
| { | |
| if ($newNode->childNodes) | |
| foreach ($newNode->childNodes as $child) |
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
| nasmw.exe -f win32 -Xvc -o "$(IntDir)\$(InputName).obj" $(InputDir)\$(InputName).asm | |
| "$(IntDir)\$(InputName).obj" | |
| extern "C" void __cdecl mmx_memcpy(void *d,void *s,int bytes); |
OlderNewer