This code how to replace the traditional radio-buttons, for custom images. You can do the same with checkboxes.
This file contains hidden or 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 System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Net.Http; | |
namespace PackageUploader.Azure | |
{ | |
public class AzureStorageApi | |
{ | |
public void UploadFile(String fullFilePath, String blobSasUri, Dictionary<String, String> metadata = null) |
This file contains hidden or 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 System.IO; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Converters; | |
public static class JsonExtensions | |
{ | |
public static string ToJson(this object entity) | |
{ | |
var serializer = new JsonSerializer(); | |
serializer.Converters.Add(new StringEnumConverter()); |
This file contains hidden or 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
/* | |
Cookies can only store strings. Therefore, you need to convert your array of objects into a JSON string. | |
If you have the JSON library, you can simply use JSON.stringify(people) and store that in the cookie, | |
then use $.parseJSON(people) to un-stringify it. | |
In the end, your code would look like: | |
*/ | |
var people = [ | |
{ 'name' : 'Abel', 'age' : 1 }, | |
{ 'name' : 'Bella', 'age' : 2 }, |
This file contains hidden or 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"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.cards.notification"> | |
<uses-sdk | |
android:minSdkVersion="17" | |
android:targetSdkVersion="17" /> | |
<application | |
android:allowBackup="true" |
This file contains hidden or 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 System.IO; | |
using System.Web; | |
using System.Web.UI; | |
using System.Web.UI.WebControls; | |
/// <summary> | |
/// Exports a GridView with its contents to a CSV file | |
/// </summary> | |
public class GridViewExportUtil | |
{ |
This file contains hidden or 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> | |
<style> | |
body { | |
background-color: #fff; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
background-size: cover; | |
-webkit-animation-duration: 10s; | |
-moz-animation-duration: 10s; |
This file contains hidden or 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
.twitter-typeahead .tt-query, | |
.twitter-typeahead .tt-hint { | |
margin-bottom: 0; | |
} | |
.tt-hint { | |
display: block; | |
width: 100%; | |
height: 38px; | |
padding: 8px 12px; | |
font-size: 14px; |
This file contains hidden or 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> | |
<html> | |
<head></head> | |
<body onLoad="init();"> | |
<p>demo</p> | |
<canvas id="demoCanvas" width="640" height="480"> | |
alternate crap for junk ass users | |
</canvas> |
This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.
Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.
See a demo at http://stuff.dan.cx/js/filepicker/google/