The JMX scandir example is an application that scans parts of a filesystem - e.g. a set of directories used by a number of lab machines when running tests - in order to clean up and optimize disk space by removing obsolete files - e.g. files that are leaked by the test suites running on those machines, like coredump files, or temporary files that might remain after a test crash. It could also serve as a basis for an application that would monitor disk usage and suggest removal of old big long-unaccessed files.
The JMX scandir example does not however implement the full fledged logic that such an application might have. It implements a subset of this logic which is sufficient to demonstrate common patterns and solutions used when implementing a monitoring and management interface for an application with JMX Technology.
This example is an advanced JMX example, which presents advanced JMX concepts. It is assumed that the reader is already familiar with the JMX API. Newcomers to JMX Technology are invited to have a look at the JMX API Overview, Tutorial and Examples before going any further.
Note: This example was developed using NetBeans 5.0 IDE. The instructions given in this document to build, run, and test the example assume that you have at your disposal:
- either NetBeans 5.0 IDE,
- or Apache Ant 1.6.5 and JUnit 3.8.1 or 3.8.2
(JUnit is only needed to run the example's unit tests).In order to build the example, you may need to copy the jmx-scandir directory to somewhere where you have write permissions.
In that case, you will need to update the nbjdk.home variable in the copied build.properties file located at the root of the copied project directory. Please make sure that this variable points to the JDK 6 home directory.If you wish to run the testsuite from within the NetBeans IDE you will also have to set the libs.junit.classpath variable in build.properties. The libs.junit.classpath variable should point to your junit.jar, version 3.8.1 or 3.8.2.
Table Of Contents:
Before reading further, you will need to generate the Java Documentation for the example's sources.
In the example root directory (where the build.xml
file is located) run the following command:
ant javadoc
Alternatively you can open the jmx-scandir project with the
NetBeans IDE and generate the Javadoc from its Build
menu.
If building the documentation fails, please make sure to read the note at the beginning of this document.
The JMX scandir example is built around the following MBeans:
DirectoryScannerMXBean
is an MBean that scans a
file system starting at a given root directory, and then looks
for files that match the given criteria. When such a file is
found, the DirectoryScannerMXBean
takes the
action for which it was configured: emit a notification,
and/or log a record
for this file,
and/or delete that file. The code that would actually
delete the file is commented out - so that nothing valuable is
lost if the example is run by mistake on the wrong set of
directories.DirectoryScannerMXBeans
are
created by the ScanManagerMXBean - see next item on the list, from its
configuration.
ScanManagerMXBean
lets you start, stop, and
schedule directory scans. The
ScanManagerMXBean
is a singleton
MBean: there can be at most one instance of such
an MBean registered in a given MBeanServer.
ScanManagerMXBean
to apply the
configuration again.ScanDirConfigMXBean
is created by the
ScanManagerMXBean
, when the
ScanManagerMXBean
is registered.
It is also possible to create an alternate
ScanDirConfigMXBean
, and to switch the
ScanDirConfigMXBean
to use one or the other
configuration.
ScanDirConfigMXBean
interface.
ResultLogManagerMXBean
is
responsible for logging these result records.
The ResultLogManagerMXBean
can be configured to log
such records to a flat file, or into a log held in memory, or
both. Both logs (file and memory) can be configured with a
maximum capacity.
ResultLogManagerMXBean
will let you interactively clear these result logs, change their
capacity, and decide where (memory or file) to log.
The memory log is useful in that its content can be interactively
returned by the ResultLogManagerMXBean
, while
the file log doesn't have this facility.ResultLogManagerMXBean
is a singleton
MBean created by the ScanManagerMXBean
which reads and writes its configuration from the
ScanDirConfigMXBean
.
An application main()
method is
provided in the ScanDirAgent class. The main()
simply registers
a ScanManagerMXBean
in the platform MBeanServer, and
then waits for someone to call close()
on the
ScanManagerMXBean
.
When the ScanManagerMXBean
is registered, it
will create a default ScanDirConfigMXBean
bound
to a default XML config file.
The application's default XML config file is determined as follows:
scandir.config.file
is
defined, the default application file will be the
file pointed to by this property. If that file
doesn't exist, it will be created when
ScanDirConfigMXBean.save()
is
invoked.
jmx-scandir.xml
,
located in the user's directory (as defined by
the System property user.home
).
If that file doesn't exists, it will be created when
ScanDirConfigMXBean.save()
is
invoked.
It is worth noting that this project is defined to run with the following properties:
-Djava.util.logging.config.file=logging.properties
-Dscandir.config.file=src/etc/testconfig.xmlWith
ScanDirAgent
defined as the project's
main class. Hence when you invoke from the NetBeans IDE
Run Project on the jmx-scandir project,
or Run file on the ScanDirAgent
, the
application starts with the test configuration provided in
src/etc/testconfig.xml
Once generated, the Javadoc of example classes can
be found starting from dist/javadoc/index.html
.
You can view the sources in the src
subdirectory.
This section discusses some common patterns and design choices that this example demonstrates, and some pitfalls that it avoids.
What is an MXBean? MXBeans made their appearance in J2SE 5.0 (Tiger), with the Management and Monitoring API of the JVM. However, Java SE 6 is the first Java SE release that contains a standard framework which makes it possible to create and register your own MXBeans.
MXBeans are a special kind of MBean, which once registered
in the MBeanServer, get automatically transformed into
OpenMBeans. From a developer point of view, nothing changes:
A Wombat MBean can become an MXBean simply by renaming
its WombatMBean
interface into WombatMXBean
.
Using MXBeans rather than plain Standard MBean brings its own advantages:
DirectoryScannerMXBean
and points
towards a ScanDirConfigMXBean
.
In short, MXBeans are so much easier to use that this example doesn't even have a single regular Standard MBean.
See also What is an MXBean? and Inter-MXBean References.
Hint: In order to simplify the task of coding a JMX programmatic client, we recommend that getters, setters, and operations defined in MBean and MXBean interfaces throwIOException
. Proxy objects will then be able to rethrow directly anyIOException
received from their underlying MBean Server connection, without wrapping them intoUndeclaredThrowableExceptions
.
Since the life cycle of the proxy object is not directly tied to the life cycle of the MBean it proxies, you may also want to have all methods in the MBean or MXBean interface throwInstanceNotFoundException
or more generallyJMException
.
As you must know if you've been studying JMX, MBeans are
named objects. The names of MBeans are represented by
instances of ObjectName
. An ObjectName is
composed of a domain, followed by a colon ':',
followed by a comma-separated list of key=value
pairs.
The ordering of the key=value pairs is not
important, but ObjectNames
are case sensitive
(both keys and values are case sensitive) and white space
is not ignored.
A common pitfall for JMX beginners is to inadvertently
insert white space after commas into an ObjectName,
and expect that two ObjectNames which differ only by such white
space will be considered identical. This is not the
case.
As an example, the ObjectName 'D:k1=v1, k2=v2, k3=v3
' has
three keys, which are 'k1
', ' k2
',
and ' k3
': beware
of the space in the name of the second and third
keys!
It is therefore a different ObjectName from
'D:k1=v1,k2=v2,k3=v3
' (the keys are now
'k1
', 'k2
', and
'k3
'), but the same ObjectName as
'D: k2=v2, k3=v3,k1=v1
', and yet different
from 'D:k2=v2, k3=v3, k1=v1
'!
In this example, we are following the rules for ObjectName suggested in the JMX Best Practices:
type=
key property. This property is different for every
object type in our domain.
name=
key.
type=
.
The ObjectNames of the ScanManagerMXBean and ResultLogManagerMXBean, which are both singleton MBeans, are
composed in this way.
type=
: the name=
key.
In this example, a key property list of the form
type=X,name=Y
is always enough to uniquely name
an MBean. Tools like jconsole are usually aware
of the semantics of the type=
key and
name=
key, and are therefore able to
display this form of name in a way that
is easier to read than other name forms.
The rules listed above are implemented by a couple
of static helper functions in the ScanManager class. See the code of the
makeSingletonName
and
makeMBeanName
methods.
One of the most common problems that needs to be solved
when designing a management interface with JMX is to
choose a representation for inter-MBean relationships.
Prior to Java 6, there were basically three possible
choices:
ObjectName
or
ObjectName[]
values. The ObjectNames
point to the MBeans which are related to that
object. For instance , GlassFish
defines MBeans which also use this pattern.
In Java 6, these three possibilities still remain, but
the new MXBean framework brings up an interesting
alternative. Instead of returning an ObjectName or
an ObjectName array, an MXBean can return a proxy
to its related MXBeans. This is how we have chosen to
implement our inter MBean relationships in this
example:
For instance the
ScanManagerMXBean
/DirectoryScannerMXBean
relationship and the
ScanManagerMXBean
/ScanDirConfigMXBean
relationships are implemented in this way.
The additional benefit, as compared to returning ObjectNames or using the RelationService is that interface type of the MBeans which are pointed to by the relationship becomes directly apparent. The method:
public Map<String,DirectoryScannerMXBean> getDirectoryScanners();makes it immediately obvious that the MBeans to which we point are DirectoryScannerMXBeans. It would have been much less obvious in prior versions of Java SE, were the returned type would have had to be
Map<String,ObjectName>
, or
even worse just Map
.
However, it must be clear that the behaviour will be quite different when an MXBean is returned as compared to when a simple bean is returned.
When an MXBean is returned, the remote client sees either
an ObjectName, if it is a generic client like jconsole, or
a proxy to a remote MXBean, if the client is working with the
MXBean interface. Invoking an operation on one of the
proxy returned by a method such as
getDirectoryScanners
will cause the
MBean to be invoked on the remote server side.
If getDirectoryScanners
were
defined as:
public Map<String,DirectoryScannerConfig> getDirectoryScanners();then invoking a method on one of the returned objects would have absolutely no effect on the remote server side - because the returned objects in this case would simply be a bunch of serialized data objects.
It is worth noting that although an MXBean interface can have getters and operations which return an MXBean interface, a regular standard MBean shouldn't have any getters or methods which return MBean interfaces or MXBean interfaces.
For more information see also Inter-MXBean References.
Sometimes, an MBean needs to have a reference to the MBeanServer in which it is registered, or needs to know with which ObjectName it has been registered.
Sometimes also, an MBean may need to perform some checks before being registered, or will need to carry out some actions right after it has been successfully registered in the MBeanServer.
Sometimes again, an MBean may need to perform some checks, or some cleaning actions, just before, or just after, it is unregistered.
When an MBean has such needs, the easiest solution
for it is to implement the MBeanRegistration
interface.
The MBeanRegistration
interface is a callback
interface which defines pre and post registration and
unregistration callbacks.
When an MBean implementing this interface is created
(with createMBean
) or registered
(with registerMBean
) in an MBeanServer,
the MBeanServer will call the preRegister
and postRegister
method implemented by
the MBean. The preRegister
method
has an MBeanServer
and ObjectName
parameter, which are passed by the MBeanServer to the
MBean. The MBean can store the reference it is being passed
in a private instance variable for later use.
Most of the MXBeans we have defined in this example
implement the MBeanRegistration
interface. The table
below show how our MBeans use this interface to control
their own names, make sanity checks, perform
initialization steps or cleanup actions.
| MBean Requirement | callback | use case example |
|---|---|---|
| get a reference to the MBeanServer | preRegister |
The ScanManagerMXBean needs a reference to the MBeanServer in order to create and register other MBeans, such as the ResultLogManagerMXBean, and the DirectoryScannerMXBeans. |
| reject registration if conditions are not met. | preRegister |
The ScanManagerMXBean will throw
an IllegalArgumentException in preRegister
if the ObjectName it is being passed is
illegal. Throwing an exception in
preRegister makes the registration fail.
|
| get my client-assigned MBean name | preRegister |
The ScanDirConfigMXBean propagates the
value of the name= property of
the ObjectName it is given into its
ScanManagerConfig bean.
|
| provide my own default ObjectName if none was given to the MBeanServer | preRegister |
The name that is returned by preRegister
is the ObjectName with which the MBean will be
eventually registered.
The ScanDirConfigMXBean is able to suggest
a value for its own ObjectName if none was
provided. Similarly, the ScanManagerMXBean
always returns its singleton ObjectName
defined by ScanManagerMXBean.SCAN_MANAGER_NAME.
|
| perform initialization steps | preRegister |
The ScanDirConfigMXBean uses preRegister
to initialize its internal ScanManagerConfig bean.
|
| perform initialization steps, once it is known that the registration was successful. | postRegister |
The postRegister method
can be used to implement
initialization steps that need to be done once it
is known that the registration was successful, or to
undo any action performed by preRegister once it
is known that registration was not successful.
The postRegister method has a Boolean parameter
which tells the MBean whether it was or wasn't
successfully registered in the MBeanServer.
The ScanManagerMXBean uses postRegister to create
and register other MBeans, such as the
ResultLogManagerMXBean and the default
ScanDirConfigMXBean.
Note that postRegister is not expected to throw any
exception. If an exception needs to be thrown, it should
be thrown in preRegister .
|
| check whether the MBean can be deregistered | preDeregister |
The ScanManagerMXBean uses this method to verify
that its state allows it to be deregistered.
In particular, it will refuse to be deregistered
if it is in the RUNNING or SCHEDULED state.
If preDeregister throws an exception, the unregisterMBean
call will fail and the MBean will remain registered in
the MBeanServer.
Take particular care when implementing business logic
in this method: if the logic you implement has an
unfortunate bug which makes it always throw an
exception, you will never be able to unregister
that MBean.
|
| clean up resources, refusing to be deregistered if it fails | preDeregister |
The ScanManagerMXBean uses this method to unregister all the other MBeans it has created and registered in the MBeanServer. This includes the ResultLogManagerMXBean, the ScanDirConfigMXBeans it has created, and the DirectoryScannerMXBeans it has created when applying its configuration. |
| clean up resources which need to be released in a best-effort way, when it is known that the MBean is no longer registered. | postDeregister |
postDeregister is only called if the MBean was succesfully
unregistered.
The ScanManagerMXBean uses this method to cancel
its internal java.util.Timer.
|
A singleton MBean is an MBean which can only have one
instance registered in a given MBeanServer.
A singleton MBean usually has a well-known name,
which can be defined as a constant. In that case,
clients no longer need to call new ObjectName(...)
and catch the declared MalformedObjectNameException
.
There are already quite a few examples of singleton MBeans in the java.lang.management API. The ThreadingMXBean, ClassLoadingMXBean, RuntimeMXBean, etc. are all singleton MBeans.
In this example, we have two singleton MBeans:
The ScanManagerMXBean
and the
ResultLogManagerMXBean
. But in fact,
the only real singleton MBean is the
ScanManagerMXBean
. The
ResultLogManagerMXBean
just happens to
be a singleton MBean because it has a 1-1 relationship
with the ScanManagerMXBean
.
The ScanManagerMXBean
implements the
singleton MBean pattern in this way:
ScanManagerMXBean
name has a single
key property: type=ScanManagerMXBean
.SCAN_MANAGER_NAME
in the ScanManager
classScanManagerMXBean
enforces its status of
singleton MBean. It will refuse to be registered
with a name other than
the SCAN_MANAGER_NAME
. You can therefore depend on
the fact that the ScanManagerMXBean
will always
be registered with its singleton SCAN_MANAGER_NAME
(see preRegister
)
ScanManagerMXBean
: if you pass null,
then the ScanManager
will be registered with
its singleton SCAN_MANAGER_NAME
(see preRegister
).
ScanManager
class has a no-arg static
register
method that will register
the singleton instance in the Platform MBeanServer.
This static register
method returns
a proxy to the registered singleton.
ScanManager
class has also a static
register
method that will create
a singleton instance in a (possibly remote)
MBeanServerConnection - using
createMBean
.
This static register
method
also returns a proxy to the registered singleton.
On the other hand, the ResultLogManagerMXBean
has a much more relaxed implementation of the pattern:
It simply provides its own singleton name if it is
registered with a null ObjectName, but will not enforce
the use of that name.
Note that all singleton MBean names in this example
are created using the ScanManager.makeSingletonName
method, which implements the pattern for ObjectNames suggested
in the JMX Best Practices.
A common task that many JMX applications have is to manage the life cycle of MBeans registered in the MBeanServer.
In this example, we have decided to follow a simple pattern:
ScanManagerMXBean
will then
in turn register any other MBean that the
application might need:
ResultLogManagerMXBean
ScanDirConfigMXBean
which loads the initial configuration
DirectoryScannerMXBeans
as
needed when the configuration is applied
ScanDirConfigMXBean
, to
which you can later switch in order
to apply a new alternate configuration.
ScanManagerMXBean
will unregister
any DirectoryScannerMXBeans
it has
previously registered, and will re-create
brand new DirectoryScannerMXBeans
from the applied configuration.
ScanManagerMXBean
,
it does all the cleanup for you, by unregistering
all the MBeans that it has created during the
course of the application.
The ScanManagerMXBean
makes use of its
MBeanRegistration
interface in order
to register the other MBeans it needs (see the
ScanManager.postRegister
method) and to unregister
every MBean it has created (see the ScanManager.preDeregister
method).
You will note that the ScanManagerMXBean
will only allow itself to be deregistered if it can be
closed - that is if there's no other action in
progress.
This is to make sure that the deregistration of
dependent MBeans will work smoothly.
The deregistration of related MBeans will happen
in the ScanManager.preDeregister
method.
If one of these MBeans could not be deregistered,
then the ScanManagerMXBean
will throw
an exception, refusing to be deregistered.
This leaves you a chance to try to deregister it
again later. Since the ScanManagerMXBean
has switched its state to CLOSED before starting
to unregister its dependent MBeans, it will refuse
any further actions, ensuring that e.g. nobody
can try to start it or schedule it while it
is in that partially-deregistered state.
Handling the LifeCycle of all the application's MBeans in a single MBean is usually a good design pattern, especially if the application is a module which is intended to share a JVM - or an MBeanServer - with other modules.
This is specially useful if the application needs to
be loaded and unloaded on demand: in that
case, simply registering or unregistering the top level
MBean (in our example the ScanManagerMXBean
) does
the trick.
In order to emit notifications, an MBean must be
an instance of NotificationEmitter
.
The NotificationEmitter
interface defines methods
that the MBeanServer will call on the MBean in order
to register NotificationListeners
with the MBean.
It is worth noting that the MBean may not be
invoked each time a JMX client wants to register
a listener. For instance, the RMIConnectorServer
registers only once a single listener with each MBean
which is a NotificationEmitter
.
In that specific case, the listener may even be registered
with the MBean before any client has actually subscribed
for notifications from that particular MBean.
An MBean can therefore make no assumption about which client or how many clients have registered for notifications.
It is also worth noting that the logic of the
methods defined in NotificationEmitter
would not
be trivial to implement from scratch. Fortunately
the JMX API defines a helper class, called
NotificationBroadcasterSupport
, which
provides an implementation for these methods.
There are actually three ways for an MBean to
implement NotificationEmitter
, of which only two
are recommended.
This is the simplest way of coding an MBean which
is a NotificationEmitter
:
Simply extend NotificationBroadcasterSupport
,
then override its getNotificationInfo
method
which returns the MBeanNotificationInfo[]
array
that should be included in your MBean's MBeanInfo
and that's it.

