This file contains hidden or 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
// The biggest 64bit prime | |
#define P 0xffffffffffffffc5ull | |
#define G 5 | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <assert.h> | |
#include <stdlib.h> | |
// calc a * b % p , avoid 64bit overflow |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<!-- This is a template for Web App Setup --> | |
<!-- Author : @CashLee李秉骏 --> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0"> | |
<meta name="apple-mobile-web-app-capable" content="yes"> | |
<!-- Web App icon --> | |
<meta name="apple-mobile-web-app-status-bar-style" content="black" /> |
This file contains hidden or 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 java.util.BitSet; | |
import redis.clients.jedis.Jedis; | |
public class SieveOfEratosthenes { | |
private static String sieveSetKeyCorrected = "correct_sieve"; | |
private static String sieveSetKeyDefaultJava = "wrong_sieve"; | |
private static String spoolSieve = "sieve_set_bits"; |
This file contains hidden or 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
$ pgrep java | |
3464 | |
$ clhsdb | |
hsdb> attach 3464 | |
Attaching to process 3464, please wait... | |
hsdb> jsload objtree.js | |
hsdb> objtree 0xc99f6378 | |
Oop for java/util/HashSet @ 0x00000000c99f6378 (size of 16) | |
_mark: 5 | |
map: Oop for java/util/HashMap @ 0x00000000c99f6388 (size of 48) |