| fansi {fansi} | R Documentation |
Counterparts to R string manipulation functions that account for the effects of ANSI text formatting control sequences.
Control characters and sequences are non-printing inline characters that can be used to modify terminal display and behavior, for example by changing text color or cursor position.
We will refer to ANSI control characters and sequences as "Control Sequences" hereafter.
There are three types of Control Sequences that fansi
can treat
specially:
"C0" control characters, such as tabs and carriage returns (we include delete in this set, even though technically it is not part of it).
Sequences starting in "ESC[", also known as ANSI CSI sequences.
Sequences starting in "ESC" and followed by something other than "[".
Control Sequences starting with ESC are assumed to be two characters
long (including the ESC) unless they are of the CSI variety, in which case
their length is computed as per the ECMA-48 specification.
There are non-CSI escape sequences that may be longer than two characters,
but fansi
will (incorrectly) treat them as if they were two characters
long.
In theory it is possible to encode Control Sequences with a single byte introducing character in the 0x40-0x5F range instead of the traditional "ESC[". Since this is rare and it conflicts with UTF-8 encoding, we do not support it.
The special treatment of Control Sequences is to compute their
display/character width as zero. For the SGR subset of the ANSI CSI
sequences, fansi
will also parse, interpret, and reapply the text styles
they encode as needed. Whether a particular type of Control Sequence is
treated specially can be specified via the ctl
parameter to the fansi
functions that have it.
NOTE: not all displays support ANSI CSI SGR sequences; run
term_cap_test
to see whether your display supports them.
ANSI CSI SGR Control Sequences are the subset of CSI sequences that can be
used to change text appearance (e.g. color). These sequences begin with
"ESC[" and end in "m". fansi
interprets these sequences and writes new
ones to the output strings in such a way that the original formatting is
preserved. In most cases this should be transparent to the user.
Occasionally there may be mismatches between how fansi
and a display
interpret the CSI SGR sequences, which may produce display artifacts. The
most likely source of artifacts are Control Sequences that move
the cursor or change the display, or that fansi
otherwise fails to
interpret, such as:
Unknown SGR substrings.
"C0" control characters like tabs and carriage returns.
Other escape sequences.
Another possible source of problems is that different displays parse
and interpret control sequences differently. The common CSI SGR sequences
that you are likely to encounter in formatted text tend to be treated
consistently, but less common ones are not. fansi
tries to hew by the
ECMA-48 specification for CSI control sequences, but not all terminals
do.
The most likely source of problems will be 24-bit CSI SGR sequences.
For example, a 24-bit color sequence such as "ESC[38;2;31;42;4" is a
single foreground color to a terminal that supports it, or separate
foreground, background, faint, and underline specifications for one that does
not. To mitigate this particular problem you can tell fansi
what your
terminal capabilities are via the term.cap
parameter or the
"fansi.term.cap" global option, although fansi
does try to detect them by
default.
fansi
will will warn if it encounters Control Sequences that it cannot
interpret or that might conflict with terminal capabilities. You can turn
off warnings via the warn
parameter or via the "fansi.warn" global option.
fansi
can work around "C0" tab control characters by turning them into
spaces first with tabs_as_spaces
or with the tabs.as.spaces
parameter
available in some of the fansi
functions.
We chose to interpret ANSI CSI SGR sequences because this reduces how much string transcription we need to do during string manipulation. If we do not interpret the sequences then we need to record all of them from the beginning of the string and prepend all the accumulated tags up to beginning of a substring to the substring. In many case the bulk of those accumulated tags will be irrelevant as their effects will have been superseded by subsequent tags.
fansi
assumes that ANSI CSI SGR sequences should be interpreted in
cumulative "Graphic Rendition Combination Mode". This means new SGR
sequences add to rather than replace previous ones, although in some cases
the effect is the same as replacement (e.g. if you have a color active and
pick another one).
fansi
will convert any non-ASCII strings to UTF-8 before processing them,
and fansi
functions that return strings will return them encoded in UTF-8.
In some cases this will be different to what base R does. For example,
substr
re-encodes substrings to their original encoding.
Interpretation of UTF-8 strings is intended to be consistent with base R. There are three ways things may not work out exactly as desired:
fansi
, despite its best intentions, handles a UTF-8 sequence differently
to the way R does.
R incorrectly handles a UTF-8 sequence.
Your display incorrectly handles a UTF-8 sequence.
These issues are most likely to occur with invalid UTF-8 sequences,
combining character sequences, and emoji. For example, whether special
characters such as emoji are considered one or two wide evolves as software
adopts newer versions of Unicode. Do not expect the fansi
width
calculations to always work correctly with strings containing emoji.
Internally, fansi
computes the width of every UTF-8 character sequence
outside of the ASCII range using the native R_nchar
function. This will
cause such characters to be processed slower than ASCII characters.
Additionally, fansi
character width computations can differ from R width
computations despite the use of R_nchar
. fansi
always computes width for
each character individually, which assumes that the sum of the widths of each
character is equal to the width of a sequence. However, it is theoretically
possible for a character sequence that forms a single grapheme to break that
assumption. In informal testing we have found this to be rare because in the
most common multi-character graphemes the trailing characters are computed as
zero width.
As of R 3.4.0 substr
appears to use UTF-8 character byte sizes as indicated
by the leading byte, irrespective of whether the subsequent bytes lead to a
valid sequence. Additionally, UTF-8 byte sequences as long as 5 or 6 bytes
may be allowed, which is likely a holdover from older Unicode versions.
fansi
mimics this behavior. It is likely substr
will start failing with
invalid UTF-8 byte sequences with R 3.6.0 (as per SVN r74488). In general,
you should assume that fansi
may not replicate base R exactly when there
are illegal UTF-8 sequences present.
Our long term objective is to implement proper UTF-8 character width computations, but for simplicity and also because R and our terminal do not do it properly either we are deferring the issue for now.
Nominally you can build and run this package in R versions between 3.1.0 and
3.2.1. Things should mostly work, but please be aware we do not run the test
suite under versions of R less than 3.2.2. One key degraded capability is
width computation of wide-display characters. Under R < 3.2.2 fansi
will
assume every character is 1 display width. Additionally, fansi
may not
always report malformed UTF-8 sequences as it usually does. One
exception to this is nchar_ctl
as that is just a thin wrapper around
base::nchar
.
The native code in this package assumes that all strings are NULL terminated
and no longer than (32 bit) INT_MAX (excluding the NULL). This should be a
safe assumption since the code is designed to work with STRSXPs and CHRSXPs.
Behavior is undefined and probably bad if you somehow manage to provide to
fansi
strings that do not adhere to these assumptions.
It is possible that during processing strings that are shorter than INT_MAX
would become longer than that. fansi
checks for that overflow and will
stop with an error if that happens. A work-around for this situation is to
break up large strings into smaller ones. The limit is on each element of a
character vector, not on the vector as a whole. fansi
will also error on
your system if R_len_t
, the R type used to measure string lengths, is less
than the processed length of the string.


Word Frequency Query Result
Word
Length
Count
Interesting
11
1459
One
2
796
She
3
698
About
5
675
Session
7
621
Fun
3
576
Were
4
548


Oh Javascript... Oh how I want to master you... Alas, you are not making it easy. Javascript, as you know, is a programming language that uses Object Oriented Design Principles to make things happen. Very similar to Ruby... In fact they share many similarities. The similarities however, are few and the differences are what makes one simpler than the other.
Let's talk about a little thing called syntax. Ruby makes coding with it much simpler. Basically, all lines of code end on their respective lines. With Javascript, you have to tell it where it ends. Constantly.  It needs to grow up a bit. Ruby seems to be the more mature language that gets how we as adults, speak. Javascript says it needs semi colons but has exceptions. So if you get any of those exceptions confused, debugging is a nightmare. This brings us to my next point.
Debugging within node is incredibly infuriating. Sometimes, it will give you a clue as to where your error is ocurring. Sometimes, it just says you have a problem "SOMEWHERE". This is of absolutely no use to me. Ruby, with the help of Rspec gives you much more detail as to what is going wrong with your code. Like a little gps device, it helps you hone in on the problem area of your code.
One last point that makes Ruby more of a joy to use is the built in methods. Their are just many more of them. And some exist for all different data types. you don't have to do much conversion with Ruby. With Javascript, you are constantly searching for a method that will work, and then find out you have to do it manually by writing a loop. Iteration within Ruby methods also make it a pleasure to work with. However, working with Javascripts will help build your understanding of loops for sure.


Back
{% endblock %}
Where are you travelling to?
Your exact journey will be printed in your emergency travel document. You can use an emergency travel document to travel to your final destination via up to 5 countries.
Your exact journey will be printed in your emergency travel document. You can use an emergency travel document to travel to your final destination via up to 5 countries.


