Color manipulations
There is no dedicated Color
data type in rot.js; passing strings around is sufficient in most cases (such as ROT.Display::draw
). However, if you need to perform color adjustments and computations, it is suitable to represent them as arrays of numbers.
Converting string → array
SHOW(
ROT.Color.fromString("rgb(10, 128, 230)"),
ROT.Color.fromString("#faa"),
ROT.Color.fromString("#83fcc4"),
ROT.Color.fromString("goldenrod")
);
Converting array → string
SHOW(
ROT.Color.toRGB([10, 128, 230]),
ROT.Color.toHex([10, 128, 230])
);
Converting between RGB and HSL
SHOW(
ROT.Color.rgb2hsl([51, 102, 51]),
ROT.Color.hsl2rgb([0.333, 0.333, 0.3])
);
Adding and mixing colors
These methods accept a variable number of arguments. Methods whose names end with an underscore modify their first argument instead of returning a new array. Note that color values are not clamped to 0..255; this happens only when serializing to a string.
SHOW( /* addition = lightening */
ROT.Color.add([10, 128, 230], [200, 10, 15], [30, 30, 100]),
ROT.Color.add_([10, 128, 230], [200, 10, 15])
);
SHOW( /* multiplication = darkening */
ROT.Color.multiply([10, 128, 230], [200, 10, 15]),
ROT.Color.multiply_([10, 128, 230], [200, 10, 15])
);
Interpolating between two colors
The third argument specifies the interpolation factor (0 = first color, 1 = last color, 0.5 = default = halfway between them).
SHOW(
/* computed in RGB space */
ROT.Color.interpolate([10, 128, 230], [30, 255, 255], 0.3),
/* computed in HSL space */
ROT.Color.interpolateHSL([10, 128, 230], [30, 255, 255], 0.3)
);
Creating random variants
You can create new colors by adjusting an exiting color by a (normally distributed) random value. Second argument is a set of standard deviations; note that ~95% of generated colors will fall within 2*stddev
.
SHOW(
ROT.Color.randomize([100, 128, 230], [30, 10, 20]),
ROT.Color.randomize([100, 128, 230], [30, 10, 20]),
ROT.Color.randomize([100, 128, 230], [30, 10, 20])
);


You are viewing an historical archive of past issues. Please
report new issues to the appropriate project issue tracker on
GitHub.
Comments
-
Greg Hurrell
It was a mistake in the config file (specifically, we were rewriting to
$1$index_filename
instead of$1$index_filename$cache_extension
in one place). The relevant section of the config file now looks like this:# rewrite all requests to *.wincent.com back to wincent.com if ($host != wincent.com) { rewrite ^(.*) https://wincent.com$1 permanent; } # serve static content without hitting Rails # this also bypasses our maintenance page check location ~ /(images|javascripts|stylesheets)/ { expires 72h; } location /system/maintenance.html { # always allow access to this file; explained here: # http://www.ruby-forum.com/topic/141251 } location / { if (-f $document_root/system/maintenance.html) { error_page 503 /system/maintenance.html; return 503; } # cached pages: only for GET requests set $cache_extension ''; if ($request_method = GET) { set $cache_extension '.html'; } if (-f $request_filename) { break; } set $index_filename 'index'; if (-f $request_filename$index_filename$cache_extension) { # URI has trailing slash rewrite (.*) $1$index_filename$cache_extension break; } if (-f $request_filename/$index_filename$cache_extension) { # URI has no trailing slash rewrite (.*) $1/ permanent; } if (-f $request_filename$cache_extension) { rewrite (.*) $1.html break; } if (-f $static_root$uri) { root $static_root; break; } if (-f $static_root${uri}index.html) { # URI has trailing slash root $static_root; rewrite (.*) $1$index_filename$cache_extension break; } if (-f $static_root$uri/index.html) { # URI has no trailing slash rewrite (.*) $1/ permanent; } proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X_FORWARDED_PROTO https; proxy_max_temp_file_size 0; if (!-f $request_filename) { proxy_pass http://unicorn; break; } }
-
Greg Hurrell
Status changed:
- From: new
- To: closed
Add a comment
Comments are now closed for this issue.


Homepage of Nels Beckman
nb
XXX
@cs.cmu.edu
Welcome!
From 2005 until 2010 I was a Software Engineering PhD. student at Carnegie Mellon University. But now I have
graduated! The program is run
through the Institute for Software Research. My advisor was Dr. Jonathan Aldrich.
From 2001 until 2005 I was an undergraduate major in computer science
at the University of Southern California.
I was also a research assistant under
Nenad Medvidovic in the USC Center for
Software Engineering.
|


|
libcdx: Interfaces to the Channel Data Exchange (CDX) File Format
C++, Python, and Matlab library to exchange data for radio propagation channels
|
Writes CIRs to Commond Channel Data Exchange (CDX) files. Opens always a new file. TODO: append data to an existing file. More...
Public Member Functions | |
| function | CDXWriteFile (in filename, in parameters) |
| function | get_file_name (in obj) |
| function | get_number_of_links (in obj) |
| function | get_cir_rate (in obj) |
| function | get_number_of_cirs (in obj) |
| function | get_delay_type (in obj) |
| function | append_cir (in obj, in cir) |
| function | delete (in obj) |
| function | append_continuous_delay_cir (in obj, in link_cir) |
| This function appends a cir with continuous delay data to a CDX file. | |
| function | append_value_to_dataset (in obj, in group_id, in DATASET, in value) |
| This function appends a single value to a HDF5 dataset. | |
| function | write_discrete_delay_cirs (in obj, in link_cir) |
| This function appends a cir with discrete delay data to a CDX file. | |
| function | write_string (in obj, in group_id, in DATASET, in value) |
| This function appends a single value to a HDF5 dataset Based on http://www.hdfgroup.org/ftp/HDF5/examples/examples-by-api/matlab/HDF5_M_Examples/h5ex_t_string.m. | |
Writes CIRs to Commond Channel Data Exchange (CDX) files. Opens always a new file. TODO: append data to an existing file.


--- <<<<<<< HEAD layout: page title: Home --- ======= layout: default title: Sailaja Yenepalli ---
I'm hosted with GitHub pages


About Jordan Westhoff
Hey there,
My name is Jordan Westhoff and I am an enthusiastic worker who places value on efficiency, professional delivery and integrity. I have a diverse knowledge of digital video, networking and computational programming with an express interest in how they can collide to develop advances in networking, cinema and imaging science technology.
My work at the Rochester Institute of Technology encompasses quite a diverse range of subjects, from film and digital film productions to radiometry and IT work that involves High Performance Computing and 4K video technologies. In addition to all of this, I am working on my own Senior Thesis project, the Cerberus cluster, in order to complete my degree and graduate this spring. I have posted several interesting links below that are relevant, go ahead and give them a look!
GitHub
Project and code by @jordanwesthoff. Click on the profile for my GitHub page!
"You are not like Cerberus, three gentlemen at once, are you?"
- Richard Brinsley Sheridan: Act IV, sc. ii.


This example shows how to use the Custom element Grid's Cells Selection API.
Scroll to Row
Enable Hover
Selection Mode:
Row:
Column:
Clear Selection
Select Cell
Selection Log:
Selected Cell:
Unselected Cell:


2 references to IsDashQuestion
System.Management.Automation (2)
engine\CommandProcessor.cs (1)
835
if (parameter.
IsDashQuestion
())
engine\ScriptCommandProcessor.cs (1)
142
if (parameter.
IsDashQuestion
())


Have a question? Visit our updated knowledge base.
Contact us at<EMAIL_ADDRESS>for critical security issues.
We have your support request and will get back to you as soon as possible - usually within 1-2 days.


