This repo's location has changed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//return an array of objects according to key, value, or key and value matching | |
function getObjects(obj, key, val) { | |
var objects = []; | |
for (var i in obj) { | |
if (!obj.hasOwnProperty(i)) continue; | |
if (typeof obj[i] == 'object') { | |
objects = objects.concat(getObjects(obj[i], key, val)); | |
} else | |
//if key matches and value matches or if key matches and value is not passed (eliminating the case where key matches but passed value does not) | |
if (i == key && obj[i] == val || i == key && val == '') { // |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// GeoChart from https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart | |
// Try out by pasting code into: https://code.google.com/apis/ajax/playground/?type=visualization#geo_chart | |
function drawVisualization() { | |
var data = google.visualization.arrayToDataTable([ | |
['State', 'Foo Factor'], | |
['US-IL', 200], | |
['US-IN', 300], | |
['US-IA', 20], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Bad Word Filter</title> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script language="JavaScript" type="text/javascript"> | |
$(function(){ | |
$filterBox = $('#filterBox'); | |
$frmWords = $('#frmWords'); | |
$thewords = $('#thewords'); | |
$buttonCheck = $('#buttonCheck').click(function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// using SendGrid's PHP Library | |
// https://github.com/sendgrid/sendgrid-php | |
<?php | |
// If you are using Composer | |
require 'vendor/autoload.php'; | |
// If you are not using Composer (recommended) | |
// require("path/to/sendgrid-php/sendgrid-php.php"); | |
$from = new SendGrid\Email("Example User", "[email protected]"); |
This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.
- Set
-moz-appearance
tonone
. This will "reset" the styling of the element; - Set
text-indent
to0.01px
. This will "push" the text a tiny bit[1] to the right;
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<label for="myAnnouncement">Announcement</label> | |
<input id="myAnnouncement" type="text" /><br /> | |
<input type="button" value="Post Announcement" /> | |
</div> | |
<script type="text/javascript" > | |
// Use this to delay execution until the file sp.js has loaded. Also a good way to keep your context free of globals. | |
ExecuteOrDelayUntilScriptLoaded(function() { | |
// get announcement text |