New in version 2.5.
Source code: Lib/xml/etree/ElementTree.py
The Element type is a flexible container object, designed to store hierarchical data structures in memory. The type can be described as a cross between a list and a dictionary.
Warning
The xml.etree.ElementTree module is not secure against maliciously constructed data. If you need to parse untrusted or unauthenticated data see XML vulnerabilities.
Each element has a number of properties associated with it:
To create an element instance, use the Element constructor or the SubElement() factory function.
The ElementTree class can be used to wrap an element structure, and convert it from and to XML.
A C implementation of this API is available as xml.etree.cElementTree.
See http://effbot.org/zone/element-index.htm for tutorials and links to other docs. Fredrik Lundh’s page is also the location of the development version of the xml.etree.ElementTree.
Changed in version 2.7: The ElementTree API is updated to 1.3. For more information, see Introducing ElementTree 1.3.
This is a short tutorial for using xml.etree.ElementTree (ET in short). The goal is to demonstrate some of the building blocks and basic concepts of the module.
XML is an inherently hierarchical data format, and the most natural way to represent it is with a tree. ET has two classes for this purpose - ElementTree represents the whole XML document as a tree, and Element represents a single node in this tree. Interactions with the whole document (reading and writing to/from files) are usually done on the ElementTree level. Interactions with a single XML element and its sub-elements are done on the Element level.
We’ll be using the following XML document as the sample data for this section:
<?xml version="1.0"?>
<data>
<country name="Liechtenstein">
<rank>1</rank>
<year>2008</year>
<gdppc>141100</gdppc>
<neighbor name="Austria" direction="E"/>
<neighbor name="Switzerland" direction="W"/>
</country>
<country name="Singapore">
<rank>4</rank>
<year>2011</year>
<gdppc>59900</gdppc>
<neighbor name="Malaysia" direction="N"/>
</country>
<country name="Panama">
<rank>68</rank>
<year>2011</year>
<gdppc>13600</gdppc>
<neighbor name="Costa Rica" direction="W"/>
<neighbor name="Colombia" direction="E"/>
</country>
</data>
We have a number of ways to import the data. Reading the file from disk:
import xml.etree.ElementTree as ET
tree = ET.parse('country_data.xml')
root = tree.getroot()
Reading the data from a string:
root = ET.fromstring(country_data_as_string)
fromstring() parses XML from a string directly into an Element, which is the root element of the parsed tree. Other parsing functions may create an ElementTree. Check the documentation to be sure.
As an Element, root has a tag and a dictionary of attributes:
>>> root.tag
'data'
>>> root.attrib
{}
It also has children nodes over which we can iterate:
>>> for child in root:
... print child.tag, child.attrib
...
country {'name': 'Liechtenstein'}
country {'name': 'Singapore'}
country {'name': 'Panama'}
Children are nested, and we can access specific child nodes by index:
>>> root[0][1].text
'2008'
Element has some useful methods that help iterate recursively over all the sub-tree below it (its children, their children, and so on). For example, Element.iter():
>>> for neighbor in root.iter('neighbor'):
... print neighbor.attrib
...
{'name': 'Austria', 'direction': 'E'}
{'name': 'Switzerland', 'direction': 'W'}
{'name': 'Malaysia', 'direction': 'N'}
{'name': 'Costa Rica', 'direction': 'W'}
{'name': 'Colombia', 'direction': 'E'}
Element.findall() finds only elements with a tag which are direct children of the current element. Element.find() finds the first child with a particular tag, and Element.text accesses the element’s text content. Element.get() accesses the element’s attributes:
>>> for country in root.findall('country'):
... rank = country.find('rank').text
... name = country.get('name')
... print name, rank
...
Liechtenstein 1
Singapore 4
Panama 68
More sophisticated specification of which elements to look for is possible by using XPath.
ElementTree provides a simple way to build XML documents and write them to files. The ElementTree.write() method serves this purpose.
Once created, an Element object may be manipulated by directly changing its fields (such as Element.text), adding and modifying attributes (Element.set() method), as well as adding new children (for example with Element.append()).
Let’s say we want to add one to each country’s rank, and add an updated attribute to the rank element:
>>> for rank in root.iter('rank'):
... new_rank = int(rank.text) + 1
... rank.text = str(new_rank)
... rank.set('updated', 'yes')
...
>>> tree.write('output.xml')
Our XML now looks like this:
<?xml version="1.0"?>
<data>
<country name="Liechtenstein">
<rank updated="yes">2</rank>
<year>2008</year>
<gdppc>141100</gdppc>
<neighbor name="Austria" direction="E"/>
<neighbor name="Switzerland" direction="W"/>
</country>
<country name="Singapore">
<rank updated="yes">5</rank>
<year>2011</year>
<gdppc>59900</gdppc>
<neighbor name="Malaysia" direction="N"/>
</country>
<country name="Panama">
<rank updated="yes">69</rank>
<year>2011</year>
<gdppc>13600</gdppc>
<neighbor name="Costa Rica" direction="W"/>
<neighbor name="Colombia" direction="E"/>
</country>
</data>
We can remove elements using Element.remove(). Let’s say we want to remove all countries with a rank higher than 50:
>>> for country in root.findall('country'):
... rank = int(country.find('rank').text)
... if rank > 50:
... root.remove(country)
...
>>> tree.write('output.xml')
Our XML now looks like this:
<?xml version="1.0"?>
<data>
<country name="Liechtenstein">
<rank updated="yes">2</rank>
<year>2008</year>
<gdppc>141100</gdppc>
<neighbor name="Austria" direction="E"/>
<neighbor name="Switzerland" direction="W"/>
</country>
<country name="Singapore">
<rank updated="yes">5</rank>
<year>2011</year>
<gdppc>59900</gdppc>
<neighbor name="Malaysia" direction="N"/>
</country>
</data>
The SubElement() function also provides a convenient way to create new sub-elements for a given element:
>>> a = ET.Element('a')
>>> b = ET.SubElement(a, 'b')
>>> c = ET.SubElement(a, 'c')
>>> d = ET.SubElement(c, 'd')
>>> ET.dump(a)
<c><d /></c>
If the XML input has namespaces, tags and attributes with prefixes in the form prefix:sometag get expanded to {uri}sometag where the prefix is replaced by the full URI. Also, if there is a default namespace, that full URI gets prepended to all of the non-prefixed tags.
Here is an XML example that incorporates two namespaces, one with the prefix “fictional” and the other serving as the default namespace:
<?xml version="1.0"?>
<actors xmlns:fictional="http://characters.example.com"
xmlns="http://people.example.com">
<actor>
<name>John Cleese</name>
<fictional:character>Lancelot</fictional:character>
<fictional:character>Archie Leach</fictional:character>
</actor>
<actor>
<name>Eric Idle</name>
<fictional:character>Sir Robin</fictional:character>
<fictional:character>Gunther</fictional:character>
<fictional:character>Commander Clement</fictional:character>
</actor>
</actors>
One way to search and explore this XML example is to manually add the URI to every tag or attribute in the xpath of a find() or findall():
root = fromstring(xml_text)
for actor in root.findall('{http://people.example.com}actor'):
name = actor.find('{http://people.example.com}name')
print name.text
for char in actor.findall('{http://characters.example.com}character'):
print ' |-->', char.text
A better way to search the namespaced XML example is to create a dictionary with your own prefixes and use those in the search functions:
ns = {'real_person': 'http://people.example.com',
'role': 'http://characters.example.com'}
for actor in root.findall('real_person:actor', ns):
name = actor.find('real_person:name', ns)
print name.text
for char in actor.findall('role:character', ns):
print ' |-->', char.text
These two approaches both output:
John Cleese
|--> Lancelot
|--> Archie Leach
Eric Idle
|--> Sir Robin
|--> Gunther
|--> Commander Clement
See http://effbot.org/zone/element-index.htm for tutorials and links to other docs.
This module provides limited support for XPath expressions for locating elements in a tree. The goal is to support a small subset of the abbreviated syntax; a full XPath engine is outside the scope of the module.
Here’s an example that demonstrates some of the XPath capabilities of the module. We’ll be using the countrydata XML document from the Parsing XML section:
import xml.etree.ElementTree as ET
root = ET.fromstring(countrydata)
# Top-level elements
root.findall(".")
# All 'neighbor' grand-children of 'country' children of the top-level
# elements
root.findall("./country/neighbor")
# Nodes with name='Singapore' that have a 'year' child
root.findall(".//year/..[@name='Singapore']")
# 'year' nodes that are children of nodes with name='Singapore'
root.findall(".//*[@name='Singapore']/year")
# All 'neighbor' nodes that are the second child of their parent
root.findall(".//neighbor[2]")
| Syntax | Meaning |
|---|---|
| tag | Selects all child elements with the given tag. For example, spam selects all child elements named spam, and spam/egg selects all grandchildren named egg in all children named spam. |
| * | Selects all child elements. For example, */egg selects all grandchildren named egg. |
| . | Selects the current node. This is mostly useful at the beginning of the path, to indicate that it’s a relative path. |
| // | Selects all subelements, on all levels beneath the current element. For example, .//egg selects all egg elements in the entire tree. |
| .. | Selects the parent element. |
| [@attrib] | Selects all elements that have the given attribute. |
| [@attrib='value'] | Selects all elements for which the given attribute has the given value. The value cannot contain quotes. |
| [tag] | Selects all elements that have a child named tag. Only immediate children are supported. |
| [tag='text'] | Selects all elements that have a child named tag whose complete text content, including descendants, equals the given text. |
| [position] | Selects all elements that are located at the given position. The position can be either an integer (1 is the first position), the expression last() (for the last position), or a position relative to the last position (e.g. last()-1). |
Predicates (expressions within square brackets) must be preceded by a tag name, an asterisk, or another predicate. position predicates must be preceded by a tag name.
Comment element factory. This factory function creates a special element that will be serialized as an XML comment by the standard serializer. The comment string can be either a bytestring or a Unicode string. text is a string containing the comment string. Returns an element instance representing a comment.
Writes an element tree or element structure to sys.stdout. This function should be used for debugging only.
The exact output format is implementation dependent. In this version, it’s written as an ordinary XML file.
elem is an element tree or an individual element.
Parses an XML section from a string constant. Same as XML(). text is a string containing XML data. Returns an Element instance.
Parses an XML document from a sequence of string fragments. sequence is a list or other sequence containing XML data fragments. parser is an optional parser instance. If not given, the standard XMLParser parser is used. Returns an Element instance.
New in version 2.7.
Checks if an object appears to be a valid element object. element is an element instance. Returns a true value if this is an element object.
Parses an XML section into an element tree incrementally, and reports what’s going on to the user. source is a filename or file object containing XML data. events is a list of events to report back. If omitted, only “end” events are reported. parser is an optional parser instance. If not given, the standard XMLParser parser is used. parser is not supported by cElementTree. Returns an iterator providing (event, elem) pairs.
Note
iterparse() only guarantees that it has seen the “>” character of a starting tag when it emits a “start” event, so the attributes are defined, but the contents of the text and tail attributes are undefined at that point. The same applies to the element children; they may or may not be present.
If you need a fully populated element, look for “end” events instead.
Parses an XML section into an element tree. source is a filename or file object containing XML data. parser is an optional parser instance. If not given, the standard XMLParser parser is used. Returns an ElementTree instance.
PI element factory. This factory function creates a special element that will be serialized as an XML processing instruction. target is a string containing the PI target. text is a string containing the PI contents, if given. Returns an element instance, representing a processing instruction.
Registers a namespace prefix. The registry is global, and any existing mapping for either the given prefix or the namespace URI will be removed. prefix is a namespace prefix. uri is a namespace uri. Tags and attributes in this namespace will be serialized with the given prefix, if at all possible.
New in version 2.7.
Subelement factory. This function creates an element instance, and appends it to an existing element.
The element name, attribute names, and attribute values can be either bytestrings or Unicode strings. parent is the parent element. tag is the subelement name. attrib is an optional dictionary, containing element attributes. extra contains additional attributes, given as keyword arguments. Returns an element instance.
Generates a string representation of an XML element, including all subelements. element is an Element instance. encoding [1] is the output encoding (default is US-ASCII). method is either "xml", "html" or "text" (default is "xml"). Returns an encoded string containing the XML data.
Generates a string representation of an XML element, including all subelements. element is an Element instance. encoding [1] is the output encoding (default is US-ASCII). method is either "xml", "html" or "text" (default is "xml"). Returns a list of encoded strings containing the XML data. It does not guarantee any specific sequence, except that "".join(tostringlist(element)) == tostring(element).
New in version 2.7.
Parses an XML section from a string constant. This function can be used to embed “XML literals” in Python code. text is a string containing XML data. parser is an optional parser instance. If not given, the standard XMLParser parser is used. Returns an Element instance.
Parses an XML section from a string constant, and also returns a dictionary which maps from element id:s to elements. text is a string containing XML data. parser is an optional parser instance. If not given, the standard XMLParser parser is used. Returns a tuple containing an Element instance and a dictionary.
Element class. This class defines the Element interface, and provides a reference implementation of this interface.
The element name, attribute names, and attribute values can be either bytestrings or Unicode strings. tag is the element name. attrib is an optional dictionary, containing element attributes. extra contains additional attributes, given as keyword arguments.
A string identifying what kind of data this element represents (the element type, in other words).
The text attribute can be used to hold additional data associated with the element. As the name implies this attribute is usually a string but may be any application-specific object. If the element is created from an XML file the attribute will contain any text found between the element tags.
The tail attribute can be used to hold additional data associated with the element. This attribute is usually a string but may be any application-specific object. If the element is created from an XML file the attribute will contain any text found after the element’s end tag and before the next tag.
A dictionary containing the element’s attributes. Note that while the attrib value is always a real mutable Python dictionary, an ElementTree implementation may choose to use another internal representation, and create the dictionary only if someone asks for it. To take advantage of such implementations, use the dictionary methods below whenever possible.
The following dictionary-like methods work on the element attributes.
Resets an element. This function removes all subelements, clears all attributes, and sets the text and tail attributes to None.
Gets the element attribute named key.
Returns the attribute value, or default if the attribute was not found.
Returns the element attributes as a sequence of (name, value) pairs. The attributes are returned in an arbitrary order.
Returns the elements attribute names as a list. The names are returned in an arbitrary order.
Set the attribute key on the element to value.
The following methods work on the element’s children (subelements).
Adds the element subelement to the end of this elements internal list of subelements.
Appends subelements from a sequence object with zero or more elements. Raises AssertionError if a subelement is not a valid object.
New in version 2.7.
Finds the first subelement matching match. match may be a tag name or path. Returns an element instance or None.
Finds all matching subelements, by tag name or path. Returns a list containing all matching elements in document order.
Finds text for the first subelement matching match. match may be a tag name or path. Returns the text content of the first matching element, or default if no element was found. Note that if the matching element has no text content an empty string is returned.
Deprecated since version 2.7: Use list(elem) or iteration.
Deprecated since version 2.7: Use method Element.iter() instead.
Inserts a subelement at the given position in this element.
Creates a tree iterator with the current element as the root. The iterator iterates over this element and all elements below it, in document (depth first) order. If tag is not None or '*', only elements whose tag equals tag are returned from the iterator. If the tree structure is modified during iteration, the result is undefined.
New in version 2.7.
Finds all matching subelements, by tag name or path. Returns an iterable yielding all matching elements in document order.
New in version 2.7.
Creates a text iterator. The iterator loops over this element and all subelements, in document order, and returns all inner text.
New in version 2.7.
Creates a new element object of the same type as this element. Do not call this method, use the SubElement() factory function instead.
Removes subelement from the element. Unlike the find* methods this method compares elements based on the instance identity, not on tag value or contents.
Element objects also support the following sequence type methods for working with subelements: __delitem__(), __getitem__(), __setitem__(), __len__().
Caution: Elements with no subelements will test as False. This behavior will change in future versions. Use specific len(elem) or elem is None test instead.
element = root.find('foo')
if not element: # careful!
print "element not found, or element has no subelements"
if element is None:
print "element not found"
ElementTree wrapper class. This class represents an entire element hierarchy, and adds some extra support for serialization to and from standard XML.
element is the root element. The tree is initialized with the contents of the XML file if given.
Replaces the root element for this tree. This discards the current contents of the tree, and replaces it with the given element. Use with care. element is an element instance.
Same as Element.find(), starting at the root of the tree.
Same as Element.findall(), starting at the root of the tree.
Same as Element.findtext(), starting at the root of the tree.
Deprecated since version 2.7: Use method ElementTree.iter() instead.
Returns the root element for this tree.
Creates and returns a tree iterator for the root element. The iterator loops over all elements in this tree, in section order. tag is the tag to look for (default is to return all elements)
Finds all matching subelements, by tag name or path. Same as getroot().iterfind(match). Returns an iterable yielding all matching elements in document order.
New in version 2.7.
Loads an external XML section into this element tree. source is a file name or file object. parser is an optional parser instance. If not given, the standard XMLParser parser is used. Returns the section root element.
Writes the element tree to a file, as XML. file is a file name, or a file object opened for writing. encoding [1] is the output encoding (default is US-ASCII). xml_declaration controls if an XML declaration should be added to the file. Use False for never, True for always, None for only if not US-ASCII or UTF-8 (default is None). default_namespace sets the default XML namespace (for “xmlns”). method is either "xml", "html" or "text" (default is "xml"). Returns an encoded string.
This is the XML file that is going to be manipulated:

