I hereby claim:
- I am SirFaizdat on github.
- I am sirfaizdat (https://keybase.io/sirfaizdat) on keybase.
- I have a public key whose fingerprint is 07E9 87D3 6C24 5A55 E5CE 0137 65C5 FDEE 203E EAFD
To claim this, I am signing this object:
// This should really be part of the PHP API... | |
function write_ini_file($assoc_arr, $path, $has_sections = FALSE) | |
{ | |
$content = ""; | |
if ($has_sections) { | |
foreach ($assoc_arr as $key => $elem) { | |
$content .= "[" . $key . "]\n"; | |
foreach ($elem as $key2 => $elem2) { | |
if (is_array($elem2)) { | |
for ($i = 0; $i < count($elem2); $i++) { |
//TODO add your package name here | |
import com.google.gson.ExclusionStrategy; | |
import com.google.gson.FieldAttributes; | |
import com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
import com.google.gson.TypeAdapter; | |
import com.google.gson.annotations.Expose; | |
import com.google.gson.reflect.TypeToken; | |
import com.google.gson.stream.JsonReader; |
CraftChest chest = (CraftChest) block.getState(); //block has to be a chest | |
try | |
{ | |
Field inventoryField = chest.getClass().getDeclaredField("chest"); //This gets the CraftChest variable 'chest' which is the TileEntityChest that is stored within it | |
inventoryField.setAccessible(true); //Allows you to access that field since it's declared as private | |
TileEntityChest teChest = ((TileEntityChest) inventoryField.get(chest)); //obtains the field and casts it to a TileEntityChest | |
teChest.a("Name Goes Here"); //The a(String) method sets the title of the chest | |
} |
package org.jewelsea.examples.splash; | |
import javafx.animation.FadeTransition; | |
import javafx.application.Application; | |
import javafx.beans.value.ChangeListener; | |
import javafx.beans.value.ObservableValue; | |
import javafx.event.ActionEvent; | |
import javafx.event.EventHandler; | |
import javafx.geometry.Pos; | |
import javafx.geometry.Rectangle2D; |
I hereby claim:
To claim this, I am signing this object:
// Imports, I just wrote this up quick in Gist | |
public class Cooldowns extends JavaPlugin { | |
private Map<UUID, Long> cooldowns = new HashMap<>(); | |
private long cooldownDurationMillis = 3000; // 3 seconds (1000 millis = 1 second) | |
@Override public void onEnable() { | |
} |
I hereby claim:
To claim this, I am signing this object:
import java.util.* | |
import javax.script.ScriptEngine | |
import javax.script.ScriptEngineManager | |
import javax.script.ScriptException | |
// Instance variables | |
val engine: ScriptEngine = ScriptEngineManager().getEngineByName("JavaScript") | |
val jsMathMap = hashMapOf("sin" to "Math.sin", "cos" to "Math.cos", "tan" to "Math.tan", "pi" to "Math.PI") | |
fun main(args: Array<String>) { |
# Faizaan Datoo Pd3 | |
# A very simple example of using technology to automate simulations :) | |
# I /could/ have made it more complicated, but that would defeat the point! | |
import random | |
print "Enter a range of digits." | |
# Get those numbers... | |
minVal = input("\tYour minimum value: ") |
# Faizaan Datoo Pd3 | |
# A very simple example of using technology to automate simulations :) | |
# I /could/ have made it more complicated, but that would defeat the point! | |
import random | |
print "Enter a range of digits." | |
# Get those numbers... | |
minVal = input("\tYour minimum value: ") |