No map is an island Introducing a connected JavaScript Maps API experience

Cross-posted from the Google Geo Developers blog

Our digital lives are increasingly connected. We research on our laptops, look up directions on our phones and even navigate with our watches. And by creating maps unique to each user and offering features such as saved places, Google Maps has been making it easier to continue these tasks as we move from device to device.

However, although maps embedded from Google Maps are now built uniquely for every Google user, most of the now two million active sites and apps using the Maps APIs are still islands. When I look for a place to eat on Zagat, I can’t see how far away it is from work. When I look at a travel map in the New York Times, I can’t save those places in order to navigate to them later.

Today we’re taking a step towards connecting these two million sites and apps by introducing a signed-in JavaScript Maps API experience and a feature called attributed save. To help illustrate, we’ve partnered with the New York Times to bring this experience to their 36 hours travel column.

A connected JavaScript Maps API

When you add &signed_in=true to the Google Maps JavaScript API source url, your end users will have the option to sign into the map with their Google account. When they do so, your users will receive a map built for them, in the context of your app. Their saved places — including home and work addresses (if set by the end user) as well as other relevant places — will appear automatically on their map, providing a layer of context that anchors your content and makes it stand out even more.

Attributed save

Once users are signed into the Google Maps in your app, we can together create an integrated experience between your map content and Google Maps. With attributed save, signed-in users can save places from your app to be accessed later, with attribution and linkbacks, on Google Maps for the web, Android and iOS.

What’s more, you can also enable deep links into your mobile applications. For instance, users can save a place from your desktop app (such as Zagat.com), open up the place on Google Maps on their Android device, and deep link directly into your Android app.

Enabling attributed save is easy — just specify your app name, a link and a place search string or place ID when creating a marker and info window. Or use our SaveWidget to enable attributed save in your own custom info window.

In addition, we’re also launching attributed save across all embedded maps today. Attribution and linkback parameter will be inferred automatically from the domain and referrer of the host site, so if you’re using our embedded maps, you don’t need to do anything! If you’re using the Google Maps Embed API, you may customize the source and link back parameters yourself.

One final point: we’ve stated in the past that the JavaScript Maps API is cookieless if loaded from maps.googleapis.com. As of today, to enable the signed in maps experience on sites across the web, the signed-in version of the JavaScript Maps API now does rely on cookies to detect the end user’s signed-in state. Please review our documentation for further details.

That’s all for now. Go try it out. And remember, no map is an island, entire of itself...

Read More..

an add on for this website failed to run Adsense Adchoice Ad sense Ad choice

Internet Explorer 8 or Internet Explorer 9 show "An add on for this website failed to run" across the top of a web page, then tells you to check "Security Settings".

You check the security settings and try all combinations, but the darn message still appears!

IE8 and IE9 are very poor browsers. Microsoft technicians drink coffee all day long and generally dont know what the public wants, or ignores users complaints.

There is a simple solution that Microsoft clearly doesnt know about. Perhaps they do know and want to leave customers in a state of frustration.


SOLUTION

Go to "Tools", "Internet Options", "Security", "Restricted sites", "sites".

Cursor down until you find "doubleclick.net".

Remove it. Click "Close". Click "Okay".


It is done. You will have no more problems.
Read More..

How to Install an Internal Hard Drive on a Mac G3

Mac G3 is a series of personal computers produced by Apple in late 1997. It was the first Macintosh to use the PowerPC G3 microprocessor. Installing an internal hard drive in this computer is no different from installing a new hard drive in any tower unit. Once your remove the cover, just locate the hard drive and replace the old with the new. The process is fast and easy.

Instructions

Things Youll Need:

  • Anti-static wrist band
  • Screwdriver
  1. Step 1

    Turn off the computer and unplug it from the electrical outlet.

  2. Step 2

    Locate the green button on the mini tower. It will be on one of the side panels on the tower. Press the button and slide the cover off the computer.

  3. Step 3

    Touch your hands on any bare metal surface and put on an anti-static wrist strap. This will protect your computer from static discharge.

  4. Step 4

    Turn the computer so that the power supply is facing you and to the back. Look to the right of the power supply; there you will find the mounting bracket for the hard drive.

  5. Step 5

    Locate the two screws that secure the bracket to the case of the computer and slide the bracket out.

  6. Step 6

    Disconnect the cables going into the old hard drive. You will find a cable that connects the drive to the circuit board and one that connects the power source to the hard drive. Remove the four screws that attach the hard drive to the mount.

  7. Step 7

    Secure the new hard drive into the bracket mount with the screws. Plug the cables into the new hard drive.

  8. Step 8

    Slide the bracket back into place and reinstall the two screws to secure it.

  9. Step 9

    Close the cover on the computer and plug the power cord back into the outlet.

  10. Step 10

    Turn the computer on and insert the setup CD that came with your hard drive.

  11. Step 11

    Follow the instructions provided by the manufacturer for hard drive setup.

Read More..

How Bitwise Operators are Used an Example Program

Well, one-by-one we’ve discussed each of the Bitwise
Operator
. Starting from Operation
on Bits and Bitwise Operators
, we moved on to Right/Left
Bit Shift Operators
then discussed Decimal
Number to Binary Conversion Program
. and at last Ones
Complement and XOR Operators
. After having so much theoretical it’s
time now for a nice Example Program, which is the topic of today’s post.
The code here is basically to show how these bitwise operator are used rather
than what they are used for.



// Example Program to demonstrate how
// Ones Complement (~) and XOR (^)
// Opeartors are used.
#include<stdio.h>

// prototype
void showbits(short int);

// defined
void showbits(short int dec_num)
{
short int loop, bit, and_mask;

for(loop=15; loop>=0; loop--)
{
and_mask=1<<loop;
bit=dec_num&and_mask;


if(bit==0) printf("0");
else printf("1");
}
}

