Say Hello! Extending Thymeleaf in 5 minutes
Extending Thymeleaf is easy: you only have to create a dialect and add it to your template engine. Let's see how.
(All the code seen here comes from a working application. You can download the source code of such application from the documentation page)
Dialects
Thymeleaf Dialects are sets of features you can use in your templates. These features include:
- Processing logic specified via processors that apply on specific DOM nodes.
- DOCTYPE translations which allow the automatic conversion of the template's DOCTYPE declaration into a target one, thus allowing validation both before processing --against a DTD including the dialect's tags and attributes-- and after processing --against a DTD not including these, like e.g. a standard XHTML DTD.
- DOCTYPE resolution entries which are fed into Thymeleaf's template parsers and allow the resolution of DTD files for the validation of templates (if required) in an offline manner, this is, without the need to perform remote HTTP connections and/or download anything.
All of these features are optional, and a dialect can specify only some of them. For example, your dialect might not need to specify any DOCTYPE translations because you do not plan to allow the ability to validate templates against a DTD including your dialect's features.
If you've seen fragments of code written in the Standard Dialects, you should have noticed that the processable attributes start with th:. That "th" is called the dialect prefix, and it means that all tags and attributes processed by that dialect will start with such prefix.
It is important also to note that a Template Engine can be set several dialects at a time, thus allowing the processing of templates including features from all of the specified dialects (think of dialects as a sort of JSP taglibs in steroids). What's more, some of these dialects can share prefix, effectively acting as an aggregate dialect.
The simplest dialect ever: Say Hello!
Let's create a dialect for one of our applications. This will be a Spring MVC application, so we will be already using the SpringStandard dialect (have a look at the Thymeleaf + Spring 3 tutorial for more details). But we want to add a new attribute that allows us to say hello to whoever we want, like this:

Hi ya!

The processor
First, we will have to create the attribute processor that will take care of displaying our salutation message.
All attribute processors implement the org.thymeleaf.processor.IProcessor interface —which marks them as processors— and specify a matcher (IProcessor.getMatcher()) that implements the org.thymeleaf.processor.IAttributeNameProcessorMatcher interface —which specifically marks them as attribute processors and allows the use of several engine optimizations—. However, several convenience abstract implementations exist that not only implement the right interfaces, but also ease the development of each type of processor.
Specifically, the AbstractTextChildModifierAttrProcessor class specializes in attributes that substitute the body of the tag they sit on by a text (which is exactly what we want). So we will extend this class for our attribute processor:
public class SayToAttrProcessor
extends AbstractTextChildModifierAttrProcessor {
public SayToAttrProcessor() {
// Only execute this processor for 'sayto' attributes.
super("sayto");
}
public int getPrecedence() {
// A value of 10000 is higher than any attribute in the
// SpringStandard dialect. So this attribute will execute
// after all other attributes from that dialect, if in the
// same tag.
return 10000;
}
/*
* Our processor is a subclass of the convenience abstract implementation
* 'AbstractTextChildModifierAttrProcessor', which takes care of the
* DOM modifying stuff and allows us just to implement this 'getText(...)'
* method to compute the text to be set as tag body.
*/
@Override
protected String getText(final Arguments arguments, final Element element,
final String attributeName) {
return "Hello, " + element.getAttributeValue(attributeName) + "!";
}
}
The dialect class
Creating our processor was very easy, but now we will need to create the dialect class, which will be in charge of telling Thymeleaf that our processor is available.
We could make our dialect implement the org.thymeleaf.dialect.IDialect interface (which is the one every dialect should implement), but instead we will extend a convenience abstract class called AbstractDialect that already implements all methods from that interface, returning empty values for all of them (so that we only have to override the ones we require).
public class HelloDialect extends AbstractDialect {
public HelloDialect() {
super();
}
/*
* All of this dialect's attributes and/or tags
* will start with 'hello:*'
*/
public String getPrefix() {
return "hello";
}
/*
* Non-lenient: if a tag starting with 'hello:' is
* found but no processor exists in this dialect for it,
* throw an exception.
*/
public boolean isLenient() {
return false;
}
/*
* The processors.
*/
@Override
public Set<IProcessor> getProcessors() {
final Set<IProcessor> processors = new HashSet<IProcessor>();
processors.add(new SayToAttrProcessor());
return processors;
}
}
As you can see, we didn't need to set any DOCTYPE resolution entries or translations. We didn't need any of those because our dialect is meant to be used together with the SpringStandard dialect, which already includes a useful set of all those things (although we could have defined them here also if for some reason we wanted to be more exhaustive). All our dialect does is specify a prefix (hello), a leniency, and our "sayto" attribute processor.
Using the hello dialect
Using our new dialect is very easy. This being a Spring MVC application, we just have to set it at the additionalDialects property of the Template Engine bean, so that it is added to the default SpringStandard dialect:
<bean id="templateEngine"
class="org.thymeleaf.spring3.SpringTemplateEngine">
<property name="templateResolver" ref="templateResolver" />
<property name="additionalDialects">
<set>
<bean class="thymeleafexamples.sayhello.dialect.HelloDialect"/>
</set>
</property>
</bean>
And our new attribute would work seamlessly:

Hello World!

Want to know more?
Then have a look at "Say Hello Again! Extending Thymeleaf even more in another 5 minutes".


If you have problems playing videos inline, please refresh your page.
This slide deck is a single web-page with lots of linked videos which can confuse the browser cache.
14.1.1: devops-infrastructure-as-code
14.2.1: clustering-examples-swarm
14.2.2: clustering-examples-kubernetes


| JIRA | Summary | Priority | Component | Reporter | Contributor |
|---|---|---|---|---|---|
| HADOOP-6453 | Hadoop wrapper script shouldn't ignore an existing JAVA_LIBRARY_PATH | Minor | scripts | Chad Metcalf |
| JIRA | Summary | Priority | Component | Reporter | Contributor |
|---|---|---|---|---|---|
| HADOOP-7937 | Forward port SequenceFile#syncFs and friends from Hadoop 1.x | Major | io | Eli Collins | Tom White |
| HADOOP-7119 | add Kerberos HTTP SPNEGO authentication support to Hadoop JT/NN/DN/TT web-consoles | Major | security | Alejandro Abdelnur | Alejandro Abdelnur |
| MAPREDUCE-3837 | Job tracker is not able to recover job in case of crash and after that no user can submit job. | Major | . | Mayank Bansal | Mayank Bansal |
| JIRA | Summary | Priority | Component | Reporter | Contributor |
|---|---|---|---|---|---|
| HADOOP-7338 | LocalDirAllocator improvements for MR-2178 | Major | . | Todd Lipcon | Benoy Antony |
| HADOOP-7272 | Remove unnecessary security related info logs | Major | ipc, security | Suresh Srinivas | Suresh Srinivas |
| HADOOP-6995 | Allow wildcards to be used in ProxyUsers configurations | Minor | security | Todd Lipcon | Todd Lipcon |
| HDFS-2246 | Shortcut a local client reads to a Datanodes files directly | Major | . | Sanjay Radia | Jitendra Nath Pandey |
| HDFS-1601 | Pipeline ACKs are sent as lots of tiny TCP packets | Major | datanode | Todd Lipcon | Todd Lipcon |
| MAPREDUCE-4405 | Adding test case for HierarchicalQueue in TestJobQueueClient | Minor | client | Mayank Bansal | Mayank Bansal |
| MAPREDUCE-4403 | Adding test case for resubmission of jobs in TestRecoveryManager | Minor | jobtracker | Mayank Bansal | Mayank Bansal |
| MAPREDUCE-4349 | Distributed Cache gives inconsistent result if cache Archive files get deleted from task tracker | Minor | . | Mayank Bansal | Mayank Bansal |
| MAPREDUCE-2353 | Make the MR changes to reflect the API changes in SecureIO library | Major | security, task, tasktracker | Devaraj Das | Benoy Antony |
| MAPREDUCE-1521 | Protection against incorrectly configured reduces | Major | jobtracker | Arun C Murthy | Mahadev konar |
| JIRA | Summary | Priority | Component | Reporter | Contributor |
|---|---|---|---|---|---|
| HADOOP-7680 | TestHardLink fails on Mac OS X, when gnu stat is in path | Major | . | Milind Bhandarkar | Milind Bhandarkar |
| HADOOP-7621 | alfredo config should be in a file not readable by users | Critical | security | Alejandro Abdelnur | Aaron T. Myers |
| HADOOP-7115 | Add a cache for getpwuid_r and getpwgid_r calls | Major | . | Arun C Murthy | Alejandro Abdelnur |
| HDFS-3402 | Fix hdfs scripts for secure datanodes | Minor | scripts, security | Benoy Antony | Benoy Antony |
| HDFS-3368 | Missing blocks due to bad DataNodes coming up and down. | Major | namenode | Konstantin Shvachko | Konstantin Shvachko |
| HDFS-2991 | failure to load edits: ClassCastException | Blocker | namenode | Todd Lipcon | Todd Lipcon |
| HDFS-2877 | If locking of a storage dir fails, it will remove the other NN's lock file on exit | Major | namenode | Todd Lipcon | Todd Lipcon |
| HDFS-2718 | Optimize OP_ADD in edits loading | Major | namenode | Konstantin Shvachko | Konstantin Shvachko |
| HDFS-2698 | BackupNode is downloading image from NameNode for every checkpoint | Major | namenode | Konstantin Shvachko | Konstantin Shvachko |
| HDFS-1910 | when dfs.name.dir and dfs.name.edits.dir are same fsimage will be saved twice every time | Minor | namenode | Gokul | |
| HDFS-1584 | Need to check TGT and renew if needed when fetching delegation tokens using HFTP | Major | security | Kan Zhang | Benoy Antony |
| MAPREDUCE-5706 | toBeDeleted parent directories aren't being cleaned up | Major | security | Robert Kanter | Robert Kanter |
| MAPREDUCE-4404 | Adding Test case for TestMRJobClient to verify the user name | Minor | client | Mayank Bansal | Mayank Bansal |
| MAPREDUCE-4360 | Capacity Scheduler Hierarchical leaf queue does not honor the max capacity of container queue | Major | . | Mayank Bansal | Mayank Bansal |
| MAPREDUCE-4318 | TestRecoveryManager should not use raw and deprecated configuration parameters. | Major | test | Konstantin Shvachko | Benoy Antony |
| MAPREDUCE-4314 | Synchronization in JvmManager for 0.22 branch | Major | tasktracker | Konstantin Shvachko | Benoy Antony |
| MAPREDUCE-4164 | Hadoop 22 Exception thrown after task completion causes its reexecution | Major | tasktracker | Mayank Bansal | Mayank Bansal |
| MAPREDUCE-3863 | 0.22 branch mvn deploy is not publishing hadoop-streaming JAR | Critical | build | Alejandro Abdelnur | Benoy Antony |
| MAPREDUCE-3725 | Hadoop 22 hadoop job -list returns user name as NULL | Major | client | Mayank Bansal | Mayank Bansal |
| MAPREDUCE-3593 | MAPREDUCE Impersonation is not working in 22 | Major | job submission | Mayank Bansal | Mayank Bansal |
| MAPREDUCE-2452 | Delegation token cancellation shouldn't hold global JobTracker lock | Major | jobtracker | Devaraj Das | Devaraj Das |
| MAPREDUCE-2420 | JobTracker should be able to renew delegation token over HTTP | Major | . | Boris Shkolnik | Boris Shkolnik |
| MAPREDUCE-2377 | task-controller fails to parse configuration if it doesn't end in | Major | task-controller | Todd Lipcon | Benoy Antony |
| MAPREDUCE-2178 | Race condition in LinuxTaskController permissions handling | Major | security, task-controller | Todd Lipcon | Benoy Antony |
| JIRA | Summary | Priority | Component | Reporter | Contributor |
|---|
| JIRA | Summary | Priority | Component | Reporter | Contributor |
|---|---|---|---|---|---|
| HADOOP-8383 | TestKerberosAuthenticator fails | Minor | security | Benoy Antony | Benoy Antony |
| HADOOP-8381 | Substitute _HOST with hostname for HTTP principals | Minor | security | Benoy Antony | Benoy Antony |
| HDFS-2886 | CreateEditLogs should generate a realistic edit log. | Major | namenode | Konstantin Shvachko | Konstantin Shvachko |
| JIRA | Summary | Priority | Component | Reporter | Contributor |
|---|---|---|---|---|---|
| HADOOP-8357 | Restore security in Hadoop 0.22 branch | Major | security | Konstantin Shvachko | Benoy Antony |
| MAPREDUCE-4249 | Fix failures in streaming test TestFileArgs | Minor | security | Benoy Antony | Benoy Antony |
| MAPREDUCE-4248 | TestRecoveryManager fails | Minor | security | Benoy Antony | Benoy Antony |
| MAPREDUCE-4247 | TestTaskTrackerLocalization fails | Minor | security | Benoy Antony | Benoy Antony |
| MAPREDUCE-4246 | Failure in deleting user directories in Secure hadoop | Major | security | Benoy Antony | Benoy Antony |
| MAPREDUCE-4244 | Fix an issue related to do with setting of correct groups for tasks | Minor | security | Benoy Antony | Benoy Antony |
| MAPREDUCE-4243 | Modify mapreduce build to include task-controller | Minor | build | Benoy Antony | Benoy Antony |
| MAPREDUCE-4240 | Revert MAPREDUCE-2767 | Minor | security | Benoy Antony | Benoy Antony |


