Record-heterogeneity¶
We think of CSV tables as rectangular: if there are 17 columns in the header then there are 17 columns for every row, else the data have a formatting error.
But heterogeneous data abound -- log-file entries, JSON documents, no-SQL databases such as MongoDB, etc. -- not to mention data-cleaning opportunities we'll look at in this page. Miller offers several ways to handle data heterogeneity.
Terminology, examples, and solutions¶
Different kinds of heterogeneous data include ragged, irregular, and sparse.
Homogeneous/rectangular data¶
A homogeneous list of records is one in which all records have the same keys, in the same order. For example, here is a well-formed CSV file:
mlr --csv cat data/het/hom.csv
a,b,c 1,2,3 4,5,6 7,8,9
It has three records (written here using JSON Lines formatting):
mlr --icsv --ojsonl cat data/het/hom.csv
{"a": 1, "b": 2, "c": 3} {"a": 4, "b": 5, "c": 6} {"a": 7, "b": 8, "c": 9}
Here every row has the same keys, in the same order: a,b,c
.
These are also sometimes called rectangular since if we pretty-print them we get a nice rectangle:
mlr --icsv --opprint cat data/het/hom.csv
a b c 1 2 3 4 5 6 7 8 9
Fillable data¶
A second example has some empty cells which could be filled:
mlr --csv cat data/het/fillable.csv
a,b,c 1,2,3 4,,6 ,8,9
mlr --icsv --ojsonl cat data/het/fillable.csv
{"a": 1, "b": 2, "c": 3} {"a": 4, "b": "", "c": 6} {"a": "", "b": 8, "c": 9}
This example is still homogeneous, though: every row has the same keys, in the same order: a,b,c
.
Empty values don't make the data heterogeneous.
Note however that we can use the fill-empty
verb to make these
values non-empty, if we like:
mlr --icsv --opprint fill-empty -v filler data/het/fillable.csv
a b c 1 2 3 4 filler 6 filler 8 9
Ragged data¶
Next let's look at non-well-formed CSV files. For a third example:
cat data/het/ragged.csv
a,b,c 1,2,3 4,5 7,8,9,10
If you mlr --csv cat
this, you'll get an error message:
mlr --csv cat data/het/ragged.csv
mlr: mlr: CSV header/data length mismatch 3 != 2 at filename data/het/ragged.csv row 3. .
There are two kinds of raggedness here. Since CSVs form records by zipping the
keys from the header line together with the values from each data line, the
second record has a missing value for key c
(which ought to be fillable),
while the third record has a value 10
with no key for it.
Using the --allow-ragged-csv-input
flag
we can fill values in too-short rows, and provide a key (column number starting
with 1) for too-long rows:
mlr --icsv --ojson --allow-ragged-csv-input cat data/het/ragged.csv
[ { "a": 1, "b": 2, "c": 3 }, { "a": 4, "b": 5, "c": "" }, { "a": 7, "b": 8, "c": 9, "4": 10 } ]
Irregular data¶
Here's another situation -- this file has, in some sense, the "same" data as
our ragged.csv
example above:
cat data/het/irregular.json
{"a": 1, "b": 2, "c": 3} {"c": 6, "a": 4, "b": 5} {"b": 8, "c": 9, "a": 7}
For example, on the second record, a
is 4, b
is 5, c
is 6. But this data
is heterogeneous because the keys a,b,c
aren't in the same order in each
record.
This kind of data arises often in practice. One reason is that, while many
programming languages (including the Miller DSL) preserve insertion
order in maps; others do
not. So someone might have written {"a":4,"b":5,"c":6}
in the source code,
but the data may not have printed that way into a given data file.
We can use the regularize
or
sort-within-records
verb to order
the keys:
mlr --jsonl regularize data/het/irregular.json
{"a": 1, "b": 2, "c": 3} {"a": 4, "b": 5, "c": 6} {"a": 7, "b": 8, "c": 9}
The regularize
verb tries to re-order subsequent rows to look like the first
(whatever order that is); the sort-within-records
verb simply uses
alphabetical order (which is the same in the above example where the first
record has keys in the order a,b,c
).
Sparse data¶
Here's another frequently occurring situation -- quite often, systems will log data for items which are present, but won't log data for items which aren't.
mlr --json cat data/het/sparse.json
[ { "host": "xy01.east", "status": "running", "volume": "/dev/sda1" }, { "host": "xy92.west", "status": "running" }, { "purpose": "failover", "host": "xy55.east", "volume": "/dev/sda1", "reimaged": true } ]
This data is called sparse (from the data-storage term).
We can use the unsparsify
verb to make sure
every record has the same keys:
mlr --json unsparsify data/het/sparse.json
[ { "host": "xy01.east", "status": "running", "volume": "/dev/sda1", "purpose": "", "reimaged": "" }, { "host": "xy92.west", "status": "running", "volume": "", "purpose": "", "reimaged": "" }, { "host": "xy55.east", "status": "", "volume": "/dev/sda1", "purpose": "failover", "reimaged": true } ]
Since this data is now homogeneous (rectangular), it pretty-prints nicely:
mlr --ijson --opprint unsparsify data/het/sparse.json
host status volume purpose reimaged xy01.east running /dev/sda1 - - xy92.west running - - - xy55.east - /dev/sda1 failover true
Reading and writing heterogeneous data¶
In the previous sections we saw different kinds of data heterogeneity, and ways to transform the data to make it homogeneous.
Non-rectangular file formats: JSON, XTAB, NIDX, DKVP¶
For these formats, record-heterogeneity comes naturally:
cat data/het/sparse.json
{ "host": "xy01.east", "status": "running", "volume": "/dev/sda1" } { "host": "xy92.west", "status": "running" } { "purpose": "failover", "host": "xy55.east", "volume": "/dev/sda1", "reimaged": true }
mlr --ijson --onidx --ofs ' ' cat data/het/sparse.json
xy01.east running /dev/sda1 xy92.west running failover xy55.east /dev/sda1 true
mlr --ijson --oxtab cat data/het/sparse.json
host xy01.east status running volume /dev/sda1 host xy92.west status running purpose failover host xy55.east volume /dev/sda1 reimaged true
mlr --ijson --odkvp cat data/het/sparse.json
host=xy01.east,status=running,volume=/dev/sda1 host=xy92.west,status=running purpose=failover,host=xy55.east,volume=/dev/sda1,reimaged=true
Even then, we may wish to put like with like, using the group-like
verb:
mlr --ijson --odkvp cat data/het.json
resource=/path/to/file,loadsec=0.45,ok=true record_count=100,resource=/path/to/file resource=/path/to/second/file,loadsec=0.32,ok=true record_count=150,resource=/path/to/second/file resource=/some/other/path,loadsec=0.97,ok=false
mlr --ijson --odkvp group-like data/het.json
resource=/path/to/file,loadsec=0.45,ok=true resource=/path/to/second/file,loadsec=0.32,ok=true resource=/some/other/path,loadsec=0.97,ok=false record_count=100,resource=/path/to/file record_count=150,resource=/path/to/second/file
Rectangular file formats: CSV and pretty-print¶
CSV and pretty-print formats expect rectangular structure. But Miller lets you process non-rectangular using CSV and pretty-print.
Miller simply prints a newline and a new header when there is a schema change -- where by schema we mean simply the list of record keys in the order they are encountered. When there is no schema change, you get CSV per se as a special case. Likewise, Miller reads heterogeneous CSV or pretty-print input the same way. The difference between CSV and CSV-lite is that the former is RFC-4180-compliant, while the latter readily handles heterogeneous data (which is non-compliant). For example:
cat data/het.json
{ "resource": "/path/to/file", "loadsec": 0.45, "ok": true } { "record_count": 100, "resource": "/path/to/file" } { "resource": "/path/to/second/file", "loadsec": 0.32, "ok": true } { "record_count": 150, "resource": "/path/to/second/file" } { "resource": "/some/other/path", "loadsec": 0.97, "ok": false }
mlr --ijson --opprint cat data/het.json
resource loadsec ok /path/to/file 0.45 true record_count resource 100 /path/to/file resource loadsec ok /path/to/second/file 0.32 true record_count resource 150 /path/to/second/file resource loadsec ok /some/other/path 0.97 false
mlr --ijson --opprint group-like data/het.json
resource loadsec ok /path/to/file 0.45 true /path/to/second/file 0.32 true /some/other/path 0.97 false record_count resource 100 /path/to/file 150 /path/to/second/file
Miller handles explicit header changes as just shown. If your CSV input contains ragged data -- if there are implicit header changes (no intervening blank line and new header line) as seen above -- you can use --allow-ragged-csv-input
(or keystroke-saver --ragged
).
mlr --csv --ragged cat data/het/ragged.csv
a,b,c 1,2,3 4,5, a,b,c,4 7,8,9,10
Processing heterogeneous data¶
Above we saw how to make heterogeneous data homogeneous, and then how to print heterogeneous data. As for other processing, record-heterogeneity is not a problem for Miller.
Miller operates on specified fields and takes the rest along: for example, if
you are sorting on the count
field then all records in the input stream must
have a count
field but the other fields can vary, and moreover the sorted-on
field name(s) don't need to be in the same position on each line:
cat data/sort-het.dkvp
count=500,color=green count=600 status=ok,count=250,hours=0.22 status=ok,count=200,hours=3.4 count=300,color=blue count=100,color=green count=450
mlr sort -n count data/sort-het.dkvp
count=100,color=green status=ok,count=200,hours=3.4 status=ok,count=250,hours=0.22 count=300,color=blue count=450 count=500,color=green count=600


