Skip to content

Instantly share code, notes, and snippets.

RL url = new URL(args[0]);
URLConnection connection;
connection = url.openConnection();
URL url = new URL(args[0]);
URLConnection connection;
connection = url.openConnection();
try{
URL url = new URL("http://98.137.200.255/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22AAPL%22)&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys");
URLConnection connection;
connection = url.openConnection();
HttpURLConnection httpConnection = (HttpURLConnection) connection;
int responseCode = httpConnection.getResponseCode();
if(responseCode == HttpURLConnection.HTTP_OK) { // 200
System.out.println("------------TRUE----------");
InputStream in = httpConnection.getInputStream();
try{
URL url = new URL("http://98.137.200.255/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22AAPL%22)&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys");
URLConnection connection;
connection = url.openConnection();
HttpURLConnection httpConnection = (HttpURLConnection) connection;
int responseCode = httpConnection.getResponseCode();
if(responseCode == HttpURLConnection.HTTP_OK) { // 200
System.out.println("------------TRUE----------");
InputStream in = httpConnection.getInputStream();
try{
URL url = new URL("http://98.137.200.255/v1/public/yql?q=select%20*%20from%20yahoo.finance.quotes%20where%20symbol%20in%20(%22AAPL%22)&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys");
URLConnection connection;
connection = url.openConnection();
HttpURLConnection httpConnection = (HttpURLConnection) connection;
int responseCode = httpConnection.getResponseCode();
if(responseCode == HttpURLConnection.HTTP_OK) { // 200
System.out.println("------------TRUE----------");
InputStream in = httpConnection.getInputStream();
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<ul id="my-feature">
<li id="1">Go on </li>
<?php
global $db;
$db = new PDO('mysql:host=localhost;dbname=homeTaskList;charset=utf8', 'root', 'databasePHG912');
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
if(isset($_GET["action"])) {
switch ($_GET["action"]) {
case "getData" : getData();
"use strict";
var myGame = {
config : {
canvasId : "game-canvas",
ballSize : "20%",
firstBallColor : "black",
secondBallColor : "yellow",
backgroundColor : "#b0da82"
},
// Ealier
myGame.canvas.addEventListener("touchmove" ,myGame.onCanvasTouchMove ,false);
// Event Handler Works Bad!
onCanvasTouchMove : function (event) {
myGame.ctx.clearRect(0,0,myGame.config.canvasWidth, myGame.config.canvasHeight);
for(var i = 0; i < event.changedTouches.length; ++i) {
@pbrewczynski
pbrewczynski / gist:5986229
Created July 12, 2013 17:33
Why we would like to do something like this, if jQuery (jQ) is anyway Global ?
// Global module
var myModule = (function ( jQ, _ ) {
function privateMethod1(){
jQ(".container").html("test");
}
function privateMethod2(){
console.log( _.min([10, 5, 100, 2, 1000]) );
}