A Simple JavaScript To Get English Language Definition From A Dictionary
2009-05-19
English is not my first language so I use online dictionaries frequently as a part of my daily routine to clarify and learn unfamiliar words as I read through articles in the Internet.
I have been using www.ditionary.com for a long time and I had the plan to make this work easy by creating a small application to retrieve the definition with support of a web service. This morning suddenly a new idea hit me to use JavaScript to get the word in the first place and load the appropriate URL.
How Does This Work?
When a user enters a word in the www.dictionary.com interface it redirects the user to the following dynamic URL.
http://dictionary.reference.com/browse/Target-Word
Target-Word is The word we are seeking the definition for
What this JavaScript does is it retrieves the desired word from the user via a prompt, generate the appropriate URL according to the above format and open the new URL in a new window or tab so the time taken (under normal circumstance) to, load the web site, type-in the word, wait till the site redirects you, is saved. Now time is only taken for a single server request/response.
How To Set This Up?
It’s simple, just add a new favorite (for IE) or bookmark (for FireFox) in your browser and paste following code as the URL (for IE) or Location (for FireFox):
javascript:(function(){var%20word=prompt(%22Enter Word:%22);if(word!=null){window.open(%22http://dictionary.reference.com/browse/%22+word);}})();

Now, when you open the favorite/bookmark, it will ask you for the word you want to look for and open the definition in a new window/tab.
It’s easier to use if you add the bookmark/favorite as a button into your bookmark/links toolbar
This small script helps me a lot now so I hope this would help you too!
Was this post helpful to you? How can I improve? - Your comment is highly appreciated!
Cassian Menol Razeek
D LINQ : How to Map Columns Which Auto Generate Values At the Database
2009-05-11
I have being working on a software application made on .Net and recently my client asked me to use D LINQ instead of SQL.
D LINQ has great benefits loaded! As I started working with DLINQ I started to know that preventing SQL injection is not a headache anymore and misspelled SQL queries will not trouble agian at run time because DLINQ generates all necessary SQL inside the framework!
I chose to use annotations inside the class instead of using separate xml file. Following is a part of the first class I ported to D LINQ.
</p> <Table(Name:="tbl_Process")> _ Public Class Process <Column(Name:="ProcessID", DbType:="Int", isprimarykey:=True)> _ Public ProcessID As Integer <Column(Name:="BusinessProcessID", DbType:="varchar(50)")> _ Public BusinessProcessID As String <Column(Name:="ProcessText", DbType:="varchar(50)", isprimarykey:=True)> _ Public ProcessText As String ... ...
ProcessID column is the primary key of my database table tbl_Process.
Important Point: I use database to auto-generate values for the primary key column (integer value incremented by one).
So when I run the application, It gave me this unexpected error:
Cannot insert explicit value for identity column in table ‘tbl_Process’ when IDENTITY_INSERT is set to OFF.
Basically, the IDENTITY_INSERT when using the database to auto generate value for a field but when I ran a SQL insert statement at the database end it worked fine!
After some tough time I found out the solution for this problem!
When we use an auto-generate field in a data table we have to specifically mention it in the matching field in the appropriate class.
The code to state this is:
Syntax:
IsDbGenerated:=True
This has to be added to the annotation added for the specific column like:
</p> <Column(Name:="ProcessID", DbType:="Int", isprimarykey:=True, IsDbGenerated:=True)> _ Public ProcessID As Integer
Now D LINQ can understand that the field value is auto-generated by the database!
Was this post helpful to you? How can I improve? - Your comment is highly appreciated!
Cassian Menol Razeek
Six Advices to Succeed in Online Paid Surveys
2009-03-14
I have been working with many survey sites in the Internet and I have learnt a lot of lessons. I learnt some of these when I was researching about online survey sites and most of these lessons are learnt by experience. So I thought to share my knowledge with the rest of the world hoping it would help someone out there.
So in this article, I will give a set of advices that I have learnt in the hard way…
Rule 1 - Don’t Select Survey Sites From Lists Rated By Other People
Many people in the Internet are involved in affiliate marketing. Many surveying sites pay bloggers when they refer a new person to their site. So don’t believe in those lists such as “Top 10 Most Paid Survey Sites”, “Top 5 Survey Companies”, etc. because the TOP site of those lists is the site that pays the blogger most! So my advice is not to believe in those ranked lists.
Rule 2 - Ask the site this question: ” What Do I Get For Responding To Surveys? “
The answer depends on the site you are going to work with. Some sites pay money and some sites pay by other means such as coupon codes and sweepstakes entries while some sites are charity sites where you get non-paid public service surveys.
Rule 3 - Work Only For Cash
As I mentioned there are many sites which pays you in indirect methods such as coupon codes. My advice is never work on surveys unless they pay you by money because there is no way to measure the value of your work. They will give you a coupon code or sweepstakes entry at the end of your days work and you still have to go around the corner to get your own earnings. Since most of the times these are given as discounts, you have to spend more money and buy something to apply those discounts. In simple words, you only feel you earn but you never get your earnings into your hands.
The worst problem is some coupon codes may not be useful for you at the moment and some discounts may not be available in your region. You have to take this very seriously if you are not living in the same country or region as the origin of the site where it is operational.
Rule 4 - Check Available Payment Methods
Your computer may simply get surveys through the site without any problems or delays but it doesn’t mean your payment gets to your bank account in the same speed. Go and check the payment options supported by the site. Some sites support various payment methods while some sites only have one or two methods.
For most payment methods there are limitations across countries. This isn’t a problem if you are located in the same country where the site is operational but if you are living in a different region or a country you have to be more concerned about this matter.
For an example, you may be able to create a Paypal account from your country but you may not be able to accept payments to that account because Paypal doesn’t support that service in your country. In such situations if your site does not have suitable options you may lose your money.
Rule 5 - Don’t Go After Fortunes
There’s no such thing as easy money! Remember this as you go on finding for survey sites because you will face sites that say they would pay bulks of money for each survey. My advice according to what I have learnt so far is don’t go for those sites because the more money they promise, the more chances for that site to be a scam. Unfortunately, many people around the world get into these scams everyday. The best thing is to find a site that pays a reasonable and especially practical price for your work.
Rule 6 - Work Hard! There’s No Boss To Push You Forward!
If you are working in a company then you have a boss looking at you to make sure you meet company expectations and to kick you off if you lose performance. In this case, you are your own boss. The good news is there’s no one to kick you off and you own everything you earn. The bad news is you have to take care of everything. Especially you have to keep your motivation up. It’s not easy to do something of your own without postponing. You must dedicate yourself to the work at least till you reach a solid level of ground to stand on.
In this new office you don’t have office times. You have your freedom and at the same time you have all responsibilities on your shoulders. In simple words, It’s your baby go ahead and grow it!
Don’t look for fortunes, Work hard and make your own fortune!
Was this post helpful to you? How can I improve? - Your comment is highly appreciated!
Cassian Menol Razeek