$20 Standard Manicure - Includes cleaning, shaping, light massage and your choice of nail color.
$30 Premium Manicure - Includes cleaning, shaping, deeper massage, scrub and your choice of nail color.
$25 Standard Pedicure - Includes cleaning, shaping, light massage and your choice of nail color.
$35 Premium Pedicure - Includes cleaning, shaping, deeper massage, scrub and your choice of nail color.
$75 Eucalyptic Facial - Includes a very relaxing starter 30 minute facial that will leave your face hydrated and smooth.
$90 Vitamin Facial Wrap - Treat your skin to vitamins it is sure to love. Our 60 minute facial will leave your face feeling refreshed.
$95 Seaweed and Steam Facial - This facial is a calming 60 minute seaweed facial ,which not only calms and soothes the skin but also leaves it looking refreshed and revitalized.
$100 Golden facial - Includes our premium 90 minute facial made to soothe irritated stressed out skin.
$85 45 minute standard massage includes your feet and back and your choice of pressure.
$90 60 minute full body massage includes a calming oil with your choice of preassure.
$100 60 minute deep tissue massage suited for aching bodies. Pressure tends to be harder with this massage.
$175 60 minute couples massage. Treat your significant other, friends or family to a couples massage.
Let our experienced staff take care of your relaxation needs. Book your appointment today.
Appointment189 Eucalyptus Road Madeup Town CA 09876
Monday - Thursday: 8am - 7pm
Friday - Sunday: 8am - 4pm
Phone:<PHONE_NUMBER>
Email<EMAIL_ADDRESS>We are always looking for talented individuals to join our team. We look forward to hearing from you.


Let's Play Ping Pong!
Enter a number and all the numbers from 1 to your number will be displayed, except:
- Numbers divisible by 3 are replaced with "ping"
- Numbers divisible by 5 are replaced with "pong"
- Numbers divisible by 15 are replaced with "pingpong"


+1<PHONE_NUMBER>
Introducing the Ultimate SMS hotline for all your SMS needs
Text it. Search it. is a SMS messaging software that enables users to select from a list of useful commands
to help with their day to day.
Ultra Fast Responsiveness
Using Twilio as a way to send automated messages to clients that request certain information to be sent to them. Messages are personally modified to create a simplistic summary of the information requested. With negligible time difference for the relay of information.
Diversifiction of Services
Our seamless SMS service will allow you to start receiving SMS text in minutes. Simply text our number and instantly gain access to a number of our offered services.
Levelling the Playing Field
Without Cellular Data or WiFi, access to basic services such as day, time, and weather aren't possible. Our mission is to bridge the gap between basic technology and people. We do this by creating a SMS messaging platform that connects users with the right technology to be used on a daily basis.
User Privacy Policy
When clients are using our service, we welcome your business by respecting your privacy. The questions and request that are being sent to our number will be deleted within 24 hours to protect the user's privacy. We acknowledge that the customer always comes first.


