Skip to content

Instantly share code, notes, and snippets.

View komamitsu's full-sized avatar

Mitsunori Komatsu komamitsu

View GitHub Profile
package org.komamitsu.test;
import org.codehaus.commons.compiler.CompilerFactoryFactory;
import org.codehaus.commons.compiler.IClassBodyEvaluator;
import java.lang.reflect.Method;
public class JaninoExample
{
public int add(int a, int b)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MeScript : MonoBehaviour {
void Update() {
transform.Rotate(0, Input.GetAxis("Horizontal") * 60 * Time.deltaTime, 0);
transform.Translate(Vector3.forward * Input.GetAxis("Vertical") * 0.2f, Space.Self);
}

LSNs

  • VCL

    • Volume Complete LSN
    • Guarantee availability of all prior log records
    • During storage recovery, every log record with an LSN larger than the VCL must be truncated
  • VDL

    • Volume Durable LSN
  • Consistency Point LSNs

2.7.1
[info] Test org.msgpack.jackson.dataformat.benchmark.MessagePackDataformatHugeDataBenchmarkTest.testBenchmark started
serialize(huge) with JSON:
mean : 28.948
min : 28.728
max : 29.139
stdev: 0.180
serialize(huge) with MessagePack:
mean : 31.686
thread 'main' panicked at 'called `Result::unwrap()` on
an `Err` value: JsonDecodeError(ApplicationError("Could not parse \'2017-04-24T14:33:43Z\' as a TimeStamp."))',src/libcore/result.rs:859
public static void main(String[] args)
throws IOException
{
DoubleArrayTrie da = new DoubleArrayTrie();
List<String> lines = new ArrayList<>();
try (BufferedReader reader = new BufferedReader(new FileReader("/Users/komamitsu/tmp/sorted_uuids"))) {
String line;
while ((line = reader.readLine()) != null) {
lines.add(line);
}
// cc -c dartest.cpp && c++ -o dartest dartest.o
#include <chrono>
#include <iostream>
#include <string>
#include <algorithm>
#include <fstream>
#include <darts.h>
using namespace std;
require 'minecraft-pi-ruby'
N = 41
xs = []
(N + 2).times do |y|
xs[y] = ' ' * (N + 2)
end
require 'pp'
def print_plates(plates, disp_interval)
max_plate = plates.map{|plate| plate.max || 0}.max
puts
max_plate.downto(0) do |i|
plates.each do |plate|
width = plate[i].to_i
full_width = [width * 2 - 1, 0].max
max_plate_full_width = max_plate * 2 - 1
  • TaskCallbackApi (and SecretProvider) are the only interface for agents to access database.