| 1 | /* =========================================================== | |
| 2 | * JFreeChart : a free chart library for the Java(tm) platform | |
| 3 | * =========================================================== | |
| 4 | * | |
| 5 | * (C) Copyright 2000-2008, by Object Refinery Limited and Contributors. | |
| 6 | * | |
| 7 | * Project Info: http://www.jfree.org/jfreechart/index.html | |
| 8 | * | |
| 9 | * This library is free software; you can redistribute it and/or modify it | |
| 10 | * under the terms of the GNU Lesser General Public License as published by | |
| 11 | * the Free Software Foundation; either version 2.1 of the License, or | |
| 12 | * (at your option) any later version. | |
| 13 | * | |
| 14 | * This library is distributed in the hope that it will be useful, but | |
| 15 | * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY | |
| 16 | * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public | |
| 17 | * License for more details. | |
| 18 | * | |
| 19 | * You should have received a copy of the GNU Lesser General Public | |
| 20 | * License along with this library; if not, write to the Free Software | |
| 21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, | |
| 22 | * USA. | |
| 23 | * | |
| 24 | * [Java is a trademark or registered trademark of Sun Microsystems, Inc. | |
| 25 | * in the United States and other countries.] | |
| 26 | * | |
| 27 | * --------------- | |
| 28 | * KeyHandler.java | |
| 29 | * --------------- | |
| 30 | * (C) Copyright 2003-2008, by Object Refinery Limited and Contributors. | |
| 31 | * | |
| 32 | * Original Author: David Gilbert (for Object Refinery Limited); | |
| 33 | * Contributor(s): -; | |
| 34 | * | |
| 35 | * Changes | |
| 36 | * ------- | |
| 37 | * 23-Jan-2003 : Version 1 (DG); | |
| 38 | * | |
| 39 | */ | |
| 40 | ||
| 41 | package org.jfree.data.xml; | |
| 42 | ||
| 43 | import org.xml.sax.Attributes; | |
| 44 | import org.xml.sax.SAXException; | |
| 45 | import org.xml.sax.helpers.DefaultHandler; | |
| 46 | ||
| 47 | /** | |
| 48 | * A SAX handler for reading a key. | |
| 49 | */ | |
| 50 | public class KeyHandler extends DefaultHandler implements DatasetTags { | |
| 51 | ||
| 52 | /** The root handler. */ | |
| 53 | private RootHandler rootHandler; | |
| 54 | ||
| 55 | /** The item handler. */ | |
| 56 | private ItemHandler itemHandler; | |
| 57 | ||
| 58 | /** Storage for the current CDATA */ | |
| 59 | private StringBuffer currentText; | |
| 60 | ||
| 61 | /** The key. */ | |
| 62 | //private Comparable key; | |
| 63 | ||
| 64 | /** | |
| 65 | * Creates a new handler. | |
| 66 | * | |
| 67 | * @param rootHandler the root handler. | |
| 68 | * @param itemHandler the item handler. | |
| 69 | */ | |
| 70 | public KeyHandler(RootHandler rootHandler, ItemHandler itemHandler) { | |
| 71 | this.rootHandler = rootHandler; | |
| 72 | this.itemHandler = itemHandler; | |
| 73 | this.currentText = new StringBuffer(); | |
| 74 | //this.key = null; | |
| 75 | } | |
| 76 | ||
| 77 | /** | |
| 78 | * The start of an element. | |
| 79 | * | |
| 80 | * @param namespaceURI the namespace. | |
| 81 | * @param localName the element name. | |
| 82 | * @param qName the element name. | |
| 83 | * @param atts the attributes. | |
| 84 | * | |
| 85 | * @throws SAXException for errors. | |
| 86 | */ | |
| 87 | public void startElement(String namespaceURI, | |
| 88 | String localName, | |
| 89 | String qName, | |
| 90 | Attributes atts) throws SAXException { | |
| 91 | ||
| 92 |
1
1. startElement : negated conditional → NO_COVERAGE |
if (qName.equals(KEY_TAG)) { |
| 93 |
1
1. startElement : removed call to org/jfree/data/xml/KeyHandler::clearCurrentText → NO_COVERAGE |
clearCurrentText(); |
| 94 | } | |
| 95 | else { | |
| 96 | throw new SAXException("Expecting <Key> but found " + qName); | |
| 97 | } | |
| 98 | ||
| 99 | } | |
| 100 | ||
| 101 | /** | |
| 102 | * The end of an element. | |
| 103 | * | |
| 104 | * @param namespaceURI the namespace. | |
| 105 | * @param localName the element name. | |
| 106 | * @param qName the element name. | |
| 107 | * | |
| 108 | * @throws SAXException for errors. | |
| 109 | */ | |
| 110 | public void endElement(String namespaceURI, | |
| 111 | String localName, | |
| 112 | String qName) throws SAXException { | |
| 113 | ||
| 114 |
1
1. endElement : negated conditional → NO_COVERAGE |
if (qName.equals(KEY_TAG)) { |
| 115 |
1
1. endElement : removed call to org/jfree/data/xml/ItemHandler::setKey → NO_COVERAGE |
this.itemHandler.setKey(getCurrentText()); |
| 116 | this.rootHandler.popSubHandler(); | |
| 117 |
1
1. endElement : removed call to org/jfree/data/xml/RootHandler::pushSubHandler → NO_COVERAGE |
this.rootHandler.pushSubHandler( |
| 118 | new ValueHandler(this.rootHandler, this.itemHandler) | |
| 119 | ); | |
| 120 | } | |
| 121 | else { | |
| 122 | throw new SAXException("Expecting </Key> but found " + qName); | |
| 123 | } | |
| 124 | ||
| 125 | } | |
| 126 | ||
| 127 | /** | |
| 128 | * Receives some (or all) of the text in the current element. | |
| 129 | * | |
| 130 | * @param ch character buffer. | |
| 131 | * @param start the start index. | |
| 132 | * @param length the length of the valid character data. | |
| 133 | */ | |
| 134 | public void characters(char[] ch, int start, int length) { | |
| 135 |
1
1. characters : negated conditional → NO_COVERAGE |
if (this.currentText != null) { |
| 136 | this.currentText.append(String.copyValueOf(ch, start, length)); | |
| 137 | } | |
| 138 | } | |
| 139 | ||
| 140 | /** | |
| 141 | * Returns the current text of the textbuffer. | |
| 142 | * | |
| 143 | * @return The current text. | |
| 144 | */ | |
| 145 | protected String getCurrentText() { | |
| 146 |
1
1. getCurrentText : mutated return of Object value for org/jfree/data/xml/KeyHandler::getCurrentText to ( if (x != null) null else throw new RuntimeException ) → NO_COVERAGE |
return this.currentText.toString(); |
| 147 | } | |
| 148 | ||
| 149 | /** | |
| 150 | * Removes all text from the textbuffer at the end of a CDATA section. | |
| 151 | */ | |
| 152 | protected void clearCurrentText() { | |
| 153 | this.currentText.delete(0, this.currentText.length()); | |
| 154 | } | |
| 155 | ||
| 156 | } | |
Mutations | ||
| 92 |
1.1 |
|
| 93 |
1.1 |
|
| 114 |
1.1 |
|
| 115 |
1.1 |
|
| 117 |
1.1 |
|
| 135 |
1.1 |
|
| 146 |
1.1 |


an-center* - containers
Anole uses Flexbox to simulate a grid system. A true grid system may be
added in the future. The classes
.an-center
,
.an-center-row
, and
.an-center-adjust
, provide basic containers which can arrange items (via Flexbox),
according to their different functions.
.an-box
with no further content but this text.
This box also has the class
.an-35p
so that it only takes up 35% of the page container's width.
.an-box
with no further content but this text.
This box also has the class
.an-35p
so that it only takes up 35% of the page container's width.
.an-box
with no further content but this text.
This box also has the class
.an-35p
so that it only takes up 35% of the page container's width.
.an-box
with no further content but this text.
This box also has the class
.an-35p
so that it only takes up 35% of the page container's width.


Saanika Gupta is a student of MYP5 at Oakridge International School, Bangalore. She has been a participating delegate at the Bangalore JMUN for three years. She has also served as the Rapporteur for WHO at the Bangalore JMUN 2019 and is excited to be co-chairing WHO for the upcoming conference. Apart from MUN, she engages with NGOs to contribute her bit towards the environment and community. Her interests lie in playing the guitar and writing. She is an avid traveller and enjoys exploring new cultures and cuisines.
She looks forward to making every delegate’s experience at the JMUN, their best one yet!
 She is an avid reader and spends her free time passionately researching topics of interest, from the science of yogurt to humanitarian crises.
Jahnavi Thejo Prakash is a student at Oakridge International School and the moderator of this committee. She is a die-hard fan of Harry Potter, plays piano, and sings in her free time. However, she is more passionate about debates, especially MUNs. She has been an avid participant in MUNs across two years and has learnt a lot from it. This year, she has been provided with the opportunity to take part in the Bangalore 2020 JMUN. She hopes that she will provide an enjoyable and fruitful experience for every delegate! She looks forward to working with you!


