Why should we need to know about terminal I/O with all these nifty graphical user interfaces out there? Terminals are thing of the past, right? Sorry, in Unix, the terminal device driver controls a lot more than just terminals. modems, printers, direct connections to other computers, and other special devices that rely on streams of characters.
Terminal devices can be put into different states. The default state of the terminal when running in a shell is canonical mode, also known as cooked mode. In this mode, the terminal driver returns one line of data at a time from the terminal device. Any special characters are processed as they come into the device (^C, ^Z, etc.).
The second state the terminal can be in is noncanonical mode, or raw mode. In this state, the terminal device driver returns one character at a time without assembling lines of data. Also, special characters are not processed in this mode. Programs such as vi, pine, and elm use this mode for data input and output. This allows complete control of input and output characters.
A third state, one which Posix.1 defines, is the cbreak mode. This mode is similar to raw mode, except that the processing of special characters still takes place and the corresponding signals are raised for the special characters.
Things to remember about the Input and Output Queues:
All of the attributes that can be controlled in the terminal device
are contained in the termios structure. This structure is
defined as:
struct termios {
tcflag_t c_iflag; /* input flags */
tcflag_t c_oflag; /* output flags */
tcflag_t c_cflag; /* control flags */
tcflag_t c_lflag; /* local flags */
cc_t c_cc[NCCS]; /* control characters */
};
The c_iglag attribute is what controls any input
characteristics of the terminal (map CR to NL, ring bell on input
queue full, etc.). The c_oflag attribute is what you set to
control any output processing of the terminal (expand tabs to spaces,
map lowercase to uppercase on output, etc.). Most of the
c_oflag settings are not Posix compliant. The
c_cflag attribute is for setting the serial line attributes
(enable parity, set flow control, etc.). The c_lflag
attribute is for the settigns of the interface between the user and
the device driver (local echo, enable signals generated byt the
terminal, etc.).
This structure is used with two different functions,
tcgetattr() and tcsetattr(). The prototypes are as
follows:
#include <termios.h> int tcgetattr(int filedes, struct termios *termptr); int tcsetattr(int filedes, int opt, const struct termios *termptr); Both return: 0 if OK, -1 on error |
As the names suggest, tcgetattr() gets the current state of the terminal that the open file descriptor filedes points to, and tcsetattr() sets attributes for the terminal that filedes is associated with. These functions will return an error if the filedes argument is not associated with a terminal device.
The argument opt in tcsetattr() is for
specifying when the changes are to take place. This is defined by the
following macros:
| TCSANOW | Make the changes now. |
| TCSADRAIN | Make the changes after all output has been transmitted from the buffer. This should be used when setting output attributes. |
| TCSAFLUSH | Make the changes after all output has been transmitted, and flush the input queue of any unprocessed data. |
Sometimes you may find that you need to change the speed of the terminal dsession to match that of the device it is connected to. This is done with four functions in combination with the tcgetattr() and tcsetattr() functions.
#include <termios.h> speed_t cfgetispeed(const struct termios *termptr); speed_t cfgetospeed(const struct termios *termptr); Both return: baud rate value speed_t cfsetispeed(struct termios *termptr, speed_t speed); speed_t cfsetospeed(struct termios *termptr, speed_t speed); Both return: 0 if OK, -1 on error |
The first thing that must be done here in order to change the baud rate
of the terminal is use tcgetattr() so that you can pass the termios
struct to the cfset functions. You then pass the struct to the cfset functions
to set the correct baud rate in the termios struct. This does not actually
set the terminal speed, however. You still need to make a call to
tcsetattr() with termios struct that has the changed baud rate.
The line control for the terminal is important if you want to prevent overflowing the buffer for the device when there is no hardware flow control implemented. Also, you can flush the input and/or output of a device discarding any data that has not already been sent or read from the buffer.
#include <termios.h> int tcdrain(int filedes); int tcflow(int filedes, int action); int tcflush(int filedes, int queue); int tcsendbreak(int filedes, int duration); All four return: 0 if OK, -1 on error |
The tcdrain() function suspends the process until all of the data in the ouput buffer has been transmitted. The tcflow() function gives control over input and output flow control. The action argument to tcflow() can be any of the following macros:
| TCOOFF | Suspend Output |
| TCOON | Restart output |
| TCIOFF | Suspend input |
| TCION | Restart input |
The tcflush() function lets us discard input or output buffer data. Data in the input buffer is data that has been received but not read yet. Data in the output buffer is data that has been written but not transmitted yet. The queue argument can have the follow macro values:
| TCIFLUSH | Flush the input buffer |
| TCOFLUSH | Flush the output buffer |
| TCIOFLUSH | Flush both the input and output buffers |
The tcsendbreak() function transmits a continous stream of zero bits. If the duration attribute is set to 0, then the duration of the transmition is between 0.25 and 0.5 seconds. If the duration is nonzero, it is implementation specific. Under Linux, if the duration is nonzero, the length of transmission is duration*N seconds where N is between 0.25 and 0.5.
At some point in your career, you may want to find out what terminal device your process is attached to. In the old days, you could just open "/dev/tty" and that was the correct terminal for your process all of the time. Now, their is a POSIX.1 call that you can make to guarantee that you have the right name of your terminal device.
#include <stdio.h> char *ctermid(char *ptr); returns some stuff |
If ptr is not null, it must be an array of char's that is as large as or larger than the macro L_ctermid and the name of the controlling terminal is stored in this array. If ptr is null, then the name of the controlling terminal is stored in a static array. In both cases, a pointer to the first element of the array storing the name of the controlling terminal is returned.
Two really cool and usful functions are isatty() and ttyname().
#include <unistd.h> int isatty(int filedes); Returns: 1 if terminal device, 0 otherwise char *ttyname(int filedes); Returns: pointer to pathname of terminal, NULL on error |
These functions are useful in finding out if filedes is associated with a terminal device or not. Under the hood, the function ttyname(), searches through the terminal device files in /dev/ looking for a matching special file with the same device number and i-node number as filedes. If this statement made no since to you, just ignore it for now. :)
So, what is this cooked terminal mode anyway? When you read from the terminal, if the terminal returns a line at a time instead of each character as it is received, then you are in cooked (canonical) mode. There are a number of reasons that can make the read return:
Cooked mode is the default state of your terminal for almost all shells. At least when you execute another program with the shell, the terminal is put into cooked mode before it makes a call to an exec function.
Raw, or noncanonical for those that don't like raw, is a bit harder to explain. It doesn't necessarily return one byte at a time. You can also set a time limit for your read to return if the number of characters you want to get have not been received from the device. The first step in going into raw mode, no matter what form you want, is to turn off the flag ICANON for your terminal device. This makes it so the input is not put into lines before it is returned. It also makes so some of the special characters are not processed: ERASE, KILL, EOF, NL, EOL, EOL2, CR, REPRINT, STATUS, and WERASE.
So, how do we specify how long to wait for input and how many bytes to read before we return? There are two variables in the c_cc array in the termios structure that must be set: MIN and TIME. These elements are indexed by the macro defines VMIN and VTIME. MIN is the minimum number of bytes that are read in before returning (read blocks until MIN number of bytes have been read). TIME is the amount of time in tenths of a second to wait for data to arrive. So, here is the breakdown of the different cases:
This can be a little confusing at first, just read it a couple of times if you don't understand. Then let it mull over in your brain. Try writing a toy program for each case discussed above. Here is an example of the use of the c_cc variable:
struct termios trm; tcgetattr(STDIN_FILENO, &trm;); /* get the current settings */ trm.c_cc[VMIN] = 1; /* return after one byte read */ trm.c_cc[VTIME] = 0; /* block forever until 1 byte is read */ . . /* set some other stuff */ . tcsetattr(STDIN_FILENO, TCSANOW, &trm;); /* set the terminal with the new settings */
Some source code for raw mode taken from the Stevens book:
#include
Ever wonder how some terminal applications redraw the screen when you changed the size of your xterm? There is a structure that the kernel maintains for every terminal and pseudo terminal. This is the winsize struct:
struct winsize { unsigned short ws_row; /* rows in characters */ unsigned short ws_col; /* columns in characters */ unsigned short ws_xpixel; /* horizontal size in pixels (not used) */ unsigned short ws_ypixel; /* vertical size in pixels (not used) */ }
The signal SIGWINCH is sent to the forground process any time there is a change made to this strucure in the kernel. We can get the current value of this structure by making a call to ioctl with TIOCGWINSZ request:
struct winsize size; ioctl(STDIN_FILENO, TIOCGWINSZ, (char *) &size;);To change the structure in kernel memory, a call to ioctl is made with the TIOCSWINSZ request:
struct winsize size; ioctl(STDIN_FILENO, TIOCSWINSZ, (char *) &size;);
When you set the size of the structure in the kernel, if the size is different than it was previously, SIGWINCH is sent to the foreground process.


