Please note that it is impossible to alter a function's parameter list using Patchwork.
Usage
This section has not yet been updated for the backwards-compatible changes that appeared with version 1.3.0.
Redefinition interface |
Patchwork exposes two functions for redefining functions and methods: Patchwork\replace(callable $original, callable $redefinition) Patchwork\replaceLater(callable $original, callable $redefinition) |
|---|
|
The only difference between these two functions is that replace will throw an exception if requested to redefine a function that is not yet defined. replaceLater, on the other hand, will silently put off the redefinition to the point when the original definition occurs. However, when there is no need for such behavior, we suggest using replace, since it will make sure that you have specified the original function's name correctly, which is especially relevant with heavily namespaced code. |
replace vs. replaceLater |
|---|
Specifying the redefinition |
replace and replaceLater will accept any valid PHP callback as the redefinition. It is convenient to use anonymous functions for this purpose: Patchwork\replace('File::exists', function($name) { return $name === 'index.php'; }); |
|
|---|
|
The reference to the original function or method is also accepted in the form of a PHP callback: Patchwork\replace('Foo\babble', $redefinition); Patchwork\replace('Foo\Bar::baz', $redefinition); References of the form [$object, $method] are also accepted. The way such references are interpreted is explained in the section “Restricting redefinitions to a specific object”. |
Specifying the original function |
|---|
Redefining inherited methods |
A valid PHP callback, such as Foo\Bar::baz, might sometimes refer to a method that has no “physical” definition of its own, but instead inherits it from a parent class or a trait. The result that Patchwork produces when asked to redefine such a method is equivalent to inserting the redefinition as a new definition of the method into the class, overriding the inherited one. This kind of behavior can be thought as akin to runkit_method_add. However, it is impossible to make Patchwork\replace “insert” a method that is not already defined by any of the class's ancestors. |
|---|
|
This will undo all redefinitions that are currently in effect or are scheduled to come into effect in the future: Patchwork\undoAll(); The following, where $handle is the return value of a call to replace or replaceLater, will, on the other hand, undo or unschedule only a single redefinition: Patchwork\undo($handle); |
Undoing redefinitions |
|---|
Passing the call to the original definition |
By calling Patchwork\pass, a redefinition can request to be immediately terminated, and let the original definition dispatch the call instead: Patchwork\replace('Cache::store', function($key) { # Print some debugging output echo "Writing an item with the key '$key' to cache"; # Let the original definition perform the caching Patchwork\pass(); }); This can be used to attach “pre-filters” to functions and methods, which might prove useful in some debugging tasks. However, a much more important use for this is crafting redefinitions that only handle specific argument sets, letting the original redefinition respond to the rest: Patchwork\replace('File::exists', function($name) { if ($name === 'inexistent.php') { return false; } Patchwork\pass(); }); |
|---|
|
In PHP versions 5.4.0 and up, anonymous functions used as instance method redefinitions can refer to the method's object by $this: Patchwork\replace('Post::save', function() use (&$savedPostIds) { $savedPostIds[] = $this->id; }); Alternatively, the top call's object can be obtained by calling Patchwork\Stack\top('object'): Patchwork\replace('Foo\Bar::baz', function() { assert(Patchwork\Stack\top('object') === $this); }); |
Accessing the called method's object |
|---|
Restricting redefinitions to a specific object |
By selectively passing the call to the original definition, it is possible to limit a redefinition to a specific object: Patchwork\replace('Request::getMethod') use ($instance) { if ($this !== $instance) { Patchwork\pass(); } return 'GET'; } }); To avoid this kind of boilerplate code, Patchwork provides an intuitive shortcut for this: Patchwork\replace([$instance, $method], $redefinition); |
|---|
|
Quite inconveniently, the self, parent and static keywords and get_called_class inside method redefinitions do not work as they would inside the original definition's class. To circumvent this, full class names can be used instead of self and parent, and a special function, Patchwork\Stack\topCalledClass(), can be used as a replacement for get_called_class and static. |
Referring to a redefined method's class |
|---|


Class app\helpers\ExportHelper
| Inheritance | app\helpers\ExportHelper |
|---|
ExportHelper export file excel xlsx
Public Methods
| Method | Description | Defined By |
|---|---|---|
| clearOutputBuffers() | Clean buffer before export | app\helpers\ExportHelper |
| columnName() | Returns an excel column name. | app\helpers\ExportHelper |
| destroyPHPExcel() | Distroy PHPExcel after export | app\helpers\ExportHelper |
| downloadFile() | Allow download file | app\helpers\ExportHelper |
| export() | Export file | app\helpers\ExportHelper |
| renderRow() | Render rows data | app\helpers\ExportHelper |
| setHeader() | Set header row | app\helpers\ExportHelper |
Method Details
Clean buffer before export
| public static void clearOutputBuffers ( ) |
Returns an excel column name.
| public static string columnName ( $index ) | ||
| $index | integer | The column index number |
Distroy PHPExcel after export
| public static void destroyPHPExcel ( \PHPExcel $objPHPExcel, \PHPExcel_Writer_Excel2007 $objWriter ) | ||
| $objPHPExcel | \PHPExcel | |
| $objWriter | \PHPExcel_Writer_Excel2007 |
Allow download file
| public static boolean downloadFile ( $filePath, $remove = true ) | ||
| $filePath | ||
| $remove | boolean |
Export file
| public static void export ( \PHPExcel $objPHPExcel, $fileName, $extension = 'xlsx', $encoding = 'utf-8' ) | ||
| $objPHPExcel | \PHPExcel | |
| $fileName | \app\helpers\type | |
| $extension | \app\helpers\type | |
| $encoding | \app\helpers\type |
Render rows data
| public static void renderRow ( \PHPExcel_Worksheet $objPHPExcelSheet, array $rows, $beginRow = 1 ) | ||
| $objPHPExcelSheet | \PHPExcel_Worksheet | |
| $rows | array | |
| $beginRow | \app\helpers\type |
Set header row
| public static void setHeader ( \PHPExcel_Worksheet $objPHPExcelSheet, array $headers, $beginRow = 1 ) | ||
| $objPHPExcelSheet | \PHPExcel_Worksheet | |
| $headers | array | |
| $beginRow | \app\helpers\type |


{% extends "main.html" %} {% block content %}
At the beginning of the month (should a contest be ran), a theme will be posted on the front page, as well as listed on the awards page. At this point, users have one week to submit items relating to this theme. At the end of the month, the highest rated item submitted will be the winner and receive a prize.
The winner of the contest will be given a prize. The standard prize will be one hat. However, in some cases a different prize may be used. The prize will be posted on the front page with the topic at the start of the month.
Upon winning the contest I will send you a friend request so that I can open a trade request with you. Prizes are NOT given via giftwrap. (That costs money!) Please try to be able to receive the trade in a timely manner. In the event that you either do not wish to claim the prize or want it to be given to a different account, get in touch with me via the winning account so I know what to do with the prize.
Lastly my Steam profile can be found: here.


Last Week in ManageIQ: Armor like Tenfold Regions Hashes
Two improved pull requests for Elven-kings under the sky,
Three fixed for Dwarf-lords in their halls of stone,
Two new for Mortal Men, doomed to die,
One deleted for the Dark Lord on his dark throne
In the land of ManageIQ where the heisenbugs lie.
One blog post to rule them all, One blog post to find them,
One blog post to bring them all and in the darkness bind them.
In the land of ManageIQ where the heisenbugs lie.
This is a story of the PRs that were merged this week. (Featured)
There were 82 pull requests merged last week! Even the smallest person can change the course of the future. We are looking for people to share in this adventure!
Uprooting the evil in the fields that we know. (Improved)
Exciting news from the world of :ems_azure
! Bronagh has added an :additional_regions
hash. Coming soon: that hash will be read and the regions added to those in the supported Azure regions file.
The UI now sees the correct IDs of ui_properties nodes when a blueprint is published, thanks to Jillian.
They that break a thing to find out what it is have left the path of wisdom (but can return)! (Fixed)
An incorrect image in the Compare table has been fixed by Zita!
Harpreet has fixed the edit hash of the Ae Schema Editor to set keys as strings rather than symbols.
Laura has fixed an issue where the submission of a custom dialog should redirect to the request list only if a request was created.
Go back? … No good at all! Go sideways? Impossible! Go forward? Only thing to do! On we go! (New)
Provider plugins can carry their own automate domains now, thanks to Brandon.
Keenan has introduced automatic purging of the report results table, preventing a huge use of resources.
Back to the abyss! (Deleted)
We have several renditions of the :title
property used to update buttons when they are disabled, and so a lot of those methods have been consolidated into the base method of #calculate_properties, thanks to Attila.
No, the journey doesn’t end here! (Wrapping up)
Pull requests are not less valiant because they are here unpraised. Check out the full list, and, be bold, but wary! Keep up your merry hearts, and ride to meet your fortune!


