The $N-$Queens problem
-
The $N-$queens puzzle is the problem of placing $N$ chess queens on an $N\times N$ chessboard
so that no two queens threaten each other.
-
Thus, a solution requires that no two queens share the same row, column, or diagonal.
- We formulate this as a so called Boolean satisfiability (SAT) problem.
- A SAT solver solves SAT problems.
- A very large class of problems can be formulated as SAT problems.
$N$-Queens as SAT
- We associate to each square a boolean variable $Q_{i,j}$ which is true iff the
square is occupied.
- We construct logical formulas for the constraints of the $N-$queens puzzle from the
$Q_{i,j}$'s using operators $\neg$ (not), $\vee$(or) and
$\wedge$(and).
- For example, the $i$th row has a queen is the formula $Q_{i,1}\vee Q_{i,2}\vee\dots\vee Q_{i,n}$
- Similarly, pairs of queens not threatening each other gives formulas such as $\neg Q_{1, 1}\vee
\neg Q_{2, 2}$.
SAT Problems
- We are given finitely many boolean variables $P$, $Q$, ... and finitely many
constraints on them.
-
Constraints are logical statements built from the variables using logical operators such as
$\neg$ (not), $\vee$(or), $\wedge$(and),
$\Rightarrow$(implies) and $\Leftrightarrow$ (equivalent).
-
The SAT (boolean satisfiability) problem asks whether we can assign
truth values to these (i.e., declare each of $P$, $Q$ , ... to be $true$ or $false$) so that all
the constraints are satisfied.
SAT and $P\overset{?}=NP$
-
Given a solution to a SAT problem, it is easy to see that it satisfies all the constraints.
-
However, finding a solution may be hard.
-
Algorithmic problems that can be solved in polynomial time form the class
$P$ (polynomial).
-
Algorithmic problems whose solution, if it exists, can be checked in polynomial
time form the class $NP$ (non-deterministic polynomial).
- A fundamental question is whether $P = NP$.
Cook-Levine theorem
- The Cook-Levine theorem from the early 1970s showed that if SAT can be solved in
polynomial time
then so can every problem in $NP$.
-
There are a large class of problems that are known to be $NP$, making $P=NP$ a very important
question.
-
In practice, computer scientists have focussed efforts on making practically fast SAT solvers,
which are
used to solve (components of) many different problems by mapping them to SAT.
CNF
-
A valuation is an assignment of truth values to the variables of
a problem.
- If $P$ is a (boolean) variable, the formulas $P$ and $\neg P$ are called literals.
-
A clause is a disjunction $l_1\vee l_2\vee\dots\vee l_k$ of literals.
-
A clause is satisfied by a valuation if and only if it contains a literal that is
true.
-
A CNF is a conjunction of clauses, i.e., a set of clauses which must all be true.
Rewriting as CNF
- Any formula can be rewritten as a CNF formula to which it is equivalent.
-
We first rewrite $A\Rightarrow B$ as $\neg B\vee A$ and
$A\Leftrightarrow B$ as $(\neg A\wedge \neg B)\vee (A\wedge B)$ to eliminate operators other
than $\vee$, $\wedge$ and $\neg$.
-
Next we use $\neg(A \vee B) = \neg A \wedge \neg B$ and $\neg(A \wedge B) = \neg A \vee \neg
B$ recursively to get a combination of literals using $\vee$ and $\wedge$
only.
-
Finally, using the distributivity property $A \vee (B\wedge C)= (A\vee B)\wedge (A \vee C)$
recursively we get a formula in CNF.
Tautologies and Contradictions.
-
Since $l\vee l = l$, we can assume that no literal appears more than once in a clause.
-
If a clause contains both $P$ and $\neg P$ for some variable $P$, then this
clause is always true, i.e., is a tautology.
-
We assume that there are no tautologies or repeated literals.
-
An empty clause is a contradiction, i.e., it is always false.
Resolution
-
Given clauses $C = P\vee l_1\vee l_2\vee \dots\vee l_n$ and $C' =
\neg P\vee l'_1\vee l'_2\vee \dots\vee l'_{n'}$ we
deduce $l_1\vee l_2\vee \dots\vee l_n\vee l'_1\vee l'_2\vee \dots\vee l'_{n'}$;
- If $P$ is false, $C \implies l_1\vee l_2\vee \dots\vee l_n$
-
If $P$ is true, as $C'\implies l'_1\vee l'_2\vee \dots\vee l'_{n'}$
-
In both cases, we have $l_1\vee l_2\vee \dots\vee l_n\vee l'_1\vee l'_2\vee \dots\vee
l'_{n'}$.
-
This deduction is called Resolution.
- Resolution is refutation complete (for predicate calculus)
by a theorem of Davis-Putnam.
The Davis-Putnam algorithm
-
Pick a variable $P$ and assign to it, say, $true$.
-
We recursively seek solutions with $P$ true, by considering a problem with fewer variables.
-
Any clause containing $P$ is true, so can be dropped.
-
Any clause of the form $\neg P\vee l_1\vee\dots\vee l_n$ (up to reordering) is true if
and only the clause $C =l_1\vee\dots\vee l_n$ is true.
-
Any clause containing neither $P$ nor $\neg P$ is unchanged.
- The base case for the recursion is where we have no variables.
- the set of clauses is either empty or just the empty clause.
- this gives a solution or a contradiction.
- Suppose we (recursively) have a solution with $P$ being $true$ we get a solution.
- Otherwise we consider the associated problem with $P$ false.
- If the second associated problem has a solution, we get a solution, otherwise a contradiction.
The DPLL algorithm
- This improves on the DP algorithm by often considering only one branch.
- If some clause is a unit, i.e., either $P$ or $\neg P$ for a variable $P$, we assign
the appropriate value to $P$.
- This can lead to a cascade.
- If a variable $P$ is pure, i.e., only one of $P$ and $\neg P$ appears in all clauses,
we can assign $P$ the value that
appears.
- In both algorithms, if there is no solution, we can deduce the empty clause by
resolution.
SAT Solver-Prover in Lean 4
-
A dependently typed language like Lean 4 or Idris
makes possible,
as I implemented with SATurn, a program that outputs one of
-
a solution together with a proof that this is a solution, or
-
a proof that there is no solution.
-
Furthermore, the compiler verifies that the program terminates for any valid input, and has
correct output of one of the above two forms.
- This was the first time in my experience that such a complex program ran correctly straight
away.
Boolean Pythagorean triples
- Problem: Is it possible to colour
the
positive integers either red or blue, so that if three integers $a$, $b$, $c$,
satisfy $a^{2}+b^{2}=c^{2}$, they are not all the same colour?
- By a compactness argument if there is such a colouring up to $N$ for all $N$ then there
is such a colouring of all the natural numbers.
-
Marijn Heule, Oliver Kullmann and Victor W. Marek showed using a SAT solver that such a colouring is only possible up to the number 7824.
Z3 Demo: Sudoku
Euclidean Geometry via SMT?
-
In the 1950s, Tarski proved that whether a collection of polynomial equations and inequations
has solutions that are real numbers is decidable.
- Statements in Euclidean geometry can be translated to such problems.
- Tarski’s algorithm has been greatly improved, and algorithms of a more
algebraic nature have also been developed, improved and implemented.
-
However, I could not find any examples of using SMT solvers for such problems.
Pappus hexagon theorem
Theorem: $P$, $Q$ and $R$ are collinear.
-
Points with coordinates $(x_1, y_1)$, $(x_2, y_2)$ and $(x_3, y_3)$, which we assume to be
distinct, are collinear if and only if $(y_2 - y_1)(x_3 - x_1) = (y_3 - y_1)(x_2 -
x_1).$
- As a warm up, we show that for $P= (x, y)$, $P$, $O=(0, 0)$ and $-P$ are
collinear.
- To do this, we seek $x$ and $y$ so that $P$, $O$ and $-P$ are not
collinear, and check for solutions.
-
Indeed Z3 and CVC4 concluded instantly that there is no solution, i.e., the points are
collinear.
- We scale and rotate to obtain nice coordinates
-
We can take $a=(1, 0)$, $b= (1 + u, 0)$, $c = (1 + u + v, 0)$ with $u, v > 0$.
- Let $A = (x_A, y_A)$, then $B = (x_A(1+ U), y_A(1 + U))$ and $C = (x_A(1+ U +
V), y_A(1 + U + V))$ with $U, V, y_A > 0$.
- We let $P=(P_x, P_y)$, $Q=(Q_x, Q_y)$ and $R= (R_x, R_y)$, giving $12$
variables in all.
- We get $6$ equations for collinearity, e.g. of $A$, $P$ and $b$.
-
We also have various positivity inequations.
- We negate the equation for $P$, $Q$ and $R$ being collinear and ask if there is
a solution.
-
Unfortunately when I ran Z3 with this system it did not give a result.
- I blogged about this formulation and result.
- A couple of days later Anand Rao Tadipatri emailed me that he had got Z3 to
prove Menelaus’s Theorem along similar lines.
-
Strangely, I could not replicate his result.
-
It turns out that Z3 can solve both theorems if only asked for an answer, but
neither if asked for a proof.


Explore how congestion in San Francisco has changed since the March 2020 shelter-in-place order.
Automobile Level-of-Service (LOS) and Vehicle Miles Traveled (VMT) per mile are presented for key segments in the transportation network.
In addition, changes in these metrics relative to pre-COVID conditions can be viewed.
The LOS are calculated using speed data from INRIX Roadway Analytics. Speeds are monthly averages calculated using
data from Tuesday through Thursday of each week.
VMT estimates are derived using imputed vehicle volumes from observed speeds and Volume Delay Functions (VDF).
Total peak period VMT for key segments is expanded to Daily Citywide estimate by applying expansions factors derived from historic Caltrans VMT estimated for San Francisco.
The data on this website are updated every month.
Auto Level-of-Service (LOS) grades road segments by vehicle delay with "A" describing free flow,
and "F" describing bumper-to-bumper conditions.
Speed Change Relative to Pre-COVID shows the percent difference between average speed
of a segment and the speed under pre-COVID conditions (from the week of 3rd March 2020). Lower and negative values imply that
speeds have droppped back to pre-COVID levels.
Vehicle Miles Traveled (VMT) is normalized by the length of the segment and could be interpreted as approximate average daily traffic volume.
VMT Change Relative to Pre-COVID shows the percent difference between daily VMT estimate
of a segment and the VMT under pre-COVID conditions (from the week of 3rd March 2020). Higher and positive values imply that
VMT have risen back to pre-COVID levels.
How to use this map
Move the month slider to update map with data from chosen month. Click the play button to automatically cycle through months.
Choose time period to update map for AM (7a-9a) peak, PM (4:30p-6:30p) peak or 1-Hour time periods.
Choosing the 1-Hour period provides an additional time-of-day option to update the map for a given hour of the day.
The chart on the side panel shows trends across the months when AM or PM peak periods are selected. It shows the variation across an average day when 1-Hour time period is chosen.
Click on a roadway segment on the map to see segment-specific trends.