<title>Example page</title>

Moved to example.org
or example.com.

Example of changing the attribute “target” of every link in first paragraph:
>>> from xml.etree.ElementTree import ElementTree
>>> tree = ElementTree()
>>> tree.parse("index.xhtml")
<Element 'html' at 0xb77e6fac>
>>> p = tree.find("body/p") # Finds first occurrence of tag p in body
>>> p
<Element 'p' at 0xb77ec26c>
>>> links = list(p.iter("a")) # Returns list of all links
>>> links
[<Element 'a' at 0xb77ec2ac>, <Element 'a' at 0xb77ec1cc>]
>>> for i in links: # Iterates through all found links
... i.attrib["target"] = "blank"
>>> tree.write("output.xhtml")
QName wrapper. This can be used to wrap a QName attribute value, in order to get proper namespace handling on output. text_or_uri is a string containing the QName value, in the form {uri}local, or, if the tag argument is given, the URI part of a QName. If tag is given, the first argument is interpreted as an URI, and this argument is interpreted as a local name. QName instances are opaque.
Generic element structure builder. This builder converts a sequence of start, data, and end method calls to a well-formed element structure. You can use this class to build an element structure using a custom XML parser, or a parser for some other XML-like format. The element_factory is called to create new Element instances when given.
Flushes the builder buffers, and returns the toplevel document element. Returns an Element instance.
Adds text to the current element. data is a string. This should be either a bytestring, or a Unicode string.
Closes the current element. tag is the element name. Returns the closed element.
Opens a new element. tag is the element name. attrs is a dictionary containing element attributes. Returns the opened element.
In addition, a custom TreeBuilder object can provide the following method:
Handles a doctype declaration. name is the doctype name. pubid is the public identifier. system is the system identifier. This method does not exist on the default TreeBuilder class.
New in version 2.7.
Element structure builder for XML source data, based on the expat parser. html are predefined HTML entities. This flag is not supported by the current implementation. target is the target object. If omitted, the builder uses an instance of the standard TreeBuilder class. encoding [1] is optional. If given, the value overrides the encoding specified in the XML file.
Finishes feeding data to the parser. Returns an element structure.
Deprecated since version 2.7: Define the TreeBuilder.doctype() method on a custom TreeBuilder target.
Feeds data to the parser. data is encoded data.
XMLParser.feed() calls target‘s start() method for each opening tag, its end() method for each closing tag, and data is processed by method data(). XMLParser.close() calls target‘s method close(). XMLParser can be used not only for building a tree structure. This is an example of counting the maximum depth of an XML file:
>>> from xml.etree.ElementTree import XMLParser
>>> class MaxDepth: # The target object of the parser
... maxDepth = 0
... depth = 0
... def start(self, tag, attrib): # Called for each opening tag.
... self.depth += 1
... if self.depth > self.maxDepth:
... self.maxDepth = self.depth
... def end(self, tag): # Called for each closing tag.
... self.depth -= 1
... def data(self, data):
... pass # We do not need to do anything with data.
... def close(self): # Called when all data has been parsed.
... return self.maxDepth
...
>>> target = MaxDepth()
>>> parser = XMLParser(target=target)
>>> exampleXml = """
...
...
...
...
... <c>
... <d>
... </d>
... </c>
...
... """
>>> parser.feed(exampleXml)
>>> parser.close()
4
Footnotes
| [1] | The encoding string included in XML output should conform to the appropriate standards. For example, “UTF-8” is valid, but “UTF8” is not. See http://www.w3.org/TR/2006/REC-xml11-20060816/#NT-EncodingDecl and http://www.iana.org/assignments/character-sets/character-sets.xhtml. |


WELCOME
{{name}}
Thanks for signing up for our newsletter. We’ll be sending an occasional email with everything new and good that you’ll probably want to know about: new products, posts, promos, and parties.
|
|
BestShop - One place for all your needs.
To The New, Sector-127 Noida, UP.
|
|
Unsubscribe | Contact us | +91 98710 56432


insideRODE package includes buildin functions from deSolve, compiled functions from compiler, and C/FORTRAN code interfaces to nlme. It includes nlmLSODA, nlmODE, nlmVODE,nlmLSODE for general purpose; cfLSODA,cfLSODE, cfODE, cfVODE call C/FORTRAN compiled dll functions.ver2.0 add sink()function into example it helps to directly combine c/fortran source code in R files. Finally, with new compiler package, we generated compiled functions: nlmODEcp, nlmVODEcp, nlmLSODEcp,nlmLSODAcp and cpODE, cpLSODA, cpLSODE, cpVODE. They will help to increase speed.
| Version: | 2.0 |
| Depends: | R (≥ 2.13.0), deSolve, nlme, lattice, compiler |
| Published: | 2012-10-29 |
| Author: | YUZHUO PAN, XIAOYU YAN |
| Maintainer: | YUZHUO PAN <yuzhuo.pan at gmail.com> |
| License: | LGPL-2.1 | LGPL-3 [expanded from: LGPL (> 2.0)] |
| NeedsCompilation: | no |
| CRAN checks: | insideRODE results |
| Reference manual: | insideRODE.pdf |
| Package source: | insideRODE_2.0.tar.gz |
| Windows binaries: | r-devel: insideRODE_2.0.zip, r-release: insideRODE_2.0.zip, r-oldrel: insideRODE_2.0.zip |
| OS X binaries: | r-release: insideRODE_2.0.tgz, r-oldrel: insideRODE_2.0.tgz |
| Old sources: | insideRODE archive |
Please use the canonical form https://CRAN.R-project.org/package=insideRODE to link to this page.


