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 "unicode/ucsdet.h" | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <iconv.h> | |
#include <errno.h> | |
#define DEST_CHARSET "UTF-8" | |
#define UNKNOWN_CHARSET_DEFAULT "WINDOWS-1252" |
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
YUI({ filter:'raw' }).use('node-event-delegate', 'io-xdr', function (Y) { | |
var followList = Y.one('#onboard'); | |
followList.delegate('click', function(e) { | |
e.preventDefault(); | |
var url = this.ancestor('form').getAttribute('action'); | |
console.log(url); | |
var handleSuccess = function(id, o, a) { | |
console.log('success'); |
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
$ wget http://www.daviddlewis.com/resources/testcollections/reuters21578/reuters21578.tar.gz | |
$ mvn -e -q exec:java -Dexec.mainClass="org.apache.lucene.benchmark.utils.ExtractReuters" -Dexec.args="reuters/ reuters-extracted/" | |
$ hadoop dfs -put reuters-extracted/* reuters/ | |
$ bin/mahout seqdirectory -c UTF-8 -i reuters/ -o reuters-seqfiles | |
$ bin/mahout seq2sparse -i reuters-seqfiles/ -o reuters-vectors |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Digest::SHA qw(hmac_sha1_hex); | |
print hmac_sha1_hex("my data", "secret key") . "\n"; | |
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
sqlite> CREATE TABLE dogs (dog_id INTEGER PRIMARY KEY AUTOINCREMENT, dog_name VARCHAR(100), state CHAR(2)); | |
sqlite> CREATE INDEX dog on dogs(state); | |
sqlite> .indices dogs | |
dog | |
sqlite> EXPLAIN QUERY PLAN SELECT dog_name FROM dogs WHERE state='FL'; | |
0|0|TABLE leagues WITH INDEX league |