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
print "━".join([reduce(lambda x,n: [x[1], x[0]+x[1]], range(i), [2,1])[0] *'┃' for i in range(10)]) |
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 <iostream> | |
using namespace std; | |
int main() { | |
int sz; | |
cout << "enter size: "; | |
cin >> sz; | |
int* x = new int[sz]; | |
cout << "allocated " << (sz * sizeof(int)) << " bytes at " << x << endl; | |
delete [] x; |
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
// [Not sure how to implement multiple constructors for the same object using a psuedo-static method | |
// (hence return this)... FIXME if incorrect. | |
/** | |
* Construct a 2 dimensional rotation matrix about the point (0,0) | |
* @param {Number} theta the angle to rotate | |
*/ | |
function Matrix.create2DRotation(theta) { | |
this.columnns = this.rows = 2; | |
var sinTheta = Math.sin(theta); |
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
CREATE OR REPLACE PROCEDURE "CLEANOUT" AS | |
-- Drop FK restraints (type = ''R') so tables can be dropped in any order | |
cursor con_cursor IS | |
SELECT rtrim(constraint_name) as conname, rtrim(table_name) as tabname | |
FROM user_constraints | |
WHERE rtrim(constraint_type) = 'R'; | |
-- Leave some objects to prevent problems when objects are dropped out of order | |
-- Do not drop indexes, they will go with tables |
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
/* | |
* NB: This is quite buggy as FB are still changing things | |
* every 5 minutes... | |
*/ | |
@-moz-document domain("facebook.com") { | |
#rightCol{ | |
display: none; | |
} |
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
05-28 11:48:48.238: ERROR/AndroidRuntime(3954): FATAL EXCEPTION: main | |
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{edu.monash.laazz1_jmpan5.app/edu.monash.laazz1_jmpan5.app.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "edu.monash.laazz1_jmpan5.app.MainActivity" on path: /data/app/edu.monash.laazz1_jmpan5.app-2.apk | |
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106) | |
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230) | |
at android.app.ActivityThread.access$600(ActivityThread.java:141) | |
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234) | |
at android.os.Handler.dispatchMessage(Handler.java:99) | |
at android.os.Looper.loop(Looper.java:137) | |
at android.app.ActivityThread.main(ActivityThread.java:5041) | |
at java.lang.reflect.Method.invokeNative(Native Method) |
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 | |
echo "joining files $1 and $2 ..." | |
name=$( echo "$1" | sed 's/\ \(Part [0-9]\)//' | sed 's/\ \[[0-9]of[0-9]\]//' ) | |
avidemux --nogui --load "$1" --append "$2" --save "$name" | |
echo "saved as $name" |
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
var colorKeywordMap = { | |
aliceblue: 'rgb(240, 248, 255)', | |
antiquewhite: 'rgb(250, 235, 215)', | |
aqua: 'rgb( 0, 255, 255)', | |
aquamarine: 'rgb(127, 255, 212)', | |
azure: 'rgb(240, 255, 255)', | |
beige: 'rgb(245, 245, 220)', | |
bisque: 'rgb(255, 228, 196)', | |
black: 'rgb( 0, 0, 0)', | |
blanchedalmond: 'rgb(255, 235, 205)', |
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
/* | |
* Basic jQuery Slider plug-in v.1.3 | |
* | |
* http://www.basic-slider.com | |
* | |
* Authored by John Cobb | |
* http://www.johncobb.name | |
* @john0514 | |
* | |
* Copyright 2011, John Cobb |
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 TestUtils { | |
// A factory function | |
static makeTestDecorator(prop: string, modifierFn?: (...fnArgs) => any) { | |
// Apply modifierFn if it exists, and | |
// Flatten single-element arrays to a value | |
const handle = (...values) => { | |
if (modifierFn) | |
return modifierFn(...values); | |
if (values.length === 1) | |
return values[0]; |
OlderNewer