Tuesday, September 02, 2008

How to Write Your Own IM Bot in Less Than 5 Minutes

Source: http://www.labnol.org/internet/tutorial-create-bot-for-gtalk-yahoo-messenger/4354/

Write IM bot This quick tutorial will show you how to develop your own functional IM bot that works with Google Talk, Yahoo! Messenger, Windows Live and all other popular instant messaging clients.

To get started, all you need to know are some very basic programming skills (any language would do) and web space to host your “bot”.

For this example, I have created a dummy bot called “labnol” that listens to your IM messages and return related search phrases based on Google Suggest. To see this live, add  labnol@bot.im to your GTalk buddy list and start chatting.

google-talk-bot

If you like to write a personal IM bot, just follow these simple steps:

Step 1: Go to imified.com and request an invite. You should also give your bot a decent name because you can have just one bot per email address.

Step 2. An email with a secret key should arrive in your Inbox the next minute. Copy that key to the clipboard and go here to redeem that key.

Step 3. Now it’s time to create a bot which is actually a simple script that resides on your public web server. It could be in PHP, Perl, Python or any other language. More here.

This is the source of the PHP script I wrote for the labnol IM bot - pretty self explanatory - it reads your message, gets the relevant data from Google Suggest and echoes it back to the IM window.

<?php   // Get all the related keywords from Google Suggest   $u = "http://google.com/complete/search?output=toolbar";   $u = $u . "&q=" . $_REQUEST['msg'];    // Using the curl library since dreamhost doesn't allow fopen   $ch = curl_init();   curl_setopt($ch, CURLOPT_URL, $u);   curl_setopt($ch, CURLOPT_HEADER, 0);   curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);    $xml = simplexml_load_string(curl_exec($ch));   curl_close($ch);    // Parse the keywords and echo them out to the IM window   $result = $xml->xpath('//@data');   while (list($key, $value) = each($result)) {     echo $value ."<br>";   } ?>

Step 4: Once your script is ready, put it somewhere on your web server and copy the full URI to the clipboard.

web-url Now login to your imified account, paste the script URL and add that im bot your friends list. That’s it.

This was a very basic bot but the possibilities are endless.

For instance, you could write a bot that will send an email to all your close friends via a simple IM message. Or you could write one that will does currency conversion. See stuff that is already implemented in this list of most useful Google Talk bots.

How to Write Your Own IM Bot in Less Than 5 Minutes - Digital Inspiration

Read More...

Face Recognition Comes to Picasa Web Albums Much Before Windows Live Gallery

Source: http://www.labnol.org/software/face-recognition-in-picasa-web-albums/4373/

While we were waiting for Microsoft to release an updated version of Windows Live Gallery with facial recognition support, CNET just broke the news that Google had already added facial matching features in their own Picasa Web Albums website.

picasa faces

Google will also release Picasa 3 for Windows desktop sometime later today that includes a new movie maker mode to help you make moving video clips out of your still photographs.

picasa-facial-recognitionWhile sharing his own experience with the face recognition feature of Picasa Web Albums, Stephen writes:

"It took me less than 15 minutes to tag close to 200 faces in a set of more than 100 photos, and that included some start-up time such as figuring out how the system worked, establishing names for various common subjects, and correcting a few errors.

The most impressive moments are when Picasa presents a large array of photos with the same face, and you can label them all with a single click. "

Face Recognition Comes to Picasa Web Albums Much Before Windows Live Gallery - Digital Inspiration

Read More...

Add Inline Language Translation to your Website with Google AJAX API

Source: http://www.labnol.org/internet/website-translation-with-google-ajax-language-ap/4367/

translation Google Translate, Windows Live Translator and Yahoo! Babelfish have made it very easy for web publishers to add language translation capability into their web pages. Include a line of Javascript code anywhere in your blog template and visitors from other countries will be able to translate and read your content in their own native language. Simple.

