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
public class ShowIf { | |
public void printWay(boolean A, boolean B) { | |
if(A) { | |
System.out.println("A is true, but B is not"); | |
} | |
if(B) { | |
System.out.println("B is true, but A is not"); | |
}else{ | |
System.out.println("Both A and B aren't true"); | |
} |
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
sut.printWay(true, true); | |
sut.printWay(true, false); | |
sut.printWay(false, true); | |
sut.printWay(false, false); |
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
public class ShowIf { | |
public void printWay(boolean A, boolean B) { | |
if(A) { | |
if(B) { | |
System.out.println("A ist wahr, und auch B"); | |
} else { | |
System.out.println("A ist wahr, aber nicht B"); | |
} | |
} else { | |
if(B) { |
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
public class ShowIf { | |
public void printWay(boolean A, boolean B) { | |
if(A && B) { | |
System.out.println("A ist wahr, und auch B"); | |
} else if(A) { | |
System.out.println("A ist wahr, aber nicht B"); | |
} else if(B) { | |
System.out.println("B ist wahr, aber nicht A"); | |
} else { | |
System.out.println("weder A noch B ist wahr"); |
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
if(actualValue < maximumValue) { | |
return True; | |
} else { | |
return False; | |
} |
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
return actualValue < maximumValue; |
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
export PS1="\[\033[01;36m\]`ifconfig -a |\ | |
perl -ne 'if (m/^\s*inet (?:Adresse:)?([\d.]+).*?cast/) \ | |
{print qq($1); exit 0; }'`\[\033[00m\]:\[\033[01;36m\]\W \ | |
\[\033[01;36m\]\u\[\033[00m\]\$ " |
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
unset PROMPT_COMMAND | |
function title { | |
echo -en "\033]2;$1\007" | |
} | |
title `ifconfig -a | perl -ne \ | |
'if (m/^\s*inet (?:addr:)?([\d.]+).*?cast/) {print qq($1); exit 0; }'` |
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
#!/bin/sh #################################################################### | |
# | |
# author: Erik Bernoth | |
# | |
# tricks the mac 10.5 terminal tab name into writing the ssh position instead | |
# of just "ssh" | |
# | |
# (c) 2009, do with this program what you want | |
# | |
############################################################################## |
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
public List getRoute(myNode start, myNode end){ | |
//initialise variables | |
myNode actual = end; | |
myNodeList wayBack = new myNodeList(); | |
wayBack.add(end); | |
myNodeList way = new myNodeList(); | |
//find the minimum spanning tree with end | |
myNodeMap map = this.spanner.span(this.g, start); | |
OlderNewer