(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.
package at.markushi.reveal; | |
import android.app.Activity; | |
import android.graphics.Color; | |
import android.graphics.Point; | |
import android.os.Bundle; | |
import android.view.View; | |
import at.markushi.ui.RevealColorView; |
/* | |
* Copyright (C) 2014 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 |
package eu.yesweapp.parse; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Map; | |
import bolts.Task; | |
import com.parse.DeleteCallback; | |
import com.parse.FindCallback; |
public class ExampleActivity extends Activity implements WatchFaceLifecycle.Listener { | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_my_layout); | |
WatchFaceLifecycle.attach(this, savedInstanceState, this); | |
} | |
@Override |
def toCamelCase(String string) { | |
String result = "" | |
string.findAll("[^\\W]+") { String word -> | |
result += word.capitalize() | |
} | |
return result | |
} | |
afterEvaluate { project -> | |
Configuration runtimeConfiguration = project.configurations.getByName('compile') |
(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.
/* | |
* Copyright 2014 Chris Banes | |
* | |
* 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 |
# Create your superuser | |
$ mongo | |
> use admin | |
> db.createUser({user:"someadmin",pwd:"secret", roles:[{role:"root",db:"admin"}]}) | |
> exit | |
# Alias for convenience (optional and at your own risk) | |
$ echo 'alias mongo="mongo --port 27017 -u someadmin -p secret --authenticationDatabase admin"' >> ~/.bash_profile | |
$ source ~/.bash_profile |
import urllib2, urllib | |
import json | |
import StringIO | |
import gzip | |
import random | |
import codecs | |
import time | |
import pprint | |
import requests | |
import re |
$(".item").hover( | |
function () { | |
var SearchItem = $(this); | |
// on mouse in | |
if (SearchItem.hasClass('priced')) { | |
// has already set a price so dont do anything | |
} else { | |
SearchItem.find('.rarity').html('Loading...'); | |
var itemurl = "http://steamcommunity.com/market/listings/" + gameid + "/" + SearchItem.find('img.smallimg').attr("alt") + "/"; | |
var xhr = new XMLHttpRequest(); |