Wrapper for ARToolKit functionality. More...
#include <ARController.h>
Public Member Functions | |
| ARController () | |
| Constructor. More... | |
| ~ARController () | |
| Destructor. More... | |
| const char * | getARToolKitVersion () |
| Returns a pointer to a C string containing the ARToolKit version, such as "4.5.1". More... | |
| void | setError (int error) |
| int | getError () |
| bool | initialiseBase (const int patternSize=AR_PATT_SIZE1, const int patternCountMax=AR_PATT_NUM_MAX) |
| Start trackable management so trackables can be added and removed. More... | |
| ARTracker2D & | get2DTracker () |
| ARTrackerSquare & | getSquareTracker () |
| void | setProjectionNearPlane (const ARdouble projectionNearPlane) |
| void | setProjectionFarPlane (const ARdouble projectionFarPlane) |
| ARdouble | projectionNearPlane (void) |
| ARdouble | projectionFarPlane (void) |
| bool | startRunning (const char *vconf, const char *cparaName, const char *cparaBuff, const long cparaBuffLen) |
| Start video capture and marker detection. More... | |
| bool | startRunningStereo (const char *vconfL, const char *cparaNameL, const char *cparaBuffL, const long cparaBuffLenL, const char *vconfR, const char *cparaNameR, const char *cparaBuffR, const long cparaBuffLenR, const char *transL2RName, const char *transL2RBuff, const long transL2RBuffLen) |
| Start stereo video capture and marker detection. More... | |
| bool | videoParameters (const int videoSourceIndex, int *width, int *height, AR_PIXEL_FORMAT *pixelFormat) |
| Reports width, height and pixel format of a video source. More... | |
| bool | isRunning () |
| Returns true if video capture and marker detection is running. More... | |
| bool | stopRunning () |
| Video capture and marker detection stops, but markers are still valid and can be configured. More... | |
| bool | shutdown () |
| Stop, if running. More... | |
| bool | getProjectionMatrix (const int videoSourceIndex, ARdouble proj[16]) |
| Populates the provided array with the ARToolKit projection matrix. More... | |
| int | addTrackable (const char *cfg) |
| Adds a trackable as specified in the given configuration string. More... | |
| bool | removeTrackable (int UID) |
| Removes the marker with the given ID. More... | |
| int | removeAllTrackables () |
| Clears the collection of markers. More... | |
| unsigned int | countTrackables () const |
| Returns the number of currently loaded trackables. More... | |
| unsigned int | countTrackables (ARTrackable::TrackableType type) const |
| Returns the number of currently loaded trackables of the specified type. More... | |
| ARTrackable * | findTrackable (int UID) |
| Searches the collection of markers for the given ID. More... | |
| bool | capture () |
| Requests the capture of a new frame from the video source(s). More... | |
| bool | displayFrameInit (const int videoSourceIndex) |
| bool | displayFrameSettings (const int videoSourceIndex, const int width, const int height, const bool rotate90, const bool flipH, const bool flipV, const ARView::HorizontalAlignment hAlign, const ARView::VerticalAlignment vAlign, const ARView::ScalingMode scalingMode, int32_t viewport[4]) |
| bool | displayFrame (const int videoSourceIndex) |
| bool | displayFrameFinal (const int videoSourceIndex) |
| bool | getFrameTextureRGBA32 (const int videoSourceIndex, uint32_t *buffer) |
| Asks the video source to push the most recent frame into the passed-in buffer. More... | |
| bool | update () |
| Performs marker detection and updates all markers. More... | |
| bool | getPatternImage (int patternID, uint32_t *buffer) |
| Populates the provided color buffer with the image for the specified pattern. More... | |
| bool | getFeatureImage (int patternID, unsigned char *&buffer, std::string fileName, std::string saveName="") |
| bool | isInited () |
| bool | load2DTrackerImageDatabase (const char *databaseFileName, int *&targetIds, int *targetSize, const char *destPath=nullptr) |
| bool | save2DTrackerImageDatabase (std::string fileName) |
Detailed Description
Wrapper for ARToolKit functionality.
This class handles ARToolKit initialisation, updates, and cleanup. It maintains a collection of markers, providing methods to add and remove them.
Constructor & Destructor Documentation
| ARController::ARController | ( | ) |
Constructor.
| ARController::~ARController | ( | ) |
Destructor.
Member Function Documentation
| int ARController::addTrackable | ( | const char * | cfg | ) |
Adds a trackable as specified in the given configuration string.
The format of the string can be one of:
- 2D image target: "2d;target_image_pathname;image_height", e.g. "2d;gibraltar.jpg;160.9"
- Square marker from pattern file: "square;pattern_file;pattern_width", e.g. "single;data/hiro.patt;80"
- Square marker from pattern passed in config: "square;pattern_width;buffer=[]", e.g. "square_buffer;80;buffer=234 221 237..."
- Square barcode marker: "square_barcode;barcode_id;pattern_width", e.g. "square_barcode;0;80"
- Multi-square marker: "multi;config_file", e.g. "multi;data/multi/marker.dat"
- Parameters
-
cfg The configuration string
- Returns
- The UID of the marker instantiated based on the configuration string, or -1 if an error occurred.
| bool ARController::capture | ( | ) |
Requests the capture of a new frame from the video source(s).
In the case of stereo video sources, capture from both sources will be attempted.
- Returns
- The capture succeeded, or false if no frame was captured.
| unsigned int ARController::countTrackables | ( | ) | const |
Returns the number of currently loaded trackables.
- Returns
- The number of currently loaded markers.
| unsigned int ARController::countTrackables | ( | ARTrackable::TrackableType | type | ) | const |
Returns the number of currently loaded trackables of the specified type.
- Returns
- The number of currently loaded markers.
| bool ARController::displayFrame | ( | const int | videoSourceIndex | ) |
| bool ARController::displayFrameFinal | ( | const int | videoSourceIndex | ) |
| bool ARController::displayFrameInit | ( | const int | videoSourceIndex | ) |
| bool ARController::displayFrameSettings | ( | const int | videoSourceIndex, |
| const int | width, | ||
| const int | height, | ||
| const bool | rotate90, | ||
| const bool | flipH, | ||
| const bool | flipV, | ||
| const ARView::HorizontalAlignment | hAlign, | ||
| const ARView::VerticalAlignment | vAlign, | ||
| const ARView::ScalingMode | scalingMode, | ||
| int32_t | viewport[4] | ||
| ) |
| ARTrackable * ARController::findTrackable | ( | int | UID | ) |
Searches the collection of markers for the given ID.
- Parameters
-
UID The UID of the marker to find
- Returns
- The found marker, or NULL if no matching ID was found.
| ARTracker2D & ARController::get2DTracker | ( | ) |
| const char * ARController::getARToolKitVersion | ( | ) |
Returns a pointer to a C string containing the ARToolKit version, such as "4.5.1".
The string persists as long as the ARController instance. The caller is not responsible for disposing of the returned pointer.
- Returns
- The ARToolKit version
| int ARController::getError | ( | ) |
| bool ARController::getFeatureImage | ( | int | patternID, |
| unsigned char *& | buffer, | ||
| std::string | fileName, | ||
| std::string | saveName = "" |
||
| ) |
| bool ARController::getFrameTextureRGBA32 | ( | const int | videoSourceIndex, |
| uint32_t * | buffer | ||
| ) |
Asks the video source to push the most recent frame into the passed-in buffer.
- Parameters
-
videoSourceIndex Index into an array of video sources, specifying which source should be queried. buffer Pointer to a buffer of pixels (of type 'uint32_t') to be filled. It is the caller's responsibility to ensure that the buffer is of sufficient size. The pixels are RGBA in little-endian systems, or ABGR in big-endian systems.
| bool ARController::getPatternImage | ( | int | patternID, |
| uint32_t * | buffer | ||
| ) |
Populates the provided color buffer with the image for the specified pattern.
- Parameters
-
patternID The ARToolKit pattern ID to use buffer The color buffer to populate
- Returns
- true if successful, false if an error occurred
Populates the provided array with the ARToolKit projection matrix.
The projection matrix is computed once the video source has been opened, and camera parameters become available. If this method is called before this happens, then the passed array is untouched and the method will return false.
- Parameters
-
videoSourceIndex Index into an array of video sources, specifying which source should be queried. proj Array to populate with OpenGL compatible projection matrix
- Returns
- true if the projection matrix has been computed, otherwise false
| ARTrackerSquare & ARController::getSquareTracker | ( | ) |
| bool ARController::initialiseBase | ( | const int | patternSize = AR_PATT_SIZE1 , |
| const int | patternCountMax = AR_PATT_NUM_MAX |
||
| ) |
Start trackable management so trackables can be added and removed.
After this call, trackables can be added and removed, any time up until shutdown() is called.
- Parameters
-
patternSize For any square template (pattern) markers, the number of rows and columns in the template. patternCountMax For any square template (pattern) markers, the maximum number of markers that may be loaded for a single matching pass. Must be > 0.
- Returns
- true if initialisation was OK, false if an error occured.
| bool ARController::isInited | ( | ) |
| bool ARController::isRunning | ( | ) |
Returns true if video capture and marker detection is running.
- Returns
- true if the video source(s) is/are open and returning frames, otherwise false.
| bool ARController::load2DTrackerImageDatabase | ( | const char * | databaseFileName, |
| int *& | targetIds, | ||
| int * | targetSize, | ||
| const char * | destPath = nullptr |
||
| ) |
| ARdouble ARController::projectionFarPlane | ( | void | ) |
| ARdouble ARController::projectionNearPlane | ( | void | ) |
| int ARController::removeAllTrackables | ( | ) |
Clears the collection of markers.
- Returns
- The number of markers removed
| bool ARController::removeTrackable | ( | int | UID | ) |
Removes the marker with the given ID.
- Parameters
-
UID The UID of the marker to remove
- Returns
- true if the marker was removed, false if an error occurred.
| bool ARController::save2DTrackerImageDatabase | ( | std::string | fileName | ) |
| void ARController::setError | ( | int | error | ) |
| void ARController::setProjectionFarPlane | ( | const ARdouble | projectionFarPlane | ) |
| void ARController::setProjectionNearPlane | ( | const ARdouble | projectionNearPlane | ) |
| bool ARController::shutdown | ( | ) |
Stop, if running.
Remove all markers, clean up all memory. Starting again from this state requires initialiseBase() to be called again.
- Returns
- true if shutdown was successful, otherwise false
| bool ARController::startRunning | ( | const char * | vconf, |
| const char * | cparaName, | ||
| const char * | cparaBuff, | ||
| const long | cparaBuffLen | ||
| ) |
Start video capture and marker detection.
(AR/NFT initialisation will begin on a subsequent call to update().)
- Parameters
-
vconf Video configuration string. cparaName Camera parameters filename, or NULL if camera parameters file not being used. cparaBuff A byte-buffer containing contents of a camera parameters file, or NULL if a camera parameters file is being used. cparaBuffLen Length (in bytes) of cparaBuffLen, or 0 if a camera parameters file is being used.
- Returns
- true if video capture and marker detection was started, otherwise false.
| bool ARController::startRunningStereo | ( | const char * | vconfL, |
| const char * | cparaNameL, | ||
| const char * | cparaBuffL, | ||
| const long | cparaBuffLenL, | ||
| const char * | vconfR, | ||
| const char * | cparaNameR, | ||
| const char * | cparaBuffR, | ||
| const long | cparaBuffLenR, | ||
| const char * | transL2RName, | ||
| const char * | transL2RBuff, | ||
| const long | transL2RBuffLen | ||
| ) |
Start stereo video capture and marker detection.
(AR/NFT initialisation will begin on a subsequent call to update().)
- Parameters
-
vconfL Video configuration string for the "left" video source. cparaNameL Camera parameters filename for the "left" video source, or NULL if camera parameters file not being used. cparaBuffL A byte-buffer containing contents of a camera parameters file for the "left" video source, or NULL if a camera parameters file is being used. cparaBuffLenL Length (in bytes) of cparaBuffLenL, or 0 if a camera parameters file is being used. vconfR Video configuration string for the "right" video source. cparaNameR Camera parameters filename for the "right" video source, or NULL if camera parameters file not being used. cparaBuffR A byte-buffer containing contents of a camera parameters file for the "right" video source, or NULL if a camera parameters file is being used. cparaBuffLenR Length (in bytes) of cparaBuffLenR, or 0 if a camera parameters file is being used. transL2RName Stereo calibration filename, or NULL if stereo calibration file not being used. transL2RBuff A byte-buffer containing contents of a stereo calibration file, or NULL if a stereo calibration file is being used. transL2RBuffLen Length (in bytes) of transL2RBuff, or 0 if a stereo calibration file is being used.
- Returns
- true if video capture and marker detection was started, otherwise false.
| bool ARController::stopRunning | ( | ) |
Video capture and marker detection stops, but markers are still valid and can be configured.
- Returns
- true if video capture and marker detection was stopped, otherwise false.
| bool ARController::update | ( | ) |
Performs marker detection and updates all markers.
The latest frame from the current video source is retrieved and analysed. Each marker in the collection is updated with new tracking information. The marker info array is iterated over, and detected markers are matched up with those in the marker collection. Each matched marker is updated with visibility and transformation information. Any markers not detected are considered not currently visible.
- Returns
- true if update completed successfully, false if an error occurred
| bool ARController::videoParameters | ( | const int | videoSourceIndex, |
| int * | width, | ||
| int * | height, | ||
| AR_PIXEL_FORMAT * | pixelFormat | ||
| ) |
Reports width, height and pixel format of a video source.
To retrieve the size (in bytes) of each pixel, use arUtilGetPixelSize(*pixelFormat); To get a C-string with the name of the pixel format, use arUtilGetPixelFormatName(*pixelFormat);
- Parameters
-
videoSourceIndex Index into an array of video sources, specifying which source should be queried. width Pointer to an int which will be filled with the width (in pixels) of the video frame, or NULL if this information is not required. height Pointer to an int which will be filled with the height (in pixels) of the video frame, or NULL if this information is not required. pixelFormat Pointer to an AR_PIXEL_FORMAT which will be filled with the pixel format of the video frame, or NULL if this information is not required.
- Returns
- true if the video source(s) is/are open and returning frames, otherwise false.
The documentation for this class was generated from the following files:
- /bitrise/src/Source/AR6/include/AR6/ARController.h
- /bitrise/src/Source/AR6/ARController.cpp


