PIZZA LOCA
Please fill your order below
Sizes
----
Crusts
-----
Toppings
----
Number of Pizzas
Delivery
Yes
No
Enter delivery address:
Total Price
ORDER
CHECKOUT
Here's your order:
Size
Crust
Toppings
Quantity
Total
THE CLOSEST THING TO BEAUTY
PRODUCTS IS THE GREASE ON THE
PIZZA FROM PIZZA LOCA.
GOOD FOOD.GOOD CONVERSATIONS.
CONNECT WITH PIZZA LOCA BY DIALLING: 305-678-908


Tenant Utility
Social Connections
Marketplace
My Profile
Explore
Best Of
Interest Groups
Running
Yoga
Got A Five Star Review? Tell Your Fellow Tenants.
Post Your Favorite Gym, Restaurant, Coffee Place, Happy Hour, Or Caterer
Add
Best Of
Restaurants
Gym
Coffee Place
Happy Hour
Caterer
Islands Fine Burgers And Drinks
44344 W Gotham Ave, San Francisco, CA 94582
American Cuisine
(15)
Islands Fine Burgers And Drinks
44344 W Gotham Ave, San Francisco, CA 94582
American Cuisine
(15)
Islands Fine Burgers And Drinks
44344 W Gotham Ave, San Francisco, CA 94582
American Cuisine
(15)


{{receipt.billInfo.date}}
{{receipt.billInfo.totalWithCharges.amount | currency: receipt.billInfo.totalWithCharges.currency}}
{{receipt.billInfo.total.amount | currency: receipt.billInfo.total.currency}} sub-total
{{receipt.billInfo.totalCharges.amount | currency: receipt.billInfo.totalCharges.currency}} +{{receipt.billInfo.totalChargeRates | percent: '1.2-5'}} extra charges
{{receipt.billInfo.remarks}}
{{ billItem.priceWithCharges.amount | currency: billItem.priceWithCharges.currency }} payable
{{billItem.price.amount | currency: billItem.price.currency}} unit price
+{{receipt.billInfo.totalChargeRates | percent: '1.2-5'}} extra charges
-{{billItem.discount | percent: '1.2-5'}} discount


Home
About
Products
Blog
Contact
Contact us
Leverage agile frameworks to provide a robust synopsis for high level Lorem Ipsum overviews.
Your Name
E-mail
Subject
Content


if you get lost while building an app, it's because there are some tiny modules that don't exist yet and you should go and build them
— James Halliday (@substack) October 28, 2013
"All the nice, reusable components sublimate away onto github and npm where everybody can collaborate to advance the commons."


