Key shaped USB drive

Key shaped USB drive

We all hang our USB flash drives to our key chains because we don’t want to forget to take them (I mean… you don’t normally forget to take your keys with you, right?!).
So, to have a more natural look of the key chain that should have keys hanging on it (you know.. it’s a key [...]

OCZ's Z-Drive PCI-Express SSD

OCZ’s Z-Drive PCI-Express SSD

This is how the new SSD PCI-Express drives from OCZ looks like. Some performance related information says that it can sustain a write rate of 600MB/s. Of course, this is a leaked photo, the drive not being available yet, but it seems that the greater the capacity, the faster it gets.
It is said that the [...]

256GB Pendrive from Kingston

256GB Pendrive from Kingston

Well, this is an impressive storage capacity and could be used to store the folloing:

DVD rip – 700 Mb   -  374 Movies
DVR R    – 4.7 Gb    -  54    Movies
Blu Ray  – 25 Gb     -  10    Movies

MP3 – 6 Mb                              – [...]

Improvements on the shoutbox script

After a while from launching the Shoutbox script, I decided to act on some feedback that I got from you guys (and girls!?). So I implemented the following features:

emoticons – just type the character codes from y!messenger to display the emoticon (only 14 emoticons implemented);
I tried to implement protection against javascript code being inserted through [...]

AJAX guestbook

AJAX guestbook

A script that enhances any website by adding a bit of interactivity with your visitors is a nice guestbook.
I’m sure you’ve seen many such scripts online. I decided to make my own script because a lot of the scripts out there are hard to customize. My script only cares about the id’s of the text [...]

AJAX Shoutbox

AJAX Shoutbox

As promised in an earlier post, another script was added today on insanityville.com.
It is an AJAX shoutbox script, as I said, and it is available as of today for download. About the script itself there isn’t much to be said. It is a real-time script which means that it autmatically refreshes itself. This is done [...]

A few Linux E-Books to get you started

A few Linux E-Books to get you started

Back in the day when I first started to use a flavor of Linux (Mandrake 8.2), I had a hard time using it. This was due to the lack of information, the Internet wasn’t that popular, so it took me a while to understand and work with it.
Now, things are very different. The Internet is [...]

Recover your Ubuntu root password

Before I found out about this method to reset my root password, I was forced to reinstall Ubuntu. Now, in just 6 easy steps, everything is as good as ever, with the root password changed.
This is the method that Jason Striegel posted over at Hackszine.com and it is very easy to use if you find [...]

Who doesn't like music?!

Who doesn’t like music?!

I’m a huge fan of the progressive metal band Dream Theater and I love to play their tunes on the guitar. Having said that, I know that sheet music is a little hard to understand for some people when they see the song notes for the first time. To come in the aid of those [...]

Fadeout chair

Fadeout chair

This is a cool chair design, wouldn’t you say? It was designed by Nendo and it’s made of wood and acrylic legs which are painted in such a manner that they appear to fade out, creating a floating effect. This design is suggestively named Fadeout Chair.

Blazer Pentium 1.0 sneakers

Blazer Pentium 1.0 sneakers

Here’s some pretty uncomfortable sneakers. They look pretty cool though, right?

[SOURCE]

Fadeout chair

Fadeout chair

This is a cool chair design, wouldn’t you say? It was designed by Nendo and it’s made of wood and acrylic legs which are painted in such a manner that they appear to fade out, creating a floating effect. This design is suggestively named Fadeout Chair.

Blazer Pentium 1.0 sneakers

Blazer Pentium 1.0 sneakers

Here’s some pretty uncomfortable sneakers. They look pretty cool though, right?

[SOURCE]

Lets see things as they are: A JOKE

Lets see things as they are: A JOKE

It’s a good thing that we have millions of species to name a flu every year. Last year was the avian flu, this year is pigs flu. Maybe next year will be ducks flu or maybe penguins flu or, pardon my french, ass flu.

Who doesn’t like music?!

I’m a huge fan of the progressive metal band Dream Theater and I love to play their tunes on the guitar. Having said that, I know that sheet music is a little hard to understand for some people when they see the song notes for the first time. To come in the aid of those people I’ll post a little helping hand that will arouse their interest for good old sheet music.

musical-kamasutra

Enjoy reading this sheet music. I’m sure it sounds great.

Key shaped USB drive

lacie-key-storageWe all hang our USB flash drives to our key chains because we don’t want to forget to take them (I mean… you don’t normally forget to take your keys with you, right?!).

So, to have a more natural look of the key chain that should have keys hanging on it (you know.. it’s a key chain, not a USB flash drive chain :D ) you could use one of the above key models to preserve the natural look of things.

Yeah… that’s nice…

7WVFXGVB94XB

The holidays are coming

I can’t believe how time flies. It seems like yesterday I was on a shopping spree for Christmas gifts, outfits for the Christmas party, for the new years party, spreading the good old Christmas cheer to all friends and family in the whole process.

I like to have a Christmas present package. I mean I can’t just give someone just like that, I like to create some anticipation, some excitement. The package would include a nice present bag, a Christmas card and the present itself.

In order to further personalize the present,  I like to give photo christmas cards. Nothing shows that you really care than a Christmas card customized to appeal the person to whom you want to give it to.

I like to see the face of my loved ones as they open their presents. It makes all the effort worth while so… have a merry present shopping spree.

Using the ArrayList object in JAVA

I continue sharing with you bits of code from my JAVA project picking up the thread left in Running SQL queries in JAVA. I remind you that I must develop a library application for school project.

So far I showed you how I connected to a database and how I manipulate data from that database. In the interface I use scrolled combo boxes (JComboBox object) and scrolled lists (JList). This wouldn’t present a problem except these objects accept arrays. Because in my database I have a dynamic number of records and  I don’t know the exact number of rows of a query result I can’t use arrays. Instead I use the ArrayList object which allows me to create an array with an unknown number of items.

I will show you how I used this object below.

private ArrayList listaAutori() {
 ArrayList rawAutori = new ArrayList();
 try {
  String query = "SELECT id_autor, nume, prenume FROM AUTOR";
  ResultSet rs = st.executeQuery (query);
  while (rs.next ()) {
   int id_autor = rs.getInt("id_autor");
   String rawNume = rs.getString("nume");
   String rawPrenume = rs.getString("prenume");
   String nume = String.format("%s%s",Character.toUpperCase(rawNume.charAt(0)),
                                        rawNume.substring(1));
   String prenume = String.format("%s%s",
                                   Character.toUpperCase(rawPrenume.charAt(0)),
                                        rawPrenume.substring(1));
   rawAutori.add(id_autor + ": " + nume + " " + prenume);
  }
 } catch (SQLException sqlex) {
  JOptionPane.showMessageDialog (this, sqlex);
 }
 return rawAutori;
}

The result of this function is then transformed to array using the following call

listaAutori().toArray();

It’s no too complicated but very helpful. Hope you find this useful.

Speedy Internet just got faster

Ultra60smallThis is a Sponsored Post written by me on behalf of Charter. All opinions are 100% mine.

I must tell you a story about my ISP. I have an Internet plan that ensures, theoretically at least, that I have speed up to 10Mb/s. The fastest speed I ever downloaded something at was 1.4Mb/s. Can you imagine that? Just 1.4Mb/s with a theoretical bandwidth of 20 Mb/s?!

At that speed though, most users would be content. It’s a decent bandwidth but it’s not what it could be, what it should be.

If only I had a reliable provider that stepped up to the task, that offered what he promised. I can only imagine having a 60Mb/s bandwidth at my disposal!? I would be able to download a 700Mb movie in just two minutes, I could watch internet HD TV without lagging and interruptions in the data stream, play whatever game online without the worry that I might loose due to a big lag. Everything would happen much, much faster. Everything would happen when I would want it to happen and that would be awesome.

A great hit in Saint Louis, charter ultra fast 60 it’s now available in Southern California and is rolling into the northeast as we write this and it won’t stop here. By the end of 2010 the majority of the charter footprint will benefit from this service. The promising part is that ven higher speeds are possible with the new phatband technology.

These speeds can only be achieved through the use of cable technology. It is a fact that if you limit the network bottlenecks cable is much faster that DSL modem connections.

One thing is for sure: when this service hits my ares, I’m getting it. No more lagging internet for me. I won’t have it anymore. I won’t!
SocialSpark Disclosure Badge

Running SQL queries in JAVA

In a previous post, Connecting to Access database in JAVA, I’ve shared a little snippet of code with you that showed how to connect to an Access DBMS.

With the connection alone you can’t do much to the database excepting the connection. We need to manipulate the data found in the database we connected to.

The manipulation can be done in JAVA using Statement and PreparedStatement objects.

The difference between the two objects consists in the fact that the prepared statement represents a precompiled SQL statement.

Let’s assume a database test.mdb that has a table called users. The fields of the table are as follows:

id int(11) PRIMARY KEY autoNumber;
user text;
password text;
lastname text;
firstname text;
address text;

I think that the fields above suffice for this example.

Let’s begin with a simple query that lists the records in the table.

Statement st;
String user, lastname, firstname, address;
int i = 0; // little counter variable
try {
 Statement st1 = con.createStatement ();
 st = st1;
}
catch (SQLException sqlex) {
 sqlex.printStackTrace(); // print the error that occurred
}
String query = "SELECT * FROM users"; // the string that holds the query
ResultSet rs = st.executeQuery(query); // runs the query
while(rs.next()) { // walking though the result set
 user = rs.getString("username"); // retrieving String data
 lastname = rs.getString("lastname"); // retrieving String data
 firstname = rs.getString("firstname"); // retrieving String data
 address = rs.getString("address"); // retrieving String data
 System.out.println("no.  |  username  |  lastname  |  firstname  |  address");
 System.out.println((++i) + "  |  " + user + "  |  " + lastname + "  |  " +
                                      firstname + "  |  " + address);
}

The code above does the querying and the basic display of the returned data. I must say that the code is not tested and may need adjustments or corrections but should work based on e visual inspection :D .

The PreparedStatement object  extends the Statement object and it stores precompiled SQL statements. This object can then be used to efficiently execute this statement multiple times. A simple example of usage is found on the java support website and I will post it here.

 PreparedStatement pstmt = con.prepareStatement("UPDATE EMPLOYEES
                                     SET SALARY = ? WHERE ID = ?");
 pstmt.setBigDecimal(1, 153833.00);
 pstmt.setInt(2, 110592);

As you can see from the example above, you don’t need to declare the query each time you use different conditions in the query. You can just use the setter methods of the fields in the query.

I hope you have found this post useful. If you find any errors feel free to post a comment with the corrected code.

Ads on mobile networks? YES

smaato-logoWe all try to make some money using the web. Why the web? Because it’s the cheapest way of making business. You don’t need storage space, no employees, basically no more than a good idea. But how to make money from just an idea on the internet? I’m sure this will come as no surprise: you must have a website!

The traffic that the website generates can be converted into revenue by selling ad space on it. Pretty straight-forward so far.

On the advertiser side it’s not so easy. They must consider the target audience and design ads in such a way that the ad will not only generate traffic for their website but sales. Sometimes advertising on websites just doesn’t cut it so Smaato came up with something even cooler. They developed a platform that manages and maximizes the ad ARPU (Average revenue per user) on the mobile users world wide. The partnered up with mobile social communities like: Mocospace, Zedge and Qeep as well as game and application developers.

It can’t be any closer to the user than their mobile phones, right?

Fadeout chair

fadeoutThis is a cool chair design, wouldn’t you say? It was designed by Nendo and it’s made of wood and acrylic legs which are painted in such a manner that they appear to fade out, creating a floating effect. This design is suggestively named Fadeout Chair.

Blazer Pentium 1.0 sneakers

001

Here’s some pretty uncomfortable sneakers. They look pretty cool though, right?

[SOURCE]

Translate your documents fast and accurate

translialogoWith the new Web 2.0 services taking over traditional services such as logo generators, online document processors, online spreadsheets and others, a new service arises from the crowd.

Translia it’s a new service that streamlines the processes in such a manner that the clients can get translations with just a few clicks and the turnaround is shorter than any other services. For small translation jobs, clients may get finished translation on the same day or even in several hours. Pretty cool huh?!

Translia offers a plethora of options to select just the right prices and translators for your document translation projects, business card translation projects and other translation projects. The quality of the translation is guaranteed by the fact that you’ll pay for the job only after you’re completely satisfied.

Give it a try, what do you say?