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
function reducer(state = {books: []}, action) { | |
switch (action.type) { | |
case "SET_RECOMMENDED": | |
return {books: action.payload}; | |
default: | |
state; | |
} | |
} | |
function mapStateToPros(state) { |
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
#[macro_use] extern crate soa_derive; | |
// lib | |
trait MyTrait:Sized { | |
type V; | |
type S; | |
fn new() -> Pl<Self::V>; | |
fn new_slice(s: Self::S) -> Pl<Self::S>; |
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
#![feature(specialization)] | |
use std::marker::PhantomData; | |
pub trait PHash<T> { | |
fn new() -> T; | |
} | |
// pub trait PHashFun<K,V> { | |
// fn |
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
#![feature(duration_as_u128)] | |
#[macro_use] | |
extern crate bson; | |
extern crate mongodb; | |
use std::time::Instant; | |
use mongodb::db::ThreadedDatabase; | |
use mongodb::ThreadedClient; | |
//use mongodb::common::WriteConcern; |
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 main | |
import ( | |
"time" | |
"github.com/globalsign/mgo" | |
"time" | |
"github.com/globalsign/mgo" | |
) | |
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
create table t1 (k String, v UInt64) ENGINE MergeTree() partition by tuple() ORDER BY k | |
insert into t1 select 'a' as k, number as v from system.numbers limit 5 | |
insert into t1 select 'b' as k, number as v from system.numbers limit 10 | |
select k, arrayCumSum(groupArray(v)) as g from t1 group by k | |
select * from (select k, v, arrayCumSum(groupArray(v) as v) as g from t1 group by k) array join v, g |
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
# clone graphite-clickhouse-tldr | |
version: '2.0' | |
services: | |
zoo1: | |
image: zookeeper | |
restart: always | |
hostname: zoo1 | |
ports: |
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
<test> | |
<!-- clickhouse performance-test --lite --input-file simple_insert.xml --> | |
<name>simple_insert</name> | |
<type>loop</type> | |
<stop_conditions> | |
<all_of> | |
<total_time_ms>30000</total_time_ms> | |
</all_of> |
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
<test> | |
<!-- clickhouse performance-test --lite --input-file test.xml --> | |
<name>test</name> | |
<type>loop</type> | |
<stop_conditions> | |
<all_of> | |
<total_time_ms>30000</total_time_ms> | |
</all_of> |
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
<test> | |
<name>test</name> | |
<type>loop</type> | |
<stop_conditions> | |
<all_of> | |
<total_time_ms>30000</total_time_ms> | |
</all_of> | |
<any_of> |
OlderNewer