Technoholik

Your Digital Companion

Tuesday, August 16

Database connections in Java using JDBC and Netbeans IDE ( for CBSE 12th I.P. Projects )

Welcome to all my friends who want to Learn MySQL dB to JDBC Connectivity .

I have MySQL 5.0 installed on my Windows. In order to make a JDBC connection to MySQL database one needs to downlad the MySQL/J connector driver from here . I will also expect that you have Netbeans 6+ installed on your machine.

Extract the zip file to a folder, you’ll see file ‘mysql-connector-java-5.0.6-bin.jar’ which is the library file that we want. Just copy the file to the library folder, for example to “C:\Program Files\Java\jdk1.6.0_02\lib” also to the “C:\Program Files\Java\jdk1.6.0_02\jre\lib directory.

Next, create a new Java project on NetBeans named ‘TestMySQL’.

Now I’m going to write some code to connect to MySQL database. I have configured MySQL service on localhost.
I’m going to use Connection and DriverMapper Classes so I need to import libraries.
import java.sql.*;

Inorder to test my connections I build my project.

So everything seems to be fine till now.

 

To get some data, I need to execute query on the SQL Server and get the result back to me. First, I create stmt (Statement object) and execute query in SQL language. Then I store the result on ResultSet object and iterative show the result on the output window.

Insert some data to the created table using the code

 

 Statement stmt = null;

stmt = con.createStatement();

String SQL = “INSERT INTO ZanduBaam (Name,Roll) VALUES (‘Abhishek’,40)”;

int rowsEffected = stmt.executeUpdate(SQL);

System.out.println(rowsEffected + ” rows effected”);

Inorder to retrieve data from database , I need to execute query on the SQL Server and get the result back to me. First, I created stmt (Statement object) and execute query in SQL language. Then I store the result on ResultSet object and iterative show the result on the output window.

ResultSet rs = null; // SQL query command String SQL = “SELECT * FROM ZanduBaam”; stmt = con.createStatement(); rs = stmt.executeQuery(SQL); while (rs.next()) {
System.out.println(rs.getString(“Name”) + ” : ” + rs.getString(“Roll”));
}

Similarly you can do the required for updation and deletion .

Lots of time and sweat devoted to this post considering the fact that I have a test on Monday I should stop here.
Bbye.

 

 

 

Saturday, August 13

Students' concentration adversely affected by social networking sites

A Dumbass logging in his *%ckin$ fb account

Social networking websites like Facebook have negative effects on children, and those who frequently use such websites are more likely to get lower marks in school, says a new American study.

Such students are also likely to have behavioural problems and “narcissistic tendencies” from spending too much time logged on to such sites, according to the research by the California State University. Psychology professor Larry Rosen said researchers watched as students spent 15 minutes studying something that was important to them. The research team was left dumbfounded as the students’ concentration lapsed because of the need to check their Facebook page.

“What we found was mind-boggling. About every three minutes they are off-task. You’d think under these constraints, knowing that someone is observing you, that someone would be more on task,” Rosen was quoted as saying by the Daily Mail.

“The more media they consumed per day, the worse students they were. If they checked Facebook just once during 15 minutes, they were worse students.”

Rosen released the findings at the American Psychological Association in a speech titled “Poke Me: How Social Networks Can Both Help and Harm Our Kids”.

The negative effects of over-using social media include making students more prone to vain, aggressive and anti social behaviour, the report said.Children under 13 who overuse social sites on a daily basis are also more likely to be prone to bouts of anxiety, depression, sleeping problems and stomach aches.

The study also found that social networking had some positive effects also. They helped shy children interact more.

Friday, August 12

Samsung commercial pokes fun at iPad 2′s lack of Flash

Here we go again. It seems like most of the tablet makers on the market today think that they can toss a tablet out that is similar to the iPad on a different OS and just sell droves of the things because the tablet supports Flash. I think that the gigantic lead the iPad 2 has in the tablet market should show other makers that they need more than Flash support to beat Apple in the tablet game. If they offered a tablet for a lot less money than the iPad 2 with similar specs and Flash support, then they get my attention.

Thursday, August 11

Nag A Ram? Google Jokes With Search Results “Anagram”

Oh Google, you did it again. The number one trending topic on Google right now is a search for “nag a ram.” What could that strange term mean? Is it some strange 4chan stunt or just a weird glitch? Turns out its neither – it appears to be a fun little “Easter egg” surprise planted by some programmers at Google.

The Internet is good for a lot of things, but its become sort of a default resource for defining terms and concepts in everyday life (sorry Encyclopedia salesmen.) So imagine the fun surprise for thousands of users looking for a quick definition of “anagram.” When one enters that specific term, Google search suggestions asks “id you mean: nag a ram?” Get it? “nag a ram” is an anagram, of anagram!

