MAWK(1) USER COMMANDS MAWK(1) NAME mawk - pattern scanning and text processing language SYNOPSIS mawk [-W option] [-F value] [-v var=value] [--] 'program text' [file ...] mawk [-W option] [-F value] [-v var=value] [-f program-file] [--] [file ...] DESCRIPTION mawk is an interpreter for the AWK Programming Language. The AWK lan‐ guage is useful for manipulation of data files, text retrieval and pro‐ cessing, and for prototyping and experimenting with algorithms. mawk is a new awk meaning it implements the AWK language as defined in Aho, Kernighan and Weinberger, The AWK Programming Language, Addison-Wesley Publishing, 1988. (Hereafter referred to as the AWK book.) mawk con‐ forms to the Posix 1003.2 (draft 11.3) definition of the AWK language which contains a few features not described in the AWK book, and mawk provides a small number of extensions. An AWK program is a sequence of pattern {action} pairs and function defi‐ nitions. Short programs are entered on the command line usually enclosed in ' ' to avoid shell interpretation. Longer programs can be read in from a file with the -f option. Data input is read from the list of files on the command line or from standard input when the list is empty. The input is broken into records as determined by the record separator variable, RS. Initially, RS = "\n" and records are synonymous with lines. Each record is compared against each pattern and if it matches, the program text for {action} is executed. OPTIONS -F value sets the field separator, FS, to value. -f file Program text is read from file instead of from the command line. Multiple -f options are allowed. -v var=value assigns value to program variable var. -- indicates the unambiguous end of options. The above options will be available with any Posix compatible implementa‐ tion of AWK, and implementation specific options are prefaced with -W. mawk provides six: -W version mawk writes its version and copyright to stdout and com‐ piled limits to stderr and exits 0. -W dump writes an assembler like listing of the internal represen‐ tation of the program to stdout and exits 0 (on successful compilation). -W interactive sets unbuffered writes to stdout and line buffered reads from stdin. Records from stdin are lines regardless of the value of RS. -W exec file Program text is read from file and this is the last option. Useful on systems that support the #! "magic num‐ ber" convention for executable scripts. -W sprintf=num adjusts the size of mawk's internal sprintf buffer to num bytes. More than rare use of this option indicates mawk should be recompiled. -W posix_space forces mawk not to consider '\n' to be space. The short forms -W[vdiesp] are recognized and on some systems -We is mandatory to avoid command line length limitations. THE AWK LANGUAGE 1. Program structure An AWK program is a sequence of pattern {action} pairs and user function definitions. A pattern can be: BEGIN END expression expression , expression One, but not both, of pattern {action} can be omitted. If {action} is omitted it is implicitly { print }. If pattern is omitted, then it is implicitly matched. BEGIN and END patterns require an action. Statements are terminated by newlines, semi-colons or both. Groups of statements such as actions or loop bodies are blocked via { ... } as in C. The last statement in a block doesn't need a terminator. Blank lines have no meaning; an empty statement is terminated with a semi-colon. Long statements can be continued with a backslash, \. A statement can be bro‐ ken without a backslash after a comma, left brace, &&, ||, do, else, the right parenthesis of an if, while or for statement, and the right paren‐ thesis of a function definition. A comment starts with # and extends to, but does not include the end of line. The following statements control program flow inside blocks. if ( expr ) statement if ( expr ) statement else statement while ( expr ) statement do statement while ( expr ) for ( opt_expr ; opt_expr ; opt_expr ) statement for ( var in array ) statement continue break 2. Data types, conversion and comparison There are two basic data types, numeric and string. Numeric constants can be integer like -2, decimal like 1.08, or in scientific notation like -1.1e4 or .28E-3. All numbers are represented internally and all compu‐ tations are done in floating point arithmetic. So for example, the expression 0.2e2 == 20 is true and true is represented as 1.0. String constants are enclosed in double quotes. "This is a string with a newline at the end.\n" Strings can be continued across a line by escaping (\) the newline. The following escape sequences are recognized. \\ \ \" " \a alert, ascii 7 \b backspace, ascii 8 \t tab, ascii 9 \n newline, ascii 10 \v vertical tab, ascii 11 \f formfeed, ascii 12 \r carriage return, ascii 13 \ddd 1, 2 or 3 octal digits for ascii ddd \xhh 1 or 2 hex digits for ascii hh If you escape any other character \c, you get \c, i.e., mawk ignores the escape. There are really three basic data types; the third is number and string which has both a numeric value and a string value at the same time. User defined variables come into existence when first referenced and are ini‐ tialized to null, a number and string value which has numeric value 0 and string value "". Non-trivial number and string typed data come from input and are typically stored in fields. (See section 4). The type of an expression is determined by its context and automatic type conversion occurs if needed. For example, to evaluate the statements y = x + 2 ; z = x "hello" The value stored in variable y will be typed numeric. If x is not numeric, the value read from x is converted to numeric before it is added to 2 and stored in y. The value stored in variable z will be typed string, and the value of x will be converted to string if necessary and concatenated with "hello". (Of course, the value and type stored in x is not changed by any conversions.) A string expression is converted to numeric using its longest numeric prefix as with atof(3). A numeric expression is converted to string by replacing expr with sprintf(CONVFMT, expr), unless expr can be represented on the host machine as an exact integer then it is converted to sprintf("%d", expr). Sprintf() is an AWK built-in that duplicates the functionality of sprintf(3), and CONVFMT is a built-in variable used for internal conversion from number to string and initialized to "%.6g". Explicit type conversions can be forced, expr "" is string and expr+0 is numeric. To evaluate, expr1 rel-op expr2, if both operands are numeric or number and string then the comparison is numeric; if both operands are string the comparison is string; if one operand is string, the non-string oper‐ and is converted and the comparison is string. The result is numeric, 1 or 0. In boolean contexts such as, if ( expr ) statement, a string expression evaluates true if and only if it is not the empty string ""; numeric val‐ ues if and only if not numerically zero. 3. Regular expressions In the AWK language, records, fields and strings are often tested for matching a regular expression. Regular expressions are enclosed in slashes, and expr ~ /r/ is an AWK expression that evaluates to 1 if expr "matches" r, which means a substring of expr is in the set of strings defined by r. With no match the expression evaluates to 0; replacing ~ with the "not match" operator, !~ , reverses the meaning. As pattern-action pairs, /r/ { action } and $0 ~ /r/ { action } are the same, and for each input record that matches r, action is exe‐ cuted. In fact, /r/ is an AWK expression that is equivalent to ($0 ~ /r/) anywhere except when on the right side of a match operator or passed as an argument to a built-in function that expects a regular expression argument. AWK uses extended regular expressions as with egrep(1). The regular expression metacharacters, i.e., those with special meaning in regular expressions are ^ $ . [ ] | ( ) * + ? Regular expressions are built up from characters as follows: c matches any non-metacharacter c. \c matches a character defined by the same escape sequences used in string constants or the literal character c if \c is not an escape sequence. . matches any character (including newline). ^ matches the front of a string. $ matches the back of a string. [c1c2c3...] matches any character in the class c1c2c3... . An interval of characters is denoted c1-c2 inside a class [...]. [^c1c2c3...] matches any character not in the class c1c2c3... Regular expressions are built up from other regular expressions as fol‐ lows: r1r2 matches r1 followed immediately by r2 (concatena‐ tion). r1 | r2 matches r1 or r2 (alternation). r* matches r repeated zero or more times. r+ matches r repeated one or more times. r? matches r zero or once. (r) matches r, providing grouping. The increasing precedence of operators is alternation, concatenation and unary (*, + or ?). For example, /^[_a-zA-Z][_a-zA-Z0-9]*$/ and /^[-+]?([0-9]+\.?|\.[0-9])[0-9]*([eE][-+]?[0-9]+)?$/ are matched by AWK identifiers and AWK numeric constants respectively. Note that . has to be escaped to be recognized as a decimal point, and that metacharacters are not special inside character classes. Any expression can be used on the right hand side of the ~ or !~ opera‐ tors or passed to a built-in that expects a regular expression. If needed, it is converted to string, and then interpreted as a regular expression. For example, BEGIN { identifier = "[_a-zA-Z][_a-zA-Z0-9]*" } $0 ~ "^" identifier prints all lines that start with an AWK identifier. mawk recognizes the empty regular expression, //, which matches the empty string and hence is matched by any string at the front, back and between every character. For example, echo abc | mawk { gsub(//, "X") ; print } XaXbXcX 4. Records and fields Records are read in one at a time, and stored in the field variable $0. The record is split into fields which are stored in $1, $2, ..., $NF. The built-in variable NF is set to the number of fields, and NR and FNR are incremented by 1. Fields above $NF are set to "". Assignment to $0 causes the fields and NF to be recomputed. Assignment to NF or to a field causes $0 to be reconstructed by concatenating the $i's separated by OFS. Assignment to a field with index greater than NF, increases NF and causes $0 to be reconstructed. Data input stored in fields is string, unless the entire field has numeric form and then the type is number and string. For example, echo 24 24E | mawk '{ print($1>100, $1>"100", $2>100, $2>"100") }' 0 1 1 1 $0 and $2 are string and $1 is number and string. The first comparison is numeric, the second is string, the third is string (100 is converted to "100"), and the last is string. 5. Expressions and operators The expression syntax is similar to C. Primary expressions are numeric constants, string constants, variables, fields, arrays and function calls. The identifier for a variable, array or function can be a sequence of letters, digits and underscores, that does not start with a digit. Variables are not declared; they exist when first referenced and are initialized to null. New expressions are composed with the following operators in order of increasing precedence. assignment = += -= *= /= %= ^= conditional ? : logical or || logical and && array membership in matching ~ !~ relational < > <= >= == != concatenation (no explicit operator) add ops + - mul ops * / % unary + - logical not ! exponentiation ^ inc and dec ++ -- (both post and pre) field $ Assignment, conditional and exponentiation associate right to left; the other operators associate left to right. Any expression can be parenthe‐ sized. 6. Arrays Awk provides one-dimensional arrays. Array elements are expressed as array[expr]. Expr is internally converted to string type, so, for exam‐ ple, A[1] and A["1"] are the same element and the actual index is "1". Arrays indexed by strings are called associative arrays. Initially an array is empty; elements exist when first accessed. An expression, expr in array evaluates to 1 if array[expr] exists, else to 0. There is a form of the for statement that loops over each index of an array. for ( var in array ) statement sets var to each index of array and executes statement. The order that var transverses the indices of array is not defined. The statement, delete array[expr], causes array[expr] not to exist. mawk supports an extension, delete array, which deletes all elements of array. Multidimensional arrays are synthesized with concatenation using the built-in variable SUBSEP. array[expr1,expr2] is equivalent to array[expr1 SUBSEP expr2]. Testing for a multidimensional element uses a parenthesized index, such as if ( (i, j) in A ) print A[i, j] 7. Builtin-variables The following variables are built-in and initialized before program exe‐ cution. ARGC number of command line arguments. ARGV array of command line arguments, 0..ARGC-1. CONVFMT format for internal conversion of numbers to string, initially = "%.6g". ENVIRON array indexed by environment variables. An environment string, var=value is stored as ENVIRON[var] = value. FILENAME name of the current input file. FNR current record number in FILENAME. FS splits records into fields as a regular expression. NF number of fields in the current record. NR current record number in the total input stream. OFMT format for printing numbers; initially = "%.6g". OFS inserted between fields on output, initially = " ". ORS terminates each record on output, initially = "\n". RLENGTH length set by the last call to the built-in function, match(). RS input record separator, initially = "\n". RSTART index set by the last call to match(). SUBSEP used to build multiple array subscripts, initially = "\034". 8. Built-in functions String functions gsub(r,s,t) gsub(r,s) Global substitution, every match of regular expression r in variable t is replaced by string s. The number of replace‐ ments is returned. If t is omitted, $0 is used. An & in the replacement string s is replaced by the matched sub‐ string of t. \& and \\ put literal & and \, respectively, in the replacement string. index(s,t) If t is a substring of s, then the position where t starts is returned, else 0 is returned. The first character of s is in position 1. length(s) Returns the length of string s. match(s,r) Returns the index of the first longest match of regular expression r in string s. Returns 0 if no match. As a side effect, RSTART is set to the return value. RLENGTH is set to the length of the match or -1 if no match. If the empty string is matched, RLENGTH is set to 0, and 1 is returned if the match is at the front, and length(s)+1 is returned if the match is at the back. split(s,A,r) split(s,A) String s is split into fields by regular expression r and the fields are loaded into array A. The number of fields is returned. See section 11 below for more detail. If r is omitted, FS is used. sprintf(format,expr-list) Returns a string constructed from expr-list according to format. See the description of printf() below. sub(r,s,t) sub(r,s) Single substitution, same as gsub() except at most one sub‐ stitution. substr(s,i,n) substr(s,i) Returns the substring of string s, starting at index i, of length n. If n is omitted, the suffix of s, starting at i is returned. tolower(s) Returns a copy of s with all upper case characters con‐ verted to lower case. toupper(s) Returns a copy of s with all lower case characters con‐ verted to upper case. Arithmetic functions atan2(y,x) Arctan of y/x between -pi and pi. cos(x) Cosine function, x in radians. exp(x) Exponential function. int(x) Returns x truncated towards zero. log(x) Natural logarithm. rand() Returns a random number between zero and one. sin(x) Sine function, x in radians. sqrt(x) Returns square root of x. srand(expr) srand() Seeds the random number generator, using the clock if expr is omitted, and returns the value of the previous seed. mawk seeds the random number generator from the clock at startup so there is no real need to call srand(). Srand(expr) is useful for repeating pseudo random sequences. 9. Input and output There are two output statements, print and printf. print writes $0 ORS to standard output. print expr1, expr2, ..., exprn writes expr1 OFS expr2 OFS ... exprn ORS to standard out‐ put. Numeric expressions are converted to string with OFMT. printf format, expr-list duplicates the printf C library function writing to stan‐ dard output. The complete ANSI C format specifications are recognized with conversions %c, %d, %e, %E, %f, %g, %G, %i, %o, %s, %u, %x, %X and %%, and conversion qualifiers h and l. The argument list to print or printf can optionally be enclosed in paren‐ theses. Print formats numbers using OFMT or "%d" for exact integers. "%c" with a numeric argument prints the corresponding 8 bit character, with a string argument it prints the first character of the string. The output of print and printf can be redirected to a file or command by appending > file, >> file or | command to the end of the print statement. Redirection opens file or command only once, subsequent redirections append to the already open stream. By convention, mawk associates the filename "/dev/stderr" with stderr which allows print and printf to be redirected to stderr. mawk also associates "-" and "/dev/stdout" with stdin and stdout which allows these streams to be passed to functions. The input function getline has the following variations. getline reads into $0, updates the fields, NF, NR and FNR. getline < file reads into $0 from file, updates the fields and NF. getline var reads the next record into var, updates NR and FNR. getline var < file reads the next record of file into var. command | getline pipes a record from command into $0 and updates the fields and NF. command | getline var pipes a record from command into var. Getline returns 0 on end-of-file, -1 on error, otherwise 1. Commands on the end of pipes are executed by /bin/sh. The function close(expr) closes the file or pipe associated with expr. Close returns 0 if expr is an open file, the exit status if expr is a piped command, and -1 otherwise. Close is used to reread a file or com‐ mand, make sure the other end of an output pipe is finished or conserve file resources. The function fflush(expr) flushes the output file or pipe associated with expr. Fflush returns 0 if expr is an open output stream else -1. Fflush without an argument flushes stdout. Fflush with an empty argument ("") flushes all open output. The function system(expr) uses /bin/sh to execute expr and returns the exit status of the command expr. Changes made to the ENVIRON array are not passed to commands executed with system or pipes. 10. User defined functions The syntax for a user defined function is function name( args ) { statements } The function body can contain a return statement return opt_expr A return statement is not required. Function calls may be nested or recursive. Functions are passed expressions by value and arrays by ref‐ erence. Extra arguments serve as local variables and are initialized to null. For example, csplit(s,A) puts each character of s into array A and returns the length of s. function csplit(s, A, n, i) { n = length(s) for( i = 1 ; i <= n ; i++ ) A[i] = substr(s, i, 1) return n } Putting extra space between passed arguments and local variables is con‐ ventional. Functions can be referenced before they are defined, but the function name and the '(' of the arguments must touch to avoid confusion with concatenation. 11. Splitting strings, records and files Awk programs use the same algorithm to split strings into arrays with split(), and records into fields on FS. mawk uses essentially the same algorithm to split files into records on RS. Split(expr,A,sep) works as follows: (1) If sep is omitted, it is replaced by FS. Sep can be an expression or regular expression. If it is an expression of non-string type, it is converted to string. (2) If sep = " " (a single space), then <SPACE> is trimmed from the front and back of expr, and sep becomes <SPACE>. mawk defines <SPACE> as the regular expression /[ \t\n]+/. Oth‐ erwise sep is treated as a regular expression, except that meta-characters are ignored for a string of length 1, e.g., split(x, A, "*") and split(x, A, /\*/) are the same. (3) If expr is not string, it is converted to string. If expr is then the empty string "", split() returns 0 and A is set empty. Otherwise, all non-overlapping, non-null and long‐ est matches of sep in expr, separate expr into fields which are loaded into A. The fields are placed in A[1], A[2], ..., A[n] and split() returns n, the number of fields which is the number of matches plus one. Data placed in A that looks numeric is typed number and string. Splitting records into fields works the same except the pieces are loaded into $1, $2,..., $NF. If $0 is empty, NF is set to 0 and all $i to "". mawk splits files into records by the same algorithm, but with the slight difference that RS is really a terminator instead of a separator. (ORS is really a terminator too). E.g., if FS = ":+" and $0 = "a::b:" , then NF = 3 and $1 = "a", $2 = "b" and $3 = "", but if "a::b:" is the contents of an input file and RS = ":+", then there are two records "a" and "b". RS = " " is not special. If FS = "", then mawk breaks the record into individual characters, and, similarly, split(s,A,"") places the individual characters of s into A. 12. Multi-line records Since mawk interprets RS as a regular expression, multi-line records are easy. Setting RS = "\n\n+", makes one or more blank lines separate records. If FS = " " (the default), then single newlines, by the rules for <SPACE> above, become space and single newlines are field separators. For example, if a file is "a b\nc\n\n", RS = "\n\n+" and FS = " ", then there is one record "a b\nc" with three fields "a", "b" and "c". Changing FS = "\n", gives two fields "a b" and "c"; changing FS = "", gives one field identical to the record. If you want lines with spaces or tabs to be considered blank, set RS = "\n([ \t]*\n)+". For compatibility with other awks, setting RS = "" has the same effect as if blank lines are stripped from the front and back of files and then records are determined as if RS = "\n\n+". Posix requires that "\n" always separates records when RS = "" regardless of the value of FS. mawk does not support this convention, because defining "\n" as <SPACE> makes it unnecessary. Most of the time when you change RS for multi-line records, you will also want to change ORS to "\n\n" so the record spacing is preserved on out‐ put. 13. Program execution This section describes the order of program execution. First ARGC is set to the total number of command line arguments passed to the execution phase of the program. ARGV[0] is set the name of the AWK interpreter and ARGV[1] ... ARGV[ARGC-1] holds the remaining command line arguments exclusive of options and program source. For example with mawk -f prog v=1 A t=hello B ARGC = 5 with ARGV[0] = "mawk", ARGV[1] = "v=1", ARGV[2] = "A", ARGV[3] = "t=hello" and ARGV[4] = "B". Next, each BEGIN block is executed in order. If the program consists entirely of BEGIN blocks, then execution terminates, else an input stream is opened and execution continues. If ARGC equals 1, the input stream is set to stdin, else the command line arguments ARGV[1] ... ARGV[ARGC-1] are examined for a file argument. The command line arguments divide into three sets: file arguments, assignment arguments and empty strings "". An assignment has the form var=string. When an ARGV[i] is examined as a possible file argument, if it is empty it is skipped; if it is an assignment argument, the assign‐ ment to var takes place and i skips to the next argument; else ARGV[i] is opened for input. If it fails to open, execution terminates with exit code 2. If no command line argument is a file argument, then input comes from stdin. Getline in a BEGIN action opens input. "-" as a file argu‐ ment denotes stdin. Once an input stream is open, each input record is tested against each pattern, and if it matches, the associated action is executed. An expression pattern matches if it is boolean true (see the end of section 2). A BEGIN pattern matches before any input has been read, and an END pattern matches after all input has been read. A range pattern, expr1,expr2 , matches every record between the match of expr1 and the match expr2 inclusively. When end of file occurs on the input stream, the remaining command line arguments are examined for a file argument, and if there is one it is opened, else the END pattern is considered matched and all END actions are executed. In the example, the assignment v=1 takes place after the BEGIN actions are executed, and the data placed in v is typed number and string. Input is then read from file A. On end of file A, t is set to the string "hello", and B is opened for input. On end of file B, the END actions are executed. Program flow at the pattern {action} level can be changed with the next exit opt_expr statements. A next statement causes the next input record to be read and pattern testing to restart with the first pattern {action} pair in the program. An exit statement causes immediate execution of the END actions or program termination if there are none or if the exit occurs in an END action. The opt_expr sets the exit value of the program unless overrid‐ den by a later exit or subsequent error. EXAMPLES 1. emulate cat. { print } 2. emulate wc. { chars += length($0) + 1 # add one for the \n words += NF } END{ print NR, words, chars } 3. count the number of unique "real words". BEGIN { FS = "[^A-Za-z]+" } { for(i = 1 ; i <= NF ; i++) word[$i] = "" } END { delete word[""] for ( i in word ) cnt++ print cnt } 4. sum the second field of every record based on the first field. $1 ~ /credit|gain/ { sum += $2 } $1 ~ /debit|loss/ { sum -= $2 } END { print sum } 5. sort a file, comparing as string { line[NR] = $0 "" } # make sure of comparison type # in case some lines look numeric END { isort(line, NR) for(i = 1 ; i <= NR ; i++) print line[i] } #insertion sort of A[1..n] function isort( A, n, i, j, hold) { for( i = 2 ; i <= n ; i++) { hold = A[j = i] while ( A[j-1] > hold ) { j-- ; A[j+1] = A[j] } A[j] = hold } # sentinel A[0] = "" will be created if needed } COMPATIBILITY ISSUES The Posix 1003.2(draft 11.3) definition of the AWK language is AWK as described in the AWK book with a few extensions that appeared in Sys‐ temVR4 nawk. The extensions are: New functions: toupper() and tolower(). New variables: ENVIRON[] and CONVFMT. ANSI C conversion specifications for printf() and sprintf(). New command options: -v var=value, multiple -f options and imple‐ mentation options as arguments to -W. Posix AWK is oriented to operate on files a line at a time. RS can be changed from "\n" to another single character, but it is hard to find any use for this — there are no examples in the AWK book. By convention, RS = "", makes one or more blank lines separate records, allowing multi-line records. When RS = "", "\n" is always a field separator regardless of the value in FS. mawk, on the other hand, allows RS to be a regular expression. When "\n" appears in records, it is treated as space, and FS always determines fields. Removing the line at a time paradigm can make some programs simpler and can often improve performance. For example, redoing example 3 from above, BEGIN { RS = "[^A-Za-z]+" } { word[ $0 ] = "" } END { delete word[ "" ] for( i in word ) cnt++ print cnt } counts the number of unique words by making each word a record. On mod‐ erate size files, mawk executes twice as fast, because of the simplified inner loop. The following program replaces each comment by a single space in a C pro‐ gram file, BEGIN { RS = "/\*([^*]|\*+[^/*])*\*+/" # comment is record separator ORS = " " getline hold } { print hold ; hold = $0 } END { printf "%s" , hold } Buffering one record is needed to avoid terminating the last record with a space. With mawk, the following are all equivalent, x ~ /a\+b/ x ~ "a\+b" x ~ "a\\+b" The strings get scanned twice, once as string and once as regular expres‐ sion. On the string scan, mawk ignores the escape on non-escape charac‐ ters while the AWK book advocates \c be recognized as c which necessi‐ tates the double escaping of meta-characters in strings. Posix explic‐ itly declines to define the behavior which passively forces programs that must run under a variety of awks to use the more portable but less read‐ able, double escape. Posix AWK does not recognize "/dev/std{out,err}" or \x hex escape sequences in strings. Unlike ANSI C, mawk limits the number of digits that follows \x to two as the current implementation only supports 8 bit characters. The built-in fflush first appeared in a recent (1993) AT&T awk released to netlib, and is not part of the posix standard. Aggregate deletion with delete array is not part of the posix standard. Posix explicitly leaves the behavior of FS = "" undefined, and mentions splitting the record into characters as a possible interpretation, but currently this use is not portable across implementations. Finally, here is how mawk handles exceptional cases not discussed in the AWK book or the Posix draft. It is unsafe to assume consistency across awks and safe to skip to the next section. substr(s, i, n) returns the characters of s in the intersection of the closed interval [1, length(s)] and the half-open interval [i, i+n). When this intersection is empty, the empty string is returned; so substr("ABC", 1, 0) = "" and substr("ABC", -4, 6) = "A". Every string, including the empty string, matches the empty string at the front so, s ~ // and s ~ "", are always 1 as is match(s, //) and match(s, ""). The last two set RLENGTH to 0. index(s, t) is always the same as match(s, t1) where t1 is the same as t with metacharacters escaped. Hence consistency with match requires that index(s, "") always returns 1. Also the con‐ dition, index(s,t) != 0 if and only t is a substring of s, requires index("","") = 1. If getline encounters end of file, getline var, leaves var unchanged. Similarly, on entry to the END actions, $0, the fields and NF have their value unaltered from the last record. SEE ALSO egrep(1) Aho, Kernighan and Weinberger, The AWK Programming Language, Addison-Wes‐ ley Publishing, 1988, (the AWK book), defines the language, opening with a tutorial and advancing to many interesting programs that delve into issues of software design and analysis relevant to programming in any language. The GAWK Manual, The Free Software Foundation, 1991, is a tutorial and language reference that does not attempt the depth of the AWK book and assumes the reader may be a novice programmer. The section on AWK arrays is excellent. It also discusses Posix requirements for AWK. BUGS mawk cannot handle ascii NUL \0 in the source or data files. You can output NUL using printf with %c, and any other 8 bit character is accept‐ able input. mawk implements printf() and sprintf() using the C library functions, printf and sprintf, so full ANSI compatibility requires an ANSI C library. In practice this means the h conversion qualifier may not be available. Also mawk inherits any bugs or limitations of the library functions. Implementors of the AWK language have shown a consistent lack of imagina‐ tion when naming their programs. AUTHOR Mike Brennan (brennan@whidbey.com). Version 1.2 Dec 22 1994 MAWK(1)