Manchester Girls: A Photographer’s Ode to the Resilient Women of the North
by Kemi Alemoru“They were equal parts intimidating and vulnerable, and they had such a distinct sense of style,” says Dean Davies of his new series Manchester Girls, created in collaboration with stylist Vicky Olschak
God bless Northern women. Strong and resilient in their outlook, as well as their ability to withstand the elements, no matter how grim. Dean Davies’ recent photo series, Manchester Girls is a hyperreal snapshot of womanhood in the Northern city, which includes many sartorial nods to gaudy mid-00s fashion.
With thick patent waist belts paired with spindly stiletto heels for the days when you’re out-out, versus trackies and gargantuan hoops for the days when you’re just chilling with friends (on the street), the photos eerily mirror the youth of most Manc millenials – myself included. The uncanny nature of the posed portraits is largely owing to the styling prowess of Davies’ collaborator Vicky Olschak, who he originally met in 2013 after they discovered each other’s work at a national graduation exhibit. The pair will now turn Manchester Girls into a photo book after a successful Kickstarter campaign to raise £6,000 exceeded its goal with the help of 65 backers.
Through the intimacy and playfulness of the portraits, Davies’ affinity to the North is palpable. This is not the first time he’s paid tribute to his roots: his photography portfolio includes shots of Sheffield’s goth community for AnOther, as well as portraits of the people of Birkenhead, Liverpool, New Brighton, and Salford. “I didn’t truly appreciate the North-West until I moved away,” he explains. “I began to miss its people, its architecture. I have vivid memories of playing on the street outside my family home, and of the interesting characters who lived locally.”
As such, we spoke to Davies about finding beauty in the ordinary and paying homage to the hometowns that made us.
Kemi Alemoru: How did this project come together?
Dean Davies: Manchester Girls was shot over the last two years and came about through Vicky Olschak and I wanting to work together on something close to home – I’m from Merseyside and Vicky is from Manchester. The two of us are very inspired by the North-West and its people, and through the series, we were looking to pay homage to our upbringing. [These images portray] the women and style trends of our adolescence, all of which has had a huge influence on the work we create today.
KA: Why did you feel the need to curate an ode to Northern women, what makes them so special to you?
DD: I wanted to centre the series on female friendship groups, inspired by those I grew up with. The women I grew up around have had a huge influence on my work – whether that’s women in my family, friendship groups I went to school and college with, or women from the local area. They were equal parts intimidating and vulnerable, they were women who were rarely seen away from their social groups, and had such a distinct sense of style. Manchester is my favourite city, and it has been a great source of inspiration to me, heavily featuring in my work over the last four to five years. What makes the city unique is its people, through their warmth and their inherent honesty. I cast all 13 friendship groups – 34 girls in total – who feature in this project; the girls are a combination of Manchester natives and those who have moved to the city. I was inspired by the idea of how a city can shape your identity, and how it becomes a part of you.
KA: To me, it looks just like my own youth in the city. How did you approach the styling?
DD: We had a number of discussions about style trends prominent throughout our youth, which Vicky then took inspiration from to create outfits for the girls. But I hope that people from elsewhere within the UK and beyond could identify with the fashion featured, and perhaps even see themselves, and their experiences of adolescence.
KA: Could you explain the film that accompanies these photos? It talks of the homeless community in Manchester, drug culture and has a nod to kebabs and the red-brick terraces around the city.
DD: Writer and director Dorny Sunday wrote a poem, which soundtracked the short film we created to accompany the launch of the project. To me, it says everything about the girls we were celebrating: their resilience, their love for the city and community, and again, their impeccable sense of style.
KA: How would you describe your style as a photographer?
DD: It is equal parts documentary and fiction. I am an image-maker operating within the context of fashion, and while I like my photographs to appear as if I have just walked past someone on the street and asked to take their picture, the images have been constructed. I like developing the character and narrative of the image.
KA: You’ve previously shot subcultures in nearby cities like Sheffield – why is it important that your work spotlights the style tribes and cultures of the North?
DD: I never really saw stories that represented me or my upbringing in fashion titles, apart from a shoot here or there, often shot by those with little or no connection to the region. It’s why I jump at any opportunity to represent the people and places of the region I grew up in, that have shaped me as a person and image-maker. While there is a lot to be said for work created by image-makers interpreting a new city or group of people, storytelling from real perspectives and experiences is inherently more honest, especially when it comes to people and style, and being able to identify with and spotlight style insights.
Head here for more information on Manchester Girls by Dean Davies and Vicky Olschak.


Examples¶
Rosenbrock Function¶
We can optimize the Rosenbrock function by building it sequentially.
from pyObjective import Variable, Model
"""
We can start by defining the objective function to minimize.
In this example, we use the classic Rosenbrock function, defined as
f(x,y) = (a - x)^2 + b(y - x^2)^2
where the minima lies at (x,y) = (a, a^2).
We can start by defining the variables
"""
x = Variable(name='x', value=1.5, bounds=(-2, 2))
y = Variable(name='y', value=1.5, bounds=(-1, 3))
"""
Since this method uses simulated annealing, the initial guess value is not needed,
but helps in checking if the function is being evaluated correctly.
Next, we create a model. The model contains the core functionality to evaluate and optimize the function.
"""
m = Model()
"""
Now, we must tell the model which variables to optimize over.
Internally, it maintains a list of variables that are to be optimized. If a variable is created but not added
to the model, it remains fixed at the prescribed value. """
m.add_var(x)
m.add_var(y)
"""
Next, we define the cost function. Notice, all the variables are defined as calls, using x() instead of x.
"""
def cost():
a = 1
b = 100
return (a - x()) ** 2 + b * (y() - x() ** 2) ** 2
"""
We can check that the cost is being evaluated correctly, simply by calling the cost.
"""
print(f"The cost is {cost()}")
"""
Finally, we must associate the cost function with the optimizer.
Notice, here the cost is passed without the brackets.
"""
m.objective = cost
"""Solve. The solution gets saved within the model"""
m.solve()
"""
We can print the results neatly. """
m.display_results()
Example using classes¶
The user can also define classes and use them instead.
from pyObjective import Variable, Model
import numpy as np
"""This example script is written to demonstrate the use of classes, and how more complicated models can be built,
and still passed to the solver. As a rudimentary example, it has two cubes and a sphere, and we are trying to find
the dimensions such that the cube1 - cube2 + sphere volume is minimized, subject to the bounds. """
# define a new class
class Cube:
def __init__(self, model):
self.x = Variable('x', 1, (0.5, 2), "cube length x")
self.y = Variable('y', 1, (0.5, 2))
self.z = Variable('z', 1, (0.5, 2))
model.add_var(self.x)
model.add_var(self.y)
model.add_var(self.z)
def volume(self):
return self.x() * self.y() * self.z()
# define a sphere, but keep the variable definition on the outside. For fun
class Sphere:
def __init__(self, radius):
self.r = radius
def volume(self):
return (4 / 3) * np.pi * self.r() ** 3 # unfortunate brackets needed in here, and not before :(
# define simulation model
m = Model()
# create cube
c1 = Cube(m)
c2 = Cube(m)
# define the sphere radius
r = Variable("r", 1, (0.5, 2), "sphere radius")
m.add_var(r) # try commenting this line, and you will see that it was removed from the optimization
s = Sphere(r)
# define objective function (to be minimized)
def cost():
return c1.volume() - c2.volume() + s.volume()
m.objective = cost
# solve
m.solve()
# display results
m.display_results()


{{description}}
The library is hosted on CDN.
{{code.cdnUrl}}
{{code.example1}}
{{code.example2}}
The properties provided to a Vue instance via data object are passed "as is". It's possible to define more dynamic behaviour using computed properties. For example, this is lowercase of page title: '{{lowerCase}}'
{{code.example3}}
HTML rendering is done via the Vue.js template language which allows insertion of variables from the data block.
{{code.example4}}
A Vue.js insertion points must contain a JavaScript expression.
{{code.example5}}But the following won't work:
{{code.example6}}Function calls are allowed expressions though.
{{code.example7}}
A Vue.js component is a reusable HTML element that can be used inside HTML templates. It needs to be registered as follows.
{{code.example8}}
Once defined component might be reused multiple times. It's also possible to parametrize a component via tag properties.


Keeping our employees, customers, vendor and the people around our facility safe is our number one priority.


World Happiness Report
Happiest
Rank 8
Rank 7
Rank 6
Rank 5
Rank 4
Rank 3
Rank 2
Saddest
Overview
Detail


{% include 'admin/_sidebar.html' %}
Delete Category
{{ wtf.quick_form(form) }}
Danger! All articles in this category will be delete!


java::new
).
References to unresolved classes will implicitly use the
TclClassLoader to find unresolved classes.
The process of resolving a class is done by searching for the class in the following locations.
CLASSPATH
via the system class loader.
java::load
command)
java::load
command)
env(TCL_CLASSPATH)
list, looking only in directories or jar
files specified by env(TCL_CLASSPATH)
.
env(TCL_CLASSPATH)
again, inspecting all jar files found in
each directory.
If the context class loader fails to load the class (step [2]),
this typically means that the class could not be located on
the CLASSPATH
. The CLASSPATH
is normally
set before the JVM is launched, and is not changed after that.
If the user needs to add a class search path at runtime, the
env(TCL_CLASSPATH)
environment variable should be used.
A security check is done to assure that the class does not have access
to package-protected variables. If the extension name begins with
"java." or "tcl.", a Tcl error is generated.
If a path in pathList or env(TCL_CLASSPATH)
is not an
absolute path, it is assumed to be a relative path from the
interpreter's current directory.
Steps [3] and [5] only use the paths in pathList or
env(TCL_CLASSPATH)
to locate the class file. If the path is a
directory, the loader looks in that directory for the class file. If
the path is a jar file, the jar file is inspected to see if it
contains the class. Steps [4] and [6] search pathList and
env(TCL_CLASSPATH)
again. If a path in the list is a directory,
the loader looks for jar files in that directory, inspecting any jar
files found to locate the class. The loader is capable of extracting
files from a compressed jar file.
Any class referenced by extensionName will also be loaded into
the VM. This includes classes used in new expressions as well as
those whose instances are reported (i.e. the use of static methods.)
Due to the recursive nature of class loading, any class referenced
must be located on the CLASSPATH
, env(TCL_CLASSPATH)
or
pathList. If a class cannot be located in one of the three
locations, a Tcl error is generated.
Currently it is not possible to unload or reload an extension.
Copyright © 1997-1998 Sun Microsystems, Inc.


Months
September: Perspectives
September is a new beginning that force to make a prospectus of the year. This changes the perspectives for the new year.
October: Food


MicroDocs Crawlers
Crawlers are used to extract definitions from projects. This happends at build time, so it fits perfectly in your CI. MicroDocs is backwards compatible with the OpenApi (Swagger) definitions. So if there isn’t a Crawlers available yet for the framework you are using, you can try a Swagger Crawler. But you won’t have all the features that MicroDocs is offering. Spring Crawler For the Spring framework there is a Crawler to extract MicroDoca definitions.
Setup
This Crawler is available as a Doclet (a Doclet is like an engine which can be ran using the JavaDoc tool) and as a Gradle plugin (which uses onder the hood the Doclet).
Use the Gradle plugin
gradle.build
buildscript {
depencencies {
classpath("com.maxxton:microdocs-crawler-gradle:1.+")
}
}
apply plugin: "microdocs"
version = "1.0.0" // project version
// build configuration
buildMicroDocs {
options.addStringOption("group", 'services'); // group name
}
// check configuration
checkMicroDocs {
env = 'development' // which environment to check against
url = "http://localhost:3000" // where the MicroDocs server is running
//username = "username" // If you use basic auth
//password = "password"
//reportFile = project.reporting.file('./microdocs.json'); // where to find the MicroDocs report
}
// publish configuration
publishMicroDocs {
env = 'development' // which environment to check against
url = "http://localhost:3000" // where the MicroDocs server is running
failOnProblems = true // whether or not to publish if there are problems
//username = "username" // If you use basic auth
//password = "password"
//reportFile = project.reporting.file('./microdocs.json'); // where to find the MicroDocs report
}
Conventions
The Spring Crawler make use of the annotations from Spring MVC/Boot and Netflix Feign to extract the definitions.
Project info
In Spring Boot applicaties you have a main class with the annotation @SpringBootApplication
. The
JavaDoc of that
class is used as the description of the project.
Rest Endpoints
With Spring MVC you define your controllers with @RestController
. The methods with @RequestMapping
in that class
are used to define the Endpoints itself. The JavaDocs in combination with @RequestParam
, @PathVariable
,
@RequestBody
and the return type are used to extract the endpoint definitions.
Additional the JavaDoc tag @response
can be used to documentate the possible response codes. For
example:
…
Feign Client
The Netflix Feign library is an easy way to make Http calls to other web services.Above the client class you
must set the @FeignClient
annotation, with the same name/serviceId as the project it depends on. It
is used the
same annotations as Spring MVC. MicroDocs make use of these annotations to extract client endpoints from a
project. This is done the same way as with extracting Rest Endpoint definitions.
Models
Models are found if the are used by endpoints, have the @Entity annotation or is used by another model. For models, all non classified variables are used for the proporties of the model. On top of that it uses JPA and Hybernate Json annotations to define Json- and relational mappings.
Documentation example
On the left side is a code preview on how documentation in a Spring Boot application reflects in MicroDocs on the right side.


