Skip to content

Instantly share code, notes, and snippets.

View eggie5's full-sized avatar
💭
Working on TensorFlow Ranking

Alex Egg eggie5

💭
Working on TensorFlow Ranking
View GitHub Profile
The PostgreSQL server failed to start. Please check the log output:
2011-02-18 15:30:44 PST LOG: database system was interrupted while in recovery at log time 2011-02-18 15:24:34 PST
2011-02-18 15:30:44 PST HINT: If this has occurred more than once some data might be corrupted and you might need to choose an earlier recovery target.
2011-02-18 15:30:44 PST LOG: entering standby mode
2011-02-18 15:30:44 PST WARNING: WAL was generated with wal_level=minimal, data may be missing
2011-02-18 15:30:44 PST HINT: This happens if you temporarily set wal_level=minimal without taking a new base backup.
2011-02-18 15:30:44 PST FATAL: hot standby is not possible because wal_level was not set to "hot_standby" on the master server
2011-02-18 15:30:44 PST HINT: Either set wal_level to "hot_standby" on the master, or turn off hot_standby here.
2011-02-18 15:30:44 PST LOG: startup process (PID 10182) exited with exit code 1
2011-02-18 15:30:44 PST LOG: aborting startup due to startup process failure
n=$1
psql -d okapi -c "delete from test"
echo $1
for (( i = 0 ; i <= n; i++ ))
do
psql -q -d okapi -c "INSERT INTO test VALUES ('inserting: $i')"
done
MediaPlayer mp = new MediaPlayer();
InputStream is= getResources().getAssets().open("video1.3gp");
FileDescriptor= fd=new FileDescriptor(is);
mp.setDataSource(fd);
mp.prepare();
@eggie5
eggie5 / jfloat.cpp
Created July 23, 2011 18:24
Can I cast jfloat [] to float []?
jsize len = env->GetArrayLength(float_vert_coords);
jfloat *jfloats;
jfloats = env->GetFloatArrayElements(vert_coords, NULL);
int i;
float cfloats [len];
for(i=0;i<len;i++)
{
@eggie5
eggie5 / json_deserializer.java
Created August 12, 2011 00:07
json_deserializer.java
Hashtable<String, List<Float>> buffers=new Hashtable<String, List<Float>>();
// load file
JsonFactory sJsonFactory = new JsonFactory();
JsonParser p = sJsonFactory.createJsonParser(model_io_stream);
List<Float> buffer;
p.nextToken();
while (p.nextToken() != JsonToken.END_OBJECT)
@eggie5
eggie5 / 3.rb
Created January 4, 2012 23:03
project euler #3
# The prime factors of 13195 are 5, 7, 13 and 29.
#
# What is the largest prime factor of the number 600851475143 ?
#checking for primality is faster than factoring primes
#Prime Factorization
# It is often useful to write a number in terms of its prime factorization,
# or as the product of its prime factors. For example, 56 can be written as 2×2×2×7
@eggie5
eggie5 / lab5p2.c
Created February 24, 2012 16:49
lab5p2
#include <hidef.h> /* common defines and macros */
#include <MC9S12C128.h> /* derivative information */
#include <time.h>
#include <stdio.h>
void delay(int d);
int update_delay_time(int last_delay_time);
int delay_time=9400;
int set_delay= 500;
@eggie5
eggie5 / lab5_2_marino.c
Created March 2, 2012 00:28
putting this here for posterity
#include <hidef.h> /* common defines and macros */
#include "derivative.h" /* derivative-specific definitions */
#define SL 16 //sequence length
//word is unsigned int
void delay(word d);
word delayTime=2000/SL; //125 ms
#include <hidef.h> /* common defines and macros */
#include "derivative.h" /* derivative-specific definitions */
#define SL 16 //sequence length
//word is unsigned int
void delay(word d);
byte getkey ();
void block_LEDS (byte scan_code);
byte getChar();
#include <hidef.h>
#include <MC9S12C128.h>
#include <stdio.h>
#include <termio.h>
#define SL 16 //sequence length
//word is unsigned int
void delay(word d);
byte getkey ();