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.
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]; |
.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 |
.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 | |
array_a: .word 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19 | |
array_b: .word 0x7fffffff, 0x7ffffffe, 0x7ffffffd, 0x7ffffffc, 0x7ffffffb, 0x7ffffffa, 0x7ffffff9, 0x7ffffff8, 0x7ffffff7, 0x7ffffff6 | |
output_a: .asciiz "Sum a = " | |
output_b: .asciiz "Sum b = " | |
new_line: .asciiz "\n" | |
.text # text section |
# 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) |
filter.lfs.required=true | |
filter.lfs.clean=git-lfs clean -- %f | |
filter.lfs.smudge=git-lfs smudge -- %f | |
filter.lfs.process=git-lfs filter-process | |
user.name=kamontat | |
[email protected] | |
core.excludesfile=/Users/kamontat/.gitignore_global | |
core.autocrlf=input | |
difftool.sourcetree.cmd=opendiff "$LOCAL" "$REMOTE" | |
difftool.sourcetree.path= |
object GHObjectBuilder { | |
// build function | |
fun <T : Any> build(tClass: KClass<T>, json: JsonObject): T? { | |
// check primary constructor | |
if (tClass.primaryConstructor == null) return null | |
// create parameter mapping | |
val map: HashMap<KParameter, Any?> = HashMap<KParameter, Any?>() | |
// for each paramete in constructor | |
tClass.primaryConstructor!!.parameters.forEach { | |
param -> |
// file name unnecessary to match with annotation name | |
// Target must matching (if not you will cannot get from annotations) | |
@Target(AnnotationTarget.VALUE_PARAMETER) | |
annotation class JsonKey(val key: String) |
#!/bin/bash | |
# make sure that you give permission to this file | |
# run chmod 755 atom-plugin.sh | |
# or chmod +x atom-plugin.sh | |
# ----------------------------------------- | |
# command setting | |
if ! command -v apm >/dev/null 2>&1 && ! command -v apm-beta >/dev/null 2>&1; then | |
echo "you don't have commandline interface, install it!" |