View NativeDll.cs
class NativeDLL : DllLoader
private delegate string MyNativeMethod();
public NativeDLL(string dllPath)
: base(dllPath) { }
internal string Hello()
var method = this.LoadFunction<MyNativeMethod>("Hello");
View CopyOf
import java.util.*;
import static java.lang.System.*;
public class CopyOf{
public static int[] copyOf(int[] arr){
int blah[] = new int[arr.length];
for(int i = 0; i < arr.length; i++){
blah[i] = arr[i];
return blah;
View Translate.xaml
Target="{x:Reference Logo}">
<xamanimation:TranslateToAnimation TranslateY="180" TranslateX="95" Duration="750" />
<xamanimation:TranslateToAnimation TranslateY="-180" TranslateX="-95" Duration="750" />
<xamanimation:TranslateToAnimation TranslateY="0" TranslateX="0" Duration="750" />
View DllLoader.cs
internal abstract class DllLoader : IDisposable
private static extern IntPtr LoadLibraryEx(string dllToLoad, IntPtr hFile, LoadLibraryFlags flags);
private static extern IntPtr GetProcAddress(IntPtr hModule, string procedureName);
[DllImport("kernel32.dll", SetLastError = true)]
private static extern bool FreeLibrary(IntPtr hModule);
View Book Store
import java.util.*;
class Book {
private String bookTitle;
private String bookAuthor;
private String bookISBN;
private int bookCopies;
Book() {
View OpenTracingThreadPropagation.scala
class OpenTracingThreadPropagation(tracer: Tracer) extends ThreadPropagation[Span] {
val scopeManager = tracer.scopeManager()
// captures the span at the call site
override def captureThreadState(): Span = tracer.activeSpan()
// copies the span into the new thread being spawned
override def wrapWithState(runnable: Runnable, state: Span): Runnable = new Runnable {
override def run(): Unit = {
View Banking System
import java.util.Random;
import java.util.Scanner;
import static java.lang.System.out;
class Account{
private String accountHolderName;
import android.Manifest;
import android.os.Build;
View gist:c7a66de11b29342c854adb3f61da8fcf
install PostgreSQL 9 in Mac OSX via Homebrew
Mac OS X Snow Leopard
System Version: Mac OS X 10.6.5
Kernel Version: Darwin 10.5.0
Install notes for PostgreSQL 9.0.1 install using Homebrew:
sh-3.2# brew install postgresql
View App.vue
<view class="container">
<view class="main">
<text-input />
import TextInput from './src/TodoInput';