Understanding Alpha(Go) Zero
Oliver Zeigermann
/
@DJCordhose
### Google DeepMind's Deep Q-learning playing Atari Breakout
https://youtu.be/V1eYniJ0Rnk
### AlphaGo Zero * AlphaGoZero beat all human players and all programs in the Go game * No human knowledge on how to evaluate a position has gone into it * Uses an improved Monte Carlo Tree Search * Expert policy given by Convolutional Neural Network (CNN) to dramatically reduce high branching factor * CNN is trained by self-play
http://tim.hibal.org/blog/alpha-zero-how-and-why-it-works/
### Alpha Zero * A generalized version of AlphaGoZero * Applies strategies close to AlphaGo Zero * Has been adapted to play Chess and Shogi * Symmetries of Board existing in Go only no longer used * 4 hours of training to reach level of play of Stockfish (on 5000 TPUs) * Could be adapted to any perfect information game with a well defined win condition
https://en.wikipedia.org/wiki/AlphaZero
### AlphaZero: Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm _The strongest (chess) programs are based on a combination of sophisticated search techniques, domain-specific adaptations, and handcrafted evaluation functions that have been refined by human experts over several decades..._
https://arxiv.org/pdf/1712.01815.pdf
_... In contrast, the AlphaGo Zero program recently achieved superhuman performance in the game of Go, by tabula rasa reinforcement learning from games of self-play._ _ Starting from random play, and given no domain knowledge except the game rules, AlphaZero achieved within 24 hours a superhuman level of play in the games of chess and shogi (Japanese chess) as well as Go, and convincingly defeated a world-champion program in each case._


ESTIMATION AND CONTROL OF
STOCHASTIC CHEMICAL SYSTEMS
Thesis by
Myung Kyu Hwang
In Partial Fulfillment of the Requirements for the Degree of
Doctor of Philosophy
California Institute of Technology
Pasadena, California
1971
(Submitted May 10, 1971)
Reproduced with permission of the copyright owner. Further reproduction prohibited without permission.


Sample UserAgent Information Acquisition Function¶
Important
This sample uses a Nablarch 1.4 compliant API.
When combining with versions later than Nablarch 1.4 series, customize as necessary.
Summary¶
The UserAgent information acquisition function analyzes the value obtained from the HTTP header (User-Agent) according to the contents described in the configuration file, and obtains the following information.
- OS type
- OS name
- OS version
- Browser type
- Browser name
- Browser version
It can be obtained from the application with HttpRequest#getUserAgent()
.
Structure¶
Class diagram¶
Responsibilities of each class¶
Interface definition¶
| Class name | Summary |
|---|---|
| please.change.me.fw.web.useragent.UserAgentValueConvertor | An interface that converts acquired values (browser name, version number, etc.).
|
Class definition¶
a) Implementation class for nablarch.fw.web.UserAgentParser
| Class name | Summary |
|---|---|
| please.change.me.fw.web.useragent.RegexUserAgentParser | UserAgent analysis class that obtains various information on the OS and browser using regular expressions.
|
b) Implementation class of nablarch.fw.web.useragent.UserAgentValueConvertor
| Class name | Summary |
|---|---|
| please.change.me.fw.web.useragent.UserAgentNameConvertor | Converter that formats name items.
It has a function that replaces any strings.
|
| please.change.me.fw.web.useragent.UserAgentVersionConvertor | Converter that formats version items.
It has a function that divides version items and pads each item with an any string.
|
c) Other classes
| Class name | Summary |
|---|---|
| nablarch.fw.web.HttpRequest | Data object that stores the request message in the HTTP protocol.
The application obtains the UserAgent class from the
getUserAgent method of this class. |
| nablarch.fw.web.useragent.UserAgent | Class that stores the results analyzed by the UserAgent analysis class.
Extend this class to customize the UserAgent analysis class and obtain any items.
|
| please.change.me.fw.web.useragent.UserAgentPatternSetting | Class that stores configuration items such as the list of analysis patterns and default values.
|
| please.change.me.fw.web.useragent.TypePattern | Class that stores the regular expressions of parsing patterns to determine the type (OS/browser).
|
| please.change.me.fw.web.useragent.ItemPattern | Class that stores the regular expressions of analysis patterns and converters to determine items (such as specific browser names).
|
Tip
Additional information on the UserAgentVersionConvertor
This section describes the usage of the
UserAgentValueConvertor
class provided in the sample. In this class, strings are divided by “D (non-numeric)”, each element is padded and the values that are separated by a space are used as the converted values. (Example: “34.0.1847.116” → “_34 __0 ___1847”)The reason for this conversion is to use the browser version number after conversion as the CSS class name.
There are various ways to perform this control, although special display control may be required only for certain browsers and terminals. If this control method is not standardized for all applications, ad hoc judgment processes and control processes will be scattered, and maintainability will be impaired.
To standardize this control method, a method for “using the browser version number obtained from the user agent value as the CSS class name and controlling the specific browser or terminal by this CSS designation” has been provided. This class is intended to be used for display control applications.
Description of configuration¶
Configuration of the UserAgent analysis class¶
Details of configuration contents¶
Configuration of please.change.me.fw.web.useragent.RegexUserAgentParser¶
Configuration examples and more information on the configuration items of RegexUserAgentParser are shown below. Also, more specific configuration and usage examples are shown in Configuration Sample of UserAgent Information Acquisition Function.
<?xml version="1.0" encoding="UTF-8"?>
<component-configuration xmlns="http://tis.co.jp/nablarch/component-configuration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- OS pattern mapping configuration -->
<component name="userAgentParser" class="please.change.me.fw.web.useragent.RegexUserAgentParser">
<property name="osSetting">
<component class="please.change.me.fw.web.useragent.UserAgentPatternSetting">
<!-- Pattern configuration for obtaining the OS type -->
<property name="typePatternList">
<list>
<component class="please.change.me.fw.web.useragent.TypePattern">
<property name="name" value="desktop" />
<!-- OS type extraction pattern (regular expression) -->
<property name="pattern" value="(?i).*(windows|mac os x).*" />
</component>
</list>
</property>
<!-- Pattern configuration for acquiring OS information -->
<property name="itemPatternList">
<list>
<component class="please.change.me.fw.web.useragent.ItemPattern">
<!-- OS information extraction pattern (regular expression) -->
<property name="pattern" value="(?i).*(windows|mac os x)[\D+]*([\d\._]*).*" />
<property name="nameIndex" value="1" /> <!-- Configure the first capture group to the OS name -->
<property name="versionIndex" value="2" /> <!-- Configure the second capture group to the OS name -->
<property name="nameConvertor" ref="osNameConvertor" />
<property name="versionConvertor" ref="deviceVersionConvertor" />
</component>
</list>
</property>
</component>
</property>
<property name="browserSetting">
<component class="please.change.me.fw.web.useragent.UserAgentPatternSetting">
<property name="typePatternList">
<list>
<component class="please.change.me.fw.web.useragent.TypePattern">
<property name="name" value="Gecko" />
<property name="pattern" value=".*Gecko.*" />
</component>
</list>
</property>
<property name="itemPatternList">
<list>
<component class="please.change.me.fw.web.useragent.ItemPattern">
<property name="pattern" value="(?i).*(msie\s|trident.+rv:)([\d\.]*).*" />
<property name="name" value="ie" /> <!-- Browser name to use when the group index is not specified -->
<property name="versionIndex" value="2" />
<property name="versionConvertor" ref="browserVersionConvertor" />
</component>
</list>
</property>
</component>
</property>
</component>
</component-configuration>
The property values of RegexUserAgentParser are shown below.
| property name | Settings |
|---|---|
| osSetting | Defines the parsing pattern configuration for OS information.
The value that can be configured is UserAgentPatternSetting.
If not specified, all OS information will be null.
|
| browserSetting | Defines the parsing pattern configuration for browser information.
The value that can be configured is UserAgentPatternSetting.
If not specified, all browser information will be null.
|
The property values of UserAgentPatternSetting are shown below.
| property name | Settings |
|---|---|
| defaultType | Defines the default item type.
Used when the UserAgent does not match any of the patterns, or when an error occurs during determination.
If not specified, the item type will be “UnknownType”.
|
| defaultName | Defines the default item name.
Used when the UserAgent does not match any of the patterns, or when an error occurs during determination.
If not specified, the item name will be “UnknownName”.
|
| defaultVersion | Defines the default version.
Used when the UserAgent does not match any of the patterns, or when an error occurs during determination.
If not specified, the version will be “UnknownVersion”.
|
| typePatternList | Defines the parsing pattern in List to acquire item types from UserAgent.
UserAgentPattern is used as the element of the list.
Parsing of pattern is performed in the order in which the list is defined and parsing of the corresponding group is terminated when a match is made.
If not specified, parsing will be not performed.
|
| itemPatternList | Defines the parsing pattern with List to get the item name and version from UserAgent.
UserAgentPattern is used as the element of the list.
Parsing of pattern is performed in the order in which the list is defined and parsing of the corresponding group is terminated when a match is made.
If not specified, parsing will be not performed.
|
The property values of TypePattern are shown below.
| property name | Settings |
|---|---|
| name | Defines the item name of this pattern.
This value may be set to the same value as other patterns.
|
| pattern | Defines the parsing pattern as a regular expression.
If an invalid pattern is specified, IllegalArgumentException will be thrown during initialization.
|
The property values of ItemPattern are shown below.
| property name | Settings |
|---|---|
| name | Defines the item name of this pattern.
This value may be set to the same value as other patterns.
This value is used when the group number to be captured with nameIndex is not specified.
If not specified, the item type will be the value specified by defaultType.
|
| pattern | Defines the parsing pattern as a regular expression.
The group must be configured to capture the value with the group number specified in nameIndex and versionIndex.
If an invalid pattern is specified, IllegalArgumentException will be thrown during initialization.
If not specified, parsing will be not performed.
|
| nameIndex | Defines a group number to be captured as an item name from the parsing pattern.
If an invalid index is specified, IllegalArgumentException will be thrown during initialization.
If not specified, the item name will have the same value as the item type.
If the item type is not specified, it will be the value specified by defaultName.
|
| versionIndex | Defines a group number to be captured as a version from the parsing pattern.
If an invalid index is specified, IllegalArgumentException will be thrown during initialization.
If not specified, the version will be the value specified by defaultVersion.
|
| nameConvertor | Defines an implementation class for UserAgentValueConvertor that performs string conversion after item name extraction.
UserAgentNameConvertor is provided as a standard implementation.
UserAgentNameConvertor simply replaces the specified string before replacement with the string after replacement .
Also, if the toLowerCase property is set, the string is converted to lower case before replacement.
Example: “mac os x” → “mac_os_x”
If not specified, conversion will be not performed.
|
| versionConvertor | Defines an implementation class for UserAgentValueConvertor that performs string conversion after version extraction.
UserAgentVersionConvertor is provided as a standard implementation.
UserAgentVersionConvertor divides the string by “D (non-numeric)” into three elements.
Each element is padded and the values that are separated by a space are used as the converted values.
Example: “34.0.1847.116” → “_34 __0 ___1847”
If not specified, conversion will be not performed.
|
The property values of UserAgentNameConvertor are shown below.
| property name | Settings |
|---|---|
| toLowerCase | Defines the lowercase flag for string.
If not specified, lower case will be used.
|
| replaceFrom | Defines the string before replacement.
|
| replaceTo | Defines the string after replacement.
If both replaceFrom and replaceTo are not specified, conversion will not be performed.
|
The property values of UserAgentVersionConvertor are shown below.
| property name | Settings |
|---|---|
| padding | Define the padding string.
If not specified, conversion will be not performed.
|
Use case¶
public HttpResponse doUserAgentJudgment(HttpRequest req, ExecutionContext context) {
UserAgent userAgent = req.getUserAgent();
if (userAgent.getOsType().equals("android")) {
... // Processing when the client is android
}
if (userAgent.getBrowserName().equals("chrome")) {
... // Processing when the browser is chrome
}
}