While these solutions work, the only problem is that when people translate your web pages, everything gets reloaded under a different URL and this is not the best user experience. You may therefore want to try this AJAX based language translation where the content is translated inline in real-time while the visitor remains on your site.

Inline Translation powered by Google AJAX Language API

Watch this screencast video to see how inline translation works or go here for a live demo.

There are many advantages offered by Google AJAX Language Translation API vis-a-vis the regular online translation service of Google. You are in complete control of page elements that are to be translated, all existing links and sharing features on your web page stay intact and best of all, visitors get a better experience.

If you liked what you just saw, it is something very easy to implement and internally uses Google API that you may use on any site without any restrictions.

How Inline Language Translation Works ?

The basic idea is that when a visitors clicks a language flag or selects a new language from the drop down, we invoke the Google Translate API and replace (actually hide) the existing text with the translated text returned by the Google API. The cycle is repeated when another languages is selected.

Your visitors can also switch to the original language of the web page anytime.

Add Google AJAX Language API in your Website

If you are ready to take the plunge, here’s what you need to do to get this working on your site.

Step 1: Edit your blog template and place everything that you want to translate inside a <div> tag with some unique id. - let’s say <div id="article">….</div>

translation-div

Step 2: Now place this code - <div id="translation"></div> - near the article div you configured in Step 1. The second div will actually house your translated text so you may add it just above or below the article div.

Step 3: And here’s the actual translation code. If this looks geeky, don’t worry too much - just copy-paste it inside the <head> tag of your blog template as it is.

<script type="text/javascript"         src="http://www.google.com/jsapi"></script> <script type="text/javascript">   // Initialize version 1.0 of Google AJAX API  google.load("language", "1");   function translate(lang) {    var source = document.getElementById("article").innerHTML;    var len = content.length;     // Google Language API accepts 500 characters per request     var words = 500;     // This is for English pages, you can change the    // sourcelang variable for other languages    var sourcelang = "en";    document.getElementById("translation").innerHTML = "";     for(i=0; i<=(len/words); i++) {      google.language.translate (source.substr(i*words, words),                  "en", lang, function (result) {      if (!result.error) {      document.getElementById("translation").innerHTML            = document.getElementById("translation").innerHTML            + result.translation;     } }); }      // Hide the text written in the original language   document.getElementById("article").style.display = 'none';   return false;  }   // Switch to the original language   function original() {   document.getElementById("translation").style.display='none';   document.getElementById("article").style.display = 'block';   return false;  } </script>

Step 4: The last step is to include the translation flags or translation drop-down menu in your template.

I prefer having language names (see sidebar) instead of country flags because a flag may not always be the best representation of a language.

<a href="#" onclick="original();">Switch to English</a> <select onchange="translate(this.options[this.selectedIndex].value);"> <option value="de">deutsch</option> <option value="pt">português</option> <option value="fr">français</option> <option value="ja">日本語</option> <option value="ar">عَرَبيْ</option> <option value="it">italiano</option> <option value="ru">pусский</option> <option value="po">polski</option> <option value="zh-CN">中文</option> <option value="es">español</option> <option value="ko">한국어</option> <option value="nl">nederlands</option> <option value="hi">हिन्दी </option> <option value="el">Ελληνική</option> <option value="ro">română</option> </select>

Add Inline Language Translation to your Website with Google AJAX API - Digital Inspiration

Read More...

Intel talks up shape-shifting "programmable matter," bugs us out

Source: http://feeds.engadget.com/~r/weblogsinc/engadget/~3/381366301/

Filed under:


We've managed to somewhat wrap our brains around shape-shifting robots and printable circuits, but we're still working on fully understanding the latest Intel spill. As IDF came to a close, Justin Rattner, Intel's chief technology officer, presented a keynote speech in which he explained just how close the outfit was to realizing "programmable matter." Granted, he did confess that end products were still years away, but researchers have been looking at ways to "make an object of any imaginable shape," where users could simply hit a print button and watch the matter "take that shape." He also explained that the idea of programmable matter "revolves around tiny glass spheres with processing power and photovoltaic for generating electricity to run the tiny circuitry." For those now sitting with a blank stare on their face (read: that's pretty much all of you, no?), hit up the read link for even more mind-boggling "explanations."

