| Package | Description |
|---|---|
| org.apache.commons.configuration2 |
The Configuration main package.
|
| org.apache.commons.configuration2.beanutils |
In this package a
Configuration implementation can be found that implements the DynaBean interface. |
| org.apache.commons.configuration2.builder.combined |
A package containing the implementation of the builder for combined configurations.
|
| org.apache.commons.configuration2.plist |
Configuration classes supporting NeXT / OpenStep /GNUStep style configuration.
|
| org.apache.commons.configuration2.spring |
A package containing integrations for the Spring Framework.
|
| org.apache.commons.configuration2.web |
This package contains some implementations of the
Configuration interface that are useful in web
environments. |
| Modifier and Type | Interface and Description |
|---|---|
interface |
FileBasedConfiguration
An interface which combines the
FileBased and Configuration interfaces. |
interface |
HierarchicalConfiguration<T>
An interface for mutable hierarchical configurations.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractConfiguration
Abstract configuration class.
|
class |
AbstractHierarchicalConfiguration<T>
A specialized configuration class that extends its base class by the ability of keeping more structure in the stored
properties.
|
class |
AbstractYAMLBasedConfiguration
A base class for configuration implementations based on YAML structures.
|
class |
BaseConfiguration
Basic configuration class.
|
class |
BaseHierarchicalConfiguration
A specialized hierarchical configuration implementation that is based on a structure of
ImmutableNode
objects. |
class |
CombinedConfiguration
A hierarchical composite configuration class.
|
class |
CompositeConfiguration
CompositeConfiguration allows you to add multiple Configuration objects to an aggregated
configuration. |
class |
DatabaseConfiguration
Configuration stored in a database.
|
class |
DataConfiguration
Decorator providing additional getters for any Configuration.
|
class |
DynamicCombinedConfiguration
DynamicCombinedConfiguration allows a set of CombinedConfigurations to be used.
|
class |
EnvironmentConfiguration
A Configuration implementation that reads the platform specific environment variables using the map returned by
System.getenv() . |
class |
INIConfiguration
A specialized hierarchical configuration implementation for parsing ini files.
|
class |
JNDIConfiguration
This Configuration class allows you to interface with a JNDI datasource.
|
class |
JSONConfiguration
A specialized hierarchical configuration class that is able to parse JSON documents.
|
class |
MapConfiguration
A Map based Configuration.
|
class |
PatternSubtreeConfigurationWrapper
Wraps a BaseHierarchicalConfiguration and allows subtrees to be accessed via a configured path with replaceable
tokens derived from the ConfigurationInterpolator.
|
class |
PropertiesConfiguration
This is the "classic" Properties loader which loads the values from a single or multiple files (which can be chained
with "include =".
|
class |
SubnodeConfiguration
A specialized hierarchical configuration class with a node model that uses a tracked node of another node model as
its root node.
|
class |
SubsetConfiguration
A subset of another configuration.
|
class |
SystemConfiguration
A configuration based on the system properties.
|
class |
XMLConfiguration
A specialized hierarchical configuration class that is able to parse XML documents.
|
class |
XMLPropertiesConfiguration
This configuration implements the XML properties format introduced in Java 5.0, see
http://java.sun.com/j2se/1.5.0/docs/api/java/util/Properties.html.
|
class |
YAMLConfiguration
A specialized hierarchical configuration class that is able to parse YAML documents.
|
| Modifier and Type | Field and Description |
|---|---|
protected Configuration |
SubsetConfiguration.parent
The parent configuration.
|
| Modifier and Type | Method and Description |
|---|---|
static Configuration |
ConfigurationUtils.cloneConfiguration(Configuration config)
Clones the given configuration object if this is possible.
|
Configuration |
DataConfiguration.getConfiguration()
Return the configuration decorated by this DataConfiguration.
|
Configuration |
ConfigurationMap.getConfiguration()
Returns the wrapped
Configuration object. |
Configuration |
BaseConfigurationXMLReader.getConfiguration()
Returns the actual configuration to be processed.
|
Configuration |
DynamicCombinedConfiguration.getConfiguration(int index)
Returns the configuration at the specified index.
|
Configuration |
CompositeConfiguration.getConfiguration(int index)
Return the configuration at the specified index.
|
Configuration |
CombinedConfiguration.getConfiguration(int index)
Returns the configuration at the specified index.
|
static Configuration |
ConfigurationConverter.getConfiguration(Properties props)
Convert a standard Properties class into a configuration class.
|
Configuration |
DynamicCombinedConfiguration.getConfiguration(String name)
Returns the configuration with the given name.
|
Configuration |
CombinedConfiguration.getConfiguration(String name)
Returns the configuration with the given name.
|
Configuration |
CompositeConfiguration.getInMemoryConfiguration()
Returns the "in memory configuration".
|
Configuration |
SubsetConfiguration.getParent()
Return the parent configuration for this subset.
|
Configuration |
HierarchicalConfigurationXMLReader.getParsedConfiguration()
Returns the configuration object to be processed.
|
abstract Configuration |
ConfigurationXMLReader.getParsedConfiguration()
Returns a reference to the configuration that is parsed by this object.
|
Configuration |
BaseConfigurationXMLReader.getParsedConfiguration()
Returns the configuration to be processed.
|
Configuration |
DynamicCombinedConfiguration.getSource(String key)
Returns the configuration source, in which the specified key is defined.
|
Configuration |
CompositeConfiguration.getSource(String key)
Returns the configuration source, in which the specified key is defined.
|
Configuration |
CombinedConfiguration.getSource(String key)
Returns the configuration source, in which the specified key is defined.
|
Configuration |
PatternSubtreeConfigurationWrapper.interpolatedConfiguration() |
Configuration |
DynamicCombinedConfiguration.interpolatedConfiguration() |
Configuration |
BaseHierarchicalConfiguration.interpolatedConfiguration()
Returns a configuration with the same content as this configuration, but with all variables replaced by their actual
values.
|
Configuration |
AbstractConfiguration.interpolatedConfiguration()
Returns a configuration with the same content as this configuration, but with all variables replaced by their actual
values.
|
Configuration |
DynamicCombinedConfiguration.removeConfiguration(String name)
Removes the configuration with the specified name.
|
Configuration |
CombinedConfiguration.removeConfiguration(String name)
Removes the configuration with the specified name.
|
Configuration |
DynamicCombinedConfiguration.removeConfigurationAt(int index)
Removes the configuration at the specified index.
|
Configuration |
CombinedConfiguration.removeConfigurationAt(int index)
Removes the configuration at the specified index.
|
Configuration |
SubsetConfiguration.subset(String prefix) |
Configuration |
PatternSubtreeConfigurationWrapper.subset(String prefix) |
Configuration |
DynamicCombinedConfiguration.subset(String prefix) |
Configuration |
Configuration.subset(String prefix)
Return a decorator Configuration containing every key from the current Configuration that starts with the specified
prefix.
|
Configuration |
BaseHierarchicalConfiguration.subset(String prefix)
Creates a new
Configuration object containing all keys that start with the specified prefix. |
Configuration |
AbstractConfiguration.subset(String prefix) |
| Modifier and Type | Method and Description |
|---|---|
List<Configuration> |
CombinedConfiguration.getConfigurations()
Returns a List of all the configurations that have been added.
|
Set<Configuration> |
CombinedConfiguration.getSources(String key)
Returns a set with the configuration sources, in which the specified key is defined.
|
| Modifier and Type | Method and Description |
|---|---|
void |
CompositeConfiguration.addConfiguration(Configuration config)
Add a configuration.
|
void |
CombinedConfiguration.addConfiguration(Configuration config)
Adds a new configuration to this combined configuration.
|
void |
CompositeConfiguration.addConfiguration(Configuration config,
boolean asInMemory)
Adds a child configuration and optionally makes it the in-memory configuration.
|
void |
CombinedConfiguration.addConfiguration(Configuration config,
String name)
Adds a new configuration to this combined configuration with an optional name.
|
void |
DynamicCombinedConfiguration.addConfiguration(Configuration config,
String name,
String at)
Adds a new configuration to this combined configuration.
|
void |
CombinedConfiguration.addConfiguration(Configuration config,
String name,
String at)
Adds a new configuration to this combined configuration.
|
void |
CompositeConfiguration.addConfigurationFirst(Configuration config)
Add a configuration to the start of the list of child configurations.
|
void |
CompositeConfiguration.addConfigurationFirst(Configuration config,
boolean asInMemory)
Adds a child configuration to the start of the collection and optionally makes it the in-memory
configuration.
|
void |
AbstractConfiguration.append(Configuration c)
Appends the content of the specified configuration to this configuration.
|
static void |
ConfigurationUtils.append(Configuration source,
Configuration target)
Append all properties from the source configuration to the target configuration.
|
static void |
ConfigurationUtils.append(ImmutableConfiguration source,
Configuration target)
Append all properties from the source configuration to the target configuration.
|
static Configuration |
ConfigurationUtils.cloneConfiguration(Configuration config)
Clones the given configuration object if this is possible.
|
boolean |
StrictConfigurationComparator.compare(Configuration a,
Configuration b)
Compare two configuration objects.
|
boolean |
ConfigurationComparator.compare(Configuration a,
Configuration b)
Compare two configuration objects.
|
static HierarchicalConfiguration<?> |
ConfigurationUtils.convertToHierarchical(Configuration conf)
Converts the passed in configuration to a hierarchical one.
|
static HierarchicalConfiguration<?> |
ConfigurationUtils.convertToHierarchical(Configuration conf,
ExpressionEngine engine)
Converts the passed in
Configuration object to a hierarchical one using the specified
ExpressionEngine . |
void |
AbstractConfiguration.copy(Configuration c)
Copies the content of the specified configuration into this configuration.
|
static void |
ConfigurationUtils.copy(Configuration source,
Configuration target)
Copy all properties from the source configuration to the target configuration.
|
static void |
ConfigurationUtils.copy(ImmutableConfiguration source,
Configuration target)
Copy all properties from the source configuration to the target configuration.
|
static void |
ConfigurationUtils.dump(Configuration configuration,
PrintStream out)
Dump the configuration key/value mappings to some ouput stream.
|
static void |
ConfigurationUtils.dump(Configuration configuration,
PrintWriter out)
Dump the configuration key/value mappings to some writer.
|
static void |
ConfigurationUtils.enableRuntimeExceptions(Configuration src)
Enables runtime exceptions for the specified configuration object.
|
static Map<Object,Object> |
ConfigurationConverter.getMap(Configuration config)
Convert a Configuration class into a Map class.
|
static Properties |
ConfigurationConverter.getProperties(Configuration config)
Convert a Configuration class into a Properties class.
|
boolean |
DynamicCombinedConfiguration.removeConfiguration(Configuration config)
Removes the specified configuration from this combined configuration.
|
void |
CompositeConfiguration.removeConfiguration(Configuration config)
Remove a configuration.
|
boolean |
CombinedConfiguration.removeConfiguration(Configuration config)
Removes the specified configuration from this combined configuration.
|
void |
BaseConfigurationXMLReader.setConfiguration(Configuration conf)
Sets the configuration to be processed.
|
static void |
SystemConfiguration.setSystemProperties(Configuration systemConfig)
Set System properties from a configuration object.
|
static String |
ConfigurationUtils.toString(Configuration configuration)
Get a string representation of the key/value mappings of a configuration.
|
static ImmutableConfiguration |
ConfigurationUtils.unmodifiableConfiguration(Configuration c)
Creates an
ImmutableConfiguration from the given Configuration object. |
| Constructor and Description |
|---|
BaseConfigurationXMLReader(Configuration conf)
Creates a new instance of
BaseConfigurationXMLReader and sets the configuration object to be parsed. |
CompositeConfiguration(Configuration inMemoryConfiguration)
Creates a CompositeConfiguration object with a specified in-memory configuration.
|
CompositeConfiguration(Configuration inMemoryConfiguration,
Collection<? extends Configuration> configurations)
Creates a CompositeConfiguration with a specified in-memory configuration, and then adds the given
collection of configurations.
|
ConfigurationMap(Configuration configuration)
Creates a new instance of a
ConfigurationMap that wraps the specified Configuration instance. |
DataConfiguration(Configuration configuration)
Creates a new instance of
DataConfiguration and sets the wrapped configuration. |
SubsetConfiguration(Configuration parent,
String prefix)
Create a subset of the specified configuration
|
SubsetConfiguration(Configuration parent,
String prefix,
String delimiter)
Create a subset of the specified configuration
|
| Constructor and Description |
|---|
CompositeConfiguration(Collection<? extends Configuration> configurations)
Create a CompositeConfiguration with an empty in memory configuration and adds the collection of configurations
specified.
|
CompositeConfiguration(Configuration inMemoryConfiguration,
Collection<? extends Configuration> configurations)
Creates a CompositeConfiguration with a specified in-memory configuration, and then adds the given
collection of configurations.
|
| Constructor and Description |
|---|
ConfigurationDynaBean(Configuration configuration)
Constructs a new instance of
ConfigurationDynaBean and sets the configuration this bean is associated with. |
ConfigurationDynaClass(Configuration configuration)
Constructs an instance of a
ConfigurationDynaClass wrapping the specified Configuration instance. |
| Modifier and Type | Method and Description |
|---|---|
protected BasicConfigurationBuilder<? extends Configuration> |
CombinedConfigurationBuilderProvider.createBuilder(ConfigurationDeclaration decl,
Collection<BuilderParameters> params)
Creates a new, uninitialized instance of the builder class managed by this provider.
|
protected BasicConfigurationBuilder<? extends Configuration> |
BaseConfigurationBuilderProvider.createBuilder(ConfigurationDeclaration decl,
Collection<BuilderParameters> params)
Creates a new, uninitialized instance of the builder class managed by this provider.
|
protected Collection<ConfigurationBuilder<? extends Configuration>> |
CombinedConfigurationBuilder.getChildBuilders()
Returns a collection with the builders for all child configuration sources.
|
ConfigurationBuilder<? extends Configuration> |
MultiFileConfigurationBuilderProvider.getConfigurationBuilder(ConfigurationDeclaration decl)
Returns the builder for the configuration source managed by this provider.
|
ConfigurationBuilder<? extends Configuration> |
ConfigurationBuilderProvider.getConfigurationBuilder(ConfigurationDeclaration decl)
Returns the builder for the configuration source managed by this provider.
|
ConfigurationBuilder<? extends Configuration> |
BaseConfigurationBuilderProvider.getConfigurationBuilder(ConfigurationDeclaration decl)
Returns the builder for the configuration source managed by this provider.
|
ConfigurationBuilder<? extends Configuration> |
CombinedConfigurationBuilder.getNamedBuilder(String name)
Returns the configuration builder with the given name.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
CombinedConfigurationBuilder.registerConfiguredLookups(HierarchicalConfiguration<?> defConfig,
Configuration resultConfig)
Processes custom
Lookup objects that might be declared in the definition configuration. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
BaseConfigurationBuilderProvider.configureBuilder(BasicConfigurationBuilder<? extends Configuration> builder,
ConfigurationDeclaration decl,
Collection<BuilderParameters> params)
Configures a newly created builder instance with its initialization parameters.
|
| Modifier and Type | Class and Description |
|---|---|
class |
PropertyListConfiguration
NeXT / OpenStep style configuration.
|
class |
XMLPropertyListConfiguration
Property list file (plist) in XML FORMAT as used by Mac OS X (http://www.apple.com/DTDs/PropertyList-1.0.dtd).
|
| Modifier and Type | Method and Description |
|---|---|
Configuration[] |
ConfigurationPropertiesFactoryBean.getConfigurations() |
| Modifier and Type | Method and Description |
|---|---|
void |
ConfigurationPropertiesFactoryBean.setConfigurations(Configuration... configurations)
Set the commons configurations objects which will be used as properties.
|
| Constructor and Description |
|---|
ConfigurationPropertiesFactoryBean(Configuration configuration) |
ConfigurationPropertySource(String name,
Configuration source) |
| Modifier and Type | Class and Description |
|---|---|
class |
AppletConfiguration
A configuration wrapper to read applet parameters.
|
class |
ServletConfiguration
A configuration wrapper around a
ServletConfig . |
class |
ServletContextConfiguration
A configuration wrapper to read the initialization parameters of a servlet context.
|
class |
ServletFilterConfiguration
A configuration wrapper around a
FilterConfig . |
class |
ServletRequestConfiguration
A configuration wrapper to read the parameters of a servlet request.
|
Copyright © 2001–2022 The Apache Software Foundation. All rights reserved.


Toggle navigation
$server
#foreach($navigationLink in $navigationBar)
$navigationLink.Name
#end
#foreach($alert in $alerts)
×
$alert.Message
#end
#foreach($channel in $channels)
$channel.Name
#end
#foreach($channel in $channels)
#end


Super simple repository readme generator made with Vue.js, that allows you to create beautiful README.md files for your repository that you can copy or paste or download.
What is a Repository Readme? Check out this repository as example.
Markdown Tips:
**word**
)*word*
)~~word~~
)[link](https://example.com)
)![alt-text](/path/image.png)
)Learn more: https://guides.github.com/features/mastering-markdown/
GitHub username required for API
Repository required for API


