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
<!--- | |
An example of writing REST web services in ColdFusion, without a framework (and why you should use one). | |
Provided as an example of a simple implementation, but should not be considered a best practice or something | |
I am promoting. Not thoroughly tested, not very maintainable, not even that reusable. | |
---> | |
<cfsetting enablecfoutputonly="true" showdebugoutput="false" /> | |
<cffunction name="StructKeyRequire" output="false"> | |
<cfargument name="s" type="struct" /> |
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
#include <SPI.h> | |
#include <WiFly.h> | |
char* ssid = "my$ssid$lol"; //enter your SSID here, replace all spaces with $ (ex. "my ssid lol" = "my$ssid$lol") | |
char* pass = "abc123"; //enter your wifi passphrase here | |
char* serverAddress = "1.2.3.4"; //enter the IP of your node.js server | |
int serverPort = 1337; //enter the port your node.js server is running on, by default it is 1337 | |
WiFlyClient client; |
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
<!-- http://benalman.com/projects/jquery-urlinternal-plugin/ --> | |
<script src='<?php bloginfo('template_directory'); ?>/js/jquery.ba-urlinternal.min.js'></script> | |
<!-- http://www.asual.com/jquery/address/ --> | |
<script src='<?php bloginfo('template_directory'); ?>/js/jquery.address-1.3.min.js'></script> | |
<script> | |
// Original JavaScript by Chris Coyier | |
// Updated October 2010 by Stewart Heckenberg & Chris Coyier |
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
CREATE TABLE IF NOT EXISTS `country` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`iso` char(2) NOT NULL, | |
`name` varchar(80) NOT NULL, | |
`nicename` varchar(80) NOT NULL, | |
`iso3` char(3) DEFAULT NULL, | |
`numcode` smallint(6) DEFAULT NULL, | |
`phonecode` int(5) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
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 class="wrapper"> | |
<h1>Facebook Loader in pure CSS</h1> | |
<div id="loader"></div> | |
<a href="https://s-static.ak.facebook.com/rsrc.php/v2/yk/r/LOOn0JtHNzb.gif">Original *.gif</a> | |
</div> |
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
class CreateBase < ActiveRecord::Migration | |
def up | |
create_table :games do |t| | |
t.integer :home_team_id, :null => false | |
t.integer :away_team_id, :null => false | |
t.integer :score, :null => false | |
end | |
create_table :teams do |t| | |
t.string :team_name, :null => false |
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 com.shashank.sharjahinternationalairport; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.media.MediaPlayer; | |
import android.os.Bundle; | |
public class Splash extends Activity{ | |
MediaPlayer splashSound; | |
@Override |
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
/* | |
* Copyright 2013 Evelio Tarazona Cáceres <evelio@evelio.info> | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
import org.json.JSONArray; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import java.util.*; | |
public class JsonHelper { | |
public static Object toJSON(Object object) throws JSONException { | |
if (object instanceof Map) { | |
JSONObject json = new JSONObject(); |
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
public class CountingFileRequestBody extends RequestBody { | |
private static final int SEGMENT_SIZE = 2048; // okio.Segment.SIZE | |
private final File file; | |
private final ProgressListener listener; | |
private final String contentType; | |
public CountingFileRequestBody(File file, String contentType, ProgressListener listener) { | |
this.file = file; |
OlderNewer