Layer Mechanics¶
ML-Ensemble is designed to provide an easy user interface. But it is also designed to be extremely flexible, all the wile providing maximum concurrency at minimal memory consumption. The lower-level API that builds the ensemble and manages the computations is constructed in as modular a fashion as possible.
The low-level API introduces a computational graph-like environment that you can
directly exploit to gain further control over your ensemble. In fact, building
your ensemble through the low-level API is almost as straight forward as using
the high-level API. In this tutorial, we will walk through how to use the
Group
and Layer
classes to fit several learners.
Suppose we want to fit several learners. The :ref:` learner tutorial <learner_tutorial` showed us how to fit a single learner, and so one approach would be to simple iterate over our learners and fit them one at a time. This however is a very slow approach since we don’t exploit the fact that learners can be trained in parallel. Moreover, any type of aggregation, like putting all predictions into an array, would have to be done manually.
The Layer API¶
To parallelize the implementation, we can use the Layer
class. A layer is
a handle that will run any number of Group
instances attached to it in parallel. Each
group in turn is a wrapper around a indexer-transformers-estimators
triplet.
Basics¶
So, to fit our two learners in parallel, we first need a Group
object to
handle them.
from mlens.parallel import Layer, Group, make_group, run
from mlens.utils.dummy import OLS, Scale
from mlens.index import FoldIndex
indexer = FoldIndex(folds=2)
group = make_group(indexer, [OLS(1), OLS(2)], None)
This group
object is now a complete description of how to fit our two
learners using the prescribed indexing method.
To train the estimators, we need feed the group to a Layer
instance:
import numpy as np
np.random.seed(2)
X = np.arange(20).reshape(10, 2)
y = np.random.rand(10)
layer = Layer(stack=group)
print(
run(layer, 'fit', X, y, return_preds=True)
)
Out:
[[ 1.3665537 2.3665535]
[ 5.363353 10.363353 ]
[ 9.360152 18.360151 ]
[13.356951 26.35695 ]
[17.35375 34.35375 ]
[21.486897 42.486897 ]
[25.524712 50.52471 ]
[29.562525 58.562527 ]
[33.60034 66.60034 ]
[37.638153 74.63815 ]]
To use some preprocessing before fitting the estimators, we can use the
transformers
argument when creating our group
:
group = make_group(indexer, [OLS(1), OLS(2)], [Scale()])
layer = Layer(stack=group)
print(
run(layer, 'fit', X, y, return_preds=True)
)
Out:
[[-27.977594 -55.977592]
[-23.980795 -47.980793]
[-19.983995 -39.983997]
[-15.987196 -31.987196]
[-11.990397 -23.990396]
[ 12.113442 24.113443]
[ 16.151257 32.151257]
[ 20.189072 40.18907 ]
[ 24.226885 48.226887]
[ 28.2647 56.264698]]
Multitasking¶
If we want our estimators two have different preprocessing, we can easily achieve this either by specifying different cases when making the group, or by making two separate groups. In the first case:
group = make_group(
indexer,
{'case-1': [OLS(1)], 'case-2': [OLS(2)]},
{'case-1': [Scale()], 'case-2': []}
)
layer = Layer(stack=group)
print(
run(layer, 'fit', X, y, return_preds=True)
)
Out:
[[-27.977594 2.3665535]
[-23.980795 10.363353 ]
[-19.983995 18.360151 ]
[-15.987196 26.35695 ]
[-11.990397 34.35375 ]
[ 12.113442 42.486897 ]
[ 16.151257 50.52471 ]
[ 20.189072 58.562527 ]
[ 24.226885 66.60034 ]
[ 28.2647 74.63815 ]]
In the latter case:
groups = [
make_group(indexer, OLS(1), Scale()), make_group(indexer, OLS(2), None)
]
layer = Layer(stack=groups)
print(
run(layer, 'fit', X, y, return_preds=True)
)
Out:
[[-27.977594 2.3665535]
[-23.980795 10.363353 ]
[-19.983995 18.360151 ]
[-15.987196 26.35695 ]
[-11.990397 34.35375 ]
[ 12.113442 42.486897 ]
[ 16.151257 50.52471 ]
[ 20.189072 58.562527 ]
[ 24.226885 66.60034 ]
[ 28.2647 74.63815 ]]
Which method to prefer depends on the application, but generally, it is
preferable to put all transformers and all estimators belonging to a
given indexing strategy into one group
instance as it is easier to
separate groups based on indexer and using cases to distinguish between
different preprocessing pipelines.
Now, suppose we want to do something more exotic, like using different indexing strategies for different estimators. This can easily be achieved by creating groups for each indexing strategy we want:
groups = [
make_group(FoldIndex(2), OLS(1), Scale()),
make_group(FoldIndex(4), OLS(2), None)
]
layer = Layer(stack=groups)
print(
run(layer, 'fit', X, y, return_preds=True)
)
Out:
[[-27.977594 2.4661984]
[-23.980795 10.449842 ]
[-19.983995 18.433487 ]
[-15.987196 26.33962 ]
[-11.990397 34.341675 ]
[ 12.113442 42.343727 ]
[ 16.151257 50.33181 ]
[ 20.189072 58.324955 ]
[ 24.226885 66.458244 ]
[ 28.2647 74.47614 ]]
Some care needs to be taken here: if indexing strategies do not return the same number of rows, the output array will be zero-padded.
from mlens.index import BlendIndex
groups = [
make_group(FoldIndex(2), OLS(1), None),
make_group(BlendIndex(0.5), OLS(1), None)
]
layer = Layer(stack=groups)
print(
run(layer, 'fit', X, y, return_preds=True)
)
Out:
[[ 1.3665537 0. ]
[ 5.363353 0. ]
[ 9.360152 0. ]
[13.356951 0. ]
[17.35375 0. ]
[21.486897 21.486897 ]
[25.524712 25.524712 ]
[29.562525 29.562525 ]
[33.60034 33.60034 ]
[37.638153 37.638153 ]]
Note that even if mlens
indexer output different shapes, they preserve
row indexing to ensure predictions are consistently mapped to their respective
input. If you build a custom indexer, make sure that it uses a strictly
sequential (with respect to row indexing) partitioning strategy.
Layer features¶
A layer does not have to be specified all in one go; you can instantiate
a layer and push
and pop
to its stack
.
layer = Layer()
group = make_group(FoldIndex(4), OLS(), None)
layer.push(group)
If you push or pop to the stack, you must call fit
before you can
use the layer for prediction.
run(layer, 'fit', X, y)
group = make_group(FoldIndex(2), OLS(1), None)
layer.push(group)
try:
run(layer, 'predict', X, y)
except Exception as exc:
print("Error: %s" % str(exc))
Out:
Error: Layer instance (layer-6) not fitted.
The Layer
class can print the progress of a job, as well as inspect
data collected during the job. Note that the
printouts of the layer does not take group membership into account.
from mlens.metrics import rmse
layer = Layer()
group1 = make_group(
indexer,
{'case-1': [OLS(1)], 'case-2': [OLS(2)]},
{'case-1': [Scale()], 'case-2': []},
learner_kwargs={'scorer': rmse}
)
layer.push(group1)
run(layer, 'fit', X, y, return_preds=True)
print()
print("Collected data:")
print(layer.data)
Out:
Collected data:
score-m score-s ft-m ft-s pt-m pt-s
case-1 ols-1 20.88 0.23 0.00 0.00 0.00 0.00
ols-2 40.27 19.05 0.00 0.00 0.00 0.00
Total running time of the script: ( 0 minutes 2.157 seconds)


Vision Blocks
Home
Create
About
Contact
More
Social Networks
VBlocks @ Facebook
VBlocks @ Twitter
Our Blog
Feedback @ GDoc
Resources
VBlocks @ GitHub
Main Contributors
Camera Culture Group
Ramesh Raskar
Chunglin Wen
Acknowledgement
MIT Media Lab
Erick Passos
Hugo Cordeiro
Inspired by Scratch
Play
Play Forever
Remote Image
Upload Image
Remote Video
Upload Video
Webcam
Foodcam
Trafficcam
Parkingcam
Laundrocam
Portcam
StorecamA
StorecamB
Birdcam
Color Detection
Skin Detection
Face Detection
Motion Detection
Optical Flow
Optical Intrusion
Invert Color
Binarize
Grayscale
Pixelization
Blur
Twirl
Mirror
Spherize
IF
faces > 0
Draw Rect
Text
Browser Alert
Desktop Alert
Save
Copy the link
Output


constructor Create(Order: Byte = 9); virtual;
Creates and initializes an instance of TColor32LookupTable.
After calling the inherited constructor, Create initializes:


Top 10 Places to Work in London
Google Campus
Essay due, but housemates driving you crazy at home? Bored of missing out on the best spot in your uni library?  And working hard.That place is Google Campus - an amazing, FREE workspace in the heart of London's digital hub with seven floors of super speedy Wifi, a decent cafe, and plenty of young students and entrepreneur types to chat to when you can stare at a screen no more. Simply sign up and head over - sorted.
Friends Of Ours
This student-friendly cafe has just opened in the quietly trendy corner of East London that is Hoxton - it's a great place to hide away with your books for a few hours (grab one of the comfy alcoves before they're gone) before treating yourself to a wander in the vintage shops or a lovely bunch of flowers at Columbia Road flower market.
V&A National Art Library
Open free to the public as a reference library, this beautiful airy space has huge windows looking out over pretty gardens (perfect for collecting your thoughts when you need a break from the screen) seriously beautiful architecture and thousands of authentic books and curios to get the creative juices flowing. You’ll need to register as a reader to gain access to make sure your bring along a form of ID.
Reading Room at the British Museum
Studying under the huge papier-mâché (yep, really) roof in the centre of the Great Court of the British Museum, you'll be in good company. Karl Marx, Mahatma Gandhi, Rudyard Kipling, Lenin, H.G Wells and Oscar Wilde make up just some of its past visitors - history is in the air and if that's not enough to inspire you, we're not sure what can. Be sure to register before you go, though - such amazing credentials mean everyone wants their turn at writing the next classic.
Sky garden
Take advantage of London’s fetish for skyscrapers by working from a top floor. Forget the Shard, it costs £26 to get upstairs. Instead, head to 20 Fenchurch Street, better known as the car-melting Walkie Talkie. Its so-called Sky Garden is more a collection of potted plants than true green space, but costs nothing to ascend, has free Wi-Fi, a coffee shop, restaurants, and power points. You’ll need to book ahead here and subject yourself to a security screening, but your screen breaks will be an epic view of London.
Timberyard
They define themselves as an “independent creative workspace fused with speciality tea and coffee” and they’re right! It’s easy to see people working or studying with their laptops in a relaxed manner, in all of its 3 locations: (i) Soho in 4 Noel Street, London, W1F 8GB, (ii) 61-67 Old Street, EC1V 9HW and (iii) Seven Dials in 7 Upper St Martin’s Lane, WC2H 9DL.
The Book Club, Shoreditch
Not only a cafe, but an institute which helped shape the Shoreditch culture we see everywhere in London. It’s large, bright, airy and has a good wifi. The waiters are amazing and the food (the kitchen is run by some super cool chefs) is fairly priced and yummy. Note that they also serve alcohol (it turns into a bar and later a club) so towards the evening it could get busy. The have hosted the Wall Street Journal Tech Cafe so they are very friendly towards people who want to work.
The Barbican Centre
Not only can you get free super-fast wifi, a cup of tea for £1.70 and plenty of plug sockets for your laptop, you can sit here and work for hours on end, without having to pay a penny.
It’s also open until 11pm every night (even on bank holidays) and it’s quiet enough to work there on a weekend, too (check out some of the higher levels if the ground floor is a bit busy). I like wandering up to the library to clear my head when I fancy a break.
Gardens and parks
When the weather is nice, why not sit down on the grass of any park in London? We especially recommend Hyde Park. Just take your bag, some food and drink to be inspired whilst studying in London.
Ace Hotel
This workspace is located in the lobby of the Ace Hotel, following a trend of London hotels setting up a communal workspace. The best thing about this space is that it’s open 24 hours, so you can get to work any time with free wifi. The way the space is designed is that it’s made into different zones with furniture, glass, or steel screens as partitions. Its great for meetings as there’s a long 16-seat table and if you feel like you’ve worked hard enough for the day then make your way over to the bar and enjoy a much deserved drink! There is also a room at the back where we at Locappy have enjoyed some World Cup matches. We definitely think this is one of the best places to work in Shoreditch as it has both a relaxed and chill feel.


