Skip to content

Instantly share code, notes, and snippets.

View jooyunghan's full-sized avatar

Jooyung Han jooyunghan

View GitHub Profile
jar.libs.dir=../gol/jar
@jooyunghan
jooyunghan / build.xml
Created July 21, 2011 23:02
golandroid/build.xml 중에서
    <target name="-pre-compile">
     <subant target="jar">
      <fileset dir="../gol" includes="build.xml" />
     </subant>
    </target>
@jooyunghan
jooyunghan / build.properties
Created July 21, 2011 23:04
#golandroidtest/build.properties 중에서
extensible.libs.classpath=../gol/jar
public void testOnButtonClick_StartSettings() throws Exception {
AlarmActivity activity = getActivity();
activity.onAddAlarm();
Intent intent = getStartedActivityIntent();
assertEquals(SettingsActivity.class.getCanonicalName(),
intent.getComponent().getClassName());
}
public void testGiven15Alarms_WhenAddNewAlarm_ThenShowToastWithErrorMessage() throws Exception {
populateAlarms(15);
mSolo.clickOnButton(0); // try to add new alarm
// check Toast message
assertTrue(mSolo.searchText(mActivity.getString(R.string.max_alarm_error)));
assertEquals(15, mActivity.getAlarmCount());
}
@jooyunghan
jooyunghan / about.md
Created August 29, 2011 08:11 — forked from jasonrudolph/about.md
Programming Achievements: How to Level Up as a Developer
@jooyunghan
jooyunghan / concurrency_idioms.go
Created May 12, 2012 15:48
DevFestX Korea 2012 - Go concurrency idioms
package main
import (
"fmt"
"time"
)
type Data struct {
data string
rq1, rq2, rs1, rs2 chan bool
@jooyunghan
jooyunghan / Main.java
Created September 19, 2012 05:01
Main.java
package com.jooyunghan.concurrency;
import static java.lang.String.format;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
class Message {
@jooyunghan
jooyunghan / mine.cpp
Created May 24, 2013 02:46
DevDay MineSweeper Part 1
#include <iostream>
using namespace std;
const char CLOSED = '#';
const char MINE = '*';
const char EMPTY = '-';
const int row = 2;
const int col = 6;
char input[row][col] = {
@jooyunghan
jooyunghan / trie.cpp
Created October 30, 2013 13:59
trie initial
class trie {
int count;
unordered_map<char, trie> children;
int& get(const char* s) {
if (*s == '\0') {
return count;
} else {
return children[*s].get(s+1);
}