HTML and CSS are both used to write up a webpage. They are static in the sense they build and format the page as you see it. When looking at how all three languages build the page, HTML is used to write what it is, CSS is what it looks like and JavaScript defines what it does. JavaScript is an interactive script that creates active commands for the page to allow you to programme a response or action. For example, if someone clicks or hovers over a certain section of the page, JavaScript can be used to follow some more rules to interact on the page.
The browser will run one instruction or line of Javascript code at a time. Control Flow is the sequence in which these instructions are read and shown. The Javascript code will operate in a consecutive order until the code instructs otherwise. Loops instruct the code to be repeatidly read and operate a certain command until it moves to the next instruction.
We can use the example of brushing your teeth understand how control flow and loops work better. Here are a set of rules for someone to follow to clean their teeth. The person will need to start with the first instruction, entering the bathroom, and work through each of these until they reach a stage where the flow of control will loop. At this point the person will need to repeatidly brush each of their teeth until they are all clean. At which point they will carry on going through the instructions.
Arrays and objects store information, or data used for instructing a command. Arrays are listed so to access the data from an Array, a person needs to instruct the browser to access it from what number it is, where it is placed within the list. It is important to remember the first array is listed at zero, so to access data from the 12th array, you need to requestion array[11].
Data and information are stored inside objects with labels. To access this information someone needs to know the label.
A function is a statement that performs a task. The function is named and contains specific information for the task to happen. Functions are useful as once they have been defined, they can be invoked, call or executed at any stage by simply writing the name of the function. They create useful shortcuts for a particular action to be used!


