Copyright © 2009 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark and document use rules apply.
The SVG Parameters specification is an SVG 2.0 Module to provide a declarative way to incorporate parameter values into SVG content. Often, users may wish to create a single resource, and reuse it several times with specified variations, and this specification provides a means to do so without the use of script.
Although originally designed for use in SVG, some aspects of this specification are defined in XML and are accessed via presentation properties, and therefore could be used in other environments, such as HTML styled with CSS and XSL:FO.
This document introduces the features used by SVG Parameters, for the use of the average developer or author.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.
This document is an updated working draft of this specification. There is an accompanying SVG Parameters 1.0, Part 2: Language specification that defines the features of SVG Parameters described in this specification.
We explicitly invite comments on this specification. Please send them to<EMAIL_ADDRESS>(archives), the public email list for issues related to vector graphics on the Web. Acceptance of the archiving policy is requested automatically upon first post to either list. To subscribe to this list, please send an email to<EMAIL_ADDRESS>with the word subscribe in the subject line.
This document has been produced by the W3C SVG Working Group as part of the Graphics Activity within the Interaction Domain.
This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.
The latest information regarding patent disclosures related to this document is available on the Web. As of this publication, the SVG Working Group are not aware of any royalty-bearing patents they believe to be essential to SVG.
Publication as a Working Draft does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
This is a primer for the SVG Parameters specification. It gives guidelines on how to use the SVG Parameters specification with SVG 1.2. In many cases the reader will have to be familiar with the SVG language.
The main purpose of this document is to encourage public feedback. The best way to give feedback is by sending an email to<EMAIL_ADDRESS>Please include in the subject line of your message the string "[Params Primer]", and a short keyword that identifies the area of the specification the comment is referring to (e.g "[Params Primer] Section X.Y - Foo attribute values"). If you have comments on multiple areas of this document, then it is probably best to split those comments into multiple messages.
The public are welcome to comment on any aspect in this document, but there are a few areas in which the SVG Working Group are explicitly requesting feedback. These areas are noted in place within this document.
This document is informative.
This specification describes some of the common uses cases for declarative parameters in SVG, and how to use them features defined in the SVG Parameters 1.0, Part 2: Language specification.
It is possible to provide parameters to standalone files or files referenced through another document. Often, it is useful to allow parameter values to be used directly in the content of the SVG file, without the need for script. These parameters may be provided to the document context through a variety of means, including, but not limited to, URL query strings or the <param> element in the HTML <object> element.
Access to these parameters is currently possible by the use of script, but this does not work in scenarios where script is undesirable or unavailable.
Using the <object> element, you can pass parameters by the use of child <param> elements. Each <param> element should have name/value pairs with the 'name' and 'value' attributes; these will be exposed to the embedded SVG document.
HTML:
<object type="image/svg+xml" data="button.svg">
<param name="param1" value="value1" />
<param name="param2" value="value2" />
</object>
With the <object>, <iframe>, <embed>, and <img> elements, you can pass parameters via the URL. The URL query syntax allows you to pass sets of name/value pairs separated by an ampersand (&); as with object params, these will be exposed to the embedded SVG document.
HTML:
<object type="image/svg+xml" data="button.svg?param1=value1¶m2=value2">
</object>
The SVG Parameters 1.0, Part 2: Language specification adds a new functional attribute value, the ‘param()’ function. This attribute takes a string as as a value, which matches the name part of a parameter name-value pair that's been passed into the document.
To provide a default value for the attribute for the case where no parameters are passed into the document, the author can simply give an attribute value after the ‘param()’ function, like this:
attributename="param(parameter-name) default-value"
fill="param(color) red"
The specification also introduces the <param> element into SVG. As with HTML, this element has two attributes, ‘name’ and ‘value’, and it passes these parameters to referenced content (such as from a <use> or <image> element), like so:
<param name="parameter-name" value="parameter-value" />
<param name="color" value="blue" />
The usage of the ‘param()’ function is outlined in this section.
The various values in the code examples are color-coded as follows:
HTML:
<object type="image/svg+xml" data="button.svg">
<param name="color" value="red" />
<param name="label" value="stop" />
</object>
SVG:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
viewBox="0 0 110 40" width="100%" height="100%">
<title>Reusable Button</title>
<desc>Takes parameters from parent document's embedding element.</desc>
<g>
<rect id="button_rect" x="5" y="5" width="100" height="30" rx="15" ry="15"
fill="param(color) blue" stroke="param(outline) navy" />
<text id="button_label" x="55" y="30" text-anchor="middle"
font-size="25" fill="black" font-family="Verdana"
content-value="param(label)">
button
</text>
</g>
</svg>
The following examples demonstrate how this work in practice, by use of a prototyping script, param.js. Obviously, this wouldn't be needed in a working native implementation.
Note that these examples are emulated by a Javascript prototype. It should work in Opera, Firefox, and Safari, and maybe others (Chrome? Plugins?). The script may be used as is, and is released under a CC license, but it is not intended as production code. Content authors are encouraged to experiment with this code, and to comment to the SVG WG at<EMAIL_ADDRESS>with suggestions and critiques of the specification based on experience.
<object type="image/svg+xml" data="button.svg">
</object>
<object type="image/svg+xml" data="button.svg">
<param name="color" value="red" />
<param name="label" value="stop" />
</object>
<object type="image/svg+xml" data="button.svg?color=cornflowerblue&label=fnord">
</object>
<object type="image/svg+xml" data="button.svg?color=cornflowerblue&label=fnord">
<param name="color" value="purple" />
<param name="label" value="override" />
</object>
<object type="image/svg+xml" data="map.svg">
<param name="x" value="255" />
<param name="y" value="172" />
</object>
<object type="image/svg+xml" data="map.svg?y=167&x=655">
</object>
<circle id="coord" cx="param(x)" cy="param(y)" r="5" fill="tan" stroke="brown" stroke-width="3" />
<object type="image/svg+xml" data="ad.svg">
<param name="buylink" value="http://example.com/shop" />
</object>
<object type="image/svg+xml" data="ad.svg?buylink=http%3A%2F%2Fexample.com%2Fbargains">
</object>
<a xlink:href="param(buylink)" target="_new">...</>
This example shows the use of the ‘param’ element with the ‘use’ element, to pass on multiple values to a referenced graphic, to customize several aspects of it at once. If no parameters are passed along, the flower will simply be colored with shades of white, black, and gray; with parameters, different parts of the flower can be given different colors for stroke and fill.
<defs>
<g id="flower">
<radialGradient id="petals" cx="220" cy="250" gradientUnits="userSpaceOnUse">
<stop offset="0%" stop-color="param(petal1) white" />
<stop offset="50%" stop-color="param(petal2) gray" />
</radialGradient>
<path fill="param(base) black" d="..."/>
<path fill="param(heart) darkgray" stroke="param(petal2)" stroke-width="2" d="..."/>
<path fill="url(#petals)" d="..."/>
<path fill="url(#petals)" d="..."/>
<path fill="url(#petals)" d="..."/>
<path fill="url(#petals)" d="..."/>
<path fill="url(#petals)" d="..."/>
</g>
</defs>
<use id="use_0" xlink:href="#flower"/>
<use id="use_1" xlink:href="#flower" x="330" y="170" transform="scale(1.3)" >
<param name="base" value="brown" />
<param name="petal1" value="navy" />
<param name="petal2" value="ghostwhite" />
<param name="heart" value="pink" />
</use>
<use id="use_2" xlink:href="#flower" x="300" y="0">
<param name="base" value="cornflowerblue" />
<param name="petal1" value="white" />
<param name="petal2" value="blue" />
<param name="heart" value="darkslateblue" />
</use>
<use id="use_3" xlink:href="#flower" x="490" y="100">
<param name="base" value="gold" />
<param name="petal1" value="yellow" />
<param name="petal2" value="red" />
<param name="heart" value="darkorange" />
</use>
<use id="use_4" xlink:href="#flower" x="530" y="10" transform="scale(0.6)" >
<param name="base" value="pink" />
<param name="petal1" value="magenta" />
<param name="petal2" value="purple" />
<param name="heart" value="lightpink" />
</use>
This example demonstrates the use of the ‘param’ attribute value with a complex reusable component, in this case a bar chart. The component author has created a chart with a set number of bars, one for each month, and set the labels and the bar height to the value of the parameter for each month. The content author using the component passes in the value for each month as a parameter, and the chart is presented accordingly. There are limitations to this approach, e.g. you cannot add new bars, and the range of values is limited, but for certain kinds of complex components, the ‘param’ attribute value can be very useful.
<object type="image/svg+xml" data="year-chart.svg" style="width:660px; height:320px; display:inline;">
<param name="jan" value="10"/>
<param name="feb" value="30"/>
<param name="mar" value="30"/>
<param name="apr" value="100"/>
<param name="may" value="80"/>
<param name="jun" value="20"/>
<param name="jul" value="55"/>
<param name="aug" value="71"/>
<param name="sep" value="6"/>
<param name="oct" value="89"/>
<param name="nov" value="45"/>
<param name="dec" value="8"/>
</object>


For each set of query predicates forming the basis for an HBase scan, a set of context rich, data "flavor" specific structures are constructed to abstract the complexities involved in assembling the various segments and fields of composite (scan start/stop) row keys under various relational and logical operator and various configurable composite key-field hashing, formatting, padding and other features. If an HBase partial row-key scan is possible based on the literal set, a {@link PartialRowKeyScanAssembler} is invoked using the current scan context resulting in a pair of composite start/stop row keys. These are then used in the HBase client scan API start and stop row.


