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 LinkedList { | |
| private Node head; | |
| private Node tail; | |
| public LinkedList() { | |
| } | |
| private class Node { |
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.lang.StringBuilder; | |
| public class UserInput { | |
| public static class TextInput{ | |
| StringBuilder input = new StringBuilder(); | |
| public void add(char c) { | |
| input.append(c); | |
| } |
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 SortedSearch { | |
| public static int countNumbers(int[] sortedArray, int lessThan) { | |
| int left = 0; | |
| int right = sortedArray.length - 1; | |
| int count = 0; | |
| while (left <= right) | |
| { |
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
| [Unit] | |
| Description=Node server | |
| Documentation=https://google.com | |
| After=network.target | |
| [Service] | |
| Environment=HOST=0.0.0.0 | |
| Environment=PORT=3000 | |
| Type=simple | |
| User=ubuntu |
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
| #!/bin/bash | |
| # chkconfig: 2345 20 80 | |
| # description: Description comes here.... | |
| ### BEGIN INIT INFO | |
| ### END INIT INFO | |
| # Source function library. | |
| #. /etc/init.d/functions | |
| start() { | |
| # code to start app comes here |
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
| # Install Go-Ethereum (geth) | |
| brew tap ethereum/ethereum | |
| brew install ethereum | |
| # Install node modules to support Ethereum front end | |
| npm install ethereumjs-testrpc [email protected] | |
| npm install solc | |
| npm install -g truffle | |
| npm install -g webpack | |
| # Run an in-memory test Ethereum blockchain |
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 hmac | |
| import os | |
| import hashlib | |
| import base64 | |
| import unittest | |
| __author__ = 'drem' | |
| class SecurityUtil(object): |
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 com.drem.security.util; | |
| import java.io.FileNotFoundException; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.io.UnsupportedEncodingException; | |
| import java.security.GeneralSecurityException; | |
| import java.security.SecureRandom; | |
| import java.util.Properties; | |
| import java.util.Random; |
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.io.*; | |
| import java.util.*; | |
| /* | |
| * To execute Java, please define "static void main" on a class | |
| * named Solution. | |
| * | |
| * If you need more classes, simply define them inline. | |
| */ |
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.io.*; | |
| import java.util.*; | |
| /* | |
| * To execute Java, please define "static void main" on a class | |
| * named Solution. | |
| * | |
| * If you need more classes, simply define them inline. | |
| */ |