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
cd ~/Library/Application Support/SourceTree | |
rm {id@STauth-stash....} | |
re run stash |
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
int killKthBit(int n, int k) { | |
return n - ( n & (int) Math.pow(2,k-1)) ; | |
} |
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
import java.util.concurrent.atomic.AtomicInteger; | |
/** | |
* Created by chkyu on 2016-03-22. | |
*/ | |
public class A { | |
private static AtomicInteger a ; | |
A(){ |
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 class A { | |
private static int a ; | |
A(){ | |
a=15; | |
} | |
public synchronized void work(){ | |
a--; | |
} | |
public int getA(){ |
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 static void checkFilePath(String path) { | |
File f_path = new File(path); | |
if(!f_path.exists())f_path.mkdirs(); | |
} |
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
<script type="text/javascript"> | |
function sendSize(obj) { | |
obj.style.height = "auto"; | |
contentHeight = obj.contentWindow.document.documentElement.scrollHeight; | |
if(contentHeight>960) | |
obj.style.height = contentHeight + 10 + "px"; | |
else | |
obj.style.height = "960px"; | |
} |
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
String sCurTime = null; | |
String sMinTime = "20131026233000"; | |
String sMaxTime = "20131027181818"; | |
String sTime = ""; | |
sCurTime = new java.text.SimpleDateFormat("yyyyMMddHHmmss", java.util.Locale.KOREA).format(new java.util.Date()); | |
if (sCurTime.compareTo(sMinTime) >= 0 && sCurTime.compareTo(sMaxTime) < 0) { | |
function1(); | |
function2(); |
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
function openPopup(url, height, width, mesg) { | |
var re = /[ \{\}\[\]\/?.,;:|\)*~`!^\-_+┼<>@\#$%&\'\"\\\(\=]/gi; | |
var targetName = url.replace(re, ""); | |
if (mesg != null && mesg != "" && mesg != undefined && mesg.length > 0) { | |
alert(mesg); | |
} else { | |
try { | |
var popup = window.open('about:blank', targetName, 'directories=no, location=no, menubar=no, resizable=no, scrollbars=no, status=yes, toolbar=no, height=' + height + ', width=' + width); | |
popup.focus(); // http://support.microsoft.com/kb/979954 |