For the record, the accepted definition of anagram is “a word, phrase, or name formed by rearranging the letters of another, such as cinema, formed from iceman.”

So for all the curious sorts out there looking to hop on the SEO hot topic trend game, Nag a ram is nothing but a fun anagram of anagram. (Silly Google.)

Steve Jobs leads Apple to world domination

Apple has some 50,000 workers around the world, but few of them would argue that it’s a guy currently on sick leave who has done more than anyone to turn the Silicon Valley institution into the most valuable company in the world.

The California-based consumer electronics company achieved that lofty status on Tuesday when its unstoppable run helped it briefly blast past Exxon Mobil in market capitalization.

Though volatile trading quickly overturned the coup, the company’s long-term trajectories signal that it is only a matter of time before Apple takes the top spot for good.

That will be a remarkable vindication for Steve Jobs, 55, the college dropout turned technology visionary who did as much as anyone to instigate the PC revolution after launching Apple in 1976.

Now he has done more than anyone to usher in the post PC-world, where the data and content that matter most to people and companies is available at every moment on myriad devices.

The basic outline of his rise, fall and triumphant resurrection bears the hallmark of a morality tale of the digital age. He saw the future of computing when he founded Apple together with Steve Wozniak, and pioneered the use of a mouse and a point-and-click command process after seeing the concept at a Xerox research lab.

His idea was promptly copied by Microsoft, which made its Windows software available to anyone and quickly captured a dominant market share in the rapidly growing market.

Mr. Jobs’ insistence that Apple software run only on Apple machines was a large part of the reason he lost a boardroom power struggle in 1985, prompting him to leave the company.

While Apple’s fortunes dwindled to the status of a struggling niche player flirting with bankruptcy, Jobs developed Pixar Animation, which would become one of the most successful film studios, and a new computer company called Next.

He was called back to Apple’s helm in 1997 and promptly set about transforming Apple from a puny weakling reliant on the life support of Microsoft to the world’s most valuable company.

Mr. Jobs’ driving idea was that the sci-fiction vision of a digital future -- where we would video-conference with wristwatch devices and download movies and music over invisible networks -- was just around the corner.

As other companies remained trapped in gradual refinements of existing technologies, Apple would make this future happen.

The first step in the grand strategy was the iPod, launched almost a decade ago. In the whiz-bang age of the iPhone and Android, it this device seems awfully humble, but 10 years ago it revolutionized the way people listened to music, combining software and hardware in a beautiful package that for the first time made it easy and intuitive to make huge music collections portable.

He revitalized Apple’s computers with the iMac and established iTunes as the unrivalled online store for the purchase of music and video. Within six years, Apple sold more than 100 million iPods, while five years after the 2003 launch of iTunes it had sold more than 5 billion downloads.

Apple completed its rout with the 2007 launch of the iPhone.

Just four years ago the idea that hundreds of millions of people would routinely use the internet over their mobile phones seemed hallucinatory, given the clunkiness of existing smartphones and their software. But Jobs knew better.

In one fell swoop, Apple came from nowhere to dominate what quickly became the biggest consumer electronics market in history and overtake such market leaders as Nokia, Motorola and Microsoft.

Even that did not satisfy Jobs’ ambitions for Apple. Last year’s launch of the iPad swept aside decades of tablet computer failures to create yet another new market for Apple to dominate while bringing down the curtain on traditional PCs.

Apple is far from done.

The big question is whether Jobs will be around to lead the next phase, as questions about his health remain unanswered, says tech blogger Jesus Diaz of the gadget site Gizmodo.

“It was Steve Jobs’ unique vision and his strict command of a brilliant troop of engineers that made -- and still makes -- it all possible. Together, they created the future,” Diaz said.

“If Jobs goes, Apple could face the same long decline as Microsoft and Sony. I’m convinced that Apple can’t be Apple without Steve.”

Thursday, July 28

Nokia E6 review: The E spirit


Introduction

Don't let your E71/72 smartphone read this. No, it won't have a heart attack or anything. But you don't want it suddenly feeling sad and useless. You certainly realize the E71/E72 duo is getting old and rusty. Like it or not, it's time to move on.
The Nokia E6 will not take No for an answer. A super crisp VGA touchscreen, the finessed Symbian Anna, the strong messenger bloodline and the stainless steel armor are a tempting combination. The package will make long-time Eseries users feel right at home and cheer the upgrades.
Nokia E6-00 Nokia E6-00 Nokia E6-00 Nokia E6-00 
Nokia E6 official photos
Touchscreen or D-pad is not a decision you're forced to make. It will come naturally instead. Where the small screen won't allow the required level of touch precision, the D-pad will fill in. Five homescreen panes to fill with shortcuts and widgets will do better than the good old Active Standby with alternative setups for business and leisure.
Most importantly though, to even the most old-school of Eseries loyalists, touchscreen will be a fair price to pay for finally upping the screen resolution to acceptable levels.

