remote connection
# check if a hostname/port is open
nc -zv <host> <port>
# connect to host/port with telnet
telnet <host> <port>
general commands
# global installation | |
npm install -g <packagename> |
remote connection
# check if a hostname/port is open
nc -zv <host> <port>
# connect to host/port with telnet
telnet <host> <port>
general commands
document.addEventListener('touchstart', function(event) { | |
for (var property in event.touches[0]) { | |
console.log(property + ": " + event.touches[0][property]); | |
} | |
}, false); |
int i = 123; | |
object o = i; // boxing -> type of o is System.Int32 | |
int j = (int)o; // unboxing |
class Data { | |
FileStream s; | |
public string FileName { | |
set { s = new FileStream( value, FileMode.Create ); } | |
get { return s.Name; } | |
} | |
} | |
Data d = new Data(); |
// (1) Branch my-calc-branch erzeugen | |
svn copy | |
http: //svn.example.com/repos/calc/trunk \ | |
http: //svn.example.com/repos/calc/branches/my-calc-branch \ | |
-m "Creating a private branch of /calc/trunk." | |
// (2) Branch my-calc-branch checkout |
// Anzeigen Commit Message von r9238: | |
svn log -r 9238 | |
// Effektive Code differenzen anzeigen +/-: | |
svn diff -c 9238 | |
// anzeigen differenz svn repo / lokal: | |
svn status | |
// lokale Änderungen rückgängig machen: |
package fizzbuzz; | |
import java.util.regex.*; | |
import org.junit.Before; | |
import org.junit.Test; | |
import static org.junit.Assert.*; | |
public class FizzBuzzSequenceTest { | |
private FizzBuzzSequence _fizzBuzzSequence; |
package fizzbuzz; | |
public class FizzBuzzSequence { | |
private FizzBuzz _fizzBuzz; | |
public FizzBuzzSequence() { | |
_fizzBuzz = new FizzBuzz(); | |
} |
package fizzbuzz; | |
public class FizzBuzz { | |
public String getFizzBuzzValueOf(int number){ | |
if(number % 15 == 0){ | |
return "FizzBuzz"; | |
} | |
if(number % 3 == 0){ | |
return "Fizz"; |