Plugin Information |
|---|
Distribution of this plugin has been suspended due to unresolved security vulnerabilities, see below. |
The current version of this plugin may not be safe to use. Please review the following warnings before use:
Features
- From your pipeline groovy code, call
addToClasspath <path>
. This will add a directory to the groovy classpath, allowing you to do things likeimport
groovy classes. The [tests contain an example|https://github.com/jenkinsci/pipeline-classpath-step-plugin/blob/f61f6d4a9ad4b53a2bbbe128069ca5cd10ed15bf/src/test/java/cprice404/plugins/workflow/steps/AddToClasspathStepTest.java#L35-L40] of what usage might look like.
Known Issues
- Because of the way that pipeline scripts are loaded by Jenkins, it's not currently possible to use this step *and* do an import from your main
Jenkinsfile
/ pipeline script. You *can* calladdToClasspath
from that script, and then callload
to load other scripts. The loaded scripts will be able to useimport
and similar statements. There is a branch in the github repo which contains [a test illustrating this limitation|https://github.com/jenkinsci/pipeline-classpath-step-plugin/blob/7a799452ee3412bcbeb3dd51d4ca41996f8030bf/src/test/java/cprice404/plugins/workflow/steps/AddToClasspathStepTest.java#L35-L36], and it's something I'd like to provide a solution for in a future release if the upstream doesn't come up with a more elegant solution.
Version history
Version 0.1.0 (August 8, 2016)
- Initial Release


http://www.susangranger.com/
Susan Granger's review of "POLLOCK" (Sony Pictures Classics)
Actor/director Ed Harris's wrenching study of Jackson Pollock, one of the greatest American painters of the 20th century, reveals him as a complex, pathological alcoholic. In the late 1940s, Pollock thrust "splatter" abstractionism into modern art and then drank himself into misery, finally perishing in a car wreck. During his rise to fame and fortune, the notoriously self-promoting, yet inwardly self-doubting, Pollock met up with feisty, tough-talking fellow painter Lee Krasner (Marcia Gay Harden) when he was living in Greenwich Village and, together, they moved to rural Long Island. Their domestic arrangement was far from tranquil and, eventually, Pollock acquired a younger trophy, Ruth Kligman (Jennifer Connelly), while Krasner emerges as a bitter, enabling wife. From his lying on the grass staring at the sky and clamming in East Hampton to his precise methodology of drip-painting canvases and his drunken revels at Jungle Pete's, the watering hole near his home - Pollock's abusive, mercurial life is up there on the screen. The weakness is in the simplistic, sequential screenplay with its cliche-ridden exposition and dialogue, along with its lack of character insight, by Barbara Turner and Susan J. Emshwiller. Val Kilmer lends support as rival artist Willem de Kooning, as does Amy Madigan (the real-life wife of Harris) as idiosyncratic heiress Peggy Guggenheim, with Bud Cort as her art scout, and Jeffrey Tambour as art critic Clement Greenberg. Kudos to cinematographer Liza Rinzler, production designer Mark Friedberg and costumer David Robinson for the evocation of the '40s-'50s era. On the Granger Movie Gauge of 1 to 10, "Pollock" is a stylish 7, distinguished by Oscar-caliber performances by Ed Harris, Marcia Gay Harden and Amy Madigan.
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


The heart consists of 1,259 URLs from the lists. The :visited CSS pseudo-class is used here to highlight the sites visited before. Please read the DISCLAIMER below.
The list of domains are from the README of sites-using-cloudflare Github repository. Please visit it for detailed infomation.
Just because a site is highlighted above on the heart does not mean that it is compromised or you are affected by the cloudbleed. Sites may be compromised that do not appear and sites you have visited may not be highlight above either. The full list of urls composed the heart can be found here.
Quote from the source repository:
This list contains all domains that use Cloudflare DNS, not just the Cloudflare proxy (the affected service that leaked data). It's a broad sweeping list that includes everything. Just because a domain is on the list does not mean the site is compromised, and sites may be compromised that do not appear on this list.
Cloudflare has not provided an official list of affected domains, and likely will not due to privacy concerns. I'm compiling an unofficial list here so you know what sessions to reset and passwords to change.
See issue #127 and issue #87 for additional info about which sites are likely to be affected.


tweeting like the first of the north star, he strikes with the fury of a thousand hands against the wrongs committed by the unjust.


Tutorial for xml_io_tools Package
By Jarek Tuszynski
Package xml_io_tools can read XML files into MATLAB struct and writes MATLAB data types to XML files with help of simple interface to MATLAB's xmlwrite and xmlread functions.
Two function to simplify reading and writing XML files from MATLAB:
- Function xml_read first calls MATLAB's xmlread function and than converts its output ('Document Object Model' tree of Java objects) to tree of MATLAB struct's. The output is in the format of nested structs and cells. In the output data structure field names are based on XML tags.
- Function xml_write first convert input tree of MATLAB structs and cells and other types to tree of 'Document Object Model' nodes, and then writes resulting object to XML file using MATLAB's xmlwrite function. .
Contents
- This package can:
- This package does not:
- Change History
- Licence
- Write XML file based on a Struct using "xml_write"
- Read XML file producing a Struct using "xml_read"
- "Pref.XmlEngine" flag in "xml_write"
- Writing Struct with MATLAB arrays
- Read Struct with MATLAB arrays
- "Pref.StructItem" flag in "xml_write"
- "Pref.CellItem" flag in "xml_write"
- "Pref.NoCells" flag in "xml_read"
- "Pref.ItemName" flag in "xml_write"
- "Pref.ItemName" flag in "xml_read"
- "Pref.CellItem" flag in "xml_read"
- "Pref.Str2Num" flag in xml_read
- "Pref.PreserveSpace" flag in xml_write
- "Pref.PreserveSpace" flag in xml_read
- Write XML files with ATTRIBUTEs
- Write XML files with COMMENTs
- Write XML files with PROCESSING_INSTRUCTIONs
- Write XML files with CDATA Sections
- Write XML files with special characters in TAG names
- Write XML files with Namespaces
- "Pref.KeepNS" flag in "xml_read"
- Read XML files with special node types
- "Pref.ReadAttr" flag in "xml_read"
- "Pref.ReadSpec" flag in "xml_read"
- "Pref.RootOnly" flag in "xml_read"
- "Pref.RootOnly" flag in "xml_write"
- "Pref.NumLevels" flag in "xml_read"
- Create DOM object based on a Struct using "xml_write"
- Convert DOM object to Struct using "xml_read"
- Write XML file based on a DOM using "xml_write_xerces"
- Write XML to string instead of a file
- Write XML file with embedded binary data encoded as Base64
- Read XML file with embedded binary data encoded as Base64
This package can:
- Read most XML files, created inside and outside of MATLAB environment, and convert them to MATLAB data structures.
- Write any MATLAB's struct tree to XML file
- Handle XML attributes
- Handle special XML nodes like comments, processing instructions and CDATA sections
- Be studied, modified, customized, rewritten and used in other packages without any limitations. All code is included and documented. Software is distributed under MIT Licence (included).
This package does not:
- Guarantee to recover the same Matlab objects that were saved. If you need to be able to recover carbon copy of the structure that was saved than you will have to use one of the packages that uses special set of tags saved as xml attributes that help to guide the parsing of XML code. This package does not use those tags.
- Guarantee to work with older versions of MATLAB. Functions do not work with versions of MATLAB prior to 7.1 (26-Jul-2005). Versions starting with 7.1 seem to work on my machine, which have current java engine and libraries.
Change History
- 2006-11-06 - original version
- 2006-11-26 - corrected xml_write to handle writing Matlab's column arrays to xml files. Bug discovered and diagnosed by Kalyan Dutta.
- 2006-11-28 - made changes to handle special node types like: COMMENTS and CDATA sections
- 2007-03-12 - Writing CDATA sections still did not worked. The problem was diagnosed and fixed by Alberto Amaro. The fix involved rewriting xmlwrite to use Apache Xerces java files directly instead of MATLAB's XMLUtils java class.
- 2007-06-21 - Fixed problem reported by Anna Kelbert in Reviews about not writing attributes of ROOT node. Also: added support for Processing Instructions, added support for global text nodes: Processing Instructions and comments, allowed writing tag names with special characters
- 2007-07-20 - Added tutorial script file. Extended support for global text nodes. Added more Preference fields.
- 2008-01-23 - Fixed problem reported by Anna Krewet of converting dates in format '2007-01-01' to numbers. Improved and added warning messages. Added detection of old Matlab versions incompatible with the library. Expanded documentation.
- 2008-06-23 - Fixed problem with writing 1D array reported by Mark Neil. Extended xml_read's Pref.Num2Str to 3 settings (never, smart and always) for better control. Added parameter Pref.KeepNS for keeping or ignoring namespace data when reading. Fixed a bug related to writing 2D cell arrays brought up by Andrej's Mosat review.
- 2008-09-11 - Resubmitting last upload - zip file is still old
- 2009-02-26 - Small changes. More error handling. More robust in case of large binary objects. Added support for Base64 encoding/decoding of binary objects (using functions by Peter J. Acklam).
- 2009-06-26 - changes to xml_read: added CellItem parameter to allow better control of reading files with 'item' notation (see comment by Shlomi); changed try-catch statements so xml_read would work for mablab versions prior to 7.5 (see Thomas Pilutti comment)
- 2009-12-03 - added PreserveSpace parameter for contolling empty string handling as suggested by Sebastiaan. Fix suggested by Michael Murphy. Fixed number recognition code as suggested by Yuan Ren.
Licence
The package is distributed under MIT Licence
format compact; % viewing preference clear variables; type('MIT_Licence.txt')
Copyright (c) 2007 Jarek Tuszynski Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Write XML file based on a Struct using "xml_write"
Any MATLAB data struct can be saved to XML file.
MyTree=[]; MyTree.MyNumber = 13; MyTree.MyString = 'Hello World'; xml_write('test.xml', MyTree); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTree>
Read XML file producing a Struct using "xml_read"
[tree treeName] = xml_read ('test.xml'); disp([treeName{1} ' =']) gen_object_display(tree)
MyTree = MyNumber: [13] MyString: 'Hello World'
"Pref.XmlEngine" flag in "xml_write"
Occasionaly some operations are performed better by Apache Xerces XML engine than default xmlread function. That is why xml_write provide an option for choosing the underlaying xml engine. Code below performs the same operation as the previous section but using Apache Xerces XML engine. Notice that in this case name of root element was passed as variable and not extracted from the variable name.
Pref=[]; Pref.XmlEngine = 'Xerces'; % use Xerces xml generator directly xml_write('test.xml', MyTree, 'TreeOfMine', Pref); type('test.xml')
<?xml version="1.0" encoding="UTF-8"?> <TreeOfMine> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </TreeOfMine>
Writing Struct with MATLAB arrays
MyTree=[]; MyTree.Num_1x1 = 13; MyTree.Vec_1x3 = [1 2 3]; MyTree.Vec_4x1 = [1; 2; 3; 4]; MyTree.Mat_2x2 = [1, 2; 3, 4]; % 2D Matrix MyTree.Cube_3D = reshape(1:8,[2 2 2]); % 3D array MyTree.String1 = '[2003 10 30]'; % array with [] brackets MyTree.String2 = '2003 10 30'; % array without [] brackets xml_write('test.xml', MyTree); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree> <Num_1x1>13</Num_1x1> <Vec_1x3>[1 2 3]</Vec_1x3> <Vec_4x1>[1; 2; 3; 4]</Vec_4x1> <Mat_2x2>[1 2; 3 4]</Mat_2x2> <Cube_3D>1 2 3 4 5 6 7 8</Cube_3D> <String1>[2003 10 30]</String1> <String2>2003 10 30</String2> </MyTree>
Read Struct with MATLAB arrays
Notice that 'Cube_3D' did not preserve original dimentions
[tree treeName] = xml_read ('test.xml'); disp([treeName{1} ' =']) gen_object_display(tree)
MyTree = Num_1x1: [13] Vec_1x3: [1 2 3] Vec_4x1: [4x1 double] Mat_2x2: [2x2 double] Cube_3D: [1 2 3 4 5 6 7 8] String1: [2003 10 30] String2: [2003 10 30]
"Pref.StructItem" flag in "xml_write"
Create a simple structure with arrays of struct's
MyTree = []; MyTree.a(1).b = 'jack'; MyTree.a(2).b = 'john'; gen_object_display(MyTree)
a: [1x2 struct] b: 'jack' b: 'john'
Write XML with "StructItem = true" (default). Notice single 'a' section and multiple 'item' sub-sections. Those subsections are used to store array elements
wPref.StructItem = true; xml_write('test.xml', MyTree, 'MyTree',wPref); type('test.xml') fprintf('\nxml_read output:\n') gen_object_display(xml_read ('test.xml'))
<?xml version="1.0" encoding="utf-8"?> <MyTree>  <item> jack </item> <item> john </item>  </MyTree> xml_read output: a: [2x1 struct] b: 'jack' b: 'john'
Write XML with "StructItem = false". Notice multiple 'a' sections
wPref.StructItem = false; xml_write('test.xml', MyTree, 'MyTree',wPref); type('test.xml') fprintf('\nxml_read output:\n') gen_object_display(xml_read ('test.xml'))
<?xml version="1.0" encoding="utf-8"?> <MyTree>  jack   john  </MyTree> xml_read output: a: [2x1 struct] b: 'jack' b: 'john'
Notice that xml_read function produced the same struct when reading both files
Potential problems with "StructItem = true":
wPref.StructItem = true; MyTree1 = []; MyTree1.a.b = 'jack'; MyTree2 = []; MyTree2.a(1).b = 'jack'; MyTree3 = []; MyTree3.a(2).b = 'jack'; xml_write('test.xml', MyTree1, [], wPref); type('test.xml'); xml_write('test.xml', MyTree2, [], wPref); type('test.xml'); xml_write('test.xml', MyTree3, [], wPref); type('test.xml');
<?xml version="1.0" encoding="utf-8"?> <MyTree1>  jack  </MyTree1> <?xml version="1.0" encoding="utf-8"?> <MyTree2>  jack  </MyTree2> <?xml version="1.0" encoding="utf-8"?> <MyTree3>  <item>  </item> <item> jack </item>  </MyTree3>
*Notice that MyTree1 and MyTree2 produce identical files with no 'items', while MyTree2 and MyTree3 produce very different file structures. It was pointed out to me that files produced from MyTree2 and MyTree3 can not belong to the same schema, which can be a problem. The solution is to use cells. *
wPref.CellItem = true; wPref.NoCells = true; MyTree2 = []; MyTree2.a{1}.b = 'jack'; MyTree3 = []; MyTree3.a{2}.b = 'jack'; xml_write('test.xml', MyTree2, [], wPref); type('test.xml'); xml_write('test.xml', MyTree3, [], wPref); type('test.xml');
<?xml version="1.0" encoding="utf-8"?> <MyTree2>  <item> jack </item>  </MyTree2> <?xml version="1.0" encoding="utf-8"?> <MyTree3>  <item/> <item> jack </item>  </MyTree3>
"Pref.CellItem" flag in "xml_write"
Create a simple structure with cell arrays
MyTree = []; MyTree.a = {'jack', 'john'}; disp(MyTree)
a: {'jack' 'john'}
Write XML with "CellItem = true" (default). Notice single 'a' section and multiple 'item' sections
Pref=[]; Pref.CellItem = true; xml_write('test.xml', MyTree, 'MyTree',Pref); type('test.xml') fprintf('\nxml_read output:\n'); disp(xml_read ('test.xml'))
<?xml version="1.0" encoding="utf-8"?> <MyTree>  <item>jack</item> <item>john</item>  </MyTree> xml_read output: a: {'jack' 'john'}
Write XML with "CellItem = false". Notice multiple 'a' sections
Pref=[]; Pref.CellItem = false; xml_write('test.xml', MyTree, 'MyTree',Pref); type('test.xml') fprintf('\nxml_read output:\n'); disp(xml_read ('test.xml'))
<?xml version="1.0" encoding="utf-8"?> <MyTree> jack john </MyTree> xml_read output: a: {'jack' 'john'}
Notice that xml_read function produced the same struct when reading both files
"Pref.NoCells" flag in "xml_read"
Create a cell/struct mixture object
MyTree = []; MyTree.a{1}.b = 'jack'; MyTree.a{2}.b = []; MyTree.a{2}.c = 'john'; gen_object_display(MyTree);
a: [1x2 cell] = b: 'jack' b: [0x0 double] c: 'john'
Save it to xml file
Pref=[]; Pref.CellItem = false; xml_write('test.xml', MyTree, 'MyTree',Pref); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree>  jack    <c>john</c>  </MyTree>
Read above file with "Pref.NoCells=true" (default) - output is quite different then input By default program is trying to convert everything to struct's and arrays of structs. In case arrays of structs all the structs in array need to have the same fields, and if they are not than MATLAB creates empty fields.
Pref=[]; Pref.NoCells=true;
gen_object_display(xml_read('test.xml', Pref))
a: [2x1 struct] b: 'jack' c: [0x0 double] b: [0x0 double] c: 'john'
Read above file with "Pref.NoCells=false" - now input and output are the same Cell arrays of structs allow structs in array to have different fields.
Pref=[]; Pref.NoCells=false;
gen_object_display(xml_read('test.xml', Pref))
a: [1x2 cell] = b: 'jack' b: [0x0 double] c: 'john'
"Pref.ItemName" flag in "xml_write"
Create a cell/struct mixture object
MyTree = []; MyTree.a{1}.b = 'jack'; MyTree.a{2}.c = 'john'; gen_object_display(MyTree);
a: [1x2 cell] = b: 'jack' c: 'john'
Save it to xml file, using 'item' notation but with different name
Pref=[]; Pref.CellItem = true; Pref.ItemName = 'MyItem'; xml_write('test.xml', MyTree, 'MyTree',Pref); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree>  <MyItem> jack </MyItem> <MyItem> <c>john</c> </MyItem>  </MyTree>
"Pref.ItemName" flag in "xml_read"
Read above file with default settings ("Pref.ItemName = 'item'") The results do not match the original structure
Pref=[]; Pref.NoCells = false;
gen_object_display(xml_read('test.xml', Pref))
a: [1x1 struct] MyItem: [1x2 cell] = b: 'jack' c: 'john'
Read above file with "Pref.ItemName = 'MyItem'" - now saved and read MATLAB structures are the same
Pref=[]; Pref.ItemName = 'MyItem'; Pref.NoCells = false; gen_object_display(xml_read('test.xml', Pref))
a: [1x2 cell] = b: 'jack' c: 'john'
"Pref.CellItem" flag in "xml_read"
"Pref.ItemName" is used to create xml files with clearly marked arrays "Pref.CellItem" flag in "xml_read" ensures that they are always read as arrays by forcing output to stay in cell format. In cell format s{1} is different than s, while s(1) is indistinguishable from s.
Create a test file
MyTree = []; MyTree.a1{1}.b = 'jack'; % a1 - single struct MyTree.a2{1}.b = 'jack'; % a2 - cell array of structs with the same fields MyTree.a2{2}.b = 'john'; MyTree.a3{1}.b = 'jack'; % a3 - cell array of structs with the different fields MyTree.a3{2}.c = 'john'; Pref=[]; Pref.CellItem = true; Pref.Debug = true; xml_write('test.xml', MyTree, 'MyTree',Pref); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree> <a1> <item> jack </item> </a1> <a2> <item> jack </item> <item> john </item> </a2> <a3> <item> jack </item> <item> <c>john</c> </item> </a3> </MyTree>
Read above file with "Pref.CellItem = true" (default) All outputs are in cell format
Pref=[]; Pref.NoCells = false; % allow cell output Pref.CellItem = true; % keep 'item' arrays as cells gen_object_display(xml_read('test.xml', Pref))
a1: [1x1 cell] = b: 'jack' a2: [1x1 cell] = [1x1 struct] [1x1 struct] a3: [1x1 cell] = [1x1 struct] [1x1 struct]
Read above file with "Pref.CellItem = false" Outputs format is determined by content
Pref=[]; Pref.NoCells = false; % allow cell output Pref.CellItem = false; % allow 'item' arrays to beheave like other fields gen_object_display(xml_read('test.xml', Pref))
a1: [1x1 struct] b: 'jack' a2: [2x1 struct] b: 'jack' b: 'john' a3: [1x2 cell] = b: 'jack' c: 'john'
Read above file with "Pref.CellItem = false" and "Pref.NoCells = true" All outputs are in struct format
Pref=[]; Pref.NoCells = true; % don't allow cell output Pref.CellItem = false; % allow 'item' arrays to beheave like other fields gen_object_display(xml_read('test.xml', Pref))
a1: [1x1 struct] b: 'jack' a2: [2x1 struct] b: 'jack' b: 'john' a3: [2x1 struct] b: 'jack' c: [0x0 double] b: [0x0 double] c: 'john'
"Pref.Str2Num" flag in xml_read
Create a cell/struct mixture object
MyTree = []; MyTree.str = 'sphere'; MyTree.num1 = 123; MyTree.num2 = '123'; MyTree.num3 = '[Inf,NaN,pi]'; MyTree.calc = '1+2+3+4'; MyTree.func = 'sin(pi)/2'; MyTree.String1 = '[2003 10 30]'; MyTree.String2 = '2003 10 30'; % array resembling date MyTree.ISO8601 = '2003-10-30'; % date in ISO 8601 format MyTree.US_date = '2003/10/30'; % US style date format MyTree.complex = '2003i-10e-30'; % complex number resembling a date gen_object_display(MyTree);
str: 'sphere' num1: [123] num2: '123' num3: '[Inf,NaN,pi]' calc: '1+2+3+4' func: 'sin(pi)/2' String1: '[2003 10 30]' String2: '2003 10 30' ISO8601: '2003-10-30' US_date: '2003/10/30' complex: '2003i-10e-30'
Save it to xml file, using 'item' notation but with different name
xml_write('test.xml', MyTree); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree> <str>sphere</str> <num1>123</num1> <num2>123</num2> <num3>[Inf,NaN,pi]</num3> <calc>1+2+3+4</calc> <func>sin(pi)/2</func> <String1>[2003 10 30]</String1> <String2>2003 10 30</String2> <ISO8601>2003-10-30</ISO8601> <US_date>2003/10/30</US_date> <complex>2003i-10e-30</complex> </MyTree>
Read above file with default settings ("Pref.Str2Num = true" or "Pref.Str2Num = 'smart'"). Under this setting all strings that look like numbers are converted to numbers, except for strings that are recognized by MATLAB 'datenum' function as dates
gen_object_display(xml_read('test.xml'))
str: 'sphere' num1: [123] num2: [123] num3: [Inf NaN 3.141592653589793] calc: [10] func: 'sin(pi)/2' String1: [2003 10 30] String2: [2003 10 30] ISO8601: '2003-10-30' US_date: '2003/10/30' complex: [-1e-029+2003i]
Note that all the fields of 'MyTree' can be converted to numbers (even 'sphere') but by default the function is trying to 'judge' if a string should be converted to a number or not
MyCell = {'sphere','1+2+3+4','sin(pi)/2','2003 10 30','2003-10-30','2003/10/30','2003i-10e-30'}; cellfun(@str2num, MyCell, 'UniformOutput', false)
ans = [21x21 double] [10] [6.1232e-017] [1x3 double] [1963] [6.6767] [-1.0000e-029 +2.0030e+003i]
Read above file with "Pref.Str2Num = false" or "Pref.Str2Num = 'never'" to keep all the fields in string format
Pref=[]; Pref.Str2Num = false;
gen_object_display(xml_read('test.xml', Pref))
str: 'sphere' num1: '123' num2: '123' num3: '[Inf,NaN,pi]' calc: '1+2+3+4' func: 'sin(pi)/2' String1: '[2003 10 30]' String2: '2003 10 30' ISO8601: '2003-10-30' US_date: '2003/10/30' complex: '2003i-10e-30'
Read above file with "Pref.Str2Num = always" to convert all strings that look like numbers to numbers note the likelly unintendet conversion of 'ISO8601'
Pref=[]; Pref.Str2Num = 'always'; gen_object_display(xml_read('test.xml', Pref))
str: 'sphere' num1: [123] num2: [123] num3: [Inf NaN 3.141592653589793] calc: [10] func: 'sin(pi)/2' String1: [2003 10 30] String2: [2003 10 30] ISO8601: [1963] US_date: '2003/10/30' complex: [-1e-029+2003i]
Notice that all three settings will produce the same output for "num1" and "num2" and there is no way to reproduce the original "MyTree" structure.
"Pref.PreserveSpace" flag in xml_write
Create a struct with strings
MyTree=[]; MyTree.Empty = ''; MyTree.OneSpace = ' '; MyTree.TwoSpaces = ' '; MyTree.String1 = ' Hello World ';
Write XML with "PreserveSpace = false" (default).
Pref=[]; Pref.PreserveSpace = false; % (default setting) xml_write('test.xml', MyTree, [], Pref); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree> <Empty/> <OneSpace/> <TwoSpaces/> <String1>Hello World</String1> </MyTree>
Write XML with "PreserveSpace = true".
Pref=[]; Pref.PreserveSpace = true; xml_write('test.xml', MyTree, [], Pref); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree> <Empty/> <OneSpace> </OneSpace> <TwoSpaces> </TwoSpaces> <String1> Hello World </String1> </MyTree>
"Pref.PreserveSpace" flag in xml_read
Read file while using "PreserveSpace = false" (default).
Pref=[]; Pref.PreserveSpace = false; % (default setting) gen_object_display(xml_read('test.xml',Pref))
Empty: [0x0 double] OneSpace: [0x0 double] TwoSpaces: [0x0 double] String1: 'Hello World'
Read file while using "PreserveSpace = true".
Pref=[]; Pref.PreserveSpace = true;
gen_object_display(xml_read('test.xml',Pref))
Empty: [0x0 double] OneSpace: ' ' TwoSpaces: ' ' String1: ' Hello World '
Write XML files with ATTRIBUTEs
In order to add node attributes a special ATTRIBUTE field is used. ATTRIBUTEs have to be of simple types like numbers or strings (not struct or cells). Attributes are easy to attach to structs nodes like MyTree below.
MyTree=[]; MyTree.MyNumber = 13; MyTree.MyString = 'Hello World'; % simple case MyTree.ATTRIBUTE.Num = 2; xml_write('test.xml', MyTree); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree Num="2"> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTree>
In case when one needs to attach attributes to nodes which are not structs (for example strings, numbers or calls) then special CONTENT field needs to be used to make the node a struct node.
MyTree=[]; MyTree.MyNumber = 13; MyTree.MyString.CONTENT = 'Hello World'; % simple case MyTree.MyString.ATTRIBUTE.Num = 2; xml_write('test.xml', MyTree); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree> <MyNumber>13</MyNumber> <MyString Num="2">Hello World</MyString> </MyTree>
Write XML files with COMMENTs
Insertion of Comments is done with help of special COMMENT field. Note that MATLAB's xmlwrite is less readable due to lack of end-of-line characters around comment section.
MyTree=[]; MyTree.COMMENT = 'This is a comment'; MyTree.MyNumber = 13; MyTree.MyString.CONTENT = 'Hello World'; xml_write('test.xml', MyTree); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTree>
Same operation using Apache Xerces XML engine gives the same result
Pref=[]; Pref.XmlEngine = 'Xerces'; % use Xerces xml generator directly xml_write('test.xml', MyTree, 'MyTree', Pref); type('test.xml')
<?xml version="1.0" encoding="UTF-8"?> <MyTree>  <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTree>
Comments in XML top level (method #1) This method uses cell array
MyTree=[]; MyTree.MyNumber = 13; MyTree.MyString = 'Hello World'; xml_write('test.xml', MyTree, {'MyTree', [], 'This is a global comment'}); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTree>
Same operation using Apache Xerces XML engine gives even nicer results.
Pref=[]; Pref.XmlEngine = 'Xerces'; % use Xerces xml generator directly xml_write('test.xml', MyTree, {'MyTree', [], 'This is a global comment'}, Pref); type('test.xml')
<?xml version="1.0" encoding="UTF-8"?>  <MyTree> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTree>
Comments in XML top level (method #2) This method adds an extra top layer to the struct 'tree' and sets "Pref.RootOnly = false", which informs the function about the extra layer. Notice that RootName is also saved as a part of the 'tree', and does not have to be passed in separately.
MyTree=[]; MyTree.COMMENT = 'This is a global comment'; MyTree.MyTest.MyNumber = 13; MyTree.MyTest.MyString = 'Hello World'; Pref=[]; Pref.RootOnly = false; xml_write('test.xml', MyTree, [], Pref); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTest> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTest>
Same operation using Apache Xerces XML engine
Pref=[]; Pref.XmlEngine = 'Xerces'; % use Xerces xml generator directly Pref.RootOnly = false; xml_write('test.xml', MyTree, [], Pref); type('test.xml')
<?xml version="1.0" encoding="UTF-8"?>  <MyTest> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTest>
Write XML files with PROCESSING_INSTRUCTIONs
Insertion of Processing Instructions is done through use of special PROCESSING_INSTRUCTION field, which stores the instruction string. The string has to be in 'target data' format separated by space.
MyTree=[]; MyTree.PROCESSING_INSTRUCTION = 'xml-stylesheet type="a" href="foo"'; MyTree.MyNumber = 13; MyTree.MyString = 'Hello World'; xml_write('test.xml', MyTree); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree><?xml-stylesheet type="a" href="foo"?> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTree>
Same operation using Apache Xerces XML engine
Pref=[]; Pref.XmlEngine = 'Xerces'; % use Xerces xml generator directly xml_write('test.xml', MyTree, 'MyTree', Pref); type('test.xml')
<?xml version="1.0" encoding="UTF-8"?> <MyTree><?xml-stylesheet type="a" href="foo"?> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTree>
PROCESSING_INSTRUCTIONs in XML top level (method #1) This method uses cell array
MyTree=[]; MyTree.MyNumber = 13; MyTree.MyString = 'Hello World'; xml_write('test.xml', MyTree, {'MyTree', 'xml-stylesheet type="a" href="foo"'}); type('test.xml')
<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="a" href="foo"?> <MyTree> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTree>
Same operation using Apache Xerces XML engine
Pref=[]; Pref.XmlEngine = 'Xerces'; % use Xerces xml generator directly xml_write('test.xml', MyTree, {'MyTree', 'xml-stylesheet type="a" href="foo"'}, Pref); type('test.xml')
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="a" href="foo"?> <MyTree> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTree>
PROCESSING_INSTRUCTIONs in XML top level (method #2) This method adds an extra top layer to the struct 'tree' and sets pref.RootOnly=false, which informs the function about the extra layer. Notice that RootName is also saved as a part of the 'tree', and does not have to be passed in separately.
MyTree=[]; MyTree.PROCESSING_INSTRUCTION = 'xml-stylesheet type="a" href="foo"'; MyTree.MyTest.MyNumber = 13; MyTree.MyTest.MyString = 'Hello World'; Pref=[]; Pref.RootOnly = false; xml_write('test.xml', MyTree, [], Pref); type('test.xml')
<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="a" href="foo"?> <MyTest> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTest>
Same operation using Apache Xerces XML engine
Pref=[]; Pref.XmlEngine = 'Xerces'; % use Xerces xml generator directly Pref.RootOnly = false; xml_write('test.xml', MyTree, 'MyTree', Pref); type('test.xml')
<?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet type="a" href="foo"?> <MyTest> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTest>
Write XML files with CDATA Sections
"In an XML document a CDATA (Character DATA) section is a section of element content that is marked for the parser to interpret as only character data, not markup." (from Wikipedia) To insert CDATA Sections one use special CDATA_SECTION field, which stores the instruction string. Note that MATLAB's xmlwrite created wrong xml code for CDATA section
MyTree=[]; MyTree.CDATA_SECTION = 'txt'; MyTree.MyNumber = 13; MyTree.MyString = 'Hello World'; xml_write('test.xml', MyTree); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree>txt<MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTree>
Same operation using Apache Xerces XML engine produces correct results
Pref=[]; Pref.XmlEngine = 'Xerces'; % use Xerces xml generator directly xml_write('test.xml', MyTree, 'MyTree', Pref); type('test.xml')
<?xml version="1.0" encoding="UTF-8"?> <MyTree><![CDATA[txt]]><MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTree>
Write XML files with special characters in TAG names
The input to xml_write requires that all tags one wants in XML document have to be encoded as field names of MATLAB's struct's. Matlab has a lot of restrictions on variable names. This section is about XML tags with names not allowed as MATLAB variables, or more specifically with characters allowed as xml tag names but not allowed as MATLAB variable names. Characters like that can be replaced by their hexadecimal representation just as it is done by genvarname function. Alternative way of writing the first example is:
MyTree=[]; MyTree.('MyNumber') = 13; % same as MyTree.MyNumber = 13; MyTree.MyString.CONTENT = 'Hello World'; MyTree.MyString.ATTRIBUTE.('Num') = 2; % same as MyTree.MyString.ATTRIBUTE.Num = 2; xml_write('test.xml', MyTree); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree> <MyNumber>13</MyNumber> <MyString Num="2">Hello World</MyString> </MyTree>
This approach fails for some characters like dash '-', colon ':', and international characters.
MyTree=[]; try MyTree.('My-Number') = 13; MyTree.MyString.CONTENT = 'Hello World'; MyTree.MyString.ATTRIBUTE.('Num_ö') = 2; catch %#ok<CTCH> err = lasterror; %#ok<LERR> disp(err.message); end
Invalid field name: 'My-Number'.
It can be overcome by replacing offending characters with their hexadecimal representation. That can be done manually or with use of genvarname function. Note that MATLAB 'type' function does not show correctly 'ö' letter in xml file, but opening the file in editor shows that it is correct.
MyTree=[]; MyTree.(genvarname('My-Number')) = 13; MyTree.MyString.CONTENT = 'Hello World'; MyTree.MyString.ATTRIBUTE.Num_0xF6 = 2; gen_object_display(MyTree); xml_write('test.xml', MyTree); type('test.xml')
My0x2DNumber: [13] MyString: [1x1 struct] CONTENT: 'Hello World' ATTRIBUTE: [1x1 struct] Num_0xF6: [2] <?xml version="1.0" encoding="utf-8"?> <MyTree> <My-Number>13</My-Number> <MyString Num_Ã¶="2">Hello World</MyString> </MyTree>
Also two of the characters '-' and ':' can be encoded by a special strings: '_DASH_' and '_COLON_' respectively
MyTree=[]; MyTree.My_DASH_Number = 13; MyTree.MyString.CONTENT = 'Hello World'; MyTree.MyString.ATTRIBUTE.Num0xF6 = 2; xml_write('test.xml', MyTree); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree> <My-Number>13</My-Number> <MyString NumÃ¶="2">Hello World</MyString> </MyTree>
Write XML files with Namespaces
No extra special fields are needed to define XML namespaces, only colon character written using '0x3A' or '_COLON_'. Below is an example of a namespace definition
MyTree=[]; MyTree.f_COLON_child.ATTRIBUTE.xmlns_COLON_f = 'http://www.foo.com'; MyTree.f_COLON_child.f_COLON_MyNumber = 13; MyTree.f_COLON_child.f_COLON_MyString = 'Hello World'; xml_write('test.xml', MyTree, 'MyTree'); type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree> <f:child xmlns:f="http://www.foo.com"> <f:MyNumber>13</f:MyNumber> <f:MyString>Hello World</f:MyString> </f:child> </MyTree>
Same operation using Apache Xerces XML engine
Pref=[]; Pref.XmlEngine = 'Xerces'; % use Xerces xml generator directly xml_write('test.xml', MyTree, 'f_COLON_MyTree', Pref); type('test.xml')
<?xml version="1.0" encoding="UTF-8"?> <f:MyTree> <f:child xmlns:f="http://www.foo.com"> <f:MyNumber>13</f:MyNumber> <f:MyString>Hello World</f:MyString> </f:child> </f:MyTree>
"Pref.KeepNS" flag in "xml_read"
Thise option allow keeping or exclusion of namespaces in tag names. By default the namespace data is kept but it produces much longer field names in the output structure. Ignoring namespace will produce more readible output. Perform default read of file with namespace
tree = xml_read('test.xml');
gen_object_display(tree);
f_COLON_child: [1x1 struct] f_COLON_MyNumber: [13] f_COLON_MyString: 'Hello World' ATTRIBUTE: [1x1 struct] xmlns_COLON_f: 'http://www.foo.com'
Now the same operation with KeepNS = false.
Pref=[]; Pref.KeepNS = false; % do not read attributes tree = xml_read('test.xml', Pref); gen_object_display(tree);
child: [1x1 struct] MyNumber: [13] MyString: 'Hello World' ATTRIBUTE: [1x1 struct] f: 'http://www.foo.com'
Read XML files with special node types
Display and read the file, then show the data structure. Note that MATLAB 'type' function shows 'ö' letter incorrectly as 'A¶' in xml file, but opening the file in editor shows that it is correct.
fprintf('Test xml file:\n'); type('test_file.xml')
Test xml file: <?xml version="1.0" encoding="utf-8" ?> <?xml-stylesheet type="text/css" href="foo.css"?>  <aaa xmlns:xsi="http://www.foo.org"> <?ProcInst type="local processing instruction"?>  bbb  ccc <matrix bad-name='fff'> 5e3+2*i, Inf NaN, pi </matrix> <ee_e> ee_e </ee_e> <ff-f> ff-f </ff-f> <ggÃ¶g> ggÃ¶g </ggÃ¶g> <![CDATA[ Here <ddd>xml</ddd> tags are treated as ... ... text ]]> </aaa>
Read only the Root Element (default)
[tree GlobalTextNodes] = xml_read('test_file.xml'); fprintf('Global Data (Root name, Global Processing Instructions and Global Comments):\n'); disp(GlobalTextNodes') fprintf('\nStructure read from the file (uncludes COMMENT and CDATA sections):\n'); gen_object_display(tree);
Global Data (Root name, Global Processing Instructions and Global Comments): 'aaa' 'xml-stylesheet type="text/css" href="foo.css"' 'This is a Global Comment' Structure read from the file (uncludes COMMENT and CDATA sections): PROCESSING_INSTRUCTION: 'ProcInst type="local processing instruction"' COMMENT: [1x2 cell] = local comment 1 local comment 2 CONTENT: [1x2 cell] = bbb ccc matrix: [1x1 struct] CONTENT: [2x2 double] ATTRIBUTE: [1x1 struct] bad_DASH_name: 'fff' ee_e: 'ee_e' ff_DASH_f: 'ff-f' gg0xF6g: 'ggög' CDATA_SECTION: 'Here <ddd>xml</ddd> tags are treated as ... ... text' ATTRIBUTE: [1x1 struct] xmlns_COLON_xsi: 'http://www.foo.org'
Read the whole tree including global Comments and Processing Instructions
Pref=[]; Pref.RootOnly = false; [tree GlobalTextNodes] = xml_read('test_file.xml', Pref); fprintf('Global Data (Root name, Global Processing Instructions and Global Comments):\n'); disp(GlobalTextNodes') fprintf('\nStructure read from the file (uncludes COMMENT and CDATA sections):\n'); gen_object_display(tree);
Global Data (Root name, Global Processing Instructions and Global Comments): 'aaa' 'xml-stylesheet type="text/css" href="foo.css"' 'This is a Global Comment' Structure read from the file (uncludes COMMENT and CDATA sections): PROCESSING_INSTRUCTION: 'xml-stylesheet type="text/css" href="foo.css"' COMMENT: 'This is a Global Comment' aaa: [1x1 struct] PROCESSING_INSTRUCTION: 'ProcInst type="local processing instruction"' COMMENT: [1x2 cell] = local comment 1 local comment 2 CONTENT: [1x2 cell] = bbb ccc matrix: [1x1 struct] CONTENT: [2x2 double] ATTRIBUTE: [1x1 struct] bad_DASH_name: 'fff' ee_e: 'ee_e' ff_DASH_f: 'ff-f' gg0xF6g: 'ggög' CDATA_SECTION: 'Here <ddd>xml</ddd> tags are treated as ... ... text' ATTRIBUTE: [1x1 struct] xmlns_COLON_xsi: 'http://www.foo.org'
"Pref.ReadAttr" flag in "xml_read"
Those option allow exclusion of attributes
Pref=[]; Pref.ReadAttr = false; % do not read attributes tree = xml_read('test_file.xml', Pref); gen_object_display(tree);
PROCESSING_INSTRUCTION: 'ProcInst type="local processing instruction"' COMMENT: [1x2 cell] = local comment 1 local comment 2 CONTENT: [1x2 cell] = bbb ccc matrix: [2x2 double] ee_e: 'ee_e' ff_DASH_f: 'ff-f' gg0xF6g: 'ggög' CDATA_SECTION: 'Here <ddd>xml</ddd> tags are treated as ... ... text'
"Pref.ReadSpec" flag in "xml_read"
Those option allow exclusion of special nodes, like comments, processing instructions, CData sections, etc.
Pref=[]; Pref.ReadSpec = false; % do not read special node types tree = xml_read('test_file.xml', Pref); gen_object_display(tree);
CONTENT: [1x2 cell] = bbb ccc matrix: [1x1 struct] CONTENT: [2x2 double] ATTRIBUTE: [1x1 struct] bad_DASH_name: 'fff' ee_e: 'ee_e' ff_DASH_f: 'ff-f' gg0xF6g: 'ggög' ATTRIBUTE: [1x1 struct] xmlns_COLON_xsi: 'http://www.foo.org'
"Pref.RootOnly" flag in "xml_read"
As it was shown in previous examples RootOnly parameter can be used to capture global (top level) special nodes (like COMMENTs and PROCESSING_INSTRUCTIONs) which are ignored by default
Pref=[]; Pref.RootOnly = false; % do not read special node types tree = xml_read('test_file.xml', Pref); gen_object_display(tree);
PROCESSING_INSTRUCTION: 'xml-stylesheet type="text/css" href="foo.css"' COMMENT: 'This is a Global Comment' aaa: [1x1 struct] PROCESSING_INSTRUCTION: 'ProcInst type="local processing instruction"' COMMENT: [1x2 cell] = local comment 1 local comment 2 CONTENT: [1x2 cell] = bbb ccc matrix: [1x1 struct] CONTENT: [2x2 double] ATTRIBUTE: [1x1 struct] bad_DASH_name: 'fff' ee_e: 'ee_e' ff_DASH_f: 'ff-f' gg0xF6g: 'ggög' CDATA_SECTION: 'Here <ddd>xml</ddd> tags are treated as ... ... text' ATTRIBUTE: [1x1 struct] xmlns_COLON_xsi: 'http://www.foo.org'
"Pref.RootOnly" flag in "xml_write"
Writing previously read tree with default "Pref.RootOnly = true" gives wrong output file
Pref=[]; Pref.RootOnly = true; % do not read special node types xml_write('test.xml', tree, [], Pref); fprintf('Test xml file:\n'); type('test.xml')
Test xml file: <?xml version="1.0" encoding="utf-8"?> <tree><?xml-stylesheet type="text/css" href="foo.css"?> <aaa xmlns:xsi="http://www.foo.org"><?ProcInst type="local processing instruction"?> <item>bbb</item> <item>ccc</item> <matrix bad-name="fff">[5000+i*2 Inf; NaN 3.14159265358979]</matrix> <ee_e>ee_e</ee_e> <ff-f>ff-f</ff-f> <ggÃ¶g>ggÃ¶g</ggÃ¶g>Here <ddd>xml</ddd> tags are treated as ... ... text</aaa> </tree>
Writing the same tree with "Pref.RootOnly = false" gives correct output
Pref=[]; Pref.RootOnly = false; % do not read special node types xml_write('test.xml', tree, [], Pref); fprintf('Test xml file:\n'); type('test.xml')
Test xml file: <?xml version="1.0" encoding="utf-8"?><?xml-stylesheet type="text/css" href="foo.css"?> <aaa xmlns:xsi="http://www.foo.org"><?ProcInst type="local processing instruction"?> <item>bbb</item> <item>ccc</item> <matrix bad-name="fff">[5000+i*2 Inf; NaN 3.14159265358979]</matrix> <ee_e>ee_e</ee_e> <ff-f>ff-f</ff-f> <ggÃ¶g>ggÃ¶g</ggÃ¶g>Here <ddd>xml</ddd> tags are treated as ... ... text</aaa>
"Pref.NumLevels" flag in "xml_read"
This parameter allows user to skip parts of the tree in order to save time and memory. Usefull only in a rare case when a small portion of large XML file is needed.
Create test tile
MyTree = []; MyTree.Level1 = 1; MyTree.Level1_.Level2 = 2; MyTree.Level1_.Level2_.Level3 = 3; MyTree.Level1_.Level2_.Level3_.Level4 = 4; xml_write('test.xml', MyTree); fprintf('Test xml file:\n'); type('test.xml')
Test xml file: <?xml version="1.0" encoding="utf-8"?> <MyTree> <Level1>1</Level1> <Level1_> <Level2>2</Level2> <Level2_> <Level3>3</Level3> <Level3_> <Level4>4</Level4> </Level3_> </Level2_> </Level1_> </MyTree>
Use Default ("Pref.NumLevels = infinity") setting
tree = xml_read('test.xml');
gen_object_display(tree);
Level1: [1] Level1_: [1x1 struct] Level2: [2] Level2_: [1x1 struct] Level3: [3] Level3_: [1x1 struct] Level4: [4]
Limit the read to only 2 levels
Pref=[]; Pref.NumLevels = 2;
tree = xml_read('test.xml', Pref);
gen_object_display(tree);
Level1: [1] Level1_: [1x1 struct] Level2: [2] Level2_: [0x0 double]
Create DOM object based on a Struct using "xml_write"
Create Struct tree
MyTree=[];
MyTree.MyNumber = 13;
MyTree.MyString = 'Hello World';
Convert Struct to DOM object using xml_write
DOM = xml_write([], MyTree); xmlwrite('test.xml', DOM); % Save DOM object using MATLAB function type('test.xml')
<?xml version="1.0" encoding="utf-8"?> <MyTree> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTree>
Convert DOM object to Struct using "xml_read"
DOM = xmlread('test.xml'); % Read DOM object using MATLAB function [tree treeName] = xml_read(DOM); % Convert DOM object to Struct disp([treeName{1} ' =']) gen_object_display(tree)
MyTree = MyNumber: [13] MyString: 'Hello World'
Write XML file based on a DOM using "xml_write_xerces"
xmlwrite_xerces('test.xml', DOM); % Save DOM object using Xerces library type('test.xml')
<?xml version="1.0" encoding="UTF-8"?> <MyTree> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTree>
Write XML to string instead of a file
DOM = xml_write([], MyTree); str = xmlwrite(DOM); disp(str)
<?xml version="1.0" encoding="utf-8"?> <MyTree> <MyNumber>13</MyNumber> <MyString>Hello World</MyString> </MyTree>
Write XML file with embedded binary data encoded as Base64
fid = fopen('football.jpg', 'rb'); raw = fread(fid, 'uint8'); % read image file as a raw binary fclose(fid); MyTree=[]; MyTree.Size = 13; MyTree.MyString = 'Hello World'; % simple case MyTree.MyImage.ATTRIBUTE.EncodingMIMEType = 'base64'; MyTree.MyImage.CONTENT = base64encode(raw);% perform base64 encoding of the binary data xml_write('test.xml', MyTree); % write xml file
Read XML file with embedded binary data encoded as Base64
tree = xml_read('test.xml', Pref); % read xml file raw = base64decode(tree.MyImage.CONTENT); % convert xml image to raw binary fid = fopen('MyFootball.jpg', 'wb'); fwrite(fid, raw, 'uint8'); % dumb the raw binary to the hard disk fclose(fid); I = imread('MyFootball.jpg'); % read it as an image imshow(I);


Institution Information
Name:
Phone:
Title:
Email:
SOC Online Ordering
Number of SOC reports requested:
FIID:
Indicate format:
Select One
Hard Copy
PDF
Shipping Information
Address:
City:
State:
...
AK
AL
AR
AZ
CA
CO
CT
DE
DC
FL
GA
HI
IA
ID
IL
IN
KS
KY
LA
MA
MD
ME
MI
MN
MS
MO
MT
NC
ND
NE
NH
NJ
NM
NV
NY
OH
OK
OR
PA
RI
SC
SD
TN
TX
UT
VA
VT
WA
WI
WV
WY
Zip:
Did someone else at your institution ask you to place this order?
Yes
No
If yes, who:
Submitting this form will add a fee of $275.00 per SOC report to your invoice
Check here
to acknowledge the charge.
Additional Comments


| Total net profit | 2830.32 | Gross profit | 4729.55 | Gross loss | -1899.23 |
| Profit factor | 2.49 | Expected payoff | 37.74 | ||
| Absolute drawdown | 190.39 | Maximal drawdown (%) | 491.15 (29.51%) | ||
| Total trades | 75 | Profit trades (% of total) | 37 (49.33%) | Loss trades (% of total) | 38 (50.67%) |
| Long positions (won %) | 38 (39.47%) | Short positions (won %) | 37 (59.46%) | ||
| Largest | profit trade | 293.06 | loss trade | -130.07 | |
| Average | profit trade | 127.83 | loss trade | -49.98 | |
| Minimum | profit trade | 11.84 | loss trade | -13.16 | |
| Maximum | take profit in pips | 27310.0 | stop loss in pips | -7740.0 | |
| Average | take profit in pips | 14958.4 | stop loss in pips | -3026.3 | |
| Minimum | take profit in pips | 9490.0 | stop loss in pips | 9190.0 | |
| Maximum | Reward-Risk | 25.6 | Duration in minutes | 8283 | |
| Average | Reward-Risk | 3.8 | Duration in minutes | 1492.0 | |
| Minimum | Reward-Risk | 0.0 | Duration in minutes | 13 | |
| Maximum | consecutive wins (profit in money) | 6.0 (421.3) | consecutive losses (loss in money) | 9.0 (-402.66) | |
| Average | consecutive wins | 2.0 | consecutive losses | 3.0 |
| Total net profit | 592.79 | Gross profit | 1780.75 | Gross loss | -1187.96 |
| Profit factor | 1.5 | Expected payoff | 15.6 | ||
| Absolute drawdown | -55.7 | Maximal drawdown (%) | 579.49 (60.05%) | ||
| Total trades | 38 | Profit trades (% of total) | 15 (39.47%) | Loss trades (% of total) | 23 (60.53%) |
| Largest | profit trade | 218.54 | loss trade | -130.07 | |
| Average | profit trade | 118.72 | loss trade | -51.65 | |
| Minimum | profit trade | 27.21 | loss trade | -23.49 | |
| Maximum | take profit in pips | 27310.0 | stop loss in pips | -7740.0 | |
| Average | take profit in pips | 15650.3 | stop loss in pips | -2469.7 | |
| Minimum | take profit in pips | 10380.0 | stop loss in pips | 9190.0 | |
| Maximum | Reward-Risk | 21.4 | Duration in minutes | 8283.0 | |
| Average | Reward-Risk | 3.2 | Duration in minutes | 1875.2 | |
| Minimum | Reward-Risk | 0.0 | Duration in minutes | 13.0 | |
| Maximum | consecutive wins (profit in money) | 5.0 (799.31) | consecutive losses (loss in money) | 8.0 (-349.03) | |
| Average | consecutive wins | 2.0 | consecutive losses | 3.0 |
| Total net profit | 2237.53 | Gross profit | 2948.8 | Gross loss | -711.27 |
| Profit factor | 4.15 | Expected payoff | 60.47 | ||
| Absolute drawdown | 190.39 | Maximal drawdown (%) | 218.46 (31.22%) | ||
| Total trades | 37 | Profit trades (% of total) | 22 (59.46%) | Loss trades (% of total) | 15 (40.54%) |
| Largest | profit trade | 293.06 | loss trade | -57.79 | |
| Average | profit trade | 134.04 | loss trade | -47.42 | |
| Minimum | profit trade | 11.84 | loss trade | -13.16 | |
| Maximum | take profit in pips | 26580.0 | stop loss in pips | -5180.0 | |
| Average | take profit in pips | 14247.8 | stop loss in pips | -3597.8 | |
| Minimum | take profit in pips | 9490.0 | stop loss in pips | 8460.0 | |
| Maximum | Reward-Risk | 25.6 | Duration in minutes | 3820.0 | |
| Average | Reward-Risk | 4.5 | Duration in minutes | 1098.4 | |
| Minimum | Reward-Risk | Duration in minutes | 26.0 | ||
| Maximum | consecutive wins (profit in money) | 6.0 (421.3) | consecutive losses (loss in money) | 4.0 (-207.35) | |
| Average | consecutive wins | 3.0 | consecutive losses | 2.0 |


GETKEY - Get key, including special keys
Since ESC is used by most terminals as function/arrow key leadin, ESC is not usable in the program. We cannot easily get around this, because C-MAINBOL does not allow timeouts on input operations.
A solution is to define ESC as ESC-ESC, which will not match any of leadin sequences.
The following controls are not easily available
These keys can be used by the application, if stty raw is put into effect. Make sure that any additional channels to the terminal are closed before issuing stty:
| HOST(HOST_SYSCMD, 'stty -echo raw') | OUTPUT(.T_OUT, 10, 'T', '/dev/stdout') | INPUT(.T_IN, 11, 'CQ', '/dev/stdin') | . | ENDFILE(10) | DETACH(.T_OUT) | ENDFILE(11) | DETACH(.T_IN) | HOST(HOST_SYSCMD, 'stty echo cooked')
New key definitions are added to this file as they are needed by applications.
«INCLUDES»≡ -INCLUDE 'BQ.INC' -INCLUDE 'CHARS.INC' -INCLUDE 'HOST.INC' @
«GETKEY»≡ -PUBLIC GETKEY() * DEFINE('GETKEY(IN)KEY,M') * GETKEY_INIT * -PUBLIC KEY_ESC, KEY_LEFT, KEY_RIGHT, KEY_UP, KEY_DOWN, KEY_PAGEDN -PUBLIC KEY_PAGEUP, KEY_HOME, KEY_END, KEY_INS * KEY_ESC = CHARS_ESC CHARS_ESC KEY_LEFT = BQ('tput kcub1') KEY_RIGHT = BQ('tput kcuf1') KEY_UP = BQ('tput kcuu1') KEY_DOWN = BQ('tput kcud1') KEY_PAGEDN = BQ('tput knp') KEY_PAGEUP = BQ('tput kpp') KEY_HOME = BQ('tput khome') KEY_END = BQ('tput kend') KEY_INS = BQ('tput kich1') @
xterm weirdness - kcub1 returns ESC O D
Repair this in the sequences where it happens, and skip for non-xterm terminals. Note that xterm-256color is the normaL xterm definition in use by my windowing system, and linux is the normal full-screen console type.
HOME and END are odd. Under Gnome 3 terminal, they are returned with O in the sequence.
«GETKEY»≡ BQ('echo $TERM') 'xterm' :F(GETKEY_END) KEY_LEFT = REPLACE(KEY_LEFT, 'O', '[') KEY_RIGHT = REPLACE(KEY_RIGHT, 'O', '[') KEY_UP = REPLACE(KEY_UP, 'O', '[') KEY_DOWN = REPLACE(KEY_DOWN, 'O', '[') *** KEY_HOME = REPLACE(KEY_HOME, 'O', '[') *** KEY_END = REPLACE(KEY_END, 'O', '[') KEY_INS = REPLACE(KEY_INS, 'O', '[') :(GETKEY_END) * GETKEY &INPUT = 1; KEY = GK1 M = ; KEY = KEY $IN * GK2 M = ?(KEY_UP ? FENCE KEY) 1 :F(GK3) EQ(SIZE(KEY), SIZE(KEY_UP)) :S(GKR) * GK3 M = ?(KEY_DOWN ? FENCE KEY) 1 :F(GK4) EQ(SIZE(KEY), SIZE(KEY_DOWN)) :S(GKR) * GK4 M = ?(KEY_RIGHT ? FENCE KEY) 1 :F(GK5) EQ(SIZE(KEY), SIZE(KEY_RIGHT)) :S(GKR) * GK5 M = ?(KEY_LEFT ? FENCE KEY) 1 :F(GK6) EQ(SIZE(KEY), SIZE(KEY_LEFT)) :S(GKR) * GK6 M = ?(KEY_PAGEDN ? FENCE KEY) 1 :F(GK7) EQ(SIZE(KEY), SIZE(KEY_PAGEDN)) :S(GKR) * GK7 M = ?(KEY_PAGEUP ? FENCE KEY) 1 :F(GK8) EQ(SIZE(KEY), SIZE(KEY_PAGEUP)) :S(GKR) * GK8 M = ?(KEY_HOME ? FENCE KEY) 1 :F(GK9) EQ(SIZE(KEY), SIZE(KEY_HOME)) :S(GKR) * GK9 M = ?(KEY_END ? FENCE KEY) 1 :F(GK10) EQ(SIZE(KEY), SIZE(KEY_END)) :S(GKR) * GK10 M = ?(KEY_INS ? FENCE KEY) 1 :F(GK11) EQ(SIZE(KEY), SIZE(KEY_INS)) :S(GKR) * GK11 M = ?(KEY_ESC ? FENCE KEY) 1 :F(GK12) EQ(SIZE(KEY), SIZE(KEY_ESC)) :S(GKR) + F(GK1) @
If we have a match so far, add another keystroke. Note that this is broken if the user manually types an escape sequence on the keyboard (again, no timeout is possible).
«GETKEY»≡ GK12 DIFFER(M) :S(GK1) GKR GETKEY = KEY :(RETURN) * CODE('GETKEY_INIT') * GETKEY_END @
«unit_test»≡ #!/usr/bin/bash exec "snobol4" "-b" "$0" "$@" -INCLUDE 'GETKEY.INC' &CODE = 1 &CODE = 0 END @
«»≡ -MODULE GETKEY «INCLUDES» -IN72 -STITL GETKEY -EJECT * ************************************************************************ * * * ##### ####### ####### # # ####### # # * * # # # # # # # # # * * # # # # # # # # * * # #### ##### # ### ##### # * * # # # # # # # # * * # # # # # # # # * * ##### ####### # # # ####### # * * * * GETKEY GET KEY, INCLUDING ARROWS AND FUNCTION KEYS * * * ************************************************************************ * * GETKEY.lss * «GETKEY» * * CE: .MSNOBOL4; @


Today's picks: From Dr Reddy's to BPCL, hot stocks to watch on Friday
For Nifty, stop long positions at 11870. Stop short positions at 12050. Big moves could go till 12125, 11825.
by Devangshu DattaNifty
Current: 11,968 (fut: 11,971)
Target: NA
Stop long positions at 11870. Stop short positions at 12050. Big moves could go till 12125, 11825. Trend may go negative. A long Nov 28, 11800p (27), 11700p (15) could gain 10-15 if the 11800 is tested.
Bank Nifty
Current: 31,349 (fut: 31,315)
Target: NA
Stop long positions at 31175. Stop short positions at 31500. Big moves could go till 31700, 30950. Trend may have a negative bias.
Gail
Current: Rs 122
Target: Rs 119
Keep a stop at 124 and go short. Add to the position between 119 and 120. Book profits at 119.
BPCL
Current: Rs 514
Target: Rs 502
Keep a stop at 520 and go short. Add to the position between 505 and 507. Book profits at 502.
Dr Reddy’s
Current: Rs 2,879
Target: Rs 2,925
Keep a stop at 2850 and go long. Add to the position between 2,910 and 2,920. Book profits at 2925.
Target prices, projected movements in terms of next session, unless otherwise stated


ES-Git
ES-Git on GitHub
Basic example
Fetch from a remote server
Push to a remote server
Draw a graph of commits and branches


Invalid jqLite#off() parameter
jqLite
jqLite#off() does not support the `selector` argument
This error occurs when trying to pass too many arguments to jqLite#off. Note that jqLite#off does not support namespaces or selectors like jQuery.
jqLite#off


Height (cm):
Male
Female
Wrist Size (cm):
Your ideal weigth: {{ ( (x1-100-(x1-150)/4)*sex + (x1-100-(x1-150)/2.5)*(1-sex) + cond()*(x1-100+4*wr)*.5 ) / (1+cond()) |number:2}} kg


High-throughput generation of genetic markers from molecular phenotypes for crosses between inbred strains. These markers can be use to saturate existing genetic map or creating a new one.
| Version: | 1.4.0 |
| Depends: | R (≥ 2.14.1), graphics, stats, utils, qtl, VGAM, mixtools |
| Imports: | grDevices |
| Suggests: | RankProd |
| Published: | 2018-02-11 |
| Author: | Konrad Zych and Danny Arends |
| Maintainer: | Konrad Zych <k.zych at rug.nl> |
| License: | GPL-3 |
| NeedsCompilation: | no |
| Citation: | pheno2geno citation info |
| Materials: | README |
| CRAN checks: | pheno2geno results |
| Reference manual: | pheno2geno.pdf |
| Package source: | pheno2geno_1.4.0.tar.gz |
| Windows binaries: | r-devel: pheno2geno_1.4.0.zip, r-release: pheno2geno_1.4.0.zip, r-oldrel: pheno2geno_1.4.0.zip |
| OS X binaries: | r-release: pheno2geno_1.4.0.tgz, r-oldrel: pheno2geno_1.4.0.tgz |
| Old sources: | pheno2geno archive |
Please use the canonical form https://CRAN.R-project.org/package=pheno2geno to link to this page.


- 题目：The quest for the ideal antibody, AI driven product knowledge extraction from scientific publications （人工智能在抗体中的应用）
- 时间：2019 年 05 月 15 号（星期三），美西时间（Pacific Time）6:00 PM
- 地点：YouTube live stream
- 主讲人：陈启翔 (David Qixiang Chen) CTO, Director of AI, BenchSci; PhD Neuroimaging, Institute of Medical Science, University of Toronto
英文摘要
The antibody, an important part of the immune system, is a widely used reagent of biomedical experiments. Misuse of antibodies, often due to insufficient data, are responsible for up to 50% of failed experiments, and incur enormous cost in time and money for drug discovery.
The best evidence of antibody use, and other scientific products, are found in scientific publications. Existing publication search tools (pubmed, google scholar) are not meant for products. We decoded antibody experimental contexts from open and close-source publications with a combination of text mining, bioinformatics, and machine learning.
At the end of the day, scientists prefer to judge experimental outcome by inspecting the publication images. We linked antibody contexts to its figure image, by identifying the correct product from amongst 4M antibodies, within 9M publications, across 300K contexts, and associate them with over 37M protein aliases. This complex task was computed using Spark and the search served on Elasticsearch. Deep neural nets were used to judge product/context usage relationship (embeddings, LSTM with attention), and to identify technique subpanel (CNN) in figures to fine-tune data accuracy.
The mission for BenchSci is to close the gap between idea to outcome in science. We accelerate the pace of discoveries by removing roadblocks in the scientific iteration cycle. ML has proven to be indispensable, where the scaling of data processing with a small team could only have been achieved through the use of deep learning.
参考文献
- Baker, M., 2015. Reproducibility crisis: Blame it on the antibodies. Nature News, 521(7552), p.274.
- LeCun, Y., Bengio, Y. and Hinton, G., 2015. Deep learning. nature, 521(7553), p.436.


Predicting The College Football AP Poll After Week 13 Of The 2019 Season
by Matt LombardiThis Saturday was light on big-time matchups, but that doesn’t mean there wasn’t drama. No. 6 Oregon, thought to be a College Football Playoff contender, fell on the road to Arizona State in an absolute stunner.
Ohio State, meanwhile, clinched the Big Ten East and a spot in the league’s title game with a win over Penn State. The Buckeyes continue to look like one of the best teams in the country.
LSU, the No. 1 team in the playoff rankings, had little trouble with Arkansas. Elsewhere in the SEC, Alabama crushed Western Carolina while Georgia held off a late Texas A&M comeback effort.
At this point, we’re realistically down to only eight or nine teams that have a shot at the playoff. It’ll be fascinating to see how it all plays out.
Here’s what we think the AP Poll top 25 will look like this Sunday:
- LSU
- Ohio State
- Clemson
- Georgia
- Alabama
- Utah (plays Arizona late)
- Oklahoma
- Minnesota
- Florida
- Baylor
- Wisconsin
- Michigan
- Oregon
- Penn State
- Notre Dame
- Auburn
- Cincinnati
- Memphis
- Iowa
- Boise State (plays Utah State late)
- Oklahoma State
- Navy
- Appalachian State
- Virginia Tech
- Virginia
College football fans – do we have it right?


Line it is Drawn: Disney Plus....Plus!
by Brian CroninSo every week, I post a topic here. You reply to it on the CSBG Twitter page (just write @csbg with your reply), our artists will each pick one of your suggestions and I will post their drawings based on your suggestions here every week. So every week you will have a new question and you will see the choices picked from the previous week.
To qualify, you have to be following @csbg when you reply - so go follow us and then give your answer to the following question/challenge (All suggestions due by 11:59 AM Pacific Saturday).
The topic for the next Line is...
Next week's theme is sponsored by the letters P, B and S. In honor of Beautiful Day in the Neighborhood, mash-up comic book characters with PBS children's programming, like Mister Rogers, Sesame Street, Barney, Arthur, Where In The World Is Carmen Sandiego and much, much more!
Read on for the drawings that came about courtesy of the last question/challenge!
In honor of the debut of Disney Plus, we want you to merge together any two properties available on the streaming service. Captain Marvel plus Gravity Falls, The Clone Wars plus Mary Poppins, you get the idea.
Enjoy!
I'll put them in alphabetical order based on the name of the Twitter user who made the suggestion.
All copyright and trademarks of the following characters are held by their respective owners.
BigMike20X6 suggested
Captain America & The Rocketeer
Nick Perks is the artist for this one. Here is his website.
BigMike20X6 and MichaelHeide suggested
Moon Knight and Darkwing Duck.
Nick Perks is also the artist for this one. Here is his website.
CraigJoly suggested
Finding Nemo & 20,000 Leagues Under the Sea
Nick Perks is also the artist for this one. Here is his website.
JohnnyUnusual suggested
Moana and Finding Nemo
The art for this one is by Christian Moore. His website is here.
KeithAlanMorgan suggested
Jack Skellington finds a new door in The Nightmare Before Christmas meets Monsters, Inc.
Caanan Grall is the artist for this one. Here is his website.
originaldayfan suggested
Darth Vader and Doom meet at the shop when they both go in for an armor tune up.
Axel Medellin drew this one. His website is here.
Vguysofly and werehawk1 suggested
Rocket Raccoon and Groot and Lilo and Stitch
The art for this one is by Paul Shinn. His website is here.
werehawk1 suggested
Simpsons and Fantastic Four
Brendan Tobin drew this one. Here is his website.
werehawk1 suggested
Wasp/Tinkerbell
Nick Perks is also the artist for this one. Here is his website.
Great work, everyone!
Okay, folks, go make suggestions for next week's Disney Plus theme!
https://schema.orgBreadcrumbListListItem1Homehttps://www.cbr.com/ListItem2CBR Exclusiveshttps://www.cbr.com/category/cbr-exclusives/ListItem3Line it is Drawn: Disney Plus....Plus!https://www.cbr.com/disney-plus-mash-ups-gallery/


|
Perl Weekly
Issue #67 - 2012-11-05 - Strawberry Perl <IP_ADDRESS> released
latest | archive | by Gabor Szabo
|
|
Hi,
I am still very busy. I ran a Perl and Python course last 2 weeks and now another Perl course.
So you can enjoy the Perl news without a lot of extra commentary:
|
|
|
Announcements
|
Perl and Google Code-In
The people behind the Perl participation in the Google Code-in are looking for project suggestions and mentors.
|
|
Articles
|
Using Perl and Google Chromium's CLD to identify the language of a text
Beyond the actual use of Lingua::Identify::CLD, Cosimo Streppone tells us the story how the tests of this module started to fail after upgrading Ubuntu, how he contacted Alberto, the author of the module and how he responded within a few hours. I know there are many cases when CPAN authors, just as other open source developers, are not responsive, so I think it is important to show also the cases when things go way better than they would in a commercial situation.
|
|
|
|
|
|
Interface Driven Design
An unusual article in the Perl world discussing design of various modules. For example, if you needed non-blocking http request, could you replace LWP::UserAgent by AnyEvent::HTTP::LWP::UserAgent in a third party module? How should the modules be designed so this will be possible?
|
|
Interviews
|
|
|
Discussion
|
vim-perl needs your help
Andy Lester has collected all the Perl-related vim snippets that were flowing around, but now he needs someone to help him, or to take over the project. If you are a vim user, this is your chance to give back (more) to the community!
|
|
Releases
|
Web::Query 0.10 contains incompatible change.
Web::Query changed from throwing exception to returning false. Interesting in light of the recent discussion about autodie that elevates false returns to exceptions in the built-in functions.
|
|
|
|
Graphs
|
Perl Stackoverflow Reports: First Year
An interesting graph showing the number of posts on Stack Overflow tagged with 'Perl'. It's growing. I wonder how does that compare to other programming languages on Stack Overflow, and how does that compare to the number of posts on Perl Monks.
|
|
|
|
Slides
|
Chicago.PM Report - Scripting Git With Perl
preaction is using the Git::Repository Perl module to create releases both at Double Cluepon and at Bank of America. The comment section is also interesting. It shows how blog posting can lead to interaction between CPAN authors and users.
|
|
Perl 6
|
|
|
Macros progress report: D2 merged
I am totally confused by this. There are {{{ }}} thingies that are called 'unquotes', closures, psychology and 75-year old wine and Russian tundra.
|
|
Weekly collections
|
|
|
|
|
|
|
|
|
Events
I usually list the next 3-4 events here. The list of all the events can be found on the web site. If your Perl event is not listed there, please let me know.
|
|
|
|
|
|
|
You know, you could get the Perl Weekly right in your mailbox. Every Week. Free of charge!
|


xylem &; growth OpenUrl formation temperature treeline CrossRef Science xylogenesis tree Web minimum Smith fir onset min cell daily temperatures mean Tibetan growing tree-ring air cells ending number soil used model sites weekly Fig. climatic days Körner climate observations production south-eastern trees alpine carbon data maximum New Rossi Site temperature, Tree critical estimated limitation observed values years Download Körner, Sygera based cambial duration limits season using <; Ecology Physiology activity calculated correlation high hypothesis low modeling new radial sampling time treelines upper var. width (at (e.g., .). Botany Deslauriers Deslauriers, Figure Open Plateau, Plateau. Research Rossi, Vaganov View a.s.l.) coefficients cold corresponding data-hide-link-title=""> data-icon-position="" differences differentiation figure function ring significant study tab timing treeline. >; (CT Annals Phytologist Plateau Table Xylem York. altitudinal annual average deviation directly early georgei min) minimum, natural parameter precipitation precipitation, simulated site smithii) species standard studies summer threshold total trees. °C, (VS) (b) (c) (e.g. (grey (white Abies Anchukaitis Critical Error Evans Geophysical However, Liang Liang, Miehe, Model Morin, Sites Springer, Trees Vaganov-Shashkin Zhang absolute available bars chronology conditions conifer conifers correlations depths developing dots) dynamics ecology effects elevation estimate expected files highest indicate indices late length line) microcores occurred period previous produced range related respectively. significantly simulate snow spruce studied suggesting supported variables. variation walls °C.


From matching BFF partner to day-to-day advice, ConsultUs got you covered.
How much and how often is up to you?
Partner Matching
We “know guys” in FMCG, food and organic food, but we can find what you need in every other industry in Serbia and the region. Whatever you need, we’ll find the right person, and connect you two directly.
There are countless firms out there that act either as middlemen or resellers. In most cases, they even keep partners’ names hidden from one another, to keep taking commissions! Not us. Our mission is to promote the virgin opportunities in Serbia, so we think long-term. Our logic is that satisfied partners will create a better ecosystem, which will leads to more demand for our diversified services.
We know great businesses that could use some capital to achieve wonders, but can’t get it in Serbia or around. You might be their game-changer, and reap the fruits.
Investment Opportunities
For example, we used to know a factory that made bottled water that was by all parameters better than the premium brand in the region. But they couldn’t get the capital to invest in production technology and marketing to large distributors. If you are interested in an industry or simply have spare capital, we might have just the opportunity you need, and no one else knew about before.
Sales Support & Project Management
You might be in the process of reorganizing your supply chain, or involved in some big investment. You know we always have a few aces up our sleeve, and decide to hear our thoughts on the matter.
Remember, we know people and markets.
We can suggest you a way to incorporate partners from this part of the world (i.e. cheap and efficient subcontractors), or give advice about how to best implement new solutions – it’s what we have been doing for years. Also, when you are already in the game with a new partner, we can make your collaboration easier. By, for example, suggesting the best markets and ways to boost sales. Remember, we know people and markets.
Founded by two industry veterans.
ConsultUs was founded by two industry veterans. We know people, business environments, and we mean business. We are here to give advice in every stage of your expansion, and help you and your newfound partners thrive together.
Consulting and Cross-Border
Let us support your test organization. Benefit from our knowledge.
What we fight for is the promotion of healthy and long-term trade partnerships. Therefore, in addition to matching partners, we can advise them in every aspect of business, including:
- Company formation
- Customs
- General legal advice
- Marketing and sales
- Organization
Additionally, we pride ourselves with a deep understanding of cross-border management we know how different markets and cultures think and function, and we can get transfer this knowledge to our clients through training and day-to-day counseling.


Battleship Game
Your browser does not support the HTML5 canvas tag.
Enter dashboard size.
Width:
Height:
Enter coordinates (row, col), e.g. "A5":


An interactive guide to the animals of the Arroyo Seco, inspired by the wonderful experiences of collecting Pokemon in a pokedex. Allows Users to to easily identify the animals they see and keep track of all of the ones they have encountered.
A drum step sequencer based on the sounds of the 909, made using p5.js with samples from freesound.org. Click circles to turn on that note - each column is 1/16 note and each row is a different drum sample. The volume of the rows can be changed using the dials on the left side of the page. Tempo is changed by moving the mouse along the x axis and locked in with an option+click.
A short case study of the acoustics of a live performance space. I identify the main issues with the room (performances are broadcast live on air) and give suggestions on how to improve them.
A keyboard where the notes continue forever, or at least until you click them again. Amplitude of each note corresponds to its relative size. The white button at the bottom resets the board state.
Make colors easily, press the spacebar to generate a new set. Shift+click the circles to make their borders disappear.
A 6 voice synthesizer - the frequency of each voice is controlled by dragging along the x axis and amplitude is controlled by y axis. Control+click on a shape to change its waveform type. Browser can be resized to create a smaller loop size.
Skeleton for a 3 voice synthesizer. Choose waveform type, frequency, and amplitude - turn oscillator on and off with button on the left.


The Indian Times
Home
(current)
Health
Sports
Science
Business
Technology
Entertainment
Recent News
Please Connect To Internet :)
Top headings


Material Design is a design language developed by Google. Expanding upon the "card" motifs that debuted in Google Now, Material Design makes more liberal use of grid-based layouts, responsive animations and transitions, padding, and depth effects such as lighting and shadows.
Material Design Lite is a light-weight implementation of Material Design, specifically crafted for the web. Material Design Lite lets you add a Material Design look and feel to your websites. It doesn’t rely on any JavaScript frameworks and aims to optimize for cross-device use, and offer an experience that is immediately accessible. For more detailed guidelines and specifications for other platforms please refer to the Material Design site.
Color in material design is inspired by bold hues juxtaposed with muted environments, deep shadows, and bright highlights. Material takes cues from contemporary architecture, road signs, pavement marking tape, and athletic courts. Color should be unexpected and vibrant.
For more information, see the Google Material design guide, Color


Català
English
Español
Deutsch
Français
Italiano
Norsk
Polski
Türkçe
中文简体
Download OpenWrt Firmware for your Device
Type the name or model of your device, then select the recommended build or some other.
No model found!
About this build
Model:
Target:
Version:
(
)
Date:
Info:
Download an image
Download an image


Page Links: Index Page
| ChristiaanJ 9th Sep 2010, 22:28 permalink Post: 304 |
Quote:
Barbara Harmer at British Airways. The first female Concorde airline pilot. She became F/O on Concorde in 1993. After the end-of-service, she continued to fly 777s with BA. . B\xe9atrice Valle at Air France. After a long career as a pilot, she finally was selected for Concorde... and then the Paris crash happened. But she persisted, and in the end she did 35 return flights CDG-JFK before the final end-of-service. She then became captain on 747s. Apart from Jacqueline Auriol , well-known French 'aviatrice' and test pilot, who flew once on the Concorde prototype, I do not know of anybody else. And no, there is no record of any female F/Es. CJ |
|
| M2dude 9th Sep 2010, 22:37 permalink Post: 305 |
Shaft109
Quote:
Barbara Harmer - Wikipedia, the free encyclopedia After she eventually left the Concorde fleet, Barbara became Captain Harmer, flying the Boeing 777 for BA. Oops ChristiaanJ, never knew about B\xe9atrice Valle, salutations to her also. Dude |
|
| M2dude 23rd Feb 2011, 20:23 permalink Post: 1208 |
Barbara Harmer
Barbara was a truly lovely lady and will be sorely missed by all of us that had the honour to know her. She was such an unassuming lady and seemed to wonder what all the fuss was when the media followed her around in her early days on the fleet.
With greatest respect M2Dude |
|
| Bellerophon 23rd Feb 2011, 20:42 permalink Post: 1209 |
Barbara Harmer
Very sad news.
Barbara, you were a joy to know and to fly with. Rest in Peace, Bellerophon x |
|
| The late XV105 23rd Feb 2011, 20:55 permalink Post: 1210 |
Barbara Harmer
Very sad news indeed. An inspirational lady that I never had the pleasure to meet. Should you wish to pay your condolences
>>
|
Page Links: Index Page


UDLD, or Unidirectional Link Detection, is a Cisco proprietary, Layer 2 protocol that helps detects if either the transmit or the receive fails on a link. It’s purpose is similar to LoopGuard, but it is completely independent of Spanning Tree. The operation of UDLD is fairly simple. A switch sends UDLD Hellos and if it receives echoes of those Hellos back it knows the link is an active two way link. As soon as it quits receiving the UDLD Hellos, it knows there must be a unidirectional link failure. UDLD operates at the physical port level, compared to say STP LoopGuard which works at the logical port level (EtherChannel). Also UDLD functions at linkup, while LoopGuard does not. It is recommended to enable both UDLD and LoopGuard.
UDLD is mainly used on fiber connections, but it can also be useful on Ethernet connections that have dumb devices in the middle such as media converters.
The default advertisement timer is 15 seconds and the hold time is 5 seconds. Upon detecting the loss of a UDLD neighbor, UDLD will send seven additional advertisements (one per second). If no reply is received, the link’s bidirectional status transitions to unknown.
To set up UDLD globally, use SW1(config)# udld enable
and use the SW1(config-if)# udld port enable
command to enable per interface.

You could also enable auto recovery of the interface if desired. It would look like this:
SW1(config)# errdisable recovery cause idled
SW1(config)# errdisable recovery interval 30


We make delicious cookies into shape of a Salmon.
Try it now
You will love Salmon after that..
Available from 6AM to 8 PM every day.
- * Seattle
- * Dubai
- * Paris
- * Lima
- * Tokyo
We make delicious cookies into shape of a Salmon.
Try it now
You will love Salmon after that..
Available from 6AM to 8 PM every day.


-
Bessie BerryTwitter
I pay for the 4Mb/sec down, 512 Kb/sec up service from O2.In fact, it's relatively quick, and stable
-
Victor WeberAdobe
I shared this on my fb wall a few months back, and I thought I'd share it here again because it's such a great
-
Dushin BensonFacebook
If there is anyone who needs an invitation please add yourself in the comments of this post!
-
Jack MasonYahoo
BruteDC is a peer-to-peer movie+tv series sharing and downloading platform which works on intranet inside
-
Stepten SheltonSnapchat
Yes, p2p traffic is often filtered(QoSed).Although i do use BT on O2 wires, and in good days fl speed
-
Sally WillisTwitter
Yes, it's O2: 'internet extreme', which is no longer offered
-
Robbert PattonA Team
I shared this on my fb wall a few months back, and I thought I'd share it here again because it's such a great
- Overview
- Sales
- Your Staff
- Analytics & Targeting
- What's New
MENU
- Books
- Tutorials
- Stocks
- Infographics
YOUR PRODUCTS
- Messages
- Connections
- Intergrations
- Account Settings
- App Settings
DASHBOARD
Monthly Goals $580/$3200
Messages


Read from serial until termination is true.
Buffer will not be cut in this function.
Read from serial until termination is true.
Assuming only last bufferLimit characters decides termination, this readLoop cuts unnecessary part of the buffer
This function reads until token appears in serial output, and returns nothing.
Reading is optimized by cutting unnecessary string, so length of buffer < length of token.
This is useful when reading potential long output, and the content before token does not matter
This function reads until one of the token from the token array appears in serial output, and returns the token that appear in serial. Its content is also periodically updates to upstream and when the token appears.
This is useful when reading potential long output, and recent content of some length matters.
Consider the following cases, which make the implementation necessary.
while True: print(1)
A lot of output
a=input("You name:")
New content only come out after every thing gets outputted
(So user can input)
Split buffer on first occurrence of token.
PRE: buffer = before + token + after buffer = after return before
This function read a line from serial, and returns that line.
You should only use this function when you are certain about what's coming from serial.
Generated using TypeDoc
This class provide convenient function for reading serial output.


I'm a final year aspiring web/android developer looking to explore and implement different domains like Big Data and Machine Learning. I am looking to work with organizations where i get to learn, grow, understand the sense of responsibilities and maybe lead a team someday. I like to play badminton, read about latest gizmos and do PC gaming.
My work as a Committee Head for PR includes drafting invitations for guests, preparation of their speech, make press release and manage social media accounts like Facebook and Instagram pages.
Pearly is a voice based Personal Digital Assistant which was specifcally designed for users who travel and can't interact with their phone while driving. Currently the prototype has four basic functionalitites viz news, weather, music and video which can be accessed using voice commands.
Internship at Youth Empowerment Foundation introduced me to android development. It made me become familiar with basic components of android UI design and how to work on android studio.
CBSE Cluster is a zonal sports competiton where all the CBSE affiliated schools participate to discover new talents and find out who is the best.


Roberta Williams' Games
- Mystery House (1980) - The first adventure game to use visual graphics
- Wizard and the Princess (1980)
- Mission Asteroid (1981)
- Time Zone (1982) - The first game to be developed by a team of more than a few people. So large, it shipped on six double-sided floppy disks and cost almost £200 in today's money!
- The Dark Crystal (1983) - A tie-in to the Jim Henson movie
- King's Quest (1983/4) - Highly influential graphical adventure game which brought dynamic animation to the genre
- Mickey's Space Adventure (1984)
- King's Quest II: Romancing the Throne (1985)
- King's Quest II: To Heir is Human (1986)
- Mixed-Up Mother Goose (1987) - Roberta appeared as Mother Goose on the cover of the game!
- King's Quest IV: The Perils of Rosella (1988)
- Laura Bow: The Colonel's Bequest (1989)
- King's Quest V: Absence Makes the Heart Go Yonder! (1990)
- Laura Bow in The Dagger of Amon Ra (1992)
- King's Quest VI: Heir Today, Gone Tomorrow (1992)
- King's Quest VII: The Princeless Bride (1994)
- Phantasmagoria (1995) - Point-and-click interactive horror movie infamous for its graphic gore, violence, and sexual content. Many retailers refused to sell it, and it was banned altogether in Australia!
- Shivers (1995)
- King's Quest: Mask of Eternity (1998)
Find out about Roberta Williams


Welcome to {{ BANK_NAME }}
{{ random_phrase }}
Online Banking
©2019 {{ BANK_NAME }} Inc. All rights reserved.
Mobile App
Download our state-of-the-art mobile banking suite today!
Try Mobile Banking


We sat down with Denise Richards and asked her to weigh in on Real Beauty Real Housewives' Alexis Bellino Talks. Real Beauty, Wearing Less Makeup + Nov 8, 2012 Denise Richards is back in New York filming Socio a television pilot for ABC Family filming in the Westchester area of New York City
May 28, 2013 And Denise Richards proved that she. is more dedicated to her looks and highlighted her gorgeous features by wearing minimal make-up Apr 23, 2013 The big shrink: Denise Richards showed a gaunt face and skeletal arms as she She's still gorgeous to me, just missing some makeup. 29. 32.
May 29, 2008 The title refers to my weird handicap of not being able to produce the appropriate alphabet-related word that goes with each letter when you Jul 26, 2013. Learn how Denise Richards keeps her skin glowing girl-next-door type who happens to be the new face of OROGOLD Cosmetics I wanted
A documentary about wounded veterans that Roger championed gets a screening at the Rehabilitation Institute of Chicago and screenings in New York and Los Angeles…
Denise Richards latest news including. Denise Richards photos, dating and
New York besides becoming a make-up girl. for Bonne Bell cosmetics also a
model May 7, 2012. READ: Denise Richards Set to Appear. With Charlie Sheen in Anger Her hair
was up and she was glowing. with glittery eye makeup The two
Jul 26, 2013 Denise Richards will be the new face of the luxe skincare brand, OROGOLD, and
we definitely see why the Twisted star wanted in on the action Learn more about the life of model and actress Denise Richards, including her
former marriage She also worked as a make-up artist for Bonne Bell cosmetics


An anxious young man with relationship problems goes to his family's cabin to clear his head. When he arrives, he finds his girlfriend and bestfriend are already there.
This film was shot at a cabin on the Puget Sound. This film premiered at the Dam Short Film Festival in Boulder City, Nevada and went on to screen at festivals across the country.


heap
divide and conquer
quick select
]
Leetcode 0215. Kth Largest Element in an Array
https://leetcode.com/problems/kth-largest-element-in-an-array
If you see this problem in competition, the best way just to sort data and choose k
-th largest element in O(n log n)
overall complexity. However you can imagine, that it is not the good idea for real interview, where your expected do do something else. There is two classical ways how to find order statistic in linear time (yes, it has its mathematical name):
- Median of median approach with worst time complexity
O(n)
, however it is quite painful to code and I do not think anyone expect that you do it. - So-called Quick Select, which use similar idea to Quick Sort, with average complexity
O(n)
.
We are going to discuss Quick Select, because it is easier to code:
- First, we need to choose so-called pivot and partition element of
nums
into 3 parts: elements, smaller than pivot, equal to pivot and bigger than pivot. (sometimes two groups enough: less and more or equal) - Next step is to see how many elements we have in each group: if
k <= L
, whereL
is size ofleft
, than we can be sure that we need to look into the left part. Ifk > L + M
, whereM
is size ofmid
group, than we can be sure, that we need to look into the right part. Finally, if none of these two condition holds, we need to look in themid
part, but because all elements there are equal, we can immedietly returnmid[0]
.
Complexity: time complexity is O(n)
in average, because on each time we reduce searching range approximately 2
times. This is not strict proof, for more details you can do some googling. Space complexity is O(n)
as well.
class Solution:
def findKthLargest(self, nums, k):
if not nums: return
pivot = random.choice(nums)
left = [x for x in nums if x > pivot]
mid = [x for x in nums if x == pivot]
right = [x for x in nums if x < pivot]
L, M = len(left), len(mid)
if k <= L:
return self.findKthLargest(left, k)
elif k > L + M:
return self.findKthLargest(right, k - L - M)
else:
return mid[0]
If you like the solution, you can upvote it on leetcode discussion section: Problem 0215