Skip to content

Instantly share code, notes, and snippets.

View charlieMonroe's full-sized avatar

Charlie Monroe Software charlieMonroe

View GitHub Profile
let combo = control.keyCombo()
let keyCode = combo.code
let modifierKeys = control.cocoa(toCarbonFlags: combo.flags)
if keyCode <= 0 && modifierKeys <= 0 {
return
}

Sortable properties

Introduction

This proposal suggests introduction of a @sortable attribute that may be

/// An argument of the function.
struct Argument {
var name: String
var type: Any.Type
}
/// Variable captured by the closure.
struct CapturedVariable {
var name: String
var type: Any.Type

Deprecating string interpolation of Optional

  • Proposal: TBD
  • Author: Charlie Monroe
  • Status: TBD
  • Review manager: TBD

Introduction

This proposal suggests deprecating string interpolation of Optional in order to prevent unexpected

-(void)_generateButton:(NSWindowButton)buttonKind mouseOver:(BOOL)over name:(NSString*)name{
NSImage *image = [[[NSImage alloc] initWithSize:NSMakeSize(12.0, 12.0)] autorelease];
NSButton *button = [_window standardWindowButton:buttonKind];
if (over){
[[button cell] mouseEntered:nil];
}
[image lockFocus];
[[button cell] drawWithFrame:NSMakeRect(0.0, 0.0, 12.0, 12.0) inView:button];
[image unlockFocus];
// 1: Process Information
Incident Identifier: 30E46451-53FD-4965-896A-457FC11AD05F
CrashReporter Key: 5a56599d836c4f867f6eec76afee451bf9ae5f31
Hardware Model: iPhone4,1
Process: Rage Masters [4155]
Path: /var/mobile/Applications/A5635B22-F5EF-4CEB-94B6-FE158D885014/Rage Masters.app/Rage Masters
Identifier: Rage Masters
Version: ??? (???)
Code Type: ARM (Native)
Parent Process: launchd [1]
DECLARE
number1 NUMBER(2);
number2 number1%TYPE := 17; -- value default
text1 VARCHAR2(12) := 'Hello world';
text2 DATE := SYSDATE; -- current date and time
BEGIN
SELECT street_number
INTO number1
FROM address
WHERE name = 'INU';
@charlieMonroe
charlieMonroe / AintNoFile.c
Created June 7, 2011 07:15
Some weird snippet
#import "file.h"
void me(){
printf("me");
}