This file contains hidden or 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
git branch | grep \* | cut -d ' ' -f2 |
This file contains hidden or 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
// easy setup for constraints | |
GridBagConstraints constraints = new GriBagConstraints(); | |
constraints.gridx = 0; | |
constraints.gridy = 0; | |
constraints.fill = GridBagConstraints.HORIZONTAL; | |
// pad the remainder of the panel so that the elements sit at the top | |
constraints.gridheight = GridBagConstraints.REMAINDER; | |
constraints.weighty = 100; | |
panel.add(Box.createGlue(), constraints); |
This file contains hidden or 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
switch (jsonValue.getValueType()) { | |
case STRING: { | |
String string = ((JsonString) jsonValue).getString(); | |
break; | |
} | |
case NUMBER: { | |
JsonNumber number = (JsonNumber) jsonValue; | |
int i = number.intValue(); | |
double d = number.doubleValue(); | |
long l1 = number.longValue(); |
This file contains hidden or 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
GestureDetector.OnGestureListener gListener = new GestureDetector.SimpleOnGestureListener() { | |
@SuppressWarnings("ResourceType") | |
@Override | |
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { | |
scrollBy((int) distanceX, (int) distanceY); | |
if (getScrollY() < -950) { | |
scrollTo(getScrollX(), -949); | |
} | |
if (getScrollY() > 950) { | |
scrollTo(getScrollX(), 949); |
This file contains hidden or 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
\documentclass{article} | |
\usepackage{tikz} | |
\usetikzlibrary{automata,positioning} | |
\begin{document} | |
\begin{center} | |
\begin{tikzpicture}[shorten >=1pt,node distance=2cm,on grid,auto] | |
\node[state] (q_0) {Q0}; % create a node called q_0 with label Q0 | |
\node[state] (q_1) [right=of q_0] {Q1}; % create a node called q_1 with label Q1 | |
\path[->] % start the path drawing |