"My daughter, as a guide??".
Esil's explanation and Jin-Woo saying the exact same thing finally managed to calm down the boss's agitation . He settled back down on his throne to think
'The floor entry permit, and a guide? Are they truly everything he wants from us?'.
From the moment the demons found themselves locked up in here, they had to constantly hear the order to protect this land in their heads
The order itself was not what one would call forceful . However, just like one would follow their instincts to eat when they were hungry and sleep when they were tired, the demons all thought that they had to carry this order out
That was why the boss felt his heart fall to the pit of his stomach when he heard the news of black-armoured soldiers suddenly invading this land and hunting down lesser demons . He knew that the thing they were supposed to protect this place from had finally arrived
The boss gave it a lot of thought, before ordering the subjugation force to move out . And surprisingly, the platoons made up of black soldiers proved easier than expected to defeat
However, according to the reports made by the advanced scouts, there were enemies on a completely different scale compared to those easy-to-defeat black soldiers present as well
They said that against platoons led by the robe-wearing giant 'knight' that could spit out flames, or a knight with something lengthy attached to its helm, there was no guarantee of victory at all
And that was why the entirety of the Radiru Clan was getting ready to sortie in order to subjugate those two forces
Unfortunately, those reports failed to mention the man in front of the boss's eyes . Not even once . Meaning, the enemies' true combat force was someone else entirely different
'If I knew this monster-like human was the leader of those soldiers, I wouldn't even have started fighting in the first place . '.
The boss could see it
He rejoiced after hearing the news of those black soldiers suddenly vanishing .  They were hiding within the man's darkness, waiting for an order to attack
Even now, the boss felt a chill from the countless soldiers inside the shadow shooting him cold glares filled with thick, bone-chilling murderous intent
'Negotiating with a mere human hurts my pride, but '.
A certain scroll named 'Entry Permit' could also be found in the list of things the demons were supposed to protect . However, wasn't the cost of protecting that single scroll far too high?.
No, even if the boss was prepared to sacrifice every single one of his clansmen, he couldn't be sure of winning against this human and his soldiers
Not only that, this man .
'… . Is hiding his true abilities . '.
It was uncertain what he was aiming for, but there was little doubt that he was hiding almost all of his powers like an iceberg floating on the quiet water's surface . Fighting against an enemy no one could truly comprehend was a terrifying prospect, indeed
The boss asked again with a nervous expression
"Truly . is that all you want?".
If the boss could protect everyone simply by handing out that Entry permit, then there was no reason not to . Also, since he'd be doing that in order to protect this land, he wasn't exactly going against that order from the unknown source, either
Jin-Woo nodded his head
"You will not bring harm upon my daughter?".
Suddenly, Jin-Woo felt Esil's glance
'A monster worrying about his daughter, is it . '.
Jin-Woo was inwardly surprised but didn't forget to nod his head regardless
The boss pondered for a short while, before a smile formed on his face
"We'll do that, then . ".
The moment he agreed to hand it over, the boss felt as if a persistently-annoying aching tooth had finally come loose or some such
If the event of stopping the prophetised advent of calamity by handing over a scrap of paper didn't qualify as a matter to rejoice, then what else would?.
"No, if you could do that, we'd be very grateful . ".
Jin-Woo had been getting ready for the eventuality where things go the other way, but after seeing the boss's bright smile, he too smirked and let go of all the built-up tension in his body
'I guess Esil got her personality from her old man . '.
Was this how the System's setting was like for this place, or what she said was really
Jin-Woo quickly shook off the distracting thoughts and gave his assurance to the eagerly-waiting boss
"I keep my promises . ".
"Very good . ".
The boss snapped his fingers, and a soldier hurriedly brought a large scroll from somewhere to present it before Jin-Woo . He then unfurled the scroll
'It is really the Entry permit . '.
Confirming the contents of the scroll, a thick smile formed on Jin-Woo's lips
[Item: Entry Permit].
Rarity: ??.
Type: ??.
A permit allowing you to enter the 81st floor of the Demon's Castle . Can only be used on the 80th floor's floor-transfer magic circle
He was suspicious of whether he could get an item from monsters through nothing more than just dialogue, but this was really the Entry Permit he was looking for
If there was one difference from the permits found on the lower floors, then it'd be the red emblem of the Radiru Clan stamped on the bottom of the permit itself
'So, does this mean I'm supposed to take the permits away from different clans from this floor onwards?'.
The corners of Jin-Woo's lips arched up
He preferred this arrangement a lot more than hunting monsters endlessly and waiting forever for the permit to randomly drop without notice
Jin-Woo rolled the scroll back up and sent it to his Inventory
"Hey, is it fine if we get going now?".
Jin-Woo urged Esil and turned towards the exit, but then, the waiting knights suddenly blocked the doorway
'… . ?'.
Jin-Woo looked back feeling puzzled, only to find Esil grinning brightly back at him
So, what was going on now?.
The boss quickly walked over and stood before Jin-Woo
"We'd never let an important guest of the Radiru Clan go like this . ".
A certain overbearing aura came off from the boss's large frame . However, seeing that there was a smile of a friendly neighbourhood uncle etched on his face, it didn't look like he was trying to intimidate the other party
The boss spoke with a pleading tone of voice
"As a celebration of the successful negotiation, would you mind having a feast with us? We also need to prepare my daughter for the long voyage ahead . ".
Jin-Woo shifted his gaze over to Esil
She was cautiously waiting for his answer, although he could easily see that she also wanted this
Well, she did keep her side of the bargain . So, wouldn't it be only right that he too behave in a gentlemanly manner, too?.
Besides, he also needed to eat anyway, and he had grown sick and tired of the stale bread and jerky strip combo being sold in the Store by now
" Okay, I will . ".
Jin-Woo finally consented after a short bout of hesitation, prompting the boss to break out in a big grin
"Thank you!".
The complexions of Esil and the knights also brightened considerably . Soon, the boss was yelling at his subordinates
"What are you all doing? Prepared for a grand feast!".
***.
Since he had spent way too much time on the 80th floor, he wasn't planning on wasting any more on other floors
He was worried about whether Esil, coming with him as a guide, could use the floor-transfer magic circles or not, but that worry was put to rest pretty quickly
[A Demon Aristocrat has requested to accompany you . ].
[Will you allow it?].
[Once allowed, the companion will be able to use the magic circles, and depending on the rate of contribution, experience points earned will be shared as well . ].
'… . Wait, I'll be sharing my experience points with my companion??'.
The thing about sharing experience points got on his nerves slightly, but thankfully, there was the clause about 'rate of contribution' . Which meant that, as long as he didn't give his companion a chance to fight, the experience points wouldn't be divided at all
So, Jin-Woo made sure to drill this point into Esil
"Even if battles break out, you must not interfere . I shall take care of everything . Understood?".
" . Y-yes . ".
Esil replied rather shyly
'… . ??'.
In any case, Jin-Woo agreed to her accompanying him and hurried with his steps . A few steps behind him, Esil did her best to chase after Jin-Woo while carrying luggage several times the size of her actual body
The luggage itself wasn't heavy, but keeping up with Jin-Woo's walking speed was proving to be somewhat challenging to her . Jin-Woo had no choice but to stop and wait now and then so she could catch up to him
"We can see it now over there . ".
After arriving on the 81st floor, Esil began checking out the map of this very floor, and then, pointed at the faint outline of a castle far away from them . Jin-Woo nodded his head, having already thought as much
"Please wait . ".
Esil put down the large luggage, and began rummaging through it . Soon, a ceramic liquor bottle rested in her hands . Jin-Woo had to ask her about that
"What are you planning to do with that now?".
"This is a bottle of the finest liquor that the Clan Head of the Garuche Clan enjoys . If we go and speak to him with it, the negotiation will be . ".
"Negotiation?".
Jin-Woo smirked and summoned his Shadow Soldiers out
'Come out . '.
As soon as he called, the soldiers instantly revealed themselves
Shururu .
'How can this be ?!'.
Esil doubted her own sight, then
There were three 'soldiers' with similar levels to that of an upper Demon Aristocrat . And then, two deadly-looking daggers suddenly appeared out of nowhere to rest in the hands of the very person who summoned these soldiers
After being subjected to an aura that was sharp enough to almost slice her flesh simply by standing near him, Esil had to do a double take to make sure that the man in front of her eyes was the same person she had been conversing with until just now
"Y-you're not going to negotiate with them??".
Rather than an answer, Jin-Woo asked back, instead
"By any chance, is your clan friendly with this Garuche or whatever clan?".
"N-no, not at all . We the aristocrats always competed bitterly against each other for a place in the Demon World's nobility ranking, so Still, they are a group we can hold civilised meetings with . ".
Hearing that, Jin-Woo simply grinned
"In that case, it's fine . ".
Making one exception was enough . Just as important as finding the Entry Permit, he needed to raise his level, too
"You, wait here . ".
Jin-Woo told her as so, and while leading his soldiers forward, headed towards the distant castle
"P-please, wait!!".
Esil stood there in stunned silence for a moment, before she belatedly stared in the direction of Jin-Woo's travel
"Heok!!".
In that short amount of time, the castle belonging to the Garuche Clan was burning in flames
Rumble
A monster as tall as a giant spat out a pillar of flames, and the castle's gate and walls melted down without offering any resistance whatsoever . Garuche knights rushing out in confusion were cut down by the black soldiers one by one
"Oh, my dear lord '.
Esil was so shocked that she spat out something that could either be a gasp or a moan
"Kuwaahhhk!!".
"Uwaaah!!".
The castle of Garuche that looked several times more impregnable than Radiru Clan's own castle, was powerlessly crumbling down . Esil could only swallow down her nervous saliva
'If father didn't hand over the permit willingly, then . '.
The Radiru castle might have been burning down to cinders just like the Garuche castle right about now
Just imagining it made her dizzy . At the same time, she thought that her clan got a really lucky break after their negotiation went down so well
Kaboom!!!.
Another tower beyond the castle walls crumbled back down to earth with a loud explosion
'How can anyone fight against a monster like him ?'.
Esil wiped the sweat drops trickling down to her chin, and breathed a sigh of relief, knowing that her clan had managed to skirt past a calamity
***.
The higher-ups of the Japanese Hunter Association and the ministerial members of the Japanese government had gathered today for an urgent meeting
As the heavy, gloomy atmosphere descended on the conference chamber, the Association President quietly opened his mouth
"I hear that recently, the mood in South Korea is boisterous due to the entrance of their tenth rank S Hunter . ".
The high ranking officials present smirked slightly
There were already more than twenty rank S Hunters in Japan . Yet, the Koreans were celebrating their tenth rank S?.
Well, that did make some sense considering that, after excluding the two they lost to an accident as well as to emigration, there were only eight rank S Hunters found in Korea, to begin with
Whatever the case may be, today's meeting wasn't held to ridicule South Korea . If that were the case, then the atmosphere of this place wouldn't be this grave
Sitting in his chair with a deep frown on his face, the 'Boei Daijin' of Japan – the Minister of Defense – testily opened his mouth
"What does that have to do with today's meeting?".
His voice accurately conveyed how deeply troubled he was
The island at the southern end of the Korean peninsula, Jeju Island, had been completely overrun by monsters after the Koreans failed to clear a dungeon there
On top of that, these weren't any other regular monsters, but ant-types that boasted a rigid hierarchy system as well as an incredibly rapid reproduction rate
If that was all, the Japanese government would simply ridicule their Korean counterpart and laugh at their misfortune, but now, the Japanese mainland was bearing the cost of that mishap as well
Only yesterday, an ant they suspected to have flown in from the Jeju Island completely wiped a small village off the Japanese map
They could no longer ignore the fallout from that event anymore . Most of all, their urgent priority had to be with calming down the irate Prime Minister and his orders of finding a speedy resolution to this crisis
Which meant, the job security of several important people gathered here was hanging in the balance, yet to start such an important meeting off with some useless banter?.
It was only natural that the Defense Minister would frown unhappily
However, the Association President carried on regardless
"People are more prone to making mistakes when they are in an agitated state . ".
The snow-white hair and wrinkles filling up the entirety of his face spoke of how old he was already
"And I believe this is the best chance for us . ".
His declaration managed to gather the eyes of everyone present within this noisy conference chamber . Unlike just now, when he raised his voice in unhappiness, the Minister of Defense was speaking with a lot more nervousness
"Do you have a good plan in mind?".
"Rather than calling it 'good', I'd say 'appropriate' is a more suitable description, instead . ".
Everyone present, including the Minister of Defense, as well as various ministers and Association's own upper management, all focused their attention on the Association President's words
As if he was taking his time for precisely this moment, the President opened his mouth
"If you insist that a piece of land is yours when you don't even have enough strength to defend it, will anyone acknowledge you as the owner?".
" . ".
A bout of silence fell on the conference room
Just what was the Association President trying to say here?.
Considering the relationship between South Korea and Japan, that declaration would never be glossed over as a senile old man's ramblings if the general public got wind of that
Not to forget, this old man was none other than the current President of the Japanese Hunter's Association
" . So, what is it that you wish to say?".
Minister of State cautiously asked
The Association President scanned the men sitting to his left and right side, before confidently declaring out loudly
"We shall get rid of the monsters in the Jeju island . ".
Noisy, noisy .
"And then ".
The chamber had gotten noisy for a brief moment, but it was silenced immediately by the Association President's voice
He carried on
" We will take Jeju island from them . ".
< Chapter 103 > Fin


