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
-- | |
-- Is there a more efficient/elegant way to do this? | |
-- | |
-- Objective: To disable/enable the mouse cursor for specific windows | |
-- | |
checkMouseDisable :: X () | |
checkMouseDisable = do |
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
public protocol MusicStaffViewElement { | |
/// The path that describes the shape of the element in the element's bounding box. This should be used in concert with `aspectRatio` and `heightInStaffSpace` to determine the actual shape and size of the bounding box when drawing. | |
func path(in frame: CGRect, for direction: MusicStaffViewElementDirection) throws -> CGPath | |
/// Returns a CALayer containing the element to be drawn. | |
/// | |
/// - Parameter spaceWidth: The width of the spaces between the lines of the staff. | |
/// - Returns: The layer to be drawn by `MusicStaffView` | |
func layer(in clef: MusicClef, withSpaceWidth spaceWidth: CGFloat, color: UIColor?) throws -> CALayer | |
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
On April 5 2012, #0x10c-dev agreed to the following standard ABI: | |
- Registers A, B, C are clobberable across calls | |
- Registers I, J, X, Y, Z are preserved across calls | |
- Return in A | |
- J is used for base stack pointer (preserving the value of SP before allocating data for locals) |
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
[progressIndicator startAnimation:nil]; | |
dispatch_async(dispatch_get_global_queue( DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{ | |
NSTask *task = [[NSTask alloc] init]; | |
NSArray *arguments = [NSArray arrayWithObjects:@"-l", @"rvm", @"info", rubyName, @"ruby,homes,binaries,environment", nil]; | |
NSPipe *pipe = [NSPipe pipe]; | |
NSFileHandle *file = [pipe fileHandleForReading]; | |
[task setStandardOutput: pipe]; | |
[task setArguments: arguments]; | |
[task setLaunchPath:@"/bin/bash"]; |
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
{-# LANGUAGE GADTs, EmptyDataDecls#-} | |
module Calculator where | |
type Stack = [Double] | |
-- Empty data declarations to use as 'tags' | |
data Unary | |
data Binary | |
data Left |
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
package alphatunnel; | |
import java.io.IOException; | |
import java.io.FilterInputStream; | |
import java.net.Socket; | |
import java.net.UnknownHostException; | |
import java.nio.CharBuffer; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; |