Pizza Grub is among the leading best Pizza places as voted by the public.
At Pizza Grub our number one concern is the health of our customers, followed closely by the Deliciousness!of each and every pizza we put out
We are located at Juja, Nairobi and we also do deliveries at a fee!
Pizza Grub is the place to be :
Order your Deliciousness now!!
Click to order pizza!
Pizzas that have an extra special touch!
| Name | Size | Crust | Topping | Total |
|---|---|---|---|---|
Delivery will cost ksh. 250
Fill in the details for the delivery
Location
Juja City Mall | Thika Road
0000,Juja
Customer Care
<EMAIL_ADDRESS>Phone: +254792833436


Newest Commentary (6/20/2016)
Feasibility of Preventable Readmission Rate as a Quality Measure
By: Christine Soong, MD, MSc
Measuring Patient Safety Events: Opportunities and Challenges
By: Amy K. Rosen, PhD, Qi Chen, MD, PhD
Measurement of Diagnostic Errors Is a Key First Step to Their Reduction
By: Hardeep Singh, MD, MPH
Developing and Implementing Quality Measures for Multiple Chronic Conditions
By: Elizabeth A. Bayliss, MD, MPH
Challenges and Opportunities for Improving Quality of Care and Outcomes for Lupus
By: Jinoos Yazdany, MD, MPH
Clinician Responses to Using Patient-Reported Outcome Measures for Quality Improvement
By: Maria B. Boyce, John P. Browne, PhD
Making Clinical Diagnoses: How Measureable Is the Process?
By: Robert El-Kareh, MD, MPH
Prospects for Comparing Hospital Performance Internationally on the Basis of Quality and Safety
By: Susan Burnett
Not Just Little Adults: Considerations for Quality Measures of Child Health Care
By: Jean Raphael, MD, MPH, Matthew Sadof, MD, Christopher Stille, MD, MPH, Sara Toomey, MD, David Keller, MD
Not Just Little Adults: Policies to Support Medical Home Transformation in Pediatric Practice
By: David Keller, MD, Sara Toomey, MD, Jean Raphael, MD, MPH, Matthew Sadof, MD, Christopher Stille, MD, MPH
Medication Administration Errors in Hospitals — Challenges and Recommendations for Their Measurement
By: Monsey McLeod, MPharm, MSc, PhD, Nick Barber, BPharm, PhD, Bryony Dean Franklin, BPharm, PhD
By: Ethan Basch, MD, MSc, Albert Wu, MD, MPH, Carol M. Moinpour, PhD, Maria-Jose Santana, PhD, Andrea Pusic, MD, Claire Snyder, PhD, Hwee-Lin Wee, PhD, Jose M. Valderas, MD, PhD, MPH, Bryce B. Reeve, PhD
By: Chris Graham, Nanne Bos, PhD Student
NGC and NQMC Survey Responses Generate Enhancement and Growth
By: The National Guideline Clearinghouse and National Quality Measures Clearinghouse Teams
The Joint Commission's Asthma Care Measure Set: How Does It Measure Up?
By: Shilpa J. Patel, MD, Lora Bergert, MD, Christopher A. Longhurst, MD, MS, Paul J. Sharek, MD, MPH
Treat the System, Not the Error: Patient Safety in 2013
By: Sumant Ranji, MD
Importance of Quality Metrics for Providing High Quality Melanoma Care
By: Karl Y. Bilimoria, MD, MS
Eliminating Hospital Re-admissions: "No Hospital Left Behind"?
By: R. Neal Axon, MD, MSCR, Mark V. Williams, MD
Quality Measures: Patient-Reported Outcomes for Quality Improvement of Clinical Practice
By: Kathleen N. Lohr, PhD
Advancing the Quality of Pancreatic Cancer Care
By: Karl Y. Bilimoria, MD, MS
By: NQMC/NGC Editorial Board: Richard C. Hermann, MD, MS (co-chair), Paul G. Shekelle, MD, MPH, PhD (co-chair), Ethan Balk, MD, MPH, JiWon Jane S. Jue, MD, MSc, Jerod M. Loeb, PhD, Kathleen N. Lohr, PhD, and Eric C. Schneider, MD, MSc
Value of the National Databases: It All Depends on How We Use Them
By: Hiroto Ito, PhD
By: Donald Addington, MBBS, MRCPsych, FRCPC
Home Is Where the Laboratory Is: The PCMH as a Laboratory for Performance Measure Development
By: Asaf Bitton, MD, MPH, FACP and Eric C. Schneider, MD, MSc, FACP
Introduction to Lean and Six Sigma Approaches to Quality Improvement
By: Justin Glasgow, MS
Improving Ambulatory Quality of Care — Lessons from Pay-for-Performance
By: Sukyung Chung, PhD and Harold S Luft, PhD
By: Stephen J. Gillam, MD FRCP FRCGP
By: NGC/NQMC Editorial Board: Richard C. Hermann, MD, MS (co-chair), Paul G. Shekelle, MD, MPH, PhD (co-chair), Ethan Balk, MD, MPH, Jerod M. Loeb, PhD, Kathleen N. Lohr, PhD, Mark J. Monteforte, MD, Eric C. Schneider, MD, MSc, and Robert Wachter, MD
Surmounting the Challenges of Measuring and Improving Quality in Ambulatory Care
By: David Nyweide, PhD
Focus on Accessibility Results in Improved Function and Content for NQMC and NGC
By: Elizabeth Willingham, Lisa T. Haskell, Vivian H. Coates, and Mary P. Nix
Interoperable Electronic Health Records and Quality of Care
By: Lisa M. Kern, MD, MPH and Rainu Kaushal, MD, MPH
An Integrated Approach to Developing Health Care Guidelines and Measures
By: Cally Vinz, RN, Joann Foreman, RN, and Kathy Cummings, RN
New Directions for Health Care Information Technology
By: William W. Stead, MD and Herbert S. Lin, PhD
A Selection of Statistical Process Control Tools Used in Monitoring Health Care Performance
By: Stephen Schmaltz, PhD
Envisioning the Next Generation of Performance Measures for Ambulatory Care
By: Stephen D. Persell, MD, MPH
National Quality Measurement Systems for Assessment of Nursing Home Care
By: Ning Jackie Zhang, MD, PhD
On Quality Measurement, Babies, and Bathwater
By: Robert M. Wachter, MD
By: Jed Weissberg, MD
Why Are There No Efficiency Measures in the National Quality Measures Clearinghouse?
By: Peter S. Hussey, PhD and Elizabeth A. McGlynn, PhD
User Perspectives: An Overview of the Clearinghouse Survey Results
By: The National Guideline and National Quality Measures Clearinghouse Management Team
Evaluating Evidence in the Development of Performance Measures
By: Rebecca A. Kresowik, BLS and Timothy F. Kresowik, MD
Hospital Process Measures: Only One Piece of the Quality Improvement Puzzle
By: Rachel M. Werner, MD, PhD
Accessing Clinical Information to Enrich Performance Measurement: The Wisconsin Experience
By: Christopher Queram, MA
Composite Measures: Matching the Method to the Purpose
By: Michael Shwartz, PhD and Arlene S. Ash, PhD
Importance of Patient-Reported Outcomes for Quality Improvement
By: Darren A. DeWalt, MD, MPH and Dennis A. Revicki, PhD
Assessing the Quality of Mental Health Care in Low- and Middle-Income Countries
By: Jodi Morris, PhD and Shekhar Saxena, MD
The Public Reporting of Performance Data: An Intervention in Need of More Evaluation
By: Constance H. Fung, MD, MSHS
Broadening the Quality Measurement Landscape: The Importance of Competence
By: Eric S. Holmboe, MD
The American Heart Association's "Get With The Guidelines" Program: Key Findings and Lessons Learned
By: Gregg C. Fonarow, MD
Wanted: Delivery System-Level Performance Measures
By: Thomas H. Lee, MD
Is the Measurement Mandate Diverting the Patient Safety Revolution?
By: Robert M. Wachter, MD
By: NQMC Editorial Staff