void main()
{
// declare three short ints
// for storing user inputs
// and results
short int a,b,res;
int ch;

while(ch!=7)
{
// show main menu
printf(" Main Menu
"
);
printf(" ---------
"
);
printf("1. Perform Left Bit Shift Operation
"
);
printf("2. Perform Right Bit Shift Operation
"
);
printf("3. Perform AND Operation
"
);
printf("4. Perform OR Operation
"
);
printf("5. Perform Ones Complement Operation
"
);
printf("6. Perform XOR Operation
"
);
printf("7. Quit
"
);
scanf("%d",&ch);

switch(ch)
{
case 1:
// take input
printf("

Enter a decimal number: "
);
scanf("%d",&a);
printf("
Enter number of places to shift bit: "
);
scanf("%d",&b);


printf("

Entered Number: "
);
showbits(a);
printf(" (decimal %d)",a);

// perform left bit shift
// operation
res=a<<b;

// show the formatted output
printf("
Left Shifted : "
);
showbits(res);
printf(" (decimal %d)

"
,res);

break;

case 2:
// take input
printf("

Enter a decimal number: "
);
scanf("%d",&a);
printf("
Enter number of places to shift bit: "
);
scanf("%d",&b);


printf("

Entered Number: "
);
showbits(a);
printf(" (decimal %d)",a);

// perform right bit shift
// operation
res=a>>b;

// show the formatted output
printf("
Right Shifted : "
);
showbits(res);
printf(" (decimal %d)

"
,res);

break;

case 3:
printf("

Enter two decimal number: "
);
scanf("%d",&a);
scanf("%d",&b);

printf("

Entered Number 1: "
);
showbits(a);
printf(" (decimal %d)",a);
printf("
Entered Number 2: "
);
showbits(b);
printf(" (decimal %d)",b);

// perform AND operation on two
// variables a and b
res=a&b;

printf("
ANDed : "
);
showbits(res);
printf(" (decimal %d)

"
,res);

break;

case 4:
printf("

Enter two decimal number: "
);
scanf("%d",&a);
scanf("%d",&b);

printf("

Entered Number 1: "
);
showbits(a);
printf(" (decimal %d)",a);
printf("
Entered Number 2: "
);
showbits(b);
printf(" (decimal %d)",b);

// perform OR operation on two
// variables a and b
res=a|b;

printf("
ORed : "
);
showbits(res);
printf(" (decimal %d)

"
,res);

break;

case 5:
// take input
printf("

Enter a decimal number: "
);
scanf("%d",&a);

printf("

Entered Number: "
);
showbits(a);
printf(" (decimal %d)",a);

// perform ones complement
// operation
res=~a;

// show the formatted output
printf("
~ed : "
);
showbits(res);
printf(" (decimal %d)

"
,res);

break;

case 6:
printf("

Enter two decimal number: "
);
scanf("%d",&a);
scanf("%d",&b);

printf("

Entered Number 1: "
);
showbits(a);
printf(" (decimal %d)",a);
printf("
Entered Number 2: "
);
showbits(b);
printf(" (decimal %d)",b);

// perform XOR operation on two
// variables a and b
res=a^b;

printf("
XORed : "
);
showbits(res);
printf(" (decimal %d)

"
,res);

break;

}
}
}


Test Run:


   Main Menu
---------
1. Perform Left Bit Shift Operation
2. Perform Right Bit Shift Operation
3. Perform AND Operation
4. Perform OR Operation
5. Perform Ones Complement Operation
6. Perform XOR Operation
7. Quit
1


Enter a decimal number: 3476
Enter number of places to shift bit: 3


Entered Number: 0000110110010100 (decimal 3476)
Left Shifted : 0110110010100000 (decimal 27808)

   Main Menu
---------
1. Perform Left Bit Shift Operation
2. Perform Right Bit Shift Operation
3. Perform AND Operation
4. Perform OR Operation
5. Perform Ones Complement Operation
6. Perform XOR Operation
7. Quit
2


Enter a decimal number: 543
Enter number of places to shift bit: 5


Entered Number: 0000001000011111 (decimal 543)
Right Shifted : 0000000000010000 (decimal 16)

   Main Menu
---------
1. Perform Left Bit Shift Operation
2. Perform Right Bit Shift Operation
3. Perform AND Operation
4. Perform OR Operation
5. Perform Ones Complement Operation
6. Perform XOR Operation
7. Quit
7
Press any key to continue...

Related Articles:


Read More..

An Advanced Course in Lying

I was at a theme park the other day, and I decided to test some interaction theories I have. I was riding a small ferris wheel and while it was unloading, I was bored. The thing can only unload a few cars at a time, and the rest of the riders spend quite a long time waiting. My two year old son sat next to me, also bored, so I reached out to a strut next to the ride bucket and pushed, causing us to swing. It wasnt too long before the ride attendant noticed the motion and shouted out.

Hey, why are you swinging? By which she meant that I was not allowed to swing my bucket.

I said, Hey, I really dont know. You know I think the people in the bucket above me did something to set me swinging. By which I meant that there was nothing she could do about it. There was nothing the people in the next bucket could do that would remotely affect my ride, much less start me swinging. Nothing. The idea had no credibility at all. The attendant knew it. I knew it. The people in the bucket above me knew it.

But I said it implacably, unhesitatingly. It was impossible to contradict me. As difficult as it is for most people to lie, it is even more difficult to challenge a lie put forward confidently, no matter how obvious the lie is. Often an obvious lie is more powerful than the truth, because the truth is reasonable. Truth can be challenged, where lies must simply be endured.
Read More..

Blog Archive

Powered by Blogger.