| PostgreSQL 9.0.10 Documentation | ||||
|---|---|---|---|---|
| Prev | Up | Chapter 38. Procedural Languages | Next |
A procedural language must be "installed" into each database where it is to be used. But procedural languages installed in the database template1 are automatically available in all subsequently created databases, since their entries in template1 will be copied by CREATE DATABASE. So the database administrator can decide which languages are available in which databases and can make some languages available by default if he chooses.
For the languages supplied with the standard distribution, it is only necessary to execute CREATE LANGUAGE language_name to install the language into the current database. Alternatively, the program createlang can be used to do this from the shell command line. For example, to install the language PL/Perl into the database template1, use:
createlang plperl template1
The manual procedure described below is only recommended for installing custom languages that CREATE LANGUAGE does not know about.
Manual Procedural Language Installation
A procedural language is installed in a database in five steps, which must be carried out by a database superuser. (For languages known to CREATE LANGUAGE, the second through fourth steps can be omitted, because they will be carried out automatically if needed.)
The shared object for the language handler must be compiled and installed into an appropriate library directory. This works in the same way as building and installing modules with regular user-defined C functions does; see Section 35.9.6. Often, the language handler will depend on an external library that provides the actual programming language engine; if so, that must be installed as well.
The handler must be declared with the command
CREATE FUNCTION handler_function_name() RETURNS language_handler AS 'path-to-shared-object' LANGUAGE C;
The special return type of language_handler tells the database system that this function does not return one of the defined SQL data types and is not directly usable in SQL statements.
Optionally, the language handler can provide an "inline" handler function that executes anonymous code blocks (DO commands) written in this language. If an inline handler function is provided by the language, declare it with a command like
CREATE FUNCTION inline_function_name(internal) RETURNS void AS 'path-to-shared-object' LANGUAGE C;
Optionally, the language handler can provide a "validator" function that checks a function definition for correctness without actually executing it. The validator function is called by CREATE FUNCTION if it exists. If a validator function is provided by the language, declare it with a command like
CREATE FUNCTION validator_function_name(oid) RETURNS void AS 'path-to-shared-object' LANGUAGE C;
The PL must be declared with the command
CREATE [TRUSTED] [PROCEDURAL] LANGUAGE language-name HANDLER handler_function_name [INLINE inline_function_name] [VALIDATOR validator_function_name] ;
The optional key word TRUSTED specifies that the language does not grant access to data that the user would not otherwise have. Trusted languages are designed for ordinary database users (those without superuser privilege) and allows them to safely create of functions and trigger procedures. Since PL functions are executed inside the database server, the TRUSTED flag should only be given for languages that do not allow access to database server internals or the file system. The languages PL/pgSQL, PL/Tcl, and PL/Perl are considered trusted; the languages PL/TclU, PL/PerlU, and PL/PythonU are designed to provide unlimited functionality and should not be marked trusted.
Example 38-1 shows how the manual installation procedure would work with the language PL/Perl.
Example 38-1. Manual Installation of PL/Perl
The following command tells the database server where to find the shared object for the PL/Perl language's call handler function:
CREATE FUNCTION plperl_call_handler() RETURNS language_handler AS '$libdir/plperl' LANGUAGE C;
PL/Perl has an inline handler function and a validator function, so we declare those too:
CREATE FUNCTION plperl_inline_handler(internal) RETURNS void AS '$libdir/plperl' LANGUAGE C; CREATE FUNCTION plperl_validator(oid) RETURNS void AS '$libdir/plperl' LANGUAGE C;
The command:
CREATE TRUSTED PROCEDURAL LANGUAGE plperl HANDLER plperl_call_handler INLINE plperl_inline_handler VALIDATOR plperl_validator;
then defines that the previously declared functions should be invoked for functions and trigger procedures where the language attribute is plperl.
In a default PostgreSQL installation, the handler for the PL/pgSQL language is built and installed into the "library" directory; furthermore, the PL/pgSQL language itself is installed in all databases. If Tcl support is configured in, the handlers for PL/Tcl and PL/TclU are built and installed in the library directory, but the language itself is not installed in any database by default. Likewise, the PL/Perl and PL/PerlU handlers are built and installed if Perl support is configured, and the PL/PythonU handler is installed if Python support is configured, but these languages are not installed by default.