Optimize Visual Studio Code
Optimizing Visual Studio code involves periodic cleanup, removing extensions not needed, running whatever is needed and other tips. This should dramatically improve Code startup and editing performance. Read on…
Using TMUX Terminal Multiplexer
In the early days working as a junior developer working on Hughes satellite dish tv networks, I had to use multiple machines, one for looking at streaming movies and another for looking at the device logs at the same time. It was very clear to me since then using multiple windows, machines, screens without the need to switch was a major productivity booster. Now, as part of my Dev-ops related work, I need to work with multiple servers and was looking at optimizing my workflow for consoles using SSH. Enter TMUX - short name for terminal multiplexer.
Master any tool with fuzzy search and aliases
Mastering any tool requires learning what that tool does and how we can effectively use it. For example, we know that a simple mechanical tool like a hammer hammers in nails, has to be struck over a nail held in an upright manner until the nail goes in properly. On the other hand, software tools offer a huge variety of commands and options for each command and it becomes difficult to store all those command and options in your brain.
Aliases offer a second brain way to store all those commands in config files and also rename commands with intuitive names. Not all tools offer aliases though. Secondly aliases tend to grow over time and remembering those aliases itself becomes a big hassle. Enter fuzzy search. With these two techniques one can virtually master any tool, let me show you how…
Proof reading and spell checking
Error proofing communication content is a vital part of any trade. Even people with strong grammar and spelling skills tend to make poor mistakes. Word processors like MS Word make help but they are not available every time, for example when one starts typing in notepad or other applications. You do not want to open an application which is slow to start and hogs memory just for doing a simple spell-check. The process of manual re-checking contents can be painful, however there are myriad of tools available that can make this process less laborious. Here’s a dash of such tools:
SIP for your health
SIP (Systematic Investment Plan) seems to be the rage nowadays where everyone worth his financial acumen rants about the merits of SIP. That takes care of the dhan (wealth) part, what about the tan (physical health) part? In fact, this requires a more disciplined SIP and has more long term and beneficial effects. Sounds logical? Here we go…
Backing up WordPress
Backup has been on my mind, since I started blogging on WordPress. No blog owner wants to go through the pain of losing his ideas and re-creating his writings again.
After a night worth of efforts, here’s a simple script to backup a WordPress.com hosted blog in two ways.
Code Review with ReviewBoard
Why ReviewBoard
After having tried out various review methods like direct review, reviews over email, pair programming etc, I have found that a combination of tool-assisted code review and direct review (on an as needed basis) works out to be the best in terms of efforts spent and quality of the output. SmartNBear.com:Pros and Cons of Four Kinds of Code mentions the pros and cons of the various types of reviews.
Inspirational Quotes ON the desktop
I try to keep my desktop clean so that I can display only the items that require my immediate attention. I also like to start my day with an inspirational quote. Since the desktop is the first thing one sees after booting up the system in the morning, here is a jugaad that uses Autohotkey and bginfo to put a random quote on your desktop.
I initially tried out Rainmeter and Samurize, but found them a bit too heavy for this simple application. Here is a way to do this without using any third part tools.