Dear Sir/Madam, I am Mr Ayo Adio I need your services in a confidential matter regarding money transfer. This requires a private arrangement though the details of the transaction will be furnish to you if you indicate your interest in this proposal. We have all the legal documents to back up the transaction, besides we have worked out the modalities to ensure smooth and risky free transfer. We are willing to offer you 40% of the money, the fund in question is quite large. All correspondences will be via email and telephone for now. I am expecting to hear from you, if you are willing to do the business with us,your private phone number is needed. Please let me hear from you immediately only in my private email box<EMAIL_ADDRESS>Waiting to hear from you. Thanks, Yours Faithfully, Mr. Ayo Adio


Chapter 5. Running Squid
Now that you have Squid installed, and maybe even configured, you
need to learn the ins and outs of running Squid. Although most of the
configuration occurs in squid.conf, you may find
some of Squid's command-line options useful. For
example, one of the first things you must do is use the
-z option to initialize the cache directories. You
may also find the -d option useful for debugging.
Squid normally runs as a daemon process. If you are new to Squid,
however, I recommend running Squid in the foreground from a terminal
window until you are confident that it is working properly. Following
that, you can run Squid as a daemon, in the background. Most likely,
you'll want to start Squid each time your system
boots. Different operating systems have different approaches to
startup scripts. I'll show you how to make it happen
in three different ways.
You can send signals to the running Squid process to execute various
tasks, such as halting and reconfiguring Squid, and rotating the log
files. Although you can use the kill command to
send signals, it is easier to use the squid
-k commands.
|


K. Lokeshwaran - Professional Driver Member since Nov. 2012
Average Speed
Kms Distance
Hours of Driving
Driving Efficiency


Description
The designated EOP counselor serves a caseload of about 60
Cal Independent Scholars Network (CISN)
students every academic year. Students are encouraged to meet semesterly with the EOP counselor for assistance in academic planning. Every semester, the BHS Director and EOP counselor perform a grade check for all students. Students who do not pass a class or are placed on academic probation are required to meet with the EOP counselor to overview their course schedule. The students housing account for books will not be set up until they complete a
Semester Study List
with their EOP counselor.
The counselor also helps to co-facilitate a Fall transitional course for incoming BHS students titled Ensuring Success for Foster Youth in Higher Education. This one unit p/np Social Welfare 97/197 course includes campus resources, community building and a general introduction to the research university. In addition, all incoming BHS students receive a iPAD which is used to create an interactive narrative presentation during the course.
References
Watch this video
to learn more about the BHS student experience.


Abstract
The Precis ontology is designed to encapsulate portfolio information about an individual. This includes information that would traditionally be presented in a Resume/CV. This ontology is designed to be used with the Precis toolkit; see http://precis.rukmal.me for more.
Currently, this ontology powers a templating engine to generate dyanmic resumes, but has the potential to power other personal data driven experiences.


Shortcuts to NIFTY 50 Intraday Graphs
Select a NIFTY50 from below:
Open Chart from list !
Or enter a SYMBOL Below
Open From Symbol !


1 /* 2 * Copyright (c) 2014, 2015 Qualcomm Technologies Inc 3 * 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without modification, are permitted 7 * (subject to the limitations in the disclaimer below) provided that the following conditions are 8 * met: 9 * 10 * Redistributions of source code must retain the above copyright notice, this list of conditions 11 * and the following disclaimer. 12 * 13 * Redistributions in binary form must reproduce the above copyright notice, this list of conditions 14 * and the following disclaimer in the documentation and/or other materials provided with the 15 * distribution. 16 * 17 * Neither the name of Qualcomm Technologies Inc nor the names of its contributors may be used to 18 * endorse or promote products derived from this software without specific prior written permission. 19 * 20 * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 24 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 25 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, 26 * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 28 * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 */ 30 31 32 /** 33 * FTC Robot Controller. Used to control an FTC Robot. 34 * <p> 35 * The quickest way to get started is to look at {@link com.qualcomm.ftcrobotcontroller.opmodes} 36 */ 37 package com.qualcomm.ftcrobotcontroller;


All Our Ideas is a platform that enables groups to collect and prioritise ideas in a transparent, democratic, and bottom-up way. It’s a suggestion box for the digital age.
Learn moreYou can use All Our Ideas to create a website where visitors can vote on ideas and upload new ones. The intuitive and fun voting process yields powerful results.
See an exampleClick on the link below to get started with All Our Ideas. It is free, easy, and built on open source technology. Create your own interactive suggestion box and start discovering.
Create a question


Add any of the below mentioned modifier classes to change the appearance of a label.
| Classes | Labels |
|---|---|
.label-default |
Default |
.label-primary |
Primary |
.label-success |
Success |
.label-info |
Info |
.label-warning |
Warning |
.label-danger |
Danger |
Simply put the .label
class and make your span
stand out in different header sizes
Add modifier classes to change the appearance of a badge.
| Classes | Badges |
|---|---|
| No modifiers | 42 |
.badge-primary |
1 |
.badge-success |
22 |
.badge-info |
30 |
.badge-warning |
412 |
.badge-danger |
999 |