cdemi's
02 April 2019 |
Front End |
HTML email reborn, as Google brings AMP to your inbox (arstechnica.com) |
| With AMP embeds, email can now contain rich interactivity, not just text and pictures.... Read more |
DevOps |
Elastic Stack 6.7.0 released (elastic.co) |
| Elastic Stack 6.7.0 is here. Check out Elastic Maps, Elastic Uptime, localized Kibana, and much more. Plus, several important features graduate to GA status.... Read more |
Infrastructure |
Canonical releases Ubuntu 19.04 Disco Dingo beta images for testing (neowin.net) |
| Canonical has released the beta for Ubuntu 19.04 which is due for release next month. The beta is representative of the features that will ship next month and there shouldn't be any major bugs.... Read more |
General Tech |
Apple cancels AirPower, the wireless charging pad it announced over a year ago (cnbc.com) |
| AirPower was first revealed in 2017, but after a year of delays, Apple confirmed it did not plan to release it.... Read more |
Hitting send on the next 15 years of Gmail (blog.google) |
| Gmail just turns 15. To celebrate Gmail’s continuous innovation, we’re taking a look back of its helpfulness and look forward with all the new updates.... Read more |
Next iPhone series may support reverse wireless charging and have up to 25% bigger battery (neowin.net) |
| This year's iPhone models are expected to support reverse wireless charging we've first seen in the Huawei Mate 20 Pro. As a result, the devices may have bigger battery capacities as well.... Read more |
iGaming |
Betsson develops customer support chatbot with AI platform provider (egr.global) |
| Three chatbots were built and launched across the operator’s flagship Betsson, Betsafe and NordicBet brands ... Read more |
Casumo faces €310k Dutch fine (igamingbusiness.com) |
| Dutch gambling regulator Kansspelautoriteit (KSA) has fined Malta-based online gaming operator Casumo €310,000 (£266,300/$347,000) for illegally targeting consumers in the Netherlands.... Read more |
MGM Buys Hard Rock Casino For $1 Billion (gaming-awards.com) |
| MGM Growth Properties has announced it has acquired the Hard Rock Rocksino Northfield Park in Ohio for $1.06 billion, the property is said to be the best performing casino in the state. The deal which sees the casino that has been open since 2013 will join the MGM group once the legal requirements a... Read more |
Star Entertainment Sues Gambler For A$43 Million In Gambling Debts (gaming-awards.com) |
| Australian casino company Star Entertainment Group is suing one of its high end VIP gamblers for 43 million Australian Dollars in gambling debts. Back in July 2018 The Star Group flew the Singaporean Dr Wong Yew Choy to their casino Gold Cost casino and during his time there racked up debts of the a... Read more |
Random |
Sit, stay, play (blog.aboutamazon.com) |
| How much does Amazon love dogs? Just ask one of the 6,000 pups that “work” here.... Read more |
Humor |
Sssnakes on a map (blog.google) |
| Starting today, you can play a twist on the classic snake game in different locations across the world right from Google Maps.... Read more |
|
This newsletter is made with 💖 by cdemi and sponsored by moo Research. You can find this MIT Licensed open-source project on GitHub cdemi/NewsletterCurator. You can also find an archive of all sent newsletters on GitHub at https://cdemi.github.io/NewsletterCurator-Archive/. If you want to unsubscribe from this newsletter, please click here. If you're new and you want to subscribe to this newsletter, please click here. |


You run your Browser on any device in kioskmode and select one of the slideshows available.
Every page could be part of multiple slideshows. Select which slideshow it should be part of in settings of the page.
Available Slideshows
Add a new page by clicking here (not implemented)
For the moment you could add pages by making a git commit to github spaceinfo Branch: master.
Add a new slideshow by clicking here (not implemented)
You could add a new Slideshow just by writing a new string in the config.ini files.
[Server-Settings]
pathToPages = ../spaceinfo-pages
[Page-Settings]
# If external link is set; The link is used instead of the local index.html file
#external_link = https://www.netzfrequenz.info/charts/gauge_full.php
# If timeout is set; The page will be shown for this time in seconds. If not set, the default timeout will be used
#timeout = 42
# In which slideshow should this page be? You could specify multiple.
slideshows = internal
# Date in ISO standard
startdate = "2015-03-25"
enddate = "2015-03-28"
Put a config.ini file in any subfolder of pages.
Request
/shows/internal.html
to start the show internal.
Request
/pages/pagename/index.html
to show a specific internal page.
Request
/shows/internal.json
to show all slides of the show internal. Response looks like
[
{
"enddate": "",
"link": "pages/MemesWelcome/index.html",
"startdate": "",
"timeout": 60,
"title": "MemesWelcome"
},
{
"enddate": "",
"link": "pages/hackerethik/index.html",
"startdate": "",
"timeout": 42,
"title": "hackerethik"
},
{
"enddate": "",
"link": "https://www.netzfrequenz.info/charts/gauge_full.php",
"startdate": "",
"timeout": 60,
"title": "netzfreqenz"
},
....
]
You could add a new Slideshow just by write a new string in the config.ini files.
Request
/version.json
to get the currently running version of spaceinfo. Response looks like
{
"major": 0,
"minor": 3,
"patch": 0,
"str": "v0.3.0"
}
For questions ask max
v0.4.2
pages
has changed. Reload your show!shows/pages
to pages/
because that is intuitive.Copyright (c) 2018 - 2020 vspace.one e.V.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