Using R, rCharts, and NVD3 to Visualize Cancer Rates in the US
- This post is an explanation on how I created the graphs here.
- It is assumed that basic knowledge of R is known.
Our goal is to create an interactive graph of cancer rates in the United States.
There are 12 years worth of data available from the Centers of Disease Control and Prevention, and it can be obtained here. The data is broken up into multiple files, depending on the variables of interest. We will be using the file BYSITE.txt
to compare sites (types of cancer), and the file BYAGE.txt
to compare age groups.
After downloading the data, we need to load it into R. We also need to load the packages we will be using. We will be using dplyr to process the data, rCharts to create the graphs, and RColorBrewer for pretty colors.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
library(dplyr)
library(rCharts)
library(RColorBrewer)
site_data <- read.table("BYSITE.TXT",
sep = '|',
header = TRUE,
stringsAsFactors = FALSE)
age_data <- read.table("BYAGE.TXT",
sep = '|',
header = TRUE,
stringsAsFactors = FALSE)
names(age_data) <- tolower(names(age_data))
names(site_data) <- tolower(names(site_data))
We now need to transform the data into a format acceptable for rCharts. rCharts connects to JavaScript libraries that utilize D3.js. The JavaScript library we will be connecting to is NVD3.
Our first task is to create a graph where the x-axis is time (1999 to 2011), the y-axis is rate of cancer, and different colored lines represent different types of cancer. Therefore, we want 3 columns: year, cancer rate, and type of cancer. The number of rows will be equal to the number of combinations between year and type of cancer.
Since there are so many types of cancer, we will subset our data to include only the types that are most prevalent (highest rate). It is easy to see that the top 5 cancer types were the same for both 1999 and 2011.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Change year to 2011 to see how they compare.
site_data %>%
filter(year == "1999",
sex == "Male and Female",
race == "All Races",
event_type == "Incidence",
count != "~",
count != "-",
count != ".") %>%
mutate(rate = (as.integer(count) / as.integer(population)) * 1e5) %>%
arrange(rate) %>%
select(year,
site) %>%
tail(7)
Now we will subset our data based on those 5 cancer types, and also prepare our data for rCharts. We will include “All Cancer Sites Combined” for comparison purposes.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
sites <- c("Respiratory System",
"Digestive System",
"Prostate",
"Female Breast",
"Male Genital System",
"All Cancer Sites Combined")
c1 <- site_data %>%
filter(site %in% sites
year != "2007-2011",
sex == "Male and Female",
race == "All Races",
event_type == "Incidence",
count != "~",
count != "-",
count != ".",) %>%
mutate(rate = (as.integer(count) / as.integer(population)) * 1e5) %>%
select(year,
site,
rate)
c1$rate <- round(c1$rate,
digits = 2)
Now that our data is in the format we wanted, we can move on to creating the graph. We will first use rChart’s nPlot
function to generate an NVD3 object. We will then call specific functions from this object to customize things on our graph.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Creating the NVD3 object.
n1 <- nPlot(norm_count ~ year,
data = c1,
group = "site",
type = "lineChart")
# Cleaning up the axes.
n1$yAxis(showMaxMin = FALSE,
axisLabel = "Rate (per 100,000)",
width = 47)
n1$xAxis(axisLabel = "Year")
# Setting up which features are selected by default.
disable_these <- unique(c1$site) == "All Cancer Sites Combined"
n1$set(disabled = disable_these)
# Changing the color of the lines.
n1$chart(color = c("black",
brewer.pal(5, "Dark2")))
# Customizing the tooltip when you hover over an observation.
n1$chart(tooltipContent = "#! function(key, x, y){
return '
' + key + '
' +
'
' + y + ' per 100,000 diagnosed in ' + x + '
'
} !#")
If you are using RStudio, you can just type n1
to view and interact with the graph. Or, you can save the graph as an html file, which allows you to view and interact with it in a browser. Saving it as an html file also makes it easy to put it on a website.
You can also easily embed the graph into an R Markdown document, or publish it for free on RPubs or Gist.
Information on how to do these things is available on the documentation for rCharts.
Creating a graph comparing genders is very similar to what we did above. We first use dplyr to process the data into the format we need.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
c2 <- site_data %>%
filter(site == "All Cancer Sites Combined",
year != "2007-2011",
race == "All Races",
event_type == "Incidence",
count != "~",
count != "-",
count != ".") %>%
mutate(rate = (as.integer(count) / as.integer(population)) * 1e5) %>%
select(year,
sex,
rate)
c2$rate <- round(c2$rate,
digits = 2)
Now we use rCharts to create and customize our graph.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Creating the NVD3 object.
n2 <- nPlot(norm_count ~ year,
data = c2,
group = "sex",
type = "lineChart")
# Cleaning up the axes.
n2$yAxis(showMaxMin = FALSE,
axisLabel = "Rate (per 100,000)",
width = 47)
n2$xAxis(axisLabel = "Year")
# Setting up which features are selected by default.
disable_these <- unique(c2$sex) == "Male and Female"
n2$set(disabled = disable_these)
# Changing the color of the lines.
n2$chart(color = c("hotpink",
"blue",
"black"))
# Customizing the tooltip when you hover over an observation.
n2$chart(tooltipContent = "#! function(key, x, y){
return '
' + key + '
' +
'
' + y + ' per 100,000 diagnosed in ' + x + '
'
} !#")
Creating a graph to compare races is almost exactly the same as the above code. Just replace “sex” with “race”. Creating a graph that compares age, though, is a bit more tricky. There are some issues with the way R sorts the age column. We have to force factor levels on the age variable to make sure everything is sorted correctly. This is kind of tedious, but it works.
1
2
3
4
5
6
age_data$age <- factor(age_data$age,
levels = c("<1", "1-4", "5-9", "10-14", "15-19", "20-24",
"25-29", "30-34", "35-39", "40-44", "45-49",
"50-54", "55-59", "60-64", "65-69", "70-74",
"75-79", "80-84", "85+"),
ordered = TRUE)
Now we can move on to using dplyr and rCharts, and everything comes out as expected.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
c4 <- age_data %>%
filter(site == "All Cancer Sites Combined",
year != "2007-2011",
sex == "Male and Female",
race == "All Races",
event_type == "Incidence",
count != "~",
count != "-",
count != ".",) %>%
mutate(rate = (as.integer(count) / as.integer(population)) * 1e5) %>%
select(year,
age,
rate) %>%
arrange(year,
age)
c4$rate <- round(c4$rate,
digits = 2)
# Creating the NVD3 object.
n4 <- nPlot(rate ~ age,
data = c4,
group = "year",
type = "multiBarChart")
# Cleaning up the axes.
n4$yAxis(showMaxMin = FALSE,
axisLabel = "Rate (per 100,000)",
width = 47,
tickFormat = "#! function(d) {return d} !#")
n4$xAxis(showMaxMin = FALSE,
axisLabel = "Age")
# Setting up which features are selected by default.
keep_these <- unique(c4$year) == "2011"
n4$set(disabled = !keep_these)
# Changing the color of the lines.
n4$chart(color = colorRampPalette(brewer.pal(8, "Dark2"))(13))
# Customizing the tooltip when you hover over an observation.
n4$chart(tooltipContent = "#! function(key, x, y){
return '
' + x + '
' +
'
' + y + ' per 100,000 diagnosed in ' + key + '
'
} !#")
I would like to end this post by thanking Ramnath Vaidyanathan for all the work he has put into rCharts.


Your computer has been locked
Your computer with the IP address has been infected by the Virus RDN/Backdoor.trojan! - Because System Activation KEY has expired & Your information (for example passwords, messages, and credit cards) have been stolen. Call the Technical Support number to protect your files and identity from further damage.
Call:


COVID
Information center
Virtual Assistant
Mapping
Live Updates
Information/ Resources
Copyright 2021 SacHacks Team Died Omega


MBThreadsafeCache(ForSubclassEyesOnly) Category Reference
| Declared in | MBThreadsafeCache+Subclassing.h |
|---|
Overview
The class extensions in this header file are intended for internal use only by
MBThreadsafeCache
implementations.
Code external to MBThreadsafeCache
should never call these methods directly.
Acquiring the memory cache
– internalCache
Returns the internal NSMutableDictionary
where in-memory cached objects are
stored.
- (nonnull NSMutableDictionary *)internalCache
Discussion
Note: The cache is locked when this method is called by the
MBThreadsafeCache
superclass implementation; subclasses that call
this method directly or perform mutations on the returned
dictionary must only do so when the cache is locked.
Declared In
MBThreadsafeCache+Subclassing.h
Accessing cached items
– internalIsKeyInCache:
Called internally to determine whether a given key has a corresponding value in the cache.
- (BOOL)internalIsKeyInCache:(nonnull id)key
Parameters
key |
The key. |
|---|
Return Value
YES
if there is a value for the given key in the cache; NO
otherwise.
Discussion
Note: The cache is locked when this method is called by the
MBThreadsafeCache
superclass implementation; subclasses that call
this method directly must only do so when the cache is locked.
Declared In
MBThreadsafeCache+Subclassing.h
– internalObjectForKey:
Called internally to retrieve a cached object value given its key.
- (nullable id)internalObjectForKey:(nonnull id)key
Parameters
key |
The key whose associated value is to be retrieved. |
|---|
Return Value
The value associated with key
. May be nil
.
Discussion
Note: The cache is locked when this method is called by the
MBThreadsafeCache
superclass implementation; subclasses that call
this method directly must only do so when the cache is locked.
Declared In
MBThreadsafeCache+Subclassing.h
Modifying the cache
– internalSetObject:forKey:
Called internally to set a cached object value and associates it with the given key.
- (void)internalSetObject:(nonnull id)obj forKey:(nonnull id)key
Parameters
obj |
The new cached value. |
|---|---|
key |
The key whose associated value is to be set. |
Discussion
Note: The cache is locked when this method is called by the
MBThreadsafeCache
superclass implementation; subclasses that call
this method directly must only do so when the cache is locked.
Declared In
MBThreadsafeCache+Subclassing.h
– internalRemoveObjectForKey:
Called internally to remove from the cache the object associated with the given key.
- (void)internalRemoveObjectForKey:(nonnull id)key
Parameters
key |
The key whose associated value is to be removed. |
|---|
Discussion
Note: The cache is locked when this method is called by the
MBThreadsafeCache
superclass implementation; subclasses that call
this method directly must only do so when the cache is locked.
Declared In
MBThreadsafeCache+Subclassing.h
– internalClearMemoryCache
Called internally to empty the in-memory object cache.
- (void)internalClearMemoryCache
Discussion
Depending on how the cache instance was initialized, this method may be called automatically in response to memory warnings.
Note: The cache is locked when this method is called by the
MBThreadsafeCache
superclass implementation; subclasses that call
this method directly must only do so when the cache is locked.
Declared In
MBThreadsafeCache+Subclassing.h


