2016 - Present
PhD - Information Studies
University of Toronto
2012 - 2014
MA - Anthropology
McMaster University
2009 - 2012
BA - Directed Interdisciplinary Studies, High Honours
Carleton University
2007 - 2009
DEC - Social Sciences
Dawson College
2019 - 2021
SSHRC Doctoral Fellowship. Archaeological data curation as continuous and collaborative practice. Award ID: 752-2019-2233.
2018 - Present
Research Assistant
2016 - 2021
Database Manager
2009
Research Assistant
2007 - 2009
Research Assistant
In review
Z. Batist & J. Roe.
open-archaeo: a resource for documenting archaeological software development practices.
Journal of Open Archaeological Data.
2021
Z. Batist, V. Masters, T.C. Torma, N. Ferris, I. Huvila, S. Ross, M. Carter & C. Dallas.
Figurations of Digital Archaeological Practice in Two Mediterranean Fieldwork Projects.
Open Archaeology (Special Issue on Archaeological Practice on Shifting Grounds) 7(1):1731-1755. DOI: 10.1515/opar-2020-0217.
2021
D. Contreras, Z. Batist, C. Zogheib & T. Carter.
Matching Pragmatic Lithic Analysis and Proper Data Architecture: The QuARI R Shiny Database Interface.
Advances in Archaeological Practice 9(4):299-311. DOI: 10.1017/aap.2021.11.
2017
T. Carter, Z. Batist, K. Campeau, Y. Garfinkel & K. Streit.
Investigating Pottery Neolithic Socio-Economic “Regression” in the Southern Levant: Characterising Obsidian Consumption at Sha’ar Hagolan (N. Israel).
Journal of Archaeological Science: Reports 15:305-317. DOI: 10.1016/j.jasrep.2017.08.016.
2014
K.P. Freund & Z. Batist.
Sardinian Obsidian Circulation and Early Maritime Navigation in the Neolithic as Shown through Social Network Analysis.
Journal of Island and Coastal Archaeology 9(3):364-380. DOI: 10.1080/15564894.2014.881937.
2009
M. Loignon, W. Miao, L. Hu, A. Bouchard, T.A. Bismar, P.J. Scrivens, K. Mann, M. Basik, P. Fiset, Z. Batist & G. Batist.
Frequent Nrf2 depletion due to Cul3 overexpression in breast cancer is associated with sensitivity to carcinogens, oxidative stress and chemotherapy.
Molecular Cancer Therapeutics 8(8):2432-2440. DOI: 10.1158/1535-7163.MCT-08-1186.
2018
S. Graham, N. Gupta, J. Smith, A. Angourakis, A. Reinhard, L. Richardson, K. Ellenberger, Z. Batist, J. Rivard, B. Marwick, M. Carter, & B. Compton.
The Open Digital Archaeology Textbook Environment.
eCampus Ontario.
2020 - 2021
Queryable Artefact Record Interface (QuARI)
2018
FetchAbstracts.R
2018 - Present
open-archaeo
2014 - 2017
The Database of Obsidian Sourcing Studies (DObsiSS)
2023
Z. Batist.
Documenting the collaborative commitments that support data sharing within archaeological project collectives.
Paper presented at Digital Archaeology Bern 2023. Bern Computational and Digital Archaeology lab, University of Bern. Bern, Switzerland, 1-3 February 2023.
2021
Z. Batist & J. Roe.
Open archaeology: a survey of collaborative software engineering in archaeological research.
Paper presented at the 49th Computer Applications and Quantitative Methods in Archaeology Conference (CAA 2021). Limassol, Cyprus (Virtual), 14-18 June 2021.
2019
Z. Batist.
Untangling and extending the discursive relations mediated by archaeological data through grounded research.
Paper presented at On shifting grounds – the study of archaeological practices in a changing world. COST-Arkwork & the Department of History and Archaeology, University of Crete, October 2019.
2018
Z. Batist.
Documenting archaeological knowledge construction as socially-embedded information practices.
Paper presented at PhD Research Days 2018. Faculty of Information, University of Toronto, April 2018.
2018
Z. Batist.
Documenting archaeological knowledge construction as distributed information practices.
Paper presented at the 46th Computer Applications and Quantitative Methods in Archaeology Conference (CAA 2018). Tübingen, Germany, March 2018.
2017
Z. Batist & C. Dallas.
A view from the bridge: human- and thing-centred approaches to research practice, disciplinary discourse and local engagement with the archaeological record.
Paper presented at TAG (North America) 2017 - The Medium is the Message: Media and Mediation in Archaeology. Toronto, Ontario, May 2017.
2017
T. Carter, K. Campeau, Z. Batist, Y. Garfinkel, D. Rosenberg, Y. Rowan & K. Streit Social Interaction at Distance Over the Long Term: Obsidian Sourcing from the Southern Levant (9th – 4th millennia cal BC).
Paper presented at the Society for American Archaeology 82nd Annual Meeting. Vancouver, British Columbia, March – April 2017.
2017
Z. Batist.
Identifying Obsidian Procurement Habits during the Pre-Pottery Neolithic in the Levant using Network Analysis.
Poster presented at the Archaeological Institute of America 118th Annual Meeting. Toronto, Ontario, January 2017.
2015
Z. Batist.
The Database of Obsidian Sourcing Studies (DObsiSS): Using Git for Collaborative Management of Archaeological Data.
Poster presented at the American Archaeological Institute 116th Annual Meeting. New Orleans, Louisiana, January 2015.
2014
Z. Batist.
An Examination of Obsidian Circulation Patterns in Terms of Relational and Geographical Distance in Southwest Asia and Anatolia from the Epi-Palaeolithic to Chalcolithic Periods (14000 – 5700 B.P.).
Paper presented at Archaeological Sciences and the Ancient Mediterranean Environment. The Archaeological Centre, University of Toronto, March 2014.
2014
Z. Batist.
Using Network Analysis to Examine Relative Resource Procurement Strategies in Anatolia and Southwest Asia from the Epipaleolithic to Chalcolithic Periods (14,000 – 5700 BP).
Paper presented at the American Archaeological Institute 115th Annual Meeting. Chicago, Illinois, January 2014.
2013
K. Freund & Z. Batist.
Tracking the Circulation of Sardinian Obsidian using Network Analysis: Lithic Procurement, Cultural Interaction, and Early Maritime Navigation in the Neolithic.
Paper presented at Networks of maritime connectivity in the ancient Mediterranean: Structure, continuity, and change over the longue durée. The Archaeology Centre, University of Toronto, November 2013.
2013
Z. Batist.
Using network analysis to examine obsidian assemblage variability in Anatolia and Southwest Asia from the Epi-Palaeolithic to Chalcolithic periods (14000 – 5700 BP).
Paper presented at The Future of Historical Network Research Conference. Historical Network Research, University of Hamburg, September 2013.
2012
Z. Batist.
Eat, Drink and Be Networked: Feasting and Bronze Age Networks.
Invited panelist at the Colloquium on Digital History and the Transnational History of Nursing. Department of History, Carleton University, March 2012.
2019
Research Travel Grant ($500)
2017
Joseph and Maria Shaw Graduate Student Travel Award ($500)
2015
McMaster University Travel Scholarship for OpenCon 2015 ($2500)
2015
Edith M. Wightman Travel Scholarship ($1000)
2015
Travel Assistance Grant ($500)
2015
Graduate Student Travel Award ($120)
2014
Robert P. Wolff Thesis Prize
2014
McMaster University Travel Scholarship for OpenCon 2014 ($2500, declined)
2012
Dean’s Honour List
2015
Michael Kelway Oliver Scholarship ($2000)
2015
Full Tuition Scholarship (declined)
2020
Curatorial Practice
(MSL 2000)
2017 - 2020
Representing, Documenting, and Accessing the Cultural Record
(INF 1321)
2017
Information Policy, Regulation and Law
(INF 2181)
2016
Archaeology and Popular Culture
(ANTH 2PC3)
2014, 2015
World Archaeology
(ANTH 2WA3E)
2012, 2015
Introduction to Anthropology: Identity, Race and Power
(ANTH 1AB3E)
2013
Introduction to Anthropology: Sex, Food and Death
(ANTH 1AA3)
2022
Using Qualitative Data Analysis Software
2018
Designing and Implementing Relational Databases
2018 - Present
Founder and Maintainer, open-archaeo
2022 - Present
Community Moderator, archaeo.social
2022
Peer Mentor, UofT Coders Peer Mentorship Program
2017 - 2021
Founder and Coordinator, Archaeological Information Interest Group
2019 - 2020
Graduate Student Union Faculty Representative
2016 - 2019
Tech Fund Committee Member and Coordinator
2013 - 2014
Graduate Student Association Faculty Representative
2012
Second Annual Interdisciplinary Colloquium
2018 - Present
Scientific Scripting Languages in Archaeology Special Interest Group
2020 - 2022
UofT Coders


| DiscreteQuantileMethod |
Implementation of a quantile estimator.
|
| ExcelInterpolationQuantileMethod |
Implementation of a quantile estimator.
|
| ExponentiallyWeightedInterpolationQuantileMethod |
Implementation of a quantile and expected shortfall estimator for series with exponentially weighted probabilities.
|
| GeometricMeanCalculator |
Calculates the geometric mean of a series of data.
|
| IndexAboveQuantileMethod |
Implementation of a quantile estimator.
|
| InterpolationQuantileMethod |
Implementation of a quantile estimator.
|
| LognormalFisherKurtosisFromVolatilityCalculator |
|
| LognormalSkewnessFromVolatilityCalculator |
|
| MeanCalculator |
Calculates the arithmetic mean of a series of data.
|
| MedianCalculator |
Calculates the median of a series of data.
|
| MidwayInterpolationQuantileMethod |
Implementation of a quantile estimator.
|
| ModeCalculator |
The mode of a series of data is the value that occurs more frequently in the data set.
|
| NearestIndexQuantileMethod |
Implementation of a quantile estimator.
|
| PercentileCalculator |
For a series of data $x_1, x_2, \dots, x_n$, the percentile is the value $x$
below which a certain percentage of the data fall.
|
| PopulationStandardDeviationCalculator |
Calculates the population standard deviation of a series of data.
|
| PopulationVarianceCalculator |
Calculates the population variance of a series of data.
|
| QuantileCalculationMethod |
Abstract method to estimate quantiles and expected shortfalls from sample observations.
|
| QuantileResult |
|
| QuantileResult.Meta |
The meta-bean for QuantileResult .
|
| SampleFisherKurtosisCalculator |
The sample Fisher kurtosis gives a measure of how heavy the tails of a distribution are
with respect to the normal distribution (which has a Fisher kurtosis of zero).
|
| SampleInterpolationQuantileMethod |
Implementation of a quantile estimator.
|
| SamplePlusOneInterpolationQuantileMethod |
Implementation of a quantile estimator.
|
| SamplePlusOneNearestIndexQuantileMethod |
Implementation of a quantile estimator.
|
| SampleSkewnessCalculator |
The sample skewness gives a measure of the asymmetry of the probability
distribution of a variable.
|
| SampleStandardDeviationCalculator |
Calculates the sample standard deviation of a series of data.
|
| SampleVarianceCalculator |
Calculates the sample variance of a series of data.
|


Joy Grünklee Team Lead, css page architect, bug chaser, and the glue that held us together.
(also, did a crash course on Bootstrap js library functions, the night before the hackathon.)
Bill Paxton Handled divs and page styling, collaborative bug chasing with Joy
(kindly allowed Joy to teach him all things Bootstrap in the first 45 minutes of the hackathon, then rocked pair/collab debugging our code.)
Jeff Bravo Version control, manually managed merge conflicts. Repo stuff.
(the miscellany… graphics, icon tweaks, initial Bootstrap starter page, managed repos and solidmaybe.github.io hosting.)
Jason Aldosa Handled much of the js heavy lifting for us
Quietly coded and debugged with us for 8 hours. Basically invaluable. Smiled at times. Might be an introvert.
At the end of the day, we had a working app and couldn’t believe how fast the day just flew by.
The other big surprise, was that at the end with 15 teams presenting before a panel of judges consisting of tech luminaries from local industry, our team was recognized and awarded 3rd place in the hackathon for our work on the soldMaybe Weather App:
http://solidmaybe.github.io/weather
Go team! Solid credit to our Lead, Joy (the glue that held us together, who recognized our individual strengths and let us each do what we do best… and helping us out when we need it… Thank you, Joy.) And solid credit to our team members, who together, came together and created something wonderful (more than just the app we presented at the end of the day.) — Jeff