public interface Instrumentation
There are two ways to obtain an instance of the
Instrumentation
interface:
When a JVM is launched in a way that indicates an agent
class. In that case an Instrumentation
instance
is passed to the premain
method of the agent class.
When a JVM provides a mechanism to start agents sometime
after the JVM is launched. In that case an Instrumentation
instance is passed to the agentmain
method of the
agent code.
These mechanisms are described in the package specification.
Once an agent acquires an Instrumentation
instance,
the agent may call methods on the instance at any time.
| Modifier and Type | Method and Description |
|---|---|
void |
addTransformer(ClassFileTransformer transformer)
Registers the supplied transformer.
|
void |
addTransformer(ClassFileTransformer transformer,
boolean canRetransform)
Registers the supplied transformer.
|
void |
appendToBootstrapClassLoaderSearch(JarFile jarfile)
Specifies a JAR file with instrumentation classes to be defined by the
bootstrap class loader.
|
void |
appendToSystemClassLoaderSearch(JarFile jarfile)
Specifies a JAR file with instrumentation classes to be defined by the
system class loader.
|
Class[] |
getAllLoadedClasses()
Returns an array of all classes currently loaded by the JVM.
|
Class[] |
getInitiatedClasses(ClassLoader loader)
Returns an array of all classes for which
loader is an initiating loader. |
long |
getObjectSize(Object objectToSize)
Returns an implementation-specific approximation of the amount of storage consumed by
the specified object.
|
boolean |
isModifiableClass(Class<?> theClass)
Determines whether a class is modifiable by
retransformation
or redefinition.
|
boolean |
isNativeMethodPrefixSupported()
Returns whether the current JVM configuration supports
setting a native method prefix.
|
boolean |
isRedefineClassesSupported()
Returns whether or not the current JVM configuration supports redefinition
of classes.
|
boolean |
isRetransformClassesSupported()
Returns whether or not the current JVM configuration supports retransformation
of classes.
|
void |
redefineClasses(ClassDefinition... definitions)
Redefine the supplied set of classes using the supplied class files.
|
boolean |
removeTransformer(ClassFileTransformer transformer)
Unregisters the supplied transformer.
|
void |
retransformClasses(Class<?>... classes)
Retransform the supplied set of classes.
|
void |
setNativeMethodPrefix(ClassFileTransformer transformer,
String prefix)
This method modifies the failure handling of
native method resolution by allowing retry
with a prefix applied to the name.
|
void addTransformer(ClassFileTransformer transformer, boolean canRetransform)
canRetransform
is true,
when they are retransformed.
See ClassFileTransformer.transform
for the order
of transform calls.
If a transformer throws
an exception during execution, the JVM will still call the other registered
transformers in order. The same transformer may be added more than once,
but it is strongly discouraged -- avoid this by creating a new instance of
transformer class.
This method is intended for use in instrumentation, as described in the class specification.
transformer
- the transformer to registercanRetransform
- can this transformer's transformations be retransformedNullPointerException
- if passed a null
transformerUnsupportedOperationException
- if canRetransform
is true and the current configuration of the JVM does not allow
retransformation (isRetransformClassesSupported()
is false)void addTransformer(ClassFileTransformer transformer)
Same as addTransformer(transformer, false)
.
transformer
- the transformer to registerNullPointerException
- if passed a null
transformeraddTransformer(ClassFileTransformer,boolean)
boolean removeTransformer(ClassFileTransformer transformer)
transformer
- the transformer to unregisterNullPointerException
- if passed a null
transformerboolean isRetransformClassesSupported()
Can-Retransform-Classes
manifest attribute is set to
true
in the agent JAR file (as described in the
package specification) and the JVM supports
this capability.
During a single instantiation of a single JVM, multiple calls to this
method will always return the same answer.retransformClasses(java.lang.Class<?>...)
void retransformClasses(Class<?>... classes) throws UnmodifiableClassException
This function facilitates the instrumentation
of already loaded classes.
When classes are initially loaded or when they are
redefined,
the initial class file bytes can be transformed with the
ClassFileTransformer
.
This function reruns the transformation process
(whether or not a transformation has previously occurred).
This retransformation follows these steps:
canRetransform
false, the bytes returned by
transform
during the last class load or redefine are
reused as the output of the transformation; note that this is
equivalent to reapplying the previous transformation, unaltered;
except that
transform
is not called
canRetransform
true, the
transform
method is called in these transformers
The order of transformation is described in the
transform
method.
This same order is used in the automatic reapplication of retransformation
incapable transforms.
The initial class file bytes represent the bytes passed to
ClassLoader.defineClass
or
redefineClasses
(before any transformations
were applied), however they might not exactly match them.
The constant pool might not have the same layout or contents.
The constant pool may have more or fewer entries.
Constant pool entries may be in a different order; however,
constant pool indices in the bytecodes of methods will correspond.
Some attributes may not be present.
Where order is not meaningful, for example the order of methods,
order might not be preserved.
This method operates on a set in order to allow interdependent changes to more than one class at the same time (a retransformation of class A can require a retransformation of class B).
If a retransformed method has active stack frames, those active frames continue to run the bytecodes of the original method. The retransformed method will be used on new invokes.
This method does not cause any initialization except that which would occur under the customary JVM semantics. In other words, redefining a class does not cause its initializers to be run. The values of static variables will remain as they were prior to the call.
Instances of the retransformed class are not affected.
The retransformation may change method bodies, the constant pool and attributes. The retransformation must not add, remove or rename fields or methods, change the signatures of methods, or change inheritance. These restrictions maybe be lifted in future versions. The class file bytes are not checked, verified and installed until after the transformations have been applied, if the resultant bytes are in error this method will throw an exception.
If this method throws an exception, no classes have been retransformed.
This method is intended for use in instrumentation, as described in the class specification.
classes
- array of classes to retransform;
a zero-length array is allowed, in this case, this method does nothingUnmodifiableClassException
- if a specified class cannot be modified
(isModifiableClass(java.lang.Class<?>)
would return false
)UnsupportedOperationException
- if the current configuration of the JVM does not allow
retransformation (isRetransformClassesSupported()
is false) or the retransformation attempted
to make unsupported changesClassFormatError
- if the data did not contain a valid classNoClassDefFoundError
- if the name in the class file is not equal to the name of the classUnsupportedClassVersionError
- if the class file version numbers are not supportedClassCircularityError
- if the new classes contain a circularityLinkageError
- if a linkage error occursNullPointerException
- if the supplied classes array or any of its components
is null
.isRetransformClassesSupported()
,
addTransformer(java.lang.instrument.ClassFileTransformer, boolean)
,
ClassFileTransformer
boolean isRedefineClassesSupported()
Can-Redefine-Classes
manifest attribute is set to
true
in the agent JAR file (as described in the
package specification) and the JVM supports
this capability.
During a single instantiation of a single JVM, multiple calls to this
method will always return the same answer.redefineClasses(java.lang.instrument.ClassDefinition...)
void redefineClasses(ClassDefinition... definitions) throws ClassNotFoundException, UnmodifiableClassException
This method is used to replace the definition of a class without reference
to the existing class file bytes, as one might do when recompiling from source
for fix-and-continue debugging.
Where the existing class file bytes are to be transformed (for
example in bytecode instrumentation)
retransformClasses
should be used.
This method operates on a set in order to allow interdependent changes to more than one class at the same time (a redefinition of class A can require a redefinition of class B).
If a redefined method has active stack frames, those active frames continue to run the bytecodes of the original method. The redefined method will be used on new invokes.
This method does not cause any initialization except that which would occur under the customary JVM semantics. In other words, redefining a class does not cause its initializers to be run. The values of static variables will remain as they were prior to the call.
Instances of the redefined class are not affected.
The redefinition may change method bodies, the constant pool and attributes. The redefinition must not add, remove or rename fields or methods, change the signatures of methods, or change inheritance. These restrictions maybe be lifted in future versions. The class file bytes are not checked, verified and installed until after the transformations have been applied, if the resultant bytes are in error this method will throw an exception.
If this method throws an exception, no classes have been redefined.
This method is intended for use in instrumentation, as described in the class specification.
definitions
- array of classes to redefine with corresponding definitions;
a zero-length array is allowed, in this case, this method does nothingUnmodifiableClassException
- if a specified class cannot be modified
(isModifiableClass(java.lang.Class<?>)
would return false
)UnsupportedOperationException
- if the current configuration of the JVM does not allow
redefinition (isRedefineClassesSupported()
is false) or the redefinition attempted
to make unsupported changesClassFormatError
- if the data did not contain a valid classNoClassDefFoundError
- if the name in the class file is not equal to the name of the classUnsupportedClassVersionError
- if the class file version numbers are not supportedClassCircularityError
- if the new classes contain a circularityLinkageError
- if a linkage error occursNullPointerException
- if the supplied definitions array or any of its components
is null
ClassNotFoundException
- Can never be thrown (present for compatibility reasons only)isRedefineClassesSupported()
,
addTransformer(java.lang.instrument.ClassFileTransformer, boolean)
,
ClassFileTransformer
boolean isModifiableClass(Class<?> theClass)
true
.
If a class is not modifiable then this method returns false
.
For a class to be retransformed, isRetransformClassesSupported()
must also be true.
But the value of isRetransformClassesSupported()
does not influence the value
returned by this function.
For a class to be redefined, isRedefineClassesSupported()
must also be true.
But the value of isRedefineClassesSupported()
does not influence the value
returned by this function.
Primitive classes (for example, java.lang.Integer.TYPE
)
and array classes are never modifiable.
theClass
- the class to check for being modifiableNullPointerException
- if the specified class is null
.retransformClasses(java.lang.Class<?>...)
,
isRetransformClassesSupported()
,
redefineClasses(java.lang.instrument.ClassDefinition...)
,
isRedefineClassesSupported()
Class[] getAllLoadedClasses()
Class[] getInitiatedClasses(ClassLoader loader)
loader
is an initiating loader.
If the supplied loader is null
, classes initiated by the bootstrap class
loader are returned.loader
- the loader whose initiated class list will be returnedlong getObjectSize(Object objectToSize)
objectToSize
- the object to sizeNullPointerException
- if the supplied Object is null
.void appendToBootstrapClassLoaderSearch(JarFile jarfile)
When the virtual machine's built-in class loader, known as the "bootstrap
class loader", unsuccessfully searches for a class, the entries in the JAR file
will be searched as well.
This method may be used multiple times to add multiple JAR files to be searched in the order that this method was invoked.
The agent should take care to ensure that the JAR does not contain any
classes or resources other than those to be defined by the bootstrap
class loader for the purpose of instrumentation.
Failure to observe this warning could result in unexpected
behavior that is difficult to diagnose. For example, suppose there is a
loader L, and L's parent for delegation is the bootstrap class loader.
Furthermore, a method in class C, a class defined by L, makes reference to
a non-public accessor class C$1. If the JAR file contains a class C$1 then
the delegation to the bootstrap class loader will cause C$1 to be defined
by the bootstrap class loader. In this example an IllegalAccessError
will be thrown that may cause the application to fail. One approach to
avoiding these types of issues, is to use a unique package name for the
instrumentation classes.
The Java™ Virtual Machine Specification specifies that a subsequent attempt to resolve a symbolic reference that the Java virtual machine has previously unsuccessfully attempted to resolve always fails with the same error that was thrown as a result of the initial resolution attempt. Consequently, if the JAR file contains an entry that corresponds to a class for which the Java virtual machine has unsuccessfully attempted to resolve a reference, then subsequent attempts to resolve that reference will fail with the same error as the initial attempt.
jarfile
- The JAR file to be searched when the bootstrap class loader
unsuccessfully searches for a class.NullPointerException
- If jarfile
is null
.appendToSystemClassLoaderSearch(java.util.jar.JarFile)
,
ClassLoader
,
JarFile
void appendToSystemClassLoaderSearch(JarFile jarfile)
getSystemClassLoader()
)
unsuccessfully searches for a class, the entries in the JarFile
will be searched as well.
This method may be used multiple times to add multiple JAR files to be searched in the order that this method was invoked.
The agent should take care to ensure that the JAR does not contain any
classes or resources other than those to be defined by the system class
loader for the purpose of instrumentation.
Failure to observe this warning could result in unexpected
behavior that is difficult to diagnose (see
appendToBootstrapClassLoaderSearch
).
The system class loader supports adding a JAR file to be searched if
it implements a method named appendToClassPathForInstrumentation
which takes a single parameter of type java.lang.String
. The
method is not required to have public
access. The name of
the JAR file is obtained by invoking the getName()
method on the jarfile
and this is provided as the
parameter to the appendToClassPathForInstrumentation
method.
The Java™ Virtual Machine Specification specifies that a subsequent attempt to resolve a symbolic reference that the Java virtual machine has previously unsuccessfully attempted to resolve always fails with the same error that was thrown as a result of the initial resolution attempt. Consequently, if the JAR file contains an entry that corresponds to a class for which the Java virtual machine has unsuccessfully attempted to resolve a reference, then subsequent attempts to resolve that reference will fail with the same error as the initial attempt.
This method does not change the value of java.class.path
system property
.
jarfile
- The JAR file to be searched when the system class loader
unsuccessfully searches for a class.UnsupportedOperationException
- If the system class loader does not support appending a
a JAR file to be searched.NullPointerException
- If jarfile
is null
.appendToBootstrapClassLoaderSearch(java.util.jar.JarFile)
,
ClassLoader.getSystemClassLoader()
,
JarFile
boolean isNativeMethodPrefixSupported()
Can-Set-Native-Method-Prefix
manifest attribute is set to
true
in the agent JAR file (as described in the
package specification) and the JVM supports
this capability.
During a single instantiation of a single JVM, multiple
calls to this method will always return the same answer.setNativeMethodPrefix(java.lang.instrument.ClassFileTransformer, java.lang.String)
void setNativeMethodPrefix(ClassFileTransformer transformer, String prefix)
ClassFileTransformer
,
it enables native methods to be
instrumented.
Since native methods cannot be directly instrumented (they have no bytecodes), they must be wrapped with a non-native method which can be instrumented. For example, if we had:
native boolean foo(int x);
We could transform the class file (with the ClassFileTransformer during the initial definition of the class) so that this becomes:
boolean foo(int x) { ... record entry to foo ... return wrapped_foo(x); } native boolean wrapped_foo(int x);
Where foo
becomes a wrapper for the actual native
method with the appended prefix "wrapped_". Note that
"wrapped_" would be a poor choice of prefix since it
might conceivably form the name of an existing method
thus something like "$$$MyAgentWrapped$$$_" would be
better but would make these examples less readable.
The wrapper will allow data to be collected on the native
method call, but now the problem becomes linking up the
wrapped method with the native implementation.
That is, the method wrapped_foo
needs to be
resolved to the native implementation of foo
,
which might be:
Java_somePackage_someClass_foo(JNIEnv* env, jint x)
This function allows the prefix to be specified and the
proper resolution to occur.
Specifically, when the standard resolution fails, the
resolution is retried taking the prefix into consideration.
There are two ways that resolution occurs, explicit
resolution with the JNI function RegisterNatives
and the normal automatic resolution. For
RegisterNatives
, the JVM will attempt this
association:
method(foo) -> nativeImplementation(foo)
When this fails, the resolution will be retried with the specified prefix prepended to the method name, yielding the correct resolution:
method(wrapped_foo) -> nativeImplementation(foo)
For automatic resolution, the JVM will attempt:
method(wrapped_foo) -> nativeImplementation(wrapped_foo)
When this fails, the resolution will be retried with the specified prefix deleted from the implementation name, yielding the correct resolution:
method(wrapped_foo) -> nativeImplementation(foo)
Note that since the prefix is only used when standard resolution fails, native methods can be wrapped selectively.
Since each ClassFileTransformer
can do its own transformation of the bytecodes, more
than one layer of wrappers may be applied. Thus each
transformer needs its own prefix. Since transformations
are applied in order, the prefixes, if applied, will
be applied in the same order
(see addTransformer
).
Thus if three transformers applied
wrappers, foo
might become
$trans3_$trans2_$trans1_foo
. But if, say,
the second transformer did not apply a wrapper to
foo
it would be just
$trans3_$trans1_foo
. To be able to
efficiently determine the sequence of prefixes,
an intermediate prefix is only applied if its non-native
wrapper exists. Thus, in the last example, even though
$trans1_foo
is not a native method, the
$trans1_
prefix is applied since
$trans1_foo
exists.
transformer
- The ClassFileTransformer which wraps using this prefix.prefix
- The prefix to apply to wrapped native methods when
retrying a failed native method resolution. If prefix
is either null
or the empty string, then
failed native method resolutions are not retried for
this transformer.NullPointerException
- if passed a null
transformer.UnsupportedOperationException
- if the current configuration of
the JVM does not allow setting a native method prefix
(isNativeMethodPrefixSupported()
is false).IllegalArgumentException
- if the transformer is not registered
(see addTransformer
).Dracula Javadoc Sample, Made with Allan Im.


