This document describes the format and syntax for Android code templates. These templates provide starting points for entire projects (e.g. NewAndroidApplication
) or application components such as activities (e.g. BlankActivity
).
Although these templates were originally introduced in the ADT Plugin for Eclipse, the template format is designed for use by any IDE or command-line tool.
Templates are customizable. Each template exposes several options (called parameters) that allow developers to customize the generated code. The most common workflow for using a template is as follows:
Templates make heavy use of FreeMarker, a Java templating engine used to enable things like control flows and variable substitutions inside files. It's similar to PHP, Django templates, etc. For those more acquainted with C/C++, think of it as a preprocessor language (i.e. #ifdef
).
By convention, any file in the template directory structure that is to be processed by FreeMarker should have the .ftl
file extension. So if one of your source files is MyActivity.java
, and it contains FreeMarker instructions, it should be named something like MyActivity.java.ftl
.
For more documentation on FreeMarker, see the docs. In particular, the reference on string operations.
An example, templated version of an Android manifest, normally named AndroidManifest.xml.ftl
is shown below.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> <application> <activity android:name="${packageName}.${activityClass}" android:parentActivityName="${parentActivityClass}" android:label="@string/title_${activityToLayout(activityClass)}"> <#if parentActivityClass != ""> <meta-data android:name="android.support.PARENT_ACTIVITY" android:value="${parentActivityClass}" /> </#if> <#if isLauncher> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </#if> </activity> </application> </manifest>
In this example excerpt from the BlankActivity
template:
${activityClass}
is bound to the value of the 'Activity Class' template parameter.${activityToLayout(activityClass)}
uses the activityToLayout
method built into the template engine to convert an activity class such as MyFooActivity
to activity_my_foo
.isLauncher
boolean variable and parentActivityClass
string variables are bound to the values of the 'Launcher Activity' and 'Hierarchical Parent' template parameter, respectively.A template is a directory containing a number of XML and FreeMarker files. The only two mandatory files are template.xml
and recipe.xml.ftl
. Template source files (PNG files, templated Java and XML files, etc.) belong in a root/
subdirectory. An example directory structure for a template is below:
More on the role of each of these files is discussed in the sections below.
Each template directory must contain a template.xml
file. This XML file contains metadata about the template, including the name, description, category and user-visible parameters that the IDE will present as options to the user. The XML file also indicates the name of the recipe XML file (which gets processed by FreeMarker), and the global variables XML file if there are global variables besides the template parameter values that should be visible to all FreeMarker-processed files (.ftl
files).
An example template.xml
is shown below.
<!-- A template for a blank activity. Use template format version 4, as described in this document. --> <template format="4" revision="2" minApi="7" minBuildApi="16" name="Blank Activity" description="Creates a new blank activity, with navigation."> <!-- A string parameter; the value is available to FreeMarker processed files (.ftl files) as ${activityName}. --> <parameter id="activityClass" name="Activity Name" type="string" constraints="class|unique|nonempty" suggest="${layoutToActivity(layoutName)}" default="MainActivity" help="The name of the activity class to create." /> <parameter id="layoutName" name="Layout Name" type="string" constraints="layout|unique|nonempty" suggest="${activityToLayout(activityClass)}" default="activity_main" help="The name of the layout to create for the activity" /> <parameter id="navType" name="Navigation Type" type="enum" default="none" help="The type of navigation to use for the activity"> <option id="none">None</option> <option id="tabs" minApi="11">Tabs</option> <option id="pager" minApi="11">Swipe Views</option> <option id="dropdown" minApi="11">Dropdown</option> </parameter> <parameter id="fragmentName" name="Fragment Name" type="string" constraints="class|unique|nonempty" default="MainFragment" visibility="navType != 'none'" help="The name of the fragment class to create" /> <!-- 512x512 PNG thumbnails. --> <thumbs> <!-- Default thumbnail. --> <thumb>template_default.png</thumb> <!-- Attributes act as selectors based on chosen parameters. --> <thumb navType="tabs">template_tabs.png</thumb> <thumb navType="dropdown">template_dropdown.png</thumb> </thumbs> <!-- Optional global variables. --> <globals file="globals.xml.ftl" /> <!-- Required recipe (script) to run when instantiating the template. --> <execute file="recipe.xml.ftl" /> </template>
Below is a listing of supported tags in template.xml
.
The template root element.
format
4
.revision
name
description
minApi
minSdkVersion
no lower than this value before instantiating the template.minBuildApi
This tag is deprecated for use in template.xml
. Use <dependency>
in recipe.xml.ftl
instead.
Indicates that the template requires that a given library be present in the target project. If not present, the IDE will add the dependency to the project.
name
android-support-v4
android-support-v13
revision
The template type. This element is optional.
value
Applications
Activities
UI Components
Defines a user-customizable template parameter.
id
foo
, the parameter value will be available in FreeMarker files as ${foo}
.name
type
string
, boolean
, enum
, or separator
.constraints
|
. Valid constraint types are: nonempty
— the value must not be emptyapilevel
— the value should represent a numeric API levelpackage
— the value should represent a valid Java package nameapp_package
— the value should represent a valid Android app package namemodule
— the value should represent a valid Module nameclass
— the value should represent a valid Java class nameactivity
— the value should represent a fully-qualified activity class namelayout
— the value should represent a valid layout resource namedrawable
— the value should represent a valid drawable resource namestring
— the value should represent a valid string resource nameid
— the value should represent a valid id resource nameunique
— the value must be unique; this constraint only makes sense when other constraints are specified, such as layout
, which would mean that the value should not represent an existing layout resource nameexists
— the value must already exist; this constraint only makes sense when other constraints are specified, such as layout
, which would mean that the value should represent an existing layout resource namesuggest
suggest
against each other's values, but these expressions are only updated for non-edited values, so this approach lets the user edit either parameter value, and the other will automatically be updated to a reasonable default.default
visibility
help
For parameters of type enum
, represents a choice for the value.
id
minApi
minSdkVersion
no lower than this value before instantiating the template.[text]
Represents a thumbnail for the template. <thumb>
elements should be contained inside a <thumbs>
element. The text contents of this element represent the path to the thumbnail. If this element has any attributes, they will be treated as selectors for parameter values. For example, if there are two thumbnails:
<thumbs> <thumb>template.png</thumb> <thumb navType="tabs">template_tabs.png</thumb> </thumbs>
The template 'preview' thumbnail will show template_tabs.png
if the value of the navType
template parameter is tabs
and template.png
otherwise.
States that the template would like the Asset Studio icon creation tool of the given type to run, and save the output icons with the given name.
type
notification
, actionbar
, launcher
.name
ic_stat_my_notification
.The optional globals XML file contains global variable definitions, for use in all FreeMarker processing jobs for this template.
An example globals.xml.ftl
is shown below.
<globals> <global id="srcOut" value="src/${slashedPackageName(packageName)}" /> <global id="activityNameLower" value="${activityName?lower_case}" /> <global id="activityClass" value="${activityName}Activity" /> </globals>
The recipe XML file contains the individual instructions that should be executed when generating code from this template. For example, you can copy certain files or directories (the copy instruction), optionally running the source files through FreeMarker (the instantiate instruction), and ask the IDE to open a file after the code has been generated (the open instruction).
Note: The name of the recipe file is up to you, and is defined in template.xml
. By convention, however, it's best to call it recipe.xml.ftl
.
Note: The global variables in globals.xml.ftl
are available for use in recipe.xml.ftl
.
An example recipe.xml.ftl
is shown below.
<recipe> <#if appCompat?has_content> <dependency mavenUrl="com.android.support:appcompat-v7:+"/> </#if> <!-- runs FreeMarker, then copies from [template-directory]/root/ to [output-directory], automatically creating directories as needed. --> <merge from="AndroidManifest.xml.ftl" to="${escapeXmlAttribute(manifestDir)}/AndroidManifest.xml" /> <!-- simply copy file, don't run FreeMarker --> <copy from="res/drawable-mdpi" to="${escapeXmlAttribute(resDir)}/res/drawable-mdpi" /> <copy from="res/drawable-hdpi" to="${escapeXmlAttribute(resDir)}/res/drawable-hdpi" /> <copy from="res/drawable-xhdpi" to="${escapeXmlAttribute(resDir)}/res/drawable-xhdpi" /> <copy from="res/drawable-xxhdpi" to="${escapeXmlAttribute(resDir)}/res/drawable-xxhdpi" /> <copy from="res/menu/main.xml" to="${escapeXmlAttribute(resDir)}/res/menu/${activityNameLower}.xml" /> <!-- run FreeMarker and then merge with existing files --> <merge from="res/values/dimens.xml" to="${escapeXmlAttribute(resDir)}/res/values/dimens.xml" /> <merge from="res/values-large/dimens.xml" to="${escapeXmlAttribute(resDir)}/res/values-large/dimens.xml" /> <merge from="res/values/styles.xml" to="${escapeXmlAttribute(resDir)}/res/values/styles.xml" /> <merge from="res/values/strings.xml.ftl" to="${escapeXmlAttribute(resDir)}/res/values/strings.xml" /> <!-- Decide which layout to add --> <#if navType?contains("pager")> <instantiate from="${escapeXmlAttribute(resDir)}/res/layout/activity_pager.xml.ftl" to="${escapeXmlAttribute(resDir)}/res/layout/activity_${activityNameLower}.xml" /> <#elseif navType == "tabs" || navType == "dropdown"> <copy from="${escapeXmlAttribute(resDir)}/res/layout/activity_fragment_container.xml" to="${escapeXmlAttribute(resDir)}/res/layout/activity_${activityNameLower}.xml" /> <#else> <copy from="${escapeXmlAttribute(resDir)}/res/layout/activity_simple.xml" to="${escapeXmlAttribute(resDir)}/res/layout/activity_${activityNameLower}.xml" /> </#if> <!-- Decide which activity code to add --> <#if navType == "none"> <instantiate from="src/app_package/SimpleActivity.java.ftl" to="${escapeXmlAttribute(srcOut)}/${activityClass}.java" /> <#elseif navType == "pager"> <instantiate from="src/app_package/PagerActivity.java.ftl" to="${escapeXmlAttribute(srcOut)}/${activityClass}.java" /> <#elseif navType == "tabs"> <instantiate from="src/app_package/TabsActivity.java.ftl" to="${escapeXmlAttribute(srcOut)}/${activityClass}.java" /> <#elseif navType == "dropdown"> <instantiate from="src/app_package/DropdownActivity.java.ftl" to="${escapeXmlAttribute(srcOut)}/${activityClass}.java" /> </#if> <!-- open the layout file and Java class when done --> <open file="${escapeXmlAttribute(resDir)}/res/layout/${activityNameLower}.xml" /> <open file="${escapeXmlAttribute(srcOut)}/${activityClass}.java" /> </recipe>
The instructions below are supported:
Indicates that the template requires that a given library be present in the target project. If not present, the IDE will add the dependency to the project.
mavenUrl
com.android.support:appcompat-v7:+
The only required argument is from
which specifies the location of the source files to copy under the root/
directory. All necessary ancestor directories are automatically created if needed.
The default destination location is the same path under the output directory root (i.e. the location of the destination project). If the optional to
argument is provided, this specifies the output directory. Note that if the from path ends with .ftl
, it will automatically be stripped. For example <instantiate from="res/values/strings.xml.ftl" />
is adequate; this will create a file named strings.xml
, not strings.xml.ftl
.
This argument works recursively, so if from
is a directory, that directory is recursively copied.
Same as <copy>
, but each source file is first run through FreeMarker.
This instruction will run the source file through FreeMarker and then merge the contents of the output into an existing file in the project, or create a new file. The most common use case for this is to add components to the AndroidManifest.xml
file of the destination project, or to merge resources such as strings into an existing strings.xml
file.
Instruct the IDE to open the file created by the specified file
argument after code generation is complete.
Ensures the directory provided in the at
argument exists.
The actual template files (resources, Java sources, Android Manifest changes) should be placed in the root/
directory, in a directory structure that roughly resembles what the output directory structure should look like.
One difference is that instead of placing source files in src/com/google/...
you can just use a naming convention like src/app_package/
to indicate that files under this directory will be placed in the destination project's source file package root.
Several functions are available to FreeMarker expressions and files beyond the standard set of built-in FreeMarker functions. These are listed below.
This function converts an activity class-like identifer string, such as FooActivity
, to a corresponding resource-friendly identifier string, such as activity_foo
.
activityClass
FooActivity
to reformat.This function converts a camel-case identifer string, such as FooBar
, to its corresponding underscore-separated identifier string, such as foo_bar
.
camelStr
FooBar
to convert to an underscore-delimited string.This function escapes a string, such as foo=bar
such that it is suitable to be inserted in a Java .properties
file as a property value, such as foo\=bar
.
str
foo=bar
to escape to a proper property value.This function escapes a string, such as Android's
such that it can be used as an XML attribute value: Android's
. In particular, it will escape ', ", < and &.
str
This function escapes a string, such as A & B's
such that it can be used as XML text. This means it will escape < and >, but unlike escapeXmlAttribute
it will not escape ' and ". In the preceeding example, it will escape the string to A & B\s
. Note that if you plan to use the XML text as the value for a <string> resource value, you should consider using escapeXmlString
instead, since it performs additional escapes necessary for string resources.
str
This function escapes a string, such as A & B's
such that it is suitable to be inserted in a string resource file as XML text, such as A & B\s
. In addition to escaping XML characters like < and &, it also performs additional Android specific escapes, such as escaping apostrophes with a backslash, and so on.
str
Activity's Title
to escape to a proper resource XML value.This function extracts all the letters from a string, effectively removing any punctuation and whitespace characters.
str
This function converts an Android class name, such as FooActivity
or FooFragment
, to a corresponding resource-friendly identifier string, such as foo
, stripping the 'Activity' or 'Fragment' suffix. Currently stripped suffixes are listed below.
className
FooActivity
to reformat as an underscore-delimited string with suffixes removed.This function converts a resource-friendly identifer string, such as activity_foo
, to a corresponding Java class-friendly identifier string, such as FooActivity
.
resourceName
activity_foo
to reformat.This function converts a full Java package name to its corresponding directory path. For example, if the given argument is com.example.foo
, the return value will be com/example/foo
.
packageName
com.example.foo
.This function converts an underscore-delimited string, such as foo_bar
, to its corresponding camel-case string, such as FooBar
.
underStr
foo_bar
to convert to a camel-case string.Several parameters are available to FreeMarker expressions and files beyond those defined by the template. These are listed below.
The Java-style Android package name for the project, e.g. com.example.foo
Will be the application package (i.e. the package name declared in the app manifest) if the target package for this template is not the application package. Otherwise, this parameter will be empty.
A boolean indicating whether or not this template is being instantiated as part of a New Project flow.
The minimum API level the project supports. Note that this value could be a string so consider using minApiLevel
instead.
The minimum API level the project supports, guaranteed to be a number. This is generally used to guard the generation of code based on the project's API level, for example:
int drawableResourceId = android.R.layout.simple_list_item_<#if minApiLevel gte 11>activated_</#if>_1;
The API level that the project is building against, guaranteed to be a number. This is generally used to guard the generation of code based on what version of the Android SDK the project is being built against, for example:
<TextView android:layout_width="wrap_content" android:layout_height="<#if buildApi gte 8>match_parent<#else>fill_parent</#if>" />
The target output directory for the AndroidManifest.xml
file. This varies depending on the project's directory structure (Gradle-style or Ant-style).
The target Java source root directory for the project. This varies depending on the project's directory structure (Gradle-style or Ant-style). It's common to concatenate the package name:
${srcDir}/${slashedPackageName(packageName)}
The target resource directory root (res/
folder) for the project. This varies depending on the project's directory structure (Gradle-style or Ant-style).
When creating activity layouts, make sure to include the activity name in the root view in the layout as part of the tools
namespace, as shown in the following example:
<TextView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:gravity="center" android:text="@string/hello_world" android:padding="@dimen/padding_medium" tools:context=".${activityClass}" />
As of ADT 20 we use this attribute in layouts to maintain a mapping to the active activity to use for a layout. (Yes, there can be more than one, but this attribute is showing the activity context you want to edit the layout as. For example, it will be used to look up a theme registration (which is per-activity rather than per-layout) in the manifest file, and we will use this for other features in the future—for example to preview the action bar, which also requires us to know the activity context.


The Last Don
"Donnie Brasco" Al Pacino, Johnny Depp Dir. by Mike Newell Columbia Pictures, rel. 2-28-97 New to video in July review by Mike Rizzo
Anyone who has seen "The Godfather" can hardly deny the appeal of mob movies; the intricacies, the shady deals, the horror, and the explication of sheer machismo that is the legend of the Italian Mafia. As one who has seen more than a few of these films, it's usually a given that mob movies chronicle life at the top. "Donnie Brasco" takes a different approach, and the result is one of the best films of the genre since "Goodfellas". Director Mike Newell's saga of the infiltration of the lower-to-middle ranks of the mob by undercover FBI agent Joe Pistone is vivid, intense, and littered with memorable performances. Not the least of which, certainly are those authored by the film's stars. Johnny Depp is Pistone, a family man with a lovely wife (media darling and soon-to-be-superstar Anne Heche), beautiful children, and a happy home. Pistone, through his cover as jewelry appraiser Donnie brasco, aka "Don the Jeweler", comes into contact with aging hitman Lefty Ruggerio (Pacino). Donnie manages to win Lefty's trust by doing him a favor with an act of cunning and unexpected force. Impressed, Lefty decides to take "the Jeweler" under his wing. Once inside, Donnie begins a slow ascent through the ranks, encountering rising boss Sonny Black (Michael Madsen), and eventually becoming an integral part of his operation. The most intriguing part of the story, though, is the friendship which develops between Donnie and Lefty. Donnie listens to Lefty's gripes, he shares Christmas dinner with him, he visits him when his drug-addicted son is in the hospital. A very real bond is shared by the two men, a bond that begins to make Pistone question his true duty. He begins to feel the allure of the loyalty, honor, and blood ties which connect members of the mafia. As he and Lefty get closer, the characters of Joe Pistone and Donnie Brasco become more and more intertwined. Interestingly, the mentor-student relationship of Lefty and Donnie echoes somewhat in the pairing of Pacino and Depp. Depp, who has long been anointed Hollywood's next great dramatic actor, has up to this point made a career playing interesting roles in unorthodox films, a la "Edward Scissorhands", "Ed Wood", etc. Here, under Pacino's watch, he graduates to big-studio success. Depp is excellent as Pistone/Brasco, as he slowly loses the psychological boundary between the two. The most intense dramatic scenes inthe film are those between Depp and Heche, who is equally good as a woman in love with, and enraged, with, a man whom she no longer knows. Good actors abound, some in accustomed roles, others not. Madsen has got his trademark cocky-boy swagger in full effect as Sonny Black, a man cleary in love with his increasing power. Bruno Kirby, hysterical as Billy Crystal's sidekick in "When Harry Met Sally" and "City Slickers", exhibits some range as a mobster who isn't exactly on the level. The highest praise, though, should go to Pacino. Yes, there are reviews which have said, "We've seen this before". I disagree. Gone are the quiet calculation of Michael Corleone and the self-destructive rage of Tony Montana; Pacino's Lefty Ruggerio is a study in righteous indignation and painful resignation.  His increasing despair with his lot in life - a son who doesn't respect him, a basically dead-end job - is momentarily halted by the entrance of Donnie into his life, giving him a brief pause of hope, which is finally crushed. Pacino's performance should resonate with anyone who has experienced similar feelings. While the acting is first-rate across the board, I do have a few minor quibbles. The film's timeline is somewhat disjointed; long periods of time tend to pass between scenes, and the audience isn't always informed. More scenes of the sinking Pistone/Brasco with his children would have been nice as well, but that's somewhat picky. Also, there are a few elements of the plot which strain credibility just a little bit: Donnie seems to advance to an awfully high position without having to do too much that would get him sent to the gas chamber, if you know what I mean. Those are very minor points, and certainly no reason not to enjoy the final product. Paul Attanasio's screenplay is top-notch, and director Mike Newell shows that he can tiptoe his way from scenes of utterly abhorrent violence to very emotional drama with ease. It probably won't get him a trip to the Oscars, but after "Four Weddings and a Funeral", it proves that he certainly has an abundance of range. Speaking of Oscar, hopefully the film's winter release won't plunge it off of the proverbial radar screen; both Pacino and Depp are deserving of consideration. As Lefty would say, the Academy shouldn't "fuggedabowdit".
Stars: A Plot: B+ Script: B+
Overall: A-
Copyright 1997
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


Wrightsville Beach, North Carolina
At Uncle Vinny's we are dedicated to bring the best quality ingredients.


prescriptions (.) Inappropriate use PIMs patients drug prescription PIM study hospital inappropriate number Omissions potentially POPI PPO community drugs prescribing treatment {border-style years children criteria disorders px;} treat #ffffff;} case tool used adverse age paediatric Arch detected PPOs acute clinical prevalence risk years Clin medication oral France French Paris [], analysed associated elderly nasal on. otitis prescribed months Hospital II-. absence age. antibiotic combination containing data first-line manuscript medications II- Child EI-. Omission Oral Pharmacol Robert-Debré administered detection identified impact omissions px; rate targeted {font-family (%) Dis Prescription Prot-Labarthe Table agents applied combined cough diagnosis effects factors font-size patient table using ./s--- AI-. Antibiotic KI-. Med PIMs, Pediatr Pediatrics: Pharmacy Prescriptions Society amoxicillin analysis care. decrease detect double; emergency events hospitalisation information medical old old. older patients. pharmacy population. presented prospective reactions review software solution vitamin Île-de-France Age Albaret Antibiotics FI-. Gallagher Number PPO. PPOs, Pédiatrie Ryan START Tool Topical according age.*† approved border-color border-width conducted corticosteroids different disorder domperidone doses evaluate event infection infections media milligram outpatients. population presents primary rehydration related reviewed setting. solid; total {font-style {font-weight (POPI) (except (max) (or ./archdischild-- ./j.-...x AP-HP, Ageing BI-. BMJ Choonara Clinical Criteria DI-. Data ENT, European Figure GI-. GI-: However, Int Intern No. O’Mahony Patients Prescribing QI-. STOPP Suppl TI-. acyclovir aged appropriate based bold bronchiolitis care cases courier; defined descriptive dose drugs, ear, em; epilepsy extracted figure final guidelines improve infants issued main management mean medicines nose observed pathologies prior prophylaxis pt;} settings. submitted. treatment. years, ‘%’


First, only the current employees would be involved in an early Alpha testing of the Heads-Up Surveillance system. This would allow the development team to get early and often feedback as to how the system is progressing, and the second “pair of eyes” would give a new perspective on how the system is operating. Also, this would give the developers a more intimate environment in which to test before opening the park to the public.
The next phase of user testing would be a Beta testing, in which select people from outside the organization are invited to come and test the touring system, specifically with the intent of testing the Heads-Up Surveillance system. This would occur before the park is fully open to give the developers time to present a fully-operational and high-quality product by opening day.
Lastly, once Cabezon opens, for a period of time tour guests would be randomly selected to fill out a survey of their experience with the Heads-Up Surveillance system. This would give the developers a greater insight of the experience of a much wider customer base, showing them what needs to be improved and what could possibly be added on in the next version of the system.


Drop-in Color Predictor
Color predictions for the an option customised color model dropped in to the project by the user.
Get Prediction
Image
Upload
Co-ordinate point
X
Y
Submit


Some useful functions for the matroid class.#
For direct access to the methods newlabel()
, setprint()
and
get_nonisomorphic_matroids()
, type:
sage: from sage.matroids.advanced import *
See also sage.matroids.advanced
.
AUTHORS:
Stefan van Zwam (2011-06-24): initial version
- sage.matroids.utilities.get_nonisomorphic_matroids(MSet)#
Return non-isomorphic members of the matroids in set
MSet
.For direct access to
get_nonisomorphic_matroids
, run:sage: from sage.matroids.advanced import *
INPUT:
MSet
– an iterable whose members are matroids.
OUTPUT:
A list containing one representative of each isomorphism class of members of
MSet
.EXAMPLES:
sage: from sage.matroids.advanced import * sage: L = matroids.Uniform(3, 5).extensions() sage: len(list(L)) 32 sage: len(get_nonisomorphic_matroids(L)) 5
- sage.matroids.utilities.lift_cross_ratios(A, lift_map=None)#
Return a matrix which arises from the given matrix by lifting cross ratios.
INPUT:
A
– a matrix over a ringsource_ring
.lift_map
– a python dictionary, mapping each cross ratio ofA
to some element of a target ring, and such thatlift_map[source_ring(1)] = target_ring(1)
.
OUTPUT:
Z
– a matrix over the ringtarget_ring
.
The intended use of this method is to create a (reduced) matrix representation of a matroid
M
over a ringtarget_ring
, given a (reduced) matrix representation ofA
ofM
over a ringsource_ring
and a maplift_map
fromsource_ring
totarget_ring
.This method will create a unique candidate representation
Z
, but will not verify ifZ
is indeed a representation ofM
. However, this is guaranteed if the conditions of the lift theorem (see [PvZ2010]) hold for the lift map in combination with the matrixA
.For a lift map \(f\) and a matrix \(A\) these conditions are as follows. First of all \(f: S \rightarrow T\), where \(S\) is a set of invertible elements of the source ring and \(T\) is a set of invertible elements of the target ring. The matrix \(A\) has entries from the source ring, and each cross ratio of \(A\) is contained in \(S\). Moreover:
\(1 \in S\), \(1 \in T\);
for all \(x \in S\): \(f(x) = 1\) if and only if \(x = 1\);
for all \(x, y \in S\): if \(x + y = 0\) then \(f(x) + f(y) = 0\);
for all \(x, y \in S\): if \(x + y = 1\) then \(f(x) + f(y) = 1\);
for all \(x, y, z \in S\): if \(xy = z\) then \(f(x)f(y) = f(z)\).
Any ring homomorphism \(h: P \rightarrow R\) induces a lift map from the set of units \(S\) of \(P\) to the set of units \(T\) of \(R\). There exist lift maps which do not arise in this manner. Several such maps can be created by the function
lift_map()
.See also
EXAMPLES:
sage: # needs sage.graphs sage: from sage.matroids.advanced import lift_cross_ratios, lift_map, LinearMatroid sage: R = GF(7) sage: to_sixth_root_of_unity = lift_map('sru') # needs sage.rings.number_field sage: A = Matrix(R, [[1, 0, 6, 1, 2],[6, 1, 0, 0, 1],[0, 6, 3, 6, 0]]) sage: A [1 0 6 1 2] [6 1 0 0 1] [0 6 3 6 0] sage: Z = lift_cross_ratios(A, to_sixth_root_of_unity) # needs sage.rings.finite_rings sage.rings.number_field sage: Z # needs sage.rings.finite_rings sage.rings.number_field [ 1 0 1 1 1] [-z + 1 1 0 0 1] [ 0 -1 1 -z + 1 0] sage: M = LinearMatroid(reduced_matrix=A) sage: sorted(M.cross_ratios()) [3, 5] sage: N = LinearMatroid(reduced_matrix=Z) # needs sage.rings.finite_rings sage.rings.number_field sage: sorted(N.cross_ratios()) # needs sage.rings.finite_rings sage.rings.number_field [-z + 1, z] sage: M.is_isomorphism(N, {e:e for e in M.groundset()}) # needs sage.rings.finite_rings sage.rings.number_field True
- sage.matroids.utilities.lift_map(target)#
Create a lift map, to be used for lifting the cross ratios of a matroid representation.
See also
INPUT:
target
– a string describing the target (partial) field.
OUTPUT:
a dictionary
Depending on the value of
target
, the following lift maps will be created:“reg”: a lift map from \(\GF3\) to the regular partial field \((\ZZ, <-1>)\).
“sru”: a lift map from \(\GF7\) to the sixth-root-of-unity partial field \((\QQ(z), <z>)\), where \(z\) is a sixth root of unity. The map sends 3 to \(z\).
“dyadic”: a lift map from \(\GF{11}\) to the dyadic partial field \((\QQ, <-1, 2>)\).
“gm”: a lift map from \(\GF{19}\) to the golden mean partial field \((\QQ(t), <-1,t>)\), where \(t\) is a root of \(t^2-t-1\). The map sends \(5\) to \(t\).
The example below shows that the latter map satisfies three necessary conditions stated in
lift_cross_ratios()
EXAMPLES:
sage: from sage.matroids.utilities import lift_map sage: lm = lift_map('gm') # needs sage.rings.finite_rings sage.rings.number_field sage: for x in lm: # needs sage.rings.finite_rings sage.rings.number_field ....: if (x == 1) is not (lm[x] == 1): ....: print('not a proper lift map') ....: for y in lm: ....: if (x+y == 0) and not (lm[x]+lm[y] == 0): ....: print('not a proper lift map') ....: if (x+y == 1) and not (lm[x]+lm[y] == 1): ....: print('not a proper lift map') ....: for z in lm: ....: if (x*y==z) and not (lm[x]*lm[y]==lm[z]): ....: print('not a proper lift map')
- sage.matroids.utilities.make_regular_matroid_from_matroid(matroid)#
Attempt to construct a regular representation of a matroid.
INPUT:
matroid
– a matroid.
OUTPUT:
Return a \((0, 1, -1)\)-matrix over the integers such that, if the input is a regular matroid, then the output is a totally unimodular matrix representing that matroid.
EXAMPLES:
sage: from sage.matroids.utilities import make_regular_matroid_from_matroid sage: make_regular_matroid_from_matroid( # needs sage.graphs ....: matroids.CompleteGraphic(6)).is_isomorphic( ....: matroids.CompleteGraphic(6)) True
- sage.matroids.utilities.newlabel(groundset)#
Create a new element label different from the labels in
groundset
.INPUT:
groundset
– A set of objects.
OUTPUT:
A string not in the set
groundset
.For direct access to
newlabel
, run:sage: from sage.matroids.advanced import *
ALGORITHM:
Create a set of all one-character alphanumeric strings.
Remove the string representation of each existing element from this list.
If the list is nonempty, return any element.
Otherwise, return the concatenation of the strings of each existing element, preceded by ‘e’.
EXAMPLES:
sage: from sage.matroids.advanced import newlabel sage: S = set(['a', 42, 'b']) sage: newlabel(S) in S False sage: S = set('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789') sage: t = newlabel(S) sage: len(t) 63 sage: t[0] 'e'
- sage.matroids.utilities.sanitize_contractions_deletions(matroid, contractions, deletions)#
Return a fixed version of sets
contractions
anddeletions
.INPUT:
matroid
– aMatroid
instance.contractions
– a subset of the groundset.deletions
– a subset of the groundset.
OUTPUT:
An independent set
C
and a coindependent setD
such thatmatroid / contractions \ deletions == matroid / C \ D
Raise an error if either is not a subset of the groundset of
matroid
or if they are not disjoint.This function is used by the
Matroid.minor()
method.EXAMPLES:
sage: from sage.matroids.utilities import setprint sage: from sage.matroids.utilities import sanitize_contractions_deletions sage: M = matroids.named_matroids.Fano() sage: setprint(sanitize_contractions_deletions(M, 'abc', 'defg')) [{'a', 'b', 'c'}, {'d', 'e', 'f', 'g'}] sage: setprint(sanitize_contractions_deletions(M, 'defg', 'abc')) [{'a', 'b', 'c', 'f'}, {'d', 'e', 'g'}] sage: setprint(sanitize_contractions_deletions(M, [1, 2, 3], 'efg')) Traceback (most recent call last): ... ValueError: [1, 2, 3] is not a subset of the groundset sage: setprint(sanitize_contractions_deletions(M, 'efg', [1, 2, 3])) Traceback (most recent call last): ... ValueError: [1, 2, 3] is not a subset of the groundset sage: setprint(sanitize_contractions_deletions(M, 'ade', 'efg')) Traceback (most recent call last): ... ValueError: contraction and deletion sets are not disjoint.
- sage.matroids.utilities.setprint(X)#
Print nested data structures nicely.
Python’s data structures
set
andfrozenset
do not print nicely. This function can be used as replacement forprint
to overcome this. For direct access tosetprint
, run:sage: from sage.matroids.advanced import *
Note
This function will be redundant when Sage moves to Python 3, since the default
print
will suffice then.INPUT:
X
– Any Python object
OUTPUT:
None
. However, the function prints a nice representation ofX
.EXAMPLES:
Output looks much better:
sage: from sage.matroids.advanced import setprint sage: L = [{1, 2, 3}, {1, 2, 4}, {2, 3, 4}, {4, 1, 3}] sage: print(L) [{1, 2, 3}, {1, 2, 4}, {2, 3, 4}, {1, 3, 4}] sage: setprint(L) [{1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}]
Note that for iterables, the effect can be undesirable:
sage: from sage.matroids.advanced import setprint sage: M = matroids.named_matroids.Fano().delete('efg') sage: M.bases() Iterator over a system of subsets sage: setprint(M.bases()) [{'a', 'b', 'c'}, {'a', 'b', 'd'}, {'a', 'c', 'd'}]
An exception was made for subclasses of SageObject:
sage: from sage.matroids.advanced import setprint sage: G = graphs.PetersenGraph() # needs sage.graphs sage: list(G) # needs sage.graphs [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] sage: setprint(G) # needs sage.graphs Petersen graph: Graph on 10 vertices
- sage.matroids.utilities.setprint_s(X, toplevel=False)#
Create the string for use by
setprint()
.INPUT:
X
– any Python objecttoplevel
– (default:False
) indicates whether this is a recursion or not.
OUTPUT:
A string representation of the object, with nice notation for sets and frozensets.
EXAMPLES:
sage: from sage.matroids.utilities import setprint_s sage: L = [{1, 2, 3}, {1, 2, 4}, {2, 3, 4}, {4, 1, 3}] sage: setprint_s(L) '[{1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}]'
The
toplevel
argument only affects strings, to mimicprint
’s behavior:sage: X = 'abcd' sage: setprint_s(X) "'abcd'" sage: setprint_s(X, toplevel=True) 'abcd'
- sage.matroids.utilities.spanning_forest(M)#
Return a list of edges of a spanning forest of the bipartite graph defined by \(M\)
INPUT:
M
– a matrix defining a bipartite graph G. The vertices are the rows and columns, if \(M[i,j]\) is non-zero, then there is an edge between row \(i\) and column \(j\).
OUTPUT:
A list of tuples \((r_i,c_i)\) representing edges between row \(r_i\) and column \(c_i\).
EXAMPLES:
sage: from sage.matroids.utilities import spanning_forest sage: len(spanning_forest(matrix([[1,1,1],[1,1,1],[1,1,1]]))) # needs sage.graphs 5 sage: len(spanning_forest(matrix([[0,0,1],[0,1,0],[0,1,0]]))) # needs sage.graphs 3
- sage.matroids.utilities.spanning_stars(M)#
Return the edges of a connected subgraph that is a union of all edges incident some subset of vertices.
INPUT:
M
– a matrix defining a bipartite graph G. The vertices are the rows and columns, if \(M[i,j]\) is non-zero, then there is an edge between row i and column 0.
OUTPUT:
A list of tuples \((row,column)\) in a spanning forest of the bipartite graph defined by
M
EXAMPLES:
sage: from sage.matroids.utilities import spanning_stars sage: edges = spanning_stars(matrix([[1,1,1],[1,1,1],[1,1,1]])) # needs sage.graphs sage: Graph([(x+3, y) for x,y in edges]).is_connected() # needs sage.graphs True
- sage.matroids.utilities.split_vertex(G, u, v=None, edges=None)#
Split a vertex in a graph.
If an edge is inserted between the vertices after splitting, this corresponds to a graphic coextension of a matroid.
INPUT:
G
– A SageMathGraph
.u
– A vertex inG
.v
– (optional) The name of the new vertex after the splitting. Ifv
is specified and already in the graph, it must be an isolated vertex.edges
– (optional) An iterable container of edges onu
that move tov
after the splitting. IfNone
,v
will be an isolated vertex. The edge labels must be specified.
EXAMPLES:
sage: # needs sage.graphs sage: from sage.matroids.utilities import split_vertex sage: G = graphs.BullGraph() sage: split_vertex(G, u=1, v=55, edges=[(1, 3)]) Traceback (most recent call last): ... ValueError: the edges are not all incident with u sage: split_vertex(G, u=1, v=55, edges=[(1, 3, None)]) sage: list(G.edges(sort=True)) [(0, 1, None), (0, 2, None), (1, 2, None), (2, 4, None), (3, 55, None)]


Daejin Kim
I am an M.S student at DAVIAN Lab (Advisor: Jaegul Choo), part of the KAIST AI at Korea Advanced Institute of Science and Technology.
I am currently working on computer vision and time series forecasting. Most recently, I have been interested in finding ways to guarantee the faithfulness of the visual explanation in deep-learning-based models.
Email<EMAIL_ADDRESS>[CV] /
[Portfolio (Korean)] /
[LinkedIn] /
[GitHub]
|


“Only we humans make waste that nature can’t digest.”
- Charles Moore, Oceanographer
“Only we humans make waste that nature can’t digest.”
- Charles Moore, Oceanographer
Plastic pollution is one of the biggest concerns of the millennial times. Companies are trying to minimise plastic but now is the time to reduce its usage to 0. As a matter-of-fact, since 1950’s, only 10% of the plastic has been recycled. If the statistics of the National Geographic are to be believed, half of all plastics ever manufactured have been made in the last 15 years. Production increased exponentially, from 2.3 million tons in 1950 to 448 million tons by 2015. Production is expected to double by 2050.
Microplastics are spread throughout the water column and have been found in every corner of the globe, from Mount Everest, the highest peak, to the Mariana Trench, the deepest trough.
• Single-use plastics: Of all the plastics manufactured, 40% of them is used only once. This includes items such as polythene bags, bottled water, personal care bottles (shampoos, face creams, hair oil etc.), packaged food items which our supermarkets are replete with etc.
• Improper disposal of plastics: Single-use plastics are one of the main causes of improper disposal. Most of the plastic is consumed domestically and so people dispose of them non-judiciously and they end up in landfills, water resources, air and eventually harming the environment by converting into microplastics and other detrimental substances.
• Reduce-Reuse-Recycle: This principle was once applicable when the plastic load on earth wasn’t pernicious. But now, the cycle is somewhat unbalanced. If we recycle plastic, we cannot eliminate it completely from the environment and it will remain in some form or the other. About 6.3 billion metric tons of that has been turned into waste; of that, only 9% was recycled and 12% was incinerated. If we reuse, on the other hand, it will be disposed of in the near future and then the problem of eliminating it will arise. If we reduce the usage, then yes, we are contributing towards the cause, however, we are at a position where total abandonment of plastic is required.
They are breaking down further into smaller and smaller pieces. Plastic microfibers, meanwhile, have been found in municipal drinking water systems and drifting through the air. Nearly 700 species, including endangered ones, are known to have been affected by plastics. Microplastics have been found in more than 100 aquatic species, including fish, shrimp, and mussels destined for our dinner plates. Once plastics break down into microplastics and drift throughout the water column in the open ocean, they are virtually impossible to recover.
And even if we recycle plastic, it will be present in the environment in some way or the other and will eventually contribute to the making of microplastics.
To reduce their usage to 0, an idea can be used in reducing the manufacture of shampoo bottles which are one of the highest contributors to plastic being used in each and every household across the globe. A centralised system of shampoo-refilling vending machine can be set up to refill shampoo instead of purchasing a whole new bottle.


WaDE [WaDE2.0_schema_star.xml]
Beneficial uses associated with the site (e.g. irrigation, municipal, commercial, thermoelectric, industrial, stockwater, fire suppression, snow-making, etc.). Can be one or more uses assigned per site. Preference is to list the uses without abbrieviations, separated by commas.
| PK | Name | Data Type | NULL | Auto | Default | Comment | FK |
|
| Name | NVarChar(250) | |||||
| Term | NVarChar(250) | ||||||
| Definition | NVarChar(5000) |
| |||||
| State | NVarChar(250) |
| |||||
| SourceVocabularyURI | NVarChar(250) |
| |||||
| USGSCategoryCV | NVarChar(250) |
| Assign a USGS water use category from the USGS controlled vocabulary (e.g. irrigation, groundwater, fresh) | ||||
| NAICSCodeCV | NVarChar(250) |
| Six-digit NAICs Code associated with the primary beneficial use category |
(none)
(none)
(none)
| Diagram Name |
| 1_WaterAllocations |
| 2_SiteSpecificAmounts |
| 3_AggregatedAmounts |
| 5_ContreolledVocabulary |


Quote verifiability, part of the Validators Project¶
This documentation isn’t displaying correctly on Gitlab. Read it here instead.
The HarmonicLogistic
model¶
The HarmonicLogistic
class is a machine-learning model that produces a
regression in the range [0,1]. It is structured as a harmonic mean of logistic
regressions. The model can have any number of logistic regression units, each
being a full standard logistic regression model.
The generative story of the model is that some phenomenon, like quote
verifiability, results from multiple factors simultaneously holding—in the
case of verifiability, these are the component verifiability of the source,
cue, and content spans. The overall verifiability score is a result of
combining the factors with the idea that the weakest link is the main
determinant of the overall verifiability. Conceptually, this could be achieved
by taking the min
of the factor’s verifiabilities, but this creates
discontinuities in the derivative of the model’s output. Instead, the harmonic
mean is used as a kind of soft min
, which is differentiable.
Using the HarmonicLogistic
model¶
Like many machine learning models, the HarmonicLogistic
model expects
each example to be encoded as a numeric feature vector. One crucial detail is
that you need to tell the HarmonicLogistic
model which features belong to
which factor. So, for example, let us suppose that we have a 10-component
feature vector, where features 0 through 2 describe the source, features 3
through 6 describe the cue, and features 7 through 9 describe the
content. The source, cue, and content represent the three factors that we
would like to model using individual logistic regressions, and we need to tell
HarmonicLogistic
which features belong to which factors.
We do this using the lengths
parameter when creating an instance:
from harmonic_logistic import HarmonicLogistic
regressor = HarmonicLogistic(lengths=[3, 4, 3])
Training¶
To train a HarmonicLogistic
model, you need to encode the training data
into two numpy arrays: one for the feature vectors, and one for the true output
scores (the value we’re trying to regress, i.e. the verifiability score).
The feature vectors should be stored in a 2-dimensional numpy array, such that
each row of the array is one feature vector, that is, the shape of the array
should be (num_training_examples, feature_vector_length)
. The target
scores (verifiability scores to be regressed) should be in a 1-dimensional
array, with length equal to the number of training examples. Both arrays
should have dtype='float64'
.
Training the model might look something like this:
import numpy as np
# Get the training data
feature_vectors = [
[1, 2, -0.2, 3, 2, -1, 0, 10, 0.1, -1],
[2, 1, -0.4, 3, 0, -2, 0, 10, 0.2, 11],
[3, 0, 0.54, 1, 0, -3, 1, 11, 0.7, -4],
]
target_vector = [0.4, 0.7, 0.8]
# Cast it into numpy float64 arrays
feature_vectors = np.array(feature_vectors, dtype='float64')
target_vector = np.array(target_vector, dtype='float64')
# Train the model
regressor.fit(feature_vectors, target_vector)
By default, the model will train until it’s loss function changes by less than
1e-8
from one stochastic-gradient-descent step to the next, and will use a
learning rate of 1.0
. The loss and the change in loss are printed after
each training epoch. You can control all of these behaviors, e.g.:
# Specify the learning rate when constructing the model
regressor = HarmonicLogistic(lengths=[3, 4, 3], learning_rate=0.1)
# Train the model
regressor.fit(
feature_vectors, target_vector,
tolerance=1e-10, learning_rate=1.0, verbose=False
)
How do you know when to modify the learning rate? Setting the learning rate involves weighing the speed of training against the stability of the stochastic gradient descent and the precision of the fit it is capable of generating. The default learning rate of 1.0 worked well in the test suite, and if it works and the model doesn’t take too long to train, then it’s fine.
A larger step size means that the model will approach convergence more quickly, at least at first. But if the step size is too large, then the model may never converge, because it actually steps over the basin of the loss-function. A smaller step size will take longer to converge, but because of the smaller step size, the algorithm can home in on a minimum of the loss function more precisely.
What should the tolerance be? The tolerance is involves a similar time vs accuracy tradeoff. It represents an amount of change in the model’s loss function that we consider to be negligible. Once the loss function changes by less than the tolerance from one sgd-step to the next, optimization will stop. A very small (i.e. very precise) tolerance might require a smaller learning rate to converge.
Predicting¶
A model can be used to predict the output score (verifiability) from supplied
feature vectors. Supply the feature vectors to the predict
method in the
same format as for the train method, but don’t provide a target vector:
>>> regressor.predict(feature_vectors)
array([0.349945699, 0.70010234, 0.77732115])
Saving and loading¶
Once trained, save a model to disk using the save()
method, passing it a path at
which to write the model. The internal parameters that define the model will
be written to file using numpy
’s .npz
format. To load a model,
supply a model file’s path to the load
keyword in the constructor, or
call the load()
method on an existing model instance:
# Save a model
regressor.save('my-model.npz')
# Load a model using the load keyword in the constructor
new_regressor = HarmonicLogistic(load='my-model.npz')
# Or load a model onto an existing HarmonicLogistic instance
new_regressor = HarmonicLogistic(lengths=[3,4,3]) # Note: lengths overwritten by those in the stored model
new_regressor.load('my-model.npz')


Pope to visit Hiroshima on anti-nuclear weapon mission
VATICAN CITY: Pope Francis, who years ago hoped to be a missionary in Japan, travels to the sites of the world's only atomic attacks this week seeking a ban on nuclear weapons.
The Argentine pontiff, 82, flies to Asia on Tuesday (Nov 19), where he will first visit Thailand and then Japan, including the two cities destroyed by devastating US nuclear attacks during the Second World War.
Despite both countries having less than 0.6 per cent Catholic populations, Francis is thirsty for interreligious dialogue with them.
He will arrive in Thailand on Wednesday before flying on to Japan on Saturday, where he will stay until Nov 26.
Sunday is set to be a marathon day with visits to Nagasaki and Hiroshima, where at least 74,000 people and 140,000 people respectively were killed by the atomic bombs attacks.
The Aug 6, 1945 bombing of Hiroshima and of Nagasaki three days later contributed to Japan's surrender and the end of the World War II on Aug 15, months after Nazi Germany capitulated.
Father Yoshio Kajiyama, director of the Jesuit social centre in Tokyo, was born in Hiroshima shortly after the war and is eagerly awaiting the pope's anti-nuclear speech.
"My grandfather died the day of the bomb in Hiroshima, I never knew him. Four days later my aunt died when she was 15 years old," said the 64-year-old.
"If you grow up in Hiroshima, you can't forget the bomb."
NO NUKES MESSAGE
The pope will make "as vigorous an appeal as possible in favour of concerted measures to completely eliminate nuclear weapons", Vatican No 2 Cardinal Pietro Parolin told the United Nations in September.
"Using atomic energy to wage war is immoral," the head of the world's 1.3 billion Catholics told Japanese television in September.
A previous member of Japan's diplomatic mission to the Vatican, Shigeru Tokuyasu, said he hopes the visit will pull the world back from "the globalisation of indifference" over nuclear weapons.
But, said Tokuyasu, the pope should avoid discussing the politically sensitive issue of nuclear energy.
Francis is als to meet victims of the devastating 2011 earthquake that struck northeastern Japan and the subsequent tsunami that between them killed 18,500 people and sparked the nuclear power catastrophe at Fukushima.
FEAR OF NUCLEAR WAR
Francis is used to railing against countries that make money from weapons and has already voiced his fear of a nuclear war.
In January last year, he printed cards with a photo of a Nagasaki bomb victim, inscribing the words "the fruit of war" above his signature.
The 1945 photo, captured by American photographer Joe O'Donnell, showed a small boy standing ramrod straight carrying his dead younger brother on his back while waiting for his turn at a cremation site.
The late pope John Paul II visited Japan in 1981, where at Hiroshima's peace monument he pointed to war as "the work of man".
In August, the city of Hiroshima called on Japan to sign the UN treaty calling for a ban on nuclear weapons, something that all the world's nuclear powers have refused to do.
Japan, with its pacifist post-war constitution, adhered in 1967 to the principle of "not producing, possessing or allowing nuclear weapons on its territory", despite counting on the US nuclear umbrella for protection.
MULTI-ETHNIC THAILAND
Before arriving in Thailand on Wednesday, the pope praised the "multiethnic nation" which "has worked to promote harmony and peaceful coexistence, not only among its habitants but throughout Southeast Asia".
In a video message to the Thai people, the pope said he hoped to "strengthen ties of friendship" with Buddhists.
Since Francis' election six years ago, he has made two trips to Asia, visiting the Philippines and Sri Lanka in 2014, followed by Myanmar and Bangladesh in 2017.
On Thursday in Bangkok, the pontiff is to pay a visit to supreme patriarch Somdej Phra Maha Muneewong at a Buddhist temple.


Display a single value of 25%
Display value of 0% and transition to a random value when the button is pressed.
Display value of 0% and transition to a random value every second when the button is pressed.
Display the four built-in gauge sizes in this order: tiny, small, medium, large.
Override the basic gauge styles with the following


Update Inventory
List Inventory
Student Orders
Update Inventory
Food Name
Count
Date When Available
Food Group
Dairy
Grains
Protein
Fruit
Vegetable
Personal Care Items
Other
Description
Donor Name
Donor Organization
Donor Phone
Donor Email
Additonal Notes:
Predictions
OrderID
Student_ID
Phone
Email
OrderDate
Veteran
Disabled
SNAP
Household
FoodGroup
FoodName
OrdersThisMonth
Packaged
Pickedup
Canceled


Council opts to keep posting detour notices at Saskatoon bus stops
by Phil Tank, Saskatoon StarPhoenixSaskatoon Transit had originally proposed an end to posting paper notices at bus stops in October.
The printed word won a rare 21st-century victory at Saskatoon city hall.
Council voted Monday to keep posting paper detour notices at Saskatoon Transit bus stops after complaints about a proposed move to go almost completely digital by the spring.
Saskatoon Transit had proposed an end to the practice of posting notices at bus stops due in part to the estimated $100,000 annual cost of paying a transit manager to drive to and from bus stops to post and remove them.
Riders had argued that many of those who rely on bus service lack either smartphones or data plans and that cold weather can make taking your phone out unpleasant.
“I support a digital approach, but it felt like this was a digital-only approach,” Coun. Sarina Gersher said.
Saskatoon Transit had originally proposed an end to posting paper notices at bus stops in October and notified riders by posting notices of the pending change at bus stops.
Complaints from bus riders prompted a delay to moving detour notices to the smartphone app and the Saskatoon Transit website. Council’s transportation committee asked for more information about the move and the reasons for it.
Saskatoon Transit officials told the transportation committee that, in addition to being costly, detour notices often contained outdated information because of the frequency of changes.
Coun. Cynthia Block said she thought the city was doing a poor job of notifying people about notices, but would like to see the system improved for everybody.
Bus Riders of Saskatoon spokesman Robert Clipperton appeared at council to repeat his observation that the transit advocacy group had received few complaints about paper notices. A city report showed that of 31 cities surveyed, only three have eliminated posted notices.
Under the proposed digital move, detour notices would have still been posted at the city’s six transit terminals at Place Riel at the University of Saskatchewan, downtown on 23rd Street and at four shopping malls.
Coun. Mairin Loewen said she would like to see more digital signs at bus stops.
“I’m very much looking forward to that day, but I don’t think we’re there yet,” Loewen said.
Council voted 9-2 to keep posting physical notices at bus stops. Coun. Troy Davies and Coun. Bev Dubois voted against the move.
Dubois said she wanted to make transit better and said the number of those without smartphones is small.
“I know change is difficult for some folks, including all of us,” Dubois said.


"x"
"1" "KNASMUELLER,S, BRESGEN,N, KASSIE,F, MERSCH-SUNDERMANN,V, GELDERBLOM,W,ZOEHRER,E AND ECKL,PM, GENOTOXIC EFFECTS OF THREE FUSARIUM MYCOTOXINS, FUMONISINB1, MONILIFORMIN AND VOMITOXIN IN BACTERIA AND IN __ PRIMARY CULTURES OF RATHEPATOCYTES, MUTAT. RES. 391(1,2):39-48, 1997"


The number of sockets available to your applications is governed by operating system limits.
Sockets use file descriptors and the operating system’s view of your application’s socket use is expressed in terms of file descriptors. There are two limits, one on the maximum descriptors available to a single application and the other on the total number of descriptors available in the system. If you get error messages telling you that you have too many files open, you might be hitting the operating system limits with your use of sockets. Your system administrator might be able to increase the system limits so that you have more available. You can also tune your members to use fewer sockets for their outgoing connections. This section discusses socket use in Geode and ways to limit socket consumption in your Geode members.
Socket Sharing
You can configure socket sharing for peer-to-peer and client-to-server connections:
Peer-to-peer. You can configure whether your members share sockets both at the application level and at the thread level. To enable sharing at the application level, set the
gemfire.properties
propertyconserve-sockets
totrue
. To achieve maximum throughput, however, we recommend that you setconserve-sockets
tofalse
.At the thread level, developers can override this setting by using the DistributedSystem API method
setThreadsSocketPolicy
. You might want to enable socket sharing at the application level and then have threads that do a lot of cache work take sole ownership of their sockets. Make sure to program these threads to release their sockets as soon as possible using thereleaseThreadsSockets
method, rather than waiting for a timeout or thread death.Client. You can configure whether your clients share their socket connections to servers with the pool setting
thread-local-connections
. There is no thread override for this setting. All threads either have their own socket or they all share.
Socket Lease Time
You can force the release of an idle socket connection for peer-to-peer and client-to-server connections:
- Peer-to-peer. For peer-to-peer threads that do not share sockets, you can use the
socket-lease-time
to make sure that no socket sits idle for too long. When a socket that belongs to an individual thread remains unused for this time period, the system automatically returns it to the pool. The next time the thread needs a socket, it creates a new socket. - Client. For client connections, you can affect the same lease-time behavior by setting the pool
idle-timeout
.
Calculating Connection Requirements
Each type of member has its own connection requirements. Clients need connections to their servers, peers need connections to peers, and so on. Many members have compound roles. Use these guidelines to figure each member’s socket needs and to calculate the combined needs of members that run on a single host system.
A member’s socket use is governed by a number of factors, including:
- How many peer members it connects to
- How many threads it has that update the cache and whether the threads share sockets
- Whether it is a server or a client,
- How many connections come in from other processes
The socket requirements described here are worst-case. Generally, it is not practical to calculate exact socket use for your applications. Socket use varies depending on a number of factors including how many members are running, what their threads are doing, and whether threads share sockets.
To calculate any member’s socket requirements, add up the requirements for every category that applies to the member. For example, a cache server running in a distributed system with clients connected to it has both peer-to-peer and server socket requirements.
Peer-to-Peer Socket Requirements Per Member
Every member of a distributed system maintains two outgoing and two incoming connections to every peer. If threads share sockets, these fixed sockets are the sockets they share.
For every thread that does not share sockets, additional sockets, one in and one out, are added for each peer. This affects not only the member’s socket count, but the socket count for every member the member thread connects to.
In this table:
- M is the total number of members in the distributed system.
- T is the number of threads in a member that own their own sockets and do not share.
| Peer Member Socket Description | Number Used |
|---|---|
Membership failure detection |
2 |
Listener for incoming peer connections (server P2P) |
1 |
Shared sockets (2 in and 2 out) Threads that share sockets use these. |
4 * (M-1) |
| This member’s thread-owned sockets (1 in and 1 out for each thread, for each peer member). | (T * 2) * (M-1) |
Other member’s thread-owned sockets that connect to this member (1 in and 1 out for each). Note that this might include server threads if any of the other members are servers (see Server). |
Summation over (M-1) other members of (T*2) |
Note: The threads servicing client requests add to the total count of thread-owned sockets both for this member connecting to its peers and for peers that connect to this member.
Server Socket Requirements Per Server
Servers use one connection for each incoming client connection. By default, each connection is serviced by a server thread. These threads that service client requests communicate with the rest of the server distributed system to satisfy the requests and distributed update operations. Each of these threads uses its own thread-owned sockets for peer-to-peer communication. So this adds to the server’s group of thread-owned sockets.
The thread and connection count in the server may be limited by server configuration settings. These
are max-connections
and max-threads
settings in the <cache-server> element of the
cache.xml
. These settings limit the number of connections the server accepts and the maximum
number of threads that can service client requests. Both of these limit the server’s overall
connection requirements:
- When the connection limit is reached, the server refuses additional connections. This limits the number of connections the server uses for clients.
- When the thread limit is reached, threads start servicing multiple connections. This does not limit the number of client connections, but does limit the number of peer connections required to service client requests. Each server thread used for clients uses its own sockets, so it requires 2 connections to each of the server’s peers. The
max-threads
setting puts a cap on the number of this type of peer connection that your server needs.
The server uses one socket for each incoming client pool connection. If client subscriptions are used, the server creates an additional connection to each client that enables subscriptions.
In this table, M is the total number of members in the distributed system.
| Server Socket Description | Number Used |
|---|---|
| Listener for incoming client connections | 1 |
| Client pool connections to server | Number of pool connections to this server |
Threads servicing client requests (the lesser of the client pool connection count and the server’s |
(2 * number of threads in a server that service client pool connections) * (M-1) These threads do not share sockets. |
| Subscription connections | 2 * number of client subscription connections to this server |
With client/server installations, the number of client connections to any single server is undetermined, but Geode’s server load balancing and conditioning keeps the connections fairly evenly distributed among servers.
Servers are peers in their own distributed system and have the additional socket requirements as noted in the Peer-to-Peer section above.
Client Socket Requirements per Client
Client connection requirements are compounded by how many pools they use. The use varies according to runtime client connection needs, but will usually have maximum and minimum settings. Look for the <pool> element in the cache.xml
for the configuration properties.
| Client Socket Description | Number Used |
|---|---|
Pool connection |
summation over the client pools of max-connections |
Subscription connections |
2 * summation over the client pools of subscription-enabled |
If your client acts as a peer in its own distributed system, it has the additional socket requirements as noted in the Peer-to-Peer section of this topic.


KSReachability Class Reference
| Inherits from | NSObject |
| Declared in | KSReachability.h |
Overview
Monitors network connectivity.
Note: Upon construction, this object will fetch its initial reachability state in the background. This means that the reachability status will ALWAYS be “unreachable” until some time after object construction. If you want the true reachability state before the current code block ends, you can call updateFlags. Note, however, that it will probably block.
You can elect to be notified via blocks (onReachabilityChanged), notifications (notificationName), or KVO (flags, reachable, and WWANOnly).
All notification methods are disabled by default.
Tasks
-
+ reachabilityToHost:
Reachability to a specific host.
-
+ reachabilityToLocalNetwork
Reachability to the local (wired or wifi) network.
-
hostname
The host we are monitoring reachability to, if any.
property -
onReachabilityChanged
If non-nil, called whenever reachability flags change. Block will be invoked on the main thread.
property -
notificationName
The notification to send when reachability changes (nil = don’t send). Default = nil
property -
flags
The current reachability flags.
property -
reachable
Whether the host is reachable or not.
property -
WWANOnly
property -
– updateFlags
Force updating of the reachability flags. This method will potentially block.
Properties
flags
The current reachability flags.
@property (nonatomic, readonly, assign) SCNetworkReachabilityFlags flags
Discussion
The current reachability flags.
Declared In
KSReachability.h
hostname
The host we are monitoring reachability to, if any.
@property (nonatomic, readonly, retain) NSString *hostname
Discussion
The host we are monitoring reachability to, if any.
Declared In
KSReachability.h
notificationName
The notification to send when reachability changes (nil = don’t send). Default = nil
@property (nonatomic, readwrite, retain) NSString *notificationName
Discussion
The notification to send when reachability changes (nil = don’t send). Default = nil
Declared In
KSReachability.h
onReachabilityChanged
If non-nil, called whenever reachability flags change. Block will be invoked on the main thread.
@property (nonatomic, readwrite, copy) void ( ^ ) ( KSReachability *reachability ) onReachabilityChanged
Discussion
If non-nil, called whenever reachability flags change. Block will be invoked on the main thread.
Declared In
KSReachability.h
Class Methods
reachabilityToHost:
Reachability to a specific host.
+ (KSReachability *)reachabilityToHost:(NSString *)hostname
Parameters
- hostname
The name or IP address of the host to monitor. If nil or empty string, check reachability to the internet in general.
Discussion
Reachability to a specific host.
Declared In
KSReachability.h


WITNESS LIST
Education
April 4, 2018 10:00 AM
E-Rate
ON:
Bergland, Jennifer Dir. of Government Relations (TCEA), Georgetown, TX
Callahan, Casey Executive Director (Education Service Center 15), San Angelo, TX
Cochran, Jarrett Director of Technology Services (Comal ISD), Martindale, TX
Glasier, Julie Senior District Consultant (Education Super Highway), San Mateo, CA
Parrish, Melody Deputy Commissioner for Technology (Texas Education Agency), Austin,
TX
Ting, Grace State Engagement Manager (Education Super Highway), San Francisco, CA
High Quality Education
FOR:
Malone, Rachel Operations Director (Republican Party of Texas), Manor, TX
Riddick, Orlando Superintendent (Midland ISD), Midland, TX
Spencer, Alexandra Chapter Lead-Austin (also providing written testimony) (Start School
Later), Austin, TX
ON:
Byer, Von General Counsel (Texas Education Agency), Austin, TX
DuPont, Nathaniel Teacher (Self), San Antonio, TX
Hansen, Matthew Director School Operations (YES Prep Public Schools), Houston, TX
Hassett, Kristi Trustee (Lewisville ISD), Flower Mound, TX
Louder, Justin Associate Vice Provost (also providing written testimony) (Texas Tech
University), Lubbock, TX
Martinez, Monica Associate Commissioner, Standards & Support Services (Texas
Education Agency), Austin, TX
Martinez, Pedro Superintendent (San Antonio ISD), San Antonio, TX
Quinzi, Patty Legislative Counsel (also providing written testimony) (TX-American
Federation of Teachers), Austin, TX
Siedlecki, Joe Associate Commissioner (Texas Education Agency), Austin, TX
Swanson, Steve Grandparent, retired business executive and 20-yr volunteer in education
(also providing written testimony) (Self), Austin, TX
Sweeney, Graham Superintendent (Boles ISD), Quinla, TX
Weiner, Molly Director of Policy (Texas Aspires Foundation), Austin, TX
Registering, but not testifying:
ON:
Aleman, Steve Policy Specialist (Disability Rights Texas), Austin, TX
Luke, Charles Coordinator- Coalition for Public Schools (Coalition for Public Schools),
Weatherford, TX
Miner, Claudia Exec Dir. of (Waterford/Upstart), Sandy, UT
Stombres, Rich Director of State Advocacy (Waterford Institute), Sandy, UT
Providing written testimony:
ON:
Hinojosa, David National Director of Policy (IDRA- Intercultural Development Research
Association), San Antonio, TX
WITNESS LIST
Education
April 4, 2018 10:00 AM
Malfaro, Louis President (Texas American Federation of Teachers (Texas AFT)), Austin,
TX
Virtual Education
FOR:
Elvrum, Tillie President- Board of Directors PSO (Public School Options.org), Denver, CO
McGrath, Amy COO, ASU (ASU), Orlando, FL
ON:
Adams, Bryce Vice President of State Relations (Connections Education), Austin, TX
Bosse, Portia Director of Public Affairs (Texas State Teachers Assn.), Austin, TX
Gustafson, Lindsay (Texas Classroom Teachers Assoc.), Austin, TX
Martinez, Monica Associate Commissioner, Standards & Support Services (Texas
Education Agency), Austin, TX
Quinzi, Patty Legislative Counsel (also providing written testimony) (TX-American
Federation of Teachers), Austin, TX
Registering, but not testifying:
ON:
Aleman, Steve Policy Specialist (Disability Rights Texas), Austin, TX
Providing written testimony:
ON:
Kuhlmann, Kate Lobbyist (Assoc. of TX Professional Educators), Austin, TX


We visualize mices!
- maximize granular e-tailers
- grow user-centric metrics
- iterate interactive content
- monetize user-centric bandwidth
- implement impactful e-services
- incubate e-business content
- integrate magnetic markets
- visualize frictionless mindshare
- whiteboard bleeding-edge methodologies
- architect robust niches
- implement intuitive e-tailers
- syndicate out-of-the-box users
- strategize clicks-and-mortar platforms
- deploy intuitive supply-chains
- enhance intuitive relationships


This is a card panel with a teal lighten-2 class
-
NeuroNet: Fast and Robust Reproduction of Multiple Brain Image
Segmentation Pipelines, Published by Martin Rajchl and Nick Pawlowski and Daniel Rueckert and
Paul M. Matthews and Ben Glocker. Github source
button
-
TensorLayer: A Versatile Library for Efficient Deep Learning
Development, published by Dong, Hao and Supratak, Akara and Mai, Luo and Liu, Fangde and
Oehmichen, Axel and Yu, Simiao and Guo, Yike.
Github source


| t01 |
golgi, cells, apparatus, golgi_apparatus, golgi_complex, complex, compartment, membranes, glycoproteins, virus |
49 |
0 |
| t02 |
ER, proteins, membrane, function, reticulum, endoplasmic, ERAD, assembly, pathway, trafficking |
61 |
0 |
| t03 |
domain, cytoplasmic, localization, retention, signal, protein, DPAP, transmembrane, membrane, mutant |
38 |
0 |
| t04 |
die, und, der, von, das, den, ist, werden, eine, mit |
47 |
0 |
| t05 |
channel, ion, 3a, activity, protein, sars-cov, viroporin(s), e_protein, viral |
29 |
1 |
| t06 |
secretory, regulated, granule(s), secretory_granule(s), constitutive, immature, sorting, lysosomal |
17 |
0 |
| t07 |
SARS, asymmetric, influenzavirus, des, influenza, influenza_virus, outer-leaflet, virus, ordered, symmetric_vesicles |
6 |
0 |
| t08 |
°, 16, transition, temperatures, gramicidin, lactose, uptake, COV, ascorbate, PMCA2 |
8 |
0 |
| t09 |
BFA, brefeldin, brefeldin_a, GBF1, GA, hbsag, GM2, sec63, ptk1, PDI |
10 |
0 |
| t10 |
monensin, sodium, SM, NGF, na+, resveratrol, sodium_channels, trachomatis, bk(ca, effects |
8 |
0 |
| t11 |
G2, G1, ca2, GC, +, mers-cov, tpcs, naadp-evoked_ca2, naadp-evoked, EL |
9 |
0 |
| t12 |
connexin(s), p7, gap, gm1, SSP, oligomer, pmps, och1p, microsomes |
12 |
0 |
| t13 |
lycopene, %, k-atpase, endoplasmic_reticulum_resident_proteins, SIF, salmonella, polyamine, basolateral, hirschberg, cpvs |
12 |
0 |
| t14 |
kinetochore(s), PC2, gp210, RZZ, mad1-mad2, GM(1, CT, SAC, hyphal |
9 |
0 |
| t15 |
VP7, PNT, prohnp1, 61, delta, HNP1, NE, axons, h2, rotavirus |
8 |
0 |


# File vendor/plugins/active_scaffold/lib/responds_to_parent.rb, line 29 def responds_to_parent(&block) yield if performed? # We're returning HTML instead of JS or XML now response.headers['Content-Type'] = 'text/html; charset=UTF-8' # Either pull out a redirect or the request body script = if location = erase_redirect_results "document.location.href = #{location.to_s.inspect}" else response.body end # Escape quotes, linebreaks and slashes, maintaining previously escaped slashes # Suggestions for improvement? script = (script || ''). gsub('\\', '\\\\\\'). gsub(/\r\n|\r|\n/, '\\n'). gsub(/['"]/, '\\\\\&'). gsub('</script>','</scr"+"ipt>') # Clear out the previous render to prevent double render erase_results # Eval in parent scope and replace document location of this frame # so back button doesn't replay action on targeted forms # loc = document.location to be set after parent is updated for IE # with(window.parent) - pull in variables from parent window # setTimeout - scope the execution in the windows parent for safari # window.eval - legal eval for Opera render :text => "" end end


I based this app off my desire to limit work interrupting choices (See The Paradox of Choice if interested in learning more). There are so many unique ways to ingest information, so many ways to design elements that will catch attention, that focus and attention to the task at hand are simply too difficult.
That said, this app just shows a curated group of 10 popular Hacker News items over the last 24 hours. It refreshes once an hour, but because the listing itself is for popular items over the last 24, and so it only changes when something major occurs.
 But I've found that if the list doesn't change much, my eyes don't register anything new, and I get back to work. If it helps you, let me know by reaching to me below.


--- layout: post title: Multiplying Your Impact Through Mentoring at Droicon UK ---
I recently presented a new and improved version of my talk on "Multiplying Your Impact Through Mentoring" presentation, this time at Droidcon London. A friend at Yelp suggests that the third time is the best time for any presentation, and after the fourth presentation it's time to retire the talk. I definitely felt like that was true this time, so I just need to find one last time to present this talk and ride off into the sunset.
The video recording is also really well done, and you can watch that atthe official Droidcon UK website


This is a simple app that sends a message to a backend AMQ and broadcast the messages to all connected clients.


Simple Salah aims to serve a fast, ad-free, and clutter-free athan app.
Please email us at or tweet us at @SimpleSalahApp with suggestions, feature requests, and bug reports.
This app was built with PrayTimes.org, Bootstrap, Font Awesome, MomentJS/Luxon, Google Cloud Platform, and Github Pages. The source code is available at https://github.com/simplesalah/simplesalah.github.io.


The aim of COCOMA framework is to create, monitor and control contentious and malicious system workload. By using this framework experimenters are able to create operational conditions for their System under Test (SuT) under which tests and experiments can be carried out. This allows more insight into the testing process of the SuT so that various scenarios of the cloud infrastructure behaviour can be analysed by collecting and correlate metrics of the emulated environment with the test results.
A common approach is to setup COCOMA within a VM and deploy it in a landscape. As this VM is intended to run mainly COCOMA resources patterns, other processes in the VM should have almost no impact on the desired patterns.


---
layout: post
title: Get some!
date: '2005-06-15T20:38:00.000-05:00'
author: Tom Ray
tags:
modified_time: '2005-06-15T21:09:41.733-05:00'
blogger_id: tag:blogger.com,1999:blog-11319466.post-111888622128779376
blogger_orig_url: http://www.lorenzosmusic.com/2005/06/get-some.html
---
Thanks to everybody that braved the rain and came out to our show at The Slipper Club. We had a great time, plus The Selfish Gene is always a fun band to see, thanks guys.
I also wanted to remind you that if you were unable to get a copy of our new CD "Solamente Tres Palabras" at the show, you can just order one here at the on-line store.


{include file="common/css_js" /} action()=="add" || request()->action()=="edit"){ ?> {include file="common/fileupload" /} {include file="common/ueditor" /}


{% extends "base/app-page-content.html" %} {% load staticfiles %} {% block header %}{% include "base/header.html" with h1="Woopsie Error" %}{% endblock header %} {% block app-content %}
Woops, something went wrong. Please notify the administrator!


Techniques Using SOPs
Cube Instances with Unique Faces
Note: this example may appear blank if you are using MacOS or have an older GPU.
This example comes from an old HelpGroup question about putting unique images on the faces of instances. There are a number of ways to approach this challenge. You could certainly use the ‘instances of instances’ approach we’ve outlined in other examples — where we create the cube faces individually. That’s a fine approach, but here we want to instead focus on working with cubes. To do this, we need to use a cube map texture along with texture instancing — this isn’t supported on all GPUs, so you may find that this example doesn’t load on your computer.
You’ll see in the example that we instance 4 cubes, and that on our geometry COMP we use the Instance Texture parameters. For this to work correctly we provide a path to our TOPs with a wild-card card character in place of where we’ll substitute a digit. For example:
textures/item*/final
This is going to be expressed as the following during instancing:
textures/item1/final
textures/item2/final
textures/item3/final
textures/item4/final
...etc...
This is a nice way to work with whole cubes rather than trying to think of each face of each cube when working with textures.
Tested in TouchDesigner099 2020.23680
Updated 06.03.20
Matthew Ragan
Zoe Sandoval


Candlestick chart Demo
1. Load static data with default options
Your browser does not support the HTML5 canvas tag.
Loading, Please wait ...
2. Load data from provided endpoint with different options
Your browser does not support the HTML5 canvas tag.
Loading, Please wait ...


All papers must be formatted according to the ACM SIG Proceedings Templates.
Upon completing the rights management form (to be sent to you by email), you will be emailed the appropriate rights management text to include in your paper.
Authors will submit their papers to the K-CAP 2015 Easychair site.


Definition.
A triangle is a closed figure made up of three line segments.
Types of Triangles
there are different types of triangles. these include:
- Triangles based on angles.
- Triangles based on sides.
- Triangles based on angles.
Definition.
A triangle is a closed figure made up of three line segments.
Types of Triangles
there are different types of triangles. these include:
- Triangles based on angles.
- Triangles based on sides.
- Triangles based on angles.


Maria James
United States
Being deeply loved by someone gives you strength, while loving someone deeply gives you courage.
Harold Walsh
United States
Keep love in your heart. A life without it is like a sunless garden when the flowers are dead.
Gregory White
United States
I have found the paradox, that if you love until it hurts, there can be no more hurt, only more love.
I believe that imagination is stronger than knowledge. That myth is more potent than history. That dreams are more powerful than facts. That hope always triumphs over experience. That laughter is the only cure for grief. And I believe that love is stronger than death.


If I'm being completely honest, the two people I went to the cinema to watch _Wonder Woman_ with and I did spend the next two hours after coming out of our screening discussing the various problems with the movie, but we also all agreed on one thing: We still loved it.
Maybe it's just the rose-coloured glasses of comparison, but I had an excellent time with _Wonder Woman_, and I'm excited to go back to the cinema and watch it, at least one more time.
It's the first time I've said that about a DC movie since _The Dark Knight Rises_.
_Final rating:★★★½ - I strongly recommend you make the time._


No one in USAID embodied the spirit of compassion and brotherhood that underpins our efforts more than Larry Foley.
Apply Now! $843 Million in USAID Funding for African Organizations
USAID Just Launched $57 Million Project To Support Agri-Food In Sri Lanka.
Hosted by the LAC Environment CCC learning group, this webinar initiated a conversation on designing research to better understand and communicate about corruption in the natural resource management sector. The Colombia Mission shared their experience working through an associate award with the Targeting Natural Resource Corruption (TNRC) project to co-design and conduct a corruption analysis with a consortium of partners.
I think we knew that this would be just like raising the kids together, this would be a fun thing to do in partnership.


The most common situation in EJB related testing by far is the need to alter your persistence.xml for a test environment.
OpenEJB will automatically use the DataSources you have setup in your test environment, we're pretty good at guessing the right DataSources you intend even if the names don't match exactly -- or in some cases at all. If there is only one DataSource configured, it's very easy for us to guess the DataSource to use.
This allows you to keep your persistence.xml configured for your production environment and helps eliminate the need for a "test" persistence.xml (though we do have that functionality). A log line will be printed saying if we had to adjust the DataSources of your persistence.xml.
You can override any property in your test setup via either system properties or the initial context properties. The format is:
<unit-name>.<property>=<value>
So for example with the following persistence.xml:
<persistence>
<persistence-unit name="movie-unit">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>movieDatabase</jta-data-source>
<non-jta-data-source>movieDatabaseUnmanaged</non-jta-data-source>
<properties>
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
<property name="hibernate.max_fetch_depth" value="3"/>
</properties>
</persistence-unit>
</persistence>
You can override and add persistence unit properties in your test case. There are currently no facilities for removing them (if you have a need for that let us know -- it hasn't really come up so far).
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.openejb.client.LocalInitialContextFactory");
p.put("movie-unit.hibernate.hbm2ddl.auto", "update");
p.put("movie-unit.hibernate.dialect", "org.hibernate.dialect.HSQLDialect");
context = new InitialContext(p);
The overriding order is as follows: 1 = highest, 4 = lowest.
By default there are no overrides in 1-3, so #4 is the only source of information.
In the above example there would be exactly three properties for the "movie-unit" persistence unit:
These properties would be passed by OpenEJB directly to the persistence provider (in this case Hibernate). With one exception OpenEJB does not understand or modify these properties. Details on that one exception below.
Note that you must use the unit name as the prefix. This will not work:
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,"org.apache.openejb.client.LocalInitialContextFactory");
p.put("hibernate.hbm2ddl.auto", "update");
p.put("hibernate.dialect", "org.hibernate.dialect.HSQLDialect");
context = new InitialContext(p);
Currently, only properties that start with the unit name are search and applied.
All vendors have such a property for getting a reference to the container's TransactionManager and nothing works if this is not set correctly to the OpenEJB specific class. To make the lives of users easier, OpenEJB will take the liberty of setting it for you.
Here are the persistence provider classes we understand and the defaults we will set for you:
When using this provider, the hibernate.transaction.manager_lookup_class will be automatically set by OpenEJB to org.apache.openejb.hibernate.TransactionManagerLookup. If the property is already set in the persistence unit it will be overwritten if it starts with the standard "org.hibernate.transaction." prefix.
Custom lookup implementations will never be overwritten automatically.
Or oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.
When using this provider, the toplink.target-server will be automatically set by OpenEJB to org.apache.openejb.toplink.JTATransactionController. If the property is already set in the persistence unit it will be overwritten if it starts with the standard "oracle.toplink.transaction." prefix.
Custom transaction controller implementations will never be overwritten automatically.
Or org.eclipse.persistence.jpa.osgi.PersistenceProvider.
When using this provider, the eclipselink.target-server will be automatically set by OpenEJB to org.apache.openejb.eclipselink.JTATransactionController. If the property is already set in the persistence unit it will be overwritten if it starts with the standard "org.eclipse.persistence.transaction." prefix.
Custom transaction controller implementations will never be overwritten automatically.
OpenJPA is capable of discovering the correct method for locating the TransactionManager without the need for users to specify the specific strategy. Therefore no specific "magic" is required.


06. Practice Hashing
Let's do some Coding Practice
In the previous concept, you learned about Hashing. Now, it is time to see how to code and get the hash using Javascript and Node.js.
Steps to follow
Step 1 Verify crypto-js
module is installed in your projectStep 2 Import from crypto-js
module the sha265 libraryStep 3 Add the code to the generateHash
function
Each step you’ll take to complete this exercise is called out in comments throughout the code. You can find more details and guidance about each of these steps in the text provided below the code.
Let’s get started!
Step 1. Verify crypto-js
module is installed in your project
It is always helpful to verify that all the module dependencies for the project are already installed. Navigate to the workspace at the bottom of this page and open your Project folder.
Localize the package.json
file. This is a json
file that contains the configuration for your Node.js project. In this file, you can check the dependencies by adding:
"dependencies": {
"crypto-js": "^3.1.9-1"
}
Note: Checkout this documentation to learn more about crypto-js
modules and how to install them.
Check if everything looks ok and move forward to the next Step.
Step 2. Import from crypto-js
module the sha265 library
Module libraries allow you to use code developed by other people in your own project.
Go to the crypto-js
documentation and find the piece of code to import the module into your file.
Step 3. Add the code to the generateHash
function
The generateHash
function will take an object as its parameter, and it will allow us to get a hash from the object we pass into it.
To create this function, use the SHA256 ()
function from crypto-js
. The SHA256 ()
function will receive an object as its parameter and return a hash of that object. The returned value will be logged in the console.
To test your program, just open a new Terminal and write: node hashing.js
. Make sure you're in the Project folder (cd Project
).
Tip: It's always a good option to use JSON.stringify(obj)
to convert an object to String
and then use it to generate the hash.
How to run your application?
Open the terminal in the "+" symbol in the Workspace, now you have open a terminal. To be able to execute your code the first thing is to move to the project folder, type in your terminal cd Project
now you are positioning in the Project folder. To run your application type in your terminal the command node hashing.js
.
Workspace
Note: If you want to work locally on your computer, you can clone the boilerplate code from this Github Repository.
Workspace
This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity, so you may be able to download them there.
Workspace Information:
- Default file path:
- Workspace type: generic
- Opened files (when workspace is loaded): n/a
Quizzes
Select the correct Answer
SOLUTION:
f9a8aa13efcf511cb7ac496943a3dd5c14de3a8188c36719aa4350f662957329Select the Cause
SOLUTION:
- The hash changes every time I run the program.