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
alert('boo') |
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 Singleton | |
{ | |
private static $_instance; | |
private function __construct() {} | |
private function __clone() {} | |
public static function getInstance() | |
{ |
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 Hello { | |
public static void main(String args[]) { | |
System.out.print("Hello, world"); | |
} | |
} |
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
#!/bin/bash | |
function print_info { | |
echo -n -e '\e[1;36m' | |
echo -n $1 | |
echo -e '\e[0m' | |
} | |
function print_warn { |
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
declare function fetch-tweets($keyword as xs:string) as node()* { | |
let $uri := "http://search.twitter.com/search.atom?geocode=52.1583,4.49306,200km&rpp=100&q=XXX" | |
return (: TODO replace XXX by keyword, fetch real entrys with doc() from uri :) | |
<entry><title>oops, I did it again</title><uri>http://twitter.com/britneyspears</uri><location>Hollywood</location></entry> | |
}; | |
declare function get-geo($placename as xs:string) as xs:string { | |
let $uri := (:replace XXX by placename :) | |
"http://where.yahooapis.com/v1/places.q("XXX");count=1?format=xml&appid=oWI.U034EMJO6CnsA4vFEvJ5oYEKsoD0qLIRfcoEKOLLTqv9bh6jBHZn9GhdRA--", | |
$centroid := |
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
module namespace tweetmap = "tweetmap"; | |
declare function tweetmap:fetch-tweets($keyword as xs:string) as node()* { | |
let $baseuri := "http://search.twitter.com/search.atom?geocode=52.1583,4.49306,200km&rpp=100&q=" | |
let $uri := concat($baseuri, $keyword) | |
return doc($uri)//*:feed//*:entry | |
}; | |
declare function tweetmap:get-geo($placename as xs:string) as xs:string { |
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
<?php | |
protected function genAccessToken() { | |
return md5(base64_encode(pack('N6', mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand(), uniqid()))); | |
} |
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
<?php | |
namespace Insolis\Form; | |
use Symfony\Component\Form\AbstractType; | |
use Symfony\Component\Form\FormBuilderInterface; | |
use Symfony\Component\Validator\Constraints as Assert; | |
class SzovegType extends AbstractType | |
{ |
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
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html;charset=utf-8"> | |
<title>d3.js - Top 10 used words</title> | |
<script type="text/javascript" src="http://mbostock.github.io/d3/d3.v2.js?2.9.5"></script> | |
<style type="text/css"> | |
.chart div { | |
font: 10px sans-serif; | |
background-color: steelblue; | |
text-align: right; |
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
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> | |
<div id="map" style="width:100%px;height:400px;" class="google_map full"></div> | |
<script type="text/javascript"> | |
var latlng = new google.maps.LatLng(0, 0); | |
var myOptions = { | |
zoom: 16, | |
center: latlng, | |
scrollwheel: true, | |
scaleControl: false, | |
disableDefaultUI: false, |
OlderNewer