Toggle navigation
Project name
Home
About
Contact
Login Form
Welcome
Errors go here
Page content goes here


What is fiat?
It's the latin word for order or authorization
What is fiat?
It's the latin word for order or authorization
Fiat Currency
Euro, US Dollars, British Pound, Indian Rupee, ...
What is money
A good purchased not to be consumed or invested but to be exchanged
for other goods
Rai Stones
Aggry Beads
Sea Shells
Good Money
- Salable across Time
- Salable across Space
Good Money
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
- Salable across Space
- Salable across Scale
- Salable across Time
- Salable across Space
- Salable across Scale
Gold IOU's
- Salable across Time
- Salable across Space
- Salable across Scale
Gold IOU's
Euro, US Dollar, COLOMBIAN PESOS, etc
- Salable across Time
- Salable across Space
- Salable across Scale
Gold IOU's
Euro, US Dollar, COLOMBIAN PESOS, etc
- Salable across Time
- Salable across Space
- Salable across Scale
Then there was bitcoin
- Salable across Time
- Salable across Space
- Salable across Scale
Salable across Time
- Fixed production rate which is reduced every 4 years
- Maximum amount of 21,000,000 Bitcoins
Salable across Time
- Fixed production rate which is reduced every 4 years
- Maximum amount of 21,000,000 Bitcoins
Salable across Space
- Has no borders
- Can be sent from one corner of earth to the other at the click of a button
Salable across Scale
- 1 bitcoin = 100,000,000 satoshis
- Infinitely divisable
The world has begun to realize it's true potential


