So after I spend a bunch of time trying to make it work.. here’s how for future reference and in case anyone else is struggling..
Archive for Code
Needing to work in a collaborative android project would require some version control and project sharing. Most of the time this happens within a local network at the office. Git offers various methods to do this, being using github the most common one, but if you feel like you don’t want to share your work with the wold, or you don’t want to be paying for a private membership, or simply the online thing is not the right approach, or you like instant pulling and pushing, or you don’t want a headache messing with SSH and windows services, you could do this within your already working network, skipping the need of any service setup or online service registration.
Lets say your website page is already loaded but you need to poll your database for some extra info, or to check for an update on something. The way to go is using Ajax. jQuery makes working with Ajax really easy and even better if you return your data using Json.
Here is some short code to setup Google Maps on your site pretty fast. The map markers are grabbed through ajax using jquery from a php file. The example php provided contains an array of markets based on the ajax query. This, of course, should be changed with your own.
So your website has now thousands of visitors? Well, congratulations… but your system processor is probably on a huge load if you haven’t added any caching options. Here is PHP to the rescue.