cdrecord -scannbusscsibus1:
1,0,0 100) 'HL-DT-ST' 'DVD+-RW GSA-H31L' 'W616' Removable CD-ROM
1,1,0 101) *
cdrecord -v -pad dev=1,0,0 speed=8 blub.iso
all about go, ruby, python, perl, java, scala, osgi, RCP computing, network, hacking, security, encryption. and other interesting stuff
Montag, 19. Januar 2009
Donnerstag, 8. Januar 2009
Java SQL derby
derby -> apache
System.setProperty("derby.system.home", "dbname.db");
Connection conn = DriverManager.getConnection("jdbc:derby:test_db;create=true");
try {
Statement s = conn.createStatement();
s.execute("CREATE TABLE data (id INT, text VARCHAR(100), PRIMARY KEY (id))");
s.execute("INSERT INTO data VALUES (1, 'Hallo')");
s.execute("INSERT INTO data VALUES (2, 'Blub')");
ResultSet rs = s.exeucteQuery("SELECT text FROM data WHERE id=1");
while (rs.next()) {
String text = rs.getString("text");
System.out.println(text);
}
} finally {
conn.close();
}
System.setProperty("derby.system.home", "dbname.db");
Connection conn = DriverManager.getConnection("jdbc:derby:test_db;create=true");
try {
Statement s = conn.createStatement();
s.execute("CREATE TABLE data (id INT, text VARCHAR(100), PRIMARY KEY (id))");
s.execute("INSERT INTO data VALUES (1, 'Hallo')");
s.execute("INSERT INTO data VALUES (2, 'Blub')");
ResultSet rs = s.exeucteQuery("SELECT text FROM data WHERE id=1");
while (rs.next()) {
String text = rs.getString("text");
System.out.println(text);
}
} finally {
conn.close();
}
Java SQL
java.sql.*
connecting to Driver Interface
try {
class.forName("com.mysql.jdbc.Driver").newInstance();
} catch ( Exception e) { ... }
Connection cn = DriverManager.getConnection("jdbc:mysql://localhost/test?user=bla&password=bla");
SQLException ex;
ex.getMessage().ex_getSQLState()
ex.getErrorCode()
Statement st = cn.createStatement();
ResultSet rs = st.executeQuery("SELECT ...");
if( st.execute("SELECT ..."))
rs = st.getResultSet();
rs.close(); st.close();
connecting to Driver Interface
try {
class.forName("com.mysql.jdbc.Driver").newInstance();
} catch ( Exception e) { ... }
Connection cn = DriverManager.getConnection("jdbc:mysql://localhost/test?user=bla&password=bla");
SQLException ex;
ex.getMessage().ex_getSQLState()
ex.getErrorCode()
Statement st = cn.createStatement();
ResultSet rs = st.executeQuery("SELECT ...");
if( st.execute("SELECT ..."))
rs = st.getResultSet();
rs.close(); st.close();
STUFF
objdump -D -b -m i386 egg_1 > egg_1.asm
((void(*)())buf)(); execute buf, cast to function
p $ebp+4 # show the address
x $ebp+4 # show the content
disas 0x00c42d00
unlimit -c unlimited -> on segmentation fault will get a coredump
-> gdb -c core*
ald: assembly language debugger
ald: attach pid
load prog
d, b 0xbf...
n e -n 280 0xBF
d -n 22 0x...
((void(*)())buf)(); execute buf, cast to function
p $ebp+4 # show the address
x $ebp+4 # show the content
disas 0x00c42d00
unlimit -c unlimited -> on segmentation fault will get a coredump
-> gdb -c core*
ald: assembly language debugger
ald: attach pid
load prog
d, b 0xbf...
n e -n 280 0xBF
d -n 22 0x...
Dienstag, 6. Januar 2009
JAVA networking
TCP-Socket
java.net.Socket
java.net.ServerSocket
Socket.getInputStream() Socket.getOutputStream()
UDP-Socket
java.net.DatagramSocket
java.net.DatagramPacket
send(), receive()
RMI Remote Method Invocation
java.rmi.Remote
java.rmi.server.UnicastRemoteObject
rmic rmi-compiler -> Stub and Skeletonclass
class S as server, implement interface SI, SI has the bussineslogic,
rmi build from it the correct in/output for data
JMS Java Messaging Service
(middleware) asynchrone communication
Queue (point2point), Topic(publish/subscriber)
SOAP simple object access protocol
inter-object-communication (most http as protocol)
XML, textoriented
java.net.Socket
java.net.ServerSocket
Socket.getInputStream() Socket.getOutputStream()
UDP-Socket
java.net.DatagramSocket
java.net.DatagramPacket
send(), receive()
RMI Remote Method Invocation
java.rmi.Remote
java.rmi.server.UnicastRemoteObject
rmic rmi-compiler -> Stub and Skeletonclass
class S as server, implement interface SI, SI has the bussineslogic,
rmi build from it the correct in/output for data
JMS Java Messaging Service
(middleware) asynchrone communication
Queue (point2point), Topic(publish/subscriber)
SOAP simple object access protocol
inter-object-communication (most http as protocol)
XML, textoriented
all: why
here are all information that i gather for me.
that is something about java, hacking, biotechnology and so.
that is something about java, hacking, biotechnology and so.
Abonnieren
Posts (Atom)