Key features

  • Quad-band GSM/GPRS/EDGE support
  • Penta-band 3G with 10.2 Mbps HSDPA and 2 Mbps HSUPA
  • Symbian Anna OS
  • Messenger bar, stainless steel body, four-row QWERTY keyboard
  • 2.46" 16M-color capacitive TFT touchscreen of 640 x 480 pixel resolution; Gorilla glass protection
  • 680 MHz ARM 11 CPU and 256 MB RAM
  • 8GB internal storage, 1GB ROM, microSD card slot
  • Wi-Fi 802.11 b/g/n
  • GPS receiver with A-GPS support and free lifetime voice-guided navigation
  • Digital compass
  • 8 megapixel fixed-focus camera with dual-LED flash, 720p video recording @ 25fps; geotagging, face detection, smart zoom in video
  • Built-in accelerometer and proximity sensor
  • Standard 3.5 mm audio jack
  • Stereo FM Radio with RDS
  • microUSB port, USB-on-the-go
  • Flash and Java support for the web browser
  • Stereo Bluetooth 3.0
  • Smart dialing and voice commands
  • DivX, XviD and Matroska video support
  • Social network integration
  • Office document viewer and editor
  • Excellent battery life
  • Excellent audio quality

Main disadvantages

  • Symbian Anna is still catching up with Android and iOS
  • The tiny touchscreen has no room for big fingers
  • Fixed-focus camera
  • Relatively limited 3rd party software availability
This phone seems to have almost everything - well, save for HDMI and an actual life-size touchscreen. But we're talking Eseries and the E6 is the business. It feels like Nokia really wanted to rekindle the magic. The E6 makes the E72 look like a routine, cursory attempt at an update. Where the E72 wanted quietly keep on cashing in, the E6 is keen to make a difference. A tall task indeed, considering the times.
Nokia E6-00 Nokia E6-00 Nokia E6-00 Nokia E6-00 
Nokia E6 live shots

Wednesday, July 27

Nokia X7-00 review: The stealth xpress


Introduction

Dressed to kill and with a fresh coat of paint on the interface, the Nokia X7 is keen to show there's still fight left in Symbian. The screen is a definite high point and the stainless steel body is fashioned like a stealth jet fighter. Symbian Anna adds in features that have been lacking in the OS, closing the gap on the competition.
   
Nokia X7 official photos
The Nokia X7 combines stainless steel and Gorilla glass into one seriously attractive package. It boasts stereo speakers (just two, rather than four as you might think looking at it) to justify its Xseries spot and an 8MP camera with 720p video recording.
The screen impressed us quite a bit as you'll see in our hardware chapter but that's not all we liked about the hardware. The software changes are not as far-reaching as we would have liked, but there are some key developments that that give Symbian a usability boost.
Here's the short version of what the Nokia X7 is about and what didn’t work out very well.

Key features

  • Quad-band GSM/GPRS/EDGE support
  • Penta-band 3G with 10.2 Mbps HSDPA and 2 Mbps HSUPA support
  • Stainless steel body
  • 4" 16M-color AMOLED capacitive touchscreen of 640 x 360 pixel resolution; Impressive brightness and Gorilla glass protection
  • 8 megapixel fixed-focus camera with dual-LED flash and 720p video @ 25fps recording; geotagging, face detection, smart zoom in video
  • Symbian Anna OS
  • 680 MHz ARM 11 CPU and 256 MB RAM
  • Wi-Fi 802.11 b/g/n
  • GPS receiver with A-GPS support and free lifetime voice-guided navigation
  • Digital compass
  • microSD card slot (8GB card pre-installed)
  • DivX and XviD video support
  • Built-in accelerometer and proximity sensor
  • Standard 3.5 mm audio jack
  • Stereo FM Radio with RDS
  • microUSB port
  • Flash and Java support for the web browser
  • Stereo Bluetooth 3.0
  • Excellent audio quality
  • Smart dialing and voice commands
  • Social networking integration

Main disadvantages

  • Symbian Anna is still catching up with Android and iOS
  • Uncomfortable volume rocker, SIM tray and microSD card slot
  • Camera lacks auto focus, oversharpens images
  • Relatively limited 3rd party software availability
  • No office document editing (without a paid upgrade)
  • Battery life is not on par with the best in business
