Archive for the ‘web’ Category

coordonate cu google maps

Posted on August 8th, 2011 in fun, web | 1 Comment »

Gasiti coordonatele cu Google Maps

Aceasta pagina foloseste APIul Google Maps pentru a afla cu precizie coordonatele geografice (latitudine si longitudine) pentru orice punct de pe pamant.
Aveti doua posibilitati : prin miscarea iconitei ori prin scrierea adresei,orasului,locului daca nu stiti exact pozitia pe harta. Locatia de start este Alba Iulia – in centrul Romaniei.

Gasiti coordonatele miscand harta

1. Faceti Drag and Drop pe harta pentru a o misca
2. puteti face zoom pentru mai multa precizie 3. Puteti misca markerul pentru a stabili cu exactitate locul caruia doriti sa ii aflati coordonatele geografice. Coordonatele se improspateaza dupa fiecare miscare.

Aflati coordonatele introducand numele si/sau adresa locului cautat

Scrieti adresa intreaga: Strada, numar, oras, tara. Pentru orase mari si locuri faimoase tara este optionala. “Casa Poporului” sau “Sibiu”.

demo..

Backup – restore large mysql databases from shell

Posted on December 27th, 2010 in programming, web | Comments Off

Had to copy a large DB into a new one…Since MySQL Administrator and PHPMyAdmin failed to backup the 3.7Gb Database I was forced to do it from Shell like this:

mysqldump -u user -p db-name > output_file.out
 /*- launch this from the shell as root with the credentials of the source DB*/

mysql -u user -p new_db-name < output_file.out
/* - this will copy from the dump file into the new database.
you can also download the resulting file and use it on
another server - you could do this the old fashion way by
 copying it on your local machine and then upload it to your
 new server and launch the previous command or if you have "scp":*/

scp output_file.out user@remote_ftp_path

The world searched with Google in 2010

Posted on December 17th, 2010 in life, people, web | Comments Off




via MG.

beatbox with google translate

Posted on December 5th, 2010 in fun, web | 2 Comments »

1) Go to Google Translate
2) Set it to translate from German to German
3) Copy + paste the following text into the translate box:
pv zk pv pv zk pv zk kz zk pv pv pv zk pv zk zk pzk pzk pvzkpkzvpvzk kkkkkk bsch
or
bch tz tz tz bsch tz tz bch tz tz bch tz bsch tz tz tz bch tz tz tz bsch tz tz bch tz tz bch tz bsch
4) Click “listen”.
The beatbox tool is one of the things that Google didn’t have… now.. there you go!

how to replace repeated spaces in php

Posted on July 30th, 2010 in programming, web | 2 Comments »


function replace_repeated_spaces($string)
{
	// tabs, new lines and carriages are also replaced
$string = ereg_replace("[ \t\n\r]+", " ", $string);
return $string;
}

$string = "This
   is
a   dummy
text. ";
$new_string = replace_repeated_spaces($string);
// Outputs: This is a dummy text

ereg_replace is almost deprecated from PHP, better to use preg_replace instead. And even when you will change to preg_replace this code will be 5 times slower than
while (strpos(‘ ‘, $string) !== false) $string = str_replace(‘ ‘, ‘ ‘, $string);
So the main idea is: “When you can write your code in a couple of lines without regular expressions – do it.

iPhone4 vs HTC Evo

Posted on July 26th, 2010 in tech, web | Comments Off

google maps markers z-index

Posted on July 13th, 2010 in javascript, web | Comments Off

The z-index of the Google Maps markers is set on their creation so they always come out on top of each other – first one under the second, second under the third and so on. So if you like to highlight a particular marker indifferent of the creation order you need to create a function that will set the z- index of that specific marker to the highest of all markers so that it will come on top.
A marker’s z- index can be obtained by calling this function: GOverlay.getZIndex(marker.getPoint().lat())
This function expects 2 parameters: the first one is the marker and the second apears to be always “undefined”;
Attach your function to the marker by using the GMarkerOption {zIndexProcess:myFunction} – this function only gets evaluated when the marker is addOverlay()ed.

see a working example here..

javascript – dinamically change element “onclick” event

Posted on July 12th, 2010 in web | Comments Off

  var el = document.getElementById('foo');
el.onclick = newFunction;//Must be a reference to a function,not a function call.

function newFunction() {
 alert("called from new function!")
  return false;
}

impressive 3d work

Posted on November 3rd, 2009 in people, web | 1 Comment »


by am3d.it

alternative Coca Cola Zero commercial

Posted on August 31st, 2009 in fun, web | Comments Off

wanna watch ? buy a ticket!