M_regex(3fm) - [M_regex] Fortran interface to POSIX 1003.2 regular expression library using ISO_C_BINDING.
Synopsis
Description
Description
C Wrappers
Fortran Wrappers
General
Implementation Choices
Unit Test
See Also
use M_regex, only : regcomp(3f), regexec(3f), regerror(3f), regfree(3f) use M_regex, only : regmatch(3f), regsub(3f)
These routines interface with the C implementation of IEEE Std 1003.2 ( POSIX.2 ) RE (Regular Expressions).
The Fortran interface is composed of wrapper routines that call the C library, plus some extensions (ie. regmatch(3f), regsub(3f)). See the C documentation for further details about implementation, performance, and limitations.
o The regcomp(3c) function compiles a RE string into an internal form o regexec(3c) matches that internal form against a string and reports results o regerror(3c) transforms error codes from either into human-readable messages o and regfree(3c) frees any dynamically-allocated storage used by the internal form of an RE. The following constructs are recognized in a ERE (Extended Regular Expression):
. Matches any character except newline. * (postfix) Matches the preceding expression zero, one or several times + (postfix) Matches the preceding expression one or several times ? (postfix) Matches the preceding expression once or not at all [..] Character set. Ranges are denoted with - , as in [a-z] . An initial ^ , as in [^0-9] , complements the set. To include a ] character in a set, make it the first character of the set. To include a - character in a set, make it the first or the last character of the set.^ Matches at beginning of line: either at the beginning of the matched string, or just after a \n character. $ Matches at end of line: either at the end of the matched string, or just before a \n character. | (infix) Alternative between two expressions. (..) Grouping and naming of the enclosed expression. \1 The text matched by the first \(...\) expression ( \2 for the second expression, and so on up to \9 ). \b Matches word boundaries. \ Quotes special characters. The special characters are $^\.*+?[] .
Regular expressions ( REs ), as defined in IEEE Std 1003.2 ( POSIX.2 ), come in two forms: modern REs (roughly those of egrep(1); 1003.2 calls these extended REs or ERE) and obsolete REs (roughly those of ed(1); 1003.2 basic REs or BRE). BRE mostly exist for backward compatibility in some old programs; they will be discussed at the end. IEEE Std 1003.2 ( POSIX.2 ) leaves some aspects of RE syntax and semantics open; decisions on these aspects mean that conforming implementations of IEEE Std 1003.2 ( POSIX.2 ) may not be completely compatible.
A (modern) RE is one or more non-empty branches, separated by |. It matches anything that matches one of the branches.
A branch is one or more pieces, concatenated. It matches a match for the first, followed by a match for the second, etc.
A piece is an atom possibly followed by a single * , + , ? , or bound. An atom followed by * matches a sequence of 0 or more matches of the atom. An atom followed by + matches a sequence of 1 or more matches of the atom. An atom followed by ? matches a sequence of 0 or 1 matches of the atom.
A bound is { followed by an unsigned decimal integer, possibly followed by , possibly followed by another unsigned decimal integer, always followed by } . The integers must lie between 0 and RE_DUP_MAX (255 ) inclusive, and if there are two of them, the first may not exceed the second. An atom followed by a bound containing one integer i and no comma matches a sequence of exactly i matches of the atom. An atom followed by a bound containing one integer i and a comma matches a sequence of i or more matches of the atom. An atom followed by a bound containing two integers i and j matches a sequence of i through j (inclusive) matches of the atom.
An atom is a regular expression enclosed in () (matching a match for the regular expression), an empty set of () (matching the null string) , a bracket expression (see below), . (matching any single character), ^ (matching the null string at the beginning of a line), $ (matching the null string at the end of a line), a \\ followed by one of the characters ^.[$()|*+?{\ (matching that character taken as an ordinary character), a \ followed by any other character (matching that character taken as an ordinary character, as if the \ had not been present ), or a single character with no other significance (matching that character). A { followed by a character other than a digit is an ordinary character, not the beginning of a bound . It is illegal to end an RE with \ .
A bracket expression is a list of characters enclosed in [] [char46] It normally matches any single character from the list (but see below). If the list begins with ^ , it matches any single character (but see below) not from the rest of the list. If two characters in the list are separated by - , this is shorthand for the full range of characters between those two (inclusive) in the collating sequence, e.g. [0-9] in ASCII matches any decimal digit. It is illegal for two ranges to share an endpoint, e.g. a-c-e . Ranges are very collating-sequence-dependent, and portable programs should avoid relying on them.
To include a literal ] in the list, make it the first character (following a possible ^ ). To include a literal - , make it the first or last character, or the second endpoint of a range. To use a literal - as the first endpoint of a range, enclose it in [. and .] to make it a collating element (see below). With the exception of these and some combinations using [ (see next paragraphs), all other special characters, including \ , lose their special significance within a bracket expression.
Within a bracket expression, a collating element (a character, a multi-character sequence that collates as if it were a single character, or a collating-sequence name for either) enclosed in [. and .] stands for the sequence of characters of that collating element. The sequence is a single element of the bracket expressions list. A bracket expression containing a multi-character collating element can thus match more than one character, e.g. if the collating sequence includes a ch collating element, then the RE [[.ch.]]*c matches the first five characters of chchcc .
Within a bracket expression, a collating element enclosed in [= and =] is an equivalence class, standing for the sequences of characters of all collating elements equivalent to that one, including itself. (If there are no other equivalent collating elements, the treatment is as if the enclosing delimiters were [. and .] [char46]) For example, if x and y are the members of an equivalence class, then [[=x=]] , [[=y=]] , and [xy] are all synonymous. An equivalence class may not be an endpoint of a range.
Within a bracket expression, the name of a character class enclosed in [: and :] stands for the list of all characters belonging to that class. Standard character class names are:
alnum digit punct alpha graph space blank lower upper cntrl print xdigitThese stand for the character classes defined in ctype(3). A locale may provide others. A character class may not be used as an endpoint of a range.
A bracketed expression like [[:class:]] can be used to match a single character that belongs to a character class. The reverse, matching any character that does not belong to a specific class, the negation operator of bracket expressions may be used: [^[:class:]] .
There are two special cases of bracket expressions: the bracket expressions [[:<:]] and [[:>:]] match the null string at the beginning and end of a word respectively. A word is defined as a sequence of word characters which is neither preceded nor followed by word characters. A word character is an alnum character (as defined by ctype(3)) or an underscore. This is an extension, compatible with but not specified by IEEE Std 1003.2 ( POSIX.2 ), and should be used with caution in software intended to be portable to other systems.
In the event that an RE could match more than one substring of a given string, the RE matches the one starting earliest in the string. If the RE could match more than one substring starting at that point, it matches the longest. Subexpressions also match the longest possible substrings, subject to the constraint that the whole match be as long as possible, with subexpressions starting earlier in the RE taking priority over ones starting later. Note that higher-level subexpressions thus take priority over their lower-level component subexpressions.
Match lengths are measured in characters, not collating elements. A null string is considered longer than no match at all. For example, bb* matches the three middle characters of abbbc , (wee|week)(knights|nights) matches all ten characters of weeknights, when (.*).* is matched against abc the parenthesized subexpression matches all three characters, and when (a*)* is matched against bc both the whole RE and the parenthesized subexpression match the null string.
If case-independent matching is specified, the effect is much as if all case distinctions had vanished from the alphabet. When an alphabetic that exists in multiple cases appears as an ordinary character outside a bracket expression, it is effectively transformed into a bracket expression containing both cases, e.g. x becomes [xX] . When it appears inside a bracket expression, all case counterparts of it are added to the bracket expression, so that (e.g.) [x] becomes [xX] and [^x] becomes [^xX] .
No particular limit is imposed on the length of REs . Programs intended to be portable should not employ REs longer than 256 bytes, as an implementation can refuse to accept such REs and remain POSIX-compliant.
Obsolete ( basic ) regular expressions differ in several respects. | is an ordinary character and there is no equivalent for its functionality. + and ? are ordinary characters, and their functionality can be expressed using bounds ( {1,} or {0,1} respectively). Also note that x+ in modern, REs is equivalent to xx* . The delimiters for bounds are \{ and \} with { and } by themselves ordinary characters. The parentheses for nested subexpressions are \( and \) , with ( and ) by themselves ordinary characters. ^ is an ordinary character except at the beginning of the RE or the beginning of a parenthesized subexpression, $ is an ordinary character except at the end of the RE or the end of a parenthesized subexpression, and * is an ordinary character if it appears at the beginning of the RE or the beginning of a parenthesized subexpression (after a possible leading ^ ). Finally, there is one new type of atom, a back reference: \ followed by a non-zero decimal digit d matches the same sequence of characters matched by the dth parenthesized subexpression (numbering subexpressions by the positions of their opening parentheses, left to right), so that (e.g.) \([bc]\)\1 matches bb or cc but not bc .
Regex is defined as an API using C headers. It does not define the exact value of flag tokens, just the names. It also uses an opaque data structure and a declared numeric type for the match array. Therefore, the code must either be generated for each target platform, or it must use wrapper functions written in C.
Fortran wrapper functions are also required to present a normal Fortran API, and to not require C conversions by the caller.
The interface here is not strictly correct, because it does not explicitly convert Fortran strings to the C character kind. Fortran only supports conversion of string kinds by assignment, or by a rather slow internal WRITE. For now, the easiest approach is to assume that C and Fortran default character kinds are the same. This is generally true, but UTF-8 strings are likely to cause problems.
By default, the NUL-terminated string pointed to by string is considered to be the text of an entire line, minus any terminating newline. The eflags argument is the bitwise OR of zero or more of the following flags:
If REG_NOSUB was specified in the compilation of the RE, or if nmatch is 0, regexec() ignores the pmatch argument (but see below for the case where REG_STARTEND is specified). Otherwise, pmatch points to an array of nmatch structures of type regmatch_t. Such a structure has at least the members rm_so and rm_eo, both of type regoff_t (a signed arithmetic type at least as large as an off_t and a ssize_t), containing respectively the offset of the first character of a substring and the offset of the first character after the end of the substring. Offsets are measured from the beginning of the string argument given to regexec(). An empty substring is denoted by equal offsets, both indicating the character following the empty substring.
REG_NOTBOL The first character of the string is not the beginning of a line, so the ^ anchor should not match before it. This does not affect the behavior of newlines under REG_NEWLINE. REG_NOTEOL The NUL terminating the string does not end a line, so the $ anchor should not match before it. This does not affect the behavior of newlines under REG_NEWLINE. REG_STARTEND The string is considered to start at string + pmatch[0].rm_so and to have a terminating NUL located at string
o pmatch[0].rm_eo (there need not actually be a NUL at that location), regardless of the value of nmatch. See below for the definition of pmatch and nmatch. This is an extension, compatible with but not specified by IEEE Std 1003.2 ( POSIX.2 ), and should be used with caution in software intended to be portable to other systems. Note that a non-zero rm_so does not imply REG_NOTBOL; REG_STARTEND affects only the location of the string, not how it is matched. The 0th member of the pmatch array is filled in to indicate what substring of string was matched by the entire RE. Remaining members report what substring was matched by parenthesized subexpressions within the RE; member i reports subexpression i, with subexpressions counted (starting at 1) by the order of their opening parentheses in the RE, left to right. Unused entries in the array (corresponding either to subexpressions that did not participate in the match at all, or to subexpressions that do not exist in the RE (that is, i > preg->re_nsub)) have both rm_so and rm_eo set to -1. If a subexpression participated in the match several times, the reported substring is the last one it matched. (Note, as an example in particular , that when the RE (b*)+ matches bbb , the parenthesized subexpression matches each of the three bs and then an infinite number of empty strings following the last b , so the reported substring is one of the empties.)
If REG_STARTEND is specified, pmatch must point to at least one regmatch_t (even if nmatch is 0 or REG_NOSUB was specified), to hold the input offsets for REG_STARTEND. Use for output is still entirely controlled by nmatch; if nmatch is 0 or REG_NOSUB was specified, the value of pmatch[0] will not be changed by a successful regexec().
The regerror() function maps a non-zero errcode from either regcomp() or regexec() to a human-readable, printable message. If preg is non-NULL, the error code should have arisen from use of the regex_t pointed to by preg, and if the error code came from regcomp(), it should have been the result from the most recent regcomp() using that regex_t. The (regerror() may be able to supply a more detailed message using information from the regex_t.) The regerror() function places the NUL-terminated message into the buffer pointed to by errbuf, limiting the length (including the NUL) to at most errbuf_size bytes. If the whole message will not fit, as much of it as will fit before the terminating NUL is supplied. In any case, the returned value is the size of buffer needed to hold the whole message (including terminating NUL). If errbuf_size is 0, errbuf is ignored but the return value is still correct.
The regfree() function frees any dynamically-allocated storage associated with the compiled RE pointed to by preg. The remaining regex_t is no longer a valid compiled RE and the effect of supplying it to regexec() or regerror() is undefined.
None of these functions references global variables except for tables of constants; all are safe for use from multiple threads if the arguments are safe.
RE_DUP_MAX, the limit on repetition counts in bounded repetitions, is 255.
A repetition operator ( ? , * , + , or bounds) cannot follow another repetition operator. A repetition operator cannot begin an expression or subexpression or follow ^ or | .
| cannot appear first or last in a (sub)expression or after another | , i.e., an operand of | cannot be an empty sub expression. An empty parenthesized subexpression, () , is legal and matches an empty (sub)string. An empty string is not a legal RE.
A { followed by a digit is considered the beginning of bounds for a bounded repetition, which must then follow the syntax for bounds. A { not followed by a digit is considered an ordinary character.
^ and $ beginning and ending subexpressions in obsolete ( basic ) REs are anchors, not ordinary characters.
The test program test_suite_M_regex may be run via "fpm test" or when M_regex(3f) is built as part of the GPF (General Purpose Fortran library) but requires the test framework in GPF so it cannot be run stand-alone.
Regular Expression Notation, IEEE Std, 1003.2, section 2.8.
grep(1), re_format(7), regex(3)
These routines implement IEEE Std 1003.2 ("POSIX.2") regular expressions ("RE"s); see re_format(7).
IEEE Std 1003.2 (POSIX.2), sections 2.8 (Regular Expression Notation) and B.5 (C Binding for Regular Expression Matching).
regcomp (3p) - regular expression matching regex (3) - regular-expression library regex (7) - POSIX 1003.2 regular expressions regex.h (0p) - regular expression matching types regexp (n) - Match a regular expression against a string regsub (n) - Perform substitutions based on regular expression pattern matching
| Nemo Release 3.1 | M_regex (3) | July 22, 2023 |


Opens the given URL. ## Syntax
openURL(url: <#String (Allows Variables)#>)
openURL(url: "https://Jellycuts.com")


toDo List
Logout
Add a Task. Or Two. Or Three.
What would you like to do?
When would you like to accomplish your task?
Add Task
Due Tasks
Completed Tasks


FlowAuditor |
interface FlowAuditor : CordaFlowInjectable |
FlowEngine |
interface FlowEngine : CordaFlowInjectable |
FlowIdentity |
interface FlowIdentity : CordaFlowInjectable |
FlowMessaging |
interface FlowMessaging : CordaFlowInjectable |


Prayer is turning to our God in our hearts and with our minds. It is talking to him in trust so that we make a relationship with him. We ask him for the good things we need and to help us when we are anxious and worried. When we realize how good he is, we praise and thank him.
Life is busy and to set aside time, even if only 10 minutes, to pray needs a lot of will power and need for God. Any time you turn to God and speak to him is prayer and is of great value. For example this can be done on the bus, while cleaning your teeth, or cooking, or mowing the grass. For more information go to the Links page, and see below.
St Francis and St Clare built their relationship on faith in the fact that God the Son became human, just as we are human. This showed them just how much God loved us human beings, and they wanted to repay this love by following the way Jesus lived as closely as they could. Clare said: “Love him totally who gave himself totally for your love.” Francis built his prayer on adoration because he was so aware that God was good and that he was a sinner. Clare, with her feminine instinct, prayed by just looking at Jesus, just gazing on him with love, just being herself in his presence.
You can find out more about Francis' prayers here.
You can find out more about Clare's prayers here.


P E R S I S T E N C E
To me, the most satisfying feeling is witnessing the accomplishments that took the most vigilance, determination, hard work, and above all persistence. If one stays persistent, I believe that any future task (successful or not) brings only the potential for growth and development.
Values I Live Up To
In general, I try to live up to these values (1 = Disagree, 5 = Agree):
-
Ambition - 4
-
Affection - 4
-
Challenge - 4
-
Creativity - 3
-
Music - 4
-
Nature - 3
-
Close Relationships - 5
-
Growth - 5
-
Independence - 5
-
Inspiration -3
-
Order - 4
-
Personal Development - 5
-
Family - 5
-
Will-Power - 3
-
Persistence - 4
Advice
Well, If I’m being completely honest on the last topic someone asked my advice on, it would be fashion…I guess? I helped my housemate choose an outfit last night...
But a more meaningful time was when a childhood friend of mine recently asked how/why I chose to pursue web development. She has been out of university for a few years now and said she was feeling stagnant. Because she is so driven and eager to learn, she has become bored of her current position at 24 Hour Fitness' corporate office. My advice to her was to always try to live your life with one dream/goal to fulfill; it can be anything. No matter how many of your dreams you have realized in the past, you always want to have one more to go. I believe, when you stop dreaming or working towards something, life becomes mundane.
Values & Stereotype Threat
When I read through the values I have listed I feel hopeful and excited for my future. Each one has great purpose and significance to my overall success and well-being. I think that my affection and sensitivity (although obnoxiously hyper) will help me identify situations that stereotype threat is present. I am however, still unsure of how to address that I feel stereotyped without creating any tension among my peers.
Tidbits to Rememeber while at DBC
I feel like I may have instances of lack of motivation or may have trouble remaining vigilant, but I must remember to stay persistent and press on. I need to also remember that even in frustration, programming is fun :)
A quote that helps me is :
“Press on – nothing can take the place of persistence. Talent will not; nothing is more common than unsuccessful men with talent. Genius will not; unrewarded genius is almost a proverb. Education will not; the world is full of educated derelicts. Perseverance and determination alone are omnipotent.”
-Calvin Coolidge


My first post
2016-06-15
By Michael
This is the
Markdown
content of the first post, which should appropriately be translated into the relevant
HTML
code.


My Dream Trip To Germany...
Intro Paragraph
Who doesn't love to travel? Traveling has always been one of my favorite hobbies, amongst others. I have visited many places around the world but have never gotten the opportunity to visit Germany. Germany is Europe's most industrialised and populous country and has also produced some of Europe's most celebrated composers, philosophers and poets. Germany is also the home to many automotive makers such as Volkswagen and Porsche. Since I was a little girl, Germany has caught my attention due to the famous Berlin Wall and all its history, Brandonburg gate, and the enchanting Cologne Cathedral. I would truly love to get a chance to visit Germany and experience the beautiful city, weather, and its people.
Landmarks/Restaurants/Seightseeing Areas
Find More Info Here:
Germany Images


Step Definitions that match a plain text Step with a multiline argument table will receive it as an instance of Table. A Table object holds the data of a table parsed from a feature file and lets you access and manipulate the data in different ways.
For example:
Given I have: | a | b | | c | d |
And a matching StepDefinition:
Given /I have:/ do |table| data = table.raw end
This will store [['a', 'b'], ['c', 'd']]
in the
data
variable.
Creates a new instance. raw
should be an Array of Array of
String or an Array of Hash (similar to what hashes returns). You don’t typically
create your own Table objects - Cucumber will do it internally and pass them
to your Step Definitions.
# File lib/cucumber/ast/table.rb, line 74 def initialize(raw, conversion_procs = NULL_CONVERSIONS.dup, header_mappings = {}, header_conversion_proc = nil) @cells_class = Cells @cell_class = Cell raw = ensure_array_of_array(rubify(raw)) # Verify that it's square raw.transpose create_cell_matrix(raw) @conversion_procs = conversion_procs @header_mappings = header_mappings @header_conversion_proc = header_conversion_proc end
# File lib/cucumber/ast/table.rb, line 62 def self.parse(text, uri, offset) builder = Builder.new lexer = Gherkin::Lexer::I18nLexer.new(builder) lexer.scan(text) new(builder.rows) end
Compares other_table
to self. If other_table
contains columns and/or rows that are not in self, new columns/rows are
added at the relevant positions, marking the cells in those rows/columns as
surplus
. Likewise, if other_table
lacks columns
and/or rows that are present in self, these are marked as
missing
.
surplus
and missing
cells are recognised by
formatters and displayed so that it's easy to read the differences.
Cells that are different, but look identical (for example the boolean true and the string “true”) are converted to their Object#inspect representation and preceded with (i) - to make it easier to identify where the difference actually is.
Since all tables that are passed to StepDefinitions always have String objects in their cells, you may want to use map_column! before calling diff!. You can use map_column! on either of the tables.
A Different error is raised if there are
missing rows or columns, or surplus rows. An error is not raised
for surplus columns. An error is not raised for misplaced (out of
sequence) columns. Whether to raise or not raise can be changed by setting
values in options
to true or false:
missing_row
: Raise on missing rows (defaults to true)
surplus_row
: Raise on surplus rows (defaults to true)
missing_col
: Raise on missing columns (defaults to true)
surplus_col
: Raise on surplus columns (defaults to false)
misplaced_col
: Raise on misplaced columns (defaults to false)
The other_table
argument can be another Table, an Array of Array or an Array of Hash (similar
to the structure returned by hashes).
Calling this method is particularly useful in Then
steps that
take a Table argument, if you want to compare that
table to some actual values.
# File lib/cucumber/ast/table.rb, line 306 def diff!(other_table, options={}) Kernel.warn "[warning] diff! will be deprecated" options = { :missing_row => true, :surplus_row => true, :missing_col => true, :surplus_col => false, :misplaced_col => false }.merge(options) other_table = ensure_table(other_table) other_table.convert_headers! other_table.convert_columns! ensure_green! convert_headers! convert_columns! original_width = cell_matrix[0].length other_table_cell_matrix = pad!(other_table.cell_matrix) padded_width = cell_matrix[0].length missing_col = cell_matrix[0].detect{|cell| cell.status == :undefined} surplus_col = padded_width > original_width misplaced_col = cell_matrix[0] != other_table.cell_matrix[0] require_diff_lcs cell_matrix.extend(Diff::LCS) changes = cell_matrix.diff(other_table_cell_matrix).flatten inserted = 0 missing = 0 row_indices = Array.new(other_table_cell_matrix.length) {|n| n} last_change = nil missing_row_pos = nil insert_row_pos = nil changes.each do |change| if(change.action == '-') missing_row_pos = change.position + inserted cell_matrix[missing_row_pos].each{|cell| cell.status = :undefined} row_indices.insert(missing_row_pos, nil) missing += 1 else # '+' insert_row_pos = change.position + missing inserted_row = change.element inserted_row.each{|cell| cell.status = :comment} cell_matrix.insert(insert_row_pos, inserted_row) row_indices[insert_row_pos] = nil inspect_rows(cell_matrix[missing_row_pos], inserted_row) if last_change && last_change.action == '-' inserted += 1 end last_change = change end other_table_cell_matrix.each_with_index do |other_row, i| row_index = row_indices.index(i) row = cell_matrix[row_index] if row_index if row (original_width..padded_width).each do |col_index| surplus_cell = other_row[col_index] row[col_index].value = surplus_cell.value if row[col_index] end end end clear_cache! should_raise = missing_row_pos && options[:missing_row] || insert_row_pos && options[:surplus_row] || missing_col && options[:missing_col] || surplus_col && options[:surplus_col] || misplaced_col && options[:misplaced_col] raise Different.new(self) if should_raise end
Creates a copy of this table, inheriting any column and header mappings registered with map_column! and map_headers!.
# File lib/cucumber/ast/table.rb, line 93 def dup self.class.new(raw.dup, @conversion_procs.dup, @header_mappings.dup, @header_conversion_proc) end
Converts this table into an Array of Hash where the keys of each Hash are the headers in the table. For example, a Table built from the following plain text:
| a | b | sum | | 2 | 3 | 5 | | 7 | 9 | 16 |
Gets converted into the following:
[{'a' => '2', 'b' => '3', 'sum' => '5'}, {'a' => '7', 'b' => '9', 'sum' => '16'}]
Use map_column! to specify how values in a column are converted.
# File lib/cucumber/ast/table.rb, line 126 def hashes @hashes ||= build_hashes end
Change how hashes converts column
values. The column_name
argument identifies the column and
conversion_proc
performs the conversion for each cell in that
column. If strict
is true, an error will be raised if the
column named column_name
is not found. If strict
is false, no error will be raised. Example:
Given /^an expense report for (.*) with the following posts:$/ do |table| posts_table.map_column!('amount') { |a| a.to_i } posts_table.hashes.each do |post| # post['amount'] is a Fixnum, rather than a String end end
# File lib/cucumber/ast/table.rb, line 264 def map_column!(column_name, strict=true, &conversion_proc) Kernel.warn "[warning] map_column! will be deprecated" @conversion_procs[column_name.to_s] = { :strict => strict, :proc => conversion_proc } self end
Returns a new Table where the headers are redefined. See map_headers!
# File lib/cucumber/ast/table.rb, line 248 def map_headers(mappings={}, &block) self.class.new raw.dup, @conversion_procs.dup, mappings, block end
Redefines the table headers. This makes it possible to use prettier and
more flexible header names in the features. The keys of
mappings
are Strings or regular expressions (anything that
responds to #=== will work) that may match column headings in the table.
The values of mappings
are desired names for the columns.
Example:
| Phone Number | Address | | 123456 | xyz | | 345678 | abc |
A StepDefinition receiving this table can then map the columns with both Regexp and String:
table.map_headers!(/phone( number)?/ => :phone, 'Address' => :address) table.hashes # => [{:phone => '123456', :address => 'xyz'}, {:phone => '345678', :address => 'abc'}]
You may also pass in a block if you wish to convert all of the headers:
table.map_headers! { |header| header.downcase } table.hashes.keys # => ['phone number', 'address']
When a block is passed in along with a hash then the mappings in the hash take precendence:
table.map_headers!('Address' => 'ADDRESS') { |header| header.downcase } table.hashes.keys # => ['phone number', 'ADDRESS']
# File lib/cucumber/ast/table.rb, line 240 def map_headers!(mappings={}, &block) Kernel.warn "[warning] map_headers! will be deprecated, please use map_headers instead." clear_cache! @header_mappings = mappings @header_conversion_proc = block end
Matches pattern
against the header row of the table. This is
used especially for argument transforms.
Example:
| column_1_name | column_2_name | | x | y | table.match(/table:column_1_name,column_2_name/) #=> non-nil
Note: must use ‘table:’ prefix on match
# File lib/cucumber/ast/table.rb, line 198 def match(pattern) header_to_match = "table:#{headers.join(',')}" pattern.match(header_to_match) end
Gets the raw data of this table. For example, a Table built from the following plain text:
| a | b | | c | d |
gets converted into the following:
[['a', 'b'], ['c', 'd']]
# File lib/cucumber/ast/table.rb, line 158 def raw cell_matrix.map do |row| row.map do |cell| cell.value end end end
# File lib/cucumber/ast/table.rb, line 170 def rows hashes.map do |hash| hash.values_at *headers end end
Converts this table into a Hash where the first column is used as keys and the second column is used as values
| a | 2 | | b | 3 |
Gets converted into the following:
{'a' => '2', 'b' => '3'}
The table must be exactly two columns wide
# File lib/cucumber/ast/table.rb, line 142 def rows_hash return @rows_hash if @rows_hash verify_table_width(2) @rows_hash = self.transpose.hashes[0] end
# File lib/cucumber/ast/table.rb, line 86 def to_step_definition_arg dup end
Returns a new, transposed table. Example:
| a | 7 | 4 | | b | 9 | 2 |
Gets converted into the following:
| a | b | | 7 | 9 | | 4 | 2 |
# File lib/cucumber/ast/table.rb, line 108 def transpose self.class.new(raw.transpose, @conversion_procs.dup, @header_mappings.dup, @header_conversion_proc) end
# File lib/cucumber/ast/table.rb, line 472 def build_hashes convert_headers! convert_columns! cells_rows[1..-1].map do |row| row.to_hash end end
# File lib/cucumber/ast/table.rb, line 600 def ensure_array_of_array(array) Hash === array[0] ? hashes_to_array(array) : array end


The Best Postgres Feature You're Not Using – CTEs Aka WITH Clauses
SQL by default isn’t typically friendly to dive into, and especially so if you’re reading someone else’s already created queries. For some reason most people throw out principles we follow in other languages such as commenting and composability just for SQL. I was recently reminded of a key feature in Postgres that most don’t use by @timonk highlighting it in his AWS Re:Invent Redshift talk. The simple feature actually makes SQL both readable and composable, and even for my own queries capable of coming back to them months later and understanding them, where previously they would not be.
The feature itself is known as CTEs or common table expressions, you may also here it referred to as WITH
clauses. The general idea is that it allows you to create something somewhat equivilant to a view that only exists during that transaction. You can create multiple of these which then allow for clear building blocks and make it simple to follow what you’re doing.
Lets take a look at a nice simple one:
WITH users_tasks AS (
SELECT
users.email,
array_agg(tasks.name) as task_list,
projects.title
FROM
users,
tasks,
project
WHERE
users.id = tasks.user_id
projects.title = tasks.project_id
GROUP BY
users.email,
projects.title
)
Using this I could now just append some basic other query on to the end that references this CTE users_tasks
. Something akin to:
SELECT *
FROM users_tasks;
But where it becomes more interesting is chaining these together. So while I have all tasks assigned to each user here, perhaps I want to then find which users are responsible for more than 50% of the tasks on a given project, thus being the bottleneck. To oversimplify this we could do it a couple of ways, total up the tasks for each project, and then total up the tasks for each user per project:
total_tasks_per_project AS (
SELECT
project_id,
count(*) as task_count
FROM tasks
GROUP BY project_id
),
tasks_per_project_per_user AS (
SELECT
user_id,
project_id,
count(*) as task_count
FROM tasks
GROUP BY user_id, project_id
),
Then we would want to combine and find the users that are now over that 50%:
overloaded_users AS (
SELECT tasks_per_project_per_user.user_id,
FROM tasks_per_project_per_user,
total_tasks_per_project
WHERE tasks_per_project_per_user.task_count > (total_tasks_per_project / 2)
)
Now as a final goal I’d want to get a comma separated list of tasks of the overloaded users. So we’re simply giong to join against that overloaded_users
and our initial list of users_tasks
. Putting it all together it looks somewhat long, but becomes much more readable. And as a bonus I layered in some comments.
--- Created by Craig Kerstiens 11/18/2013
--- Query highlights users that have over 50% of tasks on a given project
--- Gives comma separated list of their tasks and the project
--- Initial query to grab project title and tasks per user
WITH users_tasks AS (
SELECT
users.id as user_id,
users.email,
array_agg(tasks.name) as task_list,
projects.title
FROM
users,
tasks,
project
WHERE
users.id = tasks.user_id
projects.title = tasks.project_id
GROUP BY
users.email,
projects.title
),
--- Calculates the total tasks per each project
total_tasks_per_project AS (
SELECT
project_id,
count(*) as task_count
FROM tasks
GROUP BY project_id
),
--- Calculates the projects per each user
tasks_per_project_per_user AS (
SELECT
user_id,
project_id,
count(*) as task_count
FROM tasks
GROUP BY user_id, project_id
),
--- Gets user ids that have over 50% of tasks assigned
overloaded_users AS (
SELECT tasks_per_project_per_user.user_id,
FROM tasks_per_project_per_user,
total_tasks_per_project
WHERE tasks_per_project_per_user.task_count > (total_tasks_per_project / 2)
)
SELECT
email,
task_list,
title
FROM
users_tasks,
overloaded_users
WHERE
users_tasks.user_id = overloaded_users.user_id
CTEs won’t always be quite as performant as optimizing your SQL to be as concise as possible. In most cases I have seen performance differences smaller than a 2X difference, this tradeoff for readability is a nobrainer as far as I’m concerned. And with time the Postgres optimizer should continue to get better about such performance.
As for the verbosity, yes I could have done this query in probably 10-15 lines of very concise SQL. Yet, most may not be able to understand it quickly if at all. Readability is huge when it comes to SQL to ensure its doing the right thing. SQL will almost always tell you an answer, it just may not be to the question you think you’re asking. Ensuring your queries can be reasoned about is critical to ensuring accuracy and CTEs are one great way of accomplishing that.


Canvas is not supported by your browser
Buy more bullets for helpers
Buy more bullets for helpers
Buy more bullets for helpers
Buy more bullets for helpers
Buy more bullets for helpers


This tree uses some extra styles to provide RTL support (experimental).
jquery.fancytree.js project home Link to this page Example Browser View source code


{% extends "base.html" %} {% block body %}
Please see the following list of my latest posts, from most recent to least.


We think that potlucks should be a time to focus on togetherness, not event coordination. That's why we've created an all-in-one tool for planning, organizing, and managing your next get-together. From divvying up dishes to syncing schedules, Potluck Planner puts all of the info you need right at your fingertips.


Moderator: Karl G.
a_link_to_the_past wrote:Thanks for the offer but I finally found one... good thing those shadows blow their ventus behind them instead of infront..
a_link_to_the_past wrote:Caster classes seem to be really feniky (sp?) with killing things... I tried to start a wizard and I got irritated with the whole casting spell process...
Users browsing this forum: No registered users and 0 guests


AppPlus is a open source android application,and used to manage app,export apk,watch recent processes.
Get the last info about AppPlus by this way Weibo @大侠咕咚 Google+ @毛瑞斌 Home @GuDong


86-year-old comedy sensation Lynn Ruth Miller to go wild in Bangkok
by Coconuts BangkokWhile most people are upset by thoughts of aging and death, 86-year-old Lynn Ruth Miller has been killing audiences by laughing about it.
Possibly the oldest woman doing stand-up comedy, the octogenarian entertainer will grace a Bangkok stage next week and hand out some good ol’ fashioned LOLs.
Stagetime Comedy Club is rolling out its fourth International Showcase Special, this time featuring American-born Miller, whose style doesn’t only talk about failed marriages and getting old, but also singing and performing burlesque.
From the state of Ohio, Miller started comedy a decade ago — at 71 and performed at America’s Got Talent in 2008. In 2013, her show Granny’s Gone Wild won an award at the Edinburgh Fringe Festival.
Early-bird tickets are THB300 and can be booked online. The show will start at 7:30pm on Tuesday at The Clubhouse Sports Bar & Grill on Sukhumvit 23.
FIND IT:
Lynn Ruth Miller
7:30pm on Nov. 26
2nd floor of The Clubhouse Sports Bar & Grill, Soi Sukhumvit 23
BTS: Asoke
MRT: Sukhumvit
Related:
Quentin Unchained: Bangkok trivia night and comedy show dedicated to Tarantino-verse
Forget the brutal moments, ‘Game of Thrones’ is getting a one-night trivia


What is Automizy Email Editor?
Automizy Email Editor is an easily integrable JavaScript application which helps you to create HTML emails effortlessly.
Why is it better than the others?
Incredibly simple integration, handy usage, continuously updated documentation. All for free!
For free? Sounds suspicious!
Automizy Email Editor is published under the well-known MIT license, it isn't our main product, only a part of our marketing automation system called Automizy. Since we also use a bunch of free stuff ourselves (jQuery, TinyMCE, etc.), we decided to do something good for mankind, like giving a free product which can contribute to other's successes.
Let's talk about integration!
Like I mentioned before, it's easy as hell, you only have to load a JS and CSS file and our software does the rest.
A simple example:
A simple example:
<!DOCTYPE html> <html> <head> <link href="css/automizy-email-editor.css" /> <script src="js/automizy-email-editor.js"></script> <script> $AEE.init().open(); </script> </head> <body></body> </html>
Can I ask?
Of course! If you have any questions, please feel free to contact us at help@automizy.com.


Donny And Marie Osmond Get Emotional, Perform Final Show Of 11-Year Las Vegas Residency
by Becca LongmireDonny and Marie Osmond’s 11-year Las Vegas residency has come to an end.
The pair performed their emotional final show on Saturday at the Flamingo Las Vegas, with Donny joking he would see his sister at Christmas.
The siblings’ successful residency began as a six-week engagement but was so well received that it ended up being extended again and again.
More than 900,000 fans attended the duo’s 1,730 performances over the years.
“I don’t know how I’m going to get through this,” Donny said before they belted out “May Tomorrow Be A Perfect Day”, People reported.
 I love you.”
The siblings then hugged it out as the curtain fell for a final time.
After the performance, Donny and Marie both thanked fans for their constant support on Instagram:


I am a third year Ph.D. student in Stanford University. I think about problems in machine learning and deep learning under the supervision of Stefano Ermon. My publications cover topics such as deep generative models, Bayesian inference and (inverse) reinforcement learning and their applications.
I did my undergrad at Tsinghua University, where I was lucky enough to collaborate with Jun Zhu and Lawrence Carin on scalable Bayesian machine learning.
Contact: tsong at cs.stanford.edu
Multi-Agent Generative Adversarial Imitation Learning
Jiaming Song, Hongyu Ren, Dorsa Sadigh, Stefano Ermon
In the 31th Neural Information Processing Systems (NIPS 2018).
A Lagrangian Perspective on Latent Variable Generative Models
Shengjia Zhao,
Jiaming Song, Stefano Ermon
In the 2018 Conference on Uncertainty in Artificial Intelligence (UAI 2018 Oral).
[code]
Abridged version in
ICML 2018 Workshop on Theoretical Foundations and Applications of Deep Generative Models
Accelerating Natural Gradient with Higher-Order Invariance
Yang Song,
Jiaming Song, Stefano Ermon
To appear in the 2018 International Conference on Machine Learning (ICML 2018).
[code]
Adversarial Constraint Learning for Structured Prediction
Hongyu Ren, Russell Stweart,
Jiaming Song, Volodymyr Kuleshov, Stefano Ermon
To appear in the 2018 International Joint Conference on Artificial Intelligence (IJCAI 2018).
[code]
Abridged version in
NIPS 2017 Workshop on Learning with Limited Data
A-NICE-MC: Adversarial Training for MCMC
Jiaming Song, Shengjia Zhao, Stefano Ermon
In the 30th Neural Information Processing Systems (NIPS 2017).
[code]
[poster]
[slides]
Abridged version in
ICML 2017 Workshop on Implicit Models
[one pager]
InfoGAIL: Interpretable Imitation Learning from Visual Demonstrations
Yunzhu Li,
Jiaming Song, Stefano Ermon
In the 30th Neural Information Processing Systems conference (NIPS 2017).
[code]
Learning Hierarchical Features from Generative Models
Shengjia Zhao,
Jiaming Song, Stefano Ermon
In the 34th International Conference on Machine Learning (ICML 2017).
[code]
[blog]
Factored Sigmoid Belief Networks for Sequence Learning
Jiaming Song, Zhe Gan, Lawrence Carin
In the 33rd International Conference on Machine Learning (ICML 2016).
Organizational Churn: A Roll of the Dice?
Canyao Liu*,
Jiaming Song*, Chuan Yu*.
Undergraduate Mathematics and its Applications (UMAP), Issue 36.2.
Discriminative Nonparametric Latent Feature Relational Models with Data Augmentation
Bei Chen, Ning Chen, Jun Zhu,
Jiaming Song, Bo Zhang
In the 30th Association for the Advancement of Artificial Intelligence Conference (AAAI 2016).
InfoVAE: Information Maximizing Variational Autoencoders
Shengjia Zhao,
Jiaming Song, Stefano Ermon
In
ICML 2018 Workshop on Theoretical Foundations and Applications of Deep Generative Models
Contributed Talk.
[code]
Dual Optimization for Latent Variable Generative Models
Shengjia Zhao*,
Jiaming Song*, Stefano Ermon
In
ICML 2018 Workshop on Theoretical Foundations and Applications of Deep Generative Models
Markov Chain Monte Carlo for Learning Belief Networks
Laëtitia Shao*,
Jiaming Song*, Aditya Grover, Stefano Ermon
In
ICML 2018 Workshop on Theoretical Foundations and Applications of Deep Generative Models
Learning Controllable Fair Representations via Latent Variable Generative Models
Jiaming Song, Pratyusha Kalluri, Aditya Grover, Shengjia Zhao and Stefano Ermon
In
ICML 2018 Workshop on Theoretical Foundations and Applications of Deep Generative Models
Multi-Agent Generative Adversarial Imitation Learning
Jiaming Song, Hongyu Ren, Dorsa Sadigh, Stefano Ermon
In the 6th International Conference on Learning Representations (ICLR 2018) Workshop Track.
In
1st Workshop on Goal Specifications for Reinforcement Learning
Structured Prediction with Adversarial Constraint Learning
Hongyu Ren, Russell Stweart,
Jiaming Song, Volodymyr Kuleshov, Stefano Ermon
In NIPS 2017 Workshop on Learning with Limited Data
A Lagrangian Perspective on Latent Variable Generative Modeling
Shengjia Zhao,
Jiaming Song, Stefano Ermon
In NIPS 2017 Workshop on Bayesian Deep Learning
An Empirical Study of the Generalization Behavior of Generative Adversarial Networks
Hongyu Ren, Shengjia Zhao,
Jiaming Song, Lijie Fan, Stefano Ermon
In NIPS 2017 Workshop on Deep Learning: Bridging Theory and Practice
Generative Adversarial Learning of Markov Chains
Jiaming Song, Shengjia Zhao, Stefano Ermon
In the 5th International Conference on Learning Representations (ICLR 2017) Workshop Track.
[code]
[poster]
An Empirical Analysis of Proximal Policy Optimization with Kronecker-factored Natural Gradients
Jiaming Song, Yuhuai Wu
arXiv preprint arXiv:1801.05566.
Towards Deeper Understanding of Variational Autoencoding Models
Shengjia Zhao,
Jiaming Song, Stefano Ermon
arXiv preprint arXiv:1702.08658.
[code]
[blog]
On the Limits of Learning Representations with Label-Based Supervision
Jiaming Song, Russell Stewart, Shengjia Zhao, Stefano Ermon
arXiv preprint arXiv:1703.02156
Max-Margin Nonparametric Latent Feature Relational Models for Link Prediction
Jun Zhu,
Jiaming Song, Bei Chen
arXiv preprint arXiv:1602.07428
Under review of Artificial Intelligence Journal


Havana at 500: A city in four portraits
HAVANA, Nov 14 — Half a century since its founding by Spanish colonists, the Cuban capital Havana has become a byword for Latin American romance and revolutionary nostalgia.
As the city prepares to celebrate its 500th anniversary on November 16, AFP interviewed four Havana residents, whose lives reflect its history and its recent changes.
1959 Chevy
Yosbel Sosa, 33, drives what he calls a “time machine” — a black Chevrolet Impala with red and white seats, dating to 1959, the year of late leader Fidel Castro’s revolution.
In it, he drives tourists around the city’s historic sites: The restored dome of the Capitol, the colonial mansions, Art Deco buildings, Revolution Square and the picturesque Malecon seafront promenade.
“It helps to have an old-fashioned car,” he says. “Tourists want to visit the old part of town and learn the history of what happened 500 years ago.”
Yosbel was studying law but gave up to work in the tourism sector, where he can earn more than the usual US$50 (RM208) monthly salary of a state employee.
The island received 4.75 million tourists last year.
After a day driving the classic car around, he takes public transport to get home to his wife and two children.
“Sometimes I leave for work very early and I come home late when my children are already asleep,” he says.
“It makes me sad not to see them and play with them. But my family is happy with my job.”
Fisherman’s memories
Roberto Molina is one of the many people who sit on the Malecon with a fishing rod dangling in the Atlantic.
At 69, he has spent nearly half his life fishing like this, his face weather-beaten, walking down to the sea each day from his home a few hundred meters away.
Hundreds of fishermen of fortune like Molina catch what they can with hook and line to eat or sell to private restaurants.
“There are fish in Havana, he says. “But you have to be the first to catch them.”
In 1994 tens of thousands of people took to the sea from this bay in rafts, trying to flee the economic crisis that stemmed from the collapse of Cuba’s ally the Soviet Union.
Crowds gathered on the Malecon to protest, Molina recalls. “Then he came along,” he says, miming the shape of a beard on his chin to refer to Fidel Castro. “And everyone went home.”
When not fishing, Molina takes walks, queues to do paperwork and picks up food parcels provided by the state. All with good humour.
“Havana people are cheerful,” he says. “If you succeed today, all the better. If you don’t succeed tomorrow, too bad. One way or another you’ll succeed in the end.”
Street artist
Beatriz Estevez, 29, gave up her law studies and turned to the arts. Reforms in the years since Fidel Castro stepped aside in 2008 have made it easier for Cubans to be self-employed.
Beatriz makes handicrafts and stands dressed as a silver fairy in the busy Calle Obispo, a street of shops and restaurants, where tourists give coins to take photos with her.
“My dad yelled” when he heard of her decision, she says. “But then he said, my daughter, you are earning in a day what I make in a month. I can’t complain.”
Beatriz’s father is a naval engineer.
At the end of the day she takes a boat across the bay to her home in Regla. Her neighbourhood is like “a country village in the city”.
“People from Regla are more spiritual and relaxed,” she says. “Everyone knows one other. People sit down in the doorways of their homes.”
Longevity
Doctor Alina Gonzalez does not have a car, and recent US oil sanctions have made the public transport network even more difficult.
So the 57-year-old geriatric doctor walks the two kilometres to her job at the Centre for Longevity Studies.
“We doctors are of the people. We are ordinary Cubans and that helps our patients to relate to us,” she says.
“The problems they have are the same ones we have.”
Since 1962, a US embargo have made daily life in Cuba hard. Complications have increased in recent months after the US tightened trade restrictions further.
Alina looks after some of Cuba’s 2,000 centenarians. The island’s 11.2 million people have an average life expectancy of 79.5 years — comparable to that of the rich world.
“I like what I do a lot. I love my profession, I love my family, I love my city. I love my country,” Alina says.
“It is true that there are difficulties. Sometimes it is a challenge. I have private talks with my refrigerator. I open it and say, what am I going to cook today?”
Alina is married with a daughter. Seven years ago she was diagnosed with breast cancer. She underwent treatment and survived.
She says she has an appetite to continue enjoying Havana, “walking through its beautiful parks, along the Malecon, in all its splendor, for a long time yet.” — AFP


{% include head/css.html %} {% include head/analytics.html id='123' %} {% include head/favicons.html %}


Full Stack Web Development.
Teaching students how to design, build, and deploy beautiful,
responsive, and dynamic websites.
Create stunning websites using visual design, UI/UX, software design, html, css, and javascript.
Create functional and responsive websites with Node.js, Express.js, React.js, MongoDB, Git, GitHub.
Make the project come to life by deploying it using Heroku and AWS.
These individuals put in a lot of hard work and take a lot of time from their day to help this society grow.


Prince William reveals Kate is a huge Strictly Come Dancing fan
We'd love to see her take a spin on the dance floor!
by Nancy BrownShould BBC One dance show Strictly Come Dancing ever be looking to recruit a member of the royal family to its line-up, we have some good news.
Prince William has revealed that his wife, the Duchess of Cambridge, is a huge fan of the show and has given it her royal seal of approval.
So much so that she's made him watch it a couple of times, too!
William made the revelation to the show's Shirley Ballas and Claudia Winkleman during an engagement in London this week.
Read more: The John Lewis Christmas ad has landed – meet Excitable Edgar here
Kate's mum Carole Middleton is also a fan and, William said, he's joined them to watch it "a couple of times".
"Catherine is a huge fan and my mother-in-law loves it," he said.
He added: "I have watched the show a couple of times."
Prince William also had a question for Claudia, who hosts the show alongside Tess Daly.
"Why does Claudia never dance?!" he wondered.
Read more: The Queen's former press secretary slams The Crown for "suggesting the Queen had an affair"
Laughing, she revealed: "I'm too creaky!"
As avid fans of both Strictly and Kate, we would love to see her take to the Strictly ballroom.
After all, we already know from her recent tour of Pakistan that she looks good in sequins!
We expect the duchess will be tuning into the show this week as the contestants head to Blackpool, the home of ballroom dancing.
Sadly BBC Breakfast's Mike Bushell won't be travelling with them, having been eliminated last Sunday night.
Would you like to see Kate on the Strictly dance floor? Tell us on our Facebook page @EntertainmentDailyFix.


Indian tennis: Manas Dhamne wins Eddie Herr international Under-12 title
by Scroll StaffIndia’s Manas Dhamne won the Under-12 boys title at the Eddie Herr junior tennis tournament on Sunday. The 11-year-old beat third seed Maxwell Exsted 3-6, 6-0, 10-6 in the singles final to become the first Indian player to win this title in boys U-12 category.
He was also the runner-up in doubles event partnering Aarav Samrat Hada of Nepal. The pair went down 7-6(5), 6-2 against Se Hyuk Cho and Minseok Maeng.
In the singles’s semi-final, fourth seeded Dhame had scored a 6-1, 6-1 win over second seed Changmin Ryu.
The tournament, organised by the IMG Academy in Bradenton, Florida, is said to be the biggest junior tennis tournament in the world with over 2,000 participants from 90 countries participating.
Other prominent players who have won the Eddie Herr tournament include Maria Sharapova, Jelena Jankovic, Whitney Osuigwe, Miomir Kecmanovic, Michael Mmoh, Andy Roddick, according to the official website.
Dhamne, from Maharashtra, trains at the Adhar Poonawala Academy in Pune with coached Aditya Madkekar and Kaifi Afzal. He had won the Les Petits As – Asia Playoffs last month as well, which is considered the World Championships of tennis at the junior level.
Read Comments


Kunal Mahajan: Dev BootCamp
"The tale of my journey on becoming a Junior Web Developer..."
Home
About Me:
Project(s):
Blog(s): ▾
DBC: Technical Blog(s):
DBC: Cultural Blog(s):
DBC: Personal Blog(s):
Contact:
Feel free to contact me:
...or reach me directly via:
-Kunal P. Mahajan


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/constructivising.20using.20.60trunc.20(subtype.20(is_well_order.20_)).60.html ---
How many things can we constructivise with a trunc (subtype (is_well_order _))
hypothesis? I'm sure we can make a truncated basis this way... Maybe if it can constructivise a lot of stuff, I would imagine making it as wide-used as decidable_eq
well this surely implies decidable_eq
to start with
(on second thought maybe we need a decidable prop to do so, but we can fix this by requiring our function to have codomain bool
instead?)
and how about making trunc (equiv _ _)
an instance
congratulations then, you got yourself into an instance loop with a fintype having decidable equality
I think is_well_order
is not as useful constructively as it is in classical maths
in particular is_well_order.min
is not constructive
Last updated: Apr 24 2020 at 19:02 UTC


TBT: Remembering Mourinho's 'Respect' Meltdown Against Spurs
by SL SocialJose Mourinho's name is on every football fan's lips at the moment, with one of his most famous press conference rants becoming a topic on social media as well. Check it out!
The "Special One", as he is fondly known in the football world, will be back on the touchlines after putting pen to paper on a deal that will see him manage Tottenham Hotspur for the next three and a half years.
Download The Soccer Laduma Social Media App & Earn Airtime for Selfies!
Known for speaking his mind, Mourinho's charisma got the better of him during a post-match press conference against his current employers while he was still in charge of Manchester United.
Speaking to the media after a 3-0 home defeat at the hands of the London club in August last year, the former Real Madrid manager demanded the respect of the journalists in attendance after they questioned his side's performance on the night.
Remembering Jose's "Respect" rant:
Is Mourinho the spark needed at Spurs?


All Employee
Fetching employee
Something went wrong!
Looks like something went wrong in between. Try to refresh the page or try loading after sometime!
No Employee Found!
Looks like your company doesn't have any employee yet.
Name
Mobile
Email
Locality
Employee Id
Send SMS to Employees!
You are sending SMS to the following Employee:
SMS Message
Send SMS
SMS Sent!


--- layout: default permalink: /beta/thanks/ ---
Get Ready for amazing newly-released films. We will send you more info as the beta arrives
- RedBand Team


Two US troops killed in helicopter crash in Afghanistan
by AFPKABUL: Two American service members have been killed in a helicopter crash in Afghanistan, US forces there said Wednesday, adding that the crash appeared to be an accident, though the Taliban claimed they had shot it down.
A statement from US Forces Afghanistan said the crash on Wednesday was being investigated, “however preliminary reports do not indicate it was caused by enemy fire”.
It did not reveal the crash location and said it was withholding the names of those killed until next of kin could be told.
The Taliban claimed they had shot the helicopter down in Charkh district of Logar province at 1 am.
“The Americans wanted to raid a mujahideen base, but their helicopter was shot down and caught fire. All on board were killed,” their main spokesperson, Zabihullah Mujahid, said.
Roughly 13,000 US troops remain in Afghanistan, 18 years after Washington invaded in the wake of the September 11, 2001 attacks.
US President Donald Trump has been eager to withdraw, but General Mark Milley, chairman of the Joint Chiefs of Staff, told US media this month that American forces are likely to remain “for several more years”.
More than 2,500 Afghan civilians have been killed in the fighting so far this year, the United Nations says.


Basic Animations
I am some content
I am some content
I am some content
I am some content
show fast
hide 2000ms
show slow
slide up


Growing Lives
The following is data from The World Bank to look at life expectancy over time and by country. The data goes back to 1960 and up to the most current estimates for 2009.
There are some major dips for some of the countries which are very evident. A few quick searches suggest that they coincide with war, such as the Bangladesh Liberation War in the 1970s, the Iran-Iraq War in the 1980s, and the Rwanda Civil War in the 1990s. There’s also a smaller dip for Iraq starting in early 2000.
Some countries, such as Seychelles, didn’t have data that went back to 1960. In this case, the line starts where annual data became available.
## Life Expectancy by Region
```vis
width: 1000
height: 500
data:
url: data/LifeExpectancyNoNill.csv
selection:
mouHov:
type: single
'on': mouseover
Select:
type: single
fields:
- Region
bind:
input: select
options:
- East Asia and Pacific
- Europe and Central Asia
- Latin America and Caribbean
- Middle East and North Africa
- South Asia
- Sub-Saharan Africa
'on': click
resolve: global
mark:
type: line
opacity: 0.5
interpolate: basis
encoding:
x:
type: ordinal
field: Year
axis:
title: "Timeline"
offset: 5
ticks: false
domain: false
y:
type: quantitative
field: Expectancy
axis:
title: "Life Expectancy (years)"
offset: 5
ticks: false
domain: false
grid: false
tooltip:
field: Country
type: nominal
detail:
field: Country
type: nominal
color:
value: 'rgba(35, 146, 155, 0.1)'
condition:
selection: Select
field: Region
type: nominal
scale:
range:
- dodgerblue
- lightseagreen
- violet
- grey
- purple
- indigo
legend:
orient: "bottom-right"
titlePadding: 10
size:
value: 1
condition:
selection: mouHov
value: 2
legend: null
```
## Life expectancy By Income
```vis
width: 1000
height: 500
data:
url: data/LifeExpectancyNoNill.csv
selection:
mouHov:
type: single
'on': mouseover
Select:
type: single
fields:
- Income
bind:
input: select
options:
- High income
- Upper middle income
- Lower middle income
- Low income
'on': click
resolve: global
mark:
type: line
opacity: 0.5
interpolate: basis
encoding:
x:
type: ordinal
field: Year
axis:
title: "Timeline"
offset: 5
ticks: false
domain: false
y:
type: quantitative
field: Expectancy
axis:
title: "Life Expectancy (years)"
offset: 5
ticks: false
domain: false
tooltip:
field: Country
type: nominal
detail:
field: Country
type: nominal
color:
value: 'rgba(35, 146, 155, 0.1)'
condition:
selection: Select
field: Income
type: nominal
scale:
range:
- coral
- dodgerblue
- lightseagreen
- violet
legend:
orient: "bottom-right"
titlePadding: 10
size:
value: 1
condition:
selection: mouHov
value: 4
legend: null
```
## Expectancy by Region and Income
```vis
width: 1000
height: 500
data:
url: data/LifeExpectancyNoNill.csv
selection:
Select1:
type: single
fields:
- Income
bind:
input: select
options:
- High income
- Upper middle income
- Lower middle income
- Low income
'on': click
resolve: global
Select:
type: single
fields:
- Year
bind:
input: range
min: 1960
max: 2015
step: 1
mark:
type: tick
opacity: 0.1
thickness: 2
bandSize: 10
transform:
- filter: datum.Year == Select_Year
encoding:
x:
type: nominal
field: Region
axis:
labelAngle: 0
axis:
title: "Regions"
offset: 5
ticks: false
domain: false
y:
type: quantitative
field: Expectancy
axis:
title: "Life Expectancy (years)"
offset: 5
ticks: false
domain: false
tooltip:
field: Country
type: nominal
detail:
field: Country
type: nominal
color:
field: Income
type: nominal
scale:
range:
- coral
- dodgerblue
- lightseagreen
- violet
legend:
orient: "bottom-right"
titlePadding: 10
size:
value: 200
```


Hobbies
things I do.
Some of my hobbies.
- Chess
As you may well know, I'm a huge fan of chess and I love finding skilled opponents.
- Dark Souls
My favorite video game. I'm working on beating it without leveling up my character!
 Seriously.
- Boffer sports
I fight with foam sticks, and I like to think I'm pretty good at it.


I am a sophomore at the University of Notre Dame studying Computer Science with a passion for Computer and Network Security as well as Human-Computer Interactions.
Held office hours to aid students better understand physics concepts as well as lab procedures and experiments. This often involved helping the students familiarize themselves with physical laws and their implementation. Attended lab sessions in order to guide students through completing their experiments and presenting their findings. Repaired equipment as well as general lab maintenance involving soldering, 3D printing, among others.
Aided the company in the process of upgrading the company's internal systems which required the installation of a VPN server locally. Allowing for client-to-site connections in order to allow remote employees access. Built a new and optimized website for the company. This included programming in PHP to manage mail requests made directly from the website. Photographing the company and its production line as well as editing these photos and converting them to optimal resolutions for the website. Alongside the owner of the company designed the overview of how the final website should look. I was also tasked with composing part of the website’s descriptions. Finally, I used Google’s page insights in order to optimize the websites load time, with a final score of 94.
Link to new website: EMPLASA
Assist my fellow Notre Dame classmates, faculty and staff with computing and technology problems or questions. By diagnosing and resolving problems that individuals may have with network connectivity, Windows and Macintosh Operating systems, as well as a variety of applications including (but not limited to) MS Office Suite, Google Apps, Adobe Creative Cloud Suite, web browsers and antivirus software. In addition, I work with the customers personal wireless device for troubleshooting email, calendar as well as issues with Okta 2FA. At the same time perform monetary transactions for the purchases of print quota as well as SD cards for the audio/visual equipment and storage devices.
Assessed the current political, economic, and security factors of the Central American region, with a focus on El Salvador and Honduras. Researched into their current political situation, freedom index, economic prosperity, security concerns, among others. Presenting my findings in an extensive report into the region and presented it directly to senior management. In order to assess the viability of the firm getting involved in the region.
Worked directly at a branch, where I was tasked with inventory control. I was directly in charge of the organization and placement of incoming merchandise. Ensuring efficient storage for an easy and fast retrieval when required by the branch. Supervised the branch’s customer satisfaction rate during their interactions with the salespersons. Reported directly to the regional manager.
Assisted as an advisor to the plant manager, supervising that the orders were being filled promptly and in a timely manner to the distribution network. Assembled bundles of the materials and prepared them for shipment.
Partnered with the University of Illinois at Urbana-Champaign our research aimed to improve an already built medical application which served to aid doctors when dealing with emergency situations. The applications receive user inputs in a tablet by a medical staff member relating to the condition and actions that have been taken on a patient in critical condition. The application then recommends the medical team for further steps. My work consited of training an acoustic model to recognize speech input by the medical team to be used as an interface. The model was trained using the open source software Kaldi and trained with over 25 speakers and multiple medical terms. Once the model was trained, I set up the server machine to listen for http requests. Once a request with a .wav file was received the server would call on a python script to decode the .wav file using the acoustic model and then return the result to the client. From the client-side using the open-source project Porcupine, I programmed a python script that recognizes a wake word then records the .wav file to then be sent to the server to be decoded, allowing for a practical implementation of the project.
Developed an application to aid the Illinois DMV improve the efficiency of their in-person customer interactions. By helping customers schedule in advance their visits to the DMV, as well as suggesting possibly less congested times to go. It would also help the customer ensure they have all the required documents to complete their transaction, when available helping them autofill their information into the required forms. While also incorporating the risks of new technologies from cyber-attacks and ways to mitigate possible liabilities.
Collaborated on the design, building and implementation of the Air Breaking System. Our task was to ensure that as our rocket was overshot the target apogee the air braking system would deploy accordingly to slow the rocket down in order not to go over. I was specifically involved in the testing and implementation of the sensors to be used. This included measuring acceleration, angular velocity, pressure – altimeter through multiple sensors connected to an Arduino one board. Aided one of our senior members incorporated the use of a Kalman filter on the data received by the sensors, providing more accurate data. This was an essential addition as we were getting inconsistent data readings on some of the sensors which was drastically affecting efficiency.
Established a club aimed to motivating high school students into engineering. The club came from an existing summer program at the university which serves as an introduction in the various fields of engineering. Fostering existing relationships between alumni of the program at Notre Dame.
Composed for my senior thesis project a detailed report with suggestions on how to improve our schools network security. The report included suggestions involving unsecure login cookies, unencrypted school network as well as social engineering recommendations for school administration.
Major GPA: 3.5
GPA: 4.0
Apart from programming, I enjoy spending time outdoors. One of my favorite pastime is playing tennis and have practiced it for many years now.
When forced indoors, I follow like to watch some sci-fi series along the lines of Doctor Who and Sherlock.
Click here to see a random quote from my favorite TV shows:


Receive referrals direct to your diary
Receive bookings 24/7, eliminating tedious administration
24/7 reception service to handle all your bookings
Send texts to inform patients of available appointments
Create a new patient, whilst creating their booking
Manage all your new appointments on TM3's beautiful diary
Stay on top of your business with TM3 reporting
TM3's diary is perfect for organising your appointments and events
Whether it’s an existing patient or a new one TM3 makes creating appointments effortless
It's easy to toggle between appointments and report on your finances separately for each location
Patient records are easily accessed and stored securely with TM3
Quick Pay makes receiving payments quick and easy
At a quick glance your receptionist can see a complete administrational overview
If you’ve not got a receptionist, you can take advantage of TM3’s 24/7 reception services
Organise and manage your classes quickly and easily
Notify groups of appointment updates
View multiple practitioner diaries on the one screen
Select background/appointment colours
Gain an overview of individual months
Adjust appointment times using drag/drop
Store contact information for suppliers for easy access
Easily add patient address to record
Link multiple authorisation codes to a patient
Record why a refund is made
Clinical notes are the backbone of TM3 and will become the heart of your clinic.
Explore your creative side with live imaging and freehand drawing.
Simply set an end goal, and score your patient’s progress as treatment develops.
This follows a patient for all cases during their time in your clinic.
Using TM3 web you can take advantage of your browser's spell check.
Commonly prescribed medications and vaccinations are listed for you and can be easily customised to suit the way you practice.
Keep track of important patient alerts and flag patient records to alert clinic staff of patient specific issues.
Capture and upload images of your patients progress
Add notes directly onto a body chart or live image
Personalise your clinical notes
Notes are standardised across all platforms
All consultations are date and time stamped, ensuring auditing is not an issue
Update your notes using a keyboard or on a touch screen, the option is yours
TM3 integrates with different exercise prescription software
Dictate what information you record
From electronic invoicing {{ if eq .Site.LanguageCode "en-GB" }} via Healthcode {{ else }} {{ end }} to the most basic transaction, TM3 has it covered
Built in business reports help you allocate your resources, budget, and measure success
TM3 stores all of your practitioner details securely in one place
Easily capture comprehensive patient admission data
All your analytics can be presented on beautiful graphs
TM3’s invoice wizard can automatically generate batch invoices
Gain an overview of your business with just a single glance
Quickly calculate payments received over a time period
Organise and manage your classes quickly and easily
Print multiple invoices at the click of a button
Electronically invoice via Healthcode direct from TM3
Choose to hide practitioners who are not at work
Set practitioners to have specialities
Record why a refund is made
Capture the information you need with custom required fields
Link multiple authorisation codes to a patient
Create custom invoices for different groups
Select which stock is available at each location
Dictate what information you record
Create custom access notes for your staff
Customise your diary view, change intervals etc
Select background/appointment colours
Manage the diary by rooms (specialist equipment in certain rooms)
Limit how many appointments can be booked in one time slot
Gain an overview of individual months
Adjust appointment times using drag/ drop
Store contact information for suppliers for easy access
Automatically send patient SMS reminders to reduce DNAs
TM3 comes with an array of customised templates, including patient updates and referral letters
Use templates and placeholders to automate emails
Quickly create and assign tasks and reminders to colleagues
Connect with TM3’s support team with just one click
Free webinars and an extensive knowledge base, you'll be an expert in no time
UK support team with a 98% satisfaction rating
{{ else }}Dedicated Australian support team committed to exceptional customer service
{{ end }}