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 <Cocoa/Cocoa.h> | |
#import <AppKit/NSAccessibility.h> | |
static CFStringRef kSpotlightBundleIdentifier = CFSTR("com.apple.spotlight"); | |
static void SpotlightCallback(AXObserverRef observer, | |
AXUIElementRef element, | |
CFStringRef notification, |
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 <Cocoa/Cocoa.h> | |
#import <AppKit/NSAccessibility.h> | |
static CFStringRef kSpotlightBundleIdentifier = CFSTR("com.apple.spotlight"); | |
static void SpotlightCallback(AXObserverRef observer, | |
AXUIElementRef element, | |
CFStringRef notification, |
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
/* Cocoa accessibility framework for intercepting Spotlight user input. */ | |
#import <Cocoa/Cocoa.h> | |
#import <AppKit/NSAccessibility.h> | |
static void searchFieldCallback(AXObserverRef observer, | |
AXUIElementRef element, | |
CFStringRef notification, | |
void *data) { | |
CFTypeRef subrole, value; | |
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
// Bush in Scala | |
package tests | |
object Bush { | |
def main(args : Array[String]) : Unit = { | |
val states = "Alabama\nAlaska\nArizona\nArkansas\nCalifornia\nColorado\nConnecticut\nDelaware\nFlorida\nGeorgia\nHawaii\nIdaho\nIllinois\nIndiana\nIowa\nKansas\nKentucky\nLouisiana\nMaine\nMaryland\nMassachusetts\nMichigan\nMinnesota\nMississippi\nMissouri\nMontana\nNebraska\nNevada\nNew Hampshire\nNew Jersey\nNew Mexico\nNew York\nNorth Carolina\nNorth Dakota\nOhio\nOklahoma\nOregon\nPennsylvania\nRhode Island\nSouth Carolina\nSouth Dakota\nTennessee\nTexas\nUtah\nVermont\nVirginia\nWashington\nWest Virginia\nWisconsin\nWyoming".lines | |
val georgewbush = Set.empty ++ "georgewbush" | |
printf("It's sweet home %s!%n", (states find { state => !(state.toLowerCase exists { georgewbush contains _ }) }).get) | |
} |
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
// http://stackoverflow.com/questions/1376077/code-golf-the-wave | |
object Wave { | |
def main(args: Array[String]) { | |
val s = if (!args.isEmpty) args(0) else "31415926535897932384626433832795028841971693993751058209749445923078164062862" | |
val (ls, _) = ((Map() + 0 -> s.substring(0, 1), 0) /: s.toList.zipWithIndex.tail) { | |
case ((ls, y), (c, i)) => | |
val d = y + (c compare s(i - 1)) | |
((ls + d -> (ls.getOrElse(d, "") match { case z => z + (" " * (i - z.length)) + c })), d) | |
} |
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 <Cocoa/Cocoa.h> | |
#import <AppKit/NSAccessibility.h> | |
static CFStringRef kSpotlightBundleIdentifier = CFSTR("com.apple.systemuiserver"); | |
static void SpotlightCallback(AXObserverRef observer, | |
AXUIElementRef element, | |
CFStringRef notification, |
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
/** | |
* @namespace | |
*/ | |
spotify = {}; | |
/** | |
* @enum {number} | |
*/ | |
spotify.Error = { |
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
body { | |
background-color: #000 !important; | |
} | |
#statusBar { | |
background-color: #224 !important; | |
border-color: #336 !important; | |
} | |
#buffers li.server { |
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
--- CGAL/Sweep_line_2/Sweep_line_2_visitors.h 2010-11-08 18:45:53.000000000 +0100 | |
+++ /Users/liesen/crap/Sweep_line_2_visitors.h 2010-11-08 18:45:45.000000000 +0100 | |
@@ -99,9 +99,7 @@ | |
Status_line_iterator /* iter */, | |
bool /* flag */) | |
{ | |
- if ((m_includeEndPoints || | |
- event->is_intersection() || | |
- event->is_weak_intersection()) && event->is_closed()) | |
+ if ((event->is_intersection() || (event->is_weak_intersection() && m_includeEndPoints)) && event->is_closed()) |
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 <CGAL/Arr_segment_traits_2.h> | |
#include <CGAL/Cartesian.h> | |
#include <CGAL/Gmpq.h> | |
#include <CGAL/Simple_cartesian.h> | |
#include <CGAL/Sweep_line_2_algorithms.h> | |
#include <list> | |
#include <set> | |
typedef CGAL::Gmpq NT; | |
typedef CGAL::Simple_cartesian<NT> Kernel; |
OlderNewer