Skip to content

Instantly share code, notes, and snippets.

View mpenick's full-sized avatar
🍵

Michael Penick mpenick

🍵
View GitHub Profile
@mpenick
mpenick / output.txt
Last active July 7, 2016 21:14
C/C++ Solr Example
id: 40969, ethnicity: 'Not Hispanic'
id: 9979, ethnicity: 'Not Hispanic'
id: 9339, ethnicity: 'Not Hispanic'
id: 18320, ethnicity: 'Not Hispanic'
id: 7075, ethnicity: 'Not Hispanic'
id: 39617, ethnicity: 'Not Hispanic'
id: 47076, ethnicity: 'Not Hispanic'
id: 7099, ethnicity: 'Not Hispanic'
id: 38875, ethnicity: 'Not Hispanic'
id: 37982, ethnicity: 'Not Hispanic'
<?php
$cluster = Cassandra::cluster()->build();
$session = $cluster->connect();
$session->execute(new Cassandra\SimpleStatement(
"CREATE KEYSPACE IF NOT EXISTS totalsocial
WITH replication = { 'class': 'SimpleStrategy', 'replication_factor': '3' }"));
$session->execute(new Cassandra\SimpleStatement(
<?php
$cluster = Cassandra::cluster()->build();
$session = $cluster->connect();
$session->execute(new Cassandra\SimpleStatement(
"CREATE KEYSPACE IF NOT EXISTS test WITH replication =
{'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true;")
);
<?php
$cluster = Cassandra::cluster()->build();
$session = $cluster->connect();
$session->execute(new Cassandra\SimpleStatement(
"CREATE KEYSPACE IF NOT EXISTS examples
WITH replication = { 'class': 'SimpleStrategy', 'replication_factor': '3' }"));
$session->execute(new Cassandra\SimpleStatement(
<?php
$cluster = Cassandra::cluster()->build();
$session = $cluster->connect();
$session->execute(new Cassandra\SimpleStatement(
"CREATE KEYSPACE IF NOT EXISTS examples
WITH replication = { 'class': 'SimpleStrategy', 'replication_factor': '3' }"));
$session->execute(new Cassandra\SimpleStatement(
"CREATE TABLE IF NOT EXISTS examples.test (key int PRIMARY KEY, value text)"));
template<class T, void (*FreeFunction)(T*)>
class Deleter {
public:
void operator()(T* object) {
if (object) {
FreeFunction(object);
}
}
};
namespace cass {
struct Memory {
static void* operator new(std::size_t size) {
printf("in-class new\n");
return malloc(size);
}
static void* operator new[](std::size_t size) {
printf("in-class new[]\n");
#include <assert.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "cassandra.h"
struct Basic_ {
cass_bool_t bln;
cass_float_t flt;
require "formula"
class CassandraCppDriver < Formula
homepage "http://datastax.github.io/cpp-driver/"
url "https://github.com/datastax/cpp-driver/archive/2.2.0.tar.gz"
sha1 "743275f46c54944cd81d6c17674e62b96d65ccd0"
version "2.2.0"
head "git://github.com:datastax/cpp-driver.git", :branch => "master"
diff --git a/support/ccm.php b/support/ccm.php
index 32fccff..135f3f0 100644
--- a/support/ccm.php
+++ b/support/ccm.php
@@ -129,7 +129,7 @@ class CCM
return array('active' => $active, 'list' => $clusters);
}
- public function setup($dataCenterOneNodes, $dataCenterTwoNodes)
+ private function internalSetup($dataCenterOneNodes, $dataCenterTwoNodes)