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
| class Product { | |
| let name: String! | |
| init?(name: String) { | |
| self.name = name | |
| if name.isEmpty { | |
| return nil | |
| } | |
| } | |
| } |
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
| #pragma mark Update menu | |
| -(void)changeState { | |
| [self updateRecentMenu]; | |
| if ([SettingsController sharedSettings].session) { | |
| [self.profileMenuTitle setEnabled:YES]; | |
| self.profileMenuTitle.title = [NSString stringWithFormat:@"%@'s profile...", [SettingsController sharedSettings].username]; | |
| if (self.musicController.isiTunesRunning) { | |
| if (self.musicController.playerState == iTunesEPlSPlaying && self.musicScrobbler.currentTrack.trackName) { | |
| [self.loveSongMenuTitle setEnabled:YES]; | |
| [self.similarArtistMenuTtitle setEnabled:YES]; |
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
| ### Keybase proof | |
| I hereby claim: | |
| * I am rurza on github. | |
| * I am rurza (https://keybase.io/rurza) on keybase. | |
| * I have a public key whose fingerprint is 42C8 1D56 3BB2 4B8E 0DDC 2BAF 9E27 A0C3 E3DD E2C4 | |
| To claim this, I am signing this object: |
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
| /html/body/div[2]/div/div[2]/div[5] |
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
| extension TimeInterval { | |
| func stringFormatted() -> String { | |
| let interval = Int(self) | |
| let seconds = interval % 60 | |
| let minutes = (interval / 60) % 60 | |
| let hours = (interval / (60*60)) % 60 | |
| return String(format: "%02d:%02d:%02d", hours, minutes, seconds) | |
| } | |
| } |