An init function and/or a deinit function can be declared by
foreign_resource/2
. If this is the case, these functions should
have the prototype:
void
FunctionName (int when)
The init function is called by load_foreign_resource/1
after the resource has been loaded and the interfaced predicates
have been installed. If the init function fails (using
SP_fail()
) or raises an exception (using
SP_raise_exception()
), the failure or exception is propagated by
load_foreign_resource/1
and the foreign resource is
unloaded (without calling any deinit function). However, using
SP_fail()
is not recommended, and operations that may require
SP_raise_exception()
are probably better done in an init
function that is called explicitly after the foreign resource has
been loaded.
The deinit function is called by unload_foreign_resource/1
before the interfaced predicates have been uninstalled and the
resource has been unloaded. If the deinit function fails or
raises an exception, the failure or exception is propagated by
unload_foreign_resource/1
, but the foreign resource is
still unloaded.
However, neither SP_fail()
nor SP_raise_exception()
should
be called in a deinit function.
Complex deinitialization should be done in an explicitly
called deinit function instead.
The init and deinit functions may use the C-interface to call Prolog etc.
Foreign resources are unloaded
when the saved-state is restored; see Saving.
Foreign resources are also unloaded when
exiting Prolog execution. The parameter when
reflects the context
of the (un)load_foreign_resource/1
and is set as follows for
init functions:
SP_WHEN_EXPLICIT
load_foreign_resource/1
.
SP_WHEN_RESTORE
For deinit functions:
SP_WHEN_EXPLICIT
unload_foreign_resource/1
or a call to
load_foreign_resource/1
with the name of an already loaded resource.
SP_WHEN_EXIT


public class VehicleManager extends Service implements DataPipeline.Operator
get(Class)
method. Asynchronous measurements are
obtained by defining a Measurement.Listener or VehicleMessage.Listener object
and passing it to the service via the addListener method.
There are three major components in the VehicleManager:
VehicleDataSource
,
VehicleDataSink
and
VehicleInterface
.
The instance of a VehicleInterface
is perhaps the
most important. This represents the actual physical connection to the
vehicle, and is bi-directional - it can both provide data to an
application and send data back to the vehicle. In most cases,
this should not be instantiated by applications; the
setVehicleInterface(Class, String)
method takes enough metadata for
the remote VehicleService
to instantiate the
interface in a remote process. That way a single USB or
Bluetooth connection can be shared among many applications.
The VehicleManager also supports custom user-defined data sources, which can
be controlled with addSource(VehicleDataSource)
and
removeSource(VehicleDataSource)
methods. Even though data sources are
instantiated by the application, their data is still shared among all OpenXC
applications using the same remove process VehicleService
In addition to applications registered to receive updates as a Measurement
or VehicleMessage listener, the VehicleManager supports custom data sinks (e.g.
FileRecorderSink
) that be controlled with the
addSink(VehicleDataSink)
and removeSink(VehicleDataSink)
methods.
When a message is received from a
VehicleDataSource
, it is passed to every active
VehicleDataSink
. There will always be at
least one sink that stores the latest messages and handles passing on data to
users of this service.| Modifier and Type | Class and Description |
|---|---|
class |
VehicleManager.VehicleBinder
Binder to connect IBinder in a ServiceConnection with the VehicleManager.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
VEHICLE_LOCATION_PROVIDER |
| Constructor and Description |
|---|
VehicleManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
addListener(java.lang.Class<? extends Measurement> measurementType,
Measurement.Listener listener)
Register to receive asynchronous updates for a specific Measurement type.
|
void |
addListener(java.lang.Class<? extends VehicleMessage> messageType,
VehicleMessage.Listener listener)
Register to receive asynchronous updates for a specific VehicleMessage
type.
|
void |
addListener(KeyedMessage keyedMessage,
VehicleMessage.Listener listener)
Register to receive a callback when a message with same key as the given
KeyedMessage is received.
|
void |
addListener(KeyMatcher matcher,
VehicleMessage.Listener listener)
Register to receive a callback when a message with key matching the given
KeyMatcher is received.
|
void |
addListener(MessageKey key,
VehicleMessage.Listener listener)
Register to receive a callback when a message with the given key is
received.
|
void |
addOnVehicleInterfaceConnectedListener(ViConnectionListener listener)
Register a listener to receive a callback when the selected VI is
connected.
|
void |
addSink(VehicleDataSink sink)
Add a new data sink to the vehicle service.
|
void |
addSource(VehicleDataSource source)
Add a new data source to the vehicle service.
|
Measurement |
get(java.lang.Class<? extends Measurement> measurementType)
Retrieve the most current value of a measurement.
|
VehicleMessage |
get(MessageKey key)
Retrieve the most current value of a keyed message.
|
VehicleInterfaceDescriptor |
getActiveVehicleInterface()
Returns a descriptor of the active vehicle interface.
|
int |
getMessageCount()
Read the number of messages received by the vehicle service.
|
java.lang.String |
getVehicleInterfaceDeviceId()
Query for the unique device ID of the active VI.
|
java.lang.String |
getVehicleInterfaceVersion()
Query for the firmware version of the active VI.
|
boolean |
isViConnected()
Return the connection status of the selected VI.
|
IBinder |
onBind(Intent intent) |
void |
onCreate() |
void |
onDestroy() |
void |
onPipelineActivated() |
void |
onPipelineDeactivated() |
boolean |
onUnbind(Intent intent) |
void |
removeListener(java.lang.Class<? extends Measurement> measurementType,
Measurement.Listener listener)
Unregister a previously registered Measurement.Listener instance.
|
void |
removeListener(java.lang.Class<? extends VehicleMessage> messageType,
VehicleMessage.Listener listener)
Unregister a previously registered message type listener.
|
void |
removeListener(KeyedMessage message,
VehicleMessage.Listener listener)
Unregister a previously registered keyed message listener.
|
void |
removeListener(KeyMatcher matcher,
VehicleMessage.Listener listener)
Unregister a previously registered key matcher listener.
|
void |
removeListener(MessageKey key,
VehicleMessage.Listener listener)
Unregister a previously registered key listener.
|
void |
removeSink(VehicleDataSink sink)
Remove a previously registered sink from the data pipeline.
|
void |
removeSource(VehicleDataSource source)
Remove a previously registered source from the data pipeline.
|
VehicleMessage |
request(KeyedMessage message)
Send a message to the VehicleInterface and wait up to 2 seconds to
receive a response.
|
void |
request(KeyedMessage message,
VehicleMessage.Listener listener)
Send a message to the VehicleInterface and register the given listener to
receive the first response matching the message's key.
|
java.lang.String |
requestCommandMessage(Command.CommandType type)
Send a command request to the vehicle that does not require any metadata.
|
boolean |
send(Measurement message)
Convert a Measurement to a SimpleVehicleMessage and send it through the
active VehicleInterface.
|
boolean |
send(VehicleMessage message)
Send a message to the vehicle through the active
VehicleInterface without waiting for
a response. |
void |
setBluetoothPollingStatus(boolean enabled)
Control whether polling is used to connect to a Bluetooth device or not.
|
void |
setNativeGpsStatus(boolean enabled)
Control whether the device's built-in GPS is used to provide location.
|
void |
setVehicleInterface(java.lang.Class<? extends VehicleInterface> vehicleInterfaceType)
Change the active vehicle interface to a new type using its default
resource identifier.
|
void |
setVehicleInterface(java.lang.Class<? extends VehicleInterface> vehicleInterfaceType,
java.lang.String resource)
Change the active vehicle interface to a new type using the given
resource.
|
java.lang.String |
toString() |
void |
waitUntilBound()
Block until the VehicleManager is alive and can return measurements.
|
public static final java.lang.String VEHICLE_LOCATION_PROVIDER
public void onCreate()
public void onDestroy()
public IBinder onBind(Intent intent)
public boolean onUnbind(Intent intent)
public void waitUntilBound()
public Measurement get(java.lang.Class<? extends Measurement> measurementType) throws UnrecognizedMeasurementTypeException, NoValueException
measurementType
- The class of the requested Measurement
(e.g. VehicleSpeed.class)UnrecognizedMeasurementTypeException
- if passed a measurementType
that does not extend MeasurementNoValueException
- if no value has yet been received for this
measurementTypeBaseMeasurement
public VehicleMessage get(MessageKey key) throws NoValueException
measurementType
- The class of the requested Measurement
(e.g. VehicleSpeed.class)NoValueException
- if no value has yet been received for this
measurementTypeBaseMeasurement
public boolean send(VehicleMessage message)
VehicleInterface
without waiting for
a response.message
- The desired message to send to the vehicle.public boolean send(Measurement message)
message
- The desired message to send to the vehicle.public void request(KeyedMessage message, VehicleMessage.Listener listener)
message
- The desired message to send to the vehicle.listener
- The message listener that should receive a callback when
a response matching the outgoing message's key is received from the
VI.public VehicleMessage request(KeyedMessage message)
public void addListener(java.lang.Class<? extends Measurement> measurementType, Measurement.Listener listener)
measurementType
- The class of the Measurement
(e.g. VehicleSpeed.class) the listener was listening forlistener
- An listener instance to receive the callback.public void addListener(java.lang.Class<? extends VehicleMessage> messageType, VehicleMessage.Listener listener)
messageType
- The class of the VehicleMessage
(e.g. SimpleVehicleMessage.class) the listener is listening forlistener
- An listener instance to receive the callback.public void addListener(KeyedMessage keyedMessage, VehicleMessage.Listener listener)
keyedMessage
- A message with the key you want to receive updates
for - the response to a command typically has the same key as the
request, so you can use the outgoing message's KeyedMessage to
register to receive a response.listener
- An listener instance to receive the callback.public void addListener(MessageKey key, VehicleMessage.Listener listener)
key
- The key you want to receive updates.listener
- An listener instance to receive the callback.public void addListener(KeyMatcher matcher, VehicleMessage.Listener listener)
matcher
- A KeyMatcher implement the desired filtering logic.listener
- An listener instance to receive the callback.public void removeListener(java.lang.Class<? extends Measurement> measurementType, Measurement.Listener listener)
measurementType
- The class of the requested Measurement
(e.g. VehicleSpeed.class)listener
- The listener to remove.public void removeListener(java.lang.Class<? extends VehicleMessage> messageType, VehicleMessage.Listener listener)
messageType
- The class of the VehicleMessage this listener was
registered to receive. A listener can be registered to receive
multiple message types, which is why this must be specified when
removing a listener.listener
- The listener to remove.public void removeListener(KeyedMessage message, VehicleMessage.Listener listener)
messageType
- The message with the key this listener was previously
registered to receive.listener
- The listener to remove.public void removeListener(KeyMatcher matcher, VehicleMessage.Listener listener)
messageType
- The KeyMatcher this listener was previously registered
to receive matches from.listener
- The listener to remove.public void removeListener(MessageKey key, VehicleMessage.Listener listener)
messageType
- The key this listener was previously registered to
receive updates on.listener
- The listener to remove.public void addSource(VehicleDataSource source)
source
- an instance of a VehicleDataSourcepublic void removeSource(VehicleDataSource source)
public void addSink(VehicleDataSink sink)
sink
- an instance of a VehicleDataSinkpublic void removeSink(VehicleDataSink sink)
public java.lang.String requestCommandMessage(Command.CommandType type)
type
- The command request type to send to the VI.public java.lang.String getVehicleInterfaceDeviceId()
public java.lang.String getVehicleInterfaceVersion()
public void addOnVehicleInterfaceConnectedListener(ViConnectionListener listener) throws VehicleServiceException
listener
- The listener that should receive the callback.VehicleServiceException
public void setVehicleInterface(java.lang.Class<? extends VehicleInterface> vehicleInterfaceType) throws VehicleServiceException
vehicleInterfaceType
- the VI type to activate or null to disable
all VIs.VehicleServiceException
public void setVehicleInterface(java.lang.Class<? extends VehicleInterface> vehicleInterfaceType, java.lang.String resource) throws VehicleServiceException
vehicleInterfaceType
- A class implementing VehicleInterface that is
included in the OpenXC libraryresource
- A descriptor or a resource necessary to initialize the
interface. See the specific implementation of VehicleService
to find the required format of this parameter.VehicleServiceException
public void setNativeGpsStatus(boolean enabled)
enabled
- True if GPS should be read from the Android device and
injected as vehicle data whenever a vehicle interface is connected.public void setBluetoothPollingStatus(boolean enabled)
enabled
- True if polling should be used to connect to a Bluetooth
device.public VehicleInterfaceDescriptor getActiveVehicleInterface()
public int getMessageCount() throws VehicleServiceException
VehicleServiceException
- if the listener is unable to be
unregistered with the library internals - an exceptional situation
that shouldn't occur.public boolean isViConnected()
public java.lang.String toString()
public void onPipelineActivated()
onPipelineActivated
in interface DataPipeline.Operator
public void onPipelineDeactivated()
onPipelineDeactivated
in interface DataPipeline.Operator


