Realtime translation – can you hear me now?

Programming, Technology
Can you hear me now?

Image courtesy of purplemattfish on flickr

Google Translate is awesome but fell a few feet short of my requirements on a recent project. What I was looking for was full control over what portions of my web content get translated when the user requests a translation and not the entire page. If you have used Google Translate, you know that the way translation works is that it will translate the entire page.

Question now becomes, how do you do inline translation and get control over what gets translated? Enter JQuery-Translate. JQ-Translate allows you to get that granular control and do inline translation which ends up looking really slick. The [translate] option that you see on top of this post uses the same framework but in the form of a wordpress plugin and if you use that to translate this post into a language of your choice, you will see that only the post gets translated and not the entire page….sweet!

2 Comments

Prevent Google from tracking your every search (move).

Technology

Yes, Google does offer us an incredible list of tools to make our lives easier and simpler(?) but in the process of doing so, the company is also amassing a large amount of data about you. The company uses this data to make results more relevant but there’s something eerie about that. I wrote a post earlier which talks about how you can see how much of this data is collected by Google and if that’s got you thinking that you need to get some control over the data collection process, then read on.

Ways to “opt-out”:

  1. Install the Google Analytics Opt-out browser extension. It works on firefox, IE and Chrome. Get it here. This will prevent your browser from sending back any data to the Google Analytics service.
  2. Opt out of Personalized AdSense Ads. This can be done here.
  3. Install the following extenstions (for firefox):
    • Google Sharing: Provides an additional layer of privacy by anonymizing your Google “unique id”. Google sets a unique id for every browser/user.
    • Beef Taco: Despite the strange name, this extension automatically installs appropriate cookies that opt you out of most of the online advertising networks (doubleclick, yahoo, google, etc, etc)

If you are mega paranoid, you can always block the google.com domain from setting any cookies on your browser.

Comments Off

how to update a database column with a random date

Blog, Programming

I ran into the challenge of updating a database (oracle) table with a random date and thought that my solution might help someone else with a similar challenge. Here goes…

First you need to get the Julian day number for your start date. Start date is the date from where you want to begin the randomization. Use the following SQL statement to get that number…

SELECT TO_CHAR(TO_DATE('2010-01-01', 'YYYY-MM-DD'), 'J') FROM DUAL;

When you run the above SQL query, the cursor should show ‘2455198‘. Now that you have the julian value for your start date, you can use the following statement to generate a random value between your start date and any number of additional dates. In the example below, I am adding 120 additional days to my start date so my range will be Jan-01-2010 till Apr-30-2010.

SELECT TO_DATE(TRUNC(DBMS_RANDOM.VALUE(2455198, 2455198+120)), 'J') FROM DUAL;

From here, a simple update statement should do the trick!

UPDATE table_name SET column_name = (SELECT TO_DATE(TRUNC(DBMS_RANDOM.VALUE(2455198, 2455198+120)), 'J') FROM DUAL);

Hope this saved you some time! :)

Comments Off
« Older Posts


Switch to our mobile site