{% import 'molecules/notification.html' as notification with context %} {{ notification.render( 'error', true, 'This tool is not supported in your browser. Please try a newer browser or confirm that JavaScript is enabled.' ) }}


Money Play. How should Red play 42?
pips Red=161 White=164
(CorrectAnswer= 0/0, ErrorScore= 0)
Another third roll position that is not that easy.
Because he has the stronger home board Red can play reasonably aggressively. Two checkers down is the wrong idea as it gives White too many options.
The top play is 24/20, 13/11 but second by the narrowest of margins is 13/11, 6/2*. Third pick is 24/18*. 24/22, 13/9 doesn’t take enough advantage of the stronger board and although not an error it is edging that way.
Over the board I play 13/11, 6/2* for the complications.
Because he has the stronger home board Red can play reasonably aggressively. Two checkers down is the wrong idea as it gives White too many options.
The top play is 24/20, 13/11 but second by the narrowest of margins is 13/11, 6/2*. Third pick is 24/18*. 24/22, 13/9 doesn’t take enough advantage of the stronger board and although not an error it is edging that way.
Over the board I play 13/11, 6/2* for the complications.
1. Cubeful 2-ply 24/20 13/11 Eq.: +0.139 0.535 0.164 0.009 - 0.465 0.126 0.005 2. Cubeful 2-ply 24/18 Eq.: +0.120 (-0.018) 0.533 0.150 0.007 - 0.467 0.125 0.004 3. Cubeful 2-ply 13/11 6/2* Eq.: +0.118 (-0.020) 0.526 0.174 0.010 - 0.474 0.135 0.009 4. Cubeful 2-ply 24/22 13/9 Eq.: +0.107 (-0.031) 0.526 0.160 0.007 - 0.474 0.125 0.005 5. Cubeful 2-ply 24/22 6/2* Eq.: +0.105 (-0.033) 0.523 0.162 0.007 - 0.477 0.122 0.006


All files src/controllers/app.invoke
14.48%
Statements
52/359
7.26%
Branches
13/179
2.44%
Functions
2/82
15.16%
Lines
52/343
| File |
|
Statements |
|
Branches |
|
Functions |
|
Lines |
|
| exec.app.ts |
|
11.21% |
12/107 |
5.88% |
3/51 |
0% |
0/29 |
11.76% |
12/102 |
| index.ts |
|
100% |
4/4 |
100% |
0/0 |
100% |
0/0 |
100% |
4/4 |
| pipe.output.ts |
|
9.62% |
5/52 |
0% |
0/16 |
0% |
0/10 |
9.62% |
5/52 |
| pipe.raw.ts |
|
44.44% |
4/9 |
100% |
0/0 |
0% |
0/4 |
44.44% |
4/9 |
| post.invoke.ts |
|
21.74% |
10/46 |
29.41% |
5/17 |
8.33% |
1/12 |
24.39% |
10/41 |
| pre.invoke.ts |
|
8.65% |
9/104 |
5.62% |
5/89 |
6.25% |
1/16 |
9.09% |
9/99 |
| spawn.ts |
|
21.62% |
8/37 |
0% |
0/6 |
0% |
0/11 |
22.22% |
8/36 |


- terminalWindow - Variable in class com.risk.team.controller.GamePhaseController
-
TextArea to which current game information will be displayed
- terminalWindow - Variable in class com.risk.team.controller.RiskTournamentController
-
Terminal window text area
- testPlayer - Static variable in class com.risk.team.model.PlayerTest
-
Object for Player Class
- text - Variable in class com.risk.team.controller.RiskCardController
-
Variable for the text
- textArea - Variable in class com.risk.team.controller.RiskTournamentController
-
- textArea - Variable in class com.risk.team.model.PlayerTest
-
The @textArea
- textArea - Variable in class com.risk.team.model.TournamentModelTest
-
- textArea - Variable in class com.risk.team.services.RiskLaunchPhaseTest
-
The @textArea
- toString() - Method in class com.risk.team.model.Continent
-
returns name of the continent in string format.
- toString() - Method in class com.risk.team.model.Country
-
returns the name of the country.
- totalCountries - Variable in class com.risk.team.services.RiskMapGraphTest
-
variable for total no of countries
- totalCountriesCountTest() - Method in class com.risk.team.services.RiskMapGraphTest
-
Test method for setting total no of countries
- tournamentModel - Variable in class com.risk.team.controller.RiskTournamentController
-
Object for TournamentModel class
- TournamentModel - Class in com.risk.team.model
-
This class contains the methods related to tournament mode.
- TournamentModel() - Constructor for class com.risk.team.model.TournamentModel
-
Constructor for TournamentModel
- tournamentModel - Variable in class com.risk.team.model.TournamentModelTest
-
Object for TournamentModel Class
- TournamentModelTest - Class in com.risk.team.model
-
Test class for Tournament Model Class.
- TournamentModelTest() - Constructor for class com.risk.team.model.TournamentModelTest
-
- TournamentView - Class in com.risk.team.view
-
This class provides the view for the user showing game screen..
- TournamentView() - Constructor for class com.risk.team.view.TournamentView
-
- tradeCards(Card) - Method in class com.risk.team.controller.GamePhaseController
-
Method to exchange the cards to get that number of armies.
- tradeCards(List<Card>, int) - Method in class com.risk.team.model.Player
-
Methods for exchanging cards of the player for armies


The scariest time of the year has arrived! Enjoy the seasonal fun for everyone to enjoy!

Scroll Down
CREEP IT REAL!
Trick or Treat? Get candy, scare your friends, play along and lift your spirit to the top of the leaderboard to win!
We know you're dying to have some spooktacular fun!
Scary
Boo Bot