{% extends "base.html" %} {% load future %} {% block title %}My Profile{% endblock %} {% block nav_profile %}active{% endblock %} {% block content %}
To increase your account security, please enable two-factor authentication. Use the simple wizard to guide you through the steps to link your phone with your account.
Enable two-factor authentication
{% else %}You have enabled two-factor authentication. If you have changed your mind, you can disable it again.
Disable two-factor authentication
{% endif %}| IP Address | Last Used | Actions |
|---|---|---|
| {{ vc.ip }} | {{ vc.last_used_at|timesince }} ago |
No verified computers
{% endif %} {% endblock %}


Estimated: 1d
Date: 2016-08-04 18:00
Time spent: 4h
Remaining: 0h
Date: 2016-08-03 18:00
Time spent: 2h
Date: 2016-08-02 18:00
Remaining: 2h
Update


User
Nothing Selected
Add Donator
Add Donation
View Donations
Donator Registration Form
Id:
Select Option:
Nothing Selected
Show my donation
Hide my donation
Name:
Ref. Name:
Mobile:
Address:
Submit
Delete
ID
Check
Name
Ref. Name
Mobile
Address
Dated
Donation Registration Form
Id:
Donator:
Amount:
Received By:
Submit
Delete
ID
Check
Donator
Amount
Received By
Dated
Abbasia Welfare Donations
ID
Name
Ref. Name
Mobile
Address
Amount
Received By
Dated


Material properties used in this study.
T: Temperature; S: Seebeck coefficient; ρ: electrical resistivity; λ: thermal conductivity.


Two cyclists hit in separate crashes in Greater Victoria this morning
by Cindy E. HarnettTwo cyclists were struck by vehicles in separate crashes in Greater Victoria this morning.
One cyclist was struck in the downtown Victoria intersection of Broad and Yates streets at about 6:30 a.m. The cyclist sustained minor injuries.
The driver failed to yield at a stop sign, said Victoria Const. Cody Lapierre.
The cyclist’s lights were initially considered a factor but police determined the bike was equipped with proper lighting.
At about 8:20 a.m. another cyclist and vehicle collided in Saanich. That crash occurred at a Cedar Hill Cross Road intersection where Epsom Drive becomes Braefoot Road.
B.C. Ambulance paramedics were on the scene. No information was available on the condition of the cyclist.


Sol21
Conexión y Transversalidad S.A. De C.V.
A Mexican company devoted to the integration of technologies and processes to better serve society through uniquely tailored solutions
The base of our business is to respect local cultures, generating a cascade of opportunities for commerce and education in an equitable manner, supporting the conservation of the environment


Back
Key Energy Questions
Does your house have a...
Solar Geyser
Electric Geyser
Gas Geyser
Geyser Timer
Yes
No
Heatpump
Yes
No
Geyser Blanket
Yes
No
Stove
Gas
Electric
Oven
Gas
Electric
Done
*Note - The choices above are not reflected in the kWh calculator, however as geysers and stoves consume up to 60% of your electricity understanding these elements are essential to the overall energy usage
Contact Us
FAQ


MPLAB® ICE 2000 In-Circuit Emulator
During the development phases, an ICE2000 is being used to emulate a PIC18C452 microprocessor which allows quick and easy debugging and modification of the software system.
Links: Microchip Technology Inc. | MPLAB ICE2000 Product Page | PIC18C452 Product Page


http://www.speakers-podium.com/susangranger.
Susan Granger's review of 'THE MOD SQUAD" (MGM)
Let's face it..."The Mod Squad" wasn't that cool when it was on ABC television 30 years ago (Sept.'68 to August '73) and it certainly hasn't improved with age. If anything, it's deteriorated - and today's teenagers, who are the target audience, weren't even alive when the series aired. For those who don't remember, "The Mod Squad" were juvenile delinquents - Peggy Lipton, Michael Cole, and Clarence Williams 3rd - who plea-bargained their way out of custody by agreeing to work with The Man fighting crime undercover. It was a counter-culture thing that appealed to the late '60s, early '70s mentality. This time 'round Claire Danes, Giovanni Ribisi, and Omar Epps are the teenagers who are enlisted to work as undercover police operatives, reporting to gruff but kindly Dennis Farina. The plot - and I use that word loosely - revolves around a cache of drugs that disappears from a police evidence locker. "The Mod Squad" is supposed to find it. "I'm getting too old for this," they moan, just as they did on the TV series, but it's a line that's far more believable when muttered by Mel Gibson and Danny Glover in one of the many "Lethal Weapon" sequels. Basically, the dialogue is drivel. Written by Stephen Kay, Kate Lanier and Scott Silver, and directed by Mr. Silver, this film has nothing, absolutely nothing to recommend it except that it's short, so you only waste 94 minutes of your time. So, on the Granger Movie Gauge of 1 to 10, "The Mod Squad" is a thudding 1. It's the Clod Squad.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


First we will simulate some rank 0 data:
library("flashr")
set.seed(1)
n=100
p=1000
Y = matrix(rnorm(n*p),nrow=n)
Run flash to fit a rank 1 model (Kmax=1
). Here nullcheck=FALSE
tells flash to keep the final value of the variational optimization without checking it against the rank 0 solution (since we are going to do that by hand here.)
data = flash_set_data(Y)
f1= flash(data,Kmax=1,nullcheck=FALSE)
## fitting factor/loading 1
flash_get_objective(data,f1)
## [1] -141799.7
Now try deleting the factor - that gives us a rank 0 solution in this case. We can see here that deleting the factor actually increases the objective function! That is the optimization did not work very well (because deleting the factor is actually a special case of the model).
f0 = flash_zero_out_factor(data,f1,1)
f0 = flash_update_precision(data,f0)
flash_get_objective(data,f0)
## [1] -141788.3
This is actually quite a common occurance (see below). So we have implemented this check as the default in flash.