https://w3id.org/rec/lfr/
This REC module covers the data model used by government agency Lantmäteriet, the Swedish National Land Survey, in its Fastighetsregister, Swedish Real Property Register (SRPR)
| IRI | https://w3id.org/rec/lfr/LfrAddressLocation |
|---|---|
| Description |
The address location is an abstract class. Should not be instantiated. Use the sub classes instead. |
| Super-classes |
http://www.opengis.net/ont/geosparql#Geometryc |
| Sub-classes |
LfrMetricalAddressLocationc LfrCityAddressLocationc LfrStreetAddressLocationc |
| In domain of |
hasLfrAddressLocationAttributedp |
| In range of |
hasLfrAddressLocationop |
| IRI | https://w3id.org/rec/lfr/LfrApartment |
|---|---|
| Description |
An apartment. Only a subset of available properties are modelled. |
| Super-classes |
https://w3id.org/rec/core/Apartmentc |
| In domain of |
hasLfrEntranceop lfrApartmentAreadp lfrApartmentNumberdp |
| IRI | https://w3id.org/rec/lfr/LfrCityAddressLocation |
|---|---|
| Super-classes |
LfrAddressLocationc |
| In domain of |
hasLfrCityNamedp |
| IRI | https://w3id.org/rec/lfr/LfrEntrance |
|---|---|
| Description |
An entrance. Only a subset of available properties are modelled. |
| Super-classes |
https://w3id.org/rec/core/BuildingComponentc |
| In domain of |
lfrEntranceTypeop hasLfrAddressLocationop |
| In range of |
hasLfrEntranceop |
| IRI | https://w3id.org/rec/lfr/LfrEntranceType |
|---|---|
| Description |
Representation of the type of entrance (entre). The possible types are modelled as named individuals. |
| Super-classes |
https://w3id.org/rec/core/Typec |
| In range of |
lfrEntranceTypeop |
| IRI | https://w3id.org/rec/lfr/LfrMetricalAddressLocation |
|---|---|
| Super-classes |
LfrAddressLocationc |
| In domain of |
hasLfrMetricalAddressNamedp |
| IRI | https://w3id.org/rec/lfr/LfrStreetAddressLocation |
|---|---|
| Super-classes |
LfrAddressLocationc |
| In domain of |
hasLfrStreetNamedp |
| IRI | https://w3id.org/rec/lfr/hasLfrAddressLocation |
|---|---|
| Description | Association between an entrance (entre) and its address location (adressplats). |
| Super-properties | http://www.opengis.net/ont/geosparql#hasGeometry |
| Inverse properties | locationOfLfrEntranceop |
| Domain(s) | LfrEntrancec |
| Range(s) | LfrAddressLocationc |
| IRI | https://w3id.org/rec/lfr/hasLfrEntrance |
|---|---|
| Description | Association between an apartment (lägenhet) and an entrance (entre). |
| Super-properties | owl:topObjectProperty |
| Domain(s) | LfrApartmentc |
| Range(s) | LfrEntrancec |
| IRI | https://w3id.org/rec/lfr/lfrEntranceType |
|---|---|
| Description | Representation of the type of entrance (entre). The possible entrance types are modelled as named individuals. |
| Domain(s) | LfrEntrancec |
| Range(s) | LfrEntranceTypec |
| IRI | https://w3id.org/rec/lfr/locationOfLfrEntrance |
|---|---|
| Description | Association between an address location (adressplats) and its entrance (entre). Inverse to hasLfrAddressLocation and not part of the formal LFR specification. |
| IRI | https://w3id.org/rec/lfr/locationOfRealEstate |
|---|---|
| Description | Association between an address location (adressplats) and a real estate (fastighet). |
| IRI | https://w3id.org/rec/lfr/hasLfrAddressLocationAttribute |
|---|---|
| Description | A number of attributes (fields) related to address location. Together they represent a minimum implementation of the standardized address location (adressplats). |
| Super-properties | http://www.opengis.net/ont/geosparql#hasSerialization |
| Domain(s) | LfrAddressLocationc |
| IRI | https://w3id.org/rec/lfr/hasLfrCityName |
|---|---|
| Description | City name. Note that object type 90A field 15 ("ADRTYP") holds the key to interpretation of this field; value = 3 (~byadressområde) implies a city name (bynamn). Also note that city name may be different to the postal location. |
| Super-properties | hasLfrAddressLocationAttributedp |
| Domain(s) | LfrCityAddressLocationc |
| Range(s) | xsd:stringc |
| IRI | https://w3id.org/rec/lfr/hasLfrCountyCode |
|---|---|
| Super-properties | hasLfrAddressLocationAttributedp |
| Range(s) | xsd:stringc |
| IRI | https://w3id.org/rec/lfr/hasLfrEastCoordinate |
|---|---|
| Description | East-west directional coordinate in meters according to SWEREF 99 TM. Comprises 7 digits followed by optional decimal point and up to three digits (NNNNNNN[.NNN]). |
| Super-properties | hasLfrAddressLocationAttributedp |
| IRI | https://w3id.org/rec/lfr/hasLfrMetricalAddressName |
|---|---|
| Description | Metrical address name. Note that object type 90A field 15 ("ADRTYP") holds the key to interpretation of this field; value = 2 (~metertalsadressområde) implies a metrical address name. |
| Super-properties | hasLfrAddressLocationAttributedp |
| Domain(s) | LfrMetricalAddressLocationc |
| Range(s) | xsd:stringc |
| IRI | https://w3id.org/rec/lfr/hasLfrMunicipalityCode |
|---|---|
| Super-properties | hasLfrAddressLocationAttributedp |
| Range(s) | xsd:stringc |
| IRI | https://w3id.org/rec/lfr/hasLfrMunicipalityPart |
|---|---|
| Super-properties | hasLfrAddressLocationAttributedp |
| Range(s) | xsd:stringc |
| IRI | https://w3id.org/rec/lfr/hasLfrNorthCoordinate |
|---|---|
| Description | North-south directional coordinate in meters according to SWEREF 99 TM. Comprises 7 digits followed by optional decimal point and up to three digits (NNNNNNN[.NNN]). |
| Super-properties | hasLfrAddressLocationAttributedp |
| IRI | https://w3id.org/rec/lfr/hasLfrPostalCode |
|---|---|
| Super-properties | hasLfrAddressLocationAttributedp |
| Range(s) | xsd:stringc |
| IRI | https://w3id.org/rec/lfr/hasLfrPostalLocation |
|---|---|
| Super-properties | hasLfrAddressLocationAttributedp |
| Range(s) | xsd:stringc |
| IRI | https://w3id.org/rec/lfr/hasLfrStreetName |
|---|---|
| Description | Street name. Note that object type 90A field 15 ("ADRTYP") holds the key to interpretation of this field; value = 1 (~gatuadressområde) implies a street name. |
| Super-properties | hasLfrAddressLocationAttributedp |
| Domain(s) | LfrStreetAddressLocationc |
| Range(s) | xsd:stringc |
| IRI | https://w3id.org/rec/lfr/lfrApartmentArea |
|---|---|
| Description | The area in square meters (m2) of an apartment (lägenhet). |
| Super-properties | owl:topDataProperty |
| Domain(s) | LfrApartmentc |
| Range(s) | xsd:integerc |
| IRI | https://w3id.org/rec/lfr/lfrApartmentNumber |
|---|---|
| Super-properties | owl:topDataProperty |
| Domain(s) | LfrApartmentc |
| Range(s) | xsd:stringc |
| IRI | https://w3id.org/rec/lfr/lfrBuildingNumber |
|---|---|
| Description | The serial number for all buildings on a property. |
| Super-properties | owl:topDataProperty |
| Domain(s) | https://w3id.org/rec/core/Buildingc |
| Range(s) | xsd:stringc |
| IRI | https://w3id.org/rec/lfr/lfrTotalResidenceArea |
|---|---|
| Description | The total area in square meters (m2) of all residences (apartments) in a building. |
| Super-properties | owl:topDataProperty |
| Domain(s) | https://w3id.org/rec/core/Buildingc |
| Range(s) | xsd:integerc |
| IRI | https://w3id.org/rec/lfr/lfrUUID |
|---|---|
| Description | All objects in the SRPR (Lantmäteriets Fastighetsregister, LFR) has unique identifiers, UUIDs. |
| Super-properties | owl:topDataProperty |
| Domain(s) | (https://w3id.org/rec/core/Buildingc or https://w3id.org/rec/core/RealEstatec or LfrApartmentc or LfrEntrancec) |
| Range(s) | xsd:stringc |
| IRI |
https://w3id.org/rec/lfr/LfrDeliveryAddress
|
|---|---|
| Description | One of the entrance types. |
| See Also | SRPR version 11.40, object type 55A field 13 ("ENTRETYP") value 5. |
| IRI |
https://w3id.org/rec/lfr/LfrMissingInformation
|
|---|---|
| Description | One of the entrance types. |
| See Also | SRPR version 11.40, object type 55A field 13 ("ENTRETYP") value 9. |
| IRI |
https://w3id.org/rec/lfr/LfrResidenceAddress
|
|---|---|
| Description | One of the entrance types. |
| See Also | SRPR version 11.40, object type 55A field 13 ("ENTRETYP") value 1. |
| IRI |
https://w3id.org/rec/lfr/LfrResidenceAddressRegisteredApartment
|
|---|---|
| Description | One of the entrance types. |
| See Also | SRPR version 11.40, object type 55A field 13 ("ENTRETYP") value 2. |
| IRI |
https://w3id.org/rec/lfr/LfrShopAddress
|
|---|---|
| Description | One of the entrance types. |
| See Also | SRPR version 11.40, object type 55A field 13 ("ENTRETYP") value 3. |
| IRI |
https://w3id.org/rec/lfr/LfrVisitingAddress
|
|---|---|
| Description | One of the entrance types. |
| See Also | SRPR version 11.40, object type 55A field 13 ("ENTRETYP") value 4. |
https://w3id.org/rec/lfr/
http://creativecommons.org/ns#
http://www.ontologydesignpatterns.org/schemas/cpannotationschema.owl#
http://purl.org/dc/elements/1.1/
http://purl.org/dc/terms/
https://karlhammar.com/owl2oas/o2o.owl#
http://www.w3.org/2002/07/owl#
http://www.w3.org/ns/prov#
http://www.w3.org/1999/02/22-rdf-syntax-ns#
http://www.w3.org/2000/01/rdf-schema#
https://schema.org/
http://www.w3.org/2004/02/skos/core#
http://purl.org/vocab/vann/
http://www.w3.org/XML/1998/namespace
http://www.w3.org/2001/XMLSchema#
| c | Classes |
| op | Object Properties |
| fp | Functional Properties |
| dp | Data Properties |
| dp | Annotation Properties |
| p | Properties |
| ni | Named Individuals |


Quiz.js (Demo)
Create quizzes easily
Doc
- Installation
Simply import Quiz into your HTML.
<script src="https://unpkg.com/quiz.js/Quiz.min.js"></script>
- How to use
Create a new Quiz
object :
let quiz = new Quiz(questions);
quiz
.setTimeLimit(1000*20) // (Optional) Set a time limit to answer
.attachTo('#test') // Display the quiz in the targeted element
.start(3); // Start the quiz with 3 random questions
// OR
let quiz = new Quiz();
quiz
.setTimeLimit(1000*20) // (Optional) Set a time limit to answer
.attachTo('#test') // Display the quiz in the targeted element
.start(questions); // Start the quiz with every specified question
- Questions
[
{
id: '1+1', // Unique question ID
title: '1 + 1 = ?', // Actual question displayed
answer: '2', // Correct answer (must correspond to one of the answers' value)
answers: [ // Answer list
{
title: '11', // Answer displayed
value: '11', // Answer actual value
chosenPercentage: 11 // Percentage of people who chose this answer
},
...
]
},
...
]
- Methods
See the documentation for the method definitions.
- Example
See this JSFiddle for a working example
Authors
- Zenoo - Initial work - Zenoo.fr


Back to Home
Registration
Full suported of all new frame works and languages template with very clean and aesthetic style prepared for your next app.
Username
Password
Repeat Password
Email Address
Repeat Email Address
Sigh up for our newsletter
Register
Cancel
Exclusive Admin
- Product of devdap
2018 Copyrights. All Rights Reserved.


NEWS: We have located all four required sponsors. There are no more open slots. We will issue appropriate press release shortly.
BigTIFF logically extends the original TIFF file format (referred to as 'ClassicTIFF' from this point on), breaking the 4 gigabyte boundary, in theory allowing files up to 18,000 petabytes in size. The BigTIFF specification is the result of work by a variety of parties on the LibTiff mailing list, including the current LibTiff maintainers, Joris Van Damme and Adobe staff. The BigTIFF specification has not yet been officially approved by the TIFF specification owner (Adobe) but implementation within LibTiff could accelerate that process.
For more information on the BigTIFF file format, we recommend AWare Systems' BigTIFF page.
BigTIFF is expected to be especially useful for people and vendors that are confronted with unusually large images, and still seek to use an open, simple, and extendable format. This requirement is frequently seen in the geospatial field, but also affects large format scanners, medical imaging and other fields.
It is planned that LibTiff 4.0, the BigTIFF upgrade to LibTiff, would start March 1, 2007. A preliminary version (LibTiff 4.0alpha1) will be operational by June 15, 2007. Testing and final release improvements for LibTiff 4.0 will be completed by July 30, 2007.
The LibTiff BigTIFF upgrade team is seeking USD 24,000 from four sponsors (USD 6,000 each) to fund the project. Sponsorship payment will be invoiced upon delivery of the LibTiff 4.0alpha1 release (on or before June 15) with a 30 day payable, giving time for some technical review.
In addition to the benefits of open interchange of BigTIFF data that comes from support in a public and free open source codec, sponsors will be given proper public acknowledgment. During development, they will be mentioned in the appropriate sections of the LibTiff and AWare Systems site.
When LibTiff 4.0 with BigTIFF support is released, they will additionally receive public acknowledgment in a formal press release, distributed widely to news venues in the imaging and geospatial industries.
A 'migration guide' document or any functional equivalent thereof will be included in the standard free distribution, but sponsors will additionally receive up to 20 hours of consulting and support on any BigTIFF migration issues that they may be facing, and/or any additional related requests they may have.
The work will primarily be done by Joris Van Damme on behalf of his company AWare Systems. Joris was closely involved in the drafting of the BigTIFF file format proposal, and has also developed the proprietary AWare Systems TIFF codec that already supports BigTIFF. Joris Van Damme has a deep understanding of the TIFF format, and has been acting as a LibTiff co-maintainer for over a year, contributing the upgraded OJPEG codec as well as several other improvements.
Joris and AWare Systems have agreed to crosstest their proprietary codec and LibTiff's support for BigTIFF extensively. Joris will also extend the test image library included with LibTiff, with a number of varying BigTIFF test files. These files will primarily include test files with issues that relate closely to the BigTIFF file format and the difference with ClassicTIFF. For instance, in BigTIFF the datatypes TIFF_LONG, TIFF_LONG8, TIFF_IFD and TIFF_IFD8 are all valid for tags pointing to additional IFDs, and thus files will be included to illustrate and enable testing all of these. Additionally, Joris will build a tool to enable creating test files that exceed 4 gigabyte, as these can of course not be included in the test suite in a more direct manner, and a tool to convert files from ClassicTIFF to BigTIFF, as well as the other way around for source BigTIFF files that do not exceed 4 gigabyte in size.
Frank Warmerdam has also agreed to be involved in a consulting and validation role. Frank has been LibTiff's primary maintainer since approximately the year 2000, develops large-image exploitation software for the geospatial industry (GDAL) and is currently President of the Open Source Geospatial Foundation (OSGeo). Frank will also be ensuring that BigTIFF improvements are made accessible to all users of the GDAL library.
Many people who have a need for BigTIFF, use LibTiff already. We thus plan to support BigTIFF in LibTiff, applying a minimum change strategy much like the one that was applied in the creation of the new file format in the first place.
To support BigTIFF, we will use a 64bit integer datatype. It is anticipated that some older platforms will not be able to comply with this need, and for that reason we will encapsulate all required changes inside a conditional compilation switch.
While it is anticipated that there will be ABI (application binary interface) changes as part of a BigTIFF support upgrade to LibTiff, and possibly some more to support other major upgrades to LibTiff, the plan is such that the source level API will remain compatible for most LibTiff applications. Applications using specialized interfaces may require some minor source code changes, but we will provide backwards compatibility to support the majority of existing application level code.
The resulting LibTiff version would transparently support reading traditional 32bit ClassicTIFF files, and 64bit BigTIFF files, as well as writing either ClassicTIFF or BigTIFF files based on a flag in the TIFFOpen/TIFFClientOpen call.
The licensing agreement of LibTiff will remain unchanged.
Please contact Frank Warmerdam and/or Joris Van Damme for more information on sponsorship agreements.


Cédric Campguilhem, March 2018
This notebook shows the capability of Decision Trees from Scikit-Learn package as well as some visualization techniques provided by pandas and seaborn. I have decided to use the Iris dataset to illustrate what we can do with it.
The Iris Species dataset is a famous dataset for any machine learning amateur, as it's a simple dataset which can be used for classification problems. The Iris Species dataset was originally used in R.A. Fisher's classic 1936 paper, The Use of Multiple Measurements in Taxonomic Problems.
I am following the Udadicty free Machine Learning course which main problem is not to have assignments ! So this is an attempt to illustrate what I have learnt there.
I use the Kaggle beta API to collect the dataset on my local computer. First we download the dataset locally. If you want to replicate this step you need to install the Kaggle beta API and create an account on Kaggle website. Finally you will need to create an API token key for your account. The GitHub repository has all information required.
We can load the dataset with pandas:
And get few statistics about the dataset:
The dataset is pretty clean. No null values, so we will keep the 150 samples as-is. For each sample we have 4 measures:
For each sample we have a "class" which is the the type of iris. We have 50 samples for each type:
%matplotlib inline
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
sns.set_style("whitegrid")
plt.rcParams["figure.figsize"] = (14, 7)
Convert to long format to ease distribution plots:
df_melted = df.melt(id_vars=["Species"])
df_melted.head()
We can start be having a look a distribution for each feature using a boxplot:
We can see that distribution for petal length and width are quite different for the 3 different species, more specifically for Iris-setosa which is smaller. Sepal features bring "less" information on how to make distinction between the species.
Another way to visualize distributions is to use histograms layout in a facet grid:
From the above plot, we confirm the difference of Iris-setosa for petal features.
We can figure out if features are correlated using a pair plot:
Sepal length is correlated (linearly) with sepal width. It is also correlated with petal length and width except for Iris-setosa. Similarly petal length and width are correlated, except for Iris-setosa.
Visualization of high-dimensional data is a challenge. Both pandas and scikit-learn bring options to the table.
The Andrews curves is a technique using values of features to feed a Fourier series. Each sample in the dataset is then represented by a curve:
Once again, we can see that Iris-setosa clearly stands out again other species of Iris.
Another way to visualize the dataset is to used samples projection on 2D space techniques. Scikit-learn comes with manifold techniques, for example t-distributed Stochastic Neighbor Embedding (t-SNE). This method may be computationally expensive in very high-dimension spaces.
from sklearn.manifold import TSNE
df_features = df[["SepalLengthCm", "SepalWidthCm", "PetalLengthCm",
"PetalWidthCm"]]
df_classes = df[["Species"]]
tsne = TSNE(n_components=2, random_state=1234)
df_proj = pd.DataFrame(tsne.fit_transform(df_features))
df_proj["Species"] = df_classes.Species.values
df_proj = df_proj.rename(columns={0: "var1", 1: "var2"})
df_proj.head()
For more information on t-SNE check this video.
For such a simple problem (4 features), it is not necessary to reduce dimensionality for training an algorithm. However, it will come in handy to visualize the boundaries created by our decision tree classifier. It will be easier to visualize the boundaries of decision tree in a 2D plot, so we are going to keep only two dimensions. We will use a principal component analysis decomposition (PCA) from sklearn package:
from sklearn.decomposition import PCA
pca = PCA(n_components=2)
pca.fit(df_features)
df_reduced = pd.DataFrame(pca.transform(df_features))
df_reduced["Species"] = df_classes.Species.values
df_reduced = df_reduced.rename(columns={0: "var1", 1: "var2"})
df_reduced.head()
Now visualize the Iris species in a reduced data space:
ax = sns.lmplot(x="var1", y="var2", hue="Species", data=df_reduced, size=6, aspect=1.5, fit_reg=False,
scatter_kws={"s": 100})
ax.fig.suptitle("Iris species in reduced dimension space", fontsize=20)
ax.fig.subplots_adjust(top=0.9);
We can see on this reduced dimension space that Iris-setosa is pretty easy to identify (just like in the full dimension space). The boundary between Iris-versicolor and Iris-virginica is less obvious. We will see in the next section how decision tree may be tuned to separate these three species.
Source: https://www.saagie.com/fr/blog/machine-learning-pour-les-grand-meres
Classification: what is the type ?
Regression: what is the value ?
Source: https://medium.com/@heyozramos/regression-vs-classification-86d73c281c5e
Given measures of Iris, what species is that ?
In this section, we are going to train a decision tree classifier. First wee need to split the dataset into training and testing datasets. We will train the algorithm in the reduced space that we have created above with PCA.
We use 30% percent of dataset for test. I am using StratifiedShuffleSplit to keep the same proportion for each species in the training and testing datasets.
from sklearn.model_selection import StratifiedShuffleSplit
splitter = StratifiedShuffleSplit(n_splits=1, test_size=0.3, random_state=1234)
indices = splitter.split(df_features, df_classes).next()
features_train = df_reduced.iloc[indices[0], [0, 1]]
targets_train = df_reduced.iloc[indices[0], [2]]
features_test = df_reduced.iloc[indices[1], [0, 1]]
targets_test = df_reduced.iloc[indices[1], [2]]
def plot_dataset(features_train, targets_train, features_test, targets_test, clf=None, title=None):
"""
Plot train and test datasets on given Axes
- features_train: training features
- targets_train: training classes
- features_test: testing features
- targets_test: testing classes
- ax: matplotlib Axes object
- clf: trained classifier
"""
#Create figure
fig = plt.figure()
ax = fig.add_subplot(111)
#Classifier boundary
if clf is not None:
#Create a grid
x, y = np.meshgrid(np.linspace(-4, 4, 30), np.linspace(-1.5, 1.5, 30))
X = x.flatten()
Y = y.flatten()
inp = np.vstack((X, Y)).transpose()
#Predict classes
pred = clf.predict(inp)
#Convert to numerical values
dct = {"Iris-setosa": 0, "Iris-versicolor": 1, "Iris-virginica": 2}
dctinv = {0: "Iris-setosa", 1: "Iris-versicolor", 2: "Iris-virginica"}
f = lambda x: an[x]
conv = np.vectorize(lambda x: dct[x])
Z = conv(pred)
#Plot contour
z = Z.reshape(x.shape)
levels = [-0.5, 0.5, 1.5, 2.5]
cf = ax.contourf(x, y, z, levels=levels, colors=["#3274A1", "#E1812C", "#3A923A"], alpha=0.5)
cbar = fig.colorbar(cf, ax=ax, orientation="horizontal", aspect=20, fraction=0.07, shrink=1)
cbar.set_ticks([0,1,2])
cbar.set_ticklabels([dctinv[t] for t in [0,1,2]])
#Display dataset
for (species, color) in [("Iris-setosa", "#3274A1"), ("Iris-versicolor", "#E1812C"), ("Iris-virginica", "#3A923A")]:
train = features_train[targets_train.Species == species]
test = features_test[targets_test.Species == species]
label_train = "{} ({})".format(species, "Train")
label_test = "{} ({})".format(species, "Test")
ax.scatter(x=train["var1"], y=train["var2"], color=color, marker="o", s=200, label=label_train,
edgecolors="#ffffff")
ax.scatter(x=test["var1"], y=test["var2"], color=color, marker="^", s=200, label=label_test,
edgecolors="#ffffff")
#Plot configuration
if title is None:
ax.set_title("Train and test dataset", fontsize=20)
else:
ax.set_title(title, fontsize=20)
ax.set_xlabel("var1")
ax.set_ylabel("var2")
ax.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0., frameon=True);
return ax
Let's visualize the split that has been operated:
plot_dataset(features_train, targets_train, features_test, targets_test);
We can see that for each species, test samples have been randomized to cover the space occupied by that species.
We are going to make the following assumption: the dataset is linearly separable. We then restrict the algorithm to only draws a very simple boundary. We can achieve this by limiting the maximum depth of decision tree to 1:
from sklearn.tree import DecisionTreeClassifier
clf = DecisionTreeClassifier(random_state=1234, max_depth=1)
clf.fit(features_train, targets_train)
A linear boundary (background color) is calculated by the algorithm, which enables to identify Iris-setosa but not the other species:
plot_dataset(features_train, targets_train, features_test, targets_test, clf, title="Highly biassed prediction");
Now reduce the bias by increasing the maximum depth of decision tree to 2. The algorithms does a better job but may still be improved:
clf = DecisionTreeClassifier(random_state=1234, max_depth=2)
clf.fit(features_train, targets_train)
plot_dataset(features_train, targets_train, features_test, targets_test, clf, title="Imperfect prediction");
Increasing the maximum depth to 4 shows very interesting results even if few samples are incorrectly predicted:
clf = DecisionTreeClassifier(random_state=1234, max_depth=4)
clf.fit(features_train, targets_train)
plot_dataset(features_train, targets_train, features_test, targets_test, clf, title="Best predicition");
#Export the decision to Graphviz format
from sklearn.tree import export_graphviz
export_graphviz(clf, "tree.dot", rounded=True, impurity=False,
feature_names=["var1", "var2"], class_names=["Iris-setosa", "Iris-versicolor", "Iris-virginica"])
!dot -Tpng tree.dot -o img/tree.png
Increasing the maximum depth to 6 shows that decision tree tries to get the previously incorrectly predicted samples. This increases the variance of the model, it becomes very sensible to "exceptional" values. This is a situation of over-fitting that should be avoided:
clf = DecisionTreeClassifier(random_state=1234, max_depth=6)
clf.fit(features_train, targets_train)
plot_dataset(features_train, targets_train, features_test, targets_test, clf, title="Over-fitted prediction");
A decision tree with a maximum depth of 4 is probably the best trade-off between:
A good predictive model has low bias and low variance.
Here is our decision trained tree:
Another way to measure accuracy of a predictive model is to use metrics:
from sklearn.metrics import precision_recall_fscore_support
clf = DecisionTreeClassifier(random_state=1234, max_depth=4)
clf.fit(features_train, targets_train)
targets_pred = clf.predict(features_test)
precision, recall, fscore, support = precision_recall_fscore_support(
targets_test, targets_pred)
df_metrics = pd.DataFrame({"precision": precision,
"recall": recall,
"fscore": fscore,
"Species": ["Iris-setosa", "Iris-versicolor", "Iris-virginica"]})
df_metrics.set_index("Species", inplace=True)
df_metrics.head()
Here, we have one Iris-versicolor which has been predicted as a Iris-virginica. This decreases the precision of Iris-virginica and the recall of Iris-versicolor.
t-SNE algorithm explained by StatQuest
#Convert notebook to slide show
!jupyter nbconvert --to slides --template html_slides_minimal --no-prompt iris_dataset_classification.ipynb