Whac-a-mole
Test your skill. How many boxes(moles) can you check(hit) in 30 seconds?
Time:
Score:
Instruction:
Click on the radio buttons(moles) as they are selected randomly by the computer.
1 point per hit, minus 1 point per miss.


The realm of the build czar
Build Czar Duties
The main duties of the Build Czar are summarized as follows
Continuously monitor the builds using the
Scoreboard
as one of the primary source of information.
Notify developers who broke compilation to fix the errors as soon as possible,
ideally by the next day. A red color in the "Compile" column is not at all
acceptable - the Build Czar needs to ensure that these problems are identified
and fixed in a timely manner. If possible, the Build Czar should let developers
know what the source of problems might be. It is quite possible that developers
who checked in the code or users who provided the patch may not have resources
to investigate the issues, so the Builds Czar's help is essential to keep
things moving ahead.
Keep an eye on the tests that are run in every build. Anything abnormal needs
to be notified to the right developer. The Build Czar should try helping the
developer by providing stack traces (in case of crashes) or other details like
printouts with debugging level turned on.
Some tests fail in the daily builds for many reasons like known bugs, transient
timeouts etc. Make sure that no new test failures show up. This
guy
knows most of the information. Ask him to help you out with known problems.
Keep the builds ticking. Any red on the "Last Finished" column in the
Scoreboard should be fixed. The link to the "Build Name" indicates the machine
where the build is being run.
The builds don't cover all the possible configurations. If you get a bug report
about a compile error in a particular configuration, try setting up a build to
make sure that it doesn't show up again if it has been fixed.
Keep an eye on the bugzilla
entries that are registered by users and developers. Decide on the bugs that
need to be fixed for the micro and pain developers for an ETA.
The document here talks about the powers of a
build Czar.
The Build Czar is empowered to set up more builds on his own for his
convenience. This
page has a step by step instructions on how to do that.
The build czar can get the build configuration by looking at the config portion
of the scoreboard.
Pro-active involvement by the build czar is necessary. Being a pro-active
build czar requires monitoring the git repository carefully and responding
quickly to suspected changes to keep the repo stays stable.
After an email from the Coverity scan project check the Coverity project and
check that there are no new errors reported. If so, contact the person who
introduced the error.
Check the daily test statistics email to determine any drop in test failures.
Do note that when there are a lot of compile errors the test results are really
unusable.
Recipe for Cutting a Minor Kit
The build czar is also in charge for the release of the micro. Cutting a micro is
as simple as cutting butter if things go well. Here is the procedure followed
while cutting a micro:
-
The whole process takes somewhere between 2-3 hours.
-
We suggest you take advantage of GNU Screen so that even if your SSH session is
interrupted, the cutting process can continue. This command must be installed on
the machines we use to cut the release.
-
type
screen
to start screen.
-
execute commands as normal. Note that Ctrl-A is special in screen, so you need
to type Ctrl-A-A to send a Ctrl-A to the shell
-
should your session be interrupted, reconnect and type
screen -x
-
when finished, just type exit twice
-
After login check that you can,
ssh<EMAIL_ADDRESS>to ensure that this succeeds. If not fix the problem, if ok exit again back to
-
Prior to starting this, gather aggregate release notes from all developers.
This is usually in the form of an email plea asking to update all NEWS files in
the archive. These NEWS files are used as part of the release notes for the release.
-
Make sure your release system has all the needed tools. This can be achieved on Fedora
using:
yum install perl svn screen pysvn automake doxygen bzip2 tar gzip openssh graphviz zip libtool GitPython
yum update
or on OpenSuSE
zypper install perl screen python-pysvn automake doxygen bzip2 tar gzip openssh graphviz zip libtool python-gitpython
zypper update
If you want to perform a full build with qt support, than run:
yum install deltarpm ntp rubygem-rmagick bison xerces-c-devel psmisc yum-utils gdb unzip glibc-devel libasan bison redhat-lsb perl-Pod-Usage rubygems clang make patch libcgroup-devel ant setuptool system-config-network-tui system-config-firewall-tui lcov gnuplot java-1.8.0-openjdk git-svn perl svn screen pysvn automake doxygen bzip2 tar gzip openssh graphviz zip libtool gcc-c++ boost-devel valgrind openssl-devel gcc qt4 fltk-devel bzip2-devel rsync openssl lzo-devel zziplib-devel acpid acpi nfs-utils java xerces-c xerces-c-devel mc qt qt-devel icecream ruby ruby-devel lksctp-tools-devel git telnet GitPython NetworkManager wget mailx
For some optional i686 packages run
yum install openssl-devel.i686 xerces-c-devel.i686 glibc-devel.i686 glibc.i686 libstdc++.i686 ncurses-libs.i686 zlib.i686
-
Setup your ssh access to github according to the github ssh documentation
-
Checkout a new workspace on a Fedora system with the last public release and with
all patches installed.
-
The best place to create the workspace is under
/export/anduriltmp/bczar
(if you are on anduril). Don't
use the home directory itself, it is an NFS share and not really fast.
-
Checkout like this:
-
git clone https://github.com/DOCGroup/ACE_TAO.git ACE_TAO
-
git clone https://github.com/DOCGroup/ACE_TAO.git MPC
-
Set $DOC_ROOT to point to the new workspace you checked out.
-
Set an environment variable SIGNATURE indicating your full name. This is used
to fill the commit entry.
-
For example,export SIGNATURE="Johnny Willemsen"
-
Set an environment variable MAILID indicating your mail id. This is used to
fill the mail id portion of the commit entry.
-
For example,export<EMAIL_ADDRESS>-
Change directories to $DOC_ROOT
-
Tag the release by executing
ACE/bin/make_release.py --micro --update --tag --push
This will only take a couple minutes to complete and once done successfully,
you can carry on with BOTH creating the kits and generating the doxygen
documentation in parallel. NOTE that --micro
should be replaced
with --minor
or --major
as appropriate.
After the repository has been tagged check each file listed below to make
sure version numbers are updated as expected.
In the EXTREMELY unlikely event that something goes wrong during the
tagging of the repo, the following files must be returned to the state
they were in before the release process started and then checked back into git:
-
ACE/PROBLEM-REPORT-FORM
-
ACE/VERSION
-
ACE/TAO/PROBLEM-REPORT-FORM
-
TAO/VERSION
-
TAO/tao/Version.h
ace/Version.h
In most cases, a
svn revert -R *
from DOC_ROOT will suffice.
The tag will also need to be removed (both in Middleware and MPC):
ACE+TAO-X_Y_Z (where X is the ACE Major version number, and Y & Z are the
Minor and Micro release numbers of the release that is to be restarted).
E.g.:
cd ACE_TAO && git tag -d ACE+TAO-X_Y_Z
cd MPC && git tag -d ACE+TAO-X_Y_Z
Note that this only needs to be done if the tagging fails. If
kit creation fails, simply restart that process.
Create the kits by executing
ACE/bin/make_release.py --kit
This will take somewhere around 2-4 hours to complete.
-
These commands only tags and creates the kits for the software itself, not
documentation, this can be started in parallel with this activity.
-
The kits end up in $DOC_ROOT/packages
To summarize, the following is a transcript of the steps up to this point
executing successfully:
$ ssh ..
No default printer
screen
cd $HOME
rm -rf DOC_ROOT
mkdir DOC_ROOT
cd DOC_ROOT
export DOC_ROOT=$PWD
git clone https://github.com/DOCGroup/ACE_TAO.git ACE_TAO
git clone https://github.com/DOCGroup/MPC.git MPC
cd ACE_TAO
ACE/bin/make_release.py --micro --update --verbose
ACE/bin/make_release.py --micro --tag --verbose
ACE/bin/make_release.py --micro --push --verbose
ACE/bin/make_release.py --kit
Feel free to cut and paste with suitable edits.
The packages end up by default under $DOC_ROOT/package-<PID>, you can
copy them to the webserver using the following commands. (Note that <PID>
needs to be the numerical pid of the process that created the kit, use
ls -ald
to determine the correct filename.) At the moment you execute these commands
all users can download these packages.
scp $DOC_ROOT/package-<PID>/ACE*
bczar@download.dre.vanderbilt.edu:/export/www/download.dre/ACE+TAO-distribution
After the repository is tagged you can also start generating the doxygen
documentation in parallel with the kit generation above.
-
Login to a release system you prepared with the same packages as above:
screen
-
After login check that you can,
ssh<EMAIL_ADDRESS>to ensure that this succeeds. If not fix the problem, if ok exit again back to
your release system.
-
cd /tmp
and remove the contents of the doxygen directory and recreate it again with
rm -rf doxygen
mkdir doxygen
cd doxygen
If you create the doxygen documentation on naboo.dre.vanderbilt.edu
than make sure you use /web/users/isisbuilds/tmp/ACE_wrappers
as working directory
-
Update the workspace with the right version tag (replace the X_Y_Z with the ACE
version number being released e.g. 5_6_7)
git clone https://github.com/DOCGroup/ACE_TAO.git --depth 1 --branch ACE+TAO-6_4_4 ACE_TAO
- Change to the ACE_TAO directory using
cd ACE_TAO
-
Set the needed environment variables using
export ACE_ROOT=$PWD/ACE
export TAO_ROOT=$PWD/TAO
export CIAO_ROOT=
export DANCE_ROOT=
export DDS_ROOT=
-
Check the doxygen version at the shell by executing the command:
doxygen --version
This should be at least 1.6.2
Now you are ready to create documentation
cd $ACE_ROOT
$ACE_ROOT/bin/generate_rel_manpages
When this is ready copy the resulting files using
scp ACE-html.tar.gz ACE-html.tar.bz2 ACE-html.zip ACE-html.tar.gz.md5 ACE-html.tar.bz2.md5 ACE-html.zip.md5 bczar@download.dre.vanderbilt.edu:/export/www/download.dre/ACE+TAO-distribution
screen
cd $HOME
rm -rf doxygen
mkdir doxygen
cd doxygen
git clone https://github.com/DOCGroup/ACE_TAO.git --depth 1 --branch ACE+TAO-6_4_4 ACE_TAO
cd ACE_TAO
export ACE_ROOT=$PWD/ACE
export TAO_ROOT=$PWD/TAO
export CIAO_ROOT=
export DANCE_ROOT=
export DDS_ROOT=
cd ACE
$ACE_ROOT/bin/generate_rel_manpages
scp ACE-html.tar.gz ACE-html.tar.bz2 ACE-html.zip ACE-html.tar.gz.md5 ACE-html.tar.bz2.md5 ACE-html.zip.md5 bczar@download.dre.vanderbilt.edu:/export/www/download.dre/ACE+TAO-distribution
While doxygen churns, format a release announcement, including the release
notes gathered from developers.
- Get from bugzilla the bugs fixed. Use the following
query as start query and update the start date.
-
Let Doug Schmidt review these before
you do anything with them.
Make sure the new version is available in Bugzilla.
-
We now have a bczar Bugzilla user<EMAIL_ADDRESS>with full
privileges which points to the bczar user at ISIS. To gain access to this
account as a new build czar, you could update the ~/.forward file on one of the
ISIS hosts (for example<EMAIL_ADDRESS>with your own email
address (but be aware that if you leave this ~/.forward file in effect, you
will get innundated with cron mail messages from all of the ISIS lab build
machines, so it is probably best to remove it after obtaining the Bugzilla
password). From the "Bugzilla - Main Page"
(http://bugzilla.dre.vanderbilt.edu/index.cgi) click on one of the various
"LogIn" links, and from this login page you should be able to "Submit Request"
to change a forgotten password. If you enter<EMAIL_ADDRESS>and click
"Submit Request" this will email you the password change link to
<EMAIL_ADDRESS>which will then in turn be forwarded to your own
email account. Simply copy this link into your browser to set your own bczar
password for the next steps.
-
here is the description of how to add a new version through Bugzilla.
-
go to any Bugzilla "Query" page, you should see a grey box at the bottom. click
"Log in" link to log in as<EMAIL_ADDRESS>-
look at the grey box at bottom again. You will see several links following
"Edit". Click on the "Product" link.
-
you are then at "Select product" page. You should see a list components, i.e.,
ACE TAO. Click on the product you want to edit.
-
you are then at "Edit product" page. Scroll down a bit, you should see a list
of all versions coming with this product. At the very beginning of the list,
you should see "Edit versions" link. Click this link.
-
you should see a "Add a new version" text box and a "Add" link just above the
grey box at the bottom. Click on this link
-
you are then at "Add version of [Name of the product]" page.
-
you are able to add the new version now.
Back on naboo.dre.vanderbilt.edu once the doxygen generation has finished, update the documentation at www.dre.vanderbilt.edu/Doxygen.
-
cd /web/www/Doxygen
-
Create a temporary directory. eg. tmp and change Directory to this-
mkdir tmp
cd tmp
-
scp file from the download server -
scp
bczar@download.dre.vanderbilt.edu:/export/www/download.dre/ACE+TAO-distribution/ACE-html.tar.bz2 .
-
Unzip and untar the files -
bunzip2 ACE-html.tar.bz2;tar -xvf ACE-html.tar
- back out of the temporary directory
cd ..
-
Create directory 'Current Version No' for example 6.3.4 and change directory into this new one
mkdir 6.3.4
cd 6.3.4
-
Move contents of the temporary directory's html to this directory -
mv ../tmp/html .
-
Now back our of this directory and remove the already existing softlink to the "Micro" directory -
cd ..
rm Micro
-
Create softlink "Micro" linking it to new Documentation using -
ln -s 6.3.4/html
Micro
. If this is a minor release also update the Stable
link.
-
Remove the directory tmp -
rm -rf tmp
On download.dre.vanderbilt.edu where the kit was uploaded to and once BOTH the kit
and doxygen generation have finished their work, you should also move the packages to the
previous versions directory with the appropriate decorators.
-
cd /export/www/download.dre/ACE+TAO-distribution
-
Check that the packages in this directory are all from today
-
Modify
/export/anduriltmp/bczar/copy_script.sh
to use the correct ACE version X.Y.Z and run it.
-
Update the copy_script.sh file for the new micro release
Validate the packages on the webserver whether they are really containing the new release. Make at least
one build where you run the TAO Hello world test and check if the libraries are having the
correct version number.
Update in the autobuild archive the file configs/scoreboard/releases.xml with
the made release (version number and release date). This is used by the integrated scoreboard on http://scoreboard.remedy.nl.
Update the ACE_wrappers repo:
- docs/Download.html to show the new release. Make sure you refer to the
previous_versions directory, that way we can exactly track how many people
download a specific version.
-
etc/index.hml to show the new doxygen package you installed
- bin/diff-builds-and-group-fixed-tests-only.sh to give the correct default old_date for this release.
Update the ACE/NEWS and TAO/NEWS files to have a new section for the next release.
Update OpenSuSE Build service using
osc checkout devel:libraries:ACE
osc add
cp rpmbuild/ace-tao.spec .
cp debian/control debian.control
cp debian/dsc ace.dsc
cp debian/changelog debian.changelog
cp debian/rules debian.rules
osc commit
Make a new pull request for homebrew-core to update ACE to the new release, see https://github.com/Homebrew/homebrew-core/blob/master/Formula/ace.rb
Make a new pull request to Microsoft vcpkg to update ACE to the new release, see https://github.com/Microsoft/vcpkg/tree/master/ports/ace
Mail the approved release announcement out to, at minimum the following:
<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>Do this as yourself (not as bugzilla). N.B.
You will not be able to post to the users' lists unless you are subscribed to
them. Odds are you will not be able to post to the announce lists at all. Ask
someone else (like Doug or Johnny) to do this step.
Tips to being a Build Czar
- Trust no one.
- Be careful with this guy, he
is notorious in breaking builds (and fixing them as well...Rumour has it that
it's actually a super-scalar, super-pipelined processor capable of out-of-order
execution, in human incarnation).
- Don't forgive people who break ACE :-)
- If a build hasn't run in a long time (symptoms are a "red" in the Last Run
column of the build scoreboard), delete the .disable file in
/path/to/build/directory/BUILD_NAME/ by hand.
- Think of the group who wrote the scoreboard update script, every time you
catch an otherwise not so obvious error with the help of the scoreboard. Tell
DEVO group about it.
- Send a note to<EMAIL_ADDRESS>asking for the repo to be frozen. Provide them a list of names, including yourself and bczar to be granted write permission.
- Compile once on Win32, Linux and Solaris before cutting a micro.
- Trust the release script when making a release.
- When all hell breaks loose, don't wait for the nightly builds to monitor
improvement. Instead manually start the builds.
- Maintain private up-to-date workspaces for problem platforms (read as
Solaris).
- Don't hesitate to ask for help.
- When you get an account to access the svn repo, make sure you are added to
the correct groups, for example,
gid=100(users),5000(doc),5002(acetaodev),5003(cvs). Otherwise you will have
problem to checkout various modules.
- Install your public key to the different machines you have frequent access
to avoid typing password.
- Update this page if you have any more tips for future build czars :-). This
page is in git under
ACE/docs/bczar/bczar.html
The Realm of the Build Czar
Build Czar Arthur
Many years have passes since the days of the legendary Build Czar Arthur. His
duties were given to him by the mystical Lady of the Lake, who outlined the
first responsibilities of the Build Czar.
Then bespake the Lady of the Lake,
And these were the words said shee:
"I knoweth of thy deeds, thou noble Arthur,
but thy task hath not finished for thee"
"Thou shalt feitch thy trusty steed,
And cleanse thy builds againe;
Then shallt thy ryde hath finnished,
When new kits released thee cann."
Then bespake him noble Arthur
And these were the words said he:
"With what weapons shallt I use,
To asure these from the devil free?"
Then appeered before noble Arthur,
Uppon the ground a sacred scroll
Conjurred by the Lady of the Lake
Borne of the earth in a roll.
She saies, "Clasp this to thine selfe
For thee shallt find need for it.
It shall keep others in the cold,
Only to be ressurected when thee sees fit."
"Others shall join thy person,
To ryde with thee in thy quest;
Thee shallt be thankful of theire help,
And to alsoe hold them steadfast."
"But if theire talke too lodly rise,
And causeth much damage to thine cuntry,
He must come forth, and make proclamation,
For the next one he shall be."
So hath Arthur to the Lady spoke:
"For I sweare, and save my othe,
While enimes and evils I seeke,
I shall fight against them bothe.