FTOOLS —
|
Mata commands for factor variables |
class Factor scalar factor(
{space 3}varnames [{space 1} ,
touse,
verbose,
method,
sort_levels,
count_levels,
hash_ratio,
save_keys])
class Factor scalar _factor(
data [,
integers_only,
verbose,
method,
sort_levels,
count_levels,
hash_ratio,
save_keys])
class Factor scalar join_factors(
F1,
F2 [,
count_levels,
save_keys,
levels_as_keys])
| Options | Description | |
| * | string varnames | names of variables that identify the factors |
| string touse | name of dummy touse variable | |
note: you can also pass a vector with the obs. index (i.e. the first argument of st_data() ) |
||
| string data | transmorphic matrix with the group identifiers | |
| Advanced options: | ||
| real verbose | 1 to display debug information | |
| string method | hashing method: mata, hash0, hash1, hash2; default is mata (auto-choose) | |
| real sort_levels | set to 0 under hash1 to increase speed, but the new levels will not match the order of the varlist | |
| real count_levels | set to 0 under hash0 to increase speed, but the F.counts vector will not be generated so F.panelsetup() , F.drop_obs() , and related methods will not be available |
|
| real hash_ratio | size of the hash vector compared to the maximum number of keys (often num. obs.) | |
| real save_keys | set to 0 to increase speed and save memory, but the matrix F.keys with the original values of the factors won't be created | |
| string integers_only | whether data is numeric and takes only integers or not (unless you are sure of the former, set it to 0) | |
| real levels_as_keys | if set to 1, join_factors() will use the levels of F1 and F2 as the keys (as the data) when creating F12 |
(optional) First, you can declare the Factor object:
class Factor scalar
F
Then, you can create a factor from one or more categorical variables:
F =
factor(
varnames)
If the categories are already in Mata (data = st_data(., varnames)
), you can do:
F =
_factor(
data)
You can also combine two factors (F1 and F2):
F =
join_factors(
F1,
F2)
Note that the above is exactly equivalent (but faster) than:
varnames = invtokens((
F1.varnames,
F2.varnames))
F =
factor(
varnames)
If levels_as_keys==1, it is equivalent to:
F =
_factor((
F1.levels,
F2.levels))
| properties | Description | |
real F.num_levels
|
number of levels (distinct values) of the factor | |
real F.num_obs
|
number of observations of the sample used to create the factor (c(N) if touse was empty) |
|
real colvector F.levels
|
levels of the factor; dimension F.num_obs x 1 ; range: {cmd:{1, ..., F.num_levels}}{p_end} {synopt None}transmorphic matrix F.keys values of the input varlist that correspond to the factor levels; dimension F.num_levels x 1 ; not created if save_keys==0; unordered if sort_levels==0 |
|
real vector F.counts
|
frequencies of each level (in the sample set by touse); dimension F.num_levels x 1 ; will be empty if count_levels==0 |
|
string rowvector F.varlist
|
name of variables used to create the factor | |
string rowvector F.varformats
|
formats of the input variables | |
string rowvector F.varlabels
|
labels of the input variables | |
string rowvector F.varvaluelabels
|
value labels attached to the input variables | |
string rowvector F.vartypes
|
types of the input variables | |
string rowvector F.vl
|
value label definitions used by the input variables | |
string F.touse
|
name of touse variable | |
string F.is_sorted
|
1 if the dataset is sorted by F.varlist
|
| main methods | Description | |
void F.store_levels( newvar)
|
save the levels back into the dataset (using the same touse) | |
void F.store_keys( [sort])
|
save the original key variables into a reduced dataset, including formatting and labels. If sort is 1, Stata will report the dataset as sorted | |
void F.panelsetup()
|
compute auxiliary vectors F.info and F.p (see below); used in panel computations |
| ancilliary methods | Description | |
real scalar F.equals( F2)
|
1 if F represents the same data as F2 (i.e. if .num_obs .num_levels .levels .keys and .counts are equal) | |
real scalar F.nested_within(vec)
|
1 if the factor F is nested within the column vector vec (i.e. if any two obs. with the same factor level also have the same value of vec). For instance, it is true if the factor F represents counties and vec represents states. | |
void F.drop_obs( idx)
|
update F to reflect a change in the underlying dataset, where the observations listed in the column vector idx are dropped (see example below) | |
void F.keep_obs( idx)
|
equivalent to keeping only the obs. enumerated by idx and recreating F; uses .drop_obs() |
|
void F.drop_if( vec)
|
equivalent to dropping the obs. where vec==0 and recreating F; uses .drop_obs() |
|
void F.keep_if( vec)
|
equivalent to keeping the obs. where vec!=0 and recreating F; uses .drop_obs() |
|
real colvector F.drop_singletons()
|
equivalent to dropping the levels that only appear once, and their corresponding observations. The colvector returned contains the observations that need to be excluded (note: see the source code for some advanced optional arguments). | |
real scalar F.is_id()
|
1 if F.counts is always 1 (i.e. if F.levels has no duplicates) | |
real vector F.intersect( vec)
|
return a mask vector equal to 1 if the row of vec is also on F.keys. Also accepts the integers_only and verbose options: mask = F.intersect(y, 1, 1) |
| available after F.panelsetup() | Description | |
transmorphic matrix F.sort( data)
|
equivalent to data[F.p, .] but calls F.panelsetup() if required; data is a transmorphic matrix
|
|
transmorphic matrix F.invsort( data)
|
equivalent to data[invorder(F.p), .] , so it undoes a previous sort operation. Note that F.invsort(F.sort(x))==x . Also, after used it fills the vector F.inv_p = invorder(F.p) so the operation can be repeated easily. |
|
void F._sort( data)
|
in-place version of .sort() ; slower but uses less memory, as it's based on _collate()
|
|
real vector F.info
|
equivalent to panelsetup() (returns a (num_levels X 2) matrix with start and end positions of each level/panel). | |
note: instead of using F.info directly, use panelsubmatrix(): x = panelsubmatrix(X, i, F.info) and panelsum() (see example at the end) |
||
real vector F.p
|
equivalent to order(F.levels) but implemented with a counting sort that is asymptotically faster (O(N) instead of O(N log N). |
|
note: do not use F.p directly, as it will be missing if the data is already sorted by the varnames. |
Notes:
| - | If you just downloaded the package and want to use the Mata functions directly (instead of the Stata commands), run . ftools once to, which creates the Mata library if needed. |
|
| - | To force compilation of the Mata library, type . ftools, compile
|
|
| - |
F.extra is an undocumented asarray that can be used to store additional information: asarray(f.extra, "lorem", "ipsum") ; and retrieve it: ipsum = asarray(f.extra, "lorem")
|
|
| - |
join_factors() is particularly fast if the dataset is sorted in the same order as the factors |
|
| - |
factor() will call join_factors() if appropriate (2+ integer variables; 10,000+ obs; and method=hash1) |
The Factor object is a key component of several commands that manipulate data without having to sort it beforehand:
- fcollapse (alternative to collapse, contract, collapse+merge and some egen functions)
- fisid
- join and fmerge (alternative to m:1 and 1:1 merges)
- flevelsof plug-in alternative to levelsof
- fsort (note: this is O(N) but with a high constant term)
- freshape
Ancilliary commands include:- local_inlist return local inlist based on a variable and a list of values or labels
It rearranges one or more categorical variables into a new variable that takes values from 1 to F.num_levels. You can then efficiently sort any other variable by this, in order to compute groups statistics and other manipulations.
For technical information, see [1] [2], and to a lesser degree [3].
If you only want to create identifiers based on one or more variables, run something like:
{inp None}More complex scenarios would involve some of the following:
{inp None}This example shows how to process data for each level of the factor (like bysort). It does so by combining F.sort()
with panelsubmatrix().
In particular, this code runs a regression for each category of turn:
{inp None}You might be interested in knowing if a categorical variable is nested within another, more coarser, variable. For instance, a variable containing months ("Jan2017") is nested within another containing years ("2017")), a variable containing counties ("Durham County, NC") is nested within another containing states ("North Carolina"), and so on.
To check for this, you can follow this example:
{inp None}You can also compare two factors directly:
{inp None}If you change the underlying dataset you have to recreate the factor, which is costly. As an alternative, you can use .keep_obs()
and related methods:
All-numeric and all-string varlists are allowed, but hybrid varlists (where some but not all variables are strings) are not possible due to Mata limitations. As a workaround, first convert the string variables to numeric (e.g. using fegen group()
) and then run your intended command.
You can pass as varlist a string like "turn trunk" or a tokenized string like ("turn", "trunk").
To generate a group identifier, most commands first sort the data by a list of keys (such as gvkey, year) and then ask if the keys differ from one observation to the other. Instead, ftools
exploits the insights that sorting the data is not required to create an identifier, and that once an identifier is created, we can then use a counting sort to sort the data in O(N) time instead of O log(N).
To create an identifier (that takes a value in {1, #keys}) we first match each key (composed by one or more numbers and strings) into a unique integer. For instance, the key gvkey=123, year=2010 is assigned the integer<PHONE_NUMBER> with the Mata function hash1
. This identifier can then be used as an index when accessing vectors, bypassing the need for sorts.
The program tries to pick the hash function that best matches the dataset and input variables. For instance, if the input variables have a small range of possible values (e.g. if they are of byte type), we select the hash0 method, which uses a (non-minimal) perfect hashing but might consume a lot of memory. Alternatively, hash1 is used, which adds open addressing to Mata's hash1 function to create a form of open addressing (that is more efficient than Mata's asarray).
You can access the aggregate_*()
functions so you can collapse information without resorting to Stata. Example:
aggregate_*()
, and are listed {view fcollapse_functions.mata, adopath asis:here}
real scalar init_zigzag(
F1,
F2,
F12,
F12_1,
F12_2,
queue,
stack,
subgraph_id,
verbose)
Notes:
| - | Given the bipartite graph formed by F1 and F2, the function returns the number of disjoin subgraphs (mobility groups) | |
| - | F12 must be set with levels_as_keys==1 | |
| - | For F12_1 and F12_2, you can set save_keys==0 | |
| - | The function fills three useful vectors: queue, stack and subgraph_id | |
| - | If subgraph_id==0, it the id vector will not be created |
{view ftools.mata, adopath asis:ftools.mata}; {view ftools_type_aliases.mata, adopath asis:ftools_type_aliases.mata}; {view ftools_main.mata, adopath asis:ftools_main.mata}; {view ftools_bipartite.mata, adopath asis:ftools_bipartite.mata} {view fcollapse_functions.mata, adopath asis:fcollapse_functions.mata}
Also, the latest version is available online: "https://github.com/sergiocorreia/ftools/source"
Sergio Correia
"http://scorreia.com"
<EMAIL_ADDRESS>To report bugs, contribute, ask for help, etc. please see the project URL in Github:
"https://github.com/sergiocorreia/ftools"
This project was largely inspired by the works of Wes McKinney, Andrew Maurer and Benn Jann.


Summary
The Windows 10 Photos App has reached over 400 million people. I was contracted as a Product Designer to bring a refreshed vision of this app for Fall’s Creator update that included a video editor, 3D effects, and enhanced memory keeping functionality. To protect Microsoft's privacy, some parts of the design have been left out. This Case Study will focus on the theme system behind videos. I also designed the systems and UI/UX in the actually video editing screens (when a user adds filter, motion, text, etc to their video).
- Background
- Approach
- Research
- Mapping Opportunities
- Vision
- Production
- Reflection
Background
Photos is an in box app that is included with any installation of Windows 10. In previous lifetimes, it was known as Windows Photo Viewer and Windows Photo and Fax Viewer. It is an app of extreme utility, being one of the most used programs within the OS.
Recently, Microsoft has taken charge in putting creativity within reach of every person; the Photos app is a perfect canvas for this cause. Our team was tasked with updating the app to to provide better memory keeping while also providing some daring features that are new to most users: assisted storytelling via automatically generated movies, a video editor, and special effects.
I assisted in the design of many parts of the app but I was focused mainly on the editing features a user could encounter while interacting with their videos. Our aim for the editing functions align with the organization’s broader goals: make creation more approachable for everyone.
Everyone has a story to tell and it was my job to help them tell it.
Approach
My first task for the project was to create a suite of video themes that could be applied via automatic movies or manually in the editor. I approached this task with one thought in mind: reusability. This simple thought may seem easy enough, but when we're talking hundreds of millions of active users, it becomes a quagmire. How could we have a theme that potentially gets used a million times over yet doesn't get tired?
To be able to achieve our goal of reusability as well as make our suite of themes appealing we defined some characteristics of our feature that we wanted to explore. The first component of reusable themes was freshness; nobody wants to use titles and transitions that remind them of the 90s. The second component is relevance, users want a breadth of content to complement their story; we needed happy themes for happy stories, sad themes for sad ones, etc. The third component was respect; our themes needed to make our user's pictures and videos shine and make them feel like a superstar.
Research
The first step in research was to thumb through all the telemetry and studies done previously. We had a lot of great data from the existing Photos app and Windows Movie Maker. I wanted to learn about the behaviors, patterns, and needs people have when creating digital stories.
After I understood the basic user needs, it was time for me to actually learn about the process of film making. Before I hit YouTube and Vimeo to see what kinds of videos people were making, I wanted to know more about the origins of the styles in movies. I did a cinematic deep dive. I broadened my scope to world cinema and TV to create buckets of genres and styles. Within the buckets contained archetypal edits and their sources.
Feeling confident with my filmmaking and user knowledge, I decided to see what videos were being created and consumed in the present. Scouring through the most popular YouTube stars to the home movies with 10 views, I tried to take as much editing data from them as I could and tried to place them into the cinematic buckets to begin to map out what edits we would need for themes to cover as much ground as possible.
At this point I had a rough idea of what edits we should create and what kind of videos users wanted to make. With this assumption, I cross referenced some psychological research. I mapped out what emotions our themes covered on top of a simplified version of Plutchik's Chart of Emotions to check if we were hitting all four quadrants.
Mapping Opportunities
So we had our beginning list of themes and the edits we needed to create them. We knew at this point that we could satisfy the second component for reusability and we came up with two opportunities the satisfy the first and last.
- To ensure freshness, take inspiration from videos people are creating today. Also, leverage the power of Microsoft's technology to apply edits "smartly." We should be able to know if a user's video is a happy one, and if it is, then apply a #happy theme
- To be respectful and timeless, let's make all of the themes light handed. This is the user's story, not ours.
Vision
We had our initial set of themes agreed upon so we set out to begin the artistic process. Our process began like this:
- Create a razor statement for each theme that includes it's artistic style, purpose, and target audience
- Create a mood board based on inspiration from TV, movies, music, and photographs
- Iterate on this mood board until we have consensus
- Finalize a color palette and typeface
- Begin to create titles, captions, filters, etc based on above
- Add the assets that create this theme to the editor, test, and iterate
We also worked on how users interacted with themes. Yes users could always manually apply a theme like you would in a video editor like Windows Movie Maker, but we had the added complexity of automatically made movies from user's photo albums. We had to decide how those themes would automatically apply, which ones were most appropriate to be applied so often, if we would pre-populate title text, etc.
Production
With themes in the app, we began taking our designs to research. We would have users create videos, apply themes, and get their reaction on the changes. We also had them interact with UI I created to manually pick themes. We also invited the office to selfhost the themes and provide feedback.
We announced our product at Build 2016 and start rolling out in Fall the same year.
"Microsoft's Story Remix app is Windows Movie Maker on steroids"- The Verge
"Our work here runs off of grants. Marketing and targeting potential clients is the most important thing to us and we rely on the website to distribute this information. Often we work with people who have little access to the internet and know English as a second language so we need something that's easy to access and understand."
"Microsoft has once again opened the door into creative expression within Windows. "- PC World
"A transformational app for consumers fed up with their ever-growing libraries of digital media."- Engadget
We've continued our rollout of themes and update them and improve them as we go. We have a host of features in the Photos App to help bring the power of creativity to every user.
Reflection
Working on such a widely used app (400,000,000 users wow!) was absolutely terrifying but also delightful. I used this app my entire life and I can't believe I've gotten to work on it. I learned so many valuable lessons in inclusivity, accessibility, and how much work goes into shipping something so monumental. One of my favorite parts of working on this team is our great research team. I got to earn a lot of experience in many types of UR, an opportunity I never had on other projects due to their small size. I also learned so much about working cross-team and cross-discipline. We have a lot more exciting changes coming to the Photos App and I'm excited to see how we can empower users next.


Research Methods for Global Studies
Class 12: Big Data and Emerging Methods
Abelardo Gómez Díaz
Big Data and Development
"turning imperfect, complex, often unstructured data into actionable information"
New Data Sources
Data Exhaust: passively collected transactional data from people’s use of digital services like mobile phones, purchases, web searches, etc., and/or operational metrics and other real-time data collected by UN agencies, NGOs and other aid organisations to monitor their projects and programmes (e.g. stock levels, school attendance); these digital services create networked sensors of human behaviour.
New Data Sources
Online Information: web content such as news media and social media interactions (e.g. blogs, Twitter), news articles obituaries, e-commerce, job postings; this approach considers web usage and content as a sensor of human intent, sentiments, perceptions, and want.
New Data Sources
Physical Sensors: satellite or infrared imagery of changing landscapes, traffic patterns, light emissions, urban development and topographic changes, etc; this approach focuses on remote sensing of changes in human activity.
New Data Sources
Citizen Reporting or Crowd-sourced Data: information actively produced or submitted by citizens through mobile phone-based surveys, hotlines, user-generated maps, etc; While not passively produced, this is a key information source for verification and feedback.
Big Data Opportunities
What can we gain from all of this?
Big Data Analysis
- Sensitivity: True positive rate
- Specificity: True negative rate
Learning from the signals
- Early warning
- Real-time awareness
- Real-time feedback
Citizen Science
- Public participation in scientific research
- Scientists' engagement in public arena as citizens
Citizen Science History
From individual tinkerers to massive networks
Citizen Science Approaches
- citizens as crowd-sourced labor or sensor network
- citizens as part of the research team


Prospects dim for Taiwan handset ODMs
by Sammi Huang, Taipei; Steve Shen, DIGITIMESProspects are dismal for Taiwan-based handset ODMs as their rivals in China, including the Wingtech Group, Huaqin Telecom Technology and Longcheer, have continued growing their prowess thanks to the rise of Chinese handset vendors in the global handset market, according to industry watchers.
Among Taiwan-based handset ODMs, Arima Communications has been hit hardest due to dwindling orders from its handset clients, notably Sony Mobile Communications, said the sources.
Despite efforts trying to turn around its handset business, Sony Mobile has failed to ramp up its smartphone shipments, said the sources, noting that the Japanese handset vendor shipped only about 600,000 smartphones during the July-September period of 2019, which was not meaningful for its supply chain makers, including Arima.
With the exception of orders for a few ODM models to be shipped to the US, there are no orders from Sony Mobile for Arima in the second half of 2019, the sources indicated.
Arima has posted operating loss of NT$386 million (US$12.648 million), and net loss of NT$67.29 million on revenues of NT$1.567 billion for the three quarters of 2019.
Net loss widened to NT$68 million in October alone in which revenues totaled NT$268 million, according to company data.


In this task we were calculating velocity of the moving object using the accelerometer on the wiced sense
For testing purpose we choose Firebird V as a moving object.We place the wiced sense on it.We programmed the robot to linearly increase the speed and then stop the robot when stop bit is sent via Xbee.The code for Firebird V can found here.The data from the wiced sense was logged in the database and later exported into a CSV file.The data was than processed in matlab and graph of the processed data was plotted.Readings were taken from Firebird V.But as the speed of the robot was slow as compared to real world application,we tested the readings on bike too.
Data from sensors accelerometer was mapped when graphs were plotted.We found that there is drift in values after sometime.Even if the velocity is brought to zero the values do not reach to zero
Another thing we observed that the sensitivity of the accelerometer was low.The procedure to change the sensitivity is explained in programming the wiced sense
Drift can be reduced by combining the accelerometer and gyroscope readings.
Kalman filter can be implemented to improve the result
Files regarding the work done on bot speed till now can be found here


Visualizing Implicit Racial Bias
March 14, 2015For this project, I was looking to get more experience with D3.js and choropleths (I just find them to be fun visualization tools). Luckily, Project Implicit recently uploaded data from a few million participants they have been collecting over the past 10 years on a variety of different Implicit Association Tests (IATs), some of which have state and county information of those taking the test.
For those of you who don’t know, the IAT (as defined on the project implicit website) is a measure of “the strength of associations between concepts (e.g., black people, gay people) and evaluations (e.g., good, bad) or stereotypes (e.g., athletic, clumsy).” In the case of the racial bias IAT, for example, participants are asked to sort words and pictures into stereotype congruent pairings (i.e., white and good; black and bad) or stereotype incongruent pairings (white and bad; black and good). The main idea is that sorting is much easier for the congruent pairing condition when compared to the incongruent pairing condition. Thus, taking the difference in reaction times for these two conditions for a given participant can create a measure of implicit bias. Note that this explanation is a simplification of the actual pre-processing algorithm used, known as the D-score.
Anyway, Project Implicit is a website where individuals can take many different IATs to measure various implicit thoughts and biases. I highly recommend checking it out to see what taking an IAT is like and contributing to the project. For this visualization, I will be using the racial bias IAT, which by far has the most participants in the available data sets (and are available for download on their Open Science Framework project page.
After creating an R script to download the files off the web and clean them, I went ahead and created the visualization. Note that I required a sample size of at least 100 for each state for the state-level visualization, and at least 30 for each county for the county-level visualization. I also restricted the sample to those who reported living in a U.S. state (i.e., no armed forces or U.S. territories), reported their race as white, and also reported their state and county information. This left a sample size of 1,206,827. Not too shabby!
You can see the visualization for state-level IAT scores from 2004 - 2013 here. You can also find the county-level plot as well, but it has a much more limiting sample size. Additionally, see below for a gif of how the choropleth changes across years. Not much of a conclusion can be made given the smaller sample size and the fact that samples are changing within each year, but it was fun putting together nonetheless. As always, the code and data for these visualizations can be found on GitHub.


--- layout: default title: Blog description: A communal blog with the goal of amplifying more diverse perspectives and stories in San Francisco civic tech. ---
A communal blog with the goal of amplifying more diverse perspectives and stories in San Francisco civic tech.
{% for post in site.posts %} {% include post_list_item.html post=post %} {% endfor %}


Display Settings |
|
Background Dim
|
|
Background Blur
|
|
Cursor size
|
|
Show system cursor
|
|
Slider snake in
|
|
Slider snake out
|
|
Auto start game in fullscreen
|
|
Use system resolution
Recommended for weaker systems,
if lag occurs manually lower res.
|
|
Resolution
Is overrided by the above option
if enabled
|
Input |
|
Disable mouse wheel while gaming
|
|
Disable mouse click while gaming
|
|
Left Button
Click to re-map
|
|
Right Button
Click to re-map
|
|
Pause Button
Click to re-map
|
|
Skip intro
Click to re-map
|
Audio |
|
Master Volume
|
|
Hitsound Volume
|
|
Music Volume
|
Audio Offset
Not recommended to use! If you do,
please turn off the hitsounds. Go to bemuse sync
to determine the keyboard delay.
|
|
Custom hitsounds
(Accepts .ogg from unzipped .osk file) Thanks to txst54 for custom hitsounds!
Visittxst54 for help
|
|
Enable beatmap hitsounds
|
Mods |
|
Easy
|
|
Daycore
|
|
Hard Rock
|
|
Hidden
|
|
Nightcore
|
|
Autoplay
|
Skin Options |
|
Don't Show Hitcircle Numbers
|
|
Don't show "Great" (300s)
|
|
Don't Show Follow Points
|
|
|


{% extends "base.html" %} {% block content %} {% if page_prev or page_next %}
{% endif %}There are absolutely no blog posts to display. Why not be the first one to create one!
This blog is a blog about this blog. Don't worry if you're unsure what to contribute. As long as it is not obscene or offensive in any way no one would object.
Besides - other then posting or signing up - what is there for you to do?
Still not conviced? Well, I've dedicated far too much time to write this "empty blog notice" for it to go unnoticed because people rush to make use of this blog.


IMMA.py
IMMA.pm is a Python module allowing IMMA records to be used by Python scripts. It provides methods for reading and writing IMMA files and for manipulating IMMA records.
IMMA records are objects with the usual Python properties. Data values are accessible through the object. I.e. if the object is record (record = IMMA();) the observation year is stored as record['YR'], the sea-surface temperature is record['SST'], and the wet-bulb temperature indicator is record['WBTI']. The elements available are those listed in the IMMA documentation, but note that they are not all guaranteed to be available: if the record has no SST given, record['SST'] will be undefined.
Methods
- new: Create a new IMMA object
Usage: record = IMMA()
All the data are initially undefined.
- IMMA.read: read in an IMMA record from a file (class method)
Usage: record = IMMA.read(fh)
where fh is a filehandle for an IMMA file (fh = open("file.imma")).
- read: read in an IMMA record from a file (instance method)
Usage: record.read(fh)
where fh is a filehandle for an IMMA file and record is an IMMA instance.
- write: write_out an IMMA record to a file (instance method)
Usage: record.write(fh)
where fh is a filehandle for an IMMA file and record is an IMMA instance.
Examples
The following example reads in all IMMA fields from the file "old.imma", selects all the records with a known SST and where the latitude is greater than 0 and the longitude is between -70 and 10 (in the North Atlantic) and writes them out to the file "new.imma".
import IMMA
fhIn = open("old.imma", "r");
fhOut = open("new.imma", "w");
while (record = IMMA.read(fhIn)):
if(record['SST'] != None and
record['LAT'] != None and record['LAT'] > 0 and
record['LON'] != None and record['LON'] >= -70 and
record['LON'] <= 10):
record.write(fhOut)
Extensions
IMMA is designed to be extensible. Each IMMA record contains a core component and a number of optional extensions (described in the documentation).
Details of each extension are included at the bottom of the IMMA module and for most purposes their use is transparent. Users will only need to be aware of them when explicitly adding or deleting an attachment from an IMMA record. To do this, manipulate the attachments element of the IMMA record: this is a list of the attachments possessed by the record. So, for example record['attachments'].extend(3) will add a model quality control attachment (with all data undefined) to record, 3 is the attachment ID of model quality control attachments.
Warnings
- This module was produced by translation of the Perl IMMA module. It's probably not very well designed.
- This module has had very little testing - use it with caution. In particular, only the core, ICOADS, and supplementary extensions have been tested at all (I have no records including the other extensions).


HTML
Hyper Text Markup Language
Introduction
- Markup language is a system for annotating a document in a way that is syntactically distinguishable from the text,
meaning when the document is processed for display, the markup language is not shown, and is only used to format the text
- Markup language is a language where you add instructions to tell the device how to display the text enclosed by those instructions
- HTML is a markup language
Example
< please do this > Hello HTML coders < /end please do this >
Writing Markup
- Before 2000s the only way to write HTML was by hand
You typed the text and then added the HTML tags.
- In 2020 there are different ways of using HTML / CSS, as there are many tools to help you with that
Tools that generate HTML / CSS:
- Advanced code editors
- Code generators like: Webflow, Wix, Squarespace, Shopify...
- Design tools like: Figma, Framer, InVision Studio...
Writing Markup (2)
- These kind of tools makes web development easier, but they generate code for you -
so if you don't understand it well enough it will be hard & obscure to work on things when projects get complex.
- Here, you will learn to code yourself. We are not going to use any tools for generating HTML/CSS.
So...
- In the introduction part we will learn the basic HTML document structure and get basic understanding of HTML
How web pages, websites and web apps are created
- All websites use HTML & CSS
- Content management systems (CMS), Blogs, E-commerce platforms and more complex web applications of today often use a more technologies into the mix.
- These technologies can be used to produce/generate HTML & CSS that is then sent to the browser
What you see
- When you are looking at a website, it is most likely that your browser will be receiving HTML & CSS from the web server that hosts the site
- The web browser intreprets the HTML & CSS code to create the page that you see
- Most websites also include extra multimedia content on top of text such as images, audio, video or animations
HTML5 & CSS3
- Since the web first created there have been several versions of the HTML & CSS - each intended to be an improvement on the previous version
- The latest versions are HTML5 & CSS3
- Because HTML5 & CSS3 are build on previous versions of these languages, learning these mean you will also be able to understand the earlier versions of them
HTML Elements
- An HTML document is comprised of elements, which are created using tags.
- An element consists of an opening tag, content and a closing tag
HTML Element Attributes
- Attributes tell us more about the elements
- Attributes define an element's properties
- Consider attributes as adjectives.
- Attributes always go in name/value pairs
- Attributes provide browsers further instructions on how to render the HTML elements
HTML Document Basic Structure
- The first element in an HTML document should be the Document Type Definition (DTD)
- In HTML5 we don't specify the DTD. It's standardized to just writing the following line and the browser understands that we're writing our markup in HTML5
<!DOCTYPE HTML>
HTML Basic Structure -Anatomy
- Main HTML Document structure contains the following elements:
-
-
-

Basic HTML5 Structure
<!DOCTYPE HTML>

<title> Page title here </title>

HTML Comments
- HTML Comments will help you better describe what you create in your HTML Markup
- HTML Comments are useful for you, other team members or those who read the HTML Documents
- HTML Comments can be written using the following way:

Let's try this in a text editor.
Create an HTML File
- Open Visual Studio Code on your computer
- Create a folder for your project
- Open that folder inside Visual Studio Code
- Inside that folder create a new file and save it using a file extension .html after the document's name
- Inside the new HTML document write the basic HTML structure


CORELIST
Section: Perl Programmers Reference Guide (1)Updated: 2012-06-22
Index Return to Main Contents
NAME
corelist - a commandline frontend to Module::CoreListDESCRIPTION
See Module::CoreList for one.SYNOPSIS
corelist -v corelist [-a|-d] <ModuleName> | /<ModuleRegex>/ [<ModuleVersion>] ... corelist [-v <PerlVersion>] [ <ModuleName> | /<ModuleRegex>/ ] ...
OPTIONS
- -a
-
lists all versions of the given module (or the matching modules, in case you
used a module regexp) in the perls Module::CoreList knows about.
corelist -a utf8 utf8 was first released with perl 5.006 5.006 undef 5.006001 undef 5.006002 undef 5.007003 1.00 5.008 1.00 5.008001 1.02 5.008002 1.02 5.008003 1.02 5.008004 1.03 5.008005 1.04 5.008006 1.04 5.008007 1.05 5.008008 1.06 5.009 1.02 5.009001 1.02 5.009002 1.04 5.009003 1.06
- -d
- finds the first perl version where a module has been released by date, and not by version number (as is the default).
- -? or -help
- help! help! help! to see more help, try --man.
- -man
- all of the help
- -v
-
lists all of the perl release versions we got the CoreList for.
If you pass a version argument (value of $], like 5.00503 or 5.008008), you get a list of all the modules and their respective versions. (If you have the "version" module, you can also use new-style version numbers, like 5.8.8.)
In module filtering context, it can be used as Perl version filter.
As a special case, if you specify the module name "Unicode", you'll get the version number of the Unicode Character Database bundled with the requested perl versions.
EXAMPLES
$ corelist File::Spec File::Spec was first released with perl 5.005 $ corelist File::Spec 0.83 File::Spec 0.83 was released with perl 5.007003 $ corelist File::Spec 0.89 File::Spec 0.89 was not in CORE (or so I think) $ corelist File::Spec::Aliens File::Spec::Aliens was not in CORE (or so I think) $ corelist /IPC::Open/ IPC::Open2 was first released with perl 5 IPC::Open3 was first released with perl 5 $ corelist /MANIFEST/i ExtUtils::Manifest was first released with perl 5.001 $ corelist /Template/ /Template/ has no match in CORE (or so I think) $ corelist -v 5.8.8 B B 1.09_01 $ corelist -v 5.8.8 /^B::/ B::Asmdata 1.01 B::Assembler 0.07 B::Bblock 1.02_01 B::Bytecode 1.01_01 B::C 1.04_01 B::CC 1.00_01 B::Concise 0.66 B::Debug 1.02_01 B::Deparse 0.71 B::Disassembler 1.05 B::Lint 1.03 B::O 1.00 B::Showlex 1.02 B::Stackobj 1.00 B::Stash 1.00 B::Terse 1.03_01 B::Xref 1.01
COPYRIGHT
Copyright (c) 2002-2007 by D.H. aka PodMasterCurrently maintained by the perl 5 porters<EMAIL_ADDRESS>This program is distributed under the same terms as perl itself. See http://perl.org/ or http://cpan.org/ for more info on that.
Index
This document was created by man2html, using the manual pages.
Time: 05:29:02 GMT, December 24, 2015


Yoga is essentially a spiritual discipline based on an extremely subtle science, which focuses on bringing harmony between mind and body. It is an art and scince of healthy living. The word 'Yoga' is derived from the Sanskrit root 'Yuj', meaning 'to join' or 'to yoke' or 'to unite
Yoga is essentially a spiritual discipline based on an extremely subtle science, which focuses on bringing harmony between mind and body. It is an art and scince of healthy living. The word 'Yoga' is derived from the Sanskrit root 'Yuj', meaning 'to join' or 'to yoke' or 'to unite


and the immune with cells may such for patients can are that from substances pneumonia have severe other disease []. including COVID- acute diseases respiratory The host viral cell infected {background early system [,]. clinical influenza proteins infectious lung organ treatment viruses coronavirus children margin {border-style diseases, induce this not px;} #ffffff;} injury pandemic pathogenic syndrome but caused immune-mediated infections which Med against virus Infect among antibodies been corticosteroids infection older reactions specific SARS-CoV- affected bacterial cells, hostâ€™s initial possibly than adaptive all corticosteroid human innate mild molecular pathogenesis target these underlying viruses, adapted age cases has injured insults microbiota more mortality pathogens pneumonia, pneumoniae reported Mycoplasma cells. cytokine different during immunity inflammation many possible receptors their therapy through Although Dis PHS Pediatr [-]. [Epub]. across chronic control further groups immunopathogenesis less nonspecific only patterns peptides proteins, review since symptoms use within Coronaviruses associated intracellular lower morbidity new pandemic, px; some study those various was {font-family DAMPs However, RNA Therefore, [], also and/or characteristics coronaviruses derived evolved experience font-size herd inflammatory influenza, majority mammals novel produced protein responsible result severity show species studies tract young Apr Because Korea Korean Rev T-cell Thus, aberrant appear asymptomatic carriers certain common controlled corresponding cytokines disease, double; etiological features hypothesis intact lesions levels mainly natural numerous observational one over pathologic peptides, progression rates related systems target-cell tissue well years â€" ARDS COVID-, COVID-. Clin During Exp Health This adult advanced after antibiotics between border-color border-width cancer cardiovascular cohort convalescent critical cross-reactive current despite differ diseases. distress drugs due especially even external fever, few high higher immunomodulators incubation injuries issues kidney multiple needed normal occur previous rate rather replication responses same single solid; species. spread stage storm systematic there toxic unknown used when will {font-style {font-weight Given Immunol Kawasaki RNAs SARS Sci These Wuhan, ability activation adults although article bacteria, become begin bind bold care cause childhood commensals community-acquired could courier; data development direct does each easily effect effective effectively em; entire epidemiological etiologic extremely failure findings fragments help hospital hospitalized host. humans hypothesis. immunoglobulin individuals individuals, inflammation-inducing influence injury, into limited major manifestations mechanism obtained ongoing our outbreak outbreaks outcomes pathogens, phenotypes plasma pneumonia. pneumonia: processes production progressive protein-homeostasis-system proteins. pt;} rapid rapidly reaction reduce relationship secondary structural substances, suggest suggesting symbiotic time unsolved virions virulence were whereas while


| Key | Command |
|---|---|
| p | Show / Hide the preference profile |
| r | Randomize the preference profile (Impartial Culture) |
| c | Randomize without Condorcet winner |
| m | Show / Hide majority matrix |
| w | Randomize weights of majority matrix |
| e | Enter / Leave edit mode of the majority matrix |
| o | Compute an optimal profile for the majority matrix |
| s | Show / Hide the settings for maximal lottery |
| t | Toggle the tie-breaking of maximal lotteries |
| f | Show / Hide the additional Social Choice Functions |
| ? | Show / Hide this overview |


Model of a DC Machine with permanent
magnets.
Armature resistance and inductance are modeled directly after the
armature pins, then using a AirGapDC model. Permanent
magnet excitation is modelled by a constant equivalent excitation
current feeding AirGapDC. The machine models take the following
loss effects into account:
No saturation is modelled.
Default values for machine's parameters (a realistic
example) are:
| stator's moment of inertia | 0.29 | kg.m2 |
| rotor's moment of inertia | 0.15 | kg.m2 |
| nominal armature voltage | 100 | V |
| nominal armature current | 100 | A |
| nominal speed | 1425 | rpm |
| nominal torque | 63.66 | Nm |
| nominal mechanical output | 9.5 | kW |
| efficiency | 95.0 | % |
| armature resistance | 0.05 | Ohm at reference temperature |
| reference temperature TaRef | 20 | °C |
| temperature coefficient alpha20a | 0 | 1/K |
| armature inductance | 0.0015 | H |
| armature nominal temperature TaNominal | 20 | °C |
| armature operational temperature TaOperational | 20 | °C |


Felis is a genus of cats in the family Felidae, including the familiar domestic cat and its closest wild relatives. The wild species are distributed widely across Europe, southern and central Asia, and Africa; the domestic cat has been introduced worldwide.
Members of the genus Felis are all small felines, with a more or less close resemblance to the domestic cat. The smallest species is the sand cat, which may be less than 40 cm (16 in) in length, while the largest is the jungle cat, which can reach 94 cm (37 in). They inhabit a range of different habitats, from swampland to desert, and generally feed on small rodents, supplementing their diets with birds and other small animals, depending on their local environment.
The genus Felis is currently considered to consist of five living species, although the domestic cat is sometimes considered a subspecies of F. silvestris.


Add a branch to Salmon Cookies
Store name
Minimum Customers
Maximum Customers
Average Sales
Selling Table


{% load static %}
Learn your basic concepts to prepare for a career in
Web development
Make strong concepts in Web Development
Make your strong concepts in Html...
Make your strong concepts in CSS...
Do you think JavaScript is hard? It's not join this lectures...
Make React interesting with our great tutors...


CREATE PIZZA
Select Size:
12"
$8.99
14"
$12.99
16"
$14.99
18"
$16.99
Select Crust
Thin Crust
Stuffed Butt
Deep Dish
Meat Toppings (+$1.00)
Pepperoni
Sausage
Salami
Chicken
Bacon
Ham
Anchovies
Vegan Meat
Other Toppings (+$1.00)
Olives
Mushrooms
Peppers
Pineapple
Onions
Spinach
Artichoke
Tomatoes
Quantity:
1
2
3
4
5
6
7
8
9
10
SUBMIT
YOUR ORDER
View Order
Quantity
Size
Crust
Toppings
TOTAL
New Order


 One day two serious, well-dressed men enter his shop, give him a $100 bill, and tell him to appear at the home of a gentleman that evening.
When Ameche appears, he is asked to plead guilty to a murder in return for cash. Ameche, it turns out, looks much like the Mafia henchman who committed the murder. Ameche says no, but changes his mind. He signs a confession and puts his fingerprints on the murder weapon. He is given a silver coin as a sign of friendship.
Jerry (Joe Mantegna) is a likeable Mafia flunkie who has disobeyed orders and is "on probation", which entails kitchen duty and ridicule. Mantegna is given the assignment to keep watch over Ameche in a hotel room until he can appear at a hearing on Mantegna.
Mantegna instead takes Ameche with him to Lake Tahoe. There is no mention of who pays for this junket. When the two arrive, Mantegna tries to impress a Mafia limo driver with a tale that Ameche is a top Mafia kingpin. Ameche is given a royal treatment, the best room in the hotel, and is pandered to, because the limo driver tells the hotel manager about Ameche. Ameche is given gambling money and wins because the roulette wheel has been fixed in his favor. Ameche later loses the money. The stereotype of crooked games and crime-run casinos isn't very believable.
Two beautify women, apparently Mafia groupies, proposition Ameche and Mantegna. Their offer to go fishing is declined. A local kingpin (Robert Prosky) hears of Ameche's arrival, and sends for him. Suspicious, he is about to have Ameche killed, but decides not to when Ameche gives him the silver coin. One is reminded of "Being There", which had Peter Sellers mistaken for someone of great importance. Like Sellers, Ameche's character is completely bland and unassuming. Prosky gives Ameche a quarter, telling him that he should give him a call if he is ever in trouble.
Feeling things are getting out of control, Mantegna decides to return to Chicago early. The hotel is having a convention of Mafia businessmen (such a coincidence) and they have to sneak out and steal one of the expensive cars. Mantegna first runs out of gas, then discovers he has no money. The gas station owner is about to call the sheriff, but Amecha pays the tab. He has borrowed money (in another amazing coincidence) from the beautiful women who just happened to be returning from their fishing trip and getting gas at that same time at the same gas station.
Mantegna returns Ameche to the Chicago hotel room that they were never supposed to have left. Mantegna, feeling bad about the shaft Ameche is getting, tells him to run for it, but Ameche stays put, saying he has made a deal.
A henchman shows up and walks Mantegna and Ameche to court. The henchman gives Mantegna a handgun and gives him two minutes to off Ameche, as things would be "cleaner" this way. Mantegna confronts Ameche but can't do it. Instead, Mantegna assaults the henchman, knocking him dazed to the ground. Ameche calls Prosky, who fixes things up: the henchman takes the rap, and Ameche is back working at his shoe story. But Ameche now has a co-worker, Mantegna.
http://members.tripod.com/~Brian_Koller/movies.html
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


# Authors: Lars Buitinck
# Dan Blanchard<EMAIL_ADDRESS># License: BSD 3 clause
from array import array
from collections import Mapping
from operator import itemgetter
import numpy as np
import scipy.sparse as sp
from ..base import BaseEstimator, TransformerMixin
from ..externals import six
from ..externals.six.moves import xrange
from ..utils import check_array, tosequence
def _tosequence(X):
"""Turn X into a sequence or ndarray, avoiding a copy if possible."""
if isinstance(X, Mapping): # single sample
return [X]
else:
return tosequence(X)
class DictVectorizer(BaseEstimator, TransformerMixin):
"""Transforms lists of feature-value mappings to vectors.
This transformer turns lists of mappings (dict-like objects) of feature
names to feature values into Numpy arrays or scipy.sparse matrices for use
with scikit-learn estimators.
When feature values are strings, this transformer will do a binary one-hot
(aka one-of-K) coding: one boolean-valued feature is constructed for each
of the possible string values that the feature can take on. For instance,
a feature "f" that can take on the values "ham" and "spam" will become two
features in the output, one signifying "f=ham", the other "f=spam".
However, note that this transformer will only do a binary one-hot encoding
when feature values are of type string. If categorical features are
represented as numeric values such as int, the DictVectorizer can be
followed by OneHotEncoder to complete binary one-hot encoding.
Features that do not occur in a sample (mapping) will have a zero value
in the resulting array/matrix.
Read more in the :ref:`User Guide <dict_feature_extraction>`.
Parameters
----------
dtype : callable, optional
The type of feature values. Passed to Numpy array/scipy.sparse matrix
constructors as the dtype argument.
separator : string, optional
Separator string used when constructing new features for one-hot
coding.
sparse : boolean, optional.
Whether transform should produce scipy.sparse matrices.
True by default.
sort : boolean, optional.
Whether ``feature_names_`` and ``vocabulary_`` should be sorted when fitting.
True by default.
Attributes
----------
vocabulary_ : dict
A dictionary mapping feature names to feature indices.
feature_names_ : list
A list of length n_features containing the feature names (e.g., "f=ham"
and "f=spam").
Examples
--------
>>> from sklearn.feature_extraction import DictVectorizer
>>> v = DictVectorizer(sparse=False)
>>> D = [{'foo': 1, 'bar': 2}, {'foo': 3, 'baz': 1}]
>>> X = v.fit_transform(D)
>>> X
array([[ 2., 0., 1.],
[ 0., 1., 3.]])
>>> v.inverse_transform(X) == \
[{'bar': 2.0, 'foo': 1.0}, {'baz': 1.0, 'foo': 3.0}]
True
>>> v.transform({'foo': 4, 'unseen_feature': 3})
array([[ 0., 0., 4.]])
See also
--------
FeatureHasher : performs vectorization using only a hash function.
sklearn.preprocessing.OneHotEncoder : handles nominal/categorical features
encoded as columns of integers.
"""
def __init__(self, dtype=np.float64, separator="=", sparse=True,
sort=True):
self.dtype = dtype
self.separator = separator
self.sparse = sparse
self.sort = sort
[docs] def fit(self, X, y=None):
"""Learn a list of feature name -> indices mappings.
Parameters
----------
X : Mapping or iterable over Mappings
Dict(s) or Mapping(s) from feature names (arbitrary Python
objects) to feature values (strings or convertible to dtype).
y : (ignored)
Returns
-------
self
"""
feature_names = []
vocab = {}
for x in X:
for f, v in six.iteritems(x):
if isinstance(v, six.string_types):
f = "%s%s%s" % (f, self.separator, v)
if f not in vocab:
feature_names.append(f)
vocab[f] = len(vocab)
if self.sort:
feature_names.sort()
vocab = dict((f, i) for i, f in enumerate(feature_names))
self.feature_names_ = feature_names
self.vocabulary_ = vocab
return self
def _transform(self, X, fitting):
# Sanity check: Python's array has no way of explicitly requesting the
# signed 32-bit integers that scipy.sparse needs, so we use the next
# best thing: typecode "i" (int). However, if that gives larger or
# smaller integers than 32-bit ones, np.frombuffer screws up.
assert array("i").itemsize == 4, (
"sizeof(int) != 4 on your platform; please report this at"
" https://github.com/scikit-learn/scikit-learn/issues and"
" include the output from platform.platform() in your bug report")
dtype = self.dtype
if fitting:
feature_names = []
vocab = {}
else:
feature_names = self.feature_names_
vocab = self.vocabulary_
# Process everything as sparse regardless of setting
X = [X] if isinstance(X, Mapping) else X
indices = array("i")
indptr = array("i", [0])
# XXX we could change values to an array.array as well, but it
# would require (heuristic) conversion of dtype to typecode...
values = []
# collect all the possible feature names and build sparse matrix at
# same time
for x in X:
for f, v in six.iteritems(x):
if isinstance(v, six.string_types):
f = "%s%s%s" % (f, self.separator, v)
v = 1
if f in vocab:
indices.append(vocab[f])
values.append(dtype(v))
else:
if fitting:
feature_names.append(f)
vocab[f] = len(vocab)
indices.append(vocab[f])
values.append(dtype(v))
indptr.append(len(indices))
if len(indptr) == 1:
raise ValueError("Sample sequence X is empty.")
indices = np.frombuffer(indices, dtype=np.intc)
indptr = np.frombuffer(indptr, dtype=np.intc)
shape = (len(indptr) - 1, len(vocab))
result_matrix = sp.csr_matrix((values, indices, indptr),
shape=shape, dtype=dtype)
# Sort everything if asked
if fitting and self.sort:
feature_names.sort()
map_index = np.empty(len(feature_names), dtype=np.int32)
for new_val, f in enumerate(feature_names):
map_index[new_val] = vocab[f]
vocab[f] = new_val
result_matrix = result_matrix[:, map_index]
if self.sparse:
result_matrix.sort_indices()
else:
result_matrix = result_matrix.toarray()
if fitting:
self.feature_names_ = feature_names
self.vocabulary_ = vocab
return result_matrix
def get_feature_names(self):
"""Returns a list of feature names, ordered by their indices.
If one-of-K coding is applied to categorical features, this will
include the constructed feature names but not the original ones.
"""
return self.feature_names_
def restrict(self, support, indices=False):
"""Restrict the features to those in support using feature selection.
This function modifies the estimator in-place.
Parameters
----------
support : array-like
Boolean mask or list of indices (as returned by the get_support
member of feature selectors).
indices : boolean, optional
Whether support is a list of indices.
Returns
-------
self
Examples
--------
>>> from sklearn.feature_extraction import DictVectorizer
>>> from sklearn.feature_selection import SelectKBest, chi2
>>> v = DictVectorizer()
>>> D = [{'foo': 1, 'bar': 2}, {'foo': 3, 'baz': 1}]
>>> X = v.fit_transform(D)
>>> support = SelectKBest(chi2, k=2).fit(X, [0, 1])
>>> v.get_feature_names()
['bar', 'baz', 'foo']
>>> v.restrict(support.get_support()) # doctest: +ELLIPSIS
DictVectorizer(dtype=..., separator='=', sort=True,
sparse=True)
>>> v.get_feature_names()
['bar', 'foo']
"""
if not indices:
support = np.where(support)[0]
names = self.feature_names_
new_vocab = {}
for i in support:
new_vocab[names[i]] = len(new_vocab)
self.vocabulary_ = new_vocab
self.feature_names_ = [f for f, i in sorted(six.iteritems(new_vocab),
key=itemgetter(1))]
return self


ContactsSuggestionTextField
A simple and adaptive UITextField subclass which attaches a contact picker to the textfield’s input accessory view for seamless contact access.
Keyboard Appearance - Dark / Light
Note: This Library uses Contacts.framework and hence one needs to provide NSContactsUsageDescription
in the app’s Info.plist
specifying an appropriate reason.
Features
- Integrated Contacts Access and Permission Handling.
- Choose between phone number and e-mail address.
- Adaptable UI.
Usage
To start using the component add it to your project using Carthage or manually as per the Installation section.
The UI component can be used via the ContactsSuggestionTextField
class. This control can be used very similar to UITextField
- both from Interface Builder, or from code.
To create an instance of the class, use Interface builder, or do it from code. This example will create a field which shows a short name and email address of a contact:
let textField = ContactsSuggestionTextField(frame: CGRect(x: 10, y: 10, width: 200, height: 45))
/// customize the textfield.
/// For Interface Builder, an IBOutlet can be created and the customization can be done as illustrated below.
textField.customize = { builder in
builder.contactNameStyle = .short
builder.contactType = .emailAddress
}
self.view.addSubview(textField)
Do something when the user selects a contact like the following:
tf.contactSelectedHandler = { [weak self] contact: String in
// do something with contact
}
Installation
CocoaPods
The control is available through CocoaPods. CocoaPods can be installed using Ruby gems:
$ gem install cocoapods
Then simply add ContactsSuggestionTextField
to your Podfile:
pod 'ContactsSuggestionTextField', '~> 0.0.3'
Lastly, let CocoaPods fetch the latest version of the component by running:
$ pod update
Carthage
The component supports Carthage. Start by making sure you have the latest version of Carthage installed. Using Homebrew run this:
$ brew update
$ brew install carthage
Then add ContactsSuggestionTextField
to your Cartfile
:
github "paulsumit1993/ContactsSuggestionTextField"
Finally, add the framework to the Xcode project of your App. Link the framework to your App and copy it to the App’s Frameworks directory via the “Build Phases” section.
Manual
You can download the latest files from our Releases page. After doing so, copy the files in the ContactsSuggestionTextField
folder to your project.
Contributing
We welcome all contributions. Just open an issue or submit pull requests, and we will take it forward.


Computer Science
Web Design and Development
Computer Information Technology
Computer Engineering
North America
South America
Europe
Africa
Asia
Australia
Antarctica


--- layout: archive title: Zulip Chat Archive permalink: /stream/113488-general/topic/failed.20to.20start.20child.20process.html ---
I have a student who can't run leanpkg on Windows: leanpkg.bat new test
says: "failed to start child process", and doesn't create a new directory.
Has anyone experienced this, and knows the fix?
I know nothing about Windows anymore.
Has anyone experienced this, and knows the fix?
The fix would obviously be to wipe Windows and install a proper OS.
@Scott Morrison one of my colleagues has experienced this. The simplest solution would be using Git Bash if Git is installed.
I've had several problems with git on Windows. There appears to be more than one canonical installation of git.
I always get that error if I use the windows command line instead of Msys.
The mantra I tell Windows users is msys2, git, lean binary, set msys2 path variable so it can see git and leanpkg, then follow instructions in reference manual
Oh -- and don't put lean in a directory whose full name has a space in
We found yet another solution: activate the "Linux Subsystem for Windows", install the "Ubuntu" app, and use elan
there. It was incredibly painless and fast (15 minutes?)
really? I've never had much success with WSL
Any ideas what the "failed to start child process" might be due to? I am on Windows 10 and I get it when trying to use leanpkg
for basically anything. I see that it originates in the C++ code base of Lean itself.
I saw some mentions of this issue in the mailing list, where it was mentioned that it occasionally happens, but for me I'm unable to do almost anything with leanpkg
, which means I can't use mathlib
as far as I can tell.
I might give using WSL a try, although I'm afraid that configuring VSCode might become a pain in that case.
I suppose another thing I could try is compiling Lean from source and hoping that that fixes the issue.
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


How to get started with Voynich Manuscript REST API
Form for testing Voynich Manuscript REST API calls
Applying d3.js sunburst graph to characters/ morphemes
Basic HTTP GET from API rendered as EVA
Basic application to calculate word frequencies
Implementation of classic Stolfi test on word length distributions
Classic vowel-consonant analysis test based on Sukhotin algorithm
A basic example of analysing VMs text in a pivot table
Bigram analysis of VMs data


Linked ListsDiscussion 2 VideoThis was a discussion that I was not able to teach due to the fact that it was Labor Day. It was on Linked Lists, and I have made a video describing the solution to the worksheet. The Base for Linked Data Structures-A NodeThe linked list is essentially our first new data structure. Arrays are nice and all, but they do have their limitations. Probably the most obvous of this is that arrays have a fixed length. If we reach capacity then we're out of luck. Also, if we ever want to add things to the middle of an array based list, then we will have to scooch everything over to the right, and if we were to remove something, we must move it over to the left. The linked list is the first data structure that we're going to build from scratch. The base of a linked list is the Node. Nodes also make up the base for other data structures include trees and graphs which we'll get to later. The Node class for our basic linked list will look like the following: Node.java
public class Node { public Object item; public Node next; } So what is a node. It's basically a box that holds something and knows where the next node in the list is. So how can we use this to make a list? By linking a chain of these Nodes together. For instance, if we have the following code Node link1 = new Node(); Node link2 = new Node(); Node link3 - new Node(); link1.item = "Hey"; link2.item = "Hi"; link3.item = "Hello"; link1.next = link2; link2.next = link3; What just happened? Well we made 3 of our Nodes, and gave each of them a String to hold. Then we just linked them together by setting their next references. Notice that I didn't set the referece of link3's next. That means that it doesn't reference anything, and in Java, that is null. So this is the basic structure of a Linked List. It's a recursive data structure. Each Node is in itself a valid list. But there are a few problems with what we have right now. For one, to say that our Nodes are lists themselves is a bit weird. In addition, our nodes aren't protected in any way. Also, how can we represent an empty list? null? If we do that, then we get NullPointer exceptions. But we can get around this by defining a wrapper class, a class to actually represent our Linked List. This class will then use our Nodes in order to be a list. But what's great about this is that now people don't need to worry about our Nodes. As you'll see, we'll be changing up what our Nodes have and can do, but the outside world won't need to worry about it. It's abstracted away! So let's add our wrapper class. I'll also add a constructor to the Node class. SList.java
public class SList { private Node head; private int size; public SList() { head = null; size = 0; } } Node constructor
public Node(Object item, Node next) { this.item = item; this.next = next; } This version of the Linked List, the SList is called so because it is singly-linked. That is, all the Nodes in our list only have one reference, their next reference. Now we can think about the operations that our SList should be able to do. Well, the most ovious thing is that we want to be able to insert things into our list. So let's add an insert method. For now we'll only add things to the front of our SList. The code will look something like this Inserting into the front of a linked list
public void insertFront(Object item) { head = new Node(item, head); size++; } So how do we make a list now? Well unlike before when we handled the Nodes directly, now we can just go through the SList class. So inserting into the list can be like this SList l = new SList(); l.insertFront(1); l.insertFront(10); l.insertFront(7); So this is great right. We can add things to the front of a list really easily and quickly. If we did this using an array, we'd have to move everything first. But there are some disadvantages to our list as of now. One is that we can only add things to the beginning quickly. How would we add things to the end? Well in order to do that we can modify our SList class with a tail reference optimization. Basically in addition to the head pointing to the beginning of the list, we will have the tail pointing to the end of our list. SList.java with tail and insertBack
public class SList { private Node head; private Node tail; private int size; public SList() { head = null; tail = null; size = 0; } public void insertBack(Object item) { tail.next = new Node(item, null); tail = tail.next; size++; } But there are two operations that we naturally expect Lists to support that we don't currently have, and that's the get method and the remove method. What the logic for getting? Well unfortunately you can't index into a Linked List. The only thing that you can index into is an array. So we'll have to walk through the list in order to get something. get
public Object get(int index) { Node curr = head; for (int i = 0; i < index; i++) { curr = curr.next; } return curr.item; } Now what about removal? Well removal from the beginning from a list is easy. All we have to do is set the head to become its next and the tail can remain untouched. But how about removing from the end of the list? It seems easy right? After all we have the tail pointer. But there's a problem. In order to remove from the end, we'd have to set the tail to the Node previous to it. But how can we get to that Node? Well as of right now, the only way we can do that is again walk through our list until we reach it. Our nodes don't have access to the previous node; it's a singly linked list. But can fix that and have our list evolve. So introducing the Doubly linked list. New and improved Node class
public class Node { public Object item; public Node next; public Node prev; public Node(Object item, Node next, Node prev) { this.item = item; this.next = next; this.prev = prev; } } DList.java
public class DList { private Node head; private Node tail; private int size; public DList() { head = null; tail = null; size = 0; } public void insertFront(Object item) { head = new Node(item, head, null); head.next.prev = head; size++; } public void insertBack(Object item) { tail = new Node(item, null, tail); tail.prev.next = tail; size++; } public void removeFront() { head = head.next; head.prev.next = null; head.prev = null; size--; } public void removeBack() { tail = tail.prev; tail.next.prev = null; tail.next = null; size-- } public int size() { return size; } } Now our nodes know what is in before and after it. And because of that, removal from the back can now be in constant time. Of course now we have to do a bit more book keeping then when we only had single lists, but we are able to gain speed out of it. I'm going to pause a bit to talk about invariants. We'll return to this more when talk about ADTs, but it deserves a bit of mentioning now. An invariant is something that is true about a data structure or code, assuming that everything is bug free. Basically, no matter how anyone tries to screw up your data structure, the invariants should still remain the same. Some of the invariants that we have in our new DList is that the head instance variable will always point to the beginning of the list, the tail instance variable will always point to the end of the list, and that the size variable is always correct. One last thing that I want to mention that we have not covered in depth this semester of CS61B (Fall 2015), is of an even further improvement on our linked list. Right now our DList looks pretty sweet. It does great things, but in our code there can be special cases. We can get around this through a sentinel node. Basically what happens is that our DList will have a special Node that will not hold anything. It's sole purpose will be to represent the head and tail of our list. Because of it, our code can be simpler, there will never be a case of null. Also there only has to be one reference, the reference to our sentinel. We don't need a reference to the tail anymore because our sentinel will know where it is. It may seem like there is a lot of book keeping in the code, but it is clean and it does make sense. I do suggest drawing out an example and seeing what is happening to the references. I do a lot of cleaning up to make sure that old nodes get garbage collected. DList with a sentinel
public class DList { private Node sentinel; private int size; public DList() { sentinel = new Node(null, null, null); sentinel.next = sentinel; sentinel.prev = sentinel; size = 0; } public void insertFront(Object item) { sentinel.next = new Node(item, sentinel.next, sentinel); sentinel.next.next.prev = sentinel.next; size++; } public void insertBack(Object item) { sentinel.prev = new Node(item, sentinel, sentinel.prev); sentinel.prev.prev.next = sentinel.prev; size++; } public void removeFront() { sentinel.next = sentinel.next.next; sentinel.next.prev.prev = null; sentinel.next.prev.next = null; sentinel.next.prev = sentinel; size--; } public void removeBack() { sentinel.prev = sentinel.prev.prev; sentinel.prev.next.prev = null; sentinel.prev.next.next = null; sentinel.prev.next = sentinel; size-- } public int size() { return size; } } |


TEN COMMANDMENTS OF ARYA SAMAJ
- God is the primary source of all true knowledge and of all that can be known through it.
- God is existent, intelligent and blissful. He is formless, almighty, just, merciful, unborn, infinite, unchallengeable, beginningless, incomparable, the support and lord of all, omniscient, imperishable, immortal, fearless, eternal, holy and the maker of the universe. To him alone the worship is due.
- The Vedas are scriptures of true knowledge. It is the duty of all Aryas to read them, hear them and read and recite them to others.
- We should always be ready to accept truth and give up untruth.
- All actions should be performed in conformity with Dharma i.e. after due consideration of right and wrong.
- The primary aim of the Arya Samaj is to do good for all i.e. promote their physical, spiritual and social well-being.
- We should treat all people with love, fairness and give due regard for their merit.
- We should aim at dispelling ignorance and promoting knowledge.
- One should not only be content with one's welfare, but should look for it in the welfare of others also.
- One should regard oneself under restriction to follow altruistic rulings of society, while in following rules of individual welfare, all should be free.
|


Have
Fun
Dear sweet user, we know that some people enjoys watching videos and hearing fun audios and use this method to take their mind of things,we hope you enjoy 😇.


public interface WorkEvent
Work
,
FlowableWork
| Modifier and Type | Method and Description |
|---|---|
void |
block()
Blocking until internal work process complete.
|
boolean |
callback(WorkEvent event)
Set an instance of WorkEvent for callback.
|
void |
complete()
execute method if you want to ternminate internal work process.
|
void |
copyTo(WorkEvent event)
Copy internal information to another Event object.
|
int |
count() |
WorkEvent |
createChild(String eventName)
Creates a child object of the object.
|
WorkEvent |
filter(WorkEventPredicate tester)
Set an instance of WorkEventPredicate for filtering process.
|
Object |
get(String key)
Returns the object bound with the specified name in this session,
or null if no object is bound under the name.
|
Activity |
getActivity()
Returns the Activity object.
|
AtomicInteger |
getCounter(String key) |
DoubleStream |
getDoubleStream()
Returns double stream, if internal work process produces stream.
|
String |
getEventName()
Returns the event name.
|
String |
getFireEventName()
Returns name of fire event.
|
long |
getFireTime()
Returns the valid time at which the event occurs.
|
IntStream |
getIntStream()
Returns integer stream, if internal work process produces stream.
|
LongStream |
getLongStream()
Returns long stream, if internal work process produces stream.
|
Object |
getResult()
Returns result object for internal process.
|
Stream |
getStream()
Return data stream.
|
Throwable |
getThrowable()
Returns error information.
|
Thread |
getTimeoutThread() |
WorkEvent |
origin()
Returns the earliest event among the events associated with the current event.
|
WorkEvent |
put(String key,
Object value)
Set additional custom attribute values.
|
Object |
remove(String key)
Delete the attribute value.
|
void |
reset() |
void |
setActivity(Activity activity)
Set the Activity object.
|
WorkEvent |
setFireEventName(String eventName)
Set name of fire event.
|
WorkEvent |
setFireTime(long time)
Defines the valid time at which the event occurs.
|
WorkEvent |
setThrowable(Throwable e)
Set error information.
|
WorkEvent |
setTimeoutThread(Thread thread) |
WorkEvent |
subscribe(WorkEventConsumer consumer)
Set an instance or WorkEventConsumer for receiving result.
|
String getEventName()
int count()
void setActivity(Activity activity)
activity
- instance of ActivityActivity getActivity()
WorkEvent put(String key, Object value)
key
- the key name to which the object is bound; cannot be nullvalue
- the object to be boundObject get(String key)
key
- a string specifying the name of the objectObject remove(String key)
key
- the name of the object to remove from this sessionvoid reset()
AtomicInteger getCounter(String key)
void copyTo(WorkEvent event)
event
- an instance of WorkEvent that want to copyWorkEvent createChild(String eventName)
eventName
- name of eventWorkEvent origin()
WorkEvent setThrowable(Throwable e)
e
- Throwable errorThrowable getThrowable()
Thread getTimeoutThread()
WorkEvent setFireTime(long time)
time
- the milliseconds since January 1, 1970, 00:00:00 GMT.long getFireTime()
String getFireEventName()
WorkEvent setFireEventName(String eventName)
eventName
- name of eventObject getResult()
Stream getStream()
IntStream getIntStream()
LongStream getLongStream()
DoubleStream getDoubleStream()
WorkEvent filter(WorkEventPredicate tester)
tester
- an instance of WorkEventPredicateWorkEvent subscribe(WorkEventConsumer consumer)
consumer
- an instance of WorkEventConsumerboolean callback(WorkEvent event)
event
- an instance of WorkEventvoid complete()
void block()
Copyright © 2018–2019. All rights reserved.


I graduated from the University of California in March 2016, majoring in computer game science.
I work as a full time web developer and project manager at The Portal. I develop web applications, communicate deadlines and deliverables to our clients, and manage our developers to keep everything on schedule.
I was formerly the Vice President of the Video Game Development Club @ UCI, where I work with industry and faculty to introduce students to game development and hone their talents.
I also was a former board member of TAO @ UCI, where I redesigned and managed their website, and organized events for a club of 50+ active members to promote Taiwanese Culture.
I also handled sponsorships and event logistics as part of the organizing board of HackUCI 2014, which was UCI's first hackathon.
Aiming for my next 12 arena win run in Hearthstone.
I'm currently obsessively farming field bosses in Blade and Soul for vanity accessories.
Working on my side project, which allows students to put up items they don't need for free and allow the community to benefit.


Comparison
Differences between TomEE versions and/or flavors
Detailed list of Java EE 7.0 and MicroProfile 1.4 specifications
| Specifications | Tomcat | TomEE WebProfile | TomEE MicroProfile | TomEE Plus | TomEE Plume |
|---|---|---|---|---|---|
Java Annotations 1.2 |
|||||
Java Authentication (JASPIC) 1.1 |
|||||
Java Servlet 3.1 |
|||||
Java Server Pages (JSP) 2.3 |
|||||
Java Expression Language (EL) 3.0 |
|||||
Java WebSocket 1.1 |
|||||
Java Activation 1.2 |
|||||
Java Contexts and Dependency Injection (CDI) 1.1 |
|||||
Java Dependency Injection (@Inject) 1.0 |
|||||
Java Enterprise Beans (EJB) 3.2 |
|||||
Java Server Faces (JSF) 2.2 |
|||||
Java JSON Binding (JSON-B) |
|||||
Java JSON Processing (JSON-P) 1.0 |
|||||
Java Mail (JavaMail) 1.5 |
|||||
Java Persistence (JPA) 2.1 |
|||||
Java RESTful Web Services (JAX-RS) 2.0 |
|||||
Java Security (Enterprise Security) * |
|||||
Java Standard Tag Library (JSTL) * 1.2 |
|||||
Java Transactions (JTA) 1.2 |
|||||
Java XML Binding (JAXB) 2.2 |
|||||
Java Authorization (JACC) 1.5 |
|||||
Java Batch (JBatch) 1.0 |
|||||
Java Concurrency 1.0 |
|||||
Java Connectors 1.7 |
|||||
Java Messaging (JMS) 2.0 |
|||||
Java SOAP with Attachments (SAAJ) 1.3 |
|||||
Java Web Services Metadata (JWS) 2.0 |
|||||
Java XML Web Services (JAX-WS) 2.2 |
|||||
Java Server Faces (JSF) implementation |
MyFaces |
MyFaces |
MyFaces |
Mojarra |
|
Java Persistence (JPA) implementation(s) |
OpenJPA |
OpenJPA |
OpenJPA |
OpenJPA, EclipseLink |
-
Please note that Tomcat does not ship with the jars for Standard Tag Library (JSTL) nor the javax.security.enterprise.* packages.
Implementations of Java EE and MicroProfile features in TomEE 7.1.x
| Specifications | Implementations included by TomEE 7.1.x |
|---|---|
Java Servlet, Server Pages (JSP), Expression Language (EL), |
|
Java Standard Tag Library (JSTL) |
|
Java Server Faces (JSF) |
Apache MyFaces (shipped in all TomEE flavors except Plume) |
Java Contexts and Dependency Injection (CDI) |
|
Java Enterprise Beans (EJB) |
|
Java Transactions (JTA) |
Apache Geronimo Transaction Manager |
Java Persistence (JPA) |
Apache OpenJPA (shipped in all TomEE flavors) |
Java Bean Validation |
|
Web Services |
|
Java JSON Processing (JSON-P) |
|
Java XML Binding (JAXB) |
|
Java Mail (JavaMail) |
Apache Geronimo JavaMail |
MicroProfile |
Apache Geronimo MicroProfile (ok with TomEE 7.1.x and 8.x) |
Java Batch (JBatch) |
|
Java Messaging (JMS) |
In bold : Implementations that differ between flavors or between versions


Requirements :
Please identify and describe yourself:
Choose one of the following options:
I don't know?! Radio TV Film
Greece Italy France Spain
How would you rate your knowledge of JavaScript?
1 2 3 4 5
Return


(Paper report) Harvest/Yield
This is part of a series of posts I’m writing for my version of NaNoWriMo, where I summarize/review papers I’ve read recently.
-
Armando Fox & Eric Brewer. Harvest, Yield, and Scalable Tolerant Systems. (Hot Topics in Operating Systems, 1999)
-
tl;dr: characterize graceful degradation mechanisms in terms of harvest (the fraction of data reflected in the response) and yield (the probability of completing a request)
Overview
Coda Hale’s blog post on partition tolerance1 summarizes this beautifully, so I’m just going to pull from him.
Despite your best efforts, your system will experience enough faults that it will have to make a choice between reducing yield (i.e., stop answering requests) and reducing harvest (i.e., giving answers based on incomplete data). This decision should be based on business requirements.
The easiest/default error-handling setup degrades the system entirely (affecting the yield). Instead, Fox and Brewer suggest an alternative approach to increasing availability: mapping faults to a reduction in the amount of data a system operates on – in other words, by weakening the consistency guarantees of your system.
It’s really easy to point to the CAP theorem and assert that systems can’t have both strong consistency and availability, ending the discussion there. While some systems absolutely can’t tolerate imperfect/degraded answers, there are a wide variety of systems that can tolerate some other point on the consistency spectrum, especially for queries. Clearly defining consistency/availability goals, especially for a system composed of many independent services, is crucial to improving availability.
- yield = requests completed successfully / total requests
- note: yield is related to uptime, but deals with the number of queries missed, not just time down. (Being down for 10 minutes on Cyber Monday is not the same as being down for 10 minutes at 3 AM on a Tuesday.)
- harvest = data in response / complete data
- for example: if 1% of a sharded data store goes down, the request drops 1% of the data it would have returned otherwise, giving it 99% harvest.
Our approaches tolerate partial failures by emphasizing simple composition mechanisms that promote fault containment, and by translating partial failure modes into engineering mechanisms that provide smoothly-degrading functionality rather than lack of availability of the service as a whole.
The authors begin by talking about harvest degradation mechanisms within a single monolithic system (responding to failures by operating on partial data), and about harvest degradation in a system composed of many independent services.
Reducing harvest: probabilistic availability
(note: there’s not much I can say here that hasn’t been said better by Coda1, especially starting from “A Readjustment In Focus”)
Nearly all systems are probabilistic whether they realize it or not. … Availability maps naturally to probabilistic approaches.
A point that I found interesting in here: replicating all data (not just highly-accessed data) might have relatively little impact on harvest/yield. Temporary loss of data that isn’t heavily accessed is unlikely to show up in yield numbers, since it’s unlikely that requests were made against that data, anyway.
The authors also mention trading off latency for harvest – a system can declare with some confidence that it’s received enough data to make a satisfactory response, without waiting on straggler information, which reminded me of the watermarks in Google’s Millwheel pipeline.2
Reducing harvest: compartmentalization
Some large applications can be decomposed into subsystems that are independently intolerant to harvest degradation (ie, they fail by reducing yield), but whose independent failure can allows the overall application to continue functioning with reduced utility.
Fox and Brewer emphasize orthogonal system design in this paper. A system with orthogonal services is composed of mechanisms that have essentially no runtime interface to each other. They cite Nancy Leveson’s claim3 that “most failures in complex systems result from unexpected inter-component interaction, rather than intra-component bugs.”
Compartmentalization4 is a related concept from fire safety codes. It divides a building into several independent compartments that can be isolated in case of a fire, allowing continuing operations and damage containment. I like to think of building fire doors between services: clear entry/exit points with protection mechanisms that can be enabled to contain the spread of system fires. This could be something like circuit-breaker code to shed load in the case of dependent systems, or designing services that can entirely down without affecting the operation of another. If a service errors downstream, it’s easy to throw up hands and error out the whole system. Error-handling code is tricky to write, and far enough off the execution path that it’s rarely tested, which is where gamedays and kill -9
tests5 come into play.
Related Papers (where to go from here)
This is what I’ve read so far. Happy to hear suggestions!
- You Can’t Sacrifice Partition Tolerance. Coda Hale.
- mostly what it says on the tin. Plus thoughts about evaluating systems by their CAP properties.
- Towards robust distributed systems, Brewer’s 2000 PODC keynote.
- A fairly comprehensive overview of CAP, its tradeoffs, and its applications to distributed systems design. (as a bonus: also a decent overview of the next 2 papers.)
- Lessons from giant-scale services. Brewer.
- Suggests the data/query corollary to harvest/yield: harvest * yield ~ constant
- CAP twelve years later. Brewer.
- How folks have (mis)applied the CAP theorem to distributed system design over the last twelve years. Also: partitions are defined by latency guarantees, and eventual consistency is a thing.
footnotes
-
MillWheel’s watermark is a lower bound (often heuristically established) on event times that have been processed by the pipeline, used to determine how complete the pipeline’s view of the world is at a certain time. ↩
-
Her book’s on Amazon. This sounds like a series of case studies, which is the best! I love scary systems cautionary tales. ↩
Comments


A system to automate part of the collaborative ontology development process. Given a repository with an owl file, Ontoology will survey it and produce diagrams, a complete documentation and validation based on common pitfalls.
| Repository | Status | Log file | Last used | ar2dtool | OOPS | Widoco |
| ahmad88me/target | Ready | log | May 11, 2015, 12:55 a.m. | |||


|
First of all you choose a option from menu bar. |
|
If you want to Exit the Calendar click on ' = ' sign pop up menu will appear click on ' Exit ' . |
|
To check the Christian date of a year click on ' Christian ' in menu bar pop up will appear click on ' Year or Month ' and it will display the Calendar of that year or month. |
|
To check the Current year click on ' Current ' in menu bar pop up will appear click on ' Year or Month ' and it will display the Calendar of the year or month. |
|
To check the Shak date of a year click on ' Shak ' in menu bar pop up will appear click on ' Year or Month ' and it will display the Calendar of that year or month with Christian date. |
|
To check the Vikarmi date of a year click on ' Vikarmi ' in menu bar pop up will appear click on ' Year or Month ' and it will display the Calendar of that year or month with Christian date. |
|
To check the Holiday click on ' Holiday ' in menu bar pop up will appear click on ' Year or Month ' and it will display the Holiday of that year or month. |
|
To check the current date and time click on ' Timing ' in menu bar pop up will appear click on ' Date or Time ' it will display the date or time. |
|
At last for help click on ' Help 'in menu bar pop up will be appear click on ' Help it will display help. |


I have two classes: "base" and either "condition-true" or "condition-false" depending on a server-side condition.
This HTML is duplicated. We probably want a better solution. This HTML is duplicated. We probably want a better solution.
This HTML is consolidated, which is good, but the Thymeleaf attribute still has some redundancy in it.
The base CSS class still has to be appended with String concatenation. We can do a little bit better.
This HTML is consolidated, and the conditional class is appended separately from the static base class.


[ascent CAT] Question 4
the day - Races - June 30,
03
Hi
The question for the day is
from the topic Races.
A gives B a start of 30
seconds in a km race and still beats him by 20 m.
However, when he gives B a start of 35 seconds, they
finish the race in a dead heat. How long does A take to
run the km?
On
this web page, click on the link that corresponds to the
month of June 2003. You will find all the questions 4
the day for the month of June in this
page.
Cheers
K S
Baskar Director
Ascent Education An IIM
Alumni Venture Classes for CAT - XAT - GRE -
GMAT No. 14-B/1, Dr. Thirumurthy Nagar 1st
Street Nungambakkam Chennai 600 034 Phone 91 -
44 - 5213 7211 http://www.ascenteducation.com/


An event which fires when cancellation is requested. This event only ever fires once as cancellation can only happen once. Listeners that are registered after cancellation will be called (next event loop run), but also only once.
once
A flag signalling is cancellation has been requested.
Generated using TypeDoc
An event which fires when cancellation is requested. This event only ever fires
once
as cancellation can only happen once. Listeners that are registered after cancellation will be called (next event loop run), but also only once.


Ludum Dare 27: "10 Seconds" Entry
Last weekend I submitted my new game, Out of Breath, for the 27th Ludum Dare competition; the first ever I’ve found the time to finish for Ludum Dare. Written in JavaScript from scratch with zero libraries!
Here are some screenshots:
Searching for the Treasure
Waiting for some Bubbles
Chilling in a Cavern
Skirting Stalagmites and Stalactites
You can play the game here too if you want; just scroll down. Controls are WASD or arrow keys. The game has been tested in Chrome and FireFox, but I recommend Chrome since it seems to give me a faster frame rate.
If the game seems impossibly hard, it only means that you were very, very, VERY unlucky. Refresh the page to generate a more normal distribution of flora. Art and sound are quite lacking to say the least, but the game does have an “ending” so don’t give up! I’ll definitely continue working on it after the LD27.
The source code can either be viewed within your browser the standard way (it is entirely unobfuscated although not very commented) or downloaded in a zip file. It’s not open source yet though so please don’t steal. ;)
Enjoy!


Hong Kong’s pride parade downgraded to ‘public meeting’ as protests swirl
by The Online CitizenPolice have downgraded Hong Kong’s annual gay pride parade to a stationary rally, organisers said Thursday, after police banned the traditionally boisterous and colourful march through the territory as pro-democracy protests engulf the city.
Police allowed the Saturday afternoon event on condition it takes the “form of a public meeting” and not a march, Hong Kong Pride Parade said in a statement on Facebook.
The event will be held across the afternoon at a public square on Hong Kong island.
The move comes with violence spiking as protests enter a sixth month, with protesters bringing much of Hong Kong to a standstill since Monday.
Prominent LGBT lawmaker Ray Chan decried the ban on the parade through the city’s commercial heart — the key element to a global tradition celebrating equality.
“The pride parade has always been orderly, peaceful and well-disciplined,” he said.
“There is no reason for the police to reject the pride parade application… It has nothing to do with the recent protests.”
The event has previously been held in a carnival-like atmosphere with members of the lesbian, gay, bisexual and transgender community and supporters parading through the city centre.
Foreign embassy officials, tourists and city’s lawmakers have participated in parades in recent years in an Asian city renowned for its relatively progressive values.
The parade is the latest casualty in a growing list of banned, cancelled or postponed events in Hong Kong’s normally packed social calendar.
The WTA Hong Kong Open, Oxfam’s annual trail run fundraiser as well as concerts by acclaimed K-Pop acts and comedians have been pulled as the city reels from the protests.
Organisers of others such as music festival Clockenflap, which starts next Friday, have vowed to press ahead despite the political crisis.
– AFP


As a user, suggestions are hinted to me while searching for a country.
As a developer, build the UI (user interface) with keyboard events listening for each key press in the text input field. Send the input value to the autocomplete service and display the response to the user.
Sub-goal
As a developer, listen to the text input and display its value in the suggestion container for every character typed.
As a developer, listen to the text input, get the autocomplete service response (all countries), and output the response in the suggestion container.
As a developer, listen to the text input, pass the value to the autocomplete service, and output the filtered response in the suggestion container.
As a developer, I want the autocomplete suggestions to displayed as a bulleted list
As a developer, I want the autocomplete suggestions to be styled one per line with a surrounding outline with drop shadow.
As a user, I want to be notified when the autocomplete service is slow and forces me to wait
As a user, I want to use my keyboard to highlight autocomplete suggestions.


Select number of players in match
Select number of pocket/hole cards each player holds
Select number of community cards
Select minimum shuffle time before cards assignment
Select number of players in match
Select number of pocket/hole cards each player holds
Select number of community cards
Select minimum shuffle time before cards assignment
Player1's Pocket Cards
Player2's Pocket Cards
Player3's Pocket Cards
Player4's Pocket Cards
Player5's Pocket Cards
Player6's Pocket Cards
Player1's Best Hand
Player2's Best Hand
Player3's Best Hand
Player4's Best Hand
Player5's Best Hand
Player6's Best Hand