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
| view = new QWebView(this); | |
| QPalette palette = view->palette(); | |
| palette.setBrush(QPalette::Base, Qt::transparent); | |
| view->page()->setPalette(palette); | |
| view->setAttribute(Qt::WA_OpaquePaintEvent, false); |
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
| $ osascript | |
| tell application "VLC" | |
| activate | |
| end tell |
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 <iostream> | |
| // opencv | |
| #include <highgui.h> | |
| #include <cv.h> | |
| const char* cascade_path = "/usr/share/opencv/haarcascades/haarcascade_frontalface_alt.xml"; | |
| CvHaarClassifierCascade* cascade = (CvHaarClassifierCascade*)cvLoad(cascade_path, 0, 0, 0 ); | |
| //CvHaarClassifierCascade* cascade = cvLoadHaarClassifierCascade(cascade_path, cvSize(1,1)); | |
| CvMemStorage* storage = cvCreateMemStorage( 0 ); |
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
| tell application "iChat" | |
| repeat with theChat in chats | |
| repeat with theBuddy in buddies | |
| set buddy_id to id of theBuddy | |
| send buddy_id to theChat | |
| end repeat | |
| end repeat | |
| end tell |
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 <string.h> | |
| #include <fcntl.h> | |
| #include <error.h> | |
| #include <sys/types.h> | |
| #include <sys/stat.h> | |
| #include <sys/ioctl.h> | |
| #include <linux/if_tun.h> | |
| #include <net/if.h> |
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
| all: get | |
| get: get.ml | |
| ocamlfind ocamlopt -package json-wheel -linkpkg get.ml -o get | |
| clean: | |
| rm get.cm[xi] get.o get |
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
| (* ocamlopt -I +glMLite GL.cmxa Glut.cmxa testgl.ml *) | |
| open GL;; | |
| open Glu;; | |
| open Glut;; | |
| let start_show () = | |
| glClear [GL_COLOR_BUFFER_BIT]; | |
| glBegin GL_TRIANGLES; |
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
| let string_strip_dir s lst ~right = | |
| let rec strip s lst' = | |
| match lst' with | |
| [] -> s | |
| | hd::tail -> | |
| let len = String.length s in | |
| let index = if right then (len - 1) else 0 in | |
| if (String.get s index) = hd then | |
| let cropped = if right then String.sub s 0 index else String.sub s 1 (len-1) in |
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
| ## | |
| ## Put me in ~/.irssi/scripts, and then execute the following in irssi: | |
| ## | |
| ## /load perl | |
| ## /script load notify | |
| ## | |
| use strict; | |
| use Irssi; | |
| use vars qw($VERSION %IRSSI); |
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 to_the_left = true; | |
| previous_active_client_id = null; | |
| function resize_client(client) { | |
| geo = client.geometry; | |
| geo.width = workspace.workspaceWidth / 2; | |
| geo.height = workspace.workspaceHeight - 30; | |
| client.geometry = geo; | |
| } |
OlderNewer