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 restify = require('restify'); | |
var MongoClient = require('mongodb').MongoClient; | |
var passport = require('passport'); | |
var Strategy = require('passport-http').BasicStrategy; | |
var server = restify.createServer(); | |
var db; | |
passport.use(new Strategy( | |
function(username, password, done) { |
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
*.pbxuser | |
!default.pbxuser | |
*.mode1v3 | |
!default.mode1v3 | |
*.mode2v3 | |
!default.mode2v3 | |
*.perspectivev3 | |
!default.perspectivev3 | |
xcuserdata | |
build |
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
// usage: curl -H "Content-Type: application/json" -d '{"N1":3.1, "N2":5.7}' http://localhost:8080 | |
package main | |
import ( | |
"net/http" | |
"encoding/json" | |
"github.com/gorilla/mux" | |
"log" |
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 | |
PKG=$1 | |
DB=$2 | |
adb shell "run-as $PKG chmod 755 /data/data/$PKG/databases" | |
adb shell "run-as $PKG chmod 666 /data/data/$PKG/databases/$DB" | |
adb shell "rm /sdcard/$DB" | |
adb shell "cp /data/data/$PKG/databases/$DB /sdcard/$DB" | |
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
public static void printStackTrace(Throwable exception) { | |
if (DEBUG) { | |
String fullClassName = exception.getStackTrace()[2].getClassName(); | |
String className = fullClassName.substring(fullClassName.lastIndexOf(".") + 1); | |
String methodName = exception.getStackTrace()[2].getMethodName(); | |
int lineNumber = exception.getStackTrace()[2].getLineNumber(); | |
Log.v("DebugUtils", className + "." + methodName + "():" + lineNumber + ":\nMessage:" + exception.getLocalizedMessage()); | |
for (StackTraceElement stackTraceElement : exception.getStackTrace()) { |
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
public final class PDFPageAdapter extends BaseAdapter { | |
//region Fields | |
private final SparseArray<PointF> mPageSizes; | |
private final Context mContext; | |
private final MuPDFCore mCore; | |
private final int mPages; | |
//endregion | |
//region Constructors | |
public PDFPageAdapter(Context context, MuPDFCore core) { |
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 com.pc.hello; | |
import com.sun.source.util.Trees; | |
import com.sun.tools.javac.code.Flags; | |
import com.sun.tools.javac.code.TypeTags; | |
import com.sun.tools.javac.processing.JavacProcessingEnvironment; | |
import com.sun.tools.javac.tree.TreeMaker; | |
import com.sun.tools.javac.util.Context; | |
import com.sun.tools.javac.util.List; | |
import com.sun.tools.javac.util.Name; |
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
/* | |
public class Person { | |
private String mName; | |
public Person() {} | |
public String getName() { | |
return this.name; | |
} |
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
#Android generated | |
bin | |
gen | |
lint.xml | |
*.apk | |
# Android NDK | |
*.o | |
*.o.d | |
*_g |
NewerOlder