--- layout: default --- {%- if page.title -%}
Jeongchul Kim is an AI Serving Cloud Developer at SAPEON Korea.
"I received the Master degree in the College of Computer Science at Kookmin University in South Korea. I have consistently worked hard to enhance my skill sets and make research contributions in the field of cloud computing, distributed systems, and big-data platforms. With my countless effort, I am very happy to have accepted paper(IEEE TCC Journal, Springer Cluster Computing Journal, ACM SoCC, IEEE CLOUD, IEEE ICAC). I appreciate for taking the time to evaluate my profile. I am very sure that it will help to further enhance my research vision and guide me to my next career direction. Thank you."
He received the M.S. degree in the College of Computer Science at Kookmin Unveristy. He conducted research about Cloud Computing with his advisor Ph. D. Kyungyong Lee in the BigData lab. He received B.S. degree from Kookmin Unversity.


Yes its that time of the year again!! Chakravyuha 2k17 is ON.!!! The Department of Computer Science And Engineering of Tagore Engineering College brings you its grand national level technical symposium with an enthusiastic environment along with so many techies and smart brains. The Chakravyuha 2k17 has just got bigger and the best with so many tactful and outlandish events awaiting for you. An open invitation to all those master brains and wizards.
As it difficult to scale and crack the formation of 7 rings in the Chakravyuha, it is difficult to grab the tactics to crack our 7 events. It was Abimanyu who broke that Chakravyuha, are you the next Abimanyu to break open and crack our Chakravyuha, We are ready! Are You Ready? Come let's battle!!! And do not forget you will be rewarded for each and every move you make in this Chakravyuha2k17.


Malaysian judge says prosecution established abuse of power case at ex-Prime Minister Najib ...
by EndPlayKUALA LUMPUR, Malaysia - KUALA LUMPUR, Malaysia (AP) - Malaysian judge says prosecution established abuse of power case at ex-Prime Minister Najib Razak's first 1MDB trial.


I have completed the major work for RNCryptor asynchronous operations on the async branch. This changes the API and the file format. I’ll be documenting this more formally within a few weeks, but here are the high points:
There are now separate RNCryptor and RNDecryptor objects (as well as RNOpenSSLEncryptor and RNOpenSSLDecryptor).
Aync usage looks like this:
RNEncryptor *encryptor = [[RNEncryptor alloc] initWithSettings:kRNCryptorAES256Settings
password:password
handler:^(RNCryptor *cryptor, NSData *data) {
...
}];
You add data using addData:
. handler
may or may not be called once for every call to addData:
. When you are done, you must call finish
, at which point, handler
will be called one last time. You can check this condition using cryptor.isFinished
.
There is still synchronous access such as:
NSData *encryptedData = [RNEncryptor encryptData:data
withSettings:kRNCryptorAES256Settings
password:password
error:&error];
I have dropped all the URL, file and stream APIs. Please let me know if you have a general use case where you would like them. I don’t mind creating some convenience methods, but the convenience methods in the original interface were becoming too numerous and that complicates testing. Input on this is welcome. I found that many people were either doing very small things where synchronous NSData is good, or they were using NSURLConnection
, where you need all the callbacks (to handle redirects, authentication, etc.), so I’ve supported those two cases the most.
By default, handler
is called on the GCD queue that the cryptor was created on. You can modify this by setting responseQueue
.
Input on the API is welcome. I’m leaving it on the async branch until people have time to play with a little bit and I have time to document it fully.


