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.etrade.neo.util; | |
import java.io.StringWriter; | |
public class TestWriter { | |
public static void main(String[] args) { | |
String source = "Now is the time for all good men\\n" | |
+ " to come to the aid of their country\\n" | |
+ " and pay their due taxes."; |
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 threading, os, re, sqlite3, sys | |
from subprocess import * | |
class GrabUrl(threading.Thread): | |
def __init__(self, arg0): | |
threading.Thread.__init__(self) | |
self.host=arg0 | |
def run(self): | |
print "Getting " + self.host | |
arr=['wget', self.host] |
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 threading | |
import urllib2 | |
import time, random | |
class GrabUrl(threading.Thread): | |
def __init__(self, arg0): | |
threading.Thread.__init__(self) | |
self.host=arg0 | |
def run(self): | |
k=random.randint(10,20) |
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
1> {ok, JS}=js_driver:new(). | |
{ok,#Port<0.1611>} | |
2> js:define(JS, <<"var hello=function(){return 'hello world';}">>). | |
ok | |
3> js:call(JS, <<"hello">>, []). | |
{ok,<<"hello world">>} | |
4> js:define(JS, <<"var kelly=function(){ return {\"hello\":\"world\"};}">>). | |
ok | |
5> js:call(JS, <<"kelly">>, []). | |
{ok,{struct,[{<<"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
Dispatch=[ | |
{'_', [ | |
{[<<"static">>, '...'], cowboy_http_static, | |
[{directory, "./priv"}, | |
{mimetypes, [ | |
{<<".css">>, [<<"text/css">>]}, | |
{<<".js">>, [<<"application/javascript">>]}, | |
{<<".html">>, [<<"text/html">>]} | |
]} | |
]}, |
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(neo_handler_multipart). | |
-behaviour(cowboy_http_handler). | |
-export([init/3, handle/2, terminate/2]). | |
init({_Transport, http}, Req, []) -> | |
{ok, Req, {}}. | |
handle(Req, State) -> | |
{Result, Req2} = acc_multipart(Req), |
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
This is my erlang code | |
-module(bohemian). | |
-export([start/0]). | |
start()-> | |
ok = application:start(crypto), | |
ok = application:start(ranch), | |
ok = application:start(cowboy), | |
ok = application:start(bohemian). |
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
K={'hello10':'world10', 'hello9':'world9', 'hello1':'world1'} | |
K.keys().sort() | |
Str = '' | |
for i in K.keys(): | |
Str += i + '=' + K[i] + '&' | |
print Str[:-1] |
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></head> | |
<body> | |
<div id="leaf"></div> | |
<div id="low"></div> | |
<input type="button" id="query" value="query"></button> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script type="text/javascript"> | |
var discovery=function(){ | |
}; |
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(divi). | |
-export([start/2]). | |
start(A, B)-> | |
ds(A, B, 0). | |
OlderNewer