[Via MAKE]
Read | Permalink | Email this | Comments

Read More...

Mythbusters RFID hacking episode canned by credit card company lawyers

Source: http://feeds.engadget.com/~r/weblogsinc/engadget/~3/381471510/

Filed under:

Although it's no secret that RFID is easily hacked (see: train passes, passports, credit cards, one billion other cards, etc.) it's still not necessarily common knowledge, and it sounds like the major credit card companies want to keep it that way -- according to Adam Savage, Mythbusters was all set to do a show exposing the weak security behind most RFID implementations but was shut down by lawyers from "American Express, Visa, Discover, and everybody else... [who] absolutely made it really clear to Discovery that they were not going to air this episode." Since Discovery is an ad-supported channel, it's not surprising that it backed down, but we'd say that the credit card industry would be far better served spending money on actually improving security rather than lawyering up and trying to keep consumers in the dark. Video after the break.

[Via Wired]

Continue reading Mythbusters RFID hacking episode canned by credit card company lawyers

Read | Permalink | Email this | Comments

Read More...

NEC debuts "premium" 22-inch EA221WM LCD monitor

Source: http://feeds.engadget.com/~r/weblogsinc/engadget/~3/381541860/

Filed under:


Impressed by the NEC EA261WM's frog-displaying abilities but think it's about four inches too much for you? Then good news! NEC has now introduced the MultiSync EA221WM, which boasts many of the same "premium" features in a slightly more desk-friendly 22-inch size. That includes a 1,000:1 contrast ratio, a 5 ms response time, a four port USB 2.0 hub, and NEC's trademark ECO Mode and carbon footprint meter, to name a few, although you will have to make do with a drop to 250 cd/m&sup2; brightness, and a 1680 x 1050 resolution instead of the full 1,920 x 1,200 on the 26-inch model. On the upside, the EA221WM's $390 price tag is a good deal more affordable than that of its larger counterpart, and you'll be able to get your hands on it sometime this month.
Read | Permalink | Email this | Comments

Read More...

ATP PhotoFinder mini geotagger doesn't require software

Source: http://feeds.engadget.com/~r/weblogsinc/engadget/~3/381595730/

Filed under: ,


Most of the geotaggers we've seen have written location data to your photos using some fancy software on your machine after you've pulled images off your camera, but ATP's PhotoFinder mini moves the tagging step backwards in the process, writing geodata directly to images on your memory card. Like similar devices, the PhotoFinder mini records timelogged GPS data from a SiRF Star III chip while you shoot -- but when you're done, you insert your card into a base station, which tags your images using their EXIF timestamps. Sounds like a much simpler system than relying on third-party software to integrate with your photo-management apps -- we just wish the dock was also a card reader, which would make this a one-step process. No pricing info yet, but if this thing is reasonable, it'll certainly be tempting.

[Via Photography Blog, thanks Mark]
Read | Permalink | Email this | Comments

Read More...

Sony, Samsung both claim "world's first" 200Hz LCD TV

Source: http://feeds.engadget.com/~r/weblogsinc/engadget/~3/381633230/

Filed under:


We already caught sight of Sony's Bravia Z4500 LCD TV with 200Hz "MotionFlow" before and after it was officially unveiled at IFA, but it wasn't the only such set on the scene, with Samsung also touting a "world's first" 200Hz LCD TV of its own. Apparently, the distinction is that Samsung supposedly had the world's first prototype, while Sony will actually be the first to market with one. All this is also slightly further complicated by the fact that Sony and Samsung have each also already introduced 240Hz LCD TVs in Japan, although we're chalking those up to the usual 50 / 60Hz, NTSC / PAL differences. One thing that is clear, however, is that both sets sure are impressive, and you can get a taste of each by checking out Engadget en Español's round-up at the link below.
Read | Permalink | Email this | Comments