The following predefined operations are supplied for MPI_REDUCE and related functions MPI_ALLREDUCE, MPI_REDUCE_SCATTER, and MPI_SCAN. These operations are invoked by placing the following in op.
[ Name] Meaning
[ ]
[ MPI_MAX] maximum
[ MPI_MIN] minimum
[ MPI_SUM] sum
[ MPI_PROD] product
[ MPI_LAND] logical and
[ MPI_BAND] bit-wise and
[ MPI_LOR] logical or
[ MPI_BOR] bit-wise or
[ MPI_LXOR] logical xor
[ MPI_BXOR] bit-wise xor
[ MPI_MAXLOC] max value and location
[ MPI_MINLOC] min value and location
The two operations MPI_MINLOC and MPI_MAXLOC are discussed separately in Sec. MINLOC and MAXLOC . For the other predefined operations, we enumerate below the allowed combinations of op and datatype arguments. First, define groups of MPI basic datatypes in the following way.
[ C integer:] MPI_INT, MPI_LONG, MPI_SHORT,
MPI_UNSIGNED_SHORT, MPI_UNSIGNED,
MPI_UNSIGNED_LONG
[ Fortran integer:] MPI_INTEGER
[ Floating point:] MPI_FLOAT, MPI_DOUBLE, MPI_REAL,
MPI_DOUBLE_PRECISION, MPI_LONG_DOUBLE
[ Logical:] MPI_LOGICAL
[ Complex:] MPI_COMPLEX
[ Byte:] MPI_BYTE
Now, the valid datatypes for each option is specified below.
[ Op] Allowed Types
[ ]
[ MPI_MAX, MPI_MIN] C integer, Fortran integer, Floating point
[ MPI_SUM, MPI_PROD] C integer, Fortran integer, Floating point, Complex
[ MPI_LAND, MPI_LOR, MPI_LXOR] C integer, Logical
[ MPI_BAND, MPI_BOR, MPI_BXOR] C integer, Fortran integer, Byte
Example
A routine that computes the dot product of two vectors that are distributed across a group of processes and returns the answer at node zero.
SUBROUTINE PAR_BLAS1(m, a, b, c, comm) REAL a(m), b(m) ! local slice of array REAL c ! result (at node zero) REAL sum INTEGER m, comm, i, ierr! local sum sum = 0.0 DO i = 1, m sum = sum + a(i)*b(i) END DO
! global sum CALL MPI_REDUCE(sum, c, 1, MPI_REAL, MPI_SUM, 0, comm, ierr) RETURN
Example
A routine that computes the product of a vector and an array that are distributed across a group of processes and returns the answer at node zero.
SUBROUTINE PAR_BLAS2(m, n, a, b, c, comm) REAL a(m), b(m,n) ! local slice of array REAL c(n) ! result REAL sum(n) INTEGER n, comm, i, j, ierr! local sum DO j= 1, n sum(j) = 0.0 DO i = 1, m sum(j) = sum(j) + a(i)*b(i,j) END DO END DO
! global sum CALL MPI_REDUCE(sum, c, n, MPI_REAL, MPI_SUM, 0, comm, ierr)
! return result at node zero (and garbage at the other nodes) RETURN


Quick Docker Getting Started
Docker’s cool. I mentioned this before, but hadn’t really made a great example for you to use for your own nefarious purposes… until now.
I’ve created a base github repository where you can fork it, create your own docker container, and you and your users cal pull it to wreak consistently architected havoc all over your curriculum, tutorial or workshop.
How does this work?
Well, first, here’s the base github repository. Since I love repeating myself so much I actually put all the instructions there too, so you can bail on this post and go over there and find your way to the shining diamond at the end of the puzzle… or follow along over here. Makes no never mind to me, I just want you to have a container you own yourself so you can play with it willy nilly.
The first thing you’ll need to do is fork the repository. This means you need a github login, but you should have one of those anyhow. It’s a great way to build up your developer portfolio. You can make things secret and private or leave them out there for all the world to see. A note here – my code is frequently rushed and at the level of prototype/proof of concept, and rarely has anyone ever judged me (out loud) for having crappy code. Shout it to the world. Someone will learn from your code and the world will be a happier place.
Ok, now where were we before I went on my github digression? Oh, right. Fork my repository. Then you’ll have
But we’re going to do this an easier way, a way you can share your repository contents with anyone and make sure they have the base items they need available to them right up front.
So now, browse over to http://hub.docker.com. Login with github (hey, aren’t you glad you have that login now?) Click the “New Repository” button and select “Automated Build” – choose GitHub, and the repository you want to use. The Automated Build setup means that every time you commit a change to your git repository a new build will be kicked off and any future pulls of docker will magically do the right thing.
At this point the docker hub will start building your container. I’m not gonna lie – sometimes this takes just a few minutes and sometimes you age a bit before it’s done. Usually it’s somewhere in between, but you can expect that when you need it most it’ll take several hours. Just be patient. In the meantime you can get the right setup ready for docker on your system.
Go to the Docker Installation page and find the right installation path for your system. The rest of this tutorial assumes that you’re going to be using Windows or Mac, because the linux stuff is easier and I trust if you’re a linux user you’re just a little bit more tolerant to fiddly bits.
Install boot2docker from boot2docker.io. Follow the installation prompts, then do:
MacBook-Pro:~ synedra$ boot2docker init Virtual machine boot2docker-vm already exists MacBook-Pro:~ synedra$ boot2docker start Waiting for VM and Docker daemon to start .....................oooo Started. Writing /Users/synedra/.boot2docker/certs/boot2docker-vm/ca.pem Writing /Users/synedra/.boot2docker/certs/boot2docker-vm/cert.pem Writing /Users/synedra/.boot2docker/certs/boot2docker-vm/key.pem To connect the Docker client to the Docker daemon, please set: export DOCKER_HOST=tcp://<IP_ADDRESS>:2376 export DOCKER_CERT_PATH=/Users/synedra/.boot2docker/certs/boot2docker-vm export DOCKER_TLS_VERIFY=1
At this point you probably think you’re done. You’re not. Copy and paste those three export lines to set the right stuff in your environment. Why they don’t just do this for you, I do not know, but you have to set them so please do.
We’re almost there. Check docker hub to see if your container has progressed to “Finished”, in which case you can pull it. Pulling it to run it is very simple – we’re going to build this ubuntu system and run a node server on it. There are ways to simply have the docker container run and do its thing without interacting with it, but this is a learning environment so we want people to be able to see, touch, fiddle with and break the code in question.
 All you need to do at the prompt is type “node toppings.js” to start the server. You do have a slight challenge here in that you aren’t sure what the IP address is for your container – it maintains a separate IP within your system. In a separate window type boot2docker ip and it’ll give you that number. Node is running the server at port 3000 (if you look into toppings.js you can see this at the bottom) so simply point your browser to <ip_address_for_docker>:3000 and you’ll get the toppings application.
To understand the power of this, make some changes to your github repository and watch them bubble through to the docker container. Anytime anyone pulls the container they’ll get the most recent version of the github repository.
I’ll be giving a live workshop on this at OSBridge in Portland in a couple of weeks (Wednesday, June 24th) where we’ll go through this together, along with some extra fun times working with each others’ containers. Don’t miss it!
GEEK STUFF · WEB APIS


Rangy demos
Core
Selection save/restore module
Selection serializer module
CSS class applier module
Position module (work in progress)
Commands module (work in progress)
Highlighter module (work in progress)
Commands module development version (probably broken)


Welcome to my landing page! If you are feeling supportive, buy my starter pack by entering your info and clicking the submit button below.
{{ form.name.label }} {{ form.name(size=32) }}
{{ form.email.label }} {{ form.email(size=32) }}
{{ form.submit() }}


Oops!
User Email ID not found
Kindly check if you have entered the right email credentials. Register first if you haven't already.
Retry
Register


Hi Guys! I'm Nico. 🥴
Technical Skills 💻
HOW DO I SEE MYSELF WORK AS A TEAM? 🗣
WHAT IS UNIQUE ABOUT ME? 😜
Thank you Guys! 🥴


This is a recommended path for learning Haskell based on experience helping others.
Our IRC channel is #haskell-beginners
on Freenode.
IRC web client here.
The haskell mailing lists.
See the community guidelines to understand the conduct that is expected in the IRC channel. You'll get a warning if you're not obviously trolling, but be aware the channel is exclusively for those learning or teaching Haskell.

If you don't know anything about Stack and would like an overview, check out this comprehensive Stack video tutorial.
Instead of following the instructions on Haskell.org, get Stack.
https://mail.haskell.org/pipermail/haskell-community/2015-September/000014.html
The core recommendation is to read the lectures and complete all exercises/homework for the Spring 13 version of cis194 followed by the NICTA course. Both are linked below. Everything else can be considered optional and is mentioned so you know where to look.
Do this first, this is the primary way we recommend being introduced to Haskell.
Available online.
Brent Yorgey's course is the best I've found so far. This course is valuable as it will not only equip you to write basic Haskell but also help you to understand parser combinators.
The only reason you shouldn't start with cis194 is if you are not a programmer or are an inexperienced one. If that's the case, start with Thompson's book and transition to cis194.
This is the course we recommend doing after Yorgey's cis194 course
Available on github here.
This will reinforce and give you experience directly implementing the abstractions introduced in cis194, this is practice which is critical to becoming comfortable with everyday uses of Functor/Applicative/Monad/etc. in Haskell. Doing cis194 and then the NICTA course represents the core recommendation of my guide and is how we teach everyone Haskell.
Provides more material on intermediate topics
cs240h is available online.
This is Bryan O'Sullivan's online course from the class he teaches at Stanford. If you don't know who he is, take a gander at half the libraries any Haskell application ends up needing and his name is on it. Of particular note if you've already done the Yorgey course are the modules on phantom types, information flow control, language extensions, concurrency, pipes, and lenses.
These resources are not vetted or tested with learners as cis194 and NICTA course have been, but they're linked in the topic listing so you have ideas on where to begin. This includes things like intermediate/advanced concepts and subjects like tooling and text editors.
Hosted in this repository here.
These are actually pretty important and helpful. Look here for deep dives on a variety of topics.