ClosePath()
语法
ClosePath()概要
Closes the current figure in the vector drawing path by adding a straight line to the starting point of the figure. The starting point is the location of the last MovePathCursor() call. When a path is filled, only closed figures are taken into account.
参数
无.
返回值
无.
示例
If OpenWindow(0, 0, 0, 400, 200, "VectorDrawing", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) CanvasGadget(0, 0, 0, 400, 200) If StartVectorDrawing(CanvasVectorOutput(0)) ; Create a path with two closed triangles MovePathCursor(20, 160) AddPathLine(100, 20) AddPathLine(180, 160) ClosePath() MovePathCursor(220, 160) AddPathLine(300, 20) AddPathLine(380, 160) ClosePath() ; fill the path VectorSourceColor(RGBA(0, 0, 255, 255)) FillPath() StopVectorDrawing() EndIf Repeat Event = WaitWindowEvent() Until Event = #PB_Event_CloseWindow EndIf
参阅
FillPath(), IsInsidePath(), MovePathCursor(), AddPathLine()
已支持操作系统
所有


{% csrf_token %}
Enter Your Location
School Name
School Id
Strength
Adress
Achievements
Capacity
Contact Information
Enter Type Of School


1. Provide the basic Definition of a Computer. 2. Understand the Evolution of Computers and their Characteristics. 3. Briefly outline Various Applications of Computers along with its basic components. 4. Differentiate between Hardware and Software. 5. Represent Concepts of Data/Information and Data Processing. 6. Highlight concepts like E-Governance, Multimedia and Entertainment of Information, Electronics and Communication Technology.