| pugixml 1.2 manual | Overview | Installation | Document: Object model · Loading · Accessing · Modifying · Saving | XPath | API Reference | Table of Contents |
pugixml stores XML data in DOM-like way: the entire XML document (both document structure and element data) is stored in memory as a tree. The tree can be loaded from a character stream (file, string, C++ I/O stream), then traversed with the special API or XPath expressions. The whole tree is mutable: both node structure and node/attribute data can be changed at any time. Finally, the result of document transformations can be saved to a character stream (file, C++ I/O stream or custom transport).
The XML document is represented with a tree data structure. The root of the tree is the document itself, which corresponds to C++ type xml_document. Document has one or more child nodes, which correspond to C++ type xml_node. Nodes have different types; depending on a type, a node can have a collection of child nodes, a collection of attributes, which correspond to C++ type xml_attribute, and some additional data (i.e. name).
The tree nodes can be of one of the following types (which together form
the enumeration xml_node_type
):
node_document
) - this
is the root of the tree, which consists of several child nodes. This
node corresponds to xml_document
class; note that xml_document is
a sub-class of xml_node, so the entire
node interface is also available. However, document node is special in
several ways, which are covered below. There can be only one document
node in the tree; document node does not have any XML representation.
node_element
) - this
is the most common type of node, which represents XML elements. Element
nodes have a name, a collection of attributes and a collection of child
nodes (both of which may be empty). The attribute is a simple name/value
pair. The example XML representation of element nodes is as follows:
<node attr="value"><child/></node>
There are two element nodes here: one has name
"node"
, single attribute"attr"
and single child"child"
, another has name"child"
and does not have any attributes or child nodes.
node_pcdata
)
represent plain text in XML. PCDATA nodes have a value, but do not have
a name or children/attributes. Note that plain
character data is not a part of the element node but instead has its
own node; an element node can have several child PCDATA nodes.
The example XML representation of text nodes is as follows:
<node> text1 <child/> text2 </node>
Here
"node"
element has three children, two of which are PCDATA nodes with values" text1 "
and" text2 "
.
<node> <![CDATA[[text1]]> <child/> <![CDATA[[text2]]> </node>
CDATA nodes make it easy to include non-escaped <, & and > characters in plain text. CDATA value can not contain the character sequence ]]>, since it is used to determine the end of node contents.
<!-- comment text -->
Here the comment node has value
"comment text"
. By default comment nodes are treated as non-essential part of XML markup and are not loaded during XML parsing. You can override this behavior with parse_comments flag.
<?name value?>
Here the name (also called PI target) is
"name"
, and the value is"value"
. By default PI nodes are treated as non-essential part of XML markup and are not loaded during XML parsing. You can override this behavior with parse_pi flag.
node_declaration
)
represents document declarations in XML. Declaration nodes have a name
("xml"
) and an
optional collection of attributes, but do not have value or children.
There can be only one declaration node in a document; moreover, it should
be the topmost node (its parent should be the document). The example
XML representation of a declaration node is as follows:
<?xml version="1.0"?>
Here the node has name
"xml"
and a single attribute with name"version"
and value"1.0"
. By default declaration nodes are treated as non-essential part of XML markup and are not loaded during XML parsing. You can override this behavior with parse_declaration flag. Also, by default a dummy declaration is output when XML document is saved unless there is already a declaration in the document; you can disable this with format_no_declaration flag.
node_doctype
)
represents document type declarations in XML. Document type declaration
nodes have a value, which corresponds to the entire document type contents;
no additional nodes are created for inner elements like <!ENTITY>
. There can be only one document type
declaration node in a document; moreover, it should be the topmost node
(its parent should be the document). The example XML representation of
a document type declaration node is as follows:
<!DOCTYPE greeting [ <!ELEMENT greeting (#PCDATA)> ]>
Here the node has value
"greeting [ <!ELEMENT greeting (#PCDATA)> ]"
. By default document type declaration nodes are treated as non-essential part of XML markup and are not loaded during XML parsing. You can override this behavior with parse_doctype flag.
Finally, here is a complete example of XML document and the corresponding tree representation (samples/tree.xml):
| Note | |
|---|---|
All pugixml classes and functions are located in the |
Despite the fact that there are several node types, there are only three
C++ classes representing the tree (xml_document
,
xml_node
, xml_attribute
);
some operations on xml_node
are only valid for certain node types. The classes are described below.
xml_document
is the owner
of the entire document structure; it is a non-copyable class. The interface
of xml_document
consists
of loading functions (see Loading document), saving functions (see Saving document)
and the entire interface of xml_node
,
which allows for document inspection and/or modification. Note that while
xml_document
is a sub-class
of xml_node
, xml_node
is not a polymorphic type; the
inheritance is present only to simplify usage. Alternatively you can use
the document_element
function
to get the element node that's the immediate child of the document.
Default constructor of xml_document
initializes the document to the tree with only a root node (document node).
You can then populate it with data using either tree modification functions
or loading functions; all loading functions destroy the previous tree with
all occupied memory, which puts existing node/attribute handles for this
document to invalid state. If you want to destroy the previous tree, you
can use the xml_document::reset
function; it destroys the tree and replaces it with either an empty one or
a copy of the specified document. Destructor of xml_document
also destroys the tree, thus the lifetime of the document object should exceed
the lifetimes of any node/attribute handles that point to the tree.
| Caution | |
|---|---|
While technically node/attribute handles can be alive when the tree they're referring to is destroyed, calling any member function for these handles results in undefined behavior. Thus it is recommended to make sure that the document is destroyed only after all references to its nodes/attributes are destroyed. |
xml_node
is the handle to
document node; it can point to any node in the document, including the document
node itself. There is a common interface for nodes of all types; the actual
node type can be queried via the xml_node::type()
method. Note that xml_node
is only a handle to the actual node, not the node itself - you can have several
xml_node
handles pointing
to the same underlying object. Destroying xml_node
handle does not destroy the node and does not remove it from the tree. The
size of xml_node
is equal
to that of a pointer, so it is nothing more than a lightweight wrapper around
a pointer; you can safely pass or return xml_node
objects by value without additional overhead.
There is a special value of xml_node
type, known as null node or empty node (such nodes have type node_null
). It does not correspond to any
node in any document, and thus resembles null pointer. However, all operations
are defined on empty nodes; generally the operations don't do anything and
return empty nodes/attributes or empty strings as their result (see documentation
for specific functions for more detailed information). This is useful for
chaining calls; i.e. you can get the grandparent of a node like so: node.parent().parent()
; if a node is a null node or it does not
have a parent, the first parent()
call returns null node; the second parent()
call then also returns null node, which makes error handling easier.
xml_attribute
is the handle
to an XML attribute; it has the same semantics as xml_node
,
i.e. there can be several xml_attribute
handles pointing to the same underlying object and there is a special null
attribute value, which propagates to function results.
Both xml_node
and xml_attribute
have the default constructor
which initializes them to null objects.
xml_node
and xml_attribute
try to behave like pointers,
that is, they can be compared with other objects of the same type, making
it possible to use them as keys in associative containers. All handles to
the same underlying object are equal, and any two handles to different underlying
objects are not equal. Null handles only compare as equal to themselves.
The result of relational comparison can not be reliably determined from the
order of nodes in file or in any other way. Do not use relational comparison
operators except for search optimization (i.e. associative container keys).
If you want to use xml_node
or xml_attribute
objects
as keys in hash-based associative containers, you can use the hash_value
member functions. They return
the hash values that are guaranteed to be the same for all handles to the
same underlying object. The hash value for null handles is 0.
Finally handles can be implicitly cast to boolean-like objects, so that you
can test if the node/attribute is empty with the following code: if (node) { ...
}
or if
(!node) { ...
} else { ... }
.
Alternatively you can check if a given xml_node
/xml_attribute
handle is null by calling
the following methods:
bool xml_attribute::empty() const; bool xml_node::empty() const;
Nodes and attributes do not exist without a document tree, so you can't create them without adding them to some document. Once underlying node/attribute objects are destroyed, the handles to those objects become invalid. While this means that destruction of the entire tree invalidates all node/attribute handles, it also means that destroying a subtree (by calling xml_node::remove_child) or removing an attribute invalidates the corresponding handles. There is no way to check handle validity; you have to ensure correctness through external mechanisms.
There are two choices of interface and internal representation when configuring
pugixml: you can either choose the UTF-8 (also called char) interface or
UTF-16/32 (also called wchar_t) one. The choice is controlled via PUGIXML_WCHAR_MODE
define; you can set it via pugiconfig.hpp
or via preprocessor options, as
discussed in Additional configuration
options. If this define is set, the wchar_t
interface is used; otherwise (by default) the char interface is used. The
exact wide character encoding is assumed to be either UTF-16 or UTF-32 and
is determined based on the size of wchar_t
type.
| Note | |
|---|---|
If the size of |
All tree functions that work with strings work with either C-style null terminated strings or STL strings of the selected character type. For example, node name accessors look like this in char mode:
const char* xml_node::name() const; bool xml_node::set_name(const char* value);
and like this in wchar_t mode:
const wchar_t* xml_node::name() const; bool xml_node::set_name(const wchar_t* value);
There is a special type, pugi::char_t
,
that is defined as the character type and depends on the library configuration;
it will be also used in the documentation hereafter. There is also a type
pugi::string_t
, which is defined as the STL string
of the character type; it corresponds to std::string
in char mode and to std::wstring
in wchar_t mode.
In addition to the interface, the internal implementation changes to store
XML data as pugi::char_t
; this means that these two modes
have different memory usage characteristics. The conversion to pugi::char_t
upon document loading and from
pugi::char_t
upon document saving happen automatically,
which also carries minor performance penalty. The general advice however
is to select the character mode based on usage scenario, i.e. if UTF-8 is
inconvenient to process and most of your XML data is non-ASCII, wchar_t mode
is probably a better choice.
There are cases when you'll have to convert string data between UTF-8 and wchar_t encodings; the following helper functions are provided for such purposes:
std::string as_utf8(const wchar_t* str); std::wstring as_wide(const char* str);
Both functions accept a null-terminated string as an argument str
, and return the converted string.
as_utf8
performs conversion
from UTF-16/32 to UTF-8; as_wide
performs conversion from UTF-8 to UTF-16/32. Invalid UTF sequences are silently
discarded upon conversion. str
has to be a valid string; passing null pointer results in undefined behavior.
There are also two overloads with the same semantics which accept a string
as an argument:
std::string as_utf8(const std::wstring& str); std::wstring as_wide(const std::string& str);
| Note | |
|---|---|
|
Most examples in this documentation assume char interface and therefore
will not compile with PUGIXML_WCHAR_MODE.
This is done to simplify the documentation; usually the only changes you'll
have to make is to pass
you'll have to do
|
Almost all functions in pugixml have the following thread-safety guarantees:
Concurrent modification and traversing of a single tree requires synchronization, for example via reader-writer lock. Modification includes altering document structure and altering individual node/attribute data, i.e. changing names/values.
The only exception is set_memory_management_functions; it modifies global variables and as such is not thread-safe. Its usage policy has more restrictions, see Custom memory allocation/deallocation functions.
With the exception of XPath, pugixml itself does not throw any exceptions. Additionally, most pugixml functions have a no-throw exception guarantee.
This is not applicable to functions that operate on STL strings or IOstreams; such functions have either strong guarantee (functions that operate on strings) or basic guarantee (functions that operate on streams). Also functions that call user-defined callbacks (i.e. xml_node::traverse or xml_node::find_node) do not provide any exception guarantees beyond the ones provided by the callback.
If exception handling is not disabled with PUGIXML_NO_EXCEPTIONS
define, XPath functions may throw xpath_exception
on parsing errors; also, XPath functions may throw std::bad_alloc
in low memory conditions. Still, XPath functions provide strong exception
guarantee.
pugixml requests the memory needed for document storage in big chunks, and allocates document data inside those chunks. This section discusses replacing functions used for chunk allocation and internal memory management implementation.
All memory for tree structure, tree data and XPath objects is allocated via globally specified functions, which default to malloc/free. You can set your own allocation functions with set_memory_management function. The function interfaces are the same as that of malloc/free:
typedef void* (*allocation_function)(size_t size); typedef void (*deallocation_function)(void* ptr);
You can use the following accessor functions to change or get current memory management functions:
void set_memory_management_functions(allocation_function allocate, deallocation_function deallocate); allocation_function get_memory_allocation_function(); deallocation_function get_memory_deallocation_function();
Allocation function is called with the size (in bytes) as an argument and
should return a pointer to a memory block with alignment that is suitable
for storage of primitive types (usually a maximum of void*
and double
types alignment is sufficient) and size that is greater than or equal to
the requested one. If the allocation fails, the function has to return
null pointer (throwing an exception from allocation function results in
undefined behavior).
Deallocation function is called with the pointer that was returned by some call to allocation function; it is never called with a null pointer. If memory management functions are not thread-safe, library thread safety is not guaranteed.
This is a simple example of custom memory management (samples/custom_memory_management.cpp):
void* custom_allocate(size_t size) { return new (std::nothrow) char[size]; } void custom_deallocate(void* ptr) { delete[] static_cast<char*>(ptr); }
pugi::set_memory_management_functions(custom_allocate, custom_deallocate);
When setting new memory management functions, care must be taken to make sure that there are no live pugixml objects. Otherwise when the objects are destroyed, the new deallocation function will be called with the memory obtained by the old allocation function, resulting in undefined behavior.
There are several important buffering optimizations in pugixml that rely on predefined constants. These constants have default values that were tuned for common usage patterns; for some applications, changing these constants might improve memory consumption or increase performance. Changing these constants is not recommended unless their default values result in visible problems.
These constants can be tuned via configuration defines, as discussed in
Additional configuration
options; it is recommended to set them in pugiconfig.hpp
.
PUGIXML_MEMORY_PAGE_SIZE
controls the page size for document memory allocation. Memory for node/attribute
objects is allocated in pages of the specified size. The default size
is 32 Kb; for some applications the size is too large (i.e. embedded
systems with little heap space or applications that keep lots of XML
documents in memory). A minimum size of 1 Kb is recommended. PUGIXML_MEMORY_OUTPUT_STACK
controls the cumulative stack space required to output the node. Any
output operation (i.e. saving a subtree to file) uses an internal buffering
scheme for performance reasons. The default size is 10 Kb; if you're
using node output from threads with little stack space, decreasing
this value can prevent stack overflows. A minimum size of 1 Kb is recommended.
PUGIXML_MEMORY_XPATH_PAGE_SIZE
controls the page size for XPath memory allocation. Memory for XPath
query objects as well as internal memory for XPath evaluation is allocated
in pages of the specified size. The default size is 4 Kb; if you have
a lot of resident XPath query objects, you might need to decrease the
size to improve memory consumption. A minimum size of 256 bytes is
recommended.
Constructing a document object using the default constructor does not result in any allocations; document node is stored inside the xml_document object.
When the document is loaded from file/buffer, unless an inplace loading function is used (see Loading document from memory), a complete copy of character stream is made; all names/values of nodes and attributes are allocated in this buffer. This buffer is allocated via a single large allocation and is only freed when document memory is reclaimed (i.e. if the xml_document object is destroyed or if another document is loaded in the same object). Also when loading from file or stream, an additional large allocation may be performed if encoding conversion is required; a temporary buffer is allocated, and it is freed before load function returns.
All additional memory, such as memory for document structure (node/attribute objects) and memory for node/attribute names/values is allocated in pages on the order of 32 kilobytes; actual objects are allocated inside the pages using a memory management scheme optimized for fast allocation/deallocation of many small objects. Because of the scheme specifics, the pages are only destroyed if all objects inside them are destroyed; also, generally destroying an object does not mean that subsequent object creation will reuse the same memory. This means that it is possible to devise a usage scheme which will lead to higher memory usage than expected; one example is adding a lot of nodes, and them removing all even numbered ones; not a single page is reclaimed in the process. However this is an example specifically crafted to produce unsatisfying behavior; in all practical usage scenarios the memory consumption is less than that of a general-purpose allocator because allocation meta-data is very small in size.
| pugixml 1.2 manual | Overview | Installation | Document: Object model · Loading · Accessing · Modifying · Saving | XPath | API Reference | Table of Contents |


L
O
A
D
I
N
G
ADD CREDIT
Available credits:
$1,500
+$5
+$10
+$25
+$50
+$100
Request for a bonus
Amount:
$100
Bonus:
$50
Total:
$150
CONFIRM
Please choose what to do with the remaining credit?
Collect to my wallet
Save in Game Credits
Inactive
You have been inactive for too long.


Projects
About
Hello! My name is Duane Rush welcome to my code portfolio. I was born in Washington and lived in Gig Harbor until the end of my second grade year. My family and I then moved to Southern Califonia where we lived until I had finished high school. We then decided to move back to our home state where I attended college at Central Washington University and got my bachelors in cell biology. After working an unfulfilling lab tech job for three years I realized my pasion was not with biology and that is how I came to discover Code Fellows.
The tech industry has always been of interest to me and with the discovery of Code Fellows I now have the opportunity to turn it into a life long career.


public class ThreadPool
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
ThreadPool.ContainerOfThreads |
static class |
ThreadPool.RecordingScheduledExecutor |
static class |
ThreadPool.RecordingThreadPool |
static class |
ThreadPool.Singleton<T>
Singletons are helpers that gatekeep execution of work on a service to a single runnable
at a time.
|
static class |
ThreadPool.SingletonResult<T>
SingletonResults are returned from
Singletons as a token
that can be used to await the completion of submitted work. |
static interface |
ThreadPool.ThreadBorrowable
Indicates a thread pool that is at times capable of using guest worker threads
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
TAG |
| Constructor and Description |
|---|
ThreadPool() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
awaitFuture(java.util.concurrent.Future future,
long timeout,
java.util.concurrent.TimeUnit unit) |
static boolean |
awaitTermination(java.util.concurrent.ExecutorService executorService,
long timeout,
java.util.concurrent.TimeUnit unit,
java.lang.String serviceName)
Waits for the indicated timeout for the indicated executor service to shutdown.
|
static void |
awaitTerminationOrExitApplication(java.util.concurrent.ExecutorService executorService,
long timeout,
java.util.concurrent.TimeUnit unit,
java.lang.String serviceName,
java.lang.String message)
Awaits the termination of the indicated service for the indicated timeout.
|
static void |
cancelFutureOrExitApplication(java.util.concurrent.Future future,
long timeout,
java.util.concurrent.TimeUnit unit,
java.lang.String serviceName,
java.lang.String message) |
static void |
exitApplication(java.lang.String serviceName,
java.lang.String message) |
static java.util.concurrent.ExecutorService |
getDefault() |
static java.util.concurrent.ScheduledExecutorService |
getDefaultScheduler() |
static java.util.concurrent.ExecutorService |
getDefaultSerial() |
static int |
getTID(long threadId)
Returns the OS-level thread id for the indicated Android-level thread id
|
static int |
getTID(java.lang.Thread thread)
Returns the OS-level thread id for the given thread
|
static void |
logThreadLifeCycle(java.lang.String name,
java.lang.Runnable runnable)
Robustly log thread startup and shutdown
|
static java.util.concurrent.ExecutorService |
newCachedThreadPool(java.lang.String nameRoot)
Creates a thread pool that creates new threads as needed, but will reuse previously constructed
threads when they are available.
|
static java.util.concurrent.ExecutorService |
newFixedThreadPool(int numberOfThreads,
java.lang.String nameRoot)
Creates a thread pool that reuses a fixed number of threads operating off a shared unbounded
queue.
|
static ThreadPool.RecordingScheduledExecutor |
newScheduledExecutor(int maxWorkerThreadCount,
java.lang.String nameRoot)
Creates an executor that can schedule commands to run after a given delay, or
to execute periodically.
|
static java.util.concurrent.ExecutorService |
newSingleThreadExecutor(java.lang.String nameRoot)
Creates an Executor that uses a single worker thread operating off an unbounded queue.
|
protected static java.lang.Throwable |
retrieveUserException(java.lang.Runnable r,
java.lang.Throwable t) |
public static final java.lang.String TAG
public static java.util.concurrent.ExecutorService getDefault()
public static java.util.concurrent.ExecutorService getDefaultSerial()
public static java.util.concurrent.ScheduledExecutorService getDefaultScheduler()
public static java.util.concurrent.ExecutorService newSingleThreadExecutor(java.lang.String nameRoot)
Executors.newSingleThreadExecutor()
public static java.util.concurrent.ExecutorService newFixedThreadPool(int numberOfThreads, java.lang.String nameRoot)
numberOfThreads
threads will be active processing tasks.Executors.newFixedThreadPool(int)
public static java.util.concurrent.ExecutorService newCachedThreadPool(java.lang.String nameRoot)
Executors.newCachedThreadPool()
public static ThreadPool.RecordingScheduledExecutor newScheduledExecutor(int maxWorkerThreadCount, java.lang.String nameRoot)
Executors.newSingleThreadScheduledExecutor()
public static int getTID(java.lang.Thread thread)
public static int getTID(long threadId)
public static boolean awaitTermination(java.util.concurrent.ExecutorService executorService, long timeout, java.util.concurrent.TimeUnit unit, java.lang.String serviceName) throws java.lang.InterruptedException
executorService
- the service to shutdowntimeout
- the duration to wait for the shutdownunit
- the units in which the timeout parameter is providedserviceName
- the name of the service as it is to be recorded in the logjava.lang.InterruptedException
public static void awaitTerminationOrExitApplication(java.util.concurrent.ExecutorService executorService, long timeout, java.util.concurrent.TimeUnit unit, java.lang.String serviceName, java.lang.String message)
executorService
- the executor service whose termination we are to awaittimeout
- the timeout we are to permitunit
- the units in which timeout is expressedserviceName
- a human-understandable name for the executor servicemessage
- the message to print if we terminate the apppublic static boolean awaitFuture(java.util.concurrent.Future future, long timeout, java.util.concurrent.TimeUnit unit)
public static void cancelFutureOrExitApplication(java.util.concurrent.Future future, long timeout, java.util.concurrent.TimeUnit unit, java.lang.String serviceName, java.lang.String message)
public static void exitApplication(java.lang.String serviceName, java.lang.String message)
public static void logThreadLifeCycle(java.lang.String name, java.lang.Runnable runnable)
protected static java.lang.Throwable retrieveUserException(java.lang.Runnable r, java.lang.Throwable t)
ThreadPoolExecutor#afterExecute(Runnable, Throwable), after which this logic is modelled


Bolivia's Morales fumes as protesters attack mayoral ally
Vinto town mayor Patricia Arce was drenched in paint, her hair cut as demonstrators forced her to walk barefoot.
Bolivia's President Evo Morales condemned on Thursday an attack on a female mayor in which an opposition mob forcibly cut her hair, covered her in paint and marched her barefoot through the streets.
Bolivia has been rocked by deadly post-election violence over opposition claims that Morales rigged his re-election last month.
More:
-
Bolivia's Morales says 'coup in progress' as rivals dispute vote
-
Bolivia: Count gives Morales win, but opposition rejects result
-
Bolivia's Morales warns of violence as opponents plan his removal
A 20-year-old student died in clashes on Wednesday between pro- and anti-government demonstrators in the central city of Cochabamba, bringing the overall toll to three dead since the October 20 election.
In nearby Vinto, an opposition mob stormed the municipal headquarters and dragged the mayor Patricia Arce,into the street before setting the building ablaze.
Morales said in a tweet on Thursday that Arce - a member of his ruling Movement for Socialism (MAS) party - had been "cruelly abducted for expressing and defending her ideals and the principles of the poorest."
Television images showed her on the ground, her hair cut, and covered in red paint. She was dragged and forced to walk barefoot through the town by the mob before being rescued by police on motorcycles.
Morales' party demanded the police bring the perpetrators to justice.
Arce's office told local media on Thursday the mayor "is recovering" from her ordeal.

"This has never happened in our democracy. That is called fascism: attacking women, assaulting them for their ethnic status. What Bolivia is facing is a fascist wave."
The Women's Social Organizations, linked to the ruling party, expressed "outrage" at the attack, and "for all the insults of hatred, racism, discrimination and violence" of the opposition.


Miscellaneous Stuff I haven't got a category for, but need to jot down so I can write up on it.
Actually, these are things of general interest to myself, and have learned about while watching the misc@ mailing list. I'm jotting down those things that I think I will eventually look at so as to have a centralised placed to look for them (in a compacted fashion.)
Most of this information has been derived from<EMAIL_ADDRESS>and other mailing lists.
These are but some of the tools that I've come across as being discussed and potentially of need of some documentation.
Bandwidth management is everyone's concern, even the large corporate with plenty of money to burn. The first good news is that OpenBSD 3.3 integrates the queue management system ALTQ into the base install. You get a secure OS with bandwidth limiting facilities, just coool. To learn more about it, follow the PF FAQ information on http://www.openbsd.org and subscribe to the pf mailing list.
The following tools have been mentioned on various discussions as valuable tools (to some) for managing their bandwidth utilisation by clients.
http://www.csl.sony.co.jp/person/kjc/programs.html
AltQ (Alternate Queueing) seems to be the most mentioned tool.
AltQ became part of the post 3.0 source tree and is likely to gain more documentation.
http://citeseer.nj.nec.com/cho99managing.html
http://www.csl.sony.co.jp/~kjc/software.html
http://www.csl.sony.co.jp/person/kjc/kjc/software/TIPS.txt
http://www.muine.org/~hoang/openpf.html#qos
[OpenBSD 3.x man pages]
/usr/share/altq - examples
According to the squid mailing lists, the delay pools are good for time periods such as an hour, but not optimal for people who wish to configure the bandwidth constraints over longer periods such as per day or per week.
The next level of security, apart from the Network OS, is to secure malicious communications or resource transfers. The following Anti-Virus products have variants that are either Native under the BSDs or can be executed in the Linux compability layer. Be warned that some have reported installation problems with the way some of the anti-virus programs install themselves.
It is also recommended that you browse the mailing list archives for MTA's such as exim and postfix who are bound to have various discussions relating to anti-virus software.
Our first anti-virus installation is successfully using RAV Antivirus, largely because it has native OpenBSD support. You have to license the product but we have been satisfied with its current performance. It works as a mail filter and the executables also function as scanners on standard files.
Network Associates WebShield:
http://www.mcafeeb2b.com/products/internet-gateway-protection.asp
{Solaris Sparc}
H+BEDV AntiVir/X: http://www.hbedv.com/produkte/products.htm {Linux, FreeBSD}
Sophos Sweep: http://www.sophos.com/products/antivirus/savunix.html {Linux, FreeBSD}
Trend Micro InterScan VirusWall: http://www.antivirus.com/products/internet_gateway.htm {Linux, Solaris}
CAI InoculateIT: http://www3.ca.com/Solutions/ProductFamily.asp?ID=128 {Linux}
F-Secure A-V: http://www.eu.f-secure.com/products/anti-virus/ {Linux}
Karspersky http://www.kasperskylabs.com/ {Linux, FreeBSD, BSDi}
RAV Antivirus: http://www.rav.ro {OpenBSD, FreeBSD, Qmail, Sendmail, Postfix and Communigate PRO}
Some of the above antivirus server solutions also filter ftp, http, and mail. Below are some programs for use with mail servers to filter mail.
Additional option in the program to configure groups with differing attachment privileges (eg. restrict, or remove attachments for certain groups.)
Amavis: http://www.amavis.org {Linux, *BSD, Solaris} A Mail Virus Scanner.
Inflex: http://www.inflex.co.za/
Q-Mail Scanner: http://qmail-scanner.sourceforge.net/ QMail
A good site for references to Anti-Virus providers is the Virus Bulletin Site which evaluates anti-virus software packages. You can also check out the documentation for amavis.
Virus Bulletin: http://www.virusbtn.com
Open Antivirus: http://www.openantivirus.org/av-unix_e.txt
[note: Last review of information from above websites 2001.11.02]
For some service providers it may be important to keep track of actual external traffic generated by users. The following tools have been discussed as relevant for this type of auditing, monitoring task.
mrtg, cricket (in ports)
IP Meter http://www.ipmeter.com
IP Audit http://ipaudit.sourceforge.net/
Drive mirroring is useful when you want the ability to dump an active/functional system onto another disk, such that you can quickly recreate the exact same system onto the same machine or on to similar other systems.
We have been effectively using Norton Ghost for our Windows platforms and it was interesting to note mail discussions on other solutions, including open source.
A fault with using Norton Ghost for imaging OpenBSD is that NG does not recognise the FFS, or UFS file system. This does not have an effect on NG being able to image and recreate OpenBSD partitions, but it does significantly increase the image size as NG cannot use any significant compression algorithms.
One significant advantage of NG for Windows is NG can resize the image partition to fit within changes in the disk sizes targetted for the image. In this way, you can use the same image on multiple size drives, so long as the contents in the image can fit on the target drives.
g4u (ghost for unix) http://rfhs8012.fh-regensburg.de/~feyrer/g4u
is based on NetBSD (?)
Other recommendations is to script dumps (dd) of the hard-drive to an ftp server
There are of course further reference information in the FAQ on duplicating file systems. Likewise Ben Goren has further information on his site: http://openbsd.trumpetpower.com/faq/faq10.html#DupFS
Steve DeRose's guide to CAT5 computer network wiring http://www.derose.net/steve/guides/wiring/
Why mention this ? Because I've been hit often enough with problems in cabling, it's bad enough when its my own fault for messing my home network cabling.
I've even gone to sites that were supposedly professionally cabled and it didn't take long to figure that their network problem was related to not being in spec.
I used to blame the drivers or OS when I had network faults, especially "time-outs" on the network cards. Now, I make sure I include checking the cabling as an early part of the diagnosis process.
Copyright (c) 2000/1/2 Samiuela LV Taufa. All Rights Reserved.
I reserve the right to be totally incorrect even at the best advice of betters.
You are permitted and encouraged to use this guide for fun or for profit as you see fit. If you republish this work in what-ever form, it would be nice (though not enforceable) to be credited.
|
Miscellanea - Just some interesting stuff |
Copyright © 2000/1/2 NoMoa.COM All rights reserved.


UpdateReplacePolicy Attribute
Use the UpdateReplacePolicy attribute to retain or (in some cases) backup the existing physical instance of a resource when it is replaced during a stack update operation.
When you initiate a stack update, AWS CloudFormation updates resources based on differences between what you submit and the stack's current template and parameters. If you update a resource property that requires that the resource be replaced, AWS CloudFormation recreates the resource during the update. Recreating the resource generates a new physical ID. AWS CloudFormation creates the replacement resource first, and then changes references from other dependent resources to point to the replacement resource. By default, AWS CloudFormation then deletes the old resource. Using the UpdateReplacePolicy, you can specify that AWS CloudFormation retain or (in some cases) create a snapshot of the old resource.
For resources that support snapshots, such as AWS::EC2::Volume
, specify
Snapshot
to have AWS CloudFormation create a snapshot before deleting the old resource instance.
You can apply the UpdateReplacePolicy attribute to any resource. UpdateReplacePolicy
is
only executed if you update a resource property whose update behavior is specified
as
Replacement, thereby causing AWS CloudFormation to replace the old resource with
a new one with a new physical ID. For example, if you update the Engine
property of an AWS::RDS::DBInstance resource type, AWS CloudFormation
creates a new resource and replaces the current DB instance resource with the new
one. The
UpdateReplacePolicy attribute would then dictate whether AWS CloudFormation deleted,
retained, or created
a snapshot of the old DB instance. The update behavior for each property of a resource
is
specified in the reference topic for that resource in the AWS Resource and Property Types Reference. For more information on resource update behavior, see Update Behaviors of Stack
Resources.
The UpdateReplacePolicy attribute applies to stack updates you perform directly, as well as stack updates performed using change sets.
Note
Resources that are retained continue to exist and continue to incur applicable charges until you delete those resources. Snapshots that are created with this policy continue to exist and continue to incur applicable charges until you delete those snapshots. UpdateReplacePolicy retains the old physical resource or snapshot, but removes it from AWS CloudFormation's scope.
UpdateReplacePolicy differs from the DeletionPolicy attribute in that it only applies to resources replaced during stack updates. Use DeletionPolicy for resources deleted when a stack is deleted, or when the resource definition itself is deleted from the template as part of a stack update.
The following snippet contains an Amazon RDS database instance resource with a Retain
policy for replacement. When this resource is replaced with a new resource with a
new physical ID, AWS CloudFormation leaves the old database instance without deleting
it.
JSON
{ "AWSTemplateFormatVersion" : "2010-09-09", "Resources" : { "myDB" : { "Type" : "AWS::RDS::DBInstance", "DeletionPolicy" : "Retain", "UpdateReplacePolicy" : "Retain", "Properties" : {} } } }
YAML
AWSTemplateFormatVersion: 2010-09-09 Resources: myDB: Type: 'AWS::RDS::DBInstance' DeletionPolicy: Retain UpdateReplacePolicy: Retain Properties: {}
UpdateReplacePolicy Options
- Delete
-
AWS CloudFormation deletes the resource and all its content if applicable during resource replacement. You can add this policy to any resource type. By default, if you don't specify an UpdateReplacePolicy, AWS CloudFormation deletes your resources. However, be aware of the following consideration:
For Amazon S3 buckets, you must delete all objects in the bucket for deletion to succeed.
- Retain
-
AWS CloudFormation keeps the resource without deleting the resource or its contents when the resource is replaced. You can add this policy to any resource type. Note that resources that are retained continue to exist and continue to incur applicable charges until you delete those resources.
If a resource is replaced, the UpdateReplacePolicy retains the old physical resource but removes it from AWS CloudFormation's scope.
- Snapshot
-
For resources that support snapshots, AWS CloudFormation creates a snapshot for the resource before deleting it. Note that snapshots that are created with this policy continue to exist and continue to incur applicable charges until you delete those snapshots.
Note
If you specify the
snapshot
option in the UpdateReplacePolicy for a resource that does not support snapshots, CloudFormation reverts to the default option, which isDelete
.Resources that support snapshots include:


--- layout: help title: Meld - Help ---
Have you ever spent half an hour poking around an application trying to find out how to do something, thinking that surely there must be an option for this?
This section lists a few of the common things that Meld doesn't do, either as a deliberate choice, or because we just haven't had time.
When Meld shows differences between files, it shows both files as they would appear in a normal text editor. It does not insert additional lines so that the left and right sides of a particular change are the same size. There is no option to do this.


- safeCameraOpen(int)
- Method in class com.androidhiddencamera.CameraPreview
-
- safeToTakePicture
- Variable in class com.androidhiddencamera.CameraPreview
-
- saveImageFromFile(Bitmap, File, int)
- Static method in class com.androidhiddencamera.HiddenCameraUtils
-
Save image to the file.
- setCameraFacing(int)
- Method in class com.androidhiddencamera.CameraConfig.Builder
-
Set the camera facing with which you want to capture image.
- setCameraFocus(int)
- Method in class com.androidhiddencamera.CameraConfig.Builder
-
Set the camera focus mode.
- setCameraResolution(int)
- Method in class com.androidhiddencamera.CameraConfig.Builder
-
Set the resolution of the output camera image.
- setImageFile(File)
- Method in class com.androidhiddencamera.CameraConfig.Builder
-
Set the location of the out put image.
- setImageFormat(int)
- Method in class com.androidhiddencamera.CameraConfig.Builder
-
Specify the image format for the output image.
- setImageRotation(int)
- Method in class com.androidhiddencamera.CameraConfig.Builder
-
Specify the output image rotation.
- startCamera(CameraConfig)
- Method in class com.androidhiddencamera.HiddenCameraActivity
-
Start the hidden camera.
- startCamera(CameraConfig)
- Method in class com.androidhiddencamera.HiddenCameraFragment
-
Start the hidden camera.
- startCamera(CameraConfig)
- Method in class com.androidhiddencamera.HiddenCameraService
-
Start the hidden camera.
- startCameraInternal(CameraConfig)
- Method in class com.androidhiddencamera.CameraPreview
-
Initialize the camera and start the preview of the camera.
- stopCamera()
- Method in class com.androidhiddencamera.HiddenCameraActivity
-
Stop and release the camera forcefully.
- stopCamera()
- Method in class com.androidhiddencamera.HiddenCameraFragment
-
Stop and release the camera forcefully.
- stopCamera()
- Method in class com.androidhiddencamera.HiddenCameraService
-
Stop and release the camera forcefully.
- stopPreviewAndFreeCamera()
- Method in class com.androidhiddencamera.CameraPreview
-
When this function returns, mCamera will be null.
- surfaceChanged(SurfaceHolder, int, int, int)
- Method in class com.androidhiddencamera.CameraPreview
-
- surfaceCreated(SurfaceHolder)
- Method in class com.androidhiddencamera.CameraPreview
-
- surfaceDestroyed(SurfaceHolder)
- Method in class com.androidhiddencamera.CameraPreview
-


{% extends "base.html" %} {% block title %} Human-Dog {% endblock %} {% block content %}
Selfies
your pet
Celebrity
Note:
The A.I. accepts a single to multiple images. Of course, TOO many inputs will slow down its process significantly.
{{ result[i] }}


[gecode-users] Installation with Intel Compiler 64 bits
Guido Tack
tack at ps.uni-sb.de
Fri Jul 20 10:20:55 CEST 2007
Simon Boivin wrote:
> We had some problems to install Gecode on our new parallel computer
> with Intel Compiler 64 bits which crash when compiling the
> library :
>
> icpc -I. -I. -DNDEBUG -fPIC -ggdb -O3 -fno-strict-aliasing -
> DNDEBUG -fPIC -ggdb
> -O3 -fno-strict-aliasing \
> -c -o gecode/int/var/imp.o gecode/int/var/imp.cc
> ../gecode/kernel/core.icc(1605): error #1556: conversion from
> inaccessible
> base class "Gecode::ActorLink" is not allowed
> t[0] = static_cast<Propagator*>(f[0]->prev());;
> which is an internal error of the compiler.
Actually, this is not an internal error, but a proper error in the
code (at least icpc thinks it is).
> According to the c++ expert from Intel the program is not c++
> standard conforming.
> So, to install the library we must modified the class Space as :
[...]
> - class Actor : public ActorDeleteLink {
> + class Actor : private ActorDeleteLink {
Yes, I also noticed that recently. However, we are quite sure that
our code is legal C++ and Intel does not implement that correctly.
All the classes down the hierarchy (Propagator, Actor,
ActorDeleteLink, and ActorLink) have friend declarations with the
Variable class, where the error occurs - so the base class ActorLink
really shouldn't be inaccessible here. Both gcc and the Microsoft C++
compiler handle this without problems.
The minimal example that shows this problem is:
template <class X> class C;
class A {};
class B : private A { template <class X> friend class C; };
template <class X> class C { public: C(A* a) { B* b = static_cast<B*>
(a); } };
class D { D() { C<int> c(0); } };
If you make class C a non-template class, everything works. If you
have contact to the icpc developers, please forward this example to
them, maybe they can explain whether we misinterpreted the C++
standard or it's a bug in their compiler. I'm really interested what
they say.
A slightly cleaner workaround would be to add a private function
Propagator* fromActorLink(ActorLink* a) { return
static_cast<Propagator*>(a); }
to the Propagator class, which just does the static_cast. That way,
you could stick with private inheritance.
Cheers,
Guido
--
Guido Tack
Programming Systems Lab, Saarland University, Germany
http://www.ps.uni-sb.de/~tack
More information about the gecode-users
mailing list


When someone really doesn't want to be filmed, they'll stick their hand in front of or over the lens.
For someone filming hands doing something, that's An Insert. Or Hand of Death.
When someone accidentally blocks the lens with their own hand, that's Camera Obscurer. Compare Turn Off the Camera.
Examples:
open/close all folders
Comic Books
- In Frank Miller's version of RoboCop, a robber being caught on a TV camera punches the camera in order to keep from being filmed.
Films Animation
- Verne does this twice in the bonus short "Hammy's Boomerang" on the DVD of Over the Hedge, both times involving RJ and his lackeys attempting to make fun of someone (either Hammy or him) on camera.
- In the first Shrek movie, just before Shrek and Fiona can have their wedding kiss, Shrek covers the camera.
- Starship Troopers: Traitor of Mars. The Elite Mooks of Sky Marshal Snapp do this when her Evil Plan is exposed to the public. The camera shot just freezes at that point to show Snapp visible between the outstretched fingers.
- My Little Pony: Equestria Girls Forgotten Friendship: In the picture illustrating the "Biggest Meanie" vote on the old yearbook, Sunset Shimmer is reaching for the camera.
Films Live-Action
- Edward Nygma does this to a security camera in Batman Forever.
- Done by Prince Charles to the documentary cam after his disastrous defeat at Culloden. In 1745.
- In The Dark Knight, Lao is telecommuting to the meeting of Gotham's crime bosses. The Joker interrupts the meeting and verbally tears into Lao, at which point he puts a hand over the lens and the connection cuts off.
- In The Dead Pool Inspector Callahan does more than this; he actually grabs the camera and tosses it away. However the footage of this event has already been recorded on video, as the reporter points out. Fortunately she's more interested in getting an exclusive interview from Callahan in exchange for not pursuing the matter.
- Occurs in Die Hard 2, when an overzealous reporter tries to question Colonel Stewart, his crony covers the camera and says "No pictures, you pinko bitch."
- At the start of Billion Dollar Brain Harry Palmer has left British Intelligence and is working as a private eye. A pile of photos on his desk show a couple caught in bed in a hotel room, and the last photo just shows a large fist flying at the camera.
- In Live Free or Die Hard, McClane puts his hand over Warlock's webcam when the Big Bad hijacks it to talk to them, and asks Warlock if he can trace it. The Big Bad has to point out that covering up the camera does not shut off the microphone.
- Monty Python and the Holy Grail: The movie ends like this, as a police officer covers up the camera as King Arthur and his army are arrested for the murder of a historian earlier in the movie.
- In at least two of Michael Moore's movies, several people he's trying to interview- up to and including senators- don't even let his camera get close enough to put their hand over it. Some of them actually break into dead runs upon seeing him on the opposite side of the street.
- In the 1920 Buster Keaton short film One Week there's a scene with Sybil Seely (who plays his wife) taking a bath. When she leans out of the tub to retrieve the soap, a hand is placed over the lens.
- In The Pirate Movie, one of the police spots the camera and pushes it down when it is trying to film a group of police beating up a single pirate.
Literature
- Sunshine does this in Robin McKinley's book Sunshine to avoid being filmed by an overly zealous reporter in the middle of trying to make things go back to normal... She also wasn't sure whether or not vampires would be watching the broadcast.
Live-Action TV
- Every "fraud against consumers" style TV show tries to have those as often as possible, it gives a visual "proof" that whoever has just been explained to be a con artist is not even bothering to claim innocence. Smarter scammers set up rendezvous and don't show up which robs the show of the intensity this visual trope provides; thus fooling most consumers on how which fraud artists are skilled career criminals and which are amateurs.
- Banacek: In "No Stone Unturned", the crane operator does this as the documentary film maker tries to film inside the crane cab as he is loading the sculpture. Banacek later wonders exactly what it was he didn't want the camera to see.
- The Coroner: In "That's the Way to Do It", the mayor of Lighthaven does this after she is photographed attacking a Punch and Judy booth.
- Death in Paradise: In "Dishing Up Murder", a restaurant hostess does this when a guest attempts to film the temperamental celebrity chef (because the footage might have revealed that the chef was an impostor).
- Doctor Who: In "Boom Town", Blon Slitheen, aka Margaret Blaine, tries to tries to block a camera pointing at her face with her hand during a press conference and scolds the photographer "No photographs! What did I say? Take pictures of the project, by all means, but not me thank you," the implication being she's been avoiding the cameras so her enemies don't know she's still alive. The newspaper photographers still catch her face, which is then published on the front of a newspaper the Doctor sees, allowing him to thwart her plans.
- Life on Mars (2006): Detective Chief Inspector Gene Hunt does this to a newspaper photographer. This becomes a (very) minor plot point later on, when the fact that Gene's face is hidden by his hand protects his undercover identity when the picture makes the front page of the local paper.
- Major Crimes: In "Wish You Were Here", the murderer suffers a Villainous Breakdown when confronted with her crimes and shoves her hand into front of Buzz's camera as he is filming her confession.
- Wendy does this when Ben tries to film their breakup in the pilot of The Middleman.
- Variant on MythBusters after a day's worth of full-scale testing wrapped up as a day's worth of failed full-scale testing, Adam walked up to the cameraman and put his hat over the lens.
- Without a Trace, where the person being filmed ends up knocking the camera to the ground.
- Scully puts her hand on the camera at least once in The X-Files episode "X-Cops" (she really hates the camera guys and is very direct about informing them about it).
 That's just who he is.
- In The Sims 2, when a romantic couple are in a photobooth together and have their picture taken, the last picture in the sequence is of one of them holding their hand in front of the camera.
Web Comics
- Grrl Power: On Arianna's phone, when Maxima is calling the picture is of her angrily reaching for the camera.
Web Original
- Dana pushes the camera away, telling Zack to stop wasting film, in Episode 1 of Echo Chamber.
Western Animation
- In the special Fireman Sam: Alien Alert, Buck Douglas films his show "Alien Quest" in Pontypandy. While he's still filming, Bella Lasagna interrupts the show, welcoming aliens that arrived in Pontypandy. Buck Douglas gets angry, approaches the camera, and almost blocks it with his hand to stop the embarrassment.
- The ending to The Grim Adventures of Billy & Mandy episode "Runaway Pants" ends with the cast about to beat up the narrator with Mandy covering the camera.
- Total Drama: When a cameraman sneaks up behind Gwen to see what she's drawing (A picture of Trent without his shirt) she annoyingly covers the camera lens with her hand, and later in the TDA special Noah does the 'Talk-to-the-hand' variation of this to Sierra when she tries to interview him on the Red Carpet, though this was most probably because he was on a call with someone at the time.
- The Simpsons: In "The Man Who Came to Be Dinner", Homer gets patted by a Diz-Nee-Land security guard wearing a chipmunk mascot suit. When Homer claims he planted an acorn on him, the guard has him beaten by other chipmunks, one of whom covers the camera with his hand.
Real Life
- Truth in Television: Appears a lot on news broadcasts. This is usually accompanied by the cameraman or journalist shouting, "Do not touch the camera!" Chinese officials do it a lot. This also tends to happen quite a lot in documentaries, especially those focusing on police; often someone being arrested attempts this, only for the cameraman to discretely step back and film from a different angle.
- The Church of Happyology is also known for this. They go beyond just using hand on a camera, but also physically attack the camera man, then send a policeman to accuse the cameraman for unlawfully recording a conversation.
- Michael Jackson did this frequently.
- Late 19th century and early 20th century Wall Street finance mogul J. P. Morgan was sensitive about his swollen, purple nose caused by rosacea in his later life. He absolutely despised being photographed in public, and was known to do this and even to physically try to knock photographers' cameras (which in that era were quite fragile) to the ground in hopes of breaking them. He only wanted retouched photographs of himself to be seen by the public.
- In the 1987 Four Corners documentary "The Moonlight State" that exposed government and police-protected gambling and prostitution in Queensland, Australia, one alleged underworld figure famously responded to being confronted on camera by ordering his men to; "Break his camera and break his mouth too!"
- The cover of Photojournalism: The Professional's Approach (the 2nd edition) has a police officer attempting this on a photojournalist, but unfortunately for him the cover shot was taken by another nearby journalist.


{% extends "base.html" %} {% block title %}
Medieval catalogues > HENRY DE KIRKESTEDE > Catalogus, c. 1360
{% endif %}12 identified entries found.
All data was derived from the List of Identifications by Professor Richard Sharpe.
{% if not printing %}
A key to codes used in the List is available (opens in new tab).{% endif %}


Web-based collaboration tools
For use by the TERRA Reference Phenotyping Standards Committee.
Overview
All of the web-based software below provides the ability to organize projects hierarchically, facilitate sharing, and support collaboration.
Essential tools
- Github and Box these are the primary tools the group will use for collaboration.
- Google Docs
Additional tools
some of these are optional, many participants will not need to use them.
- Etherpad Meeting notes, and other collaborative note taking. Useful content can be transferred to GitHub, Box, or other platforms
- Open Science Framework provides a centralized portal to Github, Box, and other resources. All of these resources can be archived and assigned a doi. This will be useful for publishing specifications.
- ArcGIS online will make it easy to visualize data.
Details:
Github:
- Documentation https://guides.github.com/
- Features
- Interface to 'git', a specialized command-line tool for version control.
- Wiki
- Issue tracking and discussion forum https://guides.github.com/features/issues/
- participants can reply to issues via email, similar to an email discussion list
- website hosting: https://pages.github.com/
- code management / collaboration: https://github.com/features
- wiki https://guides.github.com/features/wikis/
we can create private repositories
- Source code repository
- Website hosting
Terraref repository https://github.com/terraref/reference-data
- issues and milestones: https://github.com/terraref/reference-data/issues
Box
- https://uofi.box.com/terraref
- file sharing; UI has provided our group with 500GB of storage which should be plenty for example data and reference documents.
Open Science Framework (osf.io)
- for sharing files, provides a single portal to Github, Box, Dropbox, Google Drive, Figshare, Dataverse, Zotero, Mendeley
- makes it easy to archive (get a doi) for 'project snapshots' including subsets of data, documentation and etc. contained in above services
ArcGIS Online http://arcg.is/1NwgxFe
- for visualizing and demonstrating reference data
- can share and annotate data
- make web-maps and applications
Other tools:
- Google Hangouts for conversations, can be recorded and shared (with consent from all participants)
Use, Reuse, and Access
The Terraref team will generate public software, data, and educational materials. All materials will be provided with a permissive open-access license (MIT/BSD-compatible) and/or copyright (e.g. CC-By 4.0) by default. Content interested in restricting access to or reuse of material they provide should clearly label (e.g. with a LICENSE file or text in each file. All of the services allow access control; even though I've make everything public so far once you have an account you can make and control private subdirectories as you wish.


September 4, 2019
project one : personal isometric avatar
Our first project for the semester was to create an avatar in our likeness using an isometric grid. I struggled with making more organic forms on this grid, but I found a sequence of tranformations that would turn an object to fit the isometric grid (scale, shear and roate). After making a really basic figure, I added my own touches to make it look like me. This included my black hair, my new glasses, gold hoop earrings, my trusty adidas sneakers, a cup of coffee, and my 6 year old macbook.
October 7, 2019
project two : personal icons
Our second project required us to examine ourselves and identify three aspects to respresent us in three separate icons. The three icons I designed are: a pair of earrings, a bee and a paintbrush. A pair of earrings to represent my hobby of jewelry-making. A bee to represent my aspiration to beekeep one day. And a paintbrush to represent a media that's been prevalent in each stage of my life.
December 11, 2019
project four : infographic timeline
For our final project, I decided to make a timeline of key events of the 2019 Hong Kong protests that are, to this day, ongoing.


You will then be redirected back here to get your tickets. {% endblocktrans %}


How we decided on our current vacation policy Oct 24 benefits, company policy, employee morale, headspring, hiring, programmer vacation policy, programming jobs, software engineers, vacation, vacation policy


Transformer? Attention!
Background
Self-attention, it is a mechanism first used for nature language processing, such as language translation and text content summary,etc. Self-attention sometimes called intra-attention is an attention mechanism relating different positions of a single sequence in order to compute a representation of the sequence, the sequence can be a phrase in NPL task. At the time Google Brain released [1]“Attention is all you need.”, this mechanism have already become an integral part of compelling sequence modeling and transduction models in various tasks. However such attention mechanism are used in conjunction with a recurrent network(RNN) or a convolutonal network(CNN). Given a sequence of words, if we see the word “eating”, then we will take more attention to the following name of food.
Seq2seq
One of the example of the application of this mechanism is the famous [2]“Sequence to Sequence Learning with Neural Networks” model. Broadly speaking, it aims to transform an input sequence (source) to a new one (target) and both sequences can be of arbitrary lengths. Examples of transformation tasks include machine translation between multiple languages in either text or audio, and for tasks like adding video caption is also possible. The main struture Seq2seq model uses is the Encoder-Decoder structure.
- Encoder processes the input sequence and compresses the information into a context vector of a fixed length. This vector is expected to be the encoded information or meaning of the input sequence.
- Decoder is initialized with the context vector to emit the transformed output. The early work only used the last state of the encoder network as the decoder initial state.
Both the encoder and decoder are recurrent neural networks, i.e. using LSTM or GRU units.
disadvantages While, there are some disadvantages of RNN for this task. Fixed-length context vector design is incapability of remembering long sentences. And for RNN, it has forgetten the fisrt parts once it completes processing the whole input. It also hard to parallel the whole processes, as the layers is run in sequence.
CNN
People try to use CNN to solve the parallel issue.
[3]“Transformer”
But we have to build a lot more filter to have large receptive field.
Transformer
The Transformer is a model proposed in [1] based entirely on attention and almost all tasks use a RNN to perform attention mechanism can be repaced by the Transformer. The transformer as the new stat-of-art in 2020 outperforms the Google’s Neural Machine Translation System [5]“GNMT” in specific tasks. The biggest benefit, however, comes from how The Transformer lends itself to parallelization. It is in fact Google Cloud’s recommendation to use The Transformer as a reference model to use their Cloud TPU offering.
Model Architecture
The Transformer also take the encode-decoder structure. A high level structure is showed below:
[6]“The Illustrated Transformer”
The encoder maps an input sequence of sybol representations $x = (x_1,..,x_3)$ to a sequence of continous representations $z = (z_1,…,z_n)$. Given $z$, the decoder then generate an output sequence $y = (y_1,…,y_3)$ of symbols one element at a time. At each step the model is auto-regressive, consuming the previously generated symbols as additional input when generating the next. This will be represented in masking process in the decoder.
While a more detailed model architecture is represented in “Attention is all you need”[1] as below:
The Encoder is composed of a tack of N=6 identical layers. For each layer, it has:
- A multi-head self-attention mechanism sub-layer.
- A position-wise fully connected feed-forward network sub-layer.
The Decoder is also composed of a stack of N=6 identical layers. For each layer, it has:
- A multi-head self-attention mechanism sub-layer. The masking proceess I talk about before is added here too. Combined with fact that the output embeddings are offset by one position, ensure that the predictions for position $i$ can depend only on the known outputs at positions less than i.
- A new multi-head self-attention machanism sub-layer, which performs attention over the output of the encoder stack.
- A position-wise fully connected feed-forward network sub-layer.
For each sub-layer, it has two operations:
- A residual connection, like in [7]“Deep Residual Learning for Image Recognition”.
- A layer normalisation[8]“Layer Normalization”
The output of each sub-layer is LayerNorm(x + Sublayer(x)), where Sublayer(x) is the function implemented by the sub-layer itself.
To facilitate the residual connections, all sub-layers in the model, as well as the embedding layers, produce outputs of dimension $d_{model}=512$
A detail analyse of decoder
How does each step work
I was confused in the concept of a masking process showed in the first sub-layer in the decoder and how does the model is auto-regressive at each step. Let’s have a further look at the functionality of the decoder.
After finishing the encoding phase, the decoding phase begins. Each step in the decoding phase outputs an element from the output sequence. The number of steps depends on a special symbol which is generated and indicate that the decoder has completed its output.
At the begining, a defaut parameter element which indicate the begin of the output sequence is generate from the output of the encoder and then for each step, the elements from the previous generated sequence will be fed into the decoder and that is why we need a mask to let decoder to see only the output at position less than $i$ which is the indice of step (prediction for position $i$). After the fisrt self-attention layer, the output of this layer will meet the hidden elements generated from the encoder(I will explain these hidden element later in the attention function) and go through the whole decoder stack. The mask process is done by masking future positions (setting them to -inf) before the softmax step in the self-attention calculation.
[6]“The Illustrated Transformer”
“Illustrated Guide to Transformers- Step by Step Explanation”
Final linear layer and Softmax layer
The decoder stack outputs a vector of floats and it is final linear layer and softmax layer to turn them into the sequence of worlds.
For example, the model knows 10,000 unique English world from its training dataset. The linear layer is then a simple fully connected neural network that takes input as decoder stack’s outputs vector and output a 10,000 dimension vector. The softmax layer turns the values in this vector into probabilities (all positive, all add up to 1.0). The cell with the highest probability is chosen, and the word associated with it is produced as the output for this time step.
[6]“The Illustrated Transformer”
For the training process, given the vectors of probabilities for the whole predicted sequence, we can then do the backpropagation for the whole model including the encoder and the decoder.
Attention
In the context of neural networks, attention is a technique that mimics cognitive attention. The effect enhances the important parts of the input data and fades out the rest – the thought being that the network should devote more computing power on that small but important part of the data. Which part of the data is more important than others depends on the context and is learned through training data by gradient descent.
The Transformer has it’s own attention mechanism called “Scaled Dot-Product Attention”. I’m going to introduce this model in the following
Query, Key, Value
The basic elements of this model is k: query, k: key of dimension $d_k$ and v: value of dimension $d_v$.
The matrix of attention is showed below:
[1]“Attention is all you need”
$$
Attention(Q, K, V) = softmax(\frac{QK^T}{\sqrt{d_k}})V
$$
where, the compute attention function on a set of queries simultaneously, packed together into a matrix Q. The keys and values are also packed together into matrices K and V. Let’s just keep this equation in mind for now.
The high level view of self-attention Layer is like this:
[3]“Transformer”
Let’s have a deeper view of “Scaled Dot-Product Attention”.
This is the schema to compute the scaled Dot-Product attention given an input sequence. People also often use additive attention that compute the compatibility function using a feed-forward network with a single hidden layer. While dot-product attention is much faster and more space-efficient in pratice. But the dot products grow large in magnitude. Assume that the components of $q$ and $k$ are independant random variable with mean 0 and vriance 1. Then their dot product, $q \cdot k = \sum^{d_k}_{i=1}$, has mean 0 and variance $d_k$. So we have the term $\sqrt{d_k}$ to scale the dot product.
Multi-head Attention
From the paper of the Transformer, they found that it benecial to linearly project the queries, keys, and values h times with different, learned linear projections to $d_k$, $d_k$ and $d_v$ dimensions, respectively. It generate h $d_v$-dimensional output values in parallel and these are concatenated and once again projected, resulting in the final values.
$$
MultiHead(Q, K, V) = Concat(head_1, …, head_h)W^o
$$
where
$$
\text{head}_{i} = \text{Attention}(QW^{Q}_{i}, KW^{K}_{i}, VW^{V}_{i})
$$
Multi-head attention allows the model to jointly attend to information from different representation subspaces at different positions. With a single attention head, averaging inhibits this.
Other main parts
From the Transformer model architecture schema, we can notice that there are also several other components and I am going to do an introduction to these parts this section.
Position-wise Feed-Forward Networks
Position-wise Feed-Forward Networks is named Feed Forward in the model architecture schema and it is included in each layer of encoder and decoder. It is consists of two linear transformations with a RELU activation in between.
$$
FFN(x) = RELU(xW_1 + b_1)W_2 + b_2
$$
This function is applied to each position separately and identically, another way of describing this is as two convolutions with kernal size 1. While the linear transfermations are the same across different positions,they use different parameters from layer to layer(different $W$ and $b$).
Embeddings
Embeddings are learned to convert the input tokens and output tokens to vectors of dimension $d_{model}$. Two embedding layer in encoder, decoder and the pre-softmax linear transformation at the output of the final decoder stack share the same weight matrix. They also multiply those weights by $\sqrt{d_{model}}$
Positional Encoding
We can notice that there is no positional information in self-attention as it is composed of dot product operations in parallel for each element of different position in the sequence. Some information about the relative or absolute position of the tokens in sequence need to be injected. The authors of The Transformer[3] add “positional encodings” to the input embeddings at the bottoms of the encoder and decoder stacks.The positional encoding have the same dimension $d_{model}$ as the embeddings, so that the two can be summed. While, there are many other choices of positional encodings, learned and fixed.
An intuitive way to understand the sum operation between vector of position encoding and the vector of embedded input showed below.
[3]“Transformer”
[6]“The Illustrated Transformer”
By summing these two terms, we integrate the one-hot vector which contains the current position information into the input.
Why Transformer is good
The reasons why Transformer becomes the stat-of-art in 2017 and has appealed attention in AI recently is listed below:
- The relative low computational complexity per layer.
- The large amount of computation that can be parallelized.
- The path length between long-range dependencies in the networl. As we can see that during the generation of Attention, an input element need to dot product with all other inputs and than generate weights and finally gets its attention element by the weighted average on the value of other input elements. It keeps the local and global information.
Some interesting images from the paper
[1]“Attention is all you need”
Citation
@article{zhao_Attention2021,
title={Transformer? Attention!},
url={https://blog.yunfeizhao.com/2021/03/31/attention/},
journal={https://blog.yunfeizhao.com/},
author={ZHAO, Yunfei}, year={2021}, month={Mar}}
References
- Ashish Vaswani, et al. “Attention is all you need” NIPS 2017. ↩
- Ilya Sutskever, et al. “Sequence to Sequence Learning with Neural Networks”NIPS 2014. ↩
- Hung-yi Lee. “Transformer” ↩
- Nicolas Carion, Francisco Massa et al. “End-to-End Object Detection with Transformers”ECCV 2020. ↩
- Yonghui Wu et al. “Google’s Neural Machine Translation System: Bridging the Gap between Human and Machine Translation”CoRR 2016 ↩
- Jay Alammar“The Illustrated Transformer” ↩
- K. He, X. Zhang, S. Ren and J. Sun “Deep Residual Learning for Image Recognition,” 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 2016, pp. 770-778, doi: 10.1109/CVPR.2016.90. ↩
- Jimmy Lei Ba et al. “Layer Normalization” ↩
- Michael Phi “Illustrated Guide to Transformers- Step by Step Explanation” ↩
All articles in this blog adopt the CC BY-SA 4.0 Agreement ，Please indicate the source for reprinting！


This section is a showcase of projects I have completed or been a major part of:
Mothership is an open source Ecommerce platform built by Message Digital Designs Ltd. Mothership has developed massively since I joined the team and I am proud play a major part in designing and developing it.
I have also used Mothership to build the backend for a number of sites such as Iffley Road, Stoneham and Tonic.
For my 3rd year University dissertation I created a 2D distributed virtual world in Java. This project recursively split the world up into smaller and smaller squares based on load and assigned them to peers. A DHT (Chord) was used for region lookup.
The project was successful in demonstrating that the methods used were feasble for real word usage and that offloading regions would significantly reduce the load for each individual node.
I have included a download for the GUI jar, however it may not be clear what is going on when you open it. In fact I expect it to be majorly confusing unless you are me. I plan to get the source up onto GitHub with an explanation soon.
BBQ Source was a group University assignment using Google App Engines's Python integration. It was designed as a collaborative code editor, one may sign up with their Google account create a project, create a group, assign groups to projects etc. We used TogetherJS to allow real time collaboration.
This was a fun project though it made me learn a couple of lessons about JavaScript and TogetherJS the hard way.
For these two reasons, collaboration is very wonky.


{% extends 'base.html' %} {% block title %}Log Overdue | {{ contest['name'] }}{% endblock %} {% block header %}
Online log submissions for {{ contest['name'] }} are currently closed at this time, as they were due at {{contest['log_due_date'] }}.
If you are sure that you are submitting logs for the correct contest, please make arrangements with the contest organizer directly for submitting late logs.
{% endblock %}


2 Days 1 Nights
Availability : Jan 16’ - Dec 16’
$1,200
2.000.000 VND
2 Days 1 Nights
Availability : Jan 16’ - Dec 16’
Pu Luong nature reserve is all about nature and deeply rooted ethnic cultures. This trip offers a wide array of natural sceneries: jungle, terraced rice fields, forested...
$1,200
2.000.000 VND
2 Days 1 Nights
Availability : Jan 16’ - Dec 16’
Pu Luong nature reserve is all about nature and deeply rooted ethnic cultures. This trip offers a wide array of natural sceneries: jungle, terraced rice fields, forested...
$1,200
2.000.000 VND
2 Days 1 Nights
Availability : Jan 16’ - Dec 16’
Pu Luong nature reserve is all about nature and deeply rooted ethnic cultures. This trip offers a wide array of natural sceneries: jungle, terraced rice fields, forested...
$1,200
2.000.000 VND
2 Days 1 Nights
Availability : Jan 16’ - Dec 16’
Pu Luong nature reserve is all about nature and deeply rooted ethnic cultures. This trip offers a wide array of natural sceneries: jungle, terraced rice fields, forested...
$1,200
2.000.000 VND


My Hospital works with hundreds of insurance companies and is an in-network provider for millions of people. In most cases, My Hospital doesn't require a physician referral. Some insurers require referrals, or may have additional requirements for certain medical care. All appointments are prioritized on the basis of medical need, and the team members who will care for you or your family have the expertise and skills to provide the best care possible.
Telephone requests
   My Hospital in Haryana(Yamunanagar)
Request an appointment using our secure online form. Our goal is to contact you by phone within three business days to review your medical and financial information.


A budding and motivated problem solver who thrives in challenging and inspiring environments. I have set out to make my mark as a full-stack developer.
Hailing originally from Auckland, New Zealand - and now recently settled in New York, New York - I strive to take the tech scene in the Big Apple by storm.
I absolutely love developing web applications, learning new skills constantly, taking cool snaps of the city, witnessing my favourite sports team fail in tragic fashion, and juggling!
Before attending an intensive programming course at Dev Bootcamp I worked as a Dev Ops Intern at a start-up back home in NZ.


Select Box Demo
The select box below is linked to a hidden real selectbox that can be used as part of a form.
One
Two
Three is really long
Four
Five is also really long
Six
One
Two
Three is really long
Four
Five is also really long
Six
One
Two
Three is really long
Four
Five is also really long
Six


WHERE PEOPLE ARE CREATING AMAZING DESIGNS EVERYDAY.
when you work with us,you are part of a team 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 yiur business goals,the user's needs and the product requirements
Then we help translate them into effective and elegant solutions
Before we sign a contract or write a line of code.Our team will will spend the necessary time if needed
The outcome of this scoping session is propasal or high-level statement of work.
on your requirements ,we can provide a complete offering or jus the pieces you need.
Design
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.
product Management
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.>
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.
DELANI STUDIO.
2019


Welcome to My DOM Demo
Labradors and Baby Oragutans are
super
adorable
Link to Guoglo
Orchids
Succulents
Tulips


Building Documentations¶
Documentations are based on Sphinx. Here we explain steps to build documentations from source, that is, to generate the documentation web pages.
There are two packages: pomdp_py and pomdp_problems. Their documentations are built separately.
Building docs for pomdp_py¶
Go to the sphinx source directory:
cd pomdp-py/docs/_sphinx_src
Building docs for pomdp_py. Run
sphinx-apidoc
:sphinx-apidoc -o api/ ../../pomdp_py
This generates .rst files for different modules in the pomdp_py package.
The first argument
api
specifies the output directory for these .rst files to beapi
.The second argument
../../pomdp_py
specifies the path to the pomdp_py package (Note that this should be the package’s root path that contains__init__.py
).Refer to sphinx-apidoc for more information.Generate web pages:
make html
This outputs to
pomdp-py/docs/html
Building docs for pomdp_problems¶
Go to the sphinx source directory:
cd pomdp-py/docs/_sphinx_src
Building docs for pomdp_py. Run
sphinx-apidoc
:sphinx-apidoc -o problems/ ../../pomdp_problems
Generate web pages:
make html
This outputs to
pomdp-py/docs/html
Note that when creating the documentation for a problem under pomdp_problems
,
you may want to re-use the README file on github for the documentation. To do that,
first create a read-me file at pomdp_problems/<problem>/README.rst
with desirable
content that describes the problem. Then, include this read-me file at the top of the
generated pomdp_problems.<problem>.rst
, like so:
.. include:: ../../../pomdp_problems/<problem>/README.rst
Note on Changelog¶
Changelog is generated based on CHANGELOG.rst
in the repository’s root directory.
When the website is constructed, the _sphinx_src/changelog.rst
is a symbolic
link to CHANGELOG.rst
, created by
cd _sphinx_src
ln -s ../../CHANGELOG.rst changelog.rst
But because github pages cannot access ../../CHANGELOG.rst
, this symbolic has to be removed
when the site is deployed.


--- layout: post title: Visualization with Gourse date: 2013-12-08 summary: Recently I made a visualization for contributors to https://l10n.org.al for the last two years (2012-2013). This visualization was done with gource. It was a bit of hacking, so I would like to describe how I did it. tags: [Visualization, Gourse, Hacking] ---
Recently I made this visualization for contributors to https://l10n.org.al for the last two years (2012-2013). This visualization was done with gource. It was a bit of hacking, so I would like to describe here how I did it.
For each translation or vote on https://l10n.org.al/ the time and the name of the author is saved as well. So, we would like to get this information from the database, as well as the project to which this translation belonged, for all votes and translations.
First have a look at this diagram: db_diagram.png just to get an idea of the structure of the database.
 When the time of vote is the same as the time of
translation, then this is a new translation and the field new
is
true.
In the result file contrib.txt
fields are separated by TAB, so
first I replaced tabs with commas (,) for easy processing. I did it
with find/replace on Emacs, but any other editor can do this.
Gource expects the input file (which is called log file) in the
format timestamp|username|action|filename
. Gource was designed to
work with version control systems (like git, subversion, etc.) in
order to visualize the project activity, so the action
is expected
to be A, or M, or D etc. (respectively for adding, modifying,
deleting a file) and filename
is the file that was touched.
I had to transform the data to this format and I did it with a script like this:
{% highlight bash %} #!/bin/bash while read l do time=$(echo $l | cut -d, -f1) name=$(echo $l | cut -d, -f2) new=$(echo $l | cut -d, -f3) project=$(echo $l | cut -d, -f4) origin=$(echo $l | cut -d, -f5) timestamp=$(date -d "$time" +%s) # convert to timestamp if [ "$new" = "1" ]; then action='A'; else action='M'; fi path="/$origin/$project" echo "$timestamp|$name|$action|$path" done < contrib.txt > contrib.log {% endhighlight %}I also made sure that there are no lines containing NULL and that the file is sorted in increasing order by the timestamp:
sed -i contrib.log -e '/NULL/d' sort -t'|' -k1 contrib.log > contrib-1.log rm contrib.log mv contrib-1.log contrib.log
First make sure that the tools that we need are installed:
sudo apt-get install gource ffmpeg
Then generate the video with a script like this:
#!/bin/bash gource contrib.log -s 0.1 -i 0 --max-files 0 \ --date-format "%B %Y" --hide dirnames,filenames \ -640x360 -o - \ | ffmpeg -y -r 25 -f image2pipe -vcodec ppm -i - \ -vcodec libvpx -b 10000K contrib.webm
How did I know that these are the right options? I didn't know
(especially for ffmpeg
), I simply googled and found some examples,
then I played with some options of gource
in order to get it
right.


997_cmg123.java
class ThroneInheritance {
private class Member {
private String name;
private boolean isDead;
private boolean isOrder;
private List<Member> children;
public Member(String name) {
this.name = name;
this.children = new LinkedList<Member>();
}
}
private Member king;
private Map<String, Member> map;
public ThroneInheritance(String kingName) {
king = new Member(kingName);
map = new HashMap<String, Member>();
map.put(kingName, king);
}
public void birth(String parentName, String childName) {
Member parent = map.get(parentName);
Member child = new Member(childName);
parent.children.add(child);
map.put(childName, child);
}
public void death(String name) {
Member member = map.get(name);
member.isDead = true;
}
public List<String> getInheritanceOrder() {
List<String> list = new LinkedList<String>();
add(list, king);
return list;
}
private void add(List<String> list, Member member) {
if (!member.isDead) {
list.add(member.name);
}
for (Member child : member.children) {
add(list, child);
}
}
}
/**
* Your ThroneInheritance object will be instantiated and called as such:
* ThroneInheritance obj = new ThroneInheritance(kingName);
* obj.birth(parentName,childName);
* obj.death(name);
* List<String> param_3 = obj.getInheritanceOrder();
*/


|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.swing.text.DocumentFilter
public class DocumentFilter
DocumentFilter
, as the name implies, is a filter for the
Document
mutation methods. When a Document
containing a DocumentFilter
is modified (either through
insert
or remove
), it forwards the appropriate
method invocation to the DocumentFilter
. The
default implementation allows the modification to
occur. Subclasses can filter the modifications by conditionally invoking
methods on the superclass, or invoking the necessary methods on
the passed in FilterBypass
. Subclasses should NOT call back
into the Document for the modification
instead call into the superclass or the FilterBypass
.
When remove
or insertString
is invoked
on the DocumentFilter
, the DocumentFilter
may callback into the
FilterBypass
multiple times, or for different regions, but
it should not callback into the FilterBypass
after returning
from the remove
or insertString
method.
Document
| Nested Class Summary | |
|---|---|
static class |
DocumentFilter.FilterBypass
Used as a way to circumvent calling back into the Document to change it. |
| Constructor Summary | |
|---|---|
DocumentFilter()
|
| Method Summary | |
|---|---|
void |
insertString(DocumentFilter.FilterBypass fb,
int offset,
String string,
AttributeSet attr)
Invoked prior to insertion of text into the specified Document. |
void |
remove(DocumentFilter.FilterBypass fb,
int offset,
int length)
Invoked prior to removal of the specified region in the specified Document. |
void |
replace(DocumentFilter.FilterBypass fb,
int offset,
int length,
String text,
AttributeSet attrs)
Invoked prior to replacing a region of text in the specified Document. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DocumentFilter()
| Method Detail |
|---|
public void remove(DocumentFilter.FilterBypass fb, int offset, int length) throws BadLocationException
FilterBypass
as
necessary.
fb
- FilterBypass that can be used to mutate Documentoffset
- the offset from the beginning >= 0length
- the number of characters to remove >= 0
BadLocationException
- some portion of the removal range
was not a valid part of the document. The location in the exception
is the first bad position encountered.public void insertString(DocumentFilter.FilterBypass fb, int offset, String string, AttributeSet attr) throws BadLocationException
fb
- FilterBypass that can be used to mutate Documentoffset
- the offset into the document to insert the content >= 0.
All positions that track change at or after the given location
will move.string
- the string to insertattr
- the attributes to associate with the inserted
content. This may be null if there are no attributes.
BadLocationException
- the given insert position is not a
valid position within the documentpublic void replace(DocumentFilter.FilterBypass fb, int offset, int length, String text, AttributeSet attrs) throws BadLocationException
fb
- FilterBypass that can be used to mutate Documentoffset
- Location in Documentlength
- Length of text to deletetext
- Text to insert, null indicates no text to insertattrs
- AttributeSet indicating attributes of inserted text,
null is legal.
BadLocationException
- the given insert position is not a
valid position within the document
|
JavaTM 2 Platform Standard Ed. 5.0 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2004, 2010 Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.


Snowboy for Rhasspy
Wake word detection for the
Rhasspy voice assistant
with
Snowboy
.
Models
Model
{% for model in models %}
{{ model }}
Delete
{% endfor %}
Configuration
{{ config }}


Puglia's most famous sight is the unique conical houses (Trulli) found in the the area around Alberobello, a declared UNESCO World Heritage Site.


{% extends "base.html" %} {% load i18n comments comments_xtd %} {% load url from future %} {% block title %}{{ block.super }}Blog - {% trans "Comment List" %}{% endblock %} {% block header %}{{ block.super }}{% trans "Blog Comment List" %}{% endblock %} {% block content %}
{% trans "List of comments for blog.story
and blog.quote
with pagination, produced by the following entry in the blog/urls.py file:" %}
url(r'^comments$', ListView.as_view( queryset=XtdComment.objects.for_app_models("blog.story", "blog.quote"), template_name="django_comments_xtd/blog/comment_list.html", paginate_by=5), name='blog-comments'),{% for comment in object_list %}
{{ comment.submit_date|date:"DATETIME_FORMAT" }}
{{ comment.name }}
{{ comment.submit_date|date:"DATETIME_FORMAT" }}
{{ comment.name }}