From the user's point of view, the component with the keyboard focus is generally prominent with a dotted or black border, for example. The window containing the component is also more prominent than other windows onscreen. These visual cues let the user know to which component any typing will relate. Only one component at a time in the window system can have the keyboard focus.
Exactly how a window gains the focus
depends on the windowing system.
There is no foolproof way, across all platforms,
to ensure that a window gains the focus.
On some operating systems, such as Microsoft Windows,
the front window usually becomes the focused window.
In these cases, the
Window.toFront
method moves the window to the front, thereby giving it
the focus.
However, on other operating systems, such as Solaris™ Operating System, the window manager may choose
the focused window based on cursor position, and in
these cases the behavior of the Window.toFront
method is different.
A component generally gains the focus when the user clicks it, or when the user tabs between components, or otherwise interacts with a component. A component can also be given the focus programmatically, such as when its containing frame or dialog-box is made visible. This code snippet shows how to give a particular component the focus every time the window gains the focus:
//Make textField get the focus whenever frame is activated. frame.addWindowFocusListener(new WindowAdapter() { public void windowGainedFocus(WindowEvent e) { textField.requestFocusInWindow(); } });
If you want to ensure that a particular component gains
the focus the first time a window is activated, you can
call the
requestFocusInWindow
method on the component after the component
has been realized, but before the frame is displayed.
The following sample code shows how this operation can be done:
//...Where initialization occurs... JFrame frame = new JFrame("Test"); JPanel panel = new JPanel(new BorderLayout()); //...Create a variety of components here... //Create the component that will have the initial focus. JButton button = new JButton("I am first"); panel.add(button); frame.getContentPane().add(panel); //Add it to the panel frame.pack(); //Realize the components. //This button will have the initial focus. button.requestFocusInWindow(); frame.setVisible(true); //Display the window.
Alternatively, you can apply a custom FocusTraversalPolicy
to the frame
and call the getDefaultComponent
method to determine which
component will gain the focus.
JComponent
methods, such as
setNextFocusableComponent
,
getNextFocusableComponent
,
requestDefaultFocus
, and
isManagingFocus
, were used to
manage the keyboard focus.
These methods are now deprecated.
Another method, requestFocus
, is discouraged
because it tries to give the focus to the component's window,
which is not always possible. As of JDK 1.4,
you should instead use the requestFocusInWindow
method,
which does not attempt to make the component's window
focused. The method returns a boolean value indicating whether
the method succeeded.
The rest of this section covers the following topics:
The focus subsystem is designed to do the right thing as invisibly as possible. In most cases it behaves in a reasonable manner, and if it does not you can tweak its behavior in various ways. Some common scenarios might include:
requestFocusInWindow
method
to set the focus on a component when the window becomes
visible.
The FocusConceptsDemo
example illustrates a few concepts.
The
KeyboardFocusManager
is a critical element of the focus subsystem.
It manages state and initiates changes.
The keyboard manager tracks the focus owner
the component that receives typing from the keyboard.
The focused window is the window that contains
the focus owner.
JWindow
component in your GUI,
you should know that the JWindow
component's owning frame must
be visible in order for any components in the window to get the focus.
By default, if you do not specify an owning frame for
a JWindow
component, an invisible owning frame is
created for it. The result is that components in the
JWindow
component might not be able to get the focus.
The solution is either to specify a
visible owning frame when creating the
JWindow
component, or to use an undecorated
JFrame
component instead.
A focus cycle (or focus traversal cycle)
is a set of components that share a common ancestor in the
containment hierarchy.
The focus cycle root is the
container that is the root for a particular
focus traversal cycle. By default, every
JWindow
and JInternalFrame
component
can be a focus cycle root. A focus cycle root can itself
contain one or more focus cycle roots.
The following Swing objects can be focus cycle roots:
JApplet
, JDesktopPane
, JDialog
,
JEditorPane
, JFrame
, JInternalFrame
,
and JWindow
.
While it might appear that JTable
and JTree
objects are focus cycle roots, they
are not.
A focus traversal policy determines the order in which
a group of components are navigated. Swing provides
the
class, which
decides the order of navigation based on layout
manager-dependent factors, such as size,
location, and orientation of components. Within a focus
cycle, components can be navigated in a forward or
backward direction. In a hierarchy of focus cycle
roots, upwards traversal takes the focus out of the
current cycle into the parent cycle.
In most Look and Feel models,
components are navigated using the
Tab and Shift-Tab keys. These keys are the default
focus traversal keys and can be changed
programmatically. For example, you can add Enter
as a forward focus traversal key with the following
four lines of code:
LayoutFocusTraversalPolicy
Set forwardKeys = getFocusTraversalKeys( KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS); Set newForwardKeys = new HashSet(forwardKeys); newForwardKeys.add(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0)); setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, newForwardKeys);
JTable
.
You have just received a brief introduction to the focus architecture.
If you want more details, see the specification for the
Focus Subsystem.
Validating Input
A common requirement of GUI design is a component that restricts the user's input for example, a text field that allows only numeric input in decimal format (money, for example) or a text field that allows only 5 digits for a zip code. Release 1.4 provides a handy, easy-to-use formatted text field component that allows input to be restricted to a variety of localizable formats. You can also specify a custom formatter for the text field, which can perform special checking such as determining whether values are not only formatted correctly, but also reasonable.
You can use an input verifier as an alternative to a custom formatter,
or when you have a component that is not a text field.
An input verifier allows you to
reject specific values, such as a properly formatted but
invalid zip code, or values outside of a desired range,
for example a body temperature higher than 110°F.
To use an input verifier, you create a subclass of
(a class introduced in JDK 1.3), create an instance of
your subclass, and set the instance as the input verifier
for one or more components.
InputVerifier
A component's input verifier is consulted whenever the
component is about to lose the focus. If the component's
value is not acceptable, the input verifier can take
appropriate action, such as refusing to yield the focus
on the component or replacing the user's input with the
last valid value and then allowing the focus to transfer
to the next component. However, InputVerifier
is not called when the focus is transferred to another toplevel component.
The following two examples show mortgage calculators. One uses formatted text fields and the other uses input verification with standard text fields.
You can find the code for the Input Verification demo in
InputVerificationDemo.java
. Here is the code for the InputVerifier
subclass, MyVerifier
:
class MyVerifier extends InputVerifier implements ActionListener { double MIN_AMOUNT = 10000.0; double MAX_AMOUNT = 10000000.0; double MIN_RATE = 0.0; int MIN_PERIOD = 1; int MAX_PERIOD = 40; public boolean shouldYieldFocus(JComponent input) { boolean inputOK = verify(input); makeItPretty(input); updatePayment(); if (inputOK) { return true; } else { Toolkit.getDefaultToolkit().beep(); return false; } } protected void updatePayment() { double amount = DEFAULT_AMOUNT; double rate = DEFAULT_RATE; int numPeriods = DEFAULT_PERIOD; double payment = 0.0; //Parse the values. try { amount = moneyFormat.parse(amountField.getText()). doubleValue(); } catch (ParseException pe) {pe.printStackTrace();} try { rate = percentFormat.parse(rateField.getText()). doubleValue(); } catch (ParseException pe) {pe.printStackTrace();} try { numPeriods = decimalFormat.parse(numPeriodsField.getText()). intValue(); } catch (ParseException pe) {pe.printStackTrace();} //Calculate the result and update the GUI. payment = computePayment(amount, rate, numPeriods); paymentField.setText(paymentFormat.format(payment)); } //This method checks input, but should cause no side effects. public boolean verify(JComponent input) { return checkField(input, false); } protected void makeItPretty(JComponent input) { checkField(input, true); } protected boolean checkField(JComponent input, boolean changeIt) { if (input == amountField) { return checkAmountField(changeIt); } else if (input == rateField) { return checkRateField(changeIt); } else if (input == numPeriodsField) { return checkNumPeriodsField(changeIt); } else { return true; //should not happen } } //Checks that the amount field is valid. If it is valid, //it returns true; otherwise, returns false. If the //change argument is true, this method sets the //value to the minimum or maximum value if necessary and (even if not) sets it to the //parsed number so that it looks good -- no letters, //for example. protected boolean checkAmountField(boolean change) { boolean wasValid = true; double amount = DEFAULT_AMOUNT; //Parse the value. try { amount = moneyFormat.parse(amountField.getText()). doubleValue(); } catch (ParseException pe) { pe.printStackTrace(); wasValid = false; } //Value was invalid. if ((amount < MIN_AMOUNT) || (amount > MAX_AMOUNT)) { wasValid = false; if (change) { if (amount < MIN_AMOUNT) { amount = MIN_AMOUNT; } else { // amount is greater than MAX_AMOUNT amount = MAX_AMOUNT; } } } //Whether value was valid or not, format it nicely. if (change) { amountField.setText(moneyFormat.format(amount)); amountField.selectAll(); } return wasValid; } //Checks that the rate field is valid. If it is valid, //it returns true; otherwise, returns false. If the //change argument is true, this method reigns in the //value if necessary and (even if not) sets it to the //parsed number so that it looks good -- no letters, //for example. protected boolean checkRateField(boolean change) { ...//Similar to checkAmountField... } //Checks that the numPeriods field is valid. If it is valid, //it returns true; otherwise, returns false. If the //change argument is true, this method reigns in the //value if necessary and (even if not) sets it to the //parsed number so that it looks good -- no letters, //for example. protected boolean checkNumPeriodsField(boolean change) { ...//Similar to checkAmountField... } public void actionPerformed(ActionEvent e) { JTextField source = (JTextField)e.getSource(); shouldYieldFocus(source); //ignore return value source.selectAll(); } }
Note that the verify
method is implemented to
detect invalid values but does nothing else.
The verify
method exists only to determine
whether the input is valid it should never bring
up a dialog-box or cause any other side effects.
The shouldYieldFocus
method calls verify
and, if a values is invalid, sets it to the minimum or maximum value. The
shouldYieldFocus
method is allowed to cause side
effects, in this case, it always formats the text field and
may also change its value. In our example,
the shouldYieldFocus
method
always returns true so that the transfer
of the focus is never actually prevented. This is just one way
verification can be implemented. Find another version
of this demo called
InputVerificationDialogDemo
that puts up a dialog-box when user input is invalid and requires
the user to enter a legal value.
The input verifier is installed using the
setInputVerifier
method of the JComponent
class.
For example, the InputVerificationDemo
has the following code:
private MyVerifier verifier = new MyVerifier(); ... amountField.setInputVerifier(verifier);
For a component to gain the focus, it must satisfy three requirements: it must be visible, enabled, and focusable. An input map may also be given. For more information about input map, read How to Use Key Bindings.
The TrackFocusDemo
example defines the simple component Picture
.
Its constructor is shown below:
public Picture(Image image) { this.image = image; setFocusable(true); addMouseListener(this); addFocusListener(this); }
The call to the setFocusable(true)
method makes the
component focusable. If you explicitly give your component
key bindings in its WHEN_FOCUSED
input map,
you do not need to call the setFocusable
method.
To visually show changes in the focus
(by drawing a red border only when the component has
the focus), Picture
has a
focus listener.
To gain the focus when the user clicks on the picture,
the component has a
mouse listener. The listener's mouseClicked
method requests
for the focus to be transferred to the picture. Here is the code:
public void mouseClicked(MouseEvent e) { //Since the user clicked on us, let us get focus! requestFocusInWindow(); }
See Tracking Focus Changes to Multiple
Components for more discussion of the TrackFocusDemo example.
Customizing Focus Traversal
The focus subsystem determines a default order that is
applied when using the focus traversal keys (such as Tab) to navigate.
The policy of a Swing application is determined by
LayoutFocusTraversalPolicy
. You can set a focus traversal policy on any
Container
by using the
setFocusCycleRoot
method.
However, if the container is
not a focus cycle root, it may have no apparent effect.
Alternatively you can pass focus traversal policy providers to the
FocusTraversalPolicy
methods instead of focus cycle roots.
Use the
isFocusTraversalPolicyProvider()
method to determine whether a Container
is a focus traversal policy provider.
Use the
setFocusTraversalPolicyProvider()
method to set a container for providing focus traversal policy.
The FocusTraversalDemo
example
demonstrates how to customize focus behavior.
You can find the demo's code in
FocusTraversalDemo.java
.
The check box was removed from the focus cycle with this line of code:
togglePolicy.setFocusable(false);
FocusTraversalPolicy
:
... JTextField tf1 = new JTextField("Field 1"); JTextField tf2 = new JTextField("A Bigger Field 2"); JTextField tf3 = new JTextField("Field 3"); JTextField tf4 = new JTextField("A Bigger Field 4"); JTextField tf5 = new JTextField("Field 5"); JTextField tf6 = new JTextField("A Bigger Field 6"); JTable table = new JTable(4,3); ... public FocusTraversalDemo() { super(new BorderLayout()); JTextField tf1 = new JTextField("Field 1"); JTextField tf2 = new JTextField("A Bigger Field 2"); JTextField tf3 = new JTextField("Field 3"); JTextField tf4 = new JTextField("A Bigger Field 4"); JTextField tf5 = new JTextField("Field 5"); JTextField tf6 = new JTextField("A Bigger Field 6"); JTable table = new JTable(4,3); togglePolicy = new JCheckBox("Custom FocusTraversalPolicy"); togglePolicy.setActionCommand("toggle"); togglePolicy.addActionListener(this); togglePolicy.setFocusable(false); //Remove it from the focus cycle. //Note that HTML is allowed and will break this run of text //across two lines. label = new JLabel("Use Tab (or Shift-Tab) to navigate from component to component.Control-Tab (or Control-Shift-Tab) allows you to break out of the JTable."); JPanel leftTextPanel = new JPanel(new GridLayout(3,2)); leftTextPanel.add(tf1, BorderLayout.PAGE_START); leftTextPanel.add(tf3, BorderLayout.CENTER); leftTextPanel.add(tf5, BorderLayout.PAGE_END); leftTextPanel.setBorder(BorderFactory.createEmptyBorder(0,0,5,5)); JPanel rightTextPanel = new JPanel(new GridLayout(3,2)); rightTextPanel.add(tf2, BorderLayout.PAGE_START); rightTextPanel.add(tf4, BorderLayout.CENTER); rightTextPanel.add(tf6, BorderLayout.PAGE_END); rightTextPanel.setBorder(BorderFactory.createEmptyBorder(0,0,5,5)); JPanel tablePanel = new JPanel(new GridLayout(0,1)); tablePanel.add(table, BorderLayout.CENTER); tablePanel.setBorder(BorderFactory.createEtchedBorder()); JPanel bottomPanel = new JPanel(new GridLayout(2,1)); bottomPanel.add(togglePolicy, BorderLayout.PAGE_START); bottomPanel.add(label, BorderLayout.PAGE_END); add(leftTextPanel, BorderLayout.LINE_START); add(rightTextPanel, BorderLayout.CENTER); add(tablePanel, BorderLayout.LINE_END); add(bottomPanel, BorderLayout.PAGE_END); setBorder(BorderFactory.createEmptyBorder(20,20,20,20)); Vector
order = new Vector (7); order.add(tf1); order.add(tf2); order.add(tf3); order.add(tf4); order.add(tf5); order.add(tf6); order.add(table); newPolicy = new MyOwnFocusTraversalPolicy(order); }
To use a custom FocusTraversalPolicy
,
implement the following code on any focus cycle root.
MyOwnFocusTraversalPolicy newPolicy = new MyOwnFocusTraversalPolicy(); frame.setFocusTraversalPolicy(newPolicy);
You can remove the custom focus traversal policy
by setting the FocusTraversalPolicy
to
null
, which will restore the default policy.
Tracking Focus Changes to Multiple Components
In some situations an application may need to track which component has the focus. This information might be used to dynamically update menus or perhaps a status bar. If you need to track the focus only on specific components, it may make sense to implement a focus event listener.
If a focus listener is not appropriate, you can instead
register a PropertyChangeListener
on the
KeyboardFocusManager
. The property change
listener is notified of every change
involving the focus, including changes to the
focus owner, the focused window,
and the default focus traversal policy. See the
KeyboardFocusManager
Properties table for a complete list.
The following example demonstrates tracking the focus owner by installing a property change listener on the keyboard focus manager.
Picture
component. The Picture
that has the focus is indicated with a red
border. A label at the bottom of the window
describes the Picture
that has the focus.
Picture
by using Tab
or Shift-Tab, or by clicking an image.
Because a property change listener has been
registered on the keyboard focus manager,
the change in focus is detected and the label is
updated appropriately.
You can view the demo's code in
TrackFocusDemo.java
. The custom component used for drawing the images can be found in
Picture.java
. Here is the code that defines and installs the
property change listener:
KeyboardFocusManager focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager(); focusManager.addPropertyChangeListener( new PropertyChangeListener() { public void propertyChange(PropertyChangeEvent e) { String prop = e.getPropertyName(); if (("focusOwner".equals(prop)) && ((e.getNewValue()) instanceof Picture)) { Component comp = (Component)e.getNewValue(); String name = comp.getName(); Integer num = new Integer(name); int index = num.intValue(); if (index < 0 || index > comments.length) { index = 0; } info.setText(comments[index]); } } } );
The custom component, Picture
,
is responsible for drawing the image. All six
components are defined in this manner:
pic1 = new Picture(createImageIcon("images/" + mayaString + ".gif", mayaString).getImage()); pic1.setName("1");
Focus transfers are asynchronous. This quality can lead to some odd timing-related problems and assumptions, especially during automatic transfers of the focus. For example, imagine an application with a window containing a Start button, a Cancel button and a text field. The components are added in this order:
LayoutFocusTraversalPolicy
determines the focus traversal policy
in this case, it is the order that the components
were added to their container.
In this example, the desired behavior is that the
Start button has the initial focus, and when the
Start button is clicked, it is disabled, and then the Cancel
button receives the focus.
The correct way to
implement this behavior would be to add the components
to the container in the desired order or to
create a custom focus traversal policy.
If, for some reason, that is not possible,
then you can implement this behavior
with the following code snippet:
public void actionPerformed(ActionEvent e) { //This works. start.setEnabled(false); cancel.requestFocusInWindow(); }
As desired, the focus goes from the Start button to the Cancel button, rather than to the text field. But a different result would occur if the same methods were called in the opposite order as follows:
public void actionPerformed(ActionEvent e) { //This does not work. cancel.requestFocusInWindow(); start.setEnabled(false); }
requestFocusInWindow
method
initiates the focus transfer, but it does not immediately move the focus
to the Cancel button.
When the Start button is disabled, the focus is
transferred to the next component (so there is always a component
with the focus) and, in this case, it would then move the focus to the
text field, not to the Cancel button.
There are several situations in which you need to make focus requests after all other changes that might affect the focus applies to:
removeNotify
method on the focus owner.
For more detailed information about the focus architecture, see the specification for the Focus Subsystem. You may also find How to Write a Focus Listener useful.
All of this API was introduced in JDK 1.4.
Method (in Component ) |
Purpose |
|---|---|
| isFocusOwner() | Returns true if the component is the focus
owner. This method, introduced in JDK 1.4,
renders obsolete hasFocus .
|
|
setRequestFocusEnabled(boolean) isRequestFocusEnabled() (in JComponent )
|
Sets or checks on whether this component should
get the focus. Setting the setRequestFocusEnabled to false
typically prevents mouse clicks from giving the component the focus,
while still allowing keyboard navigation to give the component the focus.
This method applies only to components that
receive mouse events. For example, you can use this method
on a JButton , but not on a JPanel .
If you write a custom component it is up to you to honor this property.
This method is recommended over the setFocusable method and will allow
your program to work better for users employing
assistive technologies.
|
|
setFocusable(boolean) isFocusable() |
Sets or gets the focusable state of the component.
A component must be focusable in order to gain the focus.
When a component has been removed from the focus cycle with
setFocusable(false) , it can no longer be navigated
with the keyboard. The setRequestFocusEnabled method
is recommended so that your program can be run by users employing
assistive technologies.
|
| requestFocusInWindow() | Requests that this component should get the focus.
The component's window must be the current focused window.
For this request to be granted a subclass of JComponent must be visible,
enabled, and focusable, and have an input map for this
request to be granted. It should not be
assumed that the component has the focus until it
fires a FOCUS_GAINED event.
This method is preferred to the requestFocus method,
which is platform-dependent.
|
|
setFocusTraversalKeys(int, Set) getFocusTraversalKeys(int) areFocusTraversalKeysSet(int) (in java.awt.Container )
|
Sets or gets the focus traversal keys for a particular
direction or determines whether any focus traversal keys have
been explicitly set on this container. If no focus traversal
keys have been set, they are inherited from an ancestor or
from the keyboard focus manager. Focus traversal keys
can be set for the following directions:
KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS ,
KeyboardFocusManager.BACKWARD_TRAVERSAL_KEYS
KeyboardFocusManager.UP_CYCLE_TRAVERSAL_KEYS , or
KeyboardFocusManager.DOWN_CYCLE_TRAVERSAL_KEYS .
If you set the UP_CYCLE_TRAVERSAL_KEYS or the
DOWN_CYCLE_TRAVERSAL_KEYS , you must also invoke
setImplicitDownCycleTraversal(false) on the focus traversal policy.
|
Creating and Using a Custom FocusTraversalPolicy
| Class or Method | Purpose |
|---|---|
| LayoutFocusTraversalPolicy | The class that, by default, determines the focus traversal policy for Swing components. |
| getComponentAfter(Container, Component) | Given the component that is passed as input, returns the component that should next have the focus. |
| getComponentBefore(Container, Component) | Given the component that is passed as input, returns the component that should have the focus before this component. The method is used for backward tabbing. |
|
getDefaultComponent(Container) (in javax.swing.SortingFocusTraversalPolicy )
|
Returns the component that should have the default focus. |
| getFirstComponent(Container) | Returns the first component in the traversal cycle. |
| getInitialComponent(Container) | Returns the component that should receive the focus when a window is made visible for the first time. |
| getLastComponent(Container) | Returns the last component in the traversal cycle. |
|
setFocusTraversalPolicy(FocusTraversalPolicy) getFocusTraversalPolicy(FocusTraversalPolicy) (in java.awt.Container )
|
Sets or gets the focus traversal policy or
determines if a policy has been set. Note that setting a focus
traversal policy on a container that is not the focus cycle
root may have no apparent effect.
A value of null means that a policy has
not been explicitly set. If no policy has been set,
a policy is inherited from the parent focus cycle root.
|
|
isFocusCycleRoot() setFocusCycleRoot(boolean) (in java.awt.Container )
|
Checks or sets whether a container is the root of a focus traversal cycle. |
|
isFocusTraversalPolicyProvider() setFocusTraversalPolicyProvider(boolean) (in java.awt.Container )
|
Checks or sets whether a container will be used to provide focus traversal policy. |
All of this API was introduced in JDK 1.3.
| Class or Method | Purpose |
|---|---|
| InputVerifier | Abstract class that allows input validation via the focus mechanism. When an attempt is made to shift the focus from a component containing an input verifier, the focus is not relinquished until the verifier is satisfied. |
|
shouldYieldFocus(JComponent) (in InputVerifier )
|
When a component has an input verifier, this method is
called by the system to determine whether the focus can
leave this component. This method may cause side effects,
such as bringing up a dialog-box. If this method returns
false , the focus remains on the component passed in
to the method.
|
|
verify(JComponent) (in InputVerifier )
|
You need to override this method to check that
the component's input is valid. It should return
true if valid, otherwise return false .
This method should not cause any side effects,
such as bringing up a dialog-box. This method is
called by shouldYieldFocus .
|
|
setInputVerifier(inputVerifier) getInputVerifier() (in JComponent )
|
Sets or gets the input verifier assigned to the component. By default, components have no input verifier. |
|
setVerifyInputWhenFocusTarget(boolean) getVerifyInputWhenFocusTarget() (in JComponent )
|
Sets or gets whether the input verifier for the current focus owner
is called before this component requests the focus.
The default is true . This method should be set to false for
components, such as a Cancel button or a scroll
bar, that should receive the focus even if input is invalid.
|
KeyboardFocusManager Properties
This table defines the bound properties for
KeyboardFocusManager
. A listener can be registered for these properties by calling
addPropertyChangeListener
.
All of this API was introduced in JDK 1.4.
| Property | Purpose |
|---|---|
| focusOwner | The component that currently receives key events. |
| permanentFocusOwner | The component that most recently received a
permanent FOCUS_GAINED event.
Typically the same as focusOwner , unless
a temporary focus change is currently in effect. |
| focusedWindow | The window that is or that contains the focus owner. |
| activeWindow | The component must always be either a Frame or a
Dialog . The active window is either the
focused window, or the first frame or dialog-box that is an
owner of the focused window. |
| defaultFocusTraversalPolicy | The default focus traversal policy, which can be
set by the setFocusTraversalPolicy method of the Container class. |
| forwardDefaultFocusTraversalKeys | The set of default focus keys for a forward traversal. For multi-line text components, these keys default to Control-Tab. For all other components, these keys default to Tab and Control-Tab. |
| backwardDefaultFocusTraversalKeys | The set of default focus keys for a backward traversal. For multi-line text components these keys default to Control-Shift-Tab. For all other components these keys default to Shift-Tab and Control-Shift-Tab. |
| upCycleDefaultFocusTraversalKeys | The set of default focus keys for an up cycle.
These keys are null, by default, for Swing components.
If you set these keys on the KeyboardFocusManager ,
or if you set the downCycleFocusTraversalKeys on a focus
cycle root, you must also invoke the
setImplicitDownCycleTraversal(false) method on the focus traversal policy.
|
| downCycleDefaultFocusTraversalKeys | The set of default focus keys for a down cycle.
These keys are null, by default, for Swing components.
If you set these keys on the KeyboardFocusManager ,
or if you set the upCycleFocusTraversalKeys on a focus
cycle root, you must also invoke the
setImplicitDownCycleTraversal(false) method on the focus traversal policy.
|
| currentFocusCycleRoot | The container that is the current focus cycle root. |
| Example | Where Described | Notes |
|---|---|---|
FocusConceptsDemo
|
This section | Demonstrates basic default focus behavior. |
FocusTraversalDemo
|
This section | Demonstrates how to override the default focus order. |
TrackFocusDemo
|
This section | Demonstrates how to use a PropertyChangeListener
to track the focus owner. Also implements a custom focusable
component.
|
InputVerificationDemo
|
This section | Demonstrates how to implement an InputVerifier
to validate user input.
|
InputVerificationDialogDemo
|
This section | Demonstrates how to implement an InputVerifier
that puts up a dialog-box when user input is invalid.
|
FocusEventDemo | How to Write a Focus Listener | Reports all focus events that occur on several components to demonstrate the circumstances under which focus events are fired. |


I live in Saratoga Springs, Utah with my beautiful wife Marissa and our dog Stanley. I enjoy grilling, golfing, and playing pickleball.
I love web development because I get a thrill out of solving problems and making ideas come to life.
*In progress. It's a hobby project to give teachers an online place to manage classroom currency systems.
Visit Site »I built this site for my wedding in September 2017. I used HTML, CSS, JavaScript, jQuery, Express, NodeJS, and Firebase.
Visit Site »My brother and I edited a template to create this site for an insurance company. We used HTML and CSS.
Visit Site »A WordPress site that I created for a custom home construction company.
Visit Site »HTML
CSS
JavaScript
React
Redux
NodeJS
PHP
jQuery
MySQL
Git
HTTP
Ajax
Firebase
Heroku
WordPress
Python


my name is suhaib emad, i studed Mechanical engineering at abu and i finished this year, since then i worked in al-kaseh factory for 3 month but i wasnts sure that what i want to do but i kept working there for 3 month
linki always loved computers and wanted to work on one so that i start learing some html and css while am working in the factory i kept doing the same thing until a frined of mine told me about this course so i said why not and i applied to it
after 3 weeks i got a call from ltuc telling me that they accpited me cant tell u how happy i was so i say goodbuy to my cworkers in the factory and left


Set up UFW firewall for added security on Debian and Ubuntu
Set up UFW firewall - Debian, Ubuntu
Difficulty: 1
Time: 10 minutes
So you've installed your UFW firewall, now what?
Now you'll set up UFW by defining the rules and connections so it allows only the traffic you approve.
Set up defaults
The approach we'll take in our firewall setup is to default to denying all connections and then to open specific ports we need.
This approach lets us keep track of exactly which connections we let in.
Allow connections
Define exceptions to your firewall policy so that you can activate your firewall.
Add IP addresses
Allow connections from work, home, or other approved sources.
- Add your own IP address:
sudo ufw allow from <IP_ADDRESS>
This example IP is <IP_ADDRESS>. Replace this IP with your own.
The output shows Rule added
.
- Follow this same format to add other IPs.
Open ports
- Create an exception for secure shell (SSH) connections to get remote administration access.
By default, the SSH daemon runs on port 22. ufw
can call a rule by name if the default was changed.
- If you have not modified the SSH port, enable the exception:
sudo ufw allow ssh
- If you have modified the port that the SSH daemon listens on, allow it by entering the port number and TCP protocol:
sudo ufw allow 4444/tcp
This configuration is the strictest possible, and every incoming connection is denied except for the port just enabled. All other services are inaccessible. If you want to run additional services, open the proper port.
- Open any of the following ports:
- To run a standard HTTP web server, open port 80:
sudo ufw allow 80/tcp
- To enable FTP access, open port 21 by running this command:
sudo ufw allow 21/tcp
or alternatively run this command:
sudo ufw allow ftp
Both commands do the same thing.
- To run an SSL/TLS enabled web server, open port 443:
sudo ufw allow 443/tcp
- To enable your SMTP email connection, open port 25:
sudo ufw allow 25/tcp
- To open a range of ports, use this format in your command:
sudo ufw allow 20:25/tcp
In this example, we open all ports from 20 to 25. Choose any range of ports you like.
Run other UFW commands
Delete rules
You can delete rules by inserting the delete command in the add rule But, by far, the easiest way is to list out your rules with your current rules first.
To delete rules by inserting the delete
command in the add rule:
To delete rules by listing out your rules with your current rules first:
- List out your current rules in a numbered list:
sudo ufw status numbered
The output looks like this:
Status: active
To Action From
-- ------ ----
[ 1] Anywhere ALLOW IN <IP_ADDRESS>
[ 2] 20:25/tcp ALLOW IN Anywhere
[ 3] 20:25/tcp (v6) ALLOW IN Anywhere (v6)
- As an example, let's delete rule #1:
sudo ufw delete 1
-
Enter y at the prompt to continue.
Reset UFW
- Reset UFW to its default settings:
sudo ufw reset
Review and enable your firewall
- Review your exceptions:
sudo ufw show added
The ufw show added
command lists your configured firewall rules in human-readable format, even when your firewall is inactive. - If the
ufw show added
command lists all the rules you want, enable your firewall:
sudo ufw enable
Conclusion
Congratulations! You set up a fully functioning UFW firewall.


You must log into the database as Sue before proceeding with this page.
Sue is a general manager of coastal east and west regions. She is granted security label 'COASTAL'.
Check which regions of data can Sue access from the 'dailysales' table.
Since Sue is granted with security label 'CENTRAL', she is able to access all record of 'dailysales' table which are associated with security labels EAST and WEST.


Nuisance violations per 100 housing units
Nuisance violations include offenses such as high weeds/grass, accumulation of trash or junk, junk or abandoned automobiles, dilapidated condition, and illegal dumping. Maintaining a clean and orderly environment improves health and safety, promotes neighborhood pride, increases property values, and creates a sense of mutual ownership and maintenance between residents.
Tracking nuisance violations can assist neighborhoods and residents in identifying repeated problems and developing strategies to address them. Increases in nuisance violations may signify increased nuisance, but may also show signs of increased neighborhood engagement and concern, or reflect community improvement through focused enforcement efforts.
High grass or weeds and trash or junk violations encompass more than half of all nuisance violations.
####Related variables
Housing Code Violations
Crime - Property
Disorder-related Calls
311 Requests
Neighborhood Organizations
Number of cited nuisance violations divided by total housing units multiplied by 100. Local ordinances that define and regulate nuisances vary between jurisdictions.
Source: City of Charlotte Code Enforcement; Town of Cornelius; Town of Matthews; Town of Mint Hill; Mecklenburg County Code Enforcement; Mecklenburg County Tax Parcels
| Resource | Learn More and Take Action |
|---|---|
| Code Enforcement | View municipal code enforcement information for City of Charlotte, Mecklenburg County, Town of Cornelius, Town of Davidson, Town of Huntersville, Town of Matthews, Town of Mint Hill, and Town of Pineville. |
| Top 10 Nuisances | An interactive site that describes the 10 most common nuisance code violations in the City of Charlotte. |
| Charlotte Code Enforcement Cases | Get updates on current violations in the Code Enforcement database. |
| Neighborhood Association Toolkit | Be proactive in reducing the likelihood of receiving nuisance violations in your neighborhood with this toolkit. |
| Report Code Violations | Call 311 or get the My-Charlotte mobile app to report code violations. |


AV testing for my @codemash presentation successful. No wrestling with resolutions at the last minute for me!
1/9/2014, 4:51:46 AM
Favs: 0
Retweets: 0
link--- layout: tweet ---
AV testing for my @codemash presentation successful. No wrestling with resolutions at the last minute for me!
1/9/2014, 4:51:46 AM
Favs: 0
Retweets: 0
link


7 Debate Community
Home
Forum
Learn
Schedule
VPN
Honor
Committee
吴奕佳
Team Captain
高嘉桧
Team Vice Captain
杨一
Team Vice Captain
陶丽好
Community President
郭雨萌
Community Vice President
宋娟
Team Instructor
Community Developer
蒋雨成
Tech Developer
黄海麟
Course Developer
孙一文
Course Developer
邹欣妤
Design Advisor
马德堃
Tech Advisor
文安琪
Design Advisor
Debate Team Member
武雅宸
Debate Team Member
段云蕾
Debate Team Member
杨一
Debate Team Member
陶丽好
Debate Team Member
郭雨萌
Debate Team Member
李宇霄
Debate Team Member
樊铮
Debate Team Member
张舵
Debate Team Member
俞姿杏
Debate Team Member
陈禹宏
Debate Team Member
周徵羽
Debate Team Member


I’m in the process of creating the “Ultimate
Sailing Cooler”. The motivation for this is just to have the most
technologically advanced cooler that ever existed. It will be used mostly for
sailing small dingy boats.
Phase 1: Install Stereo Equipment and Electronics Compartment (In Progress) I completed this over the weekend. Bought some cheap marine speakers and an amplifier online. Hooked up to a 12v battery. The electronics are partitioned off from the rest of the cooler by a modified cutting board. Everything is sealed with silicone. All connections are just soldered and heat shrinked for the moment. Later, as it gets more finalized I will probably add connectors. Sounds great to far, but nothing to too technologically advanced. Input is from a small MP3 player.
Phase 2: Heads Up Display, GPS, Temp Monitor (Parts Ordered)
An Arduino will run the whole thing. I have never
done Arduino work before, so I am excited to get my hands dirty. Inputs will
be a couple temp sensors and a GPS module. Outputs are to a 20x4 character LCD
that will be mounted on top of the cooler. GPS data will also be logged to an
SD card so I can overlay all my sailing this summer onto google
earth. LCD
display will be heading,
speed (knots), outside temp, cooler temp, battery life, and….. anything else
I can think of. Maybe roll angle if I was adventurous and installed an
accelerometer.
Phase 3: Solar Charging (Planned) Adding a 10 W solar panel to the top. There isn’t really a need for this, so of course it is a requirement for this cooler. It will also up the visible ‘cool’ factor
Phase 4: Connectivity (Out there) I will probably add bluetooth, wifi, or cellular connectivity. Maybe I will set up a tether to my phone so the cooler becomes a wifi hotspot. I need to come up with some more ideas here.
Phase 5: Mobility (WAY out there) If there is anyway I could make this move on its own, I might try. It will float, so I could add a propeller and a rudder system. Maybe some wheels and steering.


HOME
More Content
Settings
Play Counts
Quick Stats
Top Album by Play Time
{{key}}
{{value}}
Top Artist by Play Time
{{key}}
{{value}}
Next Update After
{{ updateTime }}
Total Play Time
{{ totalListenTime }}
Number of Songs
{{ songCount }}


--- layout: default ---
I am a Senior Software Engineer and Agile Coach at Automic Software currently working with an internal Services & Enablement Team, providing basic serices and technologies like build servers, up-and-running systems or tools. My work ranges from coaching devs and project leads to writing code and running, fixing and engineering continuously deployed servides. On these pages I'm going to share ideas, opinions and learnings from my daily work. I'll also talk a bit about my side-projets of course...


START ADDING EXPENSES
Discover a Modern Expense tracker
Howdy! Mind if I track your expenses?
Yes
No


§383-35 Appeal pending when redetermination issued. In the event that an appeal involving a determination or a prior redetermination is pending as of the date a redetermination thereof is issued, the appeal, unless withdrawn, shall be treated as an appeal from such redetermination. [L 1941, c 304, §1, pt of subs 18; RL 1945, §4236; RL 1955, §93-34; HRS §383-35]
Rules of Court
Applicability of Hawaii Rules of Civil Procedure, see HRCP rule 81(b)(12).


WITNESS LIST
Coastal Barrier System
October 5, 2016 10:00 AM
Coastal Barrier
FOR:
Beskid, Craig (EHCMA), Pasadena, TX
Dunbar, Larry (also providing written testimony) (SSPEED Center), Houston, TX
Mitchell, Bob (also providing written testimony) (Economic Development), Houston, TX
Mohn, Jerry (West Galveston Is Property Owners Assn and Texas Chapter of American
Shore & Beach Preservation Association), Galveston, TX
Rivero, Hector (also providing written testimony) (Texas Chemical Council), Austin, TX
Sallese, Christopher (also providing written testimony) (Gulf Coast Community Protection
Recovery District), League City, TX
Toomey, Christopher J. (also providing written testimony) (AECOM), Wesherly, RI
ON:
Boyt, Jeb (Cameron County), Austin, TX
Brody, Sam (also providing written testimony) (TX A&M), Galveston, TX
Jackson, Guy R. (Self; Guy Jackson Farms and Galveston Bay Foundation), Anahuac, TX
Jones, Scott (also providing written testimony) (Galveston Bay Foundation), Houston, TX
Machol, John (Self; Galveston Flood Defense Coalition), Galveston, TX
Robb, Christopher (Self; CPA), Galveston, TX
Robb, Marie (Self; Small Business Owner), Galveston, TX
Tirpak, Sharon (Self; US Army Corps of Engineers), Galveston, TX
Tromm, Jonathon (Self; Galveston Flood Database Coalition), Galveston, TX
Waterworth, Leonard (TAMU Galveston), Galveston, TX
Wisian, Ken (also providing written testimony) (Texas General Land Office), Austin, TX
Zetterstrom, Lars N. Col (also providing written testimony) (U.S. Army Corps of
Engineers - Galveston District), Galveston, TX
Registering, but not testifying:
ON:
Green, David (GLO), Austin, TX
Williams, Tony (Texas General Land Office), Austin, TX


a11yana A classless CSS framework
a11yana (pronounced allyana) is a classless CSS framework with a focus on accessibility.
This is still in the early stages! See the project on GitHub for a status of the work towards the initial release.
a11yana (pronounced allyana) is a classless CSS framework with a focus on accessibility.
This is still in the early stages! See the project on GitHub for a status of the work towards the initial release.


About Me
Hi! I am senior software developer with 12 year of solid experience in IT.
My main interest for now is machine learning and data science. Also I have a lot of experience in PHP and Python development.
Looking for product manager, team leader, data-scientist position. I am familiar with machine learning algorithms and python libraries
such as Pandas, Numpy, Scikit-learn, XGBoost, etc.
Also I have a lot of experience with PHP frameworks such as Symfony and Laravel. I have build several highload and big data projects.
Checkout my accomplishments and certificates:
Machine Learning and Data Science Specialization.
Introduction to Machine Learning
Big Data Analysis: Hive, Spark SQL, DataFrames and GraphFrames
Big Data Essentials: HDFS, MapReduce and Spark RDD
You can contact with me via email for hiring or any other questions.
My Skills
I have been working with Python and PHP for 10 years. My favorite frameworks is Django and Symfony 3.
Machine Learning is my main competence. I have 3 year of experience in data analysis.
I use linux as my main OS since 2005. I have several my own servers with Ubuntu on board.
Big Data is also one of my interests and I am looking for the opportunity to become better in this area.
Machine Learning Skills
-
Pandas
-
Numpy
-
XGBoost
-
Probability and Statistics
-
NLP
Code Skills
-
Python
-
R
-
PHP
-
C++
-
Java
Resume
Working History
Software Developer and Data Scientist in Bridgestone TireConnect.
2015 - PresentDevelop and support huge e-commerce project.
Senior Python Developer - TeamAve.
2013 - 2015Working on a large e-commerce project. Was involved in the integration of payment systems, scaling the project, optimizing for high loads.
PHP developer. Team Lead. - Ameria.
2011 - 2013Was engaged in the development of large projects on Symfony2.
PHP developer. Team Lead. - NewVision.
2009 - 2011The work was carried out over several high-load projects with large volumes of data (Exchange of links, Multithreaded indexing of third-party sites, processing of large amounts of data).
PHP developer. - DepositFiles.
2008 - 2009The responsibility was to optimize databases for high loads (postgresql, mysql), code optimization, load distribution on servers, setting up nginx, redis.
Lead Developer. - Skidki-ua.com.
2007 - 2008Lead developer of the project skidki-ua.com. The project developed by me on symfony 1.4.
PHP Developer Freelance.
2006 - 2007Worked as a freelancer. Carried out orders for various CMS (RunCMS, Joomla, Typo3, WordPress, etc)
Education History
Vernadsky Taurida National University Simferopol.
2004 - 2009Faculty of Mathematics, Apply Math.
School #7 in Simferopol.
1994 - 2004School with in-depth study of English.
Portfolio
Contact Informations
- E-mail<EMAIL_ADDRESS>- Skype: adrianovpavel


Welcome to in.notion
Your escapism to creativity.
Our Mission
We started in.notion as an Instagram account for daily inspiration and aesthetic flow of thoughts.
Our mission is to spread peace and positivity around.
Follow this space for daily inspiration.
Our Work
> Breather AppInspitation
Today's mantra
"If you're changing the world, you're working on important things. You're excited to get up in the morning."
Advice for you


--- layout: post title: Malware Done Got Me! date: '2011-10-11 21:00:32 -0700' mt_id: 1467 blog_id: 1 post_id: 1467 basename: malware-done-got-me categories: - metasite - blogging-world ---
I apologize to anyone who has visited my blog in the last five days. I was running old Movable Type and someone exploited it. I got added to Google's malware warning service, unfortunately, so you might see some warnings until the request for review is complete.
It looks like it's time to figure out how to lock down Movable Type so that this doesn't happen again—it's such a pain to upgrade that there's always going to be some lag time between security release and updating.


sustainable education foundation
From Brain Drain to Brain Gain
Helping local students connect with industry experts and academics around the world
explore250 000+
Students reached via our Onelive interactive webinar series
2 400+
Hours of mentoring provided via our ScholarX program
100+
Researchers of Sri Lankan origin representing the world's top universities
- Interact directly with industry experts and academics that are hard to reach and exclusive via OneLive to gain valuable perspective and insight on how to customise and innovate a new career path for you.
- 1 to 1 premium mentoring by industry experts and academics across the world Exposure to postgraduate, internship and job opportunities.
- Gain exposure to your work and projects.
- Teaching/mentoring experience.
- Ability to make an impact on the Sri Lankan education system.
- Chance to connect with young talent in Sri Lanka.
- Develop In demand, skills needed for the job market when you graduate.
- Working with a diverse international community/experience in managing a diverse international community.
- Exposure to startup work culture.


suspend fun isValidShieldedAddr(address: String): Boolean
Returns true when the given address is a valid z-addr. Invalid addresses will throw an exception. Valid z-addresses have these characteristics: //TODO copy info from related ZIP
address
- the address to validate.
RuntimeException
- when the address is invalid.
Return
true when the given address is a valid z-addr.


This is Testing
Login System
E-mail:
Password:
If you don't have an account yet, please click
Register


Mozillians are individuals who are passionate about Mozilla, the open web, and the many benefits of Firefox and its products. They are a global pack of do-gooders and dedicated defenders of the Web! Creative and resourceful, Mozillians lead campaigns and projects at their colleges and in their communities to encourage others to contribute to the Mozilla mission and utilize our products. Not just that, Mozillians are web educators and strives to keep the power of the Web in hands of users everywhere. Mozillians are given the opportunity to learn new skills, earn recognition, and advance their leadership in not just the Mozilla community, but in their college and local community.
Sure we're called Mozillians, but there's a lot more to us than meets the eye. While Mozillians promote our products, they are also on a mission to promote openness, innovation, and opportunity on the Web. They throw events teaching people how to code, build apps, and create awesome things online. They are web educators and seek to help people of all age and race.
We don't control our ambassadors, we empower them to do good and to go above and beyond. Mozillians have a purpose, a mission, and a whole lot of heart! Each day this program grows and we become closer and closer to changing the world.
The Firefox Student Ambassadors program exists to empower students with the tools and resources needed to:


ansible-doc
Display information on modules installed in Ansible libraries.
Display a terse listing of plugins and their short descriptions.
More information: home page
- List available action plugins (modules):
ansible-doc --list
- List available plugins of a specific type:
ansible-doc --type become|cache|callback|cliconf|connection|... --list
- Show information about a specific action plugin (module):
ansible-doc plugin_name
- Show information about a plugin with a specific type:
ansible-doc --type become|cache|callback|cliconf|connection|... plugin_name
- Show the playbook snippet for action plugin (modules):
ansible-doc --snippet plugin_name
- Show information about an action plugin (module) as JSON:
ansible-doc --json plugin_name


{% extends "base.html" %} {% block title %}
Medieval catalogues > UNIVERSITY AND COLLEGE LIBRARIES OF OXFORD > All Souls College > Inventory of the library, c. 1495
{% endif %}108 identified entries found.
All data was derived from the List of Identifications by Professor Richard Sharpe.
{% if not printing %}
A key to codes used in the List is available (opens in new tab).{% endif %}


Chapter 5 Osprey basis set tools
Being a linear-combination modelling software, Osprey requires prior spectral knowledge in the form of so-called basis sets. These are collections of model spectra (basis functions) for the various metabolites you wish to quantify.
Historically, basis functions were acquired experimentally from aqueous solutions, which was a laborious and often incredibly frustrating task. Fortunately, many free software solutions open up a world of simulating any NMR experiment, and can generate noise-free model spectra of most of the spin systems we could be interested in.
In this chapter, you will learn how to generate an Osprey basis set. You can either import an existing complete basis set in LCModel format (.BASIS
), or you can compile an Osprey basis set from a set of synthetic spectra that have been simulated using the FID-A software. Please refer to the example scripts in the repository for directions and how to do this. You can also ask for advice in the Spectral Simulation and Basis Sets categories of the MRSHub forum.
5.1 io_LCMBasis
If you have an existing LCModel basis set (.BASIS
), you can import it into Osprey. Assuming the basis set is located at /Users/Georg/LCModelBasissets/GE/press144
, you can execute the following command at the MATLAB prompt after you have run OspreyJob
:
>> file = '/Users/Georg/LCModelBasissets/GE/press144';
You can then call Osprey’s io_LCMBasis
function to create a basis set:
>> [BASIS] = io_LCMBasis(file, 1, 'unedited', 'none');
Follow the instructions in the MATLAB prompt, and from then on, OspreyFit will automatically pick this basis set, but only if there is no internal existing Osprey basis set with matching parameters. We will soon provide the option to specify an individual basis set in the job file.
5.2 fit_makeBasis
For the purpose of this tutorial, we will assume that you have a set of FID-A simulations saved in a folder on your hard drive. Your folder may look like this:
In this case, we have simulated a bunch of metabolites for the GE PRESS sequence at an echo time of 144 ms.
If this folder is located at, say, /Users/Georg/MRS_Simulations/GE/press144
, you can create a variable called folder
at the MATLAB prompt:
>> folder = '/Users/Georg/MRS_Simulations/GE/press144';
You can then call Osprey’s fit_makeBasis
function to create a basis set:
>> [BASIS] = fit_makeBasis(folder, 1, 'unedited');
This will generate a struct array called BASIS
in the MATLAB workspace, and also save it to the current MATLAB working directory. This file is your new Osprey basis set. If the addMMFlag
argument (see below) is set to 1
, the filename of the basis set is going to be BASIS_MM.mat
; if it is set to 0
, the filename will be BASIS_noMM.mat
.
5.2.1 Complete syntax
>> [BASIS] = fit_makeBasis(folder, addMMFlag, sequence, editTarget);
Inputs
| Input | Type | Description | Mandatory? | Options |
|---|---|---|---|---|
| folder | String | Complete path to the folder containing .MAT files with FID-A-simulated metabolite basis functions |
Yes | — |
| addMMFlag | Boolean | If set to 1 (default), Osprey will automatically add macromolecule and lipid basis functions to the basis set |
No | 1 (default), 0 |
| sequence | String | Determines the type of sequence that you want to create a basis set for. Will try to automatically determine the order of editing steps from saturated NAA and water signals. | No | 'unedited' (default), 'MEGA' , 'HERMES' , 'HERCULES' |
| editTarget | String | Determines the target molecule(s) of the editing experiment. Only needs to be set if sequence is set to something other than 'unedited' . |
No | 'GABA' (default), 'GSH' |
Outputs
| Output | Type | Description | Mandatory? | Options |
|---|---|---|---|---|
| BASIS | Struct | Structure containing the Osprey basis set. | Yes | — |
5.3 fit_plotBasis
Once you have generated the basis set, you may want to plot the basis functions and inspect that they look like you expect them to. For this purpose, Osprey includes a function called fit_plotBasis
.
fit_plotBasis
acts on the contents of an Osprey .MAT
basis set file. If you load any basis set into MATLAB by double-clicking on it, you will see the struct BASIS
in the MATLAB workspace:
You can then call fit_plotBasis
to create a plot overview of the basis set:
>> fit_plotBasis(BASIS, 1, 1);
This command will generate a stack plot of all basis functions (including macromolecules and lipids, if you have chosen to include them in the basis set) along with a ppm axis:
5.3.1 Complete syntax
>> out = fit_plotBasis(basisSet, dim, stagFlag, ppmmin, ppmmax, xlab, ylab, figTitle);
Inputs
| Input | Type | Description | Mandatory? | Options |
|---|---|---|---|---|
| basisSet | String | Name of the struct in the MATLAB workspace containing the Osprey basis set (usually BASIS ) |
Yes | — |
| dim | Integer | Dimension of the basis function that you want to plot. For unedited data, this will be 1 . MEGA-edited data will have the off spectrum in dimension 1, the on spectrum in dimension 2, the difference spectrum in dimension 3, and the sum spectrum in dimension 4. |
No | Default: 1 |
| stagFlag | Boolean | Determines whether basis functions are plotted vertically staggered or simply on top of one another. | No | 1 = staggered (default), 0 (not staggered) |
| ppmmin | Float | Lower limit of ppm axis to plot. | No | Default: 0.2 |
| ppmmax | Float | Upper limit of ppm axis to plot. | No | Default: 5.2 |
| xlab | String | X-axis label | No | Default: 'Frequency (ppm)' |
| ylab | String | Y-axis label | No | Default: '' |
| figTitle | String | Figure title | No | Default: '' |
Outputs
| Output | Type | Description | Mandatory? | Options |
|---|---|---|---|---|
| out | Figure handle | Figure handle for the output figure | Yes | — |


Getting started¶
Setup¶
SimulaQron requires Python 3 along with the packages twisted, numpy, scipy, Cython, service_identity, matplotlib, networkx, bitstring, black, flake8, click and daemons.
Note
matplotlib also requires tkinter which on Linux can be installed by the command sudo apt install python3-tk
.
Installation using pip¶
The easiest way to install SimulaQron is using pip (requires MacOS or Linux). Simply type
pip3 install simulaqron
You can then make use of SimulaQron using the command simulaqron
in the terminal. For more information on how to use this command see below or type:
simulaqron -h
Installation from source¶
If you want to get the source code, you can clone the git repository. Do:
git clone https://github.com/SoftwareQuTech/SimulaQron.git
You will then need to set the following environment variable in order to execute the code. Assuming that you use bash (e.g., standard on OSX or the GIT Bash install on Windows 10), otherwise set the same variables using your favorite shell.:
export PYTHONPATH=yourPath/SimulaQron:$PYTHONPATH
where yourPath is the directory containing SimulaQron. You can add this to your ~/.bashrc or ~/.bash_profile file.
Note
If you want to use SimulaQron in the same way as when installed using pip you can use an alias by for example:
alias simulaqron=yourPath/SimulaQron/simulaqron/SimulaQron.py
Verifying the installation¶
To run SimulaQron you need to following Python packages:
- numpy
- scipy
- Cython
- service_identity
- twisted
- matplotlib
- networkx
- bitstring
- black
- flake8
- click
- daemons
- qutip (optional)
- projectq (optional)
To verify that that SimulaQron is working on your computer, type:
make verify
in a terminal at the root of the repository. This command will clear any .pyc files in this directory, check that the needed python packages are installed (and if not install these using pip) and run the automated tests. By default a shorter version of the tests are run. If you wish to run the full tests type make full_tests
. Not however that the full tests can take quite some time since they perform quantum tomography to tests operations on the qubits.
By default the stabilizer engine will be used.
Note
During the tests you might see quite some error messages. This is to be expected since some tests test that errors are handled correctly when something goes wrong. If the tests pass it will say OK in the end.
Testing a simple example¶
Before delving into how to write any program yourself, let’s first simply run one of the existing examples when programming SimulaQron through the Python library (see Examples using the python library). Remember from the Overview that SimulaQron has two parts: the first are the virtual node servers that act simulate the hardware at each node as well as the quantum communication between them in a transparent manner. The second are the applications themselves which can be written in two ways, the direct way is to use the native mode using the Python Twisted framework connecting to the virtual node servers, see Programming via SimulaQron’s native Python Twisted Interface (specific to SimulaQron). Another way is the use the provided Python library that calls the virtual nodes by making use of the classical/quantum combiner interface. We will here illustrate how to use SimulaQron with the Python library.
Starting the SimulaQron backend¶
By default SimulaQron uses the five nodes Alice, Bob, Charlie, David and Eve on your local computers. In this example there will be two processes for each node listening to incoming messages on a certain port number. These make up the simulation backend and the CQC server. To start the processes and thus the backend of SimulaQron simply type:
simulaqron start
Warning
Running simulaqron start
will be default start up servers on localhost (i.e., your own computer), using port numbers between 8000 and 9000, to form the simulated quantum internet hardware. SimulaQron does not provide any access control to its simulated hardware, so you are responsible to securing access should this be relevant for you. You can also run the different simulated nodes on different computers. We do not take any responsibility for problems caused by SimulaQron.
For more information on what ./cli/SimulaQron start
does, how to change the nodes and the ports of the network, the topology etc, see Configuring the simulated network.
To stop the backend, simply type:
simulaqron stop
If something went wrong (for example the process was killed before you stopped it) there might be leftover files which makes SimulaQron think that the network is still running. To reset this you can type:
simulaqron reset
Note that this also kills any currently running network.
Running a protocol¶
Having started the virtual quantum nodes as above, let us now run a simple test application, which already illustrates some of the aspects in realizing protocols. Our objective will be to realize the following protocol which will generate 1 shared random bit between Alice and Bob. Evidently, there would be classical means to achieve this trivial task chosen for illustration.
- Alice and Bob generates one EPR pair, that is, two maximally entangled qubits \(A\) and \(B\) of the form \(|\Psi\rangle_{AB} = \frac{1}{\sqrt{2}} \left(|0\rangle_A |0\rangle_B + |1\rangle_A |1\rangle_B\right)\)
- Both Alice and Bob measure their respective qubits to obtain a classical random number \(x \in \{0,1\}\).
The examples can be found in the repo pythonLib. Before seeing how this example works, let us again simply run the code:
cd examples/cqc/pythonLib/corrRNG
sh run.sh
You should be seeing the following two lines:
App Alice: Measurement outcome is: 0/1
App Bob: Measurement outcome is: 0/1
Note that the order of these two lines may differ, as it does not matter who measures first. So what is actually going on here? Let us first look at how we will realize the example by making an additional step (3) explicit:
- Alice and Bob generate one EPR pair, that is, two maximally entangled qubits \(A\) and \(B\) of the form \(|\Psi\rangle_{AB} = \frac{1}{\sqrt{2}} \left(|0\rangle_A |0\rangle_B + |1\rangle_A |1\rangle_B\right)\)
- Alice and Bob are informed of the identifiers of the qubits and are informed that entanglement was generated.
- Both Alice and Bob measure their respective qubits to obtain a classical random number \(x \in \{0,1\}\).
While the task we want to realize here is completely trivial, the addition of step 3 does however already highlight a range of choices on how to realize step 3 and the need to find good abstractions to allow easy application development. One way to realize step 3 would be to hardwire Alices and Bobs measurements: if the hardware can identify the correct qubits from the entanglement generation, then we could instruct it to measure it immediately without asking for a notification from the entanglement generation process. It is clear that in a network that is a bit larger than our tiny three node setup, identifying the right setup requires a link between the underlying qubits and classical control information: this is the objective of the classical/quantum combiner.
The script run.sh executes the following two python scripts:
#!/bin/sh
python3 aliceTest.py
python3 bobTest.py &
Let us now look at the programs for Alice and Bob.
We first initialize an object of the class CQCConnection
which will do all the communication to the virtual through the CQC interface.
Qubits can then be created by initializing a qubit-object, which takes a CQCConnection
as an input.
On these qubits operations can be applied and they can also be sent to other nodes in the network by use of the CQCConnection
.
The full code in aliceTest.py is:
# Initialize the connection
with CQCConnection("Alice") as Alice:
# Create an EPR pair
q = Alice.createEPR("Bob")
# Measure qubit
m=q.measure()
to_print="App {}: Measurement outcome is: {}".format(Alice.name,m)
print("|"+"-"*(len(to_print)+2)+"|")
print("| "+to_print+" |")
print("|"+"-"*(len(to_print)+2)+"|")
Similarly the code in bobTest.py read:
# Initialize the connection
with CQCConnection("Bob") as Bob:
# Receive qubit
q=Bob.recvEPR()
# Measure qubit
m=q.measure()
to_print="App {}: Measurement outcome is: {}".format(Bob.name,m)
print("|"+"-"*(len(to_print)+2)+"|")
print("| "+to_print+" |")
print("|"+"-"*(len(to_print)+2)+"|")
For further examples, see the examples/ folder.
Settings¶
Settings are easily accessed through the command line interface. To see what settings can be set, type:
simulaqron set -h
To set a setting, for example to use the projectQ backend, type:
simulaqron set backend projectq
Note
Settings needs to be set before starting the SimulaQron backend. If the backend is already running, stop it, set the settings and start it again.


Socket.io Demo
The button has been clicked 0 times.
Add Connection
My Table
Server Stats
Value
Mode
ORD
Chicago O'Hare
LHR
London Heathrow


* This is a demo page of [DotCHA: A 3D Text-based Scatter-type CAPTCHA], submitted to ICWE 2019.
* If you need, you may drag and rotate the model to identify each letter.


This program constructs an estimate of the “true” assembly of a set of reads, relative to a set of reference sequences, based on alignment information produced by RSEM.
As defined by DETONATE [1], the “true” assembly of a set of reads, relative to the true transcript sequences that the reads were generated from, is the set of contiguous subsequences of the transcript sequences that are covered by reads, with the reads overlapping by at least --min-overlap bases, when each read is aligned to its true location of origin.
In practice, we do not know the reads' true locations of origin; in fact, we do not even know (precisely) the true transcript sequences that the reads were generated from. Instead, we start with a set of reference sequences (e.g., an Ensembl reference), and we align each read to these reference sequences using RSEM/Bowtie. The current program chooses a subset of these alignments, according to a policy specified by --alignment-policy and --min-alignment-prob, and then builds our best guess as to the “true” assembly based on these alignments.
[1] Bo Li*, Nathanael Fillmore*, Yongsheng Bai, Mike Collins, James A. Thompson, Ron Stewart, Colin N. Dewey. Evaluation of de novo transcriptome assemblies from RNA-Seq data.
First, use a recent version of RSEM to quantify the expression of the full-length transcripts relative to the reads. For example:
$ rsem-prepare-reference --gtf mm9.ensembl63.filtered.gtf mm9.fa ref $ rsem-calculate-expression --num-threads 24 reads.fq ref expr
Second, use this program to estimate the “true” assembly:
$ ./ref-eval-estimate-true-assembly --reference ref --expression expr --assembly cc
This will output a file, cc_0.fa, that contains the “true” assembly.
Display this information.
The prefix of the reference built by rsem-prepare-reference. Required.
The prefix of the expression built by rsem-calculate-expression. Required.
If you have paired-end data, and you want to estimate the “true” scaffolded assembly, then include the --paired-end flag. In this case, rsem-calculate-expression needs to have been run with the --paired-end flag. (However, even if rsem-calculate-expression was run with the --paired-end flag, you can omit it here in order to generate an unscaffolded assembly. In this case, each mate will be treated as an independent read.)
A prefix to write the “true” assembly or sequence of assemblies to. The suffix _x.fa will be appended to this prefix, where x is the minimum overlap size. Required.
Either:
Or:
Default: 0.
A number between 0 and 1 (inclusive). Any alignment (of a read to a reference transcript) with posterior probability, as calculated by RSEM, strictly less than this value will be discarded. Noise reads, with posterior probability exactly 0, are always discarded. Default: 0.
The policy used to choose which alignment(s) of each read to use in constructing the “true” assembly. Options:
This policy is applied after the thresholding implied by --min-alignment-prob. For example, if “--min-alignment-prob=0.10 --alignment-policy=sample” is given, then (first) all alignments with posterior probability less than 0.10 will be discarded, and (second), for each read, an alignment will be sampled from among the remaining alignments, with the posterior distribution renormalized as appropriate. As another example, if “--min-alignment-prob=0.90 --alignment-policy=all” is given, then all alignments with posterior probability at least 0.90 will be used.
Default: sample.


Hello, my name is banana.
Hi! My name is apple!
Hola, my name is orange.
How would you describe yourself?
Well I am super red. Sometimes super green!
Hmmm. I'm an orange. So I am super orangy!
You look delicious! Not as delicious as me though! What about you banana?
You guys are both unhealthy. Look at my yellow slender body.
No fair! Don't blame genetics!
Some like themselves rounder! Do not force your values onto me!
I am merely stating the fact! Also, I am the most delicious out of the three of us.
Oh really now.
You cannot decide that for yourself.
Then it's decided. We are competing by interviewing the public.
Don't come crying when I win.
Tsk. Good luck.
I know I'm going to win. See you losers.


widgetPlus - Enhanced Entry, Spinbox, and Combobox Widgets with Undo/Redo and other useful features
The widgetPlus package adds new features to the widgets entry, spinbox, ttk::entry, ttk::spinbox, and ttk::combobox.
The new features are Undo and Redo operations, a <<Selection>> event, and for the Tk (unthemed) widgets an -inactiveselectbackground option, and some minor fixes to bindings. The new facilities closely follow those of the text widget.
The revised entry, spinbox, ttk::entry, ttk::spinbox, and ttk::combobox widgets are created by the commands widgetPlus::entryPlus, widgetPlus::spinboxPlus, widgetPlus::ttkEntryPlus, widgetPlus::ttkSpinboxPlus, and widgetPlus::ttkComboboxPlus respectively.
For example, the widgetPlus::entryPlus widget is implemented as a Snit snit::widgetadaptor that wraps a Tk entry widget. Its winfo class is Entry, and it uses a binding tag EntryPlus that replaces the Entry binding tag. The other widgets are implemented in a similar way.
The package uses the namespace ::widgetPlus, which exports (only) the five commands defined below that begin with a lower-case letter (EnableBWidget is not exported). These commands can be imported into the global namespace, and for simplicity, descriptive text in this manual will henceforth omit the namespace qualifier.
namespace import ::widgetPlus::*
In addition to the usual options of the entry, spinbox, ttk::entry, ttk::spinbox, and ttk::combobox widgets, the wrappers entryPlus, spinboxPlus, ttkEntryPlus, ttkSpinboxPlus, and ttkComboboxPlus provide the options below.
Create an entryPlus widget; or convert an existing entry widget into an entryPlus.
Create a spinboxPlus widget; or convert an existing spinbox widget into a spinboxPlus.
Create a ttkEntryPlus widget; or convert an existing ttk::entry widget into a ttkEntryPlus.
Create a ttkSpinboxPlus widget; or convert an existing ttk::spinbox widget into a ttkSpinboxPlus.
Create a ttkComboboxPlus widget; or convert an existing ttk::combobox widget into a ttkComboboxPlus.
Enable widgetPlus to modify BWidget Entry widgets and their compounds (such as the BWidget ComboBox). The command creates a bindtag BwEntryPlus to replace the default bindtag BwEntry. This operation is not performed when the package is loaded because it requires BWidget to be loaded first. This command is not exported from namespace ::widgetPlus.
In addition to the usual commands of the entry, spinbox, ttk::entry, ttk::spinbox, and ttk::combobox widgets, the wrappers entryPlus, ttkEntryPlus, spinboxPlus, ttkSpinboxPlus, and ttkComboboxPlus provide:
This command controls the undo mechanism and the modified flag. The exact behavior of the command depends on the option argument that follows the edit argument. The following forms of the command are currently supported:
Returns a boolean true if redo is possible, i.e. when the redo stack is not empty. Otherwise returns false.
Returns a boolean true if undo is possible, i.e. when the undo stack is not empty. Otherwise returns false.
If boolean is not specified, returns the modified flag of the widget. The insert, delete, edit undo and edit redo commands, or (by using this command) the user, can set or clear the modified flag. If boolean is specified, sets the modified flag of the widget to boolean.
When the -undo option is true, reapplies the last undone edits provided no other edits were done since then. Generates an error when the redo stack is empty. Does nothing when the -undo option is false.
Clears the undo stack and redo stack.
Included for completeness, but has no effect.
(N.B. An implicit separator is added to the undo stack for each call to a widget command (e.g. insert or delete) that changes the widget contents. These therefore separate the addition or removal of individual characters by typing, except that cut or paste operations are discrete.)
Undoes the last edit action when the -undo option is true. An edit action is defined as a single insert or delete command that is recorded on the undo stack. Generates an error when the undo stack is empty. Does nothing when the -undo option is false.
The class binding tag for different widgets has these default values:
entry uses Entry
spinbox uses Spinbox
ttk::entry uses TEntry
ttk::spinbox uses TSpinbox
ttk::combobox uses TCombobox
entryPlus uses EntryPlus
spinboxPlus uses SpinboxPlus
ttkEntryPlus uses TEntryPlus
ttkSpinboxPlus uses TSpinboxPlus
ttkComboboxPlus uses TComboboxPlus
The <<Undo>> and <<Redo>> virtual events are mapped to these keyboard events:
On X11 systems (Linux®, BSD®, Solaris®, etc):
<<Undo>> is mapped to <Control-z>
<<Redo>> is mapped to <Control-Shift-z>
On Windows® systems:
<<Undo>> is mapped to <Control-z>
<<Redo>> is mapped to <Control-y>
On Aqua® systems (i.e. Apple® macOS® or OS X®):
<<Undo>> is mapped to <Command-z>
<<Redo>> is mapped to <Command-Shift-z>
The EntryPlus bindings are based on those of the Entry bindtag, with these changes:
New bindings to <<Undo>> and <<Redo>>.
An adjustment to the <<Paste>> binding, so that it behaves the same way on X11 as on other windowing systems (i.e. it deletes the existing selection, if any exists).
The removal of the antiquated <Insert> binding.
New bindings to <FocusIn> and <FocusOut>, to facilitate the implementation of the -inactiveselectbackground option.
The SpinboxPlus bindings are based on those of the Spinbox bindtag, with the same changes as are made when converting Entry to EntryPlus.
The TEntryPlus bindings are based on those of the TEntry bindtag, with these changes:
New bindings to <<Undo>> and <<Redo>>.
The TSpinboxPlus bindings are based on those of the TSpinbox bindtag, with these changes:
New bindings to <<Undo>> and <<Redo>>.
The TComboboxPlus bindings are based on those of the TCombobox bindtag, with these changes:
New bindings to <<Undo>> and <<Redo>>.
Each widgetPlus widget generates a virtual event <<Selection>> whenever the value of its selection changes. This allows other Tcl code, for example the package persistentSelection, to monitor the selection in these widgets.
When an entry, spinbox, ttk::entry, ttk::spinbox, or ttk::combobox is a component of a megawidget, it is often possible to apply widgetPlus to that component without modifying the megawidget code.
A combobox with path $w includes an entry widget $w.entry, which uses the Entry binding tag. Thus widgetPlus can be applied to the combobox after creation, using the command (see EXAMPLES)
entryPlus $w.entry -undo 1 -maxundo 0
A BWidget ComboBox with path $w includes an entry widget $w.e, which uses the BwEntry binding tag in place of the default tag Entry.
Package widgetPlus provides a replacement bindtag BwEntryPlus, but this is not computed when the package is loaded because it requires BWidget to be loaded first. The command ::widgetPlus::EnableBWidget must be called to provide BwEntryPlus, and then the BWidget ComboBox can be modified (see EXAMPLES)
::widgetPlus::EnableBWidget entryPlus $w.e -undo 1 -maxundo 0
Undo and Redo do not sync the value of the modified flag - they always set the value to boolean true.
Undo and Redo do not sync the position of the insertion cursor.
The <<Modified>> event is not generated.
Undo/Redo separators, and the -autoseparators option, as found in the text widget, are not implemented. An implicit separator is added for each call to a widget command (e.g. insert or delete) that changes the widget contents. The edit separator command has no effect. Separator functionality would be less useful for widgets such as entryPlus than it is for a text widget.
Add an overwrite mode, toggled by <Insert> on non-macOS® systems.
This version of widgetPlus is intended to be compatible with all releases of Tk 8.5 and 8.6, and with the branches core-8-5-branch, core-8-6-branch, and trunk in the source code repository for Tk. Any incompatibility with any of these versions, for any Tk windowing system, should be reported as a bug. Please report such in the category widgetPlus of the Tklib Trackers.
To create and map an entryPlus widget .ep with an unlimited Undo/Redo stack:
package require widgetPlus widgetPlus::entryPlus .ep -undo 1 -maxundo 0 pack .ep
The same but using namespace import:
package require widgetPlus namespace import widgetPlus::* entryPlus .ep -undo 1 -maxundo 0 pack .ep
To convert an existing entry widget .ee into an entryPlus with an unlimited Undo/Redo stack:
entry .ee . . . package require widgetPlus widgetPlus::entryPlus .ee -undo 1 -maxundo 0
The same but using namespace import:
entry .ee . . . package require widgetPlus namespace import widgetPlus::* entryPlus .ee -undo 1 -maxundo 0
Apply widgetPlus to a Bryan Oakley combobox:
package require combobox combobox::combobox .cb . . . package require widgetPlus namespace import widgetPlus::* entryPlus .cb.entry -undo 1 -maxundo 0
Apply widgetPlus to a BWidget ComboBox. The command ::widgetPlus::EnableBWidget must be called first.
package require BWidget ComboBox .cb . . . package require widgetPlus ::widgetPlus::EnableBWidget namespace import widgetPlus::* entryPlus .cb.e -undo 1 -maxundo 0
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category widgetPlus of the Tklib Trackers. Please also report any ideas for enhancements you may have for either package and/or documentation.
BWidget, ComboBox, Entry, entry, persistentSelection, spinbox, text, ttk::combobox, ttk::entry, ttk::spinbox


arrayIndex
Welcome to the House Number Sum calculator! This tool helps you find the single-digit sum of a house number. Enter the house number below and the result will be calculated automatically.
Example: If you enter the house number "1234", the sum of its digits will be calculated as "1 + 2 + 3 + 4 = 10" and then "1 + 0 = 1".
How to Use: Enter a house number and the result will be displayed automatically.


It’s now almost 30 days since the last blog post and we made some really good progress. If you haven’t kept up with us, then here’s a quick summary:
Content Moderation
One of the core principles of ImageMonkey is: Keep it open and accessible for everybody - without the need to sign up. While this is great from the user experience point of view, it brings some serious problems with it:
How can we make sure the uploaded content doesn’t contain any sensitive material?
Manual content moderation is possible, but doesn’t scale. That’s why we are investing some time and energy into mechanisms which (hopefully) can assist us with content moderation. One of those mechanisms is a NSFW detection engine, which pre-classifies each uploaded image with a NSFW score. This for sure can’t replace manual content moderation entirely, but definitely could help us to identify problematic images early in the process.
We started our experiment with a handful more or less randomly selected P**rnhub and Youtube videos, which were split up in frames and fed to a neural net. With now 10k frames in each category (NSFW/SFW) we already get some pretty decent results. Of course it is still far away from being perfect and produces some false positives, but as an initial attempt I am pretty satisfied with the result. The whole thing is still in an alpha phase and was only trained on nudity, but if you want to give it a try: It’s available here.
Dataset Statistics
The dataset statistics tab was completely reworked and now provides more detailed statistical insight into the dataset.
Important Info At ImageMonkey we are taking your privacy seriously, that means we do not store any personal information (like your IP address) in our database. Neither do we send your IP address to some external service to determine your geolocation. Instead, ImageMonkey uses a local geolocation database for the geolocation lookup.
Multi Validation Mode
Another feature that’s still in beta mode, but already available for try out, is the Multivalidation Mode. The Multivalidation Mode is inspired by that reddit comment and allows users to validate multiple images in one go. You can enable it in the validation tab by clicking ‘m’ on your keyboard.
Detecting malicious behavior
While a completely open and publicly modifiable dataset has it’s benefits, it also gives users the possibility to destroy the dataset’s quality by maliciously voting for the wrong label on purpose.We for sure can’t prevent that, but we can try to make it harder. For that reason a history table was introduced, which now keeps track of every single action that’s performed on the dataset and in which way it affected the dataset.
Together with a browser fingerprint we get some pretty good information about the image’s state and how it changes over time (e.q if an image transitions from being classified as an ‘apple’ to being ‘not an apple’ in a very short time, it could be an malicious attempt).
Important info We do not store any personal information (like your IP address or your browser version) of you. The only thing we are storing is an anonymized hash.
Possibility to choose a label on upload
Up to now it wasn’t possible to select a label other than the one that was randomly chosen by the system. As this was quite inflexible and resulted in users pressing the refresh button of their browsers until the desired label would eventually show up, we decided to change that behavior.
Experiments
There are also some ongoing experiments and proof of concepts, which haven’t made it into an ImageMonkey release yet.
- Pre-annotation of video frames (based on background subtraction):
- Using the grabcut algorithm to select objects
- Gamification
- Validate an image each time you open a new browser tab
Want to contribute?
Once again, I would like to thank @dobkeratops for all the awesome ideas, the feedback and technical advice. Many thanks for your contribution!
As ImageMonkey and all it’s parts are completely OpenSource, every contribution is highly appreciated. In case you want to check it out, here are some links:
https://github.com/bbernhard/imagemonkey-core
https://github.com/bbernhard/imagemonkey-client
https://github.com/bbernhard/imagemonkey-playground
https://github.com/bbernhard/imagemonkey-chrome-extension
https://github.com/bbernhard/imagemonkey-admin


class KotlinFiler
The Kotlin Filer is used to make a file in an specific directory
companion object Companion : SingletonHolder<KotlinFiler, ProcessingEnvironment>
The singleton to retain this Filer. |
KotlinFiler(processingEnv: ProcessingEnvironment)
The Kotlin Filer is used to make a file in an specific directory |
fun newFile(): File
Create a new file in kaptKotlinGeneratedDir |
fun getInstance(arg: A): T
Use a unique instance of your creator. The access occurs in a synchronized way fun getInstance(): T |


Zyxt: Admin Console
Total Users:
8
Users & Jobs
User ID
IP
Region
Country
Jobs
×
Modal title
Open This Job
Delete This Job


with [brackets][] in text
with [[brackets][]] in text
full link [like](/this/) in text
full link to img is ok
[only open bracket(/in/) text
only close bracket text](/url/)


new PlayerModel(audioTag)
Parameters:
| Name | Type | Description |
|---|---|---|
audioTag |
DOMElement | The audio element that will be used for the player. |
- Source:
Methods
-
<static> PlayerModel#forward(data)
-
Set the trackTime by a percentual value
Parameters:
Name Type Description data
number The seconds to set as trackTime. - Source:
-
<static> PlayerModel#pause()
-
Call the pause method of the current state.
- Source:
-
<static> PlayerModel#play()
-
Call the play method of the current state.
- Source:
-
<static> PlayerModel#stop()
-
Call the stop method of the current state.
- Source:
-
<static> PlayerModel#switchTo(track)
-
Switch to a given track.
Parameters:
Name Type Description track
Track pause the player, set track as currentTrack, reset trackTime and resume playing. - Source:


Billy Joe Saunders defends fighting on KSI vs Logan Paul undercard
The super-middleweight world champion is making his debut in America but is secondary to the Youtubers' main event
by Martin Domin, https://www.facebook.com/mirrorfightingBilly Joe Saunders had no idea who social media stars KSI and Logan Paul were when he was offered a fight on their undercard.
But the super-middleweight world champion plans to steal their thunder and announce himself to their American audience.
Saunders will defend his title against Marcelo Esteban Coceres in Los Angeles on Saturday night before KSI and Paul clash in their rematch.
The YouTube stars have turned professional for the sequel to their draw in Manchester last year and are expected to pull in a crowd of 20,000 and millions of viewers worldwide.
And Saunders dismissed criticism of his decision to play second fiddle to a glorified white-collar bout.
"I am looking forward to it because it is my American debut," he said. "I am up for the challenge and I am going over there to put my name out.
"There would not be much point in sending me out there as chief-support on a 4,000-seater fight when I can go to LA in front of a sold-out 20,000 with two guys who had 10million views for their press conference.
"If I can take five or 10 per cent of their crowd with a good performance then I am establishing my name in America and giving myself a better chance of getting a Gennady Golovkin or Canelo Alvarez.
"I hadn’t heard of KSI or Logan Paul but people should take their hat off to them because they have come from nowhere. That demands respect because they have both done great business.
“I have always thought that ‘main event’ and ‘chief support’ is bulls***, the best fight of the night steals the show."
Saunders has fought just twice in the last two years and has made more headlines for courting controversy outside the ring.

But he is determined to make up for lost time.
“I made a lot of mistakes early on in my career but now I want my name out there for the right reasons. I want the fights with the likes of Canelo, Golovkin and Danny Jacobs," he said.
“I don’t care what sort of crowd it is, when you got out to a packed arena that lifts any fighter and you thrive on that energy.
"I was instantly interested when the offer came through. All this show does is benefit me because, as long as I look good, the Americans are going to remember me for when I come back again."


ABOUT ME
I am currently pursuing BTECH in Computer Science and Engineering from Indira Gandhi Delhi Technical University For Women, Delhi, India.
I grew up in New Delhi, India, where I did my schooling from G.D. Goenka Public School.
I am a coding enthusiast, well-versed with Java, C and C++. I stepped into this mesmerizing world of coding when I was in 11th class. I started my coding journey in python which immensely helped me clearing my basics, built my foundation and gave me an insight of how to approach a coding problem.
Along with this, I also dabble around with CSS and HTML.


{% extends 'core/base.html' %} {% load breadcrumbs from directory_components %} {% block content %} {% breadcrumbs 'Accessibility Statement' %}Home{% endbreadcrumbs %}
This online form is run by the Department for International Trade. We want as many businesses as possible to be able to use this service. For example, that means you should be able to:
We’ve also made the website text as simple as possible to understand. AbilityNet has advice on making your device easier to use if you have a disability.
We are in the process of arranging a full WCAG 2.1 audit for this online form. We will update this statement once we’ve received the WCAG 2.1 audit report. In the meantime, we have done some basic checks, and addressed the issues that were flagged.
We used components in the GOV.UK Design System to build this form. The Design System accessibility guide explains the current state of accessibility for these components. We are using a modified API from HMRC’s Trade Tariff: look up commodity codes, duty and VAT rates tool to allow users to search for commodity codes. We will test the accessibility of this component but fixing any issues will rely on HMRCs development plan.
If you need information on this website in a different format like accessible PDF, large print, easy read, audio recording or braille:
We’re always looking to improve the accessibility of this website. If you find any problems not listed on this page or think we’re not meeting accessibility requirements, contact:
The Equality and Human Rights Commission (EHRC) is responsible for enforcing the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018 (the ‘accessibility regulations’). If you’re not happy with how we respond to your complaint, contact the Equality Advisory and Support Service (EASS).
The Department for International Trade is committed to making its website accessible, in accordance with the Public Sector Bodies (Websites and Mobile Applications) (No. 2) Accessibility Regulations 2018.
This website is partially compliant with the Web Content Accessibility Guidelines version 2.1 AA standard, due to the non-compliances listed below.
All content for this service is designed by an experienced team of content designers to ensure we meet the highest web content standards.
The content listed below is non-accessible for the following reasons:
We plan to fix these problems by September 2020.
There are known issues with the GOV.UK Design System, as explained in the Design System accessibility guide. We will update our form with any accessibility fixes once they are released to the GOV.UK Design System.
Basic tests were performed on this online form on Thursday 7 November. The form was tested from start to finish with Pa11y. These tests were carried out by the Department for International Trade.
We are in the process of arranging a full WCAG 2.1 audit of this online form. We will then update this statement and aim to implement any changes by September 2020.
There are known issues with the GOV.UK Design System, as explained in the Design System accessibility guide. We will update our form with any accessibility fixes once they are released to the GOV.UK Design System.
This statement was prepared on 13 November 2019. It was last updated on 13 November 2019.


The charts below show the distribution of weights, heights, and ages in the 2014 Winter Olympic Games. Weights are shown in pounds, heights in inches, and ages in years. Note that women don't participate in Nordic Combined events, and weight data is unavailable for figure skaters and available for only a few curlers.


Adding a simple AI allows us to implement a single player game.
Press 1 for a single player game.
Press 2 for a double player game.
Press 0 to watch the computer play itself.
The AI consists of 2 components, a reaction time, and a prediction error. The better the human player is, the faster the reaction time and the lower the prediction error.
The AI recalculates its prediction every so often (based on its reaction time) and every time the ball changes direction when it bounces off a wall
Here, when you play against the computer you will see a red box indicating the exact point the ball will intercept and a yellow box indicating where the computer thinks it will be.


A form is used to solicit a user response
--- layout : 'default' css : 'index' title : 'UI Collections' type : 'Semantic' ---
UI collections are elements which contain other elements which often appear together.
A form is used to solicit a user response
A grid helps harmonize negative space in a layout
A menu organizes related links
| Name | Status |
|---|---|
| John | Approved |
| John | Unconfirmed |
| Sally | Denied |
A table collects related data into rows of content
Messages alert a user to something important.


inspect_type_links module
first.Foo and inspect_type_links.first.Foo should lead to the same class.
open() should lead to the Python builtin, for the local function we need to say inspect_type_links.open(). If it would be the other way around, there would be no simple way to link to builtins.
Modules
Classes
Functions
- def open()
- A function that opens cans.
Function documentation
def inspect_type_links. open()
A function that opens cans.
| Exceptions | |
|---|---|
| ValueError | If this is not a can, crosslinking to ValueError of course. |


--- layout: page title: About permalink: /about/ desc: Introduction・简介 ---
My name is Liang Gao. I'm a high school student from New York City, ever since I can remember I have loved technology. Please feel free to check-out my projects on GitHub. More information can be found through LinkedIn or send me an email.


Summer Paradise
<EMAIL_ADDRESS>(+230) 5794 7229
click here to connect with us on facebook.
Click here for taxi services.


@(message: String) @main("Scala.js", "A Scala to JavaScript compiler") {
Scala.js compiles Scala code to JavaScript, allowing you to write your Web application entirely in Scala!
Important notice! Scala.js is still experimental! Although this is a project of LAMP/EPFL for which we will continue to provide best-effort improvements and bug fixes, it is not supported by TypeSafe, and not part of any of their support contracts. You have been warned!
Outstanding features are:
The easiest way to get started is to fork the bootstrapping skeleton and follow the instructions in its readme.
Static types for the DOM API, by Haoyi Li
Static types for jQuery, brought to you by Sébastien Doeraene
Want to contribute to Scala.js? Check out the list of contributing opportunities.
Beginning a list of websites using Scala.js:
October 2013
July 2013
June 2013
April 2013