This section is Your partner's income and regular money
{% if thirdparty %}Does {{firstname}} claim any benefits or tax credits?
{% else %}About your partner's income
{% endif %}In this section, we'll ask you about money your partner gets from:
- benefits
- State Pension
- private or workplace pensions


Provigil (modafinil) is not dopaminergic. It doesn't crank you up in a blunt way; it suppresses the decline of wakefulness. Or something. I test-drove Provigil for a while, and didn't find it inherently 'fun' in the way that dopaminergics like amphetamines, methylphenidate, or Wellbutrin are. I wasn't driven -- I didn't find myself alphabetizing my spice rack or scrubbing the bathroom floor with a Q-Tip -- I was just alert, with no unwelcome desire to go curl up and snooze unless I wanted to -- and I could if I wanted to. Provigil just turned off the sleep-urge.
 If you could crank up, go about your fidgety business, and then go beddy-bye, the harm would be limited to the body load of the drug itself and the loss of all your non-tweeker friends.
With speed, the reinforcing event is the horrible eternity when sleep's no option but the sparkle is gone -- that's what makes people blow another line at 4 AM.  All it does is make me alert, anytime I want. Like coffee without the corpse breath.
But for folks who are accustomed to feeling sleepy, for reasons endogenous or imposed, I could see the Provigil experience as being a real boost from baseline, and any boost from baseline can be compelling. I suspect that's what's behind the some of the reports of 'amphetamine-like' results in trials with experienced users of drugs of abuse: the subject set.  'A bit speedy, with notes of vigilance, anxiety, and a hint of impulsivity. Reminiscent of 10mg Dexedrine while smoking Moroccan red hash. Would go well with final exams or a road trip.'
But experience with seriously addictive drugs creates drug-seeking behavior that will drive users to latch onto other less-addictive substances more readily than folks who've never been addicted. It's hard to say whether a user of Provigil would be likely to treat it as a drug of abuse unless they have a back-monkey watching for stimulants with a wee hairy finger poised twitching over the DOSE button.
Incidentally, Cephalon was spanked by the FDA for making unapproved claims and releasing protocols for transitioning from Adderall to Provigil, even though Provigil's not actually approved for use in ADHD, and results are showing inconclusive effectiveness for improving attention in ADHD.
Through the common practice of off-label prescribing, a doctor can prescribe Provigil for any reason s/he sees fit without much fear of it coming back to haunt him/her. So, seeing as how another Sched IV drug, Xanax, is routinely prescribed to people afraid of flying or who have to attend a parent's funeral, it'll be interesting to see how this drug's being used two years from now.
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


