Skip to content

Instantly share code, notes, and snippets.

int solution(int A[], int N) {
int i = 0;
int * array = calloc(N + 1, sizeof(int));
int sum = N * (N + 1) / 2;
int sum2 = 0;
for (; i < N; i++) {
int solution(int A[], int N) {
// write your code in C99
int minimal = 1;
int i = 0;
int * array = calloc(N + 1, sizeof(int));
for (; i < N; i++) {
if (A[i] > 0 && A[i] <= N && array[A[i]] == 0) {
array[A[i]] = 1;
struct Results solution(int N, int A[], int M) {
struct Results result;
// write your code in C99
int * c = calloc(N, sizeof(int));
int max = 0;
int latestMax = 0;
int i = 0;
int idx = 0;
for (; i < M; i++) {
#!/bin/bash
#Jerry pushes dave in the elevator
for i in `seq 1 10`
do
clear
printf "\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
awk "BEGIN {while (c++<$i) printf \"-\"}"
printf "|"
#!/bin/bash
#
# ADB Connect android device for building via wifi
# Based on stack over flow answer:
# http://stackoverflow.com/questions/4893953/run-install-debug-android-applications-over-wi-fi
#
# Usage:
#
# 1. Make sure adb command is in executable path
#
import System.Environment
import Text.Printf
bz = 0.552284749831
zero = read "0" :: Float
main = do
args <- getArgs
let c = parseArg 0 args
#!/bin/bash
#
# Strict mode: http://redsymbol.net/articles/unofficial-bash-strict-mode/
set -euo pipefail
IFS=$'\n\t'
#
# Usage: script -f fileToPull -p packageName
#
# Dave Thomas Oct 2015
# I've added this function to my ~/.bash_profile
# It allows for quick one liner tests of java code from the command line
# Usage example:
# javai 'System.out.println("Hello, World!");'
#
# Second param can be import statements
# Eg:
@davethomas11
davethomas11 / pull-db.sh
Created February 6, 2017 16:14
Pull a database from your Android device
#!/bin/bash
if [ -z "$1" ]; then
echo "Please specify DB file name"
echo "usage $0 [Database File] [App Package]"
exit 1
fi
if [ -z "$2" ]; then
echo "Please specify the package name to run as"
public interface IDynamicModule {
String getText();
}