These are some simple bash functions and scripts for making CSV/TSV files prettier on the command line
see http://stefaanlippens.net/pretty-csv.html for more information.
These are some simple bash functions and scripts for making CSV/TSV files prettier on the command line
see http://stefaanlippens.net/pretty-csv.html for more information.
| //TODO update objects to show optional parameters | |
| //TODO expand on Function parameters | |
| //TODO add enum types | |
| //TODO add error types | |
| declare module Braintree { | |
| /********************** | |
| * Errors * |
| .data | |
| prompt1: .asciiz "Enter the sequence index\n" | |
| prompt2: .asciiz "The Fibonacci value is:\n" | |
| .text | |
| # Print prompt1 | |
| li $v0, 4 | |
| la $a0, prompt1 | |
| syscall |
| function db_exists(db_name) { | |
| db = db.getSiblingDB('admin'); | |
| db.runCommand('listDatabases').databases.forEach(function(db_entry){ | |
| if (db_entry.name == db_name) { | |
| // quit with exit code zero if we found our db | |
| quit(0); | |
| } | |
| }); | |
| // quit with exit code 1 if db was not found |
| .globl main | |
| .data | |
| msgprompt: .word msgprompt_data | |
| msgres1: .word msgres1_data | |
| msgres2: .word msgres2_data | |
| msgprompt_data: .asciiz "Positive integer: " | |
| msgres1_data: .asciiz "The value of factorial(" | |
| msgres2_data: .asciiz ") is " |
| D [0-9] | |
| L [a-zA-Z_] | |
| H [a-fA-F0-9] | |
| E ([Ee][+-]?{D}+) | |
| P ([Pp][+-]?{D}+) | |
| FS (f|F|l|L) | |
| IS ((u|U)|(u|U)?(l|L|ll|LL)|(l|L|ll|LL)(u|U)) | |
| %{ | |
| #include <stdio.h> |