Arrays and Hashes
March 8, 2016
Ruby gives us two principal ways of creating "container" objects for use in programming. These "containers" are called arrays and hashes. Each of them can be used to store a collection of other types of information, as a restaurant menu might contain different dishes or an address book might contain names and phone numbers, but the ways in which they are used in Ruby differ.
An array is a one-dimensional sort of container object that stores other objects within it, in order. Those objects can be integers, floats, strings, Boolean values, or even other arrays. The order of these objects never changes unless the user explicitly manipulates the order. Arrays are designated by square brackets []
.
menu = ['Hamburger', 'Cheeseburger', 'Double-Double', 'Fries', 'Soda', 'Milkshake']
The above is an example of an array containing strings and stored in the variable menu. There are six strings in the array, each of which is given an index number. Index numbers start from 0 and increase from left to right, such that the first (leftmost) object in an array has index number 0. Using these index numbers we can access any object in the array; if we type in menu[3]
to access the fourth object in the array, the console will return that object, Fries
.
Hashes are also ordered collections (since Ruby 1.8, anyway) that work very differently from arrays. Instead of storing single objects linearly, hashes store pairs of objects in correspondence, known as key-value pairs. Each key is a unique identifier; you can have multiple keys pointing to the same value, but you cannot have duplicate keys. Hashes are designated by curly brackets {}
.
mn_county_seats = { "Hennepin" => "Minneapolis", "Ramsey" => "Saint Paul", "Dakota" => "Hastings", "Washington" => "Stillwater", "Anoka" => "Anoka", "Scott" => "Shakopee", "Carver" => "Chaska"}
The above is an example of a hash containing strings and using Minnesota county names and county seats as the key-value pairs. We can retrieve values from the hash by typing in the hash's name followed by the key name in square brackets, as follows: mn_county_seats["Dakota"]
will return the corresponding value, "Hastings"
. Hashes are useful to coders when they want to create "dictionaries" or other kinds of libraries of information where one item corresponds to another. Because the name of each key is customizable, hashes are also useful when looking up, selecting or filtering out specific items from a set.


