(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| let toImage = UIImage(named:"image.png") | |
| UIView.transitionWithView(self.imageView, | |
| duration:5, | |
| options: .TransitionCrossDissolve, | |
| animations: { self.imageView.image = toImage }, | |
| completion: nil) |
| extension UIImage | |
| { | |
| func tint(color: UIColor, blendMode: CGBlendMode) -> UIImage | |
| { | |
| let drawRect = CGRectMake(0.0, 0.0, size.width, size.height) | |
| UIGraphicsBeginImageContextWithOptions(size, false, scale) | |
| let context = UIGraphicsGetCurrentContext() | |
| CGContextClipToMask(context, drawRect, CGImage) | |
| color.setFill() | |
| UIRectFill(drawRect) |
| // | |
| // UIBorderedLabel.swift | |
| // standToMake | |
| // | |
| // Created by Karl Oscar Weber on 9/13/14. | |
| // Copyright (c) 2014 Karl Oscar Weber. All rights reserved. | |
| // | |
| // Thanks to: http://userflex.wordpress.com/2012/04/05/uilabel-custom-insets/ | |
| import UIKit |
| 127.0.0.1 localhost | |
| 255.255.255.255 broadcasthost | |
| ::1 localhost | |
| fe80::1%lo0 localhost |
| import java.util.ArrayList; | |
| import java.util.Arrays; | |
| import java.util.List; | |
| import rx.Observable; | |
| import rx.Observer; | |
| import rx.functions.Func2; | |
| public class RxJavaExamples { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
###Creating a REST API using Node.js, Express, and MongoDB
####Installing Node.js
Go to http://nodejs.org, and click the Install button. Run the installer that you just downloaded. When the installer completes, a message indicates that Node was installed at /usr/local/bin/node and npm was installed at /usr/local/bin/npm. At this point node.js is ready to use. Let’s implement the webserver application from the nodejs.org home page. We will use it as a starting point for our project: a RESTful API to access data (retrieve, create, update, delete) in a wine cellar database.
Create a folder named nodecellar anywhere on your file system. In the wincellar folder, create a file named server.js.
| /* | |
| * Copyright (C) 2006 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |
| <VirtualHost *:{PORT}> | |
| ServerName www.yourdomain.com | |
| ServerAdmin [email protected] | |
| DocumentRoot /var/www/yourdir/ | |
| <Directory /var/www/yourdir> | |
| Options Indexes FollowSymLinks | |
| AllowOverride all | |
| Order allow,deny |
| <manifest ...> | |
| ... | |
| <!-- Make sure your app (or individual activity) uses the | |
| theme with the custom attribute defined. --> | |
| <application android:theme="@style/AppTheme" ...> | |
| ... | |
| </application> | |
| </manifest> |