Assembly Block
Marked by assembly { ... }
pragma solidity ^0.6.1;
contract Hello {
function SayHi() {
assembly {
// assembly code here
}
}
}
## Comments
- Use the // or /* */ to denote comments
```
assembly {
// this is a comment
/* this is a multiline
* comment
*/
}
```
If
- Conditionally execute code
- No “else” block
if eq(value, 0) { value := 3 }
### Switch
- Similar to "if", but with more branching options
- Fallback or default case: `default`
- No fall through to following cases
```
assembly {
switch x
case 0 { x := 1 }
default { x := add(x,1) }
}
```
### Loop
- Repeat operations
- break: exit the Loop
- continue: skip to next iteration
```
function lo(uint max) public pure returns(uint result) {
assembly {
for { let i := 0 } lt(i, 20) { i := add(i, 1) } {
if lt(i,3) { continue }
if gt(i, max) { break }
result := add(result,1)
}
}
}
```
OpCode
OpCode (Operation Code) is a machine instruction that specifies the operation to be performed - Wikipedia
extcodehash
- Used in openzeppelin IsContract()
utilitity
- Returns the code hash of a contract
assembly { codehash := extcodehash(accountAddress) }
### Data Sanity
- If you access variables of a type that spans less than 256 bits (e.g. uint64, address, bytes16 or byte),
bits not part of the type, may not be `zeroed`
- Always clear data before using it
```
uint32 x = f();
assembly {
x := and(x, 0xffffffff)
/* now use x */
}
```
### Two's Complement
- Used in EVM
- Same arithmetic for signed and unsigned
- No negative 0
### Signed Functions
- Use to process signed data
- sdiv(), smod(), slt(), sgt(), sar(), signextend()
- Would x be 100 or 99 from the following code?
```
int a = -3;
assembly {
let x := 100
if lt(a, 0) {
x := 99
}
}
```
Gas Fee
- Fee schedule in Ethereum Yellow Paper
- Some opcodes are more expensive than others
- e.g. multiplication costs 5 gas; shift left costs 3 gas
### Benefits of Inline Assembly
- Code could be more gas efficient
- Bypass Solidity safety checks
- Less code, less gas fee
- Some operations only available in assembly


