<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
open System | |
let pr x = printfn "%A" x | |
let mc nb = | |
let rnd = System.Random() | |
let n () = rnd.NextDouble() | |
let act () = | |
if System.Math.Sqrt(n() ** 2.0 + n() ** 2.0) < 1.0 then 1 else 0 |
const cap = (s) => (s.charAt(0).toUpperCase() + s.slice(1)); | |
String.prototype.ucFirst = function () { return cap(this); } | |
String.prototype.toCamelCase = function() { | |
return this.toLowerCase().split('_').map((p, i) => { | |
return i === 0 ? p : p.ucFirst(); | |
}).join(''); | |
} | |
function normalize(data) { |
import language.postfixOps | |
import akka.actor._ | |
import akka.stream._ | |
import akka.stream.scaladsl._ | |
import akka.util.Timeout | |
import scala.util.Try | |
import scala.concurrent.Future | |
import scala.concurrent.duration._ |
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
// C++11 32bit FNV-1 and FNV-1a string hasing (Fowler–Noll–Vo hash) | |
// | |
// Requires a compiler with C++11 support | |
// See main(...) for examples | |
#include <iostream> | |
#include <cassert> | |
namespace hash | |
{ |
=hash.h=
typedef unsigned long ulong_t;
typedef unsigned int uint_t;
=djb2= this algorithm (k=33) was first reported by dan bernstein many years ago in comp.lang.c. another version of this algorithm (now favored by bernstein) uses xor: hash(i) = hash(i - 1) * 33 ^ str[i]; the magic of number 33 (why it works better than many other constants, prime or not) has never been adequately explained.
unsigned long hash(unsigned char *str)
{
#define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */ | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <limits.h> | |
#include <string.h> | |
struct entry_s { | |
char *key; | |
char *value; |
The HBase Indexer provides the ability to stream events from HBase to Solr for near real time searching. The HBase indexer is included with HDPSearch as an additional service. The indexer works by acting as an HBase replication sink. As updates are written to HBase, the events are asynchronously replicated to the HBase Indexer processes, which in turn creates Solr documents and pushes them to Solr.
#!/usr/bin/env python | |
# with help and inspiration from | |
# * ASN1_generate_nconf(3) (specifically the SubjectPublicKeyInfo structure) | |
# * http://www.sysmic.org/dotclear/index.php?post/2010/03/24/Convert-keys-betweens-GnuPG%2C-OpenSsh-and-OpenSSL | |
# * http://blog.oddbit.com/2011/05/converting-openssh-public-keys.html | |
import sys | |
import base64 | |
import struct |