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
#include "BoundingBox.h" | |
BoundingBox::BoundingBox(vector<Point> points) : | |
top_left(points[(0)]), bottom_right(points[1]) { | |
if (top_left.x > bottom_right.x || top_left.y > bottom_right.y) { | |
string msg("Invalid points for BoundingBox. Bottom right must have (x,y) >= top right point."); | |
cerr << msg.c_str() << endl; | |
throw runtime_error(msg); | |
} | |
} |
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
protected void handleNewInstallsAndUpgrades() { | |
int savedVersion = readVersionCodeFromPref(PREF_TAG_CURRENT_APP_VERSION); | |
if (savedVersion == -1) | |
processNewInstall(getVersionCode()); | |
else if (savedVersion != getVersionCode()) | |
processUpgrade(getVersionCode(), readVersionCodeFromPref(PREF_TAG_PREVIOUS_APP_VERSION)); | |
} | |
protected void processNewInstall(final int newVersionCode) { | |
updateSavedVersionCodes(); |
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
/* | |
* Copyright (C) 2011 Micah Hainline | |
* Copyright (C) 2012 Triposo | |
* 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 | |
* distributed under the License is distributed on an "AS IS" BASIS, | |
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
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
package com.fizzbuzz.daggerexperiments; | |
import dagger.Module; | |
import dagger.Provides; | |
import javax.inject.Inject; | |
import javax.inject.Qualifier; | |
import java.lang.annotation.Documented; | |
import java.lang.annotation.Retention; |