Despite our complaints, this is the best that Symbian has ever looked and Nokia has picked excellent devices to carry it. While the other one, the Nokia E6, is a business phone through and through, the X7 focuses on the fun stuff. From taking photos and videos, through deeper social networking integration, to watching HD videos and browsing the web on the large 4" screen.
The Nokia X7 is something you'll want to show off to your friends. The Nokia designers have done a good job of breaking the touchscreen mould that makes so many phones look uniformly similar.
Nokia X7 00 Nokia X7 00 Nokia X7 00 Nokia X7 00 
Nokia X7 in our office
The Nokia X7 comes more as a successor to the C7 than a stand-alone version. But the C7 itself will be getting Symbian Anna soon, so the X7 needs to bring more to the battlefield than just the (admittedly great) bigger screen.
First we'll check on the arsenal in the box and then we're off to inspect the phone's angular charms. Join us on the next page to feast your eyes on the cool screen and discover the Nokia X7.

Tuesday, July 26

Nokia N9 lands at FCC, bares all for the camera


You must have seen enough pictures of the N9’s beautiful exterior but now thanks to the FCC you can get a peek inside that unibody shell as well. The Federal Trade Commission skillfully took apart the handset on one of their routine tests and took plenty of photographs of the internals.

You will notice the pop-out SIM tray on the top of the device that thankfully does not require the assistance of a pointed tool to be taken out because of a lever mechanism. The non-user-replaceable 1450mAh Li-Ion battery uses a cable to connect to the phone, unlike the N8, which used a standard Nokia battery and was hence, to some extent, user-replaceable. You can also see the inside of the back shell that houses all the radio antennas. Then there's also the 8 megapixel camera sensor.
Nokia N9 FCC Nokia N9 FCC Nokia N9 FCC Nokia N9 FCC Nokia N9 FCC Nokia N9 FCC Nokia N9 FCC Nokia N9 FCC
FCC has also been kind enough to provide the user manual for the Nokia N9. To download the manuals and see other images, click on the source link below.

Nokia N9 hands-on: First look


Introduction

Today's smartphone scene is one of fierce competition and breakneck growth. Rarely though do announcements get any bigger than this. The Nokia N9 seemed forever stuck in rumorland, but never lost its grip on users' minds. The handset is rightfully enjoying as warm a reception as it would have had if it had been announced a year ago.
Nokia N9 Nokia N9 Nokia N9 Nokia N9 
Nokia N9 official photos
And you can easily see why: a spanking new OS based on some pretty impressive (and novel!) concepts, sleek unibody design, some decently powerful hardware (even if the N9 missed the dual-core train) and that magnificent 3.9" curved AMOLED of FWVGA resolution is a package that's hard to resist.
We got our hands on this baby today, and although our meeting was brief, it was enough for it to earn a special place in our geeky hearts. The Nokia N9 is an excellent device based on an exciting UI concept and boasting some sleek hardware. But what casts doubt on it is the claim that it represents a dead end in the smartphone tree of evolution.
But let’s not get all emotional now, the thing isn’t even on the market yet. And it looks like the right thing to help Nokia through the hard transition period in the second half of 2011. What we know for sure is we would love to have more whence this came from.
Here are the key specs of the Nokia N9 but remember these numbers tell only half the story:

Nokia N9 at a glance

  • General: GSM 850/900/1800/1900 MHz, UMTS 850/900/1700/1900/2100 MHz, HSDPA 14.4 Mbps, HSUPA 5.76 Mbps
  • Form factor: Touchscreen bar phone
  • Dimensions: 116.5 x 61.2 x 12.1 mm, 76 cc
  • Weight: 135 g
  • Display: 3.9" 16M-color FWVGA (480 x 854 pixels) AMOLED capacitive touchscreen; Gorilla Glass, anti-glare polarizer, curved display, multi-touch input
  • Chipset: 1GHz Cortex A8 CPU, PowerVR SGX530 GPU, TI OMAP 3630 chipset
  • RAM: 1GB
  • OS: MeeGo OS, v1.2 Harmattan
  • Memory: 16/64GB storage, no microSD slot
  • Camera: 8 megapixel auto-focus camera with face detection, touch focus and geotagging; HD (720p) video recording at 30fps, LED flash, front facing camera, video-calls
  • Connectivity: Wi-Fi a/b/g/n, Wi-Fi hotspot, Bluetooth 2.1, standard microUSB port, GPS receiver with A-GPS, 3.5mm audio jack, TV-out, NFC
  • Misc: Polycarbonate unibody, built-in accelerometer, proximity sensor, uses microSIM cards
On paper, the Nokia N9 looks like solid, if not spectacular. As soon as you set eyes on the real thing though, there's no mistaking a smartphone that will reach for the top rather than settle for anything less.
The premium finish and the outward curved screen are nothing short of outstanding. And the great news is that the good impressions don't end with the exterior. We were pleasantly surprised by the MeeGo Harmattan platform and starting to doubt whether switching to Windows Phone 7 was the only option available to Nokia.
Nokia N9 Nokia N9 Nokia N9 Nokia N9 
The Nokia N9 at ours
There's a time and place for that discussion, and they are not here and now. We know you are as eager as we are to see what the Nokia N9 is really made of. Join us after the break for the hardware checkup.