Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
public class Speedometer { | |
private StatefulOdometer statefulOdometer; | |
private Controller controller; | |
/** | |
* Gets the current speed and applies the brakes if activated by eye tracking. | |
* @return current speed. | |
*/ | |
public double getSpeed() { | |
OdometerDelta delta = this.statefulOdometer.getDeltaSinceLastReading(); |
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
if (isItAlwaysGoingToBeTheSameCheck || isItReallyThough) { | |
doSomething(); | |
... | |
} else { // !isItAlwaysGoingToBeTheSameCheck | |
doSomethingElse(); | |
} |
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
#include<iostream> | |
#include<map> | |
using namespace std; | |
map<char, int> t9; | |
void solve() { | |
char prev = -1, cur; | |