We helped Northern Credit Union develop a unique
brand that was tailored for life in 'Northern' Ontario
communities. We're equally proud of the online
community we created called Northern Purse Strings.
This financial literacy online community attracted
about 1,000 participants in trial and demonstrated the
power of genuine digital engagement.


{% load i18n %}
{% blocktrans %}We use cookies to give you the best online experience. By using our website you agree to our use of cookies in accordance with our cookie policy.{% endblocktrans %}


CMake is a Makefile generator. CMake will scan your source code and, based on some predefined rules,
generate Make
scripts. Using CMake is a two-step process: first generate the Makefiles,
then compile your code by invoking Make
on the Makefiles. CMake documentation can be
found on cmake.org
Make is a much older tool that will, at its core, incrementally compile your code. This simply means that
if you have a project with two files (cat.c
and dog.c
), and a change is made to
cat.c
, then only cat.c
will be re-compiled. Lots of different flavors of Make have been
developed over the years including GNU, MinGW, Ninja, and more - but we will focus on GNU since that is what ships
with the Windows version of PropGCC and comes with most Linux operating systems. GNU's Make documentation can be
found on gnu.org.
Two command line instructions are all you need to get started:
cmake -G "Unix Makefiles" <source directory>
make
Breakdown:
cmake -G "Unix Makefiles" <source directory>
: Here we perform the
first
step - generating the Makefiles. CMake will scan your source directory, read your source files
to
discover dependencies (like header files), and create one or more files named “Makefile”.
The first argument, -G "Unix Makefiles"
, tells CMake exactly what flavor
of
Make we're using. As reasoned in the What is Make?
section above, we will always be
using Unix Makefiles
for PropWare projects.
The second argument is the source directory of your project. This directory must contain a
CMakeLists.txt
file to be defined as a CMake project. I prefer to run “out of source” builds -
which means I create a new folder within my project where all of my generated and compiled files will end up.
Generally, I name this folder bin
, but you may see it also referred to as build
.
With this simple case, the complete command to generate the Makefiles would be cmake -G "Unix
Makefiles" ..
. The ..
is a cross-platform way of saying “the directory above me”. For
reference: .
refers to the current directory.
make
: Make is old, flexible, and great. CMake has done all the work though and no
extra arguments are needed for this command. After successfully running CMake, simply type make
- character for character. When it completes successfully, your project will have been compiled into its
binary format, ready to be programmed to your Propeller. %PropWare provides some extra “targets” to make your
life even easier though. Try typing make debug
to write your program to RAM and open a terminal
(like Parallax's PST) or make run
to write your program to EEPROM.
This file should reside at the root of our project and contains a technical description of your project. The rules for compiling your program are provided via this file. The file must be named “CMakeLists.txt” - character for character, including capitalization. This file marks the project and being managed by CMake. The contents of the file are reasonably straight-forward, and examples can be found here.
CMake keeps track of your settings in this file and, at rare times, you might change a setting without CMake
taking notice. When this happens, delete the CMakeCache.txt
file and rerun your CMake command (as
given above). As a bonus to using the out-of-source build technique you can also just delete your entire build
directory and start over - then you know with 100% confidence that no leftover settings will linger around to
haunt you.
Curses is a library that provides a psuedo-graphical user interface at the command line. Curses CMake (or
ccmake) allows you to easily configure some options for your project before compiling it. Try running
ccmake -G "Unix Makefiles <source directory>
next time and take a look.
A make “target” is a set of commands that you would like Make to execute for you. If you run Make with no
arguments, a default target of “all” is chosen for you. Generally, the all
target will
compile your code. On the rare off-chance that you made some changes to your code and Make hasn't picked
them up (and therefore is not recompiling them), giving Make the “clean” target will delete all compiled
objects and let you start over (make clean
). You can remove old files and recompile new
ones
in a single step with make clean all
(order matters).
PropWare provides numerous extra targets for your convenience, most of which are undocumented at this time. The two most common targets are:
debug
target will compile your code, write it to your Propeller's HUB RAM and then
start a serial terminal to aid in debugging your application. When you are finished, press the escape key and
you will be returned to your normal command prompt.
run
target will compile your code and load it into your Propeller's EEPROM.After generating your Makefiles, try adding VERBOSE=1
to your Make command. This will force Make
to echo each command to the terminal before running it - rather than printing only a short summary of
what is being done. The output is very verbose and can be cumbersome to read - but it is invaluable when
determining what went wrong with your compilation. Full command: make VERBOSE=1


The Elephant Shrew is not actually a shrew at all, It shares closer DNA matches with elephants, aardvarks, and hyraxes.
All are four-legged with mouse-like tails, and rather long legs for their size which are used to hop and jump about like rabbits.


PBoC cuts lending benchmark slightly, as expected
China’s central bank cut its new benchmark lending rate on Wednesday for the third time since its debut in August, as widely expected, Reuters reports.
The one-year loan prime rate (LPR) was lowered by five basis points to 4.15 percent from 4.20 percent at the previous monthly fixing. The five-year LPR was also lowered by the same margin to 4.80 percent from 4.85 percent.
All 64 respondents in a Reuters snap survey on Tuesday expected a reduction in the one-year LPR. Thirty-seven respondents also expected another cut in the five-year LPR.
The LPR is a lending reference rate set monthly by 18 banks. The People’s Bank of China revamped the mechanism to price LPR in August, loosely pegging it to the medium-term lending facility rate.
– Contact us at<EMAIL_ADDRESS>CG


This is the port of the capital Seoul.
The port is very busy and port control should be contacted on VHF Channel 16 for instructions where to berth for clearance.
Inchon experiences an extreme tidal range. When the tide is out, most vessels are layed up on the mud. This is fine for flat bottomed fishing boats, but not for yachts.
A large marina close to Inchon is Jungok Marina at Hwasung city. It is one hour distance by car from Seou and 40 minutes from Inchun airport.
This 300 yacht capacity marina has a 20 ton crane, fuel and marina club house with restaurants. Good professional repair services.
A new marina - Wangsan Marina - is due to open in May near to Inchun port.
Last updated March 2016.


if
, while
or for
statement with an ==
condition which compares the variable with a constant. In such
a case the use
of a variable which is known to be constant can be replaced with the actual constant.
Example:
private static void foo(double number) { if (number == 1.0) { f(number); } } private static void f(double number) {}
After the quick-fix is applied:
private static void foo(double number) { if (number == 1.0) { f(1.0); } } private static void f(double number) {}


Rank based on Municipal Gap, from 1 (largest surplus) to 169 (largest deficit).
ENGL AAGR — positive trends greater than 1%; neutral trends less than 1% and greater than -1%; negative trends less than -1%; Source: CTData
Municipal Gap — FY 2007-2011 average, 2012 Dollars per capita Source: NEPPC report.


A
collection — sometimes called a container — is simply
an object that groups multiple elements into a single unit. Collections
are used to store, retrieve, manipulate, and communicate aggregate data.
Typically, they represent data items that form a natural group, such as
a poker hand (a collection of cards), a mail folder (a collection of
letters), or a telephone directory (a mapping of names to phone
numbers).
If you've used the Java programming language — or just about any
other programming language — you're already familiar with
collections. Collection implementations in earlier (pre-1.2) versions
of the Java platform included Vector
,
Hashtable
, and array
. However, those earlier versions did not contain a collections framework.
What Is a Collections Framework?
A
collections framework is a unified architecture for representing and manipulating collections. All collections frameworks contain the following:
- Interfaces: These are abstract data types that represent collections. Interfaces allow collections to be manipulated independently of the details of their representation. In object-oriented languages, interfaces generally form a hierarchy.
- Implementations: These are the concrete implementations of the collection interfaces. In essence, they are reusable data structures.
- Algorithms: These are the methods that perform useful computations, such as searching and sorting, on objects that implement collection interfaces. The algorithms are said to be polymorphic: that is, the same method can be used on many different implementations of the appropriate collection interface. In essence, algorithms are reusable functionality.
Apart from the Java Collections Framework, the best-known examples of collections frameworks are
the C++ Standard Template Library (STL) and Smalltalk's collection hierarchy. Historically, collections
frameworks have been quite complex, which gave them a reputation for having a steep learning curve.
We believe that the Java Collections Framework breaks with this tradition, as you will learn for yourself in this chapter.
Benefits of the Java Collections Framework
The Java Collections Framework provides the following benefits:
- Reduces programming effort: By providing useful data
structures and algorithms, the Collections Framework frees you to
concentrate on the important parts of your program rather than on the
low-level "plumbing" required to make it work. By facilitating
interoperability among unrelated APIs, the Java Collections
Framework frees you from writing adapter objects or conversion code to connect
APIs.
- Increases program speed and quality: This Collections Framework
provides high-performance, high-quality implementations of useful data
structures and algorithms. The various implementations of each interface
are interchangeable, so programs can be easily tuned by switching collection
implementations. Because you're freed from the drudgery of writing your own
data structures, you'll have more time to devote to improving programs'
quality and performance.
- Allows interoperability among unrelated APIs: The collection interfaces
are the vernacular by which APIs pass collections back and forth. If my network
administration API furnishes a collection of node names and if your GUI toolkit
expects a collection of column headings, our APIs will interoperate seamlessly,
even though they were written independently.
- Reduces effort to learn and to use new APIs: Many APIs naturally take
collections on input and furnish them as output. In the past, each such API had a
small sub-API devoted to manipulating its collections. There was little
consistency among these ad hoc collections sub-APIs, so you had to learn each
one from scratch, and it was easy to make mistakes when using them. With the
advent of standard collection interfaces, the problem went away.
- Reduces effort to design new APIs: This is the flip side of the
previous advantage. Designers and implementers don't have to reinvent the
wheel each time they create an API that relies on collections;
instead, they can use standard collection interfaces.
- Fosters software reuse: New data structures that conform to the
standard collection interfaces are by nature reusable. The same goes for
new algorithms that operate on objects that implement these interfaces.


{%- include snippets/page-title.html -%} {{ __return }} {%- include article-info.html -%} {{ content }}


Enter each the given word within 3 seconds:
To play again, just enter the current word. Your score will be reset


Grandma Got Run Over By A
Grandma got run over by a Walking home from Christmas eve You can say there's no such thing as But as for me and Grandpa, we believe She'd been drinkin' too much And we'd begged her not to go But she'd left her So she -ed out the door into the snow When they found her Christmas mornin' At the scene of the attack There were prints on her And incriminatin' marks on her back Grandma got run over by a in home from our house Christmas eve You can say there's no such thing as But as for me and Grandpa, we believe Now were all so proud of Grandpa He's been takin' this so well See him in there -ing Drinkin' and -ing cards with cousin It's not Christmas without All the family's dressed in black And we just can't help but Should we open up her gifts or send them back? Grandma got run over by a Walkin' home from our house Christmas eve You can say there's no such thing as But as for me and Grandpa, we believe Now the is on the And the pudding made of And a and candle That would just have matched the in Grandma's .


List of Blink components
Instructions
Use the input below to narrow the list by relevant keywords.
Click a component name to generate (or add it to) the
wf_blink_components
metadata tag for /web content.
Clicking the snippet will copy it to the clipboard. Include it in the metadata section of your article.


1
Select Device
= 1">
3
Set Day in Week
endTime" [placeholder]="'Select Day'" [data]="dropdownList" [(ngModel)]="selectedItems" [settings]="dropdownSettings" (onSelect)="onItemSelect($event)" (onSelectAll)="onSelectAll($event)">
= 1" [class.step-done]="selectedItems.length >= 1">
4
Finish


Authors: Ira Kohlberg
Source: FERMAT, Volume 5, Article 3, Sep-Oct., 2014
Abstract: We derive a system of propagation equations in a Double Negative (DN) material in a way that appears to differ from previous derivations— although the end result is the same. Our derivation assumes the Poynting vector theorem applies, real materials always have some loss, () and () are obtained from real materials, and wave energy traveling in a specified direction must always be accompanied by a loss of energy in that direction. Additional mathematics beyond Maxwell’s equation is not required. Energy losses per unit length of travel are finite, and can be extremely small. Propagation in a lossless DN media is found as the mathematical limiting solution of an extremely small energy loss per unit length. When developed along these principles, the equations developed for designing leaky antennas are straightforward.
Index Terms: Double Negative material, Poynting vector theorem, Meta materials.
View PDF
Classical Method for Deriving the Electromagnetic Propagation Equations for Double Negative Materials with Application for Antenna Design


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/New.20versions.20of.20Presburger.20tactics.html ---
This project has been neglected for a long time, so I decided to tidy it up a bit. The new versions are available at https://github.com/skbaek/qe/. The main changes are :
1. Now there are tactics for nat
, although they are slower than int
equivalents due to quantifiers added during translation
2. There are versions that use znum
instead of int
in the shadow syntax for optimization
3. Makes more use of typeclasses
4. Also includes a tactic for DLO without endpoints for rat
5. The leanpkg.toml
file is fixed, so you can install it using leanpkg
The main tactics are in the main.lean
files of each directory. You can see the tests.lean
files for examples of how they are used. As you might expect, znum
is more efficient when handling large numbers, so there are examples which time out for int
-based tactics but works with znum
.
3 and 4 were done just to show that the shared-framework approach is viable. The idea (from Tobias Nipkow) is that QE-based FoL decision procedures mostly follow the same scheme, so the common part should be factored out using some module or typeclass system. Once this work is done, it is easy to cook up more decision procedures, since all you need to do is define (and prove soundness for) a single quantifier elimination step.
Thanks! Could you include a glossary of what all those acronyms mean? Maybe in a README.md?
What are all those commented out lines in the test files? Things that should work but don't?
For the purpose of using tests as documentation, it would probably be more efficient to move those test files somewhere more visible
Thanks! Could you include a glossary of what all those acronyms mean? Maybe in a README.md?
Yes, I should either do that, or actually give intelligible names to definitions, which I was too lazy to type out when doing the proofs.
The commented out lines are either theorems which currently time out, or nontheorems which would be useful for testing the soundness of unverified vm-versions of the tactics (which currently don't exist, but are easy to implement if necessary).
Do you mean that it would be useful to add some introductory information about the tactics for users, and include tests as part of it? So far I've been using the tests just to check that it works, but I guess you're right that this would be more helpful as documentation.
Maybe call them "examples" instead of "tests," if they're being used as documentation. But yeah, this would be super helpful!
How much of mathlib does this depend on?
This looks great, by the way, I'm excited to try it out.
It depends mainly on the int
and nat
libraries, along with some inequality stuff from algebraic libraries. At one point I needed some gcd lemmas not included in the master branch, so the current .toml file is tweaked to get 3.4.1 instead. But when I look for it now I can't pinpoint that incompatibility, so perhaps it works with master now.
Thanks!
Very interesting.
@Seul Baek , when trying to compile this I get some errors:
$leanpkg build configuring qe 0.1 test: unrecognized option: -d mathlib: cloning https://github.com/leanprover/mathlib to _target/deps/mathlib > mkdir -p _target/deps/mathlib > git clone https://github.com/leanprover/mathlib _target/deps/mathlib Cloning into '_target/deps/mathlib'... remote: Enumerating objects: 8, done. remote: Counting objects: 100% (8/8), done. remote: Compressing objects: 100% (7/7), done. remote: Total 8217 (delta 1), reused 1 (delta 1), pack-reused 8209 Receiving objects: 100% (8217/8217), 5.24 MiB | 1.50 MiB/s, done. Resolving deltas: 100% (5901/5901), done. > git checkout --detach dbb3ff0b5b2e42aa71d8167d7efdb3aa12d6e483 # in directory _target/deps/mathlib HEAD is now at dbb3ff0 feat(data/zmod/quadratic_reciprocity): quadratic reciprocity (#327) > lean --make src /home/grosser/Projects/qe/src/dnf/bak/qe.lean:1:0: error: file 'basic' not found in the LEAN_PATH /home/grosser/Projects/qe/src/dnf/bak/qe.lean:1:0: error: file 'tauto' not found in the LEAN_PATH /home/grosser/Projects/qe/src/dnf/bak/qe.lean:1:0: error: file 'list' not found in the LEAN_PATH /home/grosser/Projects/qe/src/dnf/bak/qe_eq.lean:1:0: error: file 'axms' not found in the LEAN_PATH /home/grosser/Projects/qe/src/dnf/main.lean:1:0: error: file 'dp' not found in the LEAN_PATH /home/grosser/Projects/qe/src/dnf/main.lean:1:0: error: file 'pfrm' not found in the LEAN_PATH /home/grosser/Projects/qe/src/dnf/main.lean:1:0: error: file 'reify' not found in the LEAN_PATH /home/grosser/Projects/qe/src/lia/int_atm/dot_prod.lean:1:0: error: file 'list' not found in the LEAN_PATH /home/grosser/Projects/qe/src/dnf/bak/qe.lean:1:0: error: invalid import: basic could not resolve import: basic /home/grosser/Projects/qe/src/dnf/bak/qe.lean:1:0: error: invalid import: tauto could not resolve import: tauto /home/grosser/Projects/qe/src/dnf/bak/qe.lean:1:0: error: invalid import: list could not resolve import: list /home/grosser/Projects/qe/src/dnf/main.lean:1:0: error: invalid import: dp could not resolve import: dp /home/grosser/Projects/qe/src/dnf/main.lean:1:0: error: invalid import: pfrm could not resolve import: pfrm /home/grosser/Projects/qe/src/dnf/main.lean:1:0: error: invalid import: reify could not resolve import: reify /home/grosser/Projects/qe/src/lia/int_atm/dot_prod.lean:1:0: error: invalid import: list could not resolve import: list
Oops, I forgot to push the commit in which I deleted older versions of files. I think it should work now.
I also needed:
diff --git a/src/list.lean b/src/list.lean index 6af0ace..369287c 100644 --- a/src/list.lean +++ b/src/list.lean @@ -248,3 +248,5 @@ begin intro heq, constructor; intros h a ha, rw ← heq, apply h _ ha, rw heq, apply h _ ha, end + +end list
Nice. Some expressions already work nicely.
Others time out quite a bit.
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


Introduction
Video source data may be used in order to provide details of the video content source. In general, such characteristics of video are logically independent of the compression format. In the context of DASH they are typically used in order to select a proper Adaptation Set. This section focuses on source format description.
In the context of DASH as specific source descriptor exists, namely FramePacking used to identify the frame-packing configuration scheme employed. The details are provided below.
In addition, source data properties may be expressed by one of the following two descriptor elements:
EssentialProperty: In this case the Media Presentation author expresses that the successful processing of the descriptor is essential to properly use the information in the parent element that contains this descriptor.
SupplementalProperty: In this case the Media Presentation author expresses that the descriptor contains supplemental information that may be used by the DASH client for optimized processing.
A multitude of source properties may be expressed using these generic descriptors, some of them using the definition in ISO/IEC 23001-8 [4]. These are listed below.
Finally, MPEG-DASH also allows to add source content descriptors to the Role descriptor. For details see below.
Frame Packing
For the element FramePacking the @schemeIdUri attribute is used to identify the frame-packing configuration scheme employed.
The following defines a set of URIs that identify specific frame-packing arrangements, i.e. schemes contained in the FramePacking element:
| Identifier | Reference | Section | Comment |
|---|---|---|---|
urn:mpeg:dash:14496:10:frame_packing_arrangement_type:2011 |
ISO/IEC 23009-1 | section <IP_ADDRESS> | For Adaptation Sets or Representations that contain a video component that conforms to ISO/IEC 14496-10, this URI is defined. The @value is the value as defined for VideoFramePackingType in ISO/IEC 23001-8 [4]. |
urn:mpeg:dash:13818:1:stereo_video_format_type:2011 |
ISO/IEC 23009-1 | section <IP_ADDRESS> | For Adaptation Sets or Representations that contain a video component that conforms to ISO/IEC 13818-1, this URI is defined. The @value is the value as defined for VideoFramePackingType in ISO/IEC 23001-8 [4]. |
Generic Video Source Descriptors
The following defines a set of URIs that identify video source descriptions to be used with the Essential Property and/or the Supplemental Property descriptor:
| Identifier | Reference | Section | Comment |
|---|---|---|---|
urn:mpeg:mpegB:cicp:ColourPrimaries |
ISO/IEC 23001-8 | section 7.1 | Video colour primaries indicating the chromaticity coordinates of the source colour primaries. |
urn:mpeg:mpegB:cicp:TransferCharacteristics |
ISO/IEC 23001-8 | section 7.2 | Video colour transfer characteristics indicating the opto-electronic transfer characteristic of the source picture. |
urn:mpeg:mpegB:cicp:MatrixCoefficients |
ISO/IEC 23001-8 | section 7.3 | Video matrix colour coefficients describing the matrix coefficients used in deriving luma and chroma signals from the green, blue, and red primaries. |
urn:mpeg:mpegB:cicp:VideoFullRangeFlag |
ISO/IEC 23001-8 | section 7.3 | Video Full Range specifying the scaling and offset values applied in association with the Video matrix colour coefficients. |
urn:mpeg:mpegB:cicp:VideoFramePackingType |
ISO/IEC 23001-8 | section 7.4 | Video frame packing indicating the type of packing arrangement used in video frames |
urn:mpeg:mpegB:cicp:QuincunxSamplingFlag |
ISO/IEC 23001-8 | section 7.4 | Quincunx Sampling Flag indicatomh whether a quincunx sampling structure is used in the frame packed video representation. |
urn:mpeg:mpegB:cicp:PackedContentInterpretationType |
ISO/IEC 23001-8 | section 7.5 | Interpretation of packed video frames indicating the intended interpretation of the constituent frames. |
urn:mpeg:dash:14496:10:frame_packing_arrangement_type:2011 |
ISO/IEC 23009-1 | section <IP_ADDRESS> | For Adaptation Sets or Representations that contain a video component that conforms to ISO/IEC 14496-10, this URI is defined. The @value is the value as defined for VideoFramePackingType in ISO/IEC 23001-8 [4]. |
urn:mpeg:dash:13818:1:stereo_video_format_type:2011 |
ISO/IEC 23009-1 | section <IP_ADDRESS> | For Adaptation Sets or Representations that contain a video component that conforms to ISO/IEC 13818-1, this URI is defined. The @value is the value as defined for VideoFramePackingType in ISO/IEC 23001-8 [4]. |
Video Source Description in Role Element
Scheme may also be used with the Role descriptor. The following defines a set of URIs that may be used with the Role element:
| Identifier | Reference | Section | Comment |
|---|---|---|---|
urn:mpeg:dash:stereoid:2011 |
ISO/IEC 23009-1 | section <IP_ADDRESS> | If N views are available that can be combined into M valid stereo pairs, the Role@schemeIdURI equal to this identifier signals which views form a stereo pair and which one is the left view and which one is the right view of each stereo pair. The @value of the Role element contains a space-delimited list of view indicators ‘li‘ or ‘rj’ where i, j are non-negative decimal integers. |


Congratulations! Your free hosting account has been activated.
Replace this index.htm file with your website using FTP or the file manager.


This application shows the final result for finding the shortest path between two points for a convex or non-convex robot avoiding collision with obstacles. The visibility graph is shown in red, the robot polygon in yellow, the C-Obstacles in blue, and the obstacles in white.


--- permalink: /site-map/ layout: default title: Strapless CSS Site Map description: This is a list of all the pages on the Strapless CSS website. exclude: true ---


class SmtpRequestHandler
extends java.lang.Thread
| Modifier and Type | Field and Description |
|---|---|
private java.net.Socket |
client |
private static int |
DATA |
private static boolean |
DEBUG |
private java.lang.String |
directory |
private java.lang.String |
domain |
private static int |
HELO |
private java.io.BufferedReader |
input |
private static int |
MAIL |
private java.lang.String |
messageText |
private java.io.DataOutputStream |
output |
private boolean |
quit |
private static int |
RCPT |
private java.lang.String |
recipients |
private int |
requiredCmd |
private java.lang.String |
serverName |
| Constructor and Description |
|---|
SmtpRequestHandler(java.net.Socket req,
java.lang.String dom,
java.lang.String dir)
Purpose: The SmtpRequestHandler constructor initializes the
thread for this handler.
|
| Modifier and Type | Method and Description |
|---|---|
private void |
handleCommand()
Purpose: The handleCommand method is intended to identify
the command type and send it to the appropriate
command parse method.
|
private boolean |
heloDone()
Purpose: The heloDone method will be used during command
parsing to ensure that a HELO command has been
received prior to executing message commands.
|
private void |
parseData(java.lang.String[] params)
Purpose: This method is designed to parse a DATA command
sent by the client.
|
private void |
parseHelo(java.lang.String[] params)
Purpose: This method is designed to parse a HELO command
sent by the client.
|
private void |
parseMail(java.lang.String[] params)
Purpose: This method is designed to parse a MAIL command
sent by the client.
|
private void |
parseRcpt(java.lang.String[] params)
Purpose: This method is designed to parse a RCPT command
sent by the client.
|
private void |
resetMsg()
Purpose: Resetting the message whether by a RSET command,
or by reaching the end of message transmission
should be handled in the same way.
|
void |
run()
Purpose: The run() method is required to execute a process
thread.
|
private void |
saveMsgData()
Purpose: The saveMsgData method is intended to save the
sent message to the recipient(s) data-file(s)
|
private void |
sendResponse(int code,
java.lang.String message)
Purpose: The sendResponse method will format the response
to the client based on the provided status code
and message text.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
private java.lang.String messageText
private java.lang.String domain
private java.lang.String directory
private java.lang.String recipients
private java.lang.String serverName
private java.net.Socket client
private boolean quit
private static boolean DEBUG
private java.io.BufferedReader input
private java.io.DataOutputStream output
private int requiredCmd
private static int HELO
private static int MAIL
private static int RCPT
private static int DATA
SmtpRequestHandler(java.net.Socket req, java.lang.String dom, java.lang.String dir)
req
- The socket which has been assigned to this
incoming request must be passed in.dom
- The acceptable destination domain namedir
- The directory where accepted messages must be
stored.nothing
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
nothing
private void handleCommand()
parseHelo, parseMail, parseRcpt, parseData, parseQuit,
parseRset, parseNoop
private boolean heloDone()
parseHelo
private void parseHelo(java.lang.String[] params)
nothing
private void parseMail(java.lang.String[] params)
nothing
private void parseRcpt(java.lang.String[] params)
nothing
private void parseData(java.lang.String[] params)
saveMsgData
private void saveMsgData()
nothing
private void sendResponse(int code, java.lang.String message)
code
- Status code to indicate whether the operation
was a success.message
- Human readable message describing the status
Preconditions:
nonenothing
private void resetMsg()
nothing


if @canUpdate()
if !@updateCount? then @updateCount = 0
@updateCount++
@super()
assert.equal(4, this.v1.x, 'View one should have an x of 4.');
assert.equal(15, this.v2.x, 'View two should have an x of 15.');
assert.equal(36, this.v3.x, 'View three should have an x of 36.');
assert.equal(67, this.v4.x, 'View four should have an x of 67.');
assert.equal(108, this.v5.x, 'View five should have an x of 108.');
assert.equal(3, this.v1.y, 'View one should have a y of 3.');
assert.equal(8, this.v2.y, 'View two should have a y of 8.');
assert.equal(13, this.v3.y, 'View three should have a y of 13.');
assert.equal(18, this.v4.y, 'View four should have a y of 18.');
assert.equal(23, this.v5.y, 'View five should have a y of 23.');
assert.closeTo(9.18, this.v1.x, 0.1, 'View one should have an x of 9.18.');
assert.closeTo(40.35, this.v2.x, 0.1, 'View two should have an x of 40.35.');
assert.closeTo(91.36, this.v3.x, 0.1, 'View three should have an x of 91.36.');
assert.closeTo(122.36, this.v4.x, 0.1, 'View four should have an x of 122.36.');
assert.closeTo(163.36, this.v5.x, 0.1, 'View five should have an x of 163.36.');
assert.closeTo(230.36, this.width, 0.1, 'This view should have a width of 230.36.');
assert.equal(4, this.v1.x);
assert.equal(19, this.v2.x);
assert.equal(24, this.v3.x);
assert.equal(39, this.v4.x);
assert.equal(54, this.v5.x);
assert.equal(4, this.v1.y);
assert.equal(19, this.v2.y);
assert.equal(29, this.v3.y);
assert.equal(40, this.v4.y);
assert.equal(51, this.v5.y);
assert.equal(68, this.innerwidth);
assert.equal(65, this.innerheight);
// Update a hint
this.v5.setAttribute('layouthint', '{"spacingbefore":0}');
assert.equal(49, this.v5.x);
assert.equal(50, this.v5.y);
assert.equal(63, this.innerwidth);
assert.equal(64, this.innerheight);
// Update to an invalid value
this.v5.setAttribute('layouthint', '{"*/spacingbefore":"bad"}');
assert.equal(50, this.v5.x);
assert.equal(51, this.v5.y);
assert.equal(64, this.innerwidth);
assert.equal(65, this.innerheight);
var container = this.container,
layoutX = container.layoutX,
layoutY = container.layoutY,
v1 = container.v1,
v2 = container.v2,
v3 = container.v3,
v4 = container.v4,
v5 = container.v5;
// Verify updateparent works
assert.equal(150 + 4 + 7 + 14, container.width, 'Container should have a width of 175.');
assert.equal(50 - 20 + 7 + 14, container.height, 'Container should have a width of 51.');
// Verify all views are positioned correctly
assert.equal(4, v1.x, 'View one should have an x of 4.');
assert.equal(15, v2.x, 'View two should have an x of 15.');
assert.equal(36, v3.x, 'View three should have an x of 36.');
assert.equal(67, v4.x, 'View four should have an x of 67.');
assert.equal(108, v5.x, 'View five should have an x of 108.');
assert.equal(3, v1.y, 'View one should have a y of 3.');
assert.equal(8, v2.y, 'View two should have a y of 8.');
assert.equal(13, v3.y, 'View three should have a y of 13.');
assert.equal(18, v4.y, 'View four should have a y of 18.');
assert.equal(23, v5.y, 'View five should have a y of 23.');
// Change view size
v3.setAttribute('width', 20);
assert.equal(140 + 4 + 7 + 14, container.width, 'Container should have a width of 165.');
assert.equal(4, v1.x, 'View one should have an x of 4.');
assert.equal(15, v2.x, 'View two should have an x of 15.');
assert.equal(36, v3.x, 'View three should have an x of 36.');
assert.equal(57, v4.x, 'View four should have an x of 57.');
assert.equal(98, v5.x, 'View five should have an x of 98.');
// Change inset
layoutX.setAttribute('inset', 3);
assert.equal(140 + 4 + 6 + 14, container.width, 'Container should have a width of 164.');
assert.equal(3, v1.x, 'View one should have an x of 3.');
assert.equal(14, v2.x, 'View two should have an x of 14.');
assert.equal(35, v3.x, 'View three should have an x of 35.');
assert.equal(56, v4.x, 'View four should have an x of 56.');
assert.equal(97, v5.x, 'View five should have an x of 97.');
// Change outset
layoutX.setAttribute('outset', 2);
assert.equal(140 + 4 + 5 + 14, container.width, 'Container should have a width of 163.');
// Change spacing
layoutX.setAttribute('spacing', 2);
assert.equal(140 + 8 + 5 + 14, container.width, 'Container should have a width of 167.');
assert.equal(3, v1.x, 'View one should have an x of 3.');
assert.equal(15, v2.x, 'View two should have an x of 15.');
assert.equal(37, v3.x, 'View three should have an x of 37.');
assert.equal(59, v4.x, 'View four should have an x of 59.');
assert.equal(101, v5.x, 'View five should have an x of 101.');
// Reverse the layout
layoutX.setAttribute('reverse', true);
assert.equal(140 + 8 + 5 + 14, container.width, 'Container should have a width of 167.');
assert.equal(141, v1.x, 'View one should have an x of 141.');
assert.equal(119, v2.x, 'View two should have an x of 119.');
assert.equal(97, v3.x, 'View three should have an x of 97.');
assert.equal(55, v4.x, 'View four should have an x of 55.');
assert.equal(3, v5.x, 'View five should have an x of 3.');
// Hide a view
assert.equal(1, layoutY.updateCount, 'The Y layout should have only been updated 1 time so far.');
v1.setAttribute('visible', false);
assert.equal(2, layoutY.updateCount, 'The Y layout should have only been updated 2 times so far.');
assert.equal(130 + 6 + 5 + 14, container.width, 'Container should have a width of 155.');
assert.equal(40 - 15 + 7 + 14, container.height, 'Container should have a width of 46.');
assert.equal(141, v1.x, 'View one should still have an x of 141 since it is merely not visible.');
assert.equal(119, v2.x, 'View two should have an x of 119.');
assert.equal(97, v3.x, 'View three should have an x of 97.');
assert.equal(55, v4.x, 'View four should have an x of 55.');
assert.equal(3, v5.x, 'View five should have an x of 3.');
assert.equal(3, v1.y, 'View one should still have a y of 3 since it is merely not visible.');
assert.equal(3, v2.y, 'View two should have a y of 3.');
assert.equal(8, v3.y, 'View three should have a y of 8.');
assert.equal(13, v4.y, 'View four should have a y of 13.');
assert.equal(18, v5.y, 'View five should have a y of 18.');
// Resize a view and verify only 1 update occurs
v2.setAttribute('height', 20);
assert.equal(3, layoutY.updateCount, 'The Y layout should have only been updated 3 times so far.');
assert.equal(3, v2.y, 'View two should have a y of 3.');
assert.equal(18, v3.y, 'View three should have a y of 18.');
assert.equal(23, v4.y, 'View four should have a y of 23.');
assert.equal(28, v5.y, 'View five should have a y of 28.');
// Verify transformed children
container = this.container2;
layoutX = container.layoutX;
v1 = container.v1;
v2 = container.v2;
v3 = container.v3;
v4 = container.v4;
v5 = container.v5;
assert.closeTo(9.18, v1.x, 0.1, 'View one should have an x of 9.18.');
assert.closeTo(40.35, v2.x, 0.1, 'View two should have an x of 40.35.');
assert.closeTo(91.36, v3.x, 0.1, 'View three should have an x of 91.36.');
assert.closeTo(122.36, v4.x, 0.1, 'View four should have an x of 122.36.');
assert.closeTo(163.36, v5.x, 0.1, 'View five should have an x of 163.36.');
assert.closeTo(230.36, container.width, 0.1, 'This view should have a width of 230.36.');
// Rotate the last view
v5.setAttribute('rotation', 15);
assert.closeTo(9.18, v1.x, 0.1, 'View one should have an x of 9.18.');
assert.closeTo(40.35, v2.x, 0.1, 'View two should have an x of 40.35.');
assert.closeTo(91.36, v3.x, 0.1, 'View three should have an x of 91.36.');
assert.closeTo(122.36, v4.x, 0.1, 'View four should have an x of 122.36.');
assert.closeTo(163.78, v5.x, 0.1, 'View five should have an x of 163.78.');
assert.closeTo(231.24, container.width, 0.1, 'This view should have a width of 231.24.');


@*
* Copyright 2023 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*@
@import models._
@import config.ApplicationConfig
@import play.twirl.api.HtmlFormat
@import uk.gov.hmrc.govukfrontend.views.html.components._
@import uk.gov.hmrc.govukfrontend.views.html.components.implicits._
@import views.ViewUtils.titleBuilder
@import views.html.helpers._
@import _root_.utils._
@this(newMain: newMain,
govukBackLink : GovukBackLink,
formHelper: FormWithCSRF,
govukButton : GovukButton)
@(id: String,
periodKey: Int,
propertyDetails: PropertyDetailsAddress,
mode: Option[String] = None,
serviceInfoContent: Html = HtmlFormat.empty,
backLink: Option[String])(implicit authContext: StandardAuthRetrievals, messages: Messages, request: Request[AnyContent], appConfig: ApplicationConfig)
@backLinkHtml = {
@if(backLink.isDefined) {
@govukBackLink(BackLink(
href = backLink.get,
content = Text("Back")
))
}
}
@newMain(title = titleBuilder(messages("ated.confirm-address.title")), serviceInfoContent = serviceInfoContent) {
@backLinkHtml
@messages("ated.confirm-address.header")
@messages("ated.confirm-address.editAddress")
@messages("ated.confirm-address.selectDifferentProperty")
@formHelper(action = controllers.propertyDetails.routes.ConfirmAddressController.submit(id, periodKey, mode)) {


About
My name is Cristian molina. I'm a developer.
I wanted to be a programmer since I saw the first games on an Atari 2600. I started hacking with Basic, then C, and later, Java.
I've been working as a developer for 15+ years using several languages like Java and Ruby, mostly for web applications.
In the 2000's I worked mostly with Java, developing web applications at companies in a wide range of industries from media, to communications, transportation, banking and finance. After making the switch to full-time Ruby development in 2010, I'm enjoying learning more about the Ruby and its ecosystem as well as other newer web technologies.
I've worked with Ruby On Rails, Sinatra and Grape and with SQL and NoSQL databases such as MySQL, Postgres, Redis and MongoDB. Also I have expertise with several test frameworks like Minitest, Test::Unit, RSpec, Cucumber, Turnip, Capybara.
I really enjoy developing web apps and API backends using TDD and other XP methodologies to solve people's problems.
A long time Free Software and Linux advocate, I enjoy digging into the deeper technical aspects of programming languages and operating systems.


I have been a student of yoga since 1999, and a student of Iyengar Yoga since 2009. I practice yoga to learn about the condition of my body. I have cerebral palsy, which is a neurological disorder affecting my muscle control and muscle development. Cerebral Palsy causes much isolation - it is not a well known condition, and those that live with the condition often find difficulty in communicating the obstacles that impede an individual's ability to care for one's self.
Yoga, and specifically the practice methodoligies taught by BKS Iyengar, have given me a path to understand and care for my body. The systematic approach to yoga that I have learned through taking classes and workshops taught by Iyengar certified teachers have allowed me to penetrate my body and mind beyond the affects of the CP, and beyond the feelings of isolation that has plagued me all my life. Iyengar Yoga, specifically, has allowed me to develop an intuitive sense of body alignment. Iyengar Yoga gives me a way to balance effort and ease.
This website aims to organize web resources by asana to systemtize learning of each asana. In considering how to group and present the asanas, I am referencing Yoga: The Iyengar Way by Silva, Mira and Shyam Mehta, and the Preliminary Course Study Guide by Geeta Iyengar. And of course, I am referencing Light on Yoga by BKS Iyengar.
The resources compiled for this website come from Youtube, Instagram, blogs, and other web resources. I add these resources to the website as I find them. My intent is that these resources will
I have started this website with poses listed on the Preliminary Course syllabus as outlined by Geeta Iyengar. As time permits, I plan to add more poses and functionality of this site.


You can define custom function to run after certain tab is clicked:
function customfunction(tabnumber) {
if (tabnumber==3) alert('You clicked tab number 3');
}
var tabber1 = new Yetii({
id: 'tab-container-1',
callback: customfunction
});
If needed you can invoke tab showing method like this:
show Tab 3
Click here to show Tab 3
You can nest tab interfaces easily but remember to set different tabclass
for nested interface:
var tabber2 = new Yetii({
id: 'demo-nested',
tabclass: 'tab-nested'
});
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Yetii also contains methods allowing to paginate between tabs using next/previous buttons:
var tabber1 = new Yetii({
id: 'demo'
});
previous |
next
Download yetii.js and include it in your webpage within
section. Alternatively you can put Yetii code inside your common.js
file.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

Prepare the markup:

tab 1

tab 2

tab 1

Lorem Ipsum is simply dummy text
of the printing and typesetting industry.

tab 2

It was popularised in the 1960s with
the release of Letraset sheets.

All tabs should have correct class applied (tab
in above case but this is configurable). Also all tabs should be wrapped with a container with id
specified (tab-container-1
in above case). Unordered list inside a wrapper (which represents tabs buttons) should have an id
constructed in following convention: wrapper-id + '-nav'
(tab-container-1-nav
in above case).
Note that Yetii will apply active
class to selected tab link dynamically:

tab 1

tab 2

By convention Yetii will also apply activeli
class to list item holding selected tab link. All classes set in markup for list items and links are preserved when adding active classes. If you change default active class name from active
to something else (i.e. selected
), list item will be marked with selectedli
class.
Initialize Yetii object:

tab 1

tab 2

tab 1

Lorem Ipsum is simply dummy text
of the printing and typesetting industry.

tab 2

It was popularised in the 1960s with
the release of Letraset sheets.

If you would like to specify initial tab (i.e. second):
var tabber1 = new Yetii({
id: 'tab-container-1',
active: 2
});
If you would like to override default class names:
var tabber1 = new Yetii({
id: 'tab-container-1',
active: 2,
interval: 5,
tabclass: 'mycustomclass',
activeclass: 'mycustomactivetabclass'
});
If you would like to turn on automatic tabs rotation (specify time interval in seconds):
var tabber1 = new Yetii({
id: 'tab-container-1',
active: 2,
interval: 5
});
Rotation stops when user starts interacting with tabs. However if you specify wait
parameter:
var tabber1 = new Yetii({
id: 'tab-container-1',
active: 2,
interval: 5,
wait: 10
});
and user clicks any tab, rotation will continue after the number of seconds defined by wait
parameter.
var tabber1 = new Yetii({
id: 'demo'
});
previous |
next
You can nest tab interfaces easily but remember to set different tabclass
for nested interface:
var tabber1 = new Yetii({
id: 'demo'
});
var tabber2 = new Yetii({
id: 'demo-nested',
tabclass: 'tab-nested'
});
If needed you can invoke tab showing method like this:
show Tab 3
You can define custom function to run after certain tab is clicked:
function customfunction(tabnumber) {
if (tabnumber==3) alert('You clicked tab number 3');
}
var tabber1 = new Yetii({
id: 'tab-container-1',
callback: customfunction
});
You can define custom function to run when user leaves certain tab:
function customfunction(tabnumber) {
if (tabnumber==1) alert('Leaving tab ' + i + ' ...');
}
var tabber1 = new Yetii({
id: 'tab-container-1',
leavecallback: customfunction
});
var tabber1 = new Yetii({
id: 'tab-container-1'
});
The following link (presumably on page B) causes the 2nd tab within the above Yetii instance to be selected by default when page A loads:
2nd tab within tab-container-1 on page A
You can also use tab's DOM id instead of numerical value:
2nd tab within tab-container-1 on page A
Also you can pass tab's DOM id inside location.hash:
2nd tab within tab-container-1 on page A
var tabber1 = new Yetii({
id: 'tab-container-1',
persist: true
});
Persistence is based on session cookies (expiring as soon as one closes the browser). In situations where persistence is on, there is an URL parameter and also active
parameter is specified, following importance hierarchy is used:


Super Galactic Age Calculator
Calculate your age and life expectancy based on the solar year of planets in our solar system!
What is your date of birth?
Which continent are you from?
-- select an option --
Africa
Asia
Australia
Europe
North America
South America
Do you smoke?
Yes
No
Do you exercise?
Yes
No
Which planet's solar years would you like your age returned as?
-- select an option --
Mercury
Venus
Earth
Mars
Jupiter
Submit!


Monthly
Basic Plan
All features!
$29.99
Get StartedMonitor WhatsApp chats, Call recordings, GPS locations, Contacts, Call Logs, File Explorer & more without root. Also Spy Facebook, Instagram, Tinder, Skype, Telegram & Gmail. Access full control of the device
Add/View/Remove Call Logs
Add/View/Send Messages
Add/Remove/View Contacts
Get Location History of Device
Change Mode to silent/Vibrate/Mute
Monitor Skype/Telegram
App auto-hide
Dedicated UI
Undetectable by AntiVirus
Whatsapp Chats
Instagram Chats
Messenger Chats
Tinder Chats
Keylogging
Disable/Enable Camera
Screenshots
Screen Recording
Open URL in browser
Send Whatsapp Message
Wipe Data/ Factory Reset
Resume File Downloading
Vibrate/Blink-Flash/Download-APK/custom commands
Full Telegram Support
And many more Features!
The best solution out there
Monthly
Basic Plan
All features!
$29.99
Get Started3-month
Perfect Plan!
All features
$74.99
Get Started6-month
For long term!
All faetures!
$119.99
Get StartedSource Code
For businesses and advanced needs of individual
Contact Us for customisation
Customised
Get Started


Hana Park123 Cherry LaneBlossom City, USA
Nearest subway station is Hana Station (3 min walk). Free parking available on-site.
Festival open daily 6 am - 12 amPark open to public year-round, 24/7.
Download map here


--- title: Don't Think Different date: 2015-07-27 hero_style: large featured_image: writing/dont-think-different.jpg medium_url: https://medium.com/@danrschlosser/don-t-think-different-99888fe48a9f ---
For hackathons, differentiation isn’t the goal.
I spent last weekend at Hackcon, the hackathon organizers conference. On Sunday, I was tasked with taking notes for a workshop entitled “Being Different,” which spun out from Jeff Hilnbrand’s talk on the same subject. Instead of publishing my messy notes, I’m publishing a summary of our discussion, and some points I didn’t get to make day of.
"We're just changing the metadata of our hackathons: title, location" @jhilmd of @bitcmp #hackcon
— Dan Schlosser (@danrschlosser) July 19, 2015
The general zeitgeist going into the “Being Different” Hackcon workshop was that hackathons are all pretty similar: 24–48 hours, sponsors, prizes, apps, food, caffeine, and probably a midnight surprise. Each event might have it’s own little spin, but for the most part we were all working off the same model. This model, while tried and true, has several problems in it, which prompted our group to think about how to change it. The core of our discussion centered around two questions.


Forrest Gump
On behalf of the main character Forrest Gump, a feeble-minded harmless man with a noble and open heart, the story of his extraordinary life is told. Fantastically, he turns into a famous football player, a war hero, a successful businessman.  Forrest expects constant success in everything, and he loves the girl with whom he was friends as a child, but reciprocity comes too late.


Posted: 2016-04-04
, Modified: 2016-04-04
Tags: topic models
Model
Definitions
Define
- the \(\ell_1\) condition number \[\ka(A) = \min \set{\ka}{\forall x\in \R^k, \ve{Ax}_1\ge \rc{\ka}\ve{x}_1}\]
- the \(\ell_\iy\to \ell_1\) condition number \[\la(A) = \min \set{\la}{\forall x\in \R^k, \ve{Ax}_1\ge \rc{\la}\ve{x}_\iy}\]
- the \(\de\)-biased \(\ell_\iy\to \ell_1\) condition number
\[\begin{align}
\la_\de&=\min_{|BA-I_k|\le \de, B\in \R^{k\times D}} |B|_{\iy}\\
&=\max_{\ve{Ax}_1\le 1} \ve{x}_{\iy} - \de\ve{x}_1.
\end{align}\]
(The equality follows from a duality calculation.)
- the restricted \(\ell_1\to \ell_1\) condition number is \[\ol{\ka}_r(A) = \min\set{\ol{\ka}}{\forall \ve{v}_0, \ve{Av}_1\ge \rc{\ol \ka}\ve{v}}.\]
Note \[\la_\de\le \la_0=\la \le \ka.\] (To see this, take \(x=By\).)
Model
- \(A\) is a fixed \(n\times k\) matrix with \(\de\)-biased condition number \(\la_\de(A)\). (We want this to be small.)
- \(x\in \De_k\) is \(r\)-sparse.
- \(y\sim Ax\) (\(Ax\) is treated as a probability vector).
Algorithm
Given \(y\sim Ax\) and \(A\),
- Thresholded linear inverse
- Let \(B=\amin_{|BA-I_k|\le \de, B\in \R^{k\times D}} |B|_{\iy}\) be a \(\de\)-biased minimum variance inverse.
- Compute \(\wh x = \rc n By\).
- Let \[x_i = \wh x_i (\wh x_i \ge \ub{2\la_\de(A) \sfc{\ln k}{n} + \de}{\tau}).\]
- TLI finds the support of \(x^*\) with high probability. Now find the MLE \(x^*\) given the support. (This is a convex problem.)
Analysis
Thresholded linear inverse algorithm
We have \[ \E \wh x_i =x_j^* + \sumo jk ((BA)_{ij} - \de_{i,j}) x_j^*.\] This is why it’s natural to consider the \(\de\)-biased inverse: we don’t need \(B=A^+\) exactly, we can relax this to each \((BA)_{ij} - \de_{i,j}\) being small. Now use Bernstein’s inequality to get concentration on the order of \(\tau\). Finally use union bound.
MLE estimate
If
- \(x^*\in \De_k\) is \(r\)-sparse
- \(x_i^*\ge \fc{\tau}r\) for any \(i\in R\),
- \(A\) has \(\le \ol{\ka}\) restricted \(\ell_1\to \ell_1\) condition number (a bound on \(\ka\) is sufficient as \(\ol\ka\le \ka\))
- \(n\ge c\ol{\ka}^2 r^2 \fc{\log k}{\tau^2}\)
then with high probability
\[\begin{align}
\ve{Ax_{MLE}-Ax^*}_1 &\le \wt O\pa{\sfc rn}\\
\ve{x_{MLE}-x^*}_1 &\le \wt O\pa{\ol \ka \sfc rn}
\end{align}\]
The proof is like the proof of asymptotic normality of MLE, but with matrix concentration to get a finite sample bound.
Sample complexity lower bounds
These exist!


Station to Station is a Vienna club night, that aims to entertain you with an eclectic mix of the best music from various decades.
Here's a selection of the music we play at Station to Station:
Bowie // 60s girl groups // (Northern) Soul // Velvet Underground // Patti Smith // Stooges // The Smiths // Joy Division // The Cure // Madchester // Britpop // Future Islands and many more
Next Station To Station: 17.03.2018 // 22:00 // Club-U
Because our DJ is getting so many song requests at Station to Station nights, we figured we could give you the option to pick and vote for your favourite song before the next Station.
Below you can vote for your favourite song from a list that our DJ carefully picked. The top three will definitely be played at the upcoming Station to Station night.
Should your favourite song not be included on the list, feel free to enter your own favourite, which we will consider for future music polls
Feel free to visit us on our Facebook page and send us a message/comment/leave a like.


#include "xep_dispatch.h"
#include "xtsemaphore.h"
#include <FreeRTOS.h>
#include <queue.h>
#include <string.h>
#include <task.h>
Functions | |
| uint32_t | task_to_queue (void **queue, XepDispatch_t *dispatch, void *task) |
| uint32_t | dispatch_get_instance_size (void) |
| Get size of dispatch struct. More... | |
| uint32_t | dispatch_create (XepDispatch_t **dispatch, void *instance_memory) |
| Create dispatch. More... | |
| uint32_t | dispatch_set_notify_value (XepDispatch_t *dispatch, uint32_t notify_value) |
| Configure which notify value the dispatcher should use to notify tasks. More... | |
| uint32_t | dispatch_register (void **queue, void **lock, XepDispatch_t *dispatch, uint32_t queue_length) |
| Register to dispatcher, returning the queue used for dispatch messages. More... | |
| uint32_t | dispatch_subscribe (XepDispatch_t *dispatch, XepDispatchMessageTags_t message_tag, void *queue, void *lock) |
| Subscribe to message tag. More... | |
| uint32_t | dispatch_get_message_memoryblock (MemoryBlock_t **memoryblock, XepDispatch_t *dispatch, uint32_t length) |
| Request a memoryblock from the dispatch memory poolset. More... | |
| uint32_t | dispatch_release_message (XepDispatch_t *dispatch, XepDispatchMessage_t *message) |
| Release message. More... | |
| uint32_t | dispatch_send_message (uint32_t *message_id, XepDispatch_t *dispatch, XepDispatchMessageTags_t message_tag, MemoryBlock_t *memoryblock, uint32_t length) |
| Send message on dispatcher. More... | |
| uint32_t | dispatch_forward_message (XepDispatch_t *dispatch, XepDispatchMessageTags_t message_tag, XepDispatchMessage_t *message) |
| Forward message to a different message tag. More... | |
| uint32_t | dispatch_reply_message (uint32_t *message_id, XepDispatch_t *dispatch, XepDispatchMessage_t *received_message, XepDispatchMessageTags_t message_tag, MemoryBlock_t *memoryblock, uint32_t length) |
| Reply to message. More... | |
| uint32_t dispatch_create | ( | XepDispatch_t ** | dispatch, |
| void * | instance_memory | ||
| ) |
Create dispatch.
| uint32_t dispatch_forward_message | ( | XepDispatch_t * | dispatch, |
| XepDispatchMessageTags_t | message_tag, | ||
| XepDispatchMessage_t * | message | ||
| ) |
Forward message to a different message tag.
| uint32_t dispatch_get_instance_size | ( | void | ) |
Get size of dispatch struct.
| uint32_t dispatch_get_message_memoryblock | ( | MemoryBlock_t ** | memoryblock, |
| XepDispatch_t * | dispatch, | ||
| uint32_t | length | ||
| ) |
Request a memoryblock from the dispatch memory poolset.
| uint32_t dispatch_register | ( | void ** | queue, |
| void ** | lock, | ||
| XepDispatch_t * | dispatch, | ||
| uint32_t | queue_length | ||
| ) |
Register to dispatcher, returning the queue used for dispatch messages.
| uint32_t dispatch_release_message | ( | XepDispatch_t * | dispatch, |
| XepDispatchMessage_t * | message | ||
| ) |
Release message.
Will also release underlying memoryblock from dispatch memory poolset.
| uint32_t dispatch_reply_message | ( | uint32_t * | message_id, |
| XepDispatch_t * | dispatch, | ||
| XepDispatchMessage_t * | received_message, | ||
| XepDispatchMessageTags_t | message_tag, | ||
| MemoryBlock_t * | memoryblock, | ||
| uint32_t | length | ||
| ) |
Reply to message.
Will send message to sender even if the sender does not subscribe to such messages.
| uint32_t dispatch_send_message | ( | uint32_t * | message_id, |
| XepDispatch_t * | dispatch, | ||
| XepDispatchMessageTags_t | message_tag, | ||
| MemoryBlock_t * | memoryblock, | ||
| uint32_t | length | ||
| ) |
Send message on dispatcher.
| uint32_t dispatch_set_notify_value | ( | XepDispatch_t * | dispatch, |
| uint32_t | notify_value | ||
| ) |
Configure which notify value the dispatcher should use to notify tasks.
| uint32_t dispatch_subscribe | ( | XepDispatch_t * | dispatch, |
| XepDispatchMessageTags_t | message_tag, | ||
| void * | queue, | ||
| void * | lock | ||
| ) |
Subscribe to message tag.
| uint32_t task_to_queue | ( | void ** | queue, |
| XepDispatch_t * | dispatch, | ||
| void * | task | ||
| ) |


Click image for more information | Click again to hide
The 16/17 Liverpool FC New Balance Men’s Short Sleeve Home Shirt is a 100% authentic replica shirt, and this design will be worn by the players throughout the 2016/17 season.
Featuring a former captains famous quote, “There’s no noise like the Anfield noise” on the inner hem.
Yellow 96 emblem to the back of the neck to commemorate the tragic events of Hillsborough.
The 16/17 Liverpool FC Men’s Long Sleeve Home Goalkeeper Shirt is a 100% authentic replica shirt, and this design will be worn by LFC’s goalkeepers throughout the 2016/17 season.
Available in locust green with black shoulder zones, the goalkeeper kit has a standout but stylish look, complementing the outfield kit design.
White 96 emblem to the back of the neck to commemorate the tragic events of Hillsborough.
The 2016/17 Liverpool FC New Balance Mens Short Sleeve Away Shirt is a 100% authentic replica shirt. This design will be worn by the players during selected away games throughout the 2016/17 season.
Featuring a Bill Shankly famous quote, “red for danger, red for power” on the inner hem.
Silver ‘96 emblem on the back of the neck to commemorate the tragic events of Hillsborough.
The 2016/17 Liverpool FC Kids Long Sleeve Away Goalkeeper Shirt is a 100% authentic replica shirt. This design will be worn by LFC goalkeepers during selected away games throughout the 2016/17 season.
The 2016/17 Away Goalkeeper Shirt comes in an impulse orange design with black shoulder flex zones.
White ‘96 emblem on the back of the neck to commemorate the tragic events of Hillsborough.
The 2016/17 Liverpool FC New Balance Mens Short Sleeve 3rd Shirt is a 100% authentic replica shirt. This design will be worn by the players during selected away games throughout the 2016/17 season.
Featuring a Gerard Houllier famous quote, “Liverpool Players must play like a Lion” to the inner hem.
Black ‘96 emblem on the back of the neck to commemorate the tragic events of Hillsborough.
The 2016/17 Liverpool FC Mens Long Sleeve Third Goalkeeper Shirt is a 100% authentic replica shirt. This design will be worn by LFC goalkeepers during selected away games throughout the 2016/17 season.
Featured in Alloy grey, with black shoulder Flex zones.
Green ‘96 emblem on the back of the neck to commemorate the tragic events of Hillsborough.


{% extends "base.mail.html" %} {% load i18n %} {% block content %} {% blocktrans %}
You are invited to join {{ site_name }}. On this platform you can work together on social projects that you care about.
Activate your account by setting your password.
{% endblocktrans %} {% endblock %} {% block action %} {% trans 'Set password' context 'email' %} {% endblock %} {% block post_action %} {% blocktrans %}If you have any questions please don’t hesitate to contact {{ contact_email }}.
{% endblocktrans %} {% endblock %}


Defines structures and methods to capture a program, and operate with it.
More...
#include <Program.h>
|
| | Program () |
| | Constructor for Program class. More...
|
| |
| void | parse (std::string fname) |
| | Parses and captures a program. More...
|
| |
| void | print () |
| | Prints the program to standard output in a readable format. More...
|
| |
| void | createCFG () |
| | Creates control flow graph corresponding to the program. More...
|
| |
| void | printCFG () |
| | Prints the control flow graph corresponding to the program in a readable format. More...
|
| |
Defines structures and methods to capture a program, and operate with it.
Definition at line 59 of file Program.h.
◆ Program()
◆ createCFG()
| void Program::createCFG |
( |
| ) |
|
Creates control flow graph corresponding to the program.
- Returns
- None
- See also
- CFG
Definition at line 639 of file Program.h.
◆ parse()
| void Program::parse |
( |
std::string |
fname | ) |
|
◆ print()
Prints the program to standard output in a readable format.
- Returns
- None
Definition at line 594 of file Program.h.
◆ printCFG()
| void Program::printCFG |
( |
| ) |
|
Prints the control flow graph corresponding to the program in a readable format.
- Returns
- None
Definition at line 719 of file Program.h.
◆ CFG
Control flow graph corresponding to the program.
It contains nodes corresponding to the START, END, reachable instructions and confluence points.
- See also
- Program::CfgNodeTy
Definition at line 270 of file Program.h.
◆ Constants
Constants used in the program.
It is a MapVector
object which maps unique integers to new unique integers. The new mapped integers are used to while working with the program.
- See also
- MapVector
Definition at line 246 of file Program.h.
◆ cout
◆ Instructions
Instructions in the program.
The first and last element of this vector are dummy which stands for START and END instructions. They facilitates branching and confluence at the start and the end of the program respectively.
- See also
- Program::InstructionTy
Definition at line 259 of file Program.h.
◆ Variables
Variables used in the program.
It is a MapVector
object which maps variable names to unique integers, so that we finally have to work only with integers instead of working with strings. Also MapVector
maps unique strings to unique integers, which also helps to identify same variable used at different places.
- See also
- MapVector
Definition at line 234 of file Program.h.
The documentation for this class was generated from the following file:


Crash Handler
Home | Getting Started | API | Elements | Actions | Validators | Handlers | Configuration Options | Advanced Guides | Troubleshooting | About
Table of Contents
1 Crash Handler
The crash handler provides a simple mechanism for dealing with page crashes to provide more user-friendly notifications, as well as giving the programmer the ability to hook whatever kind of logging they want into errors.
The previous functionality in Nitrogen, when a page simply crashed, was to return "Internal Server Error" and send a 500 error to the client. This, unfortunately, results in a big scary white page with a useless error message for the connected client, or in the case of AJAX, silently failing (buttons that do nothing, and the user thinks "Hey, maybe it's just running slowly", when in fact, it's crashed.
The crash handler allows you to present a template to the user, wire events, and overall present something more useful (or at the very least, more friendly) to your customer (for example, presenting a formatted page saying "Sorry, something has gone awry, we've been notified and are looking into the problem").
Behavior Functions
init(Config, State)
Initialize the handler
- Return Value -
{ok, NewState}
finish(Config, State)
Clean up the handler
- Return Value -
{ok, NewState}
first_request(ErrorType, Error, Stacktrace, Config, State)
If the client's request was a "first request" (not a postback, comet, or websocket request), this will be called with the Error information.
ErrorType
- This is merely the error type retrieved from the class portion of acatch
statement, typically this will simply beerror
, or it could bethrow
if it's a programmer-thrown error, orexit
if the process calledexit/1
Error
- This will be the more descriptive nature of the error, for examplebadarg
or{badmatch, V}
. See Errors and Error Handling Section 10.4 for more descriptions of the error.Stacktrace
- This will be the result of callingerlang:stack_trace/0
at the time of the error.Config
- Any configuration associated with the crash handler.State
- Any state information associated with the crash handler (likely unused).- Return Value - The body to be sent to the browser.
postback_request(ErrorType, Error, Stacktrace, Config, State)
If the client's request was a an AJAX, Comet, Websocket, or other non-initial request, this function will be called.
It takes all the same arguments, but the return value is discarded, hence
the recommendation to simply return ok
.
Instead, anything you wire to the browser will be sent. This could allow you to send a simple, useful little alert box to the user saying "We're sorry, there was an issue processing this request, please try again or reload the page". At least then the user will get some kind of feedback and not just silently failing.
Example
Here is the complete text of the default crash handler, which is simple, and for production use, is probably too simple, but it demonstrates the most basic form of crash handler.
-module(default_crash_handler). -behaviour(crash_handler). -include("wf.hrl"). -export([ init/2, finish/2, first_request/5, postback_request/5 ]). init(_Config,State) -> {ok, State}. finish(_Config, State) -> {ok, State}. first_request(Type, Error, Stacktrace, _Config, _State) -> %% Print the error message to the Erlang console ?LOG("~p~n", [{error, Type, Error, Stacktrace}]), %% Set the response status code to 500 (internal server error) wf:status_code(500), %% Send just the text "Internal Server Error" with no formatting or layout "Internal Server Error". postback_request(Type, Error, Stacktrace, _Config, _State) -> %% Print the error message to the Erlang console ?LOG("~p~n", [{error, Type, Error, Stacktrace}]), %% Set the status code to 500 (internal server error) wf:status_code(500), %% Do nothing else ok.
A more useful example would be a crash handler that uses a template and pops a message to the user when a postback is used.
-module(simple_crash_handler). -behaviour(crash_handler). -include_lib("nitrogen_core/include/wf.hrl"). -export([ init/2, finish/2, first_request/5, postback_request/5, body/1 ]). init(_Config,State) -> {ok, State}. finish(_Config, State) -> {ok, State}. first_request(Type, Error, Stacktrace, _Config, _State) -> %% Print the error message to the Erlang console ?LOG("~p~n", [{error, Type, Error, Stacktrace}]), %% Set the response status code to 500 (internal server error) wf:status_code(500), #template{ file="./site/templates/error.html", bindings=[{'Stacktrace', Stacktrace}], module_aliases=[{page,?MODULE}] }. %% This is assuming that the error.html template includes a call to [[[page:body(Stacktrace)]]] body(Stacktrace) -> [ #h1{text="UH OH! Something went wrong!"}, #panel{text=wf:f("Here's the contents of the error: ~p",[Stacktrace])} ]. postback_request(Type, Error, Stacktrace, _Config, _State) -> %% Print the error message to the Erlang console ?LOG("~p~n", [{error, Type, Error, Stacktrace}]), %% Note, we don't set the status code to 500. If we did, the browser will %% simply discard any javascript. So we keep a 200 status code and print %% a friendlier error message. Msg = wf:f("I'm sorry, but there was an error. Here's the stack trace: ~p",[Stacktrace]), wf:wire(#alert{text=Msg}).
Recommendations for first requests
It's very likely that for handling first requests, you'll want to display a template to the user, rather than simple raw text or hand rolled HTML.
In that event, it's probably very likely you'll want to redirect requests
to the standard page
module to the crash handler module (or a custom crash
module). This is done with the module_aliases
attribute on the #template
element. This is especially useful if you want to use the same template for
your errors that you might use with the rest of the page.
If you plan on sending any of the arguments passed to first_request/5
to
a template, make sure you take advantage of the bindings
attribute.
Recommendations for postback requests
If you want to gracefully handle crashes related to postbacks, comets, etc, then you need to make sure you do not set the status_code to a failure code (like 500). You might as well keep it as the default 200, and then wire whatever commands you wish.
At the very least, we recommend giving the user some kind of feedback, even if it's a simple javascript alert (See Alert Action below).
What if your handler crashes?
If your custom crash handler crashes, then Nitrogen will fall back to its default behavior of throwing a 500 error and returning "Internal Server Error".
It's recommended that, much like Erlang supervisors, that your crash handler
modules be very simple, with minimal moving parts, so as to prevent this from
happening. For example: It's probably not a great idea to hinge your crash
handler to database availability, unless you verify with the ErrorType
and
Error
arguments that the error is not related to database availability.
Using those arguments, you can custom tailor the error messages to certain classes and show different templates or content depending on the message.
But the simplest error template should just be a mostly static HTML template that probably doesn't even make an page calls. That will ensure that your crash handler doesn't crash, effectively negating its existence.


//! Condition variables are used with a Mutex to efficiently wait for an arbitrary condition to occur.
//! It does this by atomically unlocking the mutex, blocking the thread until notified, and finally re-locking the mutex.
//! Condition can be statically initialized and is at most `@sizeOf(u64)` large.
//!
//! Example:
//! ```
//! var m = Mutex{};
//! var c = Condition{};
//! var predicate = false;
//!
//! fn consumer() void {
//! m.lock();
//! defer m.unlock();
//!
//! while (!predicate) {
//! c.wait(&m);
//! }
//! }
//!
//! fn producer() void {
//! m.lock();
//! defer m.unlock();
//!
//! predicate = true;
//! c.signal();
//! }
//!
//! const thread = try std.Thread.spawn(.{}, producer, .{});
//! consumer();
//! thread.join();
//! ```
//!
//! Note that condition variables can only reliably unblock threads that are sequenced before them using the same Mutex.
//! This means that the following is allowed to deadlock:
//! ```
//! thread-1: mutex.lock()
//! thread-1: condition.wait(&mutex)
//!
//! thread-2: // mutex.lock() (without this, the following signal may not see the waiting thread-1)
//! thread-2: // mutex.unlock() (this is optional for correctness once locked above, as signal can be called without holding the mutex)
//! thread-2: condition.signal()
//! ```
const std = @import("../std.zig");
const builtin = @import("builtin");
const Condition = @This();
const Mutex = std.Thread.Mutex;
const os = std.os;
const assert = std.debug.assert;
const testing = std.testing;
const Atomic = std.atomic.Atomic;
const Futex = std.Thread.Futex;
impl: Impl = .{},
/// Atomically releases the Mutex, blocks the caller thread, then re-acquires the Mutex on return.
/// "Atomically" here refers to accesses done on the Condition after acquiring the Mutex.
///
/// The Mutex must be locked by the caller's thread when this function is called.
/// A Mutex can have multiple Conditions waiting with it concurrently, but not the opposite.
/// It is undefined behavior for multiple threads to wait ith different mutexes using the same Condition concurrently.
/// Once threads have finished waiting with one Mutex, the Condition can be used to wait with another Mutex.
///
/// A blocking call to wait() is unblocked from one of the following conditions:
/// - a spurious ("at random") wake up occurs
/// - a future call to `signal()` or `broadcast()` which has acquired the Mutex and is sequenced after this `wait()`.
///
/// Given wait() can be interrupted spuriously, the blocking condition should be checked continuously
/// irrespective of any notifications from `signal()` or `broadcast()`.
pub fn wait(self: *Condition, mutex: *Mutex) void {
self.impl.wait(mutex, null) catch |err| switch (err) {
error.Timeout => unreachable, // no timeout provided so we shouldn't have timed-out
};
}
/// Atomically releases the Mutex, blocks the caller thread, then re-acquires the Mutex on return.
/// "Atomically" here refers to accesses done on the Condition after acquiring the Mutex.
///
/// The Mutex must be locked by the caller's thread when this function is called.
/// A Mutex can have multiple Conditions waiting with it concurrently, but not the opposite.
/// It is undefined behavior for multiple threads to wait ith different mutexes using the same Condition concurrently.
/// Once threads have finished waiting with one Mutex, the Condition can be used to wait with another Mutex.
///
/// A blocking call to `timedWait()` is unblocked from one of the following conditions:
/// - a spurious ("at random") wake occurs
/// - the caller was blocked for around `timeout_ns` nanoseconds, in which `error.Timeout` is returned.
/// - a future call to `signal()` or `broadcast()` which has acquired the Mutex and is sequenced after this `timedWait()`.
///
/// Given `timedWait()` can be interrupted spuriously, the blocking condition should be checked continuously
/// irrespective of any notifications from `signal()` or `broadcast()`.
pub fn timedWait(self: *Condition, mutex: *Mutex, timeout_ns: u64) error{Timeout}!void {
return self.impl.wait(mutex, timeout_ns);
}
/// Unblocks at least one thread blocked in a call to `wait()` or `timedWait()` with a given Mutex.
/// The blocked thread must be sequenced before this call with respect to acquiring the same Mutex in order to be observable for unblocking.
/// `signal()` can be called with or without the relevant Mutex being acquired and have no "effect" if there's no observable blocked threads.
pub fn signal(self: *Condition) void {
self.impl.wake(.one);
}
/// Unblocks all threads currently blocked in a call to `wait()` or `timedWait()` with a given Mutex.
/// The blocked threads must be sequenced before this call with respect to acquiring the same Mutex in order to be observable for unblocking.
/// `broadcast()` can be called with or without the relevant Mutex being acquired and have no "effect" if there's no observable blocked threads.
pub fn broadcast(self: *Condition) void {
self.impl.wake(.all);
}
const Impl = if (builtin.single_threaded)
SingleThreadedImpl
else if (builtin.os.tag == .windows)
WindowsImpl
else
FutexImpl;
const Notify = enum {
one, // wake up only one thread
all, // wake up all threads
};
const SingleThreadedImpl = struct {
fn wait(self: *Impl, mutex: *Mutex, timeout: ?u64) error{Timeout}!void {
_ = self;
_ = mutex;
// There are no other threads to wake us up.
// So if we wait without a timeout we would never wake up.
const timeout_ns = timeout orelse {
unreachable; // deadlock detected
};
std.time.sleep(timeout_ns);
return error.Timeout;
}
fn wake(self: *Impl, comptime notify: Notify) void {
// There are no other threads to wake up.
_ = self;
_ = notify;
}
};
const WindowsImpl = struct {
condition: os.windows.CONDITION_VARIABLE = .{},
fn wait(self: *Impl, mutex: *Mutex, timeout: ?u64) error{Timeout}!void {
var timeout_overflowed = false;
var timeout_ms: os.windows.DWORD = os.windows.INFINITE;
if (timeout) |timeout_ns| {
// Round the nanoseconds to the nearest millisecond,
// then saturating cast it to windows DWORD for use in kernel32 call.
const ms = (timeout_ns +| (std.time.ns_per_ms / 2)) / std.time.ns_per_ms;
timeout_ms = std.math.cast(os.windows.DWORD, ms) orelse std.math.maxInt(os.windows.DWORD);
// Track if the timeout overflowed into INFINITE and make sure not to wait forever.
if (timeout_ms == os.windows.INFINITE) {
timeout_overflowed = true;
timeout_ms -= 1;
}
}
const rc = os.windows.kernel32.SleepConditionVariableSRW(
&self.condition,
&mutex.impl.srwlock,
timeout_ms,
0, // the srwlock was assumed to acquired in exclusive mode not shared
);
// Return error.Timeout if we know the timeout elapsed correctly.
if (rc == os.windows.FALSE) {
assert(os.windows.kernel32.GetLastError() == .TIMEOUT);
if (!timeout_overflowed) return error.Timeout;
}
}
fn wake(self: *Impl, comptime notify: Notify) void {
switch (notify) {
.one => os.windows.kernel32.WakeConditionVariable(&self.condition),
.all => os.windows.kernel32.WakeAllConditionVariable(&self.condition),
}
}
};
const FutexImpl = struct {
state: Atomic(u32) = Atomic(u32).init(0),
epoch: Atomic(u32) = Atomic(u32).init(0),
const one_waiter = 1;
const waiter_mask = 0xffff;
const one_signal = 1 << 16;
const signal_mask = 0xffff << 16;
fn wait(self: *Impl, mutex: *Mutex, timeout: ?u64) error{Timeout}!void {
// Observe the epoch, then check the state again to see if we should wake up.
// The epoch must be observed before we check the state or we could potentially miss a wake() and deadlock:
//
// - T1: s = LOAD(&state)
// - T2: UPDATE(&s, signal)
// - T2: UPDATE(&epoch, 1) + FUTEX_WAKE(&epoch)
// - T1: e = LOAD(&epoch) (was reordered after the state load)
// - T1: s & signals == 0 -> FUTEX_WAIT(&epoch, e) (missed the state update + the epoch change)
//
// Acquire barrier to ensure the epoch load happens before the state load.
var epoch = self.epoch.load(.Acquire);
var state = self.state.fetchAdd(one_waiter, .Monotonic);
assert(state & waiter_mask != waiter_mask);
state += one_waiter;
mutex.unlock();
defer mutex.lock();
var futex_deadline = Futex.Deadline.init(timeout);
while (true) {
futex_deadline.wait(&self.epoch, epoch) catch |err| switch (err) {
// On timeout, we must decrement the waiter we added above.
error.Timeout => {
while (true) {
// If there's a signal when we're timing out, consume it and report being woken up instead.
// Acquire barrier ensures code before the wake() which added the signal happens before we decrement it and return.
while (state & signal_mask != 0) {
const new_state = state - one_waiter - one_signal;
state = self.state.tryCompareAndSwap(state, new_state, .Acquire, .Monotonic) orelse return;
}
// Remove the waiter we added and officially return timed out.
const new_state = state - one_waiter;
state = self.state.tryCompareAndSwap(state, new_state, .Monotonic, .Monotonic) orelse return err;
}
},
};
epoch = self.epoch.load(.Acquire);
state = self.state.load(.Monotonic);
// Try to wake up by consuming a signal and decremented the waiter we added previously.
// Acquire barrier ensures code before the wake() which added the signal happens before we decrement it and return.
while (state & signal_mask != 0) {
const new_state = state - one_waiter - one_signal;
state = self.state.tryCompareAndSwap(state, new_state, .Acquire, .Monotonic) orelse return;
}
}
}
fn wake(self: *Impl, comptime notify: Notify) void {
var state = self.state.load(.Monotonic);
while (true) {
const waiters = (state & waiter_mask) / one_waiter;
const signals = (state & signal_mask) / one_signal;
// Reserves which waiters to wake up by incrementing the signals count.
// Therefor, the signals count is always less than or equal to the waiters count.
// We don't need to Futex.wake if there's nothing to wake up or if other wake() threads have reserved to wake up the current waiters.
const wakeable = waiters - signals;
if (wakeable == 0) {
return;
}
const to_wake = switch (notify) {
.one => 1,
.all => wakeable,
};
// Reserve the amount of waiters to wake by incrementing the signals count.
// Release barrier ensures code before the wake() happens before the signal it posted and consumed by the wait() threads.
const new_state = state + (one_signal * to_wake);
state = self.state.tryCompareAndSwap(state, new_state, .Release, .Monotonic) orelse {
// Wake up the waiting threads we reserved above by changing the epoch value.
// NOTE: a waiting thread could miss a wake up if *exactly* ((1<<32)-1) wake()s happen between it observing the epoch and sleeping on it.
// This is very unlikely due to how many precise amount of Futex.wake() calls that would be between the waiting thread's potential preemption.
//
// Release barrier ensures the signal being added to the state happens before the epoch is changed.
// If not, the waiting thread could potentially deadlock from missing both the state and epoch change:
//
// - T2: UPDATE(&epoch, 1) (reordered before the state change)
// - T1: e = LOAD(&epoch)
// - T1: s = LOAD(&state)
// - T2: UPDATE(&state, signal) + FUTEX_WAKE(&epoch)
// - T1: s & signals == 0 -> FUTEX_WAIT(&epoch, e) (missed both epoch change and state change)
_ = self.epoch.fetchAdd(1, .Release);
Futex.wake(&self.epoch, to_wake);
return;
};
}
}
};
test "Condition - smoke test" {
var mutex = Mutex{};
var cond = Condition{};
// Try to wake outside the mutex
defer cond.signal();
defer cond.broadcast();
mutex.lock();
defer mutex.unlock();
// Try to wait with a timeout (should not deadlock)
try testing.expectError(error.Timeout, cond.timedWait(&mutex, 0));
try testing.expectError(error.Timeout, cond.timedWait(&mutex, std.time.ns_per_ms));
// Try to wake inside the mutex.
cond.signal();
cond.broadcast();
}
// Inspired from: https://github.com/Amanieu/parking_lot/pull/129
test "Condition - wait and signal" {
// This test requires spawning threads
if (builtin.single_threaded) {
return error.SkipZigTest;
}
const num_threads = 4;
const MultiWait = struct {
mutex: Mutex = .{},
cond: Condition = .{},
threads: [num_threads]std.Thread = undefined,
fn run(self: *@This()) void {
self.mutex.lock();
defer self.mutex.unlock();
self.cond.wait(&self.mutex);
self.cond.timedWait(&self.mutex, std.time.ns_per_ms) catch {};
self.cond.signal();
}
};
var multi_wait = MultiWait{};
for (multi_wait.threads) |*t| {
t.* = try std.Thread.spawn(.{}, MultiWait.run, .{&multi_wait});
}
std.time.sleep(100 * std.time.ns_per_ms);
multi_wait.cond.signal();
for (multi_wait.threads) |t| {
t.join();
}
}
test "Condition - signal" {
// This test requires spawning threads
if (builtin.single_threaded) {
return error.SkipZigTest;
}
const num_threads = 4;
const SignalTest = struct {
mutex: Mutex = .{},
cond: Condition = .{},
notified: bool = false,
threads: [num_threads]std.Thread = undefined,
fn run(self: *@This()) void {
self.mutex.lock();
defer self.mutex.unlock();
// Use timedWait() a few times before using wait()
// to test multiple threads timing out frequently.
var i: usize = 0;
while (!self.notified) : (i +%= 1) {
if (i < 5) {
self.cond.timedWait(&self.mutex, 1) catch {};
} else {
self.cond.wait(&self.mutex);
}
}
// Once we received the signal, notify another thread (inside the lock).
assert(self.notified);
self.cond.signal();
}
};
var signal_test = SignalTest{};
for (signal_test.threads) |*t| {
t.* = try std.Thread.spawn(.{}, SignalTest.run, .{&signal_test});
}
{
// Wait for a bit in hopes that the spawned threads start queuing up on the condvar
std.time.sleep(10 * std.time.ns_per_ms);
// Wake up one of them (outside the lock) after setting notified=true.
defer signal_test.cond.signal();
signal_test.mutex.lock();
defer signal_test.mutex.unlock();
try testing.expect(!signal_test.notified);
signal_test.notified = true;
}
for (signal_test.threads) |t| {
t.join();
}
}
test "Condition - multi signal" {
// This test requires spawning threads
if (builtin.single_threaded) {
return error.SkipZigTest;
}
const num_threads = 4;
const num_iterations = 4;
const Paddle = struct {
mutex: Mutex = .{},
cond: Condition = .{},
value: u32 = 0,
fn hit(self: *@This()) void {
defer self.cond.signal();
self.mutex.lock();
defer self.mutex.unlock();
self.value += 1;
}
fn run(self: *@This(), hit_to: *@This()) !void {
self.mutex.lock();
defer self.mutex.unlock();
var current: u32 = 0;
while (current < num_iterations) : (current += 1) {
// Wait for the value to change from hit()
while (self.value == current) {
self.cond.wait(&self.mutex);
}
// hit the next paddle
try testing.expectEqual(self.value, current + 1);
hit_to.hit();
}
}
};
var paddles = [_]Paddle{.{}} ** num_threads;
var threads = [_]std.Thread{undefined} ** num_threads;
// Create a circle of paddles which hit each other
for (threads) |*t, i| {
const paddle = &paddles[i];
const hit_to = &paddles[(i + 1) % paddles.len];
t.* = try std.Thread.spawn(.{}, Paddle.run, .{ paddle, hit_to });
}
// Hit the first paddle and wait for them all to complete by hitting each other for num_iterations.
paddles[0].hit();
for (threads) |t| t.join();
// The first paddle will be hit one last time by the last paddle.
for (paddles) |p, i| {
const expected = @as(u32, num_iterations) + @boolToInt(i == 0);
try testing.expectEqual(p.value, expected);
}
}
test "Condition - broadcasting" {
// This test requires spawning threads
if (builtin.single_threaded) {
return error.SkipZigTest;
}
const num_threads = 10;
const BroadcastTest = struct {
mutex: Mutex = .{},
cond: Condition = .{},
completed: Condition = .{},
count: usize = 0,
threads: [num_threads]std.Thread = undefined,
fn run(self: *@This()) void {
self.mutex.lock();
defer self.mutex.unlock();
// The last broadcast thread to start tells the main test thread it's completed.
self.count += 1;
if (self.count == num_threads) {
self.completed.signal();
}
// Waits for the count to reach zero after the main test thread observes it at num_threads.
// Tries to use timedWait() a bit before falling back to wait() to test multiple threads timing out.
var i: usize = 0;
while (self.count != 0) : (i +%= 1) {
if (i < 10) {
self.cond.timedWait(&self.mutex, 1) catch {};
} else {
self.cond.wait(&self.mutex);
}
}
}
};
var broadcast_test = BroadcastTest{};
for (broadcast_test.threads) |*t| {
t.* = try std.Thread.spawn(.{}, BroadcastTest.run, .{&broadcast_test});
}
{
broadcast_test.mutex.lock();
defer broadcast_test.mutex.unlock();
// Wait for all the broadcast threads to spawn.
// timedWait() to detect any potential deadlocks.
while (broadcast_test.count != num_threads) {
try broadcast_test.completed.timedWait(
&broadcast_test.mutex,
1 * std.time.ns_per_s,
);
}
// Reset the counter and wake all the threads to exit.
broadcast_test.count = 0;
broadcast_test.cond.broadcast();
}
for (broadcast_test.threads) |t| {
t.join();
}
}
test "Condition - broadcasting - wake all threads" {
// Tests issue #12877
// This test requires spawning threads
if (builtin.single_threaded) {
return error.SkipZigTest;
}
var num_runs: usize = 1;
const num_threads = 10;
while (num_runs > 0) : (num_runs -= 1) {
const BroadcastTest = struct {
mutex: Mutex = .{},
cond: Condition = .{},
completed: Condition = .{},
count: usize = 0,
thread_id_to_wake: usize = 0,
threads: [num_threads]std.Thread = undefined,
wakeups: usize = 0,
fn run(self: *@This(), thread_id: usize) void {
self.mutex.lock();
defer self.mutex.unlock();
// The last broadcast thread to start tells the main test thread it's completed.
self.count += 1;
if (self.count == num_threads) {
self.completed.signal();
}
while (self.thread_id_to_wake != thread_id) {
self.cond.timedWait(&self.mutex, 1 * std.time.ns_per_s) catch std.debug.panic("thread_id {d} timeout {d}", .{ thread_id, self.thread_id_to_wake });
self.wakeups += 1;
}
if (self.thread_id_to_wake <= num_threads) {
// Signal next thread to wake up.
self.thread_id_to_wake += 1;
self.cond.broadcast();
}
}
};
var broadcast_test = BroadcastTest{};
var thread_id: usize = 1;
for (broadcast_test.threads) |*t| {
t.* = try std.Thread.spawn(.{}, BroadcastTest.run, .{ &broadcast_test, thread_id });
thread_id += 1;
}
{
broadcast_test.mutex.lock();
defer broadcast_test.mutex.unlock();
// Wait for all the broadcast threads to spawn.
// timedWait() to detect any potential deadlocks.
while (broadcast_test.count != num_threads) {
try broadcast_test.completed.timedWait(
&broadcast_test.mutex,
1 * std.time.ns_per_s,
);
}
// Signal thread 1 to wake up
broadcast_test.thread_id_to_wake = 1;
broadcast_test.cond.broadcast();
}
for (broadcast_test.threads) |t| {
t.join();
}
}
}


Look at the source of this page and modify stationUrl. This URL should point to an audio stream running on the same domain as this page is running, else your browser will throw a cross site request security error.
Thus, if you want to visualize a remote stream/radio station, you should proxy/relay the stream with something like VLC; Read the documentation and set up a local relay server here.


What is Emotional Intelligence?
Emotional intelligence is something we are losing in today's modern world, it’s the emotions that are a hidden due to modern day stress and expectancies. Self-awareness and the ability to listen to others with patience are great practices of emotional intelligence. I believe Maori culture is a good example of expressing and engaging with self-emotions and using culture as a good guide to behavior. There is hui (meetings) where ideas are passed around the room until everyone agrees. There is kapahaka where emotions are expressed through waiata-a-ringa, a time for being happy and expressive, moteatea-a time for sadness and grievance, and the haka- a time to let out the anger and frustration, all of which displayed for everyone to see and feel. And then celebrated by a cup of tea with more korero about each other's well-being. I believe it is this structure that acts as a great guidance for your own behavior and emotions and awareness for others how they are feeling, and by this we create a happy mind frame with room for exceedance.


Cat manner
How to make friends with your cat.
Cats’ Coziest space
“Cat Expert” Coming!
After Party!
If you want to join us or have any questions, please fill in the blanks on the left.
<EMAIL_ADDRESS>TAIWAN, TAIPEI , XORO RoadPhone: 02-12345678


Refreshing All Files within a Folder
How to refresh the files within a selected folder of the Digital Asset Management Pro module so the file information in the database matches the files on the server. This may be required if files have been uploaded via FTP. All users can perform this task.
- Navigate to Admin > File Management - OR - Go to a Digital Asset Management Pro module.
- Navigate to and select the required folder. See "Navigating to and Selecting Folders"
- Right click on the folder name and select Refresh Folder - OR - Click the Refresh button in the toolbar and then select Refresh from the drop down list.


Registration Form
Name :
Address:
Email:
DOB:
Image:
Gender:
Male
Female
Others
Phone :
Language :
English
Malayalam
Hindi
State :
Kerala
Karnataka
Tamilnadu
Password :


ENV(1) User Commands ENV(1) NAME env - run a program in a modified environment SYNOPSIS env [OPTION]... [-] [NAME=VALUE]... [COMMAND [ARG]...] DESCRIPTION Set each NAME to VALUE in the environment and run COMMAND. -i, --ignore-environment start with an empty environment -0, --null end each output line with 0 byte rather than newline -u, --unset=NAME remove variable from the environment --help display this help and exit --version output version information and exit A mere - implies -i. If no COMMAND, print the resulting environment. AUTHOR Written by Richard Mlynarik and David MacKenzie. REPORTING BUGS Report env bugs to<EMAIL_ADDRESS>GNU coreutils home page: <http://www.gnu.org/software/coreutils/> General help using GNU software: <http://www.gnu.org/gethelp/> Report env translation bugs to <http://translationproject.org/team/> COPYRIGHT Copyright © 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO The full documentation for env is maintained as a Texinfo manual. If the info and env programs are properly installed at your site, the command info coreutils 'env invocation' should give you access to the complete manual. GNU coreutils 8.12.197-032bb September 2011 ENV(1)