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
| <?php | |
| function startsWith($haystack, $needle) { | |
| $length = strlen($needle); | |
| return (substr($haystack, 0, $length) === $needle); | |
| } | |
| class DocComment { | |
| const UNINITIALIZE = 1; | |
| const INSIDE = 2; |
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
| <?php | |
| #$cluster = Dse::cluster()->build(); | |
| define("NUM_ITERATIONS", 1000); | |
| define("MICROSECONDS", 1000 * 1000); | |
| define("PERCENTILES", array(0.0, 0.5, 0.75, 0.95, 0.98, 0.99, 0.999, 0.9999, 1.0)); | |
| function print_histogram($histogram) { | |
| ksort($histogram); |
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
| #include "statement.hpp" | |
| #include "request_handler.hpp" | |
| // ... | |
| BOOST_AUTO_TEST_CASE(spec_ex) | |
| { | |
| test_utils::CassClusterPtr cluster(cass_cluster_new()); | |
| if (ccm->create_cluster(3)) { |
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
| /* | |
| This is free and unencumbered software released into the public domain. | |
| Anyone is free to copy, modify, publish, use, compile, sell, or | |
| distribute this software, either in source code form or as a compiled | |
| binary, for any purpose, commercial or non-commercial, and by any | |
| means. | |
| In jurisdictions that recognize copyright laws, the author or authors | |
| of this software dedicate any and all copyright interest in the |
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
| #!/bin/bash | |
| trap "kill -9 $$" SIGINT SIGTERM | |
| while true; do | |
| echo -n "Checking node$1..." | |
| START=$(date +%s) | |
| echo "quit" | ccm node$1 cqlsh > /dev/null 2>&1 | |
| RESULT=$? | |
| END=$(date +%s) |
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
| diff --git a/src/connection.cpp b/src/connection.cpp | |
| index 0123437..0d902dd 100644 | |
| --- a/src/connection.cpp | |
| +++ b/src/connection.cpp | |
| @@ -795,6 +795,7 @@ void Connection::on_supported(ResponseMessage* response) { | |
| // TODO(mstump) do something with the supported info | |
| (void)supported; | |
| + listener_->on_connect(this); // Allow the listener to inject a query before startup | |
| internal_write(new StartupHandler(this, new StartupRequest())); |
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
| #include <cassandra.h> | |
| int main() { | |
| /* Setup and connect to cluster */ | |
| CassFuture* connect_future = NULL; | |
| CassCluster* cluster = cass_cluster_new(); | |
| CassSession* session = cass_session_new(); | |
| /* Add contact points */ | |
| cass_cluster_set_contact_points(cluster, "127.0.0.1,..."); |
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
| require 'net/http' | |
| require 'uri' | |
| require 'openssl' | |
| #OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:options] |= OpenSSL::SSL::OP_NO_SSLv3 | |
| #OpenSSL::SSL::SSLContext::DEFAULT_PARAMS[:options] |= OpenSSL::SSL::OP_NO_SSLv2 | |
| def path_for_url(url) | |
| path = | |
| if url.path.nil? || url.path.empty? |
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
| #include <future> | |
| #include <thread> | |
| #include <mutex> | |
| #include <iostream> | |
| #include <list> | |
| #include <exception> | |
| #include <sstream> | |
| #include <cassandra.h> |
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
| /* | |
| This is free and unencumbered software released into the public domain. | |
| Anyone is free to copy, modify, publish, use, compile, sell, or | |
| distribute this software, either in source code form or as a compiled | |
| binary, for any purpose, commercial or non-commercial, and by any | |
| means. | |
| In jurisdictions that recognize copyright laws, the author or authors | |
| of this software dedicate any and all copyright interest in the |