Android Orma
Orma is an ORM (Object-Relation Mapper) for Android SQLiteDatabase, generating helper classes at compile time with annotation processing, inspired in ActiveAndroid, GreenDAO, and Realm.
The interface of Orma is very simple and easy to use, as the author respects the Larry Wall's wisdom:
Easy things should be easy, and hard things should be possible -- Larry Wall
Table of Contents
- Table of Contents
- Motivation
- Requirements
- Getting Started
- Synopsis
- The Components
- Details of Database Handles
- Details of Models
- Associations
- Type Adapters
- Raw Queries
- Migration
- DataSet Changed Events
- Cooperation with Serialization Libraries
- Example
- Benchmark
- Method Count
- FAQ
- Support
- Licenses in Runtime Dependencies
- Contribution
- Release Engineering for Maintainers
- See Also
- Authors and Contributors
- License
Motivation
There are already a lot of ORMs. Why I have to add another wheel?
The answer is that I need ORM that have all the following features:
- Fast as hand-written code
- POJO models
- Model classes should have no restriction
- Might implement
Parcelable
and/or extend any classes - They should be passed to another thread
- A database handle must be an object instance
- Not a singleton class
- Not a static-method based class
- Easy migration
- Some
ALTER TABLE
, e.g.add column
anddrop column
, should be detectd and processed - There is a wheel in Perl: SQL::Translator::Diff
- Some
- Code completion friendly
-
db.selectFromModel()
is better thannew Select(Model.class)
-
- Custom raw queries are sometimes inevitable
GROUP BY ... HAVING ...
SELECT max(value), min(value), avg(value), count(value) FROM ...
And now they are what Orma has.
Requirements
- JDK 8 (1.8.0_66 or later) to build
- Android API level 15 to use
Getting Started
Declare dependencies to use Orma and its annotation processor.
dependencies {
annotationProcessor 'com.github.gfx.android.orma:orma-processor:4.0.0'
compile 'com.github.gfx.android.orma:orma:4.0.0'
}
NOTE: if you use Android Gradle Plugin before 2.2.0, you must use android-apt plugin instead of annotationProcessor
configuration.
Synopsis
First, define model classes annotated with @Table
, @Column
, and @PrimaryKey
and run the Build APK command to generate helper classes.
package com.github.gfx.android.orma.example;
import com.github.gfx.android.orma.annotation.Column;
import com.github.gfx.android.orma.annotation.PrimaryKey;
import com.github.gfx.android.orma.annotation.Table;
import android.support.annotation.Nullable;
@Table
public class Todo {
@PrimaryKey
public long id;
@Column(indexed = true)
public String title;
@Column
@Nullable // allows NULL (default: NOT NULL)
public String content;
@Column
public long createdTimeMillis;
}
Second, instantiate a database handle OrmaDatabase
, which is generated by orma-processor
.
Here is an example to configure OrmaDatabase
:
// See OrmaDatabaseBuilderBase for other options.
OrmaDatabase orma = OrmaDatabase.builder(context)
.build();
Then, you can create, read, update and delete models via OrmaDatabase
:
Todo todo = ...;
// create
orma.insertIntoTodo(todo);
// prepared statements with transaction
orma.transactionSync( -> { // or transactionAsync() to execute tasks in background
Inserter<Todo> inserter = orma.prepareInsertIntoTodo();
inserter.execute(todo);
});
// read
orma.selectFromTodo()
.titleEq("foo") // equivalent to `where("title = ?", "foo")`
.executeAsObservable() // first-class RxJava interface
.subscribe(...);
// update
orma.updateTodo()
.titleEq("foo")
.content("a new content") // to setup what are updated
.execute();
// delete
orma.deleteFromTodo()
.titleEq("foo")
.execute();
Note that Orma aborts if writing occurs on main thread in debug build.
Use background threads for writing or RxJava interfaces with Schedulers.io()
.
Otherwise you can disable this behavior:
OrmaDatabase orma = OrmaDatabase.builder(context)
.writeOnMainThread(BuildConfig.DEBUG ? AccessThreadConstraint.WARNING : AccessThreadConstraint.NONE)
.build();
The Components
Database Handles
A database handle, named OrmaDatabase
by default, is generated by orma-processor
, which is an entry point of all the high-level database operations.
This is typically used as a singleton instance and you don't need to manage its lifecycle. That is, you don't need to explicitly close it.
Models
A model in Orma is a Java class that is annotated with @Table
, which
has at least one column, a field annotated with @Column
or @PrimaryKey
.
orma-processor
generates helper classes for each model:
Schema
, Relation
, Selector
, Updater
, and Deleter
.
Because these helper classes are generated at the compile time, you can use Orma as a type-safe ORM.
Schema Helpers
A Schema helper, e.g. Todo_Schema
, has metadata for the corresponding model.
This is an internal helper class and not intended to be employed by users.
Relation Helpers
A Relation helper, e.g. Todo_Relation
, is an entry point of table operations, which has conditions and orderings.
This is created by a database handle:
public static Todo_Relation relation() {
return orma.relationOfTodo();
}
And is able to create Selector
, Updater
, Deleter
, and Inserter
for the model.
Todo_Relation todos = orma.relationOfTodo();
todos.selector().toList(); // Todo_Selector
todos.updater().content("foo").execute(); // Todo_Updater
todos.inserter().execute(todo); // Inserter<Todo>
todos.deleter().execute(); // Todo_Deleter
This can be a subset of a table which has ORDER BY
clauses and WHERE
clauses with some List
-like methods:
Todo_Relation todos = orma.relationOfTodo()
.doneEq(false) // can have conditions
.orderByCreatedTimeMillis(); // can have orders
// List-like features:
int count = todos.count();
Todo todo = todos.get(0);
// Convenience utilities
int position = todos.indexOf(todo);
todos.deleteWithTransactionAsObservable()
.subscribeOn(Schedulers.io())
.observeOn(AndroidSchedulers.mainThread())
.subscribe(position -> {
notifyItemRemoved(position); // assumes Adapter#notifyItemRemoved()
})
todos.truncateWithTransactionAsObservable()
.subscribeOn(Schedulers.io())
.subscribe();
// Todo_Relation implements Iterable<Todo>
for (Todo todo : todos) {
// ...
}
Selector Helpers
A Selector
helper, e.g. Todo_Selector
, is created by a Relation
:
Todo_Selector selector = relation().selector();
// or orma.selectFromTodo();
This is a query builder for SELECT ... FROM *
statements.
Updater Helpers
An Updater
helper, e.g. Todo_Updater
, is created by a Relation
:
Todo_Updater updater = relation().updater();
// or orma.updateTodo();
This is a query builder for UPDATE *
statements.
Deleter Helpers
A Deleter
helper, e.g. Todo_Deleter
, is created by a Relation
:
Todo_Deleter deleter = relation().deleter();
// or orma.deleteFromTodo();
This is a query builder for DELETE FROM *
statements.
Query Helper Methods
There are Query Helpers which are generated to query conditions and orders in a type-safe way.
For example, titleEq()
shown in the synopsis section, are generated to help make WHERE
and ORDER BY
clauses,
for Relation
, Selecotr
, Deleter
, and Updater
.
Most of them are generated for columns with indexed = true
, and some are for @PrimaryKey
columns.
List of Query Helper Methods
Here is a list of Query Helpers that are generated for all the indexed
columns, where *
is a column name pladeholder:
| Method | SQL |
|---|---|
*Eq(value) |
* = value |
*NotEq(value) |
* <> value |
*In(values) |
* IN (values) |
*NotIn(values) |
* NOT IN (values) |
The following are generated for @Nullable
columns.
| Method | SQL |
|---|---|
*IsNull() |
* IS NULL |
*IsNotNull() |
* IS NOT NULL |
The following are generated for numeric columns
(i.e. byte
, short
, int
, long
, float
, double
, and their corresponding box types)
| Method | SQL |
|---|---|
*Lt(value) |
* < value |
*Le(values) |
* <= value |
*Gt(value) |
* > value |
*Ge(value) |
* >= value |
*Between(a, b) |
* BETWEEN a AND b |
And ORDER BY
helpers:
| Method | SQL |
|---|---|
orderBy*Asc() |
ORDER BY * ASC |
orderBy*Desc() |
ORDER BY * DESC |
How to Control Generation of Query Helpers
This is an advanced setting for those who know what they do.
You can control which Query Helpers are generater for a column by @Column(helpers = ...)
attribute:
@Column(
helpers = Column.Helpers.AUTO // default to AUTO
)
Here are the definition of options defined in Column.java:
long AUTO = -1; // the default, a smart way
long NONE = 0;
long CONDITION_EQ = 0b01;
long CONDITION_NOT_EQ = CONDITION_EQ << 1;
long CONDITION_IS_NULL = CONDITION_NOT_EQ << 1;
long CONDITION_IS_NOT_NULL = CONDITION_IS_NULL << 1;
long CONDITION_IN = CONDITION_IS_NOT_NULL << 1;
long CONDITION_NOT_IN = CONDITION_IN << 1;
long CONDITION_LT = CONDITION_NOT_IN << 1;
long CONDITION_LE = CONDITION_LT << 1;
long CONDITION_GT = CONDITION_LE << 1;
long CONDITION_GE = CONDITION_GT << 1;
long CONDITION_BETWEEN = CONDITION_GE << 1;
long CONDITIONS = CONDITION_EQ | CONDITION_NOT_EQ | CONDITION_IS_NULL | CONDITION_IS_NOT_NULL
| CONDITION_IN | CONDITION_NOT_IN
| CONDITION_LT | CONDITION_LE | CONDITION_GT | CONDITION_GE | CONDITION_BETWEEN;
long ORDER_IN_ASC = CONDITION_BETWEEN << 1;
long ORDER_IN_DESC = ORDER_IN_ASC << 1;
long ORDERS = ORDER_IN_ASC | ORDER_IN_DESC;
long ALL = CONDITIONS | ORDERS;
The Inserter Helpers
This is a prepared statement for INSERT INTO ...
for bulk insertions.
Inserter<Todo> inserter = relation().inserter();
// or orma.insertIntoTodo()
inserter.execute(todo);
inserter.executeAll(todos);
Details of Database Handles
The section describes the details of database handles.
Configuration of Database Handles
The database class is configured by the @Database
annotation:
@Database(
databaseClassName = "OrmaDatabase", // default to "OrmaDatabase"
includes = { /* ... */ } // Give model classes to handle
excludes = { /* ... */ } // Give model classes not to handle
)
public class DatabaseConfiguration { }
The annotated class is not used for now, but the package is used to place the OrmaDatabase class.
Database Handle Builders
OrmaDatabase.builder(Context)
returns a builder isntance, which
has configure the database handle instance:
| Method | Description | Default |
|---|---|---|
name(String) |
The filename of SQLite DB | "${package}.orma.db" |
migrationEngine(MigrationEngine) |
Custom migration engine | OrmaMigration |
writeAheadLogging(boolean) |
SQLite WAL flag | true |
foreignKeys(boolean) |
SQLite FOREIGN_KEYS flag | true |
migrationStep(int, ManualStepMigration.Step) |
A migration step | none |
trace(boolean) |
Output executed queries to logcat if true | dynamic (*1) |
readOnMainThread(AccessThreadConstraint) |
Check read operation on main thread | dynamic (*2) |
writeOnMainThread(AccessThreadConstraint) |
Check write operation on main thread | dynaimc (*3) |
-
*1
BuildConfig.DEBUG ? true : false
-
*2
BuildConfig.DEBUG ? WARN : NONE
-
*3
BuildConfig.DEBUG ? FATAL : NONE
Details of Models
The section describes the details of model definition.
Setters and Getters
Orma can use getters and setters if columns have corresponding methods.
You can also connect getters and setters with @Getter
and @Setter
respectively, which tells orma-processor
to use accessors.
Each accessor name can have a column name in SQLite databases, which is inferred from its method name if omitted.
@Table
public class KeyValuePair {
static final String kKey = "Key";
@Column(kKey) // specifies the name
private String key;
@Column // omits the name
private String value;
@Getter(kKey)
public String getKey() {
return key;
}
@Setter(kKey)
public void setKey(String key) {
this.key = key;
}
// used as a getter for the "value" column
// @Getter is optional in this case
public String getValue() {
return value;
}
// used as a setter for the "value" column
// @Setter is optional in this case
public void setValue(String value) {
this.value = value;
}
}
Immutable Models
Immutable models, where all the fields are declared with final
, are supported
by annotating a constructor with @Setter
.
@Table
public class KeyValuePair {
@Column
public final String key;
@Column
public final String value;
@Setter
KeyValuePair(String key, String value) {
this.key = key;
this.value = value;
}
}
It can be declared with custom names:
@Table
public class KeyValuePair {
static final String kKey = "Key";
static final String kValue = "Value";
@Column(kKey)
public final String key;
@Column(kValue)
public final String value;
KeyValuePair(@Setter(kKey) String key, @Setter(kValue) String value) {
this.key = key;
this.value = value;
}
}
Associations
Two or more Orma models can be associated with association mechanism.
There are two type of associations: has-one and has-many.
In addition, there are another two kind of association supports: indirect associations with SingleAssociation<T>
and direct associations.
Has-One Associations with SingleAssociation<T>
There is SingleAssociation<T>
to support has-one associations, which is
retrieved on demand, or loaded lazily.
For example, a book has a publisher:
@Table
class Publisher {
@PrimaryKey
public long id;
}
@Table
class Book {
@Column
public SingleAssociation<Publisher> publisher;
}
The entity of Book#publisher
is Publisher#id
.
Has-Many Associations with SingleAssociation<T>
Has-many associations are not directly supported but you can define a method to get associated objects:
@Table
class Publisher {
@PrimaryKey
public long id;
public Book_Relation getBooks(OrmaDatabase orma) {
return orma.relationOfBook().publisherEq(this);
}
}
@Table
class Book {
@Column(indexed = true)
public SingleAssociation<Publisher> publisher;
}
Direct Associations
There are direct associations, where an Orma model has another Orma model directly.
Given a has-one
association, Book has-one Publisher
:
@Table
class Publisher {
@PrimaryKey
public long id;
@Column
public String name;
}
@Table
class Book {
@PrimaryKey
public long id;
@column
public String title;
@Column
public Publisher publisher;
}
The corresponding table definition is something like this:
CREATE TABLE `Publisher` (
`id` INTEGER PRIMARY KEY,
`name` TEXT NOT NULL
)
CREATE TABLE `Book` (
`id` INTEGER PRIMARY KEY,
`title` TEXT NOT NULL,
`publisher` INTEGER NOT NULL
REFERENCES `Publisher`(`id`) ON UPDATE CASCADE ON DELETE CASCADE
)
In SQL, Book#publisher
refers Publisher#id
, indicating the two tables
should be joined in SELECT
statements.
In Java, Book#publisher
is a Publisher
instance, which is retrieved in each
SELECT
operations. There is no lazy loading in direct associations.
Limitations in Associations
- There are no methods to query associated models
These issues will be fixed in a future.
Type Adapters
Orma models are able to have embedded objects with type adapters, a.k.a. static type adapters,
by defining classes with @StaticTypeAdapter
annotation.
For example, if you want to embed LatLng in your Orma model, you can define a type adapter like this:
@StaticTypeAdapter(
targetType = LatLng.class, // required
serializedType = String.class // required
)
public class LatLngAdapter {
// SerializedType serialize(TargetType source)
@NonNull
public static String serialize(@NonNull LatLng source) {
return source.latitude + "," + source.longitude
}
// TargetType deserialize(SerializedType serialized)
@NonNull
public static LatLng deserialize(@NonNull String serialized) {
String[] values = serialized.split(",");
return new LatLng(
Double.parseDouble(values[0]),
Double.parseDouble(values[1]));
}
}
@StaticTypeAdapter
requires targetType
and serializedType
options and two static methods SerializedType serialize(TargetType)
and TargetType deserialize(SerializedType)
.
How Serialized Types Used
A @StaticTypeAdapter#serializedType
is bound to an SQLite storage type.
Thus it must be one of the "Java Type" listed the table below, where each "Java Type" has a corresponding "SQLite Type":
| Java Type | SQLite Type |
|---|---|
| int | INTEGER |
| short | INTEGER |
| long | INTEGER |
| boolean | INTEGER |
| float | REAL |
| double | REAL |
| String | TEXT |
| byte[] | BLOB |
@StaticTypeAdapters
for Multiple Serializers at Once
You can also define multiple type serializers to single class with @StaticTypeAdapters
annotation containers:
@StaticTypeAdapters({
@StaticTypeAdapter(
targetType = MutableInt.class,
serializedType = int.class,
serializer = "serializeMutableInt",
deserializer = "deserializeMutableInt"
),
@StaticTypeAdapter(
targetType = MutableLong.class,
serializedType = long.class,
serializer = "serializeMutableLong",
deserializer = "deserializeMutableLong"
)
})
public class TypeAdapters {
public static int serializeMutableInt(@NonNull MutableInt target) {
return target.value;
}
@NonNull
public static MutableInt deserializeMutableInt(int deserialized) {
return new MutableInt(deserialized);
}
public static long serializeMutableLong(@NonNull MutableLong target) {
return target.value;
}
@NonNull
public static MutableLong deserializeMutableLong(long deserialized) {
return new MutableLong(deserialized);
}
}
Built-In Type Adapters
There are built-in type adapters for typically used value objects and collections:
java.math.BigDecimal
java.math.BigInteger
java.nio.ByteBuffer
java.util.Currency
java.util.Date
java.sql.Date
java.sql.Time
java.sql.Timestamp
java.util.UUID
java.util.List<String>
java.util.ArrayList<String>
java.util.Set<String>
java.util.HashSet<String>
android.net.Uri
Raw Queries
For low-level operations, e.g. executing a raw query, you can use
OrmaDatabase#getConnection()
, which returns OrmaConnection
.
For example:
Cursor cursor = db.getConnection().rawQuery("SELECT max(bookId) as max_id, min(bookId) as min_id FROM Book");
cursor.moveToFirst();
// get data from cursor
cursor.close();
NOTE: Don't use rawQuery()
for performance because Orma query builders are fast enough.
Migration
There is a pluggable migration mechanism via the MigrationEngine
interface.
The default migration engine is SchemaDiffMigration
, which handles
schema changes by making diff with old and new DDL stored in sqlite_master
.
That is, you don't need migration steps for the following cases:
- Adding tables
- Adding columns
- Changing column types
- Changing column constraints (
NOT NULL
,UNIQUE
, and etc.)
Of course, you can define migration steps for each schema version (or BuildConfig.VERSION
).
Here is an example to define migration steps:
int VERSION_2; // a past version of VERSION_CODE
OrmaDatabase orma = OrmaDatabase.builder(this)
.migrationStep(VERSION_2, new ManualStepMigration.ChangeStep() {
@Override
public void change(@NonNull ManualStepMigration.Helper helper) {
Log.(TAG, helper.upgrade ? "upgrade" : "downgrade");
helper.execSQL("DROP TABLE foo");
helper.execSQL("DROP TABLE bar");
}
})
// ... other configurations
.build();
See migration/README.md for details.
DataSet Changed Events
NOTE: This is experimental in v4.0.0: its existence, signature or behavior might change without warning from one release to the next.
Relation#createQueryObservable()
can create a event stream to observe data-set changed events for the relation.
This likes SQLBrite's' "Query Observable", whereas Orma's does not notify the initial event.
// NOTE: Keep the observable instance. If it's released, the observable is disposed.
// create a query observable, which is a hot observable
Observable<Author_Selector> observable = db.relationOfAuthor()
.createQueryObservable();
// subscribe the events
observable.flatMap(new Function<Author_Selector, Observable<Author>>() {
@Override
public Observable<Author> apply(Author_Selector selector) throws Exception {
Log.d(TAG, "Author has been changed!");
return selector.executeAsObservable();
}
})
.map(new Function<Author, String>() {
@Override
public String apply(Author author) throws Exception {
return author.name;
}
})
.subscribe(new Consumer<String>() {
@Override
public void accept(String name) throws Exception {
Log.d(TAG, "name: " + name);
}
});
See OrmaListAdapter
and OrmaRecyclerViewAdapter
, which use Query Observables to
trigger #notifyDataSetChanged()
.
Cooperation with Serialization Libraries
Beause Orma reuqires nothing to do to models, serializers, e.g. Android Parcels or GSON, can serialize Orma models.
Example
There is an example app to demonstrate:
- Migration
- Orma with
RecyclerView
/ListView
- Benchmark (see below)
Benchmark
There is a simple benchmark with Realm and hand-written SQLiteDatabase code:
Here is a result performed on Android 6.0.0 / Xperia Z4 as of Orma v3.0.0 and Realm 2.0.2, processing 10 items x 100 times:
I welcome benchmark in another condition and/or another code.
Method Count
Orma runtime is very lightweight: Method Count for v4.0.0
FAQ
Can't build my project.
Check your toolchain. FYI here are my toolchain versions:
- JDK 1.8.0_66
- Android SDK Tools 25 or later
- Android SDK Platform Tools 24 or later
- Android SDK Build Tools 24 or later
- Android Gradle Plugin 2.2.0 or later
How can I enable debug logging on release build?
Call OrmaDatabase.Builder#trace(boolean)
with true
:
OrmaDatabase orma = OrmaDatabase.builder(context)
.trace(true)
.create();
This option also enables logging in the default migration engine.
If you give a custom migration engine to the orma builder, you have to enable
trace
flag to its constructor:
boolean trace = true;
SchemaDiffMigration migration = new SchemaDiffMigration(context, trace);
How can see the generated Java files?
As other annotation processors do, Orma save files to $modle/build/generated/source/apt/
.
You can see generated files for example models.
Does Orma work with Kotlin?
Yes, but it's experimental. Here is an example to use Orma with Kotlin:
https://github.com/gfx/OrmaWithKotlin
NOTE: Kotlin APT support, a.k.a. kapt, is really unstable. Don't ask me how to solve kapt problems.
Does Orma work with the Jack compiler?
Yes. As of Android Gradle Plugin 2.2.2, Orma should work with Jack.
dependencies {
annotationProcessor 'com.github.gfx.android.orma:orma-processor:4.0.0'
compile 'com.github.gfx.android.orma:orma:4.0.0'
}
See https://github.com/gfx/OrmaWithJack for a working example.
When the database handle is opened and closed?
Orma opens the database handle in instantiating OrmaDatabase
, and you don't need to
close it.
In other word, you can define the database handle as a singleton instance in your application scope,
and forget close
.
Who uses Orma?
Here is a list of open-source Androdi apps using Orma which are released to Google Play:
Here is a list of apps using Orma which are proprietary and released to Google Play:
Tell me if your projects use Orma!
Support
- Use GitHub issues for the issue tracker
- Feel free to ask for questions to the author @__gfx__
Licenses in Runtime Dependencies
- https://github.com/ReactiveX/RxJava - Apache Software License 2.0
-
bkiers/sqlite-parser - The MIT License
- The original code of SQLite.g4
Contribution
Patches are welcome!
Release Engineering for Maintainers
./gradlew bumpMajor # or bumpMinor / bumpPatch
git add -va
make publish # run tests, build artifacts, publish to jcenter, and make a tag
Visual Studio Code (a.k.a. vscode) is recommended to edit README.md and CHANGELOG.md. Especially the ToC section is managed by AlanWalk/Markdown-TOC.
See Also
Authors and Contributors
FUJI Goro (gfx).
And contributors are listed here: Contributors
License
Copyright (c) 2015 FUJI Goro (gfx).
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.


