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. 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()) { Similarly you can do the required for updation and deletion .
I’m going to use Connection and DriverMapper Classes so I need to import libraries.
import java.sql.*;
System.out.println(rs.getString(“Name”) + ” : ” + rs.getString(“Roll”));
}
Tuesday, August 16
Database connections in Java using JDBC and Netbeans IDE ( for CBSE 12th I.P. Projects )
Saturday, August 13
Students' concentration adversely affected by social networking sites
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
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
Wednesday, July 27
Nokia X7-00 review: The stealth xpress
Introduction
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
Tuesday, July 26
Nokia N9 lands at FCC, bares all for the camera
Nokia N9 hands-on: First look
Introduction
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