About
(current)
Schedule
(current)
News
(current)
Text data source
(current)
Flag pictures source
(current)
Made by Ionut Alixandroae with ArcGIS JS API 4.x
(current)


Packages a JAR file into a compressed pack200 file for web deployment.
pack200 [options] output-file JAR-file
Options can be in any order. The last option on the command line or in a properties file supersedes all previously specified options.
The command-line options. See Options.
Name of the output file.
Name of the input file.
The pack200
command is a Java application that transforms a JAR file into a compressed pack200 file with the Java gzip compressor. The pack200 files are highly compressed files that can be directly deployed to save bandwidth and reduce download time.
The pack200
command has several options to fine-tune and set the compression engine. The typical usage is shown in the following example, where myarchive.pack.gz
is produced with the default pack200
command settings:
pack200 myarchive.pack.gz myarchive.jar
Produces a JAR file by packing and unpacking a JAR file. The resulting file can be used as an input to the jarsigner
(1) tool. The following example packs and unpacks the myarchive.jar file:
pack200 --repack myarchive-packer.jar myarchive.jar pack200 --repack myarchive.jar
The following example preserves the order of files in the input file.
Produces a pack200
file. With this option, a suitable compressor must be used, and the target system must use a corresponding decompresser.
pack200 --no-gzip myarchive.pack myarchive.jar
Strips debugging attributes from the output. These include SourceFile
, LineNumberTable
, LocalVariableTable
and LocalVariableTypeTable
. Removing these attributes reduces the size of both downloads and installations, but reduces the usefulness of debuggers.
Preserve the order of files in the input file. This is the default behavior.
The packer reorders and transmits all elements. The packer can also remove JAR directory names to reduce the download size. However, certain JAR file optimizations, such as indexing, might not work correctly.
The value is the estimated target size N (in bytes) of each archive segment. If a single input file requires more than N bytes, then its own archive segment is provided. As a special case, a value of -1
produces a single large segment with all input files, while a value of 0 produces one segment for each class. Larger archive segments result in less fragmentation and better compression, but processing them requires more memory.
The size of each segment is estimated by counting the size of each input file to be transmitted in the segment with the size of its name and other transmitted properties.
The default is -1, which means that the packer creates a single segment output file. In cases where extremely large output files are generated, users are strongly encouraged to use segmenting or break up the input file into smaller JARs.
A 10 MB JAR packed without this limit typically packs about 10 percent smaller, but the packer might require a larger Java heap (about 10 times the segment limit).
If the value is set to a single decimal digit, then the packer uses the indicated amount of effort in compressing the archive. Level 1 might produce somewhat larger size and faster compression speed, while level 9 takes much longer, but can produce better compression. The special value 0 instructs the pack200
command to copy through the original JAR file directly with no compression. The JSR 200 standard requires any unpacker to understand this special case as a pass-through of the entire archive.
The default is 5, to invest a modest amount of time to produce reasonable compression.
Overrides the default, which preserves the input information, but can cause the transmitted archive to be larger. The possible values are: true
, false
, or keep
.
If the value
is true
or false, then the packer200
command sets the deflation hint accordingly in the output archive and does not transmit the individual deflation hints of archive elements.
The keep
value preserves deflation hints observed in the input JAR. This is the default.
The possible values are latest
and keep
.
If the value is latest, then the packer attempts to determine the latest modification time, among all the available entries in the original archive, or the latest modification time of all the available entries in that segment. This single value is transmitted as part of the segment and applied to all the entries in each segment. This can marginally decrease the transmitted size of the archive at the expense of setting all installed files to a single date.
If the value is keep
, then modification times observed in the input JAR are preserved. This is the default.
Indicates that a file should be passed through bytewise with no compression. By repeating the option, multiple files can be specified. There is no pathname transformation, except that the system file separator is replaced by the JAR file separator forward slash (/). The resulting file names must match exactly as strings with their occurrences in the JAR file. If file
is a directory name, then all files under that directory are passed.
Overrides the default behavior, which means that the class file that contains the unknown attribute is passed through with the specified action
. The possible values for actions are error
, strip
, or pass
.
If the value is error
, then the entire pack200
command operation fails with a suitable explanation.
If the value is strip
, then the attribute is dropped. Removing the required Java Virtual Machine (JVM) attributes can cause class loader failures.
If the value is pass
, then the entire class is transmitted as though it is a resource.
See next option.
See next option.
See next option.
With the previous four options, the attribute layout can be specified for a class entity, such as class-attribute
, field-attribute
, method-attribute
, and code-attribute
. The attribute-name is the name of the attribute for which the layout or action is being defined. The possible values for action are some-layout-string
, error
, strip
, pass
.
some-layout-string
: The layout language is defined in the JSR 200 specification, for example: --class-attribute=SourceFile=RUH
.
If the value is error
, then the pack200
operation fails with an explanation.
If the value is strip
, then the attribute is removed from the output. Removing JVM-required attributes can cause class loader failures. For example, --class-attribute=CompilationID=pass
causes the class file that contains this attribute to be passed through without further action by the packer.
If the value is pass
, then the entire class is transmitted as though it is a resource.
A configuration file, containing Java properties to initialize the packer, can be specified on the command line.
pack200 -f pack.properties myarchive.pack.gz myarchive.jar more pack.properties # Generic properties for the packer. modification.time=latest deflate.hint=false keep.file.order=false # This option will cause the files bearing new attributes to # be reported as an error rather than passed uncompressed. unknown.attribute=error # Change the segment limit to be unlimited. segment.limit=-1
Outputs minimal messages. Multiple specification of this option will create more verbose messages.
Specifies quiet operation with no messages.
Specifies a log file to output messages.
Prints help information about this command.
Prints version information about this command.
Passes the specified option to the Java Virtual Machine. For more information, see the reference page for the java
(1) command. For example, -J-Xms48m
sets the startup memory to 48 MB.
The following exit values are returned: 0 for successful completion and a number greater than 0 when an error occurs.


Learning Objectives
Upon completion of this lesson students will be able to:
- Describe the evolution of gene manipulation
- Describe how PCR works
- Describe how DNA can be sequenced
- Describe the function of restriction enzymes
- Define recombinant DNA
- Describe how DNA fingerprinting works


Hi! I'm a UX Designer based out of New Delhi. I strive to build beautiful experiences for people. An avid researcher, I also have an eye for aesthetics. Apart from design, I spend my time in unwarranted contemplation, watching Roger Federer and Manchester United, and reading books. Check out my projects below.