'The Player' (1992)
A retrospective movie review by Walter Frith
Member of the 'Internet Movie Critics Association' http://www.geocities.com/Hollywood/Studio/5713/index.html
I saw 'The Player' when it was first released in 1992 and I viewed it at a 2nd run art house (that's a term used to describe a movie theatre that shows films that don't make a lot of money), and I didn't hear one chuckle from the audience in a building that was more than half full for its first evening performance so it's puzzling to me how the film can be called a "black comedy" by numerous other critics that have reviewed it. Black comedies are usually highly uneven because the comedy is so sharp and penetrating that it has to let up at some point to prepare you for the next strike by pounding your funny bone with a hammer. When I think of the term "black comedy" and ironically it's another film that examines the movie industry, Blake Edwards' 1981 film 'S.O.B.' comes to mind. That film threw in everything but the kitchen sink in its slapstick presentation of Hollywood politics and manipulating, and Edwards put his own trademark silliness found in many of his 'Pink Panther' films into the film's key moments.
Director Robert Altman's films are like documentaries in many cases but they always retain the academic flare that rank right up there with the most studio oriented films that are produced. Altman is perhaps best at developing the themes of his pictures in a very even fashion and the climax of all his films aren't executed to detract from the enjoyment of any other part of the film.
'The Player' is the type of non-Hollywood movie that almost every celebrity wanted to be in. It features literally dozens and dozens of cameos by big stars that I'm sure had their share of nasty studio politics and decided to slap the movie industry in the face by appearing in this big winner of a movie. The film's cynicism is so well hidden by its main plot that it comes off not only as a smart film but one that plays its main characters better and in a more realistic fashion than almost any other film made in the 1990's, so far.
Having worked for many years at the corporate end of the entertainment industry, I can tell you without hesitation that the type of wheeling and dealing, back stabbing, decadent behaviour and day to day operations in the movie industry are complete and on target throughout the entire film and hit a truthful note in every frame.
In 'The Player', we are shown one of the most ingenious opening scenes ever filmed as a long tracking shot (about 8 minutes) pans across the lot of a movie studio as various characters interact. Tim Robbins stars as a movie studio boss who is receiving threatening post cards in his office that contain death threats and he is determined to find out who is sending them. He tracks down who he believes is the culprit stalking him with the threats and he may or may not be correct in his assumption.
Without telling you who does what to who (you can discover that when you see the film), the film contains an old fashioned murder plot that fits into the context of the movie's suspense and complex character study and its story doesn't sell itself out at the end but rather has an ending that you may not like on the surface but deeper thought will convince you it's the right one.
'The Player' received three Oscar nominations (Best Director for Altman, Best Screenplay for Michael Tolkin based on his own novel and Best Film Editing). Understandably, it didn't get a nomination for Best Picture in a year that featured 'The Crying Game', 'A Few Good Men', 'Howard's End', 'Scent of a Woman', and the winner, 'Unforgiven' as the selected finalists. There was no way the Hollywood crowd was going to nominate a film mocking their industry and perhaps become the representative (if it won) of an award that is suppose to sugar coat the film industry, not show its darker side.
Visit FILM FOLLOW-UP by Walter Frith http://home.netinc.ca/~wfrith/movies.htm
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


Clearing WiFi SSID and Password...
Disconecting WiFi...
Rebooting Device...
After reboot the Device should connect to a new Wifi. Controls will be available through routers LAN assigned IP address


{% extends 'layout.html' %} {% block main %}
ACC is a pet project with the purpose of improving my knowledge of three topics. The C language, compilers and the ARM assembly. I think this is a good exercise to go deep into both topics.
The ACC is a LALR(1) parser, that means it is a Look-Ahead Left-to-Right parser.
The current Grammar of the ACC is the following:
S -> int main "(" ")" "{" E "}"
E -> return I;
| if "(" B ")" "{" E "}"
| if "(" B ")" "{" E "}" else "{" E "}"
I -> [0-9]+
B -> I < I
| I <= I
| I == I
| I >= I
| I > I
| ! B
| "(" B ")"
C code:
Assembly generated:


