Skip to content

Instantly share code, notes, and snippets.

@Jenjen1324
Jenjen1324 / java.lang.Boolean-autoboxing.md
Created April 5, 2021 15:20
Java `Boolean.TRUE` vs `true` when assigning to Boolean

Test.java content:

public class Test {

    public Boolean mBoolean;

    public void foo() {
        this.mBoolean = Boolean.TRUE;
 }
/**
* Finds a node from a tree-like datastructure
*
* Could be easily implemented as DFS by switching `stack.shift()` to `stack.pop()`
*
* @param rootNode Root node of the tree-like datastructure
* @param obtainChildren Return children of a given node
* @param test Return true if the given node is the searched for one
* @returns {?T} the given node if found or null
*/
@Jenjen1324
Jenjen1324 / wallabag-proxy.conf
Created April 27, 2020 12:55
Wallabag proxy configuration
upstream wallabag {
server localhost:33080;
keepalive 32;
}
server {
listen 10.42.0.100:80;
server_name wallabag.redacted.tld;
location / {
return 301 "https://wallabag.redacted.tld";
@Jenjen1324
Jenjen1324 / AEBus.java
Last active August 28, 2023 07:58
Easy Communication between an Activity and BroadcastReceiver which is safe from Memory Leaks
package ch.jvogler.aebus;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import java.io.Serializable;
import java.lang.reflect.InvocationHandler;
import tensorflow as tf
import numpy as np
import pandas
import os
os.environ["TF_CPP_MIN_LOG_LEVEL"]="2" #ignore warnings
import tensorflow as tf
import csv
import argparse
def normalize_cols(m):
@Jenjen1324
Jenjen1324 / minecrafthelp_index.md
Last active August 29, 2015 14:01
#MinecraftHelp index
Name Text
account/activation If you have paid for a gift code or for your own account but have not been activated yet, see: http://is.gd/mc_activation
account/billing If you have further questions about accounts and billing, see: http://help.mojang.com/customer/portal/articles/329762-i-paid-for-a-gift-code-but-haven%E2%80%99t-received-it
account/hacked If you believe that your account was hacked, then please follow these instructions: http://help.mojang.com/customer/portal/articles/361483;;Note: If you have to contact Mojang, do not forget to include your transaction ID!
ask Please don't ask to ask or just say "I need help" - just ask your question or state what you need help with, and be as specific as possible.;;If you are unsure if the question is appropriate, just ask it and you will be informed if it is not.
ask/howto Please read http://www.catb.org/~esr/faqs/smart-questions.html#before - An excellent article on how best to ask a question of techinical support personnel or other experts.
ask/