Simpler. Please.
Enough Inference, But Not Too Much
"As complexity rises, precise statements lose meaning and meaningful statements lose precision."
-- Lofti Zadeh
"Simplicity is the ultimate form of sophistication."
-- Leonardo da Vinci
"No! No! No!"
-- Business user running in fear from overly complex maths
"Less, But Better"
-- Dieter Rams
Are our AI tools designed "good"? Based on my experience with industrial developers, I would say perhaps not. According to Dieter Rams, good design:
- is innovative – The possibilities for progression are not, by any means, exhausted. Technological development is always offering new opportunities for original designs. But imaginative design always develops in tandem with improving technology, and can never be an end in itself.
- makes a product useful – A product is bought to be used. It has to satisfy not only functional, but also psychological and aesthetic criteria. Good design emphasizes the usefulness of a product whilst disregarding anything that could detract from it.
- is aesthetic – The aesthetic quality of a product is integral to its usefulness because products are used every day and have an effect on people and their well-being. Only well-executed objects can be beautiful.
- makes a product understandable – It clarifies the product’s structure. Better still, it can make the product clearly express its function by making use of the user's intuition. At best, it is self-explanatory.
- is unobtrusive – Products fulfilling a purpose are like tools. They are neither decorative objects nor works of art. Their design should therefore be both neutral and restrained, to leave room for the user's self-expression.
- is honest – It does not make a product appear more innovative, powerful or valuable than it really is. It does not attempt to manipulate the consumer with promises that cannot be kept.
- is long-lasting – It avoids being fashionable and therefore never appears antiquated. Unlike fashionable design, it lasts many years – even in today's throw away society.
- is thorough down to the last detail – Nothing must be arbitrary or left to chance. Care and accuracy in the design process show respect towards the consumer.
- is environmentally friendly – Design makes an important contribution to the preservation of the environment. It conserves resources and minimizes physical and visual pollution throughout the life cycle of the product.
- is as little design as possible – Less, but better – because it concentrates on the essential aspects, and the products are not burdened with non-essentials. Back to purity, back to simplicity.
The Obvious Counter-argument Against "Keep it Simple"
Yes, sometimes, complexity is necessary
- e.g. 2% optimizations of turbulent non-linear air-flows across a wing in the transonic range
But when it ain’t
- Needless complexity = is just silliness
Much industrial success with very complex image processing based on deep learners that derive fascinating internal features uses layers of neural nets
- All good stuff
- For "large ε problems", ever increasing exact inference is... silly.
Example of "large ε":
- Many SE inference results a large ε i.e. small changes to the training data or the AI model leads to large changes in the performance. 77 "equals" 81 when variance is ± large. And for SE, its often large.
- For example, here are 10*3 cross-val software effort estimation results (10 times: randomize order of data, divide into three bins; train on 2, test on the other):
And there are many reasons to reflect on how not to do "it" simpler.
Reasons for less
Your next 15 weeks
- Fewer headaches
- Higher marks
We would be foolish not to exploit inherent simplicities.
Because at least in SE, there are inherent simpliticies
Why is this so? Not clear. But:
- Mathematically, models are either simple or poorly supported by the data:
- See here
- Programming languages are a subset of natural language and both kinds of
languages exhibit remarkably simple "language models"; i.e. given the last
N symbols, you can pretty much guess the next symbol.
- Hindle et al.: "Programming languages, in theory, are complex, flexible and powerful, but the programs that real people actually write are mostly simple and rather repetitive, and thus they have usefully predictable statistical proper- ties that can be captured in statistical language models and leveraged for software engineering tasks."
Because in SE, More Complex is often superfluous
Data from Norman Fenton’s Bayes nets discussing software defects = yes, no
- Given classes x,y then Fx, Fy is frequency of some ranges in x,y
- Log Odds Ratio = log(Fx/Fy )
- If zero if no difference in x,y The secret of big data is small data. The best thing to do with data is to ignore most of it.
- Results:
- Most variables do not contribute to determination of defects
Data from Papakroni's masters thesis
- TRAIN:
Project 21 features onto first 2 components of PCA
- Recursively divide two dimensions (at median)
- Stopping a SQRT(N)
- In each leaf, replace N projects with median centroid
- TEST: Estimate = interpolate 2 near centroids
- Performs no worse, and sometimes better, than Random forests, NaiveBayes
For more, see Data Mining for very busy people
Because, Historically, Simpler is often Better
- PCA, 1901
- Narrows: Amarel 1960s
- Prototypes: Chen 1975
- Frames: Minsky, 1975
- Min environments: DeKleer, 1986
- Saturation: Horgan & Mathur: 1980
- Homogeneous propagation: Michael: 1981
- Master variables: Crawford & Baker, 1995
- Clumps, Druzdel, 1997
- Feature subset section, Kohavi, 1997,
- Back doors, Williams, 2002
- Active learning: many people (2000+)
From Section 2.2 of this paper
- Simpler methods may build smaller models that use fewer attributes from the data. Such models are more likely to be robust against overfitting, especially on small and noisy data (and have been found to predict data at levels comparable with regression).
- Very simple rule-based methpds can perform comparably well to more complex models in a range of domains e.g., public health, medical risk management, performance sci- ence, etc.
- Neth and Gigerenzer argue that such rule-bases are tools that work well under conditions of uncertainty.
- Brighton showed that rule-based models can perform better than complex nonlinear algorithms such as neural networks, exemplar models, and classification/regression trees.
Speed speed speed
- Analytics = work flow to condense much low-value data down to a few diamonds.
- Fisher et al. survey of 16 industrial data scientists,
- Due to computational cost of analytics, "the luxuries of interactivity, direct manipulation, and fast system response are gone".
- Modern cloud-based analytics as a throwback to the 1960s– batch processing
- "Fast iteration is key, but incompatible with the way jobs are submitted and processed in the cloud. It’s frustrating to wait for hours, only to realize you need a slight tweak to your feature set."
Less cost (local hardware, cloud services)
The following are somewhat extreme examples. But suppose we could do the following tasks orders of magnitude faster. Just imagine what else could we use all that saved CPU for?
- 15 years of CPU, one FSE 2013 analytics paper, Wang et al/
- Evaluate automatic tuning tools for code clone recognition tools
- $1.2million
- Cost or renting of commercial cloud hardware
- One project, 5 students, 3 years
- FYI: that would EAT and SWALLOW the standard budgets NSF gives researchers like me
- Three years of CPU/day
- Anonymous NCSU grad student tuning deep learning networks at XXXX for summer 2018
Support the edge
- Edge computing
- Move some computational towards the edge of the network to harness computational capabilities that are currently untapped in edge nodes, such as base stations, routers and switches
- Internet of Things
- Simple AI could make better use of billions and billions of low power devices, many of which are operating at very low power
Less Energy Consumption
Power off your phone
- Stare at it
- How long before you stop?
- Phone - power = silly
From Green in Software Engineering:
- Present-day primary energy footprints of three business software apps add up to as much as 373 Peta Joules/ year.
- People claim they will pay more for a "green" product.
- nearly half of surveyed organizations design their business models on the basis of sustainability.
- Sustainability = new source of innovation, cost-cutting opportunity , mechanism for gaining competitive advantage.
Less pollution Creating that Energy
- IT-related services now account for 2% of all global carbon emissions-- roughly the same as the aviation sector
- Simpler AI lets us breathe easier.
Simpler explanation
Less generation of solutions
- Less confusion
- Verrappa and Letier:
- "..for industrial problems, these algorithms generate (many) solutions (makes) understanding them and selecting one among them difficult and time consuming"
Simpler Customization
We are already delivering software more complex than what people can manage (see fig1 and fig3).
- Many software systems have poorly chosen defaults. Hence, it is useful to seek better configurations.
- Van Aken et al. report that the default MySQL configurations in 2016 assume that it will be installed on a machine that has 160MB of RAM (which, at that time, was incorrect by, at least, an order of magnitude)
- Herodotou et al. show how standard settings for text mining appli- cations in Hadoop result in worst-case execution times.
- In the same vein, Jamshidi et al. reports for text mining applications on Apache Storm, the throughput achieved using the worst configuration is 480 times slower than the throughput achieved by the best configuration.
- Understanding, the configuration space of software systems with large configuration space, is challenging.
- Exploring more than just a handful of configurations is usually infeasible due to long benchmarking time
Because we need a baseline
Because better science needs better baselines:
- Empirical methods in AI:
- Supposedly newer more sophisticated methods should be baselined against a seemingly simpler alternative
- Warning: when I do that, I often find simpler is better.
Because better engineering needs better baselines:
- So many AI tools, so many ways to tune them, so many ways to combine them
- So given a new problem, which learner/optimizer should we apply?
- Hard to say, apriori.
- When new data arrives, you need commissioning experiments; i.e. try a variety of techniques before you can find what words best for the local data.
- Comissioning needs baselines
- i.e. an algorithm which can generate floor performance values.
- Lets a developer quickly rule out any method that falls “below the floor”.
- Lets us achieve fast early results, while also gaining some guidance in all their subsequent experimentation (specifically: "try to beat the baseline").
Other
Quicker more effective training, experimentation
- Less to understand, faster to understand.
- Less to twiddle, less to explore
Easier Reproducibility
- Large config spaces are the bane of reproducibility.
- You did not get what I got? Di you set the X to 2, Y to 3, and Z to 10,30,age/shoe size+temperature?
Solutions more trust-able
- More understandable, more explainable, more I want to use.
Solutions easier to apply
- Less to do, faster to do
Cause its just good science
- If we do not know what we are doing, we are very clumsy;
- When we understand it better, we are more elegant;
- So use this test to check if your thinking is confused, or clarified:
- are your current methods very complex/ time-consuming?
A Common Recipe (For Me, at Least)
- Row reduction:
- Replace N rows of data with M≪N exemplars
- e.g. cluster and report just some items per cluster
- Column reduction:
- Prune C columns of data with the sqrt(C) most influential columns
- Range reduction (in columns):
- Discretize numerics, but only cut into ranges in sub-ranges have less variance
- Range pruning
- If there is a class variable:
- only cut if the associated class ranges are less varied
- Else, cluster row/column/range data and only cut if associated ranges are less varied in different clusters.
- If there is a class variable:
Cautions
So that’s it? Just find the few dimensions that matter, then stop?o
Well...
- The reduced data space exists... but how to find it?
- Feature selection on raw data?
- Or may be synthesized (PCA, spectral, etc)
Also:
- And the dimensions that matter NOW
- May not matter SOON
- So an agent that assumes low dimensionality
- (but fyi, we should be doing that with all data mining approaches, anyway). Will always be checking and revising their dimensional


envs.net | TermBin
Netcat-based command line pastebin.
USAGE
you can POST a text:echo just testing! | nc tb.envs.net 9999
content of a file:cat ~/some_file.txt | nc tb.envs.net 9999
or your terminal output:ls -la | nc termbin.com 9999
ACCEPTABLE USE POLICY
please do not post any informations that may violate law (login/password lists, email lists, personal information). life span of single paste is one month. older pastes are deleted. tb.envs.net is NOT a platform for:
- child pornography
- malware, including “potentially unwanted applications”
- botnet command and control schemes involving this service
- anything even remotely related to crypto currencies
- hosting your backups
- spamming the service with CI build artifacts
- piracy
- alt-right shitposting
REQUIREMENTS
there is only one thing you need to use this service - netcat. netcat is available on most platforms, including Windows, Mac OS X and Linux. if you run a server and like this site, clone it! centralization is bad. Source here: https://github.com/envs-net/fiche. you can also support it financially via liberapay.
ALIAS
to make your life easier, you can add alias to your .bash_aliases on Linux and.bash_profile
on Mac OS X. just remember to reset your terminal session after that.echo 'alias tb="nc tb.envs.net 9999"' >> .bash_aliases
now you can use:echo less typing now! | tb
ABUSE
if you would like to request permanent deletion, please send an email to<EMAIL_ADDRESS>please allow up to 24 hours for a response.


index
|
up
|
prev
|
next
Operator Enumeration
Definition at line
559
of
Evaluator.cpp
Enumerators
Name
Value
add
sub
comparison
other
index
|
up
|
prev
|
next


