how to secure your data with pgp
Published July 15, 2008 Uncategorized Leave a CommentTags: gpg, pgp, security
the man who sold his life
Published June 24, 2008 Uncategorized Leave a CommentTags: life, man, sold
после поиска подходящих решений нашел вот
import java.sql.*;
public class Test {
public static void main(String[] args) throws Exception {
Class.forName("org.sqlite.JDBC");
Connection conn = DriverManager.getConnection("jdbc:sqlite:test.db");
Statement stat = conn.createStatement();
stat.executeUpdate("drop table if exists people;");
stat.executeUpdate("create table people (name, occupation);");
PreparedStatement prep = conn.prepareStatement(
"insert into people values (?, ?);");
prep.setString(1, "Gandhi");
prep.setString(2, "politics");
prep.addBatch();
prep.setString(1, "Turing");
prep.setString(2, "computers");
prep.addBatch();
prep.setString(1, "Wittgenstein");
prep.setString(2, "smartypants");
prep.addBatch();
conn.setAutoCommit(false);
prep.executeBatch();
conn.setAutoCommit(true);
ResultSet rs = stat.executeQuery("select * from people;");
while (rs.next()) {
System.out.println("name = " + rs.getString("name"));
System.out.println("job = " + rs.getString("occupation"));
}
rs.close();
conn.close();
}
}
(код сперт из ссылки выше)
представляет собой заимплеменченый sqlite на pure java с предоставлением jdbc интерфейса (радует то что не юзает .so и .dll) в принципе gg, мне повезет ‘sqlite jdbc’ к нему и приводит
lvee.org едем
вот нашел такую штучку: http://goosh.org/
для очень быстрого напсиания gui очень подходят скриптовые языки + 1н из лучших ui фреймворков – Qt
from PyQt4 import QtGui import sys app = QtGui.QApplication(sys.argv) widg = QtGui.QWidget() widg.resize(100,100) widg.setWindowTitle( 'heya' ) widg.show() sys.exit(app.exec_())
import unittest
from struct import *
class PingAlgorythmTestCase(unittest.TestCase):
def setUp(self):
self.netw = Network('testnw' )
self.comp1 = Computer('1' )
self.comp2 = Computer('2' )
self.comp3 = Computer('3' )
self.comp4 = Computer('4' )
self.comp5 = Computer('5' )
self.conn1 = Connection(self.comp1,self.comp2)
self.conn2 = Connection(self.comp1,self.comp3)
self.conn3 = Connection(self.comp3,self.comp4)
self.conn4 = Connection(self.comp4,self.comp5)
self.conn5 = Connection(self.comp1,self.comp4)
self.netw.addConnection(self.conn1)
self.netw.addConnection(self.conn2)
self.netw.addConnection(self.conn3)
self.netw.addConnection(self.conn4)
self.netw.addConnection(self.conn5)
def testping1(self):
alg = PingAlgorithm(self.netw, self.comp1, self.comp2)
self.assertEqual(alg.doAction().time,1)
def testping2(self):
alg = PingAlgorithm(self.netw, self.comp2, self.comp5)
self.assertEquals(alg.doAction().time,3)
def testping3(self):
alg = PingAlgorithm(self.netw, self.comp2, self.comp5)
self.assertEquals(alg.doAction().time,3)
if __name__ == "__main__":
unittest.main()
working gentoo on my laptop
Published June 1, 2008 Uncategorized Leave a CommentTags: gentoo, laptop
so, when vista went gone with suicide i’d started install gentoo. lately i thaught that i will have more problems with hw such video, audio wifi and other… but all ok:)
- sound
- video
- wifi
now i want play with wifi and webcam:)
