This file contains 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 <iostream> | |
#include <cstdlib> | |
int num_bits2(long n) { | |
int i = 0; | |
for(i = 0; n; i++) | |
n &= n - 1; | |
return i; | |
} |
This file contains 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
.encoding = "UTF-8" | |
displayname = "MapR-Sandbox-For-Hadoop-3.0.3" | |
guestos = "rhel6-64" | |
virtualhw.version = "8" | |
config.version = "8" | |
numvcpus = "2" | |
cpuid.coresPerSocket = "1" | |
memsize = "6144" | |
pciBridge0.present = "TRUE" | |
pciBridge4.present = "TRUE" |
This file contains 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
/* | |
C++11 Algorithm example | |
Compile: clang++ -std=c++11 -static this.cc | |
*/ | |
#include <iostream> | |
#include <algorithm> | |
#include <string> | |
#include <vector> | |
int numbers[] = {1, 2, 42, 7, 0}; |
This file contains 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
Error: Multilib version problems found. This often means that the root | |
cause is something else and multilib version checking is just | |
pointing out that there is a problem. Eg.: | |
1. You have an upgrade for libselinux which is missing some | |
dependency that another package requires. Yum is trying to | |
solve this by installing an older version of libselinux of the | |
different architecture. If you exclude the bad architecture | |
yum will tell you what the root cause is (which package | |
requires what). You can try redoing the upgrade with |
This file contains 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
{ | |
"variables": { | |
"mapr_version": "3.1.1" | |
}, | |
"builders": [ | |
{ | |
"name" : "sandbox-partner", | |
"vm_name" : "MapR-Sandbox-For-Hadoop-Partner-{{ user `mapr_version` }}", | |
"type" : "virtualbox-ovf", | |
"source_path" : "output-sandbox/MapR-Sandbox-Base-For-Hadoop-{{ user `mapr_version` }}.ova", |
This file contains 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
[root@ip-10-196-18-178 ~]# yum install mapr-hive-0.12 | |
Loaded plugins: fastestmirror, presto | |
Loading mirror speeds from cached hostfile | |
* base: mirror.hmc.edu | |
* epel: linux.mirrors.es.net | |
* extras: mirror.hmc.edu | |
* updates: mirrors.centarra.com | |
Setting up Install Process | |
No package mapr-hive-0.12 available. | |
Error: Nothing to do |
This file contains 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
FROM centos:centos6 | |
MAINTAINER foo@bar.com | |
ADD ./file1 /opt/example/ | |
ADD ./file2 /opt/example/ | |
ADD ./dir1 /opt/example/ | |
ADD ./dir2 /opt/example/ | |
RUN ls -l /opt/example | |
docker build -t 'deleteme' . | |
Sending build context to Docker daemon 9.728 kB |
This file contains 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 <iostream> | |
#include <string> | |
using namespace std; | |
template<typename T> | |
struct Node { | |
T item; | |
struct Node<T> *next; | |
}; |
This file contains 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<iostream> | |
template<typename T> | |
class Node { | |
public: | |
T data; | |
Node<T>* next; | |
}; | |
template<typename T> class List; |
This file contains 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
use std::os; | |
fn main() { | |
let (tx, rx) = channel(); | |
let args = os::args(); | |
let mut max_messages: uint = 10u; | |
println!("Command line args len: {}", args.len()); |
OlderNewer