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
'conditions': [ | |
['OS=="mac"', {'libraries': ['-framework AGL', '-framework OpenGL']}], | |
['OS=="linux"', {'libraries': ['-lGL', '-lGLEW']}], | |
['OS=="win"', { | |
'libraries': [ 'opengl32.lib' ], | |
'defines' : [ | |
'WIN32_LEAN_AND_MEAN', | |
'VC_EXTRALEAN' | |
], | |
'cflags' : [ |
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
""" | |
A demo python code that .. | |
1) Connects to an IP cam with RTSP | |
2) Draws RTP/NAL/H264 packets from the camera | |
3) Writes them to a file that can be read with any stock video player (say, mplayer, vlc & other ffmpeg based video-players) | |
Done for educative/demonstrative purposes, not for efficiency..! | |
written 2015 by Sampsa Riikonen. |
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
/** | |
* An implementation for Mergesort. Less efficient | |
* than Quicksort. Again, you'd just use Array.sort | |
* but if you found yourself unable to use that | |
* there's always this option. | |
* | |
* Tests with: | |
* | |
* var array = []; | |
* for(var i = 0; i < 20; i++) { |
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
import sys | |
# | |
# ParserInput | |
# | |
# This class represents the input data and the current | |
# position in the data. | |
# | |
# Brief note about 'max_position': |
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 Base64 = { | |
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", | |
encode: function(e) { | |
var t = ""; | |
var n, r, i, s, o, u, a; | |
var f = 0; | |
e = Base64._utf8_encode(e); | |
while (f < e.length) { | |
n = e.charCodeAt(f++); | |
r = e.charCodeAt(f++); |
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 Base64 = { | |
_keyStr: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", | |
encode: function(e) { | |
var t = ""; | |
var n, r, i, s, o, u, a; | |
var f = 0; | |
e = Base64._utf8_encode(e); | |
while (f < e.length) { | |
n = e.charCodeAt(f++); | |
r = e.charCodeAt(f++); |
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
<?php | |
/* | |
* simple HttpRequest example using PHP | |
* tom slankard | |
*/ | |
class HttpRequest { | |
public $url = null; |
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
# Enter your code here. Read input from STDIN. Print output to STDOUT | |
class Node: | |
def __init__(self,value,point): | |
self.value = value | |
self.point = point | |
self.parent = None | |
self.H = 0 | |
self.G = 0 | |
def move_cost(self,other): | |
return 0 if self.value == '.' else 1 |
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/sh | |
# ------------------------------------------------------------------------------ | |
# SOME INFOS : fairly standard (debian) init script. | |
# Note that node doesn't create a PID file (hence --make-pidfile) | |
# has to be run in the background (hence --background) | |
# and NOT as root (hence --chuid) | |
# | |
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
# INSTALL/REMOVE http://www.debian-administration.org/articles/28 |
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 $j = jQuery.noConflict(); | |
var down_x = null; | |
var up_x = null; | |
$j().ready(function(){ | |
$j("#slider > div").mousedown(function(e){ | |
e.preventDefault(); | |
down_x = e.pageX; | |
}); | |
$j("#slider > div").mouseup(function(e){ | |
up_x = e.pageX; |
OlderNewer