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
local a = {} | |
local Plus = {} | |
local Base = {} | |
-- t not self | |
Plus.__index = function (t, k) | |
-- output Plus true false false | |
print("Plus", t == a, t == Plus, t == Base) | |
return Plus[k] | |
end | |
-- t not self |
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
https://developers.google.com/chart/infographics/docs/qr_codes |
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
# get key hash from keystore file | |
# first | |
SET KEY_TOOL=%JAVA_HOME%/bin/keytool.exe | |
SET OPEN_SSL=%openssl% | |
SET ALIAS=androiddebugkey | |
SET KEY_STORE="C:/Users/myuser/.android/debug.keystore" | |
#keytool -exportcert -alias androiddebugkey -keystore "C:/Users/xiaoqing.zhang/.android/debug.keystore" | openssl sha1 -binary |openssl base64 | |
%KEY_TOOL% -exportcert -alias %ALIAS% -keystore %KEY_STORE% | %OPEN_SSL% sha1 -binary | %OPEN_SSL% base64 |
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
<!-- ATTENTION: This intent was auto-generated. Follow instructions at | |
https://g.co/AppIndexing/AndroidStudio to publish your Android app deep links. --> | |
<!-- support multiple inter filter --> | |
<intent-filter> | |
<action android:name="android.intent.action.VIEW" /> | |
<category android:name="android.intent.category.DEFAULT" /> | |
<category android:name="android.intent.category.BROWSABLE" /> | |
<!-- http://litefeel.com/myapp/xxxx | |
visite this link in browse will switch to this application |
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
# .gitconfig or .git/config | |
# git proxy via socks5 | |
[http] | |
proxy = socks5://127.0.0.1:3390 |
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
apply plugin: 'com.android.application' | |
dependencies { | |
compile fileTree(dir: 'libs', include: '*.jar') | |
// compile sdk | |
compile project(':sdks:sdk1') | |
compile project(':sdks:sdk2') | |
} | |
android { |
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
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.4' | |
} | |
} | |
apply plugin: 'android' |
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
// 使用混合做遮罩 | |
CCSize size = m_pMask->getContentSize(); | |
CCRenderTexture *renderTexture = CCRenderTexture::create(size.width, size.height); | |
// 设置默认颜色 | |
renderTexture->setClearColor(ccc4f(0, 0, 0, 0)); | |
// 设置清除颜色标记,否则autoDraw时不能清除颜色 | |
renderTexture->setClearFlags(GL_COLOR_BUFFER_BIT); | |
ccBlendFunc func = { GL_ZERO, GL_SRC_ALPHA }; | |
m_pMask->setBlendFunc(func); |
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
#!/usr/bin/python | |
# coding=utf-8 | |
import os, os.path | |
import gzip, zipfile | |
print zipfile.is_zipfile("test.zip") | |
f = zipfile.ZipFile("test.zip") |
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://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/package.html#encodeURIComponent() | |
void hexchar(unsigned char c, unsigned char &hex1, unsigned char &hex2) | |
{ | |
hex1 = c / 16; | |
hex2 = c % 16; | |
hex1 += hex1 <= 9 ? '0' : 'a' - 10; | |
hex2 += hex2 <= 9 ? '0' : 'a' - 10; |