Purrfect Match
Purrfect Match
Home
(current)
About
Contact
Log in
Sign Up
Purrfect Match
The only place to find a feline match
Get started


--- layout: template menu : tutorial title : Hello World FLR Tutorial ---
This tutorial is the same as the Hello World CSV tutorial except that greetings are read from a Fixed-Length Record flat file instead of a CSV flat file.
We will process a simple FLR file containing greeting records and generate greeting messages.
To keep the tutorial simple, the input file named greetings.flr
has the following content:
#[3:id][3:name]
001foo
002bar
00xbaz
Each record is composed of 2 fields :
For each record, the batch application should print to the console a greeting of the format : Hi foo! Your id is 1 .
Easy Batch development is POJO-based, so we would like to map each record to an instance of the following Greeting
bean:
public class Greeting {
private int id;
private String name;
// Getters and Setters omitted
public String getGreetingMessage() {
return "Hi " + name + "! Your id is " + id;
}
}
The id and name fields in fixed-length records should be mapped respectively to the id and name fields in the Greeting
bean.
The record number 4 00xbaz
should be ignored since the value 00x
is not a number as expected.
Finally, we should skip the header record from being processed since it only describes the flat file record format.
You will see that all these requirements can be easily implemented using Easy Batch, so let's get started!
The goal of Easy Batch is to let you concentrate on your batch processing logic and to take care of the boilerplate code of reading, filtering and mapping fixed-length records to domain objects.
First, let's implement our batch proces
sing logic by extending the AbstractRecordProcessor
class:
public class GreetingProcessor extends AbstractRecordProcessor<Greeting> {
@Override
public void processRecord(Greeting greeting) throws Exception {
System.out.println(greeting.getGreetingMessage());
}
}
This processor will print the greeting message for each input record as required.
Actually, we have almost finished our batch implementation! We should now configure Easy Batch engine to :
greetings.flr
flat fileGreeting
beanGreetingProcessor
The following listing provides this configuration:
public class Launcher {
public static void main(String[] args) throws Exception {
// Build an easy batch engine
EasyBatchEngine easyBatchEngine = new EasyBatchEngineBuilder()
// requirement N°1
.registerRecordReader(new FlatFileRecordReader(new File("/data/greetings.flr")))
// requirement N°2
.registerRecordFilter(new StartsWithStringRecordFilter("#"))
// requirement N°3
.registerRecordMapper(new FixedLengthRecordMapper(
Greeting.class, //Pojo type
new int[]{3,3}, // Fields lengths in FL record
new String[]{"id", "name"})) // // Fields names in the same order as in the FL records
// requirement N°4
.registerRecordProcessor(new GreetingProcessor())
.build();
// Run easy batch engine
EasyBatchReport easyBatchReport = easyBatchEngine.call();
// Print the batch execution report
System.out.println(easyBatchReport);
}
}
That's all, we can now run the batch and see the results.
The complete source code of this tutorial is available here.
To run the tutorial with maven, launch the following command in the easybatch-tutorials
directory :
mvn exec:java -PrunHelloWorldFLRTutorial
If everything is ok, you should see something like the following output in the console :
INFO: Initializing easy batch engine
INFO: Data source: /data/greetings.flr
INFO: Strict mode: false
INFO: Total records = 4
INFO: easy batch engine is running...
INFO: Record #1 [StringRecord{number=1, rawContent='#[3:id][3:name]'}] has been filtered.
Hi foo! Your id is 1
Hi bar! Your id is 2
SEVERE: Record #4 [StringRecord{number=4, rawContent='00xbaz'}] has been ignored. Root exception:
Unable to convert '00x' to type int for field id
INFO: Shutting down easy batch engine
As expected, Easy Batch processed only valid records and generated a greeting message for each person.
Moreover, Easy Batch has logged precise information about which record has been filtered and ignored with an error message for each case.
In this tutorial, you have learned how to process data from a fixed-length flat file using Easy Batch.
With Easy Batch, all we have done is :
Easy Batch handled all the boilerplate code of reading, filtering, parsing and mapping flat file records to
instances of our domain object Greeting
and actually has reduced this boilerplate code from hundred lines to only a very few lines! (listing above)
The following table summarizes what we have done and what Easy Batch has done for us :
| Task | You | Easy Batch |
|---|---|---|
| Provide configuration meta data | ||
| Provide record processing logic | ||
| Handle I/O for input file | ||
| Read input file record by record | ||
| Filter comment records | ||
| Map records to domain objects | ||
| Apply business processing logic |