You have no collections. To create a new collection, collect projects using the search feature and create a collection from them in the Projects tab or clone an existing collection.
| Name | Description | Creation Date | ID |
|---|---|---|---|
| {{row.name}} | {{row.description}} | {{row.creation_date | date:'short'}} | {{row.id}} |
You have not pinned any collections yet. To pin a collection, click the button next to it in the table below.
| Name | Description | Creation Date | ID | |
|---|---|---|---|---|
| {{row.name}} | {{row.description}} | {{row.creation_date | date:'short'}} | {{row.id}} |
No results found.
| Name | Description | Creation Date | ID | |
|---|---|---|---|---|
| {{row.name}} | {{row.description}} | {{row.creation_date | date:'short'}} | {{row.id}} |


An open-source, secure, web application starter kit.
Base is a seed / starter kit for a modern web application stack, scaffolded out with a baseline level of security.
Built with ReactJS, Flux, Express, and Postgres.
A starter kit and reference implementation for Facebook's ReactJS+Flux.
We love React+Flux and think you will to. Base scaffolds out React components along with related Flux actions and stores, and provides a starter framework for getting a ReactJS front-end chatting with an Express / Postgres back-end.
Secure web application stack using OAuth2.
We wanted a starter kit that scaffolds out a baseline implementation of a modern secure web application.
A light and scalabale Web Server
Express and NodeJS provides a powerful and scalable web stack as a base. Other than this, we don't impose any other framework choice on the server side.
An RDBMS Alternative
MongoDB is a very popular persistent store on the web, and with many good reasons. But we thnk there are many apps out there where an RDBMs is still the most relevant choice. We chose Postgres as a fast, scalable, open source, and well supported RDBMS option.
Features
The Stack:
Gulp + Webpack + React + Flux + Express + Postgres + Passportjs + Bootstrap + Jade + Mocha + Chai.
- React+Flux Scaffolding
- React-router
- WebPack+Gulp
- Postgres
- NodeJS Express web server
Security:
- PassportJS for OAuth2
- Social logins (Google and Facebook)
- HelmetJS for header protection mechanisms
- TLS/SSL By default
- XSS protections
- CSRF protections
- Secure sessions


