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
<?xml version="1.0" encoding="UTF-8"?> | |
<project version="4"> | |
<component name="CompilerConfiguration"> | |
<resourceExtensions /> | |
<wildcardResourcePatterns> | |
<entry name="!?*.java" /> | |
<entry name="!?*.form" /> | |
<entry name="!?*.class" /> | |
<entry name="!?*.groovy" /> | |
<entry name="!?*.scala" /> |
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
assert(getprop("ro.product.device") == "hammerhead" || getprop("ro.build.product") == "hammerhead" || abort("This package is for device: hammerhead; this device is " + getprop("ro.product.device") + ".");); | |
ifelse(is_mounted("/system"), unmount("/system")); | |
package_extract_dir("install", "/tmp/install"); | |
set_metadata_recursive("/tmp/install", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0644); | |
set_metadata_recursive("/tmp/install/bin", "uid", 0, "gid", 0, "dmode", 0755, "fmode", 0755); | |
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system", ""); | |
run_program("/tmp/install/bin/backuptool.sh", "backup"); | |
unmount("/system"); | |
show_progress(0.750000, 0); | |
ui_print("Patching system image unconditionally..."); |
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
yamlScalar ::= VALUE | |
yamlFile ::= yamlDocument* | |
yamlDocument ::= DOCUMENT_START yamlContent* DOCUMENT_END | DOCUMENT_START yamlContent* | yamlContent* | |
yamlContent ::= yamlBlock | COMMENT | |
yamlBlock ::= yamlMap | yamlSequence | |
yamlMap ::= yamlNormalMap | yamlFlowMap | |
yamlNormalMap ::= yamlKey MAP_SEPARATOR (CRLF | COMMENT)* (yamlBlock | yamlScalar) |
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 static boolean hasMoreVowels(String s) { | |
if (s.length() == 1) | |
return "aeiou".contains(s); | |
boolean removedVowel = false; | |
boolean removedCons = false; | |
StringBuilder sb = new StringBuilder(); | |
for (int i = 0; i < s.length(); i++) { | |
if ("aeiou".contains(s.substring(i, i + 1))) { | |
if (!removedVowel) { |
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
private Position getPosition(JLabel label) { | |
// This method is proof I am an idiot | |
String text = ""; | |
Class<BoardGUI> clazz = BoardGUI.class; | |
Field[] fields = clazz.getDeclaredFields(); | |
for (Field field : fields) { | |
if (field.getDeclaringClass() == JLabel.class) { | |
try { | |
if (field.get(this) == label) { |
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 static String getWeather(String loc) throws IOException { | |
String city; | |
String state; | |
String temp; | |
String humidity; | |
String wind; | |
String conditions; | |
try { | |
String json = getTextFromUrl(new URL("/* super secret API key stuff */" + encode(loc) + ".json")); |
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 static String encode(String input) { | |
StringBuilder resultStr = new StringBuilder(); | |
for (char ch : input.toCharArray()) { | |
if (isUnsafe(ch)) { | |
resultStr.append('%'); | |
resultStr.append(toHex(ch / 16)); | |
resultStr.append(toHex(ch % 16)); | |
} else { | |
resultStr.append(ch); | |
} |
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
switch (e.getMessage()) { | |
case "empty": | |
message = "<html>Please fill in all required fields</html>"; | |
break; | |
case "bad": | |
message = "<html>Please enter author and plugin names as a comma separated list</html>"; | |
break; | |
default: | |
message = "<html>Unknown Error</html>"; | |
break; |
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
<dependency> | |
<groupId>${project.groupId}</groupId> | |
<artifactId>spigot</artifactId> | |
<version>${project.version}</version> | |
<scope>system</scope> | |
<systemPath>${project.basedir}/spigot-1.8.8.jar</systemPath> | |
</dependency> |
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
plugin.getServer().getScheduler().runTask(plugin, new Runnable() { | |
@Override | |
public void run() { | |
final String response = command.playerStatResponse(player, secondaryArgsList); | |
if (finalPublicCmd) { | |
String endResponse = ChatColor.valueOf(plugin.config().colors.public_identifier) | |
+ "@" + sender.getName() + ChatColor.WHITE + ": " + response; | |
plugin.getServer().broadcastMessage(endResponse); | |
} else { |
OlderNewer