§412:10-307 Trust accounts. (a) Share and deposit accounts may be owned by a member in trust for a beneficiary.
(b) Beneficiaries may be minors, but no beneficiary unless a member in that person's own right, shall be permitted to vote, obtain loans, hold office or be required to pay a membership fee. [L 1993, c 350, pt of §1]


Investors Overview
Financials & Releases
Webcasts
Presentations
Distributions
Corporate Info
Portfolio Profile


😢
I'm sorry you didn't donate...
You can still support my work in other ways:
Star my projects on
GitHub
Confirm my skills on
LinkedIn
Leave 5-star reviews on
Play Store


On 20 April 2016, the National IHR Focal Point for Germany informed WHO that a previously reported case of Lassa fever in Germany has fully recovered and been discharged from hospital in Frankfurt. This secondary case was an employee of the funeral home tasked with handling the primary case’s corpse on 2 March (see DON posted 23 March).
The case had recovered by 6 April, when all the contacts completed their 21-day follow-up period, however his hospital discharge was delayed due to persistent viraemia. The patient was discharged after two consecutive negative test results by polymerase chain reaction (PCR). Tests were performed on blood, urine, and pharyngeal swab samples at 24-hour intervals.
Based on the current information, there is no further risk of secondary transmission of Lassa fever in Germany. Lassa fever cases have been reported among travellers returning from West Africa. The risk of disease spread to non-endemic countries by travellers from Lassa fever endemic countries in the West Africa is very low.
WHO does not recommend any restriction of travel and trade to Germany based on the information available.


{% extends '_base.html' %} {% load static %} {% block title %}Propose topic{% endblock title %} {% block content %} {% if user.is_authenticated %}
Submit Topic
Please return to the home page home
you have an account? login don't have an account? register


model.marker
Interfaces
CustomizedMarker
Classes
AbstractEarthQuakeMarker
AbstractLocationMarker
AirportMarker
CityMarker
LandEarthQuakeMarker
OceanEarthQuakeMarker


Sorry, it looks like that page doesn't exist.
Perhaps you should go back to the homepage?
If you believe you're seeing this message in error, please let me know.
Sorry, it looks like that page doesn't exist.
Perhaps you should go back to the homepage?
If you believe you're seeing this message in error, please let me know.


MORTALITY PATTERNS OF A GROUP OF RETIRED ASBESTOS WORKERS
By Pierre Decoufle B.S., St. Peter's College, 1964 M.S., Rutgers University, 1966
Submitted to the Graduate School of Public Health in partial fulfillment of the requirements for the degree of
Doctor of Science in Hygiene
University of Pittsburgh
1970


Home
(current)
View Journey Details
View Journey Details
journeryDate
startingLocation
destinationLocation
distance
fare


#⃣ Arusha National Park #⃣ Mt. Meru
✌ Great preparation hike for climbing Kilimanjaro
walking safaris, Hiking
Overview
Are you interested in making a trip to **climbing Mount Meru in just 4 days**? Then we are here to take you at an affordable budget. Mount Meru is mainly said to be one of the highest mountains in Africa. At this stage, people are excited about visiting and interested in trekking to witness beautiful sceneries in general. If you are looking for it, then go ahead with our**4 days mount Meru package**.
When:
itinerary:
⏭ Arrival ⏭ Arusha National Park ⏭ Hike Meru ⏭ Departure
Pricing from: 2334 /Person/Day
- 👍 English speaking guide
- 👍 Transport (to and from the hotel)
- 👍 Entrance fees
Included
- 👎 Hygienic items
Excluded
- ☝ This tour involves some walking so wear comfortable shoes.
- ☝ This is not a wheelchair accessible tour.
Please Note
Watch the Video
What to see and what to do
- 🧐 **Arusha national park** Arusha national park is beneath the summit of Mount Meru, therefore it gives a room for wildlife drive. Include that the park has waterfall, Lake Momella and Ngurdoto crater, Without forgetting the beautiful wild animals like Colobus monkeys in forest, zebras, giraffes, buffalo, flamingos, warthogs and many other more animals in the park. Hope you get to enjoy before trek to Mount Meru.
Itinerary & Pricing
Day 1:
Meriakamba Hut
On the first day, we get into the drive to Momela gate and start to complete the registration process with a full-armed ranger. After the successful process, we can get to view the wild animals that mainly include antelope, giraffe, monkeys, elephants and more. When it comes to dinner, then it can be done at Miriakamba Hut.
Day 2:
Saddle Hut
Then, there will be a walk to the saddle from mirikamba hut which is said to be the short day with a sheer climb that we need to do. If you get into the walk, then it must be slow in order to view the beautiful view of Meru Crater. Along with that, there will be also a chance of viewing Ash cone. Once the lunch is over, we will make a short climb to Little Meru for witnessing stunning views.
Day 3:
Summit Day
In order to climb, we will start at 1.30 am to approach Rhino point and then to Cobra point. Now, we reach the summit in terms of seeing Kilimanjaro’s peak. The best part of this view is where you can see ridgeline between sloping outer as well as inner cliffs of a crater. This could be the right time for you to take rest and have brunch at a saddle.
Day 4:
Meriakamba Hut to Momella Gate
On day 4, we go down in a faster mode through the ways of mixed forest and grassland by viewing wildlife creatures. Before reaching the Momella, you will get to view all kind of wild creatures in common for sure. Finally, there will be a vehicle of Kibokoland Adventures in order to pick you to a hotel in Arushi.
Wrapping Up
If you are looking forward to making this great trip into memorable ones, thencontact usand know our instruction to follow. In case, if you are looking for a 4 days mount Meru climb budget package, then it is also possible with us and makes a great deal for this vacation with your friends and family.
| Number Of People | 1-3 | 3-5 | 7-8 |
|---|---|---|---|
| Price/Person/Day | |||
| Luxury: | $1293 | $1293 | $1293 |
| Midrange: | $1236 | $1236 | $1236 |
| Basic: | $1200 | $1200 | $1200 |
| Children(5-10) | 40% of adult | 40% of adult | 40% of adult |
- 🧐 This package can be extended as you see fit, please create your bucket list and send it to us to we can create you a quote


Polygon updates (June-October 2019)
by geranazavr555Hello, Codeforces!
I and cannor147, as students of ITMO University, joined the Codeforces team in June. From June to October, we mainly dealt with the development of the Polygon platform. In this post, we would like to present to you a list of what we have done during this time. This list does not include minor bug fixes or any improvements that are invisible to users.
PIN codes for problems and contests
Sometimes very important contests and problems are being developed in Polygon. In such cases, a leader of the jury may be worried about data leaking. For example, it can be so because of the weak password of another member of the jury. PIN code is an additional factor of confirmation the access for the problem or contest and it can be set up only by the owner. It is assumed that the PIN code will be sent in another secure way.
There is a link Create Pin for the owners in the contest interface:
If a contest or a problem has the PIN code, you need to type it before continuing.
You can manage the PIN code of the problem in the tab Manage Access in the problem interface. The owner can create the PIN code or copy the PIN code from a contest that contains the problem.
If you use Polygon API, there is a way to send requests for working with problems or contests, that have the PIN code. You have to provide a new additional parameter “pin” in your requests.
Groups of contests
Polygon grows up and the number of contests in Polygon grows up too. Sometimes you want to group some contests. For example, it seems convenient to group contests from the same programming workshop. Now in Polygon you can group some contests for faster management of the access rights for them.
Search by contests
The search by contests was added on the page Search.
A problem in several contests
Sometimes several contests have one problem, for example, if it is an educational problem. The attempt to commit changes for such problems resulted in updating a modification time for all its contests. Sometimes it seemed inconvenient because all its contests were at the top. Now you can choose contests that will change their modification time after committing changes to their problem. So, old contests won’t be on the top in the Contests Page.
Contest Statement Builder
Sometimes you want to see prepared statements for all problems in the contests in one pdf file. If the problems have different and languages or some statements aren’t prepared yet, it was hard to build it. Now you can do it thanks for Advanced statements building in the contest interface.
Attaching files to contests
There is a new section Attachments in the Properties/Files page for the contests. You can save some files, which are connected to the whole contest here. For example, you can save the tutorial for the contest,unfreeze visualizer or memes.
Management of receiving emails for contests
After pressing a pencil icon you can enable or disable receiving notification emails about changes in the current contest.
Issue updates
Many improvements to issues support were made. Added the ability to view all contest issues by clicking on Issues from the contest interface.
The issue header displays more information now.
When changing an issue status, type or assigned user, an auto-comment is now generated (for example, [changed status to CLOSED]). There is no longer any need to write tedious "Fixed" on each issue when closing multiple ones.
View my issues
It became possible to view all issues related to the current user. To do this, click on My Issues at the top of any Polygon page.
Also, it became possible to view my issues in all available contests and tasks.
Resource advanced properties
Support for resource advanced properties (graders) has been improved. Now you can add files to the checker's and interactor's execution directory at runtime.
Solution notes
You can attach additional information on the solution by clicking on Note in the solutions list.
Even fewer mistakes when preparing problems!
Now Polygon checks that variable names are passed in read*s (readInts, readDoubles, ...) testlib methods in the validator, and if it is not the case, you will be shown a warning.
Improved statement warnings. For example, if the condition does not contain examples or the name of the task, Polygon warns you about this. It has also become harder to get confused with the quotation marks choice in the conditions (remember that in Russian and English different types of quotation marks are traditionally used).
Polygon API improvements
Added methods:
- problem.statementResources — view the statement resources list (for example, images in statements)
- problem.saveStatementResource — add or change a single statement resource.
Added the PIN code checking in the "pin" parameter for access to tasks and contests if it was set. This parameter must be added to all methods and requests.
You can find the full description of Polygon API here.
Other updates
- The ability to add a test to the problem statement by clicking on the Example link directly from the list of tests without editing it.
- When creating a statement or a tutorial in a new language, it’s possible now to copy them from existing ones.
- Now you can copy tests of the checker and validator with their subsequent modification on the corresponding pages.
- Added email confirmation when registering in Polygon.
- Now, in the Review tab, you can also see the interactor's code if the problem is interactive.
- Now you can run all stress tests by clicking on the Run All Stresses link.