Box2D Drop (HTML5)
Feb. 2013
Spec
Please drag and drop icons.
This is HTML5 Canvas contents.
Using CreateJS Suite and Box2D.
Credit
Authoring : Yasunobu Ikeda
« Back


--- layout: post date: 2012-02-02 time: "10:00:00" authors: ["Greg Wilson"] title: Where To Host Q+A and Discussion? tags: ["Community"] ---
People have questions and want answers, or ideas and complaints they want to share. Right now, the only ways for them to do this on our site are:
We experimented with forums last year, but they never reached critical mass (and have since filled up with spam). What should we do going forward? Should we try to resurrect those forums? Set up a Q&A mailing list? Or direct everyone to the computational science area at StackExchange? The pros and cons as I see it are:
I'm obviously inclined to #3—what are your thoughts?
Later: as an experiment, I've asked a question on Stack Exchange about core computing skills for scientists. Please feel free to answer it (and vote it up :-).
Still later: I've posted a proposal for a novices' area for Stack Exchange. Comments would be very welcome.


{{ data.page.title }}
Filter by:
- Tags: {% for tag in data.piecesFilters.tags %}
- {% if apos.utils.contains(data.query.tags, tag.value) %} {% else %} {% endif %} {{ tag.label }} {% endfor %}
{# YES, YOU NEED PAGINATION. You could set the `perPage` option to a large
number, but eventually you will have performance issues. However, also
see the discussion of "Load More" and infinite scroll solutions later in this
tutorial. #}
{% import 'apostrophe-pager:macros.html' as pager with context %}
{{ pager.render({ page: data.currentPage, total: data.totalPages }, data.url) }}


--- layout: post title: Hey Companies looking for direct hires...... date: 2012-10-18 11:26:41.000000000 -05:00 type: post published: true status: publish categories: - Ruby on Rails tags: - Harvard Business Review meta: _edit_last: '15714693' publicize_twitter_user: broberts_az _wpas_done_482036: '1' _publicize_done_external: a:1:{s:7:"twitter";a:1:{i:199393780;b:1;}} author: login: broberts65 email<EMAIL_ADDRESS>display_name: Bob Roberts first_name: '' last_name: '' ---
It amazes me how often I am contacted by recruiters looking for direct hire developers in cities that I would never move to. I have blogged about remote workers before but I still do not see companies moving to hire them.
So, from the Harvard Business Review:
Why Remote Workers Are More (Yes, More) Engaged
If you cannot find direct hires in your city, well then look for remote workers. It really is that simple!!


{% extends "home.html" %} {% block title %}Genevieve {{ username }}'s Reports{% endblock %} {% block main %} {# Welcome user #}
| File Name | Date Added | Uploaded File | Processed File | Report |
|---|---|---|---|---|
| {{ genomeanalysis.name }} | {{ genomeanalysis.timestamp }} | Download Uploaded File | {% if genomeanalysis.processedfile %} Download Processed File {% else %} File processing not complete. {% endif %} | {% if genomeanalysis.variants %} View Report {% endif %} |
No files uploaded.
{% endif %} {% endblock main %}


Congo plane crash death toll rises to 24: provincial lawmaker and rescue worker
NAIROBI (Reuters) - The death toll from a plane that crashed into a densely populated neighborhood in Goma in eastern Democratic Republic of Congo on Sunday morning has risen to at least 24, a provincial lawmaker and rescue worker.
Jean Paul Lumbulumbu, the vice president of North Kivu’s parliament, said 24 bodies had been recovered from the rubble. A rescue worker, who asked not to be named, said 26 bodies had been found.


--- layout: post date: 2006-01-15 time: "09:00:00" authors: ["Greg Wilson"] title: "Intro Python Lecture Available" tags: ["Carpentries Lessons"] ---
The first Software Carpentry lecture on Python has been revised, and is up on the web. Comments and criticisms are very welcome.


XtfMainHeader (Class)
Namespace: stdlibXtf
An object that represent the header of the XTF document.
Constructors
| XtfMainHeader() | Initializes a new instance of the XtfMainHeader class that has default zero values. |
| XtfMainHeader(Byte[]) | Initializes a new instance of the XtfMainHeader class that contain the values extracted from the given byte array. |
Properties
| FileFormat | Gets XTF file format version. This value should be 123 as per Triton documentation. |
| SystemType | Gets XTF system type. This value should be 1 as per Triton documentation. |
| RecordingProgramName | Gets the name of the program used to create this XTF file. The maximum size of the name is of 8 characters. Longer strings will be shortened. |
| RecordingProgramVersion | Gets the version of the program used to create this XTF file. It's best to use 223, for compability reasons, or 341 for newer format improvments. The maximum size is of 8 characters. Longer strings will be shortened. |
| SonarName | Gets the name of server used to access sonar. The maximum size is of 16 characters. Longer strings will be shortened. |
| SonarType | Gets the ID of the sonar type used to acquire the data. |
| NoteString | Gets the annotations. The maximum size is of 64 characters. Longer strings will be shortened. |
| ThisFileName | Gets the name of this file, as stored in this document. The maximum size is of 64 characters. Longer strings will be shortened. |
| NavigationCoordinateUnits | Gets the units of the coordinates stored inside this document. |
| NumberOfSonarChannels | Gets the number of sonar channels stored inside this document. |
| NumberOfBathymetryChannels | Gets the number of bathymetry channels stored inside this document. |
| NumberOfSnippetChannels | Gets the number of snippet channels stored inside this document. |
| NumberOfForwardLookArrays | Gets the number of forward look sonar array channels stored inside this document. |
| NumberOfEchoStrengthChannels | Gets the number of echo strength channels stored inside this document. |
| NumberOfInterferometryChannels | Gets the number of interferometry channels stored inside this document. |
| ReferencePointHeight | Gets the height of reference point above water line in meters. |
| NavigationLatency | Gets the latency of nav system in milliceconds. Usually GPS latency. |
| NavigationOffsetX | Gets the offset of nav system. Orientation of positive X is to starboard. |
| NavigationOffsetY | Gets the offset of nav system. Orientation of positive Y is forward. |
| NavigationOffsetZ | Gets the offset of nav system. Orientation of positive Z is down. |
| NavigationOffsetYaw | Gets the offset of nav system. Orientation of positive Yaw is turn to right. |
| MRUOffsetX | Gets the offset of MRU system. Orientation of positive X is to starboard. |
| MRUOffsetY | Gets the offset of MRU system. Orientation of positive Y is forward. |
| MRUOffsetZ | Gets the offset of MRU system. Orientation of positive Z is down. |
| MRUOffsetYaw | Gets the offset of MRU system. Orientation of positive Yaw is turn to right. |
| MRUOffsetPitch | Gets the offset of MRU system. Orientation of positive Pitch is nose up. |
| MRUOffsetRoll | Gets the offset of MRU system. Orientation of positive Roll is lean to starboard. |
Examples
example ...
Remarks
remarks ...


Test API¶
This file documents all of the standard testing API excluding mocking or mocking related features.
-
struct
test_resource
¶ represents a test managed resource
Definition
struct test_resource {
void *allocation;
void (*free)(struct test_resource *res);
};
Members
allocation
- for the user to store arbitrary data.
free
- a user supplied function to free the resource. Populated by
test_alloc_resource()
.
Description
Represents a test managed resource, a resource which will automatically be cleaned up at the end of a test case.
Example
struct test_kmalloc_params {
size_t size;
gfp_t gfp;
};
static int test_kmalloc_init(struct test_resource *res, void *context)
{
struct test_kmalloc_params *params = context;
res->allocation = kmalloc(params->size, params->gfp);
if (!res->allocation)
return -ENOMEM;
return 0;
}
static void test_kmalloc_free(struct test_resource *res)
{
kfree(res->allocation);
}
void *test_kmalloc(struct test *test, size_t size, gfp_t gfp)
{
struct test_kmalloc_params params;
struct test_resource *res;
params.size = size;
params.gfp = gfp;
// TODO(felixguo@google.com): The & gets interpreted via
// Kerneldoc but we don't want that.
res = test_alloc_resource(test, test_kmalloc_init,
test_kmalloc_free, & params);
if (res)
return res->allocation;
else
return NULL;
}
-
struct
test_case
¶ represents an individual test case.
Definition
struct test_case {
void (*run_case)(struct test *test);
const char name[256];
};
Members
run_case
- the function representing the actual test case.
name
- the name of the test case.
Description
A test case is a function with the signature, void (*)(struct test *)
that makes expectations and assertions (see EXPECT_TRUE()
and ASSERT_TRUE()
)
about code under test. Each test case is associated with a
struct test_module
and will be run after the module’s init function and
followed by the module’s exit function.
A test case should be static and should only be created with the TEST_CASE()
macro; additionally, every array of test cases should be terminated with an
empty test case.
Example
void add_test_basic(struct test *test)
{
EXPECT_EQ(test, 1, add(1, 0));
EXPECT_EQ(test, 2, add(1, 1));
EXPECT_EQ(test, 0, add(-1, 1));
EXPECT_EQ(test, INT_MAX, add(0, INT_MAX));
EXPECT_EQ(test, -1, add(INT_MAX, INT_MIN));
}
static struct test_case example_test_cases[] = {
TEST_CASE(add_test_basic),
{},
};
-
TEST_CASE
(test_name)¶ A helper for creating a
struct test_case
Parameters
test_name
- a reference to a test case function.
Description
Takes a symbol for a function representing a test case and creates a struct
test_case
object from it. See the documentation for struct test_case
for an
example on how to use it.
-
struct
test_module
¶ describes a related collection of
struct test_case
s.
Definition
struct test_module {
const char name[256];
int (*init)(struct test *test);
void (*exit)(struct test *test);
struct test_case *test_cases;
};
Members
name
- the name of the test. Purely informational.
init
- called before every test case.
exit
- called after every test case.
test_cases
- a null terminated array of test cases.
Description
A test_module is a collection of related struct test_case
s, such that
init is called before every test case and exit is called after every test
case, similar to the notion of a test fixture or a test class in other
unit testing frameworks like JUnit or Googletest.
Every struct test_case
must be associated with a test_module for KUnit to
run it.
-
struct
test
¶ represents a running instance of a test.
Definition
struct test {
void *priv;
};
Members
priv
- for user to store arbitrary data. Commonly used to pass data created
in the init function (see
struct test_module
).
Description
Used to store information about the current context under which the test is running. Most of this data is private and should only be accessed indirectly via public functions; the one exception is priv which can be used by the test writer to store arbitrary data.
-
module_test
(module)¶ used to register a
struct test_module
with KUnit.
Parameters
module
- a statically allocated
struct test_module
.
Description
Registers module with the test framework. See struct test_module
for more
information.
Hardcoding the alignment to 8 was chosen as the most likely to remain
between the compiler laying out the test module pointers in the custom
section and the linker script placing the custom section in the output
binary. There must be no gap between the section start and the first
(test_module *) entry nor between any (test_module *) entries because
the test executor views the .test_modules section as an array of
(test_module *) starting at __test_modules_start.
-
struct test_resource *
test_alloc_resource
(struct test * test, int (*init) (struct test_resource *, void *, void (*free) (struct test_resource *, void * context)¶ Allocates a test managed resource.
Parameters
struct test * test
- The test context object.
int (*)(struct test_resource *, void *) init
- a user supplied function to initialize the resource.
void (*)(struct test_resource *) free
- a user supplied function to free the resource.
void * context
- for the user to pass in arbitrary data.
Description
Allocates a test managed resource, a resource which will automatically be
cleaned up at the end of a test case. See struct test_resource
for an
example.
-
void *
test_kmalloc
(struct test * test, size_t size, gfp_t gfp)¶ Just like
kmalloc()
except the allocation is test managed.
Parameters
struct test * test
- The test context object.
size_t size
- The size in bytes of the desired memory.
gfp_t gfp
- flags passed to underlying
kmalloc()
.
Description
Just like kmalloc(…), except the allocation is managed by the test case
and is automatically cleaned up after the test case concludes. See struct
test_resource
for more information.
-
void *
test_kzalloc
(struct test * test, size_t size, gfp_t gfp)¶ Just like
test_kmalloc()
, but zeroes the allocation.
Parameters
struct test * test
- The test context object.
size_t size
- The size in bytes of the desired memory.
gfp_t gfp
- flags passed to underlying
kmalloc()
.
Description
See kzalloc()
and test_kmalloc()
for more information.
-
test_info
(test, fmt, …)¶ Prints an INFO level message associated with the current test.
Parameters
test
- The test context object.
fmt
- A
printk()
style format string. ...
- variable arguments
Description
Prints an info level message associated with the test module being run. Takes
a variable number of format parameters just like printk()
.
-
test_warn
(test, fmt, …)¶ Prints a WARN level message associated with the current test.
Parameters
test
- The test context object.
fmt
- A
printk()
style format string. ...
- variable arguments
Description
See test_info()
.
-
test_err
(test, fmt, …)¶ Prints an ERROR level message associated with the current test.
Parameters
test
- The test context object.
fmt
- A
printk()
style format string. ...
- variable arguments
Description
See test_info()
.
-
SUCCEED
(test)¶ A no-op expectation. Only exists for code clarity.
Parameters
test
- The test context object.
Description
The opposite of FAIL()
, it is an expectation that cannot fail. In other
words, it does nothing and only exists for code clarity. See EXPECT_TRUE()
for more information.
-
FAIL
(test, message)¶ Always causes a test to fail when evaluated.
Parameters
test
- The test context object.
message
- an informational message to be printed when the assertion is made.
Description
The opposite of SUCCEED()
, it is an expectation that always fails. In other
words, it always results in a failed expectation, and consequently always
causes the test case to fail when evaluated. See EXPECT_TRUE()
for more
information.
-
EXPECT_TRUE
(test, condition)¶ Causes a test failure when the given expression is not true.
Parameters
test
- The test context object.
condition
- an arbitrary boolean expression. The test fails when this does not evaluate to true.
Description
This and expectations of the form EXPECT_* will cause the test case to fail when the specified condition is not met; however, it will not prevent the test case from continuing to run; this is otherwise known as an expectation failure.
-
EXPECT_FALSE
(test, condition)¶ Causes a test failure when the expression is not false.
Parameters
test
- The test context object.
condition
- an arbitrary boolean expression. The test fails when this does not evaluate to false.
Description
Sets an expectation that condition evaluates to false. See EXPECT_TRUE()
for
more information.
-
EXPECT_NOT_NULL
(test, expression)¶ Causes a test failure when expression is NULL.
Parameters
test
- The test context object.
expression
- an arbitrary pointer expression. The test fails when this evaluates to NULL.
Description
Sets an expectation that expression does not evaluate to NULL. Similar to
EXPECT_TRUE()
but supposed to be used with pointer expressions.
-
EXPECT_NULL
(test, expression)¶ Causes a test failure when expression is not NULL.
Parameters
test
- The test context object.
expression
- an arbitrary pointer expression. The test fails when this does not evaluate to NULL.
Description
Sets an expectation that expression evaluates to NULL. Similar to
EXPECT_FALSE()
but supposed to be used with pointer expressions.
-
EXPECT_SUCCESS
(test, expression)¶ Causes a test failure if expression does not evaluate to 0.
Parameters
test
- The test context object.
expression
- an arbitrary expression evaluating to an int error code. The test fails when this does not evaluate to 0.
Description
Sets an expectation that expression evaluates to 0. Implementation assumes that error codes are represented as negative values and if expression evaluates to a negative value failure message will contain a mnemonic representation of the error code (for example, for -1 it will contain EPERM).
-
EXPECT_ERROR
(test, expression, errno)¶ Causes a test failure when expression evaluates to errno.
Parameters
test
- The test context object.
expression
- an arbitrary expression evaluating to an int error code. The test fails when this does not evaluate to errno.
errno
- expected error value, error values are expected to be negative.
Description
Sets an expectation that expression evaluates to errno, so as opposed to EXPECT_SUCCESS it verifies that expression evaluates to an error.
-
EXPECT_EQ
(test, left, right)¶ Sets an expectation that left and right are equal.
Parameters
test
- The test context object.
left
- an arbitrary expression that evaluates to a primitive C type.
right
- an arbitrary expression that evaluates to a primitive C type.
Description
Sets an expectation that the values that left and right evaluate to are
equal. This is semantically equivalent to EXPECT_TRUE(test, (left) ==
(right)). See EXPECT_TRUE()
for more information.
-
EXPECT_NE
(test, left, right)¶ An expectation that left and right are not equal.
Parameters
test
- The test context object.
left
- an arbitrary expression that evaluates to a primitive C type.
right
- an arbitrary expression that evaluates to a primitive C type.
Description
Sets an expectation that the values that left and right evaluate to are not
equal. This is semantically equivalent to EXPECT_TRUE(test, (left) !=
(right)). See EXPECT_TRUE()
for more information.
-
EXPECT_LT
(test, left, right)¶ An expectation that left is less than right.
Parameters
test
- The test context object.
left
- an arbitrary expression that evaluates to a primitive C type.
right
- an arbitrary expression that evaluates to a primitive C type.
Description
Sets an expectation that the value that left evaluates to is less than the
value that right evaluates to. This is semantically equivalent to
EXPECT_TRUE(test, (left) < (right)). See EXPECT_TRUE()
for more
information.
-
EXPECT_LE
(test, left, right)¶ An expectation that left is less than or equal to right.
Parameters
test
- The test context object.
left
- an arbitrary expression that evaluates to a primitive C type.
right
- an arbitrary expression that evaluates to a primitive C type.
Description
Sets an expectation that the value that left evaluates to is less than or
equal to the value that right evaluates to. Semantically this is equivalent
to EXPECT_TRUE(test, (left) <= (right)). See EXPECT_TRUE()
for more
information.
-
EXPECT_GT
(test, left, right)¶ An expectation that left is greater than right.
Parameters
test
- The test context object.
left
- an arbitrary expression that evaluates to a primitive C type.
right
- an arbitrary expression that evaluates to a primitive C type.
Description
Sets an expectation that the value that left evaluates to is greater than
the value that right evaluates to. This is semantically equivalent to
EXPECT_TRUE(test, (left) > (right)). See EXPECT_TRUE()
for more
information.
-
EXPECT_GE
(test, left, right)¶ An expectation that left is greater than or equal to right.
Parameters
test
- The test context object.
left
- an arbitrary expression that evaluates to a primitive C type.
right
- an arbitrary expression that evaluates to a primitive C type.
Description
Sets an expectation that the value that left evaluates to is greater than
the value that right evaluates to. This is semantically equivalent to
EXPECT_TRUE(test, (left) >= (right)). See EXPECT_TRUE()
for more
information.
-
EXPECT_STREQ
(test, left, right)¶ An expectation that strings left and right are equal.
Parameters
test
- The test context object.
left
- an arbitrary expression that evaluates to a null terminated string.
right
- an arbitrary expression that evaluates to a null terminated string.
Description
Sets an expectation that the values that left and right evaluate to are
equal. This is semantically equivalent to
EXPECT_TRUE(test, !strcmp((left), (right))). See EXPECT_TRUE()
for more
information.
-
EXPECT_NOT_ERR_OR_NULL
(test, ptr)¶ An expectation that ptr is not null and not err.
Parameters
test
- The test context object.
ptr
- an arbitrary pointer.
Description
Sets an expectation that the value that ptr evaluates to is not null and
not an errno stored in a pointer. This is semantically equivalent to
EXPECT_TRUE(test, !IS_ERR_OR_NULL(ptr)). See EXPECT_TRUE()
for more
information.
-
ASSERT_TRUE
(test, condition)¶ Causes an assertion failure when the expression is not true.
Parameters
test
- The test context object.
condition
- an arbitrary boolean expression. The test fails and aborts when this does not evaluate to true.
Description
This and assertions of the form ASSERT_* will cause the test case to fail and immediately abort when the specified condition is not met. Unlike an expectation failure, it will prevent the test case from continuing to run; this is otherwise known as an assertion failure.
-
ASSERT_FALSE
(test, condition)¶ Sets an assertion that condition is false.
Parameters
test
- The test context object.
condition
- an arbitrary boolean expression.
Description
Sets an assertion that the value that condition evaluates to is false. This
is the same as EXPECT_FALSE()
, except it causes an assertion failure (see
ASSERT_TRUE()
) when the assertion is not met.
-
ASSERT_NOT_NULL
(test, expression)¶ Asserts that expression does not evaluate to NULL.
Parameters
test
- The test context object.
expression
- an arbitrary pointer expression. The test fails when this evaluates to NULL.
Description
Asserts that expression does not evaluate to NULL, see EXPECT_NOT_NULL()
.
-
ASSERT_NULL
(test, expression)¶ Asserts that expression evaluates to NULL.
Parameters
test
- The test context object.
expression
- an arbitrary pointer expression. The test fails when this does not evaluate to NULL.
Description
Asserts that expression evaluates to NULL, see EXPECT_NULL()
.
-
ASSERT_SUCCESS
(test, expression)¶ Asserts that expression is 0.
Parameters
test
- The test context object.
expression
- an arbitrary expression evaluating to an int error code.
Description
Asserts that expression evaluates to 0. It’s the same as EXPECT_SUCCESS.
-
ASSERT_ERROR
(test, expression, errno)¶ Causes a test failure when expression does not evaluate to errno.
Parameters
test
- The test context object.
expression
- an arbitrary expression evaluating to an int error code. The test fails when this does not evaluate to errno.
errno
- expected error value, error values are expected to be negative.
Description
Asserts that expression evaluates to errno, similar to EXPECT_ERROR.
-
ASSERT_EQ
(test, left, right)¶ Sets an assertion that left and right are equal.
Parameters
test
- The test context object.
left
- an arbitrary expression that evaluates to a primitive C type.
right
- an arbitrary expression that evaluates to a primitive C type.
Description
Sets an assertion that the values that left and right evaluate to are
equal. This is the same as EXPECT_EQ()
, except it causes an assertion failure
(see ASSERT_TRUE()
) when the assertion is not met.
-
ASSERT_NE
(test, left, right)¶ An assertion that left and right are not equal.
Parameters
test
- The test context object.
left
- an arbitrary expression that evaluates to a primitive C type.
right
- an arbitrary expression that evaluates to a primitive C type.
Description
Sets an assertion that the values that left and right evaluate to are not
equal. This is the same as EXPECT_NE()
, except it causes an assertion failure
(see ASSERT_TRUE()
) when the assertion is not met.
-
ASSERT_LT
(test, left, right)¶ An assertion that left is less than right.
Parameters
test
- The test context object.
left
- an arbitrary expression that evaluates to a primitive C type.
right
- an arbitrary expression that evaluates to a primitive C type.
Description
Sets an assertion that the value that left evaluates to is less than the
value that right evaluates to. This is the same as EXPECT_LT()
, except it
causes an assertion failure (see ASSERT_TRUE()
) when the assertion is not
met.
-
ASSERT_LE
(test, left, right)¶ An assertion that left is less than or equal to right.
Parameters
test
- The test context object.
left
- an arbitrary expression that evaluates to a primitive C type.
right
- an arbitrary expression that evaluates to a primitive C type.
Description
Sets an assertion that the value that left evaluates to is less than or
equal to the value that right evaluates to. This is the same as
EXPECT_LE()
, except it causes an assertion failure (see ASSERT_TRUE()
) when
the assertion is not met.
-
ASSERT_GT
(test, left, right)¶ An assertion that left is greater than right.
Parameters
test
- The test context object.
left
- an arbitrary expression that evaluates to a primitive C type.
right
- an arbitrary expression that evaluates to a primitive C type.
Description
Sets an assertion that the value that left evaluates to is greater than the
value that right evaluates to. This is the same as EXPECT_GT()
, except it
causes an assertion failure (see ASSERT_TRUE()
) when the assertion is not
met.
-
ASSERT_GE
(test, left, right)¶ An assertion that left is greater than or equal to right.
Parameters
test
- The test context object.
left
- an arbitrary expression that evaluates to a primitive C type.
right
- an arbitrary expression that evaluates to a primitive C type.
Description
Sets an assertion that the value that left evaluates to is greater than the
value that right evaluates to. This is the same as EXPECT_GE()
, except it
causes an assertion failure (see ASSERT_TRUE()
) when the assertion is not
met.
-
ASSERT_STREQ
(test, left, right)¶ An assertion that strings left and right are equal.
Parameters
test
- The test context object.
left
- an arbitrary expression that evaluates to a null terminated string.
right
- an arbitrary expression that evaluates to a null terminated string.
Description
Sets an assertion that the values that left and right evaluate to are
equal. This is the same as EXPECT_STREQ()
, except it causes an assertion
failure (see ASSERT_TRUE()
) when the assertion is not met.
-
ASSERT_NOT_ERR_OR_NULL
(test, ptr)¶ An assertion that ptr is not null and not err.
Parameters
test
- The test context object.
ptr
- an arbitrary pointer.
Description
Sets an assertion that the value that ptr evaluates to is not null and not
an errno stored in a pointer. This is the same as EXPECT_NOT_ERR_OR_NULL()
,
except it causes an assertion failure (see ASSERT_TRUE()
) when the assertion
is not met.
-
ASSERT_SIGSEGV
(test, expr)¶ An assertion that expr will cause a segfault.
Parameters
test
- The test context object.
expr
- an arbitrary block of code.
Description
Sets an assertion that expr, when evaluated, will cause a segfault.
Currently this assertion is only really useful for testing the KUnit
framework, as a segmentation fault in normal kernel code is always incorrect.
However, the plan is to replace this assertion with an arbitrary death
assertion similar to
https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#death-tests
which will probably be massaged to make sense in the context of the kernel
(maybe assert that a panic occurred, or that BUG()
was called).
NOTE
no code after this assertion will ever be executed.
-
struct
test_stream
¶ a std::stream style string builder.
Definition
struct test_stream {
void (*set_level)(struct test_stream *this, const char *level);
void (*add)(struct test_stream *this, const char *fmt, ...);
void (*append)(struct test_stream *this, struct test_stream *other);
void (*commit)(struct test_stream *this);
void (*clear)(struct test_stream *this);
};
Members
set_level
- sets the level that this string should be printed at.
add
- adds the formatted input to the internal buffer.
commit
- prints out the internal buffer to the user.
clear
- clears the internal buffer.
Description
A std::stream style string builder. Allows messages to be built up and printed all at once.
-
struct test_stream *
test_new_stream
(struct test * test)¶ constructs a new
struct test_stream
.
Parameters
struct test * test
- The test context object.
Description
Constructs a new test managed struct test_stream
.