I hereby claim:
- I am whoshuu on github.
- I am huu (https://keybase.io/huu) on keybase.
- I have a public key ASAYE35aWCYUWw6wKdnEzgDJmwgArqrQ1m9OfR-rBSfzLAo
To claim this, I am signing this object:
#!/bin/bash | |
########################################################################################### | |
# bootstrap.sh | |
# | |
# To run directly from web: | |
# wget -O - https://gist.githubusercontent.com/whoshuu/11159710/raw/bootstrap.sh | bash | |
# Else: | |
# ./bootstrap.sh | |
# |
I hereby claim:
To claim this, I am signing this object:
#include <curl/curl.h> | |
#include <string> | |
size_t writeFunction(void *ptr, size_t size, size_t nmemb, std::string* data) { | |
data->append((char*) ptr, size * nmemb); | |
return size * nmemb; | |
} | |
int main(int argc, char** argv) { | |
auto curl = curl_easy_init(); |
#include <iostream> | |
#include <zmq.hpp> | |
#include "basic.pb.h" | |
int main(int argc, char** argv) { | |
zmq::context_t context{1}; | |
zmq::socket_t sender{context, ZMQ_PAIR}; | |
zmq::socket_t receiver{context, ZMQ_PAIR}; | |
sender.bind("tcp://*:*"); |
#include <vector> | |
class range { | |
public: | |
typedef std::vector<long>::const_iterator const_iterator; | |
range(long end) : range(0, end) {} | |
range(long begin, long end, long step = 1) { | |
long diff = end - begin; |
for(auto i = 0; i < 100000; ++i) { | |
// This is a basic for-loop, duh! | |
} |
--- | |
Language: Cpp | |
# BasedOnStyle: Google | |
AccessModifierOffset: -2 | |
AlignAfterOpenBracket: true | |
AlignEscapedNewlinesLeft: true | |
AlignOperands: true | |
AlignTrailingComments: true | |
AllowAllParametersOfDeclarationOnNextLine: true | |
AllowShortBlocksOnASingleLine: false |
This problem actually goes by another name, but to throw off cheaters, I'll use "folding" to describe the following property:
A folding sequence is a sequence of numbers where the difference between consecutive numbers in the sequence alternate in sign. A difference of 0 is defined to have no sign, so any sequence with consecutive repeating numbers is by definition a non-folding sequence.
To illustrate, these are folding sequences:
1
#!/usr/bin/env bash | |
# add repository for g++-5 | |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
# add repository for clang-3.7 | |
sudo add-apt-repository -y "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.7 main" | |
wget --quiet -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add - |
This problem actually goes by another name, but to throw off cheaters, I'll use "folding" to describe the following property:
A folding sequence is a sequence of numbers where the difference between consecutive numbers in the sequence alternate in sign. A difference of 0 is defined to have no sign, so any sequence with consecutive repeating numbers is by definition a non-folding sequence.
To illustrate, these are folding sequences:
1