ANSI Escape Sequences
Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
// compile with g++ -o bisect.cxx poly.o -I<path/to/boost> | |
#include <cmath> | |
#include <iostream> | |
#include <boost/math/tools/roots.hpp> | |
// Functor providing termination condition | |
// Determines convergence in x based on if the relative or absolute tolerance are satisfied | |
template<class T> |
\#!/bin/bash | |
whatscr() { echo "gccprefab - Wil's GCC easy build script"; } | |
whenscr() { echo "Last updated: Jun 11, 2022 (WYP)"; } | |
usage() { echo "Usage: $0 [options] configfile"; } | |
helptext() { | |
echo "Available options:" | |
echo " -h, --help Display this help text" |
Standard escape codes are prefixed with Escape
:
^[
\033
\u001b
\x1B
27
There are two schools how to write numerical code, which in this document we will call the IEEE school and the Fortran school.
One end of the spectrum: no changes in floating point by the compiler, the developer must express exact intent. This is the IEEE school.
On the other end of the spectrum: Developer specifies math, the compiler is
/* Allocate aligned memory in a portable way. | |
* | |
* Memory allocated with aligned alloc *MUST* be freed using aligned_free. | |
* | |
* @param alignment The number of bytes to which memory must be aligned. This | |
* value *must* be <= 255. | |
* @param bytes The number of bytes to allocate. | |
* @param zero If true, the returned memory will be zeroed. If false, the | |
* contents of the returned memory are undefined. | |
* @returns A pointer to `size` bytes of memory, aligned to an `alignment`-byte |
# make sure to replace `<hash>` with your gist's hash
git clone https://gist.github.com/<hash>.git # with https
git clone git@gist.github.com:<hash>.git # or with ssh
C PROGRAM TO COMPUTE NODAL FACTORS AND EQUILIBRIUM ARGUEMENTS | |
C | |
C | |
PARAMETER(NCNST=37) | |
CHARACTER CNAME(NCNST)*8 | |
COMMON /CNSNAM/ CNAME | |
REAL NODFAC,MONTH | |
DIMENSION NCON(NCNST) | |
COMMON /CNST/ NODFAC(NCNST),GRTERM(NCNST),SPEED(NCNST),P(NCNST) |
real function fmincg(length, nn_params, input_layer_size, hidden_layer_size, num_labels, inputdata, y, lambda) | |
implicit none | |
! Copyright (C) 2001 and 2002 by Carl Edward Rasmussen. Date 2002-02-13 | |
! (C) Copyright 1999, 2000 & 2001, Carl Edward Rasmussen | |
! | |
! Permission is granted for anyone to copy, use, or modify these | |
! programs and accompanying documents for purposes of research or | |
! education, provided this copyright notice is retained, and note is | |
! made of any changes that have been made. |
start new:
tmux
start new with session name:
tmux new -s myname