ubuntu
12.04
14.04
Reference http://stackoverflow.com/a/18490935/2037928
Login as root
Install needed packages
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
#include <bits/stdc++.h> | |
using namespace std; | |
#define inputFile "apriorinput" | |
#define _MIN_SUPPORT 2 | |
vector<set<int> > inputVec; | |
set<int> allItems; | |
/* |
import com.jcraft.jsch.JSch | |
import com.jcraft.jsch.Session | |
import com.jcraft.jsch.UserInfo | |
import com.jcraft.jsch.Channel | |
import com.jcraft.jsch.ChannelExec | |
def sshHost = '10.1.2.132' | |
def sshUser = 'root' | |
def sshPass = '******' | |
def sshPort = 22 |
import java.util.concurrent.atomic.AtomicLong; | |
import rx.Observable.OnSubscribe; | |
import rx.*; | |
import rx.internal.operators.BackpressureUtils; | |
public final class RxRange implements OnSubscribe<Integer> { | |
final int start; | |
final int count; | |
public RxRange(int start, int count) { |
ubuntu
12.04
14.04
Reference http://stackoverflow.com/a/18490935/2037928
Login as root
Install needed packages
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
This doc proposes an abstraction to set fixture expectations for mock clients during a test run.
The goal is to treat fixtures management as first class citizen and maintain clean fixture semantics. Fixtures that belong to a specific client should reside in a centralized place associated with that client. It should be recognized that the mock client and its affinitivie fixtures together can become one functional unit. With this realization, the action of setting input/output expectations for a mock client method becomes implementation details and can be abstracted away by defining a method with the same expectation semantic on the combined functional unit. For example, instead of writing
import store "import/path/to/store/fixture"
// ad-hoc fixtures
userHeader := map[string]string{
"x-client-version": "1.1.2",
1. Create a scheduler to add new routes | |
@Scheduled(fixedRate = 300000) | |
public void updateHttpRoutes() { | |
Set<HttpRoute> routes = poolingHttpClientConnectionManager.getRoutes(); | |
for (HttpRoute route : routes) { | |
httpMetricsTracker.add(route, poolingHttpClientConnectionManager); | |
} | |
} |
import os | |
import sys | |
import filecmp | |
import re | |
import subprocess | |
from subprocess import CalledProcessError, TimeoutExpired | |
STATUS_CODES = { | |
200: 'OK', | |
201: 'ACCEPTED', |
#!/bin/bash | |
ROOT_UID=0 | |
SUCCESS=0 | |
E_USEREXISTS=70 | |
# Run as root, of course. (this might not be necessary, because we have to run the script somehow with root anyway) | |
if [ "$UID" -ne "$ROOT_UID" ] | |
then | |
echo "Must be root to run this script." | |
exit $E_NOTROOT |
#!/bin/bash -l | |
# Save this file in /usr/local/bin and chmod a+x for easy access | |
# Execute gohere to switch $GOPATH to current directory | |
# Type exit to switch back | |
# Example usage: | |
# $ echo $GOPATH | |
# |
import os | |
import filecmp | |
import re | |
codes = {200: 'success', 404: 'file_name not found', | |
400: 'error', 408: 'timeout'} | |
class program: | |
"""Class that handles all nitty gritties of a user program""" |