The median
function that we just implemented used templates to generalize across types
that a vector
might contain. We can call this function to find the median of a vector
of
values of any kind of arithmetic type.
More generally, we would like to be able to write a simple function that deals with values
stored in any kind of data structure, such as a list, a vector
, or a string
. For that
matter, we would like to be able to act on part of a container, rather than having to use the
entire container.
For example, the standard library uses iterators to allow us to call find
on any contiguous
part of any container. If c
is a container, and val
is a value of the type stored in
the container, we use find by writing expressions such as
find(c.begin(), c.end(), val)
Why did we have to mention c
twice? Why doesn't the library let us say
c.find(val)
by analogy with c.size()
, or even
find(c, val)
passing the container directly to find
as an argument? Both questions turn out to have
the same answer: By using iterators, and thereby requiring us to mention c
twice, the
library makes it possible to write a single find
function that can find a value in any contiguous
part of any container. Neither of these other approaches allows us to do so.
Let's look first at c.find(val)
. If the library let us use c.find(val)
, we would be
calling find as a member of whatever type c
has—which means that whoever defined
the type of c
would have to define find
as a member. Also, if the library used the
c.find(val)
style for the algorithms, then we would be unable to use these functions
for built-in arrays, about which we shall learn in Chapter 10.
Why does the library require us to give c.begin()
and c.end()
as arguments to
find
instead of letting us pass c
directly? The reason to pass two values is that doing so
delimits a range, which makes it possible to look in part of a container instead of insisting
on looking through the whole thing. For example, think about how you would write the
split
function in §6.1.1/103 if find_if
were restricted to searching an entire container.
There is a more subtle reason for generic functions to take iterator arguments instead
of container arguments directly: It is possible for iterators to access elements that aren't
in containers at all in the ordinary sense. For example, in §6.1.2/105, we used the rbegin
function, which yields an iterator that grants access to its container's elements in reverse
order. Passing such an iterator as an argument to find
or find_if
lets us search the
container's elements in reverse order, which would be impossible if these functions
insisted on taking a container as an argument directly.
Of course, it would be possible to overload the library functions, so that one could call them with either a container or a pair of iterators as an argument. However, it is far from clear that the extra convenience would outweigh the extra complexity in the library.
The easiest way to understand how templates let us write data-structure-independent
programs is to look at implementations of some of the more popular standard-library
functions. These functions all include iterators among their arguments, which identify the
container elements on which the functions will act. All standard-library containers, and
some other types, such as string
, supply iterators that allow these functions to act on
the containers' elements.
Some containers support operations that others do not. This support, or lack thereof,
translates into operations that some iterators support and others do not. For example, it is
possible to access an element with a given index directly in a vector
, but not in a list
.
Accordingly, if we have an iterator that refers to an element of a vector
, the design of
that iterator makes it possible to obtain an iterator that refers to another element of that
same vector
by adding the difference between the elements' indices to the iterator. Iterators
that refer to list
elements offer no analogous facility.
Because different kinds of iterators offer different kinds of operations, it is important
to understand the requirements that various algorithms place on the iterators that they
use, and the operations that various kinds of iterators support. Whenever two iterators
support the same operation, they give it the same name. For example, all iterators use ++
to cause an iterator to refer to the next element of its container.
Not all algorithms need all the iterator operations. Some algorithms, such as find
,
use very few iterator operations. We can find values using any of the container iterators
that we've seen. Other algorithms, such as sort
, use the most powerful operations,
including arithmetic, on iterators. Of the types we've seen in the library, only vector
s
and string
s are compatible with sort
. (Sorting a string
arranges its individual characters
in nondecreasing order.)
The library defines five iterator categories, each one of which corresponds to a specific collection of iterator operations. These iterator categories classify the kind of iterator that each of the library containers provides. Each standard-library algorithm says what category it expects for each iterator argument. Thus, the iterator categories give us a way to understand which containers can use which algorithms.
Each iterator category corresponds to a strategy for accessing container elements. Because iterator categories correspond to access strategies, they also correspond to particular kinds of algorithms. For example, some algorithms make only a single pass over their input, so they don't need iterators that can make multiple passes. Others require the ability to access arbitrary elements efficiently given only their indices, and, therefore, require the ability to add indices and integers.
We will now describe each access strategy, show an algorithm that uses it, and describe the corresponding iterator category.
One straightforward way to access a sequence is to read its elements sequentially. Among
the library functions that does so is find
, which we can implement as
template <class In, class X> In find(In begin. In end, const X& x) { while (begin != end && *begin != x) ++begin; return begin; }
If we call find(begin, end, x)
, the result is either the first iterator iter
in the range
[begin, end)
such that *iter == x
, or end
if no such iterator exists.
We know that this function accesses the elements in the range [begin, end)
sequentially,
because the only operation it ever uses to change the value of begin
is ++
. In addition
to using ++
to change the value of begin, it uses !=
to compare begin
and end
, and
*
to access the container element to which begin
refers. These operations are sufficient
to read sequentially the elements to which a range of iterator values refers.
Although the operations are sufficient, they are not the only operations that we might want to use. For example, we might have implemented find this way:
template <class In, class X> In find(In begin, In end, const X& x) { if (begin == end || *begin == x) return begin; begin++; return find(begin, end, x); }
Although most C++ programmers would find this recursive programming style unusual,
programmers accustomed to languages such as Lisp or ML will feel right at home. This
version of find uses begin++
instead of ++begin
, and ==
instead of !=
. From these
two examples, we can conclude that an iterator that offers sequential read-only access to
elements of a sequence should support ++
(both prefix and postfix), ==, !=
, and unary *
.
There is one other operator that such an iterator ought to support, and that is the
equivalence between iter->member
and (*iter).member
that we used, for example,
in §7.2/124. There we used it->first
as an abbreviation for (*it).first
, and we
would certainly like to be able to do so in general.
If a type provides all of these operations, we call it an input iterator. Every container iterator that we've seen supports all these operations, so they are all input iterators. Of course, they support other operations as well, but that additional support does not affect the fact that they are input iterators.
When we say that find requires input iterators as its first and second arguments, we are saying that we can give find arguments of any type that meets the input-iterator requirements, including iterators that support additional operations.
Input iterators can be used only for reading elements of a sequence. Obviously, there are contexts in which we would like to be able to use iterators to write elements of a sequence. For example, consider the copy function
template<class In, class Out> Out copy(In begin, In end, Out dest) { while (begin != end) *dest++ = *begin++; return dest; }
This function takes three iterators; the first two denote the sequence from which to copy,
and the third denotes the beginning of the destination sequence. We saw this same
while
loop in §6.1/102: The function operates by advancing begin
through the container
until it reaches end
, copying each element into dest
as it goes.
As the name In
suggests, begin
and end
are input iterators. We use them only for
reading elements, just as we did in find
. What about Out
, the type of the parameter
dest
? Looking at the operations on dest
, we see that in this function, we need only be
able to evaluate *dest =
value and dest++
. As with find
, logical completeness argues
that we should also be able to evaluate ++dest
.
There is one other requirement that is less evident. Suppose it is an iterator that we wish to use for output only, and we execute
*it = x; ++it; ++it; *it = y;
By incrementing it twice between assignments to *it
, we have left a gap in our output
sequence. Therefore, if we wish to use an iterator exclusively for output, there is an
implicit requirement that we not execute ++it
more than once between assignments to
*it
, or assign a value to *it
more than once without incrementing it
.
If a function uses a type in a way that meets these requirements, we call that type an
output iterator. All the standard containers provide iterators that meet these requirements,
as does back_inserter
. It is worth noting that the "write-once" property is a requirement
on programs that use iterators, not on iterators themselves. That is, iterators that
satisfy only the output-iterator requirements are required to support only programs that
maintain that property. The iterator generated by back_inserter
is an output iterator,
so programs that use it must obey the "write-once" requirement. The container iterators
all offer additional operations, so programs that use them are not restricted in this way.
Suppose we want to be able to read and write the elements of a sequence, but only
sequentially: We intend to advance iterators forward but never backward. An example of
a library function that does so is replace
, from the <algorithm>
header:
template<class For, class X> void replace(For beg, For end, const X& x, const X& y) { while (beg != end){ if (*beg == x) *beg = y; ++beg; } }
This function examines the elements in the range [beg, end)
and replaces every element
that is equal to x
by y
. It should be clear that the type For
needs to support all the operations
supported by an input iterator, as well as all the operations supported by an output
iterator. Moreover, it should not need to meet the single-assignment requirement of output
iterators, because it now makes sense to read the element value after assigning it, and
perhaps to change it. Such a type is a forward iterator, and it is required to support
*it (for both reading and writing) ++it and it++ (but not --it or it—-) it == j and it != j (where j has the same type as it) it->member (as a synonym for (*it).member)
All the standard-library containers meet the forward-iterator requirements.
Some functions need to get at a container's elements in reverse order. The most straightforward
example of such a function is reverse
, which the standard library defines in the
<algorithm>
header
template<class Bi> void reverse(Bi begin, Bi end) { while (begin != end) { --end; if (begin != end) swap(*begin++, *end); } }
In this algorithm, we march end
backward from the end of the vector
and beg
forward
from the beginning, exchanging the elements that they reference as we go.
This function uses the iterators begin
and end
as if they were forward iterators,
except that it also uses --
, which is obviously the key to being able to traverse a sequence
backward. If a type meets all the requirements of a forward iterator, and also supports --
(both prefix and postfix), we call it a bidirectional iterator.
The standard-library container classes all support bidirectional iterators.
Some functions need to be able to jump around in a container. One good example of such
a function is the classical binary-search algorithm. The standard library implements this
algorithm in several forms, the most straightforward of which is called—you guessed
it—binary_search
. The standard-library implementation actually uses some clever
techniques (well beyond the scope of this book) that allow it to do binary searches on
sequences defined by forward iterators. A simpler version, which requires random-access
iterators, looks like this:
template<class Ran, class X> bool binary_search(Ran begin, Ran end, const X& x) { while (begin < end) { // find the midpoint of the range Ran mid = begin + (end - begin) / 2; // see which part of the range contains x; keep looking only in that part if (x < *mid) end = mid; else if (*mid < x) begin = mid + 1; // if we got here, then *mid == x so we're done else return true; } return false; }
In addition to relying on the other usual iterator properties, this function relies on the
ability to do arithmetic on iterators. For example, it subtracts one iterator from another to
obtain an integer, and adds an iterator and an integer to obtain another iterator. Again,
the notion of logical completeness adds requirements to random-access iterators. If p
and
q
are such iterators, and n
is an integer, then the complete list of additional requirements,
beyond those for bidirectional iterators, is
p + n, p - n, and n + p p - q p[n] (equivalent to *(p + n)) p < q, p > q, p <= q, and p >= q
Subtracting two iterators yields the distance between the iterators as an integral type that
we will discuss in §10.1.4/175. We did not include ==
and !=
in the requirements because
random-access iterators also support the requirements on bidirectional iterators.
The only algorithm that we have used that requires random-access iterators is the
sort
function. The vector
and string
iterators are random-access iterators. However,
the list
iterator is not; it supports only bidirectional iterators. Why?
The essential reason is that list
s are optimized for fast insertion and deletion.
Hence, there is no quick way to navigate to an arbitrary element of the list
. The only
way to navigate through a list
is to look at each element in sequence.
As we've seen, the convention that algorithms take two arguments to specify ranges is nearly universal in the library. The first argument refers to the first element of the range; the second argument refers to one past the last element of the range. Why do we specify one past the end of the range? When is it even valid to do so?
In §2.6/30, we saw one reason to use an upper bound for a range that is one past the last value in the range—namely, that if we specified the end of a range by a value equal to the last element, then we would be saying implicitly that the last element was special somehow. If the end value is treated specially, it is easy to write programs that mistakenly stop one iteration before the end. As far as iterators are concerned, there are at least three more reasons to mark the end of a range by an iterator that is one past the last element, instead of one that refers to the last element directly.
One reason is that if the range had no elements at all, there would be no last element to mark the end. We would then be in the curious position of having to designate an empty range by an iterator that refers to where the element before the beginning of the range would be. With that strategy, we would have to handle empty ranges differently from all others, which would make our programs harder to understand and less reliable. We saw in §6.1.1/103 that treating empty ranges the same as any others simplified our program.
The second reason is that marking the end of a range by an iterator that is one past the end lets us get away with comparing iterators only for equality and inequality, and makes it unnecessary to define what it means for one iterator to be less than another. The point is that we can tell immediately if the range is empty by comparing the two iterators; the range is empty if and only if the iterators are equal. If they are unequal, then we know that the beginning iterator refers to an element, so we can do something and then increment that iterator to reduce the size of the range. In other words, marking ranges by the beginning and one past the end allows us to use loops of the form
// invariant: we must still process the elements in the range [begin, end) while (begin != end) { // do something with the element to which begin refers ++begin; }
and we need only to be able to do (in)equality comparisons on iterators.
The third reason is that defining a range by the beginning and one past the end gives
us a natural way to indicate "out of range." Many standard-library algorithms—and
algorithms that we ourselves write—take advantage of this out-of-range value by returning
the second iterator of a range to indicate failure. For example, our url_beg
function
in §6.1.3/108 used this convention to signal its inability to find a URL. If the algorithms
did not have this value available, they would have to invent one, which would complicate
both the algorithms and the programs that use them.
In short, although it may seem odd to indicate the end of a range by an iterator that
refers to one element past the end, doing so makes most programs simpler and more reliable
than they would be otherwise. To this end, every container type is required to support
an off-the-end value for its iterators. Each container's end
member returns such a
value, and that value can be the result of other iterator operations as well. For example, if
c
is a container, copying c.begin()
and incrementing that copy a number of times equal
to c.size()
will yield an iterator that is equal to c.end()
. The effect of dereferencing
an off-the-end iterator is undefined, as is that of computing an iterator value that is before
the beginning of a container, or more than one past the end.


Instructions:
Using the color picker
Slide the slider and see the color either on the right or below, then click on the bottom buttons to apply the current color on 'Color 1' or 'Color 2'
Using the 'Generator'
Note that the input can take CSS colors such as rgb() and rgba() or just CSS colors like red,
limegreen etc!
Read more about CSS colors here
- Input both colors and the website will automatically apply the background for you or press the
randomize button which will create a
random
background
- You can then see the preview of the gradient under
- Press the top of the page to hide the white box (works on this page also)
- Screenshot and crop and make it as your new wallpaper
Continue To Generator


scale(3f) - [M_calcomp:basic] calculate scaling factors for producing XY plots with LINE(3f) and AXIS(3f) routines (LICENSE:PD)
Synopsis
Description
Options
Examples
License
subroutine scale(array,axlen,npts,+-inc)
Calculate scaling factors and a starting value for an array of X or Y values for use in producing XY plots with the LINE and AXIS routines, for example.
Typically, the users program will accumulate plotting data in two arrays:
o An array of independent variables, X(i) o An array of dependent variables, Y(i)=f(X(i)) Typically these values should not be drawn directly in units of inches, but should be rescaled (A temperature of 3000 should not require the generation of a 3000 inch plot!).
For some problems the range of data is predictable. The programmer can predetermine suitable conversion factors for use in drawing the axis scale values and plot the data points on the graph directly in units of inches using the PLOT routine. Usually, however, these factors are not known in advance.
Therefore, the SCALE subroutine can examine the data values in an array and determine a starting value (minimum or maximum) and a scaling factor (positive or negative) such that:
1. The scale numbers drawn by the AXIS subroutine at each division will properly represent the range of real data values in the array. 2. The data points, when plotted by the LINE subroutine, will fit in a given plotting area (Generally the bounds of the plot axis drawn with AXIS). These values are computed and stored by SCALE at the END OF THE INPUT VALUE ARRAY.
The computed scaling factor (DELTAV) represents the number of data units per inch of axis, adjusting DELTAV so that it is always an interval of 1, 2, 4, 5, or 8 x 10**n (where n is an exponent consistent with the original unadjusted scaling factor). Thus, an array may have a range of values from 301 to 912, to be plotted over an axis of 10 inches. The unadjusted scaling factor is (912-301)/10=61.1 units/inch. The adjusted DELTAV would be 8 x 10**1 = 80. This will allow the production of nice axes, that start and end on rounded units and are divided into increments people can easily interpolate between.
The starting value (FIRSTV) is intended to be used as the first numeric label on the axis, is computed as a multiple of DELTAV that is equal to or outside the limits of the data in the array. For the example given above, if a minimum is wanted for FIRSTV, 240 would be chosen as the best value. If a maximum is desired instead, 960 would be selected (The nearest multiple of 80=DELTAV that is below or above the minimum and maximum data values 301 and 912).
ARRAY is the first element of the array of data points to be examined. AXLEN is the length of the axis, in inches, to which the data is to be scaled. Its value must be greater than 1.0 inch, and less than 100 inches. NPTS is the number of data values to be scanned in the array. The FORTRAN DIMENSION statement must specify at least two elements more than the number of values being scaled, to allow room for SCALE to store the computed starting value and scaling factor at the end of the array. +-INC is an integer whose magnitude is used by SCALE as the increment with which to select the data values to be scaled in the array. Normally INC=1; if it is 2, every other value is examined. If INC is positive, the selected starting value (FIRSTV) approximates a minimum, and the scale factor (DELTAV) is positive.
If INC is negative, the selected starting value (FIRSTV) approximates a maximum, and the scaling factor (DELTAV) is negative.
If INC= +-1, the array must be dimensioned at least two elements larger than the actual number of data values it contains. If the magnitude of INC > 1, the computed values are stored at (INC) elements and (2*INC) elements beyond the last data point. The subscripted element for FIRSTV is ARRAY(NPTS*INC+1); for DELTAV it is ARRAY (NPTS*INC+INC+1). Therefore, ARRAY must always be dimensioned at least NPTS*INC+INC+1 .
Generally, SCALE is called to examine each array to be plotted. If the user knows the range of his data values, he does not have to call SCALE for that array so long as he supplies an appropriate FIRSTV and DELTAV when AXIS and LINE are called.
Sample program:
program demo_scale use M_calcompcharacter * 28 ichr1 character * 26 ichr2 character * 10 lbcd1,lbcd2 dimension xarray(62),yarray(62) ICHR1=PLOTTED ON A CALCOMP PLOTTER ICHR2=USING Y = X -0.7*X +0.1*X LBCD1=X-ABSCISSA LBCD2=Y-ORDINATE call plots(0.0,10.0,0.0,10.0) ! PLOT THREE GRAPHS ILLUSTRATING SCALE, AXIS, AND LINE deltax=0.04 i=1 ! AXIS DRAWS LABELS AS MUCH AS 0.4 INCHES TO THE NEGATIVE OF AXIS CENTER; ! EITHER USE AN ORIGIN OFFSET OF AT LEAST THIS VALUE OR DO NOT USE AN !


{% extends 'layout.html' %} {% block body %}
That's it! You should now see a folder Dropbox/Apps/whitegold
.
(If you deployed this app yourself, the name of that folder will instead match the name you gave when you created your Dropbox app.)
Put image files in that folder and watch them get converted! (Your image won't be overridden. A new file called <filename-converted.jpg>
will be added.)


2017 Meetings
- November 2017: Perspective on Base R and Tidyverse by Stephen
- October 2017: An R Text Mining Case Study - Harry Rowe
- September 2017: Exploring UN General Debates Kaggle Dataset with R NLP Tools
- August 2017: Reproducibility and high-performance computing with drake
- July 2017: R in the development and analysis of forensic credibility assessment tests
- June 2017: Exploring Simmer - An R Package for Discrete Event Simulation
- May 2017: Overview of Julia by a R User
- April 2017: Cybersecurity Discussion
- March 2017: FREDcast, R Trivia, General Discussion
- February 2017: FREDcast, R Trivia, Webscraping and htmlWidgets
- January 2017: Kickoff Meeting for Year, General Discussion, Trends in Statistical Papers Using Google Scholar - Matt Gillam
2016 Meetings
- November 2016: Predicting NBA Games using SQL R Services - Ryan Wade
- October 2016: New R tools for workflow management, testing, and reproducibility - Will Landau
- September 2016: Intro to R Programming at IUPUI - Fred Kukral
- August 2016: Presentation about feather - Matt Gillam
- July 2016: UseR 2016 Recap - Adam Simkowski
- June 2016: Leveraging Weather Data in R - Adam Simkowski
- May 2016: Big Molecules Meets Big Data: Predicting Protein Tertiary Structure from Combinatorial Chemistry Data - Stan Siranovich
- April 2016: Using R and Power BI to Analyze US Trade Balance with Other Countries - Ryan Wade
- March 2016: System Configuration and Development of R in Jupyter Notebook
- February 2016: Book overview: Mastering Machine Learning with R - Cory Lesmeister
- January 2016: Webscraping with rvest package - Shankar Vaidyaraman
2015 Meetings
- November 2015: Typical Excel Tasks in R - Stuart Ward, Demo of a Shiny App that Analyzes Sentiments and Produces Wordcloud of Sentiments - J. D. Freeman
- October 2015: Big Data Processing with Apache Spark and R - Hao Lin
- September 2015: reshape and reshape2 packages - Adrian Katschke
- August 2015: 3D Interactive Scatter Plots - J. D. Freeman, R Markdown - Richard Layton
- July 2015: Report on UseR 2015 - Richard Layton, Presentation on forecasting with forecast package - Ben Staiger


Hi,
doing my daily work, I try my best, so that code which I produce is of the highest quality. It is important that it could be easily tested and managed. However, it must be borne in mind that the projects we do at work are not individual tasks, and dozens of people are working on them. However, it is well known that everyone can have a bad day that will cause a bad code to be written that will lead to headaches when we look at it after some time.
How can we control the quality of code that is produced in our team? The solution could be the code metrics available in Visual Studio, which allows us to statically analyze the code in terms of 5 parameters. These parameters are:
- Cyclomatic complexity - the complexity of branching methods in code;
- Maintainability index - measures ease of code management;
- Depth of inheritance;
- Class coupling - an index that corresponds to the relationship between classes;
- Lines of code - executable code lines.
The way to improve each of these metrics is similar, just to improve the code (simple right ;)?). In this post I will focus on cyclomatic complexity. Due to the desire to decrease code debt in a project. At the same time without throwing suddenly at all the bad places. I decided that the best way is to divide the code due to 3 parameters.
The first one is already mentioned before cyclomatic complexity, the second is information about the last modification date, the last number of changes made in a given class (in the project in which I work, each class is in a separate file). Having already an idea about on what data I want to operate, I had to go to get them. Code metrics can be get by exporting project statistics to a .csv file. We start by calculating code metrics. By right-clicking on the project and selecting from the context menu “Calculate Code Metrics”
After generating the statistics, we are going to export them to excel.
By clicking the green excel icon we can filter the exported data so that they contain only information about the projects/methods/namespaces that we want to analyze.
By going to the date of the last modification of the file, and the number of modifications to the file, I used 2 git commands that look like this:
At this stage I had the data needed for the analysis. I need to determine which methods should be improved and on what values of metrics it should be determined. I decided that it was best to deal with functions that are often modified, modified recently, and have a high complexity as I said before. So I took the approach that I want to fetch methods that have the following attribute values:
- Cyclomatic complexity >= 5
- Last modification time <= 4 weeks = 28 days
- Moderation rate >= 5
To achieve my goal I wrote a piece of F # program/script that uses the benefits of CsvProvider. I started by declaring the types that represent the data I have:
Then I created a type that will reflect the resulting file with methods that require changes:
I’m interested in the name of the method that needs a change, all the attributes that decide that this method should be changed and where the file is located. What is interesting, that I use the “StructuredFormatDisplay” attribute, which allows you to overload the object’s “print” method while using “sprintf”% A “ourObject”. Thus, in the code responsible for the data connection, there will be no logic associated with the way of how the Info class should be displayed.
By going to the executable code, I started by loading the data and set the limit value for “4 weeks back”
As I said before, I’m only interested in methods and I want to have information about them, so I wrote following piece of code:
It has the task of loading the data by proposing code metrics, going through all the lines, and filtering only the methods. Then it maps everything to the Info type. You can see here the use of the fileInformation function. We could right now based on variables names that this method returns the name of the file in which the method is located, the date of the last modification of the file, and the number of changes made to it.
This method looks like this:
For a given class, we declare a local function byName, which searches for files that end with the class name and the .cs extension because we are interested in C # files. Then we find the record corresponding to the file name in the data regarding the date of the last modification and the number of changes. Then we declare 3 variables, where the first contains the file name, or the value “File not found” when the file was not found, lastChange contains the date of the last modification, or the minimum date (DateTime.MinValue), and numberOfChanges contains the number File modification or 0 if no matching record was found. At the end, the tuple containing the three variables is returned.
Having data in this form, the next step was to filter it out based on attributes that were listed earlier with the corresponding values (complexity == 5, lastEdit >= fourWeeksAgo, howManyChanges >= 5), then sorting the results descending by complexity and write result to the file so I could share this information also within the team. The above steps were done using the following code:
In summary, with tools available for C # developers (using Visual Studio), Code Metrics and Git’s console, we can somehow monitor the quality of our code and catch bits of code that should be repaired to make the product easier to manage and less complex for developers. By means of F # and DataProviders, we could see that F # also fulfills the role of scripting language in which we can easily process data sets to extract the most interesting information.
Thanks for reading!


1: /* mkl.h could conflict with petscblaslapack.h in mkl_pardiso.c */ 2: /* The current translation unit contains calls specific to mkl library */ 3: #include "petscsys.h" 4: #include <mkl.h> 6: PETSC_EXTERN void PetscSetMKL_PARDISOThreads(int threads) 7: { 8: mkl_domain_set_num_threads(threads,MKL_DOMAIN_PARDISO); 9: }


| stable | Won't change, should be bug-free (default) |
| beta | Won't change, but might have bugs |
| nightly | Contains experimental features that might be removed or changed |
Installation Instructions:
https://rustup.rsGithub Repository:
https://github.com/rust-lang-nursery/rustup.rsrustc
and pass the correct parameters for your projectDependencies are managed in your Cargo.toml
file.
The Cargo.lock
file allows for reproducible builds.
It's created automatically, so don't edit it by hand.
The Cargo Book:
https://doc.rust-lang.org/cargoIn Rust, packages are called crates.
An opinionated alternative to Crates.io that's great for browsing:
https://crates.rs/Available as part of cargo
since Rust 1.24
cargo
!Find a list of ALL current lints here:
https://rust-lang-nursery.github.io/rust-clippy/Rust lang support for your IDE
Mostly depends on the Rust compiler
Falls back to Racer for situations where the compiler is too slow
More info:
https://github.com/rust-lang-nursery/rls https://github.com/racer-rust/racerrust
extensionrustfmt
and clippy
--release
or --debug
modestable
, beta
, and nightly
channelsPlay with it here:
https://play.rust-lang.org/Great for when you really want to make a program as performant as possible
Includes two example programs, pre- and post-optimization
See it here:
https://godbolt.org/Don't forget to switch it to Rust mode
a.k.a "TRPL"
a.k.a "The Book"
The best way to learn Rust!
It contains almost anything you could want to know about the language!
Read the whole thing right now:
https://doc.rust-lang.org/book/2018-editionHowever...
there exists a dark counterpart to
The Book
known as
The Rustonomicon
unsafe
Rust
You should be pretty familiar with safe Rust first
It deals with some of the more unstable aspects of Rust
std::vec::Vec
Unlock the dark secrets of Rust:
https://doc.rust-lang.org/nomicon/


Choosing colors
How to select a color or a color palette? What criteria matter in a given set of circumstances? How does material, medium and technique influence such a choice? In a sequence of exercises, the student will develop ways to look, measure and compare selected colors.
- A week of exercises and 3 lessons, €450 per student
- A month of exercises, projects and 8 lessons, €1.700 per student
- Daily feedback by e-mail on results for the duration of the study
- Document sharing and versioning through GitHub
- Design principles for planning, process, methods for feedback and testing criteria


QUESTION #1
Which uAdmin function is a key for encryption and decryption of data in the DB?
QUESTION #2
Which uAdmin function is the name of the theme used in uAdmin?
QUESTION #3
Which uAdmin function allows a user to customize any languages in the uAdmin system?
QUESTION #4
Which uAdmin function is used to check if a model should be hidden in the dashboard?
QUESTION #5
Which uAdmin function allows a translation to store data in a cache memory?
QUESTION #6
The name of the theme is Valentines.
Which of the following assigns the theme name in uAdmin?
QUESTION #7
The translation to store data in a cache memory is active.
Which uAdmin function will match the given statement above?
QUESTION #8
The name of the key is "Welcome to uAdmin, the Golang Web Framework!".
Which uAdmin function assigns the key for encryption and decryption of data in the DB?
QUESTION #9
The name of the theme is Christmas.
Which of the following assigns the theme name in uAdmin?
QUESTION #10
The translation to store data in a cache memory is not active.
Which uAdmin function will match the given statement above?
QUESTION #11
The translation file to be stored in the models path are teacher and student.
Which uAdmin function allows a user to customize any languages in the uAdmin system?
QUESTION #12
Suppose you have given source code that contains the models listed inside an interface:
modelList := []interface{}{
models.Animal{},
models.Food{},
models.Home{},
}
for i := range modelList {
// Your code
}
Which of the following is used to check the returning value of the HideInDashboard function for each listed models stated above?
QUESTION #13
The key values are 10, 20, 30, 40, 50, 60, 70, 80, 90, and 100.
Which uAdmin function assigns the key for encryption and decryption of data in the DB?
QUESTION #14
The translation file to be stored in the world path are asian, european, and hawaiian.
Which uAdmin function allows a user to customize any languages in the uAdmin system?
QUESTION #15
Suppose you have given source code that contains the models listed inside an interface:
elementList := []interface{}{
models.Air{},
models.Earth{},
models.Fire{},
models.Water{},
}
for i := range elementList {
// Your code
}
Which of the following is used to check the returning value of the HideInDashboard function for each listed models stated above?


Better reading, better writing, better…
A simple colour palette for writing day or night. Maybe it’s a program to take over the world. Maybe it’s a website for a friend. Maybe it’s the Great American Novel. Or maybe it’s just straight up fart jokes. It’s all you, kid!
Download Encounters or View it on GitHub<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Encounters</title> <meta name="description" content="A simple colour palette for writing day or night."> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="shortcut icon" href="favicon.ico"> <link rel="stylesheet" href="styles/screen.min.css"> <!-- Typekit --> <script src="//use.typekit.net/whk3yjv.js"></script> <script>try{Typekit.load();}catch(e){}</script> </head> <body class="light-theme"> <div class="background-container"> ...
@import "variables"; @import "functions"; @import "defaults"; // Layout .content-container { margin: percentage(24/320) 0; font: #{$body-font-size}px/1.5 $monospace-font; -webkit-font-smoothing: subpixel-antialiased; text-align: center; transform: translate3d(0,0,0); } .main-section { margin-right: auto; margin-left: auto; ...
$(document).ready(function () { // Toggle between the dark and light themes $(".toggle-icon").click(function() { $("body").toggleClass("dark-theme").toggleClass("light-theme"); // Swap the HTML example body class var swap = $(".swap").html() if (swap == "light-theme") { $(".swap").html("dark-theme"); } else if (swap == "dark-theme") { $(".swap").html("light-theme"); } return false; }); ...
# Encounters A simple colour palette for writing day or night. Maybe it’s a program to take over the world. Maybe it’s a website for a friend. Maybe it’s the Great American Novel. Or maybe it’s just straight up fart jokes. It’s all you, kid! ## Preview [http://encounters.io](http://encounters.io) ## Editors * [Atom](http://atom.io) * [Sublime Text](http://www.sublimetext.com) * [TextMate](http://macromates.com) ...
Encounters currently supports Atom, Sublime Text, and TextMate, with more on the way. If there’s a particular editor you’d like to see included, let us know or contribute.
A reversible colour palette means that whatever time of day it is, you can work in a familiar environment that’s easy on your eyes and colourful enough to keep things organised.


Thank you for signing up to use Meta4Beta to build your Executable JSON Wireframe.
Your account is setup and ready to use. Only one small step remains ...
Please click here and you'll be automatically logged in to Meta4Beta.
If you've got any questions, suggestions or problems - please contact<EMAIL_ADDRESS>Kind Regards,
Lee Curtis
Co-Founder
support@meta4beta.com


First, log into Quest, and click Enroll.
Next, click List View. Your screen should look like this.
Now, select the contents of the page (control-A on Windows & Linux, command-A on Mac), and copy it (control-C on Windows & Linux, command-C on Mac). Paste the contents in the box below, and click submit!


Fluent JSON validator
An easy-to-use, expressive, and composable JSON object validator, with a fluent builder pattern interface!
// this is what you want to validate:
// coming from the user, read from a file, sent back by some API, etc.
const person = {
name: 'John Doe',
age: 42,
hobbies: ['eating', 'coding', 'sleeping'],
favoriteNumberOrColor: 'green'
};
// this is the structure you want your data to have:
const personSchema = is.Object({
name: is.String(),
nickname: is.optional().String(),
// ^ nickname may be missing, but if not, it must be a string.
age: is.Number().Which(
age => age > 10
// ^ age must be more than 10.
),
hobbies: is.ArrayOf(
is.String().Which(
hobby => hobby !== 'illegal activities'
// ^ hobbies can't include illegal activities!
)
),
favoriteNumberOrColor: is.OneOf([is.Number(), is.String()])
});
// and this is how you check if it matches or not:
personSchema.validate(person); // == true
Features
- Lightweight, since it has no dependencies!
- Has a small and simple API, only a handful of methods.
- Can validate primitive types, arrays (
is.ArrayOf
) and even variable types (is.OneOf
)! - Can validate any arbitrary JSON object structure, just mix'n'match the needed validators (
is.Object
)! - Schemas are reusable and composable for validating complex data structures painlessly!
- Can be used for formal1 and functional1 validation as well (
is.Which
)!
1: I may be using slightly incorrect words, but by formal validation I mean the subject has the desired structure, and by functional validation I mean the subject itself also satisfies additional arbitrary requirements.
Installation
npm install fluent-json-validator
Usage / how-to / tutorial
First, of course you need to import the library itself:
import { is } from 'fluent-json-validator'
Then you can create validators like this:
const stringValidator = is.String();
These validators can then validate objects passed to them like this:
stringValidator.validate('some string') // true
stringValidator.validate(42) // false
Of course this whole expression can be written on one single line if you prefer compact solutions:
is.String().validate('some string') // still true
is.String().validate(42) // still false
If some data may not be present, you can use optional validators, which accept missing/undefined data:
const isOptionalNumber = is.optional().Number() // or is.Number().optional()
isOptionalNumber.validate(42) // true
isOptionalNumber.validate() // true
isOptionalNumber.validate('NaN') // false
As for primitive data types, we have validators for strings, numbers and booleans:
const stringValidator = is.String()
const numberValidator = is.Number()
const boolValidator = is.Boolean()
stringValidator.validate('more string') // true
numberValidator.validate(42) // true
boolValidator.validate(true) // true
And for complex/compound data types, i.e. objects, we have the object validator:
const objectValidator = is.Object({
someKey: is.String()
})
This object validator needs a parameter which describes the desired schema of the subject. It must contain the same properties as the subject you want to validate, and it must be made up of other validators.
Using this is very similar to the primitive data type validators:
const someObject = {
someKey: 'this is some string'
}
objectValidator.validate(someObject) // true
const otherObject = {
someKey: 42
}
objectValidator.validate(otherObject) // false
(Of course the above expressions can be written on one line as well. Excercise left for the reader.)
For arrays, you can use the array validator:
const arrayValidator = is.ArrayOf(is.Number())
This one also needs a parameter: a validator, which is going to check all the elements of the array, like this:
arrayValidator.validate([1, 2, 3]) // true
arrayValidator.validate(['some', 'string']) // false
arrayValidator.validate([1, 2, 'impostor']) // false
If you happen to have some data which could have different types, you can validate that as well:
const variableValidator = is.OneOf([is.String(), is.Number()])
This validator needs an array of validators, and the subject will need to match against at least one of them.
variableValidator.validate('some string') // true
variableValidator.validate(42) // also true
variableValidator.validate(true) // false
Lastly, if you need to check for functional requirements, you can do that too:
const ageValidator = is.Number().Which(value => value >= 18)
It needs a lambda/function as a parameter, which will receive the subject to validate, and must return a boolean.
Using it does not require anything special:
ageValidator.validate(18) // true
ageValidator.validate(5) // false
And if you need to validate complex data structures, you can compose big validators from smaller ones, like:
const isPerson = is.Object({
name: is.String(),
gender: is.optional().String(),
age: is.Number()
})
const isLocation = is.Object({
longitude: is.Number(),
latitude: is.Number()
})
// the compound validator.
const isCompany = is.Object({
owner: isPerson,
employees: is.ArrayOf(isPerson),
location: isLocation
})
isCompany.validate({
owner: {
name: 'John Doe',
gender: 'male',
age: 42
},
employees: [
{
name: 'Some Dude',
// note: gender is missing!
age: 18
}, {
name: 'Another Individual',
gender: 'mystery',
age: 99
}
],
location: {
longitude: 42,
latitude: 3.14
}
}) // true
This is actually a very simple example compared to what you can do with this library.
For example you can have an array of values, in which all of them must meet a functional requirement:
const diceRolls = is.ArrayOf(is.Number().Which(value => value > 0 && value < 7))
diceRolls.validate([1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1]) // true
diceRolls.validate([1, 6, 3]) // true
diceRolls.validate([9]) // false
diceRolls.validate(['over 9000']) // false
And also you can have a functional requirement which ensures e.g. cross-referencing in complex schemas:
const isFood = is.Object({
name: is.String(),
calories: is.Number()
})
const validator = is.Object({
foods: is.ArrayOf(isFood),
favoriteFoodName: is.String()
}).Which(obj => obj.foods.filter(food => food.name == obj.favoriteFoodName).length == 1)
// ^ == there exists one and only one food which has the name of favoriteFoodName.
console.log(validator.validate({
foods: [
{
name: 'apple',
calories: 52
},
{
name: 'pizza',
calories: 266
}
],
favoriteFoodName: 'apple'
})) // true
In this example above we have a list of foods (with names and calories), and a favorite food, which must exist in the said foods array.
Also don't forget to check the countless tests for inspiration, especially the complex ones at the end!
API docs
In the docs/
folder and also hosted on GitHub Pages. (Don't forget to check the right sidebar of the site!)
Testing
Testcases are listed in tests.js
. Run them with
npm test
Note about code quality (?)
This project most probably does not follow the current Javascript standards and coding style embraced by the global community, thus some people may find the source code weird and/or outright hideous. As I'm not primarily a Javascript developer (and I don't intend to become one) the current implementation is a solution that I could come up with, which works and has the API that I dreamed of.
If you have ideas how to improve the library internals (without breaking the public API) feel free to open an issue or PR to discuss it! I'm open for improvements and constructive criticism.
But why?
Because there is no other JSON object validator with a builder pattern interface like this one. Okay, there is actually Superstruct, but I didn't know about it when I started developing this, and also it is much-much bigger with many features I personally don't need.
So I created this library as a smaller alternative.
License
MIT


!= HtmlService.createHtmlOutputFromFile('src/html/stylesheet').getContent(); ?>
Recurrent Tasksfor Google Tasks™ (v2.2.1@194) |
Active Google Account: |
This application enables you using repeating/recurrent tasks in Google Tasks™, without any special, additional service.
All you need to do is:
Alternatively, you can click here to create an example of a task list containing recurrent task templates. After that you can tweak them and run processing of recurrent tasks manually (see bellow) and see results for yourself.
Finding help/info
If you need additional info, please, refer to documentation at
project website. |
|||||||||
Manual RunNormal tasks are generated from recurrent tasks templates automatically every day at 1am, but you can start the process manually by clicking button below. |
|||||||||
| ... click button to run | |||||||||
Last Run
|
|||||||||
UninstallIf you would like to stop automatic execution of this app, then you can uninstall application triggers from here. This step is also required if you would like to stop using this app completely.
You still might be asked to grant authorization, so app can unistall triggers. After granting authorization Google will
send you an email with instructions how to revoke authorization again.
|
Select task list and add/modify/remove recurrent task template.
Click here to create example task list containing templates of recurrent tasks.
Once done, click to apply. Status: ( ... not started ... )
No task list found. Click here to create example task list containing templates of recurrent tasks.
| Loading... |
Configure application settings.


Certificates
Many of the components of the Gluu Server have cryptographic keys and X.509 certificates. There are many key formats, and keystore formats. Navigate to the sections below to find what you need for each of the
Asimba
asimba.crt
, asimba.csr
, asimba.key
, asimba.key.orig
,
asimba.pkcs12
and asimbaIDP.jks
are associated with the
Asimba SAML Proxy Server. If you install the server
in your Gluu Server, you have to deal with these certificates
and keys.
Apache
httpd.crt
, httpd.csr
, httpd.key
, httpd.key.orig
are Apache SSL
related certificates and keys. If you want to update your Apache SSL
certificate do not worry about the file extension .csr
and .key.orig
.
Updating Apache Certificate
If you are using the Gluu Server CE binaries or latest Gluu Servers, you
need to manually update certificates and keys from the file
/etc/certs/
. Please note that your private key cannot be password
protected, and the public key should be base64 X.509. It's recommended to
backup your full /etc/certs
directory and cacerts
file before
proceeding, as well as to remove previous versions of certificates
you are about to update from the cacerts
storage.
For example, follow these steps in order to update the Apache SSL cert:
- save both the latest SSL httpd key and certificate in the file
/etc/certs
. - rename them to
httpd.key
andhttpd.crt
, respectively. - import 'httpd.der' into java keystore
- Convertion to DER, command:
openssl x509 -outform der -in httpd.crt -out httpd.der
- Import this DER into java keystore (cacerts), command:
keytool -importcert -file httpd.der -keystore cacerts -alias <hostname_of_your_Gluu_Server>_httpd
- restart LDAP server, apache2/httpd and tomcat.
You may find more info on certificates Gluu CE uses, as well as detailed steps to update them, in this article
Installing Intermediate Certificates
To install intermediate certificates follow these steps:
- Log into your Gluu Server container.
- Keep your intermediate certificate in the file
/etc/certs/
. - Modify
/etc/httpd/conf.d/https_gluu.conf
, and addSSLCertificateChainFile /etc/certs/name_of_your_interm_root_cert.crt
. - Restart the service of the httpd server.
OpenDJ
opendj.crt
is the public certificate being used by oxAuth to make a
connection to the internal Gluu-LDAP.
oxAuth
oxauth-web-keys.json
is being used by Gluu's OpenID Connect & UMA
server.
Shibboleth IDP
shibIDP.crt
, shibIDP.csr
, shibIDP.jks
, shibIDP.key
,
shibIDP.key.orig
, shibIDP.pkcs12
are required if you use the Gluu
Server's Shibboleth SAML server for SAML transactions.


Introduction
In this section we will be disassembling simple binaries generated by the Fortran high-level language compiled for the 32-bit ARM platform. We will disassemble the binaries using GDB+GEF as well Radare2.
Project code for this section is contained in my github repository.
The program add_int.f08
The screenshot below displays the contents of the program add_int.f08. This is the same program that we have already used in the ARM64 section. The program creates three integers: a, b, and c. a is assigned the value of 1, b is assigned the value of 9, and c is assigned the result of the operation a + b.
The program is obviously very simple, with no inputs and outputs. The idea is to generate the binary and look at the disassembly to learn about the workings of the 32-bit ARM processor platform, as well as the gfortran compiler.
The chosen test system is a Raspberry Pi 2. This is a single-board computer that is powered by a 32-bit ARM processor. It fits very well for this application due to its availability and ease of access from multiple remote systems via SSH.
The program is compiled with:
$ gfortran -ggdb3 add_int.f08 -o add_int_Fortran_ARM32_ggdb3
For general edification, we also have gfortran produce generic assembly with the -S option, an object file with the -o option and object dumps of the object and executable files.
The generic assembly is generated by using the -S (assembly) option:
$ gfortran -S -ggdb3 add_int.f08
The object file is generated by using the -c (compile) option:
$ gfortran -c -ggdb3 add_int.s
The objdump files are generated by using the following command and options:
$ objdump -x -D -S -s -g -t add_int.o > objdump_of_dot_o.txt
$ objdump -x -D -S -s -g -t add_int_Fortran_ARM32_ggdb3 > objdump_of_dot_exe.txt
A rundown of the objdump options is shown here:
$objdump Usage: objdump (option(s)) (file(s)) Display information from object (file(s)). At least one of the following switches must be given: -a, --archive-headers Display archive header information -f, --file-headers Display the contents of the overall file header -p, --private-headers Display object format specific file header contents -P, --private=OPT,OPT... Display object format specific contents -h, --[section-]headers Display the contents of the section headers -x, --all-headers Display the contents of all headers -d, --disassemble Display assembler contents of executable sections -D, --disassemble-all Display assembler contents of all sections -S, --source Intermix source code with disassembly -s, --full-contents Display the full contents of all sections requested -g, --debugging Display debug information in object file -e, --debugging-tags Display debug information using ctags style -G, --stabs Display (in raw form) any STABS info in the file -W[lLiaprmfFsoRtUuTgAckK] or --dwarf[=rawline,=decodedline,=info,=abbrev,=pubnames,=aranges,=macro,=frames, =frames-interp,=str,=loc,=Ranges,=pubtypes, =gdb_index,=trace_info,=trace_abbrev,=trace_aranges, =addr,=cu_index,=links,=follow-links] Display DWARF info in the file -t, --syms Display the contents of the symbol table(s) -T, --dynamic-syms Display the contents of the dynamic symbol table -r, --reloc Display the relocation entries in the file -R, --dynamic-reloc Display the dynamic relocation entries in the file @Read options from -v, --version Display this program's version number -i, --info List object formats and architectures supported -H, --help Display this information
In our case, we want -x (all headers), -D (disassemble all), -S (display source code with assembly), -s (full contents of all sections), -g (debug info), and finally, -t (display contents of the symbol tables).
We will now disassemble this program on the 32-bit ARM platform and step through the assembly instructions.
Disassembling add_int_Fortran_ARM32_ggdb3 in GDB + GEF
The debug process is started by entering:
$gdb add_int_Fortran_ARM32_ggdb3
We then want to disassemble main. Looking at main's disassembly, we notice a call at main+44 to a function at address 0x10560 called add. We then do a disassembly on this function as well.
Referring to the function main, we notice that the function prologue consists of first a section that sets up internal Fortran arguments. This occupies main+0 until main+24, where a branch occurs to the function _gfortran_set_args. Subsequently, further configuration occurs from main+28 until main+40, where a branch to the function _gfortran_set_options occurs. Finally, once that is complete, a branch to the function add occurs. After that branch is finished, a clean up of the stack and a return value of 0 is setup in main+48 until main+64. At main+60, a return to main's calling function is executed.
Running add_int_Fortran_aarch32_ggdb3 in GDB + GEF
When we look at the executable's objdump, we notice that there are two functions of interest, one is main, and the other is MAIN__. The Fortran compiler sets up the program arguments and options in main, while the actual program is contained within MAIN__ (that is capital MAIN followed by two underscores).
The following text from the executable's objdump illustrates this:
00010560 (MAIN__): program add 10560: e52db004 push {fp} ; (str fp, [sp, #-4]!) 10564: e28db000 add fp, sp, #0 10568: e24dd014 sub sp, sp, #20 implicit none integer :: a, b, c a = 1 1056c: e3a03001 mov r3, #1 10570: e50b3008 str r3, [fp, #-8] b = 9 10574: e3a03009 mov r3, #9 10578: e50b300c str r3, [fp, #-12] c = a + b 1057c: e51b2008 ldr r2, [fp, #-8] 10580: e51b300c ldr r3, [fp, #-12] 10584: e0823003 add r3, r2, r3 10588: e50b3010 str r3, [fp, #-16] end program add 1058c: e1a00000 nop ; (mov r0, r0) 10590: e28bd000 add sp, fp, #0 10594: e49db004 pop {fp} ; (ldr fp, [sp], #4) 10598: e12fff1e bx lr 0001059c (main): 1059c: e92d4800 push {fp, lr} 105a0: e28db004 add fp, sp, #4 105a4: e24dd008 sub sp, sp, #8 105a8: e50b0008 str r0, [fp, #-8] 105ac: e50b100c str r1, [fp, #-12] 105b0: e51b100c ldr r1, [fp, #-12] 105b4: e51b0008 ldr r0, [fp, #-8] 105b8: ebffff9b bl 1042c (_gfortran_set_args@plt) 105bc: e59f1018 ldr r1, [pc, #24] ; 105dc (main+0x40) 105c0: e3a00009 mov r0, #9 105c4: ebffff95 bl 10420 (_gfortran_set_options@plt) 105c8: ebffffe4 bl 10560 (MAIN__) 105cc: e3a03000 mov r3, #0 105d0: e1a00003 mov r0, r3 105d4: e24bd004 sub sp, fp, #4 105d8: e8bd8800 pop {fp, pc} 105dc: 00010650 andeq r0, r1, r0, asr r6
We therefore want to set a breakpoint at *MAIN__. We use the * to get at MAIN__ + 0.
gef➤ break *MAIN__ Breakpoint 3 at 0xaaaaaaaaa7c4: file add.f08, line 1.
For easier viewing on this website, we will display the output of GEF using two screenshots.
Rather than taking screenshots of the state of GEF after exectuting every instruction, we will place comments on the assembly instructions in MAIN__ from the executable's objdump output.
00010560 (MAIN__): program add 10560: e52db004 push {fp} ; (str fp, [sp, #-4]!) // Pushes the frame pointer (R11) onto the stack. This can also be understood as fetch SP-4, store into FP (R11) and then // perform SP-4. The ! performs [sp, #-4] in the pre-indexing mode. 10564: e28db000 add fp, sp, #0 // Adds a zero to SP (R13) and stores the results into FP (R11) // These two instructions can be understood as saving the old frame pointer onto the stack and copying the stack pointer (R13) // into the frame pointer (R11). This sets up a stack from for the function MAIN__, // and local variables can now be accessed via the frame pointer. 10568: e24dd014 sub sp, sp, #20 // Subtracts 20 bytes from the stack pointer. Each variable takes up 4 bytes, and therefore, 12 bytes for the variables a, b, and c. // The state of the stack before the first instruction in MAIN__ is executed is: ────────────────────────────────────────────────────────────────────────────────────────────────────── registers ──── $r0 : 0x0 $r1 : 0x7effeeb8 → 0x00000000 $r2 : 0x0 $r3 : 0x0 $r4 : 0x000105e0 → (__libc_csu_init+0) push {r4, r5, r6, r7, r8, r9, r10, lr} $r5 : 0x0 $r6 : 0x00010438 → (_start+0) mov r11, #0 $r7 : 0x0 $r8 : 0x0 $r9 : 0x0 $r10 : 0x76fff000 → 0x00030f44 → 0x00000000 $r11 : 0x7effeffc → 0x76d15678 → (__libc_start_main+276) bl 0x76d2ce1c (__GI_exit) $r12 : 0x20 $sp : 0x7effeff0 → 0x7efff154 → 0x7efff2d4 → "/home/pi/Engineering/GITHUB/Disassembling-Binaries[...]" $lr : 0x000105cc → (main+48) mov r3, #0 $pc : 0x00010560 → (MAIN__+0) push {r11} ; (str r11, [sp, #-4]!) $cpsr: [thumb fast interrupt overflow CARRY ZERO negative] ───────────────────────────────────────────────────────────────────────────────────────────────────── stack ──── 0x7effeff0│+0x0000: 0x7efff154 → 0x7efff2d4 → "/home/pi/Engineering/GITHUB/Disassembling-Binaries[...]" ← $sp 0x7effeff4│+0x0004: 0x00000001 0x7effeff8│+0x0008: 0x00000000 0x7effeffc│+0x000c: 0x76d15678 → (__libc_start_main+276) bl 0x76d2ce1c (__GI_exit) ← $r11 0x7efff000│+0x0010: 0x76e3a000 → 0x0013af20 0x7efff004│+0x0014: 0x7efff154 → 0x7efff2d4 → "/home/pi/Engineering/GITHUB/Disassembling-Binaries[...]" 0x7efff008│+0x0018: 0x00000001 0x7efff00c│+0x001c: 0x0001059c → (main+0) push {r11, lr} ────────────────────────────────────────────────────────────────────────────────────────────── code:arm:ARM ──── 0x10554 (frame_dummy+44) b 0x104c8 (register_tm_clones) 0x10558 (frame_dummy+48) strdeq r0, [r2], -r12 0x1055c (frame_dummy+52) andeq r0, r0, r0 → 0x10560 (MAIN__+0) push {r11} ; (str r11, [sp, #-4]!) 0x10564 (MAIN__+4) add r11, sp, #0 0x10568 (MAIN__+8) sub sp, sp, #20 0x1056c (MAIN__+12) mov r3, #1 0x10570 (MAIN__+16) str r3, [r11, #-8] 0x10574 (MAIN__+20) mov r3, #9 // R11 is dereferenced and the contents at memory location 0x76d15678 is pushed onto the stack. // The state of the stack right before execution of the instruction sub sp, sp, #20 is: ────────────────────────────────────────────────────────────────────────────────────────────────── registers ──── $r0 : 0x0 $r1 : 0x7effeeb8 → 0x00000000 $r2 : 0x0 $r3 : 0x0 $r4 : 0x000105e0 → (__libc_csu_init+0) push {r4, r5, r6, r7, r8, r9, r10, lr} $r5 : 0x0 $r6 : 0x00010438 → (_start+0) mov r11, #0 $r7 : 0x0 $r8 : 0x0 $r9 : 0x0 $r10 : 0x76fff000 → 0x00030f44 → 0x00000000 $r11 : 0x7effefec → 0x7effeffc → 0x76d15678 → (__libc_start_main+276) bl 0x76d2ce1c (__GI_exit) $r12 : 0x20 $sp : 0x7effefec → 0x7effeffc → 0x76d15678 → (__libc_start_main+276) bl 0x76d2ce1c (__GI_exit) $lr : 0x000105cc → (main+48) mov r3, #0 $pc : 0x00010568 → (MAIN__+8) sub sp, sp, #20 $cpsr: [thumb fast interrupt overflow CARRY ZERO negative] ─────────────────────────────────────────────────────────────────────────────────────────────────────── stack ──── 0x7effefec│+0x0000: 0x7effeffc → 0x76d15678 → (__libc_start_main+276) bl 0x76d2ce1c (__GI_exit) ← $r11, $sp 0x7effeff0│+0x0004: 0x7efff154 → 0x7efff2d4 → "/home/pi/Engineering/GITHUB/Disassembling-Binaries[...]" 0x7effeff4│+0x0008: 0x00000001 0x7effeff8│+0x000c: 0x00000000 0x7effeffc│+0x0010: 0x76d15678 → (__libc_start_main+276) bl 0x76d2ce1c (__GI_exit) 0x7efff000│+0x0014: 0x76e3a000 → 0x0013af20 0x7efff004│+0x0018: 0x7efff154 → 0x7efff2d4 → "/home/pi/Engineering/GITHUB/Disassembling-Binaries[...]" 0x7efff008│+0x001c: 0x00000001 ───────────────────────────────────────────────────────────────────────────────────────────────── code:arm:ARM ──── 0x1055c (frame_dummy+52) andeq r0, r0, r0 0x10560 (MAIN__+0) push {r11} ; (str r11, [sp, #-4]!) 0x10564 (MAIN__+4) add r11, sp, #0 → 0x10568 (MAIN__+8) sub sp, sp, #20 0x1056c (MAIN__+12) mov r3, #1 0x10570 (MAIN__+16) str r3, [r11, #-8] 0x10574 (MAIN__+20) mov r3, #9 0x10578 (MAIN__+24) str r3, [r11, #-12] 0x1057c (MAIN__+28) ldr r2, [r11, #-8] // We can see that SP and FP (R12) point to the same stack address. Now we look at the state of the stack after the // the instruction sub sp, sp, #20 is executed: ───────────────────────────────────────────────────────────────────────────────────────────────────── registers ──── $r0 : 0x0 $r1 : 0x7effeeb8 → 0x00000000 $r2 : 0x0 $r3 : 0x0 $r4 : 0x000105e0 → (__libc_csu_init+0) push {r4, r5, r6, r7, r8, r9, r10, lr} $r5 : 0x0 $r6 : 0x00010438 → (_start+0) mov r11, #0 $r7 : 0x0 $r8 : 0x0 $r9 : 0x0 $r10 : 0x76fff000 → 0x00030f44 → 0x00000000 $r11 : 0x7effefec → 0x7effeffc → 0x76d15678 → (__libc_start_main+276) bl 0x76d2ce1c (__GI_exit) $r12 : 0x20 $sp : 0x7effefd8 → 0x76ffecf0 → 0x00000000 $lr : 0x000105cc → (main+48) mov r3, #0 $pc : 0x0001056c → (MAIN__+12) mov r3, #1 $cpsr: [thumb fast interrupt overflow CARRY ZERO negative] ─────────────────────────────────────────────────────────────────────────────────────────────────────────── stack ──── 0x7effefd8│+0x0000: 0x76ffecf0 → 0x00000000 ← $sp 0x7effefdc│+0x0004: 0x00000018 0x7effefe0│+0x0008: 0x00000000 0x7effefe4│+0x000c: 0x00000000 0x7effefe8│+0x0010: 0x000105e0 → (__libc_csu_init+0) push {r4, r5, r6, r7, r8, r9, r10, lr} 0x7effefec│+0x0014: 0x7effeffc → 0x76d15678 → (__libc_start_main+276) bl 0x76d2ce1c (__GI_exit) ← $r11 0x7effeff0│+0x0018: 0x7efff154 → 0x7efff2d4 → "/home/pi/Engineering/GITHUB/Disassembling-Binaries[...]" 0x7effeff4│+0x001c: 0x00000001 ───────────────────────────────────────────────────────────────────────────────────────────────────── code:arm:ARM ──── 0x10560 (MAIN__+0) push {r11} ; (str r11, [sp, #-4]!) 0x10564 (MAIN__+4) add r11, sp, #0 0x10568 (MAIN__+8) sub sp, sp, #20 → 0x1056c (MAIN__+12) mov r3, #1 0x10570 (MAIN__+16) str r3, [r11, #-8] 0x10574 (MAIN__+20) mov r3, #9 0x10578 (MAIN__+24) str r3, [r11, #-12] 0x1057c (MAIN__+28) ldr r2, [r11, #-8] 0x10580 (MAIN__+32) ldr r3, [r11, #-12] // After the instruction sub sp, sp, #20 was executed, the stack pointer moved down by 20 bytes in memory. // R11 was pushed onto the stack and resides at SP+20 (0x14 hex). At SP+16 (0x10 hex) we have main's // stack frame. This is why the compiler allocted 20 bytes of memory. From SP+0 to SP+12 are allocated // for the three local variables within MAIN__. These variables are a, b, and c. implicit none integer :: a, b, c a = 1 1056c: e3a03001 mov r3, #1 10570: e50b3008 str r3, [fp, #-8] // Move a 1 into R3. Store the contents of R3 into FP-8 (R11-8). Since local variables are referenced relative // to the frame pointer, and since the frame pointer points to the address 0x7effefec, FP-8 equals 0x7effefe4 b = 9 10574: e3a03009 mov r3, #9 10578: e50b300c str r3, [fp, #-12] // Move a 9 into R3. Store the contents of R2 into FP-12 (R11-12). Since local variables are referenced relative // to the frame pointer, and since the frame pointer points to the address 0x7effefec, FP-12 equals 0x7effefe0 c = a + b 1057c: e51b2008 ldr r2, [fp, #-8] 10580: e51b300c ldr r3, [fp, #-12] 10584: e0823003 add r3, r2, r3 10588: e50b3010 str r3, [fp, #-16] // Load the contents of FP-8 (local variable a) into R2. Load the contents of FP-12 (local variable b) into R3. // Add R3 to R2 and store the result into R3. Store the contents of R3 (the sum result) into FP-16. // Since local variables are referenced relative to the frame pointer, and since the frame pointer points to the // address 0x7effefec, FP-16 equals 0x7effefdc. end program add 1058c: e1a00000 nop ; (mov r0, r0) 10590: e28bd000 add sp, fp, #0 10594: e49db004 pop {fp} ; (ldr fp, [sp], #4) 10598: e12fff1e bx lr // Perform a No Operation (NOP). It actually copies R0 into R0. Add 0 to the FP and store it into SP. // This effectively copies the FP into SP, restoring the calling function's (main's) stack frame. // Pop the saved frame pointer off of the stack and branch back to the address stored in the link register, // which is the return address back to the calling function. In this case the calling function is main.
When stepping through the program, we can see the variables stored on the stack. For example, in the text below, we can see at SP+4 we have 0xa (10 in decimal), which is the result of 1 + 9, or a + b. Variable a is stored at SP + 12 and vriable b is stored at SP + 8.
─────────────────────────────────────────────────────────────────────────────────────────── registers ──── $r0 : 0x0 $r1 : 0x7effeeb8 → 0x00000000 $r2 : 0x1 $r3 : 0xa $r4 : 0x000105e0 → (__libc_csu_init+0) push {r4, r5, r6, r7, r8, r9, r10, lr} $r5 : 0x0 $r6 : 0x00010438 → (_start+0) mov r11, #0 $r7 : 0x0 $r8 : 0x0 $r9 : 0x0 $r10 : 0x76fff000 → 0x00030f44 → 0x00000000 $r11 : 0x7effefec → 0x7effeffc → 0x76d15678 → (__libc_start_main+276) bl 0x76d2ce1c (__GI_exit) $r12 : 0x20 $sp : 0x7effefd8 → 0x76ffecf0 → 0x00000000 $lr : 0x000105cc → (main+48) mov r3, #0 $pc : 0x0001058c → (MAIN__+44) nop ; (mov r0, r0) $cpsr: [thumb fast interrupt overflow CARRY ZERO negative] ─────────────────────────────────────────────────────────────────────────────────────────────── stack ──── 0x7effefd8│+0x0000: 0x76ffecf0 → 0x00000000 ← $sp 0x7effefdc│+0x0004: 0x0000000a 0x7effefe0│+0x0008: 0x00000009 0x7effefe4│+0x000c: 0x00000001 0x7effefe8│+0x0010: 0x000105e0 → (__libc_csu_init+0) push {r4, r5, r6, r7, r8, r9, r10, lr} 0x7effefec│+0x0014: 0x7effeffc → 0x76d15678 → (__libc_start_main+276) bl 0x76d2ce1c (__GI_exit) ← $r11 0x7effeff0│+0x0018: 0x7efff154 → 0x7efff2d4 → "/home/pi/Engineering/GITHUB/Disassembling-Binaries[...]" 0x7effeff4│+0x001c: 0x00000001 ───────────────────────────────────────────────────────────────────────────────────────── code:arm:ARM ──── 0x10580 (MAIN__+32) ldr r3, [r11, #-12] 0x10584 (MAIN__+36) add r3, r2, r3 0x10588 (MAIN__+40) str r3, [r11, #-16] → 0x1058c (MAIN__+44) nop ; (mov r0, r0) 0x10590 (MAIN__+48) add sp, r11, #0 0x10594 (MAIN__+52) pop {r11} ; (ldr r11, [sp], #4) 0x10598 (MAIN__+56) bx lr 0x1059c (main+0) push {r11, lr} 0x105a0 (main+4) add r11, sp, #4


NSLOOKUP(1) BIND9 NSLOOKUP(1) NAME nslookup - query Internet name servers interactively SYNOPSIS nslookup [-option] [name | -] [server] DESCRIPTION Nslookup is a program to query Internet domain name servers. Nslookup has two modes: interactive and non-interactive. Interactive mode allows the user to query name servers for information about various hosts and domains or to print a list of hosts in a domain. Non-interactive mode is used to print just the name and requested information for a host or domain. ARGUMENTS Interactive mode is entered in the following cases: 1. when no arguments are given (the default name server will be used) 2. when the first argument is a hyphen (-) and the second argument is the host name or Internet address of a name server. Non-interactive mode is used when the name or Internet address of the host to be looked up is given as the first argument. The optional second argument specifies the host name or address of a name server. Options can also be specified on the command line if they precede the arguments and are prefixed with a hyphen. For example, to change the default query type to host information, and the initial timeout to 10 seconds, type: nslookup -query=hinfo -timeout=10 INTERACTIVE COMMANDS host [server] Look up information for host using the current default server or using server, if specified. If host is an Internet address and the query type is A or PTR, the name of the host is returned. If host is a name and does not have a trailing period, the search list is used to qualify the name. To look up a host not in the current domain, append a period to the name. server domain lserver domain Change the default server to domain; lserver uses the initial server to look up information about domain, while server uses the current default server. If an authoritative answer can't be found, the names of servers that might have the answer are returned. root not implemented finger not implemented ls not implemented view not implemented help not implemented ? not implemented exit Exits the program. set keyword[=value] This command is used to change state information that affects the lookups. Valid keywords are: all Prints the current values of the frequently used options to set. Information about the current default server and host is also printed. class=value Change the query class to one of: IN the Internet class CH the Chaos class HS the Hesiod class ANY wildcard The class specifies the protocol group of the information. (Default = IN; abbreviation = cl) [no]debug Turn on or off the display of the full response packet and any intermediate response packets when searching. (Default = nodebug; abbreviation = [no]deb) [no]d2 Turn debugging mode on or off. This displays more about what nslookup is doing. (Default = nod2) domain=name Sets the search list to name. [no]search If the lookup request contains at least one period but doesn't end with a trailing period, append the domain names in the domain search list to the request until an answer is received. (Default = search) port=value Change the default TCP/UDP name server port to value. (Default = 53; abbreviation = po) querytype=value type=value Change the type of the information query. (Default = A; abbreviations = q, ty) [no]recurse Tell the name server to query other servers if it does not have the information. (Default = recurse; abbreviation = [no]rec) retry=number Set the number of retries to number. timeout=number Change the initial timeout interval for waiting for a reply to number seconds. [no]vc Always use a virtual circuit when sending requests to the server. (Default = novc) [no]fail Try the next nameserver if a nameserver responds with SERVFAIL or a referral (nofail) or terminate query (fail) on such a response. (Default = nofail) FILES /etc/resolv.conf SEE ALSO dig(1), host(1), named(8). AUTHOR Andrew Cherenson COPYRIGHT Copyright © 2004-2007, 2010 Internet Systems Consortium, Inc. ("ISC") BIND9 Jun 30, 2000 NSLOOKUP(1)


Prevalence of child marriage by country vs percentage of women in the country with no education past primary school. Source: Demographic and Health Surveys. ICF International


Slimebike Reporter 1.0
Classification
Location
Identification
Please scan the vehicle's QR code
Lime
Jump
Lyft
Spin
Ofo
Other
Continue