This file contains hidden or 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/sh | |
# acpi notifier | |
LANG=C | |
FG="white" | |
BG="#555" | |
W=500 | |
X=$(xwininfo -root | awk "/Width:/{print \$2-$W}") | |
Y=20 | |
GEOM="-fg $FG -bg $BG -y $Y -x $X -w $W" | |
This file contains hidden or 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
#!env ruby | |
require 'fileutils' | |
require 'rubygems' | |
require 'dicom' | |
require 'ap' | |
SUID_TAG = "0020,000E" | |
LATE_TAG = "0020,0062" | |
VIEW_TAG = "0018,5101" | |
ACQN_TAG = "0020,0012" |
This file contains hidden or 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
function loadScript(url, callback) { | |
var tag = document.createElement('script'); | |
tag.type = 'text/javascript'; | |
tag.src = url; | |
//tag.onreadystatechange = callback; | |
tag.onload = callback; | |
document.getElementsByTagName("head")[0].appendChild(tag); | |
}; | |
function createXMLHttpRequest() { |
This file contains hidden or 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/sh | |
[ $# -ne 2 ] && echo 'please specify date and filename' && exit 1 | |
date=$1; shift; file=$1 | |
ct='cleartool' | |
# get the current visible branch | |
branch=$(${ct} find ${file} -cview -print | sed -e 's/.*\\\(.*\)\\\(.*\)/\1/g') | |
# get the history of the file within the branch | |
${ct} find ${file} -version "{brtype(${branch}) && created_since(${date})}" -print |
This file contains hidden or 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
/* | |
[MIT licensed](http://en.wikipedia.org/wiki/MIT_License) | |
*/ | |
// custom agilityjs adapter for localstorage | |
(function($$, console) { | |
'use strict'; | |
$$.adapter.localStorage = function(_params) { | |
var storageKey = (this._data.persist.baseUrl || '') + this._data.persist.collection, | |
storageStr = localStorage[storageKey], |
This file contains hidden or 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 console = { | |
log: function( v ) { | |
var str = (function stringify( obj, unquote ) { | |
if ( obj === null ) return 'null'; | |
if ( obj === undefined ) return 'undefined'; | |
if ( obj instanceof Array ) { | |
var str = []; | |
for ( var i = 0; i < obj.length; ++i ) { | |
str.push( stringify( obj[i] )); | |
} |
This file contains hidden or 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
// adapter for the test framework Logger. | |
class DebugLogger { | |
std::stringstream str; | |
public: | |
DebugLogger(): str("") {} | |
~DebugLogger() { Logger::WriteMessage( str.str().c_str() ); } | |
template<typename T> DebugLogger& operator<<( const T& val ) { | |
str << val; | |
return *this; |
This file contains hidden or 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
int graycode(int in) { | |
int out = in & 0xFFFF; | |
for (int i=0; i<16; i++) { | |
// if certain bit is 1 then rest of bits get flipped else no change. | |
if (out & (0x8000 >> i)) { | |
out ^= (0xFFFF >> (i+1)); | |
} | |
} | |
return out; | |
} |
This file contains hidden or 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
taskkill /f /im explorer.exe | |
start "" "explorer.exe" | |
pause |
This file contains hidden or 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<math.h> | |
#include<stdio.h> | |
#include<stdlib.h> | |
#define SWAP(a,b) tempr=(a); (a)=(b); (b)=tempr | |
const long N = 1 << 13; | |
void four(float*, unsigned long, int); | |
int main(int argc, char* argv[]) { | |
char* buf = new char[256]; |
OlderNewer