Tables
We use tables to organise rows of data.
Responsive tables — card UI
Your tables should work on mobile devices. To utilise the responsive table behaviour use the class .responsive
against the

element.
The mobile magic sauce in the mark-up is driven by data-label="lorem ipsum"
in the html which is then rendered in a psuedo element at small screensizes. Using markup like this: content: attr(data-label)
SASS
// Responsive Tables
table.responsive {
thead {
display: none;
}
tr {
// border: 1px solid $border-colour;
margin-bottom: 10px;
display: block;
float: left;
width: 100%;
box-sizing: border-box;
border: 2px solid $border-colour;
td {
display: block;
text-align: right;
clear:left;
float:left;
width: 100%;
padding: 10px 10px 8px;
box-sizing: border-box;
border-bottom: 1px dotted $border-colour;
&:before {
content: attr(data-label);
float: left;
font-weight: bold;
padding-right: 10px;
}
&:last-child {
border-bottom: none;
}
&:empty {
display: none;
}
}
&.total {
border: 2px solid #000;
}
}
}
@include media(tablet) {
table.responsive {
thead {
display: table-header-group;
}
tr {
display: table-row;
border:none;
float: none;
margin: 0;
th, td {
display: table-cell;
text-align: left;
float: none;
clear: none;
padding: 0.6em 1em 0.5em;
border-bottom-style: solid;
width: auto;
&:first-child {
padding-left: 0;
}
&:last-child {
padding-right: 0;
}
&:before {
display: none;
}
&.numeric {
text-align: right;
}
&.colgroup {
text-align: center
}
&:last-child {
border-bottom: 1px solid $border-colour;
}
}
&.total {
border: none;
td {
border-bottom: none;
&.total {
border-bottom: 2px solid #000;
}
&:last-child {
padding-left: 0;
}
}
}
}
}
@for $i from 1 through 14 {
table.responsive tr th.tw-#{$i * 5} {
width: $i * 5%;
}
}
}
| Date | Description | Amount | |
|---|---|---|---|
| 22 April 2017 | Levy | £5,000.00 | Details for the transaction on 20 Oct 2017 |
| 5 Apr 2017 | Acme Ltd | -£2,000.00 | Details for the transaction on 4 Nov 2017 |
| 5 Apr 2017 | Co-invested — Anvil Plc | -£1,000.00 | Details for the transaction on 4 Nov 2017 |
HTML

Date
Description
Amount

 22 April 2017

Levy

 £5,000.00

Details  for the transaction on 20 Oct 2017

 5 Apr 2017

Acme Ltd

 -£2,000.00

Details  for the transaction on 4 Nov 2017

 5 Apr 2017

Co-invested — Anvil Plc

 -£1,000.00

Details  for the transaction on 4 Nov 2017

Additional treatments
If you need to highlight columns use the .highlight
class on the cells that need highlighting. The grey on black visual treatment passes WCAG AAA at normal and large text sizes with a contrast ratio of 10.85:1.
For times when a large amount of data is absolutely necessary you can utilise the .small
classs to reduce the size of the content. Always try to maintain the default size and in cases where you have multiple tables default to small on all tables if any one table requires it. This creates a consistency to the interface and avoids a dissonance that can sometimes occur when users are presented with data in differing formats.
You can highlight total rows in the

element by adding the class .total
to both the

and
elements. When combined with data-labels
you can create an elegent ‘totals’ card.
| Co-investment | |||||
|---|---|---|---|---|---|
| Course | Paid from levy | 90% paid by Government | 10% paid by you | Amount | |
| Financial services administrator level 3 | -£1000.00 | £0.00 | £0.00 | £-1000.00 | Details |
| Financial services administrator level 3 | -£1000.00 | £0.00 | £0.00 | £-1000.00 | Details |
| Financial services administrator level 3 | -£1000.00 | £0.00 | £0.00 | £-1000.00 | Details |
| -£875.00 | -£875.00 | -£875.00 | -£875.00 |
HTML

Co-investment

Course
Paid from levy
90% paid by Government
10% paid by you
Amount

Financial services administrator level 3
-£1000.00
£0.00
£0.00
£-1000.00
Details

Financial services administrator level 3
-£1000.00
£0.00
£0.00
£-1000.00
Details

Financial services administrator level 3
-£1000.00
£0.00
£0.00
£-1000.00
Details

-£875.00
-£875.00
-£875.00
-£875.00

SASS
// Small tables
table.small th, table.small td {
font-size: 16px;
}
// Table highlights
td, th {
&.highlight {
background: $grey-3;
}
}
Numeric tabular data
- when comparing rows of numbers, align numbers to the right in table cells
- use the GOV.UK frontend toolkit’s tabular numbers to allow numbers of the same width to be more easily compared
| Date | Paper form | Digital |
|---|---|---|
| 25 November to 1 December 2013 | 2,763 | 1,792 |
| 2 to 8 December 2013 | 2,850 | 1,740 |
| 9 to 15 December 2013 | 2,388 | 1,683 |
HTML

Date
Paper form
Digital

25 November to 1 December 2013
2,763
1,792

2 to 8 December 2013
2,850
1,740

9 to 15 December 2013
2,388
1,683


Akan names are derived from Ghanian culture. Frequently in Ghana, children are given their first name as a 'day name' which corresponds to the day in the week they were born. Here are Ghanian day names.
This application will allow you to enter your birthday and gender, then outputs your akane name. Do you want to try it ?


