get your location and save in Mysql

https://forums.digitalpoint.com/threads/how-to-get-longitude-and-latitude-to-my-page-using-html5.1965305/



  1. <!DOCTYPE html>
  2. <html>
  3.   <head>
  4. <script type="text/javascript">
  5. function initGeolocation()
  6. {
  7.      if( navigator.geolocation )
  8.      {
  9.           // Call getCurrentPosition with success and failure callbacks
  10.           navigator.geolocation.getCurrentPosition( success, fail );
  11.      }
  12.      else
  13.      {
  14.           alert("Sorry, your browser does not support geolocation services.");
  15.      }
  16. }
  17.  
  18. function success(position)
  19. {
  20.  
  21. document.getElementById('long').value = position.coords.longitude;
  22. document.getElementById('lat').value = position.coords.latitude
  23. }
  24. function fail()
  25. {
  26.      // Could not obtain location
  27. }
  28.  
  29. </script>    
  30.   </head>
  31.  
  32. <body onLoad="initGeolocation();">
  33. <FORM NAME="rd" METHOD="POST" ACTION="index.html">
  34. <INPUT TYPE="text" NAME="long" ID="long" VALUE="">
  35. <INPUT TYPE="text" NAME="lat" ID="lat" VALUE="">
  36.   </body>
  37. </html>

Auto submit button

http://www.hotscripts.com/forums/javascript/24109-submit-form-automatically-not-submit-button.html

Eclipse Check for Updates issue

chown -R user:group to yourself at /usr/lib/eclipse

Install Ubuntun On MacBook!



UNetbootin (Automated, graphical approach)

UNetbootin for Mac OS X can be used to automate the process of extracting the Ubuntu ISO file to USB, and making the USB drive bootable. The resulting USB drive, however, can be booted on PCs only. If attempting to make a USB drive that can be booted from a Mac, follow the instructions below.

Manual Approach

