$ sudo apt-get update
$ sudo apt-get install unzip wget
$ wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
$ unzip ngrok-stable-linux-amd64.zip
$ sudo mv ./ngrok /usr/bin/ngrok
$ ngrok
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 my.application.dao; | |
import java.util.List; | |
import my.application.entity.Book; | |
import my.application.restutil.RequestOptions; | |
public interface BookPersister { | |
List<Book> getBooks(RequestOptions requestOptions); | |
} |
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.Random; | |
public class dice { | |
// Codded by Osanda Malith Jayathissa (@OsandaMalith) | |
/* | |
Write a program that simulates the rolling of two dice. The program should use rand to roll the first die and should use rand again to roll the second die. The sum of two values should then be calculated. [Note : Each die can show an integer value from 1 to 6, so the sum of the two values will vary from 2 to 12, with 7 being the most frequent sum and 2 and 12 being the least frequent sums.] Note that there are 36 possible combinations of the two dice. Your program should roll the two dice 3,600 times. Use a one_dimensional array to tally the numbers of times each possible sum appears. Print the results in a tabular format. Also, determine if the totals are reasonable (i.e., there are six ways to roll a 7, so approximately one-sixth of all the rolls should be 7). | |
http://www.freemathhelp.com/rolling-dice.html | |
Outcome List of Combinations Total | |
2 1+1 1 | |
3 1+2, 2+1 2 |
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.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.util.Objects; |
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
<#ftl strip_whitespace=true> | |
<#import "spring.ftl" as spring /> | |
<#-- This file contains form-related macros for use in the other Freemarker template files. | |
The generated HTML is intended for use with Twitter Bootstrap based forms. --> | |
<#-- | |
* radioButtons | |
* | |
* @param path the name of the field to bind to |
- Install Git
- Create a GitHub account
- Open Terminal
/Applications/Utilities/Terminal.app
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
var xhr = _this = this, | |
new XMLHttpRequest(), | |
fd = new FormData(), | |
key = this.email + '/' + epoch.toString() + '/' + file.name; | |
// Populate the Post paramters. | |
fd.append('key', key); | |
fd.append('AWSAccessKeyId', 'XXXXXXXXXXXX'); | |
fd.append('acl', 'private'); | |
fd.append('success_action_redirect', "https://attachments.me/upload_callback") |
NewerOlder