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
public class SplashActivity extends Activity { | |
@Override | |
public void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.splash); | |
LinearLayout layoutMain = (LinearLayout) findViewById(R.id.layoutMain); | |
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
#pragma mark - NetworkHelper.h | |
- (void)getHotspotNameWithCompletion:(void (^)(void))completionBlock andFail:(void (^)(void))failBlock; | |
#pragma mark - NetworkHelper.m | |
- (void)getHotspotNameWithCompletion:(void (^)(void))completionBlock andFail:(void (^)(void))failBlock | |
{ | |
dispatch_async(queue, ^{ |
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
On Mac OSX, the native SSH client can use the built-in keychain directly. To add your private key to the keychain simply use the command: | |
ssh-add -K /path/of/private/key | |
As an example if your private key is stored at ~/.ssh and is named id_rsa, you would use the command: | |
ssh-add -K ~/.ssh/id_rsa | |
You will then be prompted for your passcode, which will be stored in your keychain. After this you should be ready for a password-less login. |
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
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | |
{ | |
_initalStoryboard = self.window.rootViewController.storyboard; | |
} | |
-(void) resetStoryBoard{ |
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
"Android development War Stories" | |
1. Android Development War Stories by Lope Emano April-June 2014 | |
2. Seriously though. | |
3. The Format Share and discuss experiences in an app you’ve built and/or the new things you’ve learned the past few months. | |
4. Things I’ve learned the past few months | |
5. New Design-First process is kewl First two weeks: ❖ Researched existing similar apps (advantages and disadvantages) ❖ Watched Android Design In Action videos ❖ Sketched designs/layouts using pencil and paper via printed out stencil kit | |
6. New Design-First process is kewl ❖ Demo app to product owner in front of photoshop for insta changes ❖ Acquaint designer with terms like "actionbar, navigation bar, status bar, overflow" for easy communication ❖ Android asset studio ❖ Look around for potential tools | |
7. Libraries | |
8. Guava - Light and useful - Used only MultiMap and StringUtils - Still have a lot to learn! | |
9. No need for ActionBarSherlock - Android support library can now suffice |
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
1. Building Scalable Stateless Applications with RxJava Rick Warren | Principal Engineer, eHarmony [email protected] | @DangerLemming | |
2. RxJava • Encapsulates data sequences: Observable • Provides composable operations on them • Abstracts away threading and synch • Port from Microsoft .NET Reactive Extensions • Java 6+, Groovy, Clojure, JRuby, Kotlin, and Scala; Android-compatible | |
3. Netflix Client Client Client Client Client Coarse-Grained API Orchestration Layer Mi- -cro Ser- -vic- -es | |
4. Applicability Application or Presentation-Layer Service Client Client Client Client Client Data Source Data Source Data Source Data Source Data Source | |
5. 3 Problems 1. Streaming queries 2. Rate-limited APIs (with retries) 3. Using Futures | |
6. Streaming Queries Data Store Service Client 1 2 3 1. Query lots of data from NoSQL store 2. Enrich, filter, and score on the fly 3. Deliver “best” results to client | |
7. Streaming Queries 1 Query 2 Enrich 3 Deliver + = Too Much Latency | |
8. Streaming Queries 1 Query && = 2 Enrich 3 Deli |
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
Rect visibleRect = new Rect(); | |
@Override | |
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { | |
ViewGroup mMain = (ViewGroup) inflater.inflate(R.layout.select_cover_album, container, false); | |
mMain.getWindowVisibleDisplayFrame(visibleRect); | |
mMain.addOnLayoutChangeListener(new View.OnLayoutChangeListener() { | |
@Override |
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
/* | |
In the node.js intro tutorial (http://nodejs.org/), they show a basic tcp | |
server, but for some reason omit a client connecting to it. I added an | |
example at the bottom. | |
Save the following server in example.js: | |
*/ | |
var net = require('net'); |
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
# Uses Bluez for Linux | |
# | |
# sudo apt-get install bluez python-bluez | |
# | |
# Taken from: https://people.csail.mit.edu/albert/bluez-intro/x232.html | |
# Taken from: https://people.csail.mit.edu/albert/bluez-intro/c212.html | |
import bluetooth | |
def receiveMessages(): |
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 Node<T>(var data: T, var nextNode: Node<T>? = null) | |
class LinkedList<T> { | |
var size: Int = 0 | |
var head: Node<T>? = null | |
//O(1) | |
fun insertStart(data: T) { | |
size += 1 | |
val newNode = Node(data = data) |
OlderNewer