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
{ | |
"env": { | |
"browser": true, | |
"node": false, | |
"amd": false | |
}, | |
"rules": { | |
"no-array-constructor": 2, | |
"no-dupe-keys": 2, |
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
define([ | |
'intern!object', | |
'require', | |
'bir/RemoteRequire', | |
'bir/dijit', | |
'bir/value' | |
], function (registerSuite, require, RemoteRequire, dijit, value) { | |
registerSuite({ | |
name: 'example', |
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
define([ | |
'dojo/_base/declare', 'dojo/dom-construct' | |
], function(declare, domConstruct) { | |
return declare(null, { | |
// summary: | |
// A mixin for creating a store-based widget | |
store: null, | |
query: null, |
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 () { | |
function abbreviationCompleter( completers ) { | |
return { | |
name: 'abbreviation', | |
triggerPrefix: '::', | |
options: [ | |
{ letters: 'FYI', expansion: 'For Your Information' }, | |
{ letters: 'AFAIK', expansion: 'As Far As I Know' }, | |
{ letters: 'IIRC', expansion: 'If I Recall Correctly' }, | |
], |
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
wp.domReady( function () { | |
var button = document.getElementById( 'mbwr-meta-box-button' ); | |
var container = document.getElementById( 'mbwr-meta-box-media-upload' ); | |
// NOTE: I'm not sure what timing issue this is avoiding, but it's necessary to avoid error. | |
setTimeout( function () { | |
wp.element.render( | |
wp.element.createElement( wp.editor.PostFeaturedImage ), | |
container | |
); |
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
fn get<T, U: From<T>>(s: T) -> U { | |
U::from(s) | |
} | |
fn main() { | |
let x: u64 = get(123u8); | |
println!("{:064b}", x); | |
} |
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
diff --git a/packages/php-wasm/compile/php/Dockerfile b/packages/php-wasm/compile/php/Dockerfile | |
index fdc458d0..c97f8606 100644 | |
--- a/packages/php-wasm/compile/php/Dockerfile | |
+++ b/packages/php-wasm/compile/php/Dockerfile | |
@@ -809,20 +809,21 @@ RUN set -euxo pipefail; \ | |
"_wasm_set_content_type", \n\ | |
"_wasm_set_cookies", \n\ | |
"_wasm_set_path_translated", \n\ | |
"_wasm_set_php_code", \n\ | |
"_wasm_set_query_string", \n\ |
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
Initial memory limit: 64M | |
Initial memory usage: 0.38388824462891 MB | |
* iteration: 0 | |
* strlen(): 0.0625 MB | |
* memory_get_usage(): 0.45029449462891 MB | |
* aggregate strlen()'s: 0.0625 MB | |
* iteration: 1 | |
* strlen(): 0.125 MB |
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 | |
ini_set('memory_limit', '1G'); | |
function useAllMemory() { | |
echo "Initial memory limit: " . ini_get( 'memory_limit' ) . '<br>'; | |
echo "Initial memory usage: " . (memory_get_usage()/(1024*1024)) . ' MB <br>'; | |
echo "<br>"; | |
$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
function isURLScoped(e){return e.pathname.startsWith("/scope:")}function getURLScope(e){return isURLScoped(e)?e.pathname.split("/")[1].split(":")[1]:null}function setURLScope(e,t){let r=new URL(e);if(isURLScoped(r))if(t){const s=r.pathname.split("/");s[1]=`scope:${t}`,r.pathname=s.join("/")}else r=removeURLScope(r);else if(t){const s=r.pathname==="/"?"":r.pathname;r.pathname=`/scope:${t}${s}`}return r}function removeURLScope(e){if(!isURLScoped(e))return e;const t=new URL(e),r=t.pathname.split("/");return t.pathname="/"+r.slice(2).join("/"),t}const currentJsRuntime=function(){return typeof process<"u"&&process.release?.name==="node"?"NODE":typeof window<"u"?"WEB":typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?"WORKER":"NODE"}();if(currentJsRuntime==="NODE"){let e=function(r){return new Promise(function(s,n){r.onload=r.onerror=function(i){r.onload=r.onerror=null,i.type==="load"?s(r.result):n(new Error("Failed to read the blob/file"))}})},t=function(){const r=new Uint8Array([1,2,3,4]),n=new File |
OlderNewer