{% extends 'base.html' %} {% block content %}
Website created during Human-Computer Interaction classes at Adam Mickiewicz University in Poznan.
Autors:
Agnieszka Ostrowska and Wojciech Zięba


This is hilarious and really creative:
http://www.aegisub.net/2008/12/if-programming-languages-were-religions.html
--- layout: post title: "If Programming Languages Were Religions..." date: 2008-12-16T11:48:00-07:00 categories: - Personal - Humor ---
This is hilarious and really creative:
http://www.aegisub.net/2008/12/if-programming-languages-were-religions.html


Loading...
Loading...
Loading...
Comments:
Log in to post a comment!
Please wait x more seconds before commenting again
New comment:
Submit


The internet age began with a vicious power struggle to decide who would control the future of the just emerging web, officially remembered as the Browser War.
Back then the web was very different. There were few web pages and they consisted of nothing but line after line of boring text. There was hardly anything worth finding and no easy way to search for it.
The Creation of Mosaic
At the University of Illinois Computer Science, a student named Mark Andreessen had an idea. He said that “The internet was only really for academics, researchers and scientists, and there wasn’t anything that ordinary people could do with it. But it was so useful to the people who were using it that I figured everyone should be able to use it.”
With the help of friends, they worked to make the web more intuitive to use by adding images, pictures, audio, and video capabilities. Their efforts created the world’s first graphical web browser. In the fall of 1993, they called it Mosaic and posted it online and made it free. For Mosaic to go truly public, however, it needed a giant influx of cash.
The Company Named Netscape
Jim Clark, a high school dropout who later in life became a Computer Science Professor at Stanford, contacted Andreessen. He was considering starting a new software company and wanted Andreessen on board. They plotted how to turn Mosaic into the basis of a business venture. They named their company Netscape and even hired undergraduate students from the University of Illinois, where Andreessen was a student.
The web browser would change the world. Aalthough Jim Clark may have grasped that insight, most people didn’t, including Bill Gates.
The Microsoft Giant
Bill Gates created the most important and profitable company of them all. In two decades, Microsoft had established a near monopoly over PC operating systems, and it used that monopoly to gain a vice-like grip over the entire computer industry. His online system was called the Microsoft Network.
Bill Gates’ story began in 1975 when at the age of 19 he dropped out of Harvard to start Microsoft with his friend Paul Allen. Gates’ vision was simple and ambitious: a PC on every desktop in every home and every office and all running Microsoft software. By 1993 his dream was close to becoming a reality. About 90% of the world’s PCs were running Microsoft Windows. They played very rough with their competitors who created their own operating systems. They defeated companies such as Lotus, WordPerfect, and even IBM were defeated.
Netscape vs. Microsoft
Netscape culturally already perceived Microsoft as the company to take out when all other companies at the time were afraid to face them. On October 13, 1994 after months of coding, Netscape’s new browser, Navigator, was released, and it was an instant success.
In the computer business, the companies that have the most power control what’s known as a Software Platform (the software which other programs run on top). With this near monopoly over the Windows operating system, Microsoft controlled the ultimate platform.
With the release of Navigator, however, many in Silicon Valley began to imagine a different future where the browser could be an alternative platform.
Microsoft's Biggest Threat
The problem for Netscape was that Bill Gates now perceived the company to be the primary threat to their continued dominance.
Gates dispatched a special group of envoys to Netscape’s headquarters. Each side had a separate take on the meeting:
- Microsoft version: Had this free roaming discussion with them about how we would work with Netscape, how would we work with them on web servers and browsers.
- Netscape version: Microsoft offered a deal to Netscape they couldn’t refuse; one million dollars were offered for unlimited access to all their technology. If they didn’t take it, Microsoft was just going to copy everything they did.
Regardless, when Netscape went public, its stocks went through the roof igniting the internet boom that would rage for the rest of the decade. Mark Andreessen infamously stated that “Windows is going to be a poorly set of device drivers”, which is the equivalent of a slur on Gates’ mother.
Microsoft's Revenge
Microsoft planned to drive Netscape to an early grave with a web browser of its own: Internet Explorer . Microsoft had advantages in building their browser, including vast finances and reserves of coding talent. Gates also used his army of salesman to stop PC manufacturers from installing anything other than Internet explorer by using dirty methods.
Netscape had to charge money for its browser, but Microsoft was able to give Internet Explorer away for free. They were able to bundle it into the Windows OS. When Internet Explorer 4 (IE4) came out, the Browser War was over. By September 1997, Microsoft had won. From that point on, it was all downhill for Netscape. A year later, the company was acquired by a bigger company called America Online (AOL).
Microsoft in Court
In 1998, Rebeck launched an Antitrust lawsuit against Microsoft on behalf of his clients, which included Netscape. He accused them of using their monopoly to engage in a wide variety of predatory practices to prevent consumers from accessing Netscape’s products.
In court, Gates lied about multiple topics, one of which included the meeting with Netscape. He stated he had no knowledge of that meeting. However, evidence came out in an email that he had sent his high-level staff members information about the meeting. The federal judge over the case issued his guilty verdict and recommended the company be broken up causing its stock market value to drop by thirty billion dollars overnight.
Eventually, a federal appeals court, though it agreed with the judgement that Microsoft broke the law, decided the verdict was too harsh and rescinded the order to split the company.
Conclusion
Although Microsoft won the war, the revolution sparked by Netscape unleashed a new generation of startups companies like Google that have made Microsoft look old, clueless and lumbering just as Microsoft did to IBM two decades ago.


RUSH HOUR
A Film Review by Brian Takeshita
Rating: **1/2 out of ****
Okay, let me first start off by saying that Jackie Chan is really a force to be reckoned with.  It's a wonder that he hadn't migrated from Hong Kong years ago and blew everybody else out of the Hollywood market. Since I figured Chan was the best thing RUSH HOUR brought to the table, I was very encouraged to see that the movie opened up with a showcase for Chan's physical talent. Here's the setup: Chan plays Detective Inspector Lee, one of Hong Kong's best special service cops. He single-handedly foils an operation to smuggle some of the greatest artistic and cultural Chinese treasures out of the city just before Hong Kong is handed over to China. However, the crime boss in charge, known only by the name of Juntao, is nowhere to be seen, and his right-hand man gets away.
As much as Lee is an asset to the Hong Kong Police, so is Detective James Carter (Chris Tucker) a liability to the LAPD. So when the daughter of Chinese Consul Han (Tzi Ma) is kidnapped in Los Angeles by the relocated Juntao mob and held for ransom, Lee is called in from China by the Consul, while Carter is given the unprestigious job of keeping him out of the FBI's hair. When Lee convinces Carter of his earnestness in returning the little girl to safety, the two of them embark on their own investigation.
The tagline for RUSH HOUR is, "The Fastest Hands in the East Meet the Biggest Mouth in the West." Brother, you're not kidding. Chris Tucker really pushes the envelope when it comes to being an obnoxious loudmouth, but it's done in such an over-the-top way that it works. You get the sense that the character of Carter, for all his comical performance, doesn't for one moment doubt that he's "The Man," and it's that attitude of taking himself seriously and believing he's in total control that makes him so funny.
Chan, on the other hand, shines when he is out of his element. Although Lee initially exudes the persona of a calm, trained professional, he later reveals his innocence in many areas as he's led around by Carter. This coping with the unexpected is trademark Chan, who always seems like he's only just managing to keep his head above water, whether in dealing with other police officers, or when in a fight with one of the bad guys. It's that kind of desperation that makes you laugh at him, then it's that capacity to deal with the situation that makes you marvel at his ability.
Luckily, RUSH HOUR has a great asset in the interaction between Carter and Lee. This is particularly important because when you break it down, the film is a very conventional buddy movie, where the buddies come from very different sides of the tracks. There's the initial mistrust, the learning from each other, the revelation by each character that the other is an okay guy after all, and the climax where one saves the other's life, cementing the relationship. We've been there, done that, but in this case we're given something a little more unusual to spice up the old formula. The closest thing I can think of would be SHOWDOWN IN LITTLE TOKYO with Dolph Lundgren and Brandon Lee, but it didn't go for the comedy like RUSH HOUR does. Sure, some of the scenes are pretty corny, like when Carter attempts to teach Lee to dance, but they are a bunch of gems nevertheless.
You know, it would have been easy to stuff the film with songs like Carl Douglas's "Kung Fu Fighting," but in keeping with the "cops against organized crime" motif, director Brett Ratner instead chose to have Lalo Schifrin write the score. This is the same guy who composed the themes for "The Man from U.N.C.L.E.," "Mission: Impossible," "Starsky and Hutch," and the Dirty Harry movies. Once more utilizing a lot of hi-hat and scratch guitar, now how cool is that?
Okay, so you've got great talents playing two interesting characters, Jackie Chan action, good chemistry, and cool music. What's the downside? For one thing, the movie is severely predictable. If the main bad guy's identity remains a mystery for a good portion of the film, it's a good bet he's going to end up being someone everyone else thought was one of the good guys. If a criminal played by a decently famous actor is put away at the beginning of the movie, there's a good chance we'll see him again before the film is through. If the bad guy is climbing to any sufficient height and trying to make his getaway with a case of cash, oh you know the case will open up and the contents will fall like confetti.
 Ratner uses quick cuts, close-ups, a moving camera, and different angles, which would normally be used to cover up the deficiencies in normal Hollywood action, but Chan is both such an artist and technician that the best way to shoot one of his sequences is to stand back and catch everything. He'll do it all right before your eyes. Instead, the conventional shooting makes Chan's movements less impressive, and it's too bad that Ratner undermines one of the biggest attractions of the movie in this way, unnecessarily bringing the film down a few notches.
Even with the aforementioned deficiencies, RUSH HOUR is the best Jackie Chan vehicle released for the mainstream American audience to date. As a bonus, they even include the out-takes over the end credits, just like in Chan's Hong Kong films. How can you not like that?
Review posted September 21, 1998
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Welcome to Akan Naming System
Akan names come from a traditional naming system for people from countries such as Togo,
Ivory Coast and Ghana. A child's name is determined by factors surrounding his or her birth.
For example, the day of their birth or the manner in which they were born may determine
which name they get irrespective of their gender.