ioctl_console - ioctls for console terminal and virtual consoles
The following Linux-specific ioctl(2) requests are supported for console
terminals and virtual consoles. Each requires a third argument, assumed here
to be argp.
- KDGETLED
- Get state of LEDs. argp points to a char. The lower three
bits of *argp are set to the state of the LEDs, as follows:
| LED_CAP |
0x04 |
caps lock led |
| LED_NUM |
0x02 |
num lock led |
| LED_SCR |
0x01 |
scroll lock led |
- KDSETLED
- Set the LEDs. The LEDs are set to correspond to the lower three bits of
the unsigned long integer in argp. However, if a higher order bit
is set, the LEDs revert to normal: displaying the state of the keyboard
functions of caps lock, num lock, and scroll lock.
Before Linux 1.1.54, the LEDs just reflected the state of the
corresponding keyboard flags, and KDGETLED/KDSETLED would also change the
keyboard flags. Since Linux 1.1.54 the LEDs can be made to display arbitrary
information, but by default they display the keyboard flags. The following
two ioctls are used to access the keyboard flags.
- KDGKBLED
- Get keyboard flags CapsLock, NumLock, ScrollLock (not lights). argp
points to a char which is set to the flag state. The low order three bits
(mask 0x7) get the current flag state, and the low order bits of the next
nibble (mask 0x70) get the default flag state. (Since Linux 1.1.54.)
- KDSKBLED
- Set keyboard flags CapsLock, NumLock, ScrollLock (not lights). argp
is an unsigned long integer that has the desired flag state. The low order
three bits (mask 0x7) have the flag state, and the low order bits of the
next nibble (mask 0x70) have the default flag state. (Since Linux
1.1.54.)
- KDGKBTYPE
- Get keyboard type. This returns the value KB_101, defined as 0x02.
- KDADDIO
- Add I/O port as valid. Equivalent to ioperm(arg,1,1).
- KDDELIO
- Delete I/O port as valid. Equivalent to ioperm(arg,1,0).
- KDENABIO
- Enable I/O to video board. Equivalent to ioperm(0x3b4, 0x3df-0x3b4+1,
1).
- KDDISABIO
- Disable I/O to video board. Equivalent to ioperm(0x3b4, 0x3df-0x3b4+1,
0).
- KDSETMODE
- Set text/graphics mode. argp is an unsigned integer containing one
of:
| KD_TEXT |
0x00 |
| KD_GRAPHICS |
0x01 |
- KDGETMODE
- Get text/graphics mode. argp points to an int which is set
to one of the values shown above for KDSETMODE.
- KDMKTONE
- Generate tone of specified length. The lower 16 bits of the unsigned long
integer in argp specify the period in clock cycles, and the upper
16 bits give the duration in msec. If the duration is zero, the sound is
turned off. Control returns immediately. For example, argp =
(125<<16) + 0x637 would specify the beep normally associated with a
ctrl-G. (Thus since Linux 0.99pl1; broken in Linux 2.1.49-50.)
- KIOCSOUND
- Start or stop sound generation. The lower 16 bits of argp specify
the period in clock cycles (that is, argp = 1193180/frequency).
argp = 0 turns sound off. In either case, control returns
immediately.
- GIO_CMAP
- Get the current default color map from kernel. argp points to a
48-byte array. (Since Linux 1.3.3.)
- PIO_CMAP
- Change the default text-mode color map. argp points to a 48-byte
array which contains, in order, the Red, Green, and Blue values for the 16
available screen colors: 0 is off, and 255 is full intensity.  (Since Linux
1.3.3.)
- GIO_FONT
- Gets 256-character screen font in expanded form. argp points to an
8192-byte array. Fails with error code EINVAL if the currently
loaded font is a 512-character font, or if the console is not in text
mode.
- GIO_FONTX
- Gets screen font and associated information. argp points to a
struct consolefontdesc (see PIO_FONTX). On call, the
charcount field should be set to the maximum number of characters
that would fit in the buffer pointed to by chardata. On return, the
charcount and charheight are filled with the respective data
for the currently loaded font, and the chardata array contains the
font data if the initial value of charcount indicated enough space
was available; otherwise the buffer is untouched and errno is set
to ENOMEM. (Since Linux 1.3.1.)
- PIO_FONT
- Sets 256-character screen font. Load font into the EGA/VGA character
generator. argp points to an 8192-byte map, with 32 bytes per
character. Only the first N of them are used for an 8xN font
(0 < N <= 32). This call also invalidates the Unicode
mapping.
- PIO_FONTX
- Sets screen font and associated rendering information. argp points
to a
-
struct consolefontdesc {
unsigned short charcount; /* characters in font
(256 or 512) */
unsigned short charheight; /* scan lines per
character (1-32) */
char *chardata; /* font data in
expanded form */
};
- If necessary, the screen will be appropriately resized, and
SIGWINCH sent to the appropriate processes. This call also
invalidates the Unicode mapping. (Since Linux 1.3.1.)
- PIO_FONTRESET
- Resets the screen font, size and Unicode mapping to the bootup defaults.
argp is unused, but should be set to NULL to ensure compatibility
with future versions of Linux. (Since Linux 1.3.28.)
- GIO_SCRNMAP
- Get screen mapping from kernel. argp points to an area of size
E_TABSZ, which is loaded with the font positions used to display each
character. This call is likely to return useless information if the
currently loaded font is more than 256 characters.
- GIO_UNISCRNMAP
- Get full Unicode screen mapping from kernel. argp points to an area
of size E_TABSZ*sizeof(unsigned short), which is loaded with the
Unicodes each character represent. A special set of Unicodes, starting at
U+F000, are used to represent "direct to font" mappings. (Since
Linux 1.3.1.)
- PIO_SCRNMAP
- Loads the "user definable" (fourth) table in the kernel which
maps bytes into console screen symbols. argp points to an area of
size E_TABSZ.
- PIO_UNISCRNMAP
- Loads the "user definable" (fourth) table in the kernel which
maps bytes into Unicodes, which are then translated into screen symbols
according to the currently loaded Unicode-to-font map. Special Unicodes
starting at U+F000 can be used to map directly to the font symbols. (Since
Linux 1.3.1.)
- GIO_UNIMAP
- Get Unicode-to-font mapping from kernel. argp points to a
-
struct unimapdesc {
unsigned short entry_ct;
struct unipair *entries;
};
- where entries points to an array of
-
struct unipair {
unsigned short unicode;
unsigned short fontpos;
};
- (Since Linux 1.1.92.)
- PIO_UNIMAP
- Put unicode-to-font mapping in kernel. argp points to a struct
unimapdesc. (Since Linux 1.1.92)
- PIO_UNIMAPCLR
- Clear table, possibly advise hash algorithm. argp points to a
-
struct unimapinit {
unsigned short advised_hashsize; /* 0 if no opinion */
unsigned short advised_hashstep; /* 0 if no opinion */
unsigned short advised_hashlevel; /* 0 if no opinion */
};
- (Since Linux 1.1.92.)
- KDGKBMODE
- Gets current keyboard mode. argp points to a long which is
set to one of these:
| K_RAW |
0x00 /* Raw (scancode) mode */ |
| K_XLATE |
0x01 /* Translate keycodes using keymap */ |
| K_MEDIUMRAW |
0x02 /* Medium raw (scancode) mode */ |
| K_UNICODE |
0x03 /* Unicode mode */ |
| K_OFF |
0x04 /* Disabled mode; since Linux 2.6.39 */ |
- KDSKBMODE
- Sets current keyboard mode. argp is a long equal to one of
the values shown for KDGKBMODE.
- KDGKBMETA
- Gets meta key handling mode. argp points to a long which is
set to one of these:
| K_METABIT |
0x03 |
set high order bit |
| K_ESCPREFIX |
0x04 |
escape prefix |
- KDSKBMETA
- Sets meta key handling mode. argp is a long equal to one of
the values shown above for KDGKBMETA.
- KDGKBENT
- Gets one entry in key translation table (keycode to action code).
argp points to a
-
struct kbentry {
unsigned char kb_table;
unsigned char kb_index;
unsigned short kb_value;
};
- with the first two members filled in: kb_table selects the key
table (0 <= kb_table < MAX_NR_KEYMAPS), and kb_index
is the keycode (0 <= kb_index < NR_KEYS). kb_value is
set to the corresponding action code, or K_HOLE if there is no such key,
or K_NOSUCHMAP if kb_table is invalid.
- KDSKBENT
- Sets one entry in translation table. argp points to a struct
kbentry.
- KDGKBSENT
- Gets one function key string. argp points to a
-
struct kbsentry {
unsigned char kb_func;
unsigned char kb_string[512];
};
- kb_string is set to the (null-terminated) string corresponding to
the kb_functh function key action code.
- KDSKBSENT
- Sets one function key string entry. argp points to a struct
kbsentry.
- KDGKBDIACR
- Read kernel accent table. argp points to a
-
struct kbdiacrs {
unsigned int kb_cnt;
struct kbdiacr kbdiacr[256];
};
- where kb_cnt is the number of entries in the array, each of which
is a
-
struct kbdiacr {
unsigned char diacr;
unsigned char base;
unsigned char result;
};
- KDGETKEYCODE
- Read kernel keycode table entry (scan code to keycode). argp points
to a
-
struct kbkeycode {
unsigned int scancode;
unsigned int keycode;
};
- keycode is set to correspond to the given scancode. (89
<= scancode <= 255 only. For 1 <= scancode <=
88, keycode==scancode.) (Since Linux 1.1.63.)
- KDSETKEYCODE
- Write kernel keycode table entry. argp points to a struct
kbkeycode. (Since Linux 1.1.63.)
- KDSIGACCEPT
- The calling process indicates its willingness to accept the signal
argp when it is generated by pressing an appropriate key
combination. (1 <= argp <= NSIG). (See spawn_console()
in linux/drivers/char/keyboard.c.)
- VT_OPENQRY
- Returns the first available (non-opened) console. argp points to an
int which is set to the number of the vt (1 <= *argp
<= MAX_NR_CONSOLES).
- VT_GETMODE
- Get mode of active vt. argp points to a
-
struct vt_mode {
char mode; /* vt mode */
char waitv; /* if set, hang on writes if not active */
short relsig; /* signal to raise on release req */
short acqsig; /* signal to raise on acquisition */
short frsig; /* unused (set to 0) */
};
- which is set to the mode of the active vt. mode is set to one of
these values:
| VT_AUTO |
auto vt switching |
| VT_PROCESS |
process controls switching |
| VT_ACKACQ |
acknowledge switch |
- VT_SETMODE
- Set mode of active vt. argp points to a struct vt_mode.
- VT_GETSTATE
- Get global vt state info. argp points to a
-
struct vt_stat {
unsigned short v_active; /* active vt */
unsigned short v_signal; /* signal to send */
unsigned short v_state; /* vt bit mask */
};
- For each vt in use, the corresponding bit in the v_state member is
set. (Kernels 1.0 through 1.1.92.)
- VT_RELDISP
- Release a display.
- VT_ACTIVATE
- Switch to vt argp (1 <= argp <= MAX_NR_CONSOLES).
- VT_WAITACTIVE
- Wait until vt argp has been activated.
- VT_DISALLOCATE
- Deallocate the memory associated with vt argp. (Since Linux
1.1.54.)
- VT_RESIZE
- Set the kernel's idea of screensize. argp points to a
-
struct vt_sizes {
unsigned short v_rows; /* # rows */
unsigned short v_cols; /* # columns */
unsigned short v_scrollsize; /* no longer used */
};
- Note that this does not change the videomode. See resizecons(8).
(Since Linux 1.1.54.)
- VT_RESIZEX
- Set the kernel's idea of various screen parameters. argp points to
a
-
struct vt_consize {
unsigned short v_rows; /* number of rows */
unsigned short v_cols; /* number of columns */
unsigned short v_vlin; /* number of pixel rows
on screen */
unsigned short v_clin; /* number of pixel rows
per character */
unsigned short v_vcol; /* number of pixel columns
on screen */
unsigned short v_ccol; /* number of pixel columns
per character */
};
- Any parameter may be set to zero, indicating "no change", but if
multiple parameters are set, they must be self-consistent. Note that this
does not change the videomode. See resizecons(8). (Since Linux
1.3.3.)
The action of the following ioctls depends on the first byte in
the struct pointed to by argp, referred to here as the
subcode. These are legal only for the superuser or the owner of the
current terminal.
- TIOCLINUX, subcode=0
- Dump the screen. Disappeared in Linux 1.1.92. (With kernel 1.1.92 or
later, read from /dev/vcsN or /dev/vcsaN instead.)
- TIOCLINUX, subcode=1
- Get task information. Disappeared in Linux 1.1.92.
- TIOCLINUX, subcode=2
- Set selection. argp points to a
-
struct {
char subcode;
short xs, ys, xe, ye;
short sel_mode;
};
- xs and ys are the starting column and row. xe and
ye are the ending column and row. (Upper left corner is
row=column=1.) sel_mode is 0 for character-by-character selection,
1 for word-by-word selection, or 2 for line-by-line selection. The
indicated screen characters are highlighted and saved in the static array
sel_buffer in devices/char/console.c.
- TIOCLINUX, subcode=3
- Paste selection. The characters in the selection buffer are written to
fd.
- TIOCLINUX, subcode=4
- Unblank the screen.
- TIOCLINUX, subcode=5
- Sets contents of a 256-bit look up table defining characters in a
"word", for word-by-word selection. (Since Linux 1.1.32.)
- TIOCLINUX, subcode=6
- argp points to a char which is set to the value of the kernel
variable shift_state. (Since Linux 1.1.32.)
- TIOCLINUX, subcode=7
- argp points to a char which is set to the value of the kernel
variable report_mouse. (Since Linux 1.1.33.)
- TIOCLINUX, subcode=8
- Dump screen width and height, cursor position, and all the
character-attribute pairs. (Kernels 1.1.67 through 1.1.91 only. With
kernel 1.1.92 or later, read from /dev/vcsa* instead.)
- TIOCLINUX, subcode=9
- Restore screen width and height, cursor position, and all the
character-attribute pairs. (Kernels 1.1.67 through 1.1.91 only. With
kernel 1.1.92 or later, write to /dev/vcsa* instead.)
- TIOCLINUX, subcode=10
- Handles the Power Saving feature of the new generation of monitors. VESA
screen blanking mode is set to argp[1], which governs what screen
blanking does:
- 0:
- Screen blanking is disabled.
- 1:
- The current video adapter register settings are saved, then the controller
is programmed to turn off the vertical synchronization pulses. This puts
the monitor into "standby" mode. If your monitor has an Off_Mode
timer, then it will eventually power down by itself.
- 2:
- The current settings are saved, then both the vertical and horizontal
synchronization pulses are turned off. This puts the monitor into
"off" mode.  (Caution: Powering down
frequently will damage the monitor.) (Since Linux 1.1.76.)
On success, 0 is returned. On error, -1 is returned, and errno is set.
errno may take on these values:
- EBADF
- The file descriptor is invalid.
- EINVAL
- The file descriptor or argp is invalid.
- ENOTTY
- The file descriptor is not associated with a character special device, or
the specified request does not apply to it.
- EPERM
- Insufficient permission.
Warning: Do not regard this man page as documentation of the Linux
console ioctls. This is provided for the curious only, as an alternative to
reading the source. Ioctl's are undocumented Linux internals, liable to be
changed without warning. (And indeed, this page more or less describes the
situation as of kernel version 1.1.94; there are many minor and not-so-minor
differences with earlier versions.)
Very often, ioctls are introduced for communication between the
kernel and one particular well-known program (fdisk, hdparm, setserial,
tunelp, loadkeys, selection, setfont, etc.), and their behavior will be
changed when required by this particular program.
Programs using these ioctls will not be portable to other versions
of UNIX, will not work on older versions of Linux, and will not work on
future versions of Linux.
Use POSIX functions.
dumpkeys(1), kbd_mode(1), loadkeys(1), mknod(1),
setleds(1), setmetamode(1), execve(2), fcntl(2),
ioctl_tty(2), ioperm(2), termios(3),
console_codes(4), mt(4), sd(4), tty(4),
ttyS(4), vcs(4), vcsa(4), charsets(7),
mapscrn(8), resizecons(8), setfont(8)
/usr/include/linux/kd.h, /usr/include/linux/vt.h
This page is part of release 5.05 of the Linux man-pages project. A
description of the project, information about reporting bugs, and the latest
version of this page, can be found at https://www.kernel.org/doc/man-pages/.


