41 hours stuck in elavator

Java - connect to SQL Server using JDBC ODBC in win 64bit

When I do my School Project (Create an Java App connect to an DB), I found it's can't be done in windows 64bit, so I search the Internet and I found my own way to finish it in Windows 64bit. Just follow these step below.

Step 1
Run the 32-bit odbc driver using
WinKey+R, then copy-paste the below command
C:\Windows\SysWOW64\odbcad32.exe

Step 2
Make a dsn named “SQLDB” or whatever name you want to.

Step 3
Create a new project in eclipse.

Step 4
Change the jre to the java installed inside
C:\Program Files (x86)\java
Use this as “JRE System Library”


Step 5
Use the below code to connect to connect to SQL Server (It's a SQL_Connection class)
import java.sql.*;


public class SQL_Connection {
    public static Connection GetConnection()
    {
        try{
     Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
     Connection connect=DriverManager.getConnection("jdbc:odbc:SQLDB");
     return connect;
        }
        catch(Exception ex)
        {
            ex.printStackTrace();
            return null;
        }
    }
    public static int ExecuteQueryString(String querystring)
    {
        try{
            Statement st= GetConnection().createStatement();
            return st.executeUpdate(querystring);
        }
        catch(Exception ex)
        {
            ex.printStackTrace();
        }
        return -1;
    }
    public static ResultSet getResultSet(String querystring)
    {
        try{
            Statement st= GetConnection().createStatement();
            ResultSet rs= st.executeQuery(querystring);
            return rs;
        }
        catch(Exception ex)
        {
            //ex.printStackTrace();
            return null;
        }
    }
    public static void Close_Connection(Connection conn)
    {
        try
        {conn.close();}
        catch(Exception ex)
        {}
    }
}
DONE!!!!

Game - PacMan

How to read emails on mail server ?

First of all there are multiple protocols to retreive mail:
POP3, IMAP, etc...
I suggest you start by familiarizing yourself with the various components that make up an e-mail system.
  • Mail Transfer Agent (Protocol: SMTP)
  • Mail Delivery Agent (Protocols: POP3, IMAP)
  • Mail User Agent (Outlook, Webmail, Thunderbird, your application)
Basically what you are trying to write is a Mail User Agent. A mail user agent has to "fetch" the mails from a Mail Delivery Agent using either POP or IMAP.
This means you will have to learn about these two protocols:
POP3 RFC: http://www.faqs.org/rfcs/rfc1939.html
IMAPv4 RFC: http://james.apache.org/server/rfclist/imap4/rfc2060.txt
Since e-mail communication happens using TCP/IP you will have to learn how to use the classes in the System.Net.Sockets namespace.
Also take a look at the TcpClient class.
Try to understand these concepts first and then I suggest you start out with POP3, this protocol is quite easy. If you have problems then with very specific TcpClient code please update your question or post a new question.
Hope this sets you on the right track.

P/S: I've complete my first program that read emails in Gmail & Download the attachments in selected emails (using VB.NET 2008).

A lot of horrific scenes after pressing mysterious button

To start promoting quality TV channel TNT in Belgium, this television has put a big red button on the square in quiet Flemish towns.

A curious man who had the courage to press the red button and then, a lot of horrific scenes happen makes people shocked ...


Funny - Computer vs. Virus

Do you ever wonder if Virus attacking your computer, what would it does? Do you ever think about the Fighting of Cursors, desktop icons with the Characters? Can you imagine that Photoshop is broken, a random drawing line become an unbeatable thing ?
With the animation effect & interested content, the below clip will give you some useful information:

YouTube Easter Egg let's you play Snake while loading Clip (Video)

No, not Metal Gear Solid's Snake. We're talking about the Snake that was popular before the smartphone was a twinkle in the industry's eye. Google has imbued YouTube videos with an engaging new easter egg that lets you play the apple-chasing game while your video stream buffers -- simply mash your keyboard's up and down arrow keys during most any clip to increase YouTube's time-wasting potential tenfold. What's that you say -- your internet connection is so ludicrously fast that videos play instantly? Ah, my lucky friend, let us introduce you to YouTube's 4K mode. Or, for a special treat, hijack the footage we've provided after the break to get your meta-giggles going.

Access data in MS-Access database using Javascript

You know that javascript is a client-side programming language. But if you want to use the local database like MS-Access in your HTML page just using javascript? Here is some code that help you access the data of MS-Access DB in HTML page using JavaScript:

Adding a Record

function AddRecord() {
var adoConn = new ActiveXObject("ADODB.Connection");
var adoRS = new ActiveXObject("ADODB.Recordset");

adoConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source='/\dbName.mdb'");
adoRS.Open("Select * From tblName", adoConn, 1, 3);

adoRS.AddNew;
adoRS.Fields("FieldName").value = "Quentin";
adoRS.Update;

adoRS.Close();
adoConn.Close();
}

Removing a Record

function DeleteRecord() {
var adoConn = new ActiveXObject("ADODB.Connection");
var adoRS = new ActiveXObject("ADODB.Recordset");

adoConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source='\\dbName.mdb'");
adoRS.Open("Select * From tblName Where FieldName = 'Quentin'", adoConn, 1, 3);
adoRS.Delete;
adoRS.Delete;

adoRS.Close();
adoConn.Close();
}

Editing a Record

function EditRecord() {
var adoConn = new ActiveXObject("ADODB.Connection");
var adoRS = new ActiveXObject("ADODB.Recordset");

adoConn.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source='\\dbName.mdb'");
adoRS.Open("Select * From tblName Where FieldName = 'Quentin'", adoConn, 1, 3);

adoRS.Edit;
adoRS.Fields("FieldName").value = "New Name";
adoRS.Update;

adoRS.Close();
adoConn.Close();
}


Querying data:


var pad = "C:\\My Documents\\data.mdb";
var cn = new ActiveXObject("ADODB.Connection");
var strConn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pad;
cn.Open(strConn);
var rs = new ActiveXObject("ADODB.Recordset");
var SQL = "SELECT * FROM datatable";
rs.Open(SQL, cn);
if(!rs.bof) {
rs.MoveFirst();
if(!rs.eof) {
document.write("<p>" + rs.fields(1).value + ", ");
document.write(rs.fields(2).value + ", ");
document.write(rs.fields(3).value + ".</p>");
}
}
else {
document.write("No data found");
};
rs.Close();
cn.Close();

How to Calculating the Perceived Brightness of a Color

When I'm searching on the Internet for the Image Processing Algorithm, I found this useful article, so I copy it to my blog. Thanks the Author of nbdtech.com.


I needed a way to test if a background color is light or dark in order to choose an appropriate text color (black on light colors and white on dark colors), you can find yourself in the same problem if you try to convert an image to grayscale.
I found many approaches that didn’t work well, I’ll describe them and the problems I discovered below – but first – the successful solution.
I finally found a solution that actually works on this web page the formula is:
brightness  =  sqrt( .241 R2 + .691 G2 + .068 B2 )
Or, in C# using the WPF's Color structure System.Windows.Media.Color (the same exact code should also work with the System.Drawing.Color structure used in WinForms and WebForms):
private static int Brightness(Color c)
{
   return (int)Math.Sqrt(
      c.R * c.R * .241 + 
      c.G * c.G * .691 + 
      c.B * c.B * .068);
}
This method will return a number in the rage of 0 (black) to 255 (White) and to set the foreground color based on the Brightness method:
Color textColor = Brightness(backgroundColor) < 130 ? Colors.White : Colors.Black;
I selected cutoff value of 130 by trial and error and it reflects my taste, every value in the rage 128-145 will give acceptable results.
Here is a table of all the named colors in .net 3.0, each with its name in readable text on it based on the code above, the number in parenthesis is the brightness – click on the image to view it in full size (in a new browser window).
Usually, when talking about color theory the range 0-1 is used for each component – so (0,0,0) is black, (1,1,1) is white and (0.5,0.5,0.5) is 50% gray, I’m not using this range, I’m using the 0-255 range used in most programming environments.

Why Not HSL or HSV?

You may think that the luminance (or lightness) component of the HSL color system or the value component of HSV will solve this problem, I did, but I was wrong.
The L component of the HSL and the V component of HSV describe the brightness of a color relative to a base color, if this base color is blue you will get a darker color than if this base color is yellow, HSL and HSV are very useful if you need to create a lighter or darker version of a color but aren’t very useful if you want to know how bright a color is.

The Naïve RGB Algorithm

If RGB 0,0,0 is black and RGB 255,255,255 is white then R+B+G should give us a good approximation of the color brightness, shouldn’t it?
The problem is that some colors are brighter than others, red is brighter then blue and green is brighter then red, maybe we just need to find the right coefficients for them?

The W3C Algorithm

The W3C working draft on accessibility has a formula for the perceived brightness of a color (based on the YIQ color system):
((Red value X 299) + (Green value X 587) + (Blue value X 114)) / 1000
This formula and references to it dominate the search results, probably because the W3C has high search engine rank.
This is better than using HSL, but it tends to give wrong results for many colors, especially shades of yellow.

RGB Color Difference

The W3C also has an algorithm to calculate the difference between colors:
(maximum (Red value 1, Red value 2) - minimum (Red value 1, Red value 2)) + (maximum (Green value 1, Green value 2) - minimum (Green value 1, Green value 2)) + (maximum (Blue value 1, Blue value 2) - minimum (Blue value 1, Blue value 2))
Or, in shorter form:
dR + dG + dB
Where dR, dG and dB are the difference in the Red, Green and Blue component.
If you calculate difference from white and difference from black – and compare them (if difference from black>difference from white then the color is dark) you actually get better results than using the brightness formula, but then you get wrong results for light greens and dark blues (probably because this formula doesn’t take into account the brightness difference of the colors).

3D Distance in RGB Space

You can think of the RGB color space as a cube where each of the 3 colors are axis, in one corner you have black (RGB 0,0,0) and in the opposite corner you have white RGB (255,255,255), so if a color is closer to black it should be darker.
The formula for 3D distance is:
Sqrt(dx2+dy2+dz2)
Where dx, dy and dz are the difference on the x, y and z axis.
This algorithm also gives mixed results because it doesn’t take into account the fact that some colors look brighter than others -  and that’s gets us back to …

Weighted Distance in 3D RGB Space (or the HSP algorithm)

If you scroll up to the beginning of this post and look at the brightness formula there you will see it’s just like the 3D distance formula except it gives different weight to each axis.
So now we finished our tour to color brightness land we have a good formula for calculating perceived brightness and (if my explanations where clear) we can actually understand why it works.

Source: nbdtech.com

Submit your site to Search Engines

Do you own a website/blog? Do you want to increase the visibility of your website/blog? Here is the tool for you to submit your websites/blogs to the popular search engines like Google, Yahoo, Bing,......
Just hover your mouse below, and enter your website/blog URL, then press Submit

A human life is shown in 3 minutes and 5 seconds





TOP 100 BEST FREE CLASSIFIED AD POSTING SITES

list od free ad posting sites
A recently updated and fresh list of top 10, top 50, and top 100+ best and free online ads posting classified ads websites around the internet world for the year 2012,mainly for the following countries- US, UK, Europe,India, Australia, China, Russia, Brazil, Germany, Canada, Italy, Japan-These are the biggest markets in the world for online free ad posting through classified sites. These free and paid ad posting websites listed here are very popular and famous among all ad posters who need to post free ads for their blogs or websites.Classifieds ads sites listed here are of high Google page rank ( PR 4-9) and high Alexa rank. And most importantly, these online ad posting free classifieds sites are listed according to their high Alexa ranking. Alexa  rankings and Google Page rankings are taken as the single most important factor while making this list of top 100 free ad posting classified websites or classified web directories. But there are some other factors as well that were kept in mind while making this list, such as-Usability,popularity,user-friendliness, and their searchability. 
In today’s time, online advertising has become very popular, beneficial and instant traffic generator for bloggers, online marketers, advertisers. Free ad posting on the popular classifieds sites has become one of the must have weapons for all types of online users who somehow need potential consumers to have a look at their showcased online products.
 
This list of top 100 free online ad posting sites is divided into segments to break the list into "top 10 free ad posting sites", "top 50 free ad posting sites" and " top 100 free ad posting sites"s. In this way you will get to know which ad posting site should be given how much priority and which one stands where.On many of these websites you can directly post free ads without any sign up or registration required, while some ask for a sign up or registration to post free ads. If you need to post free ads on daily basis, then you should open a free account on these free ad posting sites.

 
This best list of top 100 free ad posting websites for bloggers and ad posters is mainly popular in the countries including, US, UK,India,Australia, Asia,Europe, UAE, Germany,France, Italy, Japan,China, Pakistan, etc. 
The top 100 free ad posting list mostly contains name of those free-classified ad sites that are very popular and largely traffic driven, and they provide good resource for the best free ad posting options and features.


You can also find my similar blog post for list of top 100+ free Indian Classified ads posting sites 


This fresh list of best free ad posting sites, free classified sites or free ad-posting web sites contains free ad posting sites that can be categorized further according to their region, types of users, types of accounts, HTML formatting options, and products range being advertized on them. Around  60% of these free ad posting sites have global appeal/users !


Account Based Types of Ad Posting Websites  -

  1. Free Ad Posting Classifieds Sites.
  2. Paid Ad Posting Sites.
  3. Sign Up Or Registration Required For Ad Posting-You need to open an account.
  4. No Sign Up Or Registration Required-You can instantly start posting your ads.  
Region Based Types of Ad Posting Websites-
  1. Local advertising sites or neighborhood classifieds websites- City wise.ad posting.
  2. Country level advertising ad posting sites-your ad viewed through out the nation.
  3. Global Ad posting sites- Your ad is viewed globally, around the world.
Why to post on Free Classifieds sites-


There are lots of benefits and unavoidable reasons to why you should post ads on these classifieds sites-
  1. First thing first, post ads to sell any physical, online product ( through affiliate marketing or simply selling consumer products).
  2. To grab the instant traffic. Ad posting can bring a huge free traffic to your site/blog/forum/lens.
  3. You can create your own mailing list for online marketing ( through the response your ads receive)
  4. You build links. By posting your links on these highly Alexa ranked classifieds ad posting sites you can create strong back links to your website/blog.  

Visit 20 Ad posting sites for posting free ads without registration and sign up needed



Top 10 Best Online Ad Posting Sites List





Top 10 Free Ad posting Sites Post Free Ads Classifieds Ad Sites Description: what to post for. Popularity Region/Country
1 Craigslist craigslist.org craigslist provides local classifieds and forums for jobs, housing, for sale, personals, services, local community, and events. Global Appeal.
Classifieds according to Countries and cities.
You can post free ads on Craigslist any where worldwide!
2 Quikr Quikr.com Quikr Classifieds Post Free Classified Ads online, Search Free Classifieds Ads for Mobiles, Cars, Jobs, Apartments, Pets, Courses, Laptops, Computers, Travel ... Local + Global presence.
Mainly its an indian classified site. But this also has an option for “International” ad posting.Very High Alexa ranking.Quikr is free and very effective.
3 Gumtree Gumtree.com Free Classifieds in United Kingdom - Join United Kingdom's online community - free classifieds, jobs, property, cars, flatshare and more free classifieds in .. Local + Global.
Gumtree is mainly popular in London, though it has a wide range of users across many European, UK and Asian Countries !
4 ClickIndia ClickIndia.com Click India Classifieds - A Site To Post Free Buy Sell Indian Classified Ads Online. Search Classified Ads For Jobs, Find Real Estate Properties On Sale, Sell ... Local +Global.
ClickIndia is one of the most popular free ad posting classifieds sites in India.But this also has an option for “International” ad posting.
5 Olx OLX.com Free Local OLX Classifieds. Search and post classified ads in For Sale, Cars, Jobs, Apartments, Housing, Pets, Personals, and other categories. Global.
You can easily post free ads through OLX. Very easy and effective ad posting site. very good Goole page rank and high Alexa rank. 
6 eBayclassifieds ebayclassifieds Use free eBay Classifieds (Kijiji) to buy & sell locally all over the United States. Only Local Ads Near You! consumer, digital products buy, sell. Local
ebayclassifieds is mainly popular in US. Its ideal for local neighborhood ads, Buy-sell ads.  personal ads, pets ads, and all the types of household items items.
7 Adsglobe adsglobe.com Post free ads or online classifieds in jobs, real estate, rentals, autos, items for sale ads... Most effective online classifieds advertising for consumers and ... Global
Adsglobe is a very popular free classifieds site with lots of categories available to you for ad posting.
Adsglobe has a goog Google page rank and high Alexa rank.
8 Oodle Oodle.com Post free ads and search millions of free classifieds ads for used cars,jobs, apartments, real estate, pets, tickets and more. Global.
Oodle is purely a genius and brilliant popular classifieds site since it post your ads on many social networking sites. Unique ad posting site this way!
9 Sell sell.com Sell.com Marketplace, merchant advertising and e-commerce solutions. Buy sell trade: pets, autos, homes, computers, and fashion for sale by owner.ecommerce. solutions. Global.
Sell.com is a very popular and huge marketplace for online advertisement of many types including, buy, sell,merchant advertisement,
10 Classifiedads classifiedads Free classified ads for cars, jobs, real estate, and everything else. Find what you are looking for or create your own ad for free! Global.
Classifiedads.com is a very famous, popular and big market place for online ad posting, advertising of many types.

Top 50 FREE Best Online Ad Posting Sites List(10-50)




Top 50 Online Free Ad Posting Sites List. Top 50 Online Free Ad Posting Sites List.
11 Click.in 31 Ivarta
12 Indialist 32 Digitalbhoomi
13 Locanto 33 ocala4sale.com
14 globalFreeClassifiedAds 34 bonqo.com
15 classifiedslive 35 traderonline.com
16 Rediff 36 claz.org
17 Bechna 37 Goforads
18 Khojle 38 Meramaal
19 Adpost 39 Indnav
20 Ddoos 40 Classifiedsden
21 Vivastreet 41 Zopdy
22 Webindia123 42 adlandpro.com
23 inetgiant.com 43 Thisismyindia
24 vast.com 44 Sulekha
25 yakaz.com 45 Ibibo
26 pennysaverusa.com 46 Indiagrid
27 daype.com 47 salespider
28 ziply.com 48 Sify
29 Adeex 49 domesticsale.com
30 Whereincity 50 Adsmantra

Top 100 free best classifieds sites list(51-100)


Top 100 Online Free Ad Posting Sites List. Top 100 Online Free Ad Posting Sites List.
51 epage.com 52 .freeadscity.com
53 recycler.com 54 chooseyouritem
55 webcosmo.com 56 Rajb2b
57 hoobly.com 58 Indyapulse
59 freeadlists.com 60 Bupio
61 bestwayclassifieds 62 wantedwants.com
63 webclassifieds.us 64 Dragg
65 Classifieds4me 66 E-classifieds.net
67 Boostim 68 buysellcommunity.com
69 Classifieds.co.uk 70 businesslist
71 Askht 72 Google.com/base
73 Classifieds.yahoo.com 74 Kaboo.com
75 Bizmartindia 76 Bharatpatal
77 Postyouradforfree.com 78 Highlandclassifieds
79 Loyalmart 80 Mid-day
81 Bestadforum.com 82 Kijiji.com
83 Citynews.com 84 Livedeal.com
85 Selloutads.com 86 Ozfreeonline.com
87 Worldslist.com 88 Kugli
89 Subblurbs.com 90 Droik
91 Kaboo.org 92 Isell.com
93 Iclads.com 94 Itsmymarket.com
95 Postaroo.com 96 Marketplace.sfgate.com
97 London.kijiji.ca 98 Freeads.biztop.com
99 Freeadvertisingzone 100 Economist.com/classifieds
101 Freeadvertisingexchang 102 Ablewise
103 Friday-ad 104 Localgrunts
105 Adquest3d 106 Caklassifieds
107 Davisstraub 108 Classifieds.co.uk
109 Classifiedscrossing 110 Expo.live.com

I have taken a lot of care while publishing this “Top 100 list of best free ad posting classifieds sites “. Still, i accept that this list needs the constant feedbacks and updates to keep it updated/fresh and relevant to its present content. Please do post a comment, if you have noticed anything like an issue, error,link-breaks, disconnects, or anything relevant to this post. Thanks !



Source: topbestlisted

Best Free Anonymous Surfing Service

Introduction

Anonymous Browsing ApplicationsThis is the 21st century, the so-called Digital Age, an age where information is more public than it is private. The sheer growth of the Internet has led to privacy concerns for a great number of people.
We are entitled to our privacy in the real world so why not in the virtual one? There are many genuine reasons why people wish to stay anonymous on the Internet; ranging from simple paranoia, to hiding browsing activities from a spouse and averting your authority.
We are not here to debate the legal, moral or ethical issues surrounding anonymity on the Internet, but merely to provide you with reviews on some of the methods you can take to achieve it. The programs listed here are classified as free software and you will never have to pay a penny for any of them. If you have already paid for any of them then I suggest you demand a refund.

The places where these programs help are internet cafes, libraries, schools, workplaces, public and prepaid Wi-Fi hotspots where there is a greater need for privacy. Depending on your reasons, they are also perfect products for use in your home to prevent prying eyes and even your ISP from monitoring you. Whilst there are no guarantees of achieving 100% anonymity online the following free programs do a great job in the vast ether we know as the Internet.
Ultimately, anonymity comes down to two essential points:
  1. The Browser - this is the point of entry to the World Wide Web and the way people can access data about you. If you are serious about your anonymity on the Internet, changing the configuration of your browser is essential.
  2. The Software - this is the nuts and bolts of the anonymity machine that deals with network data traffic and where to route it. Normally, our network data flows straight through to our ISP and out, which means our ISP keeps tabs on us all the time. Specialised software allows us to encrypt our network data so that when it passes through our ISP, they won't be able to see what it is.
There are a few types of connections which enable anonymous surfing:
  • p2p - peer to peer is a decentralized network that routes data through peers as identifiable data pieces by location independent keys. Generally secure but could potentially be insecure as a peer could log information about the data that is passing through it.
  • Proxies - routing machines named proxy servers continuously act upon your transfer requests to forward data, avoiding direct communications with the point of contact the data packets usually would be handled at. Secure but to a proportion, factually routes can only be technically random and any logging of this passing data means vulnerability. 
  • VPN - a Virtual Private Network that securely tunnels all of your information from one point to another in essence meaning your data transfer appears to initiate from a remote machine. Generally very secure but could potentially be insecure as a server could log information about the data that is passing through it.
With the popularity of portable USB devices increasing, it is now possible to run portable versions of software which do not interfere with the client machine configuration. JonDo, Tor and many other anonymity programs listed here are now fully portable and may work under restricted conditions such as being behind a corporate firewall. However, this does not warrant the fact you can breach your company's acceptable use policy.

Read more at Best Free Anonymous Surfing Service

Adnetwork.net - The way to monetize your blogs / websites

Are you looking for an ad network that pays you to show CPC (Cost Per Click), CPM (Cost Per Mile), CPL (Cost Per Lead) and CPA (Cost Per Action) ads on your blog or website ? If you have a blog or website and it gets at least 1000 page views per month you can apply for this ad network.

Make Money Online From Your Blog or Website With Adnetwork.net

Adnetwork.net is an online advertising network that offers cpc,cpm,cpl and cpa ads to bloggers and website owners. Getting approval is very easy and automatic. Just fill up simple sign up form with your email, website address and password for this website and it will create your account within few seconds. After that you have to fill payment, website and contact information and then you can generate tag for your website or blog. 


It has many ad banner sizes such as- 120 x 600; 300 x 250; 336 x 280; 468 x 60; 728 x 90; 160 x 600; 125 x 125; 234 x 60; 120 x 240; 180 x 150; 720 x 300; 120 x 90; 250 x 250; 120 x 60; 88 x 31. You can also transfer your earning to your advertiser account.
Payment Method-You can receive your payment via PayPal or Wire Transfer. But in order to receive your payment you have to send request email to its Finance team at finance@AdNetwork.net.

Sponsors