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
Prominent bigrams (and their occurrence count) in the past 5000 Trump tweets as of 10PM EDT on June 19, 2019 | |
fake news, 110 | |
united states, 102 | |
border security, 76 | |
southern border, 74 | |
witch hunt, 58 | |
fake media, 41 | |
news media, 40 | |
white house, 40 |
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
package chain | |
type Link func() error | |
type Chain struct { | |
err error | |
deferred bool | |
Links []Link | |
} |
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
### Keybase proof | |
I hereby claim: | |
* I am tobyjoe on github. | |
* I am tobyjoe (https://keybase.io/tobyjoe) on keybase. | |
* I have a public key whose fingerprint is 90B1 384E 83B5 C943 4298 64FF D307 3968 3A4D 66C3 | |
To claim this, I am signing this object: |
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 UserService | |
{ | |
public function getUserById($id) | |
{ | |
$user = null; | |
$user = $this->_getUserById($id); // This isn't gateway'ing. This is just class design. | |
return $user; | |
} |
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
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView | |
{ | |
NSUInteger count = [[fetchedResultsController sections] count]; | |
if (count == 0) { | |
count = 1; | |
} | |
return count; | |
} | |
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
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
if (editingStyle == UITableViewCellEditingStyleDelete) { | |
// Delete the managed object for the given index path | |
NSManagedObjectContext *context = [fetchedResultsController managedObjectContext]; | |
[context deleteObject:[fetchedResultsController objectAtIndexPath:indexPath]]; | |
// Save the context. | |
NSError *error = nil; | |
BOOL success = [context save:&error]; |