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
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> | |
<html> | |
<head> | |
<title>Error: 404 Not Found</title> | |
<style type="text/css"> | |
html {background-color: #eee; font-family: sans;} | |
body {background-color: #fff; border: 1px solid #ddd; | |
padding: 15px; margin: 15px;} | |
pre {background-color: #eee; border: 1px solid #ddd; padding: 5px;} |
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
// Don't do this. | |
namespace foo.Bar {} | |
namespace foo { | |
// Duplicate definition of Bar | |
public class Bar { } | |
} | |
// Do this | |
namespace foo.bar { } | |
namespace foo { |
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
def update | |
(pkgName: PkgName, diff: IAPDiffResult) | |
(implicit log: Logger, service: AndroidPublisher) = | |
{ | |
val iaps = service.inappproducts() | |
def doUpdates() = { | |
log.logln(s"Updating IAPs (${diff.changes.size})") | |
diff.changes.foreach { diff => | |
val iap = diff.local |
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
void addToUI(int width, int height, boolean isTopBanner) { | |
float density = activity.getResources().getDisplayMetrics().density; | |
int finalWidth = (int)(width * density); | |
int finalHeight = (int)(height * density); | |
bannerFrame = new FrameLayout(activity); | |
bannerFrame.addView(banner, new FrameLayout.LayoutParams( | |
finalWidth, finalHeight, | |
(isTopBanner ? Gravity.TOP : Gravity.BOTTOM) | Gravity.CENTER_HORIZONTAL | |
)); |
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
void addToUI(int width, int height, boolean isTopBanner) { | |
float density = activity.getResources().getDisplayMetrics().density; | |
int finalWidth = (int)(width * density); | |
int finalHeight = (int)(height * density); | |
bannerFrame = new FrameLayout(activity); | |
RelativeLayout.LayoutParams bannerLayoutParams = | |
new RelativeLayout.LayoutParams(finalWidth, finalHeight); | |
bannerFrame.addView(banner, bannerLayoutParams); |
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
package com.tinylabproductions.tbsgame.notifications; | |
import android.os.Bundle; | |
import android.support.v4.app.FragmentActivity; | |
import android.support.v4.app.FragmentManager; | |
import android.util.Log; | |
import android.widget.Toast; | |
import com.tinylabproductions.tbsgame.Prefs; | |
import com.tinylabproductions.tbsgame.data.IntDate; | |
import com.tinylabproductions.tbsgame.data.IntHHMM; |
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
package com.tinylabproductions.tbsgame.notifications; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; | |
import android.content.Intent; | |
public class LaunchMuteForDialogReceiver extends BroadcastReceiver { | |
@Override | |
public void onReceive(Context context, Intent intent) { | |
context.startActivity( |
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
package app.actors | |
import java.nio.ByteOrder | |
import akka.io.Tcp | |
import akka.typed.ScalaDSL._ | |
import akka.typed._ | |
import akka.util.ByteString | |
import akka.{actor => untyped} | |
import app.protobuf.parsing.Parsing |
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
case class Resources( | |
food: Food=Food(0), wood: Wood=Wood(0), stone: Stone=Stone(0), gold: Gold=Gold(0), | |
mana: Mana=Mana(0) | |
) { | |
def +(r: Resources) = | |
Resources(food + r.food, wood + r.wood, stone + r.stone, gold + r.gold, mana + r.mana) | |
def -(r: Resources) = | |
Resources(food - r.food, wood - r.wood, stone - r.stone, gold - r.gold, mana - r.mana) | |
def >=(r: Resources) = | |
food >= r.food && wood >= r.wood && stone >= r.stone && gold >= r.gold && mana >= r.mana |
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
HTTP/1.1 301 MOVED PERMANENTLY | |
Date: Mon, 31 Aug 2015 09:19:45 GMT | |
Server: gunicorn/19.3.0 | |
Vary: Accept-Language,Accept-Encoding | |
Content-Type: text/html; charset=utf-8 | |
Location: http://errors.tinylabproductions.com/api/2/store/ | |
Content-Language: en | |
Transfer-Encoding: chunked |