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
if (!Modernizr.input.placeholder){ | |
$('input[type=text]').each( function(){ | |
$(this).attr('value', $(this).attr('placeholder') ) | |
.focus(function(){ | |
var ph = $(this).attr('value'); | |
$(this).attr('value','') | |
.blur( function(){ | |
if($(this).attr('value').length < 1 ){ | |
$(this).attr('value', ph); | |
} |
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
<!DOCTYPE html> | |
<!-- Comes from http://zeeshanakhter.com/2012/03/15/find-out-your-visitors-position-using-html5-geolocation/ --> | |
<html> | |
<head> | |
<title>HTML5 Geolocation</title> | |
<script src="http://maps.googleapis.com/maps/api/js?sensor=false"></script> | |
<script> | |
// Integration with google maps | |
function loadMap(lat, lng) { | |
var latlng = new google.maps.LatLng(lat, lng); |
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
/* | |
* Anatoly Mironov http://sharepointkunskap.wordpress.com, http://www.bool.se | |
* Use this script to add your js files to your page in the console dynamically | |
* Don't use it in the production, just for testing | |
*/ | |
function addScript(url) { | |
var script = document.createElement("script"); | |
script.setAttribute("type","text/javascript"); |
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
//Conditionally load jQuery | |
//inspired by http://www.smashingmagazine.com/2010/05/23/make-your-own-bookmarklets-with-jquery/ | |
function myOnLoadEvent() { | |
jQuery(document).ready(function($) { | |
alert('your code here'); | |
}); | |
} |
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
function adjustHeight() { | |
if (window.parent && window.parent.jQuery) { | |
var content = jQuery("#content"); | |
if (content) { | |
var height = content.height() + 1; | |
window.parent.jQuery("#fancybox-content").height(height); | |
} | |
} | |
} | |
jQuery(window).load(adjustHeight); |
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
package spauth; | |
import java.io.*; | |
import java.net.*; | |
import javax.xml.parsers.*; | |
import javax.xml.xpath.*; | |
import org.w3c.dom.Document; | |
import org.xml.sax.*; | |
public class LoginManager { |
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
/** | |
* @author Anatoly Mironov (mirontoli) | |
* http://sharepointkunskap.wordpress.com | |
* http://www.bool.se | |
* | |
* http://stackoverflow.com/questions/3605495/generate-a-list-of-localized-language-names-with-links-to-google-translate/14800384#14800384 | |
* http://stackoverflow.com/questions/10997128/language-name-from-iso-639-1-code-in-javascript/14800499#14800499 | |
* | |
* using Phil Teare's answer on stackoverflow | |
* http://stackoverflow.com/questions/3217492/list-of-language-codes-in-yaml-or-json/4900304#4900304 |
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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<appSettings> | |
<add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" /> | |
</appSettings> | |
<system.web> | |
<compilation debug="true" /> | |
<authentication mode="Windows"/> | |
<authorization> | |
<allow users="CONTOSO\lightning"/> |
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
var autocompleteApp = angular.module("autocompleteApp"); | |
var autocompleteController = function($scope) { | |
//http://jqueryui.com/autocomplete/ | |
var availableTags = [ | |
"ActionScript", | |
"AppleScript", | |
"Asp", | |
"BASIC", | |
"C", | |
"C++", |
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
<style type="text/css"> | |
/*************************************************** | |
Marvelous Formula (MF) WPTodo | |
******************************************************/ | |
#todo-wp { | |
max-height: 400px; | |
/* todo overflow: auto or pagination */ | |
overflow-y: auto; | |
} | |
#todo-wp .header { |
OlderNewer