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
class Agent < ActiveRecord::Base | |
self.table_name = "agtAgents" | |
self.primary_key = "agentID" | |
#has_one :corporation, :class_name => "NPCCorporation", :foreign_key => "corporationID" | |
belongs_to :inv_name, :foreign_key => "agentID" | |
def name | |
return self.inv_name.to_s | |
end | |
end |
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
class BlueprintComponent < ActiveRecord::Base | |
self.table_name = "industryActivityMaterials" | |
self.primary_key = "typeID" | |
belongs_to :blueprint, :foreign_key => 'typeID' | |
belongs_to :item, :class_name => 'Item', :foreign_key => 'materialTypeID' | |
end | |
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
// | |
// MusicStaffViewStaffLayer.swift | |
// MusicStaffView | |
// | |
// Created by Mike Muszynski on 1/4/15. | |
// Copyright (c) 2015 Mike Muszynski. All rights reserved. | |
// | |
import UIKit |
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
class AppDelegate: NSObject, NSApplicationDelegate { | |
let menu = NSMenu() | |
var statusItem: NSStatusItem! | |
var settingsWindowController = NSWindowController(windowNibName: "ControlPanelWindowController") | |
func openSettingsWindow() { | |
settingsWindowController.showWindow(self) | |
settingsWindowController.window?.orderFront(self) | |
} |
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
easier: | |
func && (lhs: Chainable, rhs: Chainable) -> [Chainable] { | |
return [lhs, SQLiteChainType.And, rhs] | |
} |
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
protocol Landmarkable { | |
var coordinate: CLLocation? { get } //classes must provide at least a Read-Only location called "coordinate" | |
func distanceFrom(location: CLLocation) -> CLLocationDistance //classes must provide a distance from another location | |
} | |
protocol Outlineable: Landmarkable { | |
var outline: [CLLocation]? { get } //must provide an outline represented by an array of locations | |
var center: CLLocation? { get } //must provide a center location | |
} |
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
//Attempting to load the view of a view controller while it is deallocating | |
//is not allowed and may result in undefined behavior (<UIAlertController: 0x7f8ec04a27a0>) | |
//(wait alert is the one that it is complaining about) | |
@IBAction func addLandmarkWithSelectedType() { | |
let waitAlert = UIAlertController(title: "Waiting for accuracy", message: "Holding until the accuracy improves", preferredStyle: .Alert) | |
let timeoutAlert = UIAlertController(title: "Location Manager Error!", message: "Location manager was not able to provide the necessary accuracy", preferredStyle: .Alert) | |
let cancelTimeoutAlert = { (action: UIAlertAction) in self.dismissViewControllerAnimated(true, completion: nil) } | |
timeoutAlert.addAction(UIAlertAction(title: "Drat", style: .Cancel, handler: cancelTimeoutAlert)) |
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
//Intervals | |
let C0 = MusicPitch(name: .c, accidental: .natural, octave: 0) | |
let D0 = MusicPitch(name: .d, accidental: .natural, octave: 0) | |
let majorSecond = try MusicInterval(rootPitch: C0, destinationPitch: D0) | |
XCTAssertEqual(majorSecond.halfStepDistance, 2) | |
XCTAssertEqual(majorSecond.quality, MusicIntervalQuality.major) | |
XCTAssertEqual(majorSecond.quantity, MusicIntervalQuantity.second) | |
//Scales |
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
BSNDataController.m | |
-(NSMutableArray*)fetchFingeringsForNoteObject:(Note*)noteObject { | |
//slightly different, pulls the fingerings for a note OBJECT | |
//NSLog(@"Fetching fingering for note object with name: %@", noteObject.name); | |
NSFetchRequest *request = [[NSFetchRequest alloc] init]; | |
NSEntityDescription *entity = [NSEntityDescription entityForName:@"Fingering" inManagedObjectContext:[self managedObjectContext]]; |
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
// | |
// ViewController.swift | |
// RLMessageBlaster | |
// | |
// Created by Mike Muszynski on 10/14/17. | |
// Copyright © 2017 Mike Muszynski. All rights reserved. | |
// | |
import Cocoa |
OlderNewer