-
Open multiple ssh sessions to all nodes which are communicating together
ssh [email protected] ssh [email protected] ssh [email protected] ssh [email protected] ssh [email protected]
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
| # List of commands to use to create a cluster with Ambari Installed | |
| # Sourced from the Ambari Quick Start guide | |
| # https://cwiki.apache.org/confluence/display/AMBARI/Quick+Start+Guide | |
| # Get Repo | |
| git clone https://github.com/u39kun/ambari-vagrant.git | |
| # Add hosts to Local Hosts File | |
| sudo -s 'cat ambari-vagrant/append-to-etc-hosts.txt >> /etc/hosts' |
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
| mkdir ~/Documents/TKPSource | |
| cd ~/Documents/TKPSource | |
| LOC=$(system_profiler SPApplicationsDataType | grep Eclipse.app | grep -o '\/.*.app') | |
| echo "LOCATION: $LOC" | |
| if ! [ -a $LOC ]; then | |
| echo "==============================================" | |
| echo "DOWNLOADING ECLIPSE" | |
| echo "==============================================" | |
| curl -L http://mirror.cc.columbia.edu/pub/software/eclipse/technology/epp/downloads/release/luna/SR2/eclipse-java-luna-SR2-macosx-cocoa-x86_64.tar.gz -o eclipse-luna.tar.gz | |
| echo "==============================================" |
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
| //Detect if a character is uppercase | |
| int ALPHA_DIFF = 'a' - 'A'; | |
| //Determine if a character is uppercase, lowercase, or non-alphabetic. | |
| int isUppercase(char a) { | |
| if (a >= 'a' && a <= 'z') { | |
| //a is lowercase | |
| return 0; | |
| } else if (a >= 'A' && a <= 'Z') { |
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
| import socket | |
| import fcntl | |
| import struct | |
| import sys | |
| def get_ip_address(ifname): | |
| s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
| return socket.inet_ntoa(fcntl.ioctl( | |
| s.fileno(), | |
| 0x8915, # SIOCGIFADDR | |
| struct.pack('256s', ifname[:15]) |
This document describes how to modify your system in order to get devices using the RTL8192cu wireless driver to be able to communicate among one another in IEEE 802.11 Ad Hoc networks.
First, you're going to need static IP addresses. So decide on the range and subnet of the addresses you would like to use. This document will use the range 192.168.2.11-15 for 5 nodes.
Next you'll need to gather your nodes and gather all of their ifconfig information. Simply run ifconfig to get the information. It should look something like the following:
pi@raspberrypi:~ $ ifconfig
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
| public class BTree<T extends Comparable<T>> { | |
| public static void main (String[] args) { | |
| printScoreReport(test()); | |
| // You can write more code to test your methods under here. | |
| } | |
| protected BSTNode<T> root; | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| package search; | |
| import java.io.*; | |
| import java.util.*; | |
| public class LSETester { | |
| public static void main(String[] args) throws FileNotFoundException { | |
| LittleSearchEngine lse = new LittleSearchEngine(); |
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
| import java.util.*; | |
| public class myclass { | |
| static boolean recursion_proper = false; | |
| static int original_input = 123123123; | |
| static int recursion_count = 0; | |
| public static void main(String[] args) { | |
| System.out.println("Hello, World!"); | |
| DecToBin(Integer.parseInt(args[0])); |
OlderNewer