run command with specify sscript and version
- docker
- run script file
- test script files (optional)
run by './run' 'argument', if wrong you might didn't give permission to it.
# Usually use | |
# |set|option|#|option-name|->|description| | |
set -e # errexit -> Exit immediately if non-zero code returned. | |
set -v # verbose -> Display shell input lines as they are read. | |
set -x # xtrace -> Display commands and their arguments as they are executed. | |
set -n # noexec -> Check syntax of the script but don't execute. | |
# Often use | |
set -b # notify -> Reported cause the status of terminated bg jobs immediately. | |
set -h # hashall -> Locate and remember (hash) commands as they are looked up for execution. | |
set -m # monitor -> Job control is enabled (https://www.gnu.org/software/bash/manual/html_node/Job-Control.html#Job-Control) |
.data # data section | |
spacebar: .asciiz " " | |
.text # text section | |
.globl main # call main by SPIM | |
my_recursive_func: | |
# shift for save return address |
.data # data section | |
data: .word 132470, 324545, -4, 73245, 93245, 80324542, 244, 2, 66, 236, 327, -7, 236, 21544 | |
size: .word 14 | |
spacebar: .asciiz " " | |
.text # text section | |
.globl main # call main by SPIM |
import java.util.*; | |
public class SearchRange { | |
public static void main(String[] agrs) { | |
Scanner input = new Scanner(System.in); | |
System.out.print("Enter n: "); | |
int n = Integer.parseInt(input.nextLine()); | |
String[] textNums = input.nextLine().split(" "); | |
int[] numbers = new int[textNums.length]; |
function v5(h) { | |
var percent = Math.ceil(Math.random() * 100) | |
switch (h) { | |
case "g": | |
if (percent > 65) | |
return 5 // 35% | |
else if (percent > 40) | |
return 4 // 25% | |
else if (percent > 20) | |
return 3 // 20% |
#!/usr/bin/env bash | |
# set -x #DEBUG - Display commands and their arguments as they are executed. | |
# set -v #VERBOSE - Display shell input lines as they are read. | |
# set -n #EVALUATE - Check syntax of the script but don't execute. | |
# ------------------------------------------------- | |
# Create by: Kamontat Chantrachirathumrong | |
# ------------------------------------------------- | |
# Version: 0.0.1 -- finish |
#!/bin/bash | |
# <bitbar.title>command shortcut</bitbar.title> | |
# <bitbar.version>v1.1</bitbar.version> | |
# <bitbar.since>9 Mar 2018</bitbar.since> | |
# <bitbar.author>kamontat</bitbar.author> | |
# <bitbar.author.github>kamontat</bitbar.author.github> | |
# <bitbar.desc>Show setting shortcut keys</bitbar.desc> | |
# <bitbar.dependencies>bash</bitbar.dependencies> |
# Shutdown your computer (Mac) | |
# Press `Command+S` and turn computer on. | |
# Press, until computer open black screen | |
## Type below to the screen | |
# Mount root dir | |
/sbin/mount -uw / | |
# remove setup entry | |
rm /var/db/.applesetupdone |