World’s Most Expensive SUV Looks Like Nothing Else
Think of it as a... flexible "elephant" on wheels?!
by Anthony KarrWhat’s your general opinion about asymmetrically-styled vehicles? Yes, we are talking about the first-gen Hyundai Veloster, for example, or this - the Karlmann King SUV. If this is the first time you hear about the latter, then prepare to spend five minutes with the machine that is dubbed as the world’s most expensive SUV on sale today.
A new video from the Bacroft Cars channel on YouTube details some of the features of the King and introduces us to its designer, Luciano D’Ambrosio. He explains the inspiration for the exterior of the gargantuan SUV comes from the Batmobile that featured in The Dark Knight trilogy. It’s a design language that he describes as the “diamond design.”
Gallery: Karlmann King SUV
“Instead of trying to find the perfect combination of surfaces, we tried to create a break in the surfaces. It has to be big, dominant, but at the same time not to be so aggressive. It’s absolutely unique.”
The design is definitely quite unique indeed, but underneath the skin lays a very common technology. Namely, the King is based on the Ford F-550 with power provided by a 6.8-liter V10 engine with 420 horsepower. Previous reports claimed the top speed of the SUV is just 87 miles per hour (140 kilometers per hour) due to its weight of more than 13,000 pounds (5,896 kilograms), but in this new video, D’Ambrosio says it can reach 137 mph (220 kph).
Yup, It's Expensive:
“Given the size of the car, you can imagine that you are driving an elephant,” the designer explains. “But, as a matter of fact, it is very flexible and nice to drive.” So, a flexible elephant then?
And now about the price. To justify its label as the world’s most expensive SUV, the King starts at $1,085 million for the “base” version. Go for all the options in the list, and you’ll have to spend more than $3 million to get one.
Source: Bacroft Cars