Voice Actor - Writer - Producer
Bringing a breath of fresh air and soundwaves to the voiceover scene, Matthew has the pipes you need to get the job done right. A broadcasting and film school graduate with a well-rounded experience in front of and behind the mic. From the zaniest lovable character to the smoothest sounding voice promoting a new product, Matthew always takes great pride in giving it his all and brightening every room he steps foot in.


UCMom is a room reservation system for mothers at UCSD who need to reserve lactation rooms. I am currently working on this project as a new team member who joined in Fall 2014. The site has been designed and built by students over a total of five phases so far.


Match Play. Red trails 0-1 to 7. How should Red play 53?
pips Red=117 White=85
(CorrectAnswer= 0/0, ErrorScore= 0)
Red must take the risk of losing a few more gammons to create direct contact with the checkers on White’s 9-pt.
Either 23/18, 9/6 or 23/18, 8/5 is correct, swapping 4% gammon losses for 5% wins, a very good trade indeed. All other moves are very bad errors.
Either 23/18, 9/6 or 23/18, 8/5 is correct, swapping 4% gammon losses for 5% wins, a very good trade indeed. All other moves are very bad errors.
1. Cubeful 2-ply 23/18 9/6 Eq.: -0.549 0.219 0.016 0.001 - 0.781 0.077 0.002 2. Cubeful 2-ply 23/18 8/5 Eq.: -0.557 (-0.007) 0.217 0.015 0.001 - 0.783 0.082 0.002 3. Cubeful 2-ply 9/6 8/3 Eq.: -0.591 (-0.042) 0.191 0.009 0.000 - 0.809 0.051 0.002 4. Cubeful 2-ply 9/6 7/2 Eq.: -0.599 (-0.049) 0.190 0.008 0.000 - 0.810 0.056 0.003 5. Cubeful 2-ply 8/5 7/2 Eq.: -0.600 (-0.051) 0.189 0.008 0.000 - 0.811 0.058 0.003


Toggle navigation
IMAGES
About
Content
Share
Login
The Image Galary
The Beautiful Collection Of Pictures Here.


Unai Emery defended by Tony Adams as Arsenal legend slams board over recruitment
Red-hot Jamie Vardy piled the pressure on Arsenal boss Unai Emery as the Leicester striker continued to haunt the Gunners
by Matt Maltby, https://www.mirror.co.uk/authors/matt-maltby/Arsenal legend Tony Adams has slammed the club's recruitment policy and defended under-pressure Unai Emery after the struggling Gunners were well beaten by Leicester City on Saturday night.
Foxes star Jamie Vardy scored his ninth goal in nine starts against the Gunners to inspire the Foxes to a 2-0 win and into second in the Premier League.
Vardy, the top flight's 11-goal leading scorer, also set up James Maddison's clincher as Emery's side slumped to a limp defeat at the King Power Stadium.
But, rather than focus on Leicester's superb display, Adams highlighted the issues Arsenal are enduring both on and off the pitch.
"I think it is easier to blame the manager. I don't think he is doing himself any favours at the moment, with the captaincy situation, for instance," he told Sky Sports.
"Today, he got them organised but they just sat back and dropped so deep. The recruitment has been very poor for some years now.
"You have got to have characters in there. There aren't any in the squad. It is difficult for him, he hasn't got the players. The manager must be pulling his hair out.
"We came here expecting a good hiding and they got one.
"I don't think those players go out on the pitch and believe they will keep a clean sheet and it is infectious."
Alexandre Lacazette wasted Arsenal's best chance and Pierre-Emerick Aubameyang had a goal disallowed but the visitors were poor.
The Gunners, winless in the Premier League for over a month, slipped eight points behind the top four with Emery's position under increasing scrutiny.
Leicester now sit five points behind leaders Liverpool - who host Manchester City on Sunday - after a deserved fifth straight win.


Weather Dashboard
Powered by the
OpenWeather API
Toronto
Today's forecast:
Temperature:
℃
Humidity:
%;
Wind Speed:
M/S
UV Index:
5-day forecast:
Temperature:
℃
Humidity:
%
Temperature:
℃
Humidity:
%
Temperature:
℃
Humidity:
%
Temperature:
℃
Humidity:
%
Temperature:
℃
Humidity:
%


Madagascar 4
15. May 2018.
Toy Story 4
15. June 2018.
Cars 3
16. June 2017.
Fast and Furious 8
12. April 2017.


{% extends "layout_bsa.html" %} {% block page_title %} Claim your NHS Pension {% endblock %} {% block content %} {% include "includes/phase_banner_beta.html" %} What is the full name of the bank or financial institution? Next Cancel {% endblock %}


