Shortcut | Description |
---|---|
⌃ + R | Run Application. |
⌃ + D | Debug Application. |
⇧ + ⇧ | Search Everywhere. |
⇧ + ⌘ + A | Search for Actions. |
⌘ + 1 | Switch between project windows. |
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
import static org.junit.Assert.*; | |
import static org.hamcrest.CoreMatchers.is; | |
import static org.mockito.Mockito.*; | |
import static org.mockito.BDDMockito.*; | |
import org.hamcrest.BaseMatcher; | |
import org.hamcrest.Description; | |
import org.hamcrest.Matcher; |
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
# Created by https://www.gitignore.io/api/android | |
### Android ### | |
# Built application files | |
*.apk | |
*.ap_ | |
# Files for the Dalvik VM | |
*.dex |
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
<?php | |
// Server key from Google API's Console https://console.firebase.google.com/project/high-street-auctions/settings/cloudmessaging | |
define( 'SERVER_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' ); | |
$registrationIds = array('','',''); | |
$payLoad = array | |
( | |
'message' => 'here is a message.', |
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
public final class StringUtils { | |
public static String getRandomName() { | |
List<String> names = new ArrayList<>(Arrays.asList("Durante Waldo", | |
"Iolyn Szilveszter", | |
"Ibragim Landebert", | |
"Kenelm Konrad", | |
"Adam Ercanbald")); | |
return names.get(new Random().nextInt(names.size())); | |
} |
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
public final class JodaTimeUtils { | |
public static String formatStringToHoursAndMinutes(String timestamp, Locale locale) { | |
DateTime dt = (ISODateTimeFormat.dateTime()).parseDateTime(timestamp); | |
return dt.toString("HH:mm", locale); | |
} | |
public static String getDurationBetween(String start, String end) { | |
DateTime startDate = (ISODateTimeFormat.dateTime()).parseDateTime(start); | |
DateTime endDate = (ISODateTimeFormat.dateTime()).parseDateTime(end); | |
return getDurationBetweenTwoDates(startDate, endDate); |
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
public final class TravelToolsUtils { | |
/** | |
* Generate mock stop locations, given current location of user. | |
*/ | |
public static CoordinatesEntity getCoordinatesEntity(double x0, double y0, double radius) { | |
Random random = new Random(); | |
// Convert radius from meters to degrees | |
double w = (radius / 111000f) * Math.sqrt(random.nextDouble()); | |
double t = 2 * Math.PI * random.nextDouble(); |
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
Response response = Response.error(HttpURLConnection.HTTP_INTERNAL_ERROR, ResponseBody.create(MediaType.parse("application/json"),"Internal Server Error")); |
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
<?php | |
//Set Variables: | |
$background = "bg.jpg"; //Background chose by user | |
$logo = "logo.png"; //This logo will always remain same | |
$userLogo = "20.png"; //Logo created by user. | |
$savePath = "/output/"; //Where to Save? | |
$showNotSave = true; | |
//No need to change anything below.... | |
$bgImage = imagecreatefromjpeg($background); |
OlderNewer