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
package org.whatever; | |
/** | |
* this is how i begin all my Java projects. | |
* inside the `SimpleClass()` constructor you | |
* can implement all your other code stuffs. | |
*/ | |
class SimpleClass() { | |
public static void main(String[] args) { | |
new SimpleClass(); |
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 org.apache.commons.codec.digest.DigestUtils; | |
import org.apache.commons.lang3.ArrayUtils; | |
import org.apache.commons.lang3.RandomUtils; | |
import org.apache.commons.lang3.StringUtils; | |
import java.io.IOException; | |
import java.net.*; | |
import java.nio.charset.StandardCharsets; | |
import java.util.Arrays; | |
import java.util.List; |
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 io.leonard.Base58; | |
import org.apache.commons.codec.binary.Hex; | |
import javax.crypto.BadPaddingException; | |
import javax.crypto.Cipher; | |
import javax.crypto.IllegalBlockSizeException; | |
import javax.crypto.NoSuchPaddingException; | |
import java.io.*; | |
import java.nio.ByteBuffer; | |
import java.nio.ByteOrder; |
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 org.white5moke.util.ByteSplitter; | |
import java.io.IOException; | |
import java.net.*; | |
import java.nio.charset.StandardCharsets; | |
class Cj5xNode extends Thread { | |
private DatagramSocket socketIn; | |
private DatagramSocket socketOut; | |
private boolean isRunning = false; |
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 socket | |
import threading | |
import time | |
class Client: | |
def __init__(self): | |
self.host = socket.gethostname() | |
self.port = 5000 | |
self.client_socket = socket.socket() |
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
# 2022-0313 | |
# openssl way to generate a ECDSA signing private key | |
openssl ecparam -name prime256v1 -genkey -noout -out signing-priv.pem | |
# a f'ing mess below. BEWARE | |
# If you have an array of characters of length n, do you want to partition the array into a two dimensional array with equal dimensions | |
# | |
# tArray[s][t] = arr[sm+t] for 0<=s<m, 0<=t<m, if sm+t<n, tArray[s][t] = null |
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
@startuml | |
!theme crt-green | |
skinparam actorStyle Hollow | |
allowmixing | |
rectangle Battlement { | |
object InternalAgent { | |
response = false | |
} | |
object ExternalAgent { |
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 org.apache.commons.codec.binary.Hex; | |
import org.apache.commons.codec.digest.DigestUtils; | |
import org.apache.commons.lang3.StringUtils; | |
import java.nio.charset.StandardCharsets; | |
import java.security.NoSuchAlgorithmException; | |
import java.time.Instant; | |
class PoW { | |
private int bitsNeeded = 0; |
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
package org.white5moke; | |
import java.io.IOException; | |
import java.net.*; | |
import java.nio.charset.StandardCharsets; | |
class Peer5 { | |
public Sender sender; | |
public Receiver receiver; | |
public int port; |
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
package org.white5moke; | |
import org.apache.commons.lang3.math.NumberUtils; | |
import org.hipparchus.analysis.function.Sigmoid; | |
import org.hipparchus.analysis.function.Tanh; | |
import org.openscience.cdk.math.RandomNumbersTool; | |
import java.security.SecureRandom; | |
import java.time.Instant; | |
import java.time.ZoneId; |
OlderNewer