Pick you spring-style clothing. Don't forget your summer jacket.
Most people dont like weather like this. If you don't.. Stay home, Work, Learn. If you do.. get outside and let the wind blow of ...


Click on the switch above
All
Pending
Complete
Current mode is
All
Pending
Complete
Todos:
Implement visibility:none
Complete
Fix DDM
Complete
memcpy -> memcpy_s
Pending
CSS perspective
Pending
Warning: not all records are presented!


RoboSwiffer is a robotic swiffer developed using Bluetooth communication, ultrasonic sensors and limit switches to map rooms and avoid obstacles. The project was completed for the 1A end of term design
symposium. I was the lead software developer and in charge of the majority of the testing and debugging. The robot was built with two NXT bricks, a laser cut and 3D printed frame.
We used PID feedback for consistent motor values and proper heading. The robot used sensor feedback to map the room and self generate a path.
Path generation was complicated given the platform and sensors that we had to work with. The algorithm that I ended up writing involved taking the perimeter of the room using the touch sensors, and then dividing
that into travelable segments. The code proceeded to constantly check for an unexpected touch sensor press (ie. an obstacle). The robot would then pivot its ultrasonic sensor around to map the dimensions of an obstacle and proceed to avoid it, and then return to its initially devised path.
This video showed the RoboSwiffer taking the perimeter of the room and then proceeding to follow its first path, all the while skirting the box.
Project members: Seamus Johnston, Jiwoo Jang, Richard Li.
Completed December 2015
RoBoat
A Wifi TeleOperated Motor Boat
The RoBoat is a ROS operated motorboat. The software package I designed lets you control the rotation of the prop and the motor speed with the keyboard. It also lets you visualize gyro data in
RVIZ, as well as displaying ultrasonic sensor data as a cone. The Arduino code prints the gyro data and ultrasonic data through serial for the package to read and
then display in RVIZ. This was very interesting to code as previous Arduino-to-ROS programs rely on the rosserial library. I started having issues with the
library when declaring a node on the Arduino and it used half the board's dynamic memory, which impacted the reliability of the sensor data. I did a lot of research and edited an existing
package to allow for a direct serial communication between the Arduino and ROS, allowing the node to be declared on the computer instead. This increased the reliability of the sensor data.
This alternative method reduced the Arduino Uno's dynamic memory usage by 50%. I was the sole software developer for this project.
These screenshots show the visualization of the gyro and ultrasonic data as I rotate the Arduino.
This video was taken while I used my keyboard to control the prop and motor speeds. It shows the inner working of the boat's gear and servo systems.
This video showed the boat with the full prop setup. It was taken while I manipulated motor values with the keyboard. During the video I moved the Arduino around to show
how the orientation changed in the visualizer. It also showed the ultrasonic cone as I moved that sensor closer and farther away from the wall.
Project members: Seamus Johnston, Jiwoo Jang, Richard Li.
Walker
Robotics Research Assistant
I was responsible for the ROS development of an intelligent walker for the elderly. The goal of the walker was
to be able to guide a person to a destination and avoid obstacles. The software was designed to read intent from the person's
grip on the handles and determine a goal based on where they were trying to go. The walker would then plan a path to the destination
accounting for obstacles and turn radius etc. Research and programming were focused on Kinect V2 based Vision systems, and Ackermann
drivetrain based path planning and steering algorithms. I also machined a handle, and support while additionally designing a preliminary walker model using SolidWorks.
I used SLAM to create real time maps with Kinect V2 for mapping using Gmapping and RTabMap. The maps were then processed for obstacles and used to provide visual odometry.
I worked with Neural Networks and object recognition to identify objects, as well as recognize desirable goals and set those as goals in the path planner.
I created the ROS package from scratch; it contained a URDF for Gazebo and RVIZ built from STLs exported from SolidWorks, as well as relevant control packages for wheels.
I also wrote Arduino Code to use a Bluetooth mobile app to control the simulation, as well as code to take measurements from strain sensors on the handles and relate them to motor speeds.
Co-op Winter 2016
Tigercat Industries
Software Developer
My Co-op was split between embedded work, and software development.
For the embedded half, I designed, prototyped, programmed and built a case for a power module tester.
The forestry machines we worked with are installed with a Power Management Module that controls the Telematics unit's state.
In order to ensure that this unit was not defective, I was tasked with developing a tester for it.
The tester applies different voltages to different pins on the Power Module, and reads its responses.
Based off of 4 pre-programmed test cases, the tester lights up its four BiColour LEDs differently.
The case was 3D printed and designed in SolidWorks, while the schematic and PCB design were done in KiCAD. The code was run from an Arduino Nano.
The buttons controlled the tests' start, while the Boost and Step Down converters were used to change the 12V input into 3.3V
for the Arduino and 26V for the Power Module. Consequently the relay was used to control the 26V supply.
The BiColour LEDs were charlieplexed to reduce the number of used IO pins. The LEDs were then turned on and off every 2 milliseconds
(run from an interrupt), based on the value of a stored byte (corresponding to the results of the test cases).
The other half of my work was on the Manufacturing Preparatory Application for the Telematics Modules. These modules were received
with default firmware on them, but needed to be loaded with custom Tigercat Firmware and machine specific information. This application was used in-house
and only by shop floor workers. I designed the application with the help of another student, to make it as user-friendly and easy for the workers. The installation
process for these devices was quite complicated and took about 30 minutes to finish once started. I designed methods for data transfer via SSH, remote/automated
interactions with the Telematics Database, decrypting encrypted files, and accessing different REST APIs.
As well as completing that application, I designed a separate, more advanced version for use in the field. Machines with outdated firmware were proving unresponsive
to remote updates, so I designed a "one-click" application that ran based on pre-loaded information. This was necessary because the company's database was unavailable abroad.
Since the outdated firmware had so many bugs, I coded the portable prep app to handle every possible thing that could go wrong, which involved writing workarounds for many specific issues.
This turned into an unbelievably effective and robust piece of software for updating firmware and repairing broken machines.
Co-op Fall 2016
UW Sailbot
Co-Founder and Controls Lead
I helped found the team in May 2016 because I hated that I didn't have time to sail anymore in university due to how demanding my program is. The creation of this team helped me link
my two favourite things: sailing and robotics. The team has around 15 core members, and 30 additional students that help occasionally. Our first competition was in June 2017,
at the International Robotics Sailing Regatta. We came 2nd in Canada, 1st out of all rookie teams and 6th overall (out of 11). The above boat was our first competition vessel, named Lil Yachty.
For 2018 we designed a 2m long monohull with a 1.5m keel, as pictured below. Its control system is completely autonomous, featuring buoy recognition up to 15m away, and a fully functioning point to point navigator I wrote.
The navigator is written to optimize the boat's velocity in the direction of the target, and will thus choose an optimal path regardless of wind shifts, and wind direction. The navigator also utilizes ROS actions and services
to preform pre written maneuvers such as layline navigation and tacking. I also created a path planner that is responsible for feeding waypoints into the navigator. This design allows us to configure the path
planner for different challenges (long distance navigation, collision avoidance, station keeping), without changing the navigator. Currently the autonomous navigation challenge,the long distance challenge,
and the station keeping challenge are written, with the search challenge mostly complete. The boat came 4th overall (out of 7), and unfortunately a lot of the autonomous functionality of the boat was not able to
be tested due to a lot of electrical and mechanical issues.
With an increasingly complicated control system and lack of testing time (due to ice and cold waters), a simulator was developed to be able to test our navigation capabilities. The simulator interfaces with the ROS
topics published with winch and rudder values, and then preforms some physics calculations to determine the boats next position (pixel -> gps). This position and orientation is published, which the path planner/navigator
receiver as they would a real position. This allows us to test this code as if the boat was actually sailing. It can also simulate the box for the station
keeping challenge and well as different obstacles and routes for other challenges, and is extremely useful for stress testing of different navigation methods by changing wind speed/direction and other environmental changes.
Additionally the simulator can be used as a visualizer for live data or for saved data from real test sessions, in order to replay and capture strange behavior.
This team has allowed me to grow as a leader and understand how to delegate and manage a group of people in order to successfully raise money, recruit and compete with a fully functional boat. Designing an entire autonomous
software system from scratch has helped me learn a lot about how to make design decisions and how best to create systems that are easy to modify or build on in the future.
You can read an article the University of Waterloo wrote about us
here
, and watch the following video showing our 2018 competition vessel sailing through a tack.
May 2016 - September 2019
2G Robotics
Robotics Engineering Intern
During my co-op I worked on both image rectification and light distribution correction. First: Image Leveling. As you can see above, I devised an algorithm to aid in the correction of
vignetting in underwater images taken by our underwater camera. This was done using a linear approximation of the light distribution and OpenCV. It was not extremely accurate due to this
linear approximation of the distribution. To make this algorithm more robust and useful, I decided to create a simulator to get the exact light distribution given the orientation and
position of the underwater LEDs.
The steps for this algorithm were as follow:
1. Use camera pinhole effect to project each of the camera's pixels onto the seabed. Use this to get the position of each pixel and its distance to the camera.
2. Use ray tracing techniques to determine the intensity of a specific point on the seaplane. This will be done by drawing back a vector to the LED, calculating
that vectors angle, and using the candela distribution find its intensity. Distance of the point to the LED must also be output.
3. Using the information from Step 1 and Step 2, figure out the intensity of each pixel knowing each pixel's position on the seabed, the distance the light travels
to the plane, and the distance the pixel is from the camera. The position of the pixel will then be fed into the algorithm for Step 1, which will determine that point’s intensity.
This step will output a map of intensities per pixel.
Another simulator was also written for a panel of LEDs that had one big cylindrical viewport. This had to follow a different method because of refraction through the viewport. A MonteCarlo
simulator was designed to handle this problem, and worked by projecting billions of rays randomly (biased to the distribution of the LED intensity curve). These rays were then summed on the seafloor
and assigned to the nearest camera pixel.
The simulator was meant generate the light distribution based on the position of 48 LEDs but the entire reason it was designed was to create a more even light distribution on the seafloor, so that
image rectification would not even be needed. This simulator let us move around the LEDs until we could find the best possible distribution. Above are the before and after results, please note that
the photos are scaled so that all the intensities are mapped between 0-255, meaning that a black pixel does not mean that no light reaches that pixel, just that it is the darkest. The metrics for the final
panel are MAX: 91.9699 MIN: 36.037 AVERAGE: 67.6048.
Co-op Spring 2017
Trexo Robotics
Robotics Software Developer
During my co-op, I wrote a ROS control loop plugin for Gazebo, using a custom URDF designed for optimal traction in simulation.
The simulator helped test gait patterns and different ROS controllers for the device. Using this simulator helped uncover issues related to lag between commanded and actuated motor velocities.
This led to the complete redesign of the ROS control loop. I rewrote the control loop to use the ROS RTT integration, in order to be realtime safe. Using a realtime Ubuntu patch, this code can run at 1000+ Hz.
My main project for my co-op term was redesigning the gait planner. The gait was adjustable to accommodate children with certain restrictions (those whose hips/knees cannot extend past x degrees),
compensated for changes in leg thigh and calf length, and was made to be speed adjustable through an android app. The new planner is able to generate continuous gait cycles, for either of the legs, or both simultaneously.
It does so by constantly generating ideal velocity and position commands for all 4 joints. This lead to a much smoother and more accurate gait cycle, and was a huge improvement over the 8 point fixed gait trajectory that was previously used.
Something that stuck with me at the end of this coop term was talking to a parent at the end of the session and asking how his son was doing at home. After the redesign of the gait he
remarked that on the way home his son (normally walking with pencil straight legs) raised his knee to take a step. This allowed me to realize the full scope of this project, as well
as the profound impact redesign of a control system and gait planner can have on a child’s life.
Co-op Winter 2018
NVIDIA - Autonomous Vehicles
Vehicle Dynamic Controls Engineering Intern
My co-op term at NVIDIA helped me to grow a lot as an aspiring controls engineer. I worked on an acceleration
filter to help the control system get measurements that had as little noise as possible. I analyzed and implemented many different methods
including low-pass filters, complementary filters, Kalman filters, and non-linear observers.
While I worked there, I also analyzed the control loops to ensure optimal performance, and designed a control loop latency monitor,
to help alert the health module if actuation commands were not being executed as expected.
Co-op Fall 2018
Kitty Hawk - Cora
Flight Controls Engineer
My co-op term at Kitty Hawk was one of my favourites. It gave me the experience to work on a
eVTOL aircraft, with the leaders in the industry. It exposed me to multivariable controls for 6DOF systems,
and the robust design and testing procedures required for aircraft control systems. I got to work on variety of projects during
my time there. These projects included working on the preflight checks that the plane runs, adding fan failures and edge cases
to the non-linear trim optimizer in MATLAB, working on optimizing the deceleration trajectory generation and analyzing/modelling
motor thermal characteristics.
Co-op Summer 2019
Search and Rescue Robot - MTE 380
Software Lead
The term project for MTE 380 was the design of a search and rescue robot capable of the following functions:
extinguishing a fire, finding lego people/buildings and finding a magnet hidden under sand. In groups of 5
we had to design a robot to perform these functions while being able to traverse a 2mx2m grid. The grid was split into
multiple tiles with different terrains: sand, rocks, wood, or a valley. A valley was just a wood tile lower than the rest
so the robot had to climb back out. Our group focuses on being able to find a magnet under the sand and extinguish the fire (candle)
seeing as we only had 2 months to build and test the robot. I was responsible for all the sensor drivers, as well as the
control loops to run the motors and the localization stack to help the robot determine where it was in the course. In order
to find the candle and magnet, the course had to be scanned with an IR sensor, and then each of the sand tiles had to be visited
in sequence to determine which one had the magnet.
Most of the robots primary functions were accomplished with a driveToTile() function,
which heavily relied on the robot knowing where it was, and the corresponding localization stack. The following flowchart shows the
localization stack, mostly dependant on wheel odometry and ultrasonic measurements of the sides of the course.
The stack was relatively effective and allowed for reasonable accuracy driving from tile to tile.
The following video shows the results of the PI controller I designed for the robots heading control system. It used the outputs of the
onboard IMU to determine its heading and then actuated the motor accordingly to correct itself.
Finally, the following video shows the successful completion of two objectives on the actual demo course.
Project members: Seamus Johnston, Jiwoo Jang, Richard Li, Eric Gemnay, Bryan Matzko.


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