Go is an open source project, distributed under a BSD-style license. This document explains how to check out the sources, build them on your own machine, and run them.
There are two distinct ways to experiment with Go.
This document focuses on the gc
Go
compiler and tools (6g
, 8g
etc.).
For information on how to use gccgo
, a more traditional
compiler using the GCC back end, see
Setting up and using gccgo.
The Go compilation environment depends on three environment
variables that you should set in your .bashrc
or equivalent,
plus one optional variable:
$GOROOT
$HOME/go
but it can be any directory.
$GOOS
and $GOARCH
$GOOS
are linux
,
darwin
(Mac OS X 10.5 or 10.6),
and nacl
(Native Client, an incomplete port).
Choices for $GOARCH
are amd64
(64-bit x86, the most mature port),
386
(32-bit x86), and
arm
(32-bit ARM, an incomplete port).
The valid combinations are
linux
/amd64
,
linux
/arm
,
linux
/386
,
darwin
/amd64
,
darwin
/386
,
and
nacl
/386
.
$GOBIN
(optional)
$GOBIN
, you need to ensure that it
is in your $PATH
so that newly built Go-specific
command such as the compiler can be found during the build.
The default, $HOME/bin
, may already be in your $PATH
.
Note that $GOARCH
and $GOOS
identify the
target environment, not the environment you are running on.
In effect, you are always cross-compiling.
Set these variables in your .bashrc
. For example:
export GOROOT=$HOME/go export GOARCH=amd64 export GOOS=linux
Double-check them by listing your environment.
$ env | grep '^GO'
Go compilers support two operating systems (Linux, Mac OS X) and three instruction sets. The versions for Linux and Mac are equally capable except that the ARM port does not run on OS X (yet).
There are important differences in the quality of the compilers for the different architectures.
amd64
(a.k.a. x86-64
); 6g,6l,6c,6a
gccgo
can do noticeably better sometimes).
386
(a.k.a. x86
or x86-32
); 8g,8l,8c,8a
amd64
port. Not as well soaked but
should be nearly as solid.
arm
(a.k.a. ARM
); 5g,5l,5c,5a
Except for things like low-level operating system interface code, the runtime support is the same in all ports and includes a mark-and-sweep garbage collector (a fancier one is in the works), efficient array and string slicing, support for segmented stacks, and a strong goroutine implementation.
See the separate gccgo
document
for details about that compiler and environment.
If you do not have Mercurial installed (you do not have an hg
command),
this command:
$ sudo easy_install mercurial
works on most systems.
(On Ubuntu, you might try apt-get install python-setuptools python-dev
first.)
If that fails, visit the Mercurial Download page.
Make sure the $GOROOT
directory does not exist or is empty.
Then check out the repository:
$ hg clone -r release https://go.googlecode.com/hg/ $GOROOT
The Go tool chain is written in C. To build it, you need to have GCC, the standard C libraries, the parser generator Bison, make and the text editor ed installed. On OS X, they can be installed as part of Xcode. On Linux,
$ sudo apt-get install bison gcc libc6-dev ed make
(or the equivalent on your Linux distribution).
To build the Go distribution, make sure $GOBIN
(or $HOME/bin
if $GOBIN
is not set)
is in your $PATH
and then run
$ cd $GOROOT/src $ ./all.bash
If all.bash
goes well, it will finish by printing
--- cd ../test N known bugs; 0 unexpected bugs
where N is a number that varies from release to release.
Given a file file.go
, compile it using
$ 6g file.go
6g
is the Go compiler for amd64
; it will write the output
in file.6
. The ‘6
’ identifies
files for the amd64
architecture.
The identifier letters for 386
and arm
are ‘8
’ and ‘5
’.
That is, if you were compiling for 386
, you would use
8g
and the output would be named file.8
.
To link the file, use
$ 6l file.6
and to run it
$ ./6.out
A complete example:
$ cat >hello.go <<EOF package main import "fmt" func main() { fmt.Printf("hello, world\n") } EOF $ 6g hello.go $ 6l hello.6 $ ./6.out hello, world $
There is no need to list hello.6
's package dependencies
(in this case, package fmt
) on the 6l
command line.
The linker learns about them by reading hello.6
.
To build more complicated programs, you will probably
want to use a
Makefile
.
There are examples in places like
$GOROOT/src/cmd/godoc/Makefile
and $GOROOT/src/pkg/*/Makefile
.
The
document
about contributing to the Go project
gives more detail about
the process of building and testing Go programs.
For real-time help, there may be users or developers on
#go-nuts
on the Freenode IRC server.
The official mailing list for discussion of the Go language is Go Nuts.
Bugs can be reported using the Go issue tracker.
For those who wish to keep up with development, there is another mailing list, golang-checkins, that receives a message summarizing each checkin to the Go repository.


|
Class Summary |
| ClientSocketSubstitute |
A client-side subsitute for the common pattern of the blocking while(true) readline(); pattern |
| Counter |
A class that utilizes a combination of memcache and the
datastore backend to implement a fast yet reliable
counter. |
| HttpClientEnvironment |
Environment for http-based communication that uses an apache http client |
| PersistentQueue<T> |
An experimental!! class that can be used to
persist objects in the data store in an ordered fashion. |
| ServerEndpoint |
A single endpoint for a WebConnectionClient. |
| WebConnectionClient |
A client than can connect to a WebConnection. |
| WebConnectionServer |
Manages the peristence of server-side endpoints for a WebConnectionClient,
and the execution of incoming requests. |


--- layout: post title: "Naming newtypes for QuickCheck Arbitraries" description: "A simple naming scheme for newtypes to add Arbitrary instances." date: 2019-09-02 13:07 UTC tags: [Unit Testing, Haskell] --- {% include JB/setup %}
{{ page.description }}
Naming is one of those recurring difficult problems in software development. How do you come up with good names?
I'm not aware of any general heuristic for that, but sometimes, in specific contexts, a naming scheme presents itself. Here's one.
When you write QuickCheck properties that involve your own custom types, you'll have to add Arbitrary
instances for those types. As an example, here's a restaurant reservation record type:
data Reservation = Reservation { reservationId :: UUID , reservationDate :: LocalTime , reservationName :: String , reservationEmail :: String , reservationQuantity :: Int } deriving (Eq, Show, Read, Generic)
You can easily add an Arbitrary instance to such a type:
instance Arbitrary Reservation where arbitrary = liftM5 Reservation arbitrary arbitrary arbitrary arbitrary arbitrary
The type itself is part of your domain model, while the Arbitrary
instance only belongs to your test code. You shouldn't add the Arbitrary
instance to the domain model, but that means that you'll have to define the instance apart from the type definition. That, however, is an orphan instance, and the compiler will complain:
test\ReservationAPISpec.hs:31:1: warning: [-Worphans] Orphan instance: instance Arbitrary Reservation To avoid this move the instance declaration to the module of the class or of the type, or wrap the type with a newtype and declare the instance on the new type. | 31 | instance Arbitrary Reservation where | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^...
Technically, this isn't a difficult problem to solve. The warning even suggests remedies. Moving the instance to the module that declares the type is, however, inappropriate, since test-specific instances don't belong in the domain model. Wrapping the type in a newtype
is more appropriate, but what should you call the type?
I had trouble coming up with good names for such newtype
wrappers, so at first I decided to just suppress that particular compiler warning. I simply added the -fno-warn-orphans
flag exclusively to my test code.
That solved the immediate problem, but I felt a little dirty. It's okay, though, because you're not supposed to reuse test libraries anyway, so the usual problems with orphan instances don't apply.
After having worked a little like this, however, it dawned on me that I needed more than one Arbitrary
instance, and a naming scheme presented itself.
For some of the properties I wrote, I needed a valid Reservation
value. In this case, valid means that the reservationQuantity
is a positive number, and that the reservationDate
is in the future.
A simple naming scheme for newtype
wrappers for QuickCheck Arbitrary
instances, then, is:


One of the plugins in Oak stores data in a document oriented format. The plugin implements the low level NodeStore interface.
The document storage optionally uses the persistent cache to reduce read operations on the backend storage.
The DocumentNodeStore supports a number of backends, with a storage abstraction called DocumentStore:
The recommended MongoDB version depends on the Oak release. Below table lists the recommended MongoDB version for each Oak release. More recent MongoDB versions may also work, but are untested.
| Oak Release | MongoDB version |
|---|---|
| 1.0.x | 2.6.x |
| 1.2.x | 3.2.x |
| 1.4.x | 3.2.x |
| 1.6.x | 3.2.x |
| 1.8.x | 3.4.x |
The remaining part of the document will focus on the MongoDocumentStore to explain and illustrate concepts of the DocumentNodeStore.
The repository data is stored in two collections: the nodes collection for node data, and the blobs collection for binaries. The journal collection contains a log of changes applied to the repository. Entries older than 24 hours are automatically purged by the repository.
The clusterNodes collection contains a document for each DocumentNodeStore connected to MongoDB in read-write mode. A DocumentNodeStore uses the documents in this collection to discover all other instances.
Cluster wide information is stored in the settings collection. This includes checkpoints, journal and revision GC status, format version and the current cluster view.
The data can be viewed using the MongoDB shell:
> show collections blobs clusterNodes journal nodes settings
The DocumentNodeStore stores each node in a separate MongoDB document and updates to a node are stored by adding new revision/value pairs to the document. This way the previous state of a node is preserved and can still be retrieved by a session looking at a given snapshot (revision) of the repository.
The basic MongoDB document of a node in Oak looks like this:
{ "_id" : "1:/node", "_deleted" : { "r13f3875b5d1-0-1" : "false" }, "_lastRev" : { "r0-0-1" : "r13f3875b5d1-0-1" }, "_modified" : NumberLong(274208361), "_modCount" : NumberLong(1), "_children" : Boolean(true), "_revisions" : { "r13f3875b5d1-0-1" : "c" } }
All fields in the above document are metadata and are not exposed through the Oak API. The DocumentNodeStore has two types of fields. Simple fields are key/value pairs like the _id or _modified field. Versioned fields are kept in sub-documents where the key is a revision paired with the value at this revision.
The _id field is used as the primary key and consists of a combination of the depth of the path and the path itself. This is an optimization to align sibling keys in the index.
The _deleted sub-document contains the revision this node was created in. In the above example the root node was created in revision r13f3875b5d1-0-1. If the node is later deleted, the _deleted sub-document will get a new field with the revision the node was deleted in.
The sub-document _lastRev contains the last revision written to this node by each cluster node. In the above example the DocumentNodeStore cluster node with id 1 modified the node the last time in revision r13f3875b5d1-0-1, when it created the node. The revision key in the _lastRev sub-document is synthetic and the only information actually used by the DocumentNodeStore is the clusterId. The _lastRev sub-document is only updated for non-branch commits or on merge, when changes become visible to all readers. Starting with Oak 1.2 the _lastRev value for a cluster node is only updated when there is no corresponding entry in _revisions or _commitRoot. That is, when the node wasn’t changed but a descendant node was added, removed or modified.
The _modified field contains an indexed low-resolution timestamp when the node was last modified. The time resolution is five seconds. This field is also updated when a branch commit modifies a node.
The _modCount field contains a modification counter, which is incremented with every change to the document. This field allows the DocumentNodeStore to perform conditional updates without requesting the whole document.
The _children field is a boolean flag to indicate if this node has child nodes. By default a node would not have this field. If any node gets added as child of this node then it would be set to true. It is used to optimize access to child nodes and allows the DocumentNodeStore to omit calls to fetch child nodes for leaf nodes.
Finally, the _revisions sub-document contains commit information about changes marked with a revision. E.g. the single entry in the above document tells us that everything marked with revision r13f3875b5d1-0-1 is committed and therefore valid. In case the change is done in a branch then the value would be the base revision. It is only added for those nodes which happen to be the commit root for any given commit.
Adding a property prop with value foo to the node in a next step will result in the following document:
{ "_deleted" : { "r13f3875b5d1-0-1" : "false" }, "_id" : "1:/node", "_lastRev" : { "r0-0-1" : "r13f38818ab6-0-1" }, "_modified" : NumberLong(274208516), "_modCount" : NumberLong(2), "_revisions" : { "r13f3875b5d1-0-1" : "c", "r13f38818ab6-0-1" : "c" }, "prop" : { "r13f38818ab6-0-1" : "\"foo\"" } }
Now the document contains a new sub-document with the name of the new property. The value of the property is annotated with the revision the property was set. With each successful commit to this node, a new field is added to the _revisions sub-document. Similarly the _lastRev sub-document and _modified field are updated.
After the node is deleted the document looks like this:
{ "_deleted" : { "r13f3875b5d1-0-1" : "false", "r13f38835063-2-1" : "true" }, "_id" : "1:/node", "_lastRev" : { "r0-0-1" : "r13f38835063-2-1" }, "_modified" : NumberLong(274208539), "_modCount" : NumberLong(3), "_revisions" : { "r13f3875b5d1-0-1" : "c", "r13f38818ab6-0-1" : "c", "r13f38835063-2-1" : "c" }, "prop" : { "r13f38818ab6-0-1" : "\"foo\"" "r13f38835063-2-1" : null } }
The _deleted sub-document now contains a r13f38835063-2-1 field marking the node as deleted in this revision.
Reading the node in previous revisions is still possible, even if it is now marked as deleted as of revision r13f38835063-2-1.
As seen in the examples above, a revision is a String and may look like this: r13f38835063-2-1. It consists of three parts:
Revisions are used by the DocumentNodeStore to identify the sequence of changes done on items in the repository. This is also done across cluster nodes for revisions with different cluster node ids. This requires the system clocks on the machines running Oak and the backend system to approximately in sync. It is recommended to run an NTP daemon or some similar service to keep the clock synchronized. Oak allows clock differences up to 2 seconds between the machine where Oak is running and the machine where the backend store (MongoDB or RDBMS) is running. Oak may refuse to start if it detects a larger clock difference. Clock differences between the machines running in an Oak cluster will result in delayed propagation of changes between cluster nodes and warnings in the log files.
The DocumentNodeStore implementation support branches, which allows a client to stage multiple commits and make them visible with a single merge call. A branch commit looks very similar to a regular commit, but instead of setting the value of an entry in _revisions to c (committed), it marks it with the base revision of the branch commit. In contrast to regular commits where the commit root is the common ancestor of all nodes modified in a commit, the commit root of a branch commit is always the root node.  To make sure the following branch commits can use the same commit root, the DocumentNodeStore simply picks the root node, which always works in this case.
A root node may look like this:
{ "_deleted" : { "r13fcda88ac0-0-1" : "false", }, "_id" : "0:/", "_lastRev" : { "r0-0-1" : "r13fcda91720-0-1" }, "_modified" : NumberLong(274708995), "_modCount" : NumberLong(2), "_revisions" : { "r13fcda88ac0-0-1" : "c", "r13fcda91720-0-1" : "c" }, "prop" : { "r13fcda91720-0-1" : "\"foo\"" } }
The root node was created in revision r13fcda88ac0-0-1 and later in revision r13fcda91720-0-1 property prop was set to foo. To keep the example simple, we now assume a branch is created based on the revision the root node was last modified and a branch commit is done to modify the existing property. After the branch commit the root node looks like this:
{ "_deleted" : { "r13fcda88ac0-0-1" : "false", }, "_id" : "0:/", "_lastRev" : { "r0-0-1" : "r13fcda91720-0-1" }, "_modified" : NumberLong(274708995), "_modCount" : NumberLong(3), "_revisions" : { "r13fcda88ac0-0-1" : "c", "r13fcda91720-0-1" : "c", "r13fcda919eb-0-1" : "r13fcda91720-0-1" }, "_bc" : { "r13fcda919eb-0-1" : "true" }, "prop" : { "r13fcda91720-0-1" : "\"foo\"", "r13fcda919eb-0-1" : "\"bar\"", } }
Note, the _bc sub-document was introduced with Oak 1.8 and is not present in older versions. The branch commit revision is added to _bc whenever a change is done on a document with a branch commit. This helps the DocumentNodeStore to more easily identify branch commit changes.
At this point the modified property is only visible to a reader when it reads with the branch revision r13fcda919eb-0-1 because the revision is marked with the base version of this commit in the _revisions sub-document. Note, the _lastRev is not updated for branch commits but only when a branch is merged.
When the branch is later merged, the root node will look like this:
{ "_deleted" : { "r13fcda88ac0-0-1" : "false", }, "_id" : "0:/", "_lastRev" : { "r0-0-1" : "r13fcda91b12-0-1" }, "_modified" : NumberLong(274708995), "_modCount" : NumberLong(4), "_revisions" : { "r13fcda88ac0-0-1" : "c", "r13fcda91720-0-1" : "c", "r13fcda919eb-0-1" : "c-r13fcda91b12-0-1" }, "_bc" : { "r13fcda919eb-0-1" : "true" }, "prop" : { "r13fcda91720-0-1" : "\"foo\"", "r13fcda919eb-0-1" : "\"bar\"", } }
Now, the changed property is visible to readers with a revision equal or newer than r13fcda91b12-0-1.
The same logic is used for changes to other nodes that belong to a branch commit. The DocumentNodeStore internally resolves the commit revision for a modification before it decides whether a reader is able to see a given change.
Over time the size of a document grows because the DocumentNodeStore adds data to the document with every modification, but never deletes anything to keep the history. Old data is moved when there are 100 commits to be moved or the document is bigger than 1 MB. A document with a reference to old data looks like this:
{ "_deleted" : { "r13fcda88ac0-0-1" : "false", }, "_id" : "0:/", "_lastRev" : { "r0-0-1" : "r13fcda91b12-0-1" }, "_modified" : NumberLong(274708995), "_modCount" : NumberLong(1004), "_revisions" : { "r13fcda88ac0-0-1" : "c", "r13fcda91720-0-1" : "c", "r13fcda919eb-0-1" : "c-r13fcda91b12-0-1" }, "_bc" : { "r13fcda919eb-0-1" : "true" }, "_prev" : { "r13fcda88ae0-0-1" : "r13fcda91710-0-1" }, "prop" : { "r13fcda91720-0-1" : "\"foo\"", "r13fcda919eb-0-1" : "\"bar\"", } }
The optional sub-document _prev contains a list of revision pairs, each indicating the range of commit revisions a previous document contains. In the above example there is one document with previous commits from r13fcda88ae0-0-1 to r13fcda91710-0-1. The id of the previous document is derived from the upper bound of the range and the id/path of the current document. The id of the previous document for r13fcda88ae0-0-1 and 0:/ is 1:p/r13fcda88ae0-0-1 and may looks like this:
{ "_id" : "1:p/r13fcda88ae0-0-1", "_modCount" : NumberLong(1), "_revisions" : { "r13fcda88ae0-0-1" : "c", "r13fcda88af0-0-1" : "c", ... "r13fcda91710-0-1" : "c" }, "prop" : { "r13fcda88ae0-0-1" : "\"foo\"", "r13fcda88af0-0-1" : "\"bar\"", ... "r13fcda91710-0-1" : "\"baz\"" } }
Previous documents only contain immutable data, which means it only contains committed and merged _revisions. This also means the previous ranges of committed data may overlap because branch commits are not moved to previous documents until the branch is merged.
@since Oak 1.8
With Oak 1.8 the concept of a sweep revision was introduced in the DocumentNodeStore. The sweep revision of a DocumentNodeStore indicates up to which revision non-branch changes are guaranteed to be committed. This allows to optimize read operations because a lookup of the commit root document can be avoided in most cases. It also means the Revision Garbage Collector can remove previous documents that contain _revisions entries if they are all older than the sweep revision.
The sweep revision is maintained per DocumentNodeStore instance on the root document. Below is the root document already presented above, amended with the sweep revision.
{ "_deleted" : { "r13fcda88ac0-0-1" : "false", }, "_id" : "0:/", "_lastRev" : { "r0-0-1" : "r13fcda91720-0-1" }, "_modified" : NumberLong(274708995), "_modCount" : NumberLong(2), "_revisions" : { "r13fcda88ac0-0-1" : "c", "r13fcda91720-0-1" : "c" }, "_sweepRev" : { "r0-0-1" : "r13fcda91720-0-1", }, "prop" : { "r13fcda91720-0-1" : "\"foo\"" } }
Each DocumentNodeStore instance connecting to same database in Mongo server performs certain background task.
Each cluster node uses a unique cluster node id, which is the last part of the revision id. Each cluster node has a lease on the cluster node id, as described in the section Cluster Node Metadata.
The DocumentNodeStore periodically checks documents for their size and if necessary splits them up and moves old data to a previous document. This is done in the background by each DocumentNodeStore instance for the data it created.
While performing commits there are certain nodes which are modified but do not become part of commit. For example when a node under /a/b/c is updated then the _lastRev property of all ancestors also need to be updated to the commit revision. Such changes are accumulated and flushed periodically through a asynchronous job.
Cluster node metadata is stored in the clusterNodes collection. There is one entry for each cluster node that is running, and there are entries for cluster nodes that were ran. Old entries are kept so that if a cluster node is started again, it gets the same cluster node id as before (which is not strictly needed for consistency, but nice for support, if one would want to find out which change originated from which cluster node).
Each running cluster node updates the lease time of the cluster node id once every minute, to ensure each cluster node uses a different cluster node id.
> db.clusterNodes.find().pretty() { "_id" : "1", "_modCount" : NumberLong(2), "leaseEnd" : NumberLong("1390465250135"), "instance" : "/Users/test/jackrabbit/oak/trunk/oak-jcr", "machine" : "mac:20c9d043f141", "info" : "...pid: 11483, uuid: 6b6e8e4f-8322-4b19-a2b2-de0c573620b9 ..." } { "_id" : "2", "_modCount" : NumberLong(2), "leaseEnd" : NumberLong("1390465252206"), "instance" : "/Users/mueller/jackrabbit/oak/trunk/oak-jcr", "machine" : "mac:20c9d043f141", "info" : "...pid: 11483, uuid: 28ada13d-ec9c-4d48-aeb9-cef53aa4bb9e ..." }
The _id is the cluster node id of the node, which is the last part of the revision id. The leaseEnd is updated once per minute by running cluster nodes. It is the number of milliseconds since 1970. The instance is the current working directory. The machine is the lowest number of the network addresses, or a random uuid if this is not available. The info contains the same info as a string, plus additionally the process id and the uuid.
With MongoDocumentStore you can specify the the read preference and write concern. This can be enabled in Oak via two modes.
Note that MongoDocumentStore might still use a pre defined read preference like primary where ever required. So if for some code path like reading latest _lastRev of root node its required that read is performed from primary (for consistency) then code would explicitly use the readPreference primary for that operation. For all other operation Mongo Java Driver would use default settings where read preference is set to Primary and write concern is set to Acknowledged. Via using one of the two modes below a user can tune the default settings as per its need
In this mode the config is specified as part of the Mongo URI (See configuration). So if a user wants that reads from secondaries should prefer secondary with tag dc:ny,rack:1 otherwise they go to other secondary then he can specify that via following mongouri
mongodb://example1.com,example2.com,example3.com/?readPreference=secondary&readPreferenceTags=dc:ny,rack:1&readPreferenceTags=dc:ny&readPreferenceTags=
Refer to Read Preference Options and Write Concern Options for more details.
The read preference and write concern of all cluster nodes can be changed at runtime without having to restart the instances, by setting the property readWriteMode of this collection. All cluster nodes will pick up the change within one minute (when they renew the lease of the cluster node id). This is a string property with the format 'readPreference=<preference>&w=<writeConcern>' similar to the way it is used in mongouri. Just that it does not include other option details. The following shell command will set the read preference to primary and the write concern to majority for all cluster nodes:
> db.clusterNodes.update({}, {$set: {readWriteMode:'readPreference=primary&w=majority'}}, {multi: true})
DocumentNodeStore maintains multiple caches to provide an optimum performance. By default the cached instances are kept in heap memory but some of the caches can be backed by persistent cache.
documentCache - Document cache is used for caching the NodeDocument instance. These are in memory representation of the persistent state. For example in case of Mongo it maps to the Mongo document in nodes collection and for RDB its maps to the row in NODES table. There is a class of NodeDocument (leaf level split documents) which, since 1.3.15 are cached under prevDocCache (see below)
Depending on the DocumentStore implementation different heuristics are applied for invalidating the cache entries based on changes in backend
prevDocCache - Previous document cache is used for caching the NodeDocument instance representing leaf level split documents. Unlike other type of NodeDocument, these are immutable and hence don’t require invalidation. If configured, this cache can exploit persistent cache as well. Similar to other NodeDocument these are also in memory representation of the persistent state. (since 1.3.15)
Depending on the DocumentStore implementation different heuristics are applied for invalidating the cache entries based on changes in backend
docChildrenCache - Document Children cache is used to cache the children state for a given parent node. This is invalidated completely upon every background read. This cache was removed in 1.5.6.
nodeCache - Node cache is used to cache the DocumentNodeState instances. These are immutable view of NodeDocument as seen at a given revision hence no consistency checks are to be performed for them
childrenCache - Children cache is used to cache the children for a given node. These are also immutable and represent the state of children for a given parent at certain revision
diffCache - Caches the diff for the changes done between successive revision. For local changes done the diff is add to the cache upon commit while for external changes the diff entries are added upon computation of diff as part of observation call
All the above caches are managed on heap. For the last 3 nodeCache, childrenCache and diffCache Oak provides support for persistent cache. By enabling the persistent cache feature Oak can manage a much larger cache off heap and thus avoid freeing up heap memory for application usage.
documentCache and docChildrenCache are containing mutable state which requires consistency checks to be performed to keep them in sync with the backend persisted state. Oak uses a MVCC model under which it maintains a consistent view of a given Node at a given revision. This allows using local cache instead of using a global clustered cache where changes made by any other cluster node need not be instantly reflected on all other nodes.
Each cluster node periodically performs background reads to pickup changes done by other cluster nodes. At that time it performs consistency check to ensure that cached instance state reflect the state in the backend persisted state. Performing the check would take some time would be proportional number of entries present in the cache.
For repository to work properly its important to ensure that such background reads do not consume much time and work is underway to improve current approach. To ensure that such background operation (which include the cache invalidation checks) perform quickly one should not set a large size for these caches.
All other caches consist of immutable state and hence no cache invalidation needs to be performed for them. For that reason those caches can be backed by persistent cache and even having large number of entries in such caches would not be a matter of concern.
In a default setup the DocumentNodeStoreService takes a single config for cache which is internally distributed among the various caches above in following way
Lately options are provided to have a fine grained control over the distribution. See Cache Allocation
While distributing ensure that cache left for documentCache is not very large i.e. prefer to keep that ~500 MB max or lower. As a large documentCache can lead to increase in the time taken to perform cache invalidation.
Further make use of the persistent cache. This reduces pressure on GC by keeping instances off heap with slight decrease in performance compared to keeping them on heap.
On startup the DocumentNodeStore checks if its version is compatible with the format version currently in use. A read-only DocumentNodeStore can read the current version as well as older versions. A read-write DocumentNodeStore on the other hand can only write to the DocumentStore when the format version matches its own version. The DocumentNodeStore maintains this format version in the settings collection accessible to all cluster nodes.
Upgrading to a newer Oak version may therefore first require an update of the format version before a newer version of a DocumentNodeStore can be started on existing data. The oak-run tools contains an unlockUpgrade mode to perform this operation. Use the oak-run tool with the version matching the target upgrade version to unlock an upgrade with the following command. The below example unlocks an upgrade to 1.8 with a DocumentNodeStore on MongoDB:
> java -jar oak-run-1.8.0.jar unlockUpgrade mongodb://example.com:27017/oak
Please note that unlocking an upgrade is only possible when all cluster nodes are inactive, otherwise the command will refuse to change the format version.
See also detailed instructions for various upgrade paths.
As described in the section Node Content Model, the DocumentNodeStore does not overwrite existing data but adds it to an existing document when a property is updated. Cleaning up old data, which is not needed anymore is done with a process called Revision Garbage Collection. Depending on deployment this process does not run automatically and must be triggered periodically by the application. The garbage collection process adds some pressure on the system, so the application should trigger it when it is most convenient. E.g. at night, when systems are usually not that busy. It is usually sufficient to run it once a day. There are several ways how the revision garbage collection can be triggered:
The first two options are not described in more detail, because both of them are simple method calls. The third option comes with some sub commands as described below when oak-run with the revisions run mode is invoked without parameters or options:
revisions mongodb://host:port/database <sub-command> [options] where sub-command is one of info give information about the revisions state without performing any modifications collect perform garbage collection reset clear all persisted metadata sweep clean up uncommitted changes Option Description ------ ----------- -?, -h, --help show help --cacheSize <Integer> cache size (default: 0) --clusterId <Integer> MongoMK clusterId (default: 0) --continuous run continuously (collect only) --delay <Double> introduce delays to reduce impact on system (default: 0.0) --disableBranches disable branches --limit <Integer> collect at most limit documents (default: -1) --olderThan <Long> collect only docs older than n seconds (default: 86400) --once only 1 iteration --rdbjdbcpasswd RDB JDBC password (default: ) --rdbjdbcuser RDB JDBC user (default: ) --timeLimit <Long> cancel garbage collection after n seconds (default: -1) --verbose print INFO messages to the console
A revision garbage collection can be invoked while the system is online and running. Using the oak-run runnable jar, a revision GC on a system using the MongoDB backend can be initiated with:
java -jar oak-run-1.8.0.jar revisions mongodb://localhost:27017/oak collect
This will collect changes identified as garbage, which is older than 24 hours.
Starting with Oak 1.8 the DocumentNodeStoreService can trigger Revision Garbage Collection (RGC) automatically. The default schedule depends on the type of backend. On RDB the service will not schedule a RGC, which is the same behavior as in previous Oak versions. Whereas on MongoDB the RGC runs every five seconds. The latter is also known as Continuous Revision Garbage Collection. In this mode, the RGC will not log every run but only write an INFO message every hour summarizing the GC cycles for the past hour. For more details, see also the OSGi configuration page.


We are professional security expert and active partner with HIKVISION Technology
PROTECT YOUR HOME AND BUSINESS
We gurantee your total safety and happiness based on our years of providing standard security solution to both private and businesses. click below for more info.
SAFETY & SECURITY
AT YOUR FINGERTIPS
From our list of comprehensive security systems including access control, electric fencing, remote gate, intrusion detection, video surveilance, fire detection and 24/7
monitoring.
Cable Works Enterprises is an ingenious company registered under Cooperate affair commission (CAC), which deal solemnly on security sysytem. Our primary aim is to solve all
security challenges face by man integrating technology into our daily living, with different solution in place to suit your need. Cable Works Enterprises (CWE) is full-service
training and consulting firm, offering project and trainings on the followings:
CCTV cameras are used for secuirty monitoring and surveillance in any type of facilty. CCTV stands for Closed-Circuit Television, because CCTV systems transmit video
footage over a single channel essentially creating a closed circuit.
Telephone intercom enchances job efficiencies of the secuirty personnel within the house, organisation, estate and the landlords. With a phone dial from the secuirty post
they can avoid unwanted guest by simply calling the house number.
Satellite is a general television entertainment, show on Tv with different problem. It very important we input in our building plan to avoid unnecessary breaking of wall
after completion of the building.
Fire alarm systems are important in providing occupants of buildings prompt warning if a fire occurs. Systems that are not properly installed or maintained may cause
unwanted alarm activations.
A vital component within a solar PV system, the solar power inverter converts the DC electricity produced by the solar panels to AC to feed back to use in the home, store
in a battery, or export to the electricity grid.
A safe and effective option to barbed wire or woven fences, electric fence systems also deter and protect against trespassers and predators.
A safe and effective option to barbed wire or woven fences, electric fence systems also deter and protect against trespassers and predators.
Our Services
Complete Home Security
Home security is both the security hardware in place on a property as well as personal security practices. It is reported that 53% of break-ins occur during the day and 47%
occur at night.
CCTV Installation
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Fuga, inventore!
Electric Fence
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quaerat, repellat.
Complete Business Security
Accurately securing your business from physical and data threats can help minimize risks from thefts or physical violence. Workplace violence, corporate espionage, identity
theft issues and privacy requirements necessitate ensuring your business is safe on multiple fronts.
Intercoms
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Illo, repellat.
Alarm System
Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae, voluptas!
Useful Supports
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Eaque corrupti fuga fugiat aspernatur, nemo reiciendis nisi earum in praesentium placeat!
Back Up Light Solar Inverter
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Impedit, quod.
DSTV Installation
Lorem ipsum dolor sit, amet consectetur adipisicing elit. Quas, dignissimos.
Estate Solution
We help increase the value of your property and give your occupant a sense of security and safety
We offer the following:
Surveilance System(CCTV)
Access Control
TElephone Intercom
Electrical Wiring
TV Satellite
Fire Alarm
Mobile Market
Lorem ipsum, dolor sit amet consectetur adipisicing elit. Quod, iste.
lorem
lorem
lorem
lorem
Training Classes
Get technical training on CCTV installation, MikroTik Routers, Cisco Routers, WiFi Hotspot, Wireless ISP Setup, VOIP, PBX, Fiber Optic, Cyberoam, Asterisk, Access Control and
many more in Nigeria
Why train with us?
99% practical class
fieldWorks(opportunity to learn on sites)
Certificate after completion
Available Classes
CCTV Security System Installation Training-HIKVISION
When you enrol on our CCTV training program, you would learn the basic to advance skills required to design, install and maintain conventional AHD CCTV security systems
using Hikvision CCTV products.
IP Surveillance Security System Installation System
Our IP CCTV security training equips you with the practical skill to install IP surveillance solution by setting up Hikvision NVR, IP camera and Wi-Fi camera for local,
remote and mobile view.
MikroTik Wifi Hotspot System & Bandwidth Management
Hotspots enable hotels or wireless ISP (WISP) to offer secure and managed internet service to their customers via customised login portal or splash page where users must
login with username/password, Facebook etc.
Organisations rely on voice communications for daily business operations. With hands-on training on installation and programming of Panasonic KX-TES824 PBX, this training
would equip you with the skills to implement, program and maintain PBX telephone system for home and business.
Cisco Router & Switch Skills Development Training
Cisco Routers and switches are found at the core, distribution and access layers of most enterprise and business networks. Deploying and supporting a LAN or WAN riding on
Cisco gears require special skills and competence.
IP PBX Installation Training-Grandstream UCM6202
Hotspots enable hotels or wireless ISP (WISP) to offer secure and managed internet service to their customers via customised login portal or splash page where users must
login with username/password, Facebook etc.
About Us
Cable Works Enterprises is an ingenious company registered under Cooperate affair commission (CAC), which deal solemnly on security system
Write to us:
Contact information
No 9, Ire-akari Estate, Off Oluyole Ext.
+2348053056078
<EMAIL_ADDRESS>Meet the Team
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Snr Engr. Steve Peter
CEO - Founder
Engr Akin Fadele
CEO - Founder
Engr Seyi Popoola
CEO - Founder
Engr Ola Ishola
CEO - Founder
Engr Peter
CEO - Founder
Engr Sola
CEO - Founder
What people are saying about us
sara jones
ux designer
Lorem ipsum dolor sit amet consectetur adipisicing elit. Cumque ratione deleniti cum optio illo excepturi error. Voluptatem iste doloremque obcaecati! Perspiciatis dolor
dolorum pariatur aut voluptatibus beatae quas accusantium sed?


Donec vehicula est ac augue consectetur, |
There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form. Read more... |
|---|
| The standard chunk of Lorem Ipsum used since ,, | Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from Read more... |
|---|
Donec vehicula est ac augue consectetur, |
There are many variations of passages of Lorem Ipsum available, but the majority have suffered alteration in some form.Read more... |
|---|
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from
Read more...


John O'Donovan. AI/HCI Researcher.
Dept of Computer Science, University of California, Santa BarbaraPublications
2017
- Automated Assistants to Identify and Prompt Action on Visual News Bias. Proceedings of the 2017 CHI Conference on Human Factors in Computing Systems, Denver, CO, USA, May 06-11, 2017, Extended Abstracts. 10.1145/3027063.3053227
- AWARE: Workshop on Awareness Interfaces and Interactions. Companion Publication of the 22nd International Conference on Intelligent User Interfaces, IUI 2017, Limassol, Cyprus, March 13-16, 2017 10.1145/3030024.3030026
- RecSys'17 Joint Workshop on Interfaces and Human Decision Making for Recommender Systems. Proceedings of the Eleventh ACM Conference on Recommender Systems, RecSys 2017, Como, Italy, August 27-31, 2017 10.1145/3109859.3109961
- User Preferences for Hybrid Explanations. Proceedings of the Eleventh ACM Conference on Recommender Systems, RecSys 2017, Como, Italy, August 27-31, 2017 10.1145/3109859.3109915
- Gesture-based augmented reality annotation. 2017 IEEE Virtual Reality, VR 2017, Los Angeles, CA, USA, March 18-22, 2017 10.1109/VR.2017.7892383
- Automated Assistants to Identify and Prompt Action on Visual News Bias. CoRR Link
2016
- ACM IUI 2016 conference highlights. AI Matters 10.1145/2911172.2911183
- Effects of Information Availability on Command-and-Control Decision Making: Performance, Trust, and Situation Awareness. Human Factors 10.1177/0018720815619515
- Introduction to the Special Issue on Human Interaction with Artificial Advice Givers. TiiS 10.1145/3014432
- An analysis of student behavior in two massive open online courses. 2016 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining, ASONAM 2016, San Francisco, CA, USA, August 18-21, 2016 10.1109/ASONAM.2016.7752262
- First Steps towards a View Management Concept for Large-sized Head-up Displays with Continuous Depth. Proceedings of the 8th International Conference on Automotive User Interfaces and Interactive Vehicular Applications, AutomotiveUI 2016, Ann Arbor, MI, USA, October 24-26, 2016 10.1145/3003715.3005418
- RecSys'16 Joint Workshop on Interfaces and Human Decision Making for Recommender Systems. Proceedings of the 10th ACM Conference on Recommender Systems, Boston, MA, USA, September 15-19, 2016 10.1145/2959100.2959199
- A Cross-Cultural Analysis of Explanations for Product Reviews. Proceedings of the Joint Workshop on Interfaces and Human Decision Making for Recommender Systems co-located with ACM Conference on Recommender Systems (RecSys 2016), Boston, MA, USA, September 16, 2016. Link
- What am I not Seeing? An Interactive Approach to Social Content Discovery in Microblogs. Social Informatics - 8th International Conference, SocInfo 2016, Bellevue, WA, USA, November 11-14, 2016, Proceedings, Part II 10.1007/978-3-319-47874-6_20
- Moodplay: Interactive Mood-based Music Discovery and Recommendation. Proceedings of the 2016 Conference on User Modeling Adaptation and Personalization, UMAP 2016, Halifax, NS, Canada, July 13 - 17, 2016 10.1145/2930238.2930280
2015
- Believe it or Not? Analyzing Information Credibility in Microblogs. Proceedings of the 2015 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining, ASONAM 2015, Paris, France, August 25 - 28, 2015 10.1145/2808797.2809379
- The Full Story: Automatic detection of unique news content in Microblogs. Proceedings of the 2015 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining, ASONAM 2015, Paris, France, August 25 - 28, 2015 10.1145/2808797.2809317
- Hypothetical Recommendation: A Study of Interactive Profile Manipulation Behavior for Recommender Systems. Proceedings of the Twenty-Eighth International Florida Artificial Intelligence Research Society Conference, FLAIRS 2015, Hollywood, Florida. May 18-20, 2015. Link
- Getting the Message?: A Study of Explanation Interfaces for Microblog Data Analysis. Proceedings of the 20th International Conference on Intelligent User Interfaces, IUI 2015, Atlanta, GA, USA, March 29 - April 01, 2015 10.1145/2678025.2701406
- Joint Workshop on Interfaces and Human Decision Making for Recommender Systems (#IntRS). Proceedings of the 9th ACM Conference on Recommender Systems, RecSys 2015, Vienna, Austria, September 16-20, 2015 10.1145/2792838.2798714
- Inspection Mechanisms for Community-based Content Discovery in Microblogs. Proceedings of the Joint Workshop on Interfaces and Human Decision Making for Recommender Systems, IntRS 2015, co-located with ACM Conference on Recommender Systems (RecSys 2015), Vienna, Austria, September 19, 2015. Link
2014
- DUBMOD14 - International Workshop on Data-driven User Behavioral Modeling and Mining from Social Media. Proceedings of the 23rd ACM International Conference on Conference on Information and Knowledge Management, CIKM 2014, Shanghai, China, November 3-7, 2014 10.1145/2661829.2663538
- Finding true and credible information on Twitter. 17th International Conference on Information Fusion, FUSION 2014, Salamanca, Spain, July 7-10, 2014 Link
- Trust and Consequences: A Visual Perspective. Virtual, Augmented and Mixed Reality. Designing and Developing Virtual and Augmented Environments - 6th International Conference, VAMR 2014, Held as Part of HCI International 2014, Heraklion, Crete, Greece, June 22-27, 2014, Proceedings, Part I 10.1007/978-3-319-07458-0_20
- Dynamics of human trust in recommender systems. Eighth ACM Conference on Recommender Systems, RecSys '14, Foster City, Silicon Valley, CA, USA - October 06 - 10, 2014 10.1145/2645710.2645761
- RecSys'14 joint workshop on interfaces and human decision making for recommender systems. Eighth ACM Conference on Recommender Systems, RecSys '14, Foster City, Silicon Valley, CA, USA - October 06 - 10, 2014 10.1145/2645710.2645787
2013
- DUBMOD13: international workshop on data-driven user behavioral modelling and mining from social media. 22nd ACM International Conference on Information and Knowledge Management, CIKM'13, San Francisco, CA, USA, October 27 - November 1, 2013 10.1145/2505515.2505812
- LinkedVis: exploring social and semantic career recommendations. 18th International Conference on Intelligent User Interfaces, IUI 2013, Santa Monica, CA, USA, March 19-22, 2013 10.1145/2449396.2449412
- Interactive interfaces for complex network analysis: An information credibility perspective. 2013 IEEE International Conference on Pervasive Computing and Communications Workshops, PERCOM 2013 Workshops, San Diego, CA, USA, March 18-22, 2013 10.1109/PerComW.2013.6529542
- Understanding Information Credibility on Twitter. International Conference on Social Computing, SocialCom 2013, SocialCom/PASSAT/BigData/EconCom/BioMedCom 2013, Washington, DC, USA, 8-14 September, 2013 10.1109/SocialCom.2013.9
2012
- TopicNets: Visual Analysis of Large Text Corpora with Topic Modeling. ACM TIST 10.1145/2089094.2089099
- DUBMMSM'12: international workshop on data-driven user behavioral modeling and mining from social media. 21st ACM International Conference on Information and Knowledge Management, CIKM'12, Maui, HI, USA, October 29 - November 02, 2012 10.1145/2396761.2398751
- Modeling topic specific credibility on twitter. 17th International Conference on Intelligent User Interfaces, IUI 2012, Lisbon, Portugal, February 14-17, 2012 10.1145/2166966.2166998
- TasteWeights: a visual interactive hybrid recommender system. Sixth ACM Conference on Recommender Systems, RecSys '12, Dublin, Ireland, September 9-13, 2012 10.1145/2365952.2365964
- Inspectability and control in social recommenders. Sixth ACM Conference on Recommender Systems, RecSys '12, Dublin, Ireland, September 9-13, 2012 10.1145/2365952.2365966
- Credibility in Context: An Analysis of Feature Distributions in Twitter. 2012 International Conference on Privacy, Security, Risk and Trust, PASSAT 2012, and 2012 International Confernece on Social Computing, SocialCom 2012, Amsterdam, Netherlands, September 3-5, 2012 10.1109/SocialCom-PASSAT.2012.128
- An Analysis of Topical Proximity in the Twitter Social Graph. Social Informatics - 4th International Conference, SocInfo 2012, Lausanne, Switzerland, December 5-7, 2012. Proceedings 10.1007/978-3-642-35386-4_18
2011
- WiGipedia: A Tool for Improving Structured Data in Wikipedia. Proceedings of the 5th IEEE International Conference on Semantic Computing (ICSC 2011), Palo Alto, CA, USA, September 18-21, 2011 10.1109/ICSC.2011.8
2010
- SmallWorlds: Visualizing Social Recommendations. Comput. Graph. Forum 10.1111/j.1467-8659.2009.01679.x
2009
- A Visual Interface for Social Information Filtering. Proceedings of the 12th IEEE International Conference on Computational Science and Engineering, CSE 2009, Vancouver, BC, Canada, August 29-31, 2009 10.1109/CSE.2009.26
- WiGis: A Framework for Scalable Web-Based Interactive Graph Visualizations. Graph Drawing, 17th International Symposium, GD 2009, Chicago, IL, USA, September 22-25, 2009. Revised Papers 10.1007/978-3-642-11805-0_13
- Capturing Trust in Social Web Applications. Computing with Social Trust 10.1007/978-1-84800-356-9_9
2008
- PeerChooser: visual interactive recommendation. Proceedings of the 2008 Conference on Human Factors in Computing Systems, CHI 2008, 2008, Florence, Italy, April 5-10, 2008 10.1145/1357054.1357222
2007
- Extracting and Visualizing Trust Relationships from Online Auction Feedback Comments. IJCAI 2007, Proceedings of the 20th International Joint Conference on Artificial Intelligence, Hyderabad, India, January 6-12, 2007 Link
2006
- Mining Trust Values from Recommendation Errors. International Journal on Artificial Intelligence Tools 10.1142/S0218213006003053
- Is trust robust?: an analysis of trust-based recommendation. Proceedings of the 11th International Conference on Intelligent User Interfaces, IUI 2006, Sydney, Australia, January 29 - February 1, 2006 10.1145/1111449.1111476
- Personalizing Trust in Online Auctions. STAIRS 2006 - Proceedings of the Third Starting AI Researchers' Symposium, Riva del Garda, Trentino, Italy, 2006 Link
2005
- Eliciting Trust Values from Recommendation Errors. Proceedings of the Eighteenth International Florida Artificial Intelligence Research Society Conference, Clearwater Beach, Florida, USA Link
- Trust No One: Evaluating Trust-based Filtering for Recommenders. IJCAI-05, Proceedings of the Nineteenth International Joint Conference on Artificial Intelligence, Edinburgh, Scotland, UK, July 30 - August 5, 2005 Link
- Trust in recommender systems. Proceedings of the 10th International Conference on Intelligent User Interfaces, IUI 2005, San Diego, California, USA, January 10-13, 2005 10.1145/1040830.1040870
2004
- Evaluating Information Filtering Techniques in an Adaptive Recommender System. Adaptive Hypermedia and Adaptive Web-Based Systems, Third International Conference, AH 2004, Eindhoven, The Netherlands, August 23-26, 2004, Proceedings 10.1007/978-3-540-27780-4_40
- A Framework for Evaluation of Information Filtering Techniques in an Adaptive Recommender System. Computational Linguistics and Intelligent Text Processing, 5th International Conference, CICLing 2004, Seoul, Korea, February 15-21, 2004, Proceedings 10.1007/978-3-540-24630-5_62
- Adaptive recommendation: putting the best foot forward. Proceedings of the Intenational Symposium on Information and Communication Technologies, Las Vegas, Nevada, USA, June 16-18, 2004 10.1145/1071509.1071531
2003
2002
Copyright 2017, John O'Donovan.


Welcome to Build-a-Bear-Pizza!
Fisrt things first. How big a pizza do you want?
6" Personal Pizza.
10" pizza for two.
14" "party" pizza.
Build Your Ultimate Pizza
Build it from the ground up
Type of Dough
Classic Dough $1
Gluten-Free Dough $4
San Francisco Sourdough $2.50
Type of Sauce
Classic Marinara Sauce $2
Garlic White Sauce $3
Sunflower Seed Pesto $4.50
Toppings!
Cheese $2
Pepperoni $3
Pineapple $2.50
Canadian Bacon $2
Garlic White Sauce $3
Bell Peppers $2.50
Mushrooms $2
Onions $3
Sausage $2.50
Place Your Order!
Build Your Ultimate Pizza
Build it from the ground up
Type of Dough
Classic Dough $2
Gluten-Free Dough $5
San Francisco Sourdough $3.50
Type of Sauce
Classic Marinara Sauce $3
Garlic White Sauce $4
Sunflower Seed Pesto $5.50
Toppings!
Cheese $3
Pepperoni $4
Pineapple $5.50
Canadian Bacon $3
Garlic White Sauce $4
Bell Peppers $3.50
Mushrooms $3
Onions $4
Sausage $3.50
Place Your Order!
Build Your Ultimate Pizza
Build it from the ground up
Type of Dough
Classic Dough $3
Gluten-Free Dough $6
San Francisco Sourdough $4.50
Type of Sauce
Classic Marinara Sauce $4
Garlic White Sauce $5
Sunflower Seed Pesto $6.50
Toppings!
Cheese $4
Pepperoni $5
Pineapple $4.50
Canadian Bacon $4
Garlic White Sauce $5
Bell Peppers $4.50
Mushrooms $4
Onions $5
Sausage $4.50
Place Your Order!


Package com.google.logging.type
Interface HttpRequestOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
- All Known Implementing Classes:
HttpRequest
,HttpRequest.Builder
public interface HttpRequestOrBuilder
extends com.google.protobuf.MessageOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionlong
The number of HTTP response bytes inserted into cache.boolean
Whether or not an entity was served from cache (with or without validation).boolean
Whether or not a cache lookup was attempted.boolean
Whether or not the response was validated with the origin server before being served from cache.The request processing latency on the server, from the time the request was received until the response was sent.The request processing latency on the server, from the time the request was received until the response was sent.Protocol used for the request.com.google.protobuf.ByteString
Protocol used for the request.The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).com.google.protobuf.ByteString
The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).The IP address (IPv4 or IPv6) of the client that issued the HTTP request.com.google.protobuf.ByteString
The IP address (IPv4 or IPv6) of the client that issued the HTTP request.The request method.com.google.protobuf.ByteString
The request method.long
The size of the HTTP request message in bytes, including the request headers and the request body.The scheme (http, https), the host name, the path and the query portion of the URL that was requested.com.google.protobuf.ByteString
The scheme (http, https), the host name, the path and the query portion of the URL that was requested.long
The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.The IP address (IPv4 or IPv6) of the origin server that the request was sent to.com.google.protobuf.ByteString
The IP address (IPv4 or IPv6) of the origin server that the request was sent to.int
The response code indicating the status of response.The user agent sent by the client.com.google.protobuf.ByteString
The user agent sent by the client.boolean
The request processing latency on the server, from the time the request was received until the response was sent.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
isInitialized
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getRequestMethod
String getRequestMethod()The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
string request_method = 1;
- Returns:
- The requestMethod.
-
getRequestMethodBytes
com.google.protobuf.ByteString getRequestMethodBytes()The request method. Examples: `"GET"`, `"HEAD"`, `"PUT"`, `"POST"`.
string request_method = 1;
- Returns:
- The bytes for requestMethod.
-
getRequestUrl
String getRequestUrl()The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: `"http://example.com/some/info?color=red"`.
string request_url = 2;
- Returns:
- The requestUrl.
-
getRequestUrlBytes
com.google.protobuf.ByteString getRequestUrlBytes()The scheme (http, https), the host name, the path and the query portion of the URL that was requested. Example: `"http://example.com/some/info?color=red"`.
string request_url = 2;
- Returns:
- The bytes for requestUrl.
-
getRequestSize
long getRequestSize()The size of the HTTP request message in bytes, including the request headers and the request body.
int64 request_size = 3;
- Returns:
- The requestSize.
-
getStatus
int getStatus()The response code indicating the status of response. Examples: 200, 404.
int32 status = 4;
- Returns:
- The status.
-
getResponseSize
long getResponseSize()The size of the HTTP response message sent back to the client, in bytes, including the response headers and the response body.
int64 response_size = 5;
- Returns:
- The responseSize.
-
getUserAgent
String getUserAgent()The user agent sent by the client. Example: `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`.
string user_agent = 6;
- Returns:
- The userAgent.
-
getUserAgentBytes
com.google.protobuf.ByteString getUserAgentBytes()The user agent sent by the client. Example: `"Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)"`.
string user_agent = 6;
- Returns:
- The bytes for userAgent.
-
getRemoteIp
String getRemoteIp()The IP address (IPv4 or IPv6) of the client that issued the HTTP request. This field can include port information. Examples: `"<IP_ADDRESS>"`, `"<IP_ADDRESS>:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
string remote_ip = 7;
- Returns:
- The remoteIp.
-
getRemoteIpBytes
com.google.protobuf.ByteString getRemoteIpBytes()The IP address (IPv4 or IPv6) of the client that issued the HTTP request. This field can include port information. Examples: `"<IP_ADDRESS>"`, `"<IP_ADDRESS>:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
string remote_ip = 7;
- Returns:
- The bytes for remoteIp.
-
getServerIp
String getServerIp()The IP address (IPv4 or IPv6) of the origin server that the request was sent to. This field can include port information. Examples: `"<IP_ADDRESS>"`, `"<IP_ADDRESS>:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
string server_ip = 13;
- Returns:
- The serverIp.
-
getServerIpBytes
com.google.protobuf.ByteString getServerIpBytes()The IP address (IPv4 or IPv6) of the origin server that the request was sent to. This field can include port information. Examples: `"<IP_ADDRESS>"`, `"<IP_ADDRESS>:80"`, `"FE80::0202:B3FF:FE1E:8329"`.
string server_ip = 13;
- Returns:
- The bytes for serverIp.
-
getReferer
String getReferer()The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
string referer = 8;
- Returns:
- The referer.
-
getRefererBytes
com.google.protobuf.ByteString getRefererBytes()The referer URL of the request, as defined in [HTTP/1.1 Header Field Definitions](http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html).
string referer = 8;
- Returns:
- The bytes for referer.
-
hasLatency
boolean hasLatency()The request processing latency on the server, from the time the request was received until the response was sent.
.google.protobuf.Duration latency = 14;
- Returns:
- Whether the latency field is set.
-
getLatency
Duration getLatency()The request processing latency on the server, from the time the request was received until the response was sent.
.google.protobuf.Duration latency = 14;
- Returns:
- The latency.
-
getLatencyOrBuilder
DurationOrBuilder getLatencyOrBuilder()The request processing latency on the server, from the time the request was received until the response was sent.
.google.protobuf.Duration latency = 14;
-
getCacheLookup
boolean getCacheLookup()Whether or not a cache lookup was attempted.
bool cache_lookup = 11;
- Returns:
- The cacheLookup.
-
getCacheHit
boolean getCacheHit()Whether or not an entity was served from cache (with or without validation).
bool cache_hit = 9;
- Returns:
- The cacheHit.
-
getCacheValidatedWithOriginServer
boolean getCacheValidatedWithOriginServer()Whether or not the response was validated with the origin server before being served from cache. This field is only meaningful if `cache_hit` is True.
bool cache_validated_with_origin_server = 10;
- Returns:
- The cacheValidatedWithOriginServer.
-
getCacheFillBytes
long getCacheFillBytes()The number of HTTP response bytes inserted into cache. Set only when a cache fill was attempted.
int64 cache_fill_bytes = 12;
- Returns:
- The cacheFillBytes.
-
getProtocol
String getProtocol()Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
string protocol = 15;
- Returns:
- The protocol.
-
getProtocolBytes
com.google.protobuf.ByteString getProtocolBytes()Protocol used for the request. Examples: "HTTP/1.1", "HTTP/2", "websocket"
string protocol = 15;
- Returns:
- The bytes for protocol.
-


02. Getting Started with MetaMask
# Getting Started with MetaMask
The first tool we will go over is MetaMark. Metamask allows the users on a website to do actions using their own wallets without providing their private keys for us to do actions on their behalf. It also gives users more transparency on what transactions are being made based on their interaction with the website.
Let's see how we can use Metamask to improve user experience of the star notary webpage.
We'll also explore with Elena how smart contracts have helped change the developer ecosystem.
C4L3 02 SC Getting Started With Metamask (Slower)
## Resources
# Code
Summary of code changes made to the index.html
file:
- Allow Metamask to inject its own web3.js object
- Modify function claimButtonClicked() to replace the logic of setting a default account by asking the web3 object what accounts are available and take the top one
<!DOCTYPE html>

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Star Notary</title>
<link rel="stylesheet" type="text/css" href="style.css">

Star Notary

Star Name:

Star Owner:

<button id="claim-button" onclick="claimButtonClicked()">Claim Star</button>


Register Plugins¶
If you want to extend Pygments without hacking the sources, but want to use the lexer/formatter/style/filter lookup functions (lexers.get_lexer_by_name et al.), you can use setuptools entrypoints to add new lexers, formatters or styles as if they were in the Pygments core.
That means you can use your highlighter modules with the pygmentize script, which relies on the mentioned functions.
Entrypoints¶
Here is a list of setuptools entrypoints that Pygments understands:
pygments.lexers
This entrypoint is used for adding new lexers to the Pygments core. The name of the entrypoint values doesn’t really matter, Pygments extracts required metadata from the class definition:
[pygments.lexers] yourlexer = yourmodule:YourLexerNote that you have to define
name
,aliases
andfilename
attributes so that you can use the highlighter from the command line:class YourLexer(...): name = 'Name Of Your Lexer' aliases = ['alias'] filenames = ['*.ext']
pygments.formatters
You can use this entrypoint to add new formatters to Pygments. The name of an entrypoint item is the name of the formatter. If you prefix the name with a slash it’s used as a filename pattern:
[pygments.formatters] yourformatter = yourmodule:YourFormatter /.ext = yourmodule:YourFormatter
pygments.styles
To add a new style you can use this entrypoint. The name of the entrypoint is the name of the style:
[pygments.styles] yourstyle = yourmodule:YourStyle
pygments.filters
Use this entrypoint to register a new filter. The name of the entrypoint is the name of the filter:
[pygments.filters] yourfilter = yourmodule:YourFilter
How To Use Entrypoints¶
This documentation doesn’t explain how to use those entrypoints because this is covered in the setuptools documentation. That page should cover everything you need to write a plugin.
Extending The Core¶
If you have written a Pygments plugin that is open source, please inform us about that. There is a high chance that we’ll add it to the Pygments distribution.