[gecode-users] Adding constraints to model in <RBS>: is there any example code?
Dirk Obermann
dirk.obermann67 at gmail.com
Tue Apr 11 13:34:00 CEST 2017
Hello -
I am trying to do program up a search engine that performs sequential
refinement by adding more and more constraints to a model. In the first
run, I am happy with a solution at all, but then I want to add increasingly
complex constraints until there is no more solution (or the search engine
times out).
Now, I first run a model with a single constraint. If DFS can find a
solution, then I run a completely new model with two constraints and from
scratch. If this model is feasible, then I run the model with three
constraints, etc.
In principle, this solution works, but it is a very inefficient: a lot of
time is spent generating the first feasible solution when restarting the
search (especially as the problem becomes more constrained).
It seems to me that this should be doable with RBS or a variation of the
LDS engine, as described in the MPG. But there are very few examples to
follow (the closest I found was this question posted on stack overflow
http://stackoverflow.com/questions/34182681/how-to-change-the-variable-value-ordering-in-gecodes-restart-based-search
but unfortunately it does not contain any answer). I simply cannot
understand how to do it right. In particular, where do I post additional
constraint on the model (in the master space, the slave space or
elsewhere)?
Any leads on how to do it, or links to code that adds constraints or
changes branching order in RBS would be appreciated!
Cheers,
Dirk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gecode.org/pipermail/users/attachments/20170411/20ea486d/attachment.html>
More information about the users
mailing list