#primary_host ⇒ String
(rw)
The primary host of the component.
# File 'gems/aws-sdk-ssmsap/lib/aws-sdk-ssmsap/types.rb', line 237
class Component < Struct.new( :component_id, :parent_component, :child_components, :application_id, :component_type, :status, :sap_hostname, :sap_kernel_version, :hdb_version, :resilience, :associated_host, :databases, :hosts, :primary_host, :last_updated, :arn) SENSITIVE = [] include Aws::Structure end


You are now surrounded by open graves and tombstones. One way leads to a large wooden gate and the other leads to the crypt hill.
You spot an open grave
{{ message }}


Graphic designer
Fatima Matar a graghic designer grauduated from LIU in Graphic Design she is
Graphic designer
Fatima Matar a graghic designer grauduated from LIU in Graphic Design she is
Graphic designer
Fatima Matar a graghic designer grauduated from LIU in Graphic Design she is
Graphic designer
Fatima Matar a graghic designer grauduated from LIU in Graphic Design she is
Fatima Matar a graghic designer grauduated from LIU in Graphic Design she is Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Personal Fabrication:
Survey and Roadmap
While fabrication technologies have been in use in industry for several decades, expiring patents have recently allowed the technology to spill over to technology-enthusiastic “makers”. The big question now is whether the technology will further progress towards consumers, which would allow the technology to scale from hundreds of thousands of users to hundreds of millions of users.
Such a transition would enable consumers to use computing not just to process data, but for physical matter. This holds the promise of democratizing a whole range of fields preoccupied with physical objects, from product design to interior design, to carpentry, and to some areas of mechanical and structural engineering. It would bring massive, disruptive change to these industries and their users.
We analyze similar trends in the history of computing that made the transition from industry to consumers, such as desktop publishing and home video editing, and come to the conclusion that such a transition is likely.
Our analysis, however, also reveals that any transition to consumers first requires a hardware + software system that embodies the skills and expert knowledge that consumers lack: (1) hardware and materials that allow fabricating the intended objects, (2) software that embodies domain knowledge, (3) software that embodies the know-how required to operate the machinery, and (4) software that provides immediate feedback and supports interactive exploration. At the same time, sustained success will only be possible if we also consider future implications, in particular (5) sustainability and (6) intellectual property. We argue that researchers in HCI and computer graphics are well equipped for tackling these six challenges. We survey the already existing work and derive an actionable research agenda.


49+ Log Express Goiania Background. Lel express is not the only courier that will deliver your lazada (lex) package. Rápida,ágil, econômica e personalizada os mais diversos.
Cheap flights from istanbul to goiania. Managing director netlog express the bangalore based logistics company saw its genesis in under the able leadership and guidance of its founder and managing director mr arasu built on a wealth of. Express middleware to log, using a configurable logger, each request and response.
Things you view while shopping are saved here.
Things you view while shopping are saved here. Express middleware to log, using a configurable logger, each request and response. Latest news, showbiz, sport, comment, lifestyle, city, video and pictures from the daily express and sunday express newspapers and express.co.uk. Except for lex my(bahasa malaysia), lex th(ไทย), lex sg, lex ph, lex vn(tiếng việt), lex id(bahasa.


Intro to Programming
Stage 0
Important Concepts
The World Wide Web started early in the 1990s and has grown exponentially since then.
The Web consists of HTML documents, where hyperlinks connect the pages like a web.
HTML or hypertext markup language is the code that runs webpages like this one.
When a person goes to a web page like Google, their computer sends an HTTP request to a server.
The server finds the right HTML document, and sends it back to the person's computer to be displayed.
Tags
Tags are bits of HTML code that instruct the computer on what to do.
Many tags have an opening tag and a closing tag, but there are a expections to this rule, such as the
tag for a line break.
Tags tell the computer how an HTML document should look.
Inline or Block elements
Some HTML elements are known as inline because the formatting they create
appears inline with the text. Other elemetns are block elements because they make
an invisible box around the content that is placed inside the tags.

They literally take everything literally.


FParsec-Pipes reference
Default Parsers
%
The default parser for a given value is %value
.
This is implicitly used by several other FParsec-Pipes operators.
For the rest of this document, the phrase "parserish value" will refer to a value that
either is a parser or can be converted to one using %
.
Here is the list of what %
means based on the type given to it.
Note that when given a list of values, %
applies itself to each value in the list then passes the result to choice
.
 This is not useful on its own.
%%
%% parserish
begins a pipeline with a parserish value.
It is equivalent to pipe -- parserish
.
--
myPipe -- parserish
adds a parserish value to a pipeline.
?-
myPipe ?- parserish
adds a parserish value to a pipeline, backtracking the entire pipeline if
anything within myPipe
fails.
-?
myPipe -? parserish
adds a parserish value to a pipeline, backtracking the entire piplime
if myPipe
fails or if parserish
and following values in the pipeline fail without consuming input.
+.
+. parserish
marks a parserish value as captured.
If added to a pipeline, this captured value will need to be consumed by the function passed to -|>
.
-|>
myPipe -|> myFunction
terminates a pipeline with a function consuming the captured outputs of the pipeline.
If the pipeline has no outputs (no captured values), then myFunction
can be of any type, and will be returned
on a successful parse (as if used with preturn
).
-%> auto
myPipe -%> auto
terminates a pipeline which has 1 to 5 captured outputs with a function combining them
into a tuple of the appropriate arity.
Repetition
qty
qty
is an object which can be indexed or sliced into to get a Range
.
qty.[min..max]
qty.[min..max]
indicates that the associated parser should be consumed at least min
and at most max
times.
qty.[..max]
qty.[..max]
indicates that the associated parser should be consumed at least 0 and at most max
times.
qty.[min..]
qty.[min..]
indicates that the associated parser should be consumed at least min
times.
qty.[n]
qty.[n]
indicates that the associated parser should be consumed exactly n
times.
The resulting parser will return an array, not a ResizeArray
.
Range * parserish
range * parserish
consumes parserish
range
times and returns the result as a ResizeArray.
parserish * Range
parserish * range
is equivalent to range * parserish
.
Range / parserish
range / parserish
indicates that the parser that will be consumed range
times should be separated by parserish
.
Range /. parserish
range / parserish
indicates that the parser that will be consumed range
times should be separated by parserish
,
and that a trailing parserish
may occur at the end of the list.


#{docsController.tag.description}
If you add the title
attribute to the card, the title is displayed in a divider, dividing the content placed in the top
facet from content added as a child to the card element. The child elements are added inside a card-section
div, below the divider.
You can create the card with any combination of title, top facet content and child content to create different looking cards.
To fully understand the markup of the Card, please consult the Foundation for Apps Documentation.


Algorithm Visualiser
Select a problem:
Select a problem
Insertion sort
Merge sort
Heapsort
Quicksort
Bubble sort
Select algorithm:
Insertion sort
Merge sort
Heapsort
Quicksort
Bubble sort
Select size:
Run
Reset
Gjert Ingar Gjersund © 2019


Overall structure
Gather community data
Data gathering so far:
- 200 sources across London
- Worked for FACT & Kensington & Chelsea
- Over 50 sites for Hounslow
- ~15 updates a day for the CX office
Presenting data - CX Hub Prototype
Presenting data - CX Hub Prototype
Design process
Interaction design beyond the product: Creating technology-enhanced activity spaces
em>Kaptelinin & Bannon
Quantitative & Qualitative response


1) Select a character to draw from the dropdown menu. Each character is prepended by whether it is a traditional or simplified character.
2) In the center panel you will see what is the next partial character that must be made. Complete your drawing in the Sketchpad to match the partial character.
3) Click "Classify" to get feedback on which character the classifier most recognizes your partial drawing as matching.
4) Click "Next" and repeat steps 2, 3, and 4 until you have drawn a character that matches the Goal panel.
5) Pick a new character from the dropdown menu to practice on that new character.
LogoGuide is a prototype system to help a user learn how to write Chinese logograms. It does so by breaking the character down in stages in order to learn how to draw the character by each stroke. After drawing a step the user can get feedback by running the trained convolutional neural network in order to see how closely it matches to images that have been trained on.
During the MAS.S63 Cognitive Integration course I presented on the system and future directions as I've outlined here:
Chinese Character Assisted Learning PDF


person(1) has plural( NUM, fruit( 0 ) ) for every plural( DENOM, fruit( 1 ) ). Write the ratio of fruit( 0 )s to fruit( 1 )s as a simplified fraction.
NUM / DENOM
Ratios can be written in a few different ways that mean the same thing.
You can express a ratio with a colon separating the two numbers.
NUM:DENOM
You can write it out as a phrase like this.
NUM \text{ to } DENOM
Or, you can express a ratio as a fraction.
\dfrac{NUM}{DENOM}=fractionReduce( NUM, DENOM )
Therefore, fractionReduce( NUM, DENOM )
is the ratio of fruit( 0 )s to fruit( 1 )s written as a simplified fraction.


Information is only usable if it is retrievable. I am interested in how to build user-centric collections, repositories, and systems that promote discoverability and information literacy. As such, my master's studies have focused on metadata, information architecture, and description.
In addition to my studies, I have also sought opportunities that would expose me to diverse use cases and information types. Institutions I was fortunate to work at include an academic library, museum, community archive, and research institute, where I developed a deeper understanding of information-seeking behavior, information management, and practical worflows.
This portfolio showcases my academic and professional achievements, offering a holistic sense of how I would contribute to the library and information science field.
In keeping with the values of equitable information access, this portfolio has been designed with accessible features. To aid users with visual impairments, I ensured high contrast between the text and the background. Hyperlinks are underlined instead of simply being a different color, to ensure color-blind users are able to identify them. For users who use screen readers, each section begins with an HTML header tag, so that they are able to easily navigate pages with the screen reader, and all images have alt-text. More generally, the footer on each page includes a link back to the accessibility statement to ensure users can easily navigate here, and understand what measures have been taken. This website has been run through the Web Accessibility Evaluation Tool to confirm compliance with Web Content Accessibility Guidelines.
The downloadable PDF version of the portfolio is substantively equivalent to the digital portfolio. Items not included in the PDF version include deliverables from UCLA Library Special Collections and the Fowler Museum, which are available in the resume section of the digital portfolio.


About
Parallax or not, this plugin gives lots of feature to work CSS animation on scroll event, given by jQuery.
Download
Features
- Vertical and horizontal scrolling support
- Multiple CSS animations for the same element
- CSS3 Transform (rotate, skew and scale)
- Start CSS animation when specific element appears on screen
- CSS Properties
- top
- right
- bottom
- left
- margin-top
- margin-right
- margin-bottom
- margin-left
- opacity
- font-size
- transform: rotate
- transform: skew
- transform: scale


