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 MAKE_DOWN_LPARAM(key) (LPARAM)(0x1 | (MapVirtualKey(key, MAPVK_VK_TO_VSC) << 16)) | |
#define MAKE_UP_LPARAM(key) (LPARAM)(0x1 | (KF_REPEAT | KF_UP | MapVirtualKey(key, MAPVK_VK_TO_VSC) << 16)) | |
void PostKey(HWND hWnd, UINT vKey) | |
{ | |
if (hWnd == NULL) | |
return; | |
::PostMessage(hWnd, WM_KEYDOWN, vKey, MAKE_DOWN_LPARAM(vKey)); | |
Sleep(100); |
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
#pragma once | |
#define LUA_REGISTRYINDEX (10000) | |
#define LUA_ENVIRONINDEX (10001) | |
#define LUA_GLOBALSINDEX (10002) | |
#define lua_upvalueindex(i) (LUA_GLOBALSINDEX(i)) | |
typedef struct lua_State lua_State; | |
typedef double lua_Number; | |
typedef int (*lua_CFunction) (lua_State *L); |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Windows.Forms; | |
namespace Utils | |
{ | |
public class HtmlFragment | |
{ |
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
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Bitmap; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.RectF; | |
import android.util.AttributeSet; | |
import android.widget.RelativeLayout; |
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
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapShader; | |
import android.graphics.Canvas; | |
import android.graphics.ColorFilter; | |
import android.graphics.Matrix; | |
import android.graphics.Paint; | |
import android.graphics.Path; | |
import android.graphics.RectF; |
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
local function IsString(ch) | |
return string.match(ch, "[^\t%s%d%+%-%*/%%%(%)]") | |
end | |
local function GetString(szExpression, nIndex) | |
return string.find(szExpression, "^([^\t%s%d%+-%*/%%%(%)]+)", nIndex) | |
end | |
local function IsNumber(ch) | |
return string.match(ch, "[%d%.]+") |
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 var2str(var, szIndent) | |
local szType = type(var) | |
if szType == "nil" then | |
return "nil" | |
elseif szType == "number" then | |
return tostring(var) | |
elseif szType == "string" then | |
return string.format("%q", var) | |
elseif szType == "function" then | |
local szCode = string.dump(var) |
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
package com.mcelf.TutorialMap.util; | |
import java.io.*; | |
import java.util.zip.ZipEntry; | |
import java.util.zip.ZipInputStream; | |
/** | |
* @author evilwk <evilwk@gmail.com> on 2016/8/6 0006 | |
*/ | |
@SuppressWarnings("ResultOfMethodCallIgnored") |
NewerOlder