class Test {
static boolean val = false;
public static void main() {
if (!val) {
System.out.println("Test");
}
}
}
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
alias showalias='cat ~/.bash_aliases' | |
#Type ma <aliasname> in a directory and it will create an alias to cd into that directory | |
makeAlias() | |
{ | |
curDir=`pwd` | |
echo "alias $1='cd $curDir'" >> ~/.bash_aliases | |
source ~/.bashrc | |
} |
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
; Store all backups in a single directory | |
(setq backup-directory-alist | |
`((".*" . ,"~/.emacs-backups/"))) | |
(setq auto-save-file-name-transforms | |
`((".*" ,"~/.emacs-backups/" t))) | |
(when (>= emacs-major-version 24) | |
(require 'package) |
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
alias showalias='cat ~/.zsh_alias' | |
#Add source ~/.zsh_alias in your ~/.zshrc | |
#Type ma <aliasname> in a directory and it will create an alias to cd into that directory | |
makeAlias() | |
{ | |
curDir=`pwd` | |
echo "alias $1='cd $curDir'" >> ~/.zsh_alias | |
source ~/.zshrc | |
} |
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 long getIntersection(List<HLL> hllList) { | |
for(HLL hll:hllList) { | |
logger.debug("Individual cardinality of " + hll.cardinality()); | |
} | |
logger.debug("get intersection of hllList = " + hllList); | |
if(hllList.size() == 1) { | |
HLL hllObject = hllList.get(0); | |
logger.debug("Single Cardinality " + hllObject.toString() + " = " + hllObject.cardinality()); | |
return hllObject.cardinality(); |
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
killGrep() | |
{ | |
ps aux | grep $1 | grep -v grep | tr -s " " | cut -d " " -f 2 | xargs kill -9 | |
} | |
alias kg=killGrep |
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
(defun todo-create-directory (directory) | |
"Creates the todo directory." | |
(if (file-exists-p directory) (message "Directory exists") | |
(make-directory directory) | |
(message "Directory created") | |
)) | |
(defun create-todo-file (directory filename) | |
"Checks if the todo file exists if not creates it." | |
(todo-create-directory directory) |
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
(defun new-scratch-buffer-new-window () | |
"Create a new scratch buffer in a | |
new window. I generally take a lot of notes | |
in different topics. For each new topic hit | |
C-c C-s and start taking your notes. | |
Most of these notes don't need to be | |
saved but are used like quick post it | |
notes." | |
(interactive) | |
(let (($buf (generate-new-buffer "notes"))) |
I hereby claim:
- I am prathik on github.
- I am prathikraj (https://keybase.io/prathikraj) on keybase.
- I have a public key ASBCkjZs8vQ3AMYak-QjBP8yMHqdfgWg6Nqy2M4wjLowoQo
To claim this, I am signing this object:
I hereby claim:
- I am prathik on github.
- I am prathikraj (https://keybase.io/prathikraj) on keybase.
- I have a public key ASBCkjZs8vQ3AMYak-QjBP8yMHqdfgWg6Nqy2M4wjLowoQo
To claim this, I am signing this object:
OlderNewer