Issue: STREAM-CAPABILITIESReferences: Standard streams (pp. 327-329)
Category: ADDITION
Edit history: Version 1 by Pierson 5-Jul-88, add redesign per Pitman
Version 2 by Moon, 10-May-89, remove controversial parts
Version 3 by Moon, 12-May-89, improve wording and examples
Problem description:
Programs cannot currently distinguish between interactive use and batch
(or background) use without using implementation-dependent extensions.
For example, there is currently no way to tell whether it is useful to
ask a question when an unexpected situation is encountered.
Note: earlier versions of this issue tried to solve another problem
as well. See discussion section.
Proposal (STREAM-CAPABILITIES:INTERACTIVE-STREAM-P):
Add the following function:
INTERACTIVE-STREAM-P stream
Returns T if the stream is interactive, otherwise NIL. Signals
an error of type TYPE-ERROR if the argument is not a stream.
The precise meaning of INTERACTIVE-STREAM-P is implementation
dependent, and may depend on the underlying operating system. However
the general intent is to distinguish between interactive and batch (or
background or command-file) operations.
Some examples of the things that might identify a stream as interactive
include:
1. The stream is connected to a person (or equivalent) in
such a way that the program can prompt for information and
expect to receive different input depending on the prompt.
2. The program is expected to prompt for input and support
"normal input editing".
3. READ-CHAR might hang waiting for the user to type something
instead of quickly returning a character or EOF.
*TERMINAL-IO* might or might not be interactive.
Examples:
(when (> measured limit)
(let ((error (round (* (- measured limit) 100)
limit)))
(unless (if (interactive-stream-p *query-io*)
(yes-or-no-p "The frammis is out of tolerance by ~D%.~@
Is it safe to proceed? " error)
(< error 15)) ;15% is acceptable
(error "The frammis is out of tolerance by ~D%." error))))
Rationale:
INTERACTIVE-STREAM-P has been proposed several times and is clearly
needed by any program that alters its behavior depending on whether
it is interacting with a user or running in a "batch" mode.
Current practice:
Most implementations have this feature already, often under a
different name.
Cost to Implementors:
Implementations will have to support this new function. Correct support
will require some thought for each operating system supported.
Cost to Users:
None, this is an upward-compatible extension.
Cost of non-adoption:
Less featureful language.
Performance impact:
None.
Benefits:
More featureful language.
Esthetics:
More featureful language.
Discussion:
It's not possible to make a specific definition of "interactive" that
applies to all operating systems, we concluded from earlier discussion.
However, "everyone knows" appoximately what it means. Hence the idea
of describing it by example rather than defining it.
Note that some proposed features for telling whether two streams are
connected to the same source or sink of information have been removed
from this version of the proposal. These were the functions
STREAM-SAME-SOURCE-P, STREAM-SAME-DESTINATION-P, STREAM-SOURCE-ID-LIST,
and STREAM-DESTINATION-ID-LIST. These could be revived in another
proposal if desired, but Moon thought INTERACTIVE-STREAM-P was
important and didn't want it to be lost due to controversy over these
unrelated functions.


Ivy League climate activists break up Harvard-Yale football game
by Mary Kay LingeScores of student activists from Harvard and Yale universities stormed the field at the Ivy League’s premier football match up in a climate-change protest Saturday.
The demonstrators, hoisting a banner reading “Nobody Wins — Yale & Harvard are complicit in climate injustice,” demanded that both schools divest from fossil-fuel investments, The Hill reported.
“Activism disrupts the present to change the future,” Rep. Alexandria Ocasio-Cortez tweeted approvingly.
Police had to remove the protesters from the field.


With the creation of the multichannel New From Bose experience platform we created a unique way of presenting Bose’s new headphones to the market.


Tatiana Mac is an American designer who builds inclusive, accessible, and ethical products with thoughtful practices.
A designer who codes.
A writer who reads.
A speaker who listens.
Abridged Works
Design, art direction, concepting.
Stream
The Diff
In collaboration with Henry Desroches, a stream about finding, experimenting, and celebrating the many ways to make the web wonderful. Responsible for art direction, content creation, and live teaching.
Visit The DiffDesign Systems
A11y Project
A new, more vibrant design system for the accessibility community resource.
Work in progress
Teaching
Hacking Styleguides for Accessibility
I wrote the curriculum for, taught, and produced a 42-minute class on Skillshare focused around making the web more accessible.
Take My ClassCivic Design
Self-Defined
A dictionary for the people. Born out of tiredness of folks quoting the directionary definition of racism to me and other PoC, I decided to create a resource for the modern world, incorporating the diversity and nuance of people through their own words.
Read the dictionaryPhoto Art Direction
Teocali Brand
Concepted, photographed and art directed seasonal, on-location photoshoots for an accessory- and lifestyle-brand.
Interactive
Cisco Unified Comms
Website to help articulate the breadth of Cisco products. Designed a conceptual journey to show how products ushered retailers through sales cycle.
Case Study In Development
Interactive
Salon Doux
Design and development of website for Seattle-based salon.
Case Study In Development
Visit the siteVideo
Verizon DDoS Attacks
Working under minimalistic and strict brand guidelines, we conceived a new visual approach to animation for Verizon for a highly conceptual story.
Watch the VideoInteractive
Taco Bell Scrolling Email
Invented z-index technique for email to create first experimental scrolling email.
Case Study In Development
View live emailArt & Apparel
Love Lust
A typographic series that explores the fluid nature of physical and metaphysical desire.
Store Temporarily Closed
Branding
Microsoft Azure Developer Tour
Branded collateral for a seven-city dev advocate tour. Each city had its own butterfly, cityscape and pattern.
Case Study In Development
Selected Writings
Bah-hum-blog.
The question to answer isn't, “Have I made a place where people have the freedom to express themselves?” Instead we have to ask, “Have I made a place where everyone has the safety to exist?”
I think we can forget what we are capable of and what we deserve when we’re sad. We end up dodging failure instead of reaching for radical success.
TRUST the Process: How to present your best, when you’re at your worst
But what if we were more okay accepting imperfect, in-progress, new things? Perhaps imposter syndrome would be less pervasive and there’d be less shame.
True vulnerability is a powerful tool for developing trust. It represents strength and security in who you are and what you bring to your work.
You lead like a girl: Defying the patriarchy with feminist leadership
Perpetual motion is good, but not if it's directionless. Methodical decision-making is also good, but not if it means stagnation. We are told to dream big, but rarely are we told to do small.
Progress over perfection: Something now over everything never
Speaking
That's what she said.
I would love to speak at your conference, meetup, or organisation! I ask that your event be accessible, inclusive, and diverse with an enforced code of conduct. Please email me for inquiries.
Currently booking for fall 2019 and 2020
About
Insatiably curious.
Tatiana Mac is an independent American designer.
Currently she works directly with organisations to build products and design systems with accessibility and inclusion in mind. She believes that design heavily influences our social landscape. When ethically-minded, she thinks designers can dismantle exclusionary systems in favor of community-focused, inclusive ones.
She's embarassed herself in 33 countries.
Open to remote/international full-time or contract positions.
Sponsor
Help me,
help you.
If you appreciate my speaking, writing, and tutorials, please consider patronage. Financial support enables me to keep my materials open source to all and supports my independent lifestyle.


Two years after I killed Blyth I murdered my young brother Paul, for quite different reasons than I'd disposed of Blyth, and then a year after that I did for my young cousin Esmerelda more or less on a whim.
That's my score to date.
Three
I haven't killed anybody for years, and don't intend to ever again.
It was just a stage I was going through.
I had been making the rounds of the Sacrifice Poles the day we heard my brother had escaped. I already knew something was going to happen; the Factory told me.


Free research preview. ChatGPT may produce inaccurate information about people, places, or facts. ChatGPT May 24 Version.


{% extends "base.html" %} {% block title %}Server error{% endblock %} {% block content %}
Houston, we have a problem. An administrator has been notified of the issue; we're sorry for the trouble.


--- author: alunny categories: app date: '2010-01-20 00:00:00' link: http://blogs.nitobi.com/andrew/2010/01/30/phonegap-blackberry-on-osx permalink: /2010/01/20/phonegap-blackberry-on-os-x/ slug: phonegap-blackberry-on-os-x status: publish title: PhoneGap Blackberry on OS X type: post format: html ---
Nitobi/PhoneGap dev Fil Maj tweeted the other day about this excellent tutorial from Aziz Uysal, describing how to get the BlackBerry SDK and simulator up and running on OS X, for which it has no official support. Using some Eclipse skills and Wine magic, you can pull up the simulator and enjoy all the benefits of BlackBerry dev without booting up a VM.
If you want to run PhoneGap-BlackBerry in this environment, it’s trivially easy. Here’s how:
Do everything it says in the tutorial, until you can run a Hello World app in the simulator
Clone the PhoneGap-Blackberry repo
File -> Import… -> General, Existing Projects into Workspace, then Next
Under Select root directory, select /whatever_your_path_is/phonegap-blackberry/framework/
and then select PhoneGap in the Projects field below
Add an index.html
file to the src/www
directory.
Open build.xml
for editing. Change the jde.home
and simulator.home
properties to match your simulator location (if you follow Aziz’s tutorial, you can copy these properties from the build.xml
of that project). Edit the load-simulator
tag (<target name="load-simulator">
) to match the other build.xml
file also
Drag build.xml
into the app view (as detailed in Aziz’s tutorial). Then double-click on load-simulator
Hit Menu (next to the green button), then Downloads, then PhoneGap
Hrrm… ??????????
Profit!
Thanks to Aziz for writing such a great tutorial – now we just need someone to get XCode running on Windows 7!
Edit: This tutorial was previous referenced on the PhoneGap mailing list by John Britton – I wasn’t aware until he brought it up in a later message. Thanks for bringing this to our attention John.


DfE enquiries
Central newsdesk 020 7783 8300
General enquiries 0370 000 2288
Press release
Prestigious new scholarships and bursaries to attract more high-quality graduates into teaching important, rigorous subjects.
Schools Minister David Laws said more scholarships and bursaries would be available to help recruit the most talented graduates with the potential to be brilliant teachers in key subjects. This would help raise standards in schools and ensure all children were given a good education.
Scholarships, awarded by respected subject organisations, will be available to the most talented maths, physics, chemistry and computing trainees. Bursaries will be available to top graduates in maths, physics, chemistry, computing, and languages, in primary and in priority subjects at secondary school (English, history, biology, geography, music, and design and technology).
The government introduced scholarships in 2011. Since then, 425 high-quality graduates in maths, physics, chemistry and computing have been attracted to teaching through the scheme. A further 680 teacher training scholarships will be available for trainees starting in the 2014 to 2015 academic year.
The following changes to scholarships and bursaries are being introduced for the 2014 to 2015 academic year:
The following bursaries will continue at the same level as in the 2013 to 2014 academic year:
David Laws said:
We want to recruit the most talented graduates with the potential to be brilliant teachers in key subjects. The expansion of the scholarships and bursaries schemes will help us to attract these graduates into teaching - ensuring that all children get the education they deserve.
Charlie Taylor, chief executive of the National College for Teaching and Leadership, said:
Teaching is a great career - and it is essential that we recruit brilliant graduates to teach the future generation of leading mathematicians, scientists, designers and linguists.
Scholarships and bursaries will help recruit the best, and I am delighted we are expanding these excellent awards, giving more top graduates the opportunity to become teachers.
Physics scholarships are awarded by the Institute of Physics ( IOP ). This year there are up to 150 scholarships worth £25,000 each available to the most talented physics graduates - an increase from 100 scholarships worth £20,000 last year.
The IOP offers additional benefits to successful scholars. This includes membership to the IOP ; mentoring through the IOP ’s Stimulating Physics Support (SPS) programme; networking and support from scholarship peers; and an opportunity to contribute to physics education policy.
Dr Frances Saunders, President of IOP , said:
The increase in the number of scholarships available allows us to offer a larger number of physicists the opportunity to become inspirational teachers and helps us increase the subject expertise in physics education. Through the scheme we hope to forge relationships that will endure beyond the scholars’ period of teacher training. We aim to develop a network of outstanding physics teachers, who will become part of a community of physicists across schools, universities and business.
Maths scholarships are awarded by the Institute of Mathematics and its Applications ( IMA ), in collaboration with the London Mathematical Society ( LMS ), the Royal Statistical Society ( RSS ), and Mathematics in Education and Industry ( MEI ).
This year up to 250 scholarships are available - an increase from 150 scholarships last year. They are worth £25,000 - an increase of £5,000 from last year.
The IMA and its partners offer additional benefits to successful scholars. This includes membership of the IMA , LMS , RSS , and MEI as well as access to online resources including MEI ’s online maths teaching and learning resources.
Nigel Steele, IMA Honorary Education Secretary, said:
Mathematics is now understood to be of vital importance to the economy of this country. The first priority must be to attract those who can become the most effective teachers of mathematics to join the profession. We need them to inspire future generations to engage with the subject and discover the wealth of opportunities it can create.
Charlie Stripp, Chief Executive of MEI , said
We need more inspirational young people with a passion for mathematics to join the teaching profession. Good mathematics education is vital for our country’s future economic success and teaching mathematics is a very important and rewarding job. These scholarships are extremely welcome.
Alice Rogers, LMS Education Secretary, said:
The first year of the scheme has seen more than 90 scholars who promise as they embark on their training year to become strong teachers, able to contribute a deep understanding of mathematics both to the schools where they teach and to nationwide developments in mathematics education. It is excellent that the scheme will continue.
Roeland Beerten, RSS Director of Professional and Public Affairs, said:
The Royal Statistical Society welcomes the extension of this scholarship scheme. The country needs teachers who can encourage our children to learn mathematics and statistics in an engaging and relevant way - not just to prepare them for future employment or education but as a key life skill in itself, so they can thrive and succeed in an increasingly data-rich society.
Chemistry scholarships are awarded by the Royal Society of Chemistry ( RSC ). This year up to 180 scholarships are available - an increase from 130 scholarships last year. They are worth £25,000 - an increase of £5,000 from last year.
The RSC offers additional benefits to successful scholars. This includes membership to the RSC , and to national and regional support networks including mentoring.
Dr Robert Parker, chief executive of the Royal Society of Chemistry, said:
The scholarships we awarded last year have been a great success, with excellent feedback from the trainees on the learning and confidence they have gained as chemistry teachers, and the support they have received through the scheme.
The Royal Society of Chemistry is committed to ensuring that students get the best chemistry education. To achieve this, we need to increase the number of chemistry-qualified teachers who teach the subject, who can engage and inspire students with their enthusiasm and confidence in their subject.
To ensure we have the scientists we will need in the future – to deliver excellent research that will drive growth and solve challenges from energy and climate change to new healthcare solutions – we need to start with inspirational teaching. Many of today’s great scientists will tell you that they were inspired by a science teacher at school.
But the best chemistry teachers aren’t just vital for providing the next generation of chemical scientists. We need scientifically literate young people in all walks of life to increase Britain’s industrial and commercial competitiveness in the global market.
Computing scholarships are awarded by BCS , The Chartered Institute for IT. Last year it awarded 57 scholarships worth £20,000. This year up to 100 scholarships worth £25,000 will be available.
The BCS will also arrange mentoring and development opportunities with schools, universities and major employers. The scheme has the backing of major industry names including Microsoft, IBM, BT, Google, Meta Switch Networks, HP, Toshiba and Ocado.
Bill Mitchell, Director of BCS Academy of Computing, said:
We are delighted the scholarship scheme is running again this year. It is also very significant that there is a substantial increase in the value of the scholarships to be awarded this year. The value is now not that much less than the average annual earnings of a full-time worker in the UK. The scholarship should help us to attract the very best people to become teachers. Taken with the increase in the other bursaries available for teacher training, the incentives for becoming a computing teacher are now on a par with other subjects such as physics and maths.
Bob Harrison, education advisor for Toshiba, said:
This scholarship scheme goes some way to ensuring we have a workforce capable of teaching the new computing curriculum. There is a considerable challenge but these scholars will inspire other teachers and generations to study computing and follow careers in IT. Toshiba supported the scholarship scheme earlier this year and we were very impressed with the quality of the applicants.
| Subject | Scholarship | 1st | 2.1 | 2.2 | Good A level and relevant degree |
|---|---|---|---|---|---|
| Art | - | £0 | £0 | £0 | £0 |
| Biology | - | £9,000 | £4,000 | £0 | £0 |
| Business studies | - | £0 | £0 | £0 | £0 |
| Chemistry | £20,000 | £20,000 | £15,000 | £12,000 | £0 |
| Citizenship | - | £0 | £0 | £0 | £0 |
| Combined/general science | - | £0 | £0 | £0 | £0 |
| Computing | £20,000 | £9,000 | £4,000 | £0 | £0 |
| Design and technology | - | £0 | £0 | £0 | £0 |
| English | - | £9,000 | £4,000 | £0 | £0 |
| Geography | - | £9,000 | £4,000 | £0 | £0 |
| History | - | £9,000 | £4,000 | £0 | £0 |
| Mathematics | £20,000 | £20,000 | £15,000 | £12,000 | £0 |
| Languages | - | £20,000 | £15,000 | £12,000 | £0 |
| Music | - | £9,000 | £4,000 | £0 | £0 |
| Physical education | - | £9,000 | £4,000 | £0 | £0 |
| Physics | £20,000 | £20,000 | £15,000 | £12,000 | £0 |
| Primary | - | £9,000 | £4,000 | £0 | £0 |
| Primary specialist | - | £11,000 | £6,000 | £0 | £0 |
| Religious education | - | £0 | £0 | £0 | £0 |
| Subject | Scholarship | 1st | 2.1 | 2.2 | Good A level and relevant degree |
|---|---|---|---|---|---|
| Art | - | £0 | £0 | £0 | £0 |
| Biology | - | £9,000 | £4,000 | £0 | £0 |
| Business studies | - | £0 | £0 | £0 | £0 |
| Chemistry | £25,000 | £20,000 | £15,000 | £12,000 | £0 |
| Citizenship | - | £0 | £0 | £0 | £0 |
| Combined/general science | - | £0 | £0 | £0 | £0 |
| Computing | £25,000 | £20,000 | £20,000 | £15,000 | £0 |
| Design and technology | - | £9,000 | £4,000 | £0 | £0 |
| English | - | £9,000 | £4,000 | £0 | £0 |
| Geography | - | £9,000 | £4,000 | £0 | £0 |
| History | - | £9,000 | £4,000 | £0 | £0 |
| Mathematics | £25,000 | £20,000 | £20,000 | £15,000 | £9,000 |
| Languages | - | £20,000 | £15,000 | £12,000 | £0 |
| Music | - | £9,000 | £4,000 | £0 | £0 |
| Physical education | - | £0 | £0 | £0 | £0 |
| Physics | £25,000 | £20,000 | £20,000 | £15,000 | £9,000 |
| Primary | - | £9,000 | £4,000 | £0 | £0 |
| Primary specialist | - | £11,000 | £11,000 | £6,000 | £0 |
| Religious education | - | £0 | £0 | £0 | £0 |
Central newsdesk 020 7783 8300
General enquiries 0370 000 2288
Published: 17 October 2013


Lastest Events
| Source | Type | Time |
|---|---|---|
| Trolley [ID 0877668] | Powered down | 2014-03-11 12:33pm |
| Trolley [ID 0877668] | Powered down | 2014-03-11 11:31am |
| Trolley [ID 2337668] | Changed route | 2014-03-11 10:32am |
% include header.html %>
| Source | Type | Time |
|---|---|---|
| Trolley [ID 0877668] | Powered down | 2014-03-11 12:33pm |
| Trolley [ID 0877668] | Powered down | 2014-03-11 11:31am |
| Trolley [ID 2337668] | Changed route | 2014-03-11 10:32am |


Fear and Loathing in Las Vegas (1998)
** out of *****
Cast: Johnny Depp, Benicio Del Toro, Ellen Barkin, Gary Busey, Cameron Diaz, Flea, Mark Harmon, Christina Ricci, Katherine Helmond, Michael Jeter, Penn Jillette, Lyle Lovett, Harry Dean Stanton, Tim Thomerson Written by: Terry Gilliam, Tony Grisoni, Tod Davies and Alex Cox Based on the novel by: Hunter S. Thompson Directed by: Terry Gilliam Running Time: 128 minutes
Understand that I know absolutely nothing about Hunter S. Thompson or his work. Also understand that I have no desire to research him or his work in order to write this review. That having been said, let's begin...
Fear and Loathing in Las Vegas is just a ridiculous mess. It has it's good moments, but ultimately infuriates the viewer for having no point whatsoever. The film is similar to 1980's Where the Buffalo Roam where Bill Murray played rebellious writer Hunter S. Thompson and Peter Boyle was his whacked-out attorney. Here it's Johnny Depp as Thompson and Benicio Del Toro as his whacked-out attorney. Where the Buffalo Roam skipped right over the events of this film, and wisely so. The events in Fear and Loathing in Las Vegas consist of nothing more that Depp and Del Toro using drugs, stumbling around, hallucinating, retreating to a hotel room, doing more drugs, stumbling around, hallucinating, and so on and so on.
Fear and Loathing in Las Vegas isn't telling us a story, and it isn't trying to say anything. It's just one long drug trip. It's mildly amusing for a while, and does provide a few chuckles, but it quickly wears thin.  Whenever I see him on screen (in movies like The Fan and The Usual Suspects) I feel like I need subtitles to understand him. Add drunken slurs to his normal unintelligible dialogue and I can't understand one single syllable he utters.
The film just seems to raise questions that would be interesting to see addresses, but of course the film is more interested in obscure drug trips than anything coherent. For example, who is hiring Thompson to write articles for them? Why would anyone tolerate that kind of behavior?  How can someone consistantly wake up surrounded and covered in filth, not knowing what has happened for the last two hours or so, and then want to do it all over again? Come to think of it, that sounds a lot like how I felt after seeing this movie. Thankfully, I have enough sense to know that I'd never want that to happen again. [R]
The Jacksonville Film Journal -- Film Reviews by Chuck Dowling URL: http://users.southeast.net/~chuckd21/ Email<EMAIL_ADDRESS>© 1995-1998 of The Jacksonville Film Journal. No reviews may be reprinted without permission.
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


CV / Resume
Education
Kansas Academy of Mathematics and Science – Fort Hays State University, Hays, KS: May 2015
Bachelor of Science, Biology emphasis in Botany – Fort Hays State University, Hays, KS: May 2017
Master of Science, Biology – Fort Hays State University, Hays, KS: Projected - May 2019
Undergraduate and graduate advisor: Dr. Brian R. Maricle
Professional Experience
2014 Summer – Forsyth library Makerspace, Fort Hays State University, Kays, KS
-
Teaching public and students about 3D printing and arduino microcontrollers.
-
Work with several summer camps ranging from ages 4 to 14.
2017 - 2018 – Graduate Work Assistant, Kansas Wetlands Education Center, Fort Hays State University, Great Bend and Hays, KS.
-
Animal care, including, prairie dogs, screech owls, big brown bats, salamanders, several turtle and snake species.
-
Customer service and clerical work, greeting visitors, answering questions, giving tours of the facility and wetlands.
2018 - 2019 – Graduate Teaching Assistant, Laboratory Experiences in Biology, Fort Hays State University, Hays, KS.
- Grading online lab reports and answering students questions.
Research Experience
Undergraduate
2015-2016 – Big Bluestem (Andropogon gerardi) stem sectioning using a microtome
2016 – Seperation of chloroplasts from spinach leaves in sucrose solution for spectrophotometric analysis at different light wavelengths, to determine photosynthetic activity.
2017 – Photosynthetic action spectra of etiolated green beans during greening.
Graduate
2017-2019 – Greening rates and photosynthetic development of leaves in C3 and C4 plants, Studying how dark grown etiolated plants transition to a green state once introduced to light, using fluorescence and gas exchange measurements, by the use of an LI-6400XT Portable Photosynthesis System. Achlorophyllous leaves were measured at 0 days of light exposure, introduced to light, and measured daily for 10 days to track photosynthetic development and efficiency of photochemical processes.
Honors
2017 – Botanical Society of America, Li-Cor poster presentation prize, June 2017
Presentations
2017 – Botanical Society of America – poster presentation – Tayler J. Kriss and Brian R. Maricle, Developing Chlorophyll Fluorescence in Etiolated Green Bean, Phaseolus vulgaris.
– Kansas Academy of Science annual meeting - poster presentation.
2018 – Botanical Society of America – poster presentation – Tayler J. Kriss and Brian R. Maricle, Developing chlorophyll fluorescence and gas exchange in etiolated green bean, Phaseolus vulgaris, and corn, Zea mays.
Certifications
2018 - FAA Small Unmanned Aircraft System Remote Pilot
College courses completed
Botany - 27 credit hours
Botany and Lab
Plant Anatomy and Lab
Plant Physiology and Lab
Topics in Biology: Dendrology
Taxonomy of Flowering Plants and Lab
Range Plants and Identification Lab
Graduate Problems in Biology: Plant Physiology and Lab
Biology - 33 credit hours
Humans and the Environment
Ecology and Lab
General Microbiology and Lab
Biodiversity and Conservation Biology
Cellular Biology
Human Heredity
Biologic Scientific Writing
Rangeland Management and Techniques
Topics in Biology: Unmanned Aerial Systems
Graduate Problems in Biology: Virology
Graduate Problems in Biology: Evolution
Biostatistics and Lab
Digital informal science communication seminar
Chemistry - 10 credit hours
University Chemistry I and Lab
University Chemistry II and Lab
Undergraduate Research - 8 credit hours
Problems in Geosciences: Earth Space Science Research & Writing
Problems/Information: Networking/Telecommunications
Problems/Biology: Independent Research
Mathematics - 19 credit hours
Pre-Calculus
Analytic Geometry and Calculus I
Analytic Geometry and Calculus II
Computer Science I
Computer Science II
Physics - 10 credit hours
Physics for Scientists and Engineers I and Lab
Physics for Scientists and Engineers II and Lab
English - 6 credit hours
English Composition I
English Composition II
Communication - 3 credit hours
Fundamentals of Oral Communication
History - 6 credit hours
United States History to 1877
United States History Since 1877


Title: Inside the C++ Object Model
Author:
Published: 1996
ISBN: 0-201-83454-5
Verdict: Recommended (even after 16 years)
I managed to pick this book up second hand from
Just a week or so ago the age old argument about C++ being bloated and inefficient reared its ugly head again. The answer it now seems is to point the protagonists to this book as Lippman cites this common myth in his preface as one reason for writing it. I agree with him that an understanding of the implementation helps with writing more efficient code from the get go as you know the costs of various language features.
The book is split into 7 chapters and starts with the fundamental Object Model – how an object is represented in memory. He doesn’t just cover what a v-table is, but instead walks through in detail how we got from a C style struct to a C++ polymorphic object, including such trade-offs as where to place the v-table. He makes continuous references to the evolution of Cfront which helps you understand the earlier constraints that drove the language.
Once the model is cemented he goes on to talk about constructors (default & copy), data members and then different types of functions (static, non-static & virtual) in the following 3 chapters. He covers the Named Return Value Optimisation in depth and provides some performance figures to back things up. What is particularly noticeable is the number of pages devoted to dealing with Virtual Base Classes – you’ll begin to understand why developers often shy away from them.
Chapter 5 looks at the semantics (rather than just the mechanics) of constructors and destructors and their effects on the compiler. Chapter 6 covers new & delete and the tricky issues that initialising arrays throw up. Plus he covers temporary objects in fine detail as that provides a common source of folklore it seems.
The final chapter looks at the then “new editions” to the language – Templates, Exception Handling and Runtime Type Identification (RTTI). Given its age this chapter is lighter on content, but the mechanics and lineage are still very useful. I also learnt another thing about name resolution within templates that really surprised me - this alone made purchasing it worth the price.
Chris Oldwood
12/10/2012


Case sensitive
Note that the case-sensitivity checkbox will only apply to LIKE and CONTAINS filters. For LIKE filters you can use the '%' symbol as a wildcard.
Clear filter Apply filter


Graded Exercise 2
LinkedIn
link text
Here are the main points I learned about LinkedIn and networking
- Most employers look at a possible employee LinkedIn page.
- Wording matters a lot in your resume and your profile. You should be trying your best to show employers what your skills are. You should give direct information while removing clutter.
- Networking can be fun. You just need to talk to people.
- If you help others connect, people will help you connect.
- On LinkedIn and your resume, you should try to show your most important attributes and experiences first.
- You can get a lot of jobs if you network well, even if there are more qualified people out there.
Lesson
Here is my google presentation
New Repository
The link below will be the download to the github repository for the lab assignment (multithread web server). In the repository, there will be a LICENSSE and a README. There will be a test code in the same folder as the java code called test.html
This is the link to the clone/download of my lab that includes javadoc in the code.


Username
Password
* control only using Mouse
designed and developed by Manthan Bhatt and Hannan Mehdi
Welcome To Clue By Clue


{# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -#} {% extends "email/_base/body.html" %} {% block content %}
{% trans site=request.registry.settings["site.name"] %}During your recent upload or upload attempt of {{ project_name }} to {{ site }}, we noticed you used basic authentication (username & password). However, your account has two-factor authentication (2FA) enabled.{% endtrans %}
{% trans site=request.registry.settings["site.name"] %}In the near future, {{ site }} will begin prohibiting uploads using basic authentication for accounts with two-factor authentication enabled. Instead, we will require API tokens to be used.{% endtrans %}
{% trans new_token_url=request.route_url('manage.account.token', _host=request.registry.settings.get('warehouse.domain')), token_help_url=request.help_url(_anchor='apitoken') %}First, generate an API token for your account or project at {{ new_token_url }}. Then, use this token when publishing instead of your username and password. See {{ token_help_url }} for help using API tokens to publish.{% endtrans %}
{% endblock %}


Unlocks 1 Class and 3 Subcourses.
No Consultations.
No Free Event Attendance.
Unlocks 2 Class and 8 Subcourses.
1x Free Consultations.
3x Free Event Attendance.
HOT
2x Free Consultations.
5x Free Event Attendance.


My thoughts on meditation before reading chapter 2 of Search Inside Yourself were slightly skeptical, and probably still are. I definitely see huge merits in practicing mindfulness but I'm a bit dubious as to how much of a wonder drug/activity it is claimed to be. In saying that, I definitely think it has amazing benefits and will definitely be trying to make regular meditation a habit. Something new I learned about meditation was how adept Buddhist meditators are able to generate high-amplitude gamma brain waves, which are associated with high effectiveness in memory, learning, and perception. Meditation training can also change your brain at rest.


usage.Rmd
The first thing to do is to establish a connection with the Elasticsearch server. In our case, it is running locally on port 9200.
library(elasticquery)
con <- es_connect(
host = "<IP_ADDRESS>", port = 9200,
primary_index = "my-index")
This connection object is passed to queries so it knows where to go to run the query.
Note that we can also specify the primary_index
, which is the index used by default by queries we build unless we specify otherwise in the query. Here we are querying “my-index” by default.
Two major types of queries are currently supported by this package.
query_agg()
query_fetch()
After a query is initiated, it can built upon by piping various operations:
agg_by_field()
: specify a field to aggregate by, only for aggregation queriesagg_by_date()
: specify a date field and date binning to aggregate by, only for aggregation queriesfilter_match()
: specify a field to filter documents on according to a string match (partial for text fields, exact for keyword fields), for both aggregation and fetch queriesfilter_terms()
: specify a field to filter documents on according to a string exact match, for both aggregation and fetch queriesfilter_regexp()
: specify a field to filter documents on according to a regular expression match, for both aggregation and fetch queriesfilter_range()
: specify a field to filter documents on according to a specified range, for both aggregation and fetch queriesselect_fields()
: specify fields to select in the returned documents, only for fetch queriessort_docs()
: specify fields by which to sort the returned documents, only for fetch queries.Aggregation queries are constructed by doing the following:
query_agg()
agg_by_field()
agg_by_date()
To initiate an aggregation query, we use the function query_agg()
, and pass it our connection object.
query <- query_agg(con)
We can view the query’s translation to an Elasticsearch search body string simply through printing the query.
query
#> {}
Here, of course, the query is empty as we haven’t specified aggregation dimensions yet.
Queries can be executed using the run()
function.
run(query)
#> # A tibble: 0 x 0
Since the query is empty, nothing is returned.
To begin specifying fields to aggregate on, it can be helpful to get a view of what fields are available to aggregate on. This can be done by passing the connection object to `queryable_fields().
queryable_fields(con)
#> # A tibble: 37 x 2
#> field type
#> <chr> <chr>
#> 1 affectedCountries keyword
#> 2 affectedCountriesIso keyword
#> 3 childIds keyword
#> 4 continentCodes keyword
#> 5 description text
#> 6 duplicateId keyword
#> 7 entityType keyword
#> 8 flaggedByUserIds integer
#> 9 fullText text
#> 10 id integer
#> # … with 27 more rows
Note that aggregations make most sense when done against categorical variables with some bounded cardinality. Typically keywords make the most sense to aggregate against, but even with keywords, you should use care to think about what fields make sense to aggregate.
Suppose we want to tabulate the frequency of all of the fields in the index. We can do this by adding agg_by_field()
to our query, specifying the field name “tags”.
query <- query_agg(con) %>%
agg_by_field("tags")
The function agg_by_field()
, and all subsequent query modifying functions take a query object as its input and emit a modified query object as its output. This makes these functions suitable for piping, which is a convenient and expressive way to build queries.
To see what this new query looks like:
query
#> {
#> "size": 0,
#> "aggs": {
#> "agg_results": {
#> "composite": {
#> "size": 1000,
#> "sources": [
#> {
#> "tags": {
#> "terms": {
#> "field": "tags"
#> }
#> }
#> }
#> ]
#> }
#> }
#> }
#> }
Note that aggregation queries use composite aggregation with paging, and running the query will automatically take care of recurrent queries until paging is done and bind the results together, saving a lot of tedious work.
We can retrieve the result of this query by calling run()
.
run(query)
#> # A tibble: 912 x 2
#> tags count
#> <chr> <int>
#> 1 f:10:All MSF Categories 6010
#> 2 f:10:Biological 5060
#> 3 f:10:CWA 2
#> 4 f:10:Chemical 64
#> 5 f:10:Disasters 982
#> 6 f:10:HPV_grouped 5
#> 7 f:10:HPV_notgrouped 14
#> 8 f:10:Scenarios 9
#> 9 f:10:zAll Hazards Threats (optional) 25
#> 10 f:11:All UNICEF Categories 5098
#> # … with 902 more rows
We can continue to add more dimensions to the aggregation using pipes. For example, to count the frequency of both the fields “tags” and “affectedCountriesIso”:
query_agg(con) %>%
agg_by_field("tags") %>%
agg_by_field("affectedCountriesIso") %>%
run()
#> # A tibble: 54,595 x 3
#> tags affectedCountriesIso count
#> <chr> <chr> <int>
#> 1 f:10:All MSF Categories AD 11
#> 2 f:10:All MSF Categories AE 36
#> 3 f:10:All MSF Categories AF 64
#> 4 f:10:All MSF Categories AG 2
#> 5 f:10:All MSF Categories AI 1
#> 6 f:10:All MSF Categories AL 13
#> 7 f:10:All MSF Categories AM 19
#> 8 f:10:All MSF Categories AO 3
#> 9 f:10:All MSF Categories AR 236
#> 10 f:10:All MSF Categories AS 3
#> # … with 54,585 more rows
Suppose we want to get daily counts for each tag in the data. We can use a function agg_by_date()
, which by default aggregates daily.
Here, we aggregate on a document’s field “processedOnDate”.
query_agg(con) %>%
agg_by_field("tags") %>%
agg_by_date("processedOnDate") %>%
run()
#> # A tibble: 4,291 x 3
#> tags processedOnDate count
#> <chr> <dttm> <int>
#> 1 f:10:All MSF Categories 2020-03-05 00:00:00 37
#> 2 f:10:All MSF Categories 2020-03-06 00:00:00 416
#> 3 f:10:All MSF Categories 2020-03-08 00:00:00 21
#> 4 f:10:All MSF Categories 2020-03-13 00:00:00 179
#> 5 f:10:All MSF Categories 2020-03-15 00:00:00 69
#> 6 f:10:All MSF Categories 2020-03-16 00:00:00 104
#> 7 f:10:All MSF Categories 2020-03-17 00:00:00 1345
#> 8 f:10:All MSF Categories 2020-03-18 00:00:00 3839
#> 9 f:10:Biological 2020-03-15 00:00:00 1
#> 10 f:10:Biological 2020-03-16 00:00:00 2
#> # … with 4,281 more rows
For finer control over the date binning, we can use functions calendar_interval()
and fixed_interval()
.
For example, to bin on calendar week:
query_agg(con) %>%
agg_by_field("tags") %>%
agg_by_date("processedOnDate", calendar_interval("1w")) %>%
run()
#> # A tibble: 2,033 x 3
#> tags processedOnDate count
#> <chr> <dttm> <int>
#> 1 f:10:All MSF Categories 2020-03-02 00:00:00 474
#> 2 f:10:All MSF Categories 2020-03-09 00:00:00 248
#> 3 f:10:All MSF Categories 2020-03-16 00:00:00 5288
#> 4 f:10:Biological 2020-03-09 00:00:00 1
#> 5 f:10:Biological 2020-03-16 00:00:00 5059
#> 6 f:10:CWA 2020-03-16 00:00:00 2
#> 7 f:10:Chemical 2020-03-16 00:00:00 64
#> 8 f:10:Disasters 2020-03-02 00:00:00 474
#> 9 f:10:Disasters 2020-03-09 00:00:00 247
#> 10 f:10:Disasters 2020-03-16 00:00:00 261
#> # … with 2,023 more rows
And to bin on every 10 days:
query_agg(con) %>%
agg_by_field("tags") %>%
agg_by_date("processedOnDate", fixed_interval("10d")) %>%
run()
#> # A tibble: 1,470 x 3
#> tags processedOnDate count
#> <chr> <dttm> <int>
#> 1 f:10:All MSF Categories 2020-02-28 00:00:00 474
#> 2 f:10:All MSF Categories 2020-03-09 00:00:00 5536
#> 3 f:10:Biological 2020-03-09 00:00:00 5060
#> 4 f:10:CWA 2020-03-09 00:00:00 2
#> 5 f:10:Chemical 2020-03-09 00:00:00 64
#> 6 f:10:Disasters 2020-02-28 00:00:00 474
#> 7 f:10:Disasters 2020-03-09 00:00:00 508
#> 8 f:10:HPV_grouped 2020-03-09 00:00:00 5
#> 9 f:10:HPV_notgrouped 2020-03-09 00:00:00 14
#> 10 f:10:Scenarios 2020-03-09 00:00:00 9
#> # … with 1,460 more rows
We can further modify an aggregation query by specifying filters. Three types of filters are currently available:
Note that filters can apply to both aggregation and fetch queries.
Range filters are specifyind using filter_range()
, specifying the field to filter, and then specifying one or both of from
and to
values for the range.
For example, to take our earlier aggregation query and filter it to dates later than 2018-01-01:
query_agg(con) %>%
agg_by_field("tags") %>%
agg_by_date("processedOnDate") %>%
filter_range("processedOnDate", from = "2020-03-10") %>%
run()
#> # A tibble: 2,958 x 3
#> tags processedOnDate count
#> <chr> <dttm> <int>
#> 1 f:10:All MSF Categories 2020-03-13 00:00:00 179
#> 2 f:10:All MSF Categories 2020-03-15 00:00:00 69
#> 3 f:10:All MSF Categories 2020-03-16 00:00:00 104
#> 4 f:10:All MSF Categories 2020-03-17 00:00:00 1345
#> 5 f:10:All MSF Categories 2020-03-18 00:00:00 3839
#> 6 f:10:Biological 2020-03-15 00:00:00 1
#> 7 f:10:Biological 2020-03-16 00:00:00 2
#> 8 f:10:Biological 2020-03-17 00:00:00 1317
#> 9 f:10:Biological 2020-03-18 00:00:00 3740
#> 10 f:10:CWA 2020-03-18 00:00:00 2
#> # … with 2,948 more rows
To filter on a date/time, the format is like the following:
query_agg(con) %>%
agg_by_field("tags") %>%
agg_by_date("processedOnDate") %>%
filter_range("processedOnDate", from = "2020-03-10T10:21:32") %>%
run()
#> # A tibble: 2,958 x 3
#> tags processedOnDate count
#> <chr> <dttm> <int>
#> 1 f:10:All MSF Categories 2020-03-13 00:00:00 179
#> 2 f:10:All MSF Categories 2020-03-15 00:00:00 69
#> 3 f:10:All MSF Categories 2020-03-16 00:00:00 104
#> 4 f:10:All MSF Categories 2020-03-17 00:00:00 1345
#> 5 f:10:All MSF Categories 2020-03-18 00:00:00 3839
#> 6 f:10:Biological 2020-03-15 00:00:00 1
#> 7 f:10:Biological 2020-03-16 00:00:00 2
#> 8 f:10:Biological 2020-03-17 00:00:00 1317
#> 9 f:10:Biological 2020-03-18 00:00:00 3740
#> 10 f:10:CWA 2020-03-18 00:00:00 2
#> # … with 2,948 more rows
The funtion filter_terms()
adds a filter to a query that specifies certain values a field must have to be included in the aggregation.
For example, to add to our earlier query, suppose we require that “affectedCountriesIso” must contain “US” or “CA”:
query_agg(con) %>%
agg_by_field("tags") %>%
agg_by_date("processedOnDate", calendar_interval("1w")) %>%
filter_range("processedOnDate", from = "2018-01-01") %>%
filter_terms("affectedCountriesIso", c("US", "CA")) %>%
run()
#> # A tibble: 1,638 x 3
#> tags processedOnDate count
#> <chr> <dttm> <int>
#> 1 f:10:All MSF Categories 2020-03-02 00:00:00 86
#> 2 f:10:All MSF Categories 2020-03-09 00:00:00 25
#> 3 f:10:All MSF Categories 2020-03-16 00:00:00 1195
#> 4 f:10:Biological 2020-03-16 00:00:00 1169
#> 5 f:10:CWA 2020-03-16 00:00:00 1
#> 6 f:10:Chemical 2020-03-16 00:00:00 17
#> 7 f:10:Disasters 2020-03-02 00:00:00 86
#> 8 f:10:Disasters 2020-03-09 00:00:00 25
#> 9 f:10:Disasters 2020-03-16 00:00:00 37
#> 10 f:10:HPV_grouped 2020-03-16 00:00:00 2
#> # … with 1,628 more rows
The function filter_regexp()
adds a filter to a query that provides a regular expression that a field must match to be included in the results. Note that unfortuately Elasticsearch regular expressions are case sensitive.
To aggregate tags but only for documents that have a tag that contain “Corona”, for example:
query_agg(con) %>%
agg_by_field("tags") %>%
filter_regexp("tags", ".*Corona.*") %>%
run()
#> # A tibble: 677 x 2
#> tags count
#> <chr> <int>
#> 1 f:10:All MSF Categories 4899
#> 2 f:10:Biological 4899
#> 3 f:10:CWA 1
#> 4 f:10:Chemical 27
#> 5 f:10:Disasters 62
#> 6 f:10:HPV_grouped 1
#> 7 f:10:HPV_notgrouped 7
#> 8 f:10:Scenarios 3
#> 9 f:10:zAll Hazards Threats (optional) 6
#> 10 f:11:All UNICEF Categories 4899
#> # … with 667 more rows
Note that here we are filtering on a field that is an array of values for each document. Because of this, we will get more tags in our resulting aggregation than tags that include “Corona”. Here, we are counting all tags that are present in each article that contains a tag matching “Corona”.
The function filter_match()
specifies a filter to only include documents where the specified field contains a match for the provided string.
For example, to further refine our aggregation to only include documents where a match for the string “disease” is found in the full text:
query_agg(con) %>%
agg_by_field("tags") %>%
agg_by_date("processedOnDate", calendar_interval("1w")) %>%
filter_range("processedOnDate", from = "2020-03-10") %>%
filter_terms("affectedCountriesIso", c("US", "CA")) %>%
filter_match("fullText", "disease") %>%
run()
#> # A tibble: 772 x 3
#> tags processedOnDate count
#> <chr> <dttm> <int>
#> 1 f:10:All MSF Categories 2020-03-09 00:00:00 1
#> 2 f:10:All MSF Categories 2020-03-16 00:00:00 196
#> 3 f:10:Biological 2020-03-16 00:00:00 194
#> 4 f:10:CWA 2020-03-16 00:00:00 1
#> 5 f:10:Chemical 2020-03-16 00:00:00 5
#> 6 f:10:Disasters 2020-03-09 00:00:00 1
#> 7 f:10:Disasters 2020-03-16 00:00:00 7
#> 8 f:10:HPV_notgrouped 2020-03-16 00:00:00 2
#> 9 f:10:zAll Hazards Threats (optional) 2020-03-16 00:00:00 2
#> 10 f:11:All UNICEF Categories 2020-03-16 00:00:00 196
#> # … with 762 more rows
You can add a simple query string filter by using the function filter_sqs()
. This allows you to specify field name or vector of field names to search, and then a query string to search in these fields.
Below we are searching fields “fullText” and “title” for the specified search string.
docs <- query_fetch(con, max = 100) %>%
filter_sqs(c("fullText", "title"), "((health | healthcare | \\\"health care\\\" | medical) + (specialist* | provider* | professional* | practitioner* | doctor* | worker* | personnel | staff)) | physician* | \\\"general practitioner\\\" | therapist*") %>%
select_fields(c("fullText", "title")) %>%
run()
#> Fetching first 100 of 100 total documents...
#> 100 documents fetched (100%)...
All of the filter_*()
functions have a boolean parameter bool
that allows you to specify the boolean logic for the filter. The supported options are described here. The default is “must”, meaning that the specified filter must appear in the returned documents.
Below, we are filtering on the field “tags”, saying that we want documents with tags “l:WPRO”, but no documents with tags “l:CoronavirusInfection”.
docs <- query_fetch(con, max = 100) %>%
filter_terms("tags", "l:WPRO") %>%
filter_terms("tags", "l:CoronavirusInfection", bool = "must_not") %>%
run()
#> Fetching first 100 of 100 total documents...
#> 100 documents fetched (100%)...
Fetch queries simply retrieve documents based on filtering criteria. All of the filtering functions specified above apply to these queries.
Similar to aggregation queries, a fetch query is initialized using query_fetch()
, which takes as its primary argument the connection object.
One optional argument of note to this function is path
, which specifies a directory to write docuents to as they are fetched. If this is not specified, results will be read into memory. If the result set looks like it will be very large, a warning is provided that encourages the user to provide a path
and write to disk.
If we intialize a fetch query with no refinements, it will returl all documents in the index.
For example, with our example index which contains 10k documents:
docs <- query_fetch(con) %>%
run()
This will fetch all 10k documents and return them as a large list to docs
.
Note that fetch queries automatically take care of scrolling to retrieve potentially very large sets of documents. The scroll limit is 10k documents, so iterative queries are run to fetch these in batches and piece them together upon retrieval.
It is probably more desirable for a fetch query to pinpoint records of interest rather than retrieve all documents. This can be done using filter queries as we specified earlier.
For example, to fetch all documents matching the filtering criteria we specified in the final aggregation example:
docs <- query_fetch(con) %>%
filter_range("processedOnDate", from = "2020-03-10") %>%
filter_terms("affectedCountriesIso", c("US", "CA")) %>%
filter_match("fullText", "disease") %>%
run()
#> Fetching 288 total documents...
#> 288 documents fetched (100%)...
Sometimes we may wish to see how large a query is before executing it. To do this, we can replace run()
with n_docs()
. To make query execution even faster, we can specify max = 0
so that only no documents are fetched.
query_fetch(con, max = 0) %>%
filter_range("processedOnDate", from = "2020-03-10") %>%
filter_terms("affectedCountriesIso", c("US", "CA")) %>%
filter_match("fullText", "disease") %>%
n_docs()
#> [1] 288
There is an argument max
in query_fetch()
that can be used to specify that we just want to fetch the first max
documents. This can be useful if we want to experiment with our query and the resulting data before doing a full fetch.
docs <- query_fetch(con, max = 10) %>%
filter_range("processedOnDate", from = "2020-03-10") %>%
filter_terms("affectedCountriesIso", c("US", "CA")) %>%
filter_match("fullText", "disease") %>%
run()
#> Fetching first 10 of 10 total documents...
#> 10 documents fetched (100%)...
In the previous fetch examples, the return object docs
has been a list format of the document content of the query.
In a many cases we may wish to do a bulk download of many articles. If we specify a path
argument to query_fetch()
, the results will be written in batches to the specified directory.
For example, to write our last query to disk, we specify a directory in our query initizilaztion. Also, note that to simulate scrolling, we specify each iteration of the query to retrieve 10 documents (instead of the default 10k documents) with the size
argument. With this, we see that two files get written, one for each scroll.
tf <- tempfile()
dir.create(tf)
docs <- query_fetch(con, path = tf, size = 10) %>%
filter_range("processedOnDate", from = "2020-03-10") %>%
filter_terms("affectedCountriesIso", c("US", "CA")) %>%
filter_match("fullText", "disease") %>%
run()
#> Fetching 288 total documents...
#> 10 documents fetched (3%)...
#> 20 documents fetched (7%)...
#> 30 documents fetched (10%)...
#> 40 documents fetched (14%)...
#> 50 documents fetched (17%)...
#> 60 documents fetched (21%)...
#> 70 documents fetched (24%)...
#> 80 documents fetched (28%)...
#> 90 documents fetched (31%)...
#> 100 documents fetched (35%)...
#> 110 documents fetched (38%)...
#> 120 documents fetched (42%)...
#> 130 documents fetched (45%)...
#> 140 documents fetched (49%)...
#> 150 documents fetched (52%)...
#> 160 documents fetched (56%)...
#> 170 documents fetched (59%)...
#> 180 documents fetched (62%)...
#> 190 documents fetched (66%)...
#> 200 documents fetched (69%)...
#> 210 documents fetched (73%)...
#> 220 documents fetched (76%)...
#> 230 documents fetched (80%)...
#> 240 documents fetched (83%)...
#> 250 documents fetched (87%)...
#> 260 documents fetched (90%)...
#> 270 documents fetched (94%)...
#> 280 documents fetched (97%)...
#> 288 documents fetched (100%)...
list.files(docs)
#> [1] "out0001.json" "out0002.json" "out0003.json" "out0004.json" "out0005.json"
#> [6] "out0006.json" "out0007.json" "out0008.json" "out0009.json" "out0010.json"
#> [11] "out0011.json" "out0012.json" "out0013.json" "out0014.json" "out0015.json"
#> [16] "out0016.json" "out0017.json" "out0018.json" "out0019.json" "out0020.json"
#> [21] "out0021.json" "out0022.json" "out0023.json" "out0024.json" "out0025.json"
#> [26] "out0026.json" "out0027.json" "out0028.json" "out0029.json"
Another operation available only for fetch queries is sort_docs()
, which allows you to specify fields to sort by as part of the fetch.
For example:
docs <- query_fetch(con, size = 10, max = 25) %>%
filter_range("processedOnDate", from = "2020-03-10") %>%
sort_docs("processedOnDate") %>%
run()
#> Fetching 25 total documents...
#> 10 documents fetched (40%)...
#> 20 documents fetched (80%)...
#> 25 documents fetched (100%)...
sapply(docs, function(x) x$`_source`$processedOnDate)
#> [1] "2020-03-13T07:26:04.0422415Z" "2020-03-13T07:26:07.0304637Z"
#> [3] "2020-03-13T07:26:07.8927456Z" "2020-03-13T07:26:09.0216872Z"
#> [5] "2020-03-13T07:28:01.4437200Z" "2020-03-13T07:28:02.9752079Z"
#> [7] "2020-03-13T07:28:13.5119956Z" "2020-03-13T07:28:15.0721117Z"
#> [9] "2020-03-13T07:30:03.4775738Z" "2020-03-13T07:30:05.2785935Z"
#> [11] "2020-03-13T07:30:08.0987420Z" "2020-03-13T07:31:08.4420386Z"
#> [13] "2020-03-13T07:31:08.7470622Z" "2020-03-13T07:32:10.5883424Z"
#> [15] "2020-03-13T07:32:10.9902103Z" "2020-03-13T07:32:15.2091531Z"
#> [17] "2020-03-13T07:32:18.7561610Z" "2020-03-13T07:33:02.1066126Z"
#> [19] "2020-03-13T07:33:05.4555161Z" "2020-03-13T07:33:06.1505288Z"
#> [21] "2020-03-13T07:34:08.6844120Z" "2020-03-13T07:35:05.6037369Z"
#> [23] "2020-03-13T07:35:09.8630094Z" "2020-03-13T07:35:10.7938444Z"
#> [25] "2020-03-13T07:37:01.3067962Z"
You can provide a vector of field names for nested sorting.
You can also wrap fields with utility functions asc()
and desc()
to specify the sort order:
docs <- query_fetch(con, size = 10, max = 25) %>%
filter_range("processedOnDate", from = "2020-03-10") %>%
sort_docs(desc("processedOnDate")) %>%
run()
#> Fetching 25 total documents...
#> 10 documents fetched (40%)...
#> 20 documents fetched (80%)...
#> 25 documents fetched (100%)...
sapply(docs, function(x) x$`_source`$processedOnDate)
#> [1] "2020-03-18T06:48:04.0678061Z" "2020-03-18T06:48:01.2303682Z"
#> [3] "2020-03-18T06:47:12.4272729Z" "2020-03-18T06:47:06.5424375Z"
#> [5] "2020-03-18T06:47:01.1790261Z" "2020-03-18T06:47:00.6332482Z"
#> [7] "2020-03-18T06:46:04.3693800Z" "2020-03-18T06:46:04.0533870Z"
#> [9] "2020-03-18T06:46:03.3320970Z" "2020-03-18T06:46:02.3600512Z"
#> [11] "2020-03-18T06:46:02.1100528Z" "2020-03-18T06:46:01.0043784Z"
#> [13] "2020-03-18T06:45:05.6178085Z" "2020-03-18T06:45:05.1447041Z"
#> [15] "2020-03-18T06:45:03.3038090Z" "2020-03-18T06:45:02.9738038Z"
#> [17] "2020-03-18T06:45:01.7208323Z" "2020-03-18T06:45:00.7528565Z"
#> [19] "2020-03-18T06:44:09.2082822Z" "2020-03-18T06:44:08.9183509Z"
#> [21] "2020-03-18T06:44:04.7698113Z" "2020-03-18T06:44:04.2997752Z"
#> [23] "2020-03-18T06:44:03.6822691Z" "2020-03-18T06:44:01.9492661Z"
#> [25] "2020-03-18T06:44:01.4906573Z"
An operation available only for fetch queries, select_fields()
, allows us to specify which fields should be returned for each document. This is useful of documents contain some fields that are very large and we don’t want to include them in our results.
To see what values are acceptable for a selectable field:
selectable_fields(con)
#> # A tibble: 45 x 2
#> field type
#> <chr> <chr>
#> 1 affectedCountries keyword
#> 2 affectedCountriesIso keyword
#> 3 childIds keyword
#> 4 comments nested
#> 5 continentCodes keyword
#> 6 description text
#> 7 duplicateId keyword
#> 8 entityType keyword
#> 9 flaggedByUserIds integer
#> 10 fullText text
#> # … with 35 more rows
For example, to return just the fields “source.countryIso” and “locations”:
docs <- query_fetch(con, size = 10, max = 25) %>%
filter_range("processedOnDate", from = "2020-03-10") %>%
select_fields(c("source.id", "triggers", "locations")) %>%
run()
#> Fetching 25 total documents...
#> 10 documents fetched (40%)...
#> 20 documents fetched (80%)...
#> 25 documents fetched (100%)...
str(docs[[1]]$`_source`, 2)
#> List of 3
#> $ locations:List of 2
#> ..$ :List of 8
#> ..$ :List of 9
#> $ source :List of 1
#> ..$ id: int 11786
#> $ triggers :List of 4
#> ..$ :List of 2
#> ..$ :List of 2
#> ..$ :List of 2
#> ..$ :List of 2
The interface provided by query_fetch()
, query_agg()
, and the accompanying filter and sort functions is meant to enable clean and precise definition of Elasticsearch queries, hiding all the messy details of scrolling, aggregation bucketing, query JSON specification, execution, etc. There may be times when this interface does not quite provide enough flexibility. In this scenario, a function, query_str()
, has been created that allows you to provide a string specifying an Elasticsearch query that gets executed.
For example, suppose we would like to fetch all documents retrieved after 2020-03-10. As we have seen before, we can do this with the following:
docs <- query_fetch(con, size = 1000) %>%
filter_range("processedOnDate", from = "2020-03-10") %>%
run()
Suppose we want to run a query similar to this, but we need to modify the query a bit in a way that isn’t available through the interface provided in this package. Let’s first look at what the resulting query string is:
query_fetch(con, size = 1000) %>%
filter_range("processedOnDate", from = "2020-03-10")
#> {
#> "size": 1000,
#> "query": {
#> "bool": {
#> "must": [
#> {
#> "range": {
#> "processedOnDate": {
#> "gte": "2020-03-10"
#> }
#> }
#> }
#> ]
#> }
#> }
#> }
For illustration purposes, we will take this string and run it directly without modification. To run this query string, we can do the following:
str <- '{
"size": 1000,
"query": {
"bool": {
"filter": [
{
"range": {
"processedOnDate": {
"gte": "2020-03-10"
}
}
}
]
}
}
}'
res <- query_str(con, str = str) %>%
run()
Here we simply specified to run the query specified by this string. The structure of the output looks like this:
str(res, 2)
#> List of 4
#> $ took : int 43
#> $ timed_out: logi FALSE
#> $ _shards :List of 4
#> ..$ total : int 1
#> ..$ successful: int 1
#> ..$ skipped : int 0
#> ..$ failed : int 0
#> $ hits :List of 3
#> ..$ total :List of 2
#> ..$ max_score: num 0
#> ..$ hits :List of 1000
Note that this is the raw output provided by Elasticsearch and not the more convenient list output provided by query_fetch()
. Also note that it only pulled 1000 documents when we know there are more results in this query. These limitations occur because query_str()
does not know what kind of query specificaiton it is going to receive, and therefore does not know how to best process the output.
To fully take advantage of the fetch and aggregation conveniences provided by this package, an additional type
parameter is available to query_str()
which by default is “unkown”, but can also be set to “fetch” or “agg”.
With our current example, if we add type = "fetch"
to our call to query_str()
, the execution now knows to handle the query as a fetch query and will take care of scrolling, etc. to fetch all of the documents.
res <- query_str(con, str = str, type = "fetch") %>%
run()
#> Fetching 8136 total documents...
#> 1000 documents fetched (12%)...
#> 2000 documents fetched (25%)...
#> 3000 documents fetched (37%)...
#> 4000 documents fetched (49%)...
#> 5000 documents fetched (61%)...
#> 6000 documents fetched (74%)...
#> 7000 documents fetched (86%)...
#> 8000 documents fetched (98%)...
#> 8136 documents fetched (100%)...
length(res)
#> [1] 8136
While this example wasn’t very imaginative, suppose there is more complex filter logic you want to apply. A typical use case might be to use query_fetch()
and associated filter/sort functions to get you started, modify the query string as needed, and pass that to query_str()
. Note, however, that there is less protection in this scenario from errors in the query specification, so you can expect to see more error messages which will result in the need to debug your query string.
Similarly, we can apply query_str()
to aggregation-type queries. Let’s take the following example:
query_agg(con) %>%
agg_by_field("tags") %>%
agg_by_field("affectedCountriesIso")
#> {
#> "size": 0,
#> "aggs": {
#> "agg_results": {
#> "composite": {
#> "size": 1000,
#> "sources": [
#> {
#> "tags": {
#> "terms": {
#> "field": "tags"
#> }
#> }
#> },
#> {
#> "affectedCountriesIso": {
#> "terms": {
#> "field": "affectedCountriesIso"
#> }
#> }
#> }
#> ]
#> }
#> }
#> }
#> }
We can run this same query using query_str()
as follows:
str <- '{
"size": 0,
"aggs": {
"agg_results": {
"composite": {
"size": 1000,
"sources": [
{
"tags": {
"terms": {
"field": "tags"
}
}
},
{
"affectedCountriesIso": {
"terms": {
"field": "affectedCountriesIso"
}
}
}
]
}
}
}
}'
res <- query_str(con, str = str) %>%
run()
str(res, 3)
#> List of 5
#> $ took : int 0
#> $ timed_out : logi FALSE
#> $ _shards :List of 4
#> ..$ total : int 1
#> ..$ successful: int 1
#> ..$ skipped : int 0
#> ..$ failed : int 0
#> $ hits :List of 3
#> ..$ total :List of 2
#> .. ..$ value : int 10000
#> .. ..$ relation: chr "eq"
#> ..$ max_score: NULL
#> ..$ hits : list()
#> $ aggregations:List of 1
#> ..$ agg_results:List of 2
#> .. ..$ after_key:List of 2
#> .. ..$ buckets :List of 1000
As before, we see that query_str()
is “dumb” in that it doesn’t know we are doing an aggregation and doesn’t know to do the smart iteration to fetch the rest of the aggregation buckets as well as putting the result into a data frame.
To make query_str()
“smart”, we can add type = "agg"
:
res <- query_str(con, str = str, type = "agg") %>%
run()
res
#> # A tibble: 54,595 x 3
#> tags affectedCountriesIso count
#> <chr> <chr> <int>
#> 1 f:10:All MSF Categories AD 11
#> 2 f:10:All MSF Categories AE 36
#> 3 f:10:All MSF Categories AF 64
#> 4 f:10:All MSF Categories AG 2
#> 5 f:10:All MSF Categories AI 1
#> 6 f:10:All MSF Categories AL 13
#> 7 f:10:All MSF Categories AM 19
#> 8 f:10:All MSF Categories AO 3
#> 9 f:10:All MSF Categories AR 236
#> 10 f:10:All MSF Categories AS 3
#> # … with 54,585 more rows
This package is experimental and has not undergone rigorous testing to verify the correctness of the constructed queries. Use at your own risk.
The package has been written to cover a large number of immediate use cases. However, there are many additional features and parameters of Elasticsearch that could be exposed through this interface in the future.


Gecode::UnaryWait< View > Class Template Reference
[Generic propagators]
Wait propagator for single view. More...
#include <wait.hpp>
Public Member Functions | |
| virtual Actor * | copy (Space &home) |
| Perform copying during cloning. | |
| virtual PropCost | cost (const Space &home, const ModEventDelta &med) const |
| Const function (defined as low unary). | |
| virtual void | reschedule (Space &home) |
| Schedule function. | |
| virtual ExecStatus | propagate (Space &home, const ModEventDelta &med) |
| Perform propagation. | |
| virtual size_t | dispose (Space &home) |
| Delete propagator and return its size. | |
Static Public Member Functions | |
| static ExecStatus | post (Home home, View x, std::function< void(Space &home)> c) |
| Post propagator that waits until x becomes assigned and then executes c. | |
Protected Member Functions | |
| UnaryWait (Home home, View x, std::function< void(Space &home)> c0) | |
| Constructor for creation. | |
| UnaryWait (Space &home, UnaryWait &p) | |
| Constructor for cloning p. | |
Protected Attributes | |
| View | x |
| View to wait for becoming assigned. | |
| SharedData< std::function < void(Space &home)> > | c |
| Continuation to execute. |
Detailed Description
template<class View>
class Gecode::UnaryWait< View >
Wait propagator for single view.
Requires
#include <gecode/kernel/wait.hh>
Definition at line 43 of file wait.hpp.
Constructor & Destructor Documentation
template<class View >
| Gecode::UnaryWait< View >::UnaryWait | ( | Home | home, | |
| View | x, | |||
| std::function< void(Space &home)> | c0 | |||
| ) | [inline, protected] |
template<class View >
| Gecode::UnaryWait< View >::UnaryWait | ( | Space & | home, | |
| UnaryWait< View > & | p | |||
| ) | [inline, protected] |
Member Function Documentation
template<class View >
| Actor * Gecode::UnaryWait< View >::copy | ( | Space & | home | ) | [inline, virtual] |
template<class View >
| PropCost Gecode::UnaryWait< View >::cost | ( | const Space & | home, | |
| const ModEventDelta & | med | |||
| ) | const [inline, virtual] |
Const function (defined as low unary).
Implements Gecode::Propagator.
template<class View >
| void Gecode::UnaryWait< View >::reschedule | ( | Space & | home | ) | [inline, virtual] |
template<class View >
| ExecStatus Gecode::UnaryWait< View >::propagate | ( | Space & | home, | |
| const ModEventDelta & | med | |||
| ) | [inline, virtual] |
template<class View >
| ExecStatus Gecode::UnaryWait< View >::post | ( | Home | home, | |
| View | x, | |||
| std::function< void(Space &home)> | c | |||
| ) | [inline, static] |
template<class View >
| size_t Gecode::UnaryWait< View >::dispose | ( | Space & | home | ) | [inline, virtual] |
Delete propagator and return its size.
Reimplemented from Gecode::Actor.
Member Data Documentation
template<class View>
View Gecode::UnaryWait< View >::x [protected] |
template<class View>
SharedData<std::function<void(Space& home)> > Gecode::UnaryWait< View >::c [protected] |
The documentation for this class was generated from the following file:
- gecode/kernel/propagator/wait.hpp


https://codepen.io/vincent-valentin/pen/vGWJKr
https://twitter.com/HTeuMeuLeu/status/870531260699086848
https://drafts.csswg.org/selectors-4/#the-hover-pseudo
For example, [HTML5] defines a labeled control element as matching :hover when its label is hovered.
https://css-tricks.com/i-like-how-percentage-background-position-works/
So if you set something like background-position: 25% 25%
, that positions the image such that 25% of the way across itself aligns with 25% of the way across the element.


{% extends 'core/base.html' %} {% load static %} {% block extra_head %} {% endblock %} {% block content %}
Congratulations, your password has been successfully changed. Go Back to Profile