(at http://www.jcse.org/, ISSN 1466-8858)
Volume 3 Paper 4
Simulation of Electrochemical Noise Due to Metastable Pitting
Source Code
The source code is provided in a self-extracting file. In order to load
this on your computer:
- Download the self-extracting program file
to a suitable directory on your computer (you can allow it to run directly
if your browser permits it, but you would probably be wise to download it
first so that it can be checked for viruses).
- Run the program - this will extract the source code to a specified
directory. By default the extraction directory is set to the Windows
temporary directory, and you will probably want to change this to
something more suitable.
- The contents of the various files are explained in the ReadMe.txt file.
Program
The program is provided in a self-extracting file. To install the program:
- Download the self-extracting program file to
your computer and run it to extract the files (you can allow it to run
directly if your browser permits it, but you would probably be wise to
download it first so that it can be checked for viruses).
- Note the directory that the files are extracted to (by default this is
set to the Windows temporary directory, but you are advised to change it
to a new directory so that you can delete all of the installation files
easily when you have finished the installation).
- When the files have been extracted, run the program Setup.exe that has
been extracted, and this will install the program on your computer.
- To uninstall the program use the Windows Add/Remove Programs command in
the Control Panel.
Copyright
Note that the program and the source code remain the copyright of , and he should be contacted for formal approval if it is wished to
use them for commercial activities.
Send Mail to the
Journal of Corrosion Science & Engineering
Home Page
Corrosion Information Server
Center for Electrochemical Science and Engineering, University of Virginia (JCSE
Mirror Site - currently being redeveloped)


{% extends "main.html" %}
{% set title = 'About' %}
{% block content %}
{% filter markdown %}
## Me
![Me](/static/face.jpg){: .right }
I'm a student at [Aalto University](https://aalto.fi), Finland. I'm currently working towards an MSc in Automation and Electrical Engineering. I hold an interest in programming and technology in its various forms.
You can find all sorts of programming stuff I've done on [my Github](https://github.com/RoopeSavolainen). I can also be found on [LinkedIn](https://www.linkedin.com/in/roopesavolainen/).
You can find my Curriculum Vitae [here](/static/cv.pdf).
## Site
This is my personal homepage. I (try to) keep [a blog](/blog), where I write about my programming projects, among other things.
The site is built using python and Flask. You can find [the source code on my Github](https://github.com/RoopeSavolainen/roope.io).
{% endfilter %}
{% endblock %}


freeCodeCamp Survey Form
Thank you for taking time to help us improve the platform
Name
Email
Age
Which option best describes your current role?
What would you like to see improved? (Check all that apply)
Front-end Projects
Back-end Projects
Data Visualization
Challenges
Open Source Community
Gitter help rooms
Videos
City Meetups
Wiki
Forum
Additional Courses
Any comments or suggestions?
Submit


| S | stats toolbox needed | I | interactive (user input required) |
| B | bioinformatics toolbox needed | M | matlab needed (will not work in octave) |
| O | optimization toolbox needed | W | windows needed (will not work in linux) |
| X | currently broken | * | slow (two stars indicates very slow) |
| File Name | Brief Description | Tags |
|---|---|---|
| bayesfactorGeneDemo | Bayes Factor Gene Demo | S |
| betaSampleDemo | Monte Carlo approximation to a probability of being in an interval | |
| confintDemo | Larsen and Marx p332 | S |
| hoffNormalmsePlots | Relative MSE plot | S |
| mixdirDemo3 | Biosequence analysis Demo | |
| mixDirDnaDemo | Mixture of Discrete Distributions DNA Demo | |
| multinomIndepLogBF | Multinomial Bayes Factor demo | |
| newcombDemo | Determine if Newcomb's speed of light data is Gaussian | |
| pairedTestDemo | Plot posterior on difference in rates given paired contingency table | S |
| pairedVsUnpairedTestDemo | Compare paired and unpaired Bayesian posteriors on contingency table differences | S |
| paretoDemoTaxicab | Pareto Taxicab Example | |
| studentFitDemo | Compare EM to matlab stats toolbox | S |
| studentFitMultiDemo | Fit multivariate student T distribution usign ECME |


A logged on user can be running in Sandbox Mode. It means that any updates the user makes to table entries are not sent to the server but merely reflected into the localStorage cache. The result is that it looks like the updates are done until the localStorage cache is cleared.
The default title shows when the User is running in Sandbox Mode.
This is used by the demo site to handle the guest UserID.
Whenever a property sandbox=true
is added to a User Record that user will run in Sandbox Mode.
This is checked in the TRI.js code at the appropriate update points and alternate execution paths taken.
As a security measure to thwart any potential hackers the server also monitors this setting and disables any updates for such a user.
The cached updates are stored in the localStorage cache. In the Chrome browser this can be viewed in debug mode (<ctrl+shift+J>) under the Resources>Local Storage>http://.. view.
The entry of the form app-table-
cache are the records for table table
for app id app
. This can be deleted to remove the updates.
For good measure the entries of the form status-app-app
which stores the status for app id can also be deleted.


--- layout: page title: Working With Local Files lead: Drag one or many audio files into the bottom container! excerpt: Work with local files added in the playlist. File objects can be added using the EventEmitter. permalink: newtracks.html javascript: newtracks.js ---


Kane thanks Pochettino for making his 'dreams' come true
by Sports DeskTottenham captain Harry Kane thanked Mauricio Pochettino for helping him realise his dreams following the Argentinian's sacking.
Spurs sprung a surprise on Tuesday when they announced Pochettino's five-and-a-half-year spell as manager had been ended.
Pochettino had enjoyed a fine spell at the club, transforming them into top-four regulars and taking Spurs to their first Champions League final last season, ultimately losing 2-0 to Liverpool.
But after a difficult start to the new campaign, claiming just 14 points from their first 12 matches, chairman Daniel Levy made a drastic decision, with Spurs confirming Jose Mourinho as their new manager on Wednesday.
There remains plenty of respect for Pochettino in the Spurs dressing room, however, with skipper Kane the latest to pay tribute to ex-Southampton boss.
"Gaffer. I'll be forever thankful to you for helping me achieve my dreams," Kane wrote on his official Twitter account.
"We've had some amazing moments in the last five and a half years that I will never forget.
"You were my manager but my friend as well and I thank you for that relationship. Good luck with your next chapter!"


Presented by Victor Engmark
PS1='\$ ' PS2='> '
Count commands with quotes in $username
’s history
| Syntactic double quotes | count="" |
| Command substitution | count="$()" |
| Word splitting | count="$(grep --count)" |
| Syntactic single quotes | count="$(grep --count '')" |
| Quoted string | count="$(grep --count '"')" |
| Tilde expansion | count="$(grep --count '"' ~)" |
Count commands with double quotes in $username
’s Bash history.
| Syntactic double quotes | count="$(grep --count '"' ~"")" ☹ |
| Variable expansion | count="$(grep --count '"' ~"${username}")" |
| Double quoted literal | count="$(grep --count '"' ~"${username}/.bash_history")" |
$ username="$USER"
$ count="$(grep --count '"' ~"${username}/.bash_history")"
grep: ~train/.bash_history: No such file or directory
$ ls ~train/.bash_history /home/train/.bash_history
$ wtf bash: wtf: command not found
The order of expansions is: […] tilde expansion, parameter and variable expansion, […]
Solution: eval getent
+cut
$ username="$USER"
$ user_home="$(getent passwd "$username" | cut --delimiter=':' --fields='6')"
$ count="$(grep --count '"' "${user_home}/.bash_history")"
$ echo "$count"
169
Read left-to-right:
$ { echo info; echo error >&2; } > result.txt 2>&1 $ cat result.txt
info error
$ { echo info; echo error >&2; } 2>&1 > result.txt
error
$ cat result.txt
info
One file per redirect:
$ echo foo > foo.txt
$ echo bar > bar.txt
$ echo > ./*.txt
bash: ./*.txt: ambiguous redirect
$ cat foo.txt bar.txt
foo
bar
cat
is only needed in corner cases like combining stdin and a file:
$ echo foo > foo.txt
$ echo bar | cat foo.txt -
foo
bar
Redirect the rest of the script:
exec > out.log 2> error.log
Print and save the output with tee
:
$ echo foo | tee output.log
foo
$ cat output.log
foo
--append
to append to file.
Redirect a stream to a command and back again:
$ (echo out; echo foo >&2; echo bar >&2) 2> >(grep bar >&2)
out bar
Standard output is synchronous but standard error is asynchronous — its ordering interleaved with standard output is not guaranteed.
A script is processing a lot of items, printing out useful information as it goes. It also prints a lot of identical and irrelevant lines on standard error. Silence only these identical lines so that you are still alerted when something actually bad happens.
Example: du --summarize /*
printing Permission denied.
Application specific workarounds to get colour output:
grep --color=always […] | less --RAW-CONTROL-CHARS
Colour codes are characters.
Subshell environment for each subsequent command:
$ count=0 $ env | while read > do > let ++count > done $ echo "$count"
0
Context is lost.
Some tools have a flag to separate or terminate entries with NUL.
You cannot store NUL in a variable.
You cannot put NUL in a literal:
$ printf '%q\n' $'foo\0bar\0baz\0'
foo
Bash doesn’t like half the world’s files.
Single quotes for any literals without single quote:
$ printf '%s\n' '-|\|o e$cape'
-|\|o e$cape
Double quotes for strings with variables, commands or single quotes:
$ subject='this'
$ printf '%s\n' "Can't $(basename /usr/bin/touch) ${subject}"
Can't touch this
Dollar single quotes for escape sequences:
$ printf '%s\n' $'first\nsecond'
first
second
<< NAME
is almost like a double quoted context:
$ result=EOF
$ cat << EOF
> EOF must be the only literal on the line to terminate:
> EOF
> ${result}
> EOF
EOF must be the only literal on the line to terminate:
EOF
EOF
Backslash in << NAME
is literal except before a newline:
$ cat << EOF
> foo\
> bar
> foo\bar
> EOF
foobar
foo\bar
Quotes are literal in << NAME
:
$ cat << EOF
> '"
> EOF
'"
<< 'NAME'
works like a single quoted context:
$ result=foo
$ cat << 'EOF'
> ${result}
> EOF
${result}
Avoid word splitting in unquoted strings:
$ printf '%s\n' foo bar
foo
bar
$ printf '%s\n' foo\ bar
foo bar
\n
is a printf
escaped character, not a shell one.
Literal \n
terminators:
$ printf '%s\\n' foo bar
foo\nbar\n
No newline at end of output, so it's followed immediately by PS1
.
Escaping escape sequences:
$ printf %s\\\\n foo bar
foo\nbar\n
The number of backslashes always doubles, because each character has to be escaped separately in the next context.
Avoid multiple escape levels
printf '%q'
$variable
Arguments beyond $9
:
$ set -- {a..z}
$ echo ${10}
j
$variable
Avoid $*
:
$ set -- 'a b' 'c d' $ for parameter in "$*" > do > printf '%s\n' "$parameter" > done
a b c d
$ for parameter in $* > do > printf '%s\n' "$parameter" > done
a b c d
$variable
Use "$@"
:
$ for parameter > do > printf '%s\n' "$parameter" > done
a b c d
“Default” for
loop target.
$variable
Default value:
PATH="${PATH-/bin:/usr/bin}"
:-
also matches empty value.
Use with set -o nounset
.
$variable
Replacement value:
result="${1+defined}"
:+
only matches non-empty value.
$variable
The right hand side can be more complex:
$ list= $ entry='x' $ list="${list:+"${list}:"}$entry" $ echo "$list"
x
$ list=foo:bar $ entry='x' $ list="${list:+"${list}:"}$entry" $ echo "$list"
foo:bar:x
Collect non-IFS
characters:
$ matches=($(grep --only-matching . <<< $'some foo\nother foo')) $ echo "${matches[@]}"
s o m e f o o o t h e r f o o
No quotes to enable word splitting.
Collect IFS
-separated or -terminated “words”:
$ while IFS=$'\t' read -a cells > do > echo Line > printf '%s\n' "${cells[@]}" > done <<< $'column 1\tcolumn 2\nvalue 1\tvalue 2'
Line column 1 column 2 Line value 1 value 2
Append to an array:
$ characters=({a..z}) $ characters+=({0..9}) $ echo "${characters[@]}"
a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9
Create an array of all the executables on your $PATH
.
Use the built in [[
:
unset foo $ [ $foo = 'bar' ]
bash: [: -eq: unary operator expected
$ [[ $foo = 'bar' ]]
Can use unquoted variable references.
Use shell conditionals &&
, ||
etc. — easier to understand:
if [[ $name = 'foo' ]] || [[ $name = 'bar' ]]
Numeric contexts:
$((index++))
prints resultlet index++
prints nothing[[ $index -eq 0 ]]
0
starts octal:
$ echo $((077))
63
0x
starts hex:
$ echo $((0xFF))
255
Case insensitive.
N#
starts base N (2-64):
$ echo $((64#a))
10
$ echo $((64#A))
36
$ echo $((64#@))
62
$ echo $((64#_))
63
Case insensitive if base ≤ 36.
Comes after variable expansion:
$ msb=BE $ lsb=EF $ echo $((0x${msb}${lsb}))
48879
Beware leading zeros:
$ month=08 $ let month++
bash: let: 08: value too great for base (error token is "08")
Find out in August!
Type coercion:
$ foo=one $ [[ $foo -eq 0 ]] && echo 'equal'
equal
Left associative: foo || bar && baz
≡ { foo || bar; } && baz
$ false || echo failure && echo success
failure success
foo && bar || baz
≡ { foo && bar; } || baz
$ false && echo success || echo failure
failure
Break it up:
if some_command
then
echo success
else
echo failure
fi
What is the actual contents of $result
?
$ result="$(printf '%s' $'foo\n\n')" $ echo "${#result}"
3
$()
removes trailing newlines.
$()
workaround:
$ result="$(printf '%s' $'foo\n\n\n'; printf x)"
$ result="${result%x}"
$ echo "${#result}"
6
<<<
(here string) is bad in a different way:
$ wc -c <<< $'foo\n\n'
6
Unconditionally adds a newline.
Newline-preserving redirects:
$ printf $'foo\n\n' | wc -c 5
$ printf $'foo\n\n' > result.txt $ wc -c result.txt 5 result.txt
$ wc -c < <(printf $'foo\n\n') 5
echo
vs. printf
$ echo foo | xxd -cols 1
00000000: 66 f 00000001: 6f o 00000002: 6f o 00000003: 0a .
echo
adds newline (0x0a) at end of output.
echo
vs. printf
$ printf '%s' foo | xxd -cols 1
00000000: 66 f 00000001: 6f o 00000002: 6f o
printf
formats arguments.
Read newline-terminated strings:
$ while read > do > echo "$REPLY" > done < <(printf '%s\n' 'foo' 'bar')
foo bar
A “line” in *nix operating systems.
Read newline-separated strings:
$ while read || [[ -n "$REPLY" ]] > do > echo "$REPLY" > done < <(printf $'foo\nbar')
foo bar
read
populates variable then fails on non-newline character at EOF.
Read NUL-terminated strings:
$ cd "$(mktemp --directory)" $ touch 'backslash\separated' $'newline\nseparated' 'space separated' $ while IFS= read -r -d '' > do > printf '%q\n' "$REPLY" > done < <(find . -mindepth 1 -exec printf '%s\0' {} +)
./backslash\\separated $'./newline\nseparated' ./space\ separated
Read IFS
-terminated words:
$ read first rest <<< ' foo bar baz ' $ printf '%q\n' "$first" "$rest"
foo bar\ \ \ baz
Trims leading and trailing IFS
characters.
Command “success:”
$ if true
> then
> echo 'Success'
> fi
Success
Defined as exit code 0.
Completely application specific. For example, arithmetic zero in let
:
$ count=0
$ echo $? 0
$ let count=0
$ echo $? 1
$ let count++
$ echo $? 1
$ let count++
$ echo $? 0
$ printf '%s\n' "$count" 2
Some fairly well documented numbers: /usr/include/sysexits.h:
$ grep '^#define ' /usr/include/sysexits.h
#define EX_OK 0 /* successful termination */
#define EX__BASE 64 /* base value for error messages */
#define EX_USAGE 64 /* command line usage error */
#define EX_DATAERR 65 /* data format error */
#define EX_NOINPUT 66 /* cannot open input */
#define EX_NOUSER 67 /* addressee unknown */
#define EX_NOHOST 68 /* host name unknown */
#define EX_UNAVAILABLE 69 /* service unavailable */
#define EX_SOFTWARE 70 /* internal software error */
#define EX_OSERR 71 /* system error (e.g., can't fork) */
#define EX_OSFILE 72 /* critical OS file missing */
#define EX_CANTCREAT 73 /* can't create (user) output file */
#define EX_IOERR 74 /* input/output error */
#define EX_TEMPFAIL 75 /* temp failure; user is invited to retry */
#define EX_PROTOCOL 76 /* remote error in protocol */
#define EX_NOPERM 77 /* permission denied */
#define EX_CONFIG 78 /* configuration error */
#define EX__MAX 78 /* maximum listed value */
When a command terminates on a fatal signal whose number is N, Bash uses the value 128+N as the exit status.
$ kill -l INT 2
$ sleep 1d ^C $ echo $?
130
Don’t exit "$error_count"
!
$ bash $ exit 256 exit $ echo $?
0
#!/usr/bin/env bash
set -o errexit
temporary_directory="$(mktemp --directory)"
readonly temporary_directory
[…]
temporary_directory="$(mktemp --directory)"
#!/usr/bin/env bash
set -o errexit -o noclobber
temporary_directory="$(mktemp --directory)"
echo "Start" > "${temporary_directory}/script.log"
[…]
echo "End" > "${temporary_directory}/script.log"
/tmp/[…]/script.log: cannot overwrite existing file
#!/usr/bin/env bash
set -o errexit -o noclobber -o nounset
temporary_directory="$(mktemp --directory)"
echo "Start" > "${temporary_directry}/script.log"
temporary_directry: unbound variable
#!/usr/bin/env bash
set -o errexit -o noclobber -o nounset -o pipefail
grep foo "$1" | cut --delimiter=':' --fields=1 | grep --invert-match bar
Umask:
$ cd "$(mktemp --directory)" $ umask 0022 $ touch first $ ls -l first -rw-r--r-- […] first
$ umask 0077 $ touch second $ ls -l second -rw------- […] second
Don’t litter
trap 'rm -rf "$temporary_directory"' EXIT
temporary_directory="$(mktemp --directory)"
Also atomic and (by default) only accessible by owner.

Now you have to clean up manually.
kill "$!"
timeout="$(date --date='now + 1 minute' +%s)"
while [[ "$(date +%s)" -lt "$timeout" ]]
do
if kill -0 "$!"
then
sleep 0.1
else
exit 0 # Win
fi
done
exit 1 # Fail
What you see is not always what you think you see:
$ printf '%s\n' “foo” ‘foo’
“foo” ‘foo’
What you see is not always what you think you see:
$ grep —fixed-strings foo <<< foobar
grep: foo: No such file or directory
Never copy straight to a terminal: git clone
/dev/null
echo "Hi! I'm a Trojan horse, what do you not need on this machine?"

Pipelined commands run simultaneously, so ordering is not guaranteed.
set -o xtrace
inside scripts.
strace
prints system calls and signals:
$ strace -e openat cat /dev/null
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/usr/lib/libc.so.6", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3 openat(AT_FDCWD, "/dev/null", O_RDONLY) = 3 +++ exited with 0 +++
man 1 strace
lsof
lists files currently open by programs:
$ nc catalyst.net.nz 80 & [3] 9999 $ lsof -p $!
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME nc 9999 username cwd DIR 254,3 4096 8919615 /home/username nc 9999 username rtd DIR 254,2 4096 2 / nc 9999 username txt REG 254,2 39608 2921200 /usr/bin/netcat nc 9999 username mem REG 254,2 84016 2885772 /usr/lib/libresolv-2.27.so […] nc 9999 username 0u CHR 136,0 0t0 3 /dev/pts/0 nc 9999 username 1u CHR 136,0 0t0 3 /dev/pts/0 nc 9999 username 2u CHR 136,0 0t0 3 /dev/pts/0 nc 9999 username 3u IPv4 4538734 0t0 TCP machine-name:46748->catalyst.net.nz:http (ESTABLISHED)
man 8 lsof
netstat
prints networking information:
$ sudo netstat --tcp --listening --numeric --program | sed --quiet '1,2p;/ssh/p'
Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 <IP_ADDRESS>:22 <IP_ADDRESS>:* LISTEN 1234/sshd tcp6 0 0 :::22 :::* LISTEN 1234/sshd
man 8 netstat
/proc has lots of runtime information:
$ journalctl --catalog --follow --unit=sshd | grep "$USER" & $ ls -lA /proc/$!/fd
total 0 lr-x------ 1 username username 64 May 7 14:32 0 -> 'pipe:[5181666]' lrwx------ 1 username username 64 May 7 14:32 1 -> /dev/pts/3 lrwx------ 1 username username 64 May 7 14:32 2 -> /dev/pts/3
man 5 procfs
Find the maximum number of files your shell (PID $$
) can open. Hint: /limits
Extra exercise: Find the PID of the journalctl
command:
$ journalctl --catalog --follow --unit=sshd | grep "$USER" &
Even POSIX mode does not lead to portable code:
$ type -a [[ [[ is a shell keyword $ bash --posix bash-4.4$ [[ 1 ]]
bash-4.4$ echo $? 0
Readability often suffers — compare
sort -V
with
sort --version-sort
Bashisms are helpful:
read -a
done <(my_script)
$'\n'
*.sh in the current directory in current locale’s alphabetical order:
ls *.sh | while read file
do
something $file
done
Expelled from PhD programme, computer ground to dust and buried using the secret rituals of the church of Stéphane Chazelas.
*.sh in the current directory in current locale’s alphabetical order:
for file in ./*.sh
[…]
Easy!
*.sh including dotfiles in the current directory in current locale’s alphabetical order:
shopt -s dotglob
for file in ./*.sh
[…]
Easy!
*.sh except for foo.sh in the current directory in current locale’s alphabetical order:
shopt -s extglob
for file in ./!(foo).sh
[…]
OK then
*.sh in and below the current directory in current locale’s alphabetical order:
shopt -s globstar
for file in ./**/*.sh
[…]
Sure…
Universal ordering:
export LC_COLLATE=C
for file in ./*
[…]
Or LC_COLLATE="en_NZ.utf8"
…
curl dict://dict.org/d:collate
files=(./*)
for ((index = ${#files[@]} - 1; index >= 0; index--))
do
something "${files[$index]}"
done
The end is near.

Combining all of these:
Haha nope! Left as an exercise to the reader.


For feedback/suggestions contact me at
https://BarRaider.com
Strip/Bus
Strip
Bus
Strip Num
0
1
2
3
4
5
6
7
Setting
comp
denoiser
delay
fx1
fx2
gate
reverb
Step Size
0.1
0.2
0.5
1
2
5
10
Title (optional)


World Bank ends funding to controversial Uighur schools in China
WASHINGTON, Nov 11 — The World Bank announced today it was ending a project to fund vocational schools in China following allegations of mistreatment of minority Muslim Uighurs.
The World Bank launched another review of the programme in late August after Foreign Policy magazine reported that a school that benefited from a tranche of the US$50 million (RM207.1 million) loan to China bought “barbed wire, gas launchers, and body armour.”
The Washington-based development lender said it launched another review in the wake of the charges but “did not substantiate the allegations.”
However, “In light of the risks associated with the partner schools, which are widely dispersed and difficult to monitor, the scope and footprint of the project is being reduced.”
“Specifically, the project component that involves the partner schools in Xinjiang is being closed,” the World Bank said in a statement.
China’s treatment of the Uighurs — a mostly Muslim, Turkic-speaking minority concentrated in the tightly-controlled northwestern Xinjiang region — has come under growing scrutiny.
Rights groups and experts say more than one million mostly Muslim ethnic minorities have been interned in re-education camps in Xinjiang, where they are being tortured and forced to renounce their religion.
China initially denied the existence of the camps before admitting to running what it called “vocational education centers,” which it presented as necessary to combat religious extremism and boost employment.
World Bank funding to five schools in the project will, however, continue. — AFP


fun detachPaymentMethod(paymentMethodId: String, listener: PaymentMethodRetrievalListener): Unit
Detaches a PaymentMethod from a customer.
paymentMethodId
- the ID of the payment method to be detached
listener
- a PaymentMethodRetrievalListener called when the API call
completes with the detached PaymentMethod.


Syllabus
FEDERAL ELECTION COMMISSION
v.
BEAUMONT
et al.
A corporation is prohibited from making a contribution or expenditure in connection with certain federal elections, 2 U. S. C. §441b(a), but not from establishing, administering, and soliciting contributions to a separate fund to be used for political purposes, §441b(b)(2)(C). Such a PAC (so called after the political action committee that runs it) is free to make contributions and other expenditures in connection with federal elections. Respondents, a nonprofit advocacy corporation known as North Carolina Right to Life, Inc., and others (collectively NCRL), sued petitioner Federal Election Commission (FEC), challenging the constitutionality of §441b and its implementing regulations as applied to NCRL. As relevant here, the District Court granted NCRL summary judgment as to the ban on direct contributions, and the Fourth Circuit affirmed.
Held: Applying the direct contribution prohibition to nonprofit advocacy corporations is consistent with the First Amendment. Pp. 416.
(a) An attack on the federal prohibition of direct corporate political contributions goes against the current of a century of congressional efforts to curb corporations potentially deleterious influences on federal elections. Since 1907, federal law has barred such direct corporate contributions. Much of the subsequent congressional attention to corporate political activity has been meant to strengthen the original, core prohibition on such contributions. Federal Election Commn v. National Right to Work Comm., 459 U. S. 197. As in 1907, current law focuses on the corporate structures special characteristics that threaten the integrity of the political process. Id., at 209. In barring corporate earnings from turning into political war chests, the ban was and is intended to preven[t] corruption or the appearance of corruption. Federal Election Commn v. National Conservative Political Action Comm., 470 U. S. 480. The ban also protects individuals who have paid money into a corporation or union for other purposes from having their money used to support political candidates to whom they may be opposed, National Right to Work, supra, at 208, and hedges against use of corporations as conduits for circumventing valid contribution limits, Federal Election Commn v. Colorado Republican Federal Campaign Comm., 533 U. S. 431, and n. 18. Pp. 48.
(b) National Right to Work all but decided against NCRLs position that §441bs ban on direct contributions is unconstitutional as applied to nonprofit advocacy corporations. There, this Court upheld the part of §441b restricting a nonstock corporation to its membership when soliciting PAC contributions, concluding that the congressional judgment to regulate corporate political involvement warrants considerable deference and reflects a permissible assessment of the dangers that corporations pose to the electoral process. 459 U. S., at 207211. It would be hard to read this conclusion, except on the practical understanding that the corporations capacity to make contributions was legitimately limited to indirect donations within the scope allowed to PACs. And the Court specifically rejected the argument made here, that deference to congressional judgments about corporate contribution limits turns on details of corporate form or the affluence of particular corporations. National Right to Work has repeatedly been read as approving §441bs prohibition on direct contributions, even by nonprofit corporations without great financial resources. Equal significance must be accorded to Federal Election Commn v. Massachusetts Citizens for Life, Inc., 479 U. S. 238 , on which NCRL and the Fourth Circuit have relied. In holding §441bs prohibition on independent expenditures unconstitutional as applied to a nonprofit advocacy corporation, the Court there distinguished National Right to Work on the ground that it addressed regulation of contributions, not expenditures. Pp. 812.
(c) This Court could not hold for NCRL without recasting its understanding of the risks of harm posed by corporate political contributions, of the expressive significance of contributions, and of the consequent deference owed to legislative judgments on what to do about them. NCRLs efforts do not unsettle existing law on these points. Its argument that Massachusetts Citizens for Life- type corporations pose no potential threat to the political system is rejected. Concern about the corrupting potential underlying the corporate ban may be implicated by advocacy corporations, which, like their for-profit counterparts, benefit from state-created advantages and may be able to amass substantial political war chests. Also rejected is NCRLs argument that the application of the ban on direct contributions should be subject to strict scrutiny because §441b bars, rather than limits, contributions based on their source. When reviewing political financial restrictions, the level of scrutiny is based on the importance of the political activity at issue to effective speech or political association, and restrictions on political contributions have long been treated as marginal speech restrictions subject to relatively complaisant First Amendment review because contributions lie closer to the edges than to the core of political expression. Thus, a contribution limit passes muster if it is closely drawn to match a sufficiently important interest. The time to consider the difference between a ban and a limit is when applying scrutiny at the level selected, not in selecting the standard of review itself. But even NCRLs argument that §441b is not closely drawn rests on the false premise that the provision is a complete ban. In fact, the provision allows corporate political participation through PACs. And this Court does not think that regulatory burdens on PACs, including restrictions on their ability to solicit funds, renders a PAC unconstitutional as an advocacy corporations sole avenue for making political contributions. See Right to Work, supra, at 201202. 1216.
278 F. 3d 261, reversed.
Souter, J., delivered the opinion of the Court, in which Rehnquist, C. J., and Stevens, OConnor, Ginsburg, and Breyer, JJ., joined. Kennedy, J., filed an opinion concurring in the judgment. T homas, J., filed a dissenting opinion, in which Scalia, J., joined.
Dissent
FEDERAL ELECTION COMMISSION, PETITIONER
v.
CHRISTINE BEAUMONT
et al
.
Justice Thomas , with whom Justice Scalia joins, dissenting.
I continue to believe that campaign finance laws are subject to strict scrutiny. Federal Election Commn v. Colorado Republican Federal Campaign Comm., 533 U. S. 431, 465466 (2001) ( Thomas , J., dissenting) (Colorado II) ; Colorado Republican Federal Campaign Comm. v. Federal Election Commn, 518 U. S. 604, 640 (1996) ( Thomas , J., concurring in judgment and dissenting in part) (Colorado I) . See also Nixon v. Shrink Missouri Government PAC, 528 U. S. 377, 427 (2000) ( Thomas , J., dissenting). As in Colorado II , the Government does not argue here that 2 U. S. C. §441b survives review under that rigorous standard. Indeed, it could not. [U]nder traditional strict scrutiny, broad prophylactic caps on … giving in the political process … are unconstitutional, Colorado I, 518 U. S., at 640641, because, as I have explained before, they are not narrowly tailored to meet any relevant compelling state interest, id., at 641644; Nixon , supra , at 427430. See also Colorado II , supra , at 465466. Accordingly, I would affirm the judgment of the Court of Appeals and respectfully dissent from the Courts contrary disposition.
Dissent
FEDERAL ELECTION COMMISSION, PETITIONER
v.
CHRISTINE BEAUMONT
et al
.
Justice Thomas , with whom Justice Scalia joins, dissenting.
I continue to believe that campaign finance laws are subject to strict scrutiny. Federal Election Commn v. Colorado Republican Federal Campaign Comm., 533 U. S. 431, 465466 (2001) ( Thomas , J., dissenting) (Colorado II) ; Colorado Republican Federal Campaign Comm. v. Federal Election Commn, 518 U. S. 604, 640 (1996) ( Thomas , J., concurring in judgment and dissenting in part) (Colorado I) . See also Nixon v. Shrink Missouri Government PAC, 528 U. S. 377, 427 (2000) ( Thomas , J., dissenting). As in Colorado II , the Government does not argue here that 2 U. S. C. §441b survives review under that rigorous standard. Indeed, it could not. [U]nder traditional strict scrutiny, broad prophylactic caps on … giving in the political process … are unconstitutional, Colorado I, 518 U. S., at 640641, because, as I have explained before, they are not narrowly tailored to meet any relevant compelling state interest, id., at 641644; Nixon , supra , at 427430. See also Colorado II , supra , at 465466. Accordingly, I would affirm the judgment of the Court of Appeals and respectfully dissent from the Courts contrary disposition.
Dissent
FEDERAL ELECTION COMMISSION, PETITIONER
v.
CHRISTINE BEAUMONT
et al
.
Justice Thomas , with whom Justice Scalia joins, dissenting.
I continue to believe that campaign finance laws are subject to strict scrutiny. Federal Election Commn v. Colorado Republican Federal Campaign Comm., 533 U. S. 431, 465466 (2001) ( Thomas , J., dissenting) (Colorado II) ; Colorado Republican Federal Campaign Comm. v. Federal Election Commn, 518 U. S. 604, 640 (1996) ( Thomas , J., concurring in judgment and dissenting in part) (Colorado I) . See also Nixon v. Shrink Missouri Government PAC, 528 U. S. 377, 427 (2000) ( Thomas , J., dissenting). As in Colorado II , the Government does not argue here that 2 U. S. C. §441b survives review under that rigorous standard. Indeed, it could not. [U]nder traditional strict scrutiny, broad prophylactic caps on … giving in the political process … are unconstitutional, Colorado I, 518 U. S., at 640641, because, as I have explained before, they are not narrowly tailored to meet any relevant compelling state interest, id., at 641644; Nixon , supra , at 427430. See also Colorado II , supra , at 465466. Accordingly, I would affirm the judgment of the Court of Appeals and respectfully dissent from the Courts contrary disposition.
Dissent
FEDERAL ELECTION COMMISSION, PETITIONER
v.
CHRISTINE BEAUMONT
et al
.
Justice Thomas , with whom Justice Scalia joins, dissenting.
I continue to believe that campaign finance laws are subject to strict scrutiny. Federal Election Commn v. Colorado Republican Federal Campaign Comm., 533 U. S. 431, 465466 (2001) ( Thomas , J., dissenting) (Colorado II) ; Colorado Republican Federal Campaign Comm. v. Federal Election Commn, 518 U. S. 604, 640 (1996) ( Thomas , J., concurring in judgment and dissenting in part) (Colorado I) . See also Nixon v. Shrink Missouri Government PAC, 528 U. S. 377, 427 (2000) ( Thomas , J., dissenting). As in Colorado II , the Government does not argue here that 2 U. S. C. §441b survives review under that rigorous standard. Indeed, it could not. [U]nder traditional strict scrutiny, broad prophylactic caps on … giving in the political process … are unconstitutional, Colorado I, 518 U. S., at 640641, because, as I have explained before, they are not narrowly tailored to meet any relevant compelling state interest, id., at 641644; Nixon , supra , at 427430. See also Colorado II , supra , at 465466. Accordingly, I would affirm the judgment of the Court of Appeals and respectfully dissent from the Courts contrary disposition.
Dissent
FEDERAL ELECTION COMMISSION, PETITIONER
v.
CHRISTINE BEAUMONT
et al
.
Justice Thomas , with whom Justice Scalia joins, dissenting.
I continue to believe that campaign finance laws are subject to strict scrutiny. Federal Election Commn v. Colorado Republican Federal Campaign Comm., 533 U. S. 431, 465466 (2001) ( Thomas , J., dissenting) (Colorado II) ; Colorado Republican Federal Campaign Comm. v. Federal Election Commn, 518 U. S. 604, 640 (1996) ( Thomas , J., concurring in judgment and dissenting in part) (Colorado I) . See also Nixon v. Shrink Missouri Government PAC, 528 U. S. 377, 427 (2000) ( Thomas , J., dissenting). As in Colorado II , the Government does not argue here that 2 U. S. C. §441b survives review under that rigorous standard. Indeed, it could not. [U]nder traditional strict scrutiny, broad prophylactic caps on … giving in the political process … are unconstitutional, Colorado I, 518 U. S., at 640641, because, as I have explained before, they are not narrowly tailored to meet any relevant compelling state interest, id., at 641644; Nixon , supra , at 427430. See also Colorado II , supra , at 465466. Accordingly, I would affirm the judgment of the Court of Appeals and respectfully dissent from the Courts contrary disposition.
Dissent
FEDERAL ELECTION COMMISSION, PETITIONER
v.
CHRISTINE BEAUMONT
et al
.
Justice Thomas , with whom Justice Scalia joins, dissenting.
I continue to believe that campaign finance laws are subject to strict scrutiny. Federal Election Commn v. Colorado Republican Federal Campaign Comm., 533 U. S. 431, 465466 (2001) ( Thomas , J., dissenting) (Colorado II) ; Colorado Republican Federal Campaign Comm. v. Federal Election Commn, 518 U. S. 604, 640 (1996) ( Thomas , J., concurring in judgment and dissenting in part) (Colorado I) . See also Nixon v. Shrink Missouri Government PAC, 528 U. S. 377, 427 (2000) ( Thomas , J., dissenting). As in Colorado II , the Government does not argue here that 2 U. S. C. §441b survives review under that rigorous standard. Indeed, it could not. [U]nder traditional strict scrutiny, broad prophylactic caps on … giving in the political process … are unconstitutional, Colorado I, 518 U. S., at 640641, because, as I have explained before, they are not narrowly tailored to meet any relevant compelling state interest, id., at 641644; Nixon , supra , at 427430. See also Colorado II , supra , at 465466. Accordingly, I would affirm the judgment of the Court of Appeals and respectfully dissent from the Courts contrary disposition.
Dissent
FEDERAL ELECTION COMMISSION, PETITIONER
v.
CHRISTINE BEAUMONT
et al
.
Justice Thomas , with whom Justice Scalia joins, dissenting.
I continue to believe that campaign finance laws are subject to strict scrutiny. Federal Election Commn v. Colorado Republican Federal Campaign Comm., 533 U. S. 431, 465466 (2001) ( Thomas , J., dissenting) (Colorado II) ; Colorado Republican Federal Campaign Comm. v. Federal Election Commn, 518 U. S. 604, 640 (1996) ( Thomas , J., concurring in judgment and dissenting in part) (Colorado I) . See also Nixon v. Shrink Missouri Government PAC, 528 U. S. 377, 427 (2000) ( Thomas , J., dissenting). As in Colorado II , the Government does not argue here that 2 U. S. C. §441b survives review under that rigorous standard. Indeed, it could not. [U]nder traditional strict scrutiny, broad prophylactic caps on … giving in the political process … are unconstitutional, Colorado I, 518 U. S., at 640641, because, as I have explained before, they are not narrowly tailored to meet any relevant compelling state interest, id., at 641644; Nixon , supra , at 427430. See also Colorado II , supra , at 465466. Accordingly, I would affirm the judgment of the Court of Appeals and respectfully dissent from the Courts contrary disposition.
Dissent
FEDERAL ELECTION COMMISSION, PETITIONER
v.
CHRISTINE BEAUMONT
et al
.
Justice Thomas , with whom Justice Scalia joins, dissenting.
I continue to believe that campaign finance laws are subject to strict scrutiny. Federal Election Commn v. Colorado Republican Federal Campaign Comm., 533 U. S. 431, 465466 (2001) ( Thomas , J., dissenting) (Colorado II) ; Colorado Republican Federal Campaign Comm. v. Federal Election Commn, 518 U. S. 604, 640 (1996) ( Thomas , J., concurring in judgment and dissenting in part) (Colorado I) . See also Nixon v. Shrink Missouri Government PAC, 528 U. S. 377, 427 (2000) ( Thomas , J., dissenting). As in Colorado II , the Government does not argue here that 2 U. S. C. §441b survives review under that rigorous standard. Indeed, it could not. [U]nder traditional strict scrutiny, broad prophylactic caps on … giving in the political process … are unconstitutional, Colorado I, 518 U. S., at 640641, because, as I have explained before, they are not narrowly tailored to meet any relevant compelling state interest, id., at 641644; Nixon , supra , at 427430. See also Colorado II , supra , at 465466. Accordingly, I would affirm the judgment of the Court of Appeals and respectfully dissent from the Courts contrary disposition.
Dissent
FEDERAL ELECTION COMMISSION, PETITIONER
v.
CHRISTINE BEAUMONT
et al
.
Justice Thomas , with whom Justice Scalia joins, dissenting.
I continue to believe that campaign finance laws are subject to strict scrutiny. Federal Election Commn v. Colorado Republican Federal Campaign Comm., 533 U. S. 431, 465466 (2001) ( Thomas , J., dissenting) (Colorado II) ; Colorado Republican Federal Campaign Comm. v. Federal Election Commn, 518 U. S. 604, 640 (1996) ( Thomas , J., concurring in judgment and dissenting in part) (Colorado I) . See also Nixon v. Shrink Missouri Government PAC, 528 U. S. 377, 427 (2000) ( Thomas , J., dissenting). As in Colorado II , the Government does not argue here that 2 U. S. C. §441b survives review under that rigorous standard. Indeed, it could not. [U]nder traditional strict scrutiny, broad prophylactic caps on … giving in the political process … are unconstitutional, Colorado I, 518 U. S., at 640641, because, as I have explained before, they are not narrowly tailored to meet any relevant compelling state interest, id., at 641644; Nixon , supra , at 427430. See also Colorado II , supra , at 465466. Accordingly, I would affirm the judgment of the Court of Appeals and respectfully dissent from the Courts contrary disposition.
Dissent
FEDERAL ELECTION COMMISSION, PETITIONER
v.
CHRISTINE BEAUMONT
et al
.
Justice Thomas , with whom Justice Scalia joins, dissenting.
I continue to believe that campaign finance laws are subject to strict scrutiny. Federal Election Commn v. Colorado Republican Federal Campaign Comm., 533 U. S. 431, 465466 (2001) ( Thomas , J., dissenting) (Colorado II) ; Colorado Republican Federal Campaign Comm. v. Federal Election Commn, 518 U. S. 604, 640 (1996) ( Thomas , J., concurring in judgment and dissenting in part) (Colorado I) . See also Nixon v. Shrink Missouri Government PAC, 528 U. S. 377, 427 (2000) ( Thomas , J., dissenting). As in Colorado II , the Government does not argue here that 2 U. S. C. §441b survives review under that rigorous standard. Indeed, it could not. [U]nder traditional strict scrutiny, broad prophylactic caps on … giving in the political process … are unconstitutional, Colorado I, 518 U. S., at 640641, because, as I have explained before, they are not narrowly tailored to meet any relevant compelling state interest, id., at 641644; Nixon , supra , at 427430. See also Colorado II , supra , at 465466. Accordingly, I would affirm the judgment of the Court of Appeals and respectfully dissent from the Courts contrary disposition.
Dissent
FEDERAL ELECTION COMMISSION, PETITIONER
v.
CHRISTINE BEAUMONT
et al
.
Justice Thomas , with whom Justice Scalia joins, dissenting.
I continue to believe that campaign finance laws are subject to strict scrutiny. Federal Election Commn v. Colorado Republican Federal Campaign Comm., 533 U. S. 431, 465466 (2001) ( Thomas , J., dissenting) (Colorado II) ; Colorado Republican Federal Campaign Comm. v. Federal Election Commn, 518 U. S. 604, 640 (1996) ( Thomas , J., concurring in judgment and dissenting in part) (Colorado I) . See also Nixon v. Shrink Missouri Government PAC, 528 U. S. 377, 427 (2000) ( Thomas , J., dissenting). As in Colorado II , the Government does not argue here that 2 U. S. C. §441b survives review under that rigorous standard. Indeed, it could not. [U]nder traditional strict scrutiny, broad prophylactic caps on … giving in the political process … are unconstitutional, Colorado I, 518 U. S., at 640641, because, as I have explained before, they are not narrowly tailored to meet any relevant compelling state interest, id., at 641644; Nixon , supra , at 427430. See also Colorado II , supra , at 465466. Accordingly, I would affirm the judgment of the Court of Appeals and respectfully dissent from the Courts contrary disposition.
Dissent
FEDERAL ELECTION COMMISSION, PETITIONER
v.
CHRISTINE BEAUMONT
et al
.
Justice Thomas , with whom Justice Scalia joins, dissenting.
I continue to believe that campaign finance laws are subject to strict scrutiny. Federal Election Commn v. Colorado Republican Federal Campaign Comm., 533 U. S. 431, 465466 (2001) ( Thomas , J., dissenting) (Colorado II) ; Colorado Republican Federal Campaign Comm. v. Federal Election Commn, 518 U. S. 604, 640 (1996) ( Thomas , J., concurring in judgment and dissenting in part) (Colorado I) . See also Nixon v. Shrink Missouri Government PAC, 528 U. S. 377, 427 (2000) ( Thomas , J., dissenting). As in Colorado II , the Government does not argue here that 2 U. S. C. §441b survives review under that rigorous standard. Indeed, it could not. [U]nder traditional strict scrutiny, broad prophylactic caps on … giving in the political process … are unconstitutional, Colorado I, 518 U. S., at 640641, because, as I have explained before, they are not narrowly tailored to meet any relevant compelling state interest, id., at 641644; Nixon , supra , at 427430. See also Colorado II , supra , at 465466. Accordingly, I would affirm the judgment of the Court of Appeals and respectfully dissent from the Courts contrary disposition.


Click
Hide and Show
Togglin
Slide Down
How Did You Find Me?
Slide Up
Where are you taking me?
Slide Toggle
Really? We are just going back and forth?
Fade In
BOOOOO I'm a ghost
Fade Out
And now I disappear
Add Class
Im a chameleon watch me match my surroundings
Before
Hmm I feel like I'm missing something I must have left it behind.
After
Hmm I feel like I might find something ahead.
Append
So....
HTML
HTML is kinda like text but watch this....
Attr
Where did you find that photo?
Text
Waiiit this isnt right.
Data
This page was created by Name.


You can register for an account here.
{{ errorMessage }}
An activation email has been sent to {{ registeredUser.email}}. Note that without activating the account, you will not be able to log in with the account you have just created.


CSS Integration JSON Editor Example
JSON Editor supports these popular CSS frameworks:
- bootstrap 3
- bootstrap 4
- bootstrap 5
- spectre.css (shown here)
- tailwind
JSON Editor supports these popular icon libraries:
- jQueryUI
- Font Awesome 3
- Font Awesome 4
- Font Awesome 5
- spectre.css (shown here)


At the Main Menu, press E followed by Enter to start KeyMail. You will be prompted to set up an Email account when the Email app is started for the first time. You can have multiple Email accounts on the BrailleNote Touch. In the notes that follow, I will explain how to add a Gmail account.
in-context


@main("eval.so version 1") {
Want to develop applications around eval.so? Check out our API. It's so simple, it's almost impossible to get wrong.
First and foremost, it's worth noting that there are two endpoints for
the API. If you access /api/[endpoint]
you will always hit
the latest version of the API. If you want to access a specific version
of the API, you should use /api/[version]/[endpoint]
instead.
Also note that all POST requests should send
application/json
as their content type.
POST /api/evaluate
{
"language": "ruby",
"code": "puts 2+2",
"inputFiles": {
"input.txt": "aGVsbG8="
}
}
{
"stdout": "4",
"stderr": "",
"wallTime": 387
}
| key | example | Description |
|---|---|---|
| language | "ruby" |
Required. The language being evaluated. |
| code | puts "Hello, world!" |
Required. The code to evaluate. |
| inputFiles | { "input.txt": "aGVsbG8=" } |
An object containing files that are placed in the evaluation root. The filename is the key and the contents of the file is base64 encoded and is the value. |
| compilationOnly | false |
If true , only compilation will happen — not
execution of the result.
|
| key | example | Description |
|---|---|---|
| stdout | "Hello, World!" |
The standard output produced by the evaluation. |
| stderr | "" |
The standard error produced by the evaluation. |
| wallTime | 387 |
How long it took to evaluate the request, in ms. |
| exitCode | 0 |
The exit code of the evaluation. |
| outputFiles | { "output.txt": "aGVsbG8=" } |
An object containing files that are placed in the evaluation's
~/output/ directory, which is created automatically.
The filename is the key and the contents of the
file is base64 encoded and is the
value.
|
| compilationResult |
The result of compiling the code, for languages that require
compilation. Everything that appears in the JSON root can possibly
appear in compilationResult , except
outputFiles .
|
GET /api/languages
{
"languages": [
"apricot",
"bash",
"befunge",
"brainfuck",
"c",
"c#",
"c++",
...
"smalltalk",
"sml",
"sqlite",
"zsh"
]
}
GET /api/language/:language
{
"name": "Ruby",
"aliases": [
"ruby",
"mri"
],
"version": "ruby-<IP_ADDRESS>2-29.fc18.x86_64",
"notes": "MRI 1.9.3p392"
}


Bermuda is part of District 7230 which also covers New York City, Bronx, Staten Island, and Westchester County.
There are 4 clubs in Bermuda, one lunch, two dinner and one breakfast. If you are visiting Bermuda please come and see us.
Click on the Club name below to visit their web site.
Meetings: Thursdays, 7:15 AM at the Royal Bermuda Yacht Club, Albouys Point, Hamilton
Meetings: Tuesdays, 12:30pm at the Royal Hamilton Amateur Dinghy Club, Pomander Road, Paget
Meetings: Wednesdays, 6:30 PM at Henry VIII Restaurant, 56 South Shore Road, Southampton
Meetings: Mondays, 6:30 PM at The Grotto Bay Hotel, 11 Blue Hole Hill, Bailey’s Bay


FREE
$0/mo.
1 Prototype
Starter
$15/mo.
3 Prototypes
Professional
$25/mo.
Unlimited Prototypes
Team
$99/mo.
Unlimited Prototypes Up to 5 members


Update Product Information
Product Name:
Categories:
Protein
Gainer
Pack:
Types of Level:
Value
Servings:
Price($):
URL:
Ingredients
View Details
Description
Submit


Everything is Awesome
the LEGO Movie!
yay
everything is cool when you're part of a team
This should be yellow?
warning
look it's a
warning


|
s2n-doxygen-full
|
#include <asn1_locl.h>
Data Fields | |
| int | pkey_id |
| int | pkey_base_id |
| unsigned long | pkey_flags |
| char * | pem_str |
| char * | info |
| int(* | pub_decode )(EVP_PKEY *pk, X509_PUBKEY *pub) |
| int(* | pub_encode )(X509_PUBKEY *pub, const EVP_PKEY *pk) |
| int(* | pub_cmp )(const EVP_PKEY *a, const EVP_PKEY *b) |
| int(* | pub_print )(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx) |
| int(* | priv_decode )(EVP_PKEY *pk, PKCS8_PRIV_KEY_INFO *p8inf) |
| int(* | priv_encode )(PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pk) |
| int(* | priv_print )(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx) |
| int(* | pkey_size )(const EVP_PKEY *pk) |
| int(* | pkey_bits )(const EVP_PKEY *pk) |
| int(* | param_decode )(EVP_PKEY *pkey, const unsigned char **pder, int derlen) |
| int(* | param_encode )(const EVP_PKEY *pkey, unsigned char **pder) |
| int(* | param_missing )(const EVP_PKEY *pk) |
| int(* | param_copy )(EVP_PKEY *to, const EVP_PKEY *from) |
| int(* | param_cmp )(const EVP_PKEY *a, const EVP_PKEY *b) |
| int(* | param_print )(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx) |
| int(* | sig_print )(BIO *out, const X509_ALGOR *sigalg, const ASN1_STRING *sig, int indent, ASN1_PCTX *pctx) |
| void(* | pkey_free )(EVP_PKEY *pkey) |
| int(* | pkey_ctrl )(EVP_PKEY *pkey, int op, long arg1, void *arg2) |
| int(* | old_priv_decode )(EVP_PKEY *pkey, const unsigned char **pder, int derlen) |
| int(* | old_priv_encode )(const EVP_PKEY *pkey, unsigned char **pder) |
| int(* | item_verify )(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, X509_ALGOR *a, ASN1_BIT_STRING *sig, EVP_PKEY *pkey) |
| int(* | item_sign )(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, X509_ALGOR *alg1, X509_ALGOR *alg2, ASN1_BIT_STRING *sig) |
Definition at line 77 of file asn1_locl.h.
| int pkey_id |
Definition at line 78 of file asn1_locl.h.
| int pkey_base_id |
Definition at line 79 of file asn1_locl.h.
| unsigned long pkey_flags |
Definition at line 80 of file asn1_locl.h.
| char* pem_str |
Definition at line 81 of file asn1_locl.h.
| char* info |
Definition at line 82 of file asn1_locl.h.
| int(* pub_decode) (EVP_PKEY *pk, X509_PUBKEY *pub) |
Definition at line 83 of file asn1_locl.h.
| int(* pub_encode) (X509_PUBKEY *pub, const EVP_PKEY *pk) |
Definition at line 84 of file asn1_locl.h.
Definition at line 85 of file asn1_locl.h.
Definition at line 86 of file asn1_locl.h.
| int(* priv_decode) (EVP_PKEY *pk, PKCS8_PRIV_KEY_INFO *p8inf) |
Definition at line 88 of file asn1_locl.h.
| int(* priv_encode) (PKCS8_PRIV_KEY_INFO *p8, const EVP_PKEY *pk) |
Definition at line 89 of file asn1_locl.h.
Definition at line 90 of file asn1_locl.h.
| int(* pkey_size) (const EVP_PKEY *pk) |
Definition at line 92 of file asn1_locl.h.
| int(* pkey_bits) (const EVP_PKEY *pk) |
Definition at line 93 of file asn1_locl.h.
| int(* param_decode) (EVP_PKEY *pkey, const unsigned char **pder, int derlen) |
Definition at line 94 of file asn1_locl.h.
| int(* param_encode) (const EVP_PKEY *pkey, unsigned char **pder) |
Definition at line 96 of file asn1_locl.h.
| int(* param_missing) (const EVP_PKEY *pk) |
Definition at line 97 of file asn1_locl.h.
Definition at line 98 of file asn1_locl.h.
Definition at line 99 of file asn1_locl.h.
Definition at line 100 of file asn1_locl.h.
| int(* sig_print) (BIO *out, const X509_ALGOR *sigalg, const ASN1_STRING *sig, int indent, ASN1_PCTX *pctx) |
Definition at line 102 of file asn1_locl.h.
Definition at line 105 of file asn1_locl.h.
Definition at line 106 of file asn1_locl.h.
| int(* old_priv_decode) (EVP_PKEY *pkey, const unsigned char **pder, int derlen) |
Definition at line 108 of file asn1_locl.h.
| int(* old_priv_encode) (const EVP_PKEY *pkey, unsigned char **pder) |
Definition at line 110 of file asn1_locl.h.
| int(* item_verify) (EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, X509_ALGOR *a, ASN1_BIT_STRING *sig, EVP_PKEY *pkey) |
Definition at line 112 of file asn1_locl.h.
| int(* item_sign) (EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, X509_ALGOR *alg1, X509_ALGOR *alg2, ASN1_BIT_STRING *sig) |
Definition at line 114 of file asn1_locl.h.


Please Visit: N*E*R*D Official Website 2017
N*E*R*D is an American funk rock band made up of Pharell Williams, Chad Hugo, and Shay Haley. The group began as a side project of the successful production duo, The Neptunes, from Virgina Beach, VA in 1999.
Read more at: https://en.wikipedia.org/wiki/N.E.R.D


window.onerror
Documentation on the onerror
property of window, and how it defers across browsers and browser versions.
Current WHATWG spec [link]
window.onerror = function(message, filename, lineno, colno, error) {
// custom handling here
}
- message: the error message (usually the Error object's message property)
- filename: the absolute URL of the script in which the error originally occurred
- lineno: line number (1-based) where the error occurred in the script
- colno: column number (1-based) where the error occurred in the script
- error: object representing the error (e.g. the exception object in the case of an uncaught DOM exception).
Return true from the function to prevent default browser error handling (such as showing a message in the console, or popping a debug dialog in old versions of IE).


About this Document
This document describes changes between SQLAlchemy version 0.5, last released January 16, 2010, and SQLAlchemy version 0.6, last released May 5, 2012.
Document date: June 6, 2010
This guide documents API changes which affect users migrating their applications from the 0.5 series of SQLAlchemy to 0.6. Note that SQLAlchemy 0.6 removes some behaviors which were deprecated throughout the span of the 0.5 series, and also deprecates more behaviors specific to 0.5.
Dialect modules are now broken up into distinct subcomponents, within the scope of a single database backend. Dialect implementations are now in the sqlalchemy.dialects package. The sqlalchemy.databases package still exists as a placeholder to provide some level of backwards compatibility for simple imports.
For each supported database, a sub-package exists within sqlalchemy.dialects where several files are contained. Each package contains a module called base.py which defines the specific SQL dialect used by that database. It also contains one or more “driver” modules, each one corresponding to a specific DBAPI - these files are named corresponding to the DBAPI itself, such as pysqlite, cx_oracle, or pyodbc. The classes used by SQLAlchemy dialects are first declared in the base.py module, defining all behavioral characteristics defined by the database. These include capability mappings, such as “supports sequences”, “supports returning”, etc., type definitions, and SQL compilation rules. Each “driver” module in turn provides subclasses of those classes as needed which override the default behavior to accommodate the additional features, behaviors, and quirks of that DBAPI. For DBAPIs that support multiple backends (pyodbc, zxJDBC, mxODBC), the dialect module will use mixins from the sqlalchemy.connectors package, which provide functionality common to that DBAPI across all backends, most typically dealing with connect arguments. This means that connecting using pyodbc, zxJDBC or mxODBC (when implemented) is extremely consistent across supported backends.
The URL format used by create_engine() has been enhanced to handle any number of DBAPIs for a particular backend, using a scheme that is inspired by that of JDBC. The previous format still works, and will select a “default” DBAPI implementation, such as the Postgresql URL below that will use psycopg2:
create_engine('postgresql://scott:tiger@localhost/test')
However to specify a specific DBAPI backend such as pg8000, add it to the “protocol” section of the URL using a plus sign “+”:
create_engine('postgresql+pg8000://scott:tiger@localhost/test')
Important Dialect Links:
Other notes regarding dialects:
The import structure of dialects has changed. Each dialect now exports its base “dialect” class as well as the full set of SQL types supported on that dialect via sqlalchemy.dialects.<name>. For example, to import a set of PG types:
from sqlalchemy.dialects.postgresql import INTEGER, BIGINT, SMALLINT,\
VARCHAR, MACADDR, DATE, BYTEA
Above, INTEGER is actually the plain INTEGER type from sqlalchemy.types, but the PG dialect makes it available in the same way as those types which are specific to PG, such as BYTEA and MACADDR.
There’s one quite significant behavioral change to the expression language which may affect some applications. The boolean value of Python boolean expressions, i.e. ==, !=, and similar, now evaluates accurately with regards to the two clause objects being compared.
As we know, comparing a ClauseElement to any other object returns another ClauseElement:
>>> from sqlalchemy.sql import column
>>> column('foo') == 5
<sqlalchemy.sql.expression._BinaryExpression object at 0x1252490>
This so that Python expressions produce SQL expressions when converted to strings:
>>> str(column('foo') == 5)
'foo = :foo_1'
But what happens if we say this?
>>> if column('foo') == 5:
... print "yes"
...
In previous versions of SQLAlchemy, the returned _BinaryExpression was a plain Python object which evaluated to True. Now it evaluates to whether or not the actual ClauseElement should have the same hash value as to that being compared. Meaning:
>>> bool(column('foo') == 5)
False
>>> bool(column('foo') == column('foo'))
False
>>> c = column('foo')
>>> bool(c == c)
True
>>>
That means code such as the following:
if expression:
print "the expression is:", expression
Would not evaluate if expression was a binary clause. Since the above pattern should never be used, the base ClauseElement now raises an exception if called in a boolean context:
>>> bool(c)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
...
raise TypeError("Boolean value of this clause is not defined")
TypeError: Boolean value of this clause is not defined
Code that wants to check for the presence of a ClauseElement expression should instead say:
if expression is not None:
print "the expression is:", expression
Keep in mind, this applies to Table and Column objects too.
The rationale for the change is twofold:
An “executemany” in SQLAlchemy corresponds to a call to execute(), passing along a collection of bind parameter sets:
connection.execute(table.insert(), {'data':'row1'}, {'data':'row2'}, {'data':'row3'})
When the Connection object sends off the given insert() construct for compilation, it passes to the compiler the keynames present in the first set of binds passed along to determine the construction of the statement’s VALUES clause. Users familiar with this construct will know that additional keys present in the remaining dictionaries don’t have any impact. What’s different now is that all subsequent dictionaries need to include at least every key that is present in the first dictionary. This means that a call like this no longer works:
connection.execute(table.insert(),
{'timestamp':today, 'data':'row1'},
{'timestamp':today, 'data':'row2'},
{'data':'row3'})
Because the third row does not specify the ‘timestamp’ column. Previous versions of SQLAlchemy would simply insert NULL for these missing columns. However, if the timestamp column in the above example contained a Python-side default value or function, it would not be used. This because the “executemany” operation is optimized for maximum performance across huge numbers of parameter sets, and does not attempt to evaluate Python-side defaults for those missing keys. Because defaults are often implemented either as SQL expressions which are embedded inline with the INSERT statement, or are server side expressions which again are triggered based on the structure of the INSERT string, which by definition cannot fire off conditionally based on each parameter set, it would be inconsistent for Python side defaults to behave differently vs. SQL/server side defaults. (SQL expression based defaults are embedded inline as of the 0.5 series, again to minimize the impact of huge numbers of parameter sets).
SQLAlchemy 0.6 therefore establishes predictable consistency by forbidding any subsequent parameter sets from leaving any fields blank. That way, there’s no more silent failure of Python side default values and functions, which additionally are allowed to remain consistent in their behavior versus SQL and server side defaults.
A rule that was designed to help SQLite has been removed, that of the first compound element within another compound (such as, a union() inside of an except_()) wouldn’t be parenthesized. This is inconsistent and produces the wrong results on Postgresql, which has precedence rules regarding INTERSECTION, and its generally a surprise. When using complex composites with SQLite, you now need to turn the first element into a subquery (which is also compatible on PG). A new example is in the SQL expression tutorial at the end of [http://www.sqlalchemy.org/docs/06/sqlexpression.html #unions-and-other-set-operations]. See #1665 and r6690 for more background.
The ResultProxy and related elements, including most common “row processing” functions such as unicode conversion, numerical/boolean conversions and date parsing, have been re-implemented as optional C extensions for the purposes of performance. This represents the beginning of SQLAlchemy’s path to the “dark side” where we hope to continue improving performance by reimplementing critical sections in C. The extensions can be built by specifying --with-cextensions, i.e. python setup.py --with- cextensions install.
The extensions have the most dramatic impact on result fetching using direct ResultProxy access, i.e. that which is returned by engine.execute(), connection.execute(), or session.execute(). Within results returned by an ORM Query object, result fetching is not as high a percentage of overhead, so ORM performance improves more modestly, and mostly in the realm of fetching large result sets. The performance improvements highly depend on the dbapi in use and on the syntax used to access the columns of each row (eg row['name'] is much faster than row.name). The current extensions have no impact on the speed of inserts/updates/deletes, nor do they improve the latency of SQL execution, that is, an application that spends most of its time executing many statements with very small result sets will not see much improvement.
Performance has been improved in 0.6 versus 0.5 regardless of the extensions. A quick overview of what connecting and fetching 50,000 rows looks like with SQLite, using mostly direct SQLite access, a ResultProxy, and a simple mapped ORM object:
sqlite select/native: 0.260s
0.6 / C extension
sqlalchemy.sql select: 0.360s
sqlalchemy.orm fetch: 2.500s
0.6 / Pure Python
sqlalchemy.sql select: 0.600s
sqlalchemy.orm fetch: 3.000s
0.5 / Pure Python
sqlalchemy.sql select: 0.790s
sqlalchemy.orm fetch: 4.030s
Above, the ORM fetches the rows 33% faster than 0.5 due to in-python performance enhancements. With the C extensions we get another 20%. However, ResultProxy fetches improve by 67% with the C extension versus not. Other tests report as much as a 200% speed improvement for some scenarios, such as those where lots of string conversions are occurring.
The sqlalchemy.schema package has received some long- needed attention. The most visible change is the newly expanded DDL system. In SQLAlchemy, it was possible since version 0.5 to create custom DDL strings and associate them with tables or metadata objects:
from sqlalchemy.schema import DDL
DDL('CREATE TRIGGER users_trigger ...').execute_at('after-create', metadata)
Now the full suite of DDL constructs are available under the same system, including those for CREATE TABLE, ADD CONSTRAINT, etc.:
from sqlalchemy.schema import Constraint, AddConstraint
AddContraint(CheckConstraint("value > 5")).execute_at('after-create', mytable)
Additionally, all the DDL objects are now regular ClauseElement objects just like any other SQLAlchemy expression object:
from sqlalchemy.schema import CreateTable
create = CreateTable(mytable)
# dumps the CREATE TABLE as a string
print create
# executes the CREATE TABLE statement
engine.execute(create)
and using the sqlalchemy.ext.compiler extension you can make your own:
from sqlalchemy.schema import DDLElement
from sqlalchemy.ext.compiler import compiles
class AlterColumn(DDLElement):
def __init__(self, column, cmd):
self.column = column
self.cmd = cmd
@compiles(AlterColumn)
def visit_alter_column(element, compiler, **kw):
return "ALTER TABLE %s ALTER COLUMN %s %s ..." % (
element.column.table.name,
element.column.name,
element.cmd
)
engine.execute(AlterColumn(table.c.mycolumn, "SET DEFAULT 'test'"))
The schema package has also been greatly streamlined. Many options and methods which were deprecated throughout 0.5 have been removed. Other little known accessors and methods have also been removed.
These should be constructed declaratively (i.e. in one construction).
At the expense of a few extra method calls here and there, you can set log levels for INFO and DEBUG after an engine, pool, or mapper has been created, and logging will commence. The isEnabledFor(INFO) method is now called per-Connection and isEnabledFor(DEBUG) per-ResultProxy if already enabled on the parent connection. Pool logging sends to log.info() and log.debug() with no check - note that pool checkout/checkin is typically once per transaction.
The reflection system, which allows reflection of table columns via Table('sometable', metadata, autoload=True) has been opened up into its own fine-grained API, which allows direct inspection of database elements such as tables, columns, constraints, indexes, and more. This API expresses return values as simple lists of strings, dictionaries, and TypeEngine objects. The internals of autoload=True now build upon this system such that the translation of raw database information into sqlalchemy.schema constructs is centralized and the contract of individual dialects greatly simplified, vastly reducing bugs and inconsistencies across different backends.
To use an inspector:
from sqlalchemy.engine.reflection import Inspector
insp = Inspector.from_engine(my_engine)
print insp.get_schema_names()
the from_engine() method will in some cases provide a backend-specific inspector with additional capabilities, such as that of Postgresql which provides a get_table_oid() method:
my_engine = create_engine('postgresql://...')
pg_insp = Inspector.from_engine(my_engine)
print pg_insp.get_table_oid('my_table')
The insert(), update() and delete() constructs now support a returning() method, which corresponds to the SQL RETURNING clause as supported by Postgresql, Oracle, MS-SQL, and Firebird. It is not supported for any other backend at this time.
Given a list of column expressions in the same manner as that of a select() construct, the values of these columns will be returned as a regular result set:
result = connection.execute(
table.insert().values(data='some data').returning(table.c.id, table.c.timestamp)
)
row = result.first()
print "ID:", row['id'], "Timestamp:", row['timestamp']
The implementation of RETURNING across the four supported backends varies wildly, in the case of Oracle requiring an intricate usage of OUT parameters which are re-routed into a “mock” result set, and in the case of MS-SQL using an awkward SQL syntax. The usage of RETURNING is subject to limitations:
RETURNING is also used automatically by SQLAlchemy, when available and when not otherwise specified by an explicit returning() call, to fetch the value of newly generated primary key values for single-row INSERT statements. This means there’s no more “SELECT nextval(sequence)” pre- execution for insert statements where the primary key value is required. Truth be told, implicit RETURNING feature does incur more method overhead than the old “select nextval()” system, which used a quick and dirty cursor.execute() to get at the sequence value, and in the case of Oracle requires additional binding of out parameters. So if method/protocol overhead is proving to be more expensive than additional database round trips, the feature can be disabled by specifying implicit_returning=False to create_engine().
The type system has been completely reworked behind the scenes to provide two goals:
Highlights of these changes include:
As more DBAPIs support returning Python unicode objects directly, the base dialect now performs a check upon the first connection which establishes whether or not the DBAPI returns a Python unicode object for a basic select of a VARCHAR value. If so, the String type and all subclasses (i.e. Text, Unicode, etc.) will skip the “unicode” check/conversion step when result rows are received. This offers a dramatic performance increase for large result sets. The “unicode mode” currently is known to work with:
Other types may choose to disable unicode processing as needed, such as the NVARCHAR type when used with MS-SQL.
In particular, if porting an application based on a DBAPI that formerly returned non-unicode strings, the “native unicode” mode has a plainly different default behavior - columns that are declared as String or VARCHAR now return unicode by default whereas they would return strings before. This can break code which expects non-unicode strings. The psycopg2 “native unicode” mode can be disabled by passing use_native_unicode=False to create_engine().
A more general solution for string columns that explicitly do not want a unicode object is to use a TypeDecorator that converts unicode back to utf-8, or whatever is desired:
class UTF8Encoded(TypeDecorator):
"""Unicode type which coerces to utf-8."""
impl = sa.VARCHAR
def process_result_value(self, value, dialect):
if isinstance(value, unicode):
value = value.encode('utf-8')
return value
Note that the assert_unicode flag is now deprecated. SQLAlchemy allows the DBAPI and backend database in use to handle Unicode parameters when available, and does not add operational overhead by checking the incoming type; modern systems like sqlite and Postgresql will raise an encoding error on their end if invalid data is passed. In those cases where SQLAlchemy does need to coerce a bind parameter from Python Unicode to an encoded string, or when the Unicode type is used explicitly, a warning is raised if the object is a bytestring. This warning can be suppressed or converted to an exception using the Python warnings filter documented at: http://docs.python.org/library/warnings.html
We now have an Enum in the types module. This is a string type that is given a collection of “labels” which constrain the possible values given to those labels. By default, this type generates a VARCHAR using the size of the largest label, and applies a CHECK constraint to the table within the CREATE TABLE statement. When using MySQL, the type by default uses MySQL’s ENUM type, and when using Postgresql the type will generate a user defined type using CREATE TYPE <mytype> AS ENUM. In order to create the type using Postgresql, the name parameter must be specified to the constructor. The type also accepts a native_enum=False option which will issue the VARCHAR/CHECK strategy for all databases. Note that Postgresql ENUM types currently don’t work with pg8000 or zxjdbc.
Reflection now returns the most specific type possible from the database. That is, if you create a table using String, then reflect it back, the reflected column will likely be VARCHAR. For dialects that support a more specific form of the type, that’s what you’ll get. So a Text type would come back as oracle.CLOB on Oracle, a LargeBinary might be an mysql.MEDIUMBLOB etc. The obvious advantage here is that reflection preserves as much information possible from what the database had to say.
Some applications that deal heavily in table metadata may wish to compare types across reflected tables and/or non- reflected tables. There’s a semi-private accessor available on TypeEngine called _type_affinity and an associated comparison helper _compare_type_affinity. This accessor returns the “generic” types class which the type corresponds to:
>>> String(50)._compare_type_affinity(postgresql.VARCHAR(50))
True
>>> Integer()._compare_type_affinity(mysql.REAL)
False
The usual “generic” types are still the general system in use, i.e. String, Float, DateTime. There’s a few changes there:
Upgrading an ORM application from 0.5 to 0.6 should require little to no changes, as the ORM’s behavior remains almost identical. There are some default argument and name changes, and some loading behaviors have been improved.
The internals for the unit of work, primarily topological.py and unitofwork.py, have been completely rewritten and are vastly simplified. This should have no impact on usage, as all existing behavior during flush has been maintained exactly (or at least, as far as it is exercised by our testsuite and the handful of production environments which have tested it heavily). The performance of flush() now uses 20-30% fewer method calls and should also use less memory. The intent and flow of the source code should now be reasonably easy to follow, and the architecture of the flush is fairly open-ended at this point, creating room for potential new areas of sophistication. The flush process no longer has any reliance on recursion so flush plans of arbitrary size and complexity can be flushed. Additionally, the mapper’s “save” process, which issues INSERT and UPDATE statements, now caches the “compiled” form of the two statements so that callcounts are further dramatically reduced with very large flushes.
Any changes in behavior observed with flush versus earlier versions of 0.6 or 0.5 should be reported to us ASAP - we’ll make sure no functionality is lost.
This to solve the long running issue that “relation” means a “table or derived table” in relational algebra terms. The relation() name, which is less typing, will hang around for the foreseeable future so this change should be entirely painless.
A new kind of eager loading is added called “subquery” loading. This is a load that emits a second SQL query immediately after the first which loads full collections for all the parents in the first query, joining upwards to the parent using INNER JOIN. Subquery loading is used simlarly to the current joined-eager loading, using the `subqueryload()`` and ``subqueryload_all()`` options as well as the ``lazy='subquery'`` setting on ``relationship()`. The subquery load is usually much more efficient for loading many larger collections as it uses INNER JOIN unconditionally and also doesn’t re-load parent rows.
To make room for the new subquery load feature, the existing `eagerload()``/``eagerload_all()`` options are now superceded by ``joinedload()`` and ``joinedload_all()``. The old names will hang around for the foreseeable future just like ``relation()`.
Continuing on the theme of loader strategies opened up, the standard keywords for the `lazy`` option on ``relationship()`` are now ``select`` for lazy loading (via a SELECT issued on attribute access), ``joined`` for joined-eager loading, ``subquery`` for subquery-eager loading, ``noload`` for no loading should occur, and ``dynamic`` for a “dynamic” relationship. The old ``True``, ``False``, ``None` arguments are still accepted with the identical behavior as before.
Joined-eagerly loaded scalars and collections can now be instructed to use INNER JOIN instead of OUTER JOIN. On Postgresql this is observed to provide a 300-600% speedup on some queries. Set this flag for any many-to-one which is on a NOT NULLable foreign key, and similarly for any collection where related items are guaranteed to exist.
At mapper level:
mapper(Child, child)
mapper(Parent, parent, properties={
'child':relationship(Child, lazy='joined', innerjoin=True)
})
At query time level:
session.query(Parent).options(joinedload(Parent.child, innerjoin=True)).all()
The innerjoin=True flag at the relationship() level will also take effect for any joinedload() option which does not override the value.
many-to-one relations now fire off a lazyload in fewer cases, including in most cases will not fetch the “old” value when a new one is replaced.
many-to-one relation to a joined-table subclass now uses get() for a simple load (known as the “use_get” condition), i.e. Related->``Sub(Base)``, without the need to redefine the primaryjoin condition in terms of the base table. [ticket:1186]
specifying a foreign key with a declarative column, i.e. ForeignKey(MyRelatedClass.id) doesn’t break the “use_get” condition from taking place [ticket:1492]
relationship(), joinedload(), and joinedload_all() now feature an option called “innerjoin”. Specify True or False to control whether an eager join is constructed as an INNER or OUTER join. Default is False as always. The mapper options will override whichever setting is specified on relationship(). Should generally be set for many-to-one, not nullable foreign key relations to allow improved join performance. [ticket:1544]
the behavior of joined eager loading such that the main query is wrapped in a subquery when LIMIT/OFFSET are present now makes an exception for the case when all eager loads are many-to-one joins. In those cases, the eager joins are against the parent table directly along with the limit/offset without the extra overhead of a subquery, since a many-to-one join does not add rows to the result.
For example, in 0.5 this query:
session.query(Address).options(eagerload(Address.user)).limit(10)
would produce SQL like:
SELECT * FROM
(SELECT * FROM addresses LIMIT 10) AS anon_1
LEFT OUTER JOIN users AS users_1 ON users_1.id = anon_1.addresses_user_id
This because the presence of any eager loaders suggests that some or all of them may relate to multi-row collections, which would necessitate wrapping any kind of rowcount-sensitive modifiers like LIMIT inside of a subquery.
In 0.6, that logic is more sensitive and can detect if all eager loaders represent many-to-ones, in which case the eager joins don’t affect the rowcount:
SELECT * FROM addresses LEFT OUTER JOIN users AS users_1 ON users_1.id = addresses.user_id LIMIT 10
A joined table inheritance config where the child table has a PK that foreign keys to the parent PK can now be updated on a CASCADE-capable database like Postgresql. mapper() now has an option passive_updates=True which indicates this foreign key is updated automatically. If on a non-cascading database like SQLite or MySQL/MyISAM, set this flag to False. A future feature enhancement will try to get this flag to be auto-configuring based on dialect/table style in use.
A promising new example of Beaker integration is in examples/beaker_caching. This is a straightforward recipe which applies a Beaker cache within the result- generation engine of Query. Cache parameters are provided via query.options(), and allows full control over the contents of the cache. SQLAlchemy 0.6 includes improvements to the Session.merge() method to support this and similar recipes, as well as to provide significantly improved performance in most scenarios.
Most elements that were deprecated throughout 0.5 and raised deprecation warnings have been removed (with a few exceptions). All elements that were marked “pending deprecation” are now deprecated and will raise a warning upon use.
SQLSoup has been modernized and updated to reflect common 0.5/0.6 capabilities, including well defined session integration. Please read the new docs at [http://www.sqlalc hemy.org/docs/06/reference/ext/sqlsoup.html].
The DeclarativeMeta (default metaclass for declarative_base) previously allowed subclasses to modify dict_ to add class attributes (e.g. columns). This no longer works, the DeclarativeMeta constructor now ignores dict_. Instead, the class attributes should be assigned directly, e.g. cls.id=Column(...), or the MixIn class approach should be used instead of the metaclass approach.


{include file="layout/c_global_style" /} {include file="layout/c_style" /} {load href="/static/css/productManagement.css" /} {include file="layout/c_corejs" /}


Foundation for Apps
Setup
Install & Update
Sass
Motion UI
Angular
Compatibility
Changelog
Layout
Grid
Panel
Navigation
Action Sheet
Menu Bar
Off-canvas Menu
Title Bar
Callouts
Modal
Notification
Controlls
Button
Forms
Content
Accordion
Block List
Card
Inline Element
Interchange
Labels & Badges
Popup
Tabs
Typography
Helpers
Functions and Mixins
Utilities