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
AsyncHttpClient client = new AsyncHttpClient(); | |
JSONObject jsonParams = new JSONObject(); | |
timestamp = String.valueOf(calendar.getTimeInMillis()); | |
jsonParams.put("body", postBody); | |
jsonParams.put("price", postPrice); | |
jsonParams.put("location", location); | |
jsonParams.put("user", bargain_user.getName()); | |
jsonParams.put("user_id", bargain_user.getUser_ID()); | |
jsonParams.put("image", base64Image); | |
jsonParams.put("store_id", storeID); |
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 Runner { | |
/** | |
* @param args | |
*/ | |
public static void main(String[] args) { | |
CassandraDAO c = new CassandraDAO(); | |
ResultSet result = c.findByCQL("Select * from user_profiles"); |
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.example.cassandra; | |
import com.datastax.driver.core.Cluster; | |
import com.datastax.driver.core.ConsistencyLevel; | |
import com.datastax.driver.core.Query; | |
import com.datastax.driver.core.ResultSet; | |
import com.datastax.driver.core.Session; | |
import com.datastax.driver.core.SimpleStatement; | |
import com.datastax.driver.core.exceptions.NoHostAvailableException; |
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
Rails Active record | |
create new project | |
$rails new active_record | |
create model | |
$rails g model Manufacturer name:string | |
generate the game model | |
$rails g model Game name:string manufacturer:references |
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
<a href="http://twitter.com/mybloggertricks" class="twitter-follow-button">Follow @mybloggertricks</a> | |
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script> |
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
(defun call-random (m n) | |
"(m n) | |
Call (random n) m times. Used by seed-random." | |
(do ((i 0 (1+ i))) | |
((= i m) nil) | |
(if (zerop n) | |
(random 1) | |
(random n)))) | |
;;;file: r.cl |
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
Under review as a conference paper at ICLR 2015 | |
MOVE EVALUATION IN GO USING DEEP | |
CONVOLUTIONAL NEURAL NETWORKS | |
Chris J. Maddison | |
University of Toronto |
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
static boolean isAnagram(String s1, String s2) | |
{ | |
//convert string to lower case | |
s1 = s1.toLowerCase(); | |
s2 = s2.toLowerCase(); | |
if(s1.length() != s2.length()) | |
{ | |
return 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
{ | |
"header": [ | |
{ | |
"host": "lpas" | |
}, | |
{ | |
"connection": "close" | |
}, | |
{ | |
"tesla-version": "2" |
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
>>> list(vertices) | |
[<Vertex: http://localhost:8182/graphs/graph/vertices/12>, <Vertex:http://localhost:8182/graphs/graph/vertices/40008>] |