{% extends "base.html" %} {% block title %}Philip Kiely{% endblock %} {% block twitter %} {% endblock %} {% block head %} {% endblock %} {% block content %}
A course on using highly personal cold email to achieve your professional goals.
A curated collection of active publishers, publications, and agencies that pay fair rates for high-quality technical content.
Hi, I’m Philip Kiely. I am the author of Writing for Software Developers, a technical writer at BaseTen, and run PK&C, the world's smallest conglomerate. I graduated from Grinnell College in May 2020 with a degree in computer science. I was a full-time software engineer for 38 nonconsecutive weeks (if you count internships). I am a martial artist and an avid reader.
Hi, I’m Philip Kiely. Day job: I'm a technical writer at BaseTen. On the side, I run Philip Kiely & Company, which means that I am many things to many people. Most often, I’m delighting clients with technical content, selling copies of Writing for Software Developers, working on the next big thing, fixing bugs of my own creation, finding and delighting clients, or running payroll through Venmo like a Real Business Person.
I was a full-time software engineer for 38 nonconsecutive weeks (if you count internships). I have written words and code at Gumroad, Markforged, Principal Financial, and CUNA Mutual Group. I graduated from Grinnell College in May 2020 and hold a B.A. with honors in computer science. At Grinnell, I received the Robert N Noyce Senior Student Award and was a Roy Carver Scholar, and I spent a very productive semester at AIT Budapest. I was active in the midwestern Hackathon circuit and several student groups, most notably one involving campus-wide Nerf blaster battles.
You can find me around the internet, especially Twitter, Hacker News, or Indie Hackers. I write essays, tutorials, and notes on my own site and various other publications. You may have heard me on IEEE’s Software Engineering Radio or another show. My professional hobbies include appearing on podcasts and panels, sending cold emails, pretending that I can read a 10-K, and tweeting about business. I also enjoy playing D&D, practicing martial arts (TaeKwonDo, Boxing, currently BJJ, shoutout Groundworks BJJ), and reading whatever is nearby.
Philip Kiely is a technical writer at BaseTen and the author of Writing for Software Developers. He runs PK&C, the world's smallest conglomerate. He graduated from Grinnell College in May 2020 with a degree in computer science. Before a stint as Head of Marketing at Gumroad, he began his career writing code for Markforged, Principal Financial, and CUNA Mutual Group. Philip’s professional hobbies include appearing on podcasts and panels, sending cold emails, and tweeting about business. He also plays D&D, practices martial arts, and reads widely.


This package contains connectors and partial models (i.e., models that are only used to build other models) of the MultiBody library.
| Name | Description |
|---|---|
| Frame | Coordinate system fixed to the component with one cut-force and cut-torque (no icon) |
| Frame_a | Coordinate system fixed to the component with one cut-force and cut-torque (filled rectangular icon) |
| Frame_b | Coordinate system fixed to the component with one cut-force and cut-torque (non-filled rectangular icon) |
| Frame_resolve | Coordinate system fixed to the component used to express in which coordinate system a vector is resolved (non-filled rectangular icon) |
| FlangeWithBearing | Connector consisting of 1-dim. rotational flange and its bearing frame |
| FlangeWithBearingAdaptor | Adaptor to allow direct connections to the sub-connectors of FlangeWithBearing |
| PartialTwoFrames | Base model for components providing two frame connectors + outer world + assert to guarantee that the component is connected |
| PartialTwoFramesDoubleSize | Base model for components providing two frame connectors + outer world + assert to guarantee that the component is connected (default icon size is factor 2 larger as usual) |
| PartialOneFrame_a | Base model for components providing one frame_a connector + outer world + assert to guarantee that the component is connected |
| PartialOneFrame_b | Base model for components providing one frame_b connector + outer world + assert to guarantee that the component is connected |
| PartialElementaryJoint | Base model for elementary joints (has two frames + outer world + assert to guarantee that the joint is connected) |
| PartialForce | Base model for force elements (provide frame_b.f and frame_b.t in subclasses) |
| LineForceBase | Base model for line force elements |
| PartialLineForce | Base model for massless line force elements |
| PartialAbsoluteSensor | Base model to measure an absolute frame variable |
| PartialRelativeSensor | Base model to measure a relative variable between two frames |
| PartialVisualizer | Base model for visualizers (has a frame_a on the left side + outer world + assert to guarantee that the component is connected) |
| ZeroPosition | Set absolute position vector of frame_resolve to a zero vector and the orientation object to a null rotation |
| partialGravityAcceleration | Interface for the gravity function used in the World object |
| partialSurfaceCharacteristic | Interface for a function returning surface characteristics |
| partialColorMap | Interface for a function returning a color map |


School bus driver charged with stopping in wrong place at railway crossing
Police allege a bus got close to the tracks with a train approaching, but there was no contact between the bus and train
by Blair AdamsA charge has been laid following an alarming incident in Cambridge.
Waterloo Regional Police allege a school bus, which had children on it, got too close to a railway crossing at Coronation Boulevard and King Street East the afternoon of October 29.
They say the driver did perform all safety checks, as required.
But as those checks were being done, the driver noticed a train approaching in the distance at a slow speed.
That's when police say the bus came into close proximity to the tracks.
There was no contact between the bus and train, as well no one was injured.
Police say they launched their investigation the following day, when they were made aware of the incident.
On Wednesday, November 20, police announced they had charged a 72-year-old woman - under the Highway Traffic Act - with stopping a school bus at the wrong place at a railway crossing.


Hey! I'm Pranav.
This page is all about Cyber Security in which we are going to see
what are diffrent kinds of attacks which risks our privacy or important data
we will see some ways how to stay safe from them and the Precautions we can take.
some names of the attacks are DDOS attack, SQL injection, Social Engieering,
Phissing, Brute Force password attacks, etc. the detailed information about
all these are given below with some videos and pictures have been added for further clarity.
While your computer is connected to the Internet, the malware a hacker has installed
on your PC quietly transmits your personal and financial information without your knowledge
or consent. Or, a computer predator may pounce on the private information you unwittingly revealed.
In either case, they may:
When you arm yourself with information and resources, you’re wiser about computer security threats
and less vulnerable to threat tactics. Hackers and predators pose equally serious and but very different threats.
To protect your computer from hackers and predators:
Continually check the accuracy of personal accounts and deal with any discrepancies right away
Use extreme caution when entering chat rooms or posting personal Web pages
Limit the personal information you post on a personal Web pages
Carefully monitor requests by online “friends” or acquaintances for predatory behavior
Keep personal and financial information out of online conversations
Use extreme caution when agreeing to meet an online “friend” or acquaintance in person
Take these steps to protect your computer from hackers right away:
In a typical DDoS attack, the assailant begins by exploiting a vulnerability in one computer system and making it the DDoS master.
The attack master system identifies other vulnerable systems and gains control over them by either infecting the systems with malware
or through bypassing the authentication controls (i.e., guessing the default password on a widely used system or device).
A computer or networked device under the control of an intruder is known as a zombie, or bot. The attacker creates what is called
a command-and-control server to command the network of bots, also called a botnet. The person in control of a botnet is sometimes
referred to as the botmaster (that term has also historically been used to refer to the first system "recruited" into a botnet
because it is used to control the spread and activity of other systems in the botnet).
Botnets can be comprised of almost any number of bots; botnets with tens or hundreds of thousands of nodes
have become increasingly common, and there may not be an upper limit to their size. Once the botnet is assembled,
the attacker can use the traffic generated by the compromised devices to flood the target domain and knock it offline.
Phishing is a type of social engineering attack often used to steal user data, including login credentials and credit card numbers.
It occurs when an attacker, masquerading as a trusted entity, dupes a victim into opening an email, instant message, or text message.
The recipient is then tricked into clicking a malicious link, which can lead to the installation of malware, the freezing of the system
as part of a ransomware attack or the revealing of sensitive information.
An attack can have devastating results.
For individuals, this includes unauthorized purchases, the stealing of funds, or identify theft.
Moreover, phishing is often used
to gain a foothold in corporate or governmental networks as a part of a larger attack, such as an advanced persistent threat (APT) event.
In this latter scenario, employees are compromised in order to bypass security perimeters, distribute malware inside a closed environment,
or gain privileged access to secured data.
An organization succumbing to such an attack typically sustains severe financial losses in addition to declining market share,
reputation, and consumer trust. Depending on scope, a phishing attempt might escalate into a security incident from which
a business will have a difficult time recovering.
Social engineering is the art of manipulating people so they give up confidential information. The types of information these criminals
are seeking can vary, but when individuals are targeted the criminals are usually trying to trick you into giving them your passwords or bank
information, or access your computer to secretly install malicious software–that will give them access to your passwords and bank information
as well as giving them control over your computer.
Criminals use social engineering tactics because it is usually easier to exploit
your natural inclination to trust than it is to discover ways to hack your software. For example, it is much easier to fool someone into
giving you their password than it is for you to try hacking their password (unless the password is really weak).
Security is all about knowing who and what to trust.
Knowing when, and when not to, to take a person at their word; when to trust that the person you are communicating with is indeed
the person you think you are communicating with; when to trust that a website is or isn’t legitimate; when to trust that the person on the phone is or
isn’t legitimate; when providing your information is or isn’t a good idea.
Ask any security professional and they will tell
you that the weakest link in the security chain is the human who accepts a person or scenario at face value. It doesn’t matter how many locks
and deadbolts are on your doors and windows, or if have guard dogs, alarm systems, floodlights, fences with barbed wire, and armed security personnel;
if you trust the person at the gate who says he is the pizza delivery guy and you let him in without first checking to see if he is legitimate you are
completely exposed to whatever risk he represents.
SQL injection, also known as SQLI, is a common attack vector that uses malicious SQL code for backend database manipulation to access information
that was not intended to be displayed. This information may include any number of items, including sensitive company data, user lists or private customer details.
and, in certain cases, the attacker gaining administrative rights to a database, all of which are highly detrimental to a business.
When calculating the potential
cost of a SQLI, it’s important to consider the loss of customer trust should personal information such as phone numbers, addresses and credit card details be stolen.
While this vector can be used to attack any SQL database, websites are the most frequent targets.
A brute force attack is a trial-and-error method used to obtain information such as a user password or personal identification number (PIN).
In a brute force attack, automated software is used to generate a large number of consecutive guesses as to the value of the desired data.
Brute force attacks may be used by criminals to crack encrypted data, or by security analysts to test an organization's network security.
A brute force attack is also known as brute force cracking or simply brute force.