Regular Expression¶
CookCC follows closely to the Flex patterns, so this page is contains a number of text copied/pasted from the referenced article. There are some minor differences though since CookCC allows both double quoted strings as well as single quoted strings (since version 0.3.1).
Some examples can be found in test cases for NFA and CCL.
| Format | Description |
|---|---|
x |
matches the character x |
. |
matches anything except \n character |
[xyz] |
a character class which includes x , y , and
z |
[abj-oZ] |
a “character class” with a range in it; matches an
a , a b , any letter from j through o ,
or a Z |
[^A-Z] |
a “negated character class”, i.e., any character but those in the class. In this case, any character EXCEPT an uppercase letter. |
[^A-Z\n] |
any character EXCEPT an uppercase letter or a newline |
r* |
zero or more r’s, where a is any regular expression |
r+ |
one or more r’s |
r? |
zero or one r’s (that is, “an optional r”) |
r{2,5} |
anywhere from two to five r’s |
r{2,} |
two or more r’s |
r{4} |
exactly 4 r ’s |
{name} |
Replace with the <shortcut> pattern of the same
name. |
"[xyz]" |
the literal string: [xyz] |
'[xyz]' |
the literal string: [xyz] , since version 0.3.1. |
\x |
Escape character, see the section below. |
\0 |
the character with 0 (ASCII code 0) |
(r) |
match an r |
rs |
the concatenation of the regular expression r
followed by the regular expression s |
r|s |
either an r or an s . |
r/s |
r followed by s , but only obtains the r
part. At present, CookCC can only handle cases where
either r or s is fixed in length. |
^r |
an r at beginning of line, or the start of scan.
It will increase the DFA size slightly and slightly
decrease the lexer performance. |
r$ |
an r at the end of the line (\n ), but not
including the \n character. Note that this
pattern does not work well on files in dos format
because it does not consider \r character. |
<<EOF>> |
an end of file character. This character is artificial and will not be actually seen in the input. If this character is the entire pattern, return value from yyText () is null. |
Escape Characters¶
| Code | Description |
|---|---|
\b |
backspace |
\e |
escape \033 |
\f |
form feed |
\n |
line feed |
\r |
carriage return |
\t |
tab |
\s |
space ' ' |
\\ |
back slash () |
\" |
double quote (“) |
\' |
single quote (‘) |
\123 |
the character with octal value 123 (maximum 3 digits) |
\x2a |
the character with hexadecimal value 2a (maximum 2 digits) |
\u002a |
the unicode character with hexadecimal value 2a (exactly 4 digits) |
Escape sequences with \
proceeding any character that is not listed
above would treat treat that character as the literal character, rather
than special characters.
POSIX Character Classes¶
| Class | Equivalent |
|---|---|
[:alnum:] |
[a-zA-Z0-9] |
[:alpha:] |
[a-zA-Z] |
[:blank:] |
[ \t] |
[:cntrl:] |
[\x00-\x1f\x7f] |
[:digit:] |
[0-9] |
[:graph:] |
[[:alnum:][:punct:]] |
[:lower:] |
[a-z] |
[:print:] |
[[:graph:] ] |
[:punct:] |
[!"#$%&'()*+,-./:;<=>?@[\\\]^_`{|}~] |
[:space:] |
[ \t\n\x0b\f\r] |
[:upper:] |
[A-Z] |
[:xdigit:] |
[a-fA-F0-9] |
[:word:] |
[a-zA-Z0-9_] . Technically, it is not part of POSIX.
Added in 0.4. |
For example, the following character classes are all equivalent:
[[:alnum:]] |
[[:alpha:][:digit:]] |
[[:alpha:]0-9] |
[a-zA-Z0-9] |
|---|---|---|---|
Character Class Manipulations¶
A character class can be manipulated in several ways:
| Operation | Description | Examples |
|---|---|---|
{+} |
Merging two character classes. | [A-Z]{+}[a-z] is the same as
[A-Za-z] |
{-} |
Remove all characters in the second character class from the first character class | [A-Za-z]{-}[a-z] is the same as
[A-Z] . [a-z]{-}[aeiou]
represents all lower case consonant
letters. |
^ |
Not operation | [[:^alpha:]] is the same as
[^[:alpha:]] and
[\0-\xff]{-}[a-zA-Z] .
[^ \t\r\n] represents all
non-space characters. |
Tips¶
- Unless one is generating a full DFA table, it is usually a good idea
not to generate new character classes. For example,
(a|b)
can be better written as[ab]
which would reduce the DFA table size forecs
andcompressed
format quite a bit. This approach is particularly necessary when there are lots of DFA states.- In 0.4, a special handling is added to handle
(a|b)
like expression so that it is treated as[ab]
.
- In 0.4, a special handling is added to handle
- Long strings of keyword matches such as
"while"
,"continue"
can increase the DFA table size quite a bit. Consider using hash tables or perfect hash instead if the tools are available in the target language. - On the other hand, specifying long patterns without causing backups can increase the lexer performances at the expense of more DFA states.


A quick brown fox jumps over the lazy dog.
A quick brown fox jumps over the lazy dog.
A quick brown fox jumps over the lazy dog.
A quick brown fox jumps over the lazy dog.
A quick brown fox jumps over the lazy dog.
Input "text"
Textarea
Content-editable
A quick brown fox jumps over the lazy dog.
A quick brown fox jumps over the lazy dog.
A quick brown fox jumps over the lazy dog.
A quick brown fox jumps over the lazy dog.
A quick brown fox jumps over the lazy dog.


D-Day minus 5 weeks
According to my employer I have too much leave. I’ve been directed to take four weeks off before the beginning of June, and as a result will be taking all of May off.
 Caddy has an exhibition opening in Melbourne in the last week of May, and I’ve been talking about doing a long distance bicycle ride a bit over the past nine months or so. So the obvious answer seems to be a bike ride from Canberra to Melbourne.
A bit of experimentation with Google Maps results in the following itinerary:
- Canberra - Gundagai - 154km
- Gundagai - Holbrook - 117km
- Holbrook - Wodonga - 70km
- Wodonga - Benalla - 110km
- Benalla - Seymour - 103km
- Seymour - Melbourne - 111km
- Total - 665km
Is this possible? My longest ride to date has been a little over 140km, but I figure if I maintain a relatively low speed of about 25km/h and be sure to stay aerobic the whole time I should be able to keep going indefinitely. And worst case I have very slow days with lots of breaks.
So what do I need to do before I embark on my first ever long distance ride?
- Make sure my legs can handle it. Use the ANZAC Day long weekend as a chance to do four consecutive 110km+ rides. If I can survive four days I’m sure I can survive six, particularly with a short 70km day in the middle.
- Figure out how to take things with me. Being a pretty fancy bike I don’t have any braze-ons to attach a rack, and the idea of attaching a trailer to a racing bike seems a bit … improper. So I need to figure out a way to jury-rig a rack and get panniers that are big enough to carry my floor pump and a lot of spare tubes.
- Figure out how to take enough calories with me. Over long rides I average about 29kCal/km. So this ride will be 3000+kCal per day, bringing my daily calorie needs to about 5000kCal. Which is an awful lot. I’ve never been terribly concerned about calorie intake on my longer rides to date, being satisfied with about 150kCal an hour, or a 2500kCal deficit at the end of a ride. This isn’t going to be sensible over six days of cycling, and nutrition will become a pretty major consideration. Roughly, this equates to 193 energy gels, or about 5.75L of the sticky stuff, if I want to stay calorie neutral. In addition to a regular diet.
D-Day minus 2.5 weeks
Post ANZAC Day long weekend. Successfully completed 445km over four days. Due to wind and rain on day two this included 110km on my indoor roller trainer, which resulted in day 3 beginning very hesitatingly on tired and sore hamstrings (you can’t stop pedalling on rollers). Felt tired but good at the end of day four, which bodes well for my ability to last an extra couple of days.
D-Day minus 1 week
The end of my first week of leave. Still not 100% certain I’m going to do this thing, but I’ve now bought a rack and a pair of panniers so I’m at least semi-committed. A couple of hours of Googling and I’ve identified accommodation at the towns I’d planned to stop at, but still not sufficiently convinced that this isn’t an absurd idea to actually book the accommodation.
Incidentally, this week was a build week - With no work I set a schedule of a full time triathlete, with somewhere between 25 and 30 hours of training. Focusing on the bike, of course. I could grow to love more weeks like this!
D-Day minus 3 days
Accommodation booked. 2.5 litres of energy gel made. Not much chance of turning back now. Weigh-in on the luggage is just under 15kg, reconsidering the contents to pack as little as possible and I’ve come up with:
- Tubes x6
- Tyre levers x2
- Rubber cement
- Patches x6
- Superglue
- Floor pump
- CO2 canister x3
- CO2 inflator
- Toolkit
- Spanner
- Light
- Bike lock
- Phone charger
- Printed directions for each leg
- Ziplock bags (directions, phone, wallet = 3 )
- Toothbrush
- Toothpaste
- Aussie Butt Cream
- Electrolytes
- Calcium, magnesium, iron, multivitamins
- Razor
- Sunscreen
- Cash (4x$20)
- Knicks x3
- Jerseys x3
- Socks x6
- Arm warmers
- Leg warmers
- Shoe covers
- Balaclava
- Thermal top x2
- Thermal pants
- Boxers x3
- Thick socks
- Shoes (squash and tie together old runners)
- T-shirt x3
- Pants x2
D-Day. Sunday, May 16
Time for my longest ride ever. At the beginning of my longest stretch of cycling ever. It still seems pretty silly, but getting Caddy to drive me to Yass to start the journey seems like a bit of a cop-out. 158km from Gungahlin to Gundagai. I dealt with it fairly capably, with a short break for real food (a sandwich) about 4 hours into the 6 hour ride. On arrival at Gundagai River Caravan Park I discovered that the clamps attaching my rack to the seat stay on my bike’s frame had slipped down the frame and were chipping away at the welds on the frame. After a short time panicking and considering calling Caddy for a rescue I confirmed that the weld was structurally sound, cut up a spare tube and wrapped the seat stay in rubber to protect it and prevent slippage. With repairs completed I showered (this was soon to become a highlight of my days), cleaned my tyres, stretched and ate a tremendous amount before wondering what I should do next. After spending a couple of hours reading H.P. Lovecraft’s ‘Call of Cthulu’ on my iPhone I walked into town to find more food. A cold night on an uncomfortable bed followed.
Monday, May 17
The plan for today is 116km from Gundagai to Holbrook. After about 75km I was seriously fatigued and had another food break. With Caddy at work calling her for a rescue was a pretty embarrassing option (You may have realised by now that my ANAC weekend test ride was done without luggage. Oops.), so after a good stretch I completed the last 40km to Holbrook. After checking into my motel, cleaning my tyres and, most importantly, showering I gave a generous donation to the Holbrook Bakery and spent some quality eating time walking around the museum and submarine. After getting some fruit (and, I admin, chips) from the supermarket I walked back to the motel and read while eating more. Shortly after this I walked back into town for a pub dinner. After about ten minutes discussing what ‘vegan’ meant I found myself with a massive bowl of veggies and another bowl full of hot chips.
Tuesday, May 18
Today, I cross the border! A short day (74km) today, and only 2.5 hours got me into Wodonga. After discovering there really isn’t much to do in Wodonga I spent a long afternoon sitting in the sun drinking tea and coffee and reading more Lovecraft. I’ve now passed the halfway point of my trip, which feels pretty good!
Wednesday, May 19
109km today takes me to Benalla. A mostly uneventful ride ended by being forced off the narrow highway running from the Hume Freeway into Benalla when two semis passed me travelling in opposite directions. The resulting couple of metres cycling on gravel made me regret having 23mm racing tyres as I fishtailed before getting the bike back under control. The all-important shower and tyre-cleaning is followed by a short cycle into town and the discovery of delicious date scones at a local bakery. Walking around the town I discover that Benalla is famous not only for being the town of Caddy’s birth but also for having something to do with Ned Kelly.
Thursday, May 20
The temptation to forego my vegan diet for the sake of delicious calories hit me when the owner of the Benalla caravan park told me they served complimentary pancakes for breakfast, but I managed to motivate myself to get on the road before they started cooking and avoid the allure of a hot breakfast. 105km into Seymour today, during which I realised that my impression of Canberra to Melbourne being more or less entirely downhill was perhaps a little incorrect. Eventually, after about four hours of continual rolling hills, I made it into Seymour. The once-more obligatory shower and tyre-cleaning was followed by an uneventful but enjoyable wander around the streets of Seymour. As the afternoon grew cold and it began drizzling I realised how lucky I’d been for the entire trip, with just about perfect weather every day. A slightly frustrating afternoon trying to find decent vegan food ended with some hot chips (perfect for the cold, rainy weather) and take away Chinese followed by an evening listening to a Cory Doctorow audiobook and figuring out how to install a C compiler on my iPhone (my mind was obviously starting to tire of not having any technical challenges).
Friday, May 21
Waking up today was a little depressing, realising that the relaxing (mentally) and adventurous (visiting new towns every day) days were coming to an end, with today taking me the final 100km into Melbourne. After yesterday’s endless rolling hills I was initially heartened to find that the road to Melbourne was mostly flat. Unfortunately it happened to be blowing an absolute gale on Friday morning. And not in a direction that would make me happy. After temptations to stop for a break at every service station along the way (which I avoided), and temptations to get on a train to Melbourne at the two or three train stations I passed (also avoided…just) I eventually arrived at a sign announcing “Welcome to Melbourne”!
Under this was a second sign, this one labelled “Melbourne 34km”.
I was not happy. Obviously getting tired. But before too long I was cycling with the traffic through the busy streets of Melbourne, and after a couple of stops to check my route sheet and figure out where I was going I’d reached my destination. Once there it struck me that, after a 665km ride, my “epic” 140ish km weekend rides seemed a bit pathetic, and I began wondering what I could do next - 840km to Coffs Harbour? 1500km to the Sunshine Coast? We’ll see…
###The stats
- Distance: 660.88km
- Time: 25-26 hours
- Calories while riding: 14 472kCal
- Energy gel: About 900mL, or 3000kCal
- Peanut butter/vegemite wholemeal sandwiches: 3 loaves
- Total weight: 9.9kg (bike) + 64kg (me) + ~15kg (luggage - varied with food and water) + 1.5kg (water bottles) = ~90.4kg
- Audiobooks consumed: 3 (About 28 hours)
- Podcasts consumed: >100
- Punctures: 0 (Made up for by four during my first week back at work)


These release notes cover new developer and user-facing incompatibilities, important issues, features, and major improvements.
hbase.hstore.time.to.purge.deletes has been changed; if it is not set, or set to 0, all delete markers including those with future timestamp are purged during the later major compaction. Otherwise, a delete marker is kept until the major compaction after marker's timestamp + this setting.
WARNING: No release note provided for this change.
Applied to all branches (0.94 doesn't have TestRowCounter so didn't get test change). Thanks for the patch Alexandre.
The REST gateway no longer disables block cache when issuing Scans to the cluster, and in this way, Scans now behave the same as Gets.
One can configure a set of ScanLabelGenerators to be used by the system. For this, a comma separated set of implementation class names to be configured for config "hbase.regionserver.scan.visibility.label.generator.class".
Creates a new hook in the RegionObserver Coprocessor, {code} RegionObserver postInstantiateDeleteTracker(final ObserverContext<RegionCoprocessorEnvironment> ctx, DeleteTracker delTracker) {code} Introduced in 0.98.2.
preBulkLoadHFile now requires CREATE, which it effectively already needed since getTableDescriptor also requires it which is what LoadIncrementalHFiles is doing before bulk loading. compact and flush can now be issued by users with CREATE permission.
Bulk loading with sequence IDs, an option in late 0.94 releases and the default since 0.96.0, will now trigger a flush per region that loads an HFile (if there's data that needs to flushed).
Prior to 0.98.0 if a user was not granted access to a column family or partial access (qualifier grants), then the AccessController would immediately throw back an AccessDeniedException. This behavior was changed in 0.98.0 to allow cell level ACLs to grant exceptional access. The user will no longer see an exception; instead the scanner will return result sets only including cells which grant exceptional access. If no such cell level grants are made, then the scanner will return the empty result set.
This change introduces a configuration setting which restores the pre-0.98.0 behavior. It can be set in the site file for global effect, or per table using HTableDescriptor#setConfiguration. This setting is AccessControlConstants.CF_ATTRIBUTE_EARLY_OUT ("hbase.security.access.early_out"), a boolean. Set to "true" for backwards compatible behavior. As a consequence if there are no grants at the CF level then an AccessDeniedException will be thrown immediately, and cell ACLs will be ignored, unless the cell-first ACL evaluation strategy is used (toggled via Query#setACLStrategy).
This change also repairs a defect related to audit logging. In all cases, compatible behavior or not, indications of successful or failed access attempts will be logged.


Viewing Real-World Faces in 3D
|
|
|
The Open University of Israel
|
Abstract: We present a data-driven
method for estimating the 3D shapes of faces viewed in single, unconstrained photos
(aka "in-the-wild"). Our method was designed with an emphasis on robustness and
efficiency - with the explicit goal of deployment in real-world applications which
reconstruct and display faces in 3D. Our key observation is that for many practical
applications, warping the shape of a reference face to match the appearance of a
query, is enough to produce realistic impressions of the query's 3D shape. Doing
so, however, requires matching visual features between the (possibly very different)
query and reference images, while ensuring that a plausible face shape is produced.
To this end, we describe an optimization process which seeks to maximize the similarity
of appearances and depths, jointly, to those of a reference model. We describe our
system for monocular face shape reconstruction and present both qualitative and
quantitative experiments, comparing our method against alternative systems, and
demonstrating its capabilities. Finally, as a testament to its suitability for real-world
applications, we offer an open, on-line implementation of our system, providing
unique means of instant 3D viewing of faces appearing in web photos.
Reference:
T. Hassner, Viewing Real-World Faces in 3D, International Conference on Computer Vision (ICCV),
Sydney, Austraila, Dec. 2013
Click here for the preprint PDF
Click
here for the BibTex
Updates:
-
3-May-2015: Please see followup project on
face frontalization for code and data.
-
28-Oct-2013: We've now made the code used for
face pose adjustments
available online!
This includes functions for rendering standard 3D, CG files directly from
MATLAB, along with depths and 3D coordinates.
A demo of an early (partial) version of our online system for 3D viewing of faces, presented before Nobel laureate and Israeli President, Mr. Shimon Peres and featured on Channel 10, Israeli TV (in Hebrew).
Last update
3rd of May, 2015
|


org.jclouds.aws.s3
Interface AWSS3Client
- All Superinterfaces:
- Closeable, org.jclouds.s3.S3Client
public interface AWSS3Client
- extends org.jclouds.s3.S3Client
Provides access to amazon-specific S3 features
- Author:
- Adrian Cole
- See Also:
AWSS3AsyncClient
|
Method Summary |
void |
abortMultipartUpload(String bucketName,
String key,
String uploadId)
This operation aborts a multipart upload. |
String |
completeMultipartUpload(String bucketName,
String key,
String uploadId,
Map<Integer,String> parts)
This operation completes a multipart upload by assembling previously uploaded parts. |
DeleteResult |
deleteObjects(String bucketName,
Iterable<String> keys)
The Multi-Object Delete operation enables you to delete multiple objects from a bucket using a
single HTTP request. |
String |
initiateMultipartUpload(String bucketName,
org.jclouds.s3.domain.ObjectMetadata objectMetadata,
org.jclouds.s3.options.PutObjectOptions... options)
This operation initiates a multipart upload and returns an upload ID. |
String |
uploadPart(String bucketName,
String key,
int partNumber,
String uploadId,
org.jclouds.io.Payload part)
This operation uploads a part in a multipart upload. |
| Methods inherited from interface org.jclouds.s3.S3Client |
bucketExists, copyObject, deleteBucketIfEmpty, deleteObject, disableBucketLogging, enableBucketLogging, getBucketACL, getBucketLocation, getBucketLogging, getBucketPayer, getObject, getObjectACL, headObject, listBucket, listOwnedBuckets, newS3Object, objectExists, putBucketACL, putBucketInRegion, putObject, putObjectACL, setBucketPayer |
initiateMultipartUpload
String initiateMultipartUpload(String bucketName,
org.jclouds.s3.domain.ObjectMetadata objectMetadata,
org.jclouds.s3.options.PutObjectOptions... options)
- This operation initiates a multipart upload and returns an upload ID. This upload ID is used
to associate all the parts in the specific multipart upload. You specify this upload ID in
each of your subsequent upload part requests (see Upload Part). You also include this upload
ID in the final request to either complete or abort the multipart upload request.
Note
If you create an object using the multipart upload APIs, currently you cannot
copy the object between regions.
- Parameters:
bucketName
- namespace of the object you are to uploadobjectMetadata
- metadata around the object you wish to uploadoptions
- controls optional parameters such as canned ACL
- Returns:
- ID for the initiated multipart upload.
abortMultipartUpload
void abortMultipartUpload(String bucketName,
String key,
String uploadId)
- This operation aborts a multipart upload. After a multipart upload is aborted, no additional
parts can be uploaded using that upload ID. The storage consumed by any previously uploaded
parts will be freed. However, if any part uploads are currently in progress, those part
uploads might or might not succeed. As a result, it might be necessary to abort a given
multipart upload multiple times in order to completely free all storage consumed by all parts.
- Parameters:
bucketName
- namespace of the object you are deletingkey
- unique key in the s3Bucket identifying the objectuploadId
- id of the multipart upload in progress.
uploadPart
String uploadPart(String bucketName,
String key,
int partNumber,
String uploadId,
org.jclouds.io.Payload part)
- This operation uploads a part in a multipart upload. You must initiate a multipart upload (see
Initiate Multipart Upload) before you can upload any part. In response to your initiate
request. Amazon S3 returns an upload ID, a unique identifier, that you must include in your
upload part request.
Part numbers can be any number from 1 to 10,000, inclusive. A part number uniquely identifies
a part and also defines its position within the object being created. If you upload a new part
using the same part number that was used with a previous part, the previously uploaded part is
overwritten. Each part must be at least 5 MB in size, except the last part. There is no size
limit on the last part of your multipart upload.
To ensure that data is not corrupted when traversing the network, specify the Content-MD5
header in the upload part request. Amazon S3 checks the part data against the provided MD5
value. If they do not match, Amazon S3 returns an error.
- Parameters:
bucketName
- namespace of the object you are storingkey
- unique key in the s3Bucket identifying the objectpartNumber
- which part is this.uploadId
- id of the multipart upload in progress.part
- contains the data to create or overwrite
- Returns:
- ETag of the content uploaded
- See Also:
completeMultipartUpload
String completeMultipartUpload(String bucketName,
String key,
String uploadId,
Map<Integer,String> parts)
- This operation completes a multipart upload by assembling previously uploaded parts.
You first initiate the multipart upload and then upload all parts using the Upload Parts
operation (see Upload Part).  Upon receiving this request, Amazon S3
concatenates all the parts in ascending order by part number to create a new object. In the
Complete Multipart Upload request, you must provide the parts list. For each part in the list,
you must provide the part number and the ETag header value, returned after that part was
uploaded.
Processing of a Complete Multipart Upload request could take several minutes to complete.
After Amazon S3 begins processing the request, it sends an HTTP response header that specifies
a 200 OK response. While processing is in progress, Amazon S3 periodically sends whitespace
characters to keep the connection from timing out. Because a request could fail after the
initial 200 OK response has been sent, it is important that you check the response body to
determine whether the request succeeded.
Note that if Complete Multipart Upload fails, applications should be prepared to retry the
failed requests.
- Parameters:
bucketName
- namespace of the object you are deletingkey
- unique key in the s3Bucket identifying the objectuploadId
- id of the multipart upload in progress.parts
- a map of part id to eTag from the uploadPart(java.lang.String, java.lang.String, int, java.lang.String, org.jclouds.io.Payload)
command.
- Returns:
- ETag of the content uploaded
deleteObjects
DeleteResult deleteObjects(String bucketName,
Iterable<String> keys)
- The Multi-Object Delete operation enables you to delete multiple objects from a bucket using a
single HTTP request. If you know the object keys that you want to delete, then this operation
provides a suitable alternative to sending individual delete requests (see DELETE Object),
reducing per-request overhead.
The Multi-Object Delete request contains a set of up to 1000 keys that you want to delete.
If a key does not exist is considered to be deleted.
The Multi-Object Delete operation supports two modes for the response; verbose and quiet.
By default, the operation uses verbose mode in which the response includes the result of
deletion of each key in your request.
- Parameters:
bucketName
- namespace of the objects you are deletingkeys
- set of unique keys identifying objects- See Also:
Copyright © 2009-2013 The Apache Software Foundation. All Rights Reserved.


App is usefull for students, bachelors or any people who are living in shared house, where every individual in a house has to maintain database of what all expenditures he/she has done on shared resources and settle the amount on equal basis at certain intervals of time(for eg, monthly, querterly, etc.,)


This class provides the methods to access the API that will allow you to create your own payment experience on your website. From basic to advanced configurations, you control the whole experience. Payment class
- Source:
Members
(static) oldSearch
Search payment: Use v0 -> /collections
- Source:
Methods
(static) cancel(id, config, callback) → {*}
Cancel payment
Parameters:
| Name | Type | Description |
|---|---|---|
id |
||
config |
||
callback |
- Source:
Returns:
- Type
- *
(static) capture(id, config, callback) → {*}
Capture payment
Parameters:
| Name | Type | Description |
|---|---|---|
id |
||
config |
||
callback |
- Source:
Returns:
- Type
- *
(static) capturePartial(captureData, config, callback) → {Thenable.<U>|*|Object|*}
Capture partial payment
Parameters:
| Name | Type | Description |
|---|---|---|
captureData |
||
config |
||
callback |
- Source:
Returns:
- Type
- Thenable.<U> | * | Object | *
(static) create()
Create a payment Click here for more infos
- Source:
(static) get()
Get a payment by ID Click here for more infos
- Source:
(static) refund(id, config, callback) → {*}
Refund payment
Parameters:
| Name | Type | Description |
|---|---|---|
id |
||
config |
||
callback |
- Source:
Returns:
- Type
- *
(static) refundPartial(refund, config, callback) → {Thenable.<U>|*|Object|*}
Refund partial payment
Parameters:
| Name | Type | Description |
|---|---|---|
refund |
||
config |
||
callback |
- Source:
Returns:
- Type
- Thenable.<U> | * | Object | *
(static) search()
Search payments Click here for more infos
- Source:
(static) update()
Update a payment Click here for more infos
- Source:


a
address
b
article
audio
b
bdi
blockquote
button
cancas
caption
cite
code
col
data
dd
del
details
dfn
dialog
hgroup
i
iframe
label
mark
menu
nav
Intestazione
Contenuto
Tell us your story:
It was a dark and stormy night...
label
Alien football stars
Player
Gloobles
Za'taak
TR-7
7
4,569
Khiresh Odo
7
7,223
Mia Oolong
9
6,219


--- layout: page title: Lean Prover Zulip Chat Archive permalink: archive/113488general/88037equivbetweensubsingletons.html ---
I want to prove an equiv between two subsingletons. Is there a little lemma in mathlib that says I don't have to check that the compositions are the identity?
subsingleton.elim?
That doesn't do exactly what I want, right? I could use it, but it would lead to an obfuscated proof of something that is math-trivial anyway.
{% endraw %}


OBFundsConfirmationConsent1_Data_DebtorAccount
- Identification : String
Identification assigned by an institution to identify an account. This identification is known by the account owner.
- Name : String
Name of the account, as assigned by the account servicing institution. Usage: The account name is the name or names of the account owner(s) represented at an account level. The account name is not the product name or the nickname of the account.
- SchemeName : String
Name of the identification scheme, in a coded form as published in an external list.
- SecondaryIdentification : String
This is secondary identification of the account, as assigned by the account servicing institution. This can be used by building societies to additionally identify accounts with a roll number (in addition to a sort code and account number combination).


TableGen Language Introduction¶
Warning
This document is extremely rough. If you find something lacking, please fix it, file a documentation bug, or ask about it on llvm-dev.
Introduction¶
This document is not meant to be a normative spec about the TableGen language in and of itself (i.e. how to understand a given construct in terms of how it affects the final set of records represented by the TableGen file). For the formal language specification, see TableGen Language Reference.
TableGen syntax¶
TableGen doesn’t care about the meaning of data (that is up to the backend to define), but it does care about syntax, and it enforces a simple type system. This section describes the syntax and the constructs allowed in a TableGen file.
TableGen primitives¶
TableGen comments¶
TableGen supports C++ style “//
” comments, which run to the end of the
line, and it also supports nestable “/* */
” comments.
The TableGen type system¶
TableGen files are strongly typed, in a simple (but complete) type-system. These types are used to perform automatic conversions, check for errors, and to help interface designers constrain the input that they allow. Every value definition is required to have an associated type.
TableGen supports a mixture of very low-level types (such as bit
) and very
high-level types (such as dag
). This flexibility is what allows it to
describe a wide range of information conveniently and compactly. The TableGen
types are:
bit
- A ‘bit’ is a boolean value that can hold either 0 or 1.
int
- The ‘int’ type represents a simple 32-bit integer value, such as 5.
string
- The ‘string’ type represents an ordered sequence of characters of arbitrary length.
code
- The code type represents a code fragment, which can be single/multi-line string literal.
bits<n>
- A ‘bits’ type is an arbitrary, but fixed, size integer that is broken up into individual bits. This type is useful because it can handle some bits being defined while others are undefined.
list<ty>
- This type represents a list whose elements are some other type. The contained type is arbitrary: it can even be another list type.
- Class type
- Specifying a class name in a type context means that the defined value must
be a subclass of the specified class. This is useful in conjunction with
the
list
type, for example, to constrain the elements of the list to a common base class (e.g., alist<Register>
can only contain definitions derived from the “Register
” class). dag
- This type represents a nestable directed graph of elements.
To date, these types have been sufficient for describing things that TableGen has been used for, but it is straight-forward to extend this list if needed.
TableGen values and expressions¶
TableGen allows for a pretty reasonable number of different expression forms when building up values. These forms allow the TableGen file to be written in a natural syntax and flavor for the application. The current expression forms supported include:
?
- uninitialized field
0b1001011
- binary integer value. Note that this is sized by the number of bits given and will not be silently extended/truncated.
7
- decimal integer value
0x7F
- hexadecimal integer value
"foo"
- a single-line string value, can be assigned to
string
orcode
variable. [{ ... }]
- usually called a “code fragment”, but is just a multiline string literal
[ X, Y, Z ]<type>
- list value. <type> is the type of the list element and is usually optional. In rare cases, TableGen is unable to deduce the element type in which case the user must specify it explicitly.
{ a, b, 0b10 }
- initializer for a “bits<4>” value. 1-bit from “a”, 1-bit from “b”, 2-bits from 0b10.
value
- value reference
value{17}
- access to one bit of a value
value{15-17}
- access to an ordered sequence of bits of a value, in particular
value{15-17}
produces an order that is the reverse ofvalue{17-15}
. DEF
- reference to a record definition
CLASS<val list>
- reference to a new anonymous definition of CLASS with the specified template arguments.
X.Y
- reference to the subfield of a value
list[4-7,17,2-3]
- A slice of the ‘list’ list, including elements 4,5,6,7,17,2, and 3 from it. Elements may be included multiple times.
foreach <var> = [ <list> ] in { <body> }
foreach <var> = [ <list> ] in <def>
- Replicate <body> or <def>, replacing instances of <var> with each value
in <list>. <var> is scoped at the level of the
foreach
loop and must not conflict with any other object introduced in <body> or <def>. Currently onlydef
s are expanded within <body>.
foreach <var> = 0-15 in ...
foreach <var> = {0-15,32-47} in ...
- Loop over ranges of integers. The braces are required for multiple ranges.
(DEF a, b)
- a dag value. The first element is required to be a record definition, the
remaining elements in the list may be arbitrary other values, including
nested
`dag
’ values. !listconcat(a, b, ...)
- A list value that is the result of concatenating the ‘a’ and ‘b’ lists. The lists must have the same element type. More than two arguments are accepted with the result being the concatenation of all the lists given.
!strconcat(a, b, ...)
- A string value that is the result of concatenating the ‘a’ and ‘b’ strings. More than two arguments are accepted with the result being the concatenation of all the strings given.
str1#str2
- “#” (paste) is a shorthand for !strconcat. It may concatenate things that are not quoted strings, in which case an implicit !cast<string> is done on the operand of the paste.
!cast<type>(a)
- A symbol of type type obtained by looking up the string ‘a’ in the symbol table. If the type of ‘a’ does not match type, TableGen aborts with an error. !cast<string> is a special case in that the argument must be an object defined by a ‘def’ construct.
!subst(a, b, c)
- If ‘a’ and ‘b’ are of string type or are symbol references, substitute ‘b’ for ‘a’ in ‘c.’ This operation is analogous to $(subst) in GNU make.
!foreach(a, b, c)
- For each member of dag or list ‘b’ apply operator ‘c.’ ‘a’ is a dummy variable that should be declared as a member variable of an instantiated class. This operation is analogous to $(foreach) in GNU make.
!head(a)
- The first element of list ‘a.’
!tail(a)
- The 2nd-N elements of list ‘a.’
!empty(a)
- An integer {0,1} indicating whether list ‘a’ is empty.
!if(a,b,c)
- ‘b’ if the result of ‘int’ or ‘bit’ operator ‘a’ is nonzero, ‘c’ otherwise.
!eq(a,b)
- ‘bit 1’ if string a is equal to string b, 0 otherwise. This only operates on string, int and bit objects. Use !cast<string> to compare other types of objects.
!shl(a,b)
!srl(a,b)
!sra(a,b)
!add(a,b)
!and(a,b)
- The usual binary and arithmetic operators.
Note that all of the values have rules specifying how they convert to values
for different types. These rules allow you to assign a value like “7
”
to a “bits<4>
” value, for example.
Classes and definitions¶
As mentioned in the introduction, classes and definitions (collectively known as
‘records’) in TableGen are the main high-level unit of information that TableGen
collects. Records are defined with a def
or class
keyword, the record
name, and an optional list of “template arguments”. If the record has
superclasses, they are specified as a comma separated list that starts with a
colon character (“:
”). If value definitions or let expressions are
needed for the class, they are enclosed in curly braces (“{}
”); otherwise,
the record ends with a semicolon.
Here is a simple TableGen file:
class C { bit V = 1; }
def X : C;
def Y : C {
string Greeting = "hello";
}
This example defines two definitions, X
and Y
, both of which derive from
the C
class. Because of this, they both get the V
bit value. The Y
definition also gets the Greeting member as well.
In general, classes are useful for collecting together the commonality between a group of records and isolating it in a single place. Also, classes permit the specification of default values for their subclasses, allowing the subclasses to override them as they wish.
Value definitions¶
Value definitions define named entries in records. A value must be defined before it can be referred to as the operand for another value definition or before the value is reset with a let expression. A value is defined by specifying a TableGen type and a name. If an initial value is available, it may be specified after the type with an equal sign. Value definitions require terminating semicolons.
‘let’ expressions¶
A record-level let expression is used to change the value of a value definition
in a record. This is primarily useful when a superclass defines a value that a
derived class or definition wants to override. Let expressions consist of the
‘let
’ keyword followed by a value name, an equal sign (“=
”), and a new
value. For example, a new class could be added to the example above, redefining
the V
field for all of its subclasses:
class D : C { let V = 0; }
def Z : D;
In this case, the Z
definition will have a zero value for its V
value,
despite the fact that it derives (indirectly) from the C
class, because the
D
class overrode its value.
Class template arguments¶
TableGen permits the definition of parameterized classes as well as normal concrete classes. Parameterized TableGen classes specify a list of variable bindings (which may optionally have defaults) that are bound when used. Here is a simple example:
class FPFormat<bits<3> val> {
bits<3> Value = val;
}
def NotFP : FPFormat<0>;
def ZeroArgFP : FPFormat<1>;
def OneArgFP : FPFormat<2>;
def OneArgFPRW : FPFormat<3>;
def TwoArgFP : FPFormat<4>;
def CompareFP : FPFormat<5>;
def CondMovFP : FPFormat<6>;
def SpecialFP : FPFormat<7>;
In this case, template arguments are used as a space efficient way to specify a
list of “enumeration values”, each with a “Value
” field set to the specified
integer.
The more esoteric forms of TableGen expressions are useful in conjunction with template arguments. As an example:
class ModRefVal<bits<2> val> {
bits<2> Value = val;
}
def None : ModRefVal<0>;
def Mod : ModRefVal<1>;
def Ref : ModRefVal<2>;
def ModRef : ModRefVal<3>;
class Value<ModRefVal MR> {
// Decode some information into a more convenient format, while providing
// a nice interface to the user of the "Value" class.
bit isMod = MR.Value{0};
bit isRef = MR.Value{1};
// other stuff...
}
// Example uses
def bork : Value<Mod>;
def zork : Value<Ref>;
def hork : Value<ModRef>;
This is obviously a contrived example, but it shows how template arguments can
be used to decouple the interface provided to the user of the class from the
actual internal data representation expected by the class. In this case,
running llvm-tblgen
on the example prints the following definitions:
def bork { // Value
bit isMod = 1;
bit isRef = 0;
}
def hork { // Value
bit isMod = 1;
bit isRef = 1;
}
def zork { // Value
bit isMod = 0;
bit isRef = 1;
}
This shows that TableGen was able to dig into the argument and extract a piece of information that was requested by the designer of the “Value” class. For more realistic examples, please see existing users of TableGen, such as the X86 backend.
Multiclass definitions and instances¶
While classes with template arguments are a good way to factor commonality
between two instances of a definition, multiclasses allow a convenient notation
for defining multiple definitions at once (instances of implicitly constructed
classes). For example, consider an 3-address instruction set whose instructions
come in two forms: “reg = reg op reg
” and “reg = reg op imm
”
(e.g. SPARC). In this case, you’d like to specify in one place that this
commonality exists, then in a separate place indicate what all the ops are.
Here is an example TableGen fragment that shows this idea:
def ops;
def GPR;
def Imm;
class inst<int opc, string asmstr, dag operandlist>;
multiclass ri_inst<int opc, string asmstr> {
def _rr : inst<opc, !strconcat(asmstr, " $dst, $src1, $src2"),
(ops GPR:$dst, GPR:$src1, GPR:$src2)>;
def _ri : inst<opc, !strconcat(asmstr, " $dst, $src1, $src2"),
(ops GPR:$dst, GPR:$src1, Imm:$src2)>;
}
// Instantiations of the ri_inst multiclass.
defm ADD : ri_inst<0b111, "add">;
defm SUB : ri_inst<0b101, "sub">;
defm MUL : ri_inst<0b100, "mul">;
...
The name of the resultant definitions has the multidef fragment names appended
to them, so this defines ADD_rr
, ADD_ri
, SUB_rr
, etc. A defm may
inherit from multiple multiclasses, instantiating definitions from each
multiclass. Using a multiclass this way is exactly equivalent to instantiating
the classes multiple times yourself, e.g. by writing:
def ops;
def GPR;
def Imm;
class inst<int opc, string asmstr, dag operandlist>;
class rrinst<int opc, string asmstr>
: inst<opc, !strconcat(asmstr, " $dst, $src1, $src2"),
(ops GPR:$dst, GPR:$src1, GPR:$src2)>;
class riinst<int opc, string asmstr>
: inst<opc, !strconcat(asmstr, " $dst, $src1, $src2"),
(ops GPR:$dst, GPR:$src1, Imm:$src2)>;
// Instantiations of the ri_inst multiclass.
def ADD_rr : rrinst<0b111, "add">;
def ADD_ri : riinst<0b111, "add">;
def SUB_rr : rrinst<0b101, "sub">;
def SUB_ri : riinst<0b101, "sub">;
def MUL_rr : rrinst<0b100, "mul">;
def MUL_ri : riinst<0b100, "mul">;
...
A defm
can also be used inside a multiclass providing several levels of
multiclass instantiations.
class Instruction<bits<4> opc, string Name> {
bits<4> opcode = opc;
string name = Name;
}
multiclass basic_r<bits<4> opc> {
def rr : Instruction<opc, "rr">;
def rm : Instruction<opc, "rm">;
}
multiclass basic_s<bits<4> opc> {
defm SS : basic_r<opc>;
defm SD : basic_r<opc>;
def X : Instruction<opc, "x">;
}
multiclass basic_p<bits<4> opc> {
defm PS : basic_r<opc>;
defm PD : basic_r<opc>;
def Y : Instruction<opc, "y">;
}
defm ADD : basic_s<0xf>, basic_p<0xf>;
...
// Results
def ADDPDrm { ...
def ADDPDrr { ...
def ADDPSrm { ...
def ADDPSrr { ...
def ADDSDrm { ...
def ADDSDrr { ...
def ADDY { ...
def ADDX { ...
defm
declarations can inherit from classes too, the rule to follow is that
the class list must start after the last multiclass, and there must be at least
one multiclass before them.
class XD { bits<4> Prefix = 11; }
class XS { bits<4> Prefix = 12; }
class I<bits<4> op> {
bits<4> opcode = op;
}
multiclass R {
def rr : I<4>;
def rm : I<2>;
}
multiclass Y {
defm SS : R, XD;
defm SD : R, XS;
}
defm Instr : Y;
// Results
def InstrSDrm {
bits<4> opcode = { 0, 0, 1, 0 };
bits<4> Prefix = { 1, 1, 0, 0 };
}
...
def InstrSSrr {
bits<4> opcode = { 0, 1, 0, 0 };
bits<4> Prefix = { 1, 0, 1, 1 };
}
File scope entities¶
File inclusion¶
TableGen supports the ‘include
’ token, which textually substitutes the
specified file in place of the include directive. The filename should be
specified as a double quoted string immediately after the ‘include
’ keyword.
Example:
include "foo.td"
‘let’ expressions¶
“Let” expressions at file scope are similar to “let” expressions within a record, except they can specify a value binding for multiple records at a time, and may be useful in certain other cases. File-scope let expressions are really just another way that TableGen allows the end-user to factor out commonality from the records.
File-scope “let” expressions take a comma-separated list of bindings to apply, and one or more records to bind the values in. Here are some examples:
let isTerminator = 1, isReturn = 1, isBarrier = 1, hasCtrlDep = 1 in
def RET : I<0xC3, RawFrm, (outs), (ins), "ret", [(X86retflag 0)]>;
let isCall = 1 in
// All calls clobber the non-callee saved registers...
let Defs = [EAX, ECX, EDX, FP0, FP1, FP2, FP3, FP4, FP5, FP6, ST0,
MM0, MM1, MM2, MM3, MM4, MM5, MM6, MM7,
XMM0, XMM1, XMM2, XMM3, XMM4, XMM5, XMM6, XMM7, EFLAGS] in {
def CALLpcrel32 : Ii32<0xE8, RawFrm, (outs), (ins i32imm:$dst,variable_ops),
"call\t${dst:call}", []>;
def CALL32r : I<0xFF, MRM2r, (outs), (ins GR32:$dst, variable_ops),
"call\t{*}$dst", [(X86call GR32:$dst)]>;
def CALL32m : I<0xFF, MRM2m, (outs), (ins i32mem:$dst, variable_ops),
"call\t{*}$dst", []>;
}
File-scope “let” expressions are often useful when a couple of definitions need
to be added to several records, and the records do not otherwise need to be
opened, as in the case with the CALL*
instructions above.
It’s also possible to use “let” expressions inside multiclasses, providing more ways to factor out commonality from the records, specially if using several levels of multiclass instantiations. This also avoids the need of using “let” expressions within subsequent records inside a multiclass.
multiclass basic_r<bits<4> opc> {
let Predicates = [HasSSE2] in {
def rr : Instruction<opc, "rr">;
def rm : Instruction<opc, "rm">;
}
let Predicates = [HasSSE3] in
def rx : Instruction<opc, "rx">;
}
multiclass basic_ss<bits<4> opc> {
let IsDouble = 0 in
defm SS : basic_r<opc>;
let IsDouble = 1 in
defm SD : basic_r<opc>;
}
defm ADD : basic_ss<0xf>;
Looping¶
TableGen supports the ‘foreach
’ block, which textually replicates the loop
body, substituting iterator values for iterator references in the body.
Example:
foreach i = [0, 1, 2, 3] in {
def R#i : Register<...>;
def F#i : Register<...>;
}
This will create objects R0
, R1
, R2
and R3
. foreach
blocks
may be nested. If there is only one item in the body the braces may be
elided:
foreach i = [0, 1, 2, 3] in
def R#i : Register<...>;
Code Generator backend info¶
Expressions used by code generator to describe instructions and isel patterns:
(implicit a)
- an implicitly defined physical register. This tells the dag instruction selection emitter the input pattern’s extra definitions matches implicit physical register definitions.


Deleted ‘Joker’ scene would’ve confirmed Sophie’s fate
The mystery has had to be revealed by those behind the film since its release
Joker director Todd Phillips has confirmed that a deleted scene from the film would’ve confirmed Sophie Dumond’s fate.
The mystery eventually had to be solved by those involved with the film in interviews after its release.
The mystery in question revolves around the finale of the film, in which Arthur Fleck finds himself in an asylum, with fans wondering whether the preceding events had actually happened, or it was all a figment of Fleck’s imagination.
The scene where the Joker leaves romantic interest Sophie’s apartment to be greeted by police sirens was a particular point of discussion, with fans wondering whether he’d killed her, or it was just another thing he made up in his mind.
The film’s cinematographer Lawrence Sher has since cleared up the mystery, saying: “Some people have asked me, ‘Was she killed?’ [Director Todd Phillips] makes it clear she wasn’t killed.”
Phillips has now revealed that a scene which would’ve confirmed that Sophie was indeed not killed by the Joker was shot for the film before being cut, with the scene set to feature a cutaway to Sophie watching Sophie watching Fleck’s interview with Murray Franklin, days after she was rumoured to be killed by the Joker.
“He doesn’t kill her, definitively,” Phillips told IndieWire, who revealed that the scene was cut in order to keep the film’s narrative structure, always showing events from the Joker’s perspective.
He continued: “As the filmmaker and the writer, I am saying he doesn’t kill her. We like the idea that it’s almost like a litmus test for the audience to say, ‘How crazy is he?’
Comic villain: Joaquin Phoenix as Arthur Fleck (aka Joker)
“Most people that I’ve spoken to think he didn’t kill her because they understand the idea that he only kills people that did him wrong.
“She had nothing to do with it,” he continued. “Most people understood that, even as a villain, he was living by a certain code.
  The movie that exists is exactly the movie I want it to be and I will never show a deleted scene.”


Managing your Security Baseline
Despite many advancements in the field of security, two fundamental issues have stayed at the core of many attacks over the last 20 years. They preveil despite firewalls, SIEMs, or scanners. They are: Misconfiguration and unpatched software with known vulnerabilities.
Both problems have been addressed with processes and strong governance. While improving the situation considerably, failures are still unavoidable and often unmitigated. I have seen various companies with great risk and security management, that still suffer from severe configuration issues and unpatched machines. It is still challenging to identify non-intended changes to configuration, because there is no way to compare the desired configuration with actual settings. Fast-paced elastic cloud environments have further stressed the importance of up-to-date safety and configuration.
This is a place, where a new approach and new technology can be combined to solve an industry problem. By using configuration management tools, we are able to implement most security rules for technology via code. This has various advantages:
- Instead of static rules documents, we establish reusable tests (via ServerSpec)
- Security configurations can be implemented
- The rules will be turned into source code
- Source code can evolve and managed in source code management systems
A great way that illustrates this approach is the implementation of the base operating system hardening as part of the Hardening Framework. Traditionally, these would be adapted to every operating system and release, which is time-consuming and error-prone even to the most experienced administrators. We automated a common set of rules in tools like Chef and Puppet:
This implements strict rules, which are verified in ServerSpec:
From now on, every admin is able to harden a server in no time. The security rules are well-established and can be used to verify if the configuration is done correctly. A video that illustrates our approach with a Nessus scanner:
By using the established modules in the Hardening Framework, your company is able to increase the security baseline quickly. Within the Hardening Framework Team, some of the best industry experts work together to build a solution that helps securing your servers. The project is managed as an independent open source project, to ensure an industry-wide ruleset. Contributions to any project are very welcome.
Follow us on Twitter


{% extends 'base.html' %} {% block title %}Add Some Files!{% endblock %} {% block register %}
Uploaded files with be added automatically, just leave the page when you are done
{% if report.files.all|length > 0 %} {% for file in report.files.all %} {% endfor %} {% else %}No files!
{% endif %}


--- layout: blog_post nav: blog title: Twelve HTML Attributes ---
This little live stock quote app was built using intercooler and SparkJava by some UCSC students I have been working with.
It required only twelve intercooler attributes and two lines of javascript.
The source for this app is here.


![Interstella Splash](images/splash.png) ## Welcome! Welcome to the Interstella Galactic Trading Company team! Interstella GTC is an intergalactic trading company that deals in rare resources. Business is booming, but we're struggling to keep up with orders mainly due to our legacy logistics platform. We heard about the benefits of containers and very much want to head in that direction. Can you help us get there? ## Interstella GTC Workshops and Updates This is a workshop series designed as a learning path starting with introductory Docker concepts to advanced container operations. The workshops are based on [Amazon Elastic Container Service (ECS)](https://aws.amazon.com/ecs/) and [Amazon Elastic Container Registry (ECR)](https://aws.amazon.com/ecr/) to help you get familiar with AWS container offerings. re:Invent featured a (4) part series: 1. Learn How to Use Docker on AWS 2. Monolith to Microservices with Amazon ECS 3. CICD for Containers on AWS 4. Advanced Microservice Operations We're still going through feedback and making design decisions how to best offer this curriculum to folks in 2018. Stay tuned as we release more updates, which hopefully will include new features and functionality such as [AWS Cloud9](https://aws.amazon.com/cloud9/) and [AWS Fargate](https://aws.amazon.com/fargate/). This page is the best place for up to date information about the series. Thanks as always for your support and interest. If you have ideas for new modules or have requests/feedback, please send us a note! ## Github Details #### Client Side Application Code The Interstella app code is up on GitHub: [amazon-ecs-interstella-team GitHub Repo](https://github.com/aws-samples/amazon-ecs-interstella-workshop). #### Server Side Code There are server side assets that we are running (e.g. SNS topic, S3, API Gateway, DynamoDB). This is one of the areas we will be working on in preparation for relaunching this workshop series in 2018; the plan is to offer an admin CloudFormation stack which will allow you to run these assets on your own. The server section within the GitHub repo linked above is a work in progress, stay tuned! ## Contact Us If you have any questions on our workshops or if you have feedback/suggestions, email [aws-interstella-team@amazon.com](mailto:aws-interstella-team@amazon.com). We'll be joining the ECS community Slack group soon. Stay tuned. ## Credits Markdown rendering by [Strapdown.js](http://strapdownjs.com/)


This guide explains how to use latinum
with ActiveRecord.
Direct Serialization
Latinum can be easily used in a ActiveRecord model simply by declaring a serialized data-type for a string or text column, e.g.
class Transaction < ActiveRecord::Base
serialize :total, Latinum::Resource
end
It can be used like so:
transaction = Transaction.new(:total => "10 NZD")
transaction.total * 2
# => "20.0 NZD"
To format the output, use a Latinum::Bank
, e.g. assuming the bank is set up correctly:
bank.format(transaction.total)
# => "$20.00 NZD"
bank.format(transaction.total, name: nil)
# => "$20.00"
bank.format(transaction.total, symbol: nil)
# => "20.00 NZD"
Conversion To and From Integers
For storage in traditional databases, you may prefer to use integers. Based on the precision of the currency, you can store integer representations:
resource = Latinum::Resource.new("1.12345678", "BTC")
112345678 == bank.to_integral(resource)
# => true
resource == bank.from_integral(112345678, "BTC")
# => true
As BitCoin has 8 decimal places, it requires an integer representation with at least 10^8.


Pig Dice Game
Rules
- The game has a six sided dice and 2 players, playing in rounds.
- In each turn, a player rolls a dice as many times as he wishes. Each result gets added to his ROUND score.
- If the player rolls a 1, all his ROUND score gets lost. After that, it is the next player's turn.
- The player can choose to 'hold', which means that his ROUND score gets added to his GLOBAL score. After that, it is the next player's turn.
- The first player to reach 100 points on GLOBAL score wins the game.
Player 1
Global score: 0
Round score: 0
Player 2
Global score: 0
Round score: 0
Target: 100
Rolled: 0


You should have received a calendar invite. We look forward to speaking with you soon. If you have any questions, please ask us on Twitter.


Move some files around and try to update the navigation to still work!
(hint: you'll need to update the CSS link href as well)


Worapat.com
Introduction
Single
Blog
Works
Contact
404
404 / Page not found
The link you followed may be broken, or the page may have been removed.
Go back home


Home
About
CV
Blog
Hi there, I'm Ronnie Rodriguez!
I'm best known as the horrible cop from
A Touch of Evil
Don't trust me.
Read more about my life...


Manmohan Singh had his share of problems when he was to rejig cabinet committee on security after Shivraj Patil was sent for gubernatorial assignment. Finally family loyalist A K Antony had to be brought in from Kerala to take on the mantle.
Manmohan Singh had his share of problems when he was to rejig cabinet committee on security after Shivraj Patil was sent for gubernatorial assignment. Finally family loyalist A K Antony had to be brought in from Kerala to take on the mantle.
When the BJP won a massive victory in 2014, the defence ministry was first handed over to Arun Jaitley. He held the dual charge along with that of finance. Later Manohar Parrikar was drafted in from Goa. The first chance that he got, the IIT graduate decided to return to Panjim to lead a fragile coalition. The baton was again handed over to Jaitley till a replacement was found. Prime Ministers in the past have shown great care in choosing their defence ministers. Aspirants are gauged on broadly three parameters- probity, loyalty and political experience.