| Return type | Name and parameters |
|---|---|
boolean
|
any(Closure closure)
Iterates over the contents of an iterator, and checks whether a predicate is valid for at least one element. |
boolean
|
asBoolean()
Coerce an iterator instance to a boolean value. |
Map
|
collectEntries()
A variant of collectEntries for Iterators using the identity closure as the transform. |
Map
|
collectEntries(Closure transform)
A variant of collectEntries for Iterators. |
Map
|
collectEntries(Map collector)
A variant of collectEntries for Iterators using the identity closure as the transform and a supplied map as the destination of transformed entries. |
Map
|
collectEntries(Map collector, Closure transform)
A variant of collectEntries for Iterators using a supplied map as the destination of transformed entries. |
List
|
collectMany(Closure projection)
Projects each item from a source iterator to a collection and concatenates (flattens) the resulting collections into a single list. |
Number
|
count(Closure closure)
Counts the number of occurrences which satisfy the given closure from the items within this Iterator. |
Number
|
count(Object value)
Counts the number of occurrences of the given value from the items within this Iterator. |
Map
|
countBy(Closure closure)
Sorts all iterator items into groups determined by the supplied mapping closure and counts the group size. |
Iterator
|
drop(int num)
Drops the given number of elements from the head of this iterator if they are available. |
Iterator
|
dropRight(int num)
Drops the given number of elements from the tail of this Iterator. |
Iterator
|
dropWhile(Closure condition)
Creates an Iterator that returns a suffix of the elements from an original Iterator. |
Iterator
|
each(Closure closure)
Iterates through an Iterator, passing each item to the given closure. |
Iterator
|
eachWithIndex(Closure closure)
Iterates through an iterator type, passing each item and the item's index (a counter starting at zero) to the given closure. |
boolean
|
every(Closure closure)
Used to determine if the given predicate closure is valid (i.e. |
Object
|
getAt(int idx)
Support the subscript operator for an Iterator. |
Iterator
|
indexed()
Zips an iterator with indices in (index, value) order. |
Iterator
|
indexed(int offset)
Zips an iterator with indices in (index, value) order. |
Iterator
|
init()
Returns an Iterator containing all of the items from this iterator except the last one. |
Object
|
inject(Object initialValue, Closure closure)
Iterates through the given Iterator, passing in the initial value to the closure along with the first item. |
Iterator
|
iterator()
An identity function for iterators, supporting 'duck-typing' when trying to get an iterator for each object within a collection, some of which may already be iterators. |
String
|
join(String separator)
Concatenates the toString() representation of each
item from the iterator, with the given String as a separator between
each item.
|
Object
|
max()
Adds max() method to Iterator objects. |
Object
|
max(Closure closure)
Selects the maximum value found from the Iterator using the closure to determine the correct ordering. |
Object
|
max(Comparator comparator)
Selects the maximum value found from the Iterator using the given comparator. |
Object
|
min()
Adds min() method to Iterator objects. |
Object
|
min(Closure closure)
Selects the minimum value found from the Iterator using the closure to determine the correct ordering. |
Object
|
min(Comparator comparator)
Selects the minimum value found from the Iterator using the given comparator. |
Iterator
|
reverse()
Reverses the iterator. |
int
|
size()
Provide the standard Groovy size() method for Iterator .
|
Iterator
|
sort()
Sorts the given iterator items into a sorted iterator. |
Iterator
|
sort(Closure closure)
Sorts the given iterator items into a sorted iterator using the Closure to determine the correct ordering. |
Iterator
|
sort(Comparator comparator)
Sorts the given iterator items into a sorted iterator using the comparator. |
Object
|
sum()
Sums the items from an Iterator. |
Object
|
sum(Closure closure)
Sums the result of apply a closure to each item returned from an iterator. |
Object
|
sum(Object initialValue)
Sums the items from an Iterator, adding the result to some initial value. |
Object
|
sum(Object initialValue, Closure closure)
Sums the result of applying a closure to each item of an Iterator to some initial value. |
Iterator
|
tail()
Returns the original iterator after throwing away the first element. |
Iterator
|
take(int num)
Returns an iterator of up to the first num elements from this iterator.
|
Iterator
|
takeWhile(Closure condition)
Returns the longest prefix of elements in this iterator where each element passed to the given condition closure evaluates to true. |
List
|
toList()
Convert an iterator to a List. |
Set
|
toSet()
Convert an iterator to a Set. |
Iterator
|
toSorted()
Sorts the Iterator. |
Iterator
|
toSorted(Closure closure)
Sorts the given iterator items into a sorted iterator using the Closure to determine the correct ordering. |
Iterator
|
toSorted(Comparator comparator)
Sorts the given iterator items using the comparator. |
Iterator
|
toUnique()
Returns an iterator equivalent to this iterator with all duplicated items removed by using the natural ordering of the items. |
Iterator
|
toUnique(Closure condition)
Returns an iterator equivalent to this iterator but with all duplicated items removed where duplicate (equal) items are deduced by calling the supplied Closure condition. |
Iterator
|
toUnique(Comparator comparator)
Returns an iterator equivalent to this iterator with all duplicated items removed by using the supplied comparator. |
Iterator
|
unique()
Returns an iterator equivalent to this iterator with all duplicated items removed by using the default comparator. |
Iterator
|
unique(Closure closure)
Returns an iterator equivalent to this iterator but with all duplicated items removed by using a Closure to determine duplicate (equal) items. |
Iterator
|
unique(Comparator comparator)
Returns an iterator equivalent to this iterator with all duplicated items removed by using the supplied comparator. |
Iterator
|
withIndex()
Zips an iterator with indices in (value, index) order. |
Iterator
|
withIndex(int offset)
Zips an iterator with indices in (value, index) order. |
Iterates over the contents of an iterator, and checks whether a predicate is valid for at least one element.
closure
- the closure predicate used for matchingCoerce an iterator instance to a boolean value. An iterator is coerced to false if there are no more elements to iterate over, and to true otherwise.
A variant of collectEntries for Iterators using the identity closure as the transform.
A variant of collectEntries for Iterators.
transform
- the closure used for transforming, which has an item from self as the parameter and
should return a Map.Entry, a Map or a two-element list containing the resulting key and valueA variant of collectEntries for Iterators using the identity closure as the transform and a supplied map as the destination of transformed entries.
collector
- the Map into which the transformed entries are putA variant of collectEntries for Iterators using a supplied map as the destination of transformed entries.
collector
- the Map into which the transformed entries are puttransform
- the closure used for transforming, which has an item from self as the parameter and
should return a Map.Entry, a Map or a two-element list containing the resulting key and valueProjects each item from a source iterator to a collection and concatenates (flattens) the resulting collections into a single list.
def numsIter = [1, 2, 3, 4, 5, 6].iterator() def squaresAndCubesOfEvens = numsIter.collectMany{ it % 2 ? [] : [it**2, it**3] } assert squaresAndCubesOfEvens == [4, 8, 16, 64, 36, 216]
projection
- a projecting Closure returning a collection of itemsCounts the number of occurrences which satisfy the given closure from the items within this Iterator. The iterator will become exhausted of elements after determining the count value.
Example usage:
assert [2,4,2,1,3,5,2,4,3].toSet().iterator().count{ it % 2 == 0 } == 2
closure
- a closure conditionCounts the number of occurrences of the given value from the
items within this Iterator.
Comparison is done using Groovy's == operator (using
compareTo(value) == 0
or equals(value)
).
The iterator will become exhausted of elements after determining the count value.
value
- the value being searched forSorts all iterator items into groups determined by the supplied mapping closure and counts the group size. The closure should return the key that each item should be grouped by. The returned Map will have an entry for each distinct key returned from the closure, with each value being the frequency of items occurring for that group.
Example usage:
assert [1,2,2,2,3].toSet().iterator().countBy{ it % 2 } == [1:2, 0:1]
closure
- a closure mapping items to the frequency keysDrops the given number of elements from the head of this iterator if they are available.
The original iterator is stepped along by num
elements.
def iteratorCompare( Iterator a, List b ) { a.collect { it } == b } def iter = [ 1, 2, 3, 4, 5 ].listIterator() assert iteratorCompare( iter.drop( 0 ), [ 1, 2, 3, 4, 5 ] ) iter = [ 1, 2, 3, 4, 5 ].listIterator() assert iteratorCompare( iter.drop( 2 ), [ 3, 4, 5 ] ) iter = [ 1, 2, 3, 4, 5 ].listIterator() assert iteratorCompare( iter.drop( 5 ), [] )
num
- the number of elements to drop from this iteratornum
elements if they exist.Drops the given number of elements from the tail of this Iterator.
def obliterator = "obliter8".iterator() assert abc.dropRight(-1) == ['o', 'b', 'l', 'i', 't', 'e', 'r', '8'] assert abc.dropRight(0) == ['o', 'b', 'l', 'i', 't', 'e', 'r', '8'] assert abc.dropRight(1) == ['o', 'b', 'l', 'i', 't', 'e', 'r'] assert abc.dropRight(4) == ['o', 'b', 'l', 'i'] assert abc.dropRight(7) == ['o'] assert abc.dropRight(8) == [] assert abc.dropRight(9) == []
num
- the number of elements to dropnum
elements,
or an empty Iterator if it has less then num
elements.Creates an Iterator that returns a suffix of the elements from an original Iterator. As many elements as possible are dropped from the front of the original Iterator such that calling the given closure condition evaluates to true when passed each of the dropped elements.
def a = 0 def iter = [ hasNext:{ a < 10 }, next:{ a++ } ] as Iterator assert [].iterator().dropWhile{ it < 3 }.toList() == [] assert [1, 2, 3, 4, 5].iterator().dropWhile{ it < 3 }.toList() == [ 3, 4, 5 ] assert iter.dropWhile{ it < 5 }.toList() == [ 5, 6, 7, 8, 9 ]
condition
- the closure that must evaluate to true to continue dropping elementsIterates through an Iterator, passing each item to the given closure.
closure
- the closure applied on each element foundIterates through an iterator type, passing each item and the item's index (a counter starting at zero) to the given closure.
closure
- a Closure to operate on each itemUsed to determine if the given predicate closure is valid (i.e.&nsbp;returns
true
for all items in this iterator).
A simple example for a list:
def list = [3,4,5] def greaterThanTwo = list.iterator().every { it > 2 }
closure
- the closure predicate used for matchingSupport the subscript operator for an Iterator. The iterator will be partially exhausted up until the idx entry after returning if a +ve or 0 idx is used, or fully exhausted if a -ve idx is used or no corresponding entry was found. Typical usage:
def iter = [2, "a", 5.3].iterator() assert iter[1] == "a"A more elaborate example:
def items = [2, "a", 5.3] def iter = items.iterator() assert iter[-1] == 5.3 // iter exhausted, so reset iter = items.iterator() assert iter[1] == "a" // iter partially exhausted so now idx starts after "a" assert iter[0] == 5.3
idx
- an index value (-self.size() <= idx < self.size())Zips an iterator with indices in (index, value) order.
Example usage:assert [[0, "a"], [1, "b"]] == ["a", "b"].iterator().indexed().collect{ e -> [e.key, e.value] } assert ["0: a", "1: b"] == ["a", "b"].iterator().indexed().collect { idx, str -> "$idx: $str" }.toList()
Zips an iterator with indices in (index, value) order.
Example usage:assert [[5, "a"], [6, "b"]] == ["a", "b"].iterator().indexed(5).toList() assert ["a: 1", "b: 2"] == ["a", "b"].iterator().indexed(1).collect { idx, str -> "$str: $idx" }.toList()
offset
- an index to start fromReturns an Iterator containing all of the items from this iterator except the last one.
def iter = [3, 4, 2].listIterator() def result = iter.init() assert result.toList() == [3, 4]
Iterates through the given Iterator, passing in the initial value to the closure along with the first item. The result is passed back (injected) into the closure along with the second item. The new result is injected back into the closure along with the third item and so on until the Iterator has been expired of values. Also known as foldLeft in functional parlance.
initialValue
- some initial valueclosure
- a closureAn identity function for iterators, supporting 'duck-typing' when trying to get an iterator for each object within a collection, some of which may already be iterators.
Concatenates the toString()
representation of each
item from the iterator, with the given String as a separator between
each item. The iterator will become exhausted of elements after
determining the resulting conjoined value.
separator
- a String separatorAdds max() method to Iterator objects. The iterator will become exhausted of elements after determining the maximum value.
Selects the maximum value found from the Iterator using the closure to determine the correct ordering. The iterator will become exhausted of elements after this operation.
If the closure has two parameters it is used like a traditional Comparator. I.e. it should compare its two parameters for order, returning a negative integer, zero, or a positive integer when the first parameter is less than, equal to, or greater than the second respectively. Otherwise, the Closure is assumed to take a single parameter and return a Comparable (typically an Integer) which is then used for further comparison.
closure
- a Closure used to determine the correct orderingSelects the maximum value found from the Iterator using the given comparator.
comparator
- a ComparatorAdds min() method to Iterator objects. The iterator will become exhausted of elements after determining the minimum value.
Selects the minimum value found from the Iterator using the closure to determine the correct ordering. The iterator will become exhausted of elements after this operation.
If the closure has two parameters it is used like a traditional Comparator. I.e. it should compare its two parameters for order, returning a negative integer, zero, or a positive integer when the first parameter is less than, equal to, or greater than the second respectively. Otherwise, the Closure is assumed to take a single parameter and return a Comparable (typically an Integer) which is then used for further comparison.
closure
- a Closure used to determine the correct orderingSelects the minimum value found from the Iterator using the given comparator.
comparator
- a ComparatorReverses the iterator. The original iterator will become exhausted of elements after determining the reversed values. A new iterator for iterating through the reversed values is returned.
Provide the standard Groovy size()
method for Iterator
.
The iterator will become exhausted of elements after determining the size value.
Sorts the given iterator items into a sorted iterator. The items are assumed to be comparable. The original iterator will become exhausted of elements after completing this method call. A new iterator is produced that traverses the items in sorted order.
Sorts the given iterator items into a sorted iterator using the Closure to determine the correct ordering. The original iterator will be fully processed after the method call.
If the closure has two parameters it is used like a traditional Comparator. I.e. it should compare its two parameters for order, returning a negative integer, zero, or a positive integer when the first parameter is less than, equal to, or greater than the second respectively. Otherwise, the Closure is assumed to take a single parameter and return a Comparable (typically an Integer) which is then used for further comparison.
closure
- a Closure used to determine the correct orderingSorts the given iterator items into a sorted iterator using the comparator. The original iterator will become exhausted of elements after completing this method call. A new iterator is produced that traverses the items in sorted order.
comparator
- a Comparator used for comparing itemsSums the items from an Iterator. This is equivalent to invoking the "plus" method on all items from the Iterator. The iterator will become exhausted of elements after determining the sum value.
Sums the result of apply a closure to each item returned from an iterator.
iter.sum(closure)
is equivalent to:
iter.collect(closure).sum()
. The iterator will become
exhausted of elements after determining the sum value.
closure
- a single parameter closure that returns a numeric value.Sums the items from an Iterator, adding the result to some initial value. This is equivalent to invoking the "plus" method on all items from the Iterator. The iterator will become exhausted of elements after determining the sum value.
initialValue
- the items in the collection will be summed to this initial valueSums the result of applying a closure to each item of an Iterator to some initial value.
iter.sum(initVal, closure)
is equivalent to:
iter.collect(closure).sum(initVal)
. The iterator will become
exhausted of elements after determining the sum value.
closure
- a single parameter closure that returns a numeric value.initialValue
- the closure results will be summed to this initial valueReturns the original iterator after throwing away the first element.
Returns an iterator of up to the first num
elements from this iterator.
The original iterator is stepped along by num
elements.
def a = 0 def iter = [ hasNext:{ true }, next:{ a++ } ] as Iterator def iteratorCompare( Iterator a, List b ) { a.collect { it } == b } assert iteratorCompare( iter.take( 0 ), [] ) assert iteratorCompare( iter.take( 2 ), [ 0, 1 ] ) assert iteratorCompare( iter.take( 5 ), [ 2, 3, 4, 5, 6 ] )
num
- the number of elements to take from this iteratornum
elements of this iterator.Returns the longest prefix of elements in this iterator where each element passed to the given condition closure evaluates to true.
def a = 0 def iter = [ hasNext:{ true }, next:{ a++ } ] as Iterator assert [].iterator().takeWhile{ it < 3 }.toList() == [] assert [1, 2, 3, 4, 5].iterator().takeWhile{ it < 3 }.toList() == [ 1, 2 ] assert iter.takeWhile{ it < 5 }.toList() == [ 0, 1, 2, 3, 4 ]
condition
- the closure that must evaluate to true to
continue taking elementsConvert an iterator to a List. The iterator will become exhausted of elements after making this conversion.
Convert an iterator to a Set. The iterator will become exhausted of elements after making this conversion.
Sorts the Iterator. Assumes that the Iterator elements are
comparable and uses a NumberAwareComparator to determine the resulting order.
NumberAwareComparator
has special treatment for numbers but otherwise uses the
natural ordering of the Iterator elements.
A new iterator is produced that traverses the items in sorted order.
Sorts the given iterator items into a sorted iterator using the Closure to determine the correct ordering. The original iterator will be fully processed after the method call.
If the closure has two parameters it is used like a traditional Comparator. I.e. it should compare its two parameters for order, returning a negative integer, zero, or a positive integer when the first parameter is less than, equal to, or greater than the second respectively. Otherwise, the Closure is assumed to take a single parameter and return a Comparable (typically an Integer) which is then used for further comparison.
closure
- a Closure used to determine the correct orderingSorts the given iterator items using the comparator. The original iterator will become exhausted of elements after completing this method call. A new iterator is produced that traverses the items in sorted order.
comparator
- a Comparator used for comparing itemsReturns an iterator equivalent to this iterator with all duplicated items removed by using the natural ordering of the items.
Returns an iterator equivalent to this iterator but with all duplicated items removed where duplicate (equal) items are deduced by calling the supplied Closure condition.
If the supplied Closure takes a single parameter, the argument passed will be each element, and the closure should return a value used for comparison (either using Comparable#compareTo(java.lang.Object) or Object#equals(java.lang.Object)). If the closure takes two parameters, two items from the Iterator will be passed as arguments, and the closure should return an int value (with 0 indicating the items are not unique).
def items = "Hello".toList() + [null, null] + "there".toList() def toLower = { it == null ? null : it.toLowerCase() } def noDups = items.iterator().toUnique(toLower).toList() assert noDups == ['H', 'e', 'l', 'o', null, 't', 'r']
assert [1,4] == [1,3,4,5].toUnique { it % 2 }
assert [2,3,4] == [2,3,3,4].toUnique { a, b -> a <=> b }
condition
- a Closure used to determine unique itemsReturns an iterator equivalent to this iterator with all duplicated items removed by using the supplied comparator.
comparator
- a Comparator used to determine unique (equal) items
If null
, the Comparable natural ordering of the elements will be used.Returns an iterator equivalent to this iterator with all duplicated items removed by using the default comparator. The original iterator will become exhausted of elements after determining the unique values. A new iterator for the unique values will be returned.
Returns an iterator equivalent to this iterator but with all duplicated items removed by using a Closure to determine duplicate (equal) items. The original iterator will be fully processed after the call.
If the closure takes a single parameter, the argument passed will be each element, and the closure should return a value used for comparison (either using Comparable#compareTo(java.lang.Object) or Object#equals(java.lang.Object)). If the closure takes two parameters, two items from the Iterator will be passed as arguments, and the closure should return an int value (with 0 indicating the items are not unique).
closure
- a Closure used to determine unique itemsReturns an iterator equivalent to this iterator with all duplicated items removed by using the supplied comparator.
comparator
- a ComparatorZips an iterator with indices in (value, index) order.
Example usage:assert [["a", 0], ["b", 1]] == ["a", "b"].iterator().withIndex().toList() assert ["0: a", "1: b"] == ["a", "b"].iterator().withIndex().collect { str, idx -> "$idx: $str" }.toList()
Zips an iterator with indices in (value, index) order.
Example usage:assert [["a", 5], ["b", 6]] == ["a", "b"].iterator().withIndex(5).toList() assert ["1: a", "2: b"] == ["a", "b"].iterator().withIndex(1).collect { str, idx -> "$idx: $str" }.toList()
offset
- an index to start from


--- layout: default title: Hello! ---
This website is an WIP portfolio of some programming stuff I did. I'll think about what content exactly to put here and how to better present it. For now there are only a few gaming-related projects, most of them I did for college.
My plan is to spend more time in personal projects and by doing so put more content in here. But we'll see how well I'll be able to follow that plan.
Right now what you can do is take a look at some stuff I've made, you can read about me or you can send me an e-mail.


{% extends "structure.html" %} {% block main %}
My name is Jonathan and I'm originally from Ohio but now live in Toronto. I've got an engineering background and have a little programming experience but have mainly worked in manufacturing. I'm looking to make the change to software development full-time and am loving learning. I'm married and we have a son together. We love our life and share it with our dog Wilson.
{% endblock main %}


--- layout: guide ---
| Cockpit Guide |
|---|
cockpit.js: Raw Channelscockpit.js: Raw Channels — Raw communication channels |
At a low level Cockpit communicates with the system via messages passed
through various channels. These are usually exposed via higher level APIs,
such as the cockpit.spawn()
function.
It is rare to use raw channels directly.
channel = cockpit.channel(options)
This function creates a new channel for communication with the system.
It returns a new channel object. The options
argument is a
plain object. At least the "payload"
option is required, and
based on the payload type, other options may be required.
|
Set to |
|
The payload type for the channel. Only specific payload types are supported. |
|
Set to Set to |
The channel object returned has the following fields and methods and
events. You should call the
channel.close()
method when done with the channel.
A valid channel will always be returned and the is ready to
channel.send()
. The channel may
close shortly afterword due
to a failure.
channel.send(data)
Send a message over the channel. The contents of the message depends on the
payload type of the channel. If a binary channel, then data
is expected
to be an Array
of bytes or a Uint8Array
. If not binary,
then the data
will be converted to a string if not already a string.
channel.control(options)
Notify the channel to tune certain parameters on the fly. The options
is a plain javascript object, and the contents depend on the "payload"
of the channel.
One common operation is to set "command"
to "done"
in the
options field. To indicate that no further messages will be sent through the channel.
promise = channel.wait([callback])
Returns a promise
that is ready when the channel is ready, or fails if the
client closes. If a callback
is specified, it is attached to the promise. The
promise will be rejected or resolved with the contents options
passed to the
channel.onready and
channel.onclose events respectively.
In general it's not necessary to wait for the channel before starting to use the channel.
channel.close([options])
Close the channel.
If options
is present it can be a plain javascript object
containing additional channel close options to send to the peer. If closing for
because of a problem, set the "problem"
field to a
problem code. If options
is not an object it will be treated as a "problem"
.
The close event will fire. A channel can also be closed by a peer or if the underlying transport closes.
channel.addEventListener("message", function(event, data) { ... })
An event triggered when the channel receives a message. The message is
passed as a string to the handler in the data
. In the case of binary
channels data
is an Uint8Array
or an Array
of bytes if the former is not supported by the browser. The contents of
the message depends on the payload type of the channel.
channel.addEventListener("control", function(event, options) { ... })
An event triggered when the channel receives an control message in the
middle of the flow. One particular use is when the command
is set to
"done"
then no further messages will be received in the channel.
The exact form of these messages depend on the "payload"
of the
channel.
channel.addEventListener("ready", function(event, options) { ... })
An event triggered when the other end of the channel is ready to start processing messages. This indicates the channel is completely open. It is possible to start sending messages on the channel before this point.
channel.addEventListener("close", function(event, options) { ... })
An event triggered when the channel closes. This can happen either because channel.close() function was called, or if the peer closed the channel, or the underlying transport closes.
The options
will contain various close information, including a
"problem"
field which will be set if the channel was closed because
of a problem.
cockpit.transport.origin
The HTTP origin that is being used by the underlying channel transport. This is
read-only, you should not assign a value. If the browser supports
window.location.origin
then this will be identical to that value.
cockpit.transport.host
The host that this transport is going to talk to by default. This is read-only, you should not assign a value. If the value is null that means that the transport has not been setup yet.
cockpit.transport.csrf_token
A cross site request forgery token for use with external channels. This becomes valid once the connection is properly established.
cockpit.transport.options
Initialization options received over the underlying channel transport. These will be empty until connection is properly established.
cockpit.transport.wait(callback)
Call the callback
function once the underlying channel transport is initialized.
This will start the initialization if not already in progress or completed. If the
channel transport is already initialized, then callback
will be called
immediately.
In general it's not necessary to wait for the transport before starting to open channels.
cockpit.transport.close([problem])
Close the underlying channel transport. All channels open channels will close.
The problem
argument should be a problem code string. If not specified
it will default to "disconnected"
.
cockpit.transport.filter((message, channelid, control) => { ... }, [out])
Add a filter to the underlying channel transport. All incoming messages will be
passed to each of the filter callbacks that are registered. If the out
argument is equal to true
then the filter will receive outgoing messages
that being sent on the underlying channel transport.
This function is rarely used.
Filter callbacks are called in the order they are registered. If a filter
callback returns false
then the message will not be dispatched
further, whether to other filters, or to channels, etc.
The message
is the string or array with the raw message including,
the framing. The channelid
is the channel identifier or an empty string
for control messages. If control
is set then this is a control message,d
and the control
argument contains the parsed JSON object of the
control message.
cockpit.transport.inject(message, [out])
Inject a message into the underlying channel transport. The message
should be a string
or an array of bytes, and should be valid
according to the Cockpit message protocol. If the out
argument is equal
to false
then the message will be injected as an incoming message as if
it was received on the underlying channel transport.
This function is rarely used. In general you should only inject()
messages you got from a filter()
.
string = cockpit.base64_encode(data)
Encode binary data into a string using the Base64 encoding. The data
argument can either be a string
, an Array
, an ArrayBuffer
or a Uint8Array
. The return value is a string.
data = cockpit.base64_decode(string, [constructor])
Decode binary data from a Base64 encoded string. The string
argument should be a javascript string. The returned data
> will be an
array of bytes.
You can pass Uint8Array
, Array
or String
as an alternate constructor
if you want the decoded data in an
alternate form. The default is to return an Array
. Note that if you use a
String
for the decoded data, then you must guarantee that the data
does not contain bytes that would be invalid for a string.
encoder = cockpit.utf8_encoder([constructor])
Create an encoder for encoding a string into a UTF8 sequence of bytes.
You can pass Uint8Array
, Array
or String
as an alternate constructor
if you want the decoded data in an
alternate form. The default is to return an Array
.
data = encoder.encode(string)
Encode a string
into a UTF8 sequence of bytes.
The resulting data
is an array of bytes, but it's type may be
modified by passing an alternate constructor
to
cockpit.utf8_encoder().
decoder = cockpit.utf8_decoder([fatal])
Creates a decoder to decode a UTF8 sequence of bytes data into a string.
If the fatal
is set to true
then the decoder
will throw an exception when it encounters invalid UTF8 data. By default invalid data
will be substituted with special UTF8 characters.
string = decoder.decode(data, [options])
Decode an array of UTF8 bytes into a string
. The data
argument may be an Array
, a Uint8Array
or a string containing
binary data.
If options
is passed it should be a plain javascript object. If
options
has a stream
property equal to true
,
then multiple invocations of this function can be made with parts of the UTF8 sequence
of bytes. Any trailing bytes that don't yet build a complete unicode character, will be
cached until the next invocation. To drain the last data, call this function without
the stream
property set.


Cadbury hits back at claims £45 Christmas selection box is a 'rip off'
It does contain 26 chocolate bars…
by Nancy BrownCadbury has released a giant Christmas selection box featuring 26 chocolate bars and weighing in at 2.1kg.
The limited-edition Ultimate Selection Box is on sale now and costs £45.
Inside you'll find treats including Dairy Milk, Dairy Milk Crunchie, Dairy Milk Tiffin, Crunchie, Double Decker, Fruit & Nut, Whole Nut, Wispa, Curly Wurly, Freddo Caramel and a Chomp.
Cadbury said: "Probably the world's biggest selection box, the Cadbury Ultimate Selection Box is ideal for sharing, containing 26 chocolate bars and weighing over 2 kilos."
It added: "Best of luck fitting this under the tree."
Read more: Mum charges her family £40 a head for Christmas dinner
However, while it may appear to be a chocoholic's dream, fans have labelled the product a "rip off".
"It'd be cheaper to buy all the chocolates separately & make the box yourself," said one shopper.
Another added: "Could make it myself for £25 and even have chocolate left over to do a smaller one."
A Cadbury spokesperson responded to the comments, hitting back at the "rip off" claims.
Read more: B&M is selling gin liqueurs that taste like cake
They said: "This year's Cadbury Ultimate Selection Box is a chocolate lover's dream, not only including 26 of our most loved bars, but also two children's tickets to the home of Cadbury chocolate – Cadbury World in Bournville."
They added: "These tickets retail at £12.85 each, so we think at £45 the Ultimate Selection Box is great value for money and a fantastic festive gift to share with family and friends this Christmas."
Some backed the chocolate giant, though, and said it was a fair price for the sweet treats and the day out tickets.
What do you think? Let us know on our Facebook page @EntertainmentDailyFix.


Code Coverage |
|||||||||
Lines |
Functions and Methods |
Classes and Traits |
|||||||
| Total | |
77.51% |
510 / 658 |
|
75.70% |
81 / 107 |
|
33.33% |
2 / 6 |
| Exception | |
100.00% |
2 / 2 |
||||||
| Element.php | |
90.73% |
421 / 464 |
|
89.04% |
65 / 73 |
|
0.00% |
0 / 1 |
| Factory.php | |
60.92% |
53 / 87 |
|
50.00% |
5 / 10 |
|
0.00% |
0 / 1 |
| Fieldset.php | |
26.25% |
21 / 80 |
|
14.29% |
2 / 14 |
|
0.00% |
0 / 1 |
| Form.php | |
55.56% |
15 / 27 |
|
90.00% |
9 / 10 |
|
0.00% |
0 / 1 |


About UpTrend
The motive of this project is to scrape trending stuff from top websites which are mostly visited on a daily basis by users and show them in a single page application consisting of links to trending stuff. For the purpose of hacktoberfest we will be currently focusing on scraping trending data from -
And more will be added with progress........


| Class | Description |
|---|---|
| Feature |
Feature is a parent for all Features extracted from Segments
|
| FeatureGridSpaces |
|--A--|--B--|--C--|
1-----------------4
-------------------
2--D--|--E--|--F--5
-------------------
3-----------------6
|--G--|--H--|--I--|
FeatureGridSpaces gets the percentage of empty spaces along the lines
of a segment's grid
For example if the segment has the letter O the following will approximately
represent this feature according to the drawing above:
A: 40%
B: 0%
C: 40%
D: 0%
E: 80%
F: 0%
G: 40%
H: 0%
I: 40%
1: 40%
2: 0%
3: 40%
4: 40%
5: 0%
6: 40%
|
| Pixel |
Pixel represents an image's pixel
|
| PixelId |
PixelId represents an image's pixel's ID
Can act as a key (e.g.: for a hash map)
|
| Segment |
Segment represents an image's segment
A segment is a part of an image that has one or more feature(s)
(shape, color, ...)
|
| SegmentId |
SegmentId represents an image's segment's ID
Can be a hash id (e.g.: in a hash map)
|


This data visualization project was completed by Zihui (Chris) Fang and Hongtao Hao, with Equal Contribution, as the term paper for Professor Yong-Yeol Ahn‘s Data Visualization course in 2019 Fall.
Here is our study in PDF, and here is the tex source code for the PDF.
From the first modern Olympics in 1896 to Rio 2016, the Summer Olympic Games has been through 120 years. This study analyzed the historical data about the Olympics and tried to answer four questions, i.e.,
Results showed that both total number of athletes and the rate of female participation have been increasing in the past 120 years. Also, there seems to exist a home-field advantage. Third, medal efficiency is highly correlated with participating country or region’s economic development. Finally, athletics, gymnastics, and swimming have the highest number of athletes.
Based on the above discussions of the previous visualizations on the topics we are addressing, our contributions are:
One of first few attempts to explore female participation in the Summer Olympics over 120 years by continent. This new insight will be important because although data shows that overall female participation in the Olympics has been increasing dramatically, this might have been the case for each continent. Further investigation into the percentage of female athletes in each of the six continents (Asia, Europe, Africa, South America, North America, and Oceania) will reveal deeper information about the trend of female athletes participation.
Introducing KDE in examining home-field advantage in the Olympics. This method makes it possible to show the density of each host country’s performance distribution, which makes the comparison between “home” and “away” performance clearer.
Introduction of the concept of “medal efficiency”. Earlier attempts either lacked taking into account of “medal points” or unfairly included GDP and population in their formula. Our way of calculating medal efficiency, i.e., weighted medal points per athlete participating, can more accurately estimate each country’s efficiency of producing medals in the Summer Olympics.
See olymvis-data for more details.
This website is built with Hugo. The theme is XMin by Yihui Xie. You can find the source codes of our website here.


--- layout: post title: "Cats, Cats Everywhere!" subtitle: "I have 20 Cats!" date: 2021-02-26 23:45:13 -0400 author: "James Jamison" background: '/img/posts/02.jpg' ---
I like cats. I've probably owned over 1000 in my life. I breed them for a living and currently have three litters ready to sell. It takes a lot to run this joint. From getting the cats to do the dirty to making sure they have a safe birth. And it's always sad to see them go off to their new homes.
You can check out my breeder site at www.catbreeder.cat!


One-Third of Tropical African Plants Are Threatened with Extinction
About one-third of tropical African plants are threatened with extinction, according to a new study cited by the BBC.
Much of West Africa, Ethiopia, as well as vast areas of Tanzania and the Democratic Republic of the Congo, are the regions found to be most at risk, that will lose about 40 percent of their plant diversity
Risky species include trees, shrubs, herbs and woody vines. Threats include deforestation, population growth and climate change, scientists say.
"Biodiversity provides countless benefits to humans and losing diversity jeopardises our future," said lead researcher Dr Thomas Couvreur of the French National Institute for Sustainable Development.
Loss of biodiversity will be particularly problematic in tropical Africa, "a region of incredible diversity but with major social and political challenges and expected rapid population growth over the next decades", he added.


Plugin Information |
|---|
View Docker Slaves on the plugin site for more information. |
Use Containers to setup build agents, without any constraint on images you can use.
Objectives
- [✓] use ANY docker image, without any jenkins-specific prerequisite
- [✓] no SSHD inside container, no JNLP port exposed over the Internet
- [✓] compose your build à la docker-compose with a main build container and sidecar containers for test database, selenium browser, etc
- [✓] define container used for the build as a Dockerfile stored in project SCM - aka "continuous delivery as code"
- [✓] support Pipeline
- [✓] rely on docker volumes to offer workspace persistence between builds
- [✓] extensibility for various docker hosting solutions
Configuration
In your jobs, new option let you define your build environment as a combination of Docker images / Dockerfiles
History
1.0.2
Fix support for Docker host credentials
Add support for docker socket bind mount via a dedicated binding container. This let you run `docker build` from your build container
1.0.1
Plugin has been moved to jenkinsci github organization so we can publish it in public update center
0.5 - proof of concept
This version has been released at DevoxxFrance while we demonstrated the plugin, so people can give it a try and let us know if it was useful
Why ?
Why (yet another) Docker plugin ?
Most plugins around use docker as a lightweight virtual machine, but don't embrace containers paradigm shift and how they impact CI/CD.
This plugin has been designed as a pure experiment during Docker Global Hack Day. It's under active development. Plugin authors are CloudBees employees, but the plugin isn't a CloudBees product, please consider this as individuals public experiment.
Read more on https://dockins.github.io
Diagnostic
If something goes wrong (sic), please first run Jenkins master with -Dit.dockins.dockerslaves.spi.DockerDriver.verbose=true
. This will dump in build log all docker commands ran by the plugin and help us understand the issue.
Then, ask for assistance on jenkins-users mailing list and/or report a bug on https://issues.jenkins-ci.org
Future
There's many possible improvements / features we'd like to experiment.
- integrate with Pipeline plugin, especially replace DurableTask by a docker based implementation, running docker commands detached (-d) and polling using docker API for execution status. Would need some way to replace the
sh
step execution - consider using a java based docker client for Docker API, so we don't rely on running external commands (and related threads usage)
- integrate with docker orchestrators (amazon ECS, Kubernetes, Hyper_ ...) as an alternative backend
- offer isolated Docker host per build, typically relying on docker inside LXD containers.
- Let build use of docker as part of the build (i.e. bind mount docker.sock in build container)
- experiment with docker volume plugins (flocker) for workspace snapshoting and offline browsing of the exact workspace for a specific build.
- experiment pipeline support for volumes
- support docker 1.12 swarm mode JENKINS-38203
- expose docker.sock so build can run `doker build` (aka "inception") JENKINS-37088
Attachments:
Capture d’écran 2015-09-25 à 17.10.26.png (image/png)


About
Software Engineer.
I'm Zhi Wen, and I go by Zac for easier pronunciation. I'm a Master's student in Computer Science. I got my Bachelor's degree in Software Engineering in 2016 back in China. Java is my primary language, while I use C/C++, Python and JavaScript as well.
- Website: zacw7.github.io
- City: Sunnyvale, CA
- Email<EMAIL_ADDRESS>Hobbies
During my free time, I like watching movies, playing games and sometime reading books. I also like going out with friends, exploring new places and restaurants.
Movies
Books
Hours Of Music (in 2020)
Resume
Education
M.S. in Computer Science
2019 - 2021
Northeastern University
Core Courses:
- Programming Design Paradigm
- Computer Systems
- Algorithm
B.E. in Software Engineering
2012 - 2016
University of Electronic Science and Technology of China
Core Courses: Data Structure and Algorithm, Principles of Database and Application, Software Architecture and Design Pattern, Principles of Computer Operating System
- Data Structure and Algorithm
- Principles of Database and Application
- Principles of Computer Operating System
Professional Experience
Software Engineer Intern
2020
Facebook Inc.
- Designed and implemented authorization support for open source project Presto.(https://github.com/prestodb/presto/issues/14639)
- Integrated authorization feature with Facebook internal tools.
Software Engineer
2016 - 2019
China Mobile/MIGU Co., Ltd.
- Served as the Scrum Master of a 10-person team, leading daily standups and coordinating project assignments
Cloud Developer (Intern)
2015
SAP
- Worked in the Agile development team, developing a Supplier Relationship Management solution based on SAP Business ByDesign
Skills
Courses
CS5010 Programming Design Paradigm
Introduces modern program design paradigms. Starts with functional program design, introducing the notion of a design recipe.
CS5610 Web Development
Discusses Web development for sites that are dynamic, data driven, and interactive. Focuses on the software development issues of integrating multiple languages, assorted data technologies, and Web interaction.
CS5600 Computer Systems
Studies the structure, components, design, implementation, and internal operation of computer systems, focusing mainly on the operating system level.
CS5200 Database Management Systems
Introduces relational database management systems as a class of software systems. Covers design theory, query language, and performance/tuning issues.
CS5800 Algorithms
Presents the mathematical techniques used for the design and analysis of computer algorithms.
CS6650 Scalable Distrbuted Systems
Covers the essential elements of distributed, concurrent systems and builds upon that knowledge with engineering principles and practical experience with state-of-the-art technologies and methods for building scalable systems.


Dear community,
may I ask for your experience?
I'm sitting in front of a Mac running Safari and Firefox on the latest Mac OS Yosemite.
AFAIK, the led widget should show a colored icons corresponding to its feed value.
When I'm logged-in to emoncms, no led icon is shown but the feed value.

Demo to be found here: http://emoncms.org/Tricx/led
How does the led widget work for you?
Is there any working example or documentation available?
Maybe this is an issue with Mac OSX instead of emoncms or the led widget, don't know.
Thanks in advance,
Trickx
Re: [SOLVED] Behavior of LED widget
I use the LED to indicate the health of my 4-20mA current loops:
< 4mA Grey
> 20mA Red
otherwise Green.
I've not noticed any problems. I just tried Safari (V7.1) on OSX 10.9.5 (so not Yosemite) and that seems to work ok. I also surfed to your pointer above and see a black LED, so it doesn't look like it's browser related. What is the value in your feed? I can't remember where I found these now, but here's the list I've kept in my code:
//
// emoncms LED widget colours
//
#define LED_RED 0
#define LED_GREEN 1
#define LED_GREY 2
#define LED_BLUE 3
#define LED_PURPLE 4
#define LED_YELLOW 5
#define LED_BLACK 6
I'm hosting this on emoncms.org, which appears to be what you're doing as well. Have you set your feed to public?
Re: [SOLVED] Behavior of LED widget
dBC,
thanks for your comment.
Of course I forgot to change the feed to public.
Unfortunately, this explains just the different behaviors whether I'm logged in or not.
Since the feed is public, no led icon is shown anymore.
The feed value is 1 and should correspond to a green icon, which was never visible.
What do you see now?
Have you configured something else?
Re: [SOLVED] Behavior of LED widget
Now I see the attached, so it appears to be working (currently using Chromium on Linux at this end). No, I don't believe I had to configure anything else. Will try on Safari when I get a chance, and report back if I see anything different.
Re: [SOLVED] Behavior of LED widget
[SOLVED]
The trick is NOT to use "led" as feed name!.
If one feed name for a led widget is "led", all led widgets show strange behavior.
Re: [SOLVED] Behavior of LED widget
Very interesting. Thanks for the heads-up.
Re: [SOLVED] Behavior of LED widget
I think that's a general rule in most computer languages. Although most times the system won't get confused (although it does appear to have done so here), it's so easy to slip up when copying or editing and you can very easily have a very hard to spot problem.


Drainage Ditches
问题描述 :
Every time it rains on Farmer John’s fields, a pond forms over Bessie’s favorite clover patch. This means that the clover is covered by water for awhile and takes quite a long time to regrow. Thus, Farmer John has built a set of drainage ditches so that Bessie’s clover patch is never covered in water. Instead, the water is drained to a nearby stream. Being an ace engineer, Farmer John has also installed regulators at the beginning of each ditch, so he can control at what rate water flows into that ditch.
Farmer John knows not only how many gallons of water each ditch can transport per minute but also the exact layout of the ditches, which feed out of the pond and into each other and stream in a potentially complex network.
Given all this information, determine the maximum rate at which water can be transported out of the pond and into the stream. For any given ditch, water flows in only one direction, but there might be a way that water can flow in a circle.
Farmer John knows not only how many gallons of water each ditch can transport per minute but also the exact layout of the ditches, which feed out of the pond and into each other and stream in a potentially complex network.
Given all this information, determine the maximum rate at which water can be transported out of the pond and into the stream. For any given ditch, water flows in only one direction, but there might be a way that water can flow in a circle.
输入:
The input includes several cases. For each case, the first line contains two space-separated integers, N (0 <= N <= 200) and M (2 <= M <= 200). N is the number of ditches that Farmer John has dug. M is the number of intersections points for those ditches. Intersection 1 is the pond. Intersection point M is the stream. Each of the following N lines contains three integers, Si, Ei, and Ci. Si and Ei (1 <= Si, Ei <= M) designate the intersections between which this ditch flows. Water will flow through this ditch from Si to Ei. Ci (0 <= Ci <= 10,000,000) is the maximum rate at which water will flow through the ditch.
输出:
For each case, output a single integer, the maximum rate at which water may emptied from the pond.
样例输入:
5 4 1 2 40 1 4 20 2 4 20 2 3 30 3 4 10
样例输出:
50
解题代码:
//* @author: import java.util.*; public class Main implements Comparator< Integer> { static class Edge{ int e,c; Edge next; Edge rev; public void dec(int f){ c-=f; rev.c+=f; } } int n,m,src,tag; final Edge[] g=new Edge[200]; final int[] h=new int[200]; final int[] ex=new int[200]; final Scanner sc=new Scanner(System.in); final PriorityQueue< Integer> pq=new PriorityQueue< Integer>(200,this); boolean init(){ if(!sc.hasNext()) return false; m=sc.nextInt(); n=sc.nextInt(); src=0; tag=n-1; for(int i=0;i!=n;++i){ g[i]=null; h[i]=0; ex[i]=0; } h[src]=n; for(int i=0;i!=m;++i){ int a=sc.nextInt()-1,b=sc.nextInt()-1,c=sc.nextInt(); Edge e0=addEdge(a, b, c),e1=addEdge(b,a,0); e0.rev=e1;e1.rev=e0; } return true; } private Edge addEdge(int s, int e, int c) { Edge n=new Edge(); n.c=c; n.e=e; n.next=g[s]; g[s]=n; return n; } int work(){ for(Edge e=g[src];e!=null;e=e.next){ ex[e.e]+=e.c; e.dec(e.c); if(e.e!=src&&e.e!=tag){ pq.add(e.e); } } while(pq.size()>0){ int v=pq.poll(); int exv=ex[v],hv=h[v]; for(Edge e=g[v]; exv>0&&e!=null; e=e.next){ if(e.c<=0 || hv !=h[e.e]+ 1 ) continue; int f=Math.min( exv , e.c); ex[e.e]+=f; exv-=f; e.dec(f); if(ex[e.e]==f&&e.e!=tag&&e.e!=src){ pq.add(e.e); } } if(exv>0){ for(Edge e=g[v];e!=null;e=e.next){ if(e.c > 0 && hv>h[e.e]){ hv=h[e.e]; } } ++hv; pq.add(v); } ex[v]=exv; h[v]=hv; } return ex[tag]; } void go(){ while(init()){ System.out.println( work()); } } public static void main(String[] args) { new Main().go(); } public int compare(Integer o1, Integer o2) { return h[o2]-h[o1]; } }
(adsbygoogle = window.adsbygoogle || []).push({});
你的理解应该是：即使主持人拿走一个箱子对结果没有影响。这样想，主持人拿走的箱子只是没有影响到你初始选择的那个箱子中有奖品的概率，但是改变了其余两个箱子的概率分布。由 1/3,1/3 变成了 0, 2/3
其实国内大部分公司对算法都不够重视。特别是中小型公司老板根本都不懂技术，也不懂什么是算法，从而也不要求程序员懂什么算法，做程序从来不考虑性能问题，只要页面能显示出来就是好程序，这是国内的现状，很无奈。
这是研发类的题还是算法类？
.net中char类型不是两个字节么
有意思，有难度
因为是要把从字符串s的start位到当前位在hash中重置，修改提交后能accept，但是不修改居然也能accept
没敢用map，总怕stl用着会超时
递归还真是一门学问，学习了
第一题还是比较考验智商~
不错，现在就缺少新的资料
Thank you very much
写的好····· Pollard Rh
厉害，支持
第二个方法挺不错。NewHead代表新的头节点，通过递归找到最后一个节点之后，就把这个节点赋给NewHead，然后一直返回返回，中途这个值是没有变化的，一边返回一边把相应的指针方向颠倒，最后结束时返回新的头节点到主函数。