|
Brooklyn | |||||||
| PREV NEXT | FRAMES NO FRAMES |
| Interfaces | |
|---|---|
CassandraCluster
@deprecated since 0.7.0; use CassandraDatacenter which is equivalent but has a less ambiguous name; Cluster in Cassandra corresponds to what Brooklyn terms a Fabric. |
|
RegistryLocationResolver
Extension to LocationResolver which can take a registry. |
| Classes | |
|---|---|
AbstractAggregatingEnricher
AggregatingEnrichers implicitly subscribes to the same sensor |
|
AbstractBrooklynMementoPersister
@deprecated since 0.7.0 for production use BrooklynMementoPersisterToMultiFile instead; this class will be merged with BrooklynMementoPersisterInMemory in test code. |
|
AbstractTransformingEnricher
Convenience base for transforming a single sensor into a single new sensor of the same type |
|
AbstractTypeTransformingEnricher
Convenience base for transforming a single sensor into a single new sensor of the same type |
|
AddingEnricher
enricher which adds multiple sensors on an entity to produce a new sensor |
|
BrooklynMachinePool
@deprecated since 0.6.0; never used in production setting, and thus of dubious value; best avoided as unlikely to be supported in future versions |
|
BrooklynMementoPersisterInMemory
@deprecated since 0.7.0 for production use BrooklynMementoPersisterToMultiFile instead; class be moved to tests |
|
BrooklynMementoPersisterToFile
@deprecated since 0.7.0 use BrooklynMementoPersisterToMultiFile instead; the single-file version has not been tested recently or kept up-to-date. |
|
CassandraClusterImpl
@deprecated since 0.7.0; use CassandraDatacenter which is equivalent but has a less ambiguous name; Cluster in Cassandra corresponds to what Brooklyn terms a Fabric. |
|
CustomAggregatingEnricher
Subscribes to events from producers with a sensor of type T, aggregates them with the provided closure and emits the result on the target sensor V. |
|
DeprecatedKeysMappingBuilder
@deprecated since 0.6; for use only in converting deprecated flags; will be deleted in future version. |
|
HttpPolls
@deprecated since 0.7; use HttpTool |
|
LanguageUtils
Useful Groovy utility methods. |
|
ListConfigKey
A config key representing a list of values. |
|
MachinePool
Contains details of machines detected at a given cloud (ComputeService), and records claims made against those machines via this pool. |
|
MemberFailureDetectionPolicy
Detects when members of a group have failed/recovered, and emits ENTITY_FAILED or ENTITY_RECOVERED accordingly. |
|
MutableBrooklynMemento
@deprecated since 0.7.0; this code will move to src/tests/java |
|
Repeater
Simple DSL to repeat a fragment of code periodically until a condition is satisfied. |
|
SensorPropagatingEnricher
an enricher policy which just listens for the target sensor(s) on a child entity and passes it up. |
|
SensorTransformingEnricher
@deprecated since 0.7.0; use Enrichers.builder() |
|
ShellUtils
@deprecated since 0.7; does not return exit status, stderr, etc, so utility is of very limited use; and is not used in core brooklyn at all! |
|
SimulatedLocation
Location for use in dev/test, defining custom start/stop support, and/or tweaking the ports which are permitted to be available (using setPermittedPorts(Iterable)) |
|
TimeExtras
Classloading this class will cause multiply/add to be made available on TimeDuration. |
|
URLParamEncoder
@deprecated since 0.7.0 use URLParamEncoder |
| Enums | |
|---|---|
IptablesCommands.Protocol
@deprecated since 0.7; use Protocol |
| Methods | |
|---|---|
AbstractEntity#onManagementBecomingMaster()
Invoked by ManagementContext when this entity becomes managed at a particular management node, including the initial management started and subsequent management node master-change for this entity. |
|
AbstractEntity#onManagementNoLongerMaster()
Invoked by ManagementContext when this entity becomes mastered at a particular management node, including the final management end and subsequent management node master-change for this entity. |
|
AbstractEntity#setAttribute(AttributeSensorAndConfigKey configuredSensor)
sets the value of the given attribute sensor from the config key value herein if the attribtue sensor is not-set or null |
|
AbstractLocation#getRawLocalConfigBag()
@deprecated since 0.7; use getLocalConfigBag() |
|
AbstractManagementContext#runAtEntity(java.util.Map flags, Entity entity, java.util.concurrent.Callable c)
Causes the indicated runnable to be run at the right location for the given entity. |
|
AbstractMembershipTrackingPolicy#reset()
Unsubscribes from the group. |
|
AbstractMembershipTrackingPolicy#setGroup(Group group)
Sets the group to be tracked; unsubscribes from any previous group, and subscribes to this group. |
|
AbstractSoftwareProcessSshDriver#getEntityVersionLabel()
@deprecated since 0.5.0; instead rely on DownloadResolverManager to include local-repo, such as: |
|
AbstractSoftwareProcessSshDriver#getEntityVersionLabel(java.lang.String separator)
@deprecated since 0.5.0; instead rely on DownloadResolverManager to include local-repo |
|
AutoScalerPolicy#setMinPeriodBetweenExecs(long val)
@deprecated since 0.7.0; use setMinPeriodBetweenExecs(Duration) |
|
AutoScalerPolicy#setResizeDownStabilizationDelay(long val)
@deprecated since 0.7.0; use setResizeDownStabilizationDelay(Duration) |
|
AutoScalerPolicy#setResizeUpStabilizationDelay(long val)
@deprecated since 0.7.0; use setResizeDownStabilizationDelay(Duration) |
|
BashCommands#sudoAsUser(java.lang.String user, java.lang.String command)
sudo to a given user and run the indicated command; |
|
BrooklynMementoPersister#waitForWritesCompleted(long timeout, java.util.concurrent.TimeUnit unit)
@deprecated since 0.7.0; use waitForWritesCompleted(Duration) |
|
ConfigMap#getRawConfig(ConfigKey key)
as getConfigRaw(ConfigKey) but returning null if not present |
|
CustomAggregatingEnricher#newAveragingEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, N defaultValueForUnreportedSensors, java.lang.Double valueToReportIfNoSensors)
creates an enricher which averages over all children/members, defaulting to excluding sensors which have not published anything (or published null), and null if there are no sensors; this behaviour can be customised, both default value for sensors, and what to report if no sensors |
|
CustomAggregatingEnricher#newEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, groovy.lang.Closure aggregator, S defaultVal)
Instead, consider calling: {@code Enrichers.Builder builder = Enrichers.builder() .aggregating(source) .publishing(target) .computing(GroovyJavaMethods. |
|
CustomAggregatingEnricher#newEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, Function aggregator, S defaultVal)
Instead, consider calling: {@code Enrichers.Builder builder = Enrichers.builder() .aggregating(source) .publishing(target) .computing(aggregator) .defaultValueForUnreportedSensors(defaultVal); |
|
CustomAggregatingEnricher#newSummingEnricher(java.util.Map flags, AttributeSensor source, AttributeSensor target, N defaultValueForUnreportedSensors, java.lang.Object valueToReportIfNoSensors)
creates an enricher which sums over all children/members, defaulting to excluding sensors which have not published anything (or published null), and null if there are no sensors; this behaviour can be customised, both default value for sensors, and what to report if no sensors |
|
DynamicClusterImpl#pickAndRemoveMember()
@deprecated since 0.6.0; subclasses should instead override pickAndRemoveMembers(int) if they really need to! |
|
EffectorBody#last()
Returns the last task queued in this context, or null if none. |
|
Entities#invokeStopOnShutdown(Entity entity)
@deprecated since 0.7.0; instead use BrooklynShutdownHooks#invokeStopOnShutdown(Entity)#invokeStopOnShutdown(Entity) |
|
Entities#manage(Location loc, ManagementContext managementContext)
@since 0.6.0 (added only for backwards compatibility, where locations are being created directly). |
|
EntityLocal#getConfig(ConfigKey key, java.lang.Object defaultValue)
sets the value of the given attribute sensor from the config key value herein, // * if the config key resolves to a non-null value as a sensor // * // * @deprecated since 0.5; use setAttribute(AttributeSensor, Object), such as // * // * T val = getConfig(KEY.getConfigKey()); // * if (val ! |
|
EntityLocal#getConfig(HasConfigKey key, java.lang.Object defaultValue)
@deprecated in 0.5; use getConfig(HasConfigKey) |
|
EntityType#getEffector(java.lang.String name, java.lang.Class parameterTypes)
@return the matching effector on this entity |
|
Exceptions#propagateCollapsed(java.lang.Throwable source)
removes uninteresting items from the top of the call stack (but keeps interesting messages), and throws |
|
ExecutionUtils#invoke(java.lang.Object callable, java.lang.Object args)
Attempts to run/call the given object, with the given arguments if possible, preserving the return value if there is one (null otherwise); throws exception if the callable is a non-null object which cannot be invoked (not a callable or runnable) |
|
FlagUtils#setAllConfigKeys(java.util.Map flagsOrConfig, Configurable instance)
sets _all_ accessible _ConfigKey_ and HasConfigKey fields on the given object, using the indicated flags/config-bag |
|
FlagUtils#setAllConfigKeys(Configurable o, ConfigBag bag)
sets _all_ accessible _ConfigKey_ and HasConfigKey fields on the given object, using the indicated flags/config-bag |
|
JmxNotificationFilters#matchesTypeRegex(java.lang.String typeRegex)
|
|
LanguageUtils#addToMapOfLists(java.util.Map map, java.lang.Object key, java.lang.Object valueInCollection)
as addToMapOfSets(Map, Object, Object) but for java.util.ArrayList |
|
LanguageUtils#addToMapOfSets(java.util.Map map, java.lang.Object key, java.lang.Object valueInCollection)
Adds the given value to a collection in the map under the key. |
|
LanguageUtils#newUid()
@deprecated use Identifiers.makeRandomId(8) |
|
LanguageUtils#removeFromMapOfCollections(java.util.Map map, java.lang.Object key, java.lang.Object valueInCollection)
Removes the given value from a collection in the map under the key. |
|
LocalSubscriptionManager#addToMapOfSets(java.util.Map map, java.lang.Object key, java.lang.Object valueInCollection)
Copied from LanguageUtils.groovy, to remove dependency. |
|
LocalSubscriptionManager#removeFromMapOfCollections(java.util.Map map, java.lang.Object key, java.lang.Object valueInCollection)
Copied from LanguageUtils.groovy, to remove dependency. |
|
LocationManager#manage(Location loc)
Begins management for the given location and its children, recursively. |
|
Locations#manage(Location loc, ManagementContext managementContext)
Registers the given location (and all its children) with the management context. |
|
PeriodicDeltaChangeListener#waitForPendingComplete(long timeout, java.util.concurrent.TimeUnit unit)
This method must only be used for testing. |
|
ProcessTool#execProcesses(java.util.List cmds, java.util.Map env, java.io.OutputStream out, java.io.OutputStream err, java.lang.String separator, java.lang.Object contextForLogging)
as execProcesses(List, Map, OutputStream, OutputStream, String, boolean, Object) but not using a login shell |
|
ProcessTool#execProcesses(java.util.List cmds, java.util.Map env, java.io.OutputStream out, java.io.OutputStream err, java.lang.String separator, boolean asLoginShell, java.lang.Object contextForLogging)
@deprecated since 0.7; use execProcesses(List, Map, File, OutputStream, OutputStream, String, boolean, Object) |
|
ProcessTool#execSingleProcess(java.util.List cmdWords, java.util.Map env, java.io.OutputStream out, java.io.OutputStream err, java.lang.Object contextForLogging)
@deprecated since 0.7; use execSingleProcess(List, Map, File, OutputStream, OutputStream, Object) |
|
RebindManagerImpl#setPeriodicPersistPeriod(long periodMillis)
@deprecated since 0.7.0; use setPeriodicPersistPeriod(Duration) |
|
Repeater#repeat()
Sets the main body of the loop to be a no-op; useful if using until(Callable) instead |
|
Repeater#every(long duration)
@see #every(long, TimeUnit) |
|
ResourceUtils#mergePaths(java.lang.String items)
returns the items with exactly one "/" between items (whether or not the individual items start or end with /), except where character before the / is a : (url syntax) in which case it will permit multiple (will not remove any) |
|
SensorPropagatingEnricher#newInstanceRenaming(Entity source, java.util.Map sensors)
listens to sensors from source, propagates them here renamed according to the map |
|
SensorTransformingEnricher#newInstanceTransforming(Entity producer, AttributeSensor source, Function transformation, AttributeSensor target)
creates an enricher which listens to a source (from the producer), transforms it and publishes it under the target |
|
SshTool#connect(int maxAttempts)
@deprecated since 0.7.0; (since much earlier) this ignores the argument in favour of PROP_SSH_TRIES |
|
TaskQueueingContext#last()
returns the last task in the queue, or null if none |
|
TestUtils#assertAttributeContinually(Entity entity, AttributeSensor attribute, java.lang.Object expected)
@deprecated since 0.5; use EntityTestUtils#assertAttributeEqualsContinually(Entity, AttributeSensor, Object)#assertAttributeEqualsContinually(Entity, AttributeSensor, Object) |
|
TestUtils#assertAttributeEventually(Entity entity, AttributeSensor attribute, java.lang.Object expected)
@deprecated since 0.5; use EntityTestUtils#assertAttributeEqualsEventually(Entity, AttributeSensor, Object)#assertAttributeEqualsEventually(Entity, AttributeSensor, Object) |
|
TestUtils#assertContinually(java.util.Map flags = [:], Supplier supplier, Predicate predicate)
@deprecated since 0.5; use Asserts#continually(Map, Supplier, Predicate)#continually(Map, Supplier, Predicate) |
|
TestUtils#assertContinually(java.util.Map flags = [:], Supplier supplier, Predicate predicate, java.lang.String errMsg, long durationMs)
@deprecated since 0.5; use Asserts#continually(Map, Supplier, Predicate, String)#continually(Map, Supplier, Predicate, String) |
|
TestUtils#assertContinually(java.util.Map flags = [:], Supplier supplier, Predicate predicate, java.lang.String errMsg)
@deprecated since 0.5; use Asserts#continually(Map, Supplier, Predicate, String)#continually(Map, Supplier, Predicate, String) |
|
TestUtils#assertContinuallyFromJava(java.util.Map flags = [:], Supplier supplier, Predicate predicate)
@deprecated since 0.5; use Asserts#continually(Map, Supplier, Predicate)#continually(Map, Supplier, Predicate) |
|
TestUtils#assertEventually(java.util.Map flags = [:], Supplier supplier, Predicate predicate)
@deprecated since 0.5; use Asserts#eventually(Map, Supplier, Predicate)#eventually(Map, Supplier, Predicate) |
|
TestUtils#assertEventually(java.util.Map flags = [:], Supplier supplier, Predicate predicate, java.lang.String errMsg)
@deprecated since 0.5; use Asserts#eventually(Map, Supplier, Predicate, String)#eventually(Map, Supplier, Predicate, String) |
|
TestUtils#assertEventually(java.util.Map flags = [:], java.util.concurrent.Callable c)
@deprecated since 0.5; use Asserts.succeedsEventually |
|
TestUtils#assertEventually(java.util.Map flags = [:], java.lang.Runnable c)
@deprecated since 0.5; use Asserts#succeedsEventually(Map, Runnable)#succeedsEventually(Map, Runnable) |
|
TestUtils#assertFails(java.lang.Runnable c)
@deprecated since 0.5; use Asserts#assertFails(Runnable)#assertFails(Runnable) |
|
TestUtils#assertFailsWith(java.lang.Runnable c, groovy.lang.Closure exceptionChecker)
@deprecated since 0.5; use Asserts#assertFailsWith(Closure)#assertFailsWith(Closure) |
|
TestUtils#assertFailsWith(java.lang.Runnable c, java.lang.Class validException, java.lang.Class otherValidExceptions)
@deprecated since 0.5; use Asserts.assertFailsWith |
|
TestUtils#assertFailsWith(java.lang.Runnable c, Predicate exceptionChecker)
@deprecated since 0.5; use Asserts#assertFailsWith(Runnable, Predicate)#assertFailsWith(Runnable, Predicate) |
|
TestUtils#assertNonEmpty(java.lang.Iterable c)
@deprecated since 0.5; use assertFalse(Iterables.isEmpty(c)) |
|
TestUtils#assertSize(java.lang.Iterable c, int expectedSize)
@deprecated since 0.5; use assertEquals(Iterables.size(c), expectedSize) |
|
TestUtils#assertSucceedsContinually(java.util.Map flags = [:], java.lang.Runnable job)
@deprecated since 0.5; use Asserts#succeedsContinually(Map, Runnable)#succeedsContinually(Map, Runnable) |
|
TestUtils#assertSucceedsContinually(java.util.Map flags = [:], java.util.concurrent.Callable job)
@deprecated since 0.5; use Asserts#succeedsContinually(Map, Callable)#succeedsContinually(Map, Callable) |
|
TestUtils#assertUrlStatusCodeEventually(java.lang.String url, int expected)
@deprecated since 0.5; use HttpTestUtils#assertHttpStatusCodeEquals(String, int)#assertHttpStatusCodeEquals(String, int) |
|
TestUtils#connectToURL(java.lang.String url)
Connects to the given url and returns the connection. |
|
TestUtils#executeUntilSucceeds(java.util.Map flags = [:], groovy.lang.Closure c)
@deprecated since 0.5; use Asserts#succeedsEventually(Map, Callable)#succeedsEventually(Map, Callable) |
|
TestUtils#executeUntilSucceeds(java.util.Map flags = [:], java.util.concurrent.Callable c)
@deprecated since 0.5; use Asserts#succeedsEventually(Map, Callable)#succeedsEventually(Map, Callable) |
|
TestUtils#executeUntilSucceeds(java.util.Map flags = [:], java.lang.Runnable r)
@deprecated since 0.5; use Asserts#succeedsEventually(Map, Runnable)#succeedsEventually(Map, Runnable) |
|
TestUtils#executeUntilSucceedsElseShutdown(java.util.Map flags = [:], Entity entity, groovy.lang.Closure c)
@deprecated since 0.5; use Asserts#succeedsEventually(Map, Callable)#succeedsEventually(Map, Callable), and tear-down with AfterMethod. |
|
TestUtils#executeUntilSucceedsWithFinallyBlock(java.util.Map flags = [:], groovy.lang.Closure c, groovy.lang.Closure finallyBlock = {})
@deprecated since 0.5; use Asserts#succeedsEventually(Map, Callable)#succeedsEventually(Map, Callable), and tear-down with AfterMethod. |
|
TestUtils#executeUntilSucceedsWithFinallyBlock(java.util.Map flags = [:], java.util.concurrent.Callable c, groovy.lang.Closure finallyBlock = {})
Convenience method for cases where we need to test until something is true. |
|
TestUtils#executeUntilSucceedsWithFinallyBlockInternal(java.util.Map flags = [:], java.util.concurrent.Callable c, groovy.lang.Closure finallyBlock = {})
the "real" implementation, renamed to allow multiple entry points (depending whether closure cast to callable) |
|
TestUtils#executeUntilSucceedsWithShutdown(java.util.Map flags = [:], Entity entity, groovy.lang.Closure c)
convenience for entities to ensure they shutdown afterwards. |
|
TestUtils#getResource(java.lang.String path, java.lang.ClassLoader loader)
@deprecated since 0.5; use ResourceUtils |
|
TestUtils#isPortInUse(int port, long retryAfterMillis = 0)
True if two attempts to connect to the port succeed. |
|
TestUtils#toTimeDuration(java.lang.Object duration)
@deprecated since 0.5; use long and java.util.concurrent.TimeUnit |
|
TestUtils#toTimeDuration(java.lang.Object duration, groovy.time.TimeDuration defaultVal)
@deprecated since 0.5; use long and java.util.concurrent.TimeUnit |
|
TestUtils#urlRespondsStatusCode(java.lang.String url)
Connects to the given HTTP URL and asserts that the response had status code 200. |
|
TestUtils#urlRespondsWithStatusCode200(java.lang.String url)
Connects to the given HTTP URL and asserts that the response had status code 200. |
|
UtraceHostGeoLookup#getLocalhostExternalIp()
|
|
UtraceHostGeoLookup#getLocalhostExternalIpImpl()
|
| Constructors | |
|---|---|
AbstractApplication#AbstractApplication(java.util.Map properties)
@deprecated since 0.6; use EntitySpec so no-arg constructor |
|
AbstractApplication#AbstractApplication(java.util.Map properties, Entity parent)
Constructor for when application is nested inside another application |
|
AbstractEntity#AbstractEntity(java.util.Map flags)
@deprecated since 0.5; instead use no-arg constructor with EntityManager().createEntity(spec) |
|
AbstractEntity#AbstractEntity(Entity parent)
@deprecated since 0.5; instead use no-arg constructor with EntityManager().createEntity(spec) |
|
AbstractEntity#AbstractEntity(java.util.Map flags, Entity parent)
@deprecated since 0.5; instead use no-arg constructor with EntityManager().createEntity(spec) |
|
JcloudsSshMachineLocation#JcloudsSshMachineLocation(java.util.Map flags, JcloudsLocation jcloudsParent, NodeMetadata node)
@deprecated since 0.6; use LocationSpec (which calls no-arg constructor) |
|
LocalhostMachineProvisioningLocation#LocalhostMachineProvisioningLocation(java.util.Map properties)
@param properties the properties of the new instance. |
|
SensorPropagatingEnricher#SensorPropagatingEnricher(Entity source, Sensor sensors)
@deprecated since 0.7.0; use Enrichers#builder()#builder() |
|
SensorPropagatingEnricher#SensorPropagatingEnricher(Entity source, java.util.Collection sensors)
Instead, consider calling: addEnricher(Enrichers.builder() .propagating(sensors) .from(source) .build()); |
|
TimeWindowedList#TimeWindowedList(long timePeriod)
@deprecated since 0.7.0; use TimeWindowedList(Duration) |
Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.


{% extends "base.html" %}
{% block title %}Shiny{% endblock %}
{% block navbar_shiny %}active{% endblock %}
{# https://stackoverflow.com/questions/39714619/proxy-redirecting-websockets-and-http-to-the-same-unix-socket #}
{# https://blog.heroku.com/in_deep_with_django_channels_the_future_of_real_time_apps_in_django #}
{# https://realpython.com/blog/python/getting-started-with-django-channels/ #}
{% block content %}
{% endblock %}


Objective
In this challenge, we practice predicting values. Check out the Resources tab for some tips on approaching this problem.
Task
Given a record containing the maximum and minimum monthly temperatures at a particular station. The record shows the temperature information for each month in a data range from $\text{January 1908}$ to $\text{March 2012}$; however, some of the temperature values have been blanked out! Estimate and print the missing values.
Input Format
The first line contains an integer, $N$, denoting the number of rows of data in the input file.
The second line contains the header for the tab-separated file; this line can be ignored, and is simply there to make the test case easier to read.
The $N$ subsequent lines each describe the respective $year$, $month$, $\textit{maximum temperature}$, and $\textit{minimum temperature}$ data as a row of tab-separated values. In some of the rows, The $minimum$ or $maximum$ temperature field has been blanked out and replaced by: $\textit{Missing_1}$, $\textit{Missing_2}$, etc.
Constraints
Scoring
The score seen upon hitting $\text{Run Code}$ is the score against the sample test case (of $444$ rows) only. It is normalized and will always lie between $0$ and $1$.
Upon hitting $\text{Submit Code}$, the score seen is determined solely on the basis of the hidden test case.
Details on the Scoring Formula
We compute the average of the magnitude of difference between your predicted value and the actual recorded value for each of the missing terms. If this average exceeds $5.0$ degrees, you will be assigned a score of zero.
For each of the values predicted by you ($p$), we will compute an $error$. The $error$ is the difference of the predicted value ($p$) and the actual temperature at that location. Hence,
$error = \lvert p - actualTemperatureRecording \rvert$
$M = \text{total missing values in the test case}$
We will compute the average of all these error terms over all rows of data in the input file, and record it as $avg= \frac{\sum{errors}}{M}$
Your score for this challenge will be $(1- \frac{avg}{5.0}) \times (Max Score)$
Here, $MaxScore = \text{Total number of points assigned to this challenge}$.
Output Format
Print each missing value on a new line.
Sample Input
20
yyyy month tmax tmin
1908 January 5.0 -1.4
1908 February 7.3 1.9
1908 March 6.2 0.3
1908 April Missing_1 2.1
1908 May Missing_2 7.7
1908 June 17.7 8.7
1908 July Missing_3 11.0
1908 August 17.5 9.7
1908 September 16.3 8.4
1908 October 14.6 8.0
1908 November 9.6 3.4
1908 December 5.8 Missing_4
1909 January 5.0 0.1
1909 February 5.5 -0.3
1909 March 5.6 -0.3
1909 April 12.2 3.3
1909 May 14.7 4.8
1909 June 15.0 7.5
1909 July 17.3 10.8
1909 August 18.8 10.7
The above test case is for explanatory purposes only, which is why we included only $20$ lines.
The sample test case, which is run upon hitting $\text{Run Code}$, has $444$ rows of data.
The hidden test case, which is used at the time of submission, has over $1.2k$ rows of data. The sample test case rows are a subset of it.
Sample Output
The four missing values ($\textit{Missing_1}$, $\textit{Missing_2}$, $\textit{Missing_3}$, and $\textit{Missing_4}$) are:
8.6
15.8
18.9
0.0
Your task is to predict values as close as possible to these.


Perform factorial analysis with a menu and draw graphs interactively thanks to 'FactoMineR' and a Shiny application.
| Version: | 1.0.7 |
| Depends: | FactoMineR, colourpicker, shiny |
| Published: | 2018-11-07 |
| Author: | Pauline Vaissie, Astrid Monge, Francois Husson |
| Maintainer: | Francois Husson <husson at agrocampus-ouest.fr> |
| License: | GPL-2 | GPL-3 [expanded from: GPL (≥ 2)] |
| NeedsCompilation: | no |
| CRAN checks: | Factoshiny results |
| Reference manual: | Factoshiny.pdf |
| Vignettes: |
Factoshiny Introduction |
| Package source: | Factoshiny_1.0.7.tar.gz |
| Windows binaries: | r-devel: Factoshiny_1.0.7.zip, r-release: Factoshiny_1.0.7.zip, r-oldrel: Factoshiny_1.0.7.zip |
| OS X binaries: | r-release: Factoshiny_1.0.7.tgz, r-oldrel: Factoshiny_1.0.7.tgz |
| Old sources: | Factoshiny archive |
Please use the canonical form https://CRAN.R-project.org/package=Factoshiny to link to this page.


|
Stickman Project
1.0
2D platformer games
|
Game menu. More...
Public Member Functions | |
| virtual | ~Menu (void) |
| Default destructor. | |
| void | action (void) |
| Method that implements the behavior of the menu. | |
Static Public Member Functions | |
| static Menu * | getInstance (void) |
| Get menu instance. More... | |
Private Member Functions | |
| Menu (void) | |
| Private constructor. | |
Private Attributes | |
| sf::RenderWindow * | m_screen |
| Screen. | |
| sf::Texture * | m_bgTexture |
| Background texture. | |
| sf::Sprite * | m_bgSprite |
| Background sprite. | |
| sf::Texture * | m_saxTexture |
| Epic sax guy texture. | |
| sf::Texture * | m_saxDanceTexture |
| Epic sax guy dance texture. | |
| sf::Texture * | m_playTexture |
| Play button texture. | |
| sf::Sprite * | m_playSprite |
| Play button sprite. | |
| sf::Texture * | m_activePlayTexture |
| Active play button texture. | |
| sf::Texture * | m_optionTexture |
| Option button texture. | |
| sf::Sprite * | m_optionSprite |
| Option button sprite. | |
| sf::Texture * | m_activeOptionTexture |
| Active option button sprite. | |
| sf::Music * | m_music |
| Music of the game. | |
| sf::Sound * | m_sound |
| Sound of the buttons. | |
| sf::SoundBuffer * | m_soundBuffer |
| Sound buffer of the buttons. | |
| bool | m_played |
| Boolean to know when the buttons sound has to be played or not. | |
| bool | m_onButton |
| Boolean to know when the mouse is currently on the button. | |
| bool | m_saxguy |
| Boolean to know when the EPIC SAX GUY mode is ON or OFF. | |
Static Private Attributes | |
| static Menu * | m_menu |
| Instance. | |
Game menu.