top
|
up
|
prev
|
next
SpanMapper Abstract Class
Definition at line
20
of
Clone.hpp
Member Functions
Span
MapSpan
(
const
Span
& span,
const
boost::uuids::uuid& rootModuleId)
pure virtual
Member Function Details
MapSpan Member Function
Span
sngcm::ast::SpanMapper::MapSpan(
const
Span
& span,
const
boost::uuids::uuid& rootModuleId)
pure virtual
Definition at line
24
of
Clone.hpp
Called by:
sngcm::ast::CloneContext::MapSpan
top
|
up
|
prev
|
next


  If both are specified, the prior takes precedence. {% endblocktrans %}
{% endblock %}


This is a basic static site.
Ujjwal Kant
Roll-1906048
Types of Version Control System:
- Distributed Version Control
- Centralized Version Control
- Distributed Version Control
Github Commands:
- git push
- Push changes to remote repository (remembered branch)
- git pull
- Update local repository to the newest commit
- git push origin --delete [branch name]
- Delete a remote branch


This Colombian island lies midway between Costa Rica and Jamaica. It is connected to the smaller Santa Catalina Island by a 100 metre footbridge. With a long history of pirates and hidden treasure, it's no surprise this is Colombia's major scuba destination.
A scenic and friendly island, Providencia is convenient for a break on passage to/from Panama. Although a district of Columbia, it lies about 135NM east of the coast of Nicaragua and about 500nm from mainland Colombia.
Note: There is a significant datum offset (more than 200 metres) for both Navionics and C-Map electronic charting. This applies to Low Cay, north of Providencia and to Providencia Island itself. It may also apply to San Andres Island and to the Albuquerque Cays.
There are several channels leading into the port of Catalina. The primary channel is marked with six buoys and starts with the deep water buoy. Entering the harbour is straight forward.
The tourist office is very helpful and they have copies of a "Cruising Guide to Colombia", which is well worth asking for because it contains reduced colour copies of the major charts for all of the Colombian coastline.
Position 13° 22'48"N, 81° 22'19"W (Catalina)
Full details on the formalities required for clearing into and out of Colombia can be found at Colombia Formalities.
For a list of agents see Clearance Agents.
Remember, an agent is required to clear into and out of Colombia, so no attempt at contacting the Port Captain should be made, except through your nominated clearing agent (Agencia Maritima) on arrival.
Clearance formalities must be completed even if coming from mainland Colombia. Visas are not required, nor issued.
It is likely Mr Bush (contact Bernardo, VHF ch.16) will be your appointed agent. He will arrange clearance formalities, however it could well take a few days for everything to be completed with several trips ashore required to visit his office with paperwork. His fee is $80 plus $30 a passport for a tourist card (2013).
If you're lucky he will respond to your VHF call and arrange to meet you at the dinghy dock. Otherwise, dinghy ashore, turn right at the dinghy dock and left at the only road junction in town, walk 400 metres up the road past the supermarkets and you'll see a general store on the right with a sign for Bush Agencies on the first floor. Mr Bush owns the store and his office is in his apartment above the store. It's all very relaxed and everyone knows Mr Bush.
Last updated August 2013.
Low Cay - at the north end of the reef to the north of Providencia, makes a good night time anchorage if you arrive after dark from the north and don't want to attempt the approach to Providencia.
Providencia Island (Catalina) - has a buoyed approach. The main channel into the anchorage is well buoyed and well lit and so possible to enter safely at night.
Be careful not to anchor in the channel as it is used day and night by freighters. Watch out for the reef in the middle of the bay about 350 metres south of Santa Catalina island. (Remember the big chart offset.) Anchor south of Santa Catalina island. The anchorage is sand and turtle grass with most yachts anchoring in 6 to 12 feet of water. This is a quiet and protected anchorage as long as there is not a big swell from the North.
There is a good dinghy dock located just north of the concrete commercial wharf. Make sure you have a stern anchor with you so that your dinghy doesn't get swept under the dock.
Last updated August 2013.