JOE VERSUS THE VOLCANO A film review by Magus Copyright 1996 Magus
Starring Tom Hanks & Meg Ryan
Joe Versus The Volcano is really one of the worse movies made in very recent memory. The strangest thing is that you would think nothing would go wrong with it. It has a solid cast with Tom Hanks & Meg Ryan as the lead roles. But you can never judge a movie by its cast...
If there is one good thing about Joe VS The Volcano, it is that the plot is original.  The movie begins with Joe (Tom Hanks) going to work. This opening sequence is very boring and slow. It shows Joe walking to his office. But on the way, he has to wait in a long line passing by strange and slightly depressing scenery with obnoxious lighting. A sequence like this should take 2 minutes. Here, it takes over 5...
It is obvious that Joe hates his job. At his office, one of his co-workers is Meg Ryan. Oddly enough, she plays 3 different roles in this movie!! Joe leaves to go to a doctor's appointment. His doctor informs him that he has a "brain cloud." This means that in a few months, he will die. So what does Joe do? Quit his job, of course!!
When he arrives home, Joe meets an old man named Graynamore (Lloyd Bridges). Graynamore tells Joe that in order to get some important mineral for his company from an island, the natives need someone to sacrifice to their volcano to please their Fire God. By a startling coincidence, the boat trip to the island takes a few months. By the time he reaches the island, he will almost be dead from the "brain cloud" anyway, so Joe agrees.
Graynamore gives Joe a credit card to buy everything he needs to go on this "great adventure". Joe goes on a date with Meg Ryan, his co-worker. The day before the boat trip, Joe meets one of Graynamore's daughters. She is also, surprise, Meg Ryan. Except she looks more hippyish. They both have dinner and the next day, Joe gets driven over to his boat.
The lady that sails the boat is another one of Graynamore's daughters. And, wonder of wonders, she is also played by Meg Ryan. As they sail to the island, Meg Ryan tells Joe that the natives of the island have a craving for orange soda.  And that the "brain cloud" thing was made up!!
They do plently of cheap special effects on the boat voyage. Joe goes fishing and catches a hammerhead shark. This is a cheap gag that has been pulled off many times. But, to top it off, the shark is obviously rubber and fake!! One night there is a storm. A cheap-looking lightning bolt strikes the boat and everything is cast overboard. Fortunately, Joe and Meg Ryan manage to find some of the luggage that Joe brought to sail.
By pure luck, they get to the island. Since the natives like orange soda , they wear soda cans as attire!!  ;) Before Joe leaps in the volcano, he gets fed. Right before he jumps, Meg Ryan pleads him not to. When Joe decides to, she goes in with him because "she loves him". Now this is where the movie should end. But, unfortunately, the "cheesy ending" bug comes in.
The volcano blows the couple out and into the ocean where they land on Joe's luggage. They float to another part of the island as they watch lava pouring out of the volcano towards the villagers. I give this movie a * out of ****.
Rating: */****
(Any comment or disagreements on this review can be e-mailed to<EMAIL_ADDRESS>/\/\agus
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


Kelly
About
Blogs
Projects
Contact
Technical:
Time and Habits
HTML, CSS, and DOM (part 1)
HTML, CSS, and DOM (part 2)
Designing for Web
JavaScript Basics
Problem Solving
JS Language
Cultural:
Reflections
Emotional Intelligence
Meditation
Daily Mindfulness
Self Confidence
Control
Motivation


Classification of Safety Observation Reports
Predict
{{ inp }}
LR (1, 4)
{{ prediction_text }}
LR (2, 4)
{{ prediction_text2 }}


When we talk about user interfaces, components and widgets are the words that are used interchangeably. So frameworks that claim they are component based frameworks and there are some libraries that claim to be widget toolkits or widget libraries. But there is little difference between the two.
Component or more specifically software component is a very generic term that refers to any reusable entity. A reusable entity could be a class, web service, module, library, web resource, DLL file, etc. A component has well defined interface through which developers can access the functionalities provided by that component. Internal details are not visible to user. In case of web services or distributed objects, component interface is expressed as set of APIs.
Now widget is essentially a component with a requirement that at one interface of widget should be a graphical user interface with which end user can interact. It can also have additional interface though which developer can make it interact with other components. So every widget is component while not every component is widget.
Finally, there is also a mention of portlet in some scenarios. In my opinion, portlets are also widget and thus ultimately components. However, word portlet is used in specific context. Most common context is web portal which displays aggregated data from different sources and portlets are used to show that aggregated data. In SharePoint, webparts are equivalent of portlets.


I have many interests that change often. I have lived in many states and have created a table that depicts my favorite activities per a few of the states I've lived.
| Activity | State | Picture |
|---|---|---|
| Running | Alabama | |
| Hiking | Utah | |
| Mexican Food | Texas | |
| Tourist Attractions | Florida |
My interests definitely change with my location, but
that doesn't mean I don't dream about delicious
Mexican food once a week since living in Utah.
The other day I went to Chili's... Chili's
for chips and salsa. And it was amazing. But in Texas
Chili's chips and salsa would be a last resort.
Actually, that's probably not true. Chili's does have
pretty good chips and salsa. Or I've been away from
Texas for too long. I don't miss the humidity, lack of
seasons, or unbearable heat of Texas, but I miss the food.
That being said, when I'm in Texas, I miss Utah's food.
And genuinely nothing can top the glorious fried food
of Louisiana. Hush puppies are the best.
Maybe I should have put food as all of my interests.


An Unprecedented Selection Of The World’s Finest Hypercars Are Set To Be Auctioned In Riyadh
by News DeskSilverstone Auctions will be holding their first-ever auction in the Middle East on 22 November when they’ll present a selection 46 hypercars and supercars at the inaugural Riyadh Car Show.
Silverstone Auctions Managing Director Nick Whale commented, “This is a very proud moment for us all. Being invited to host an international auction of such a high-class catalog of hypercar and supercars at this very prestigious event, is an honor.”
The massive selection of rare and exclusive vehicles is possibly the largest of its kind to ever go to auction and having to pick out just a few is a close on impossible task but we have bravely had a go anyway…
Starting things off with a bang we have a Matte-Black 2013 Gumpert Apollo Sport, one of just 13 produced. This car, with its 700hp Audi-sourced twin-turbo V8, is still a ferocious performer.
Next up is a 2017 Pagani Zonda Riviera, a one-off commission based on the Zonda F. It offers up a snarling 760hp of naturally aspirated 7.3-liter V12 power courtesy of AMG. Unique upgrades include new body panels, roof scoop, rear wing and front canards all in carbon fiber. With just 900km (562-miles) on its odometer, we hope the supercar’s new owner add a few more miles to that total.
The 2009 Lamborghini Reventon is a jet fighter for the road and this one is number 6 of the 20 produced. It has a carbon fiber body finished in a unique grey hue, fighter jet-style instrumentation and a feral 650hp 6.5-liter V12, for a top speed of 221mph.
 With its 8-liter, 16-cylinder, quad-turbo powerplant pushing out 1479hp it is, without doubt, one of the most awesome hypercars ever built. The Sport nomenclature means that this car is slightly lighter and has a more track-oriented suspension set-up than the ‘standard’ Chiron and with just 980km (612-miles) on the odometer it is still in as-new condition.
This is just a small selection of what will be on offer at the inaugural event. If you aren’t able to attend, phone bidding, commission bids and bidding online are all available.
Images courtesy of Silverstone Auctions


By Alexander High
This video essay explores the different types of government as seen in The Lion King. It first explores the type of government used by Simba and Mufasa, which is either a monarchy or an aparthiedistic state. It then explores the type of government used by Scar, which is either a communist of a fascist one. It gives a few examples supporting each case, but ultimately leaves the final decision up to the viewer.


Index
All Classes|All Packages
M
- main(String[]) - Static method in class io.github.teamdonut.proj.Main
- Main - Class in io.github.teamdonut.proj
-
Tic TacToe App
- Main() - Constructor for class io.github.teamdonut.proj.Main
- MainController - Class in io.github.teamdonut.proj.controllers
-
Main Screen Controller class
- MainController() - Constructor for class io.github.teamdonut.proj.controllers.MainController
-
Constructor
- mainMenuPane - Variable in class io.github.teamdonut.proj.controllers.MainController
- mainScene - Variable in class io.github.teamdonut.proj.controllers.AppController
- makeMove(Board) - Method in class io.github.teamdonut.proj.common.Player
-
Update's the state of the Board object with the player's move
- makeMove(Board, Token) - Method in class io.github.teamdonut.proj.PlayerType.Human
-
This method will make a move for the NPC.
- makeMove(Board, Token) - Method in interface io.github.teamdonut.proj.PlayerType.IPlayerType
-
This method will make a move for the PlayerType.
- makeMove(Board, Token) - Method in class io.github.teamdonut.proj.PlayerType.NPCEasyMode
-
This method will make a move for the PlayerType which is in easy difficulty mode.
- makeMove(Board, Token) - Method in class io.github.teamdonut.proj.PlayerType.NPCHardMode
-
Hard mode or Homi Mode - use minimax algorithm to choose the move for homi mode AI.
- maxLengthProperty() - Method in class io.github.teamdonut.proj.utils.RestrictiveTextField
-
The max length property.
- miniMax(Board, int, int, int, boolean) - Method in class io.github.teamdonut.proj.PlayerType.NPCHardMode
-
The minimax algorithm.
- miniMaxAlgoTest() - Method in class io.github.teamdonut.proj.NPCHardModeTest
-
Test the minimax algorithm with a few different scenarios.
- MultiplayerController - Class in io.github.teamdonut.proj.controllers
-
Intermediate screen where player 1 and player 2 select their desired name and token.
- MultiplayerController() - Constructor for class io.github.teamdonut.proj.controllers.MultiplayerController
- MusicPlayer - Class in io.github.teamdonut.music
-
Singleton class for app music paler
All Classes|All Packages


Yaidom is a uniform XML query API, written in Scala and leveraging its Collections API. Moreover, yaidom provides several specific-purpose DOM-like tree implementations offering this XML query API.
In this article, the yaidom library is introduced, using examples from XBRL (eXtensible Business Reporting Language).
This article introduces the yaidom XML query library, using examples in the domain of XBRL (eXtensible Business Reporting Language).
It is assumed that the reader has some experience with XML processing in Java (e.g. JAXP) or another OO programming language (such as Scala or C#).
XSLT, XQuery and XPath are standard XML transformation/query languages, yet in this article yaidom (with Scala) is introduced as an alternative approach to in-memory XML querying/transformation, leveraging the Scala programming language. Still, yaidom can also be used together with standard languages such as XQuery, for example when using an XML database.
The remainder of this article is organized as follows:
As mentioned above, after introducing Scala, Scala Collections and yaidom, a brief introduction to XBRL follows. XBRL is an XML-based business reporting standard. Business reports in XBRL format are called XBRL instances. XBRL instances must obey many requirements, in order for them to be considered valid. After the brief XBRL introduction, the remainder of this paper shows how many of these rules can be expressed using yaidom and Scala. It will be shown that using Scala and yaidom instead of standard XML query and transformation languages actually makes expressing these rules relatively easy.
There are many other articles about XML processing in Scala, mostly about Scala's own standard XML libary. For example, XML Processing in Scala contains many well-chosen examples that show how to process XML in Scala. Moreover, it first introduces Scala, assuming some familiarity with XQuery on the part of the reader. To get an appreciation of XML processing using Scala in general, and of XML processing using Scala and yaidom in particular, it makes sense to read both papers, starting with XML Processing in Scala.
The Scala programming language is the most popular alternative to the Java language on the Java virtual machine. It is object-oriented (more so than Java) and also functional, in that functions are first-class objects. It is statically typed, but it feels like a dynamically typed language, because of features like type inference.
Scala is a safe and expressive language, typically leading to good productivity and low bug counts in skilled disciplined teams. Its rich Collections API, its strong support for immutable data structures, and its focus on expressions rather than statements enables programmers to work at a higher level of abstraction in Scala than in Java.
The Collections API of a programming language (which in the case of Scala and Java is a part of the standard library of the language, not of the core language) often says a lot about the expressive power of that language. Below follows some Scala code that manipulates collections, to illustrate Scala's expressiveness.
Consider a book store and some queries about books (using sample data from the Stanford University online course Introduction to Databases). The Scala code is as follows:
case class Author(firstName: String, lastName: String)
case class Book(isbn: String, title: String, authors: List[Author], price: Int)
val someBooks = List(
Book(
"ISBN-0-13-713526-2",
"A First Course in Database Systems",
List(Author("Jeffrey", "Ullman"), Author("Jennifer", "Widom")),
85),
Book(
"ISBN-0-13-815504-6",
"Database Systems: The Complete Book",
List(
Author("Hector", "Garcia-Molina"),
Author("Jeffrey", "Ullman"),
Author("Jennifer", "Widom")),
100),
Book(
"ISBN-0-11-222222-3",
"Hector and Jeff's Database Hints",
List(Author("Jeffrey", "Ullman"), Author("Hector", "Garcia-Molina")),
50),
Book(
"ISBN-9-88-777777-6",
"Jennifer's Economical Database Hints",
List(Author("Jennifer", "Widom")),
25)
)
// Return all books that cost no more than 50 dollars (i.e., the last 2 books)
val cheapBooks = someBooks.filter(book => book.price <= 50)
// Return all books having Jeffrey Ullman as one of its authors (i.e., the first 3 books)
def hasAuthor(book: Book, authorLastName: String): Boolean = {
book.authors.exists(author => author.lastName == authorLastName)
}
val booksByUllman =
someBooks.filter(book => hasAuthor(book, "Ullman"))
// Return all book authors, without duplicates
val allAuthors = someBooks.flatMap(book => book.authors).distinct
// Return all titles of books having Jeffrey Ullman as one of its authors
val bookTitlesByUllman =
someBooks.filter(book => hasAuthor(book, "Ullman")).map(book => book.title)
Note how the queries in prose naturally map to their counterparts in Scala code, using a small vocabulary of higher-order functions such as map
,
flatMap
and filter
. The code shows the "what" more than the "how". In that respect, the Scala code is more like XQuery than Java (especially than Java before
version 8). In a sense, the Scala core language along with its Collections API form a universal query (and transformation) language. Of course, Scala is a lot more than that, but
for the purposes of this article this is a fitting description.
The yaidom library can be used for querying and transforming XML in Scala. It interoperates very well with the Scala Collections API.
It was mentioned above that Scala and its Collections API can be used as a universal query and transformation language. The yaidom library offers an XML element query API that turns elements into Scala collections of elements. So yaidom can be said to turn a universal query and transformation language into an XML querying and transformation language. In other words, Scala + its Collections API + yaidom can be used as an "XML querying/transformation stack". Below it will become clear that yaidom can plug in different "XML backends", thus making the "XML stack" very powerful.
Using the bookstore example above, some simple yaidom XML queries are shown below. The XML is as follows:
// The book store XML
<Bookstore>
<Book ISBN="ISBN-0-13-713526-2" Price="85" Edition="3rd">
<Title>A First Course in Database Systems</Title>
<Authors>
<Author>
<First_Name>Jeffrey</First_Name>
<Last_Name>Ullman</Last_Name>
</Author>
<Author>
<First_Name>Jennifer</First_Name>
<Last_Name>Widom</Last_Name>
</Author>
</Authors>
</Book>
<Book ISBN="ISBN-0-13-815504-6" Price="100">
<Title>Database Systems: The Complete Book</Title>
<Authors>
<Author>
<First_Name>Hector</First_Name>
<Last_Name>Garcia-Molina</Last_Name>
</Author>
<Author>
<First_Name>Jeffrey</First_Name>
<Last_Name>Ullman</Last_Name>
</Author>
<Author>
<First_Name>Jennifer</First_Name>
<Last_Name>Widom</Last_Name>
</Author>
</Authors>
<Remark>Buy this book bundled with "A First Course" - a great deal!
</Remark>
</Book>
<Book ISBN="ISBN-0-11-222222-3" Price="50">
<Title>Hector and Jeff's Database Hints</Title>
<Authors>
<Author>
<First_Name>Jeffrey</First_Name>
<Last_Name>Ullman</Last_Name>
</Author>
<Author>
<First_Name>Hector</First_Name>
<Last_Name>Garcia-Molina</Last_Name>
</Author>
</Authors>
<Remark>An indispensable companion to your textbook</Remark>
</Book>
<Book ISBN="ISBN-9-88-777777-6" Price="25">
<Title>Jennifer's Economical Database Hints</Title>
<Authors>
<Author>
<First_Name>Jennifer</First_Name>
<Last_Name>Widom</Last_Name>
</Author>
</Authors>
</Book>
</Bookstore>
Below follow the yaidom XML queries corresponding to the (non-XML) queries above. Written rather verbosely, they are as follows:
// Assume a root element called bookstore.
val someBooks = bookstore.filterChildElems(book => book.localName == "Book")
// Return all books that cost no more than 50 dollars (i.e., the last 2 books)
val cheapBooks =
someBooks.filter(book => book.attribute(EName("Price")).toInt <= 50)
// Return all books having Jeffrey Ullman as one of its authors (i.e., the first 3 books)
def hasAuthor(book: simple.Elem, authorLastName: String): Boolean = {
require(book.localName == "Book")
book.findElem(e =>
e.localName == "Author" &&
e.getChildElem(che => che.localName == "Last_Name").text == authorLastName).isDefined
}
val booksByUllman =
someBooks.filter(book => hasAuthor(book, "Ullman"))
// Return all book author elements (with duplicates, this time)
val allAuthors =
someBooks.flatMap(book => book.filterElems(e => e.localName == "Author"))
// Return all titles of books having Jeffrey Ullman as one of its authors
val bookTitlesByUllman =
someBooks.filter(book => hasAuthor(book, "Ullman")).
map(book => book.getChildElem(e => e.localName == "Title").text)
Above, the EName
type stands for "expanded name". It corresponds to Java's javax.lang.namespace.QName
, except that it does not retain the prefix, if any.
For clarity, these XML queries were written more verbosely than needed. Even when writing these queries in a less verbose way than has been done above, there would still be some verbosity related to XML handling. This is intentional: yaidom is a precise XML query API. For example, yaidom does not abstract away the distinction between elements and attributes, or between names with a namespace and those without any namespace. Despite the syntax dedicated by yaidom to XML node manipulation, the yaidom query examples are not that much more verbose than the non-XML query examples presented earlier. Compared to ad-hoc XML querying in Java (using JAXP), however, ad-hoc XML querying in Scala using yaidom is much less verbose. Even when invoking XPath queries (returning node sets) from Java code, the processing of the resulting node sets would add "syntactic clutter" that the use of Scala with yaidom could have prevented.
Why use yaidom and not Scala's own XML library? As will become apparent in this article, yaidom has very precise support for XML namespaces, more so than Scala XML. Using the yaidom API it is always clear if queries are namespace-aware. If it is intentional to query for elements that have specific local names, regardless of the namespace, then yaidom forces the user to be explicit about that. Precise namespace support in yaidom even goes as far as the ability to express a simple theory of XML namespaces (relating namespace declarations, in-scope namespaces, "qualified names" and "expanded names") in yaidom code itself, outside of any particular XML tree!
There are more reasons why yaidom may be preferable to Scala's own XML library. For example, yaidom has a precise uniform XML query API that is offered by
multiple "XML backend" implementations. Not only does yaidom offer own native DOM-like tree ("XML backend") implementations with different strengths and weaknesses, but
it is also possible to wrap existing XML library tree implementations (DOM, JDOM, XOM, Saxon etc.) in yaidom, offering the same yaidom query API.
For example, yaidom wrappers around Saxon-EE NodeInfo
trees offer the best of Saxon and the Scala-yaidom combination: on the one hand the completeness and
schema-type-awareness of Saxon-EE, and on the other hand a "Scala Collections API querying experience", using yaidom as the natural bridge between Saxon "nodes" and Scala collections processing.
Unlike yaidom, the Scala XML library does not offer multiple tree implementations backing the same query API.
This extensibility of yaidom goes even further than specific "XML backends". It is even possible to extend yaidom for custom "XML dialects" (or "vocabularies"). This will be explained and shown later in this paper. Arguably this could be the best reason to prefer yaidom to Scala's own XML library.
Why not just use standards such as XPath, XSLT or XQuery? XBRL processing is a good example where yaidom shines, as will become clear below. After all, XBRL is a lot more than "just" XML, so XBRL processing is a lot more than "just" XML processing. Performing most or all of this processing in Scala using yaidom offers the following advantages:
Surely yaidom can be used with XQuery when using an XML(-enabled) database, where XQuery joins and filters database XML data into "raw result sets", which are further processed using yaidom queries. Still, it makes sense to keep the number of boundaries between XQuery and yaidom/Scala relatively low, for each such boundary has some (syntactic and semantic) costs. In summary, the more some XML processing task can benefit from the use of Scala, the more attractive the use of yaidom becomes.
So far, this article has introduced Scala and yaidom, using only trivial examples. In the remainder of this article, yaidom examples in the domain of XBRL are used. First, this section gives a very brief introduction to XBRL.
XBRL (eXtensible Business Reporting Language) is a standard for business reporting. Many (but not all) XBRL reports are financial statements. XBRL reports ("XBRL instances") are XML documents, following a specified structure.
Suppose we want to report that for a given organization (CIK-number<PHONE_NUMBER>) the average number of employees in 2003 was 220, and that the corresponding numbers for 2004 and 2005 were 240 and 250, respectively.
More precisely, concept gaap:AverageNumberEmployees
(described by the so-called US-GAAP XBRL taxonomy) has the value 220
in the given
context (CIK-number<PHONE_NUMBER>, year 2003). Then we can report the 3 facts above in XBRL format as follows:
<xbrl xmlns="http://www.xbrl.org/2003/instance" xmlns:gaap="http://xasb.org/gaap">
<context id="D-2003">
<entity>
<identifier scheme="http://www.sec.gov/CIK">1234567890</identifier>
</entity>
<period>
<startDate>2003-01-01</startDate>
<endDate>2003-12-31</endDate>
</period>
</context>
<context id="D-2004">
<entity>
<identifier scheme="http://www.sec.gov/CIK">1234567890</identifier>
</entity>
<period>
<startDate>2004-01-01</startDate>
<endDate>2004-12-31</endDate>
</period>
</context>
<context id="D-2005">
<entity>
<identifier scheme="http://www.sec.gov/CIK">1234567890</identifier>
</entity>
<period>
<startDate>2005-01-01</startDate>
<endDate>2005-12-31</endDate>
</period>
</context>
<unit id="U-Pure">
<measure>pure</measure>
</unit>
<gaap:AverageNumberEmployees contextRef="D-2003" unitRef="U-Pure" decimals="INF">220</gaap:AverageNumberEmployees>
<gaap:AverageNumberEmployees contextRef="D-2004" unitRef="U-Pure" decimals="INF">240</gaap:AverageNumberEmployees>
<gaap:AverageNumberEmployees contextRef="D-2005" unitRef="U-Pure" decimals="INF">250</gaap:AverageNumberEmployees>
</xbrl>
This example comes from a non-trivial sample XBRL instance written by Charles Hoffman, also known as "the father of XBRL".
There are many requirements that have to be met in order for an XBRL instance to be valid. The XBRL Core specification (as well as other XBRL specifications) describes many of these requirements. There are also many common best practices that have been formalized as complementary rules. For example, the international FRIS standard places additional constraints on XBRL instances.
Most of the remainder of this article will show how many of those FRIS rules can be written naturally as Scala expressions using yaidom. Yaidom is in no way married to XBRL, but XBRL validations are good XML processing examples where Scala and yaidom really shine.
The XBRL snippet above is part of this sample instance. In this section, some simple yaidom XML queries are performed on the XBRL instance.
Before showing these queries on this XBRL instance, it should be noted that knowing only 3 yaidom query API methods to some extent means knowing them all. These 3 methods are
filterChildElems
, filterElems
and filterElemsOrSelf
. They all filter elements, based on the passed element predicate function. The difference
is that they filter child elements, descendant elements, and descendant-or-self elements, respectively. The word "descendant" is left out from the
method names.
It should also be noted that methods filterChildElems
and filterElemsOrSelf
have shorthands \
and \\
, respectively.
Method attributeOption
has shorthand \@
. Moreover, some element predicate functions have names, such as withLocalName
and
withEName
.
Some yaidom queries on the sample XBRL instance are as follows:
// Let's first parse the XBRL instance document
val docParser = DocumentParserUsingSax.newInstance
val doc = docParser.parse(sampleXbrlInstanceFile)
// Check that all gaap:AverageNumberEmployees facts have unit U-Pure.
val xmlNs = "http://www.w3.org/XML/1998/namespace"
val xbrliNs = "http://www.xbrl.org/2003/instance"
val gaapNs = "http://xasb.org/gaap"
val avgNumEmployeesFacts =
doc.documentElement.filterChildElems(withEName(gaapNs, "AverageNumberEmployees"))
println(avgNumEmployeesFacts.size) // prints 7
val onlyUPure =
avgNumEmployeesFacts.forall(fact => fact.attributeOption(EName("unitRef")) == Some("U-Pure"))
println(onlyUPure) // prints true
// Check the unit itself, minding the default namespace
val uPureUnit =
doc.documentElement.getChildElem(e =>
e.resolvedName == EName(xbrliNs, "unit") && (e \@ EName("id")) == Some("U-Pure"))
println(uPureUnit.getChildElem(withEName(xbrliNs, "measure")).text) // prints "pure"
// Now we get the measure element text, as QName, resolving it to an EName (expanded name)
println(uPureUnit.getChildElem(withEName(xbrliNs, "measure")).textAsResolvedQName)
// prints EName(xbrliNs, "pure")
// Knowing the units are the same, the gaap:AverageNumberEmployees facts are uniquely identified by contexts.
val avgNumEmployeesFactsByContext: Map[String, simple.Elem] =
avgNumEmployeesFacts.groupBy(_.attribute(EName("contextRef"))).mapValues(_.head)
println(avgNumEmployeesFactsByContext.keySet)
// prints Set("D-2003", "D-2004", "D-2005", "D-2007-BS1", "D-2007-BS2", "D-2006", "D-2007")
println(avgNumEmployeesFactsByContext("D-2003").text) // prints 220
The uniform query API of yaidom consists of several query API traits. They are like LEGO blocks, that can easily be combined.
Yaidom (native and wrapper) element tree implementations all mix in some or most of these query API traits. The example queries
above are not bound to any particular element implementation, but use a common query API trait, namely
ScopedElemApi
, which is itself a combination of query API traits. This trait offers
methods like filterElemsOrSelf
, filterChildElems
(from trait ElemApi
),
as well as methods to get text content, qualified names, expanded names, attributes etc. In other words,
it offers a query API abstraction that is valid for almost all element implementations.
The query API traits themselves are not visible in normal yaidom client code. They are relevant for creators of custom yaidom element implementations, for example wrappers around elements offered by existing XML libraries. Yaidom users that do not extend yaidom may still want to know which query API traits are offered by some XML tree implementation, of course.
Sometimes we want to use methods that are only offered by specific element implementations, and not by any query API traits.
The default native yaidom element implementation is simple.Elem
. It knows about
elements and text content (as per the mixed-in ScopedElemApi
trait), but it also
knows about comments, processing instructions and CDATA sections (if passed by the XML parser). For example:
println(doc.comments.map(_.text.trim).mkString)
// prints "Created by Charles Hoffman, CPA, 2008-03-27"
val contexts = doc.documentElement.filterChildElems(withEName(xbrliNs, "context"))
println(contexts forall (e => !e.commentChildren.isEmpty)) // prints true: all contexts have comments
// Being lazy, and forgetting about the namespace here
val facts =
doc.documentElement.filterChildElems(withLocalName("ManagementDiscussionAndAnalysisTextBlock"))
println(facts.flatMap(e => e.textChildren.filter(_.isCData)).size >= 1) // prints true
Yaidom has very precise namespace support. Like the article Understanding Namespaces,
yaidom distinguishes qualified names from expanded names, and namespace declarations from in-scope namespaces. Their yaidom counterparts are immutable
classes QName
, EName
, Declarations
and Scope
. Having these 4 distinct concepts, their
relationships can be expressed very precisely, even in yaidom code, and even outside of the context of any particular XML tree!
In the example XBRL instance above, all namespace declarations are in the root element, and therefore all descendant-or-self elements have the same in-scope namespaces. In code:
val rootScope = doc.documentElement.scope
val sameScopeEverywhere =
doc.documentElement.findAllElemsOrSelf.forall(e => e.scope == rootScope)
println(sameScopeEverywhere) // prints true
Let's consider the first FRIS rule taken from the international FRIS standard, expressed in yaidom. Rule 2.1.5 states that some commonly used namespaces should use their "preferred" namespace prefixes in XBRL instances. The rule can be expressed in yaidom as follows:
val standardScope = Scope.from(
"xbrli" -> "http://www.xbrl.org/2003/instance",
"xlink" -> "http://www.w3.org/1999/xlink",
"link" -> "http://www.xbrl.org/2003/linkbase",
"xsi" -> "http://www.w3.org/2001/XMLSchema-instance",
"iso4217" -> "http://www.xbrl.org/2003/iso4217")
val standardPrefixes = standardScope.keySet
val standardNamespaceUris = standardScope.inverse.keySet
// Naive implementation: expects only namespace declarations in root element
def usesExpectedNamespacePrefixes(xbrlInstance: simple.Elem): Boolean = {
val rootScope = xbrlInstance.scope
require(xbrlInstance.findAllElemsOrSelf.forall(e => e.scope == rootScope))
val subscope = xbrlInstance.scope.withoutDefaultNamespace filter {
case (pref, ns) =>
standardPrefixes.contains(pref) || standardNamespaceUris.contains(ns)
}
subscope.subScopeOf(standardScope)
}
Above, there is no useful error reporting, but that is easy to add, because the implementation is entirely in the rich Scala programming language.
In prose, method usesExpectedNamespacePrefixes
checks that if some of the 5 namespace prefixes above are used, that they all map to the expected namespace URIs.
The method also checks the other side: if some of the namespace URIs are in-scope, then the corresponding namespace prefixes are the expected ones, with the exception that
they may be the default namespace.
The example above illustrates yaidom's precise support for namespaces in the uniform query API, and therefore offered by diverse element tree implementations. Yet the namespace support goes further than that. As article Understanding Namespaces makes clear, namespaces are not only used in element and attribute names, but can also be used in text content and attribute values.
FRIS rule 2.1.7 must take namespaces in text content and attribute values into account, because it states that XBRL instances should not have any unused namespace declarations.
Yet how do we detect the use of namespaces in text content or attribute values? We know this from the XML schema(s) describing XBRL instances. For example, the xbrli:measure
element has type xs:QName
. So the text content of an xbrli:measure
should be interpreted as an "expanded name". The namespace of that expanded name is therefore
one of the namespaces used in the XBRL instance.
Yaidom makes it possible to code a DocumentENameExtractor
strategy, holding information about ENames and therefore namespaces occurring in text content or attribute values.
So, looking at the XML schema(s), we can easily code such a strategy ourselves (yaidom itself has no XML Schema awareness). Then, using method NamespaceUtils.findAllNamespaces
,
all namespaces used in the XBRL instance can be found.
Method NamespaceUtils.findAllNamespaces
does not work on the default "simple" elements, however, because "simple" elements do not know their ancestry. To that extent, yaidom
offers so-called "indexed" elements, that do know their ancestry. Like "simple" elements, "indexed" elements are immutable, because they are just wrappers around a root as "simple" element along
with an "index" into that element tree. The "indexed" and "simple" elements also share most of the query API, in particular the ScopedElemApi
query API trait.
Let's now implement FRIS rule 2.1.7, but only for the sample XBRL instance:
val xbrliDocumentENameExtractor: DocumentENameExtractor = {
// Not complete, but good enough for this example!
new DocumentENameExtractor {
def findElemTextENameExtractor(elem: indexed.Elem): Option[TextENameExtractor] = elem.resolvedName match {
case EName(Some(xbrliNs), "measure") if elem.path.containsName(EName(xbrliNs, "unit")) =>
Some(SimpleTextENameExtractor)
case EName(Some(xbrldiNs), "explicitMember") =>
Some(SimpleTextENameExtractor)
case _ => None
}
def findAttributeValueENameExtractor(elem: indexed.Elem, attributeEName: EName): Option[TextENameExtractor] = elem.resolvedName match {
case EName(Some(xbrldiNs), "explicitMember") if attributeEName == EName("dimension") =>
Some(SimpleTextENameExtractor)
case _ => None
}
}
}
val indexedDoc = indexed.Document(doc)
val namespaceUrisDeclared = indexedDoc.documentElement.scope.inverse.keySet
import NamespaceUtils._
// Check that the used namespaces are almost exactly those declared in the root element (approximately rule 2.1.7)
val companyNs = "http://www.example.com/company"
val usedNamespaces =
findAllNamespaces(indexedDoc.documentElement, xbrliDocumentENameExtractor).diff(Set(xmlNs))
// The "company namespace" is an unused namespace in our sample XBRL instance
require(usedNamespaces == namespaceUrisDeclared.diff(Set(companyNs)))
Although yaidom itself has no XML Schema awareness, yaidom can still be useful in a context where schema-awareness is needed. For example, Saxon-EE NodeInfo objects can be wrapped as yaidom trees, thus getting the best of Scala Collections processing and Saxon-EE XML and XML Schema support.
Let's now remove the unused namespaces (the "company" namespace in this example), and compare the result with the original XBRL instance. Yet how do we compare
two XML trees (as "simple" elements) for equality? In order to do so, note that namespace prefixes are irrelevant to equality comparisons, but namespace URIs do count.
(Be careful with prefixes in text content and attribute values!) Yaidom offers an XML element implementation in which namespace prefixes do not occur. These elements are
called "resolved" elements. They share much of the same query API with "simple" and "indexed" elements, but not all of it. After all, "resolved" elements do not know
about namespace prefixes, so they do not know about qualified names. Therefore they do not mix in the ScopedElemApi
trait, but they do mix in traits like
ElemApi
and HasTextApi
, that is, all traits extended by ScopedElemApi
that do not know about qualified names. Hence, "resolved"
elements still have much of the yaidom query API in common with "simple" and "indexed" elements.
The following code strips unused namespaces, and shows that the result is the same, when comparing the trees as "resolved" elements.
val editedRootElem =
stripUnusedNamespaces(indexedDoc.documentElement, xbrliDocumentENameExtractor)
val areEqual =
resolved.Elem(indexedDoc.document.documentElement) == resolved.Elem(editedRootElem)
println(areEqual) // prints true
Above, all XBRL instance processing was coded as normal XML processing, mostly using yaidom "simple" and "indexed" elements. That's not very convenient. It would be nice if we could talk about contexts, units, facts etc., instead of just XML elements that happen to be contexts, units, facts, etc. In general, it would be nice if yaidom would make it easy to support custom XML dialects. That is indeed the case. We already knew that yaidom is extensible, in that new element implementations offering the same yaidom query API can easily be added. Yet, what's more, yaidom also facilitates a "yaidom querying experience" for custom XML dialects, such as XBRL instances (or DocBook files, or Maven POM files, or any other XML dialect described by schemas).
To that end, yaidom offers the SubtypeAwareElemApi
query API trait. Whereas the ElemApi
trait offers querying for child/descendant/descendant-or-self
elements, trait SubtypeAwareElemApi
extends this to class hierarchies (for XML dialects), offering querying for child/descendant/descendant-or-self elements of specific
sub-types of the root class of the class hierarchy.
In this XBRL instance class hierarchy we can see this action. Each part of an XBRL
instance is of type XbrliElem
or a sub-type. Common sub-types are those for contexts, units, item facts, tuple facts, and, of course, XBRL instances themselves.
Super-type XbrliElem
mixes in traits ScopedElemApi
and SubtypeAwareElemApi
. Trait ScopedElemApi
offers the most common
yaidom element query API, as we know, and trait SubtypeAwareElemApi
makes it easy to query for elements of specific types, with little boilerplate. The latter is used
internally in the code of the XbrliElem
class hierarchy, but can also be used in client code, if need be.
For the remaining FRIS validations in this article, we will use the XbrliElem
class hierarchy.
Consider FRIS rule 2.1.10. It states that there is a specific expected order of the child elements of the root element. One way to code that is as follows:
// Assume xbrlInstance variable of type XbrlInstance
val remainingChildElems =
xbrlInstance.findAllChildElems dropWhile {
case e: SchemaRef => true
case e => false
} dropWhile {
case e: LinkbaseRef => true
case e => false
} dropWhile {
case e: RoleRef => true
case e => false
} dropWhile {
case e: ArcroleRef => true
case e => false
} dropWhile {
case e: XbrliContext => true
case e => false
} dropWhile {
case e: XbrliUnit => true
case e => false
} dropWhile {
case e: Fact => true
case e => false
} dropWhile {
case e: FootnoteLink => true
case e => false
}
require(remainingChildElems.isEmpty)
Now consider FRIS rule 2.4.2 stating that all contexts must be used. It is also checked that all context references indeed refer to existing contexts. Note in this case how friendly the XBRL instance model is compared to raw XML elements:
val contextIds = xbrlInstance.allContextsById.keySet
val usedContextIds = xbrlInstance.findAllItems.map(_.contextRef).toSet
require(usedContextIds.subsetOf(contextIds))
// Oops, some contexts are not used, namely I-2004, D-2007-LI-ALL and I-2003
println(contextIds.diff(usedContextIds))
The next rule is more complex. FRIS rule 2.4.1 states that S-equal contexts should not occur. S-equality ("structural equality") is defined in the Core XBRL specification. A good implementation of S-equality requires type information. Therefore Saxon-EE backed yaidom wrappers would be a good choice. A very naive approximation is given below:
def transformContextForSEqualityComparison(context: XbrliContext): resolved.Elem = {
// Ignoring "normalization" of dates and QNames, as well as order of dimensions etc.
val elem = context.indexedElem.elem.copy(attributes = Vector())
resolved.Elem(elem).coalesceAndNormalizeAllText.removeAllInterElementWhitespace
}
Then rule 2.4.1 applied to our XBRL instance is as follows:
val contextsBySEqualityGroup =
xbrlInstance.allContexts.groupBy(e => transformContextForSEqualityComparison(e))
require(contextsBySEqualityGroup.size == xbrlInstance.allContexts.size)
As we can see, the more complex the rules, the more we profit from the fact that all code is Scala code, and that there is no needed effort in bridging between Scala and XSLT, for example. The Scala language, its Collections API, and yaidom form a powerful combination.
Finally, consider FRIS rule 2.8.3, stating that concepts are either top-level or nested in tuples, but not both. Using the XBRL instance model, the code is simple:
val topLevelConceptNames = xbrlInstance.allTopLevelFactsByEName.keySet
val nestedConceptNames =
xbrlInstance.allTopLevelTuples.flatMap(_.findAllFacts).map(_.resolvedName).toSet
require(topLevelConceptNames.intersect(nestedConceptNames).isEmpty)
In this article, the yaidom Scala XML query library was introduced. We used examples from XBRL. It turned out that Scala, its Collections API, and the yaidom library form a powerful precise XML processing "stack". This "stack" is even more powerful when using custom mature yaidom "backends" as Saxon-EE. It also turned out that yaidom makes it easy to support custom XML dialects (such as XBRL instances), offering more type-safety and leading to less boilerplate. The extensibility of yaidom (in more than 1 way) is one of its strengths, along with its precise namespace support and uniform precise element query API (offered by numerous XML "backends").
The FRIS rule examples show that a programming language like Scala is a natural fit for implementing those rules. Had we used XSLT or XQuery instead, how would we easily have found unused namespaces, for example? Moreover, how would we have supported custom XML dialects in the same way that yaidom facilitates such support?
The examples only used XBRL instances. These instances are described by XBRL taxonomies. Such taxonomies have to obey many rules as well. Taxonomies typically span many files, and their validation is usually much more complex than instance validation. The advantages of using a "Scala yaidom XML stack" would even be greater than for XBRL instances.
As a concluding remark, yaidom is used in production code developed at www.ebpi.nl. Its usage in several projects has certainly helped it mature. I want to thank my colleagues Jan-Paul van der Velden, Andrea Desole, Johan Walters and Nicholas Evans for their valuable feedback on earlier versions of yaidom.


Aryzta sinks on further revenue fall
Shares in Cuisine de France owner Aryzta fell by over 4% on the back of the Swiss-Irish baked goods group posting a further revenue decline.
Aryzta said it generated total group revenues of just under €844m for the first quarter of its financial year, which covers the three months to the end of October. A 2.1% fall on the same quarter last year.
Although well flagged, a 6.1% fall in organic revenue in North America — Aryzta’s problem market for some time — was a key driver of overall decline. In the rest of the world, Aryzta said organic revenue was up 7.5% in the quarter, and it expects to see improvements.
Aryzta’s shares, which have been battered over the past 12 months, were down by over 6% at one point before paring some losses.
Chief executive Kevin Toland said second-quarter revenue in North America will remain negative, but the second half should see more positivity as new contract volumes are realised. He also said further underlying earnings growth, at a group level, are expected.


 Love Your Tees.
 Excludes Clearance, Aerie & Other Items.
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo18l?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Shop Men
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo13?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Shop Women
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo15?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
***********************************************************
Free Shipping On Everything Through 4.28
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo18p?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
***********************************************************
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo25?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Forward
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo8?RAF_TRACK=&AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Become A Fan On Facebook
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo23?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Follow Us On Twitter
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo26?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Instagram
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo6?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Pinterest
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo24?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
shopkick
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo1?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
***********************************************************
Mobile Alerts
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo7?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Come Hang Out…Find A Store
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo22?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Download The AE App
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo20?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Earn Up To 40% Off
Sign Up For AEREWARDS
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo21?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
***********************************************************
Automatic free shipping at AE.com valid for orders
placed through April 28, 2013 at 11:59 PM PDT, and shipping to U.S. &
Canadian addresses. Offer not valid on international orders. This offer
is good for U.S. standard shipping within 3 to 7 business days pending
credit approval and authorization. Orders to Canadian addresses will be
shipped via Canada post within 6 to 10 business days to urban areas and
15 to 22 business days to rural areas. This free shipping offer can be
combined with other discount offers. No discount code is required at the
Aerie.com shopping bag. Not applicable toward previously purchased
merchandise. All deliveries are pending credit approval, merchandise
availability, delivery and weather conditions. Free shipping promotion
and associated terms & conditions subject to change at AE’s sole
discretion.
*Present printable or mobile coupon at time of merchandise purchase in
AE or AEO Factory Brand US and Canada stores or enter discount code
20496091 on ae.com, aerie.com or aeofactory.com beginning April 26, 2013
at 6:00 A.M EDT through April 28, 2013 at 11:59 P.M PDT to get 20% off
your purchase. This 20% off offer cannot be combined with other discount
offers. Discount applies to AE.com, Aerie.com, aeofactory.com, AE and
AEO Factory Brand stores located in US and Canada merchandise costs
only, not tax and shipping & handling costs. This discount is not
redeemable for cash, nor applicable toward previously purchased
merchandise. Excludes Aerie Store, Aerie undies, AE clearance, Aerie
clearance, AEO Factory 40% off shops and merchandise from these brands:
Adidas, Bass, BC, Bed Stu, Birkenstock, Chronicle, Clarks, Creative Rec,
DV, Eastland, GOLA, Havaianas, Keds, Me Too, MIA, Minnetonka, New
Balance, New Balance/PF Flyers, Old Soles, Palladium, Pro Keds, Reebok,
Saucony, Seychelles, Sperry, Steve Madden, Sweet Shoes, Tailgate,
Timberland, Tretorn, Volley and college and pro merchandise. Discount
promotion and associated terms and conditions subject to change at AE’s
sole discretion.
**Beginning April 20, 2013 at 3:00 am EDT through April 30, 2013 at
11:59 pm PDT, buy any AE or AEO FACTORY item and get a second AE or AEO
Factory item of equal or lesser value for 50% off. When adding multiple
products of different prices to the same order, the discount is applied
to the lowest priced qualifying item(s). Discount applies to AE and AEO
Factory merchandise costs only, not tax and shipping & handling costs.
Not applicable toward previously purchased merchandise. Excludes AE
clearance, AEO Factory 40% off shops, Aerie and merchandise from these
brands: Adidas, Bass, BC, Bed Stu, Birkenstock, Chronicle, Clarks,
Creative Rec, DV, Eastland, GOLA, Havaianas, Keds, Me Too, MIA,
Minnetonka, New Balance, New Balance/PF Flyers, Old Soles, Palladium,
Pro Keds, Reebok, Saucony, Seychelles, Sperry, Steve Madden, Sweet
Shoes, Tailgate, Timberland, Tretorn, Volley and college and pro
merchandise. Discount promotion and associated terms and conditions
subject to change at AE’s sole discretion.
© 2013 AEO Management Co. All Rights Reserved.
***********************************************************
Update Your Email Address:
<EMAIL_ADDRESS>Sign Up For Email:
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo19?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Privacy Policy:
http://e.ae.com/a/tBRe9nxB7uylYB8yK2CNuZn6SWr/aeo17?AAP_FLAG=N&CUSTOMER_NBR=1235023277209
Add<EMAIL_ADDRESS>to your address book.
Our mailing address: 77 Hot Metal Street, Pittsburgh, PA 15203


Shah Rukh Khan to begin shooting for Atlee's action drama in March 2020?
by FilmfareSpeculations have been rife regarding Shah Rukh Khan’s next outing. Reports suggest that the superstar might soon be collaborating with South filmmaker, Atlee, for a film titled, Sanki. While the film will reportedly go on the floors in March 2020, an official announcement will be made just before the shoot begins. It is also reported that it’ll be an out-an-out-action film, which will feature SRK in a never- seen-before avatar.
When Atlee was asked about working with SRK, he told the daily, "I have a huge amount of love and respect for SRK sir and he also loves my work. Soon, hopefully, we will do something about it."
Telugu writer-director, Harish Shankar stated that more than a writer-director, he is waiting for this to happen as he is a huge fan of SRK. He wishes to see the superstar do action.
Reportedly, Shah Rukh Khan and Atlee's next is said to be an original one. SRK had previously said that he has been working on a lot of scripts and is yet to finalise them. SRK also assured that he would make the big announcement within two to three months.
All eyes on March 2020!


Clovis Tree Care
Professional tree care by a certified arborist. Serving Clovis, Fresno and the Central Valley for over 10 years.
Clovis Tree Care
Professional tree care by a certified arborist. Serving Clovis, Fresno and the Central Valley for over 10 years.
First-Rate Service
Providing our customers with a quality and worry free tree care experience. From big pines in shaver lake to japanese maples in the valley. Certified arborist Jared Schutz and crew are always here to help.
Tree Care
Tree care. shaping, reduction, thinning and restoration. Tree Removal and stump grinding.
Tree Selection & Planting
We can help you find the right tree that will thrive and plant it in the proper place.
Speciality Service
Root pruning, Root barrier installation, soil testing and fertilization programs and Fruit tree care.
Trees are the Answer
Trees provide Food, clean the air and provide oxygen, add beauty, shade and value to your property. Caring for them properly will help them live long healthy lives.
About Our Company
Clovis Tree Care provides the valley with a reliable professional tree care service. We work with residential customers with one tree to large commercial properties. For our residential customers we know that proper tree care is important. Trees aren't always planted in the right location and can potentially do a lot of damage. Before removal is an option we can help save your tree. Structural pruning methods and root pruning are just 2 ways to make your tree safe and worry free. For our commercial customers we have the tools to keep your trees looking good and safe. Proper pruning methods are important to help maintain the appearance and viability of your investment. We can customize a plan and budget that works for you.
We are a family owned and operated business. Our family moved to the valley in the 1940's and have been here since. We love the central valley and we love trees. We are licensed by the contractors state license board, #1051356, bonded and insured with both general liability and workers comp insurance and hold an arborist license with the International Society of Arboricultur, #WE-12303A.


Team
Team Structure
The team is divided into two groups of subsystems, mechanical and electrical. Our 50 members may be working/living/contributing in any of these subteams.
-
group4 Executive Positions
The electrical and software leads manage the electrical systems necessary for the car to function.
The chief engineer takes care of the mechanical systems and manages topics ranging from aerodynamics to frame design and packaging.
The captain monitors the progress of the enitre team. On the nontechnical side, the captain directs a business team and a publicity team.
-
settings13 Mechanical Subteams
- A Arms
- Arbs & Rockers
- Battery
- Enclosures
- Brakes
- Aero
- Pedal Box
- Powertrain
- R&D
- Suspension
- Wheel Packages
- Testing
- Cooling
Each subteam is lead by one member elected at the end of the previous year. They and the rest of the subteam is responsible for designing and manufacturing their part of the car. Each subteam works independently but together they all work to achieve a rolling chassis.
-
ev_station2 Electrical Subteams
Members of these subteams develops all the electronics and software necessary for the car to accelerate and drive during the competition. They divide up labor corresponding to separate projects and report back to their respective EE and CS lead.
The Electrical team designs and fabricates our custom dashboard, power electronics, battery management, vehicle control, and sensor boards.
The Software team programs all embedded systems on the car. Subteams also design and implement telemetry, post-processing, and control algorithms.
assignment2 Administrative DivisionsThe Business division manages the team's funds, overlooking all purchases made by the team and handling donations. With all this knowledge, they prepare for the cost static event at competition.
The Publicity division manages the website and social media of the team.
Roster
Cheyenne Hua Captain
Mechanical Engineering '19Elliot Owen Chief Engineer
Mechanical Engineering '18Suzanne O'Meara EE Lead
EECS '20Alan Alahmad Aerodynamics Lead
Aeronautics & Astronautics Engineering '18Asli Demir Aerodynamics Subteam, Buisness Lead
Mechanical Engineering '20Luke Kulik Aerodynamics Subteam
Aeronautics & Astronautics Engineering '19Amira Malik Aerodynamics Subteam
Class of '21Thomas Adebiyi Aerodynamics Subteam
Class of '21Fawaaz Shaffeeullah Aerodynamics Subteam
Class of '21Harriet Chiu Arbs & Rockers Lead
Mechanical Engineering '19Annetoinette Figueroa Arbs & Rockers Subteam
Class of '21William Harvey Suspension and Business Lead
Mechanical Engineering '18Maxwell Halkenhauser Pedal Box Lead
Class of '21Serena Grown-Haeberli Wheel Packages Lead
Mechanical Engineering '20Grace Hsu Wheel Packages Subteam
Class of '21Jeremy Noel Frame and R&D Lead
Mechanical Engineering '20Andrew Tsang R&D Subteam
Mechanical Engineering '18Joshua Kubiak R&D Subteam
Materials Science and Engineering '16Oliver MacNeely R&D Subteam
Class of '21Sam Bockman R&D Subteam
Mechanical Engineering '19Arnav Patel Frame Subteam
Class of '21Daniel Gonzalez Diaz Frame Subteam
Class of '21Terran Winter Fox Battery and Cooling Lead
Mechanical Engineering '18Ethan Perrin R&D Lead, Battery Subteam
Mechanical Engineering '20Luis Mora Testing and Brakes Lead
Mechanical Engineering '18Isabelle Liu Brakes Subteam
Mechanical Engineering '20Cat Yao Brakes Subteam
EECS '19Alvaro Melendez Enclosure Lead
Mechanical Engineering '19Sebastien Wah Enclosure Subteam
Mechanical Engineering '20Ishaan Govindarajan Enclosure Subteam
Class of '21Robert Silvestri Steering Lead
Mechanical Engineering '20Audrey Gaither A Arms Lead
Class of '21Sabrina Khan Powertrain Subteam
Aero Astro Engineering '20Skanda Koppula EE Subteam
EECS '17Tianye Chen EE Subteam
EECS '18Brandon John EE Subteam
Class of '21Cameron Ordone EE Subteam, Publicity Lead
EECS '19Rebecca McCabe EE Subteam
Class of '21Rod Bayliss III EE Subteam
EECS '20Henry Love EE Subteam
EECS '18August Trollbäck EE Subteam
Class of '21Matthew Ha EE Subteam
Class of '21Raymond Huffman EE Subteam
Class of '21Marcus Abate EE Subteam
Aero Astro Engineering '20Nick Stathas CS Lead
Class of '21Dani White CS Subteam
Class of '21Tenzin Ukyab CS Subteam, Publicity Lead
EECS '20Sebastián López-Cot CS Subteam
EECS '19Join
If you are a MIT undergraduate and want to join the team email us at<EMAIL_ADDRESS>Look out for us at the Activities Midway, emails about new member meetings, and at the Edgerton Center open house at the beginning of the school year.


18LEH101J
English
18PYB103J
Semiconductor Physics
18MAB101T
Calculus and Linear Algebra
18EES102J
Basic Electric & Electronics Engg.
18CY101J
Chemistry
18LEH10XJ
German/French
15CSS101J
Programming for Problem Solving
Drop the blocks into the page, edit content inline and publish - no technical skills required.
Mobirise gives you the freedom to develop as many websites as you like given the fact that it is a desktop app.
Mobirise offers several themes that include sliders, galleries, article blocks and many more.
Drop the blocks into the page, edit content inline and publish - no technical skills required.
Mobirise gives you the freedom to develop as many websites as you like given the fact that it is a desktop app.


Package algorithms.matrix
Class BlockMatrixIsometric
- java.lang.Object
-
- algorithms.matrix.BlockMatrixIsometric
-
public class BlockMatrixIsometric extends java.lang.Object
a class to hold a matrix that is partitioned into blocks of the same size.- Author:
- nichole
-
-
Constructor Summary
Constructors Constructor Description BlockMatrixIsometric(double[][] a, int bSize0, int bSize1)
constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToBlock(double[][] b, int blockNumber0, int blockNumber1)
add block b to internal matrix, pointwise, for (blockNumber0, blockNumber1).void
addToColumnBlock(double[] b, int blockNumber0, int blockNumber1)
add column block b to internal matrix, pointwise, for (blockNumber0, blockNumber1).void
addToRowBlock(double[] b, int blockNumber0, int blockNumber1)
add row block b to internal matrix, pointwise, for (blockNumber0, blockNumber1).BlockMatrixIsometric
copy()
(package private) void
fill(double value)
double[][]
getA()
get the entire matrix of this instance.void
getBlock(double[][] b, int blockNumber0, int blockNumber1)
get values in internal matrix a for block number (blockNumber0, blockNumber1) and set them into the given block b.double[][]
getBlock(int blockNumber0, int blockNumber1)
get values in internal matrix a for block number (blockNumber0, blockNumber1)int
getBlockSize0()
get the size of dimension 0 of the blocks in this instanceint
getBlockSize1()
get the size of dimension 1 of the blocks in this instancevoid
getColumnBlock(double[] b, int blockNumber0, int blockNumber1)
get values in internal matrix a for block number (blockNumber0, blockNumber1) and set them into the given column block b.void
getRowBlock(double[] b, int blockNumber0, int blockNumber1)
get values in internal matrix a for block number (blockNumber0, blockNumber1) and set them into the given row block b.void
reset()
set all values to 0void
set(BlockMatrixIsometric b)
set internal contents to equal those of the given b where b has the same dimensions and block size.void
setBlock(double[][] b, int blockNumber0, int blockNumber1)
set values in internal matrix a for block number (blockNumber0, blockNumber1) to the given block b.void
setColumnBlock(double[] b, int blockNumber0, int blockNumber1)
set values in internal matrix a for block number (blockNumber0, blockNumber1) to the given column block b which is a single dimension array.void
setRowBlock(double[] b, int blockNumber0, int blockNumber1)
set values in internal matrix a for block number (blockNumber0, blockNumber1) to the given row block b which is a single dimension array.void
subtractFromBlock(double[][] b, int blockNumber0, int blockNumber1)
subtract block b from internal matrix, pointwise, for (blockNumber0, blockNumber1).void
subtractFromColumnBlock(double[] b, int blockNumber0, int blockNumber1)
subtract column block b from internal matrix, pointwise, for (blockNumber0, blockNumber1).void
subtractFromRowBlock(double[] b, int blockNumber0, int blockNumber1)
subtract row block b from internal matrix, pointwise, for (blockNumber0, blockNumber1).
-
-
-
Constructor Detail
-
BlockMatrixIsometric
public BlockMatrixIsometric(double[][] a, int bSize0, int bSize1)
constructor. The matrix a is not copied in. This is a pass-by-reference constructor.- Parameters:
a
-bSize0
- block size along the first dimension (rows)bSize1
- block size along the second dimension (columns)
-
-
Method Detail
-
reset
public void reset()
set all values to 0
-
fill
void fill(double value)
-
setBlock
public void setBlock(double[][] b, int blockNumber0, int blockNumber1)
set values in internal matrix a for block number (blockNumber0, blockNumber1) to the given block b. b must be the same size as the block size of this instance.- Parameters:
b
- a given block of values to replace a block of this instance with.blockNumber0
- the number of the block along the first dimension, that is, rows.blockNumber1
- the number of the block along the second dimension, that is, columns.
-
setRowBlock
public void setRowBlock(double[] b, int blockNumber0, int blockNumber1)
set values in internal matrix a for block number (blockNumber0, blockNumber1) to the given row block b which is a single dimension array. b.length must equal this.bSize1, and this.bSize0 must equal 1.- Parameters:
b
- a given block of values in a single dimension array to replace a block of this instance with.blockNumber0
- the number of the block along the first dimension, that is, rows.blockNumber1
- the number of the block along the second dimension, that is, columns.
-
setColumnBlock
public void setColumnBlock(double[] b, int blockNumber0, int blockNumber1)
set values in internal matrix a for block number (blockNumber0, blockNumber1) to the given column block b which is a single dimension array. b.length must equal this.bSize0, and this.bSize1 must equal 1.- Parameters:
b
- a given block of values in a single dimension array to replace a block of this instance with.blockNumber0
- the number of the block along the first dimension, that is, rows.blockNumber1
- the number of the block along the second dimension, that is, columns.
-
getBlock
public double[][] getBlock(int blockNumber0, int blockNumber1)
get values in internal matrix a for block number (blockNumber0, blockNumber1)- Parameters:
blockNumber0
- the number of the block along the first dimension, that is, rows.blockNumber1
- the number of the block along the second dimension, that is, columns.- Returns:
- contents of (blockNumber0, blockNumber1) of matrix a in this instance.
-
getBlock
public void getBlock(double[][] b, int blockNumber0, int blockNumber1)
get values in internal matrix a for block number (blockNumber0, blockNumber1) and set them into the given block b.- Parameters:
b
- the output block for the contents of (blockNumber0, blockNumber1) of matrix a in this instance.blockNumber0
- the number of the block along the first dimension, that is, rows.blockNumber1
- the number of the block along the second dimension, that is, columns.
-
getRowBlock
public void getRowBlock(double[] b, int blockNumber0, int blockNumber1)
get values in internal matrix a for block number (blockNumber0, blockNumber1) and set them into the given row block b.- Parameters:
b
- the output row block for the contents of (blockNumber0, blockNumber1) of matrix a in this instance.blockNumber0
- the number of the block along the first dimension, that is, rows.blockNumber1
- the number of the block along the second dimension, that is, columns.
-
getColumnBlock
public void getColumnBlock(double[] b, int blockNumber0, int blockNumber1)
get values in internal matrix a for block number (blockNumber0, blockNumber1) and set them into the given column block b.- Parameters:
b
- the output column block for the contents of (blockNumber0, blockNumber1) of matrix a in this instance.blockNumber0
- the number of the block along the first dimension, that is, rows.blockNumber1
- the number of the block along the second dimension, that is, columns.
-
addToBlock
public void addToBlock(double[][] b, int blockNumber0, int blockNumber1)
add block b to internal matrix, pointwise, for (blockNumber0, blockNumber1). b must be the same size as the block size of this instance.- Parameters:
b
- a given block of values to add to a block of this instance.blockNumber0
- the number of the block along the first dimension, that is, rows.blockNumber1
- the number of the block along the second dimension, that is, columns.
-
addToColumnBlock
public void addToColumnBlock(double[] b, int blockNumber0, int blockNumber1)
add column block b to internal matrix, pointwise, for (blockNumber0, blockNumber1). b must be the same size as the block size of this instance, including this.bSize1 must equal 1 at construction.- Parameters:
b
- a given column block of values to add to a block of this instance.blockNumber0
- the number of the block along the first dimension, that is, rows.blockNumber1
- the number of the block along the second dimension, that is, columns.
-
addToRowBlock
public void addToRowBlock(double[] b, int blockNumber0, int blockNumber1)
add row block b to internal matrix, pointwise, for (blockNumber0, blockNumber1). b must be the same size as the block size of this instance, including this.bSize0 must equal 1 at construction.- Parameters:
b
- a given row block of values to add to a block of this instance.blockNumber0
- the number of the block along the first dimension, that is, rows.blockNumber1
- the number of the block along the second dimension, that is, columns.
-
subtractFromBlock
public void subtractFromBlock(double[][] b, int blockNumber0, int blockNumber1)
subtract block b from internal matrix, pointwise, for (blockNumber0, blockNumber1). b must be the same size as the block size of this instance.- Parameters:
b
- a given block of values to replace a block of this instance with.blockNumber0
- the number of the block along the first dimension, that is, rows.blockNumber1
- the number of the block along the second dimension, that is, columns.
-
subtractFromColumnBlock
public void subtractFromColumnBlock(double[] b, int blockNumber0, int blockNumber1)
subtract column block b from internal matrix, pointwise, for (blockNumber0, blockNumber1). b must be the same size as the block size of this instance, including this.bSize1 must equal 1 at construction.- Parameters:
b
- a given column block of values to subtract from a block of this instance.blockNumber0
- the number of the block along the first dimension, that is, rows.blockNumber1
- the number of the block along the second dimension, that is, columns.
-
subtractFromRowBlock
public void subtractFromRowBlock(double[] b, int blockNumber0, int blockNumber1)
subtract row block b from internal matrix, pointwise, for (blockNumber0, blockNumber1). b must be the same size as the block size of this instance, including this.bSize0 must equal 1 at construction.- Parameters:
b
- a given row block of values to subtract from a block of this instance.blockNumber0
- the number of the block along the first dimension, that is, rows.blockNumber1
- the number of the block along the second dimension, that is, columns.
-
copy
public BlockMatrixIsometric copy()
- Returns:
-
set
public void set(BlockMatrixIsometric b)
set internal contents to equal those of the given b where b has the same dimensions and block size.- Parameters:
b
-
-
getA
public double[][] getA()
get the entire matrix of this instance. Note that this is a reference to the instance and is not a copy of it, so modifications of the returned matrix affect this instance too.- Returns:
- the a
-
getBlockSize0
public int getBlockSize0()
get the size of dimension 0 of the blocks in this instance- Returns:
- the bSize0
-
getBlockSize1
public int getBlockSize1()
get the size of dimension 1 of the blocks in this instance- Returns:
- the bSize1
-
-


WITNESS LIST State Affairs Committee April 14, 1997-1:00P HB 1309 For: Claude Hunter (Self) Janee Briesemeister (Consumers Union) Jon Gardner (IBEW) Thomas Cormier (Market Basket) Tom "Smitty" Smith (Public Citizen) Against: Curtis Seidlits (AECT) Helen Burt (AECT (TU Electric)) Rick Campbell (AECT) Registering, but not testifying: For: Karl Rabago (Environmental Def. Fund) Rick Levy (Tx AFL-CIO) HB 1807 For: A.E. Smith (Self) Ivan George Smith (Self) J.M. Hill (Self) Janee Briesemeister (Consumers Union) Karl R. Rabago (Self & EDF) Randall Chapman (Self) Reggie James (CUSW Regional Office) Rep. Bosse (Self) Robert Reilley (Enron Corp.) Susan S. Pitman (ALAT) Tom "Smitty" Smith (Public Citizen's Member) Against: Curtis Seidlits (AECT, Inc.) Mark Zion (Self & TPPA) Stephanie Kroger (Texas CCE) On: Jim Fitzpatrick (Self & AARP) Registering, but not testifying: For: Marjorie N. Wood (Self) Against: Coyle Kelly (Center for E&ED) On: Bill M. Clayton (Self & AARPCCTF) Nieves Lopez (TDHCA) HB 2148 For: Michael Leach (Nat. Assn. ESCOs) Richard Sperberg (Nat. Assn. ESCOs) Robert King (Nat. Assn. ESCOs) Against: Curtis Seidlits (AECT) Raymond Ehmer (AECT) Registering, but not testifying: For: Janee Briesemeister (Consumers Union) Jim Reynolds (Mechanical Contractors) Karl Rabago (Environmental Def. Fund) Stephanie Stromberg (Ind. Elect. Contractors) Susan Pitman (American Lung Assn.) Tom "Smitty" Smith (Public Citizen) HB 2416 For: Fred Buck (Tx Assn Real Est. Insp.) Larry Foser (Tx Assn Real Est. Insp.) Michael Crow (Tx Assn Real Est. Insp.) Rickey Hanna (Tx Assn Real Est. Insp.) Against: Ronald Walker (REALTORS) Registering, but not testifying: On: Janee Briesemeister (Consumers Union) HB 3386 For: Dan Laws (Rio Grande Elect. Coop.) Gary Leonard (Self) Rep. Gallego (Self) HB 3454 For: Randall Chapman (Self) Rep. Burnam (Self)


Nitrogen 2.x Documentation
Getting Started | API | Elements | Actions | Validators | Handlers | About
About Nitrogen
Table of Contents
1 Resources
- NitrogenProject.com - http://nitrogenproject.com
- Source Code - http://github.com/nitrogen/nitrogen
- Donations - http://pledgie.com/campaigns/2057
- Mailing List - http://groups.google.com/group/nitrogenweb
- Bugs and Issues - http://nitrogen.lighthouseapp.com
2 Versions
Nitrogen relies on some or all of the following software:
- Erlang R13B03 or later - http://erlang.org
- SimpleBridge - Common interface to Erlang HTTP servers.
-
mochiweb - HTTP Server (Optional)
- SVN Repo: https://github.com/nitrogen/mochiweb
-
webmachine - HTTP Server (Optional)
- SVN Repo: https://github.com/basho/webmachine
-
yaws - HTTP Server - http://yaws.hyber.org/ (Optional)
- Source: https://yaws.hyber.org/download/
- Sync - Automatically recompile changed Erlang modules.
- JQuery 1.4.2 - http://jquery.com
- JQuery UI 1.8rc2 - http://jqueryui.com
- Live Validation 1.3 - http://livevalidation.com/
3 Thanks
Sincere thanks to all the people who have helped make Nitrogen great, including:
- Rusty Klophaus (@rklophaus)
- Chris Williams (@voodootikigod)
- Joel Reymont (@wagerlabs)
- Tom McNulty
- Martin Scholl (@zeit_geist)
- Dave Peticolas
- Jon Gretar Borgthorsson (@jongretar)
- Dan Bravender (@dbravender)
- Taavi Talvik
- Torbjorn Tornkvist (@kruskakli)
- Marius A. Eriksen (@marius)
- Michael Mullis
- John Dragos
- Benjamin Nortier (@bjnortier)
- Jay Doane
- Robert Schonberger
- Yurii Rashkovskii (@yrashk)
- Ville Koivula
Roughly sorted by date of contribution. Send your twitter handles to @rklophaus
4 Documentation
This documentation is created using org-mode. To contribute updates
or corrections, contact Rusty Klophaus (@rklophaus) or fork and
update the code in http://github.com/nitrogen/nitrogen under the
./docs/org-mode
directory
Date: 2011-02-01 08:21:50 EST
HTML generated by org-mode 7.01h in emacs 24


Um, well it's a delorean, right? Yeah okay. Wow, ah Red, you look great. Everything looks great. 1:24, I still got time. Oh my god. No, no not again...
Why that's me, look at me, I'm an old man. Oh, you make it sound so easy. I just, I wish I wasn't so scared. What were you doing in the middle of the street, a kid your age. Doc? Wrecked?
Why that's me, look at me, I'm an old man. Oh, you make it sound so easy. I just, I wish I wasn't so scared. What were you doing in the middle of the street, a kid your age. Doc? Wrecked?
Why that's me, look at me, I'm an old man. Oh, you make it sound so easy. I just, I wish I wasn't so scared. What were you doing in the middle of the street, a kid your age. Doc? Wrecked?


Afghan forces foil militants bid to detonate multiple IEDs in Khost
by Khaama PressThe Afghan forces thwarted militants bid to detonate multiple Improvised Explosive Devices in South-eastern Khost province.
According to a statement released by Ministry of Interior, the security forces discovered and defused 8 IEDs during the operations which they launched few days ago in Musa Khe district.
The statement further added that the militants had planted the IEDs on main roads frequented by ordinary civilians.
Some of the IEDs also carried ‘illusory’ messages about paradise, the Ministry of Interior added in its statement.
Taliban militants and militants of the other groups frequently use improvised explosives as the weapon of their choice to target the security personnel and government officials.
However, the roadside bombings often inflict casualties on ordinary civilians.
Author
-
The Khaama Press News Agency is the leading and largest English news service for Afghanistan with over 3 million hits a month. Independent authors/columnists and experts are welcomed to contribute stories, opinions and editorials. Send stories to news@khaama.com.


404: file not found.
The page you are looking for couldn't be found.
You may have mistyped the address, or we might have moved or deleted the page.
The page you are looking for couldn't be found.
You may have mistyped the address, or we might have moved or deleted the page.


Sources: U.S. Department of Homeland Security and U.S. Census Bereau
The plots have different dimensions and scales but here they have been normalized to better expose relationships in trends. Move your mouse over the plots to obtain the individual values.


class CookieJar
Methods
| void |
__construct(Request $request, Encrypter $encrypter)
Create a new cookie manager instance. |
|
| bool |
has(string $key)
Determine if a cookie exists and is not null. |
|
| mixed |
get(string $key, mixed $default = null)
Get the value of the given cookie. |
|
| Cookie |
make(string $name, string $value, int $minutes, string $path = null, string $domain = null, bool $secure = false, bool $httpOnly = true)
Create a new cookie instance. |
|
| Cookie |
forever(string $name, string $value, string $path = null, string $domain = null, bool $secure = false, bool $httpOnly = true)
Create a cookie that lasts "forever" (five years). |
|
| Cookie |
forget(string $name)
Expire the given cookie. |
|
| void |
setDefaultPathAndDomain(string $path, string $domain)
Set the default path and domain for the jar. |
|
| Request |
getRequest()
Get the request instance. |
|
| Encrypter |
getEncrypter()
Get the encrypter instance. |
Details
at line 46
public void
__construct(Request $request, Encrypter $encrypter)
Create a new cookie manager instance.
at line 58
public bool
has(string $key)
Determine if a cookie exists and is not null.
at line 70
public mixed
get(string $key, mixed $default = null)
Get the value of the given cookie.
at line 112
public Cookie
make(string $name, string $value, int $minutes, string $path = null, string $domain = null, bool $secure = false, bool $httpOnly = true)
Create a new cookie instance.
at line 137
public Cookie
forever(string $name, string $value, string $path = null, string $domain = null, bool $secure = false, bool $httpOnly = true)
Create a cookie that lasts "forever" (five years).
at line 148
public Cookie
forget(string $name)
Expire the given cookie.
at line 172
public void
setDefaultPathAndDomain(string $path, string $domain)
Set the default path and domain for the jar.
at line 184
public Request
getRequest()
Get the request instance.
at line 194
public Encrypter
getEncrypter()
Get the encrypter instance.