Chapter 24 The Bootstrap
Packages for this chapter:
24.1 Air conditioning failures
Back in 1963, there was a report on failures in air-conditioning equipment in aircraft. For one aircraft, the air-conditioning equipment failed 12 times, and the number of hours it ran before failing each time was recorded. The data are in link. Boeing was interested in the mean failure time, because the company wanted to plan for engineers to fix the failures (and thus needed to estimate a failure rate).
There is randomization here. Your answers will differ slightly from mine, unless you throw in this before you start (or at least before you generate your first random numbers).
Read in the data, and observe that you have the correct number of rows. (Note that the failure times are in ascending order).
What do you notice about the shape of the distribution of failure times? Explain briefly.
Obtain the means of 1000 bootstrap samples (that is, samples from the data with replacement). Save them.
Make a normal quantile plot of your bootstrap distribution. What do you see? Explain briefly.
Obtain the 95% bootstrap percentile confidence interval for the mean.
Obtain the 95% bootstrap-\(t\) confidence interval for the mean, and compare your two intervals.
Obtain the BCa 95% confidence interval for the mean.
Compare the BCa confidence interval with the other ones. Which one would you recommend? Explain briefly.
24.2 Air conditioning failures: bootstrapping the median
With a skewed data distribution such as the air-conditioning
failure times, we might be interested in inference for the median. One
way to get a confidence interval for the median is to invert the sign
test, as in smmr
, but another way is to obtain a bootstrap
sampling distribution for the median. How do these approaches compare
for the air-conditioning data? We explore this here.
Read in the air-conditioning data again (if you don’t already have it lying around). The link is in the previous question.
Use
smmr
to get a confidence interval for the median (based on the sign test).Obtain the bootstrap distribution of the sample median. Make a normal quantile plot of it. What do you notice? Explain briefly.
Obtain a 95% bootstrap percentile confidence interval for the median.
Obtain a 95% BCa interval. Compare it with the two other intervals you found.
24.3 Comparing eyesight
Do people see on average better with their left eye or their right eye, or is there no difference? To find out, 15 subjects were shown a sequence of images, some to their left eye and some to their right (with a blindfold on the other eye). The subjects were asked to identify some objects in each image, and were given an overall score for each eye, based on their ability to identify objects with each eye. (A higher score is better.) Data in http://ritsokiguess.site/datafiles/eyesight.csv.
Read in and display (some of) the data.
Explain briefly why looking at differences (say right minus left) makes sense for these data, and calculate and save a dataframe with the differences added to it.
Make a suitable normal quantile plot, and describe what it tells you.
Obtain a bootstrap distribution of the sample median.
Make a histogram of your bootstrap distribution of the median. Use a lot of bins, such as the default 30, for this. What do you notice about the distribution? Why did it come out this way?
Find a 95% percentile interval for the population median.36
Find the BCA 95% confidence interval for the population median difference.
What do your intervals tell us about any possible difference between left eye and right eye in terms of ability to identify objects in images? Do the intervals agree or disagree about this?
24.4 Bootstrapping the IRS data
You might recall the IRS data from when we were learning about the sign test. The idea was that we wanted to see how long “on average” it took people to fill out a tax form. The data are in http://ritsokiguess.site/datafiles/irs.txt.
Read in and display (some of) the data. There is only one column of data, so you can pretend the values are separated by anything.
Obtain a bootstrap distribution of the sample median.
Make a suitable graph of the bootstrap distribution of the median. What seems odd about it? Why did that happen? (Hint: use more bins on your plot than usual, like 50.)
Find 95% percentile and bootstrap-\(t\) intervals for the population median. (Hint: your dataframe of bootstrapped medians may still be
rowwise
, so you might need to runungroup
first.)
My solutions follow:
24.5 Air conditioning failures
Back in 1963, there was a report on failures in air-conditioning equipment in aircraft. For one aircraft, the air-conditioning equipment failed 12 times, and the number of hours it ran before failing each time was recorded. The data are in link. Boeing was interested in the mean failure time, because the company wanted to plan for engineers to fix the failures (and thus needed to estimate a failure rate).
There is randomization here. Your answers will differ slightly from mine, unless you throw in this before you start (or at least before you generate your first random numbers).
- Read in the data, and observe that you have the correct number of rows. (Note that the failure times are in ascending order).
Solution
This is a .csv
so read_csv
is the thing:
my_url <- "https://raw.githubusercontent.com/nxskok/pasias/master/air_conditioning.csv"
aircon <- read_csv(my_url)
##
## ── Column specification ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
## cols(
## failure = col_double(),
## hours = col_double()
## )
## # A tibble: 12 x 2
## failure hours
## <dbl> <dbl>
## 1 1 3
## 2 2 5
## 3 3 7
## 4 4 18
## 5 5 43
## 6 6 85
## 7 7 91
## 8 8 98
## 9 9 100
## 10 10 130
## 11 11 230
## 12 12 487
Twelve rows (12 failure times).
\(\blacksquare\)
- What do you notice about the shape of the distribution of failure times? Explain briefly.
Solution
Make a suitable graph. The obvious one is a histogram:
You’ll have to play with the number of bins (there are only 12 observations). I got 7 from the Freedman-Diaconis rule:
## [1] 7
I was a little suspicious that the data would not be much like normal (I have run into failure times before), so I kept away from the Sturges rule.
Another possibility is a one-group boxplot:
If you like, you can do a normal quantile plot. I rank that third here, because there is nothing immediately implying a comparison with the normal distribution, but I would accept it:
Pick a visual and defend it.
All three of these graphs are showing a strong skewness to the right.
Extra: this is probably not a surprise, because a time until failure cannot be less than zero, and distributions with a limit tend to be skewed away from that limit. (If you look back at the data, there are some very small failure times, but there are also some very big ones. The very small ones are saying that the lower limit matters.) If you were modelling these times until failure, you might use a distribution like the exponential or gamma or Weibull.
\(\blacksquare\)
- Obtain the means of 1000 bootstrap samples (that is, samples from the data with replacement). Save them.
Solution
Something like this, therefore:
tibble(sim = 1:1000) %>%
rowwise() %>%
mutate(sample = list(sample(aircon$hours, replace = TRUE))) %>%
mutate(sample_mean = mean(sample)) -> means
means
## # A tibble: 1,000 x 3
## # Rowwise:
## sim sample sample_mean
## <int> <list> <dbl>
## 1 1 <dbl [12]> 83.2
## 2 2 <dbl [12]> 52.3
## 3 3 <dbl [12]> 122.
## 4 4 <dbl [12]> 82.3
## 5 5 <dbl [12]> 115.
## 6 6 <dbl [12]> 150.
## 7 7 <dbl [12]> 141.
## 8 8 <dbl [12]> 69.2
## 9 9 <dbl [12]> 90
## 10 10 <dbl [12]> 69.4
## # … with 990 more rows
Forgetting the rowwise
will cause all sorts of trouble.
\(\blacksquare\)
- Make a normal quantile plot of your bootstrap distribution. What do you see? Explain briefly.
Solution
This:
This is still skewed to the right (it has a curved shape, or, the low values and the high values are both too high compared to the normal).
Extra: this is less skewed than the original data was, because, with a sample size of 12, we have a little help from the Central Limit Theorem, but not much. This picture is the one that has to be normal enough for \(t\) procedures to work, and it is not. This comes back into the picture when we compare our confidence intervals later.
Also, it makes sense to see how normal a sampling distribution of a mean is, so a normal quantile plot would be my first choice for this.
\(\blacksquare\)
- Obtain the 95% bootstrap percentile confidence interval for the mean.
Solution
This is the 2.5 and 97.5 percentiles of the bootstrapped sampling distribution of the mean:
## 2.5% 97.5%
## 46.74583 180.92917
\(\blacksquare\)
- Obtain the 95% bootstrap-\(t\) confidence interval for the mean, and compare your two intervals.
Solution
The key is to remember that the original sample (and thus each bootstrap sample) had \(n=12\), so there are \(12-1=11\) df. (The fact that there were 1000 bootstrap samples is neither here nor there). This is how I like to do it:
## [1] 2.200985
## [1] 26.18964 185.96786
The c(-1, 1)
thing is the calculation version of the \(\pm\),
and gets both limits at once. Pull the above apart to see how it works. If
you don’t like that, you might prefer something like this:
the_mean <- mean(means$sample_mean)
the_sd <- sd(means$sample_mean)
margin <- t_star * the_sd
the_mean - margin
## [1] 26.18964
## [1] 185.9679
I apologize for the crazy first line of that! As for comparison: the bootstrap-\(t\) interval goes down a lot further, though the upper limits are quite similar (on this scale). Both intervals are very long and don’t tell us much about the population mean time to failure, which is not very surprising given the small sample size (\(n=12\)) and the large variability in the data.
Extra: the non-normality of the bootstrap (sampling) distribution says that we should definitely not trust the bootstrap-\(t\), and probably not the bootstrap percentile interval either. Which brings us to the next part.
\(\blacksquare\)
- Obtain the BCa 95% confidence interval for the mean.
Solution
This means (possibly) installing and (certainly) loading the bootstrap
package, and then:
theta <- function(x) {
mean(x)
}
bca_all <- with(aircon, bcanon(hours, 1000, theta))
bca <- bca_all$confpoints
bca
## alpha bca point
## [1,] 0.025 55.25
## [2,] 0.050 61.25
## [3,] 0.100 70.50
## [4,] 0.160 78.50
## [5,] 0.840 160.50
## [6,] 0.900 178.00
## [7,] 0.950 204.25
## [8,] 0.975 228.75
Pull out the ones from this that you need: the top one and the bottom one, to get an interval of 55.2 to 228.8.
I seem to need to define the function theta
first and pass it into bcanon
as the third input. You may have more luck with bcanon(hours, 1000, mean)
than I did. Try it.
Or, if you feel like some extra coding: turn this matrix into a data frame, grab the rows you want, and then the column you want:
## [1] 55.25 228.75
\(\blacksquare\)
- Compare the BCa confidence interval with the other ones. Which one would you recommend? Explain briefly.
Solution
In this example, the bootstrap-\(t\) and percentile intervals are very different, so we should use neither of them, and prefer the BCa interval.
Extra: as usual in this kind of case, the BCa contains values for the mean pulled out into the long tail, but that’s a proper adjustment for the sampling distribution being skewed.
\(\blacksquare\)
24.6 Air conditioning failures: bootstrapping the median
With a skewed data distribution such as the air-conditioning
failure times, we might be interested in inference for the median. One
way to get a confidence interval for the median is to invert the sign
test, as in smmr
, but another way is to obtain a bootstrap
sampling distribution for the median. How do these approaches compare
for the air-conditioning data? We explore this here.
- Read in the air-conditioning data again (if you don’t already have it lying around). The link is in the previous question.
Solution
my_url <- "https://raw.githubusercontent.com/nxskok/pasias/master/air_conditioning.csv"
aircon <- read_csv(my_url)
##
## ── Column specification ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
## cols(
## failure = col_double(),
## hours = col_double()
## )
## # A tibble: 12 x 2
## failure hours
## <dbl> <dbl>
## 1 1 3
## 2 2 5
## 3 3 7
## 4 4 18
## 5 5 43
## 6 6 85
## 7 7 91
## 8 8 98
## 9 9 100
## 10 10 130
## 11 11 230
## 12 12 487
\(\blacksquare\)
- Use
smmr
to get a confidence interval for the median (based on the sign test).
Solution
Input to ci_median
is data frame and column:
## [1] 7.002319 129.998291
\(\blacksquare\)
- Obtain the bootstrap distribution of the sample median. Make a normal quantile plot of it. What do you notice? Explain briefly.
Solution
The usual do-it-yourself bootstrap:
tibble(sim = 1:1000) %>%
rowwise() %>%
mutate(samples = list(sample(aircon$hours, replace = TRUE))) %>%
mutate(medians = median(samples)) -> meds
I actually copied and pasted my code from the previous problem, changing mean
to median
.
As for a plot, well, this:
Not only does this not look very normal, but also there are those curious horizontal patches of points (that, you might recall, are characteristic of a discrete distribution). This has happened because there are only a few possible medians: the median has to be either a data value or halfway between two data values, so there are only something like \(2(12)-1=23\) different possible medians, with the ones in the middle being more likely.
This also shows up on a histogram, but only if you have enough bins. (If you don’t have enough bins, some of the neighbouring possible values end up in the same bin; here, the aim is to have enough bins to show the discreteness, rather than the usual thing of having few enough bins to show the shape.)
\(\blacksquare\)
- Obtain a 95% bootstrap percentile confidence interval for the median.
Solution
Also, the usual:
## 2.5% 97.5%
## 12.5 115.0
This goes down and up not quite so far as the interval from smmr
. That might be because the smmr
interval is too wide (based on a not-very-powerful test), or because the bootstrap quantile interval is too narrow (as it usually is). It’s hard to tell which it is.
\(\blacksquare\)
- Obtain a 95% BCa interval. Compare it with the two other intervals you found.
Solution
Yet more copying and pasting (from the previous question):
theta <- function(x) {
median(x)
}
bca_all <- with(aircon, bcanon(hours, 1000, theta))
bca <- bca_all$confpoints
bca
## alpha bca point
## [1,] 0.025 12.5
## [2,] 0.050 12.5
## [3,] 0.100 18.0
## [4,] 0.160 30.5
## [5,] 0.840 94.5
## [6,] 0.900 98.0
## [7,] 0.950 100.0
## [8,] 0.975 115.0
Again, I seem to need to define the tiny function, while you can probably call bcanon(hours, 1000, median)
. Try it and see.
My BCa interval is a little longer than the bootstrap percentile interval and a little shorter than the one that came from the sign test. I would guess that the BCa interval is the most trustworthy of the three, though there is here not that much difference between them. All the intervals are again very long, a reflection of the small sample size and large variability.
\(\blacksquare\)
24.7 Comparing eyesight
Do people see on average better with their left eye or their right eye, or is there no difference? To find out, 15 subjects were shown a sequence of images, some to their left eye and some to their right (with a blindfold on the other eye). The subjects were asked to identify some objects in each image, and were given an overall score for each eye, based on their ability to identify objects with each eye. (A higher score is better.) Data in http://ritsokiguess.site/datafiles/eyesight.csv.
- Read in and display (some of) the data.
Solution
This is a csv
, so no surprises:
##
## ── Column specification ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
## cols(
## person = col_double(),
## right = col_double(),
## left = col_double()
## )
## # A tibble: 15 x 3
## person right left
## <dbl> <dbl> <dbl>
## 1 1 50 47
## 2 2 45 45
## 3 3 33 31
## 4 4 22 24
## 5 5 99 78
## 6 6 79 76
## 7 7 4 13
## 8 8 36 46
## 9 9 62 45
## 10 10 51 44
## 11 11 27 23
## 12 12 15 14
## 13 13 26 34
## 14 14 83 79
## 15 15 86 81
15 observations, with the subjects labelled by number, and a score for each subject and each eye.
\(\blacksquare\)
- Explain briefly why looking at differences (say right minus left) makes sense for these data, and calculate and save a dataframe with the differences added to it.
Solution
This is matched pairs data, with two observations for each subject. A matched pairs analysis, whether by a sign test or a matched-pairs \(t\)-test, would be based on one difference for each subject, and so those would make sense to calculate. (You’ll recall that a matched pairs analysis uses the differences and not the original data.)
Thus, saving back into our original dataframe:
## # A tibble: 15 x 4
## person right left difference
## <dbl> <dbl> <dbl> <dbl>
## 1 1 50 47 3
## 2 2 45 45 0
## 3 3 33 31 2
## 4 4 22 24 -2
## 5 5 99 78 21
## 6 6 79 76 3
## 7 7 4 13 -9
## 8 8 36 46 -10
## 9 9 62 45 17
## 10 10 51 44 7
## 11 11 27 23 4
## 12 12 15 14 1
## 13 13 26 34 -8
## 14 14 83 79 4
## 15 15 86 81 5
Extra: this is one of those cases where having long data would make it very much more difficult to work out the differences for each person. Try it and see. How will you match up the two measurements for each person?
\(\blacksquare\)
- Make a suitable normal quantile plot, and describe what it tells you.
Solution
A normal quantile plot of the differences, therefore, since normality of the two individual scores is immaterial:
We have what I think is best described as “long tails”, with the high values being too high and the low ones being a bit too low for a normal distribution. I think this is a better description than “outliers” because outliers are isolated unusual values, not five observations out of fifteen!
The plot is telling us that a matched-pairs \(t\)-test is questionable, and that we might do a sign test instead. Or, as we explore in this question, find a bootstrap distribution (in this case, for the median).
Extra: the one kind of sensible plot that uses the original data in this situation would be a scatterplot, since the right and left scores are matched up:
I added the line \(y = x\) to the plot. The value of doing that is that a point to the right and below the line has the right-eye score bigger than the left-eye one, and vice versa for a point to the left and above. This plot tells us that a small majority of the subjects had a higher score with the right eye, and for the ones that had a higher score with the left eye, the difference wasn’t usually very big.
This plot tells us nothing about normality of differences, though (not without some careful looking), which is one of the things we usually care about.
\(\blacksquare\)
- Obtain a bootstrap distribution of the sample median.
Solution
Borrow the idea from lecture, replacing mean with median:
tibble(sim = 1:1000) %>%
rowwise() %>%
mutate(sample = list(sample(sight$difference, replace = TRUE))) %>%
mutate(my_median = median(sample)) -> meds
meds
## # A tibble: 1,000 x 3
## # Rowwise:
## sim sample my_median
## <int> <list> <dbl>
## 1 1 <dbl [15]> 3
## 2 2 <dbl [15]> 3
## 3 3 <dbl [15]> 2
## 4 4 <dbl [15]> 2
## 5 5 <dbl [15]> 3
## 6 6 <dbl [15]> 4
## 7 7 <dbl [15]> 3
## 8 8 <dbl [15]> 3
## 9 9 <dbl [15]> 3
## 10 10 <dbl [15]> 3
## # … with 990 more rows
The steps are:
- create a dataframe with a column called
sim
to label the simulations - from here on out, work “rowwise”, that is, with one row at a time
- generate a bootstrap sample for each row. A bootstrap sample is fifteen observations rather than just one, so we are making a list-column and thus the
list
has to go on the front - work out the median of each bootstrap sample. Remember, the
rowwise
applies until you cancel it,37 and so this will be the median of the bootstrap sample on each row, one at a time.
As ever, if you want to see what’s going on, run this one line at a time.
\(\blacksquare\)
- Make a histogram of your bootstrap distribution of the median. Use a lot of bins, such as the default 30, for this. What do you notice about the distribution? Why did it come out this way?
Solution
For this histogram, there is no need to specify a number of bins (unless you want to):
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
The distribution is very discrete (this shows up more clearly with more bins).
The data values are all integers (and therefore so are the differences). The median of an odd number of data values must be one of the data values, and the bootstrap samples only contain (varying numbers of copies of) the differences in the original dataset, so each bootstrap sample must have a median that is an integer too.
Extra: in case you are thinking that this happened because the data values were integers, no, it would happen even if the data were decimal numbers. Let’s make some fake data of 15 random normals and then do the same thing again:
## # A tibble: 15 x 1
## x
## <dbl>
## 1 -2.02
## 2 0.867
## 3 -0.00982
## 4 -0.123
## 5 -0.431
## 6 0.702
## 7 1.22
## 8 -0.0818
## 9 1.06
## 10 0.318
## 11 -0.0179
## 12 -0.370
## 13 0.0115
## 14 -1.57
## 15 0.0529
and once again bootstrap the median:
tibble(sim = 1:1000) %>%
rowwise() %>%
mutate(sample = list(sample(fake_data$x, replace = TRUE))) %>%
mutate(my_median = median(sample)) -> meds2
meds2
## # A tibble: 1,000 x 3
## # Rowwise:
## sim sample my_median
## <int> <list> <dbl>
## 1 1 <dbl [15]> 0.0115
## 2 2 <dbl [15]> 0.0115
## 3 3 <dbl [15]> -0.123
## 4 4 <dbl [15]> -0.0179
## 5 5 <dbl [15]> 0.0115
## 6 6 <dbl [15]> 0.318
## 7 7 <dbl [15]> 0.0115
## 8 8 <dbl [15]> -0.00982
## 9 9 <dbl [15]> 0.0529
## 10 10 <dbl [15]> 0.0115
## # … with 990 more rows
You can see even from these few that the bootstrap distribution of the median has repeats, so there should also be some discreteness here:
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
The discreteness is a property of the fact that we were bootstrapping the median, and the median has to be one of the data values.
To confirm that, recall that our original data were integers:
## # A tibble: 15 x 4
## person right left difference
## <dbl> <dbl> <dbl> <dbl>
## 1 1 50 47 3
## 2 2 45 45 0
## 3 3 33 31 2
## 4 4 22 24 -2
## 5 5 99 78 21
## 6 6 79 76 3
## 7 7 4 13 -9
## 8 8 36 46 -10
## 9 9 62 45 17
## 10 10 51 44 7
## 11 11 27 23 4
## 12 12 15 14 1
## 13 13 26 34 -8
## 14 14 83 79 4
## 15 15 86 81 5
but even for these, if you bootstrap the mean, you don’t get the same discreteness:
tibble(sim = 1:1000) %>%
rowwise() %>%
mutate(sample = list(sample(sight$difference, replace = TRUE))) %>%
mutate(my_mean = mean(sample)) -> means
means %>%
ggplot(aes(x = my_mean)) + geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.
This is too many bins for 1000 bootstrap samples, so the shape is kind of irregular, but there are not the big gaps that the bootstrap distribution of the sample median has. Indeed, this ought to be somewhere near normal and is:
(This is saying that the Central Limit Theorem is really helping, even for a sample size of only 15 from clearly non-normal data, so the paired \(t\) may not be as bad as we would have thought.)
\(\blacksquare\)
- Find a 95% percentile interval for the population median.38
Solution
The percentile interval comes from the middle 95% of the bootstrap distribution of medians:
## 2.5% 97.5%
## -2 4
The bootstrap percentile interval goes from \(-2\) to 4. Like the CI for the median based on the sign test, the ends of this interval must be data values.
Extra: for comparison, the interval from the sign test is this:
## [1] -1.997070 4.994629
which is, when rounded off, from \(-2\) to 5, very like the percentile interval.
\(\blacksquare\)
- Find the BCA 95% confidence interval for the population median difference.
Solution
Load (and if necessary install) the bootstrap
package, and then:
## alpha bca point
## [1,] 0.025 -2
## [2,] 0.050 -2
## [3,] 0.100 0
## [4,] 0.160 0
## [5,] 0.840 3
## [6,] 0.900 3
## [7,] 0.950 4
## [8,] 0.975 4
\(-2\) to 4, in this case like the percentile interval.39 Note how this one is data values also.
\(\blacksquare\)
- What do your intervals tell us about any possible difference between left eye and right eye in terms of ability to identify objects in images? Do the intervals agree or disagree about this?
Solution
The intervals are not quite all the same, but one thing they have in common is that they all have a negative lower limit and a positive upper one (more positive than the negative one is negative). This says that 0 is a plausible difference in each case, and thus it is reasonable to conclude that there is no evidence of any difference between the two eyes, based on this sample of 15 subjects.
The intervals do all go more positive than negative, which says that if anything the scores are better with the right eye than the left on average (from the way around that we took the differences). However, there is no evidence here that this is any more than chance.
\(\blacksquare\)
24.8 Bootstrapping the IRS data
You might recall the IRS data from when we were learning about the sign test. The idea was that we wanted to see how long “on average” it took people to fill out a tax form. The data are in http://ritsokiguess.site/datafiles/irs.txt.
- Read in and display (some of) the data. There is only one column of data, so you can pretend the values are separated by anything.
Solution
Pretty much any of the read_
functions will work, even this one:
##
## ── Column specification ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
## cols(
## Time = col_double()
## )
## # A tibble: 30 x 1
## Time
## <dbl>
## 1 91
## 2 64
## 3 243
## 4 167
## 5 123
## 6 65
## 7 71
## 8 204
## 9 110
## 10 178
## # … with 20 more rows
One column called Time
.
\(\blacksquare\)
- Obtain a bootstrap distribution of the sample median.
Solution
The lecture notes use the exact same dataset, so you can borrow ideas from there:
Set up a dataframe with one row for each bootstrap sample you’re going to draw, 1000 in this case:
## # A tibble: 1,000 x 1
## sim
## <int>
## 1 1
## 2 2
## 3 3
## 4 4
## 5 5
## 6 6
## 7 7
## 8 8
## 9 9
## 10 10
## # … with 990 more rows
Create a column with a new bootstrap sample for each sim
. This means doing rowwise
first and then wrapping the sampling in list
because you are creating a list-column of samples:
## # A tibble: 1,000 x 2
## # Rowwise:
## sim sample
## <int> <list>
## 1 1 <dbl [30]>
## 2 2 <dbl [30]>
## 3 3 <dbl [30]>
## 4 4 <dbl [30]>
## 5 5 <dbl [30]>
## 6 6 <dbl [30]>
## 7 7 <dbl [30]>
## 8 8 <dbl [30]>
## 9 9 <dbl [30]>
## 10 10 <dbl [30]>
## # … with 990 more rows
Each thing in sample
has 30 observations in it (one bootstrap sample). If you want, you can unnest
to take a look at the values; they should be the ones in the dataset, possibly with extra repeats.
Next, work out the median of each bootstrapped sample, which is simple because we are still working rowwise:
tibble(sim = 1:1000) %>%
rowwise() %>%
mutate(sample = list(sample(irs$Time, replace = TRUE))) %>%
mutate(my_median = median(sample)) -> bs
bs
## # A tibble: 1,000 x 3
## # Rowwise:
## sim sample my_median
## <int> <list> <dbl>
## 1 1 <dbl [30]> 209
## 2 2 <dbl [30]> 162
## 3 3 <dbl [30]> 172.
## 4 4 <dbl [30]> 186
## 5 5 <dbl [30]> 206.
## 6 6 <dbl [30]> 196
## 7 7 <dbl [30]> 136.
## 8 8 <dbl [30]> 154.
## 9 9 <dbl [30]> 194
## 10 10 <dbl [30]> 194
## # … with 990 more rows
As you realize, bs
stands for “bootstrap”. Of course.
\(\blacksquare\)
- Make a suitable graph of the bootstrap distribution of the median. What seems odd about it? Why did that happen? (Hint: use more bins on your plot than usual, like 50.)
Solution
The medians are already in a dataframe, so go straight ahead:
What we are seeing at this resolution is that the distribution is very irregular, with funny holes in it, more than you would expect even with this many bins. By way of comparison, the bootstrap distribution of the mean looks a lot smoother:
tibble(sim = 1:1000) %>%
rowwise() %>%
mutate(my_sample = list(sample(irs$Time, replace = TRUE))) %>%
mutate(my_mean = mean(my_sample)) %>%
ggplot(aes(x = my_mean)) + geom_histogram(bins = 50)
This is somewhat irregular, because we really have too many bins, but there are not nearly so many holes and irregular heights as on the plot for the median. I had you use a lot of bins in this special case because I wanted you to see just how irregular the bootstrapped distribution for the median really was.
So why did that happen? Think about what the sample median is for 30 observations: it is the mean of the 15th and 16th smallest values when you arrange them in order. A bootstrap sample must contain the same values as the original dataset (just probably not the same frequencies of them). So the median of a bootstrap sample must be the average of two of the values in the original dataset, and probably two that were close together. What that means is that there are not very many possible medians of the bootstrap samples, and they form a clearly discrete rather than a continuous distribution. (The sample mean, on the other hand, uses all the values in the bootstrap sample, and so there are a lot more possible bootstrap means than bootstrap medians; the distribution of those is as good as continuous.)
What this means is that bootstrapping for medians is odd (it always looks like this), but that’s what the bootstrap distribution looks like.
\(\blacksquare\)
- Find 95% percentile and bootstrap-\(t\) intervals for the population median. (Hint: your dataframe of bootstrapped medians may still be
rowwise
, so you might need to runungroup
first.)
Solution
The percentile interval comes from the middle 95% of the bootstrap distribution of medians. The dataframe bs
is still rowwise, so we have to undo that first to do it the obvious way:
## # A tibble: 1 x 2
## ci1 ci2
## <dbl> <dbl>
## 1 123. 215
Or, pull out just that column and find the two quantiles of that, for which there are two ways, the base R way:
## 2.5% 97.5%
## 122.95 215.00
and the slightly odd-looking:
## 2.5% 97.5%
## 122.95 215.00
All of these get you to the same place.  Try it up to but not including the unnest
to see how it works.
For the bootstrap \(t\), estimate the population median as the sample median:
## [1] 172.5
get its standard error from the SD of the bootstrap distribution of medians:
## [1] 24.04391
then go up and down twice this (or 1.96 if you believe in \(z\)):
## [1] 124.4122 220.5878
Extra: in this case, we also have the CI for the median that came out of the sign test:
## [1] 119.0065 214.9955
This one is actually very close to the bootstrap percentile interval, while the bootstrap \(t\) interval is higher at both ends.
\(\blacksquare\)
I was also going to have you do a bootstrap-t interval, but I’m not completely convinced I got that right when I was explaining it to you before.↩
That is done using ungroup, should you ever need to stop working rowwise. This seems like an odd choice of function, since the usual use of ungroup is to undo a group-by, but what ungroup actually does is to remove any special properties a dataframe has, including both groups and any rowwise behaviour.↩
I was also going to have you do a bootstrap-t interval, but I’m not completely convinced I got that right when I was explaining it to you before.↩
They don’t often agree this well, but all of these intervals in this situation but have data values at their endpoints, and all of our data values are integers.↩