You can edit notification settings for this application
We use local storage to speed up performance throughout the application.
If you're not seeing one of those in a dropdown, it may be because our cached versions are too old.
Refreshing caches...
Deleting the application only removes the associated metadata around the application. It will not delete any security groups, load balancers, or pipeline configurations you may have created.
You cannot delete this application because it has server groups.


A brand-new JavaScript file for repeating an HTML element's background image in a centered half-drop pattern, like that thing (1, 2, 3) from that movie. Each pattern is customizable through JSON data attributes, with properties based off CSS naming standards.

figure { background: url('wes1.jpg') }

"src" : "",
String of the image's URL
(If not given, CSS URL will be used)
"snap" : false,
Changes width of image
to create a whole number
of columns, only respecting
one min/max property
"minWidth" : 0, "maxWidth" : "100%", "width" : 0, "minHeight" : 0, "maxHeight" : "100%", "height" : 0
Can be a number or string
ending in 'px' or '%'

_halfdrop
_halfdrop.update()
When a data-halfdrop element resizes, it's background needs to update
window.onresize = _halfdrop.update;
_halfdrop.init()
Run this function after an element is added or removed
_halfdrop.defaultValues
The exposed object's properties can be modified, which may reduce overall markup in some situations
If it's modified after DOMContentLoaded, run _halfdrop.init()


