Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
package com.unascribed.brokenhash; | |
import java.math.BigInteger; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.nio.charset.StandardCharsets; | |
/** | |
* Generates a broken Minecraft-style twos-complement signed |
Important note: Your code must compile on the old mappings, and the obfSourceJar must be enabled (it is by default) | |
1. Download a copy of the new methods.csv and fields.csv from http://export.mcpbot.bspk.rs/ to the root of your project. | |
2. Add the following gradle script to your build.gradle. | |
3. Run 'gradle(w) updateMappings'. | |
4. Do a diff between src/main/java/ and src_remapped/main/java/ to make sure everything looks right. | |
5. replace src/main/java/* with src_remapped/main/java/* |
<?php | |
// ip2asn.php?ip=IP_OR_HOSTNAME : Returns a comma-separated list of matching ASNs | |
// ip2asn.php?asn=AS_NUMBER : Returns the organization name | |
// ip2asn.php?update=1&token=SECRET_TOKEN : Updates the local database (setup cron to run once a day) | |
$SECRET_TOKEN = 'ChangeMe'; | |
$TMP_DIR = '/tmp/ip2asn'; | |
$DATA_DIR = '/var/lib/ip2asn'; |
All Tests were performed with 20 warmup iterations of 10000 cycles and 40 benchmarking iterations of 50000 cycles. Times are all in milliseconds.
These arguments were choosen such that the GC pauses would be long, but infrequent.
VM arguments: -verbose:gc -Xbatch -XX:CICompilerCount=1 -XX:-TieredCompilation -Xmx10G -Xms10G -XX:+UseG1GC -XX:MaxGCPauseMillis=500 -XX:InitiatingHeapOccupancyPercent=80
Guava:
/** | |
* Creates a random number from (-1..1), exclusive, distributed in an inverse-bell-curve fashion. That is, numbers | |
* closer to -1 or 1 are exponentially more likely to appear than numbers closer to 0. | |
*/ | |
public static double invertedNormalRandom(Random r) { | |
/* | |
* Implementation note: log10 reaches y=0 at x=1, and reaches y=1 at x=10, so it's really important, if we | |
* want to get good numbers out of it, to feed it numbers in the range of 1..10. So we multiply by 9 and add 1. | |
*/ | |
double a = Math.log10((r.nextDouble()*9)+1); |
package com.unascribed.materialpicker; | |
import java.util.Arrays; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.Random; | |
public enum MaterialColor { | |
RED("Red", | |
0xFF_F44336, |
See https://github.com/comp500/fabric-serverside-mods for the latest mod list!
This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/
the command zig run my_code.zig
will compile and immediately run your Zig
program. Each of these cells contains a zig program that you can try to run
(some of them contain compile-time errors that you can comment out to play
with)