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
| Titanium.App.addEventListener("playvideo", function (e) { | |
| win11 = Titanium.UI.createWindow({ | |
| orientationModes: [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT], | |
| title: "Video", | |
| zIndex: 222222 | |
| }); | |
| var activeMovie = Titanium.Media.createVideoPlayer({ | |
| fullscreen: !0, | |
| autoplay: !0, |
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
| // inline caching | |
| _str = require("stream").Stream; | |
| require("util").inherits(StreamCache, _str); | |
| function StreamCache() { | |
| _str.call(this); | |
| this.readable = this.writable = !0; | |
| this._buffers = []; | |
| this._dests = []; | |
| this._ended = !1 |
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
| atkinsSieve = function (e) { | |
| last = 0; | |
| for (var d = Array(e + 1), a = 0; a < d.length; a++) d[a] = 0; | |
| for (var f = Math.floor(Math.sqrt(e)) + 1, b, c, a = 1; a < f; a++) for (c = 1; c < f; c++) { | |
| b = 4 * Math.pow(a, 2) + Math.pow(c, 2); | |
| if (b <= e && (1 === b % 12 || 5 === b % 12)) d[b] ^= 1; | |
| b = 3 * Math.pow(a, 2) + Math.pow(c, 2); | |
| b <= e && 7 === b % 12 && (d[b] ^= 1); | |
| a > c && (b = 3 * Math.pow(a, 2) - Math.pow(c, 2), b <= e && 11 === b % 12 && (d[b] ^= 1)) | |
| } |
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
| wL = ["to", | |
| "as", | |
| "you", | |
| "the", | |
| "i", | |
| "to", | |
| "a", | |
| "and", | |
| "it", | |
| "of", |
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
| /* | |
| p is plaintext (non-encrypted value) OR CIPHER (already encrypted text) | |
| t is either false [cbc256("value", false, "key")] for encryption or true for decryption | |
| k is key. | |
| */ | |
| /* | |
| Example: | |
| val = "value"; | |
| v = cbc256(val, false, "key"); |
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
| sE = function (e, c, x) { | |
| var f = { | |
| "\b": "\\b", | |
| "\t": "\\t", | |
| "\n": "\\n", | |
| "\v": "\\x0B", | |
| "\f": "\\f", | |
| "\r": "\\r", | |
| "\\": "\\\\", | |
| '"': '\\"', |
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 division = function (b, a) { | |
| var c; | |
| neg = quotient = 1; | |
| if (0 < b && 0 > a || 0 > b && 0 < a) neg = -1; | |
| tempdividend = 0 > b ? -b : b; | |
| tempdivisor = 0 > a ? -a : a; | |
| if (tempdivisor == tempdividend) c = 1 * neg; | |
| else if (tempdividend < tempdivisor) c = 0; | |
| else { | |
| for (; tempdivisor << 1 <= tempdividend;) tempdivisor <<= 1, quotient <<= 1; |
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
| /* | |
| Consensus Stamp Format | |
| <Day> / <Month in Quarter>:Q<Quarter> / <Years since 1970> | |
| 27th June, 2013 <> 27/3:Q2/43. | |
| */ | |
| toCSF = function (v) { | |
| !(v instanceof Date) && (v=new Date(v)); |
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 encrypt = function (i, d) { | |
| if (null == d || 0 >= d.length) return null; | |
| for (var a = "", b = 0; b < d.length; b++) a += d.charCodeAt(b).toString(); | |
| var b = Math.floor(a.length / 5), | |
| g = parseInt(a.charAt(b) + a.charAt(2 * b) + a.charAt(3 * b) + a.charAt(4 * b) + a.charAt(5 * b), 10), | |
| j = Math.ceil(d.length / 2), | |
| h = Math.pow(2, 31) - 1; | |
| if (2 > g) return null; | |
| for (var c = Math.round(1E9 * Math.random()) % 1E8, a = a + c; 10 < a.length;) a = (parseInt(a.substring(0, 10), 10) + parseInt(a.substring(10, a.length), 10)).toString(); | |
| for (a = (g * a + j) % h, e = "", f = "", b = 0; b < i.length; b++) e = parseInt(i.charCodeAt(b) ^ Math.floor(255 * (a / h)), 10), f = 16 > e ? f + ("0" + e.toString(16)) : f + e.toString(16), a = (g * a + j) % h; |
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
| Operation => Optimized Operation. | |
| x * 10 => (((x << 2) + x) << 1) | |
| x * 100 => ((((((x << 2) + x) << 1) << 2) + (((x << 2) + x) << 1)) << 1) | |
| x * 1000 =>(((((((((x << 2) + x) << 1) << 2) + (((x << 2) + x) << 1)) << 1) << 2) + ((((((x << 2) + x) << 1) << 2) + (((x << 2) + x) << 1)) << 1)) << 1) | |
| x * 2 => x << 1 | |
| x * 4 => x << 2 | |
| x * 8 => x << 3 | |
| x * 16 => x << 4 |