We would encourage Mac users to download Ubuntu Desktop Edition by burning a CD for the time being. But if you would prefer to use a USB, please follow the instructions below.
Note: this procedure requires an .img file that you will be required to create from the .iso file you download.
TIP: Drag and Drop a file from Finder to Terminal to 'paste' the full path without typing and risking type errors.
  • Download the desired file
  • Open the Terminal (in /Applications/Utilities/ or query Terminal in Spotlight)
  • Convert the .iso file to .img using the convert option of hdiutil
    hdiutil convert /path/to/ubuntu.iso -format UDRW -o /path/to/target.img
  • Note: OS X tends to put the .dmg ending on the output file automatically.
  • Run
    diskutil list
    to get the current list of devices
  • Insert your flash media
  • Run
    diskutil list
    again and determine the device node assigned to your flash media (e.g. /dev/disk2)
  • Run
    diskutil unmountDisk /dev/diskN
    (replace N with the disk number from the last command; in the previous example, N would be 2)
    • If you see the error "Unmount of diskN failed: at least one volume could not be unmounted", start Disk Utility.app and unmount the volume (don't eject).
  • Execute
    sudo dd if=/path/to/downloaded.img of=/dev/diskN bs=1m
    (replace /path/to/downloaded.img with the path where the image file is located; for example, ./ubuntu.img or ./ubuntu.dmg).
  • Using /dev/rdisk instead of /dev/disk may be faster.
    • If you see the error dd: Invalid number '1m', you are using GNU dd. Use the same command but replace bs=1m with bs=1M.
    • If you see the error dd: /dev/diskN: Resource busy, make sure the disk is not in use. Start Disk Utility.app and unmount the volume (don't eject).
  • Run
    diskutil eject /dev/diskN
    and remove your flash media when the command completes
  • Restart your Mac and press alt while the Mac is restarting to choose the USB-Stick

MacBook Air 3,2

Please notice: While all of the info and above commands are executed properly on a MacBook Air 3,2 (that is the 2010 version 13" version of the Air) the end result will not produce a bootable USB device, at least not with the image for Ubuntu 10.10 64-bit. When booting of the USB device the following message or something similar will appear: "Missing operating system" and the process is auto-magically halted. 
To get the USB device (e.g. a USB stick) to show up at all in the boot menu you also may have to reboot/turn on/off the computer a couple of times and also resync the partition tables using rEFIt. After doing this the USB should then appear as a bootable device while holding in the alt orc key when you are rebooting the computer. Notice that both the computers built in bootloader and rEFIt will identify the USB device as a Windows device, but that's not a problem and expected. 
A workaround to the-usb-device-is-not-booting-problem is to:
  • Install rEFIt.
  • Create a bootable start disk using Ubuntu and a USB stick.
  • Create a separate partition on the Airs HD.
  • dd the whole USB stick to that partition.
  • Resync with rEFIt. Turn power off and on.
  • Select Pingo/Windows logo: Install should start. (Here you might want to press F6 to change parameters, e.g. use nomodeset)
Alternatively, burning a CD and installing via an external CD-drive will work fine on the Macbook Air 3,2.

Other procedure

We would encourage Mac users to download Ubuntu Desktop Edition by burning a CD for the time being. But if you would prefer to use a USB, please follow the instructions below. Note: this procedure requires an .img file that you will be required to create from the .iso file you download. TIP: Drag and Drop a file from Finder to Terminal to 'paste' the full path without typing and risking type errors.
  • Download the desired file
  • Open the Terminal (in /Applications/Utilities/ or query Terminal in Spotlight)
  • Convert the .iso file to .img using the convert option of hdiutil (e.g., hdiutil convert -format UDRW -o ~/path/to/target.img ~/path/to/ubuntu.iso)
Note: OS X tends to put the .dmg ending on the output file automatically.
  • Run diskutil list to get the current list of devices
  • Insert your flash media
  • Run diskutil list again and determine the device node assigned to your flash media (e.g., /dev/disk2)
  • Run diskutil unmountDisk /dev/diskN (replace N with the disk number from the last command; in the previous example, N would be2)
  • Execute sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m (replace /path/to/downloaded.img with the path where the image file is located; for example, ./ubuntu.img or ./ubuntu.dmg).
  • Using /dev/rdisk instead of /dev/disk may be faster.
  • If you see the error dd: Invalid number '1m', you are using GNU dd. Use the same command but replace bs=1m with bs=1M.
  • If you see the error dd: /dev/diskN: Resource busy, make sure the disk is not in use. Start the 'Disk Utility.app' and unmount (don't eject) the drive.
  • Run diskutil eject /dev/diskN and remove your flash media when the command completes
  • Restart your Mac and press Alt while the Mac is restarting to choose the USB-Stick
How to install Ubuntu on MacBook using USB Stick (last edited 2013-04-30 12:21:08 by waitingallday)

bootstrap-datetimepicker

Introduction

Simple date/time picker component based on the work of Stefan Petre, with contributions taken from Andrew Rowls and jdewit.

Demo

Default behavior in pt-BR, picks date/time with fast masked input typing (need only to type the numbers, the static part of the mask is inserted automatically if missing) or via the popup widget, which supports year, month, day, hour and minute views:

 
Code:
<div class="well">
  <div id="datetimepicker1" class="input-append date">
    <input data-format="dd/MM/yyyy hh:mm:ss" type="text"></input>
    <span class="add-on">
      <i data-time-icon="icon-time" data-date-icon="icon-calendar">
      </i>
    </span>
  </div>
</div>
<script type="text/javascript">
  $(function() {
    $('#datetimepicker1').datetimepicker({
      language: 'pt-BR'
    });
  });
</script>

Similar to above example, but in US date/hour format:

 
Code:
<div class="well">
  <div id="datetimepicker2" class="input-append">
    <input data-format="MM/dd/yyyy HH:mm:ss PP" type="text"></input>
    <span class="add-on">
      <i data-time-icon="icon-time" data-date-icon="icon-calendar">
      </i>
    </span>
  </div>
</div>
<script type="text/javascript">
  $(function() {
    $('#datetimepicker2').datetimepicker({
      language: 'en',
      pick12HourFormat: true
    });
  });
</script>

Disables date picker:

 
Code:
<div class="well">
  <div id="datetimepicker3" class="input-append">
    <input data-format="hh:mm:ss" type="text"></input>
    <span class="add-on">
      <i data-time-icon="icon-time" data-date-icon="icon-calendar">
      </i>
    </span>
  </div>
</div>
<script type="text/javascript">
  $(function() {
    $('#datetimepicker3').datetimepicker({
      pickDate: false
    });
  });
</script>

Disables time picker:

 
Code:
<div class="well">
  <div id="datetimepicker4" class="input-append">
    <input data-format="yyyy-MM-dd" type="text"></input>
    <span class="add-on">
      <i data-time-icon="icon-time" data-date-icon="icon-calendar">
      </i>
    </span>
  </div>
</div>
<script type="text/javascript">
  $(function() {
    $('#datetimepicker4').datetimepicker({
      pickTime: false
    });
  });
</script>

API

The widget class provides 4 methods to manipulate dates: ‘getDate’/’setDate’ for working with UTC and ‘getLocalDate’/’setLocalDate’ for working with local dates:
// Considering you are on a GMT-3 timezone and the input contains '2000-01-17 10:00'
var localDate = picker.getLocalDate(); // localDate === 2000-01-17 07:00
var utcDate = picker.getDate(); // utcDate === 2000-01-17 10:00
//
picker.setLocalDate(new Date(1998, 10, 11, 4, 30)); // input === 1998-10-11 07:30
picker.setDate(new Date(Date.UTC(1998, 10, 11, 4, 30))); // input === 1998-10-11 04:30
The date value can be unset by passing ‘null’ to any of the ‘set’ methods or by erasing the input:
var picker = $('#datetimepicker'l).data('datetimepicker');
picker.setLocalDate(null);
// or
picker.setDate(null);
// or
input.val('');
input.change();
The only event exposed is ‘changeDate’, which will expose ‘date’ and ‘localDate’ properties on the event object:
el.on('changeDate', function(e) {
  console.log(e.date.toString());
  console.log(e.localDate.toString());
});

Options

These are the default options for initializing the widget:
$.fn.datetimepicker.defaults = {
  maskInput: true,           // disables the text input mask
  pickDate: true,            // disables the date picker
  pickTime: true,            // disables de time picker
  pick12HourFormat: false,   // enables the 12-hour format time picker
  pickSeconds: true,         // disables seconds in the time picker
  startDate: -Infinity,      // set a minimum date
  endDate: Infinity          // set a maximum date
};
Examples of using these options can be seen in the file test/specs.coffee.

Complete sample markup

Copy and paste the following code in a file(eg: test.html) and it should produce a widget similar to the first demo:
<!DOCTYPE HTML>
<html>
  <head>
    <link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" media="screen"
     href="http://tarruda.github.com/bootstrap-datetimepicker/assets/css/bootstrap-datetimepicker.min.css">
  </head>
  <body>
    <div id="datetimepicker" class="input-append date">
      <input type="text"></input>
      <span class="add-on">
        <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>
      </span>
    </div>
    <script type="text/javascript"
     src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.3/jquery.min.js">
    </script> 
    <script type="text/javascript"
     src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/js/bootstrap.min.js">
    </script>
    <script type="text/javascript"
     src="http://tarruda.github.com/bootstrap-datetimepicker/assets/js/bootstrap-datetimepicker.min.js">
    </script>
    <script type="text/javascript"
     src="http://tarruda.github.com/bootstrap-datetimepicker/assets/js/bootstrap-datetimepicker.pt-BR.js">
    </script>
    <script type="text/javascript">
      $('#datetimepicker').datetimepicker({
        format: 'dd/MM/yyyy hh:mm:ss',
        language: 'pt-BR'
      });
    </script>
  </body>
<html>

Development

If you want to contribute, please follow the settings in the .lvimrc file (2 space indentation).
To report bugs, ideally an automated test that reproduces the bug should be created in the ‘test/issues.coffee’ file(following the conventions of the tests already defined there) and submitted with a pull request.
To compile/minify you need to have make, node.js and npm on your $PATH
$ git clone git://github.com/tarruda/bootstrap-datetimepicker.git
$ cd bootstrap-datetimepicker
$ make deps
$ make build
To run the automated tests:
$ make test
It should download all dependencies needed for testing(phantomjs, jquery…)