Skip to content

Instantly share code, notes, and snippets.

View timbuchwaldt's full-sized avatar

Tim Buchwaldt timbuchwaldt

View GitHub Profile
#include <stdio.h>
#include <math.h>
int laenge(int *A) {
int i;
int j;
for(i=49, j=0;i>=0;i=i-1) {
if (A[i]!=0) break;
else j=i;
}
@timbuchwaldt
timbuchwaldt / file.rb
Created December 28, 2009 12:51 — forked from samsm/file.rb
Loads the latest 1500 Tweets containing couchdb and saves them to the db
# 1. Install CouchDBX. Fire it up. (OS X only.)
# 2. sudo gem install couchrest json
# 3. Think up a nice keyword.
# 4. irb
require 'couchrest'
require 'open-uri'
require 'json'
database_name = 'twitter-test'
@db = CouchRest.database!("http://127.0.0.1:5984/#{database_name}")