Read More...

India's underground CAPTCHA-breaking economy

Source: http://feeds.feedburner.com/~r/boingboing/iBag/~3/378950042/indias-underground-c.html

ZDNet's Dancho Danchev has a nice little investigative piece about the underground economy in cheapo Indian data-centers that break CAPTCHAs for spammers all day long:
Data processing as a mentality is visible in all the applications a human CAPTCHA solver is using. Basically, there's no indication which service's authentication model they're currently abusing, CAPTCHA breaking is replaced with CAPTCHA solving making it look like it's a some sort of a challenge that they have to solve.

Recruitment of the people that would be later tested for whether on not they quality for the job by exposing them to CAPTCHAs from different services, and a timer running in the background, is mainly done through advertisements like the following :

* easy work
* no learning needed
* no investment needed
* weekly payout
* work from home
* work when you want
* flexible working hours
* highest rates in the industry

Inside India's CAPTCHA solving economy (via /.)

Read More...

TouchKit: modular multitouch development kit primed for DIYers


NOR_/D's TouchKit is a modular multitouch development kit that aims to "make multitouch readily available in an open source fashion." If that sounds awfully familiar, you're probably thinking of its sister project Cubit, both of which are hoping to get multitouch into the mainstream as quickly as humanly possible. The kit itself is composed of hardware and software aspects, and of course, source files are provided for poking, prodding and researching. Interested? It'll be $1,580 shipped with a "fully assembled, frameless 70- x 50-centimeter multitouch screen, a calibrated infra-red camera, and the full base software pack."

[Via Gizmag]

Read More...

Multitouch Oy demos Cell multitouch display

Source: http://feeds.engadget.com/~r/weblogsinc/engadget/~3/380968981/

Filed under: ,


Microsoft had better hurry and get more than one Surface rig out on the market, because there are plenty of other companies working on large-format multitouch hardware -- the latest is Finland's Multitouch Oy, which recently demoed its Cell display for jkkmobile. Just the usual photo pinching demo, but it's running at an impressively fluid 60fps on desktop hardware, even with multiple users. Multitouch Oy says it'll run about $7,000 for a 32-inch model when it hits -- yeah, we'll stick with the DIY kit for now. Video after the break.

[Via jkkmobile]

Continue reading Multitouch Oy demos Cell multitouch display

Read | Permalink | Email this | Comments

Read More...

IOGEAR's DVI Net ShareStation networks one display for multiple users

Source: http://feeds.engadget.com/~r/weblogsinc/engadget/~3/381023908/

Filed under: ,

While we imagine that some folks are sick and tired of fighting over the sole display in the house, some people out there are looking for a reason to quarrel over the biggest one. IOGEAR's DVI Net ShareStation is here to help, providing one display with an Ethernet connection so that any and all computers on the same network can battle for it share. Debuting at CEDIA, the tiny box includes a DVI / VGA adapter and an Ethernet jack, and it supports streamed resolutions up to 1,600 x 1,200. Furthermore, users who just want to add an external display to their system can do so by simply connecting the device to a USB port. It's available now for $199.95, and the release can be seen in full by clicking through below.

Continue reading IOGEAR's DVI Net ShareStation networks one display for multiple users

Permalink | Email this | Comments

Read More...

Mirror Ball Light by Dann Spann

Source: http://cubeme.com/blog/2008/08/20/mirror-ball-light-by-dann-spann/

This really original mirror light from the Coroflot portfolio is created by Dann Spann.

Link Via [Core77]

ShareThis

Read More...

Lightmark Photos by Cenci Goepel and Jens Warnecke

Source: http://cubeme.com/blog/2008/08/26/lightmark-photos-by-cenci-goepel-and-jens-warnecke/

Lightmark is a fantastic site that contains an amazing display photographs by Cenci Goepel and Jens Warnecke. The duo took long exposures of lights to create some amazing effects.


Link Via [Neatorama] & [Mylitantpaltypus]

ShareThis

Read More...