Library associated with the XPORT file.
Path to XPT file.
Get all observations. This method will load all records into memory, for large datasets, the read method is suggested.
Read options. See read method options for details
Get metadata information from XPORT file.
Read observations as async iterable.
Read options.
Convert XPT to CSV files. Each dataset within the XPT file is written to the outDir folder as a separate csv file.
Output folder.
Read options. See read() method options.
Generated using TypeDoc


Last updated: 12 January 2020
Contact
Jon Atack
Bitcoin Core contributor and protocol researcher
Email<EMAIL_ADDRESS>Twitter: https://twitter.com/jonatack (DMs open)
Keybase: https://keybase.io/jonatack
GitHub: https://github.com/jonatack
Fediverse: https://x0f.org/@jon


PLANET SICK-BOY: http://www.sick-boy.com
Matthew Broderick's character in the new Alexander Payne (Citizen Ruth) comedy could be an adult version of Ferris Bueller. Sure, we don't want to think about the carefree Ferris turning into Election's popular high school teacher Jim McAllister, but you almost can't help it.
McAllister is a mélange of every educator you've ever had – dingy short-sleeved oxford shirt, bad tie, brown shoes, tiny Ford Festiva, and a genuine love of teaching. Despite winning George Washington Carver High's `Teacher of the Year' a record three times in his twelve-year tenure, McAllister still has one major Achilles heel that ultimately leads to his unraveling – a peppy junior named Tracy Flick.
Flick (Reese Witherspoon, Cruel Intentions) is running unopposed for the student body President, and her vivacity and eagerness are just the qualities that would have made her an easy target for people like Ferris. She in the top seven percent of her class, dresses like she's still trapped in Pleasantville, walks like she has a bulky object crammed up her backside, and perfectly pronounces every word that leaves her tightly pursed lips. And don't get me started on her hair, which, at one point, resembles demonic horns.
Things take an odd turn at Carver when McAllister convinces well-liked school quarterback Paul Metzler (Chris Klein) to run against the seemingly unstoppable Flick juggernaut. When the dust settles, viewers will have been treated to tastes of pornography, marital infidelity, lesbianism, sex with minors, election tampering, and a very disturbing scene where McAllister cleanses his genitals in the bathtub of a cheap hotel. Not your typical MTV Production, eh?
Payne's direction (he also co-wrote the script, based on the Tom Perrotta novel) is reminiscent of both Wes Anderson's superior Rushmore and either of Betty Thomas' biopics, The Late Show and Private Parts. Repeatedly using montage clips, Payne also bathes his actors in a sea of horrible fluorescent lighting, exposing every physical flaw.
Although the acting is first-rate, Witherspoon's Flick really stands out. Her unknowingly fiendish role will likely be remembered among the more evil roles in film history, along with Oddjob, Keyser Soze, Robert Patrick in Terminator 2 and that Russian guy from the fourth Rocky film. Or was it the third? Well, you get my point. (1:43 – R for adult language, nudity, sexual content and drug use)
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Grand Magister Tifaren:
I don't want to get involved with a priest of Einhasad. He's right here, finish your business quickly!


Presenting 4 ideas of actionable improvements that can be made to the site.
← Go backHow can we increase bookings and at the same time tell the users we have 113 million reviews from real users in a more relevant and useful way?
Bookings can increase if we rethink the area reserved to tell users we have more than 113 million reviews.
Booking.com current state This is the current design at booking.com
I propose to move that button to the bottom of the big image and add the price for the cheapest room from the configuration the user set up: Eg.: Two adults, two kids, two nights.
If the hypothesis is validated, Continue "milking the cows", go to next item and improve another part of the website.
If the hypothesis is not validated, iterate or pivot. Reshape ideas. Try presenting hotels from places the user is probably looking for, places relevant to the user's search.
If the results of test are uncertain, iterate. Reshape ideas


Given the following polynomial, factor by grouping. In other words, if we put the polynomial below into the form \color{#b22222}{(a r - b)}\color{#4169E1}{(c s - d)}
, what are the values of \color{#b22222}{a}
, \color{#b22222}{b}
, \color{#4169E1}{c}
, and \color{#4169E1}{d}
?
a * c r s + a * d r + b * cs + b * d
(
\space r + \space
)(
\space s + \space
)
enter an integer for each coefficient
pay attention to the sign of each number you enter to be sure the entire equation is correct
What is the largest factor we can pull out of both a * crs
and a * dr
?
It's \color{#b22222}{ar}
. What happens when we pull it out?
We get \color{#b22222}{ar}\color{#4169E1}{(cs + d)} + b * cs + b * d
.
Can we write b * cs + b * d
as something times \color{#4169E1}{(cs + d)}
?
It's \color{#b22222}{b}
times \color{#4169E1}{(cs + d)}
.
By the distributive property, \color{#b22222}{ar}\color{#4169E1}{(cs + d)}+\color{#b22222}{b}\color{#4169E1}{(cs + d)}
= \color{#b22222}{(ar + b)}\color{#4169E1}{(cs + d)}
.


Set Goals
Steps:
Distance:
Calories:
Save
Cancel
Reach
Daily Activity Summary
Walk for 10 minutes to reach your step goal
Walk
Run
Exer.
Steps
Dist.
Cals.
Minutes
Miles
Steps
1M
3M
6M
1Y
Distance
1M
3M
6M
1Y


Ibrahimovic set for AC Milan return, says MLS chief
by ReutersZlatan Ibrahimovic is set to rejoin Italian side AC Milan after his successful stint at LA Galaxy, Major League Soccer Commissioner Don Garber has said.
The 38-year-old Swedish striker has spent the past 18 months in MLS but his contract with Galaxy expires at the end of the year and he has been linked with a host of European clubs.
Ibrahimovic played for Milan between 2010 and 2012, scoring 42 goals in 61 league appearances, and Garber said he was on his way back to Serie A.
"Zlatan is such an interesting guy," he told ESPN. "He keeps my hands full and my inbox full, but he's a thrill-a-minute.
"He is a 38-year-old guy who is being recruited by AC Milan, one of the top clubs in the world."
Ibrahamovic was named in the MLS Best XI in 2018 and 2019 after netting 53 goals in the competition.
His season with Galaxy ended after they suffered a 5-3 defeat by local rivals Los Angeles Football Club in the MLS Cup Western Conference semi-finals last month.


A website designed for a an animal shelter using HTML and CSS. It has three dogs with their own columns describing the them.
A website made for a vacation spot with three pages of six columns for different attractions and three colums for the different packages made using HTML and CSS.
A website for a cupcake shop with three pages for each of the cupcake flavors made using HTML and CSS.
A website for an interior decorator that showed the process of a remodel on a house in columns using HTML and CSS.


Save the Date
for the wedding of
Felicia & David
3.14.15
Hanover, NH
Invitation to Follow
www.pidaywedding.info


LATEST on Hungry Zimbabwean Soldier who fired Gunshots at Zimbabwe Statehouse
by Philip MangwiroLATEST on Hungry Zimbabwean Soldier who fired Gunshots at Zimbabwe Statehouse
A disgruntled soldier allegedly fired a gun yesterday whilst on guard duty at Zimbabwe State House. The sensational claims were made by exiled former G40 kingpin Jonathan Moyo. The Soldier who allegedly committed the crime was identified as Private Magandu.
MORE FROM IHARARE:
Shocker As Police Detain 10-Month-Old Baby & Mother After Brutal Crackdown On Civilians [UPDATED]
‘It’s just pure art’-Trevor Dongo defends controversial semi nude pic with Jah Prayzah’s dancer
LATEST on Hungry Zimbabwean Soldier who fired Gunshots at Zimbabwe Statehouse
To View and Apply for the latest Jobs and Vacancies in Zimbabwe, Please Visit our Sister website iHarare Jobs


The day before Saint Patrick's Day, I fell while skateboarding. I broke my ankle really badly, an open tibial fracture with lateral dislocation and significant damage to the joint capsule. I still don't know the extent of the damage to the soft tissue; other than the zipper-like scars on both medial and lateral surfaces of my lower extremity I have no documentation. When the EMTs got the door closed behind my gurney, they asked me to rate my pain according to the US Marine Corps scale, 1-10.
I told them, 'Ten means 'gunshot wound,' so I'll say eight.' Then they cut off my pants and sock. The EMT on my left said, 'No, that's an open fracture. That's ten. Give him morphine.'
The EMT on my right stuck a hypo in my right arm and depressed the plunger. Within seconds, I felt a wave flow across my whole CNS, like knocking down a domino-row made of feathers. The EMT said, 'Awesome! Thank God for this medicine.' I could still feel the pain; but like the silliness brought on by nitrous oxide, I didn't care. My spasming muscles relaxed, and I could stop writhing and groaning. The pain had been unbelievably bad; I don't know how I justified it as eight. Now it seems as if I must have imagined it, but I swear they gave me a second shot on the way to the hospital. I remember telling them I could feel it burning the blood vessels all the way to my heart. It disgusted me.
Owing, presumably, to the complexity of the operation I needed, they kept me doped up until the following morning, when I could go into the OR. For half the night they gave me morphine, and the rest of the time I got demerol. I had a tube stuck in my elbow that let in fluids and injections, and the nurses gave me the dope through that. When the dose hit me, I would lie back and close my eyes. The waking world shrank like a faraway bubble. I would sink down away from that bubble, and then I would realize that I had been hearing a conversation 'behind' or 'underneath' the world. When the shot took effect, I would 'realize' that this had been going on all the time, and it was as if a person would shake me by the arm in that dream world and say,
'Hey! Are you all right?
And I would say, 'No, I'm all right.'
 But I had always been that other man, and I knew the details of his life. I would just, as they say, pick up as if I had never stopped. We went places, like an elementary or high school. We went to open fields. I saw clear skies and waves of blue and pink. And the sounds and sensations of the real world went far, far into the foreground; and I could hear them like a humdrum drone, just below conscious awareness.
Three hours after the shot, the medicine would wear off. I would have to tough it out for sixty whole minutes before another one would dull the pain. At about the three hour mark, someone would put a hand on me to stop me from thrashing about. Then my eyes opened, and the Other Place faded into the drone and I was back in Hell. My leg hurt like a sonofabitch, just excruciating pain. Worse than anything, felt like torture. While the eyes stayed open, I noticed that the shots had a bad effect on my health. My head swam, literally: when they sat me up, it spun around on its axis like a globe on a spindle. My eyes were fixed and glazed; I didn't look at the people who talked to me, or if I did I didn't blink.
The sweats were the worst. My body felt like it was on fire. My limbs shook with a palsy-like tremor, and my skin burned. I couldn't focus my thoughts, and so my words came out of a delirium. I couldn't see how anyone could possibly jam this stuff in their veins daily. It would destroy me. And how much fun was it? Not much! I made it through the night because I had no choice.
In the early morning, the orderlies took me to OR. I lay there for a while in the bleak, white fluorescent light. The surgeon came and worked the final insult on my body by wrenching my foot back into its socket. He said it would prevent 'sheeting,' meaning massive tissue loss due to necrosis. Well, good! By the time I thought to ask if I would go into OR soon, I was already out. The anesthesiologist was a witch doctor.
Finally, I had bad problems detoxing from even this brief encounter with 'Good Old M.' After I got to a safe place to recuperate. I found that when I shut my eyes to sleep I found myself in the Other Place.  I could not hide, because this horror only existed within my own mind. One night I was menaced by a giant cat-headed creature. I had a night of what I can only call 'whips and jingles,' with crazy music playing in my head and no rest for the wicked. When I felt most wretched and exhausted, all I could think of was frenetic rock guitar, any which way I tried. I wanted sleep, but my body tossed and rolled like a rag doll, all of its own accord. My meds were generic Percocet, but my nerves wanted something stronger, obviously.
In conclusion, I have to say again that I cannot imagine the discomfort and sickness brought on by daily abuse of this drug. Its entertainment value is negative, IMHO. And the limited withdrawals I suffered were ghastly. Just as beautiful as the full-sensory daydream had been, the nightmare was that bad plus more. Fortunately, like a thrill ride at the amusement park, this experiment had a protracted duration and a couple of built-in caretakers. However, all that said, I would have died of shock in the ambulance if not for that dope. Someone once said of morphine, 'It's God's own medicine. If He made anything better, He kept it for the angels.' Too true.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


WITNESS LIST Public Education Committee March 27, 2001-2:00P HB 14 For: Schneider, Bruce (North East Independent School District) HB 447 Against: Hartman, Eric (Texas Federation of Teachers) On: Larson, Dohn (Texas Classroom Teachers) HB 457 For: Sullivan, Patricia (San Marcos Consolidated Independent School District) HB 801 For: Jones, Miles (Self) Koeltzow, Paul (Self) Against: Dunn, David (Texas Association of School Boards) Gerstenschlager, Merry Lynn (Self and Texas Eagle Forum) On: Smisko, Ann (Texas Education Agency) HB 1088 For: Boyd, Lynn (Blanco Independent School District) Pepper, Jim (Self and Blanco Independent School District and Texas Association of School Boards) HB 1142 For: Anderson, Wanda (Self and Davion Anderson) Brown, Rufus (Self) Camp, Ruama (Self) Campbell, Tammie (NAACP Texas State Conference) Deyon, Joyce (Self) Foster, Claude (Texas State Conference of NAACP) Gonzalez, Maria (Self) Guidry, Terry (Fifth Ward Enrichment and Parent Awareness Network Program Coordinator) Jones, Brenda (Self) Jones, Ken (Self) Lee, Ivy (Self) Rabbani, Estella (Self) Singleton, Valencia (Self) Williams, Lynn (Love our Children Parent Support Group for Children with Special Needs) Williams Jr., A.W. (Love Our Children Parent Support Group For Children With Special Needs) Against: McAdams, Donald (Self) HB 1532 For: Rastellini, David (New Braunfels Independent School District) On: Wisnoski, Joe (Texas Education Agency) HB 1553 On: Hartman, Eric (Texas Federation of Teachers) Larson, Dohn (Texas Classroom Teachers Association) HB 1843 For: Rodriquez, Luis (Judson Independent School District) HB 2079 Against: Brawner, Chuck (Texas Association of School District Police & Texas Municipal Police Assn.) HB 2104 For: Anderson, Wanda (Self and Davion Anderson) Brown, Rufus (Self) Camp, Ruama (Self) Campbell, Tammie (NAACP Texas State Conference) Deyon, Joyce (Self) Foster, Claude (Texas State Conference of NAACP) Fulk, Kirk (Self) Gonzalez, Maria (Self) Guidry, Terry (Fifth Ward Enrichment and Parent Awareness Network Program Coordinator) Jones, Brenda (Self) Jones, Ken (Self) Lee, Ivy (Self) Rabbani, Estella (Self) Singleton, Valencia (Self) Williams, Lynn (Love Our Children Parent Support Group For Children With Special Needs) Williams Jr., A.W. (Love Our Children Parent Support Group For Children With Special Needs) On: Covalt, Rosemary (Self) Fallon, Gayle (Houston Federation of Teachers) Gonzalez, Jose (Self) Hartman, Eric (Texas Federation of Teachers) Larson, Dohn (Texas Classroom Teachers Assn.) McAdams, Donald (Self) HB 2118 For: Escobar, Felicia (National Council of La Raza) Holst, Carol (Parents United to Reform TAAS Testing) Kauffman, Al (MALDEF) McNeil, Linda (Self) Sloan, Kris (Self) Valenzuela, Angela (Self) On: Lara, Rene (Texas Federation of Teachers) HB 2205 On: Wisnoski, Joe (Texas Education Agency) HB 2570 For: Escobar, Felicia (National Council of La Raza) Holst, Carol (Parents United to Reform TAAS Testing) Kauffman, Al (MALDEF) McNeil, Linda (Self) Sloan, Kris (Self) Valenzuela, Angela (Self) On: Lara, Rene (Texas Federation of Teachers) HB 2861 For: McInnis, John (Texas Business and Education Coalition and Texas Association of School Boards) Stevens, John (Texas Business and Education Coalition) On: Hartman, Eric (Texas Federation of Teachers) Larson, Dohn (Texas Classroom Teachers) HB 2862 For: Stevens, John (Texas Business and Education Coalition) On: Hartman, Eric (Texas Federation of Teachers) HB 3112 On: Hartman, Eric (Texas Federation of Teachers) SB 189 For: Rohde, Margaret (Harris County Juvenile Justice Alternative Education Program) SB 206 For: Hartman, Eric (Texas Federation of Teachers)


--- layout: page title: Projects permalink: /Projects/ ---
MsgPack headers and interface functions for R
Performance oriented statistical metrics and utility functions in R
Neural network cox proportional hazards for survival analysis
A lightweight game launcher for Dungeons and Dragons Online
A 3D graphing program written using three.js


Source code for charcnn.data
# -*- coding: utf-8 -*-
"""
Dataset for the cnn. Input a compressed csv with two columns and no header,
where the first column is the class and the second column is a piece of text.
The functions in here will convert the text to a representation the cnn can
use for learning, using the Tensorflow Dataset API.
"""
import tensorflow as tf
# gzipped trainset file on cloud storage
DATA_CLOUD_TRAINSET = 'gs://char-cnn-datsets/dbpedia/train.csv.gz'
# unknown character integer encoding
UNK = 1
# non printable charcter. hacks around broken utf-8 string_split, see the
# comments in `input_function`.
SPLIT_CHAR = '\a'
# reserve a range from 0. unk: 1, padding: 0.
N_VOCAB_RESERVED = 2
[docs]def input_function(file_name,
vocab,
classes,
max_len=1014,
shuffle=False,
repeat_count=1,
batch_size=1,
shuffle_buffer_size=1):
"""
Featurized examples.
The character splitting hack is due to this open tensorflow bug:
https://github.com/tensorflow/tensorflow/pull/12971.
To work around this, we interleave the string with a non printable
character (BEEP). This character must consequently never be present
in the source material. This character was chosen because text is highly
unlikely to include BEEP characters, and also because it is < 128,
which is required to make this hack work.
"""
# map into [1,n], leaving 0, n_vocab_reserved free
vocab_mapped = list(range(N_VOCAB_RESERVED, len(vocab) + N_VOCAB_RESERVED))
# total vocab size
n_vocab = len(vocab_mapped) + N_VOCAB_RESERVED
# number of classes
n_classes = len(classes)
def fn():
d = tf.contrib.lookup.KeyValueTensorInitializer(vocab,
vocab_mapped,
key_dtype=tf.string,
value_dtype=tf.int32)
table = tf.contrib.lookup.HashTable(d, UNK)
ds = (tf.data.TextLineDataset(file_name, compression_type='GZIP')
.map(lambda line: tf.decode_csv(line, [[-1], [''], ['']]))
.map(lambda y, title, abstract: (title + abstract, y))
.map(lambda x, y: (tf.regex_replace(x, '.', '\\0%s' % SPLIT_CHAR), y))
.map(lambda x, y: (tf.string_split([x], delimiter=SPLIT_CHAR).values, y))
.map(lambda x, y: (x[0:max_len], y))
.map(lambda x, y: (table.lookup(x), y))
.map(lambda x, y: (x, tf.one_hot(y, n_classes)))
.map(lambda x, y: (tf.one_hot(x, n_vocab), y))
.map(lambda x, y: ({'chars_input': x}, y))
.repeat(repeat_count))
if shuffle:
ds = ds.shuffle(buffer_size=shuffle_buffer_size)
return ds.padded_batch(batch_size,
padded_shapes=({
'chars_input': [max_len, n_vocab]}, [n_classes]))
return fn
[docs]def input_generator(input_fn):
"""
Evaluated tensors.
"""
ds = input_fn()
iterator = ds.make_initializable_iterator()
init_op = iterator.initializer
next_element = iterator.get_next()
with tf.Session() as sess:
sess.run(tf.tables_initializer())
sess.run(init_op)
while True:
try:
yield sess.run(next_element)
except tf.errors.OutOfRangeError:
break


--- layout: page title: ASCII Camera description: Experimental real-time ASCII camera ---
Characters to use (darkest first):
Color (experimental):


The Aumorean Federation is a loose network of a few dozen planets and moons (and many more mining colonies) in a small cluster of the galaxy. The people of these planets have committed to peaceful trade and freedom of movement, enforced by an interplanetary fleet of police ships. While space travel remains dangerous, the emergence of the federation has created a semblance of stability in the area, keeping pirates on their toes.
 Now is the time to go on an adventure!


This will be replaced by the content of loading.html
This will be replaced by the content of allnav.html
Marca Produto
This will be replaced by the content of bottom.html This will be replaced by the content of footer.html
This will be replaced by the content of scripts.html


Louise Jensen
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Will this work? no
This is my most favorite class of all time. I will remember it forever!
This content as a
break.
This is italics tag
This is bold tag
This is bold tag
- Sushi
- Sandwhich
- Chicken
- Quesdilla
- Cookies
- Ice Cream
- Vanilla
- Chocolate
- Cookies and Cream
- Cake
Address Tag
Louise Jensen
5100 Brunson Drive
Block Quote
This is important information that I found from wikipedia
Table tags
| Item |
Price |
| Cupcakes |
$3.00 |
Absolute link
Click here to visit google.com
click here to go back
File Images


CSS Line Images
Images are an important part of any web application. Including a lot of images in a web application is generally not recommended, but it is important to use the images wherever they required. CSS helps us to control the display of images in web applications.
The styling of an image in CSS is similar to the styling of an element by using the borders and margins. There are multiple CSS properties such as border property, height property, width property, etc. that helps us to style an image.
Let's discuss the styling of images in CSS by using some illustrations.
Thumbnail Image
The border property is used to make a thumbnail image.
Example
Output:
Transparent image
To make an image transparent, we have to use the opacity property. The value of this property lies between 0.0 to 1.0, respectively.
Example
Output:
Center an Image
We can center an image by using the left-margin and right-margin property. We have to set these properties to auto in order to make a block element.
Example
Output:


Tests with Calculated Results¶
There are currently three test types that allow you to calculate test results using snippets of Python code. These tests include Composite, String Composite & Upload.
Composite Tests¶
Composite tests allow you to do calculations to produce a numberical test result based on other test values ( e.g. to calculate a dose based on a raw electrometer reading and temperature & pressure ). When you select Composite for the test Type field, a Calculation Procedure box will be displayed.
In this box you must enter a snippet of Python code where you must set the value of this tests macro name. Two examples are shown below, first, a one liner to calculate a temperature-pressure correction factor:
Note that in QATrack+ versions prior to 0.2.7 the last line of code had to be a line that set a``result`` variable to the final calculated result. This is no longer the recommended way to use composite tests although it is still supported for backwards compatability.
and second a slightly more complicated multi-line snippet that collects a group of readings and calculates the average value of them.
Note that in both the previous examples the snippets depend on the
values of other tests. In the first, temp_solid_water
,
raw_pressure
and temp_corr
are the macro names corresponding
to Temperature, Pressure and Pressure Correction tests. Likewise
in the second snippet, the average reading result depends on ten other
tests (Readings 1 through 10 with macro names r1, r2...r10
).
While the previous two examples are fairly simple, all the control structures of the Python programming language are available including loops, if-else statements, list comprehensions etc.
The composite calculation environment¶
When your script (calculation procedure) is executed, it has access to
- the current value of all the tests in the current test list being performed
- the Python math module, along with NumPy and SciPy.
- REFS & TOLS variables which are dictionaries of reference and tolerance values for all of the tests.
- A META variable which is a dictionary of some potentially useful information about the test list currently being performed including:
- test_list_name - Name of current test list
- unit_number - Unit number
- cycle_day - Current cycle day being performed (Always 1 for non-cycle test lists)
- work_completed - Python datetime object with current work_completed value
- work_started - Python datetime object with current work_started value
- username - Username of person performing test
The snippet below shows a composite calculation which takes advantage of the SciPy stats library to perform a linear regression and return the intercept as the result.
NumPy and SciPy provide access to a huge number of robust and fast mathematical functions and it is highly recommended you look through their documentation to see what is available.
An example calculation procedure using the META variable:
unit_number = META["unit_number"]
user = META["username"]
if user == 'bob' and unit_number == 42:
do_something()
An example calculation using the REFS variable:
diff = 100*(my_test_name - REFS["my_test_name"])/REFS["my_test_name"]
An example calculation using the TOLS variable:
if diff > TOLS["my_test_name"]["act_high"]:
some_other_value = 1
else:
some_other_value = 2
Composite tests made up of other composite tests¶
QATrack+ has a primitive dependency resolution system and it is therefore safe to create composite values that depend on other composite values as they will be calculated in the correct order.
A note about division for people familiar with Python¶
In Python versions 2.x the calculation a = 1/2
will result in a
being set to the value 0
and not 0.5 like many people would expect.
This is because Python2.x uses integer
division
by default. This behaviour can be overridden so that
(1/2 == 0.5) == True
in Python by adding
from __future__ import division
to the top of your Python script.
from __future__ import division
is automatically added to every
composite calculation procedure. If you specifically require integer
division you must explicitly use the floor division operator, two
forward slashes (//)
This was done to cut down on confusion caused by people unfamiliar with the way Python handles division as well as provide compatability with the 3.x versions of Python in the future.
String Composite Tests¶
The String Composite test type are the same as the Composite test type described above with the exception that the calculated value should be a string rather than a number. An example Composite String test is shown below.
Upload Tests¶
Upload test types allow the user to attach arbitrary files (text,
images, spreadsheets etc) which can then be analyzed with a Python
snippet similar to the composite tests above. The uploaded file object
is made available in the calculation context with the variable name
FILE
(more information on file objects is available in the Python
documentation.
The calculation procedure can return any JSON serializable object (number, string, list, dict etc) and then (optionally) other composite tests can make use of the returned results. An example of this is given below.
Imagine we have a text file with the following contents:
01/01/2013, 25.1
01/02/2013, 23.2
01/03/2013, 25.2
01/04/2013, 24.0
01/05/2013, 24.0
01/06/2013, 25.5
Where the first column is some dates and the second column is temperature. For our test list we want to upload this file and calculate and save the average (Average Temperature) , max (Maximum Temperature) and min temperatures (Minimum Temperature).
First we define our upload test and procedure for analyzing the file. We
will call our Upload test Temperatures
and give it a macro name of
temp_stats
.
The calculation procedure we will use is:
temperatures = []
for line in FILE:
line = line.strip()
if line.find(',')>=0: # ignore any line without temperature data
date, temp = line.split(',') # split up the line into date and temperature columns
temp = float(temp.strip()) # strip whitespace and convert to float
temperatures.append(temp) # add temp to our list
# set our macro_name to a dictionary containing the values
# we are interested in
temp_stats = {
"max": max(temperatures),
"min": min(temperatures),
"avg": sum(temperatures)/len(temperatures),
}
We can then define three composite tests to store our calculated
results. The calculation procedure required for Average Temp is simply
avg_temp = temp_stats['avg']
and the complete test definition is
shown below:
An example test list made of these 4 tests is shown below as it is being performed:


swprintf
, fwprintf
, wprintf
—wide character format outputSynopsis
#include <wchar.h> int wprintf(const wchar_t *format, ...); int fwprintf(FILE *__restrict fd, const wchar_t *__restrict format, ...); int swprintf(wchar_t *__restrict str, size_t size, const wchar_t *__restrict format, ...); int _wprintf_r(struct _reent *ptr, const wchar_t *format, ...); int _fwprintf_r(struct _reent *ptr, FILE *fd, const wchar_t *format, ...); int _swprintf_r(struct _reent *ptr, wchar_t *str, size_t size, const wchar_t *format, ...);
Description
wprintf
accepts a series of arguments, applies to each a
format specifier from *format
, and writes the
formatted data to stdout
, without a terminating NUL
wide character. The behavior of wprintf
is undefined if there
are not enough arguments for the format or if any argument is not the
right type for the corresponding conversion specifier. wprintf
returns when it reaches the end of the format string. If there are
more arguments than the format requires, excess arguments are
ignored.
fwprintf
is like wprintf
, except that output is directed
to the stream fd rather than stdout
.
swprintf
is like wprintf
, except that output is directed
to the buffer str with a terminating wide NUL
, and the
resulting string length is limited to at most size wide characters,
including the terminating NUL
. It is considered an error if the
output (including the terminating wide-NULL
) does not fit into
size wide characters. (This error behavior is not the same as for
snprintf
, which swprintf
is otherwise completely analogous to.
While snprintf
allows the needed size to be known simply by giving
size=0, swprintf
does not, giving an error instead.)
For swprintf
the behavior is undefined if the output
*str
overlaps with one of the arguments. Behavior is also
undefined if the argument for %n
within *format
overlaps another argument.
format is a pointer to a wide character string containing two
types of objects: ordinary characters (other than %
),
which are copied unchanged to the output, and conversion
specifications, each of which is introduced by %
. (To
include %
in the output, use %%
in the format string.)
A conversion specification has the following form:
%[pos][flags][width][.prec][size]type
The fields of the conversion specification have the following meanings:
Conversions normally consume arguments in the order that they
are presented. However, it is possible to consume arguments
out of order, and reuse an argument for more than one
conversion specification (although the behavior is undefined
if the same argument is requested with different types), by
specifying pos, which is a decimal integer followed by
’$’. The integer must be between 1 and <NL_ARGMAX> from
limits.h, and if argument %n$
is requested, all earlier
arguments must be requested somewhere within format. If
positional parameters are used, then all conversion
specifications except for %%
must specify a position.
This positional parameters method is a POSIX extension to the C
standard definition for the functions.
flags is an optional sequence of characters which control
output justification, numeric signs, decimal points, trailing
zeros, and octal and hex prefixes. The flag characters are
minus (-
), plus (+
), space ( ), zero (0
), sharp
(#
), and quote ('
). They can appear in any
combination, although not all flags can be used for all
conversion specification types.
'
A POSIX extension to the C standard. However, this
implementation presently treats it as a no-op, which
is the default behavior for the C locale, anyway. (If
it did what it is supposed to, when type were i
,
d
, u
, f
, F
, g
, or G
, the
integer portion of the conversion would be formatted
with thousands’ grouping wide characters.)
-
The result of the conversion is left justified, and the right is padded with blanks. If you do not use this flag, the result is right justified, and padded on the left.
+
The result of a signed conversion (as
determined by type of d
, i
, a
,
A
, e
, E
, f
, F
, g
, or
G
) will always begin with a plus or minus
sign. (If you do not use this flag, positive
values do not begin with a plus sign.)
" " (space)
If the first character of a signed conversion
specification is not a sign, or if a signed
conversion results in no characters, the
result will begin with a space. If the space
( ) flag and the plus (+
) flag both
appear, the space flag is ignored.
0
If the type character is d
, i
,
o
, u
, x
, X
, a
, A
,
e
, E
, f
, F
, g
, or G
: leading
zeros are used to pad the field width
(following any indication of sign or base); no
spaces are used for padding. If the zero
(0
) and minus (-
) flags both appear,
the zero (0
) flag will be ignored. For
d
, i
, o
, u
, x
, and X
conversions, if a precision prec is
specified, the zero (0
) flag is ignored.
Note that 0
is interpreted as a flag, not
as the beginning of a field width.
#
The result is to be converted to an alternative form, according to the type character.
The alternative form output with the # flag depends on the type character:
o
Increases precision to force the first digit of the result to be a zero.
x
A non-zero result will have a 0x
prefix.
X
A non-zero result will have a 0X
prefix.
a, A, e, E, f, or F
The result will always contain a decimal point even if no digits follow the point. (Normally, a decimal point appears only if a digit follows it.) Trailing zeros are removed.
g or G
The result will always contain a decimal point even if no digits follow the point. Trailing zeros are not removed.
all others
Undefined.
width is an optional minimum field width. You can
either specify it directly as a decimal integer, or
indirectly by using instead an asterisk (*
), in
which case an int
argument is used as the field
width. If positional arguments are used, then the
width must also be specified positionally as *m$
,
with m as a decimal integer. Negative field widths
are treated as specifying the minus (-
) flag for
left justfication, along with a positive field width.
The resulting format may be wider than the specified
width.
prec is an optional field; if present, it is
introduced with ‘.
’ (a period). You can specify
the precision either directly as a decimal integer or
indirectly by using an asterisk (*
), in which case
an int
argument is used as the precision. If
positional arguments are used, then the precision must
also be specified positionally as *m$
, with m as a
decimal integer. Supplying a negative precision is
equivalent to omitting the precision. If only a
period is specified the precision is zero. The effect
depends on the conversion type.
d, i, o, u, x, or X
Minimum number of digits to appear. If no precision is given, defaults to 1.
a or A
Number of digits to appear after the decimal point. If no precision is given, the precision defaults to the minimum needed for an exact representation.
e, E, f or F
Number of digits to appear after the decimal point. If no precision is given, the precision defaults to 6.
g or G
Maximum number of significant digits. A precision of 0 is treated the same as a precision of 1. If no precision is given, the precision defaults to 6.
s or S
Maximum number of characters to print from the string. If no precision is given, the entire string is printed.
all others
undefined.
size is an optional modifier that changes the data type that the corresponding argument has. Behavior is unspecified if a size is given that does not match the type.
hh
With d
, i
, o
, u
, x
, or
X
, specifies that the argument should be
converted to a signed char
or unsigned
char
before printing.
With n
, specifies that the argument is a
pointer to a signed char
.
h
With d
, i
, o
, u
, x
, or
X
, specifies that the argument should be
converted to a short
or unsigned short
before printing.
With n
, specifies that the argument is a
pointer to a short
.
l
With d
, i
, o
, u
, x
, or
X
, specifies that the argument is a
long
or unsigned long
.
With c
, specifies that the argument has
type wint_t
.
With s
, specifies that the argument is a
pointer to wchar_t
.
With n
, specifies that the argument is a
pointer to a long
.
With a
, A
, e
, E
, f
, F
,
g
, or G
, has no effect (because of
vararg promotion rules, there is no need to
distinguish between float
and double
).
ll
With d
, i
, o
, u
, x
, or
X
, specifies that the argument is a
long long
or unsigned long long
.
With n
, specifies that the argument is a
pointer to a long long
.
j
With d
, i
, o
, u
, x
, or
X
, specifies that the argument is an
intmax_t
or uintmax_t
.
With n
, specifies that the argument is a
pointer to an intmax_t
.
z
With d
, i
, o
, u
, x
, or
X
, specifies that the argument is a size_t
.
With n
, specifies that the argument is a
pointer to a size_t
.
t
With d
, i
, o
, u
, x
, or
X
, specifies that the argument is a
ptrdiff_t
.
With n
, specifies that the argument is a
pointer to a ptrdiff_t
.
L
With a
, A
, e
, E
, f
, F
,
g
, or G
, specifies that the argument
is a long double
.
type specifies what kind of conversion wprintf
performs. Here is a table of these:
%
Prints the percent character (%
).
c
If no l
qualifier is present, the int argument shall
be converted to a wide character as if by calling
the btowc() function and the resulting wide character
shall be written. Otherwise, the wint_t argument
shall be converted to wchar_t, and written.
C
Short for %lc
. A POSIX extension to the C standard.
s
If no l
qualifier is present, the application
shall ensure that the argument is a pointer to a
character array containing a character sequence
beginning in the initial shift state. Characters
from the array shall be converted as if by repeated
calls to the mbrtowc() function, with the conversion
state described by an mbstate_t object initialized to
zero before the first character is converted, and
written up to (but not including) the terminating
null wide character. If the precision is specified,
no more than that many wide characters shall be
written. If the precision is not specified, or is
greater than the size of the array, the application
shall ensure that the array contains a null wide
character.
If an l
qualifier is present, the application
shall ensure that the argument is a pointer to an
array of type wchar_t. Wide characters from the array
shall be written up to (but not including) a
terminating null wide character. If no precision is
specified, or is greater than the size of the array,
the application shall ensure that the array contains
a null wide character. If a precision is specified,
no more than that many wide characters shall be
written.
S
Short for %ls
. A POSIX extension to the C standard.
d or i
Prints a signed decimal integer; takes an
int
. Leading zeros are inserted as
necessary to reach the precision. A value of 0 with
a precision of 0 produces an empty string.
o
Prints an unsigned octal integer; takes an
unsigned
. Leading zeros are inserted as
necessary to reach the precision. A value of 0 with
a precision of 0 produces an empty string.
u
Prints an unsigned decimal integer; takes an
unsigned
. Leading zeros are inserted as
necessary to reach the precision. A value of 0 with
a precision of 0 produces an empty string.
x
Prints an unsigned hexadecimal integer (using
abcdef
as digits beyond 9
); takes an
unsigned
. Leading zeros are inserted as
necessary to reach the precision. A value of 0 with
a precision of 0 produces an empty string.
X
Like x
, but uses ABCDEF
as digits
beyond 9
.
f
Prints a signed value of the form
[-]9999.9999
, with the precision
determining how many digits follow the decimal
point; takes a double
(remember that
float
promotes to double
as a vararg).
The low order digit is rounded to even. If
the precision results in at most DECIMAL_DIG
digits, the result is rounded correctly; if
more than DECIMAL_DIG digits are printed, the
result is only guaranteed to round back to the
original value.
If the value is infinite, the result is
inf
, and no zero padding is performed. If
the value is not a number, the result is
nan
, and no zero padding is performed.
F
Like f
, but uses INF
and NAN
for
non-finite numbers.
e
Prints a signed value of the form
[-]9.9999e[+|-]999
; takes a double
.
The digit before the decimal point is non-zero
if the value is non-zero. The precision
determines how many digits appear between
.
and e
, and the exponent always
contains at least two digits. The value zero
has an exponent of zero. If the value is not
finite, it is printed like f
.
E
Like e
, but using E
to introduce the
exponent, and like F
for non-finite
values.
g
Prints a signed value in either f
or e
form, based on the given value and
precision—an exponent less than -4 or
greater than the precision selects the e
form. Trailing zeros and the decimal point
are printed only if necessary; takes a
double
.
G
Like g
, except use F
or E
form.
a
Prints a signed value of the form
[-]0x1.ffffp[+|-]9
; takes a double
.
The letters abcdef
are used for digits
beyond 9
. The precision determines how
many digits appear after the decimal point.
The exponent contains at least one digit, and
is a decimal value representing the power of
2; a value of 0 has an exponent of 0.
Non-finite values are printed like f
.
A
Like a
, except uses X
, P
, and
ABCDEF
instead of lower case.
n
Takes a pointer to int
, and stores a count
of the number of bytes written so far. No
output is created.
p
Takes a pointer to void
, and prints it in
an implementation-defined format. This
implementation is similar to %#tx
), except
that 0x
appears even for the NULL pointer.
m
Prints the output of strerror(errno)
; no
argument is required. A GNU extension.
_wprintf_r
, _fwprintf_r
, _swprintf_r
, are simply
reentrant versions of the functions above.
Returns
On success, swprintf
return the number of wide characters in
the output string, except the concluding NUL
is not counted.
wprintf
and fwprintf
return the number of characters transmitted.
If an error occurs, the result of wprintf
, fwprintf
, and
swprintf
is a negative value. For wprintf
and fwprintf
,
errno
may be set according to fputwc
. For swprintf
, errno
may be set to EOVERFLOW if size is greater than INT_MAX / sizeof (wchar_t),
or when the output does not fit into size wide characters (including the
terminating wide NULL
).
Bugs
The “”’ (quote) flag does not work when locale’s thousands_sep is not empty.
Portability
POSIX-1.2008 with extensions; C99 (compliant except for POSIX extensions).
Depending on how newlib was configured, not all format specifiers are supported.
Supporting OS subroutines required: close
, fstat
, isatty
,
lseek
, read
, sbrk
, write
.


[ A | B | C | D | E | F | G | H | I | J | K | L | M N | O | P | Q | R | S | T | U | V | W | X | Y | Z ]
© Copyright Mithral Communications & Design Inc. 1995-. All rights reserved. Mithral® and Cosm® are trademarks of Mithral Communications & Design Inc. Document last modified:


#include <tinyxml.h>
Public Methods | |
| TiXmlHandle (TiXmlNode *node) | |
| Create a handle from any node (at any depth of the tree.) This can be a null pointer. | |
| TiXmlHandle (const TiXmlHandle &ref) | |
| Copy constructor. | |
| TiXmlHandle | FirstChild () const |
| Return a handle to the first child node. | |
| TiXmlHandle | FirstChild (const char *value) const |
| Return a handle to the first child node with the given name. | |
| TiXmlHandle | FirstChildElement () const |
| Return a handle to the first child element. | |
| TiXmlHandle | FirstChildElement (const char *value) const |
| Return a handle to the first child element with the given name. | |
| TiXmlHandle | Child (const char *value, int index) const |
| Return a handle to the "index" child with the given name. More... | |
| TiXmlHandle | Child (int index) const |
| Return a handle to the "index" child. More... | |
| TiXmlHandle | ChildElement (const char *value, int index) const |
| Return a handle to the "index" child element with the given name. More... | |
| TiXmlHandle | ChildElement (int index) const |
| Return a handle to the "index" child element. More... | |
| TiXmlNode * | Node () const |
| Return the handle as a TiXmlNode. This may return null. | |
| TiXmlElement * | Element () const |
| Return the handle as a TiXmlElement. This may return null. | |
| TiXmlText * | Text () const |
| Return the handle as a TiXmlText. This may return null. |
Note that TiXmlHandle is not part of the TinyXml DOM structure. It is a separate utility class.
Take an example:
<Document> <Element attributeA = "valueA"> <Child attributeB = "value1" /> <Child attributeB = "value2" /> </Element> <Document>
Assuming you want the value of "attributeB" in the 2nd "Child" element, it's very easy to write a *lot* of code that looks like:
TiXmlElement* root = document.FirstChildElement( "Document" ); if ( root ) { TiXmlElement* element = root->FirstChildElement( "Element" ); if ( element ) { TiXmlElement* child = element->FirstChildElement( "Child" ); if ( child ) { TiXmlElement* child2 = child->NextSiblingElement( "Child" ); if ( child2 ) { // Finally do something useful.
And that doesn't even cover "else" cases. TiXmlHandle addresses the verbosity of such code. A TiXmlHandle checks for null pointers so it is perfectly safe and correct to use:
TiXmlHandle docHandle( &document ); TiXmlElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", 1 ).Element(); if ( child2 ) { // do something useful
Which is MUCH more concise and useful.
It is also safe to copy handles - internally they are nothing more than node pointers.
TiXmlHandle handleCopy = handle;
What they should not be used for is iteration:
int i=0; while ( true ) { TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", i ).Element(); if ( !child ) break; // do something ++i; }
It seems reasonable, but it is in fact two embedded while loops. The Child method is a linear walk to find the element, so this code would iterate much more than it needs to. Instead, prefer:
TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).FirstChild( "Child" ).Element(); for( child; child; child=child->NextSiblingElement() ) { // do something }
|
|
Return a handle to the "index" child. The first child is 0, the second 1, etc. |
|
|
Return a handle to the "index" child with the given name. The first child is 0, the second 1, etc. |
|
|
Return a handle to the "index" child element. The first child element is 0, the second 1, etc. Note that only TiXmlElements are indexed: other types are not counted. |
|
|
Return a handle to the "index" child element with the given name. The first child element is 0, the second 1, etc. Note that only TiXmlElements are indexed: other types are not counted. |


Here is some sample code for how to change cameras using the DG_CONTROL / DAT_FILESYSTEM operations.
TW_FILESYSTEM fs;
TW_STR255 cameraname[3];
// For loop used to discover available cameras...
memset(cameraname,0,sizeof(cameraname));
for (rc = (*pDSM_Entry)
(&AppId,&SourceId,
DG_CONTROL,
DAT_FILESYSTEM,
MSG_GETFIRSTFILE,(TW_MEMREF)&fs);
rc == TWRC_SUCCESS;
rc = (*pDSM_Entry)
(&AppId,&SourceId,
DG_CONTROL,
DAT_FILESYSTEM,
MSG_GETNEXTFILE,(TW_MEMREF)&fs)) {
// This is the combined front / rear camera...
// In each case, just take the first one we find...
if (fs.FileType == TWFY_CAMERA) {
if (!cameraname[0][0]) strcpy(cameraname[0],fs.OutputName);
// This is the front camera...
} else if (fs.FileType == TWFY_CAMERA_TOP) {
if (!cameraname[1][0]) strcpy(cameraname[1],fs.OutputName);
// This is the rear camera...
} else if (fs.FileType == TWFY_CAMERA_BOTTOM) {
if (!cameraname[2][0]) strcpy(cameraname[2],fs.OutputName);
}
}
// Change to the front camera...
strcpy(fs.InputName,cameraname[1]);
rc = (*pDSM_Entry)
(&AppId,&SourceId,
DG_CONTROL,
DAT_FILESYSTEM,
MSG_CHANGEDIRECTORY,(TW_MEMREF)&fs);
// Set some front capabilities, like ICAP_CONTRAST
...
// Change to the rear camera...
strcpy(fs.InputName,cameraname[2]);
rc = (*pDSM_Entry)
(&AppId,&SourceId,
DG_CONTROL,
DAT_FILESYSTEM,
MSG_CHANGEDIRECTORY,(TW_MEMREF)&fs);
// Set some rear capabilities, like ICAP_CONTRAST
...
// Change back to the combined camera (have to do
// this before scanning starts, but can also do
// this to simultaneously change front and rear
// values). Note that this is the default camera
// when the Source is first started...
strcpy(fs.InputName,cameraname[0]);
rc = (*pDSM_Entry)
(&AppId,&SourceId,
DG_CONTROL,
DAT_FILESYSTEM,
MSG_CHANGEDIRECTORY,(TW_MEMREF)&fs);
...


Offers item-response theory (IRT) ideal-point estimation for binary, ordinal, counts and continuous responses with time-varying and missing-data inference. Full and approximate Bayesian sampling with 'Stan' (www.mc-stan.org).
| Version: | 0.5.1 |
| Depends: | methods, R (≥ 3.4.0), Rcpp (≥ 0.12.18) |
| Imports: | rstan (≥ 2.18.2), rstantools (≥ 1.5.1), dplyr, tidyr, stringr, bayesplot, ggplot2, lazyeval, rlang, shinystan, gghighlight, forcats, ggrepel |
| LinkingTo: | StanHeaders (≥ 2.18.0), rstan (≥ 2.18.2), BH (≥ 1.66), Rcpp (≥ 0.12.7), RcppEigen (≥ <IP_ADDRESS>.0) |
| Suggests: | pscl, loo, lubridate, R.rsp |
| Published: | 2018-12-06 |
| Author: | Robert Kubinec [aut, cre], Jonah Gabry [ctb], Ben Goodrich [ctb], Trustees of Columbia University [cph] |
| Maintainer: | Robert Kubinec <rmk7 at nyu.edu> |
| BugReports: | https://github.com/saudiwin/idealstan/issues |
| License: | GPL-2 | GPL-3 [expanded from: GPL] |
| NeedsCompilation: | yes |
| SystemRequirements: | GNU make |
| Citation: | idealstan citation info |
| Materials: | README NEWS |
| In views: | MissingData |
| CRAN checks: | idealstan results |
| Reference manual: | idealstan.pdf |
| Vignettes: |
How to Evaluate Models Introduction to Idealstan Time-Varying Ideal Points |
| Package source: | idealstan_0.5.1.tar.gz |
| Windows binaries: | r-devel: idealstan_0.5.1.zip, r-release: idealstan_0.5.1.zip, r-oldrel: idealstan_0.5.1.zip |
| OS X binaries: | r-release: idealstan_0.5.1.tgz, r-oldrel: idealstan_0.5.1.tgz |
| Old sources: | idealstan archive |
Please use the canonical form https://CRAN.R-project.org/package=idealstan to link to this page.


CHECK FOR THE AVAILABLE BOOKS
bookS
TITLE:
AUTHOR:
YEAR:
CATEGORY
Choose your option
detective
crime
fiction
motivational
educational
SEND


crosswalkr
crosswalkr
Overview
This package offers a pair of functions, renamefrom()
and
encodefrom()
, for renaming and encoding data frames using external
crosswalk files. It is especially useful when constructing master data
sets from multiple smaller data sets that do not name or encode
variables consistently across files. Based on renamefrom
and
encodefrom
Stata commands written by Sally Hudson and
team.
Installation
Install the latest release version from CRAN with
install.packages('crosswalkr')
Install the latest development version from Github with
devtools::install_github('btskinner/crosswalkr')
Usage
library(crosswalkr)
library(dplyr)
library(haven)
## starting data frame
df <- data.frame(state = c('Kentucky','Tennessee','Virginia'),
fips = c(21,47,51),
region = c('South','South','South'))
df
## state fips region
## 1 Kentucky 21 South
## 2 Tennessee 47 South
## 3 Virginia 51 South
## crosswalk with which to convert old names to new names with labels
cw <- data.frame(old_name = c('state','fips'),
new_name = c('stname','stfips'),
label = c('Full state name', 'FIPS code'))
cw
## old_name new_name label
## 1 state stname Full state name
## 2 fips stfips FIPS code
Renaming
Convert old variable names to new names and add labels from crosswalk.
df1 <- renamefrom(df, cw_file = cw, raw = old_name, clean = new_name, label = label)
df1
## stname stfips
## 1 Kentucky 21
## 2 Tennessee 47
## 3 Virginia 51
Convert old variable names to new names using old names as labels (ignoring labels in crosswalk).
df2 <- renamefrom(df, cw_file = cw, raw = old_name, clean = new_name, name_label = TRUE)
df2
## stname stfips
## 1 Kentucky 21
## 2 Tennessee 47
## 3 Virginia 51
Convert old variable names to new names, but keep unmatched old names in the data frame.
df3 <- renamefrom(df, cw_file = cw, raw = old_name, clean = new_name, drop_extra = FALSE)
df3
## stname stfips region
## 1 Kentucky 21 South
## 2 Tennessee 47 South
## 3 Virginia 51 South
Encoding
## starting data frame
df <- data.frame(state = c('Kentucky','Tennessee','Virginia'),
stfips = c(21,47,51),
cenregnm = c('South','South','South'))
df
## state stfips cenregnm
## 1 Kentucky 21 South
## 2 Tennessee 47 South
## 3 Virginia 51 South
## use state crosswalk data file from package
cw <- get(data(stcrosswalk))
cw
## # A tibble: 51 x 7
## stfips stabbr stname cenreg cenregnm cendiv cendivnm
## <int> <chr> <chr> <int> <chr> <int> <chr>
## 1 1 AL Alabama 3 South 6 East South Central
## 2 2 AK Alaska 4 West 9 Pacific
## 3 4 AZ Arizona 4 West 8 Mountain
## 4 5 AR Arkansas 3 South 7 West South Central
## 5 6 CA California 4 West 9 Pacific
## 6 8 CO Colorado 4 West 8 Mountain
## 7 9 CT Connecticut 1 Northeast 1 New England
## 8 10 DE Delaware 3 South 5 South Atlantic
## 9 11 DC District of Columbia 3 South 5 South Atlantic
## 10 12 FL Florida 3 South 5 South Atlantic
## # … with 41 more rows
Create a new column with factor-encoded values
df$state2 <- encodefrom(df, var = state, cw_file = cw, raw = stname, clean = stfips, label = stabbr)
df
## state stfips cenregnm state2
## 1 Kentucky 21 South KY
## 2 Tennessee 47 South TN
## 3 Virginia 51 South VA
Create a new column with labelled values.
## convert to tbl_df
df <- tibble::as_tibble(df)
df$state3 <- encodefrom(df, var = state, cw_file = cw, raw = stname, clean = stfips, label = stabbr)
Create new column with factor-encoded values (ignores the fact that df
is a tibble)
df$state4 <- encodefrom(df, var = state, cw_file = cw, raw = stname, clean = stfips, label = stabbr, ignore_tibble = TRUE)
Show factors with labels:
as_factor(df)
## # A tibble: 3 x 6
## state stfips cenregnm state2 state3 state4
## <chr> <dbl> <chr> <fct> <fct> <fct>
## 1 Kentucky 21 South KY KY KY
## 2 Tennessee 47 South TN TN TN
## 3 Virginia 51 South VA VA VA
Show factors without labels:
zap_labels(df)
## # A tibble: 3 x 6
## state stfips cenregnm state2 state3 state4
## <chr> <dbl> <chr> <fct> <int> <fct>
## 1 Kentucky 21 South KY 21 KY
## 2 Tennessee 47 South TN 47 TN
## 3 Virginia 51 South VA 51 VA


Modules
| Initializer | Script that initializes inputs and generates a bunch of Minesweeper boards |
Classes
| Board | Class that represents a board of Minesweeper |
| Mine | Class that represents a mine (i.e. |
| TextPart | Class that represents a part with some text displayed on it. |
| Tile | Class that represents one single MineSweeper regular tile (with no mine on it) |
| MouseInputsManager | Static class for registering and reacting to mouse inputs |


---
layout: default
---
Particl Desktop is our flagship product and is the best application to begin using PART. All available and in-development features are bundled in Desktop.
Downloads
Particl Desktop is Particl’s main GUI wallet. It’s beautiful and feature-rich client, recommended for most users.
To enable Open Marketplace, you need to create a new wallet named Market
.
Particl Qt is suitable for everyone and highly recommended for beginners, as it's feature-rich, user-friendly and easy to setup. Download latest release, double-click Particl executable (in bin/
directory) and you're done.
Particl-cli offers all the essential features, but doesn't include all the advanced bells and whistles of Particl graphical clients. Particl-cli is recommended for advanced users.
Copay is a secure multi-coin wallet for Particl and Bitcoin, supporting desktop and mobile devices.
Particl Desktop |
Particl Qt |
Particl-cli |
Particl Copay |
Feature |
|---|---|---|---|---|
| Opensource | ||||
| Send/receive (public) PART coins | ||||
| Send/receive (private) Blind and Anon tokens | ||||
| Staking | ||||
| Signing/verifying of messages | ||||
| Advanced wallet management, coin control | ||||
| Access to Particl Marketplace | ||||
| Multisignature | ||||
| HD Wallet | ||||
| Hardware wallet support (Ledger) | ||||
| Multiple Wallets | ||||
| Support Fiat Currencies | ||||
| Platform |


XMC4500 Web Server Demo
404 - Page not found
Sorry, the page you are requesting was not found on this server.


Kjetil Tonstad is a Data Engineering and Microsoft Azure Expert working for Statoil in Norway.
Table of Contents
| Note |
|---|
|
This is a "User Page" (click for a list of all user pages on TechNet Wiki). User pages on TechNet Wiki exist for the following reasons:
|
Introduction
Kjetil has experience with integration since 2006, and is currently working with Big Data and Data Platform technologies in Microsoft Azure. Have also been performing advisory tasks, architectural design, BizTalk/BizTalk360 installations and configuration, and BizTalk health checks. Certified expert on all available BizTalk versions since 2006, and holds MCITP, MCSA, MCDST, MCTS, MCPS and ITIL certifications. Kjetil has participated in Microsoft Technology Adoption Programs, and was awarded Most Valuable Contributor for BizTalk Server 2010. Microsoft has also benchmarked one of his business critical enterprise environments as top 10% in the EMEA region. Awarded BizTalk360 Product Specialist. Always interested in learning new technology, and recently completed the Microsoft Professional Program in Big Data and Data Science. Educated Master of Information Technology, with specialization in system development and project management.Profile
Kjetil's TechNet/MSDN profile:https://social.technet.microsoft.com/profile/kjetil%20tonstad/
TechNet Wiki
All Kjetil's Wiki articles he authored or co-authored:- Automatic MSDTC Setup for BizTalk Server [BizTalk Technical Guru Bronze Award - June 2015]
- BizTalk Application Management Checklists [BizTalk Technical Guru Gold Award - June 2015]
- Visual Guide to Getting Started with Azure PowerShell
- BizTalk Training, Exams and Certifications
- Automating BizTalk Stop Before Planned Maintenance [BizTalk Technical Guru Silver Award - July 2015]
- How To Make BizTalk Process Messages Slowly [BizTalk Technical Guru Bronze Award - July 2015]
- BizTalk Server PowerShell Installation Toolkit [BizTalk Technical Guru Gold Award - October 2015]
- BizTalk Server Health Check PowerShell Script
- First Look at BizTalk Server 2016
- Top 10 Tips From a BizTalk Admin to BizTalk Developers [BizTalk Technical Guru Gold Award - May 2016]
- 22x Latency Improvement In BizTalk Without Changing The Code [BizTalk Technical Guru Gold Award - July 2016]
- Azure Logic Apps & BizTalk 2016 Integration
- BizTalk Server 2016: Hardware and Software Requirements
- When to Move BizTalk to Azure IaaS [BizTalk Technical Guru Silver Award - September 2016]
- BizTalk Server: Download Prerequisite CAB-files [BizTalk Technical Guru Bronze Award - November 2016]
- Cortana Intelligence Suite Resources on the TechNet Wiki [Azure Technical Guru Gold Award - January 2017]
- Introduction to Cortana Intelligence Suite
- Check Contents of the BizTalk MessageBox Spool Table [BizTalk Technical Guru Gold Award - February 2017]
- Data Platform - Tools of the Trade [Azure Technical Guru Gold Award - June 2017]
- Azure Data Lake Store PowerShell Toolkit [Azure Technical Guru Bronze Award - July 2017]
TechNet Gallery
Kjetil has made the following contributions to the code gallery:- BizTalk Server: Host Dependencies
- BizTalk Server: Setup MSDTC
- Update PowerShell Help Files
- BizTalk Server: Slowly Running Host
- BizTalk Server: Stop BizTalk Before Planned Maintenance
- BizTalk Server: Installation PowerShell Toolkit
- BizTalk Server Health Check PowerShell Script
- BizTalk Server: Spool Size
- Validate Computer Name
- Download BizTalk Prerequisite CAB files
- BizTalk Server: Contents in Spool Table
- Azure Data Lake Store PowerShell Toolkit
Certifications
Kjetil has the following certifications:- Microsoft Certified Desktop Support Technician - Windows XP [April 2006]
- Microsoft Certified Technology Specialist - BizTalk Server 2006, Custom Applications [June 2007]
- Microsoft Certified Technology Specialist - Developing XML solutions with Microsoft Office [June 2007]
- Microsoft Certified Technology Specialist - Windows Vista Configuration [June 2008]
- Microsoft Certified Information Technology Professional - Enterprise Support Technician [June 2008]
- Microsoft Certified Technology Specialist - BizTalk Server 2006R2, Custom Applications [December 2009]
- Microsoft Certified Systems Administrator - Windows Server 2003 [May 2010]
- Microsoft Certified Technology Specialist - Windows Server 2008 Network Infrastructure, Configuration [October 2010]
- Microsoft Certified Technology Specialist - Windows Server 2008 Active Directory, Configuration [October 2010]
- Microsoft Certified Technology Specialist - Developing Business Process and Integration Solutions by Using Microsoft BizTalk Server 2010 [November 2011]
- Microsoft Certified Technology Specialist - System Center Operations Manager 2007, Configuring [June 2012]
- Microsoft Certified Solutions Associate - Windows Server 2008R2 [December 2012]
- Microsoft Certified Information Technology Professional - Windows Server 2008R2 Server Administrator [December 2012]
- Microsoft Certified Solutions Associate - SQL Server 2012/2014 [June 2015]
- Microsoft Certified Solutions Associate - Cloud Platform [November 2016]
- Microsoft Certified Solutions Developer - Azure Solutions Architect [February 2017]
- Microsoft Certified Solutions Expert - Cloud Platform and Infrastructure [February 2017]
- Microsoft Professional Program - Data Science [April 2017]
- Microsoft Certified Solutions Expert - Data Management and Analytics [July 2017]
- Microsoft Professional Program - Big Data [October 2017]
Honors, Awards & Interviews
Kjetil has received the following awards:- Most Valuable Contributor: BizTalk Server 2010 Technology Adoption Program [Microsoft - September 2010]
- Top 10% BizTalk environments in EMEA region [Microsoft - May 2014]
- BizTalk360 Product Specialist [BizTalk360 - June 2015]
- Interview with a TechNet Ninja: Kjetil Tonstad [November 2016]
- Microsoft TechNet BizTalk Technical Guru [2015-2017]
- Microsoft TechNet Azure Technical Guru [2017]
- Microsoft TechNet Guru Awards
- 7x Gold
- 2x Silver
- 4x Bronze
Events
Kjetil has been speaking at the following public events:
- What's New In BizTalk Server 2016 - Norwegian BizTalk User Group (NoBUG) - Oslo [September 2016]
- Cloud Integration Technologies - Global Integration Bootcamp 2017 - Oslo [March 2017]


TIMOTHY LEARY'S DEAD A film review by Steve Rhodes Copyright 1997 Steve Rhodes
RATING (0 TO ****): ** 1/2
"It is my ambition to really liberate the world. Why not? Why settle for anything less? And I have a sense of humor about it. I know the odds are against me. But we only have a few years here. Let's try to leave this, uh, spaceship a better place."
-Timothy Leary (1920-1996)
Paul Davids's documentary about Timothy Leary, the canonical 60s radical and proponent of the drug culture, is as fascinating as it is one-sided. The title, TIMOTHY LEARY'S DEAD, is taken from the name of a once popular song, which is one of the better songs on the movie's soundtrack.
The documentary focuses on Leary, a relentlessly upbeat and happy fellow, and his views on everything, but especially drugs. Davids uses a chronological structure starting with Leary's childhood and bringing us up to 1996 when Leary died at the age of 75. This linear ordering is overlaid with recent interviews with Leary's friends from the 60s.
The film works as an insider's view into a group of people who even today have complete faith in psychedelic drugs. Some still cling to their belief in the power of drugs whereas others just dismiss drug taking as a harmless vice of youth. One interviewee claims that many of today's best doctors and lawyers used to turn on and drop out.
Leary was a Ph.D. in Psychology who taught at Harvard in the 60s until he was fired for espousing notions very unpopular with the administration. ("LSD is an extremely powerful, mind opening agent. We are now in the psycho, chemical age. In the future it's not going to be what book you read, but what chemical do you use to open your mind to accelerate learning.") He saw no downside to his theories and took no responsibility for any negative effects on his followers.
The film has brief segments with a uniformed cop and with an author to state the case that hard drugs are not good for you. Robert Prehoda, author of a book on Leary, states the opposition to Leary's ideas succinctly: "The drug revolution in America was a disaster, and, to the extent that Timothy Leary promoted that, he was the high priest of the drug revolution." These segments, however, are so short that they smack of tokenism.
The film does provide an effective study of radical non- conformity. The players in this tragedy are not ghetto dwellers, but rich kids and adults. Leary at one point lived on a 3000 acre estate in a 63 room house, thanks to one of his followers. Kids from all over the world flocked to live with them on the grounds since the drugs there were so plentiful and powerful. They danced day and night, naked and stoned. In a recent interview one of the leaders of the camp claimed that they were careful to insure that the kids who came there to use the drugs were made "in some way safe." Exactly how they pulled off that miracle is never explained.
Although the film suffers from repetition, the candid interviews are mesmerizing in their naivete. (His friends compare Leary to many great figures of history, including Socrates.) The grainy, black and white, old video clips and the songs recreate an era that many have forgotten or never knew.
The most shocking aspect of the film is not the ideas pontificated, but the picture's ending. It seems that Leary, with his inflated view of the power of his brain, wanted his head frozen so his brain could be preserved for future generations. We "get" to witness the actual decapitation. And it is as horrific as it sounds.
TIMOTHY LEARY'S DEAD runs 1:16. It is not rated but would be R or perhaps NC-17. It contains nudity, drug usage and discussion, and a gory operation. It is not a film for teenagers as the happy high priest and his friends could easily leave the impression on less questioning minds that drugs are pretty cool after all. I recommend the documentary to adults who will probably be as surprised and engrossed by it as I was. I give it ** 1/2. With less repetition and a more balanced treatment, I could have easily rated it higher.
**** = A must see film. *** = Excellent show. Look for it. ** = Average movie. Kind of enjoyable. * = Poor show. Don't waste your money. 0 = Totally and painfully unbearable picture.
REVIEW WRITTEN ON: June 21, 1997
Opinions expressed are mine and not meant to reflect my employer's.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


This intention converts
if
statement containing conjunction operation into two nested
if
statements with simplified conditions.


Innovative tools for mapping and modelling species distributions
In this workshop, participants will use the Atlas of Living Australia (ALA) and the Biodiversity and Climate Change Virtual Laboratory (BCCVL) to explore species data and ecological models to understand the relationships between species and their environment.
We will show how you can use the ALA Spatial Portal to learn about key features, data quality issues, cleaning data and environmental layers. We will then introduce the basic elements of species distribution models and climate change projections, including the data required to run the models, the differences across various model algorithms and how to appropriately interpret and evaluate the results of model outputs. Workshop participants will access national datasets in the BCCVL to run a species distribution model and then project the results into the future using a climate change projection with a number of different emission scenarios.
These tools provide a great resource to introduce the concepts of data discovery and ecological modelling. The workshop is aimed at researchers that are interested in ecology, environmental science, climate change impacts and conservation.
No complex coding/statistical knowledge is required. Just bring your laptop, and we'll provide access to a wealth of data and modelling tools.


I design and build mobile, responsive and desktop applications.
Specializing in designing user-centric experiences, simplified navigation concepts and componetized layouts, my preffered methodology is to rapidly prototype for mobile, desktop or responsive applications, enabling the team to gather enough testing data to prove out the hypothesis and reiterate where neccesary, all the while perfecting the design and content to achieve greater margins of success.
The Javascript stack is where I maily find myself working mostly these days, whether it be rapidly iterating through fully-functional prototypes or building out and testing large-scale front-end applications, whether it be using React, Angular or Polymer. My preferred approach is using automated build tools like Gulp in conjuction with Postcss for many applications, like this website, and while agnostic in regards to CSS variants and frameworks, I can easily implement solutions using Bootstrap, Foundation or other frameworks, including home-grown solutions.
In the past I have worked as a consultant with firms in the educational, financial and pharmaceutical industries such as Cengage Learning, Fidelity Management & Resource Company, State Street Global Advisors, Johnson & Johnson, Pfizer and ADQSR. Outside of large firms, I have also worked with startup ventures like Rapid7, MallNetworks, Wis.dm and Gobi.com.
MyCengage was a front-end implemetation project based on an existing design to allow for students to easily purchase the appropriate material for their courses along with supplemental product bundles that were not easily available in the Cengage's system. The html and css were implemented in components to allow for easy implementation and reusability.
The prototype and its associated code can be viewed at https://github.com/jayfallon/mycengage.
Cengage Magma was the name chosen for Cengage's internal implementation of the Bootstrap CSS framework that enables designers and developers to use and implement both the organization's visual langage and standard code components across multiple projects without the need to reinvent or improvise upon the established standards. This website was created in an effort to provide product and development teams with style and code examples beyond those found in a customized Bootstrap implementation.
The application and its associated code can be viewed at https://github.com/jayfallon/magma-website.
Magma is Cengage's implementation of the Bootstrap CSS framework, which was chosen due to it's short learning curve, large user base and ease of integration into both existing and new applications. Magma was created in an effort to standardize Cengage's approach to component design while facilitating development, implementation and testing.
The application and its associated code can be viewed at https://github.com/jayfallon/magma-framework.
4LTR Press Online is a Cengage product for students who are looking for a high-value, low-cost solution. While utilizing Cengage's core licensed content, it is an entirely separate solution managed and developed outside of the company's traditional workflow. My responsibilities included extensive development to the existing codebase along with providing design solutions and implementation for multiple components for the platform.
More information about 4LTR Press Online can be found athttp://solutions.cengage.com/4LTR-Press/.
MindTap is a personal learning environment that contains Activities (Readings, Assignments, Apps) that instructors and students use in a course. As a platform, it enables instructors to add activites for students in both a reading and homework environment along with associated data, grading and behavior tracking applications as add-ons. My responsibilities for MindTap 3 was bug-fixing while converting the platform's code from JavaScriptMVC to Angular. For MindTap versions 4 and 5, I worked alongside various design and development teams to ensure html, css and functionality stardards were followed and implemented.
More information about Cengage MindTap can be found athttps://www.cengage.com/services/product/mindtap.
I helped Fiftythree rebuild and transform their existing support website by architecting a framework coupled with workflows that would allow non-technical support team members to update and deploy content without the aid of content management systems or blogging frameworks.
More information about Fiftythree's Support website can be found athttps://support.fiftythree.com/hc/en-us.
Coming onto the project during a critical phase, I worked alongside the design and product team to update, rework and create dashboard views for integration in a JSF platform while providing user experience guidance and consultation.
More information about MineralTree can be found athttps://www.mineraltree.com/.
I worked together with the product and engineering teams to bring about a simpler and more concise user experience, providing working prototypes, wireframes and analysis. Conceptualized with a working title of Razor, the product would later be released as UserInsight, gathering data on butt service usage from within client organizations.
A prototype of my work for Rapid7 can be found athttps://github.com/jayfallon/spalding.
Working alongside Style Me Pretty's ownership, design, engineering and customer service teams, I helped craft a solution that would transform the company's website from a static offering to a more interactive and responsive approach.
More information about Style Me Pretty can be found athttp://www.stylemepretty.com/.
Given a finalized visual design, I developed the website using the Radiant CMS, extending basic functionality with jQuery to enable customer engagement with free trials and class appointments.
More information about The Ring Boxing Club can be found athttp://www.ringboxingclub.com/club.


Encapsulates typical MVC view functionality. Note that BFF lacks a separate controller module and it is not wrong put controller logic in BFF Views.
The intended way to combine BFF Records/Lists and Views into some kind or MVC-like pattern is as follows:
- Views listen to DOM events, and reacts to those by mutating data layer entities (such as models or lists of models)
- Views also listen to data layer events and reacts to those, possibly by further mutating the data layer (i.e. controller logic), but most importantly by re-rendering themselves.
Another way of describing the above is that the views should, besides listening to user generated events, always strive to visually represent the data layer as truthfully as possible. A powerful and simple approach to achieving this is to re-render the whole view whenever the data layer changes.
The three major issues to deal with when re-rendering an entire view are:
- Loss of view state. This is a generic problem, that thankfully has an easy solution; store all application state in the data layer. A typical way of doing this is to assign a view state model to views that are not stateless.
- Loss of event listeners. The typical solution to this is event delegation, which is also the soliution that BFF Views provide. All event listeners are registered on the view's root element and as long as the root elements is not replaced, the event listeners will be unaffecte by a re-render.
- Visual flickering. Replacing large chunks of the visual DOM may cause flickering. BFF Views work around this issue by using an approach similar to that of React, namely by differentially updating the DOM. This means doing an offline diff and then only updating the parts of the DOM that have actually changed.
new (require("bff/view"))()
Creates a new View instance.
Members
-
children :module:bff/list
-
A list of this view's child views. Initially empty.
Type:
-
el :HTMLElement|undefined
-
The root DOM element of the view. The default implementation of module:bff/view#render assigns to and updates this element. Delegated event listeners, created by calling module:bff/view#listenTo are attached to this element.
Replacing the current element with another will clear all currently delegated event listeners - it is usually a better approach update the element (using e.g. module:bff/patch-dom) instead of replacing it.Type:
- HTMLElement | undefined
Methods
-
<static> makeSubclass(properties)
-
Creates a subclass constructor function, that will create view instances with the properties (typically functions) provded to this function.
Parameters:
Name Type Description properties
Object The properties with which the View subclass' prototype will be extended.
Returns:
- Type
- function
-
$(queryString)
-
Scoped query selector, that only queries this view's DOM subtree.
Parameters:
Name Type Description queryString
string CSS selector string
-
addChild(childView [, optional])
-
Adds another view as a child to the view. A child view will be automatically added to this view's root element and destroyed whenever its parent view is destroyed.
Parameters:
Name Type Argument Description childView
module:bff/view The view that will be added to the list of this view's children.
optional
HTMLElement | boolean <optional>
An element to which the child view's root element will be appended. If not specified, it will be appended to this view's root element. Can also be
false
, in which case the child view will not be appended to anything. -
destroy()
-
Destroys a view instance by removing its children, stop listening to all events and finally removing itself from the DOM.
-
destroyChildren()
-
Destroy all child views of this view.
-
forceRepaint( [el])
-
Helper function that forces the view's root element to be repainted. Useful when re-triggering CSS animations.
Parameters:
Name Type Argument Description el
HTMLElement <optional>
Element that will be forced to repaint. If not specified, will default to the view's root element.
Returns:
Useless/arbitrary value, but the function needs to return it to prevent browser JS optimizations from interfering with the forced repaint.
- Type
- number
-
getHtml()
-
Returns an HTML string representation of the view in its current state. Its is used by the default implementation of
render()
, where its return value is parsed and becomes the view's DOM representation. -
listenTo(selectorStr, eventName, callback [, context])
-
Augments bff/event-listener#listenTo with functionality for listening to delegated DOM events, by specifying a CSS selector string instead of an event emitter. The actual listener will implicitly be registered on this view's root element. Not the the "mouseenter" and "mouseleave" events does not bubble, so they might not behave as expected - "mouseover" and "mouseout" events on the other hand do bubble.
Parameters:
Name Type Argument Description selectorStr
string | Object | Array | NodeList The CSS selector string that will be used to filter all events bubbling up to the listener. If anything other than a string passed, the original listenTo implementation will be used.
eventName
string | Array One or more string identifiers for events that will be listented to.
callback
function The function that will be called when the event is emitted.
context
any <optional>
The context with which the callback will be called (i.e. what "this" will be).
Will default to the caller of .listenTo, if not provided. -
parseHtml(htmlString, returnAll)
-
Helper function that parses an HTML string into an HTMLElement hierarchy and returns the first element in the NodeList, unless the returnAll flag is true, in which case the whole node list is returned.
Parameters:
Name Type Description htmlString
string The string to be parsed
returnAll
boolean If true will return all top level elements
-
render( [patchOptions])
-
Creates a DOM element representation of the view, based on the HTML string returned by the getHtml() function and then assigns it to the view's
el
property. If the view already has anel
, it will be patched instead of replaced, so that delegated event listeners will be preserved.Parameters:
Name Type Argument Description patchOptions
Object <optional>
Options object forwarded to the
patch()
function, in case it is called. -
requestRender()
-
Requests an animation frame, in which
render()
is called. Can be called several times during a tick witout any performance penalty. -
stopListening( [selectorStr] [, eventName])
-
Augments bff/event-listener#stopListening with functionality for stop listening to delegated DOM events.
Parameters:
Name Type Argument Description selectorStr
string | Object <optional>
If provided, only delegated event callbacks for the given selector string will be removed. The special wildcard value
*
means any selector. If anything other than a string passed, the original stopListening implementation will be used.eventName
string <optional>
If provided, only callbacks attached to the given event name will be removed.
-
toString()
-
Returns:
A human readable representation of the View, containing valuable debugging information.
- Type
- string


Default
Default
place
1
Coulson
Coulson
remove_circle
place
Normal icon
place
Tinted icon
Brno
Brno
Chip
Button
disabled
selected
activated
tinted
red
green
blue
TODO
foreground text should be white in [selected] and [activated] in [dark] theme


Waterloo Brewing loses $2.1-million in ‘sophisticated’ cyberattack
Waterloo Brewing Ltd. says it has lost $2.1 million after scammers convinced the company to send money to a fraudulent third-party account.
The Ontario brewery said Thursday that the “sophisticated” attack in November involved the impersonation of a creditor employee asking for multiple wire transfers.
After discovering the scheme, the company said it initiated an analysis of all other transaction activity across all of its bank accounts, as well as a review of its internal systems and controls that included its computer networks to prevent further attacks.
“The company...is working with its auditors and bank to ensure that appropriate steps have been taken to mitigate the chance of any future occurrences of similar cyberattacks,” it said in a news release.
The brewer said it does not believe that its systems were breached, or that any personal information of its customers is at risk.
It said it was still actively trying to recover the funds, and has notified relevant authorities, but said there are no assurances any money is forthcoming.
The brewery is just the latest to fall for online schemes where fraudsters impersonate actual employees to ask for money transfers.
MacEwan University in Alberta lost $11.8 million in 2017 after fraudsters impersonated a vendor and asked the university to transfer accounts payable to a new bank account.
This past April, the City of Ottawa treasurer transferred nearly US$100,000 to a fake supplier after scammers posed as the city manager.
The Canadian Anti-Fraud Centre recommends employees know how to verify requests for money before making payments.


setlists¶
A setlist
is an ordered, indexed collection with unique elements.
It it more than just an ordered Set
in that the elements are accessible by index (ie. not just a linked set).
However, setlist
’s are not comparable like sets or lists. Equality
testing still works, but setlist(('a', 'c')) < setlist(('a', 'b'))
does not
because we’d have to choose to compare by order or by set comparison.
There are two classes provided:
collections_extended.setlist
This is a mutable setlist
collections_extended.frozensetlist
This is a frozen (implements
collections.abc.Hashable
) version of a setlist.
Both classes implement collections.abc.Sequence
, collections.abc.Set
Examples¶
>>> from collections_extended import setlist
>>> import string
>>> sl = setlist(string.ascii_lowercase)
>>> sl
setlist(('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'))
>>> sl[3]
'd'
>>> sl[-1]
'z'
>>> 'r' in sl # testing for inclusion is fast
True
>>> sl.index('m') # so is finding the index of an element
12
>>> sl.insert(1, 'd') # inserting an element already in raises a ValueError
Traceback (most recent call last):
...
raise ValueError
ValueError
>>> sl.index('d')
3
Compared to existing similar implementations¶
Most implementations I’ve see are ordered sets where items are not accessible by index.
Compared to Standard Types¶
setlist vs. list¶
Inclusion testing is O(1)
Finding an element is O(1)
Adding an element that is already present raises a ValueError
setlist vs. set¶
Elements are ordered and accessible by index
- Adding an element is as slow as adding to a list
Amortized O(n) for arbitrary insertions
O(1) for appending
New Methods¶
Swapping values doesn’t work (see Quirks) so some things don’t work. To work around that a couple of methods were added:
setlist.swap(i, j)()
to swap elementssetlist.shuffle(random=None)()
instead of random.shuffle(setlist)
Errors¶
Some methods will raise a ValueError
when trying to add or remove elements
when they respectively already or do not currently exist in the setlist.
Each method has an analogous version that does/doesn’t raise a ValueError.
Methods implementing the Set methods do not raise ValueError
while the one’s
implementing do. All will raise TypeError
if you use unhashable values.
The bulk operations are atomic, if any single value is unhashable or a duplicate,
no changes will be made to the setlist
.
Raises |
No |
Yes |
|---|---|---|
Interface |
|
|
Add a single value |
|
|
Add multiple values |
|
|
Remove a single value |
|
|
Remove multiple values |
|
|
The setlist constructor by defualt does not raise ValueError
on duplicate values
because we have to choose one or the other and this matches the behavior of Set.
There is a flag raise_on_duplicate
that can be passed to __init__
to
raise a ValueError
if duplicate values are passed.
Quirks¶
- Swapping elements, eg.
sl[0], sl[1] = sl[1], sl[0]
, doesn’t work because it is implemented by first setting one element then the other. But since the first element it tries to set is still in the setlist, nothing happens. This causes random.shuffle not to work on a setlist.
- Swapping elements, eg.
API¶
SetList¶
-
class
collections_extended.
SetList
(iterable=None, raise_on_duplicate=False)[source]¶ Bases:
collections.abc.Sequence
,collections.abc.Set
A setlist is an ordered Collection of unique elements.
SetList is the superclass of setlist and frozensetlist. It is immutable and unhashable.
-
__init__
(iterable=None, raise_on_duplicate=False)[source]¶ Create a setlist, initializing from iterable if present.
- Parameters
iterable (Iterable) – Values to initialize the setlist with.
raise_on_duplicate – Raise a ValueError if any duplicate values are present.
-
count
(value)[source]¶ Return the number of occurrences of value in self.
This runs in O(1)
- Parameters
value – The value to count
- Returns
1 if the value is in the setlist, otherwise 0
- Return type
int
-
index
(value, start=0, end=None)[source]¶ Return the index of value between start and end.
By default, the entire setlist is searched.
This runs in O(1)
- Parameters
value – The value to find the index of
start (int) – The index to start searching at (defaults to 0)
end (int) – The index to stop searching at (defaults to the end of the list)
- Returns
The index of the value
- Return type
int
- Raises
ValueError – If the value is not in the list or outside of start - end
IndexError – If start or end are out of range
-
union
(other)[source]¶ Return the union of sets as a new set.
(i.e. all elements that are in either set.)
-
intersection
(other)[source]¶ Return the intersection of two sets as a new set.
(i.e. all elements that are in both sets.)
-
difference
(other)[source]¶ Return the difference of two or more sets as a new set.
(i.e. all elements that are in this set but not the others.)
-
symmetric_difference
(other)[source]¶ Return the symmetric difference (disjuntive union) of two sets.
(i.e. all elements that are in one set but not both.)
-
sub_index
(sub, start=0, end=None)[source]¶ Return the index of a subsequence.
This runs in O(len(sub))
- Parameters
sub (Sequence) – An Iterable to search for
start (int) – The index at which to start the search
end (int) – The index at which to end the search
- Returns
The index of the first element of sub
- Return type
int
- Raises
ValueError – If sub isn’t a subsequence
TypeError – If sub isn’t iterable
IndexError – If start or end are out of range
-
setlist¶
-
class
collections_extended.
setlist
(iterable=None, raise_on_duplicate=False)[source]¶ Bases:
collections_extended.setlists.SetList
,collections.abc.MutableSequence
,collections.abc.MutableSet
A mutable (unhashable) setlist.
-
insert
(index, value)[source]¶ Insert value at index.
- Parameters
index (int) – Index to insert value at
value – Value to insert
- Raises
ValueError – If value already in self
IndexError – If start or end are out of range
-
append
(value)[source]¶ Append value to the end.
- Parameters
value – Value to append
- Raises
ValueError – If value alread in self
TypeError – If value isn’t hashable
-
extend
(values)[source]¶ Append all values to the end.
If any of the values are present, ValueError will be raised and none of the values will be appended.
- Parameters
values (Iterable) – Values to append
- Raises
ValueError – If any values are already present or there are duplicates in the passed values.
TypeError – If any of the values aren’t hashable.
-
__iadd__
(values)[source]¶ Add all values to the end of self.
- Parameters
values (Iterable) – Values to append
- Raises
ValueError – If any values are already present
-
remove
(value)[source]¶ Remove value from self.
- Parameters
value – Element to remove from self
- Raises
ValueError – if element is already present
-
remove_all
(elems_to_delete)[source]¶ Remove all elements from elems_to_delete, raises ValueErrors.
See also
discard_all
- Parameters
elems_to_delete (Iterable) – Elements to remove.
- Raises
ValueError – If the count of any element is greater in elems_to_delete than self.
TypeError – If any of the values aren’t hashable.
-
add
(item)[source]¶ Add an item.
Note
This does not raise a ValueError for an already present value like append does. This is to match the behavior of set.add
- Parameters
item – Item to add
- Raises
TypeError – If item isn’t hashable.
-
update
(values)[source]¶ Add all values to the end.
If any of the values are present, silently ignore them (as opposed to extend which raises an Error).
See also
extend
- Parameters
values (Iterable) – Values to add
- Raises
TypeError – If any of the values are unhashable.
-
discard_all
(elems_to_delete)[source]¶ Discard all the elements from elems_to_delete.
This is much faster than removing them one by one. This runs in O(len(self) + len(elems_to_delete))
- Parameters
elems_to_delete (Iterable) – Elements to discard.
- Raises
TypeError – If any of the values aren’t hashable.
-
discard
(value)[source]¶ Discard an item.
Note
This does not raise a ValueError for a missing value like remove does. This matches the behavior of set.discard
-
symmetric_difference_update
(other)[source]¶ Update self to include only the symmetric difference with other.
-