001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 * 017 */ 018package org.apache.bcel.verifier.structurals; 019 020import java.util.ArrayList; 021import java.util.HashMap; 022import java.util.HashSet; 023import java.util.List; 024import java.util.Map; 025import java.util.Set; 026 027import org.apache.bcel.generic.ASTORE; 028import org.apache.bcel.generic.ATHROW; 029import org.apache.bcel.generic.BranchInstruction; 030import org.apache.bcel.generic.CodeExceptionGen; 031import org.apache.bcel.generic.GotoInstruction; 032import org.apache.bcel.generic.IndexedInstruction; 033import org.apache.bcel.generic.Instruction; 034import org.apache.bcel.generic.InstructionHandle; 035import org.apache.bcel.generic.JsrInstruction; 036import org.apache.bcel.generic.LocalVariableInstruction; 037import org.apache.bcel.generic.MethodGen; 038import org.apache.bcel.generic.RET; 039import org.apache.bcel.generic.ReturnInstruction; 040import org.apache.bcel.generic.Select; 041import org.apache.bcel.verifier.exc.AssertionViolatedException; 042import org.apache.bcel.verifier.exc.StructuralCodeConstraintException; 043 044/** 045 * Instances of this class contain information about the subroutines 046 * found in a code array of a method. 047 * This implementation considers the top-level (the instructions 048 * reachable without a JSR or JSR_W starting off from the first 049 * instruction in a code array of a method) being a special subroutine; 050 * see getTopLevel() for that. 051 * Please note that the definition of subroutines in the Java Virtual 052 * Machine Specification, Second Edition is somewhat incomplete. 053 * Therefore, JustIce uses an own, more rigid notion. 054 * Basically, a subroutine is a piece of code that starts at the target 055 * of a JSR of JSR_W instruction and ends at a corresponding RET 056 * instruction. Note also that the control flow of a subroutine 057 * may be complex and non-linear; and that subroutines may be nested. 058 * JustIce also mandates subroutines not to be protected by exception 059 * handling code (for the sake of control flow predictability). 060 * To understand JustIce's notion of subroutines, please read 061 * 062 * TODO: refer to the paper. 063 * 064 * @version $Id: Subroutines.java 1749603 2016-06-21 20:50:19Z ggregory $ 065 * @see #getTopLevel() 066 */ 067public class Subroutines{ 068 /** 069 * This inner class implements the Subroutine interface. 070 */ 071 private class SubroutineImpl implements Subroutine{ 072 /** 073 * UNSET, a symbol for an uninitialized localVariable 074 * field. This is used for the "top-level" Subroutine; 075 * i.e. no subroutine. 076 */ 077 private static final int UNSET = -1; 078 079 /** 080 * The Local Variable slot where the first 081 * instruction of this subroutine (an ASTORE) stores 082 * the JsrInstruction's ReturnAddress in and 083 * the RET of this subroutine operates on. 084 */ 085 private int localVariable = UNSET; 086 087 /** The instructions that belong to this subroutine. */ 088 private final Set<InstructionHandle> instructions = new HashSet<>(); // Elements: InstructionHandle 089 090 /* 091 * Refer to the Subroutine interface for documentation. 092 */ 093 @Override 094 public boolean contains(final InstructionHandle inst) { 095 return instructions.contains(inst); 096 } 097 098 /** 099 * The JSR or JSR_W instructions that define this 100 * subroutine by targeting it. 101 */ 102 private final Set<InstructionHandle> theJSRs = new HashSet<>(); 103 104 /** 105 * The RET instruction that leaves this subroutine. 106 */ 107 private InstructionHandle theRET; 108 109 /** 110 * Returns a String representation of this object, merely 111 * for debugging purposes. 112 * (Internal) Warning: Verbosity on a problematic subroutine may cause 113 * stack overflow errors due to recursive subSubs() calls. 114 * Don't use this, then. 115 */ 116 @Override 117 public String toString() { 118 final StringBuilder ret = new StringBuilder(); 119 ret.append("Subroutine: Local variable is '").append(localVariable); 120 ret.append("', JSRs are '").append(theJSRs); 121 ret.append("', RET is '").append(theRET); 122 ret.append("', Instructions: '").append(instructions).append("'."); 123 124 ret.append(" Accessed local variable slots: '"); 125 int[] alv = getAccessedLocalsIndices(); 126 for (final int element : alv) { 127 ret.append(element);ret.append(" "); 128 } 129 ret.append("'."); 130 131 ret.append(" Recursively (via subsub...routines) accessed local variable slots: '"); 132 alv = getRecursivelyAccessedLocalsIndices(); 133 for (final int element : alv) { 134 ret.append(element);ret.append(" "); 135 } 136 ret.append("'."); 137 138 return ret.toString(); 139 } 140 141 /** 142 * Sets the leaving RET instruction. Must be invoked after all instructions are added. 143 * Must not be invoked for top-level 'subroutine'. 144 */ 145 void setLeavingRET() { 146 if (localVariable == UNSET) { 147 throw new AssertionViolatedException( 148 "setLeavingRET() called for top-level 'subroutine' or forgot to set local variable first."); 149 } 150 InstructionHandle ret = null; 151 for (final InstructionHandle actual : instructions) { 152 if (actual.getInstruction() instanceof RET) { 153 if (ret != null) { 154 throw new StructuralCodeConstraintException( 155 "Subroutine with more then one RET detected: '"+ret+"' and '"+actual+"'."); 156 } 157 ret = actual; 158 } 159 } 160 if (ret == null) { 161 throw new StructuralCodeConstraintException("Subroutine without a RET detected."); 162 } 163 if (((RET) ret.getInstruction()).getIndex() != localVariable) { 164 throw new StructuralCodeConstraintException( 165 "Subroutine uses '"+ret+"' which does not match the correct local variable '"+localVariable+"'."); 166 } 167 theRET = ret; 168 } 169 170 /* 171 * Refer to the Subroutine interface for documentation. 172 */ 173 @Override 174 public InstructionHandle[] getEnteringJsrInstructions() { 175 if (this == getTopLevel()) { 176 throw new AssertionViolatedException("getLeavingRET() called on top level pseudo-subroutine."); 177 } 178 final InstructionHandle[] jsrs = new InstructionHandle[theJSRs.size()]; 179 return theJSRs.toArray(jsrs); 180 } 181 182 /** 183 * Adds a new JSR or JSR_W that has this subroutine as its target. 184 */ 185 public void addEnteringJsrInstruction(final InstructionHandle jsrInst) { 186 if ( (jsrInst == null) || (! (jsrInst.getInstruction() instanceof JsrInstruction))) { 187 throw new AssertionViolatedException("Expecting JsrInstruction InstructionHandle."); 188 } 189 if (localVariable == UNSET) { 190 throw new AssertionViolatedException("Set the localVariable first!"); 191 } 192 // Something is wrong when an ASTORE is targeted that does not operate on the same local variable than the rest of the 193 // JsrInstruction-targets and the RET. 194 // (We don't know out leader here so we cannot check if we're really targeted!) 195 if (localVariable != ((ASTORE) (((JsrInstruction) jsrInst.getInstruction()).getTarget().getInstruction())).getIndex()) { 196 throw new AssertionViolatedException("Setting a wrong JsrInstruction."); 197 } 198 theJSRs.add(jsrInst); 199 } 200 201 /* 202 * Refer to the Subroutine interface for documentation. 203 */ 204 @Override 205 public InstructionHandle getLeavingRET() { 206 if (this == getTopLevel()) { 207 throw new AssertionViolatedException("getLeavingRET() called on top level pseudo-subroutine."); 208 } 209 return theRET; 210 } 211 212 /* 213 * Refer to the Subroutine interface for documentation. 214 */ 215 @Override 216 public InstructionHandle[] getInstructions() { 217 final InstructionHandle[] ret = new InstructionHandle[instructions.size()]; 218 return instructions.toArray(ret); 219 } 220 221 /* 222 * Adds an instruction to this subroutine. 223 * All instructions must have been added before invoking setLeavingRET(). 224 * @see #setLeavingRET 225 */ 226 void addInstruction(final InstructionHandle ih) { 227 if (theRET != null) { 228 throw new AssertionViolatedException("All instructions must have been added before invoking setLeavingRET()."); 229 } 230 instructions.add(ih); 231 } 232 233 /* Satisfies Subroutine.getRecursivelyAccessedLocalsIndices(). */ 234 @Override 235 public int[] getRecursivelyAccessedLocalsIndices() { 236 final Set<Integer> s = new HashSet<>(); 237 final int[] lvs = getAccessedLocalsIndices(); 238 for (final int lv : lvs) { 239 s.add(Integer.valueOf(lv)); 240 } 241 _getRecursivelyAccessedLocalsIndicesHelper(s, this.subSubs()); 242 final int[] ret = new int[s.size()]; 243 int j=-1; 244 for (final Integer index : s) { 245 j++; 246 ret[j] = index.intValue(); 247 } 248 return ret; 249 } 250 251 /** 252 * A recursive helper method for getRecursivelyAccessedLocalsIndices(). 253 * @see #getRecursivelyAccessedLocalsIndices() 254 */ 255 private void _getRecursivelyAccessedLocalsIndicesHelper(final Set<Integer> s, final Subroutine[] subs) { 256 for (final Subroutine sub : subs) { 257 final int[] lvs = sub.getAccessedLocalsIndices(); 258 for (final int lv : lvs) { 259 s.add(Integer.valueOf(lv)); 260 } 261 if(sub.subSubs().length != 0) { 262 _getRecursivelyAccessedLocalsIndicesHelper(s, sub.subSubs()); 263 } 264 } 265 } 266 267 /* 268 * Satisfies Subroutine.getAccessedLocalIndices(). 269 */ 270 @Override 271 public int[] getAccessedLocalsIndices() { 272 //TODO: Implement caching. 273 final Set<Integer> acc = new HashSet<>(); 274 if (theRET == null && this != getTopLevel()) { 275 throw new AssertionViolatedException( 276 "This subroutine object must be built up completely before calculating accessed locals."); 277 } 278 { 279 for (final InstructionHandle ih : instructions) { 280 // RET is not a LocalVariableInstruction in the current version of BCEL. 281 if (ih.getInstruction() instanceof LocalVariableInstruction || ih.getInstruction() instanceof RET) { 282 final int idx = ((IndexedInstruction) (ih.getInstruction())).getIndex(); 283 acc.add(Integer.valueOf(idx)); 284 // LONG? DOUBLE?. 285 try{ 286 // LocalVariableInstruction instances are typed without the need to look into 287 // the constant pool. 288 if (ih.getInstruction() instanceof LocalVariableInstruction) { 289 final int s = ((LocalVariableInstruction) ih.getInstruction()).getType(null).getSize(); 290 if (s==2) { 291 acc.add(Integer.valueOf(idx+1)); 292 } 293 } 294 } 295 catch(final RuntimeException re) { 296 throw new AssertionViolatedException("Oops. BCEL did not like NULL as a ConstantPoolGen object.", re); 297 } 298 } 299 } 300 } 301 302 { 303 final int[] ret = new int[acc.size()]; 304 int j=-1; 305 for (final Integer accessedLocal : acc) { 306 j++; 307 ret[j] = accessedLocal.intValue(); 308 } 309 return ret; 310 } 311 } 312 313 /* 314 * Satisfies Subroutine.subSubs(). 315 */ 316 @Override 317 public Subroutine[] subSubs() { 318 final Set<Subroutine> h = new HashSet<>(); 319 320 for (final InstructionHandle ih : instructions) { 321 final Instruction inst = ih.getInstruction(); 322 if (inst instanceof JsrInstruction) { 323 final InstructionHandle targ = ((JsrInstruction) inst).getTarget(); 324 h.add(getSubroutine(targ)); 325 } 326 } 327 final Subroutine[] ret = new Subroutine[h.size()]; 328 return h.toArray(ret); 329 } 330 331 /* 332 * Sets the local variable slot the ASTORE that is targeted 333 * by the JsrInstructions of this subroutine operates on. 334 * This subroutine's RET operates on that same local variable 335 * slot, of course. 336 */ 337 void setLocalVariable(final int i) { 338 if (localVariable != UNSET) { 339 throw new AssertionViolatedException("localVariable set twice."); 340 } 341 localVariable = i; 342 } 343 344 /** 345 * The default constructor. 346 */ 347 public SubroutineImpl() { 348 } 349 350 }// end Inner Class SubrouteImpl 351 352 //Node coloring constants 353 private enum ColourConstants{ 354 WHITE, 355 GRAY, 356 BLACK 357 } 358 359 /** 360 * The map containing the subroutines found. 361 * Key: InstructionHandle of the leader of the subroutine. 362 * Elements: SubroutineImpl objects. 363 */ 364 private final Map<InstructionHandle, Subroutine> subroutines = new HashMap<>(); 365 366 /** 367 * This is referring to a special subroutine, namely the 368 * top level. This is not really a subroutine but we use 369 * it to distinguish between top level instructions and 370 * unreachable instructions. 371 */ 372 // CHECKSTYLE:OFF 373 public final Subroutine TOPLEVEL; // TODO can this be made private? 374 // CHECKSTYLE:ON 375 376 /** 377 * Constructor. 378 * @param mg A MethodGen object representing method to 379 * create the Subroutine objects of. 380 * Assumes that JustIce strict checks are needed. 381 */ 382 public Subroutines(final MethodGen mg) { 383 this(mg, true); 384 } 385 386 /** 387 * Constructor. 388 * @param mg A MethodGen object representing method to 389 * create the Subroutine objects of. 390 * @param enableJustIceCheck whether to enable additional JustIce checks 391 * @since 6.0 392 */ 393 public Subroutines(final MethodGen mg, final boolean enableJustIceCheck) { 394 final InstructionHandle[] all = mg.getInstructionList().getInstructionHandles(); 395 final CodeExceptionGen[] handlers = mg.getExceptionHandlers(); 396 397 // Define our "Toplevel" fake subroutine. 398 TOPLEVEL = new SubroutineImpl(); 399 400 // Calculate "real" subroutines. 401 final Set<InstructionHandle> sub_leaders = new HashSet<>(); // Elements: InstructionHandle 402 for (final InstructionHandle element : all) { 403 final Instruction inst = element.getInstruction(); 404 if (inst instanceof JsrInstruction) { 405 sub_leaders.add(((JsrInstruction) inst).getTarget()); 406 } 407 } 408 409 // Build up the database. 410 for (final InstructionHandle astore : sub_leaders) { 411 final SubroutineImpl sr = new SubroutineImpl(); 412 sr.setLocalVariable( ((ASTORE) (astore.getInstruction())).getIndex() ); 413 subroutines.put(astore, sr); 414 } 415 416 // Fake it a bit. We want a virtual "TopLevel" subroutine. 417 subroutines.put(all[0], TOPLEVEL); 418 sub_leaders.add(all[0]); 419 420 // Tell the subroutines about their JsrInstructions. 421 // Note that there cannot be a JSR targeting the top-level 422 // since "Jsr 0" is disallowed in Pass 3a. 423 // Instructions shared by a subroutine and the toplevel are 424 // disallowed and checked below, after the BFS. 425 for (final InstructionHandle element : all) { 426 final Instruction inst = element.getInstruction(); 427 if (inst instanceof JsrInstruction) { 428 final InstructionHandle leader = ((JsrInstruction) inst).getTarget(); 429 ((SubroutineImpl) getSubroutine(leader)).addEnteringJsrInstruction(element); 430 } 431 } 432 433 // Now do a BFS from every subroutine leader to find all the 434 // instructions that belong to a subroutine. 435 // we don't want to assign an instruction to two or more Subroutine objects. 436 final Set<InstructionHandle> instructions_assigned = new HashSet<>(); 437 438 //Graph colouring. Key: InstructionHandle, Value: ColourConstants enum . 439 final Map<InstructionHandle, ColourConstants> colors = new HashMap<>(); 440 441 final List<InstructionHandle> Q = new ArrayList<>(); 442 for (final InstructionHandle actual : sub_leaders) { 443 // Do some BFS with "actual" as the root of the graph. 444 // Init colors 445 for (final InstructionHandle element : all) { 446 colors.put(element, ColourConstants.WHITE); 447 } 448 colors.put(actual, ColourConstants.GRAY); 449 // Init Queue 450 451 Q.clear(); 452 Q.add(actual); // add(Obj) adds to the end, remove(0) removes from the start. 453 454 /* 455 * BFS ALGORITHM MODIFICATION: 456 * Start out with multiple "root" nodes, as exception handlers are starting points of top-level code, too. 457 * [why top-level? 458 * TODO: Refer to the special JustIce notion of subroutines.] 459 */ 460 if (actual == all[0]) { 461 for (final CodeExceptionGen handler : handlers) { 462 colors.put(handler.getHandlerPC(), ColourConstants.GRAY); 463 Q.add(handler.getHandlerPC()); 464 } 465 } 466 /* CONTINUE NORMAL BFS ALGORITHM */ 467 468 // Loop until Queue is empty 469 while (Q.size() != 0) { 470 final InstructionHandle u = Q.remove(0); 471 final InstructionHandle[] successors = getSuccessors(u); 472 for (final InstructionHandle successor : successors) { 473 if (colors.get(successor) == ColourConstants.WHITE) { 474 colors.put(successor, ColourConstants.GRAY); 475 Q.add(successor); 476 } 477 } 478 colors.put(u, ColourConstants.BLACK); 479 } 480 // BFS ended above. 481 for (final InstructionHandle element : all) { 482 if (colors.get(element) == ColourConstants.BLACK) { 483 ((SubroutineImpl) (actual==all[0]?getTopLevel():getSubroutine(actual))).addInstruction(element); 484 if (instructions_assigned.contains(element)) { 485 throw new StructuralCodeConstraintException("Instruction '"+element+ 486 "' is part of more than one subroutine (or of the top level and a subroutine)."); 487 } 488 instructions_assigned.add(element); 489 } 490 } 491 if (actual != all[0]) {// If we don't deal with the top-level 'subroutine' 492 ((SubroutineImpl) getSubroutine(actual)).setLeavingRET(); 493 } 494 } 495 496 if (enableJustIceCheck) { 497 // Now make sure no instruction of a Subroutine is protected by exception handling code 498 // as is mandated by JustIces notion of subroutines. 499 for (final CodeExceptionGen handler : handlers) { 500 InstructionHandle _protected = handler.getStartPC(); 501 while (_protected != handler.getEndPC().getNext()) { 502 // Note the inclusive/inclusive notation of "generic API" exception handlers! 503 for (final Subroutine sub : subroutines.values()) { 504 if (sub != subroutines.get(all[0])) { // We don't want to forbid top-level exception handlers. 505 if (sub.contains(_protected)) { 506 throw new StructuralCodeConstraintException("Subroutine instruction '"+_protected+ 507 "' is protected by an exception handler, '"+handler+ 508 "'. This is forbidden by the JustIce verifier due to its clear definition of subroutines."); 509 } 510 } 511 } 512 _protected = _protected.getNext(); 513 } 514 } 515 } 516 517 // Now make sure no subroutine is calling a subroutine 518 // that uses the same local variable for the RET as themselves 519 // (recursively). 520 // This includes that subroutines may not call themselves 521 // recursively, even not through intermediate calls to other 522 // subroutines. 523 noRecursiveCalls(getTopLevel(), new HashSet<Integer>()); 524 525 } 526 527 /** 528 * This (recursive) utility method makes sure that 529 * no subroutine is calling a subroutine 530 * that uses the same local variable for the RET as themselves 531 * (recursively). 532 * This includes that subroutines may not call themselves 533 * recursively, even not through intermediate calls to other 534 * subroutines. 535 * 536 * @throws StructuralCodeConstraintException if the above constraint is not satisfied. 537 */ 538 private void noRecursiveCalls(final Subroutine sub, final Set<Integer> set) { 539 final Subroutine[] subs = sub.subSubs(); 540 541 for (final Subroutine sub2 : subs) { 542 final int index = ((RET) (sub2.getLeavingRET().getInstruction())).getIndex(); 543 544 if (!set.add(Integer.valueOf(index))) { 545 // Don't use toString() here because of possibly infinite recursive subSubs() calls then. 546 final SubroutineImpl si = (SubroutineImpl) sub2; 547 throw new StructuralCodeConstraintException("Subroutine with local variable '"+si.localVariable+"', JSRs '"+ 548 si.theJSRs+"', RET '"+si.theRET+ 549 "' is called by a subroutine which uses the same local variable index as itself; maybe even a recursive call?"+ 550 " JustIce's clean definition of a subroutine forbids both."); 551 } 552 553 noRecursiveCalls(sub2, set); 554 555 set.remove(Integer.valueOf(index)); 556 } 557 } 558 559 /** 560 * Returns the Subroutine object associated with the given 561 * leader (that is, the first instruction of the subroutine). 562 * You must not use this to get the top-level instructions 563 * modeled as a Subroutine object. 564 * 565 * @see #getTopLevel() 566 */ 567 public Subroutine getSubroutine(final InstructionHandle leader) { 568 final Subroutine ret = subroutines.get(leader); 569 570 if (ret == null) { 571 throw new AssertionViolatedException( 572 "Subroutine requested for an InstructionHandle that is not a leader of a subroutine."); 573 } 574 575 if (ret == TOPLEVEL) { 576 throw new AssertionViolatedException("TOPLEVEL special subroutine requested; use getTopLevel()."); 577 } 578 579 return ret; 580 } 581 582 /** 583 * Returns the subroutine object associated with the 584 * given instruction. This is a costly operation, you 585 * should consider using getSubroutine(InstructionHandle). 586 * Returns 'null' if the given InstructionHandle lies 587 * in so-called 'dead code', i.e. code that can never 588 * be executed. 589 * 590 * @see #getSubroutine(InstructionHandle) 591 * @see #getTopLevel() 592 */ 593 public Subroutine subroutineOf(final InstructionHandle any) { 594 for (final Subroutine s : subroutines.values()) { 595 if (s.contains(any)) { 596 return s; 597 } 598 } 599System.err.println("DEBUG: Please verify '"+any.toString(true)+"' lies in dead code."); 600 return null; 601 //throw new AssertionViolatedException("No subroutine for InstructionHandle found (DEAD CODE?)."); 602 } 603 604 /** 605 * For easy handling, the piece of code that is <B>not</B> a 606 * subroutine, the top-level, is also modeled as a Subroutine 607 * object. 608 * It is a special Subroutine object where <B>you must not invoke 609 * getEnteringJsrInstructions() or getLeavingRET()</B>. 610 * 611 * @see Subroutine#getEnteringJsrInstructions() 612 * @see Subroutine#getLeavingRET() 613 */ 614 public Subroutine getTopLevel() { 615 return TOPLEVEL; 616 } 617 /** 618 * A utility method that calculates the successors of a given InstructionHandle 619 * <B>in the same subroutine</B>. That means, a RET does not have any successors 620 * as defined here. A JsrInstruction has its physical successor as its successor 621 * (opposed to its target) as defined here. 622 */ 623 private static InstructionHandle[] getSuccessors(final InstructionHandle instruction) { 624 final InstructionHandle[] empty = new InstructionHandle[0]; 625 final InstructionHandle[] single = new InstructionHandle[1]; 626 627 final Instruction inst = instruction.getInstruction(); 628 629 if (inst instanceof RET) { 630 return empty; 631 } 632 633 // Terminates method normally. 634 if (inst instanceof ReturnInstruction) { 635 return empty; 636 } 637 638 // Terminates method abnormally, because JustIce mandates 639 // subroutines not to be protected by exception handlers. 640 if (inst instanceof ATHROW) { 641 return empty; 642 } 643 644 // See method comment. 645 if (inst instanceof JsrInstruction) { 646 single[0] = instruction.getNext(); 647 return single; 648 } 649 650 if (inst instanceof GotoInstruction) { 651 single[0] = ((GotoInstruction) inst).getTarget(); 652 return single; 653 } 654 655 if (inst instanceof BranchInstruction) { 656 if (inst instanceof Select) { 657 // BCEL's getTargets() returns only the non-default targets, 658 // thanks to Eli Tilevich for reporting. 659 final InstructionHandle[] matchTargets = ((Select) inst).getTargets(); 660 final InstructionHandle[] ret = new InstructionHandle[matchTargets.length+1]; 661 ret[0] = ((Select) inst).getTarget(); 662 System.arraycopy(matchTargets, 0, ret, 1, matchTargets.length); 663 return ret; 664 } 665 final InstructionHandle[] pair = new InstructionHandle[2]; 666 pair[0] = instruction.getNext(); 667 pair[1] = ((BranchInstruction) inst).getTarget(); 668 return pair; 669 } 670 671 // default case: Fall through. 672 single[0] = instruction.getNext(); 673 return single; 674 } 675 676 /** 677 * Returns a String representation of this object; merely for debugging puposes. 678 */ 679 @Override 680 public String toString() { 681 return "---\n"+subroutines+"\n---\n"; 682 } 683}


Evening 10 Series 2018 Event 14
| Kib 4 |
17 July 18 |
|
10 |
miles |
| Name |
Position |
Road bike |
Actual Time |
Avg. mph |
| |
|
|
|
|
| Jordon
Peacock |
1 |
|
00:19:56 |
30.10 |
| Ed
Tarelli |
2 |
|
00:21:33 |
27.84 |
| Simon
Hopkins |
3 |
|
00:22:00 |
27.27 |
| Phil
Rayner |
4 |
|
00:22:01 |
27.25 |
| Ed
Watson |
5 |
|
00:22:22 |
26.83 |
| Hans van
Nierop |
6 |
|
00:22:27 |
26.73 |
| James
Lowe |
7 |
|
00:22:57 |
26.14 |
| James
Moore |
8 |
1 |
00:23:04 |
26.01 |
| Jonathan
Durnin |
9 |
|
00:23:08 |
25.94 |
| Michael
Burke |
10 |
2 |
00:23:27 |
25.59 |
| Alistair
Watson |
11 |
|
00:24:06 |
24.90 |
| Gary
Roberts |
12 |
|
00:24:09 |
24.84 |
| Edward
Hopkins |
13 |
|
00:24:28 |
24.52 |
| Bill
Barrie |
14 |
|
00:24:29 |
24.51 |
| Roger
Kockelbergh |
15 |
|
00:24:36 |
24.39 |
| Linda
Hubbard |
16 |
|
00:24:46 |
24.23 |
| Mitchell
James |
17 |
|
00:25:26 |
23.59 |
| Ian
Murdey |
18 |
|
00:26:01 |
23.06 |
| Simon
Ward |
19 |
|
00:26:05 |
23.00 |
| Michael
Church |
20 |
|
00:26:10 |
22.93 |
| Mark
Chapman |
21 |
3 |
00:26:29 |
22.66 |
| Stewart
Holland |
22 |
4 |
00:26:35 |
22.57 |
| Andrew
Jones |
23 |
|
00:27:00 |
22.22 |
| David
Bayliss |
23 |
|
00:27:00 |
22.22 |
| Jennifer
Clegg |
25 |
|
00:27:22 |
21.92 |
| Tom Evans |
26 |
|
00:27:37 |
21.73 |
| Tony
Talbot |
27 |
|
00:29:11 |
20.56 |
| Steve
Alden |
28 |
|
00:29:13 |
20.54 |
| Lorna
Marlow |
29 |
5 |
00:29:56 |
20.04 |
| Andrew
Weatherby |
30 |
6 |
00:30:02 |
19.98 |
| Claire Moore |
31 |
7 |
00:30:05 |
19.94 |
| Debbie
Ward |
32 |
8 |
00:34:31 |
17.38 |
| Ben
Waddington |
|
|
DNS |
|
|
|
|
|
|


| in_html {fansi} | R Documentation |
Helper function that assembles user provided HTML and CSS into a temporary text file, and by default displays it in the browser. Intended for use in examples.
in_html(x, css = character(), pre = TRUE, display = TRUE, clean = display)
x |
character vector of html encoded strings. |
css |
character vector of css styles. |
pre |
TRUE (default) or FALSE, whether to wrap |
display |
TRUE or FALSE, whether to display the resulting page in a browser window. If TRUE, will sleep for one second before returning, and will delete the temporary file used to store the HTML. |
clean |
TRUE or FALSE, if TRUE and |
character(1L) the file location of the page, invisibly, but keep in
mind it will have been deleted if clean=TRUE
.
Other HTML functions:
html_esc()
,
make_styles()
,
sgr_to_html()
txt <- "\033[31;42mHello \033[7mWorld\033[m" writeLines(txt) html <- sgr_to_html(txt) ## Not run: in_html(html) # spawns a browser window ## End(Not run) writeLines(readLines(in_html(html, display=FALSE))) css <- "SPAN {text-decoration: underline;}" writeLines(readLines(in_html(html, css=css, display=FALSE))) ## Not run: in_html(html, css) ## End(Not run)


Rurutu is the northernmost of the Austral islands and the village of Moerai lies on its NE side. The island is becoming well known for the number of whales which can be seen arround its shores. Most of the 2,000 inhabitants of the island are fishermen and farmers and its polynesian culture has remained largely unchanged.
Moerai is the Port of Entry.
It is NO LONGER compulsory for all yachts visiting French Polynesia to visit Papeete Customs and Immigration to complete the clearing-in process.
Yachts can now clear in or out of FP with the “gendarmes” offices (French Police) at the ports of entry in the other islands.
The Gendarmerie Nationale in Moerai village can deal with Immigration and Customs formalities.
For full details on clearance into and out of FP go to French Polynesia Formalities.
Last updated July 2014.
The island has a fringing coral reef very close to the shore.
Moerai has a small harbour and a quay where the supply ship berths.
There is no further information available about berthing or anchoring here, althouth there does appear to be a small quay on the western side of the island at Avera.
Last updated November 2011.


|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.imageio.spi.ServiceRegistry
public class ServiceRegistry
A registry for service provider instances.
A service is a well-known set of interfaces and (usually abstract) classes. A service provider is a specific implementation of a service. The classes in a provider typically implement the interface or subclass the class defined by the service itself.
Service providers are stored in one or more categories,
each of which is defined by a class of interface (described by a
Class
object) that all of its members must implement.
The set of categories may be changed dynamically.
Only a single instance of a given leaf class (that is, the
actual class returned by getClass()
, as opposed to any
inherited classes or interfaces) may be registered. That is,
suppose that the
com.mycompany.mypkg.GreenServiceProvider
class
implements the com.mycompany.mypkg.MyService
interface. If a GreenServiceProvider
instance is
registered, it will be stored in the category defined by the
MyService
class. If a new instance of
GreenServiceProvider
is registered, it will replace
the previous instance. In practice, service provider objects are
usually singletons so this behavior is appropriate.
To declare a service provider, a services
subdirectory is placed within the META-INF
directory
that is present in every JAR file. This directory contains a file
for each service provider interface that has one or more
implementation classes present in the JAR file. For example, if
the JAR file contained a class named
com.mycompany.mypkg.MyServiceImpl
which implements the
javax.someapi.SomeService
interface, the JAR file
would contain a file named:
META-INF/services/javax.someapi.SomeServicecontaining the line:
com.mycompany.mypkg.MyService
The service provider classes should be to be lightweight and quick to load. Implementations of these interfaces should avoid complex dependencies on other classes and on native code. The usual pattern for more complex services is to register a lightweight proxy for the heavyweight service.
An application may customize the contents of a registry as it sees fit, so long as it has the appropriate runtime permission.
For more details on declaring service providers, and the JAR format in general, see the JAR File Specification.
RegisterableService
| Nested Class Summary | |
|---|---|
static interface |
ServiceRegistry.Filter
A simple filter interface used by ServiceRegistry.getServiceProviders to select
providers matching an arbitrary criterion. |
| Constructor Summary | |
|---|---|
ServiceRegistry(Iterator<Class<?>> categories)
Constructs a ServiceRegistry instance with a
set of categories taken from the categories
argument. |
| Method Summary | ||
|---|---|---|
boolean |
contains(Object provider)
Returns true if provider is currently
registered. |
|
void |
deregisterAll()
Deregisters all currently registered service providers from all categories. |
|
void |
deregisterAll(Class<?> category)
Deregisters all service provider object currently registered under the given category. |
|
void |
deregisterServiceProvider(Object provider)
Removes a service provider object from all categories that contain it. |
|
|
deregisterServiceProvider(T provider,
Class<T> category)
Removes a service provider object from the given category. |
|
void |
finalize()
Finalizes this object prior to garbage collection. |
|
Iterator<Class<?>> |
getCategories()
Returns an Iterator of Class objects
indicating the current set of categories. |
|
|
getServiceProviderByClass(Class<T> providerClass)
Returns the currently registered service provider object that is of the given class type. |
|
|
getServiceProviders(Class<T> category,
boolean useOrdering)
Returns an Iterator containing all registered
service providers in the given category. |
|
|
getServiceProviders(Class<T> category,
ServiceRegistry.Filter filter,
boolean useOrdering)
Returns an Iterator containing service provider
objects within a given category that satisfy a criterion
imposed by the supplied ServiceRegistry.Filter
object's filter method. |
|
static
|
lookupProviders(Class<T> providerClass)
Locates and incrementally instantiates the available providers of a given service using the context class loader. |
|
static
|
lookupProviders(Class<T> providerClass,
ClassLoader loader)
Searches for implementations of a particular service class using the given class loader. |
|
void |
registerServiceProvider(Object provider)
Adds a service provider object to the registry. |
|
|
registerServiceProvider(T provider,
Class<T> category)
Adds a service provider object to the registry. |
|
void |
registerServiceProviders(Iterator<?> providers)
Adds a set of service provider objects, taken from an Iterator to the registry. |
|
|
setOrdering(Class<T> category,
T firstProvider,
T secondProvider)
Sets a pairwise ordering between two service provider objects within a given category. |
|
|
unsetOrdering(Class<T> category,
T firstProvider,
T secondProvider)
Sets a pairwise ordering between two service provider objects within a given category. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ServiceRegistry(Iterator<Class<?>> categories)
ServiceRegistry
instance with a
set of categories taken from the categories
argument.
categories
- an Iterator
containing
Class
objects to be used to define categories.
IllegalArgumentException
- if
categories
is null
.| Method Detail |
|---|
public static <T> Iterator<T> lookupProviders(Class<T> providerClass, ClassLoader loader)
This method transforms the name of the given service class
into a provider-configuration filename as described in the
class comment and then uses the getResources
method of the given class loader to find all available files
with that name. These files are then read and parsed to
produce a list of provider-class names. The iterator that is
returned uses the given class loader to look up and then
instantiate each element of the list.
Because it is possible for extensions to be installed into a running Java virtual machine, this method may return different results each time it is invoked.
providerClass
- a Class
object indicating the
class or interface of the service providers being detected.loader
- the class loader to be used to load
provider-configuration files and instantiate provider classes,
or null
if the system class loader (or, failing that
the bootstrap class loader) is to be used.
Iterator
that yields provider objects
for the given service, in some arbitrary order. The iterator
will throw an Error
if a provider-configuration
file violates the specified format or if a provider class
cannot be found and instantiated.
IllegalArgumentException
- if
providerClass
is null
.public static <T> Iterator<T> lookupProviders(Class<T> providerClass)
ClassLoader cl = Thread.currentThread().getContextClassLoader(); return Service.providers(service, cl);
providerClass
- a Class
object indicating the
class or interface of the service providers being detected.
Iterator
that yields provider objects
for the given service, in some arbitrary order. The iterator
will throw an Error
if a provider-configuration
file violates the specified format or if a provider class
cannot be found and instantiated.
IllegalArgumentException
- if
providerClass
is null
.public Iterator<Class<?>> getCategories()
Iterator
of Class
objects
indicating the current set of categories. The iterator will be
empty if no categories exist.
Iterator
containing
Class
objects.public <T> boolean registerServiceProvider(T provider, Class<T> category)
If provider
implements the
RegisterableService
interface, its
onRegistration
method will be called. Its
onDeregistration
method will be called each time
it is deregistered from a category, for example if a
category is removed or the registry is garbage collected.
provider
- the service provide object to be registered.category
- the category under which to register the
provider.
IllegalArgumentException
- if provider
is
null
.
IllegalArgumentException
- if there is no category
corresponding to category
.
ClassCastException
- if provider does not implement
the Class
defined by category
.public void registerServiceProvider(Object provider)
Class
it implements.
If provider
implements the
RegisterableService
interface, its
onRegistration
method will be called once for each
category it is registered under. Its
onDeregistration
method will be called each time
it is deregistered from a category or when the registry is
finalized.
provider
- the service provider object to be registered.
IllegalArgumentException
- if
provider
is null
.public void registerServiceProviders(Iterator<?> providers)
Iterator
to the registry. Each provider is
associated within each category present in the registry whose
Class
it implements.
For each entry of providers
that implements
the RegisterableService
interface, its
onRegistration
method will be called once for each
category it is registered under. Its
onDeregistration
method will be called each time
it is deregistered from a category or when the registry is
finalized.
providers
- an Iterator containing service provider
objects to be registered.
IllegalArgumentException
- if providers
is null
or contains a null
entry.public <T> boolean deregisterServiceProvider(T provider, Class<T> category)
false
is returned. Otherwise, true
is returned. If an object of the same class as
provider
but not equal (using ==
) to
provider
is registered, it will not be
deregistered.
If provider
implements the
RegisterableService
interface, its
onDeregistration
method will be called.
provider
- the service provider object to be deregistered.category
- the category from which to deregister the
provider.
true
if the provider was previously
registered in the same category category,
false
otherwise.
IllegalArgumentException
- if provider
is
null
.
IllegalArgumentException
- if there is no category
corresponding to category
.
ClassCastException
- if provider does not implement
the class defined by category
.public void deregisterServiceProvider(Object provider)
provider
- the service provider object to be deregistered.
IllegalArgumentException
- if provider
is
null
.public boolean contains(Object provider)
true
if provider
is currently
registered.
provider
- the service provider object to be queried.
true
if the given provider has been
registered.
IllegalArgumentException
- if provider
is
null
.public <T> Iterator<T> getServiceProviders(Class<T> category, boolean useOrdering)
Iterator
containing all registered
service providers in the given category. If
useOrdering
is false
, the iterator
will return all of the server provider objects in an arbitrary
order. Otherwise, the ordering will respect any pairwise
orderings that have been set. If the graph of pairwise
orderings contains cycles, any providers that belong to a cycle
will not be returned.
category
- the category to be retrieved from.useOrdering
- true
if pairwise orderings
should be taken account in ordering the returned objects.
Iterator
containing service provider
objects from the given category, possibly in order.
IllegalArgumentException
- if there is no category
corresponding to category
.public <T> Iterator<T> getServiceProviders(Class<T> category, ServiceRegistry.Filter filter, boolean useOrdering)
Iterator
containing service provider
objects within a given category that satisfy a criterion
imposed by the supplied ServiceRegistry.Filter
object's filter
method.
The useOrdering
argument controls the
ordering of the results using the same rules as
getServiceProviders(Class, boolean)
.
category
- the category to be retrieved from.filter
- an instance of ServiceRegistry.Filter
whose filter
method will be invoked.useOrdering
- true
if pairwise orderings
should be taken account in ordering the returned objects.
Iterator
containing service provider
objects from the given category, possibly in order.
IllegalArgumentException
- if there is no category
corresponding to category
.public <T> T getServiceProviderByClass(Class<T> providerClass)
null
is returned.
providerClass
- the Class
of the desired
service provider object.
Class
type, or null
is none is
present.
IllegalArgumentException
- if providerClass
is
null
.public <T> boolean setOrdering(Class<T> category, T firstProvider, T secondProvider)
false
is returned. If the providers previously
were ordered in the reverse direction, that ordering is
removed.
The ordering will be used by the
getServiceProviders
methods when their
useOrdering
argument is true
.
category
- a Class
object indicating the
category under which the preference is to be established.firstProvider
- the preferred provider.secondProvider
- the provider to which
firstProvider
is preferred.
true
if a previously unset ordering
was established.
IllegalArgumentException
- if either provider is
null
or they are the same object.
IllegalArgumentException
- if there is no category
corresponding to category
.public <T> boolean unsetOrdering(Class<T> category, T firstProvider, T secondProvider)
false
is returned.
The ordering will be used by the
getServiceProviders
methods when their
useOrdering
argument is true
.
category
- a Class
object indicating the
category under which the preference is to be disestablished.firstProvider
- the formerly preferred provider.secondProvider
- the provider to which
firstProvider
was formerly preferred.
true
if a previously set ordering was
disestablished.
IllegalArgumentException
- if either provider is
null
or they are the same object.
IllegalArgumentException
- if there is no category
corresponding to category
.public void deregisterAll(Class<?> category)
category
- the category to be emptied.
IllegalArgumentException
- if there is no category
corresponding to category
.public void deregisterAll()
public void finalize() throws Throwable
deregisterAll
method is called to deregister all
currently registered service providers. This method should not
be called from application code.
finalize
in class Object
Throwable
- if an error occurs during superclass
finalization.
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


PrototypeJungle
Welcome
Please select your handle: (your items will appear under http://s3.prototypejungle.org/
handle
/)
Ok


White to play 43
pips White=151 Black=126
(CorrectAnswer= 0/0, ErrorScore= 0)
1. 13/9 11/8* eq: +0.799 71.60% (G:22.40% B:0.99%) 28.40% (G: 8.70% B:0.58%) 2. 11/7 11/8* eq: +0.696 (-0.103) 66.95% (G:21.58% B:0.96%) 33.05% (G: 9.45% B:0.50%) 3. 11/8* 8/4 eq: +0.672 (-0.127) 66.01% (G:22.42% B:0.97%) 33.99% (G: 9.32% B:0.47%) 4. 13/6 eq: +0.251 (-0.548) 57.04% (G:15.02% B:0.58%) 42.96% (G:10.45% B:0.42%) 5. 11/8* 7/3 eq: +0.163 (-0.636) 56.43% (G:17.57% B:0.80%) 43.57% (G:19.17% B:1.93%)


AMUSU hails AIMPLB’s Ayodhya move
by Special CorrespondentThe Aligarh Muslim University Students’ Union has welcomed the decision of the All India Muslim Personal Law Board (AIMPLB) to file a review petition challenging the Supreme Court’s Ayodhya verdict. A statement issued by AMUSU president Salman Imtiaz said the verdict “appeared one-sided in the conclusion.”
“We consider the building of the temple over the land of the mosque as a humiliation, injustice, and subjugation of Muslim minorities. It appears a step towards the creation of Hindu domination in India wherein Muslims will be rendered to second-grade citizens,” Mr Imtiaz said.
He further said the AMUSU was committed to the cause of Babri Masjid, and it would never allow India to lose its constitutional core. “We are happy with many details in the judgment that have strengthened the constitutional framework of the nation, and outrightly rejected Hindu chauvinism,” the statement said.


CError
public struct CError: Swift.Error
CError is an error thrown by a C system call. It may be from
a typical -1 return code that sets errno
, from a getaddrinfo
call
or directly from an errno
.
-
The error code.
Declaration
Swift
public let code: Int32
-
The error message as returned by
strerror
orgai_strerror
.Declaration
Swift
public let message: String
-
Creates and throws the corresponding CError if the
code
is equal toerrorValue
, otherwise is a no-op.Declaration
Swift
public static func makeAndThrow(fromReturnCode code: Int32, errorValue: Int32 = -1) throws
-
Creates and throws the corresponding CError if
errno
is not equal to 0, otherwise is a no-op.Declaration
Swift
public static func makeAndThrow(fromErrNo errno: Int32) throws
-
Creates and throws the corresponding CError if
code
is not equal to 0, otherwise is a no-op.Declaration
Swift
public static func makeAndThrow(fromGAICode code: Int32) throws
-
The string description of the error.
Declaration
Swift
public var description: String


Module Silicone
A key-controlled event-based user interface for LÖVE.
Silicone is a user interface system designed for the controller. It uses named elements and a serializable Lua table based menu declaration style that allows you to quickly create menus based on structure prototypes, helping to separate layout and style from function.
For usage, see Root.


CITADEL
Copyright (c) 2002 Thomas Gale
This game can be played on an empty Go board:
- SETUP - Each player, on turns, place a citadel on an empty cell not on the edge not adjacent to the edge. Citadels cannot be adjacent to each other. The placement stops after 9 citadels are dropped. Then, players choose one citadel on each turn (second player starts choosing) to a total of 3 citadels for each (so 3 citadels are initially neutral). Each player places one of his warriors on top of each citadel he controls.
- WALL STRENGTH - One plus the number of orthogonal adjacent walls.
- WARRIOR STRENGTH - One plus the number of orthogonal adjacent friendly warriors.
- If the warrior is in a citadel it gets an extra point.
- TURN - On each turn, each player has 1 credits for each controlled citadel. He may:
- Build a wall on an empty square (i.e., place a piece between 4 empty cells) adjacent to a friendly warrior. (In the diagram, I will place four marked points to indicate there's a wall between them). Walls are neutral. Cost: 1 credit.
- Destroy a wall - this can be done if the player has an orthogonal adjacent warrior with greater or equal strength. Cost 1 credit.
- If the strengths are equal, the warrior is also destroyed.
- Recruit new warrior - drop a warrior on an orthogonal adjacent empty cell by one of his citadels. Cost 2 credits.
- The maximum number of warriors on board is 100.
- Move warrior - move it to an orthogonal adjacent empty cell. Cost 1 credit per cell. Warriors cannot move to cells occupied by walls. If a warrior moves into a citadel, the player controls it (he can only use that extra credit next turn).
- Capture warrior - Attack an orthogonal adjacent enemy warrior if its strength is greater or equal. If it's equal, both warriors are captured. Cost: 0 (zero) credits.
- Note: All warriors used in a single attack, cannot make any more attacks that turn.
- SIEGES - If a warrior or group of warriors are surrounded (i.e., have no liberties left), the attacker may capture two warriors each turn.
- If a citadel is surrounded, the player cannot recruit new warriors there or build walls adjacent to the surrounding group.
- GOAL - Wins the player that owns two more citadels than the opponent.
A possible setup Blue has a bid advantage, since it is much nearer to two neutral citadels
An example The red warrior placed a wall to protect his citadel from the south.
Blue can move b13-c13 and attack the red soldier with success (strength 2 vs. 1).


{% extends "base.html" %} {% block title %}Feedback Sent{% endblock %} {% block body %}
Thank you {{uni}}, your feedback has been sent to the administrator.


Sploosh
This is a great theme by KrisJayOnline hosted in this repo.
This repo is for my personal use only.
In this version
1.0
- Initial Release.
Known Issues
No current issues.
Report issues to /u/marcos3935.


Magic the Gathering and MTG Arena users urged to change passwords following data breach
"We have no reason to believe that any malicious use has been made of the data."
News by Vikki Blake, Contributor Updated on 17 November 2019
The creators of Magic the Gathering have contacted MTG Arena and Magic Online players following a data breach that leaked users' names, email addresses, and passwords.
In an email sent to those affected by the incident, Wizards of the Coast explained that an internal database from a "decommissioned version of the WotC login" was accidentally "made accessible" online. While the incident has reportedly been described as isolated and WotC has no reason to believe "that any malicious use has been made of the data", information was nevertheless obtained outside the company.
Furthermore, it's reported no payment or financial information was at risk, and passwords were stored securely in an encrypted form, so it's unlikely they can be extracted for malicious purposes.
"Dear Wizards community, we are writing to let you know of a recent security incident at Wizards of the Coast," WotC said (thanks, Dotesports). "On Nov. 14, we learned that an internal database file from a decommissioned version of the WotC login had inadvertently been made accessible outside the company.
"We believe this was an isolated incident related to a legacy database and is unrelated to our current systems. Based on our current investigation, we have no reason to believe that any malicious use has been made of the data."
As a precautionary measure, WotC is asking all players to update their passwords over the next seven days. If you're unable to do so, WotC will reset it for you.


Selected Publications
last update on 2016-12,
see more at at
google scholar
Wei C, Elston RC, Lu Q. A Weighted U Statistic for Association Analyses Considering Genetic Heterogeneity. Statistics in Medicine. 2016. [Epub ahead of print]
Wei C, Li M, He Z, Vsevolozhskaya O, Schaid DJ, Lu Q. A weighted U statistics for genetic association analysis of sequencing data. Genetic Epidemiology. 2014 Dec;38(8):699-708
Wei C, Lu Q. GWGGI: software for genome-wide gene-gene interaction analysis. BMC Genetics. 2014 Oct 16;15(1):101
Wei C, Lu Q, Khoo SK, Lenski M, Fichorova R, Leviton A, Paneth N. Comparison of frozen and unfrozen blood spots for gene expression studies. Journal of Pediatrics. 2014 Jan;164(1):189-191.e1
Wei C, Schaid DJ, Lu Q. Trees Assembling Mann-Whitney Approach for Detecting Genome-wide Joint Association among Low-Marginal-Effect loci. Genetic Epidemiology. 2013;37(1):84-91
Wei C, Anthony JC, Lu Q. Genome-environmental risk assessment of cocaine dependence.Front Genet. 2012;3:83.
Wei C, Lu Q. A Collapsing ROC approach for risk prediction research on both common and rare variants. BMC Proceedings 2011, 5(Suppl 9):S42
Lu Q, Wei C, Ye C, Li M, Elston RC. A Likelihood Ratio based Mann-Whitney Approach Finds Novel Replicable Joint Gene Action for Type 2 Diabetes. Genetic Epidemiology. 2012; 36(6):583-593
Xu H-M, Wei C-S, Tang Y-T, Zhu Z-H, Sima Y-F, Lou X-Y. A new mapping method for quantitative trait loci of silkworm. BMC Genetics 2011;12(1):19.
Lu Q, Cui YH, Ye CY, Wei CS, Elston RC. Bagging Optimal ROC Curve Method for Predictive Genetic Tests, with an Application for Rheumatoid Arthritis. J Biopharm Stat 2010;20(2):401-14.
Ye CY, Cui YH, Wei CS, Elston RC, Zhu J, Lu Q. A Non-Parametric Method for Building Predictive Genetic Tests on High-Dimensional Data. Hum Hered 2011;71(3):161-70.
Li M,Peng R, Wei C, Lu Q. A U-Statistic-based random forest approach for genetic association study with quantitative traits. FRONTIERS IN BIOSCIENCE. 2012;4:2707-17.
Li M, Li J, Wei C, Lu Q, Erickson S, Tang X, et. al. A Three-Way Interaction among Maternal and Fetal Variants Contributing to Congenital Heart Defects. Ann Hum Genet. 2015 Nov 27. [Epub ahead of print]
Qi T, Jiang B, Zhu Z, Wei C, Gao Y, Xu H, Lou X. Mixed linear model approach for mapping quantitative trait loci underlying crop seed traits. Heredity. 2014 Sep;113(3):224-32
Li M, He Z, Zhang M, Zhan X, Wei C, Elston R C., Lu Q. A Generalized Genetic Random Field Method for the Genetic Association Analysis of Sequencing Data. Genetic Epidemiology. 2014 Apr;38(3):242-53
Vsevolozhskaya O, Zaykin D, Greenwood M, Wei C, Lu Q. Functional Analysis of Variance for Association Studies. Plos One. 2014 Sep 22;9(9):e105074
Slaughter J, Wei C, Korzeniewski SJ, Lu Q, Beck JS, Khoo SK, Brovont A, Maurer J, Martin D, Lenski M, Paneth N. High correlations in gene expression between paired umbilical cord blood and neonatal blood of healthy newborns on Guthrie cards. J Matern Fetal Neonatal Med, 2013;26(18):1765-7


Joel's Projects!
You have 3 PHDS? Thats great, try clicking "forgot password" for me.
Home
About
GitHub
Title
By
Author Name
published
Publish Time


Sonja Farak, who worked as a chemist at the Amherst drug lab since 2004, was arrested in January 2013 after one of her co-workers noticed samples were missing from evidence. In January 2014, she pleaded guilty to evidence tampering and drug possession. Farak received a sentence of 18 months in jail and 5 years of probation.
The Amherst lab scandal encompasses not only Farak's crimes, but also prosecutorial misconduct by two former state prosecutors. In June 2017, a Hampden judge ruled that these prosecutors — Anne Kaczmarek and Kris Foster, neither of whom still work at the state attorney general's office — committed a "fraud upon the court" by withholding exculpatory information from defendants.
In late November 2017, in response to a lawsuit brought by public defenders at the Committee for Public Counsel Services and the ACLU of Massachusetts, the state's eleven district attorneys dismissed more than 6,000 Farak-related cases, a number which has increased to more than 8,000 cases as of January 2018. Litigation before the Massachusetts Supreme Judicial Court is ongoing, as CPCS and the ACLU are seeking dismissal of all Farak cases.
NOTE: this timeline is still in progress. If you see an important event is missing, please get in touch.
NOTE: Important documents will gradually be added here and to the page for Amherst lab documents. If you have additional documents or do not see a document of interest, please get in touch.
CPCS and others vs. AGO and others petition, September 2017
- Following Judge Carey's ruling, the Committee for Public Counsel Services and others filed suit against the state and district attorneys, seeking dismissal of all Farak-related cases. Read the petition here, and the rest of the documents about the case here.
Judge Richard Carey's decision, June 2016
- In a blistering ruling more than 100 pages long, Hampden County Superior Court Judge Richard Carey ruled that former state prosecutors Anne Kaczmarek and Kris Foster committed "egregious misconduct" and "fraud upon the court." Read the ruling here.
For documents and synopses from all the Farak-related cases, see here.
Federal
- Penate v. Kaczmarek, et al., Massachusetts District Court, 3:17-cv-30119. Filed Sep 05, 2017.
Massachusetts (appellate)
- Committee for Public Counsel Services & others vs. Attorney General for Massachusetts & others, Supreme Judicial Court, SJ-2017-00347. Filed September 20, 2017 (ongoing). Docket here.
- Commonwealth vs. Erick Cotto, Jr., Supreme Judicial Court, 471 Mass. 97 (SJC-11761). Decided April 8, 2015. Opinion here. Docket here.
- Commonwealth vs. Bryant Ware, Supreme Judicial Court, 471 Mass. 85 (SJC-11709). Decided April 8, 2015. Opinion here. Docket here.
- SJC to decide whether to dismiss all cases connected to former drug lab chemist, S. Musgrave. January 30, 2018. Boston Globe.
- 6,000 drug cases to be dismissed after misconduct by chemist, prosecutors, S. Musgrave. November 30, 2017, Boston Globe. [Permalink.]
- Cases touched by former drug lab analyst could be tossed out, S. Musgrave. October 31, 2017, Boston Globe. [Permalink.]
- Court petition asks for dismissal of all cases touched by former drug lab chemist, S. Musgrave. September 20, 2017, Boston Globe. [Permalink.]
- Misconduct complaints filed against former state prosecutors, S. Musgrave. July 21, 2017, Boston Globe. [Permalink.]
- Judge finds prosecutor misconduct in handling of Amherst drug lab cases, S. Musgrave. June 26, 2017, Boston Globe. [Permalink.]
- Lawyers with cases related to latest drug lab scandal find guidance in last drug lab scandal, S. Musgrave. May 22, 2017, Boston Globe. [Permalink.]
- With thousands of convictions in jeopardy, Mass. AG’s office scrutinized over Farak case, S. Musgrave. December 16, 2016, New England Center for Investigative Reporting & WGBH News. [Permalink.]
- Massachusetts judge pushes prosecutors for more emails in Farak case, S. Musgrave. June 7, 2016, New England Center for Investigative Reporting & WGBH News. [Permalink.]
- Defense attorneys say withheld Farak notes implicate prosecutors, S. Musgrave. May 28, 2016, New England Center for Investigative Reporting & WGBH News. [Permalink.]


During the game you may use the advice provided by a computer assistant. The computer assistant will
provide
you with the best course of action to take for yourself and the best course other players may take,
according to
its own understanding. The computer assistant suggestions are not necessarily the best possible
paths
for you or for the other players. The other players are necessarily pursuing the best path in terms of
maximizing the score, therefore if there exists a better solution, the other players will not perform the
path suggested by the computer assistant.
In this instance the computer assistant suggests for you to follow the path illustrated above. Following the computer assistants’ advice would mean asking Player 1 for 3 white chips and Player 2 for 1 blue chip, reaching the goal and having 5 chips remaining. Your final score would be:
A better course of action under these circumstances would be to do nothing, and not reach the goal at all. Your final score would be:
You will now read a short explanation of how the computer assistant comes up with possible exchange suggestions.
The computer assistant compares all of the shortest paths and possible exchanges, between the player and the goal. There are multiple shortest paths between the player and the goal and the computer assistant considers all of them. It then chooses the path and possible exchanges that produce the maximum scoring function while always reaching the target location.
It would take too long to calculate all of the possible paths from the players' initial position to the goal so the computer assistant only considers all of the paths with the shortest distance (there is more than one). The computer assistant also doesn't consider situations in which it might be best to do nothing. This could lead to a wrong suggestion.
If a longer path exists in which there are no requests needed, and would therefore generate a higher score, the computer assistant would not suggest it. Also if doing nothing is better than performing several exchanges to reach the goal, the computer assistant would not suggest it.
The computer assistant calculates the path score as follows:
Consider the following game scenario :
The highlighted tiles below demonstrate the tiles the computer assistant will consider when attempting to find a path from each player to the goal.
For the "ME" player the Computer Assistant will consider the following tiles :
For Player 1 the Computer Assistant will consider the following tiles :
For Player 2 the Computer Assistant will consider the following tiles :
Please carefully watch the following instruction video describing the interface of the application (contains audio).
Please carefully watch the following instruction video describing the interface of the application (contains audio).
Please carefully watch the following instruction video describing the interface of the application (contains audio).
You will now begin the evaluation session. You will be presented with eight small-scale practice scenarios. Your task is to achieve the highest score possible.
The player gets +150 points for reaching the goal.
The player gets +5 points for each extra chip.
It costs -70 points to request a chip from each player.
It costs -6 points for each chip requested.
The total score is the sum of all of these points.
| Player | Success | Number players requested* | Requested chips | Extra chips | Score |
|---|


YodaScope
Episode IV: A New Scope
Your sign, select.


Sanzhar's Blog
About
Online CV
{#
#} {# Navbar text with an inline element#} {#
#}
{{ post.title }}
{{ post.pub_date_pretty }}
{{ post.summary }}
Please enable JavaScript to view the
comments powered by Disqus.


Controllers
Main Controller
Main Controller
The logic behind the Chyrp install.
Summary
| Main Controller | The logic behind the Chyrp install. |
| Variables | |
| $urls | An array of clean URL => dirty URL translations. |
| $displayed | Has anything been displayed? |
| $context | Context for displaying pages. |
| Functions | |
| __construct | Loads the Twig parser into Theme, and sets up the theme l10n domain. |
| parse | Determines the action. |
| post_from_url | Check to see if we’re viewing a post, and if it is, handle it. |
| key_regexp | Converts the values in $config->post_url to regular expressions. |
| index | Grabs the posts for the main page. |
| archive | Grabs the posts for the Archive page when viewing a year or a month. |
| search | Grabs the posts for a search query. |
| drafts | Grabs the posts for viewing the Drafts lists. |
| view | Views a post. |
| page | Handles page viewing. |
| rss | Redirects to /feed (backwards compatibility). |
| id | Views a post by its static ID. |
| toggle_admin | Toggles the Admin control panel (if available). |
| register | Process registration. If registration is disabled or if the user is already logged in, it will error. |
| login | Process logging in. If the username and password are incorrect or if the user is already logged in, it will error. |
| logout | Logs the current user out. If they are not logged in, it will error. |
| controls | Updates the current user when the form is submitted. Shows an error if they aren’t logged in. |
| lost_password | Handles e-mailing lost passwords to a user’s email address. |
| feed | Grabs posts for the feed. |
| display | Display the page. |
| current | Returns a singleton reference to the current class. |
__construct
private function __construct()
Loads the Twig parser into Theme, and sets up the theme l10n domain.
post_from_url
| public function post_from_url( | $route, | |||
| $request, | ||||
| $return_post | = | false | ) |
Check to see if we’re viewing a post, and if it is, handle it.
This can also be used for grabbing a Post from a given URL.
Parameters
| $route | The route to respond to. |
| $url | If this argument is passed, it will attempt to grab a post from a given URL. If a post is found by that URL, it will be returned. |
| $return_post | Return a Post? |
key_regexp
| private function key_regexp( | $key | ) |
Converts the values in $config->post_url to regular expressions.
Parameters
| $key | Input URL with the keys from Post.$url_attrs. |
Returns
$key values replaced with their regular expressions from <Routes->$code>.


Welcome to Hot Restaurant!
Current Reservations
#
First Name
Last Name
Phone #
Reservation
Party
Current Waitlist
#
First Name
Last Name
Phone #
Arrival Time
Party


Nick, Sergio, Nathan
Home
About Us
Games
Projects
Nick's Projects
Flower Project
Blocks
A Counter using JS
First Project of the Semester
First Project with JS
About Me Page
Sergio's Projects
Painting Project
JS Tests
My Personal Site
Nathan's Projects
Flower Project
Pyramid Challenge
About Me Page
Cookie Clicker Game


OBServerEss
HTML5/CSS/JavaScript/NodeJS
Production Tool For OBS Studio
Stream starting in
observeress.com


MENU
WIFI HACKING BOX!
Scan Access Points
Beacon Attack
Network Monitor
START SCAN NETWORK MONITOR
Time and Channel
10
20
30
40
50
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Ok
_____
: Beacon line
_____
: Deauth line
_____
: Dissoc line


References & Resources
ARENA-Related
- [1] Augmented Reality Edge Network Architecture (ARENA) Documentation. [Online]. Available: https://arena.conix.io/ [Accessed: 15-Dec-2020].
- [2] ARENA-py GitHub repository. [Online]. Available: https://github.com/conix-center/ARENA-py [Accessed: 15-Dec-2020].
- [3] A-Frame Animation documentation. [Online]. Available: https://aframe.io/docs/1.0.0/components/animation.html [Accessed: 15-Dec-2020].
Misc. Code References
- [4] Reading a Sensor (Arduino) with Python. [Online]. Available: https://problemsolvingwithpython.com/11-Python-and-External-Hardware/11.04-Reading-a-Sensor-with-Python/ [Accessed: 15-Dec-2020].
- [5] Sending Emails With Python. [Online]. Available: https://realpython.com/python-send-email/ [Accessed: 15-Dec-2020].
- [6] ArduinoHTS221 library (reading temperature and humidity). [Online]. Available: https://www.arduino.cc/en/Reference/ArduinoHTS221 [Accessed: 15-Dec-2020].
3D Models
- [7] Whirlpool Gas Cooker Free 3D model. [Online]. Available: https://www.cgtrader.com/free-3d-models/furniture/appliance/whirlpool-gas-cooker-1fa19a98316222ab4bcac1af0412e2ab [Accessed: 15-Dec-2020].


abstract val midpoint: Instant?
Returns the midpoint of fromTime and untilTime if both are non-null, calculated as fromTime + (untilTime - fromTime) / 2, otherwise returns null.
fromTime + (untilTime - fromTime) / 2


Title: {{Title}}
URL: {{url}}
Score: {{score}}
{{#if comments}}Number of Comments: {{comments}}
{{else}}No Comments
{{/if}} {{/each}}URL: {{url}}
Score: {{score}}
{{#if comments}}Number of Comments: {{comments}}
{{else}}No Comments
{{/if}} {{/each}}


DR. DRIVING
Home
About Us
Services
Team
Options
Signup/Create Account
Login
Take Quiz
View Achievements
Contact Us
Welcome to DR. Driving
We are a software development team developing this app inorder to increase
awarness about road safety and a mission to reduce loss of life
Take Quiz


| Methods Summary | ||
|---|---|---|
public static
|
||
public
|
#
sendMessages( )
Retrieves all messages for this chat handle with intention of sending them to client
Deprecated |
|
public
|
#
receiveMessage( string $message , int $sender )
Receive and save a chat message to the database
Deprecated |
| Methods inherited from db_object |
|---|
__construct() ,
Load() ,
Init() ,
GetList() ,
set() ,
get() ,
save() ,
table() ,
attributes()
|
| Properties Summary | ||
|---|---|---|
protected static
|
$table
|
#
'chat_handles'
|
| Properties inherited from db_object |
|---|
$connection ,
$table ,
$attributes ,
$state
|


Evenly distributed heatmapcolored bars on a dark blue background and lime axes. Lowest bar is blue, highest is red.
They are all positive in their height. No axes should be visible. A legend should be displayed below the canvas.
The labels should say: "rainbow", "random x", "random y", "random z" and It should not be squashed to one side.
It's twice as long as deep (10 x 5 bars)
The difference to f.html is, that this is not a formula that involves some random factor. Here, a new random datapoint is sent to plot each frame.


Created by johnreed on 3/12/16.
Created by johnreed on 4/17/16.
Provides a file/line position as a string to append to the end of a print or log statement.
Scala specific debug methods.
Assertions fail with exit code 7
Assertions fail with exit code 7
Import this to add assert functionality to the current scope
Import this to add formatting functionality to the current scope
Import this to add print functionality to the current scope
Import this to add trace functionality to the current scope
Created by johnreed on 3/12/16. Makes Scala Trace Debug functions available via implicit conversions. https://github.com/JohnReedLOL/scala-trace-debug


|
Contiki 2.5
|
Files | |
| file | rs232.h |
Header file for MSP430 RS232 driver. | |
| file | rs232.c |
RS232 communication device driver for the MSP430. | |
| file | rs232.h |
Header file for MSP430 RS232 driver. | |
| file | rs232.c |
RS232 communication device driver for the MSP430. | |
| file | rs232.h |
Header file for MSP430 RS232 driver. | |
Functions | |
| void | rs232_init (void) |
| Initialize the RS232 module. | |
| void | rs232_set_input (int(*f)(unsigned char)) |
| Set an input handler for incoming RS232 data. | |
| void | rs232_set_speed (unsigned char speed) |
| Configure the speed of the RS232 hardware. | |
| void | rs232_print (char *text) |
| Print a text string on RS232. | |
| void | rs232_send (char c) |
| Print a character on RS232. | |
| void | rs232_set_speed (enum rs232_speed speed) |
| Configure the speed of the RS232 hardware. |
| void rs232_init | ( | void | ) |
Initialize the RS232 module.
Initalize the RS232 port.
This function is called from the boot up code to initalize the RS232 module.
Referenced by main().
| void rs232_print | ( | char * | text | ) |
Print a text string on RS232.
| str | A pointer to the string that is to be printed |
This function prints a string to RS232. The string must be terminated by a null byte. The RS232 module must be correctly initalized and configured for this function to work.
Referenced by main().
| void rs232_send | ( | char | c | ) |
Print a character on RS232.
| c | The character to be printed |
This function prints a character to RS232. The RS232 module must be correctly initalized and configured for this function to work.
| void rs232_set_input | ( | int(*)(unsigned char) | f | ) |
Set an input handler for incoming RS232 data.
| f | A pointer to a byte input handler |
This function sets the input handler for incoming RS232 data. The input handler function is called for every incoming data byte. The function is called from the RS232 interrupt handler, so care must be taken when implementing the input handler to avoid race conditions.
The return value of the input handler affects the sleep mode of the CPU: if the input handler returns non-zero (true), the CPU is awakened to let other processing take place. If the input handler returns zero, the CPU is kept sleeping.
Definition at line 56 of file rs232.c.
Referenced by main(), and slip_arch_init().
| void rs232_set_speed | ( | unsigned char | speed | ) |
Configure the speed of the RS232 hardware.
| speed | The speed |
This function configures the speed of the RS232 hardware. The allowed parameters are RS232_19200, RS232_38400, RS232_57600, and RS232_115200.
| void rs232_set_speed | ( | enum rs232_speed | speed | ) |
Configure the speed of the RS232 hardware.
| speed | The speed |
This function configures the speed of the RS232 hardware. The allowed parameters are RS232_9600, RS232_19200, RS232_38400, RS232_57600, and RS232_115200.
Definition at line 93 of file rs232.c.
References UART_MODE_RS232.


Home
Store
About Us
Help
which style suits you ?
which type do you prefer?
Formal interior style
Informal interior style
what do you prefer?
the Ornamentation and patterns
the simplicity
what do you prefer?
A lot of colors
Neutral colors


--- layout: default title: Home ---
I'm Bill Barekas, a software architect based in Athens, Greece and this is my own tiny space on the public internet.
Currently, I am working for wappier as the Director of Product Development.
I'm bbarekas on most services out there.


An exclusive crate players received when using their Twitch Prime during that month of redemption. Once the promotion is over on 7/7, you can buy these Twitch Prime items on steam marketplace.
Items:
An exclusive crate players received when using their Twitch Prime during that month of redemption. Once the promotion is over on 7/7, you can buy these Twitch Prime items on steam marketplace.


Function as a Service
Run code without thinking about servers
×
Success!
Kafka Topic Created Successfully
×
Error!
Kafka Topic Creation Failed. Please try again.
×
Error!
Kafka Topic Name already exists
×
Success!
Function Uploaded Successfully
×
Invalid File!!
Please upload a Python file
×
Function Name already exists
Please create a new Function name
×
Python File is not compilable
Please upload a compile python file
Function Name
Please give the unique function name which does not exist
Select the Kafka Topic
Create new Kafka topic
File input
Upload the Python Code File here. As of now, we only support Python 2.7.
Please follow this format while uploading Python file
File Format
×
Create a new Kafka Topic
Enter the Kafka Topic Name
Make sure to enter the new Kafka Topic Name which is not in dropdown
Submit
© All Copyrights Reserved by
faas.com
, College Station, 77840, Contact us:
faas@tamu.edu


kahvipatel.com
potential billboard
My dad has a vasectomy clinic and I feel that this would really give his practice the excitement it needs.
yea


This demo uses the Basis C++ transcoder (compiled to Javascript using Emscripten) to transcode a .basis file to BC1/BC3.
Thanks to Evan Parker for providing webgl-texture-utils and this test bed.
.basis file:
NOTE: Your browser does not support DXT, so using RGB565
for the texture below. To get DXT, try Chrome 19+
(beta channel as of 2012-04-20; graphics card DXT support also required).


teraflop club
`Prev `__
T
`Next `__
--------------
**teraflop club**: /te´r@·flop kluhb/, n.

Caltech professor James Kajiya is said to have been the founder. Compare
`*Knights of the Lambda
Calculus* <../K/Knights-of-the-Lambda-Calculus.html>`__.
--------------
+--------------------------+----------------------------+-----------------------------+
| `Prev `__ | `Up <../T.html>`__ | `Next `__ |
+--------------------------+----------------------------+-----------------------------+
| tera- | `Home <../index.html>`__ | terminak |
+--------------------------+----------------------------+-----------------------------+


Slider
Also try using the arrow keys, buttons, or clicking on the progress bar to move the slider.
initial value=10, min=0, max=100, pageIncrement=100, onChange event triggers input box value change immediately
lowest
normal
highest
Slider1 Value:
Disable previous slider
Enable previous slider
initial value=10, min=0, max=100, onChange event triggers input box value change when you mouse up or tab away
0
100
Slider2 Value:
Fancy HTML labels (no slide animation):
small
medium
large
Standalone ruler example:
1
2
horizontal, with buttons, disabled (to show styling):
lowest
normal
highest
Completely Programatic VerticalSlider and VerticalRule
min:1000, max:3000, 11 discrete values, no animation
Programmatic Value:
view data


{% comment %} The base template for all "[role] added" templates where role can also be reviewer, publisher, compiler. Overwrite blocks - role - additional in the child templates. {% endcomment %} {% load i18n %} {% spaceless %}
{% trans "You have been added as" context "You have been added as [role] of [questionnaire] compiled by [user]." %} {% block role %}{% trans "an editor" context "You have been added as an editor of [questionnaire] compiled by [user]." %}{% endblock %} {% trans "of" context "You have been added as [role] of [questionnaire] compiled by [user]." %} {{ questionnaire_name }} {% if compiler %} {% trans "compiled by" context "You have been added as [role] of [questionnaire] compiled by [user]." %} {{ compiler }}. {% endif %}
{% block additional %}{% trans "As an editor, you can edit the SLM practice in coordination with the compiler of the SLM practice. However, as an editor you cannot submit the SLM practice for review or invite other editors." %}
{% endblock %} {% endspaceless %}


Click any of the circles below to zoom into a detailed version of that circle and then click again to zoom out. This demonstrates custom d3js code and mimics the GitHub punch card.


Title of Post Post text by username on 1/1/1111 | {{comments.length}} {{format_plural "comment" comments.length}}


One
Two
Three
Choose your Destination
Choose...
One
Two
Three
Number of passengers
Choose...
One
Two
Three
Date and time
Search


Character
Id:
242Name:
Mr. MeeseeksStatus:
unknownSpecies:
HumanoidGender:
MaleOrigin:
Mr. Meeseeks BoxLocation:
Blips and ChitzEpisodes:
['https://rickandmortyapi.com/api/episode/5', 'https://rickandmortyapi.com/api/episode/10', 'https://rickandmortyapi.com/api/episode/13', 'https://rickandmortyapi.com/api/episode/29']


There are so many!
If only someone brave could help!
Whatever will we do!
Oh no! They're right here!
A yellow pencil with envelopes on a clean, blue backdrop!
A dark blue background with a colored pencil, a clip, and a tiny ice cream cone!

A yellow workspace with some scissors, pencils, and other objects.


Huawei nova 5T Pro specs and design revealed through Android Enterprise listing
by SagarHuawei announced the nova 5T back in August and it seems the company will soon follow it up with a Pro variant that has appeared on Google's Android Enterprise website.
The listing includes the nova 5T Pro's image which reveals the phone looks similar to the vanilla 5T.
The listing also reveals a few specs of the nova 5T Pro - 5.5" screen, 8GB RAM, and Android Pie.
The smartphone will come with an NFC chip and a fingerprint reader which is likely located on the right side like the 5T, and it will be available in two storage options - 128GB and 256GB.
The nova 5T is a rebranded Honor 20 and a Google site back in June listed the Honor 20 Pro as the nova 5T Pro, which means it's likely a rebadged 20 Pro and will arrive with a Kirin 980 SoC, 48MP quad camera, and a 4,000 mAh battery with 22.5W fast charging support.
However, the Honor 20 Pro sports a 6.26" display while the Enterprise listing of the 5T Pro says it will feature a 5.5" screen.
We'll have to wait for more details to surface to be sure that nova 5T Pro is indeed a rebranded Honor 20 Pro.


Bathroom Installations
At GSC Installations we specialize in walk-in tub fittings along with different services such as tub cut-outs. These services provide easier access to those with special needs or the ever-aging population.
We are also working
tirelessly to become a retail provider for bathroom necessities like bidets, grab bars, shower chairs.
Get in touch with our specialist now and let us help you with a Genuine, Safe, and Custom
installation.


Moving by words
To move to the next word, use the w command.
The w command considers separator characters when deciding where the next word starts. To only consider whitespace as word separators, you can use the (uppercase) W command.
To move in the opposite direction, use the b command to move over a normal word, and the capital B command to move over "big words".
There is also the e and E commands that move to the end of the next word or bigword.
If you prefix the above commands with a number, the command will move that many words. For example, the command 3w will move three words to the right.


Context → Tone.Emitter
Wrapper around the native AudioContext.
new
Tone.Context
([context])
context
{AudioContext}
optionally pass in a context
members
.latencyHint
{String|Seconds}
The type of playback, which affects tradeoffs between audio output latency and responsiveness.
In addition to setting the value in seconds, the latencyHint also accepts the strings "interactive" (prioritizes low latency), "playback" (prioritizes sustained playback), "balanced" (balances latency and performance), and "fastest" (lowest latency, might glitch more often).
code
//set the lookAhead to 0.3 seconds
Tone.context.latencyHint = 0.3;
methods
.now
()
returns
{Number}
The current audio context time
.getConstant
(val)
val
{Number}
returns
{BufferSourceNode}
Generate a looped buffer at some constant value.
.on
(event, callback)
event
{String}
The name of the event to listen for.
callback
{function}
The callback to invoke when the
event is emitted
Bind a callback to a specific event.
.off
(event[, callback])
event
{String}
The event to stop listening to.
callback
{function}
The callback which was bound to
the event with Tone.Emitter.on.
If no callback is given, all callbacks
events are removed.
Remove the event listener.
.emit
(event, )
event
{String}
The name of the event.
Invoke all of the callbacks bound to the event with any arguments passed in.


$64/100: Minimum number of steps [C8] ROM-Reference: CMP $64 : $FA0E STA $64 : $F2A6 Previous Page / Next Page