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
<?php | |
class ExampleDataPanel extends Object implements IDebugPanel | |
{ | |
protected static $registered; | |
public function getId() | |
{ |
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
#!/usr/bin/env python | |
def to_roman(num): | |
# is input between 0 and 4000? | |
if not 0 < int(num) < 4000: return False | |
length = len(num) | |
res = '' | |
for s in num: | |
# get dictionary for current word length |
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
/** | |
* @author Vaclav Bohac | |
* This program shows size of memory allocated by | |
* JVM for primitive types. | |
*/ | |
import java.lang.reflect.Field; | |
public class sizes { |
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
/** | |
* Simple testing program for node.js. | |
* Prints prime numbers up to 10000. | |
* @author Vaclav Bohac (c) 2011 | |
*/ | |
(function (sys) { | |
var i = 2, | |
isPrime = function () { | |
var j = 2 |
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
/** | |
* Test if couchdb is live. | |
* possible@usage:~$ nodejs liveoncouch.js --hostname 192.168.0.32 --port 5982 | |
* @author Vaclav Bohac (c) 2011 | |
*/ | |
(function (util, http) { | |
var getArguments = function () { | |
var ret = { |
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/bash | |
# Generate model class and SQL. | |
# This bash script gives you some functionality similiar to rails scaffolding. | |
# It creates: | |
# - a file with model class | |
# - a file with SQL to create table with that model | |
# - a rollback file with SQL to drop that table | |
# Created by Vaclav Bohac (c) 2011. |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf8"/> | |
<title>Testing of asynchronous loading</title> | |
<script src="js/yepnope.1.0.0-min.js"></script> | |
<script> | |
(function (global, doc) { | |
global.MyApp = { |
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 (global, doc) { | |
"use strict"; | |
var Person, Employee, Manager; | |
Person = { | |
firstName: null, | |
lastName: null | |
}; | |
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
/** | |
* Copyright 2010 Bohac Vaclav | |
* | |
* This library is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* | |
* This program is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#include <string.h> | |
#include <signal.h> | |
#include <stdarg.h> | |
#include <sys/types.h> | |
#include <sys/ipc.h> | |
#include <sys/sem.h> |