The TileDB R package offers an R interface to the storage engine of TileDB.
Note that the R interface to TileDB is under development, and the API is subject to change.
Documentation is available for the R package as well as for the TileDB API.
TileDB Embedded needs to be present, and can be installed first (from a package or from source) for the TileDB R package to build and link correctly. Alternatively, if no system installation is found, a precompiled shared library is used during the installation of this R package.
The TileDB R package has been published on CRAN and be installed directly via
> install.packages("tiledb")
as usual.
The most recent released version can be installed from Github using the package remotes.
> if (!requireNamespace("remotes",quietly=TRUE)) install.packages("remotes")
> remotes::install_github("TileDB-Inc/TileDB-R")
...> library(tiledb)
> tiledb_version()
major minor patch2 2 9
> help(package=tiledb)
If the TileDB library is installed in a custom location, you need to pass the explicit path:
> remotes::install_github("TileDB-Inc/TileDB-R",
args="--configure-args='--with-tiledb=/path/to/tiledb'")
Note that the TileDB R package is developed and tested against the latest stable (v2.2.x
) version of TileDB, but should also build against the newest development version.


Many types of components, such as tabs, menus, image galleries, and so on, need the content to render.
Just like built-in browser <select>
expects <option>
items, our <custom-tabs>
may expect the actual tab content to be passed. And a <custom-menu>
may expect menu items.
The code that makes use of <custom-menu>
can look like this:
<custom-menu>
<title>Candy menu</title>
<item>Lollipop</item>
<item>Fruit Toast</item>
<item>Cup Cake</item>
</custom-menu>
…Then our component should render it properly, as a nice menu with given title and items, handle menu events, etc.
How to implement it?
We could try to analyze the element content and dynamically copy-rearrange DOM nodes. That’s possible, but if we’re moving elements to shadow DOM, then CSS styles from the document do not apply in there, so the visual styling may be lost. Also that requires some coding.
Luckily, we don’t have to. Shadow DOM supports <slot>
elements, that are automatically filled by the content from light DOM.
Let’s see how slots work on a simple example.
Here, <user-card>
shadow DOM provides two slots, filled from light DOM:
html run autorun="no-epub" untrusted height=80


After a solid career of 10 years in the telecommunications area, I decided that after the birth of my son, it would be time to change the area and look for new challenges. Since June 2017, I dedicate my free time to study development, contribute to Open Source projects and improve my English. Currently my studies are focused on Front-end, I have as main programming language Javascript but I also have knowledge in Python and I ❤ ReactJS. I keep my personal codes and projects on Github and I have also developed my blog to put my learning into practice by publishing articles on development. I am also the creator of "Vue Theme", theme with more than 50700 installs in the Visual Studio Code editor.
Mário Antônio do Amaral Rodeghiero
Florianópolis, Brazil
Frontend Developer at Nextt
www.mrodeghiero.com
mario.rodeghiero@gmail.com


HOME
ABOUT
AGENCY
NEWS
TEAM
GALLERY
JOURNEY
TOURS
BLOG
CONTACTS
OUR GALLERY
FAQS PAGES
PEOPLE SAY
USERFUL LINKS
PARTNERS
INSURANCE
FAMILY TRAVEL
CONTACT US
TEL: 1-800-234-5678
info@demolink.org


≡
Harikrishnan Balagopal
Software Engineer at IBM Research,
IIT Kanpur Alumnus
home
projects
shaders
coding exercises
about
Audio Visualizer
start


| the faster | the slower | exception thrown or zero elements found | different returned elements |
|---|---|---|---|
Every framework runs in his own iFrame, thus no conflicts can happen.
Tests are run in a neutral environment, no library or framework is included in the main javascript test, to avoid favoritism.
Tests are run against a local copy of this document.


Repo Automation Bots - Monitoring Dashboard
Streaming Live Data
Executions in the last hour
By Automation Bot
Execution Errors
Task Queue Status
By Automation Bot
GitHub Activity
Actions taken in the last hour


Day 1 phonetic variation - notes
Day 2 lecture notes
Day 3 lecture notes
Day 4 lecture notes
Day 5 lecture notes
Day 6 lecture notes
Day 7 lecture notes
Day 8 lecture notes


London police probe Brexit Party’s election fraud claims
by The Associated PressLondon’s Metropolitan police say they are investigating allegations that Brexit Party candidates were offered jobs or peerages if they would agree not to run against Conservative candidates in next month’s election.
Candidate Ann Widdecombe told the BBC she had been offered a role in the next stage of Brexit negotiations if she would step aside. Party leader Nigel Farage alleges that people working for Conservative Prime Minister Boris Johnson told senior party members they could be made peers if they could persuade him to withdraw more of his candidates.
The Conservatives want Brexit Party candidates to stand aside to avoid splitting the pro-Brexit vote.
Police said Saturday they were investigating “two allegations of electoral fraud and malpractice.’’
The Associated Press


Typing Blocker
Prevents you from typing blacklisted words
Add new words to blacklist. One word or comma seprated words
Add word
Current black list
Persisntant mode:
Shutdown on trigger:
Show messege on violantion:
Tolerance:
Apply!


After my last experience, I decided to explore the deep, wide and dangerous ocean of the random-number generation world, with floating-point representations added for flavour.
There are many subleties involved; the number of academics doing detailed stuff here is a good indication that there are many ways to do things and some of them are just plain wrong. And some are just plain good.
(No, not The Plan)
I would do stuff in C, and apply an F95 adaptation layer afterwards. This is because much of the bit-twiddling is easier or even just possible in C and not Fortran. Fortran only needs to be able to call this stuff.
Also, at this point I’m doing integration of the CUBEnu code. Which means testing components while checking that they connect correctly (such as accepting and computing valid values, adding or doing assumptions testing, some basic performance testing, and so on.) Therefore, some testing of the RNGs is required too.
Flang (at least) uses the default rand48() code base. The drand48() source code revealed some old, odd choices in generating pseudo- random numbers. Newer stuff exists, which I remember seeing occasionally. So a web-search engine approach to finding better code than drand48/rand48 would seem obviously the better choice than accepting the (clang/flang/gcc) status quo.
Of course this plan is written backwards.
Starting with Hacker News, I found several references to PCG, and thence the PCG website. I explored the fascinating worlds of numerous PRNG codes, including the testing, definitions of “random”, and so on.
Factoids that testing runs for a month on modern hardware were actually fascinating. Really!
Then, hunt for floating point conversions (both single and double). On Page 4 of Yahoo search, find the relevent references (Lemire, Occil) and thence to the listed Campbell and Downey codes.
OK, so I download the pcg-c-basic-0.9.zip and got it running.
I then got distracted trying to write a Fortran 2003 module. This meant fighting Fortran 2003 ideas of “pure” functions and the contrast with PRNGs which have side-effects by definition. Eventually I developed an F2003-compatible module that successfully calls PCG routines.
It also works under the GCC Fortran Co-Array Fortran language system, which is a bit mind-bending itself. But I get ahead of myself here.
OK, enough fun/distraction. Let’s write a test code, and see if some assumptions hold and which things are faster.
Since this is OpenBSD, we will start with arc4random(). Then, use both the Campbell and Downey methods to convert random bit patterns to REAL(4) and REAL(8). We also count the occurences of 0.0 and 1.0 (hopefully seeing no results of 1.0).
Also, use #ifdef to select the PCG method as it includes the capability to be reproducible. This is important for debugging, reproducibility, and reliability testing. The same code will compile either with PCG or arc4random.
(The following describes the resulting code. I’ve omitted the various missteps and outcome variants that I made in the meantime. Including discovering that the Downey code was for SPARC, then a big-endian machine.)
The Campbell code uses random64()
as the source of random numbers, so I
adopt that for this test program. Then adjust for arc4random:
#ifdef ARC4
uint64_t
random64(void) {
uint64_t x;
arc4random_buf(&x, 8);
return(x);
}
#endif
and for the PCG code:
#ifdef PCG
uint64_t
random64(void) {
static int pcginitialized = 0;
if (!pcginitialized) {
pcg32_srandom( arc4random(), arc4random() );
pcginitialized = 1;
}
return (((uint64_t)pcg32_random() << 32) + (uint64_t)pcg32_random() );
}
#endif
Similarly the Downey code uses random()
so adjust similarly:
#ifdef PCG
long
random(void) {
static int pcginitialized = 0;
if (!pcginitialized) {
pcg32_srandom( arc4random(), arc4random() );
pcginitialized = 1;
}
return pcg32_random();
}
#endif
(random() is arc4random by default on OpenBSD so a separate ARC4 code fragment is not needed.)
The test code is then a series of fragments that calculate a large number (like 10 billion) of pseudo-random floating-point numbers using both the Downey and Campbell methods. We also count the zeros and ones:
startclock(&btime);
nZeros = nOnes = 0;
for (j=0; j< NLOOP; j++)
for (i=0; i< NTEST; i++) {
rcandidate = random_real_64(); !! substitute functions here
if(rcandidate == 0) nZeros++;
if(rcandidate == 1.0) nOnes++;
}
stopclock(&btime, &timeperrand);
printf( REPORT, argv[0], "random_real_64",
nZeros, nOnes, 1e9 * timeperrand, 1e-6 / timeperrand );
And get this kind of result:
./test_rrng.xpcg my_random_float2 zeros 0 ones 0 time_ns 33.25 rate_M 30.08
and
./test_rrng.xarc4 random_real zeros 0 ones 0 time_ns 372.63 rate_M 2.68
This shows the two extremes: the Downey “my_random_float2” based on PCG is much quicker (30 million per second) than the Campbell “random_real” based on Arc4random (2 million per second). This is on my old Penryn.
Now that we have a fairly fast combination of code swiped from the web, let’s integrate it into a package. Let’s use the pcg_basic routines as a model:
...
// pcg32_random()
// pcg32_random_r(rng)
// Generate a uniformly distributed 32-bit random number
uint32_t pcg32_random(void);
uint32_t pcg32_random_r(pcg32_random_t rng);
...
So, add our own (fortran-ish) spellings of the O'Neill/Downey method:
// Downey method for float/double a.k.a. real(4)/real(8)
// od_random_r4()
// od_random_r4_r(rng)
// od_random_r8()
// od_random_r8_r(rng)
float od_random_r4(void);
float od_random_r4_r(pcg32_random_t rng);
double od_random_r8(void);
double od_random_r8_r(pcg32_random_t rng);
And a set of f90 files declaring the C-interface to these. They look like this:
subroutine pcg32_srandom(initstate, initseq) bind(c)
use iso_c_binding
implicit none
integer(C_INT64_T), value :: initstate
integer(C_INT64_T), value :: initseq
end subroutine pcg32_srandom
…and so on.
This will all be available on github eventually.
After the endian-ness crises, where I had to rewrite the bit twiddling bits for Downey, I was led to the notion of calculating [1,2) and subtracting 1. The link given in StackOverflow was stackoverflow 5015133 which led to LD Crocker’s ojrandlib. See the links below.
That too is added to my lib in my own versions for r4 and r8.
Note that this method is much less random at small values, such as less than 0.01 or less than 0.001. By “less random” I mean the mantissa has trailing zeros for small numbers. Which of course is not random. A small value might be 1.1920929e-07, which is 0x1p-23 or 1 “on” bit and 23 “off” bits.
The od_ routine small value might be 2.3952118e-10 or 0x1.075b38p-32, which clearly has more than one bit in the mantissa. Neither method has issues with larger numbers near 1.0.
Another thing to note: the od_ routines never produce 0.0. If you expect that you should see 0.0, prepare to be disappointed. Read the code and explain why it is possible but not observed.
December 2019
GH Mumm Cordon Rouge
Links
Taylor Campbell - Uniform Random Floats
Lee Daniel Crocker - ojrandlib
Allen B Downey - Generating Pseudo-random…
Daniel Lemire - How many floating-point numbers…
Peter Occil - Random Number Generation…
Melissa O'Neill - PCG, A Better Random Number Generator
Walker, Alastair J. - Fast generation of uniformly distributed pseudorandom numbers with floating-point representation. Electronics Letters 10 (1974): 533-534
OpenBSD Numerics Experience - 1 - RNG
OpenBSD Numerics Experience - 2 - RNG floats
OpenBSD Numerics Experience - 3 - FFTW
OpenBSD Numerics Experience - 4 - CAF
OpenBSD Numerics Experience - 5 - MPI Networking
OpenBSD Numerics Experience - 6 - Memory Models
OpenBSD Numerics Experience - 7 - Python Image Display
OpenBSD Numerics Experience - 8 - RNGs, again
OpenBSD Numerics Experience - 9 - Nim
OpenBSD Numerics Experience - A - Graphical Display
OpenBSD Numerics Experience - B - ParaView
OpenBSD Numerics Experience - C - Numerical Debugging
OpenBSD Numerics


