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
0 |
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
<!-- 参考原链接: http://www.cnblogs.com/kidney/p/6052935.html?utm_source=gold_browser_extension --> | |
<div id="app"> | |
<input type="text" v-model="text"/> | |
{{text}} | |
</div> | |
<script> | |
function compile(dom, vm) { | |
const frag = document.createDocumentFragment(); |
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
static getDataUri (url) { | |
return new Promise((resolve, reject) => { | |
var image = new window.Image() | |
image.crossOrigin = 'Anonymous' | |
image.onload = function () { | |
var canvas = document.createElement('canvas') | |
window.alert('创建了 Canvas') | |
window.alert(canvas) | |
canvas.width = image.width |
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
❯ cordova build ios | |
Building project: /Users/penghaiyang/Coding/chaodp_cordova/platforms/ios/Chaodp.xcodeproj | |
Configuration: Debug | |
Platform: emulator | |
Build settings from command line: | |
CONFIGURATION_BUILD_DIR = /Users/penghaiyang/Coding/chaodp_cordova/platforms/ios/build/emulator | |
SDKROOT = iphonesimulator10.0 | |
SHARED_PRECOMPS_DIR = /Users/penghaiyang/Coding/chaodp_cordova/platforms/ios/build/sharedpch | |
Build settings from configuration file '/Users/penghaiyang/Coding/chaodp_cordova/platforms/ios/cordova/build-debug.xcconfig': |
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 wrapValue(n) { | |
return function() { | |
return n += 2; | |
}; | |
} | |
var wrap1 = wrapValue(1); | |
console.log(wrap1()); //-> 1 | |
console.log(wrap1()); |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define MAXSIZE 50000 | |
struct stack { | |
int top; | |
int m[MAXSIZE]; | |
int n[MAXSIZE]; | |
int s[MAXSIZE]; |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#define MAXSIZE 1000 | |
static int call_init_canvas = 0; | |
static int call_save_stack = 0; | |
static int call_add_ret = 0; | |
static int call_set_rock = 0; | |
static int call_kick_rock = 0; |