function parse_git_branch() {
git branch 2> /dev/null | sed -n -e 's/^\* \(.*\)/[\1]/p'
}
setopt PROMPT_SUBST
This file contains 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 abstract class People { | |
public void printDailyRoutine() { | |
wakeUp(); | |
work(); | |
exercise(); | |
} | |
public abstract void wakeUp(); | |
public abstract void work(); | |
public abstract void exercise(); |
This file contains 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
class Singleton { | |
// As soon as field is declared, instance is created in the memory. | |
// It prevents exceptional case like multiple instances are created | |
// by multi-thread. We don't need to use keywork 'synchronize' in | |
// getInstance(). We just can ignore this case. | |
private static Singleton instance = new Singleton(); | |
// private constructor | |
private Singleton() {} | |
This file contains 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.doubleknd26.exercise.lucene.searcher; | |
/** | |
* Copyright Manning Publications Co. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
This file contains 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
/** | |
* Copyright Manning Publications Co. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains 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
class Fruit { | |
private String name; | |
public Fruit(String name) { | |
this.name = name; | |
} | |
public String getName() { | |
return name; | |
} |
This file contains 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
/** | |
* Created by Kideok Kim on 17/06/2018. | |
*/ | |
public class TCPServerTest { | |
private static ExecutorService serverExecutor; | |
private static final String HOST = "localhost"; | |
private static final int PORT = 9001; | |
@BeforeClass | |
public static void setUpClass() { |