Contact Us
Contact us at the following addresses:We look forward to hearing from you.
Test the Chrome Extension
Download My Current VersionInstructions:
How to install the extension:1. Download the zip
2. Extract the zip
3. Go to chrome://extensions/
4. Enable developer mode by checking the box.
5. click "load unpacked extension"
6. load the folder "chrome_extension_popup" you extracted from the zip
7. An Athena icon should appear along with the rest of your chrome extensions.
How to use the extension:8. Go to Accessibility
9. press the Athena extension icon
10. in the small popup, enter a profile url, like:https://rawgit.com/orish88/AUI_Personalization/master/profiles/test_profile1.json
11. Click on the "Click to personalize page" Button.
Test Sites
Run the extension on:BBC
YouTube
Google Search
Athena Accessibility
Aadaptable-ui-personalisation: using: https://rawgit.com/orish88/AUI_Personalization/master/profiles/test_profile5.json


micro
Micro is a fast, instantaneous text editor. If given no parameters, writes data to ~/.micro
micro [file]
Edits the given file


Here's what's new in Release 1.0.4 (13 April 2017):
Bug fixes
PixieDust will now install locally when using Python 3.5 ( #290 ).
Custom chart titles no longer appear twice when rendering Mapbox visualizations ( #262 ).
Enhancements
Added feature for time-series data. For line charts and bar charts, PixieDust now gives users the option to convert any date formatted as a string into a datetime64 value. Visualizations are now rendered properly, including sorting and formatting. ( #278 & #279 ).


Important Dates
| Paper submission: | 24 August 2018 |
| Acceptance notification: | 21 September 2018 |
| Workshop: | 11 November 2018 |
Introduction
Experiment reproducibility and artifact sharing is gradually
becoming a norm for publications at HPC conferences.
However, our recent experience
to reproduce experimental results
during Artifact Evaluation (AE)
also highlighted multiple problems at systems conferences
including PPoPP,
CGO
and Supercomputing.
Ad-hoc experimental workflows, lack of common experimental
methodology and tools, and the ever changing software/hardware
stack all place a heavy burden on evaluators when installing,
running and analyzing complex experiments.
Worse still, even when artifacts (e.g. benchmarks, data sets, models)
are shared, they are typically difficult to customize, port, reuse
and build upon.
ResCuE-HPC is a multidisiplinary workshop bringing together
HPC researchers and practitioners from academia and industry
interested in discussing and developing common experimental
methodologies, customizable workflow frameworks with common
formats and APIs, and portable package managers for
reproducible and reusable HPC.
Our long-term goal is to automate artifact evaluation
at conferences and optimization competitions
such as CLUSTER
and ReQuEST,
substitute rigid and ad-hoc benchmarks with a common software/hardware co-design framework,
and collaboratively solve reproducibility issues in HPC.
We therefore invite position papers (up to 4 pages) presenting novel
or existing practical solutions to:
- automate and unify artifact evaluation at HPC conferences;
- share artifacts (workloads, benchmarks, data sets, models,
tools), workflows and experiments in a portable, customizable
and reusable format;
- automatically and natively install and rebuild all software
dependencies required for shared experimental workflows
on different machines and environments;
- automatically report and visualize experimental
results including interactive articles to assist reproducible
initiative at SC and other conferences and journals;
- continuously validate experiments from the past research
and report/record unexpected behavior (bugs, numerical
instability, variation of empirical results such as execution
time or energy measurements, etc) on new and evolving software and hardware stack;
- establish open repositories of common benchmarks, data
sets and tools to accelerate knowledge exchange between
HPC centers;
- enable universal, customizable and multi-objective autotuning
and co-design of HPC software and hardware in a reproducible
and reusable way;
- unify statistical analysis and predictive
modeling techniques to improve reproducibility of empirical
experimental results.
We also encourage submissions demonstrating practical use-cases
of portable, customizable and reusable HPC workflows by connecting
together existing tools including but not limited to
Spack,
Collective Knowledge,
ReproZip,
EasyBuild,
Common Workflow Language
and many others.
Authors of accepted papers will have an opportunity to introduce
their techniques (10..15 minutes) and then participate
in an open discussion panel at the workshop.
There will be no formal proceedings for the first edition
of this workshop to encourage on-site discussions!
Instead, all ResCuE-HPC authors will be able to participate
in preparation of the ResCuE-HPC report while trying to gradually
converge on a common experimental methodology and possible formats
for workflows and artifact sharing (meta information and API).
We plan to make this report available to reproducibility
and artifact evaluation chairs at the leading HPC, ML and systems conferences
as well as the ACM taskforce on reproducibility where we are founding members.
We hope that ResCuE-HPC workshop will help the community
to gradually converge on a common experimental methodology and possible formats
for workflows and artifact sharing (meta information and API).
This, in turn, should help our community unify and automate
Artifact Evaluation, quickly prototype research ideas
and thus dramatically accelerate development of the next generation
of HPC software and hardware while reusing all prior work.
Important dates
- Paper submission: 24 August 2018
- Acceptance notification: 21 September 2018
- Workshop: 11 November 2018
Check SC18 home page
for registration deadlines and other related information.
Submission
Please follow this link to prepare your submission.
Questions
If you have any questions or comments, don't hesitate to contact workshop organizers!


Table Name: tabPOS Closing Voucher
| Sr | Fieldname | Type | Label | Options |
|---|---|---|---|---|
| 1 | period_start_date |
Date | Period Start Date | |
| 2 | period_end_date |
Date | Period End Date | |
| 3 | column_break_3 |
Column Break | ||
| 4 | posting_date |
Date | Posting Date | |
| 5 | section_break_5 |
Section Break | ||
| 6 | company |
Link | Company | Company |
| 7 | column_break_7 |
Column Break | ||
| 8 | pos_profile |
Link | POS Profile | POS Profile |
| 9 | user |
Link | Cashier | User |
| 10 | section_break_9 |
Section Break | ||
| 11 | payment_reconciliation_details |
HTML | ||
| 12 | section_break_11 |
Section Break | Modes of Payment | |
| 13 | payment_reconciliation |
Table | Payment Reconciliation | POS Closing Voucher Details |
| 14 | section_break_13 |
Section Break | Details | |
| 15 | grand_total |
Currency | Grand Total | |
| 16 | net_total |
Currency | Net Total | |
| 17 | total_quantity |
Float | Total Quantity | |
| 18 | column_break_16 |
Column Break | Taxes | |
| 19 | taxes |
Table | Taxes | POS Closing Voucher Taxes |
| 20 | section_break_12 |
Section Break | Linked Invoices | |
| 21 | sales_invoices_summary |
Table | Sales Invoices Summary | POS Closing Voucher Invoices |
| 22 | section_break_14 |
Section Break | ||
| 23 | amended_from |
Link | Amended From | POS Closing Voucher |
Inherits from frappe.model.document.Document
get_closing_voucher_details (self)
No docs
get_payment_reconciliation_details (self)
No docs
set_invoice_list (self, invoice_list)
No docs
set_mode_of_payments (self, mop)
No docs
set_sales_summary_values (self, sales_summary)
No docs
No docs
Public API
/api/method/erpnext.selling.doctype.pos_closing_voucher.pos_closing_voucher.get_cashiers
erpnext.selling.doctype.pos_closing_voucher.pos_closing_voucher.get_cashiers (doctype, txt, searchfield, start, page_len, filters)
No docs
erpnext.selling.doctype.pos_closing_voucher.pos_closing_voucher.get_company_currency (doc)
No docs
erpnext.selling.doctype.pos_closing_voucher.pos_closing_voucher.get_invoices (filters)
No docs
erpnext.selling.doctype.pos_closing_voucher.pos_closing_voucher.get_mode_of_payment_details (invoice_list)
No docs
erpnext.selling.doctype.pos_closing_voucher.pos_closing_voucher.get_sales_summary (invoice_list)
No docs
erpnext.selling.doctype.pos_closing_voucher.pos_closing_voucher.get_tax_details (invoice_list)
No docs


#1105 James Park, johannesbourg, South Africa Compliments Of The Day, Permit me to introduce myself to you. My name is Dr Bennie Mcarthy,A Top Management Official of one of the finance corporation in johannesbourg south Africa. I came to know about you in my private search for a reliable person/company to handle an important assingment on behalf of my Colleagues and myself.As a matter of fact, I got your information from Miss Natasha Johnson of The International Affairs Department Of The South African Chamber Of Business. Proposition, A German Mr. Wolfgang Schinister, 66 years of age and a prosperous oil\Gold merchant had in our Bank the sum of $35.5million in a domiciliary account. Unfortunately, he was killed in the recent plane crash involving concord AF4590 in Gonesse, France. Efforts had been made by the management of my bank through the German Embassy in johannesburg to contact any of the deceased children but to no avail,as we were made to understand he had no children.Given the skeletal information available to the bank, it has so far been impossible to reach any of the relatives. The situation left for the Management is to declare the deceased account dormant and revert the Amount to trading on behalf of the interest of the Bank. In order to avoid this development, my Colleagues and I now seek your approval to have you stand as a distant relative to Mr.Wolfgang Schinister,so that the money would be released to you. All documents and proofs to enable you get the money will be carefully packaged once we receive your consent on this proposal.I shall Apply for a leave as soon as the funds gets into your reliable account to come to your country for possible sharing and investment opportunity which you will assist me in doing. May I assure you that this is safe and risk-free, as we have taken care of all necessary modalities to ensure a hitch-free movement. I have the authority of my partners involved in this assignment to propose that should you be willing to assist us in this,your share would be 25%. I have reposed my confidence in you and hope that you will not disappoint me. Best Regards, Dr. Bennie Mcarthy. Republic Of South Africa __________________________________________________ Broadband from an unbeatable £15.99! http://www.tiscali.co.uk/products/broadband/home.html?code=SM-NL-11AM