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
| - (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath { | |
| UITableViewRowAction *moreAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"More" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){ | |
| // maybe show an action sheet with more options | |
| [self.tableView setEditing:NO]; | |
| }]; | |
| moreAction.backgroundColor = [UIColor lightGrayColor]; | |
| UITableViewRowAction *blurAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Blur" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){ | |
| [self.tableView setEditing:NO]; | |
| }]; |
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
| <UIKeyboardImpl: 0xd6cbe0>: | |
| in UIKeyboardImpl: | |
| Class Methods: | |
| + (void) applicationDidReceiveMemoryWarning:(id)arg1; (0x4136a6) | |
| + (void) applicationWillResignActive:(id)arg1; (0x413565) | |
| + (void) applicationDidEnterBackground:(id)arg1; (0x413626) | |
| + (void) applicationWillEnterForeground:(id)arg1; (0x413663) | |
| + (void) applicationWillSuspend:(id)arg1; (0x413431) | |
| + (id) activeInstance; (0x41332f) | |
| + (void) releaseSharedInstance; (0x413340) |
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
| #import "Foo.h" | |
| @interface SomeClass : NSObject | |
| - (id)init UNAVAILABLE_ATTRIBUTE; | |
| - (id)initWithFoo:(id<Foo>)foo; | |
| @end |
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
| #!/usr/bin/perl -w | |
| # Copyright (C) 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. | |
| # | |
| # Redistribution and use in source and binary forms, with or without | |
| # modification, are permitted provided that the following conditions | |
| # are met: | |
| # | |
| # 1. Redistributions of source code must retain the above copyright | |
| # notice, this list of conditions and the following disclaimer. |
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
| #include <iostream> | |
| constexpr long long factorial(long long n) { | |
| return n <= 1 ? 1 : n * factorial(n-1); | |
| } | |
| int main() | |
| { | |
| std::cout << factorial(20); // 2432902008176640000 | |
| } |
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
| #include <vector> | |
| #include <iostream> | |
| struct A { | |
| int m; | |
| A() { | |
| m = 'A'; | |
| } | |
| friend std::ostream& operator<<(std::ostream&os, A a); | |
| }; |
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
| #include <iostream> | |
| #include <algorithm> | |
| #include <iterator> | |
| #include <vector> | |
| #include <list> | |
| namespace eds { | |
| template <template <typename T, typename A = std::allocator<T> > class C, typename T, typename A> | |
| void print(const C<T, A>& v) { | |
| std::copy(v.begin(), v.end(), std::ostream_iterator<T>(std::cout, " ")); |
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
| #include <vector> | |
| #include <algorithm> | |
| // ----------------------------------------------------------------------------- | |
| // Function Object - print() | |
| // ----------------------------------------------------------------------------- | |
| namespace eds { | |
| template <typename T> | |
| struct print : public std::unary_function<T, void> { |
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
| #include <iostream> | |
| #include <vector> | |
| #include <string> | |
| #include <unordered_map> | |
| typedef unsigned long UID_t; | |
| class UIDGen | |
| { | |
| private: |
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
| aardvark,2,1 | |
| abba,3,0 | |
| acdc,3,0 | |
| ace,1,1 | |
| acorn,1,1 | |
| add,1,0 | |
| adele,3,1 | |
| africa,2,1 | |
| afro,1,1 | |
| airbag,3,0 |