calcSubType.Rd
Assign ship subtype according to the vessel's ship type and size, based on the requested methodology.
calcSubType( shipType, DWT, GT, TEU, nPassengers = NULL, method = "imo", inputTableLocation = NULL )
| shipType | Ship type (vector of strings) (see |
|---|---|
| DWT | Deadweight tonnage (metric tons) (vector of numericals) |
| GT | Gross tonnage (metric tons) (vector of numericals) |
| TEU | Twenty-foot equivalent units (TEUs) (vector of numericals) |
| nPassengers | Maximum number of passengers (vector of numericals. Note: only applicable when using the Starcrest method) |
| method | Select the methodology that should be used (i.e., which set of subtypes to return):
Note: this argument is not used if |
| inputTableLocation | File path (optional). Used to specify a user-supplied set of subtypes. If used, this is typically the same as the auxiliary and boiler load table so that correct loads are assigned. See details for formatting requirements. |
subType
(vector of strings)
When passing ship size data in the DWT
, GT
, TEU
, and
nPassengers
parameters, use NA
if the parameter is unknown or
not applicable (e.g., TEU doesn't apply for passenger vessels).
This function has two sets of ship subtypes available for use: IMO's subtypes or Starcrest's subtypes. Since ship subtypes are important for assigning default auxiliary and boiler engine assumptions, the methodology selected here should match with the methodology used for assigning auxiliary and boiler loads. The IMO subtypes are based on the Third GHG Study, and the Starcrest subtypes are based on the 2017 Port of Los Angeles Air Emissions Inventory.
If custom subtypes are desired, user-supplied subtypes could be specified
using the inputTableLocation
parameter. This file should be in .csv
format with five columns and a header row (additional columns are acceptable).
The headers should be:
"shipType"
"sizeMin"
"sizeMax"
"sizeUnits"
"subType"
Valid values for "sizeUnits" are:
"Deadweight"
"TEU"
"Gross_Tonnage"
"Number_of_Passengers"
sizeMin
is inclusive and sizeMax
is exclusive (i.e.,
subType
is matched where sizeMin
<= vessel size < sizeMax
).
See data(IMOGHG3_AuxLoadFactor)
or data(Starcres2016_AuxLoadFactor)
for an example of how this table can be structured.
For more information about ship subtypes, see Section 3.3.3 of the Port Emissions Inventory Guidance.
Note: IMO GHG 3 uses vehicle carrier subtypes which are based on number of vehicles. This information is frequently unavailable in vessel characteristics datasets. However, the auxiliary loads are assumed to be the same for all vehicle carriers regardless of size, so these number of vehicle subtypes are replaced by those used in the C3RIA.
Note: IMO GHG 3 uses cubic meters (m^3) for liquified gas tankers. This information is unavailable in vessel characteristics datasets, and it is unclear which ship parameter value was used to determine these values. Therefore, these vessel subtypes are defined by the same DWT bins as those used for chemical tankers.
International Maritime Organization. 2014. "Third IMO GHG study 2014 - Final report." London: International Maritime Organization.
calcSubType(shipType = c("reefer","bulk.carrier"), DWT = c(NA,56188.016), GT = c(NA,33511), TEU = c(NA,NA), nPassengers = NULL)#> subType #> 1: reefer #> 2: bulk.carrier.handymax


My name is Tina and I'm an aspiring web developer. I will be attending Dev Bootcamp in October in San Francisco!


Select tags you would like to add to this note.
If you hold the device like that we can't go on a safari :(
Please hold the device in landscape orientation!


Form is generated dynamically based on whatever item is passed to it. Fields are assigned a "field directive based on data type and validation parameters. New entries are assigned a range of fields based on item type (try switching between types when creating a new item).
Fields are edittable by clicking "edit" button. Validation rules prevent saving if errors. Tracks are re-orderable via drag & drop
{{key}}: ✔


 Congratulations! Here are two pieces of documentation that are hopefully helpful:
Creating a custom environment with PettingZoo should roughly look like the following:
from pettingzoo import AECEnv
from pettingzoo.utils import agent_selector
from gym import spaces
class env(AECEnv):
metadata = {'render.modes': ['human']} # only add if environment supports rendering
def __init__(self, arg1, arg2, ...):
super(env, self).__init__()
self.agents = [0, 1 ... n] # agent names
self.agent_order = # list of agent names in the order they act in a cycle. Usually this will be the same as the agents list.
self.observation_spaces = # dict of observation spaces for each agent, from gym.spaces
self.action_spaces = # dict of action spaces for each agent, from gym.spaces
self.rewards = {0:[first agent's reward], 1:[second agent's reward] ... n-1:[nth agent's reward]}
self.dones = {0:[first agent's done state], 1:[second agent's done state] ... n-1:[nth agent's done state]}
self.infos = {0:[first agent's info], 1:[second agent's info] ... n-1:[nth agent's info]}
# agent selection stuff
self._agent_selector = agent_selector(self.agent_order)
self.num_agents = len(self.agents)
# Initialize game stuff
def observe(self, agent):
# return observation of an agent
return observation
def step(self, action, observe=True):
# Do game stuff on the selected agent
# Switch selection to next agents
self.agent_selection = self._agent_selector.next()
if observe:
return self.observe(self.agent_selection)
else:
return
# last is added as a part of the AECEnv class, don't write it yourself
def reset(self, observe=True):
# reset environment
# selects the first agent
self._agent_selector.reinit(self.agent_order)
self.agent_selection = self._agent_selector.next()
if observe:
return self.observe(self.agent_selection)
else:
return
def render(self, mode='human'): # not all environments will support rendering
...
def close(self):
...
from pettingzoo.utils.agent_selector import agent_selector
The agent selector class (along with the agent_order list in your environment) provides all the functionality that you should need to cycle through different agents in your environment without having to write it yourself. It’s not part of the official API, but we highly encourage you to use it.
reset()
: Resets the agent selector object. It uses the agent_order
list that is already present in the object. Returns the first agent id of the order as the selected agent.
reinit(agent_order)
: If the agent order changes (for example, if a ‘Reverse’ card is played in Uno), reinitialize the agent selector object with the new agent_order
. Does not return anything.
next()
: Returns the id (say, x) of the next agent in the agent_order
. Auto-increments the internal agent counter so that next time next()
is called, id of the agent next to x in the order is returned.
is_last()
: Checks if the previous agent that was returned in the last agent in the agent_order
. Returns True if yes, False otherwise. Note this method serves little purpose if the agent_order
might change in the game.
Import this class into your environment as from pettingzoo.utils import agent_selector
at the top of the module.
Define an agent selector object in the env as self._agent_selector = self.agent_selector(self.agent_order)
.
In reset()
method of your env, do self.agent_selection = self._agent_selector.reset()
.
If you want to select the next agent, do self.agent_selection = self._agent_selector.next()
.
If the agent order ever changes, reinitialize the object as self._agent_selector.reinit(self.agent_order)
.
Finally, for a static agent order, you can check if the previous agent id that was output by the selector is the last agent in the order, by performing a truth value check on self._agent_selector.is_last()
.


Text copied/cut within Guacamole will appear here. Changes to the text below will affect the remote clipboard.
No input method is used. Keyboard input is accepted from a connected, physical keyboard.
Allow typing of text, and emulate keyboard events based on the typed text. This is necessary for devices such as mobile phones that lack a physical keyboard.
Display and accept input from the built-in Guacamole on-screen keyboard. The on-screen keyboard allows typing of key combinations that may otherwise be impossible (such as Ctrl-Alt-Del).
Determines how the remote mouse behaves with respect to touches.
Tap to click. The click occurs at the location of the touch.
Drag to move the mouse pointer and tap to click. The click occurs at the location of the pointer.


hyrious.log
最后更新于
友链
Taroxd
Momokoi
Invwindy
Ulysses
瞎写
{#each posts.slice(0, 5) as post}
{ post.title }
{/each}{#if posts.length > 10}
更多…
{/if}
{@const base = 'https://hyrious.me'}
- esbuild.repl
- Try esbuild online
- npm browser
- View npm package contents online
- tool
- Tiny tools which are quickly written in 10 minutes
- w7
- Preview static website with hot-refresh, route like GitHub
- marked-cli
- Preview markdown file with hot-reload, theme like GitHub
- blivec
- Bilibili Live Streaming Tools


My Dear Cookie
Cookie is another cute cat that exists on the web which sadly i can never meet
Cookie the Cat
Cookie is a cat i found on the internet. Pretty cute. Obigatory post.
For more Info
.


---
layout: post
title: First rough
date: '2015-12-31T18:30:46+01:00'
categories:
- Sketchbooks
- Storyboards
- Horses
picture_url: https://film-Storyboards.tumblr.com/post/136355734414/first-rough-for-an-Illustration-about-the-little
---
First rough for an Illustration about the Little Bighorn battle.


{% extends "narrow_base.html" %}
{% load bootstrap4 %}
{% block content %}
{% if next %}
{% if user.is_authenticated %}
Your account doesn't have access to this page. To proceed, please sign in with an account that has access.
{% else %}
Please sign in to see this page.
{% endif %}


This tutorial demonstrates the class tracking facility to profile and optimize a non-trivial program. SCons is a next-generation build system with a quite elaborate architecture and thus an interesting candidate for profiling attempts.
Before we begin, it should be identified what shall be tracked, i.e. what classes we want to connect to and whose instances are to be sized and profiled. In this tutorial, the effect of a patch is analyzed that tries to size-optimize the very heart of SCons - the Node class. Naturally, we will connect to the Node base class and its sub-classes. It makes sense to put the profiling data in context and track additional classes that are believed to contribute significantly to the total memory consumption.
The first step is to find the proper spots for connecting to the classes that shall be tracked, taking snapshots, and printing the gathered profile data. SCons has a simple memory profiling tool that we will override. The SCons MemStats class provides all we need:
from pympler.classtracker import ClassTracker
class MemStats(Stats):
def __init__(self):
Stats.__init__(self)
classes = [SCons.Node.Node, SCons.Node.FS.Base, SCons.Node.FS.File,
SCons.Node.FS.Dir, SCons.Executor.Executor]
self.tracker = ClassTracker()
for c in classes:
self.tracker.track_class(c)
def do_append(self, label):
self.tracker.create_snapshot(label)
def do_print(self):
stats = self.tracker.stats
stats.print_summary()
stats.dump_stats('pympler.stats')
When SCons starts, MemStats is instantiated and the ClassTracker is connected to a number of classes. SCons has predefined spots where it invokes its statistics facilities with do_append being called. This is where snapshosts will be taken of all objects tracked so far.
Because of the large number of instances, only a summary is printed to the console via stats.print_summary() and the profile data is dumped to a file in case per-instance profile information is needed later.
Time for a test. In the following examples, SCons builds a non-trivial program with a fair number of nodes. Running SCons via scons --debug=memory will print the gathered data to the console:
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date.
scons: done building targets.
---- SUMMARY ------------------------------------------------------------------
before reading SConscript files: active 4.17 MB average pct
SCons.Executor.Executor 7 7.53 KB 1.08 KB 0%
SCons.Node.FS.Base 1 9.30 KB 9.30 KB 0%
SCons.Node.FS.Dir 6 17.77 KB 2.96 KB 0%
SCons.Node.FS.File 1 2.91 KB 2.91 KB 0%
SCons.Node.Node 0 0 B 0 B 0%
after reading SConscript files: active 13.06 MB average pct
[...]
before building targets: active 13.41 MB average pct
[...]
after building targets: active 34.77 MB average pct
SCons.Executor.Executor 1311 3.57 MB 2.79 KB 10%
SCons.Node.FS.Base 1102 4.84 MB 4.50 KB 13%
SCons.Node.FS.Dir 108 5.67 MB 53.72 KB 16%
SCons.Node.FS.File 2302 10.45 MB 4.65 KB 30%
SCons.Node.Node 1 84.93 KB 84.93 KB 0%
-------------------------------------------------------------------------------
The console output may give a brief overview how much memory is allocated by instances of the individual tracked classes. A more appealing and well arranged representation of the data can be generated with the HtmlStats class. The dump generated previously can be loaded and a set of HTML pages can be emitted:
from pympler.classtracker_stats import HtmlStats
stats = HtmlStats()
stats.load_stats('pympler.stats')
stats.create_html('pympler.html')
If matplotlib is installed, charts will be embedded in the HTML output:
At first sight it might seem suspicious that the tracked classes appear to be the sole contributors to the total memory footprint of the application. Because the tracked objects are sized recursively, referenced objects which are not tracked themselves are added to the referrers account. Thus, a root object’s size will include the size of every leaf unless the leaf is also tracked by the ClassTracker.
After applying the patch by Jean Brouwers, SCons is rerun under the supervision of the ClassTracker. The differences in the last snapshot show that the changes indeed reduce the memory footprint of Node instances:
$ scons --debug=memory
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date.
scons: done building targets.
---- SUMMARY ------------------------------------------------------------------
[...]
after building targets: active 32.41 MB average pct
SCons.Executor.Executor 1311 3.50 MB 2.73 KB 10%
SCons.Node.FS.Base 1102 4.29 MB 3.98 KB 13%
SCons.Node.FS.Dir 108 5.52 MB 52.30 KB 17%
SCons.Node.FS.File 2302 8.82 MB 3.92 KB 27%
SCons.Node.Node 1 84.32 KB 84.32 KB 0%
-------------------------------------------------------------------------------
The total measured memory footprint dropped from 34.8MB to 32.4MB, File nodes’ average size from 4.6KB to 3.9KB.
This tutorial illustrated how applications can be profiled with the ClassTracker facility. It has been shown how the memory impact of changes can be quantified.