In our example, both the ScanDirConfigMXBean and ResultLogManagerMXBean extend
NotificationBroadcasterSupport
in order
to send notifications.
There may be cases however where delegating to a
wrapped NotificationBroadcasterSupport
object may be preferred to extending
NotificationBroadcasterSupport
.
For instance, if your MBeans already derive from
some base class, extending NotificationBroadcasterSupport
might not be an option.
Similarly, if you do not want to have the inherited
public void sendNotification(Notification notification)
method appear in the Javadoc of the concrete class of your
MBean, you may want to consider using the delegation
pattern instead of extending
NotificationBroadcasterSupport
In our example both the ScanManagerMXBean and the DirectoryScannerMXBean use the delegation
pattern rather than extending
NotificationBroadcasterSupport
.
In the end, choosing between one or the other method
is more a question of taste, although the delegation
pattern could be considered more flexible since it
doesn't require extending any given superclass.
It may be also worth noting that some tools like
the JMX Module of NetBeans IDE, will be able to
generate for you all the code that delegates to a
wrapped NotificationBroadcasterSupport
.
This is the last possibility for an MBean that
needs to send notifications: simply implement
NotificationEmitter
from scratch. This is highly
discouraged since that logic is not trivial, and
already provided by
NotificationBroadcasterSupport
anyway.
One thing you must keep in mind when sending notifications is not to send them from within a synchronized block, or while holding a lock on some resource.
Indeed, what happens when you send a notification
may vary greatly depending on whether the client
which has registered for notifications has done
so through a JMXConnector
(like the
JMXRMIConnector
)
or through a direct reference to the MBeanServer
(by calling
MBeanServer.addNotificationListener
).
In this latter case, the listener will be invoked
synchronously in the same thread that your MBean is
using to send its notification. If by misfortune, the
code of that listener now re-enters your MBean through a
call that flows through a JMXConnector, a deadlock
could occur. It is therefore very important to release
any lock you may have before calling
sendNotification
.
An easy way to do that is demonstrated in the
ScanManager
class. The ScanManager
has an internal private queue of pending notifications.
When a notification needs to be sent (e.g. because the
ScanManager state is being switched), the notification
is simply prepared and put into the pending notification
queue.
The notification queue is then processed later on,
at the end of the method, when the processing is finally
completed and all the locks have been released.
At this point the notification queue might already
have been emptied by another thread - in which case
the pending notifications will have already been
removed from the queue. Which thread actually gets
to send the notifications is of no importance. The
important point is that all the locks detained by
your MBean code in that thread were released before
the notification was sent.
In our example the ScanManager
class
ensures this by:
sendNotification
in its private sendQueuedNotifications
method.
sendQueuedNotifications
when all locks have been released.
sendQueuedNotifications
from within
a synchronized block.Another common best practice when you want to improve interoperability is to use directly the Notification base classes provided in the JMXTM API. Do not create your own subclasses of these standard classes.
Indeed, if you code your own subclass, a generic client, like jconsole, will not be able to receive that notification unless it has that custom subclass in its classpath.
If you want your application to be interoperable, it is therefore preferable not to subclass any of the standard Notification classes. You can define your own Notification type string, and if you need to send additional data, you can put a CompositeData, or a HashMap of serializable standard types in the Notification's user data fields.
In this example, we are using directly the standard notification classes:
AttributeChangeNotification
to notify
changes in their State
attribute.
Notification
class directly in order to notify whenever
it finds a matching file.
Notification
class with a new
com.sun.jmx.examples.scandir.filematch
type.
Notification
class.
Careful readers will have noted that the ScanManagerMXBean and the DirectoryScannerMXBean both use the
AttributeChangeNotification
class
to notify about their state change, whereas the
ScanDirConfigMXBean uses the base
Notification
class.
In fact, this is because the semantics of these notifications is not exactly the same - although both denote a state change:
In the case of ScanManagerMXBean
and DirectoryScannerMXBean
, the
notification which is emitted is more about a
state transition, from one state to another.
For instance, going from RUNNING
to STOPPED
, or from
SCHEDULED
to STOPPED
.
In that case, the
AttributeChangeNotification
was
more appropriate because it made it possible
to send the previous and the new value of the
state attribute, thus reflecting the whole
state transition.
In the case of the ScanDirConfigMXBean
however, what is of interest is the state in
which the MBean has arrived. Using the base
Notification
class with three different
notification type strings -
com.sun.jmx.examples.scandir.config.loaded
,
com.sun.jmx.examples.scandir.config.modified
,
and
com.sun.jmx.examples.scandir.config.saved
-
was therefore closer to what we wanted to model.
A common practice when designing a management application is to have an MBean, or a set of MBeans, dedicated to configuration. Separating configuration from control and monitoring allows more appropriate logic, and often simplifies the design and implementation of the management interface.
In our example, the ScanDirConfigMXBean is dedicated to the application configuration.
The ScanDirConfigMXBean
will let you interactively
modify, save, or load the application configuration. The modifications
will not be taken into account until it is applied, by invoking
applyConfiguration
on the ScanManagerMXBean.
It is also possible to create many configurations, by creating as
many ScanDirConfigMXBean
s, and then to choose and apply
one of these configurations by calling
ScanManagerMXBean.setConfigurationMBean
and then
ScanManagerMXBean.applyConfiguration
.
In this way, all configurations aspects are gathered and concentrated
inside the ScanDirConfigMXBean
instead of being scattered
throughout all the MBeans that compose the application.
In order to save and store the application configuration data, the
ScanDirConfigMXBean
uses a set of XML serializable Java beans
defined in the com.sun.jmx.examples.scandir.config package. These beans are very
simple Java beans which have been lightly annotated for XML binding.
It is worth noting that these same beans can also be handled by the MXBean framework (our beans don't contain recursive data structures) and can therefore be used directly as attributes and parameters of MXBeans, without needing to be Java-serializable (the MXBean framework transform them in CompositeData objects - which are serializable).
The same ScanManagerConfig bean that we use to read from and write to the
XML configuration file is thus also used as attribute of the ScanDirConfigMXBean. It is transformed into a CompositeData
by the MXBean framework, and can be easily introspected with
jconsole.
A question often asked by newcomers to JMX technology is whether the MBeanServer is thread-safe. Well, the MBeanServer is thread safe, but it doesn't put any locks on the MBeans it contains. The MBeans can be concurrently accessed by multiple threads, and must therefore take care of their own thread safety.
In this example, we have been using two methods to ensure thread safety for our MBeans: synchronized blocks, and semaphores.
Using synchronized blocks is probably the most common and easiest way to implement thread safety in Java. When dealing with MBeans though, here are a couple of rules to keep in mind:
Another means of implementing thread-safe code is to use semaphores.
The ScanManagerMXBean uses a semaphore called
sequencer
to ensure
that critical code sections are not executed concurrently. In this
MBean, we use Semaphore.tryAcquire
to lock the sequencer
semaphore before entering the critical section. If the
Semaphore.tryAcquire
returns true then we enter the critical
section. If it returns false, we throw an IllegalStateException, stating
that we couldn't acquire the lock. The code looks like this:
if (!sequencer.tryAcquire()) throw new IllegalStateException("resource locked"); try { // critical code here ... } finally { // Always use try/finally to ensure that the semaphore // will be released, even if exceptions or errors are raised! sequencer.release(); }
Using Semaphore.tryAcquire
and throwing an exception if
the semaphore is already locked makes it safer to call other MBeans
from within the critical section: in potential deadlock situations
the calling code will get the IllegalStateException
instead of being blocked on the deadlocked lock.
It is worth noting that each of these techniques has its own advantages and disadvantages - which can make one of them more or less appropriate depending on the inner logic of the MBean you're implementing.
Careful readers will also have noted that we used
IllegalStateException
directly, instead of defining
our own subclass of RuntimeException, which could have had a more
precise semantics. If you define a new exception for your JMX application,
you must keep in mind that your client will need to have the class
of your exception in its classpath to get that exception.
Otherwise your client will get a completely different exception, indicating a
deserialization issue.
Implementing code that needs to wait for notifications is sometimes difficult. Because notifications are asynchronous, doing something like:
// register a notification listener ... // start a management action ... // wait for a notification ... // do something based on whether the expected notification // is received ...is not always trivial. However, there's a very easy way to do that: use a blocking queue of notifications.
final BlockingQueue<Notification> notifQueue = new LinkedBlockingQueue<Notification>(); final NotificationListener listener = new NotificationListener() { public void handleNotification(Notification notification, Object handback) { try { // Just put the received notification in the queue. // It will be consumed later on. // notifQueue.put(notification); } catch (InterruptedException ex) { // OK } } }; // register the listener - possibly also as a JMXConnectionNotification // listener to get Notification Lost notification ... // start management action ... // wait for notification while (expected notif not received and delay not expired) { Notification n = notifQueue.poll(3,TimeUnit.SECONDS); // if expected notif, do something ... } // if expected notification not received do something else. ....
You will note that this is a technique we've been using in the ScanDirAgent class and in the example unit tests.
We have seen that MXBeans will let you return proxy references to other MXBeans. But should that MXBean hold a direct reference to the MXBeans it relates to, or would it be better for it to hold only a proxy?
As a general rule it is better when an MBean reference is only held by the MBeanServer. It is a better design to hold a reference to a proxy, rather than to hold a hard reference to an MBean. However there are two cases when holding a hard reference might be preferred:
In our example, the ScanManagerMXBean holds only proxy references to the ScanDirConfigMXBean and the DirectoryScannerMXBeans.
However it holds a direct reference to the ResultLogManager. This makes it possible to pass a direct
reference to the DirectoryScannerMXBeans
,
which can then log their results
more efficiently, and would also make it possible to remove
the log
method from the ResultLogManagerMXBean interface - leaving it in the
ResultLogManager
class (possibly as a package method)
should we wish to do so.
The ScanDirAgent is the Agent class for the scandir application.
This class contains the main
method to start a standalone
scandir application.
The main
method simply registers a ScanManagerMXBean in the platform MBeanServer, and then waits
for someone to call ScanManagerMXBean.close
.
When the ScanManagerMXBean
state is switched to
ScanManagerMXBean.ScanState.CLOSED
, the
ScanManagerMXBean
is unregistered, and the application
terminates (i.e. the main thread completes).
Standalone JMX applications usually have an Agent class that contain
their main
method, which performs all the MBean
registration steps.
However, it is usually not a bad idea if that class can
be easily turned into an MBean. Indeed, this will make your
application easier to integrate in an environment where it would
no longer be standalone and would no longer control the implementation
of main
. In our example the Agent
class could be easily turned into an MBean, exposing its three
init
, waitForClose
and cleanup
method. However we didn't go as far as turning it into an MBean since
the application can be already easily started by registering an instance
of ScanManagerMXBean.
The ScanDirClient is an example class that shows how a
programmatic client can connect to a secured scandir application.
This class contains a main
method which creates and
configures a JMXConnector
client to connect with
a secured scandir daemon. This class will not work with
the default unsecured agent since it requires mutual authentication.
How to secure a JMX scandir application and run
the secure ScanDirClient
is discussed later in this document.
The ScanDirClient
is not really part of the
application - and is given here only for the sake of
the example.
Make sure that you have access to junit.jar (either 3.8.1 or 3.8.2).
Make sure also that you have junit.jar in your
CLASSPATH
.
Then in the example root directory (where the build.xml
file is located) run the following command:
ant test -Dlibs.junit.classpath=path to junit jar (either 3.8.1 or 3.8.2)
Alternatively you can open the jmx-scandir project with the
NetBeans IDE and test the jmx-scandir project from the
Run
menu.
In the example root directory (where the build.xml
file is located) run the following commands:
ant jar ant run-single -Drun.class=com.sun.jmx.examples.scandir.ScanDirAgent -Djavac.includes=srcor simply
ant run
This will run the example using the configuration file provided in the src/etc directory.
Alternatively you can open the jmx-scandir project with the
NetBeans IDE. You can run the example by
selecting the ScanDirAgent
file
and run it with Run File
in the
Run
menu or simply
set the jmx-scandir project as main project and
select Run Main Project
from the
main menu. Both targets will use the configuration
file provided in the src/etc directory.
When the application is started, you can connect to it with jconsole.
Note: You can also run the scandir application directly from thejava
command line. Make sure to build the project jar first.
On Unix systems:ant jar java -Djava.util.logging.config.file=logging.properties \ -Dscandir.config.file=src/etc/testconfig.xml \ -jar dist/jmx-scandir.jar
On Windows systems:
ant jar
java -Djava.util.logging.config.file=logging.properties -Dscandir.config.file=src\etc\testconfig.xml -jar dist\jmx-scandir.jar
Run the example as explained in the previous section, so
that it uses the provided src/etc/testconfig.xml
configuration file. Then start
jconsole. In the connection window choose the process that runs
com.sun.jmx.examples.scandir.ScanDirAgent
or
jmx-scandir.jar
.
Open the MBeans tab, and look for the
ScanDirConfigMXBean
.
Click on its Attributes
node and double click on its
Configuration
attribute, to look at
the loaded configuration - values in bold can
be expanded by a double-click.
Now go to the ScanManagerMXBean
, click on
its Notifications
node, and subscribe
for notifications. Then click on the
Operations
node and invoke the
start()
operation:
You can see that the notifications counter was incremented by three: you have just scheduled, run, and completed a batch of directory scans.
Now go to the ResultLogManagerMXBean
,
click on its Attributes
node, and
expand its MemoryLog
attribute:
You can see that the directory scan results have been logged.
To make the application terminate go back to the
ScanManagerMXBean
and invoke
close()
. The ScanDirAgent
will receive the notification, step out of
the application main thread, and the application
will terminate.
This is of course a very limited scenario. Feel free
to improvise with all the features of the example, creating
a new configuration -
ScanManagerMXBean.createOtherConfigurationMBean
-
adding multiple directory scanners to that configuration -
ScanDirConfigMXBean.addDirectoryScanner
-
then switching the ScanManagerMXBean
current
configuration by changing the value of the ConfigurationMBean
attribute - ScanManagerMXBean.setConfigurationMBean
- then applying the new configuration -
ScanManagerMXBean.applyConfiguration(true)
-
then scheduling repeated directory scans every 10 seconds -
ScanManagerMXBean.schedule(0,10000)
-
subscribing for notifications, etc...
In this section, we will see how to configure and
start the scandir example so that the JVM agent
is bootstrapped with a secure JMXConnectorServer. Indeed, until
now we have only used the insecure local connection,
which can only be used as long as both the client and
the server run on the same machine. This section will
explain how to start the ScanDirAgent
so
that a real secure RMIConnectorServer is started at bootstrap.
To achieve this we will: provide our own management.properties, create our own password and access files, provide a keystore and truststore, start the ScanDirAgent with the appropriate system properties.
The easiest way to configure the
JVM Agent for Secure Remote
Connection is to use your own management.properties file.
In this example, we have copied the default
$JRE/lib/management/management.properties
file to the example's src/etc
directory and
modified it in this way:
# For setting the JMX RMI agent port use the following line com.sun.management.jmxremote.port=4545
# For RMI monitoring with SSL client authentication use the following line com.sun.management.jmxremote.ssl.need.client.auth=true
# For using an SSL/TLS protected RMI Registry use the following line com.sun.management.jmxremote.registry.ssl=true
# For a non-default password file location use the following line com.sun.management.jmxremote.password.file=src/etc/password.properties
# For a non-default password file location use the following line com.sun.management.jmxremote.access.file=src/etc/access.properties
You will note that we haven't provided any value
for the other security properties, like
com.sun.management.jmxremote.authenticate=true
,
because these properties already default to a value
which enables security by default.
Note however that protecting the RMI Registry with SSL
improves the application security, but only as long as
mutual authentication is also switched on. Otherwise, just
anybody would be able to connect to the registry and
get the RMIServer stub.
We do recommend that you use the most secure configuration when you deploy a JMX agent - which means switching on SSL protection for the RMI registry and requiring mutual authentication, as we show in this example.
We will use the com.sun.management.config.file
system property to pass our management.properties
file to the ScanDirAgent
.
As explained above, we have created our own password file and access file for access control and authorization.
In the password file, we have defined two logins: guest and admin. The password for guest is guestpasswd and the password for admin is adminpasswd.
In the access file, we have mapped these two logins to access rights: the admin login has read-write access, while the guest login only has read-only.
Before starting the ScanDirAgent
, you will
need to restrict access permission to the password file,
in such a way that nobody but you can read it. Otherwise, the
JVM Agent will refuse to start the JMXConnectorServer, as it will
fear that security can be compromised if other parties can
have read access to the password file. How to restrict
read access to the password file is explained in detail
here.
As we have seen above, the location of our access and password files is configured in our own management.properties file.
Using SSL with mutual authentication means that both client and server will need a keystore and a truststore to store their own certificates, and the certificates of the parties they trust. Usually, client and server will have their own keystore and truststore.
For the sake of simplicity - and to get you started without the tedious necessity of creating your own keystore and truststore, we are providing a dummy keystore and truststore, containing a certificate self-signed by duke. The password for our keystore is password, and the password for our truststore is trustword. We suggest that you first get the example running with the keystore and truststore we are providing before attempting to use your own keystore and truststore.
A secure application will obviously need to use its own keystore and truststore, and should not rely on the keystore and truststore we are providing here!
How to create your own keystore and truststore, is explained
in here.
As shown later,
we will need to use system properties to pass our truststore
and keystore to the ScanDirAgent
.
To start a secure scandir agent, go to the scandir example root directory and type the following command:
On Unix Systems:
ant jar java \ -Djava.util.logging.config.file=logging.properties \ -Djavax.net.ssl.keyStore=keystore \ -Djavax.net.ssl.keyStorePassword=password \ -Djavax.net.ssl.trustStore=truststore \ -Djavax.net.ssl.trustStorePassword=trustword \ -Dcom.sun.management.config.file=src/etc/management.properties \ -Dscandir.config.file=src/etc/testconfig.xml \ -jar dist/jmx-scandir.jar
On Windows Systems:
ant jar
java
-Djava.util.logging.config.file=logging.properties
-Djavax.net.ssl.keyStore=keystore
-Djavax.net.ssl.keyStorePassword=password
-Djavax.net.ssl.trustStore=truststore
-Djavax.net.ssl.trustStorePassword=trustword
-Dcom.sun.management.config.file=src\etc\management.properties
-Dscandir.config.file=src\etc\testconfig.xml
-jar dist\jmx-scandir.jar
If you start jconsole now, you will see that you are still able to connect to the agent using the local connection. However, if you try to connect through the remote connector, using localhost:4545, the connection will fail, even if you provide a correct login/password pair. Indeed, since the JMXConnectorServer is now protected with SSL, jconsole must also be configured with the appropriate SSL parameters so that it can authenticate the server and get authenticated by the server too as the SSL configuration of the server requires mutual authentication.
The next section will discuss how to connect to the secure agent.
We will now see how to connect to the secure agent, using jconsole, and using a programmatic client.
The only special thing you need to do in order to be able to connect to your secure agent with jconsole, is to give it a keystore (containing its client certificate) and a truststore (containing the certificates of the servers it can trust). In our example, we use the same keystore/truststore pair on the client and server side - but this is not what a real application would do. Indeed a real application would have different certificates for the client and the server, and thus use different keystores (and probably truststores). More information on SSL authentication can be obtained from the JavaTM Secure Socket Extension (JSSE) Reference Guide.
To start jconsole with our provided keystore and truststore, go to the scandir example root directory and type in the following command:
jconsole
-J-Djava.util.logging.config.file=logging.properties
-J-Djavax.net.ssl.keyStore=keystore
-J-Djavax.net.ssl.keyStorePassword=password
-J-Djavax.net.ssl.trustStore=truststore
-J-Djavax.net.ssl.trustStorePassword=trustword
The -J-Djava.util.logging.config.file=logging.properties
flag is not mandatory, but passing a logging.properties
may help you debug connection problems if anything goes wrong.
In jconsole connection window, choose to connect to a remote process, using the address localhost:4545 and the guest login:
You will see that the agent will let view all the MBeans and their attributes, but will reject any attribute modification or remote method invocation.
Note: if jconsole fails to connect and show
you this screen
you have probably misspelled some of the properties on jconsole
command line, or you didn't start jconsole from the
scandir example root directory where our truststore
and keystore
files are located. This article - Troubleshooting connection problems in JConsole - may help
you figure out what is going wrong.
In this section we will show the steps involved in writing a programmatic client that will connect to our secure agent.
The ScanDirClient is an example class that shows how a
programmatic client can connect to a secured scandir application.
This class contains a main
method which creates and
configures a JMXConnector
client to connect with
the secured scandir agent.
The secure client differs only from a non secure client in so far as it needs to use SSL RMI Factories and credentials to connect to the secure agent. The steps required mainly involve:
// Create an environment map to hold connection properties // like credentials etc... We will later pass this map // to the JMX Connector. // System.out.println("\nInitialize the environment map"); final Map<String,Object> env = new HashMap<String,Object>();
// Provide the credentials required by the server // to successfully perform user authentication // final String[] credentials = new String[] { "guest" , "guestpasswd" }; env.put("jmx.remote.credentials", credentials);
SslRMIClientSocketFactory
to interact
with the secure RMI Registry:
// Provide the SSL/TLS-based RMI Client Socket Factory required // by the JNDI/RMI Registry Service Provider to communicate with // the SSL/TLS-protected RMI Registry // env.put("com.sun.jndi.rmi.factory.socket", new SslRMIClientSocketFactory());
// Create the RMI connector client and // connect it to the secure RMI connector server. // args[0] is the server's host - localhost // args[1] is the secure server port - 4545 // System.out.println("\nCreate the RMI connector client and " + "connect it to the RMI connector server"); final JMXServiceURL url = new JMXServiceURL( "service:jmx:rmi:///jndi/rmi://"+args[0]+":"+args[1]+ "/jmxrmi"); final JMXConnector jmxc = JMXConnectorFactory.connect(url, env);
For this to work, we also need to start the ScanDirClient
with the appropriate system properties that will point to our
keystore
and truststore
. To start the secure
client, go to the scandir example root directory and type
the following command:
ant jar
java
-Djava.util.logging.config.file=logging.properties
-Djavax.net.ssl.keyStore=keystore
-Djavax.net.ssl.keyStorePassword=password
-Djavax.net.ssl.trustStore=truststore
-Djavax.net.ssl.trustStorePassword=trustword
-classpath dist/jmx-scandir.jar
com.sun.jmx.examples.scandir.ScanDirClient localhost 4545
You should be seeing this trace:
Initialize the environment map Create the RMI connector client and connect it to the RMI connector server Connecting to: service:jmx:rmi:///jndi/rmi://localhost:4545/jmxrmi Get the MBeanServerConnection Get ScanDirConfigMXBean from ScanManagerMXBean Get 'Configuration' attribute on ScanDirConfigMXBean Configuration: <ScanManager xmlns="jmx:com.sun.jmx.examples.scandir.config" name="testconfig"> <InitialResultLogConfig> <LogFileMaxRecords>2048</LogFileMaxRecords> <LogFileName>build/scandir.log</LogFileName> <MemoryMaxRecords>128</MemoryMaxRecords> </InitialResultLogConfig> <DirectoryScannerList> <DirectoryScanner name="scan-build"> <Actions>NOTIFY LOGRESULT</Actions> <ExcludeFiles/> <IncludeFiles> <FileFilter> <FilePattern>.*\.class</FilePattern> <SizeExceedsMaxBytes>4096</SizeExceedsMaxBytes> </FileFilter> </IncludeFiles> <RootDirectory>build</RootDirectory> </DirectoryScanner> </DirectoryScannerList> </ScanManager> Invoke 'close' on ScanManagerMXBean Got expected security exception: java.lang.SecurityException: Access denied! Invalid access level for requested MBeanServer operation. Close the connection to the server Bye! Bye! |
If the ScanDirClient
fails to connect with
the secure agent, then this article - Troubleshooting connection problems in JConsole - may help
you figure out what is going wrong. Indeed the connection steps
performed by the ScanDirClient
are very similar to
those performed by jconsole
, and the problems you
could encounter are identical. Just remember that
jconsole
needs the extra -J
flag to pass
system properties to the VM, which is not needed with regular
java
launcher invocations.
In this document, we have presented an advanced JMX example, and shown how to run a secure JMX agent in a production environment. We have also shown how to connect to such a secure agent with both jconsole and a programmatic client. We have also discuss various JMX design-patterns and best practices. Readers who would wish to learn more about JMX, and Monitoring and Management of the JVM, are invited to follow the links given in reference below.


🔐 0xeefe
easy encryption for everyone
For instructions, head over to
GitHub
🔐 encryption key:
🔐 confirm encryption key (repeat):
Encryption keys don't match.
save encrypted message
Done! Check your downloads!


Removing Trump would blow a hole in the 'center of our national politics' taking 'years' to heal, Lowry says
by Nick GivasRemoving President Trump from office would "blow a hole" in the legitimacy of the U.S. government, National Review editor Rich Lowry said Sunday.
Lowry cited an NPR/Marist poll on NBC News' "Meet the Press," showing 52 percent of respondents favoring an impeachment inquiry. He said the number was deceiving, however, because 58 percent would rather see the issue resolved with an election in 2020, instead of leaving it in the hands of Congress. "That’s a very strong suit for Republicans," he said.
Lowry added, "I just don’t think removing him would actually, at the end of the day, be good for the country.
DONNA BRAZILE ON IMPEACHMENT VOTE: 'THE PRESIDENT DESERVES DUE PROCESS'
Lowry also said it's unlikely that many Republican senators will join Democrats and turn against Trump because they'd know how devastating a party split could be to his 2020 reelection chances if he were to survive a Senate vote.
"[Sen. Mitt] Romney and a couple [of] others maybe [will turn against Trump] -- but the difference between the fourth Republican senator and the 30th Republican senator would not be huge," he said.
"But, for that to happen I think it would take an earth-shattering event," Lowry continued. "And, Republicans are also very cognizant of the fact that this would split the party desperately and probably, totally ruin his chances in 2020."
House Speaker Nancy Pelosi, D-Calif., held a vote on the impeachment inquiry's "ground rules" Thursday, which passed by a largely party-line vote of 232-196. Two Democrats voted with the GOP. Trump called it "The Greatest Witch Hunt In American History!" on Twitter, while the White House viewed it as an abuse of due process.
TOP DEM STRUGGLES TO EXPLAIN WHY CLINTON IMPEACHMENT BAD, TRUMP IMPEACHMENT GOOD
CLICK HERE FOR THE FOX NEWS APP
"With today’s vote, Speaker Pelosi and the Democrats have done nothing more than enshrine unacceptable violations of due process into House rules," White House press secretary Stephanie Grisham said in a statement.
Fox News' Brooke Singman contributed to this article


Gareth Southgate praises two England players offering insight into Euro 2020 selection
England made it two wins from two in the international break to complete the last of their qualification fixtures, with two players particularly impressing their manager
by Darren Wells, https://www.mirror.co.uk/authors/darren-wells/Gareth Southgate reserved special praise for Alex Oxlade-Chamberlain and Harry Winks after England concluded their Euro 2020 qualifying campaign in Kosovo.
The Three Lions won their final Group A match in comfortable fashion, having already qualified after thrashing Montenegro on Thursday.
Southgate deployed Winks in a more advanced role in the midfield three against Kosovo, and he combined with his midfield colleague for the opener.
Oxlade-Chamberlain spotted Winks's run and picked him out, as the Tottenham star's first touch took him into the box before he slotted the ball in the corner.
When asked what positives he had taken from England's two qualifiers against Kosovo and Montenegro, Southgate said: "I think the performances of those two players.
"For Alex at his stage of playing, the second start was physically difficult, but he's been a real plus with the power of his running, and the attacking threat he gives us from that area.
"Harry Winks I thought was excellent both games. Really took the ball well at moments tonight where we needed calming.
"His ability to receive the ball under pressure and keep the calmness in possession really settled the team."
England ran out 4-0 winners over Kosovo in a scoreline which perhaps flattered Southgate's men.
Winks's first half opener had put them in command, but they didn't add their second until almost 10 minutes from time.
Harry Kane finished off a deflected Raheem Sterling cross to double their advantage, before Marcus Rashford and Mason Mount both scored late on.
Despite England's ruthlessness going forward, they had been tested several times on the counter attack, and it was another far from convincing defensive display.
Questioned on whether he had any concerns after their last competitive fixture before next summer's tournament, Southgate added: "I think the set plays in particular are something we need to go away and look at.
"There have been too many people free in the box and chances given away. We're always looking to improve, we know there's a bit of work to do.
"But we can't fault the players through this qualifying campaign, they've been absolutely ruthless."


Recommended More 28:45 Cancer 50 pst Measles Outbreak Change Minds Not Vaccinating? Mike Kowalski 28:45 Cancer 50 pst Measles Outbreak Change Minds Not Vaccinating? Mike Kowalski 28:45 Cancer 50 pst Measles Outbreak Change Minds Not Vaccinating? Mike Kowalski 28:45 Cancer 50 pst Measles Outbreak Change Minds Not Vaccinating? Mike Kowalski
Recent More 28:45 surgery 50 pst Measles Outbreak Change Minds Not Vaccinating? Mike Kowalski 28:45 surgery 50 pst Measles Outbreak Change Minds Not Vaccinating? Mike Kowalski 28:45 surgery 50 pst Measles Outbreak Change Minds Not Vaccinating? Mike Kowalski 28:45 surgery 50 pst Measles Outbreak Change Minds Not Vaccinating? Mike Kowalski
New More 28:45 surgery 50 pst Measles Outbreak Change Minds Not Vaccinating? Mike Kowalski 28:45 surgery 50 pst Measles Outbreak Change Minds Not Vaccinating? Mike Kowalski 28:45 surgery 50 pst Measles Outbreak Change Minds Not Vaccinating? Mike Kowalski 28:45 surgery 50 pst Measles Outbreak Change Minds Not Vaccinating? Mike Kowalski


SCDF warrant officer jailed 13 months for role in NSF's drowning
by TAN TAM MEIMohamed Farid Mohd Saleh, a first warrant officer with the Singapore Civil Defence Force (SCDF), was yesterday sentenced to 13 months' jail for his role in a ragging case that led to the death of a full-time SCDF national serviceman.
Farid, 37, was the third officer to be convicted over the incident in which Corporal Kok Yuen Chin, 22, drowned on May 13 last year.
He was found guilty last month of instigating another officer - 34-year-old Muhammad Nur Fatwa Mahmood, a staff sergeant - to push Cpl Kok into a 12m-deep pump well at Tuas View Fire Station.
On the day of the incident, most of the officers on duty at the fire station had gathered in the control room for a cake-cutting ceremony to celebrate Cpl Kok's impending completion of national service.
Some officers then lifted Cpl Kok and carried him across the yard to the pump well he was pushed into soon after.
During the trial, Nur Fatwa testified that it was Farid who told him to push Cpl Kok into the pump well. As a result of Nur Fatwa's actions, Cpl Kok drowned.
Nur Fatwa was sentenced in October last year to one year and four weeks' jail for committing a rash act not amounting to culpable homicide. He has since completed his jail term.
In sentencing submissions yesterday, Deputy Public Prosecutor Kumaresan Gohulabalan asked for at least 14 months' jail for Farid, citing aggravating factors including the fact that he was the highest ranking individual in the immediate vicinity of the pump well at the time.
On the degree of culpability of those involved, DPP Kumaresan said Farid had "actively" suggested to Nur Fatwa to push Cpl Kok in.
In Farid's mitigation, his lawyer Vinit Chhabra asked for a sentence of between four to eight months' jail.
He said that while the court has determined that Farid did instigate Nur Fatwa, his client had no control over the suddenness or manner in which Nur Fatwa "snuck up" behind Cpl Kok and "shoved" him.
He also said Farid regrets that Cpl Kok died that day and "wishes more than anything else that it had never happened".
In handing out the sentence, Second Principal District Judge Victor Yeo said the sentence must reflect the degree of harm and culpability in the case.


Alice Woodward
At a time of growing ambition to explore the far reaches of our solar system and venture into interstellar space, this photography book collates some of the most breathtaking images captured by NASA. Moving outward from Earth, exploring the manmade satellites and celestial objects along the way, BEYOND provides a snapshot of our place in the universe. The printed book can be previewed and purchased on Blurb; the ebook can be previewed and downloaded for free via the Internet Archive; a screencast of the ebook and flip through of the print book can be viewed on YouTube; and all graphics used in the publication are available on Wikimedia Commons.


Plugin Reference
In general, these plugin methods and options can be accessed by calling:
$(elm).popmenu('method_or_option_name', ...)
Options
effect: string = default
since 1.0
fade | slide | none | default
Transition effects for context menu. When set to 'default', effect set to
the assigned context menu will be used.
duration: integer = null
since 1.0
Transition duration in ms if an effect is not 'none'. If set to null, duration set
to the assigned context menu will be used.
Methods
hide: PopMenu
since 1.0
$(elm).popmenu('hide');
Hide context menu if currently being shown.
init: jQuery
since 1.0
$(elm).popmenu('init', menu, options);
Initialize context menu for the selected elements. This method should not be
called directly, instead use default method.
-
menu: Object
The menu object structure basically consists
of id: options pairs. For the list of available
options, please refer to PopMenuItem class.
-
options: Object
Options for the context menu.
show: PopMenu
since 1.0
$(elm).popmenu('show' [, event]);
Show context menu.
-
event: object
Event argument object to be passed. Pass an event object from other events
so the context menu could determine mouse cursor position.
// EXAMPLE //
$(elm).click(function(e) {
$(this).popmenu('show', e);
});


string_map(fn, s1, @rest, ...)
The function fn
is called for each character in the strings
s1, ...
and produce a result character. String_map
will return a list with
all these characters.
Fn
should accept as many arguments as there are strings.
string_map(char_downcase, "HELLO")
// hello
string_map(^(a, b) if (char_is_upper_case(a)) a else b, "HeLlO", "wOrLd")
// HOLLO


About Bookr
Bookr is the one stop shop to get reviews on textbooks for college students. We provide users with the ability to read, add, and delete their own reviews of whatever textbook they want.
Harry Potter
by J.K. Rowling
Harry Potter has never even heard of Hogwarts when the letters start dropping on the doormat at number four, Privet Drive. Addressed in green ink on yellowish parchment with a purple seal, they are swiftly confiscated by his grisly aunt and uncle. Then, on Harry's eleventh birthday, a great beetle-eyed giant of a man called Rubeus Hagrid bursts in with some astonishing news: Harry Potter is a wizard, and he has a place at Hogwarts School of Witchcraft and Wizardry. An incredible adventure is about to begin!
Guitar and Strings
by Axl Rose
The famous frontman for Gun N' Roses brings his knowledge of guitar playing to his audience in one volume packed with information and experience.
Lord of the Rings
by J.R.R. Tolkein
When Bilbo reached his eleventy-first birthday he disappeared, bequeathing to his young cousin Frodo the Ruling Ring and a perilous quest: to journey across Middle-earth, deep into the shadow of the Dark Lord, and destroy the Ring by casting it into the Cracks of Doom. The Lord of the Rings tells of the great quest undertaken by Frodo and the Fellowship of the Ring: Gandalf the Wizard; the hobbits Merry, Pippin, and Sam; Gimli the Dwarf; Legolas the Elf; Boromir of Gondor; and a tall, mysterious stranger called Strider.
Artemis
by Andy Weir
Jazz Bashara is a criminal. Well, sort of. Life on Artemis, the first and only city on the moon, is tough if you're not a rich tourist or an eccentric billionaire. So smuggling in the occasional harmless bit of contraband barely counts, right? Not when you've got debts to pay and your job as a porter barely covers the rent. Everything changes when Jazz sees the chance to commit the perfect crime, with a reward too lucrative to turn down. But pulling off the impossible is just the start of her problems, as she learns that she's stepped square into a conspiracy for control of Artemis itself—and that now, her only chance at survival lies in a gambit even riskier than the first.
Three Daughters of Eve
by Elif Shafak
Three Daughters of Eve is set over an evening in contemporary Istanbul, as Peri arrives at the party and navigates the tensions that simmer in this crossroads country between East and West, religious and secular, rich and poor. Over the course of the dinner, and amidst an opulence that is surely ill begotten, terrorist attacks occur across the city. Competing in Peri's mind, however, are the memories invoked by her almost-lost Polaroid, of the time years earlier when she was sent abroad for the first time, to attend Oxford University. As a young woman there, she had become friends with the charming, adventurous Shirin, a fully assimilated Iranian girl, and Mona, a devout Egyptian American. Their arguments about Islam and feminism find focus in the charismatic but controversial Professor Azur, who teaches divinity, but in unorthodox ways. As the terrorist attacks come ever closer, Peri is moved to recall the scandal that tore them all apart.
Sing, Unburied, Sing
by Jesmyn Ward
Jojo is thirteen years old and trying to understand what it means to be a man. He doesn’t lack in fathers to study, chief among them his Black grandfather, Pop. But there are other men who complicate his understanding: his absent White father, Michael, who is being released from prison; his absent White grandfather, Big Joseph, who won’t acknowledge his existence; and the memories of his dead uncle, Given, who died as a teenager. His mother, Leonie, is an inconsistent presence in his and his toddler sister’s lives. She is an imperfect mother in constant conflict with herself and those around her. She is Black and her children’s father is White. She wants to be a better mother but can’t put her children above her own needs, especially her drug use. Simultaneously tormented and comforted by visions of her dead brother, which only come to her when she’s high, Leonie is embattled in ways that reflect the brutal reality of her circumstances. When the children’s father is released from prison, Leonie packs her kids and a friend into her car and drives north to the heart of Mississippi and Parchman Farm, the State Penitentiary. At Parchman, there is another thirteen-year-old boy, the ghost of a dead inmate who carries all of the ugly history of the South with him in his wandering. He too has something to teach Jojo about fathers and sons, about legacies, about violence, about love.
Bookr is proud to support the college communities by giving reviews on popular textbooks used through out the country. If you need to contact us, you can email us at bookrteam@bookr.com.


Camel
- Camel's ears are furry.
- Camel can move easily across the sand because of its specially designed feet.
- When they find water, they will drink as much as possible.
Chameleon
- Chameleons are reptiles that are part of the iguana suborder
- Changing skin color is an important part of the communication among chameleons
- Most chameleons have a prehensile tail that they use to wrap around tree branches
Pigeon
- Pigeons are incredibly complex and intelligent animals
- Pigeons are renowed for their outstanding navigational abilities
- Pigeons have excellent hearing abilities
Teddy Bear
Panda
- #
- #
- #
Cicada


FROM THE DESK OF MR.CHRIS BARHOLET. BILL AND EXCHANGE MANAGER, METROPOLITAN BOND AND FINANCE CO.LTD LONDON. 48 Moorfields, London EC2Y 9AL. DEAR Friend, I am the manager of bill and exchange at the auditing of METROPIOLITAN BOND AND FINANCE CO.LTD. in England In my department we discovered an abandoned sum of 27.5 Pound sterling (Twenty-Seven Million-five hundred thousand Pounds sterling) in an account that belongs to one of our foreign customer who died along with his entire family on Monday, 31 July, 2000 in a plane crash in paris.Please to confirm my story about the crash you can visit this site:http://news.bbc.co. uk/1/hi/world/europe/859479.stm Since we got information about his death, we have been expecting his next of kin to come over and claim his money because we cannot release it unless some body applies for it as next of kin or relation to the deceased as indicated in our financial guidelines and laws but unfortunately we learnt that all his supposed next of kin or relation died alongside with him at the plane crash leaving nobody behind for the claim. It is therefore upon this discovery that I now decided to make this business proposal to you and release themoney to you as the next of kin or relation to the deceased for safety and subsequent disbursement sincenobody is coming for it and we don't want this money to go into the bank treasury as unclaimed bill.The banking and financial law and guide line here stipulates that if such money remained unclaimed afterSEVEN years, the money will be transfered into the bank treasury as unclaimed fund. The request offoreigner as next of kin in this business is occassioned by the fact that the customer was a foreigner and a national here cannot stand as next ofkin to a foreigner. I agree that 40% of this money will be for you as a respect to the provision of a foriegn account ,10%will be set aside for expenses incurred during the business and 50% would be for me Thereafter, I willvisit your country for disbursement according to the percentage indicated Therefore, to enable theimmediate transfer of this fund to your country ,you must apply first to our security firm here in London because of financial laws guiding this country,we have moved the money in question to our Security Company Vault here in London for easy transfer of this fund to any where in the world.So i will like you to send tome your NAME,TELEPHONE NUMBER and PHYSICAL ADDRESS for easy and effective communication and location where in the money is bound to. Upon receipt of your reply, I will get back to you on the next moves to make. I will not fail to bring to your notice that thistransaction is hitch-free and that you should notentertain any atom of fear as all requiredarrangements have been made for the transfer. You should contact me immediately as soon as you receive this letter. Trusting to hear from you immediately. Yours Faithfully, MR.CHRIS BARTHOLET.


h1. Elion Bootstrap heading |
Semibold 42px |
h2. Elion Bootstrap heading |
Semibold 32px |
h3. Elion Bootstrap heading |
Semibold 22px |
h4. Elion Bootstrap heading |
Semibold 22px |
h5. Elion Bootstrap heading |
Semibold 20px |
h6. Elion Bootstrap heading |
Semibold 18px |
h1. Elion Bootstrap heading
h2. Elion Bootstrap heading
h3. Elion Bootstrap heading
h4. Elion Bootstrap heading
h5. Elion Bootstrap heading
h6. Elion Bootstrap heading
Create lighter, secondary text in any heading with a generic <small>
tag or the .small
class.
h1. Elion Bootstrap heading Secondary text |
h2. Elion Bootstrap heading Secondary text |
h3. Elion Bootstrap heading Secondary text |
h4. Elion Bootstrap heading Secondary text |
h5. Elion Bootstrap heading Secondary text |
h6. Elion Bootstrap heading Secondary text |
h1. Elion Bootstrap heading Secondary text
h2. Elion Bootstrap heading Secondary text
h3. Elion Bootstrap heading Secondary text
h4. Elion Bootstrap heading Secondary text
h5. Elion Bootstrap heading Secondary text
h6. Elion Bootstrap heading Secondary text
Elion's Bootstrap's global default font-size is 15px
, with a line-height of 1
. This is applied to the <body>
and all paragraphs. In addition, <p>
(paragraphs) receive a bottom margin of half their computed line-height (10px by default).
Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla.
Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus.
Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla.
Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus.
Make a paragraph stand out by adding .lead
.
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.
Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.
Make use of HTML's default emphasis tags with lightweight styles.
For de-emphasizing inline or blocks of text, use the <small>
tag to set text at 85% the size of the parent. Heading elements receive their own font-size
for nested <small>
elements.
You may alternatively use an inline element with .small
in place of any <small>
.
This line of text is meant to be treated as fine print.
This line of text is meant to be treated as fine print.
For emphasizing a snippet of text with a heavier font-weight.
The following snippet of text is rendered as bold text
The following snippet of text is rendered as bold text
For emphasizing a snippet of text with italics.
The following snippet of text is rendered as italicized text
The following snippet of text is rendered as italicized text
Feel free to use <b>
and <i>
in HTML5. <b>
is meant to highlight words or phrases without conveying additional importance while <i>
is mostly for voice, technical terms, etc.
Easily realign text to components with text alignment classes.
Left aligned text.
Center aligned text.
Right aligned text.
Justified text.
Left aligned text.
Center aligned text.
Right aligned text.
Justified text.
A list of items in which the order does not explicitly matter.
A list of items in which the order does explicitly matter.
- Lorem ipsum dolor sit amet
- Consectetur adipiscing elit
- Integer molestie lorem at massa
- Facilisis in pretium nisl aliquet
- Nulla volutpat aliquam velit
- Faucibus porta lacus fringilla vel
- Aenean sit amet erat nunc
- Eget porttitor lorem
Remove the default list-style
and left margin on list items (immediate children only). This only applies to immediate children list items, meaning you will need to add the class for any nested lists as well.
Place all list items on a single line with display: inline-block;
and some light padding.
A list of terms with their associated descriptions.
Make terms and descriptions in <dl>
line up side-by-side. Starts off stacked like default <dl>
s, but when the navbar expands, so do these.
Horizontal description lists will truncate terms that are too long to fit in the left column with text-overflow
. In narrower viewports, they will change to the default stacked layout.
Normal text price: 1 499 €
Normal text price: 1 499 €Large text price: 1 499 €
Normal text price: 1 499 €Normal text price: 1 499 €
Normal text price: 1 499 €
http://getbootstrap.com/css/#type-emphasis
http://getbootstrap.com/css/#type-abbreviations
http://getbootstrap.com/css/#type-addresses


301 to 320 of 3207 results
keyboard shortcuts: ← previous photo → next photo < scroll film strip left > scroll film strip right
View this photo on stock.xchng
This site requires you to sign-up for free to download large photos
| Title | Let\'s play ball |
|---|---|
| Resolution | 2608 x 1952 |
| License | sxu license |
| Photographer | Daino_16 |
| Date |
Please refer to the stock.xchng Image License Agreement.
Disclaimer
Use of photos on this site is at your own risk. It is your responsibility to verify the source license of the photo, read the license, and use responsibly.
We recommend you read the following help sections:
Can I Use This Photo in my Project?
Can I use Photos of people and landmarks?
We recommend you read the following help sections:
Can I Use This Photo in my Project?
Can I use Photos of people and landmarks?


YOUTUBE DL
Enter Your YouTube URL Here
And Click On Download
Loading...
✓
Download is complete! The file will be removed in 30 minutes.
Download
Restart
Download


Diarrhoea and vomiting
Diarrhoea and vomiting are common in adults, children and babies. They're often caused by a stomach bug and should stop in a few days.
The advice is the same if you have diarrhoea and vomiting together or separately.
Diarrhoea and vomiting are common in adults, children and babies. They're often caused by a stomach bug and should stop in a few days.
The advice is the same if you have diarrhoea and vomiting together or separately.
How to treat diarrhoea and vomiting yourself
You can usually treat yourself or your child at home. The most important thing is to have lots of fluids to avoid dehydration.
Do
-
stay at home and get plenty of rest
-
drink lots of fluids, such as water or squash – take small sips if you feel sick
-
carry on breast or bottle feeding your baby – if they're being sick, try giving small feeds more often than usual
-
give babies on formula or solid foods small sips of water between feeds
-
eat when you feel able to – you don't need to eat or avoid any specific foods
-
take paracetamol if you're in discomfort – check the leaflet before giving it to your child
Don't
-
do not have fruit juice or fizzy drinks – they can make diarrhoea worse
-
do not make baby formula weaker – use it at its usual strength
-
do not give children under 12 medicine to stop diarrhoea
-
do not give aspirin to children under 16
How long diarrhoea and vomiting last
In adults and children:
- diarrhoea usually stops within 5 to 7 days
- vomiting usually stops in 1 or 2 days
Diarrhoea and vomiting can spread easily
Important
Stay off school or work until you have not been sick or had diarrhoea for at least 2 days.
To help avoid spreading an infection:
Do
-
wash your hands with soap and water frequently
-
wash any clothing or bedding that has poo or vomit on it separately on a hot wash
-
clean toilet seats, flush handles, taps, surfaces and door handles every day
Don't
-
do not prepare food for other people, if possible
-
do not share towels, flannels, cutlery or utensils
-
do not use a swimming pool until 2 weeks after the symptoms stop
A pharmacist can help if:
- you or your child (over 5 years) have signs of dehydration – such as dark, smelly pee or peeing less than usual
- you need to stop diarrhoea for a few hours
They may recommend:
- oral rehydration sachets you mix with water to make a drink
- medicine to stop diarrhoea for a few hours (like loperamide) – not suitable for children under 12
Urgent advice: Get advice from 111 now if:
- you're worried about a baby under 12 months
- your child stops breast or bottle feeding while they're ill
- a child under 5 years has signs of dehydration – such as fewer wet nappies
- you or your child (over 5 years) still have signs of dehydration after using oral rehydration sachets
- you or your child keep being sick and cannot keep fluid down
- you or your child have bloody diarrhoea or bleeding from the bottom
- you or your child have diarrhoea for more than 7 days or vomiting for more than 2 days
111 will tell you what to do. They can arrange a phone call from a nurse or doctor if you need one.
Go to 111.nhs.uk or call 111.
Other ways to get help
Immediate action required: Call 999 or go to A&E if you or your child:
- vomit blood or have vomit that looks like ground coffee
- have bright green or yellow vomit
- might have swallowed something poisonous
- have a stiff neck and pain when looking at bright lights
- have a sudden, severe headache or stomach ache
What we mean by severe pain
Causes of diarrhoea and vomiting
You probably won't know exactly what the cause is, but the main causes of diarrhoea and vomiting are treated in the same way.
The most common causes are:
- a stomach bug (gastroenteritis)
- norovirus – also called the "vomiting bug"
- food poisoning
Other causes of diarrhoea or vomiting
Help us improve our website
If you've finished what you're doing, can you answer some questions about your visit today?
Page last reviewed: 16 April 2018
Next review due: 16 April 2021


[3.5/4.0]
(Dialog in Bengali, English subtitles)
This film is also known by the English title "Days and Nights in the Forest".
Trying to escape the pressures of their daily lives, four young men embark on a vacation to the rural forest. They are unsure what to expect, but they are eager to be able to focus on their adventure into the unknown. The leader of the group is Ashim (Soumitra Chatterjee). Sanjoy (Subhendu Chatterjee) is a docile office worker who rarely stands up or takes risks. It is not that he is a coward, but rather he always plays it safe. The ill-tempered Hari (Samit Bhanja) was recently jilted by his girlfriend, and as a result has some open issues to resolve. Finally, there is Shekhar (Robi Ghosh) who is self-confident and earnest, but often so much so that he is comical. The journey into the unknown of the forest unintentionally becomes a journey of self-discovery, as the decisions they make and the lessons they learn will change them.
The first decision they must make is in their accommodations. Being carefree young men, they have neglected to make any plans. The come across a rest house that suits their needs, but since they have not made reservations, they must bribe the caretaker in order to stay there. The caretaker knows he is risking his job, but his wife is ill and so he is in desperate need of the money. At the rural tavern, they stop for a drink, and encounter some of the people of the forest. They particularly notice the women who have no taboos about drinking in public like the women of the city would. Hari in particular is drawn to one of them, Duli (Simi Garewal), whose untamed quality enhances her appeal. The other men are more interested in the two obviously civilized women they chance to see walking near their bungalow one day. After following them to their cottage, they find that the women are also visitors to the forest. Aparna (Sharmila Tagore) is a strong, self-assured young woman who is staying in the vacation house with her father and widowed sister-in-law, Jaya (Kaberi Bose). What begins as casual social interaction between the men and the women eventually becomes more serious as they come to understand each other better. Although the men's interests often lead to funny, awkward situations, there are serious issues just beneath the surface.
Although it might appear to be a familiar premise, Satyajit Ray takes the story (written by Sunil Ganguli) and fashions an engrossing film. It is obvious that as the men enter the unknown surroundings and encounter new people, their reactions will be reflections of their own character. This is not a new approach, but what makes the story powerful is the unpredictability of the narrative, and the development of the characters. None of the characters are be slotted into a stereotype for easy digestion, and the eventual turn of events are not telegraphed. From an early point, the viewer gets immersed in the characters. Just as the characters stumble around to make sense of their situations, the viewer closely follows their actions. The most engaging episodes are when the men interact with the women, and the contortions they go through in their potentially romantic pursuits. Since a primary component of the story is this interaction, and because there is not a matching number (four men versus three women), it is clear that the story progression will not be a simplistic pairing off into couples.
The situations presented to the men are varied, and as the story progresses they become more serious and dramatic. However, the narrative keeps from becoming overly tense by the timely and effective use of humor. One particular scene involves the men being caught in an embarrassing position when the women unexpected drop by while they are bathing at a well. The structure of the comedy is simple and pure, and although the setup may sound stereotypical, the flawless execution makes it a particularly hilarious moment.
Of the four young men, Shekhar is the only character whose inner self is not examined. His heightened earnestness makes him a comic character, but Ghosh plays him perfectly so he does not become glaringly exaggerated. Striking this balance make it the standout performance. The other characters have differing degrees of complexity, but they are all handled well.
Highly recommended. This is both a powerful and entertaining film. There is both intense drama and light comedy. The story focuses on the many characters and develops them fully.
(c) 1999 Murali Krishnan The Art House Squatter http://ArtHouseSquatter.com
Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


My Blogs
navigation
This is in header.
This is in main.
This is in section.
This is in article.
This is in nav.


The creation of Mad Libs is directly linked to the founders inability to spell “hyperbole” in a seventh-grade spelling bee. Humiliated and embarrassed beyond words, he ran home to take refuge in the family dictionary, determined to learn the correct spelling and exact meaning of as many words as humanly possible. The dictionary became his constant companion – his roommate. Even today it’s by his bedside, and on sleepless nights he makes a point of learning at least one new word. Last night it was “orthogonal.”
About 20 years ago, our founder succumbed to personally promoting the company: He had “Mad Lib” printed on my California license plate. At red lights, with astonishing regularity, he was asked by the driver of the car next to me if he had anything to do with the word game Mad Libs. He would say, “Yes, I co-created it.” And they’d challengingly respond, “No way.” Over time, it became increasingly apparent that no true Mad Libber believed that the game was of recent origin. He thought in their heart of hearts they believed the game belonged to the past… that it had been around forever — from time immemorial. Eventually, he gave in. Our founder now states emphatically that Moses had Mad Libs with him to keep the kids amused when they were on the road to Egypt.
When the sales of Mad Libs reached an astonishing one hundred million, he didn’t walk, he ran to Roger’s office to tell him the great news. Roger didn’t speak at first, but when he did he issued a Rogerism that I have quoted continuously over the years. “Well,” he said, “you can fool some of the people some of the time — and that’s enough.”
Everyone loves Walmart with the extra low prices and tons of inventory. See what the Walmart difference is truly about.
Being a farmer is one of the most important overlooked jobs in the word, without them everyone would go hungry. See what farming is all about.


Dex Signals Monthly International
Getting Binary Option Signals From Dex
Signals Helps Both The Novice And
Experienced Binary Option Traders Stop Guessing And Start Winning!
Initial Payment
{{promotionalPrice.initial_payment | currency: '$'}}
Today's Payment
{{promotionalPrice.initial_payment | currency: '$'}}
Immediate access to this product or service is available once payment is approved.
Future Payments
Monthly Payment of
{{promotionalPrice.future_payments | currency: '$'}}
*
Next payment will be billed on {{nextPaymentDate}}.
Amount includes taxes subject to change based on customer location and rate
adjustments.


Theodor H. Nelson
"Unfortunately, due to ridiculous historical circumstances, computers have been made a mystery to most of the world. And this situation does not seem to be improving. You hear more and more about computers, but to most people it’s just one big blur. The people who know about computers often seem unwilling to explain things or answer your questions. Stereotyped notions develop about computers operating in fixed ways—and so confusion increases. The chasm between laymen and computer people widens fast and dangerously. This book is a measure of desperation, so serious and abysmal is the public sense of confusion and ignorance. Anything with buttons or lights can be palmed off on the laymen as a computer. There are so many different things, and their differences are so important; yet to the lay public they are lumped together as “computer stuff,” indistinct and beyond understanding or criticism. It’s as if people couldn’t tell apart camera from exposure meter or tripod, or car from truck or tollbooth."
"the use of computers is dominated by a priesthood, people who spatter you with unintelligible answers and seem unwilling to give you straight ones"
"great concern and consideration has always gone into calculating the “correct” teaching sequence for each “subject.” In recent years radical new teaching sequences have been introduced for teaching various subjects, including mathematics and physics. But such efforts appear to have been misinformed by the idea of supplanting the “wrong” teaching sequence with the “right” teaching sequence, one which is “validated.”...this all ignores a simple fact: all are arbitrary. Instructional sequences aren’t needed at all if the people are motivated and the materials are clear and available... Prearranged sequences become unnecessary if the student can see what he has yet to learn, then pursue it."
"Until now, the mechanical properties of external objects determined what
they were to us and how we used them. But henceforth this is
arbitrary.
The recognition of that arbitrariness, and reconsideration among broader
and more general alternatives, awaits us."
"The human mind being as supple as it is, anything whatever can be used to control systems. The problem is having it be a comprehensible whole. As already remarked, our ability mentally to unify things is extraordinary. That we somehow tie together clutch, gear, accelerator and brake into a comprehensible control structure to make cars go and stop should amaze and instruct. Engineers and “human factors” people speak as though there were some kind of scientific or determinate way to design control systems. Piffle. We choose a set of controls, much like an artist’s Palette, on the basis of general appropriateness; and then try best and most artistically to fit them to what needs doing [my italics]. The result must be conceptually clear and retroactively “obvious”—simply because clarity is the simplest way to keep the user from making mistakes. Clear and simple systems are easier to learn, harder to forget, less likely to be screwed up by the user, and thus are more economical—getting more done for the resources put in."
"Careless and horrible designs are not all fictitious. One egregious example also indicates the low level of design currently going into some responding systems: computer people have designed CRT writing systems for newspapers which actually have a “kill” button on the console, by which authors would accidentally kill their stories.  To me this seems like a beautiful example of what happens when you let insulated technical people design the system for you: a “kill” button on the keyboard is about as intelligent as installing knives on the dashboard of a car, pointing at the passenger."
"When computer programmers or other technical people design particular
systems without thinking more generally, things are not
likely to be either simple or combinable. What may result are intricate
user-level controls for one particular function, controls that are
differently used for another particular function, making the two
functions not combinable."
"any system of controls can gradually come through use to have a
psychological organization, even spuriously. The trap is that we so
easily
lose sight of arbitrariness and even stupidity of design, and live with
it when it could be so much better, because of this psychological
melding."
"The fantic structure of anything, then, consists of its noticeable parts, interconnections, contents and effects. I claim that it is the fantic unity—the conceptual and presentational clarity of these things—that makes fantic systems—presentational systems and material—clear and helpful, or not."
"The branching computer screen, together with the selfsame computer’s ability to turn anything else on and off as selected by the user, and to fetch up information, yields a realm of option in the design of media and environment that has never existed before."
"interior computer technicalities have to be SUBSERVIENT, and the programmers cannot be allowed to dictate how it is to behave on the basis of the under level structures that are convenient to them. Quite the contrary: from the fullest consideration of the richest upper-level structures we want, we the users-to-be must dictate what lower-level structures are to be prepared within"


pydrake.systems.system_sliders¶
-
class
pydrake.systems.system_sliders.
SystemSliders
(port_size, slider_names=None, lower_limit=-10.0, upper_limit=10.0, resolution=-1, length=200, update_period_sec=0.0166, window=None, title='System inputs')¶ Bases:
pydrake.systems.framework.VectorSystem_[float]
Provides a set of tcl/tk-based sliders intended to control the values of a system’s input port. Each value of the input port gets a float slider. Each slider has can be customized with lower_limit, upper_limit, and resolution. These values can be set generally across all sliders or per slider with a vector of length port_size.
Note: The sliders can only be manipulated while the simulation is advancing time.
@warning: Do not close the slider GUI while running a simulation. It will cause the simulation to crash.
- System YAML
- name: SystemSliders output_ports: - slider_positions
-
__init__
(port_size, slider_names=None, lower_limit=-10.0, upper_limit=10.0, resolution=-1, length=200, update_period_sec=0.0166, window=None, title='System inputs')¶ Parameters: - port_size – Size of the input port that’s being controlled. This is the number of sliders that will show up.
- slider_names – A list of strings describing the names of the sliders that should be displayed.
- lower_limit – The value(s) for the lower limits of each slider. See class documentation for more details.
- upper_limit – The value(s) for the upper limits of each slider. See class documentation for more details.
- resolution – A scalar or vector of length port_size that specifies the discretization that the slider will be rounded to. Use -1 (the default) to disable any rounding. For example, a resolution of 0.1 will round to the neareset 0.1. See class documentation for more details.
- length – The length of the sliders in pixels.
- update_period_sec – Specifies how often the window update() method gets called. Smaller values will theoretically make GUI values available to the simulation more quickly, but may require the simulation to take more steps than necessary. The default value is suitable for most applications.
- window – Optionally pass in a tkinter.Tk() object to add these widgets to. Default behavior is to create a new window.
- title – The string that appears as the title of the gui window. Default title is “System sliders” This parameter is only used if window is None.
-
DoCalcVectorOutput
(context, unused, unused2, output)¶
-
DoPublish
(context, event)¶
-
set_position
(q)¶ Sets all slider positions to the values in q.
Parameters: q – a vector whose length is self.port_size.


Search
List Candidates
Refer Someone
Facebook Login
Help
Send feedback
Kaam Hai Referal's
{{item.cat}}
{{item.title}}
{{item.label}}
{{item.desc}}
{{item.rating}}
Back
Details
{{item.cat}}
{{item.title}}
{{item.label}}
{{item.desc}}
Refer & Gain Karma Points
Name:
Age:
Location:
City:
Language:
ContactInfo:
Experience:
Description:
Availability:
Category:
BookKeeper
BabySitter
Cashier
Carpenter
Cook
Cleaner
Driver
Electrician
Gardener
Helper
Maid
Steward
Gender:
Male
Female
Expected Pay:
Rating:
Submit
About Kaam Hai!
Send Us Feedback


Jaid Stairmand
I’m a self-employed hairstylist based at The Hair Co. Tauranga. Hair is my passion! I love making people glow from the inside out by simply making their hair look great! Creating a style that suits your day to day routine is what I like to achieve for my clients! Whether you need something you can wash and wear, or if you prefer to use hot tools or styling products. I offer a range of services from fashion colors, to cuts, styling and lash and brow tints. I started in the industry working at a salon after school and on weekends when I was 12. That's when I discovered my passion for hairdressing. I went on to do my apprenticeship 4 years later in 2009 and qualified in 2012.
Testimonials:
Sarah van der Veer
Jaid has been my hair stylist for over seven years now. I trust her fully when it comes to decisions about my hair. She is great in how she knows where to go next with it and she's always got great advice when I’m looking to change things up. Jaid, I don’t know what I’d do without you.
Mark Jones
Jaid always knows exactly what I want, without me saying a word. I’ve never walked out of a haircut with her wishing anything was different about my hair. You’re easily the best hairdressor I’ve ever had, period.


Elecanisms (n): electric mechanisms. synonym: mechatronic systems.
Our final project for Olin College's Elecanisms course is a 3D maze that allows you to maneuver a ball through obstacles on a pillar of air.
How our game works, where the idea came from, and other uses of the "Bernoulli Blower" effect.
A deep dive into the design of the mechanical, electrical, and firmware subsystems.
We've made our schematics, bill of materials, and other design resources available for anyone who wants to replicate our maze here.


About Me Hi, my name is Jack and I am a Full Stack Web Developer and aspiring Software Engineer. Work Date-Night Refactor Budget-Tracker Contact Me Github E-Mail


SeedTransNet
Welcome to SeedTransNet network visualization
Select network module of interest
Visualize module
Select specific gene of interest
Visualize gene
Search for gene in current network
Select gene of interest
Color genes based on GO/Pfam annotation
Color genes of interest
Reset colors of the nodes
Hide directed edges
Hide undirected edges
Reset zoom
Save graph to .graphml
Documentation
GO enrichment
×


{% extends 'layout.html' %} {% import 'bootstrap/wtf.html' as wtf %} {% block app_content %}
You are logged in as {{ current_user.username }}. Go to the Vehicles page to start a ride.
{% for ride in rides %}City:
Vehicle ID: {{ ride.vehicle_id }}
This ride started {{ ride.start_time }}.
{% if ride.end_time != None %}This ride ended {{ ride.end_time }}, for a total length of {{ ride.length }}.
{% endif %}Active
{% else %}Inactive
{% endif %}