Posts Tagged ‘Google’

Google or Goodbye

January 14, 2010

Google will leave China?
Really happens?
Goodbye Google?
Let’s wait for the result in the few weeks.

Figure out Google URL shortener – goo.gl

January 9, 2010

You may access the below site to try the URL shortener service of Google:

http://gaigalas.net/lab/googl

Some posts about what is the API:

http://www.kix.in/blog/2009/12/goo-gl/

http://www.labnol.org/internet/create-google-short-url/11748/

The code is:

<html>
	<head>
		<style>
			body 
			{
				height: 50px;
			}
			td
			{
				font-family: arial; 
				font-size: 12;
			}
		</style>
		<script>
			var getUrlShorteningRequestParams = function (b) 
			{
				function c() {
					for (var l = 0, m = 0; m < arguments.length; m++) l = l + arguments[m] & 4294967295;
					return l
				}
				
				function d(l) {
					l = l = String(l > 0 ? l : l + 4294967296);
					var m;
					m = l;
					for (var o = 0, n = false, p = m.length - 1; p >= 0; --p) {
						var q = Number(m.charAt(p));
						if (n) {
							q *= 2;
							o += Math.floor(q / 10) + q % 10
						} else o += q;
						n = !n
					}
					m = m = o % 10;
					o = 0;
					if (m != 0) {
						o = 10 - m;
						if (l.length % 2 == 1) {
							if (o % 2 == 1) o += 9;
							o /= 2
						}
					}
					m = String(o);
					m += l;
					return l = m
				}
				
				function e(l) {
					for (var m = 5381, o = 0; o < l.length; o++) m = c(m << 5, m, l.charCodeAt(o));
					return m
				}
				
				function f(l) {
					for (var m = 0, o = 0; o < l.length; o++) m = c(l.charCodeAt(o), m << 6, m << 16, -m);
					return m
				}
				
				var h = {
					byteArray_: b,
					charCodeAt: function (l) {
						return this.byteArray_[l]
					}
				};
				
				h.length = h.byteArray_.length;
				var i = e(h.byteArray_);
				i = i >> 2 & 1073741823;
				i = i >> 4 & 67108800 | i & 63;
				i = i >> 4 & 4193280 | i & 1023;
				i = i >> 4 & 245760 | i & 16383;
				var j = "7";
				h = f(h.byteArray_);
				var k = (i >> 2 & 15) << 4 | h & 15;
				k |= (i >> 6 & 15) << 12 | (h >> 8 & 15) << 8;
				k |= (i >> 10 & 15) << 20 | (h >> 16 & 15) << 16;
				k |= (i >> 14 & 15) << 28 | (h >> 24 & 15) << 24;
				j += d(k);
				return j;
				return i
			};
			
			var	xmlhttp = new XMLHttpRequest();
			
			function shortify(url)
			{
				var auth_token = getUrlShorteningRequestParams(url);
				var urlEscaped = escape(url).replace(/\+/g,"%2B");
				
				xmlhttp.open("POST", "http://goo.gl/api/url?user=toolbar@google.com&url=" + urlEscaped + "&auth_token=" + auth_token, false);
				xmlhttp.onload = xmlhttpLoad;
				xmlhttp.send(null);
			}
			
			function xmlhttpLoad()
			{
				var object = JSON.parse(xmlhttp.responseText);
				
					if(object.short_url == undefined){
						document.getElementById('shortURL').value += object.error_message;
					}else{
						document.getElementById('shortURL').value += object.short_url;
					}
			}
			
			function copy() 
			{
				var input = document.getElementById('shortURL');
				input.focus();
				input.select();
				document.execCommand('Copy');
				input.blur();
				window.close();
			}
			
			chrome.tabs.getSelected(null,function(tab){ shortify(tab.url);});
		</script> 
	</head>
	<body>
		<table cellpadding="0" cellspacing="0" style="padding-top:3px;">
			<tr>
				<td colspan="2">
					<input type="text" id="shortURL" style="width:150;" readonly="true">
				</td>
			</tr>
			<tr>
				<td>
					powered by goo.gl
				</td>		
				<td style="text-align: right;">
					<a href="javascript:copy()">Copy</a>
				</td>
			</tr>
		</table>
	</body>
</html>

Live Flight Tracking on Google Maps

January 5, 2010

Live Flight Tracking

Casper is a brilliant mashup that displays movement of incoming and outgoing flights on a Google Map live.

It is currently only tracking flights that are flying in and out of the Amsterdam Airport but the mashup can be “configured for any airport.”

Flight Information The airplanes are colored based on the name of the airline to which they belong but you can also change their colors based on the altitude at which they are currently flying or the flight type (whether it’s an incoming flight, outgoing or in transit).

You can also click the icon of a moving airplane to see speed and height at which it is flying in real-time.

And if you are checking this service at a time where there isn’t flight traffic at Schipol Airport, just select one of the past days from the drop down to replay the entire flight movement for that day on your computer screen.

The service requires a Flash based browser. [via]

Google Maps - Flight Tracking

Via:

http://goo.gl/ndBE