Transformer¶
Transformer¶
- Author:
- Soohwan Kim @sooftware
- Email<EMAIL_ADDRESS>- Reference :
- https://github.com/graykode/nlp-tutorial
- https://github.com/dreamgonfly/transformer-pytorch
- https://github.com/jadore801120/attention-is-all-you-need-pytorch
- https://github.com/JayParks/transformer
-
class
kospeech.models.transformer.transformer.
Transformer
(num_classes: int, pad_id: int, d_model: int = 512, d_ff: int = 2048, num_heads: int = 8, num_encoder_layers: int = 6, num_decoder_layers: int = 6, dropout_p: float = 0.3, ffnet_style: str = 'ff')[source]¶ A Transformer model. User is able to modify the attributes as needed. The architecture is based on the paper “Attention Is All You Need”.
Parameters: - num_classes (int) – the number of classfication
- pad_id (int) – identification of <PAD_token>
- d_model (int) – dimension of model (default: 512)
- d_ff (int) – dimension of feed forward network (default: 2048)
- num_encoder_layers (int) – number of encoder layers (default: 6)
- num_decoder_layers (int) – number of decoder layers (default: 6)
- num_heads (int) – number of attention heads (default: 8)
- dropout_p (float) – dropout probability (default: 0.3)
- ffnet_style (str) – if poswise_ffnet is ‘ff’, position-wise feed forware network to be a feed forward, otherwise, position-wise feed forward network to be a convolution layer. (default: ff)
- Inputs: inputs, targets
- inputs (batch, input_length): tensor containing input sequences
- targets (batch, target_length): tensor contatining target sequences
- Returns: output
- output: tensor containing the outputs
-
forward
(inputs: torch.Tensor, targets: Optional[torch.Tensor]) → Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor][source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
class
kospeech.models.transformer.transformer.
TransformerDecoder
(num_embeddings: int, d_model: int = 512, d_ff: int = 512, num_layers: int = 6, num_heads: int = 8, ffnet_style: str = 'ff', dropout_p: float = 0.3, pad_id: int = 0)[source]¶ The TransformerDecoder is composed of a stack of N identical layers. Each layer has three sub-layers. The first is a multi-head self-attention mechanism, and the second is a multi-head attention mechanism, third is a feed-forward network.
-
forward
(inputs: torch.Tensor, memory: torch.Tensor, inputs_mask: Optional[torch.Tensor] = None, memory_mask: Optional[torch.Tensor] = None) → Tuple[torch.Tensor, torch.Tensor, torch.Tensor][source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
-
class
kospeech.models.transformer.transformer.
TransformerEncoder
(d_model: int = 512, d_ff: int = 2048, num_layers: int = 6, num_heads: int = 8, ffnet_style: str = 'ff', dropout_p: float = 0.3, pad_id: int = 0)[source]¶ The TransformerEncoder is composed of a stack of N identical layers. Each layer has two sub-layers. The first is a multi-head self-attention mechanism, and the second is a simple, position-wise fully connected feed-forward network.
-
forward
(inputs: torch.Tensor, inputs_mask: Optional[torch.Tensor] = None) → Tuple[torch.Tensor, torch.Tensor][source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
Layers¶
-
class
kospeech.models.transformer.layers.
TransformerDecoderLayer
(d_model: int = 512, num_heads: int = 8, d_ff: int = 2048, dropout_p: float = 0.3, ffnet_style: str = 'ff')[source]¶ DecoderLayer is made up of self-attention, multi-head attention and feedforward network. This standard decoder layer is based on the paper “Attention Is All You Need”.
-
forward
(inputs: torch.Tensor, memory: torch.Tensor, inputs_mask: torch.Tensor, memory_mask: torch.Tensor) → Tuple[torch.Tensor, torch.Tensor, torch.Tensor][source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
-
class
kospeech.models.transformer.layers.
TransformerEncoderLayer
(d_model: int = 512, num_heads: int = 8, d_ff: int = 2048, dropout_p: float = 0.3, ffnet_style: str = 'ff')[source]¶ EncoderLayer is made up of self-attention and feedforward network. This standard encoder layer is based on the paper “Attention Is All You Need”.
-
forward
(inputs: torch.Tensor, inputs_mask: torch.Tensor) → Tuple[torch.Tensor, torch.Tensor][source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
Sublayers¶
-
class
kospeech.models.transformer.sublayers.
AddNorm
(sublayer: torch.nn.modules.module.Module, d_model: int = 512)[source]¶ Add & Normalization layer proposed in “Attention Is All You Need”. Transformer employ a residual connection around each of the two sub-layers, (Multi-Head Attention & Feed-Forward) followed by layer normalization.
-
forward
(*args)[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
-
class
kospeech.models.transformer.sublayers.
MultiHeadAttention
(d_model: int = 512, num_heads: int = 8)[source]¶ Multi-Head Attention proposed in “Attention Is All You Need” Instead of performing a single attention function with d_model-dimensional keys, values, and queries, project the queries, keys and values h times with different, learned linear projections to d_head dimensions. These are concatenated and once again projected, resulting in the final values. Multi-head attention allows the model to jointly attend to information from different representation subspaces at different positions.
- MultiHead(Q, K, V) = Concat(head_1, …, head_h) · W_o
- where head_i = Attention(Q · W_q, K · W_k, V · W_v)
Parameters: - Inputs: query, key, value, mask
- query (batch, q_len, d_model): In transformer, three different ways:
- Case 1: come from previoys decoder layer Case 2: come from the input embedding Case 3: come from the output embedding (masked)
- key (batch, k_len, d_model): In transformer, three different ways:
- Case 1: come from the output of the encoder Case 2: come from the input embeddings Case 3: come from the output embedding (masked)
- value (batch, v_len, d_model): In transformer, three different ways:
- Case 1: come from the output of the encoder Case 2: come from the input embeddings Case 3: come from the output embedding (masked)
- mask (-): tensor containing indices to be masked
- Returns: output, attn
- output (batch, output_len, dimensions): tensor containing the attended output features.
- attn (batch * num_heads, v_len): tensor containing the attention (alignment) from the encoder outputs.
-
forward
(query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, mask: Optional[torch.Tensor] = None) → Tuple[torch.Tensor, torch.Tensor][source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
class
kospeech.models.transformer.sublayers.
PoswiseFeedForwardNet
(d_model: int = 512, d_ff: int = 2048, dropout_p: float = 0.3, ffnet_style: str = 'feed_forward')[source]¶ Position-wise Feedforward Networks proposed in “Attention Is All You Need”. Fully connected feed-forward network, which is applied to each position separately and identically. This consists of two linear transformations with a ReLU activation in between. Another way of describing this is as two convolutions with kernel size 1.
-
forward
(inputs: torch.Tensor) → torch.Tensor[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
-
class
kospeech.models.transformer.sublayers.
ScaledDotProductAttention
(dim: int)[source]¶ Scaled Dot-Product Attention proposed in “Attention Is All You Need” Compute the dot products of the query with all keys, divide each by sqrt(dim), and apply a softmax function to obtain the weights on the values
- Args: dim, mask
- dim (int): dimention of attention mask (torch.Tensor): tensor containing indices to be masked
- Inputs: query, key, value, mask
- query (batch, q_len, d_model): tensor containing projection vector for decoder.
- key (batch, k_len, d_model): tensor containing projection vector for encoder.
- value (batch, v_len, d_model): tensor containing features of the encoded input sequence.
- mask (-): tensor containing indices to be masked
- Returns: context, attn
- context: tensor containing the context vector from attention mechanism.
- attn: tensor containing the attention (alignment) from the encoder outputs.
-
forward
(query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, mask: Optional[torch.Tensor] = None) → Tuple[torch.Tensor, torch.Tensor][source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
Embeddings¶
-
class
kospeech.models.transformer.embeddings.
Embedding
(num_embeddings: int, pad_id: int, d_model: int = 512)[source]¶ Embedding layer. Similarly to other sequence transduction models, transformer use learned embeddings to convert the input tokens and output tokens to vectors of dimension d_model. In the embedding layers, transformer multiply those weights by sqrt(d_model)
-
forward
(inputs: torch.Tensor) → torch.Tensor[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
-
-
class
kospeech.models.transformer.embeddings.
PositionalEncoding
(d_model: int = 512, dropout_p: float = 0.1, max_len: int = 5000)[source]¶ Positional Encoding proposed in “Attention Is All You Need”. Since transformer contains no recurrence and no convolution, in order for the model to make use of the order of the sequence, we must add some positional information.
- “Attention Is All You Need” use sine and cosine functions of different frequencies:
- PE_(pos, 2i) = sin(pos / power(10000, 2i / d_model)) PE_(pos, 2i+1) = cos(pos / power(10000, 2i / d_model))
-
forward
(embedded: torch.Tensor) → torch.Tensor[source]¶ Defines the computation performed at every call.
Should be overridden by all subclasses.
Note
Although the recipe for forward pass needs to be defined within this function, one should call the
Module
instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
Mask¶
-
kospeech.models.transformer.mask.
subsequent_masking
(x: torch.Tensor) → torch.Tensor[source]¶ Makes subsequent masking like following:
- Examples::
>>> subsequent_mask(x) [[0, 1, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 1, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 1, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 1, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]] x batch_size


Thank you for attending
Code Connect 2021
Sessions will be available on the
{code} community YouTube soon!
VIEW SESSIONS
Sessions will be available on the
{code} community YouTube soon!
With the rise of virtualized networks and cloud services, automation helps IT teams deliver services with improved speed, consistency, and security.
SEE SESSIONSLearn more about K8s! An open-source container orchestration platform that enables the operation of an elastic web server framework for cloud applications.
SEE SESSIONSTwo tracks, two days, dozens of live sessions from
subject matter experts in their fields
Choose sessions in two live tracks and
customize your learning.
Networking and learning opportunities, get to know
the VMware{code} community
Coding is meant to be fun! Don't take yourself too seriously,
grab a beer, and come ready to learn
Join VMware {code} for updates to stay in the loop with our code community.


Customer Problem
According to CNN Money: "Wall Street welcomed millennials to the world of investing by showing them the scariest financial crisis
since the Great Depression" (Egan, 2015).
Millennials, according to a
Bankrate.com survey (Tuchman, 2015):
- Roughly 1 in 4 (26%) own stocks
- Of those that don’t invest, the reasons are both compelling and frustrating.
- More than half (53%) said they don’t have the money to invest.
- One in five (21%) said they don’t know enough about stocks to invest.
According to a
Capital One ShareBuilder survey:
"
93% of millennials say that both distrust of markets and lack of
investing knowledge make them less confident about investing," (Palmer, 2014) which represents a large potential consumer market for
investment products that allow them to experiment with the market without risking their capital (Sources:
1,
2,
3).
Our Solution
Provides a solution to address Millenials greatest concerns:
- Not knowing how to invest
- Fear of losing money while learning
- Distrust of the markets
Combines the two activities they engage in most:
- Social Media
- Video Gaming
ShockTrade combines a trading simulation with social media (Facebook) and video-gaming
features, and fosters an environment where valuable investment skills are learned by encouraging light-hearted
competition between friends, while eliminating any fear of risking real capital.
Target Market
- Our target market are consumers between the ages of 18 and 49, which represents 42.8% of the U.S. population
(136.4 million consumers)
- Initially we plan to target Millennials (83.1 million consumers) and
Generation Xers
- These groups are heavy consumers of social media and are much more likely to experiment with learning
how to invest (Sources:
1,
2,
3,
4).
Business Model
-
ShockTrade uses a free-to-play model with micro-transactions.
- Users are able to join and play for free
- Perks, features that offer players a competitive advantage, are offered
for a nominal fee (10 Perks = 1 USD)
- Purchasing additional units of Shock-coin, the in-game currency, is offered
for a nominal fee (50,000 = 1 USD)
- Auction-based in-game advertisements
- Animated advertisements
- Click-based advertisements
- Subscription-based model for quotes
- End-of-day quotes
- Intra-day quotes
Competitive Advantage
ShockTrade is different from most other offerings because it combines elements of
Console-gaming and
Social Networking with an ease-to-use trading simulation to support beginnings to experts.
The applications trading features includes:
- Buying and Selling all stocks from AMEX, NASDAQ, NYSE
and OTC exchanges
- Margin Accounts
- Stock Options
Facebook usage by age group:
- Millennials — 88%
- Generatio Xers — 81%
- Baby Boomers — 70%
Management Team
TBA
Financial Summary
TBA
Funding Required
TBA


Dem Smart falls under the Smart Home track outlined by Boston Hacks. It is specifically designed for use with people suffering from dementia.
Reminders can be automated for specific times using the Bose SoundTouch 10, all depending on the various needs of our user.
Learning how to utilize IoT devices to realize the dream of the smart home:
-IoT Device in Question: Bose SoundTouch 10
-Device automatically notifies the user of pre-determined tasks
Studying the intimate interaction of dementia patients and technology:
-Determine how technology can better their lives
-Review what technology currently exists in the market
$341,840 is the estimated lifetime cost of care for an individual living with dementia
-An overwhelming cost for many families/patients affected by dementia
-Our product help minimize this cost
-IoT component used to notify the user -Integrated into a home easily
-Audio Notification API allows for the notifications to be sent to the user
-Sets the specific events for the user and allows for easy modifications


|
Love writing, photography, graphic design or web development? The Badger Herald is hiring for the spring 2015 semester. There are job openings in both Editorial and Advertising. Learn more on how to get involved at one of The Badger Herald’s three open houses on Dec. 9, 10 and 11 at 7 p.m. at 152 W Johnson St. Suite 201. Have questions? Email<EMAIL_ADDRESS>STAY CONNECTEDFollow us on Facebook and Twitter to keep up to date on campus news, updates and special events. FIND US ON CAMPUSPick up our print edition on campus every Monday and Thursday. Read your news online? Follow our coverage at badgerherald.com |


Sign In
User Name:
Password:
Sign Up
Sign In as Anonymous
Sign Up
User Name:
Email:
Password:
Confirm Password:
Sign In
High Scores


iron-flex-layout
Horizontal and vertical layout
one
two
three
Flexible children
one
two (flex)
three
Flexible children in vertical layouts
one
two (flex)
three
Flex ratios
one
two
three
Cross-axis stretch alignment (default)
stretch
Cross-axis center alignment
center
Cross-axis start alignment
start
Cross-axis end alignment
end
Justification, start justified
start-justified
Justification, center justified
center-justified
Justification, end justified
end-justified
Justification, equal space between elements
justified
justified
justified
Justification, equal space around each element
around-justified
around-justified
Self alignment
one
two
three
four
Wrapping
one
two
three
four
Reversed layouts
one
two
three
four
General purpose rules
Before
[A Span]
After
Before
[A Block Span]
After
Before invisible span
Not displayed
After invisible span
Fit


Orgize wasm demo
GitHub
NPM
crates.io
Input:
Type:
JSON
HTML
HTML (Rendered)
Output:
JavaScript is required.


{% extends "base-site.html" %} {% block title %} Dashboard {% endblock %} {% block content %}
Online Signups
New Visitors Today
Monthly Total Order
Total Revenue This Year
| Backpack | 9 | 33% |
| T-Shirt | 6 | 150% |
| Coat | 3 | 50% |
| Necklace | 7 | 150% |
| Jeans Pant | 10 | 300% |
| Shoes | 5 | 100% |
| T-Shirt | 6 | 150% |
Selena has placed an new order
Phileine has placed an new order
Emma has placed an new order
Ryan has placed an new order
Phileine has placed an new order
Emma has placed an new order
Phileine has placed an new order
| Order ID | Product Name | Units | Order Date | Order Cost | Status | |
|---|---|---|---|---|---|---|
| 24541 | Coach Swagger | 1 Unit | Oct 20, 2018 | $230 | Completed | |
| 24541 | Toddler Shoes, Gucci Watch | 2 Units | Nov 15, 2018 | $550 | Delayed | |
| 24541 | Hat Black Suits | 1 Unit | Nov 18, 2018 | $325 | On Hold | |
| 24541 | Backpack Gents, Swimming Cap Slin | 5 Units | Dec 13, 2018 | $200 | Completed | |
| 24541 | Speed 500 Ignite | 1 Unit | Dec 23, 2018 | $150 | Cancelled |
Selena<EMAIL_ADDRESS>|
2 Orders | $150 |
Walter<EMAIL_ADDRESS>|
5 Orders | $200 |
Larissa<EMAIL_ADDRESS>|
1 Order | $50 |
Albrecht<EMAIL_ADDRESS>|
2 Orders | $100 |
Leopold<EMAIL_ADDRESS>|
1 Order | $60 |
20Sales
Statement belting with double-turnlock hardware adds “swagger” to a simple.
$300
$250
20Sales
Statement belting with double-turnlock hardware adds “swagger” to a simple.
$300
$250
10Sales
Statement belting with double-turnlock hardware adds “swagger” to a simple.
$300
$50


| | |
- __builtin__.object
-
- Timer
class Timer(__builtin__.object) |
| |
Class for profiling computation time.
Example usage, using prospective splits (default):
# Build a timer object to profile three tasks.
t = Timer(3, do_retrospective=False)
t.start() # Start the timer (optional).
t.split('Task 1') # Measure time taken for task 1.
run_task_1() # Run task 1 of 3.
t.split('Task 2') # Measure time taken for task 2.
run_task_2() # Run task 2 of 3.
t.split('Task 3') # Measure time taken for task 3.
run_task_3() # Run task 3 of 3.
t.stop() # Stop the timer
# (required to see split 3 time)
t.print() # Print profile of timing.
--> Total time: 16.00s
--> Task 1: 2.00s (12.5%)
--> Task 2: 8.00s (50.0%)
--> Task 3: 6.00s (37.5%)
# Note that split() returns None with prospective splits, as it
# cannot yet know the timing of the upcoming task.
Example usage, using retrospective splits:
# Build a timer object to profile three tasks.
t = Timer(3, do_retrospective=True)
t.start() # Start the timer (required).
run_task_1() # Run task 1 of 3.
t1 = t.split('Task 1') # Measure time taken for task 1.
run_task_2() # Run task 2 of 3.
t2 = t.split('Task 2') # Measure time taken for task 2.
run_task_3() # Run task 3 of 3.
t3 = t.split('Task 3') # Measure time taken for task 3.
t.print() # Print profile of timing.
--> Total time: 16.00s
--> Task 1: 2.00s (12.5%)
--> Task 2: 8.00s (50.0%)
--> Task 3: 6.00s (37.5%)
Outward facing usage is identical when the number of tasks to be timed is
not specified from the outset. However, this prevents Timer from
preallocating all required memory ahead of start(). Thus, Timer needs to
allocate (very small) amounts of memory during timing, which may bias total
time in unpredictable ways when total time is fast relative to memory
allocations. |
| |
Methods defined here:
- __call__(self)
- Returns the time elapsed since the timer was started.
If start() has not yet been called, returns 0.
- __init__(self, n_splits=10, do_retrospective=False, do_print_single_line=False, n_indent=0, name='Total', verbose=False)
- Builds a timer object.
Args:
n_splits (optional): int specifying the total number of splits to
be timed. If provided, memory can be preallocated, which may
prevent unpredictable allocation artifacts during profiling.
Over-allocating (i.e., requesting more splits than ultimately are
invoked) will not impact profiling (though may have memory
implications in extreme applications). Default: 10.
do_retrospective (optional): bool. Default: False.
do_print_single_line (optional): bool. Default: False.
n_indent (optional): int specifying the number of indentation
to prefix into print statements. Useful when utilizing multiple
timer objects for profile nested code. Default: 0.
name (optional): string specifying name for this timer, used only
when printing updates. Default: 'Total'.
verbose (optional): Bool indicating whether to print when
allocating new splits beyond the initial n_splits (which may
indicate biased timing for very fast splits). Default: False.
Returns:
None.
- disp(self, *args, **kwargs)
- get_split(self, name)
- Retrieves a previously recorded split time.
Args:
name: the string name used to record the split, as previously
provided in the call: split(name).
Returns:
float indicating the split time in seconds.
- get_splits(self)
- Returns a list of all completed split times.
- print(self, n_indent=None, do_single_line=None)
- Prints the profile of the tasks that have been timed thus far.
Args:
None.
Returns:
None.
- split(self, name=None, stop=False)
- Records and returns the time elapsed for the most recent task.
Args:
name (optional): A string describing the most recent task.
Returns:
float indicating the split time in seconds.
- start(self)
- Starts the timer.
- stop(self)
- Stops the timer, freezing total and split times.
Class methods defined here:
- run_tests(cls) from __builtin__.type
- See docstring to test(...).
Args:
None.
Returns:
None.
- test(cls, times, do_retrospective=False, verbose=False, tol_seconds=0.001, tol_stddev_seconds=0.0005) from __builtin__.type
- Test the Timer class by timing calls to time.sleep(times[i]).
Args:
times: list of (nonnegative) times to measure.
Returns:
the Timer object used in the timing simultion.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
- total_time
| |


ParseDom
Relative path without ./
Relative path same level
Relative path one level deeper
Relative path very deep without file
Relative path one level higher
Relative path very high
Relative path higher -> folder
Absolute path


SpaceX launches another 60 solar-powered internet satellites
by William HarwoodA SpaceX Falcon 9 rocket with a thrice-flown first stage and a previously used nose cone fairing shot into orbit Monday on a Veterans Day flight to launch 60 Starlink internet relay satellites. It was the second batch in a planned constellation of thousands intended to provide broadband service around the world.
With the rising sun as a backdrop — and Mercury creeping across it in a relatively rare transit — the Falcon 9's nine main engines thundered to life at 9:56 a.m. EST, pushing the slender rocket away from its launchpad at Cape Canaveral Air Force Station in Florida.
In keeping with SpaceX's drive to lower costs by reflying its rocket hardware, the Falcon 9's first stage was making a record fourth flight after two missions in 2018 and another earlier this year.
In another first, the nose cone protecting the Starlink satellites and their deployer during the climb out of the lower atmosphere was making its second flight after an April launch atop a Falcon Heavy rocket.
JPMorgan Chase boss Jamie Dimon on Hong Kong protests
The Farmer's Dog's human-tested dog food draws attention in fast-growing pet food category


Earthquakes - Last Hour
Source Data:
USGS
(Updates every minute)
Powered by:
Raspberry Pi
running
Node-RED
and
HiveMQ
Waiting for incoming data ...


See: Description
| Class | Description |
|---|---|
| ConfEAtom |
Provides a Java representation of E atoms.
|
| ConfEBig |
Provides a Java representation of E integral types.
|
| ConfEBinary |
Provides a Java representation of E binaries.
|
| ConfEBoolean |
Provides a Java representation of E booleans, which are special cases of
atoms with values 'true' and 'false'.
|
| ConfEByte |
Provides a Java representation of E integral types.
|
| ConfEChar |
Provides a Java representation of E integral types.
|
| ConfEDouble |
Provides a Java representation of E floats and doubles.
|
| ConfEFloat |
Provides a Java representation of E floats and doubles.
|
| ConfEInt |
Provides a Java representation of E integral types.
|
| ConfEList |
Provides a Java representation of E lists.
|
| ConfELong |
Provides a Java representation of E integral types.
|
| ConfEObject |
Base class of the E data type classes.
|
| ConfEPid |
Provides a Java representation of E pids.
|
| ConfERef |
Provides a Java representation of E refs.
|
| ConfEShort |
Provides a Java representation of E integral types.
|
| ConfEString |
Provides a Java representation of E strings.
|
| ConfETuple |
Provides a Java representation of E tuples.
|
| ConfEUInt |
Provides a Java representation of E integral types.
|
| ConfEUShort |
Provides a Java representation of E integral types.
|
| ConfExternal |
Provides a collection of constants used when encoding and decoding E terms.
|
| ConfInputStream |
Provides a stream for decoding E terms from external format.
|
| ConfOutputStream |
Provides a stream for encoding E terms to external format, for transmission
or storage.
|
| Exception | Description |
|---|---|
| ConfEDecodeException |
Exception raised when an attempt is made to create an E term by decoding a
sequence of bytes that does not represent the type of term that was
requested.
|
| ConfEException |
Base class for the other Conf E exception classes.
|
| ConfERangeException |
Exception raised when an attempt is made to create an E term with data that
is out of range for the term in question.
|


Numerical Algorithms Group: NAG |
|
xmltex: A non validating (and not 100% conforming) namespace aware XML parser implemented in TeX |
xmltex implements a non validating parser for documents matching the W3C XML Namespaces Recommendation. The system may just be used to parse the file (expanding entity references and normalising namespace declarations) in which case it records a trace of the parse on the terminal. Normally however the information from the parse is used to trigger TeX typesetting code. Declarations (in TeX syntax) are provided as part of xmltex to associate TeX code with the start and end of each XML element, attributes, processing instructions, and with unicode character data.
The xmltex parser itself does not require LaTeX. It may be loaded into initex to produce a format capable of parsing XML files. However such a format would have no convenient commands for typesetting, and so normally xmltex will be used on top of an existing format, normally LaTeX. In this section we assume that the document to be processed is called document.xml.
LaTeX requires a document in TeX syntax, not XML. To process document.xml, first produce a two line file called document.tex of the following form:
\def\xmlfile{document.xml} \input xmltex.texDo not put any other commands in this file!
You may then process the document with either of the commands: latex document or latex document.tex or the equivalent procedure in your TeX environment.
You may prefer to set up xmltex as a format in its own right. This may speed things up slightly (as xmltex.tex does not have to be read each time) but more importantly perhaps it allows the XML file to be processed directly without needing to make the .tex wrapper.
To make a format you will need a command such as the following, depending on your TeX system.
initex &latex xmltex initex \&latex xmltex tex -ini &latex xmltex tex -ini \&latex xmltex
This will produce a format file xmltex.fmt. You should then be able to make a xmltex command by copying the way the latex command is defined in terms of latex.fmt. Depending on the TeX system, this might be a symbolic link, or a shell script, or batch file, or a configuration option in a setup menu.
Whilst it may be convenient to build an xmltex format as above, starting from the LaTeX format. You may prefer to instead work with an initex with no existing format file. Even if you wish to use a standard LaTeX it may be preferable to make a TeX input file that first inputs latex.ltx then xmltex.tex. In particular this will allow you to have a different hyphenation and language customisation for xmltex than for LaTeX. Many of the features of the language support in LaTeX are related to modifying the input syntax to be more convenient. Such changes are not needed in xmltex as the input syntax is always XML. Some language files may change the meaning of such characters as < which would break the xmltex parser. Also, rather than using latex.ltx you could in principle use a modified docstrip install file and produce a `cut down' latex that did not have features that are not going to be used in xmltex.
Unfortunately the support for this method of building xmltex (and access to non English hyphenation generally) is not fully designed and totally undocumented.
xmltex by default `knows' nothing about any particular type of XML file, and so needs to load external files containing specific information. This section describes how the information in the XML file determines which files will be loaded.
As discussed above, xmltex requires a mapping between PUBLIC and SYSTEM identifiers, namespace URI, and element names, to files of TeX code. This mapping is implemented by the following commands:
\NAMESPACE{URI}{xmt-file} \PUBLIC{FPI}{file} \SYSTEM{URI}{file} \NAME{element-name}{xmt-file} \XMLNS{element-name}{URI}As described above, if the first argument of one of these commands matches the string specified in the XML source file, the corresponding TeX commands in the file specified in the second argument are loaded. The PUBLIC and SYSTEM catalogue entries may also be used to control which XML files should be input in response to external entity references. The \XMLNS is rather different, if an element in the null namespace does not have any definition attatched to it, this declaration forces the default namespace to the given URI. The catalogue lookup is then repeated. This allows for example documents beginning <html> to be coerced into the xhtml namespace.
These commands may be placed in a configuration file, either xmltex.cfg, in which case they apply to all documents, or in a configuration file `\jobname.cfg' (eg document.cfg in the example in the Introduction) in which case the commands just apply to the specified document.
In addition to the `catalogue' commands described earlier there are other commands that may be placed in the configuration files.
\xmltraceonly
This stops xml from trying to typeset the document. The external files specified in the catalogue are still loaded, so that the trace may report any elements for which no code is defined, but no actual typesetting takes place. In the event of unknown errors it is always worth using xmltex in this mode to isolate any problems.
It may be noted that if an xmltex format is built just using initex without any typesetting commands, the resulting format should still be able to parse any XML file if xmltex.cfg just specifies \xmltraceonly and \jobname.cfg is empty.
\xmltraceoff
By default xmltex provides a trace of its XML parse, displaying each element begin and end. This command used in xmltex.cfg or `\jobname.cfg' will stop this trace being produced.
\inputonce{xmt-file}
The catalogue entries specify that certain files should be loaded if XML constructs are met. Alternatively the files may just always be loaded. The system will ignore any later requests to load. This is especially useful if an xmltex format is being made.
\UnicodeCharacter{hex-or-dec}{tex-code}
The first argument specifies a unicode character number, in the same format as used for XML character entities, namely either a decimal number, or an upper case Hex number preceded by a lower case `x'.
The second argument specifies arbitrary TeX code to be used when typesetting this character. Any code in the XML range may be specified (ie up to x10FFFF). Although codes in the `ASCII' range, below 128, may be specified, the definitions supplied for such characters will not be default be used. The definition will howeverbe stored and used if the character is activated using the command described below.
\ActivateASCII{hex-or-dec}
The argument to this command should be a number less than 128. If a character us activated by this command in a configuration file then any special typesetting instructions specified for the character will be executed whenever the character appears as character data.
Some ASCII characters are activated by default. The list is essentially those characters with special meanings to either TeX or XML.
If a format is being made, there are essentially two copies of xmltex.cfg that may play a role. The configuration file input when the format is made will control catalogue entries and packages built into the format. A possibly different xmltex.cfg may be used in the input path of `normal' TeX, this will then be used for additional information loaded each run.
In either case, a separate configuration file specific to the given XML document may also be used (which is loaded immediately after xmltex.cfg).
xmltex should stop after the end of the document element has been processed. If things go wrong and you end up at the interactive * prompt you might want to exit with <?xmltex \stop?>).
xmltex package files are the link between the XML markup and TeX typesetting code. They are written in TeX (rather than XML) syntax and may load directly or indirectly other files, including LaTeX class and package files. For example a file loaded for a particular document type may directly execute \LoadClass{article}, or alternatively it may cause some XML element in the document to execute \documentclass{article}. In either case the document will suffer the dubious benefit of being formatted based on the style implemented in article.cls. Beware though that the package files may be loaded at strange times, the first time a given namespace is declared in a document, and so the code should be written to work if loaded inside a local group.
Characters in xmltex package files have their normal LaTeX meanings except that line endings are ignored so that you do not need to add a % to the end of lines in macro code. Unlike fd file conventions, other white space is not ignored.
The available commands are:
\FileEncoding{encoding}
This is the analogue for TeX syntax files of the encoding specification in the XML or text declaration of XML files. If it is not specified the file will be assumed to be in UTF-8.
\DeclareNamespace{prefix}{URI}
This declares a prefix to be used in this file for referring to elements in the specified namespace. If the prefix is empty then this declares the default namespace (otherwise, unprefixed element names refer to elements that are not in a namespace).
Note that the elements in the XML document instance may use a different prefix, or no prefix at all to access this namespace. In order to resolve these different prefixes for the same namespace, each time a namespace is encountered for the first time (either by \DeclareNamespace in a preloaded package, or in a namespace declaration in the XML instance) then it is allocated a new number and any further namespace declaration for the same URI just locally associates a prefix with this number. It is these numbers that are displayed when the XML trace of the parse of the document is shown, and also if any element is written out to an external file it will have a normalised prefix of a number whichever prefix it had originally. (Numeric prefixes are not legal XML, but this is an advantage, it ensures these internal forms can not clash with any prefix actually used in the document.)
Three namespaces are predeclared. The null namespace (0), the XML namespace (http://www.w3.org/1998/xml) (1) which is predeclaed with prefix xml as specified in the Namespace Recommendation, and the xmltex namespace (http://www.dcarlisle.demon.co.uk/xmltex) (2) which is not given a default prefix, but may be used to have XML syntax for some internal commands (eg to have .aux files fully in XML, currently they are a hybrid mixture of some TeX and some XML syntax).
\XMLelement{element-qname}{attribute-spec} {begin-code}{end-code}
This is similar to a LaTeX \newenvironment command.
Declare the code to execute at the start and end of each instance of this element type. This code will be executed in a local group (like a LaTeX environment). The second argument declares a list of attributes and their default values using the \XMLattribute command described below.
\XMLelement{element-qname} {attribute-spec} {\xmlgrab}{end-code}
A special case of the above command (which may be better made into a separate declaration) is to make the start-code just be the command \xmlgrab. In this case the end-code has access to the element content (in XML syntax) as #1. This content isn't literally the same as the original document, namespaces, white space and attribute quote symbols will all have been normalised.
\XMLattribute{attribute-qname} {command-name}{default}
This command may only be used in the argument to \XMLelement. The first argument specifies the name of an attribute (using any namespace prefixes current for this package file, which need not be the same as the prefixes used in the document). The second argument gives a TeX command name that will be used to access the value of this attribute in the begin and end code for the element. (Note using TeX syntax here provides a name independednt of the namespace declarations that are in scope when this code is executed). The third argument provides a default value that wil be used if the attribute is not used on an instance of this element.
The special token \inherit may be used which will cause the command to have a value set in an ancestor element if this element does not specify any value.
If a TeX token such as \relax is used as the default the element code may distinguish the case that the attribute is not used in the document.
\XMLnamespaceattribute {prefix}{attribute-qname} {command-name}{default}
This command is similar to \XMLattribute but is used at the top level of the package file, not in the argument to \XMLelement. It is equivalent to specifying the attribute in every element in the namespace specified by the first argument. As usual the prefix (which may be {} to denote the default namespace) refers to the namespace declarations in the xmltex package: the prefixes used in the document may be different.
\XMLentity{name}{code}
Declare an (internal parsed) entity, this is equivalent to a <!ENTITY declaration, except that the replacement text is specified in TeX syntax.
\XMLname{name}{command-name}
Declare the TeX command to hold the (normalised, internal form) of the XML name given in the first argument. This allows the code specified in \XMLelement to refer to XML element names without knowing the encodings or namespace prefixes used in the document. Of particular use might be to compare such a name with \ifx\XML@parent which will allow element code to take different actions depending on the parent of the current element.
\XMLstring{command-name}<>XML Data</>
This saves the XML fragment as the TeX command given in the first argument. It may be particularly useful for redefining `fixed strings' that are generated by LaTeX document classes to use any special typesetting rules specified for individual characters.
It should also be used for defining any strings used to in comparison tests with strings occurring in the XML document. Using \XMLstring rather than \def ensures that the characters and encodings in the string are correctly normalised.
xmltex tries as far as possible to be a fully conforming non validating parser. It fails in the following respects.
A non validating parser is not forced to read external dtd entities (and this one does not) It is obliged to read the local subset and process entity definitions and attribute declarations. Entity declarations are reasonably well handled: External parameter entities are handled as above, loading a corresponding xmltex file if known. External entities are similarly processed, inputting the XML file, a difference in this case is that if the entity is not found in the catalogue, the SYSTEM identifier will be used directly to \input as often this is a local file reference. Internal parsed entities and parameter entities are essentially treated as TeX macros, and nonparsed entities are saved along with their NDATA type, for use presumably by \includegraphics.
Attribute defaults are processed in the local subset of the dtd, however note that this is `namespace unaware' defaulting and only applies to elements using the same prefix and local name, unlike the defaulting done by \XMLattribute.
Support for encodings depends on having an encoding mapping file. Any 8bit encoding that matches Unicode for the first 127 positions may be used by making a trivial mapping file. (The one for latin1 looks over complicated as it programs a loop rather than having 127 declarations saying that latin1 and Unicode are identical in this range).
UTF-8 is supported, but support for UTF-16 is minimal. Currently only latin-1 values work: (In this range UTF-16 is just latin-1 with a null byte inserted after (or before, depending on endedness) each latin-1 byte. The UTF-16 implementation just ignores this null byte then processes as for latin-1. Probably the first few 8bit pages could be similarly supported by making the low ascii control characters activate UTF-16 processing but this will never be satisfactory using a standard TeX. Hopefully a setup for a 16bit TeX such as Omega will correct this.
In theory you should be able to control the document just be suitable code specified by \XMLelement and friends, but sometimes it may be necessary to `tweak' the output by placing commands directly in the source.
Two mechanisms are availalable to do this.
Using the xmltex namespace. The xmltex namespace conatins a small (currently empty) set of useful TeX constructs that are accessed by XML syntax. For example if xmltex provides a mechanism for having XML (rather than LaTeX) syntax toc files, it will need an analogue of \contentsline which might be an element accessed by <xmltex:contentsline>… where the xmltex prefix is declared on this or a parent element to be xmlns:xmltex="http://www.dcarlisle.demon.co.uk/xmltex".
As the xmltex namespace is declared but currently empty, a more useful variant of this might be:
\DeclareNamespace{tweak}{"/my/tex/tweak"} \XMLelement{tweak:clearpage}{\clearpage}
A second different mechanism is available, to use XML processing instructions. A Processing Instruction of the form: <?xmltex> TeX commands ?> will execute the TeX commands.
None, of course.
Thus section discusses some of the more experimental features of xmltex that may get a cleaner syntax (or be removed, as a bad idea) in later releases, and also describes some of the internal interfaces (which are also subject to change)
At any point while processing a document, xmltex is in one of two states: tex or xml.
In the xml state, < and & are the only two characters that trigger special markup codes. Other characters, such as !, >, =, … may be used in certain XML constructs as markup but unless some code has been triggered by < they are treated simply as character data. All characters above 127 are `active' to TeX and are used to translate the input encoding to UTF-8. All internal character handling is based on UTF-8, as described below. Some characters in the ASCII range, below 127 are also active by default (mainly punctuation characters used in XML constructs, such as the ones listed above). Some or all of the others may be activated using the \ActivateASCII command, which allows special typesetting rules to be activated for the characters, at some cost in processing speed.
In the tex state, characters in the ASCII range have their usual TeX meanings, so letters are `catcode 11' and may be used in TeX control sequences, \ is the escape character, & the table cell separator, etc. Characters above 127 have the meanings current for the current encoding just as for the xml state, probably this means that they are unusable in TeX code, except for the special case of referring to XML element names in the first argument to \XMLelement and releated commands.
Whenever a new (XML or TeX) file is input by the xmltex system the encoding is first switched to UTF-8. At the end of the input the encoding is returned to whatever was the current encoding. The encoding current while the file is read is determined by the encoding pseudo-attribute on the XML or text declaration in the case of XML files, or by the \FileEncoding command for TeX files. Note that the encoding mechanism only is triggered by xmltex file includes. Once an xmltex package file is loaded it may include other TeX files by \input or \includepackage these input command swill be transparent to the xmltex encoding system. The vast majority of TeX macro packages only use ASCII characters so this should not be a problem.
Note that if the \includepackage occurs directly in the xmltex package file, the TeX code will be included with a known encoding, the one specified in the xmltex package, or UTF-8. If however the \includepackage is included in code specified by \XMLelement, then it will be executed with whatever encoding is current in the document at the point that element is reached. Before xmltex executes the code for that element it will switch to the tex state, thus normalising the ascii characters but characters above 127 will not have predefined definitions in this case.
Internally eveything is stored as UTF-8. So `aux' and `toc' files will be in UTF-8 even if the document (or parts of the document) used different encodings.
To specify a new encoding, if it is an 8 bit encoding that matches ASCII in the printable ASCII range, then one just needs to produce a file with name encoding.xmt (in lowercase, on case sensitive systems) this should consist of a series of \InputCharacter commands, giving the input character slot and the equivalent Unicode. If an encoding is specified in this manner character data will be converted to UTF-8 by expansion and so ligatures and inter letter kerns will be preserved. (Conversely if characers are accessed by character references, Ӓ then TeX arithmetic is used to decode the information and ligature information will be lost. For some large character sets, especially for Asian languages, these mechanisms will probably not prove to be sufficient, some mechanisms are being investigated, but in the short term it may be necessary to always use UTF-8 if the input encoding is not strictly a ine byte extension of the ASCII code page.
You can use arbitrary TeX commands in an xmltex package, althought you should be aware that the file may be input into a local group, at the point in a document that a particular namespace is first used, for example. There are however some specific commands designed to be used in the begin or end code of \XMLElement.
\ignorespaces
This is actually a TeX primitive (for the moment!)
\obeyspaces
Obey consecutive space characters, rather than treating consecutive runs as a single space. (A command of this name, but not this definition is in plain TeX.)
\obeylines
Obey end of line characters, rather than treating then as a space, force a line break. (A command of this name, but not this definition is in plain TeX.)
\xmltexfirstchild#1\@
If the start-code for an element is specified as \xmlgrab then the end-code may use #1 in order to execute the element content. Sometimes you do not want all of the content. The a construction (with currently unpleasant syntax) \xmltexfirstchild#1\@ will just evaluate the first child element of the content, discarding the remaining elements.
\xmltextwochildren\csa\csb#1
If you know that the content will be exactly two child elements (for examle a MathML frac or sub element) then this command may be used. It will execute the TeX code \csa{child-1}\csb{child-2 So either two TeX command smay be supplied, one will be applied to each child, or the second argument may be {} in which case the first argument may be a TeX command that takes two arguments. For example the code for MathMl frac might be
\XMLelement{m:mfrac} {} {\xmlgrab} {\xmltextwochildren\frac{}#1}
\xmltexthreechildren\csa\csb\csc#1
As above, but more so.
\xmltexforall\csa{#1}
The TeX command \csa is called repeatedly, taking each child element of the current element as argument on each iteration. As a convenience the command \xml@name is defined before each iteration to have the (internal, normalised) name of the element being processed.
\NDATAEntity\csa\csb\attvalue
If the XML parser encounters an internalor external entity reference it expands it without executing any special hook that may be defined in an xmltex package. However NDATA entites are never directly encountered in an entity reference. They may only be used as an attribute value. If \attvalue. is a TeX command holding the value of an attribute, as declared in \XMLattribute then \NDATAEntity\csa\csb\attvalue applies the two TeX commands \csa and \csb to the notation type and the value, in a way exactly corresponding to \xmltextwochildren so for example the XML document for this manual specifies
<!NOTATION URL SYSTEM "" > <!ENTITY lppl SYSTEM "http://www.latex-project.org/lppl.txt" NDATA URL>and this is handled by the following xmltex code
\XMLelement{xptr} {\XMLattribute{doc}{\xptrdoc}{}} {\NDATAEntity\xptrdoc\@gobble\url} {}which saves the attribute value in \xptrdoc and then discards the notation name (URL) and applies the command \url to typeset the supplied URL.
| int. | ext. xml | ext. mixed | csn typeout | |||
| d | xabc | xabc | xabc (12) | xabc (12) | xabc (12) | |
| c | xab | xab | xab (12) | xab (12) | xab (12) | |
| b | xa | xa | xa (12) | xa (12) | xa (12) | |
| ax | x | x | x | x | x (12) | (!) |
| ay | x | x | x | { | x (12) | (e) |
| az | x | \az x | { | { | x (12) | (<) |
| < | < | < | < | < | < (12) | (<) |


Lesson 2: Notation and Formal Definitions
2.1
Formal Definition of a DFA
In the last lesson, we informally introduced the concepts of DFAs and NFAs, and we used state diagrams to represent them. While informal definitions are great for gaining an intuition about how finite state machines work, formal definitions are used most often in both computer science theory and applications. There are several reasons why having a formal definition is important, but here are a few of them:
- A formal definition is precise. If you were unsure about what is allowed or not allowed in a DFA/NFA, the formal definition will provide all of the information you need.
- A formal definition provides clear notation. You can easily express the machine you are trying to build if you use good notation.
What would you consider to be the defining features of a DFA? In this section, we will be formally defining DFAs and each of their features.
States
Let’s start with the DFA’s states. We formally define the set of states of a DFA using the symbol \( Q \). Generally in mathematics, a set is a collection of distinct objects, which we call the elements or members of the set. The elements of the set \( Q \) are the states of a given DFA. As an example, recall the DFA \( M_1 \) that we studied in the last lesson.
Normally, sets are described formally by listing their elements in braces. So, we can write $$ Q = \{ q_1, q_2, q_3\} $$ to denote the set \( Q \) containing the states of the DFA \( M_1 \).
Alphabet
Another inherent feature of DFAs is the set of input symbols they take in. For instance, you probably noticed that \( M_1 \) only has \( 1 \)’s and \( 0 \)’s as labels on transitions. You couldn’t give it a string containing \( 2 \)’s or \( 3 \)’s, or English letters. That would be like giving a decimal integer or a string to a Java program that takes a binary integer as a command-line argument. The part of the DFA that enforces this restriction is its alphabet. The alphabet of \( M_1 \) only allows \( 1 \)’s and \( 0 \)’s as input symbols. We denote the alphabet of a DFA by the set \( \Sigma \), whose elements are the valid input symbols of the DFA. The alphabet of \( M_1 \) is \( \Sigma = \{ 0, 1 \} \).
Transition Function
The transition function of a DFA, often denoted by the symbol \( \delta \), specifies exactly how the DFA moves from state to state. When we first looked at DFAs, there were two things we considered when determining how the machine would transition between states. First, we had to know the current state of the DFA. Let’s say this state is state \( x \). Second, we had to know the input symbol being read. Let’s say that symbol is \( 1 \). If the DFA’s state diagram had an arrow pointing from state \( x \) to state \( y \) labeled with a \( 1 \), we knew that the next state to go to was \( y \). We can think of the way a DFA transitions between states as a function whose first parameter is a state, or an element of \( Q \), and whose second parameter is an input symbol, or an element of \( \Sigma \). The output of the function is another state, or another element of \( Q \). We denote this using the following function notation: $$ \delta : Q \times \Sigma \rightarrow Q $$ This notation says that \( \delta \) is a function whose domain is \( Q \times \Sigma \), and whose range is \( Q \). Generally, \( A \times B \) is known as the Cartesian product of the sets \( A \) and \( B \), or the set of all ordered pairs where the first element is a member of \( A \) and the second element is a member of \( B \). In the example above, since \( x \) transitions to state \( y \) on input \( 1 \), we write \( \delta(x, 1) = y \). Let’s construct the transition function for \( M_1 \), which we will call \( \delta \).
Below is the Cartesian product of \( Q \) and \( \Sigma \). $$ Q \times \Sigma = \{(q_1, 0), (q_1, 1), (q_2, 0), (q_2, 1), (q_3, 0), (q_3, 1)\} $$
The elements of the Cartesian product above specify the possible inputs to the transition function. We write out the function as follows:
| $$\delta(q_1, 0) = q_1$$ $$\delta(q_1, 1) = q_2$$ $$\delta(q_2, 0) = q_3$$ | $$\delta(q_2, 1) = q_2$$ $$\delta(q_3, 0) = q_2$$ $$\delta(q_3, 1) = q_2$$ |
Functions that take ordered pairs as input are often expressed using two-dimensional tables. For the transition function of a DFA, each row corresponds to a state, and each column corresponds to an input symbol. Below is \( \delta \) for \( M_1 \) expressed as a table:
| \( \delta \) | \( 0 \) | \( 1 \) |
| \( q_1 \) | \( q_1 \) | \( q_2 \) |
| \( q_2 \) | \( q_3 \) | \( q_2 \) |
| \( q_3 \) | \( q_2 \) | \( q_2 \) |
The transition function describes a very important property of DFAs: a DFA must have exactly one transition exiting every state for each possible input symbol, since there is exactly one next state for each possible combination of a state and an input symbol.
Start State and Accept States
The start state of a DFA is a member of its set of states. The symbol '\( \in \)' denotes membership within a set. So for the DFA \( M_1 \), \( q_1 \in Q \) is its start state.
Finally, a DFA has a set of accept states, or final states, which we denote with the symbol \( F \). The set of accept states of a DFA is a subset of its set of states, written as \( F \subseteq Q \). In other words, all of the elements of the set of final states must also be elements of the set of states. Note that \( F \) does not need to be a proper subset of \( Q \), since \( F \) may be equal to \( Q \).
The empty set, the set with no elements represented by the symbol \( \emptyset \), is a subset of every set. From the formal definition of the set of accept states, \( F \) is allowed to be the empty set.  For the DFA \( M_1, \) \( F = \{ q_2 \} \).
Putting the Pieces Together
We have learned about the five parts that make up a DFA: a set of states, an input alphabet, a transition function specifying the rules for moving, a start state, and accept states. In mathematical language, an ordered list of five elements is often called a 5-tuple. We define a finite automaton to be a 5-tuple consisting of these five parts.
Formally, a deterministic finite automaton is a 5-tuple \( (Q, Σ, \delta, q_0, F ) \), where
- \( Q \) is a finite set called the states,
- \( \Sigma \) is a finite set called the alphabet,
- \( \delta : Q \times \Sigma \rightarrow Q \) is the transition function,
- \( q_0 \in Q \) is the start state, and
- \( F \subseteq Q \) is the set of accept states.
We can describe \( M_1 \) formally by writing \( M_1 = (Q, \Sigma, \delta, q_1, F) \), where
- \( Q = \{ q_1, q_2, q_3 \} \),
- \( \Sigma = \{ 0, 1 \} \),
- \( \delta \) is described as
- \( q_1 \) is the start state, and
- \( F = \{ q_2 \} \).
| \( \delta \) | \( 0 \) | \( 1 \) |
| \( q_1 \) | \( q_1 \) | \( q_2 \) |
| \( q_2 \) | \( q_3 \) | \( q_2 \) |
| \( q_3 \) | \( q_2 \) | \( q_2 \) |
Mini Quiz
The questions below refer to the DFA \( M_2 \).
Below are some set-theory terms with examples that will appear in the quiz:
The symbol '\( \setminus \)' means 'set difference'. If \( A = \{1,2,3\} \) and \( B = \{1,3\} \),
then \( A \setminus B = \{ 2 \} \).
The symbol '\( \forall \)' means 'for all'. \(
\forall x \in \{1, 2, 3\}, x > 0 \) is a true statement.


Geospatial Resources & Geodata Links
-Base Layers | Repositories | 'Starter Kits' | Statistics & Indicators
- Natural Earth
- www.naturalearthdata.com
- What it contains: Global & Regional scale 'starter' kits for human and natural geography.
Well organized, maintained with open license.
- GADM database of Global Administrative Areas
- www.gadm.org
- What it contains: A 'go to' for administrative boundaries per country/region. Usually contains admin level 0-2.
The current version is 2.0 (January 2012).
- DIVA-GIS
- www.diva-gis.org
- What it contains: Essentially a mirror of GADM data with the addition of a GIS tool as well as additional data sources/lists.
- GeoNetwork | FAO CORE DATASETS
- www.fao.org/geonetwork
- What it contains: "FAO (Food and Agriculture Organization of the United Nations) produces a large number of Geographic Information System (GIS) datasets for monitoring, assessment and analysis of environmental and socio-economic factors causing poverty and food insecurity. Particular relevance is given to malnutrition, farming systems and crops, livestock production systems, fishery and forestry sectors, agro-ecological zoning, land and water resources management and climate related issues."
- Geocommons
- geocommons.com
- What it contains: Always an interesting source, per the site: "GeoCommons is the public community of GeoIQ users who are building an open repository of data and maps for the world." Very open and easy-to-access site for geodata, both consuming and producing/hosting.
- World Pop
- www.worldpop.org.uk/
- What it contains: Excellent global/regional resource for population density. Most data comes in raster format with cell values for population density.
- Protected Planet
- www.protectedplanet.net/
- What it contains: Good global/regional/local resource for 'World Database on Protected Areas' features. Per the site: "ProtectedPlanet.net is the online interface for the World Database on Protected Areas (WDPA), a joint project of IUCN and UNEP, and the most comprehensive global database on terrestrial and marine protected areas."
- UN Data Portal
- data.un.org/
- What it contains: Not spatial per se, statistical datasets for indicators/statistics typical of UN and partner organizations. Global/regional in scale; can be a good resource for joining with corresponding geometry/features.
- World Bank Data Portal
- data.worldbank.org/
- What it contains: Not spatial per se, statistical datasets for indicators/statistics typical of World Bank. Global/regional in scale; can be a good resource for joining with corresponding geometry/features.
- Socioeconomic Data and Applications Center (sedac)
- sedac.ciesin.columbia.edu/
- What it contains: SEDAC focuses on human interactions in the environment. Many spaital datasets available for human geography & environmental issues.
- The Minnesota Population Center (MPC) Data Portal
- www.ipums.org/
- What it contains: MPC is one of the world’s leading developers of demographic data resources. Both spatial and nonspatial data available at global/regional/local scales. Very comprehensive, well researched and documented data source for demographic data.
- Humanitarian Data Exchange (HDX)
- data.hdx.rwlabs.org/
- What it contains: HDX is a repository for both nonspatial and spatial data that is tailored for use by the humanitarian initatives and organizations.
- IDCM - monitoring Displacement Monitoring Centre
- www.internal-displacement.org//
- What it contains: A leader in tracking human displacement at country, regional and global scales. Produces data in tabular format that can work at various scales in conjunction with appropriate geometry/features.
- InterAction- A United Voice for Global Change
- www.interaction.org/work/ngoaidmap
- What it contains: InterAction's NGO Aid Map aims to increase the amount of publicly available data on international development and humanitarian response by providing detailed project information through interactive maps and data visualizations. Data for project sites is accessible.
- WRI- World Resources Institute
- www.wri.org/resources/data_sets
- What it contains: WRI's data sets are well organized and developed with emphasis on spatial datasets. Their water basin studies and spatial features are well developed and accessbile. Word of Warning: Their weights for vulnearability indicators often skew towards industry and extraction industries.
- AQUASTAT- FAO's global water information system
- www.fao.org/nr/water/aquastat/countries_regions/index.stmt
- What it contains: FAO's statistics particular to water resources per country/region. Particularly, 141 country profiles, 5 regional overviews and 8 river basin overviews describe the state of the water resources and water use, as well as the state of agricultural water management in each of them.
- HydroSHEDS
- hydrosheds.cr.usgs.gov/index.php
- What it contains: HydroSHEDS provides hydrographic information in a consistent and comprehensive format for regional and global-scale applications. These data layers are available to support watershed analyses, hydrological modeling, and freshwater conservation planning at a quality, resolution, and extent that had previously been unachievable in many parts of the world. Spatial datasets are open and available for download.
- The Migration, Globalisation and Poverty Research Centre
- www.migrationdrc.org
- What it contains: The Migration, Globalisation and Poverty DRC is a research project that ended 2010; data from the project is open and available at country and regional scales for migration related issues.
- United Nations Economic Commission for Latin America and the Caribbean (CEPAL)
- www.cepal.org/celade/depualc/
- What it contains: Open and accessible population and urbanization demographic data at regional and subnational scales in tabular format.
- Latin America and the Caribbean (LAC) Population Database
- gisweb.ciat.cgiar.org/population/
- What it contains: aggregated, gridded population and land use datasets for Latin America and the Caribbean.
- Latin America and the Caribbean (LAC) Population Database
- geosur.info/geosur/index.php/en/
- What it contains: The GeoSUR Program is led by CAF - the Latin American Development Bank and PAIGH the Pan American Institute of Geography and History. The Portal was developed with the technical support of the U.S. Geological Survey (USGS). Datasets are available in open format, as well as a map portal and lots of contextual resources and multiple agency participation.
- The Organisation for Economic Co-operation and Development (OECD)
- www.oecd-ilibrary.org
- What it contains: Open and accessible national, regional scale tabular data for various indicators/statistics for global, national and regional comparisons/analysis. Requires subscription/login for full access to data.
- MEDevEcon - Research of Markus Eberhardt, Assistant Professor, School of Economics, University of Nottingham
- sites.google.com/site/medevecon/development-economics/devecondata
- What it contains: links to over 300 macro and micro datasets for development economics; various scales, spatial and nonspatial; nonspatial sets but can be utlized with appropriate geometry/features in certain instances.
- International Conflict Research (ICR)
- www.icr.ethz.ch/data/index
- What it contains: ICR conducts research on international and domestic conflict using social-scientific theories and methodologies. The organization interestingly and usefully strives to develop disaggreated datasets for their conflict research.
- The Africa Infrastructure Knowledge Program
- infrastructureafrica.org
- What it contains: Geospatial features for infrastruce across Africa at regional/national and subnational scales.
- Leland Stanford Junior University- Statistical Resources
- www-sul.stanford.edu/depts/ssrg/africa
- What it contains: Various regional and national statistical data links/sources. Particular resources may or may not be spatial.
- Statistics South Africa
- beta2.statssa.gov.za/
- What it contains: National statistical repository- all things census and demography for South Africa.
- The GeoCommunity™ data portal
- data.geocomm.com/
- What it contains: limited free geodata at global, regional, national and subnational scales.
- Ecological Tapestry of the World
- ecoexplorer.arcgis.com/eco/
- What it contains: ESRI + USGS 250 Meter resolution map portal 'Ecological Map Unit' at global scale. The viewer is useful at certain scales to view/consume location across 4 ecological categories- Bioclimate, landforms, rock type and land cover.
-"Lists within Lists"- Valuable geospatial listing and repositories
- "Free GIS Datasets" A comprehensive, well organized list developed by Robin Wilson, University of Southampton.
- freegisdata.rtwilson.com
- What it contains: Well organized list of what it says it is: Free global, regional, national and subnational scaled geodata in vector/raster format, organized by theme.
- "tolomaps" A comprehensive, well organized list developed by Robin Tolochko.
- tolomaps.com
- What it contains: Well organized list of data, resources, tools, lists and tutorials for geospatial work.
- World Wide Data- Washington State Geospatial Data Archive (WAGDA)
- wagda.lib.washington.edu/data/geography/world/
- What it contains: Generally free and accessbile global and regional scale raster & vector data, organized by type and theme.
- University of Maryland GIS dataguide
- lib.guides.umd.edu
- What it contains: Generally free and accessbile global and regional scale raster & vector data, organized by type and theme.
- EDENext
- http://www.edenextdata.com/
- What it contains: One of the best listings of global/regional datasets, raster/vetor format. EDENext is involved with infectious diseases; spatial datasets are designed to support this research. Their reserach is focused on European region; however, datasets, links are both regional and global.
- Stanford University GIS data portal/list
- lib.stanford.edu/GIS/data
- What it contains: Stanford University's listing of global/regional/local geospatial data sources.
- Susquehanna River Basin Commission
- www.srbc.net/atlas/links.asp
- What it contains: Geodata resources at regional, national and subnational scales with focus on the United States.
-Remote Sensing Data Portals
- Earth Explorer - USGS
- earthexplorer.usgs.gov/
- What it contains: Along with University of Maryland's portal to follow, arguably the easiest, best orgainized location for remote sensed products, especially Landsat tiles.
- GLCF- Global Land Cover Facility- University of Maryland
- glcf.umd.edu/data/
- What it contains: The Global Land Cover Facility (GLCF) provides earth science data and products to help everyone to better understand global environmental systems. In particular, the GLCF develops and distributes remotely sensed satellite data and products that explain land cover from the local to global scales. Specializes in various land cover products derived from remote sensing.
- University of Maryland + Google: Forest Extent & Change via Landsat RS analysis
- earthenginepartners.appspot.com/science-2013-global-forest
- What it contains: Results from time-series analysis of Landsat images characterizing forest extent and change. Downloadable data; map portal and explanatory text of methodology, outcomes and typical uses.
-OpenStreetMap OSM Extracts
- Planet OSM Wiki
- wiki.openstreetmap.org/wiki/Planet.osm
- What it contains: This OSM wiki lists all the major OSM data extracts that are generally appropriate for extracting OSM into GIS formats for further analysis/cartography. The Planet OSM file is ALL OSM data in one file, thus it needs to be parsed for more expedient downloads which some of the resources/sites listed in the Wiki are able to accomplish on user's behalf.
- Metro Extracts
- metro.teczno.com/
- What it contains: Parts of the OpenStreetMap database for major world cities and their surrounding areas. The goal of these extracts is to make it easy to make maps for major world cities, even if they cross state or national boundaries. Important Note: NO LONGER UPDATED/MAINTAINED; utlize Mapzen resource below as an alternative as needed.
- Mapzen Extracts
- mapzen.com/metro-extracts/
- What it contains: "City-sized parts of the OpenStreetMap database, served up weekly. The goal is to make it easier to get started with manageable, relevant, and local data so we can all build cool stuff.
This is derived from the work of Michal Migurski, but rebuilt as a chef cookbook for automated weekly updates."
-US Centric
- TIGER (Topologically Integrated Geographic Encoding and Referencing)
- www.census.gov/geo/maps-data/data/tiger.html
- What it contains: Geospatial format used by the United States Census Bureau to describe land attributes such as roads, buildings, rivers, and lakes, as well as areas such as census tracts.
- Water Resources of the United States | USGS
- water.usgs.gov/maps.html
- What it contains: Water-related GIS datasets for regional/national scale with focus on United States water resources.
>
-NYC Centric
- MTA Transportation Line
- spatialityblog.com/2010/07/08/mta-gis-data-update/
- What it contains: Steven Romalewski's MTA subway/transportation line with honed attributes that make it more valuable than other versions available. If deployed, credit should be apportioned as requested by Steven.
- NYS GIS Clearinghouse
- gis.ny.gov/gisdata/
- What it contains: As the name suggests, the state's geodata site with lots of partnering agencies and organizations with various degrees of open/closed datasets.
- DOITT | SOCRATA direct link
- data.cityofnewyork.us/browse?tags=doitt%20gis
- What it contains: The NYC Department of Information Technology maintains many geodata sets for NYC; the above link is for the department's Socrata open data link. Be aware of update dates per file; some may be older than desired.
- Cornell University's geospatial repository
- cugir.mannlib.cornell.edu
- What it contains: Cornell's geospatial repository, some sets appropriate for greater NYC
- State of New York | Open Data Platform
- data.ny.gov
- What it contains: NY State's open data platform; all the big agencies are listed here with open datasets.
- John Weir's github repository for NYC data
- github.com/jweir/nyc-gov-data
- What it contains: Currently the repository lists .csv & .json for data sources for NYC region.
- NYC OASIS
- www.oasisnyc.net/pages/data.aspx
- What it contains: Direct link to NYC OASIS Map features list. Not useable data per se, but good resource for an overview of geodata themes for NYC.
- NY State Museum's repository
- www.nysm.nysed.gov/gis/
- What it contains: Geology-centric geodata resources for NYS and region.
- New York Protected Areas Database (NYPAD)
- www.nypad.org/
- What it contains: NYPAD is a spatial database of lands protected, designated, or functioning as open space, natural areas, conservation lands, or recreational areas. These lands cover over six million acres, approximately 20% of New York State. Spatial data availble in typical formats for these categorized areas.


CPR:
Cardiopulmonary Resuscitation or popularly known as CPR – is an emergency lifesaving procedure performed when the heart stops beating. Immediate CPR can double or triple chances of survival after cardiac arrest.
Hands-only CPR
To carry out a chest compression:
- Place the heel of your hand on the breastbone at the centre of the person's chest. Place your other hand on top of your first hand and interlock your fingers.
- Position yourself with your shoulders above your hands.
- Using your body weight (not just your arms), press straight down by 5 to 6cm (2 to 2.5 inches) on their chest.
- Keeping your hands on their chest, release the compression and allow the chest to return to its original position.
- Repeat these compressions at a rate of 100 to 120 times a minute until an ambulance arrives or you become exhausted.
Hands-only CPR
CPR with rescue breaths
If you have been trained in CPR, including rescue breaths, and feel confident using your skills, you should give chest compressions with rescue breaths.
If you're not completely confident, attempt hands-only CPR instead.Adults
- Place the heel of your hand on the breastbone at the centre of the person's chest. Place your other hand on top of your first hand and interlock your fingers
- After every 30 chest compressions, give 2 rescue breaths.
- Tilt the casualty's head gently and lift the chin up with 2 fingers. Pinch the person's nose.  Check that their chest rises. Give 2 rescue breaths.
- Continue with cycles of 30 chest compressions and 2 rescue breaths until they begin to recover or emergency help arrives.
 Remove any visible obstructions from the mouth and nose.
- Pinch their nose.  Give 5 initial rescue breaths.
- Place the heel of 1 hand on the centre of their chest and push down by 5cm (about 2 inches), which is approximately one-third of the chest diameter. The quality (depth) of chest compressions is very important. Use 2 hands if you can't achieve a depth of 5cm using 1 hand.
- After every 30 chest compressions at a rate of 100 to 120 a minute, give 2 breaths.
- Continue with cycles of 30 chest compressions and 2 rescue breaths until they begin to recover or emergency help arrives.
Infants under 1 year old
- Open the child's airway by placing 1 hand on their forehead and gently tilting their head back and lifting the chin. Remove any visible obstructions from the mouth and noseOpen the infant's airway by placing 1 hand on their forehead and gently tilting the head back and lifting the chin. Remove any visible obstructions from the mouth and nose.
 Give 5 initial rescue breaths.
- Place 2 fingers in the middle of the chest and push down by 4cm (about 1.5 inches), which is approximately one-third of the chest diameter. The quality (depth) of chest compressions is very important. Use the heel of 1 hand if you can't achieve a depth of 4cm using the tips of 2 fingers.
- After 30 chest compressions at a rate of 100 to 120 a minute, give 2 rescue breaths.
- Continue with cycles of 30 chest compressions and 2 rescue breaths until they begin to recover or emergency help arrives.
Woman performing CPR on an Infant


--- layout: default title: Home page-order: 0 ---
Borrowing the concept of "Code Katas" made popular by Dave Thomas, we come up with various exercise scenarios to constantly hone our skillsets.
View KatasWhen we come across a helpful resource, we share it with our members in an effort to build a library of pointers to awesome communities.
View ResourcesProjects, katas, collaborative learning, these are defining components of our group. We started this because making cool things with your friends is a lot of fun!
View Projects


Built-In Namespace _global_
| Field Attributes | Field Name and Description |
|---|---|
|
Object holding command line args - parsed by yargs library: npm install yargs
|
|
|
Object for file system
|
|
|
An instance of all the objects seen during this session.
|
|
|
Now many time tics per second
|
|
|
Short names for all of the objects seen and the most recent fully qualified ref for that object.
|
|
|
Object for net library
|
|
|
Object for the readline library
|
|
|
This is the server object created with Net.connect.
|
|
|
Configuration variables, overridden by JSON object read from either the command line or the input stream.
|
|
|
Telko allows a parameter to delay the time between outgoing events (a crude simulation of a slow client: timeLastSent tracks events to be scheduled in the future even though they arrive on stdin instantly.
|
|
|
Object for trace library - npm install winston
|
| Method Attributes | Method Name and Description |
|---|---|
|
addName(String)
A very aggressive name mapper.
|
|
|
parseElko(String)
JSON parse the message, handling errors.
|
|
|
processElkoPacket(String)
All we want to do with incoming packets is log them and register any incoming references for later lookup.
|
|
|
scanForRefs(String)
|
|
|
sendWithSubstituions(JSONObject)
Make last minute substitutions, and send a string version of the object to the server.
|
|
|
substituteName(String)
This allows the input (stdin/file) to use short-names for addressing objects.
|
|
|
substituteState(JSON)
Telko supports a special state substitution.
|
|
|
timestamp(String)
Returns a string to prefix log entries with.
|
Field Detail
Argv
Object holding command line args - parsed by yargs library: npm install yargs
Defined in: Telko.js.
Defined in: Telko.js.
File
Object for file system
Defined in: Telko.js.
Defined in: Telko.js.
History
An instance of all the objects seen during this session. Used for embedded variable substitution
Defined in: Telko.js.
Defined in: Telko.js.
Millis
Now many time tics per second
Defined in: Telko.js.
Defined in: Telko.js.
Names
Short names for all of the objects seen and the most recent fully qualified ref for that object.
Defined in: Telko.js.
Defined in: Telko.js.
Net
Object for net library
Defined in: Telko.js.
Defined in: Telko.js.
Readline
Object for the readline library
Defined in: Telko.js.
Defined in: Telko.js.
Server
This is the server object created with Net.connect.
Defined in: Telko.js.
Defined in: Telko.js.
Telko
Configuration variables, overridden by JSON object read from either the command line or the input stream.
Defined in: Telko.js.
Defined in: Telko.js.
timeLastSent
Telko allows a parameter to delay the time between outgoing events (a crude simulation of a slow client: timeLastSent tracks events to be scheduled in the future even though they arrive on stdin instantly.
Defined in: Telko.js.
Defined in: Telko.js.
Trace
Object for trace library - npm install winston
Defined in: Telko.js.
Defined in: Telko.js.
Method Detail
addName(String)
A very aggressive name mapper. Splits on dashes '-' and dots '.'
Defined in: Telko.js.
Defined in: Telko.js.
- Parameters:
- String
- s The label to split up and attach to the names table
parseElko(String)
JSON parse the message, handling errors.
Defined in: Telko.js.
Defined in: Telko.js.
- Parameters:
- String
- s
- Returns:
- Object The JSON object from the message or {}
processElkoPacket(String)
All we want to do with incoming packets is log them and register any incoming references for later lookup.
Defined in: Telko.js.
Defined in: Telko.js.
- Parameters:
- String
- s The packed coming in from the server.
- Returns:
scanForRefs(String)
Defined in: Telko.js.
- Parameters:
- String
- s The message to be scanned for references ('ref's)
sendWithSubstituions(JSONObject)
Make last minute substitutions, and send a string version of the object to the server.
Defined in: Telko.js.
Defined in: Telko.js.
- Parameters:
- JSONObject
- obj The JSON Object/Message to send after substitution.
substituteName(String)
This allows the input (stdin/file) to use short-names for addressing objects. "randy" instead of "user-randy-13491283092"
Defined in: Telko.js.
Defined in: Telko.js.
- Parameters:
- String
- s
- Returns:
- Either s or the value of Name[s], if it exists.
substituteState(JSON)
Telko supports a special state substitution. Any string that starts with "$" will trigger a lookup of the
state via the Names table. Example "$randy.obj.mod[0].x" will lookup "randy"'s formal ref in the $Names
table, then the value of History.user-randy-1230958410291.obj.mod[0].x will be substituted. All substitutions will
occur in place.
Defined in: Telko.js.
Defined in: Telko.js.
- Parameters:
- JSON
- Object m The object/message that will have it's parameters ($) substituted.
timestamp(String)
Returns a string to prefix log entries with. Uses Telko.logtime as a flag to return the result with, or wihout a timestamp.
Defined in: Telko.js.
Defined in: Telko.js.
- Parameters:
- String
- ptr The "pointer" string - put after the timestamp or at the head of the line depending on Telko.logtime
- Returns:
- String The header for the log line...


ast() = tuple() | [ast()]
| build_and_guard/2 | |
| build_atom/1 | |
| build_attribute/2 | |
| build_binary/1 | ASTify a bin. |
| build_boolean/1 | ASTify a boolean. |
| build_call/2 | |
| build_call/3 | |
| build_case/2 | |
| build_clause/2 | |
| build_clause/3 | |
| build_float/1 | ASTify a float. |
| build_fun/1 | |
| build_function/3 | |
| build_get_record_field/3 | |
| build_guard/1 | |
| build_if/1 | |
| build_integer/1 | ASTify an integer. |
| build_lc/2 | |
| build_lc_generate/2 | |
| build_list/1 | ASTify a list. |
| build_match/2 | |
| build_op/3 | |
| build_or_guard/2 | |
| build_record/1 | |
| build_record/2 | |
| build_record/3 | |
| build_record_field/1 | |
| build_record_field/2 | |
| build_string/1 | ASTify a string. |
| build_tuple/1 | ASTify a tuple. |
| build_value/1 | ASTify the given value. |
| build_var/1 |
build_atom(A::atom()) -> ast()
build_binary(S) -> any()
ASTify a bin
build_boolean(B) -> any()
ASTify a boolean
build_float(F::float()) -> ast()
ASTify a float
build_fun(Clauses) -> any()
build_integer(I::integer()) -> ast()
ASTify an integer
build_lc(Var, Generates) -> any()
build_lc_generate(Var, List) -> any()
build_list(L::list()) -> ast()
ASTify a list
build_record(Name) -> any()
build_record(Name, Fields) -> any()
build_record(Record, Name, Fields) -> any()
build_record_field(Field::atom()) -> ast()
build_string(S::string()) -> ast()
ASTify a string
build_tuple(T::tuple()) -> ast()
ASTify a tuple
build_value(X) -> any()
ASTify the given value
build_var(A::atom()) -> ast()
Generated by EDoc


MainScheduler
public final class MainScheduler : SerialDispatchQueueScheduler
Abstracts work that needs to be performed on DispatchQueue.main
. In case schedule
methods are called from DispatchQueue.main
, it will perform action immediately without scheduling.
This scheduler is usually used to perform UI work.
Main scheduler is a specialization of SerialDispatchQueueScheduler
.
This scheduler is optimized for observeOn
operator. To ensure observable sequence is subscribed on main thread using subscribeOn
operator please use ConcurrentMainScheduler
because it is more optimized for that purpose.
-
Initializes new instance of
MainScheduler
.Declaration
Swift
public init()
-
Singleton instance of
MainScheduler
Declaration
Swift
public static let instance: MainScheduler
-
Singleton instance of
MainScheduler
that always schedules work asynchronously and doesn’t perform optimizations for calls scheduled from main queue.Declaration
Swift
public static let asyncInstance: SerialDispatchQueueScheduler
-
In case this method is called on a background thread it will throw an exception.
Declaration
Swift
public static func ensureExecutingOnScheduler(errorMessage: String? = nil)
-
In case this method is running on a background thread it will throw an exception.
Declaration
Swift
public static func ensureRunningOnMainThread(errorMessage: String? = nil)


02 October 1997
Disease Outbreak Reported
The number of cases and the geographical spread of hantavirus pulmonary syndrome (HPS) has increased in the Americas since the syndrome was first identified in 1993 in the USA and has now been reported in Argentina, Bolivia, Brazil, Canada, Chile, Paraguay, Peru and Uruguay in addition to the USA. Facing the possibility of further spread of HPS, the ministers of health of all countries in the Americas joined in a resolution to intensify the surveillance of, and fight against, hantavirus infection during the Directing Council of the Pan American Health Organization (PAHO) in September 1997.
A total of 350-400 HPS cases have been confirmed in the Americas, most of them in Argentina and the USA. About 45% of the reported cases were fatal. The high fatality rate is associated with the sudden onset of pulmonary oedema and respiratory distress. There is no specific treatment for HPS, although prompt diagnosis is important for appropriate management of respiratory distress.
HPS is caused by several distinct hantaviruses which are each associated with a specific rodent host. Once infected, rodents shed the virus throughout their lifetime. Humans are infected by inhaling aerosols of fresh or dried rodent excreta (faeces, urine and saliva). Investigation of an epidemic in Argentina in 1995 provided strong evidence for person-to-person transmission, not observed in studies in the USA. In any event, strict barrier nursing techniques are now recommended for management of suspected or confirmed cases.
Control measures in endemic areas focus on rodent control with particular emphasis on excluding rodents from buildings and reducing suitable habitats around inhabited dwellings. Many infections have resulted from cleaning rodent-infested areas. The use of readily available disinfectants such as chlorine bleach is recommended to decontaminate potentially infectious droppings and debris prior to cleaning. If available, respiratory protection should be used during this high risk activity.
Improved laboratory diagnostic capacity in endemic areas is important for prompt recognition of HPS cases. Furthermore, identification of the rodent reservoir of each hantavirus is important to detect potential HPS endemic regions and to understand the risk of rodent-human interaction.
(For further information on HPS see web pages at PAHO - http://www.paho.org/english/DPI/rl970925.htm and the US Center for Disease Control and Prevention at http://www.cdc.gov/ncidod/diseases/hanta/hantvrus.htm )


Welcome to the UI-Components Demo
Use the menu above to navigate.
Use the Log Comps
button to dump the current component-structure to the browsers console.
Use the Log Scopes
button to dump the current scope- and component-structure to the browsers console.
View Readme or Sourcecode


| tidyr_legacy {tidyr} | R Documentation |
Ensures all column names are unique using the approach found in
tidyr 0.8.3 and earlier. Only use this function if you want to preserve
the naming strategy, otherwise you're better off adopting the new
tidyverse standard with name_repair = "universal"
tidyr_legacy(nms, prefix = "V", sep = "")
prefix |
prefix Prefix to use for unnamed column |
sep |
Separator to use between name and unique suffix |
nm |
Character vector of names |
df <- tibble(x = 1:2, y = list(tibble(x = 3:5), tibble(x = 4:7))) # Doesn't work because it would produce a data frame with two # columns called x ## Not run: unnest(df, y) # The new tidyverse standard: unnest(df, y, names_repair = "universal") # The old tidyr approach unnest(df, y, names_repair = tidyr_legacy)


Large Chess Variants
Created c. 2017 while high on wisdom-teeth-removal-induced painkillers. Somewhat of a meme at this point.
Brobdingnagian Chess
Like Baxany, but bigger, and worse. Currently (a.o 8/22/2020) in development. Filled with all the jank Baxany never had. Like time travel!


{% extends "base.html" %} {% block title %}Change Password{% endblock %} {% block content %}
This password will be used for all GeekSoc services. Please choose something secure.


More than just shorter links
Build your brand’s recognition and get detailed insights on how your links are performing.
Build your brand’s recognition and get detailed insights on how your links are performing.
Track how your links are performing across the web with our advanced statistics dashboard.
Boost your brand recognition with each click. Generic links don’t mean a thing. Branded links help instil confidence in your content.
Gain insights into who is clicking your links. Knowing when and where people engage with your content helps inform better decisions.
Improve brand awareness and content discoverability through customizable links, supercharging audience engagement.


{% assign essay_pages = site.pages | where: "type", "essay" | where_exp: "page", "page.draft != true" %} {% assign project_pages = site.pages | where: "type", "project" | where_exp: "page", "page.draft != true" %} {% assign num_essays = essay_pages.size %} {% assign num_projects = project_pages.size %}
"For eternally and always there is only now, one and the same now, the present is the only thing that has no end." -Alan Watts
"Life isn't about finding your passion. It's about having an adventure." -Unnamed Quora user
"Happiness is not a destination. It's a way of life." -Unnamed Quora user
"Let your smile change the world. Don't let the world change your smile."  One time when you stop breathing and a second time, a little bit later on, when somebody says your name for the last time." -Banksy


Try out our Premium Member services: Virtual Legal Assistant, Query Alert Service and an ad-free experience. Free for one month and pay only if you like it.
1 IN THE HIGH COURT OF KARNATAKA AT BANGALORE DATED THIS THE 06TH DAY OF NOVEMBER, 2013 BEFORE THE HON'BLE MR.JUSTICE H.N.NAGAMOHAN DAS CRIMINAL PETITION NO.6472/2013 BETWEEN: 1. SRI S.SRIDHAR, CHAIRMAN, BANK OFFICERS COOPERATIVE HOUSING SOCIETY LTD., FLAT NO.GF-006, ACHARYA SANKEERNA, AICOBOONAGAR, 9TH MAIN, 2ND CROSS, BTM 2ND STAGE, BANGALORE-560 076. 2. SRI KISHOR KUMAR.P., SECRETARY, BANK OFFICERS COOPERATIVE HOUSING SOCIETY LTD., FLAT NO.GF-006, ACHARYA SANKEERNA, AICOBOONAGAR, 9TH MAIN, 2ND CROSS, BTM 2ND STAGE, BANGALORE-560 076. ... PETITIONERS (BY SRI V.B.SHIVAKUMAR, ADVOCATE) 2 AND: THE KARNATAKA STATE POLLUTION CONTROL BOARD, REGIONAL OFFICE, BANGALORE NORTH, 9TH FLOOR, PUBLIC UTILITY BUILDING, M.G.ROAD, BAGNALORE-560 001, REPRESENTED BY ITS REGIONAL OFFICER SRI D.R.KUMARASWAMY. ... RESPONDENT THIS CRL.P IS FILED U/S.482 CR.P.C PRAYING TO QUASH THE ENTIRE PROCEEDINGS IN C.C.NO.667/2005 ON THE FILE OF THE C.J. (JR.DN.) AND J.M.F.C., NELAMANGALA. THIS CRIMINAL PETITION COMING ON FOR ADMISSION THIS DAY, THE COURT MADE THE FOLLOWING: ORDER
The respondent filed a private complaint against the petitioners in C.C.No.667/2005 for the offence punishable under Section 49 of Water (Prevention and Control of Pollution) Act, 1974.
2. Before the Trial Court, the petitioners entered appearance and filed an application under Section 245 of 3 Cr.P.C for discharge. Even after several years, the Trial Court has not considered the application. Therefore, the petitioners are before this Court.
3. In the circumstances, the Trial Court is directed to consider the application filed by the petitioners on 28.05.2008 under Section 245 of Cr.P.C if the same is not yet considered as expeditiously as possible and in any event not later than six weeks for the date of receipt of copy of this order.
Accordingly, the petition is hereby disposed of.
Sd/-
JUDGE VM


this is the special keyword which can be used to represent current object or instance of the class.
This keyword contain the current class object address.
It can also be used to differentiate between the instance variable and local variable.
Important point about this keyword in Java
The following are few important point related to "this" keyword in Java:
1). this keyword represent current instance of class.
2). this keyword can be used to call overload constructor in java. If used it must be the 1st statement in constructor. this() can call one argument constuctor with approriate parameter. here is an example of using this() for constructor chaining:
3). If member variable and local variable name conflict than this can be used to refer member variable. Here is an example of this with member variable:
Here local variable interest and member variable interest conflict which is easily resolve by referring member variable as this.interest
4).this is a final variable in Java and you can not assign value to this. this will result in compilation error:
5) We can call the method of the same class using this keyword.
6). this can be used to return object. this is a valid return value. here is an example of using as return value.
7). this can be used to refer to static member in Java as well but it is discouraged to do so. As per the best practices it should be used to refer to the non-static member of the class.
8). this can also be passed as method parameter since it represent current object of class.


Train Station Information
Your Current Date & Time is:
Current Train Schedule
Train Name
Destination
Frequency (min)
Next Arrival
Minutes Away
Add Train
Train Name
Destination
First Train Time (military time HH:mm)
Frequency (minutes)
Submit


I am a Ph.D. student in computer science at Stanford University, advised by Professor Maneesh Agrawala. My research interests lie at the intersection of HCI, computer graphics, and AI. In particular, I'm interested in designing new content creation tools to bridge gaps in human perception and attention. In my Ph.D. dissertation, I explore new techniques to manipulate visual media. In 2015, I received a B.Sc. in Electrical Engineering and Computer Sciences from UC Berkeley, where I pursued research in geometric modeling with Professor Carlo H. Séquin. Currently, I am funded by the Stanford Institute for Human-Centered AI (HAI).