{% if user.is_authenticated and not user.athlete.performances.count %}
We are currently importing data from Strava to create your prediction models.
Once they are ready, this message will disappear.
In the meantime, you can import a route from Strava or Switzerland Mobility.


Conference Program
Jump directly to the Saturday or Sunday program!
Saturday, May 17
| Time | Event |
| 10:30 | Space opens; breakfast; mingling |
| 11:15-12:00 |
- Opening remarks
- Keynote: David Nolen
Invent the Future You Want to Live In!
|
| 12:00-12:15 | Break! |
| 12:15-1:05: Traveling Swift-ly through Time! |
|
| 1:05-1:30 | Unconferencing! |
| 1:30-2:30 | Lunch! |
| 2:30-3:20: (Analytic) Philosophizing! |
- What Programmers and Economists Can Learn from Each Other! (Rob Jefferson) (Note: unfortunately, this talk had to be cancelled due to illness)
- Contributing to open source should be like ROLLER DERBY!! (Libby Horacek)
- MissingNo., my favourite Pokémon! (Igor Wiedler)
- QUINE + TAR = QUININE!! (Peter Boothe)
|
| 3:20-4:30 | Unconferencing! |
| 4:30-5:20: As Real As It Gets! |
- From text to textiles! (Lea Albaugh)
- Lightpainting with Robots! And JavaScript! (Jon Williams)
- Music! Programming! Arduino! (Or: Building Electronic Musical Interfaces to Create Awesome) (Bonnie Eisenman)
- I made a cell phone! (DON'T TELL THE FCC KTHX!) (Kevin Lynagh)
|
| 5:20-5:30 | Closing remarks |
| 5:30 | Optional: find your dinner group! |
Sunday, May 18
| Time | Event |
| 9:45 | Space opens; breakfast; mingling |
| 10:30-11:15 |
|
| 11:15-11:30 | Break! |
| 11:30-12:20: Weirding Language! |
- The Burrows-Wheeler Transform: Better Compression with a Reversible Sort!! (Scott Vokes)
- Eternal Sunshine of the Spotless Search Index!! (Fiona Condon)
- Git Pushes from Paradise: Adding a remote island alphabet to Wikipedia! (Nick Doiron)
- Dissecting a Bestseller: The Art and Science of Storytelling! (Allison Nelson)
|
| 12:20-1:30 | Unconferencing! |
| 1:30-2:30 | Lunch! |
| 2:30-3:20: Heroic Hacks! |
- Recovering data from an SD card — the hard way! (Joshua Wise)
- Cross-platform file names in Rust: a wonderful and horrifying hack! (Simon Sapin)
- Limitless and recursion-free recursion limits! (Allison Kaptur)
- i'm in ur javaz haxxing ur codez! (Max Veytsman)
|
| 3:20-4:30 | Unconferencing! |
| 4:30-5:10: Tales from the Production Server! |
|
| 5:10 | Thanks and closing remarks |


Located at the mouth of the Kelantan River, it is the close to the Thai border.
For full details on clearance into and out of Malaysia see Malaysia Formalities.


In the face of the COVID-19 crisis, we saw an exponentially growing number of infected, and an immense strain on the medical professionals and community. Families, businesses, and events, all went into lockdown, slowing the economy and threatening our lives. Medical professionals faced the problem of ferrying critical supplies in shortage from one hospital to another in time, and civilians counted their finances and braced for debt. Those financially stable also faced the problem of receiving crucial medicine that kept them alive and risked their own and family’s lives with every step outside to get it. Those who needed urgent drugs awaiting a delivery halted as other families stocked up on less important supplies.
Our own competitions and events that we dreamed of competing in were shut down. Dreams of meeting like-minded individuals and the experiences of amazing ceremonies were crushed by the virus’s deadly spread. So we took this time (after crying a bit), to begin this project, where we can use our skills in engineering, programming, algorithms, and design to help more than just our own community.
The MediAir project will combat the shortages of supplies, and the dangerously slow travel times needed for medical professionals to transfer critical equipment and civilians to receive much needed PPE and medical supplies like medicine. We are working to reduce that time immensely, and to be able to service multiple high-emergency areas with nearly instantaneous response times up to 1 hour. We have currently tested 2 fully operational models and will be working to prepare and test a third before having in-service testing in some areas in the US. We plan to publicly release information around 5/25, and fully release our project around 6/7/20!


Discover notable titles by Ohio authors and download readers’ toolkits for discussion questions, activities, & links for further exploration. Learn about CTRO.
Blended by Sharon M. Draper
Learn moreThe Bluest Eye by Toni Morrison
Learn moreClackety Track by Skila Brown
Learn moreCount the Wings by Michelle Houts
Learn moreDesigning Victory by Robert P. Madison & Carlo Wolff
Learn moreGo Ahead in the Rain by Hanif Abdurraqib
Learn moreThe Gone Away Place by Christopher Barzak
Learn moreDiscover notable titles by Ohio authors and download readers’ toolkits for discussion questions, activities, & links for further exploration. Learn about CTRO.
Hush Up and Hibernate! by Sandra Markle
Learn moreInvisible Emmie by Terri Libenson
Learn moreThe Lake Effect by Erin McCahan
Learn moreLeila in Saffron by Rukhsanna Guidroz
Learn moreLove by Matt de la Peña
Learn moreA Mile and a Half of Lines by Michael J. Rosen
Learn moreDiscover notable titles by Ohio authors and download readers’ toolkits for discussion questions, activities, & links for further exploration. Learn about CTRO.
Mosquitoland by David Arnold
Learn moreThe Oldest Student by Rita Lorraine Hubbard
Learn moreOpposite of Always by Justin A. Reynolds
Learn moreOther Words for Home by Jasmine Warga
Learn moreThey Called Us Enemy by George Takei
Learn moreThe Tornado Scientist by Mary Kay Carson
Learn moreWhen the Stars Lead to You by Ronni Davis
Learn more


Foot
Ball
Graph Strategies
Strategies:
Knn
Threshold
Value:
Representation:
Degree
Eccentricity
Global Efficiency
Embedding
Approach type
Approach:
Player
Team
Position
Matching informations
Match 1:
Match 2:
Value:
1-60
Proceed


Picnic CSS
Picnic CSS is a lightweight and beautiful CSS library
Buttons
They can be of different colors and types:
<button>Button</button>
<button class='success'>Success</button>
<button class='warning'>Warning</button>
<button class='error'>Error</button>
<button disabled>Disabled</button>
<button>Button</button>
Link
<input value="Submit" type="submit">

<input type="checkbox">
Toggle

Pseudo buttons
Allows for seemingly links to behave as buttons:
<button class="pseudo">Button</button>
Link
<input class="pseudo" value="Submit" type="submit">

<input type="checkbox">
Toggle

Hack it
You only have to define a single color base for new colors. The :hover
and :active
status are handled as overlays for consistency and simplicity
<button class="myCoolButton">My Cool Button</button>
.myCoolButton {
background: #85144b;
}
To create a larger button you only need to make the font inside it larger. The paddings are set in em so the whole button stays in great shape:
<button class="mainButton">Large button</button>

<button>Normal button</button>

<button class="shyButton">Small button</button>
.mainButton {
font-size: 1.5em;
}
.shyButton {
font-size: .75em;
}
To change the color of the pseudo-color on hover:
<button class="pseudo cool">Pseudo personal</button>
.cool:hover,
.cool:active,
.cool:focus {
background: #cff;
}
Card
A card is a self-contained, replicable type. It works great with other of its kind. It can consist of only one element or many of them:

A really simple h3

<button>Love</button>
<button class="dangerous">Hate</button>

Forest

<button>Like</button>

Misty Forest

<button>Like</button>

Misty Forest

<button>Like</button>

Checkbox
Display an inline checkbox with a nice default style

<input type="checkbox">
Check me out (;

<input type="checkbox" checked>
Uncheck me

Usage
This plugin, while experimental in the past, is mature now. Use a normal checkbox followed by any other element with the class checkable
. The element that follows the checkbox will receive the pseudo classes so it should be able to do so. We recommend a
or
. Here we use the label around them for making the <input>
change state when you click on this folowing element.

<input type="checkbox">
Checkbox text

But you can also use a label and reference the original input:
<input id="checkboxdemo" type="checkbox">
Checkbox text
JavaScript
You do not need javascript since we are using the native elements and not setting display: none
purposefully. However, you can still use javascript as normal to retrieve the checked elements.
// Pure javascript
document.querySelector('form').onsubmit = function(e){
e.preventDefault();
alert(document.querySelector('input.tos').checked);
}
// jQuery
$("form").on('submit', function(e){
e.preventDefault();
alert($('input.tos').is(':checked'));
});
Drop image
Allows you to add a file input element that can receive an image drop and clicks with native elements. However, it needs some javascript to show the dropped image:

<input title="Drop image or click me" type="file">

JavaScript
This is the javascript you need for multiple elements:
document.addEventListener("DOMContentLoaded", function() {
[].forEach.call(document.querySelectorAll('.dropimage'), function(img){
img.onchange = function(e){
var inputfile = this, reader = new FileReader();
reader.onloadend = function(){
inputfile.style['background-image'] = 'url('+reader.result+')';
}
reader.readAsDataURL(e.target.files[0]);
}
});
});
Hack it
Do you want round pictures? No problem, just do this:
.profile {
border-radius: 50%; /* Make it a circle */
padding-bottom: 100%; /* 100% height (ratio 1) */
}
To get this:

<input name="filea" title="Drop image or click me" type="file">

Make it smaller
.miniprofile {
border-radius: 50%; /* Make it a circle */
margin: 0 auto; /* Center horizontally */
width: 60%; /* 60% width */
padding-bottom: 60%; /* 60% height */
}

<input name="filea" title="Drop image or click me" type="file">

Grids
Note: the old
.row
and.grid
have been replaced by the new.flex
. You can still see the old documentation in github.Note 2: the children

are only for display purposes; you can put anything you want instead of them
A flexbox grid implementation with breakpoints. Choose when to change your layout depending on your content instead of the device you want to show as recommended by Google's RWD, by Smashing Magazine's Logical Breakpoints and Picnic CSS.
You can create complex, flexible layouts with it. Just resize the browser to see how powerful it is:

1

2

3

4

5

6

7

8

9

10

Equally sized columns
Let's start through the basics though. Just a container with equally sized children:

1

2

3

4

5

6

With the class flex
, smaller children will be spaced equally to fill all of the content. However, this only works with small children. If you have children bigger than their corresponding width (1/6th in the above) they will not be restricted:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

2

To fix this, manually set the number of columns as explained in the next point.
Column count
If instead you prefer certain column count, such as in a gallery where it can span several rows, use a counter besides the class flex:

1

2

3

4

5

The columns will keep being equally spaced, but this time with the width corresponding to the column counter. You can use any number as a class from one to twelve:
one
two
three
four
five
six
seven
eight
nine
ten
eleven
twelve
Most grid systems use a 12 grid system, but we wanted to use a more flexible system and allow you to choose the grid size.
Responsive column count
We follow a mobile-first design. Put the number of columns for mobile as explained in the previous point. Then, when things get too stretched, add a column counter with the number of pixels in 100 increments as follows:

1

2

3

4

5

6

The number after the column count as in -600
or -1200
are the breakpoints. When the website width is over that number, that column count will be used instead of the previous. If we use two or more, the largest column count will be used.
For example, in a desktop with a screen of 1920x1080px
the previous one will display 6 columns. Any screen from 600px to 1200px will display three columns and smaller than 600px will display 2 columns.
The increment is 100px and starts in 500px up to 2000px both included. You can use any of those suffixes for the column count class:
-500
-600
-700
-800
-900
-1000
-1100
-1200
-1300
-1400
-1500
-1600
-1700
-1800
-1900
-2000
Remainders
You can also modify the remainder content as you wish with a couple of utility classes. This is the default:

1

2

3

4

5

You can grow them:

1

2

3

4

5

Or you can center them:

1

2

3

4

5

Children sizing
Now that we know how the parent (or grid) can modify itself and the elements below them, the children can also go rebel and behave on their own. Say that a child wants to be half of the size of its parent element. Easy, just add the class half
:

1

2

3

We have many classes like those. They are the size relative to the parent grid:
full
half
third
two-third
fourth
three-fourth
fifth
two-fifth
three-fifth
four-fifth
sixth
none
The class none
hides the element, useful for responsive layouts
Responsive children
They can also be fine-tuned in a way similar to the above:

1

2

3

Offsets
The children can also have one offset (empty space) before it. They are built adding the class off-SIZE, similar to the size but prefixing off-:

1

2

3

We have many classes like those. They are the size of the offset relative to the parent grid:
off-none
off-half
off-third
off-two-third
off-fourth
off-three-fourth
off-fifth
off-two-fifth
off-three-fifth
off-four-fifth
off-sixth
Note:
offset-none
is useful for making responsive layouts as explained in the next point.
Responsive offsets
They can also have the minimum screen size when they start working:

1

2

3

The main difference with the width classes is that it includes a none in case you want to hide the offset at certain sizes and that it doesn't include a full
Input
Simple (or not) text form elements:
<fieldset class="flex two">
<input type="email" placeholder="Email">
<input type="password" placeholder="Password">
</fieldset>
<textarea placeholder="Textarea"></textarea>
Label
An element to display some short relevant information on the side of other element

header 1 Normal

header 2 Success

header 3 Warning

header 4 Error

paragraph Normal

Modal
The modal is pure CSS, which makes the HTML quite ugly actually. However it does work. To try it, press the button:
Show modal

<input id="modal_1" type="checkbox" />

Great offer

×

We have a special offer for you. I am sure you will love it! However this does look spammy...

See offer

Cancel

JavaScript
As always, there is no javascript. However, a little bit of javascript could enhance the experience allowing to close the modal by pressing ESC
.
document.onkeydown = function(e){
if (e.keyCode == 27) {
var mods = document.querySelectorAll('.modal > [type=checkbox]');
[].forEach.call(mods, function(mod){ mod.checked = false; });
}
}
Nav
A responsive, pure css navigation menu:
On these smaller versions it might have small glitches. Please see the top, page-wide nav to see the actual effect.

Picnic CSS

<input id="bmenub" type="checkbox" class="show">
menu

Demo
Plugins

Responsive
The nav is responsive by default. The text inside the
can be changed for the following characters for a different effect (source):
- Identical to
≡
(safe on mobile): - Trigram for heaven
☰
: - Any other:
Different height and big logo
Thanks to a vertical-align trick, you can set it up to any height you want:
nav.imponent {
padding: 2em 0;
}
.imponent .logo {
height: 3em;
}

Picnic CSS

Form elements
Just get anything you want inside the nav, most things should work.

Picnic CSS

<input id="bmenug" type="checkbox" class="show">
≡

<input placeholder="Search plugins" />

Picnic CSS

<input id="bmenug" type="checkbox" class="show">
≡

<select>
<option>Choose an option</option>
<option>Option 1</option>
<option>Option 2</option>
</select>

Fixed position
To set it on the top of the page instead of scrolling with the page, just do:
nav {
position: absolute;
}
Radio button
A simple way of using radiobuttons

<input type='radio' name="radiodemo">
Select me

<input id="radiodemo" checked type='radio' name="radiodemo">
Or me
Select
<select>
<option>Select an option</option>
<option>Good option</option>
<option>Nice option</option>
<option>Cheap option</option>
</select>
Stack
A vertical group of different elements.
Home
Plugins
Documentation
Test
They can also toggle:

<input name="stack" type="radio">

 Home

<input name="stack" type="radio">

 Plugins

<input name="stack" type="radio">

 Documentation

<input name="stack" type="radio">

 Test

Stack different kind of elements

Full size

A small form

<input class="stack" placeholder="Name" />
<input class="stack" placeholder="Email" />
<button class="stack icon-paper-plane">
Send
</button>

Pseudo buttons:
First
Second
Third
Forms
Create nice and packed forms. jsfiddle

<input class="stack" placeholder="First name" />
<input class="stack" placeholder="Last name" />
<input class="stack" placeholder="Email" />

<input class="stack" placeholder="Password" />
<input class="stack" placeholder="Repeat password" />
<textarea class="stack" placeholder="Biography"></textarea>
<button class="stack icon-paper-plane">Send</button>

Table

Name
City

Francisco
Valencia, Spain

Eve
San Francisco, USA

Martin
New York, USA

Sarah
London, UK

Tabs
Original: http://jsfiddle.net/franciscop/wwfby2y8/
A simple tab system inspired by Components CSS Tabs.

<input id='tab-1' type='radio' name='tabgroupB' checked />
Forest
<input id='tab-2' type='radio' name='tabgroupB'>
Lake
<input id='tab-3' type='radio' name='tabgroupB'>
Balloon

Gallery example
Create a gallery super-easy with thumbnails as tabs:

<input id="tabC-1" type='radio' name='tabGroupC' checked >
<input id="tabC-2" type='radio' name='tabGroupC'>
<input id="tabC-3" type='radio' name='tabGroupC'>
<input id="tabC-4" type='radio' name='tabGroupC'>

Tooltip
Hover this element to show the tooltip:
<button data-tooltip="This is a great tooltip" class="tooltip-top">
Hover for tooltip
</button>
Positions
<button data-tooltip="This is a great tooltip" class="tooltip-top">
Top
</button>
<button data-tooltip="This is a great tooltip">
Bottom (default)
</button>
<button data-tooltip="This is a great tooltip" class="tooltip-left">
Left
</button>
<button data-tooltip="This is a great tooltip" class="tooltip-right">
Right
</button>


A simple accordion component
Selector:
cb-accordion
Exported as:
CbAccordion
| Name | Description |
|---|---|
| @Input() title: string; | Set title to accordion |
| @Input() isOpened: boolean; | Set title to accordion |
| @Output() opened; | Output when accordion opened or nor |


Choose your favourite food and we'll tell you which feminist icon you are!
Pizzas for life!
Burgers for sure!
Go Back


Interests: Playing the game, Making youtube videos, Napping, Going to the gym, & Basketball.
Courses: Advanced Programming, Managerial Accounting, Introduction to the Visual Arts, Business career prep, Server Managment.
Contact<EMAIL_ADDRESS>insta@kvng.dro


|
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
| def | start |
Base class for all pipelines within mapreduce framework. Rewrites base path to use pipeline library bundled with mapreduce.


You've been successfully registered. Now please use the email we just sent you to confirm your registration.


CASABLANCA A film review by Andrew Hicks Copyright 1996 Andrew Hicks / Fatboy Productions
****
Unarguably one of the very best films in Hollywood history, CASABLANCA is set in French Morocco just before the start of World War II. Humphrey Bogart plays Rick, the nightclub owner who has refused thus far to take sides with the French resistance or the newly-appointed Nazi officials. He's his usual cool, collected self until a ghost from his past walks in on the arm of the most wanted man in the resistance. The woman is Ilsa (Ingrid Bergman), his lost love from Paris who never made it onto the train with him.
Since then he's managed to suppress the emotional scars of jilted love, but finds himself drinking alone that night, pondering the reason why, "of all the gin joints in all the cities in all the world,
she had to walk into mine." No one tells him that if she hadn't there wouldn't have been a movie, but the Paris past of Rick and Ilsa and her reasons for staying behind are what drive the movie, along with the exit visas Rick has in his possession that are the only chance of Ilsa's man, the resistance leader, to get out of Casablanca safely.
Repeated viewings add a lot of poignance to the early scenes, not just in putting the intricate, slowly-unfolding plot in big picture perspective, but in fully appreciating the reunion of Rick and Ilsa in his nightclub and understanding why Rick comes storming out to stop Sam the piano player (Dooley Wilson) from playing "As Time Goes By" after Ilsa requests it. The song, for anyone who's seen CASABLANCA, is symbolic of so much of the movie's meaning that it will be forever identified with CASABLANCA, even though it pops up in a great many other romances, including SLEEPLESS IN SEATTLE.
In the end it comes down to the age-old love triangle scenario. Bergman is still in love with Bogart but feels obligated to support her husband, while Bogart is in the situation of being in control of the destiny of the man who is married to the woman he loves. The ending is one of the most famous and memorable in movie history, and just about any line of dialogue is quotable. CASABLANCA is a wonderful, must-watch film from the Golden Age of Hollywood, one of the few movies that has actually improved with age and demands repeat viewings.
--
Visit the Movie Critic at LARGE homepage at http://www.missouri.edu/~c667778/movies.html Serving America For Over 1/50th of a Century!
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


Most people do know when their birthdays are,but some might not know what day of the week they were born.
Luckily for us, there are ways to calculate the day of the week from a specific date.
Akan names are derived from Ghanian culture. Frequently in Ghana, children are given their first name as
a day name' which corresponds to the day in the week they were born.


Guilherme is working at Bynder as a frontend developer for a little more than one year now in the Barcelona office, after graduating from FEUP in the incredible batch of 2015. During this period, he tried mainly not to get crazy with Javascript, taking part in several integration projects with other companies and, more recently, joined the team that is developing the interface for the very brand new version of the product, abusing mostly of technologies such as React, Redux GraphQL.


{% extends "base.html" %} {% import "bootstrap/wtf.html" as wtf %} {% block title %}Southern Connections{% endblock %} {% block content %}
Email: {{ email }}


Variables Page
This tab page consists of the common Section Location controls and editing facilities for the Variables section:
This box allows you to select the variable category shown in the Variable List.
- Choose Attribute (Alt+A) to show all attribute variables.
- Choose Counter (Alt+C) to show all counter variables.
- Choose Resource (Alt+R) to show all resource variables.
This list shows all variables of the selected category currently defined in the Variables section.
- Column Variable ID shows the unique internal identifier associated with each variable. The list entries are sorted by this column.
- Column Variable Name shows the name that the game will display for this variable.
- Left-click on an entry to select it.
- Double-click on an entry to display its Change Variable dialog, allowing you to change the name and definition of this variable.
Four buttons beside the list allow you to manipulate the list entries:
- Choose Change ID… to display the Change Identifier dialog, allowing you to the change the identifier associated with the selected variable.
- Choose Change Variable to display the Change Variable dialog, allowing you to change the name and definition of the selected variable.
- Choose Add Variable… to display the Change Identifier dialog, followed by the Change Variable dialog, allowing you to enter the identifier and definition for a new variable of the selected category.
- Choose Remove Variable to delete the selected variable.
Remarks
1. When adding a new variable, the resulting Change Variable dialog is initialized with the data of the currently selected variable, if any.
2. Any identifier you enter will be checked for validity, as described on the Change Identifier page, and uniqueness within the Variable List. Note that identifiers must actually be unique throughout all scenario sections, so Hexkit might still reject identifiers that were accepted by Hexkit Editor!


--- layout: default ---
GrassRoots was created because there are still a lot of problems left unsolved in the newly-legalized cannabis industry.
Our goal is to create an event where those interested in the tech-side of this industry can find each other and build something amazing together.
We're bringing together designers, developers, and entrepreneurs who share a passion for cannabis and a desire to experience what it takes to launch a cannabis technology startup!
When: May 29-31
Where: WeWork Seattle (500 Yale Avenue North, Seattle WA 98109)
Hours: Friday 6pm - 10pm
Saturday 9am - 10pm
Sunday 9am - 9pm


|
The Natural Helmholtz-Hodge Decomposition
|
#include <RGrid.h>
Public Member Functions | |
| RGrid () | |
| default constructor More... | |
| RGrid (size_t X_, float dx_) | |
| constructor for 1D grid More... | |
| RGrid (size_t X_, size_t Y_, float dx_, float dy_) | |
| constructor for 2D grid More... | |
| RGrid (size_t X_, size_t Y_, size_t Z_, float dx_, float dy_, float dz_) | |
| constructor for 3D grid More... | |
| void | get_coords (size_t v, size_t &x, size_t &y) const |
| convert between indices and vertex id More... | |
| void | get_coords (size_t v, size_t &x, size_t &y, size_t &z) const |
| convert between indices and vertex id More... | |
| size_t | get_idx (size_t x, size_t y) const |
| convert between indices and vertex id More... | |
| size_t | get_idx (size_t x, size_t y, size_t z) const |
| convert between indices and vertex id More... | |
| void | get_nbrs_idx_2D (size_t p, size_t &pxp, size_t &pxm, float &one_over_dx_, size_t &pyp, size_t &pym, float &one_over_dy_) const |
| Get neighbors of a vertex p. More... | |
| void | get_nbrs_idx_3D (size_t p, size_t &pxp, size_t &pxm, float &one_over_dx_, size_t &pyp, size_t &pym, float &one_over_dy_, size_t &pzp, size_t &pzm, float &one_over_dz_) const |
| Get neighbors of a vertex p. More... | |
| float | get_dist_sq (size_t v1, size_t v2) const |
| Compute square of the distance on the regular grid. More... | |
| float | get_dist (size_t v1, size_t v2) const |
| Compute the distance on the regular grid. More... | |
Public Attributes | |
| uint8_t | dim |
| size_t | sz |
| size_t | X |
| size_t | Y |
| size_t | Z |
| float | dx |
| float | dy |
| float | dz |
Private Member Functions | |
| void | init () |
| initialize the grid More... | |
| void | init_local () |
Static Private Member Functions | |
| static void | get_nbrs (size_t X_, float one_over_dx_, size_t x, size_t &xm, size_t &xp, float &dx_) |
Private Attributes | |
| size_t | XY |
| float | sq_dx |
| float | sq_dy |
| float | sq_dz |
| float | one_over_dx |
| float | one_over_dy |
| float | one_over_dz |
RGrid.h This file contains a structure to represent regular grids. This has centralized functionalities to obtain neighbors etc.
|
inline |
default constructor
|
inline |
constructor for 1D grid
|
inline |
constructor for 2D grid
|
inline |
constructor for 3D grid
|
inline |
convert between indices and vertex id
|
inline |
convert between indices and vertex id
|
inline |
Compute the distance on the regular grid.
|
inline |
Compute square of the distance on the regular grid.
|
inline |
convert between indices and vertex id
|
inline |
convert between indices and vertex id
|
inlinestaticprivate |
|
inline |
Get neighbors of a vertex p.
get neighbors of a vertex p pxp, pxm are x-neighbors to the right (plus) and left (minus) and so on for y and z dimensions
| p | is the input point |
| pxp | is the x-neighbor to the right (plus) |
| pxm | is the x-neighbor to the left (minus) |
| pyp | is the y-neighbor to the right (plus) |
| pym | is the y-neighbor to the left (minus) |
| one_over_dx_ | is the reciprocal of the dx corresponding to this neighbor |
| one_over_dy_ | is the reciprocal of the dy corresponding to this neighbor |
|
inline |
Get neighbors of a vertex p.
| p | is the input point |
| pxp | is the x-neighbor to the right (plus) |
| pxm | is the x-neighbor to the left (minus) |
| pyp | is the y-neighbor to the right (plus) |
| pym | is the y-neighbor to the left (minus) |
| pzp | is the z-neighbor to the right (plus) |
| pzm | is the z-neighbor to the left (minus) |
| one_over_dx_ | is the reciprocal of the dx corresponding to this neighbor |
| one_over_dx_ | is the reciprocal of the dx corresponding to this neighbor |
| one_over_dz_ | is the reciprocal of the dz corresponding to this neighbor |
|
inlineprivate |
initialize the grid
|
inlineprivate |
| uint8_t RGrid::dim |
2D or 3D
| float RGrid::dx |
| float RGrid::dy |
| float RGrid::dz |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
| size_t RGrid::sz |
size of the grid
| size_t RGrid::X |
|
private |
| size_t RGrid::Y |
| size_t RGrid::Z |


- Options
- water
- banana
- salad
- chicken
banana
Freshness guarenteed
- Ripen bananas.
Salad
Fresh from the farm.
Water
Freshest Spring water on the market.
Grilled Chicken
This chicken will make your stomach smile.
This is the healthiest lunch money can buy, if you don’t have much money.
Freshness guarenteed
Fresh from the farm.
Freshest Spring water on the market.
This chicken will make your stomach smile.