Skip to content

Instantly share code, notes, and snippets.

View mapreal19-snip's full-sized avatar

mapreal19-snip

View GitHub Profile
@mapreal19-snip
mapreal19-snip / AlertDialog.java
Created April 16, 2013 15:47
ANDROID: AlertDialog
AlertDialog.Builder alertDialog = new AlertDialog.Builder(this);
alertDialog.setTitle("New Location");
alertDialog.setMessage("Is this the new location?");
alertDialog.setPositiveButton ("Yes", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
returnResult();
}
});
alertDialog.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialogo1, int id) {
@mapreal19-snip
mapreal19-snip / gist:5086244
Created March 4, 2013 22:24
JAVASCRIPT: Get form values
var values = {};
$.each($('.form-horizontal').serializeArray(), function(i, field) {
values[field.name] = field.value;
}); values
@mapreal19-snip
mapreal19-snip / gist:4707640
Last active December 12, 2015 03:29
HTML: Starting template
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<link rel="stylesheet" type="text/css" href="">
<script src="//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<title></title>
</head>
<body>
</body>