Skip to content

Instantly share code, notes, and snippets.

View takabow's full-sized avatar

Taka Sato takabow

View GitHub Profile
package main
import (
"flag"
"fmt"
"log"
"os"
"time"
"cloud.google.com/go/spanner"
"github.com/google/uuid"
@takabow
takabow / cluster_sample.bas
Last active August 29, 2015 13:57
riak-vba-client sample
Dim cluster As RiakCluster
Set cluster = New RiakCluster
Dim node1 As RiakNode
Set node1 = New RiakNode
node1.RemoteAddress = "192.168.0.1"
node1.Port = 10018
Dim node2 As RiakNode
Set node2 = New RiakNode
@takabow
takabow / fetch_sample.bas
Created March 31, 2014 20:43
riak-vba-client sample
Dim node As RiakNode
Set node = New RiakNode
node.RemoteAddress = "127.0.0.1"
node.Port = 10018
Dim response As RiakResponse
Set response = node.Fetch("bucket1", "key1")
If response.isSuccess Then
Dim obj As RiakObject
@takabow
takabow / store_sample.bas
Created March 31, 2014 20:41
riak-vba-client sample
Dim node As RiakNode
Set node = New RiakNode
node.RemoteAddress = "127.0.0.1"
node.Port = 10018
Dim response As RiakResponse
Set response = node.Store("bucket1", "key1", "hello,riak,vba,client", "text/csv")
If response.isSuccess Then
MsgBox "Object stored!"
import com.tangosol.net.CacheFactory;
import com.tangosol.net.NamedCache;
public class TestClient {
public static void main(String[] args) {
NamedCache cache = CacheFactory.getCache("TestCache");
System.out.println("TestClient.main() - put data to the TestCache");
for (int i = 0; i < 50; ++i) {
<?xml version="1.0"?>
<cache-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://xmlns.oracle.com/coherence/coherence-cache-config"
xsi:schemaLocation="http://xmlns.oracle.com/coherence/coherence-cache-config http://xmlns.oracle.com/coherence/coherence-cache-config/1.2/coherence-cache-config.xsd">
<defaults>
<serializer>pof</serializer>
</defaults>
<caching-scheme-mapping>
<cache-mapping>
import java.util.Set;
import com.basho.riak.client.IRiakClient;
import com.basho.riak.client.IRiakObject;
import com.basho.riak.client.RiakException;
import com.basho.riak.client.RiakFactory;
import com.basho.riak.client.bucket.Bucket;
import com.tangosol.net.cache.BinaryEntryStore;
import com.tangosol.util.Base;
import com.tangosol.util.Binary;