Browser support for ECMAScript 6 features is not extensive yet and varies alot.
This is why we need to convert it to the previous version of JavaScript, called ECMAScript 5, which runs fine in any modern browser.
This conversion is often referred to as transpilation, and Babel is a popular solution to do that
Some of the features can be used almost for "free", such as modules, arrow functions, and classes withouth to much overhead (syntatical sugar).
Additions to Array, String and Math objects and prototypes (such as Array.from()) require so-called polyfills (provide missing code).
For a full overview of features that are supported by both transpilers and browers, see ECMAScript 6 compability table
Variables are so much more fun in ES6 - not! But they are a lot nicer(les:more predictible) to hang out with than the old var chap of ES5!
- ES6 brings two new ways to declare variables: let and const
- These basically replace, the ES5 way of declaring variables, using var
- However, var is still around
Here is an example where the let declared variable tmp, only exists within the block starting in line A:
function switch(x, y) {
if (x > y) { // (A)
let tmp = x;
x = y;
y = tmp;
}
console.log(tmp===x); // ReferenceError: tmp is not defined
return [x, y];
}
const is a read-only, initialize at once constant type. Here are a few examples of correct usage and wrong usage leading to SyntaxError and TypeError:
const foo;
// SyntaxError: missing = in const declaration
const bar = 123;
bar = 456;
// TypeError: `bar` is read-only
- Promises are a pattern, helping out with one particular kind of asynchronous programming:
"a function (or method) that returns its result asynchronously."
- To implement such a function, you return a Promise, an object that is a placeholder for the result.
- The caller of the function registers callbacks with the Promise to be notified once the result has been computed.
- The function sends the result via the Promise.
The de-facto standard for JavaScript Promises is called Promises/A+ [1]. The ECMAScript 6 Promise API follows that standard.
A gentle example, to give you a feeling of what working with Promises will be like. With Node.js-style callbacks, reading a file asynchronously looks like this:
fs.readFile('config.json',
function (error, text) {
if (error) {
console.error('Error while reading config file');
} else {
try {
let obj = JSON.parse(text);
console.log(JSON.stringify(obj, null, 4));
} catch (e) {
console.error('Invalid JSON in file');
}
}
});
With Promises, the same functionality is implemented like this:
readFilePromisified('config.json')
.then(function (text) { // (A)
let obj = JSON.parse(text);
console.log(JSON.stringify(obj, null, 4));
})
.catch(function (reason) { // (B)
// File read error or JSON SyntaxError
console.error('An error occurred', reason);
});
There are still callbacks, but they are provided via methods that are invoked on the result (then() and catch()). The error callback in line B is convenient in two ways: First, it’s a single style of handling errors (versus if (error) and try-catch in the previous example). Second, you can handle the errors of both readFilePromisified() and the callback in line A from a single location.
No more global namespace pollution.
There is exactly one module per file and one file per module.
By default anything you declare in a file is not available outside that file (awesome).
A module can export multiple things by prefixing its declarations with the keyword export:
export var myVar1 = ...;
export let myVar2 = ...;
export const MY_CONST = ...;
export function myFunc() {}
export class MyClass {}
These exports are distinguished by their names and are called named exports.
import { myFunc, myVar1 } from 'lib';
myFunc();
You can also list everything you want to export at the end of the module (which is once again similar in style to the revealing module pattern):
const MY_CONST = ...;
function myFunc() {}
export { MY_CONST, myFunc };
You can also import the complete module using a wildcard:
import * as lib from 'lib';
lib.myFunc();
If you want to export a single value from the module then you can use default export.
For example, a class:
export default class {}
And import like this (omit the curly braces):
import MyClass from 'MyClass';
var instance = new MyClass();
Module can have both named exports and a default export.
In such cases, to import a module's default export, you have to omit the curly braces in the import statement:
import myDefault, { foo, bar } from 'lib';
Only use export default, and to do that at the end of your module files. Like this:
var api = {
foo: 'bar',
baz: 'ponyfoo'
}
export default api
Easy then to import the whole thing like this:
import api from 'api';
api.foo; // bar
In `src/00-modules/named.js´ create and export two named functions:
In `src/00-modules/default.js` import the two functions created in the previous task, then export them again, but as a single default export.
Simpler and clearer syntax to create objects and to deal with inheritance
Classes aren't really 'classes', instead they are functions which are in turn objects
It’s important to understand that while JavaScript is an object-oriented language, it is prototype-based and does not implement a traditional class system.
Almost everything in JavaScript are objects (including functions and arrays). Except for primitives:
An object is a collection of properties, and a property is an association between a name (or key) and a value. A property's value can be a function, in which case the property is known as a method.
// The easiest way to create an object is like this:
let myObject = { 'key1': "Awesome", 'key2': "Object" }
// Or:
var myObject = Object.create(new Object());
myObject.key1 = "Awesome";
myObject.key2 = "Object";
// Or:
function MyObject(value1, value2) {
this.key1 = value1;
this.key2 = value2;
}
var myObject = new MyObject("Awesome", "Object");
Which of these alternatives are suited to create multiple instances of same type?
// Get a property
var value = myObject.key1;
var value = myObject["key1"];
// Set a property
myObject.property = "Value";
myObject["property with space in it"] = "Value";
// Call a method
myObject.toString();
// To find out if a property exists on an object
'key1' in myObject; // true
function MyClass (id) {
var privateField = "My secret";
// Instance property
this.id = id;
}
// Instance method
MyClass.prototype.myMethod = function () {};
var instance1 = new MyClass(1);
var instance2 = new MyClass(2);
instance1.myMethod();
instance1.id; // 1
instance2.myMethod();
instance2.id; // 2
instance1 instanceof MyClass; // true
Prototype methods are shared across all instances of the class. One method, many instances!
MyClass is a constructor function, and combined with the new keyword, work together to create new objects in much in the same way classes do in other OO languages.
When you create an object using the new keyword, it creates a new object, passes it in as this to the constructor function.
The own properties are properties that were defined on the instance, while the inherited properties were inherited from the Function’s Prototype object.
instance1.hasOwnProperty("id"); // true
instance1.hasOwnProperty("myMethod"); // false
When you define a function within JavaScript, it comes with a few pre-defined properties and one of these is the illusive prototype.
(1) Initially an empty object. (2) You can add methods and properties on a function’s prototype property to make those methods and properties available to instances of that function. All class instances, past and future, will be affected.
Objects inherit from other objects.
Every object in JavaScript has a special related object called the prototype.
vehicle.__proto__ = machine
// machine is the prototype of vehicle
car.__proto__ = vehicle
// vehicle is the prototype of car
This is a prototype chain: car -> vehicle -> machine
When looking up a property, Javascript will try to find the property in the object itself. If it does not find it then it tries in it's prototype, and so on.
A function’s prototype is used as the object to be assigned as the prototype for new objects’ created using this function as a constructor function.
instance.__proto__ = Function.prototype
An object’s prototype is the object from which it is inheriting properties.
function MySubClass(id) {
MyClass.call(this, id);
}
// Inherit from the parent class
MySubClass.prototype = Object.create(MyClass.prototype);
MySubClass.prototype.constructor = MySubClass;
// Child class method
MySubClass.prototype.myMethod = function() {
MyClass.prototype.method.call(this);
}
Easy to read?
class MyClass {
constructor (id) {
this.id = id
}
myMethod () {}
static myStaticMethod() {}
}
let instance = new MyClass(1);
instance instanceof MyClass; // true
typeof MyClass // 'function' (old-school constructor function)
MyClass.myStaticMethod();
darth.hasOwnProperty("myMethod")
MyClass.prototype.myMethod(); // prototype-based
The class keyword is syntactical sugar, JavaScript remaining prototype-based!
This is the prototype chain: MyClass -> Object
class MySubClass extends MyClass {
constructor (id) {
super(id)
}
}
This is the prototype chain: MySubClass -> MyClass -> Object
Create a class equal to the ECMAScript 5 code:
function Point(x,y) {
this.x = x;
this.y = y;
}
// Static method
Point.distance = function (a, b) {
var dx = a.x - b.x;
var dy = a.y - b.y;
return Math.sqrt(dx*dx + dy*dy);
};
Point.prototype.toString = function () {
return this.x + ' ' + this.y;
};
module.exports = Point;
Extend the Point class from previous task so that it behaves equal to the ECMAScript 5 code below:
// Child class constructor
var ColorPoint = function (x, y, color) {
Point.call(this, x, y);
this.color = color || 'red';
};
// Inherit from the parent class
ColorPoint.prototype = Object.create(Point.prototype);
ColorPoint.prototype.constructor = ColorPoint;
// Child class method
ColorPoint.prototype.getColor = function () {
return this.color;
};
module.exports = ColorPoint;
ES6 has a new loop — for-of. It works with iterables. Let’s look at his signature:
for (let item of ITERABLE) {
CODE BLOCK
}
It’s similar to for-in loop, which can be used to iterate through object properties.
Iterable is an object which has [Symbol.iterator]() method inside.
The [Symbol.iterator] method must return an iterator object, which is actually responsible for the iteration logic.
An iterator is an object with a next method that returns { done, value } tuples.
We finally can use for-of for looping over the elements:
const arr = [1, 2, 3, 4, 5];
for (let item of arr) {
console.log(item); // 1
// 2
// 3
// 4
// 5
}
Symbol is in turn an unique and immutable data type which can be used as an identifier for object properties — no equivalent in ES5.
// Symbol
let s1 = Symbol('abc');
let s2 = Symbol('abc');
console.log(s1 !== s2); // true
console.log(typeof s1); // 'symbol'
let obj = {};
obj[s1] = 'abc';
console.log(obj); // Object { Symbol(abc): 'abc' }
You can use symbols to create unique identifiers for object properties.
Symbols are not visible in `for...in` iterations and object.keys()
The Symbol.iterator well-known symbol specifies the default iterator for an object.
class Classroom {
constructor() {
this.students = ["Tim", "Joy", "Sue"];
}
}
Option 1: Return a reference to the array, in which case the caller might change the array by adding or removing items.
Option 2: Another option is to make a copy of the array. Then, the original student array remains safe. However, copy operations can be expensive.
Option 3: Make the classroom iterable by adding a [Symbol.iterator]() method.
function PointCloud(list) {
this.collection = list;
}
PointCloud.prototype[Symbol.iterator] = function() {
var index = 0;
var array = this.collection;
return {
next: () => {
var result = { value: undefined, done: true };
if (index < array.length) {
result.value = array[index++];
result.done = false;
}
return result;
}
};
};
module.exports = PointCloud;
() => {}
A quick overview of the syntax:
// Basic syntax:
(param1, param2, paramN) => { statements }
(param1, param2, paramN) => expression
// equivalent to: => { return expression; }
// Parentheses are optional when there's only one argument:
(singleParam) => { statements }
singleParam => { statements }
// A function with no arguments requires parentheses:
() => { statements }
Another example:
function(x) { return x+1;}
x => x+1;
Here a2 is using traditional anonymous functions while a3 is using the arrow function syntax.
var a = ["Hydrogen", "Helium", "Lithium", "Beryllium"];
var a2 = a.map(function(s){ return s.length });
var a3 = a.map( s => s.length );
//a2 = [8, 6, 7, 10]
//a3 = [8, 6, 7, 10]
function foo(a) {
var b = a * 2;
function bar(c) {
console.log( a, b, c );
}
bar(b * 3);
}
foo( 2 ); // 2 4 12
function person(firstName, lastName, age, eyeColor) {
this.firstName = firstName;
this.lastName = lastName;
this.changeName = function (name) {
this.lastName = name;
};
}
function Person() {
// The Person() constructor defines `this` as an instance of itself.
this.age = 0;
setInterval(function growUp() {
// In nonstrict mode, the growUp() function defines `this`
// as the global object, which is different from the `this`
// defined by the Person() constructor.
this.age++;
}, 1000);
}
var p = new Person();
That can be solved like this:
function Person() {
var self = this;
// Some choose `that` instead of `self`.
// Choose one and be consistent.
self.age = 0;
setInterval(function growUp() {
// The callback refers to the `self` variable of which
// the value is the expected object.
self.age++;
}, 1000);
}
var p = new Person()
With arrow functions and lexical binding of this, the problem can be solved like this:
function Person(){
this.age = 0;
setInterval(() => {
this.age++; // |this| properly refers to the person object
}, 1000);
}
let {a,b} = obj;
let foo = ["one", "two", "three"];
// without destructuring
let one = foo[0];
let two = foo[1];
let three = foo[2];
// with destructuring
let [one, two, three] = foo;
let o = {p: 42, q: true};
let {p, q} = o;
It is also possible to give the new variable a new name by using:
let {p:age, q}
var metadata = {
title: "Scratchpad",
translations: [
{
locale: "de",
localization_tags: [ ],
last_edit: "2014-04-14T08:43:37",
url: "/de/docs/Tools/Scratchpad",
title: "JavaScript-Umgebung"
}
],
url: "/en-US/docs/Tools/Scratchpad"
};
let { title: englishTitle, translations: [{ title: localeTitle }] } = metadata;
[a, b] = [b, a];
var [a, , b] = f();
for (var {name: n, family: { father: f } } of people) {...}
var help = function* helpiterable() {
yield 100;
}
function* myiterable() {
while(true) {
yield 1;
yield 2;
for(var i=0;i<10;i++) {
yield i*2;
}
yield* [1,2,3];
yield* help();
yield; // yield undefined;
}
return 0;
// if return is not added, then it is implicit as return undefined;
}
function* myobserver() {
console.log(yield);
}
var miobserver = myobserver();
miobserver.next(); // initialize
miobserver.next("test"); // writes "test" to console
function* mycoroutine() {
yield 1; // A
console.log(yield); // B
console.log(yield); // C
}
var micoroutine = mycoroutine();
var i = micoroutine.next(); // initialize // A, and pauses at A
micoroutine.next(); // goes to B, and pauses, waits for data
micoroutine.next("test"); // writes "test" to console and continues until next yield, pauses // B->C
micoroutine.next("test2"); // writes "test" to console goes to invisible return // B->C
console.log(micoroutine.next()); // returns "undefined" from return undefined; exits generator
function* producer() {
console.log('1');
yield; // (A)
console.log('2'); // (B)
}
let myProducer = producer(); // nothing happens, generator object is returned
myProducer.next(); // will pause on yield on (A)
myProducer.next(); // will continue, and execute (B). Generator is done.
`Unleash the power of backticks`
// The good oldfashioned way
var a = 5;
var b = 10;
console.log('The sum of ' + a + ' and ' + b + ' is ' + (a + b));
// With template strings
console.log(`The sum of ${a} and ${b} is ${a + b}`);
// The good oldfashioned way
console.log('Thank you Mario!\n' +
'But our princess is in another castle.');
// With template strings
console.log(`Thank you Mario!
But our princess is in another castle.`);
var a = 5;
var b = 10;
function tag(strings, value1, value2) {
console.log(strings[0]); // 'Hello '
console.log(strings[1]); // ' world '
console.log(value1); // 15
console.log(value2); // 50
return 'Foo!';
}
tag`Hello ${ a + b } world ${ a * b }`;
// 'Foo!'
In `src/04-template-strings/01-variable-substitution.js´ change the log() method to use embedded expressions instead of concatenated strings.
In `src/04-template-strings/02-multiline-strings.js´, remove all string concatenations and '\n' characters, and use a multi-line string with embedded expressions instead.
New data structures
var capitals = {
'Norway': 'Oslo',
'Sweden': 'Stockholm'
};
capitals['Denmark'] = 'Copenhagen';
console.log(capitals['Sweden']);
// 'Stockholm'
// Iteration is a bit awkward
Object.keys(capitals).forEach(key => {
console.log('The capital of ' + key + ' is ' + capitals[key]);
});
// The easiest way to get the size is
var size = Object.keys(capitals).length;
// Keys can only be represented as strings
capitals[1] = 'London'; // 1 is converted to '1'
capitals[true] = 'Berlin'; // true is converted to 'true'
// Initialize the map
var map = new Map();
// Add entry with key 'Norway' and value 'Oslo'
map.set('Norway', 'Oslo');
// Keys can be any data type, object, or even a function
var keyString = "a string",
keyObj = {},
keyFunc = function () {};
map.set(keyString, 'value');
map.set(keyObj, 'value');
map.set(keyFunc, 'value');
// Iteration is a bit cleaner
for (let [country, capital] of capitals) {
console.log('The capital of ' + country + ' is ' + capital);
}
// Getting the size is easy
var size = capitals.size;
// Initialize the set
var set = new Set();
// Add value
set.add('Norway');
// No duplicate values
set.add('Norway'); // has no effect
// Values can be any data type, object, or a function
var obj = {},
func = function () {};
set.add(obj);
set.add(func);
// Simple iteration
for (let value of set) {
console.log(value);
}
// Get size
var size = set.size;
// Check if value exists
var exists = set.has('Norway');
// Delete
set.delete('Norway');
let map = new WeakMap();
let apple = { id: 1, name: 'Apple' };
map.set(apple, 3);
map.get(apple); // 3
// Will not be kept in the map, as no one else is holding a
// reference to the key
map.set({ id: 2, name: 'Orange' }, 5);
// Will be held in the map until the element with id 'example'
// is removed from DOM
map.set(document.getElementById('example'), { clickCount: 4 });
// Simple tagging of DOM elements that have been touched/edited.
// When elements are removed from DOM, the garbage collector
// will automatically remove them from the Set.
var touchedElements = new WeakSet();
function addTouched(domElement) {
touchedElements.add(domElement);
}
function hasBeenTouched(domElement) {
return touchedElements.has(domElement);
}
In `src/07-maps-and-sets/01-map.js´, rewrite carMap to be a Map, and modify the functions so that they work with the Map data structure.
In `src/07-maps-and-sets/02-set.js´, change getUniqueActors() to use a Set in order to return a unique array of actors.


Before Change
if "CPLEX" in msg:
self.skipTest(msg)
else:
self.fail(msg)
def test_write_to_lp_file(self):
test write problem
q_p = QuadraticProgram("my problem")
After Change
{("x", "x"): 1, ("y", "z"): -1, ("z", "z"): 2})
self.assertEqual(cst[2].sense, Constraint.Sense.GE)
self.assertEqual(cst[2].rhs, 1)
except MissingOptionalLibraryError as ex:
self.skipTest(str(ex))
except RuntimeError as ex:
self.fail(str(ex))
def test_write_to_lp_file(self):


I am finding it immensely challenging to express the logic, flow and sequence of events from instruction to code. This was profound in this sprint in the Minesweeper game. I had to discern between arrays and objects, and objects within arrays (what!!) and reference functions within nested loops.
I found myself getting frustrated that I couldn't follow what the code was doing or saying, despite me having written it. It's like writing a blog post in English, and then reading it again to find it's in a foreign language. Over and over my basic instinct was to delete everything I had written and start from scratch, thinking I would immediately crack the problem with a clean slate.
Instead, I'm practicing commenting out the code blocks which are giving me grief, and focusing on making sure the basics are working as I want, and I understand what they are doing. To use the blog-writing analogy again, I'm translating what I've written into a manner and form which I understand upon reflection and experimentation.
The disproportionate emotional responses have been stemming from my year 7 to year 12 school years. I struggled to translate instruction to mathematic equations for problem solving. Rather than pushing through, I would internally punish myself with anxiety and unhealthy self-berating - if everyone else can get this, why can't I?!
This unhealthy inner voice was self-destructive. Rather than focusing on the positives I acquired growing up, I based my self worth only on my shortcomings and my inability to excel at Mathematics. Through reading Search Inside Yourself, I'm becoming aware that I am risking falling into this very same trap of inability to believe in myself when I can't solve the problem or get working code.
Is there a quick fix? Of course not. Learning to be a developer in any language is all about practice, exposure, persistence, and resilience. But the fact that I recognise and acknowledge these factors now with minimal anxiety makes me proud that I have come a long way from where I was in my schooling years. I believe in myself, and I believe in my abilities. I have a lot of positive things about me: I have the persistence and resilience to see this through, and all I have to look forward to now are practicing and exposing myself to this wonderful world of coding!
I found this exercise exceptionally confronting: more than I was expecting! I recalled a collection of confronting experiences and interactions with people in both professional and personal contexts. My physiological symptoms were the same, and I built a 'pattern library' of symptoms to observe when I entered that state of experiencing anger. Interestingly, thanks to the book, I learnt how to look at my reactions objectively, and to let go of the internal debating of who was right and who was wrong (spoiler: there's no such thing as right or wrong! Just differences of opinion!)
I will confess, I have to practice this exercise a lot so I can control my emotions during programming. I have to learn to let go of my frustrations and my inner voice from holding me back. Much like learning to program, learning to let go of my strong emotions will take resilience, patience, and persistence, but it will all pay off in the long run.


We asked people to design new characters, like those that might appear in a foreign alphabet (Chinese, Bengali, Sanskrit, etc.). We also gave this same task to a computer program that simulates how people design new characters.
Can you tell which grid of images was drawn by 4 different people and which grid was drawn by a computer program?
People drew their characters with the following constraints:You will see a sequence of N displays just like this one below. In each display, the computer program's grid of images is randomly chosen to appear either on the left or the right. You will always be asked to indicate which grid the computer drew, using your keyboard's arrow keys. Please answer as accurately as you can.
***.
Images loaded: 0 percent.


Portal Access Grid (PAG) is an Access Grid Toolkit client designed to work within a web browser.
The Portlet Access Grid project provides a fully-functional portlet client for the Access Grid Toolkit version 3 (AGTkv3) that in addition enables automatic and transparent switching to unicast when multicast becomes unavailable, allows the use of Access Grid behind restrictive firewalls and from low bandwidth connections, and significantly simplifies the installation procedure for users as it only requires a recent Java Runtime Environment (1.5 or newer) on the client machine.
The portlet client can connect to any AGTk3 server and allows free navigation of virtual venues, communication using audio and video, access to the Jabber text chat, and access to shared applications and data within the venue. This client will be fully interoperable with other AGTk3 users and be designed to be easy to incorporate AGTk updates, as well as retaining the current level of AGTk interoperability with ioCom clients. These developments have the potential to benefit the significant portion of the academic community currently using Access Grid, will allow use of Access Grid within a familiar web-based environment from almost any location, e.g. internet cafes/hotel rooms, and will address the major perceived drawbacks to Access Grid compared to other collaboration environments.
PAG can be run in two modes; in Authenticated Mode, PAG will store your client profile information within the portlet data storage system. In Unauthenticated Mode, PAG will store your client profile information using a cookie. In order for PAG to successfully retrieve this information each time it is run, cookies must be enabled and your browser must keep the cookie when it is restarted. Both these options should be configurable within your browser; most are configured in this way by default.


SETFATTR
Section: File Utilities (1)Updated: Extended Attributes
Index Return to Main Contents
NAME
setfattr - set extended attributes of filesystem objectsSYNOPSIS
setfattr [-h] -n name [-v value] pathname... setfattr [-h] -x name pathname... setfattr [-h] --restore=file
DESCRIPTION
The setfattr command associates a new value with an extended attribute name for each specified file.OPTIONS
- -n name, --name=name
- Specifies the name of the extended attribute to set.
- -v value, --value=value
- Specifies the new value of the extended attribute. There are three methods available for encoding the value. If the given string is enclosed in double quotes, the inner string is treated as text. In that case, backslashes and double quotes have special meanings and need to be escaped by a preceding backslash. Any control characters can be encoded as a backslash followed by three digits as its ASCII code in octal. If the given string begins with 0x or 0X, it expresses a hexadecimal number. If the given string begins with 0s or 0S, base64 encoding is expected. See also the --encoding option of getfattr(1).
- -x name, --remove=name
- Remove the named extended attribute entirely.
- -h, --no-dereference
- Do not follow symlinks. If pathname is a symbolic link, it is not followed, but is instead itself the inode being modified.
- --restore=file
- Restores extended attributes from file. The file must be in the format generated by the getfattr command with the --dump option. If a dash (-) is given as the file name, setfattr reads from standard input.
- --version
- Print the version of setfattr and exit.
- --help
- Print help explaining the command line options.
- --
- End of command line options. All remaining parameters are interpreted as file names, even if they start with a dash character.
AUTHOR
Andreas Gruenbacher<EMAIL_ADDRESS>and the SGI XFS development team<EMAIL_ADDRESS>Please send your bug reports or comments to these addresses.SEE ALSO
getfattr(1), and attr(5).
Index
This document was created by man2html, using the manual pages.
Time: 05:29:10 GMT, December 24, 2015


Implementation (code by Yuchen Wang) of the predictive tool described in: Bertsimas D, Dunn J, Steele, DW, Trikalinos, TA. Wang, Y. Evaluation of Optimal Classification Trees for Revision of the Pediatric Emergency Care Applied Research Network Head Trauma Decision Rules. JAMA Pediatr. 2019;173(7):1-9. doi:10.1001/jamapediatrics.2019.1068
Calculate the risk score for children YOUNGER than 2 years old


You are viewing an historical archive of past issues. Please
report new issues to the appropriate project issue tracker on
GitHub.
Comments
-
Greg Hurrell
Seeing as this is a duplicate I am going to mark it as CLOSED. Please add any further comments in the original ticket:
Add a comment
Comments are now closed for this issue.


| RM,DM | D | mean (radians) |
|---|---|---|
| AMPRMS | D(21) | star-independent mean-to-apparent parameters: |
| (1) | time interval for proper motion (Julian years) | |
| (2-4) | barycentric position of the Earth (AU) | |
| (5-7) | heliocentric direction of the Earth (unit vector) | |
| (8) | (gravitational radius of Sun)(Sun-Earth distance) | |
| (9-11) | v: barycentric Earth velocity in units of c | |
| (12) | ||
| (13-21) | precession/nutation matrix |
| RA,DA | D | apparent (radians) |
|---|
SLALIB --- Positional Astronomy Library


Everything you need to know about TLA+, its tools, and the Toolbox is on
The TLA+ Web Site.
Resources for learning about TLA+ are on the web site's
Learning TLA+ page.
A few of the documents mentioned there can be obtained by clicking on the Toolbox's
Help
button.


You have been successfully registered.
Click here to confirm your registration.
This link will expire in <#if expireAfterSeconds gte 3600>${expireAfterSeconds / 3600} hour(s)<#else>${expireAfterSeconds / 60} minutes(s)#if>. After that, you must submit a new request to your Administrators to resend a new account activation email.


Flow is an audiovisual HTML5/WebRTC experiment which uses a simple pitch detection algorithm on your microphone input in real time to guide a line through space. Note: The only officially supported browser is Chrome. If you haven't already done so, you need to enable the "Web Audio Input" flag in "chrome://flags".
This experiment links users in real time via Socket.io and Node.js, so that each user can see each other user, creating some form of user-driven digital artwork in each browser window. Your microphone data is not transmitted, only the calculated frequency value.
Source Code


--- layout: default title: Topics description: Main Topics or Areas in embedded systems ---
We know that it's hard to learn something new. Know where to start is maybe the hardest part.
We've put together our posts in topics. So you could have an easy path.


Info
Offense
Defence
Endgame
Summary
Information Tab
Start Match
Offense Tab
Ball Count:
High Goals:
Low Goals:
Misses:
Pickup Ball
High Goal
Low Goal
Missed Ball
Undo Last Entry
Successful Rotation Control
Successful Position Control
Defence Tab
Foul
Undo Foul
Tech Foul
Undo Tech Foul
Endgame Tab
Climbed
Failed Climb
Autobalanced
Parked
Enter robot comments below.
Summary Tab
Save Data
Clear All Data
Skip Match


Brescia boss under-fire for Balotelli 'black' joke
by BeSoccerBrescia president Massimo Cellino came under fire on Monday after he described Mario Balotelli's difficult situation at the promoted Serie A club as "black".
Balotelli was dropped for Brescia's 3-0 defeat at Roma on Sunday after clashing with new club coach Fabio Grosso for his lack of commitment during training during the week.
"What do you want me to say about him (Balotelli)?" Cellino said on the sidelines of a Lega Serie A assembly on Monday.
"That he is black, he is working to clear things up, but he has a lot of difficulties."
Cellino was making a play on the Italian words 'nero' which means 'black' or 'gloomy' and 'schiarirsi' to 'lighten up' or 'clear up'.
Brescia later said in a statement that Cellino's comments were "obviously a paradoxical joke, clearly misunderstood, made in an attempt to defuse excessive media exposure and intended to protect the player himself".
Featured links
- The latest football transfers news and rumours
- Neymar or Mbappé? Zidane choose
- Kante explains why he turned down PSG
- What Cristiano said about Messi to his Man Utd teammates
Balotelli, who was born in Sicily but adopted and raised just outside Brescia, agreed a three-year deal with the Serie B champions after being released by Marseille last June.
But it has been a difficult start to the campaign for the 29-year-old with two goals scored in seven matches.
Earlier this month the former Inter Milan, Manchester City and Liverpool striker was also targeted by racist chanting during defeat at Hellas Verona, where he threatened to walk off the pitch.
Cellino, meanwhile, said that the striker was not to blame if the team are bottom of the table fighting for top-flight survival.
"We cannot think that a player alone will save the squad, that would be wrong for the team," continued Cellino.
"I signed him because he's 1.90m, he's an animal and he is still of an age to give something on the football pitch, not on social media. But he cannot be made the scapegoat for the difficult situation in Brescia. If we continue to talk about Balotelli, we hurt him and we hurt ourselves."


This game has finished.
The graphical map cannot be displayed
Your web browser does not support the graphical map. To see the map, please upgrade to Chrome, Safari, Firefox or Internet Explorer 9.


Kratei's Cube Entrance Manager:
Welcome to Kratei's Cube! Only the strongest win here.
Do you feel lucky?
Learn more about Kratei's Cube.
Enter Kratei's Cube.
Cancel registration for Kratei's Cube competition.


---
layout: archive
title: Lean Prover Zulip Chat Archive
permalink: 116395maths/52391Returntypeoffinsetsup.html
---
The archive URL format has changed. Please find this page at:
https://leanprover-community.github.io/archive/stream/116395-maths/topic/Return.20type.20of.20.60finset.2Esup.60.html


Rexster allows manipulation of property values on Vertex
and Edge
objects (i.e. Element
objects). By default, these values are assumed to be string data types, but the Rexster API allows the the following data types to be set and allows for a calling client to get any results with their associated data types for proper deserialization.
Rexster supports the following data types:
Serialization of graph elements to JSON is handled by the Blueprints GraphSONUtility.
Getting results with data types attached is accomplished by adding the application/vnd.rexster-typed+json
mime type to the accept
header on the request.
curl -v -H "Accept:application/vnd.rexster.typed+json" http://localhost:8182/graphs/gratefulgraph/vertices/337
{
"version": "*.*",
"results": {
"_type": "vertex",
"_id": {
"type": "string",
"value": "337"
},
"keystring": {
"type": "string",
"value": "123"
},
"keymap": {
"type": "map",
"value": {
"propertyb": {
"type": "integer",
"value": 321
},
"propertya": {
"type": "integer",
"value": 123
}
}
},
"name": {
"type": "string",
"value": "CHINESE BONES"
},
"song_type": {
"type": "string",
"value": "cover"
},
"performances": {
"type": "integer",
"value": 1
},
"keylist": {
"type": "list",
"value": [
{
"type": "integer",
"value": 100
},
{
"type": "integer",
"value": 200
},
{
"type": "string",
"value": "(i,300"
}
]
},
"type": {
"type": "string",
"value": "song"
},
"keytyped": {
"type": "integer",
"value": 123
}
},
"queryTime": 1.092324
}
By default, properties set on the URI are stored as strings. Even values that could be coerced to a different data type will be stored as a string.
http://localhost:8182/graphs/gratefulgraph/vertices/337?keyinteger=123&keystring=xyz
Both properties, keyinteger
and keystring
will be stored as strings even though keyinteger
could be coerced to an integer value. To get Rexster to store the value using a specific data type that data type must be specified as the value in the key-value pair using the following format: (type,value)
.
http://localhost:8182/graphs/gratefulgraph/vertices/337?keyinteger=(integer,123)&keystring=xyz
All values set without a data type will be defaulted to strings. If a data type is set and it does not match one of the allowable types, Rexster will assume a string value. If a data type is set and the value itself cannot be coerced to that type, Rexster will assume a string.
An integer may be specified using integer
or i
as the data type.
http://localhost:8182/graphs/gratefulgraph/vertices/337?x=(integer,123)&y=(i,123)
A long may be specified using long
or l
as the data type.
http://localhost:8182/graphs/gratefulgraph/vertices/337?x=(long,123)&y=(l,123)
A float may be specified using float
or f
as the data type.
http://localhost:8182/graphs/gratefulgraph/vertices/337?x=(float,123)&y=(f,123)
A double may be specified using double
or d
as the data type.
http://localhost:8182/graphs/gratefulgraph/vertices/337?x=(double,123)&y=(d,123)
A list will store an array of objects. The objects may be all of the same data type or a mixture of different data types. Lists are defined on the URI using the list
keyword and is followed by a parentheses enclosed, comma separated list of values. The values are defined in the same way that primitives are defined using the (type,value)
.
http://localhost:8182/graphs/gratefulgraph/vertices/337?keylist=(list,((i,100),(i,200),(i,300)))
http://localhost:8182/graphs/gratefulgraph/vertices/337?keylist=(list,((i,100),200,(d,300.5)))
A map allows the storing of a key-value pair set within a property. Maps are defined on the URI using the map
keyword and is followed by a key-value pair. The key is the name of the property on the map and the value is a (type,value)
setting.
http://localhost:8182/graphs/gratefulgraph/vertices/337?keymap=(map,(propertya=(i,123),propertyb=(d,321.5)))
Maps and lists can embed other maps and lists within them to virtually any depth required.
http://localhost:818/graphs2/gratefulgraph/vertices/337?keylist=(list,((i,100),(i,200),(i,300),(list,(x,y,z)))
http://localhost:8182/graphs/gratefulgraph/vertices/337?keymap=(map,(propertya=(i,123),propertyb=(d,321.5),propertyc=(list,(x,y,z)),propertyd=(map,(x=xyz))))


Wraps a python function into a TensorFlow op that executes it eagerly.
tf.compat.v1.py_function
tf.compat.v2.py_function
tf.py_function( func, inp, Tout, name=None )
This function allows expressing computations in a TensorFlow graph as
Python functions. In particular, it wraps a Python function func
in a once-differentiable TensorFlow operation that executes it with eager
execution enabled. As a consequence, tf.py_function
makes it
possible to express control flow using Python constructs (if
, while
,
for
, etc.), instead of TensorFlow control flow constructs (tf.cond
,
tf.while_loop
). For example, you might use tf.py_function
to
implement the log huber function:
def log_huber(x, m): if tf.abs(x) <= m: return x**2 else: return m**2 * (1 - 2 * tf.math.log(m) + tf.math.log(x**2)) x = tf.compat.v1.placeholder(tf.float32) m = tf.compat.v1.placeholder(tf.float32) y = tf.py_function(func=log_huber, inp=[x, m], Tout=tf.float32) dy_dx = tf.gradients(y, x)[0] with tf.compat.v1.Session() as sess: # The session executes `log_huber` eagerly. Given the feed values below, # it will take the first branch, so `y` evaluates to 1.0 and # `dy_dx` evaluates to 2.0. y, dy_dx = sess.run([y, dy_dx], feed_dict={x: 1.0, m: 2.0})
You can also use tf.py_function
to debug your models at runtime
using Python tools, i.e., you can isolate portions of your code that
you want to debug, wrap them in Python functions and insert pdb
tracepoints
or print statements as desired, and wrap those functions in
tf.py_function
.
For more information on eager execution, see the Eager guide.
tf.py_function
is similar in spirit to tf.compat.v1.py_func
, but unlike
the latter, the former lets you use TensorFlow operations in the wrapped
Python function. In particular, while tf.compat.v1.py_func
only runs on CPUs
and
wraps functions that take NumPy arrays as inputs and return NumPy arrays as
outputs, tf.py_function
can be placed on GPUs and wraps functions
that take Tensors as inputs, execute TensorFlow operations in their bodies,
and return Tensors as outputs.
Like tf.compat.v1.py_func
, tf.py_function
has the following limitations
with respect to serialization and distribution:
The body of the function (i.e. func
) will not be serialized in a
GraphDef
. Therefore, you should not use this function if you need to
serialize your model and restore it in a different environment.
The operation must run in the same address space as the Python program
that calls tf.py_function()
. If you are using distributed
TensorFlow, you must run a tf.distribute.Server
in the same process as the
program that calls tf.py_function()
and you must pin the created
operation to a device in that server (e.g. using with tf.device():
).
func
: A Python function which accepts a list of Tensor
objects having
element types that match the corresponding tf.Tensor
objects in inp
and returns a list of Tensor
objects (or a single Tensor
, or None
)
having element types that match the corresponding values in Tout
.inp
: A list of Tensor
objects.Tout
: A list or tuple of tensorflow data types or a single tensorflow data
type if there is only one, indicating what func
returns; an empty list
if no value is returned (i.e., if the return value is None
).name
: A name for the operation (optional).A list of Tensor
or a single Tensor
which func
computes; an empty list
if func
returns None.


Documentation for creating Apple Help Book support can be found here. Basically, one needs to specify both the Help Book directory (folder) name and the Help Book name (AppleTitle meta tag). The application must also have a unique Bundle ID so that the Help Viewer can reference the application. The Help Book consists of pure HTML files, images, and optional CSS styling. It is easy to create and develop a Help Book outside of the application. The "Hello, World" Help Book HTML can be used as a starter or checkout any application's exiting Help Book folder now that you know where to find it.
The Help Book viewer does not automatcially open the file named index.html as does a web server. The root file must contain a META tag specifing the name AppleTitle. The content of this tag must match the value specified in the helpbookname attributer of the jarbundler task. This META tag is used to both designate the root HTML file and its content is used by the Help Viewer in its "Library" listing.
<html> <head> . . <meta name="AppleTitle" content="Hello World Help"/> . . </head>
Finally, the developer needs to create a JNI library in order to communicate between the "Help" menu item and the "Help Book Viewer" or whichever application is being used to render Help Book help. This is a very simple file and usage is demonstrated in the "Hello, World" example. Windows and Linux users will not be able to generate the JNI library on their platforms. In order to generate a univeral binary JNI you can use Xcode and the tutorial found here. This process can only be done under macOS with the "Apple Developer Tools" installed. Windows and Linux developer will have to obtain the JNI library from a macOS system.
The example/build.xml file shows how to create a JNI library from source with ANT using command lines.
The application created in this example will have a single Help Book located at Contents/Resources/HelpBook. The next example shows how to support multiple Help Books for different languages.
<jarbundler dir="${basedir}" . . . helpbookfolder="HelpBook" helpbookname="Hello World Help" > <!-- Copy the HelpBook JNI library --> <javafilelist dir="${basedir}/build" files="libHelpBookJNI.jnilib"/> <!-- Specify the HelpBook contents --> <helpbook> <fileset dir="${basedir}/HelpBook"/> <helpbook/> </jarbundler>
The following example shows the use of Help Books to support English, German and Swedish. The default Help Book folder name and Help Book name are set in the JarBundler tag. The English Help Book uses these defaults.
The German Help Book specifes both the Help Book folder name and Help Book name, effectivly overriding the JarBundler defaults.
The Swedish Help Book uses the default Help Book foldername but specifies it's own Help Book name. The Swedish locale is specfied using it's ISO country code, sv. The ISO codes of en and de could have been used in place of English and German.
The directory HelpBook/commom could contain images and CSS stylesheets common to all Help Books. During help book development use a symbolic link to move the common directory into the HTML tree.
<jarbundler dir="${basedir}" . . . helpbookfolder="HelpBook" helpbookname="Hello World Help" > . . . <helpbook locale="English"> <fileset dir="HelpBook/English" /> <fileset dir="HelpBook/common" /> </helpbook> <helpbook foldername="Hilfebuch" name="Hallo Welt Hilfe" locale="German"> <fileset dir="HelpBook/German" /> <fileset dir="HelpBook/common" /> </helpbook> <helpbook name="Hjälp" locale="sv"> <fileset dir="HelpBook/Swedish" /> <fileset dir="HelpBook/common" /> </helpbook> </jarbundler>
During development the Help Viewer sometimes refuses to update the contents of a Help Book which changed. The Apple Developer Docs suggest to delete or edit the file ~/Library/Preferences/com.apple.help.plist. This file contains the list of known Help Books. If you double-click on this file the XML Property Editor applicaiton will be launched and re can 'delete' your bundle ID entry and "save" this file. Deleting this file does no harm but is a less elegant way to deal with the problem.
This document also suggests deleting the folder ~/Library/Caches/com.apple.helpui to help with refresh problem during development.


{% extends 'base.html' %} {% block content %}
Activity:
Gender: Unknown {% for _, option in form.gender.choices %} {{ option }} {% endfor %}
Name and Birthday: Birth Date Accuracy: {% for _, option in form.birth_date_accuracy.choices %} {{ option }} {% endfor %}
Nationality: Unknown {% for _, option in form.nationality.choices %} {{ option }} {% endfor %}
Guardian:
Godparent status: - Select godparent status - {% for _, option in form.godparent_status.choices %} {{ option }} {% endfor %} Godparent can be added once the child profile is created.
Number of siblings: - Select number of siblings - {% for num in range(1, form.max_number_of_siblings + 1) %} {{ num }} {% endfor %}
Siblings in project:
School class: - Select school class - {% for _, option in form.school_class.choices %} {{ option }} {% endfor %}
School attendance: - Select attendance rate - {% for _, option in form.school_attendance.choices %} {{ option }} {% endfor %}
Project: {% for proj in projects %} {{ proj }} {% endfor %}


--- layout: page title: How to Purchase Steven Black's INTL Toolkit permalink: /intlpurchase/ ---
Two ways:
Send me an email, or
call Steven Black Consulting
Tel: 1-613-542-3293
We'll have a chat and discuss whether INTL is right for you.
Take Note! INTL is written 100% in VFP and comes with complete source.
Therefore there is no demo, no trial version.
I offer an unconditional 30-day money back guarantee. If INTL is not fantastic for you, then you get a refund. It's that simple.
INTL for VFP: US$749.00