sudo adb start-server
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
import java.io.*; | |
public class CVJNI { | |
//Load jni library | |
static { | |
try { | |
System.loadLibrary("cvjni"); | |
} catch (Exception e) { | |
e.printStackTrace(); | |
} |
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
use std::ptr; | |
pub type c_int = i32; | |
pub type time_t = i64; | |
pub type c_long = i64; | |
pub type c_char = i8; | |
pub type suseconds_t = i64; | |
#[repr(u8)] | |
enum c_void { | |
__variant1, |
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
#include <sys/types.h> | |
#include <dirent.h> | |
#include <errno.h> | |
#include <vector> | |
#include <string> | |
#include <iostream> | |
using namespace std; | |
/*function... might want it in some class?*/ |
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 event = {//发布-订阅功能 | |
clientList: [], | |
listen: function(key, fn){ | |
if(!this.clientList[key]){ | |
this.clientList[key] = []; | |
} | |
this.clientList[key].push(fn); //订阅的消息添加进缓存列表 | |
}, | |
trigger: function(){ | |
var key = Array.prototype.shift.call(arguments), |
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
#!/bin/bash | |
DATE=`date +%Y-%m-%d` | |
for file in ./* | |
do | |
if [ -d "$file" ] | |
then | |
echo $file-$DATE.zip | |
#7z a -r $file-$DATE.zip $file |
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
// The module 'vscode' contains the VS Code extensibility API | |
// Import the module and reference it with the alias vscode in your code below | |
var vscode = require('vscode'); | |
var ass = require("node-sass"); | |
var fs = require("fs"); | |
function css_beautify(source_text, options) { | |
options = options || {}; | |
source_text = source_text || ''; | |
// HACK: newline parsing inconsistent. This brute force normalizes the input. |
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
package main | |
import ( | |
"fmt" | |
"hash/crc32" | |
) | |
var crcTable = crc32.MakeTable(crc32.Castagnoli) | |
// crc implements the checksum specified in section 3 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
macro_rules! test( | |
($x:ident) => ({ | |
let z = concat_idents!(hello_, $x); | |
z(); | |
}) | |
) | |
fn hello_world() { ... } | |
fn main() { |
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
/* match: search for regexp anywhere in text */ | |
int match(char *regexp, char *text) { | |
if (regexp[0] == '^') | |
return matchhere(regexp + 1, text); | |
do { /* must look even if string is empty */ | |
if (matchhere(regexp, text)) | |
return 1; | |
} while (*text++ != '\0'); | |
return 0; | |
} |
NewerOlder