St Catherine's Hospice says Don’t Judge A Book By Its Cover and volunteer at its Chorley book shop
by Natalie WalkerBook worms are discovering new authors and genres at the St Catherine’s Hospice charity book shop in Chorley town centre.
Book worms are discovering new authors and genres at the St Catherine’s Hospice charity book shop in Chorley town centre.
Following a small refurbishment, the popular book store is now open on Saturday mornings and has even more novels, non-fiction, children’s books, cook books and more stocked on its shelves.
And with a new Don’t Judge A Book By Its Cover initiative - which offers customers a chance to take home a ‘surprise’ covered-up book to help them get out of a reading rut - it is proving to be the go-to place for book lovers to stock up on their winter reads all whilst supporting the amazing work of St Catherine’s Hospice.
The St Catherine’s Chorley book shop is located next to the bus station in Chapel Street, and is open Tuesday to Friday from 10am until 4pm, and on Saturdays from 10am until 1pm.
If you would like to volunteer at the shop and help the charity open its doors on Saturday afternoons and on Mondays, visit www.stcatherines.co.uk or call 01772 629171.


Home
Product Entry
Product Verification
Ownership Updation
Log In
Admin LogIn
Welcome
An online platform for helping farmers to get the quality assurance of crops


The basic principle driving fractal generation of time series is that data is generated iteratively based on increasing levels of resolution. The initial series is defined by a so-called initiator pattern and then generators are used to replace each segment of the initial pattern. Regular, repeatable patterns can be produced by using the same seed and generators. By using a set of generators, non-repeatable time series can be produced. This technique is the basis of the fractal time series process in this package.
| Version: | 1.1.0 |
| Depends: | futile.any (≥ 1.3.0), futile.logger (≥ 1.3.0), timeDate, quantmod |
| Published: | 2013-02-05 |
| Author: | Brian Lee Yung Rowe |
| Maintainer: | Brian Lee Yung Rowe <r at zatonovo.com> |
| License: | GPL-3 |
| NeedsCompilation: | no |
| In views: | TimeSeries |
| CRAN checks: | fractalrock results |
| Reference manual: | fractalrock.pdf |
| Package source: | fractalrock_1.1.0.tar.gz |
| Windows binaries: | r-devel: fractalrock_1.1.0.zip, r-release: fractalrock_1.1.0.zip, r-oldrel: fractalrock_1.1.0.zip |
| OS X binaries: | r-release: fractalrock_1.1.0.tgz, r-oldrel: fractalrock_1.1.0.tgz |
| Old sources: | fractalrock archive |
Please use the canonical form https://CRAN.R-project.org/package=fractalrock to link to this page.


Kogi, Bayelsa elections have destroyed Nigerians’ hope in democracy – PDP
by Success Nwogu*Says Nigeria sliding back to dictatorship
Success Nwogu, Abuja
The Peoples Democratic Party on Sunday said the conduct and outcome of the November 16 governorship elections in Kogi and Bayelsa States have destroyed the hope Nigerians had in democratic practice.
The party stated that Nigerians and the entire world watched in horror as the All Progressives Congress-led government trampled the nation’s democracy under foot with an utmost impunity that can only be obtainable in Hitler’s Germany and Samuel Doe’s Liberia, where the lives and rights of citizens meant nothing to suppressive power mongers.
The PDP National Publicity Secretary, Mr. Kola Ologbondiyan, in a statement also said citizens agonised as APC-controlled security forces allegedly aided armed hoodlums to invade polling centres, shoot and kill innocent citizens.
He also alleged that the thugs also carted ballot boxes, stuffed them with already thumb printed ballot papers allegedly in favour of APC.
He further alleged that, after the results were allegedly allocated to the APC and handed over to an alleged compromised Independent National Electoral Commission to announce against the will of the people.