JavaScript Helpers is a list of useful functions to make development easier.
Desktop & Mobile versions of:
For compatibility with old browsers you may need to load some JS polyfills - depending on the imported functions ( from polyfill.io or else ):
Promise.prototype.finally
AbortController
fetch
<script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=Promise.prototype.finally,AbortController,fetch"></script>
Install via NPM:
npm install javascript-helpers
and use as ES6 module loading the modules you need.
For example:
import { ajaxCall, delegateEvent, getElements } from 'javascript-helpers';
Note: Remember to use tree-shaking techniques to avoid importing all modules from JavaScript Helpers.
addClass( elements, cssClasses )
Add the specified css class(es) to the specified HTML element(s).
Parameters:
elements: ( NodeList | HTML Element | Selector | Array of HTML Elements )
cssClasses: ( String ) One or more space-separated css classes to be added.
Return value:
Array of elements as returned by getElements from the passed elements
.
Polyfills you may need: None
ajaxCall( options = {}[, canAbortOrController = false] )
Fire an AJAX call using fetch API ( see MDN documentation for options details ).
Parameters:
options: ( Object ) as per fetch options but you can also add these:
{
url: 'path-to/my-remote-service',
timeout: 10000
}
Default options object is:
{
cache: 'no-store',
credentials: 'same-origin',
headers: {
'Content-Type': 'application/json'
},
method: 'GET',
mode: 'same-origin',
redirect: 'follow',
timeout: 0,
url: location.href
}
Note that "headers" is passed as plain object.
Return value:
Promise returned by fetch ( with body consumed depending on "Accept" request header or MIME type response header ).
If canAbortOrController
is changed from default value, ajaxCall will return this instead:
{
abort: Function,
ready: Promise
}
Polyfills you may need:
AbortController
fetch
Promise.prototype.finally
arrayMove( array, fromIndex, toIndex )
Move one element of an array, from the specified index to the new one.
Parameters:
array: ( Array ) the list of elements
fromIndex: ( Number ) Index of the element you want to move
toIndex: ( Number ) Index you want the element to be moved to
Return value:
Modified array ( original array is not affected )
Polyfills you may need: None
deepFreeze( obj )
Apply Object.freeze
recursively to freeze all nested objects too.
Parameters:
obj: ( Any )
Return value:
Same object given but freezed
Polyfills you may need: None
delegateEvent( ancestor, eventName, target, callback[, { data, options, useCapture = false } = {}] )
Attach a callback
function to one event for all elements that match the target
, now or in the future, based on ancestor
root element(s).
All arguments are mandatory except last one.
Parameters:
ancestor: ( Document, NodeList | HTML Element | Selector | Array of HTML Elements ) Container element to which the event will be attached ( MUST exist when calling delegateEvent
).
eventName: ( String ) Event name on which the callback function will be triggered.
target: ( Selector ) CSS selector for the element(s) that will trigger the event ( these elements can exist or added in the future ).
callback: ( Function ) Function to be executed when the event is triggered. The keyword this
is bound to the element matching the target
.
Callback has these parameters:
event: ( Event ) The original event object
data: ( Object ) data as passed to delegateEvent or undefined if not passed
[Object]: ( Object - optional ) An object with:
data: ( Object - optional ) Object to be passed to the callback function.
options: ( Object - optional ) Object to be passed to the event listener as third argument. See MDN doc
useCapture: ( Boolean ) Whether to use capturing phase or not for the event listener.
Polyfills you may need: None
emitEvent( elem, eventName[, eventOptions] )
Dispatch an event on the specified element(s) and with specified event options.
Parameters:
elem: ( Document | NodeList | HTML Element | Selector | Array of HTML Elements )
eventName: ( String )
eventOptions: ( Object ) See eventInit on MDN documentation.
Default:
{
bubbles: true
}
Polyfills you may need: None
emitCustomEvent( elem, eventName[, eventOptions] )
Dispatch a custom event on the specified element(s) and with specified event options, where you can add object detail
.
Parameters:
elem: ( Document | NodeList | HTML Element | Selector | Array of HTML Elements )
eventName: ( String )
eventOptions: ( Object ) See customEventInit on MDN documentation.
Default:
{
bubbles: true
}
Polyfills you may need: None
fillForm( formEl, data[, skipFilledFields] )
Fill the fields in the specified form element using the passed data object.
Parameters:
formEl: ( NodeList | HTML Element | Selector )
data: ( Object ) Each key must match the name attribute of the filed.
Values can be set depending on the field as follow:
skipFilledFields: ( Boolean ) Whether or not to skip fields with the value already set.
Return value:
HTML Element of the passed formEl
Polyfills you may need: None
getAge( dateString )
Get the age from the passed date.
-1
is returned if the argument is not a valid date.
Parameters:
dateString: ( String ) A valid date in format ISO 8601.
YYYY-MM-DD | YYYY/MM/DD | YYYY MM DD
Return value:
Number
Polyfills you may need: None
getAgeBetween( dateString1, dateString2 )
Get the age between the passed dates. dateString1
must be greater than dateString2
.
-1
is returned if one of the arguments is not a valid date.
Parameters:
dateString1: ( String ) A valid date in format ISO 8601.
YYYY-MM-DD | YYYY/MM/DD | YYYY MM DD
dateString2: ( String ) A valid date in format ISO 8601.
YYYY-MM-DD | YYYY/MM/DD | YYYY MM DD
Return value:
Number
Polyfills you may need: None
getDateSeparator( dateString[, checkIso8601separator = true] )
Get the character that is used as date separator.
null
is returned if dateString
is not a valid date.
Parameters:
dateString: ( String ) A valid date in format ISO 8601.
YYYY-MM-DD | YYYY/MM/DD | YYYY MM DD
checkIso8601separator: ( Boolean ) Whether or not to check for the ISO 8601 date separators / - " "(space).
Return value:
String | null
Polyfills you may need: None
getElementOffset( element )
Get element offset top and left.
Parameters:
elements: ( NodeList | HTML Element | Selector )
Return value:
Object
Polyfills you may need: None
getElements( elements[, parent] )
Get an array of elements from the passed elements and, optionally, from a parent.
Parameters:
elements: ( NodeList | HTML Element | Selector | Array of HTML Elements )
parent: ( Document | NodeList | HTML Element | Selector | Array of HTML Elements )
Return value:
Array
Polyfills you may need: None
getFilledFields( formEl )
Get an array with all the form fields with a set value.
Parameters:
formEl: ( NodeList | HTML Element | Selector )
Return value:
Array
Polyfills you may need: None
getUniqueFields( formEl )
Get an array with all the unique form fields. Unique fields are retrieved by type and name attributes.
Parameters:
formEl: ( NodeList | HTML Element | Selector )
Return value:
Array
Polyfills you may need: None
getUrlParameter( [parameterName] )
Get the value of the specified parameter name.
If the parameter has no value, true
is returned.
If parameterName
is falsy, it will return all the parameters as array of objects ( key/value ).
Parameters:
parameterName: ( String )
Return value:
String | Boolean | Array
Polyfills you may need: None
isDomNode( node )
Check if the passed node
is a DOM Node or not.
Parameters:
node: ( Any )
Return value:
Boolean
Polyfills you may need: None
isEmptyObject( obj )
Check if the passed obj
is an empty object or not.
Parameters:
obj: ( Any )
Return value:
Boolean
Polyfills you may need: None
isFieldForChangeEvent( fieldEl )
Check if the passed fieldEl
is eligible for a "change" event listener.
Parameters:
fieldEl: ( Any )
Return value:
Boolean
Polyfills you may need: None
isMobile
Check the user agent string to return if used device is mobile or not.
For detailed infos ( OS/Browser name, version etc... ) you can use device-detector-js or else.
Return value:
Boolean
Polyfills you may need: None
isNodeList( nodeList )
Check if the passed nodeList
is a NodeList or not.
Parameters:
nodeList: ( Any )
Return value:
Boolean
Polyfills you may need: None
isPlainObject( obj )
Check if the passed obj
is a plain object or not.
Parameters:
obj: ( Any )
Return value:
Boolean
Polyfills you may need: None
isValidDate( dateString )
Check if the passed dateString
is valid date for ISO 8601 format.
Parameters:
dateString: ( Any )
Return value:
Boolean
Polyfills you may need: None
isValidEmail( emailString[, checkRfc5322 = false] )
Check if the passed emailString
is valid email.
Parameters:
Return value:
Boolean
Polyfills you may need: None
isValidSelector( stringSelector )
Check if the passed stringSelector
is valid CSS selector.
Parameters:
stringSelector: ( Any )
Return value:
Boolean
Polyfills you may need: None
mergeObjects( out )
Deep merge of objects, from left to right.
To return a completely new object, pass {}
as first argument.
Arrays are not deeply merged but completely replaced.
Parameters:
out: ( Object )
Return value:
Object
Polyfills you may need: None
removeAllWhiteSpaces( string )
Remove all the white-spaces from the passed string.
Parameters:
string: ( String )
Return value:
String
Polyfills you may need: None
removeClass( elements, cssClasses )
Remove the specified css class(es) to the specified HTML element(s).
Parameters:
elements: ( NodeList | HTML Element | Selector | Array of HTML Elements )
cssClasses: ( String ) One or more space-separated css classes to be added.
Return value:
Array of elements as returned by getElements from the passed elements
.
Polyfills you may need: None
removeMulitpleWhiteSpaces( string )
Remove consecutive multiple white-spaces from the passed string.
If two or more consecutive white-spaces are found, only one will remain.
Parameters:
string: ( String )
Return value:
String
Polyfills you may need: None
removeUrlHash()
Remove the hash from the url.
Polyfills you may need: None
replaceTemplateStrings( obj, string = '' )
Take each key of the passed obj
and replace it in string
with the corresponsing value.
Key names in string must be wrapped, like: {{name}}
Parameters:
obj: ( Object ) Object with keys and values to replace in stringHTML
string: ( String ) String containing wrapped keys to be replaced
Return value:
String
Polyfills you may need: None
runCallback( fn, data, options )
Run the passed function ( or array of functions ) passing to it/them data
and options
.
Parameters:
fn: ( Function | Array of Functions )
data: ( Object ) Data passed to each function.
options: ( Object ) Options passed to each function.
Polyfills you may need: None
runFunctionsSequence( functionsList, data, stopConditionFn )
Run the passed array of functions/promises as sequence and passing to them data
.
Parameters:
functionsList: ( Array of Functions/Promises )
data: ( Object ) Data passed to each function/promise.
stopConditionFn: ( Function ) Function used as condition at each funciton/promise running to check if the sequence must stop or not.
It must have a return statement: if true
the execution will stop.
Return value:
Promise with all the data objects as returned by each function/promise ( if return statement is set ).
Polyfills you may need: None
serializeObject( obj )
Convert a JavaScript object to a url-encoded string.
Parameters:
obj: ( Object )
Return value:
String
Polyfills you may need: None
slideDown( element[, options[, callback]] )
Display the matched elements with a sliding motion.
Parameters:
element: ( NodeList | HTML Element | Selector | Array of HTML Elements )
options: ( Object )
0
) In milliseconds, determining how long to wait before the animation will run.
400
) In milliseconds, determining how long the animation will run.
'ease'
) Easing function to use for the transition.
'block'
) CSS display value to set after sliding motion.
callback: ( Function ) Executed once the animation is complete, called once per matched element.
Polyfills you may need: None
slideToggle( element[, options[, callback]] )
Display or hide the matched elements with a sliding motion.
Parameters:
element: ( NodeList | HTML Element | Selector | Array of HTML Elements )
options: ( Object )
0
) In milliseconds, determining how long to wait before the animation will run.
400
) In milliseconds, determining how long the animation will run.
'ease'
) Easing function to use for the transition.
'block'
) CSS display value to set after sliding motion.
callback: ( Function ) Executed once the animation is complete, called once per matched element.
Polyfills you may need: None
slideUp( element[, options[, callback]] )
Hide the matched elements with a sliding motion.
Parameters:
element: ( NodeList | HTML Element | Selector | Array of HTML Elements )
options: ( Object )
0
) In milliseconds, determining how long to wait before the animation will run.
400
) In milliseconds, determining how long the animation will run.
'ease'
) Easing function to use for the transition.
callback: ( Function ) Executed once the animation is complete, called once per matched element.
Polyfills you may need: None
setUrlHash( hashValue )
Set the passed hashValue
as url hash.
Parameters:
hashValue: ( String )
Polyfills you may need: None
toCamelCase( string )
Convert the passed string
to a camel-case string (eg: "helloMyFriend").
Parameters:
string: ( String )
Return value:
String
Polyfills you may need: None
toggleClass( elements, cssClasses, force )
Toggle the specified css class(es) to the specified HTML element(s).
Parameters:
elements: ( NodeList | HTML Element | Selector | Array of HTML Elements )
cssClasses: ( String ) One or more space-separated css classes to be toggled.
force: ( Boolean ) If included, turns the toggle into a one way-only operation. If set to false
, then css class(es) will only be removed, but not added. If set to true
, then css class(es) will only be added, but not removed.
Return value:
Array of elements as returned by getElements from the passed elements
.
Polyfills you may need: None
toKebabCase( string, useAllCaps = false )
Convert the passed string
to a kebab-case string (eg: "hello-my-friend").
Parameters:
string: ( String )
useAllCaps: ( Boolean ) Whether or not to transform the string in all-caps.
Return value:
String
Polyfills you may need: None
toPascalCase( string )
Convert the passed string
to a pascal-case string (eg: "HelloMyFriend").
Parameters:
string: ( String )
Return value:
String
Polyfills you may need: None
toSnakeCase( string, useAllCaps = false )
Convert the passed string
to a snake-case string (eg: "hello_my_friend").
Parameters:
string: ( String )
useAllCaps: ( Boolean ) Whether or not to transform the string in all-caps.
Return value:
String
Polyfills you may need: None
webStorage
This is useful to check if web storage is available in the browser ( local storage and session storage ) and to extend its functionalities.
Call webStorage.extend()
will add these new methods for web storage ( if web storage is available ):
Storage.prototype.getObject( name )
name: ( String ) The name for the web storage to retrieve.
This method will return a JavaScript object with the saved web storage infos.
Storage.prototype.setObject( name, object )
name: ( String ) The name for the web storage.
object: ( Object ) A JavaScript object to store in web storage.
Storage.prototype.mergeItem( name, object )
name: ( String ) The name for the web storage to merge the object in.
object: ( Object ) A JavaScript object to store in web storage.
Return value:
{
isAvailable: Boolean,
extend: Function
}
Polyfills you may need: None
If you find a bug, please report it here


This project was made by a small group of Lambda students over the course of 3 1/2 days. Click on each team-members name for links to their github.


Full-Stack Software Engineer from Madrid (Spain).
(Madrid, Spain) After 6 months of internship I joined Amazon again as part of a small agile team at Amazon Business International, developing new initiatives for Amazon's global business.
(Madrid, Spain) My main duty was to integrate NoesisGUI (a proprietary user interface middleware) in a web application to make it easy to share content with clients.
(Madrid, Spain) Development of a communications reporting tool used to store and manage impacts on the media made by researchers. This web application is also a Business Intelligence tool that is able to generate real-time reports and statistics. It is also my first project using Docker for deployment.
(San Francisco, CA) I was grader and assistant for CSC645 Computer Networks class with Professor Joseph Kang PhD during Spring 2019 semester. I was also responsible of designing and teaching labs with topics such as Internet Protocols, Packet Sniffing with Wireshark, Online security and more.
(Los Angeles, CA) Assisted CEO in his daily tasks, helped controller manage the company’s accounting.
I was part of an exchange program for a full academic year, I took really interesting classes including Web Applications development and Design, Computer Networks and Software Engineering. I also had the opportunity to be a Teacher assistant and attend several Hackathons and Conferences in SF Bay Area.
September 2019 - March 2020
Developed a web application to write, share and render user interfaces in real time using xaml and a proprietary UI middleware developed by Noesis Technologies. I am working as a full stack developer using React and integrating the tool with external APIs such as Github Gist to manage content.
Source Code View ProjectSummer 2019
Communications-Reporting Tool is a web application I made during my internship at IMDEA Networks Institute that can be used to analyse the impact of scientific research on the media. The main purpose for developing this tool is to provide a simple, yet powerful way of keeping track of all the information about the media impact of the institute and make it easy to extract statistics in real time.
May 2019
CosmoQuiz is an iOS app that uses Nasa's API to generate random Astronomy Pictures of the Day (APOD) from the archive. Users of CosmoQuiz can solve quizes related to this pictures and learn about the universe. Built with swift using Firebase for the backend and Nasa's open API's for the content.
Source CodeMarch 2019
This is my first Unity project, I have learned how to create a basic structure for a 3D game as well as interacting with objects using C#. I also used packages such as ProBuilder and ProGrids.
Source Code View ProjectFebruary 2019
I built this iOS app with my teammate in SFHacks 2019, a hackathon at San Francisco State University. It is a basic Ride sharing app for students.
Source Code View ProjectFall 2018
Led a team of 7 people to launch a buy and sell online platform using modern software engineering tools.
Source Code View ProjectFall 2018
Multiplayer online game built with Node.js, Express, Socket.io and Postgress.
Source Code View Project


angular-vega
You can databind any part of the vega spec: x(1) =
bar color =
steelblue
red
green
renderer:
canvas
svg
data:
data#1
data#2
All charts on this page are bound to the same spec.
Same chart but rendered with svg instead of canvas.
Same chart but rendered with selected option ({{renderer}}).


I'm so cool
TEXT SHADOWS ARE COOL
These text fields look like buttons, right?
We are not buttons :)
We are not buttons :)


public final class UIExecutorService
extends java.lang.Object
implements java.util.concurrent.ExecutorService
This is done to allow UI codes to be part of UI IThreadType
so that IAltFuture
objects can be easily defined to
execute on the UI thread in Async.UI
vs background worker threads.
Since the system UI thread runs forever, not all ExecutorService
items, for example related to lifecycle. make sense to implement.
| Constructor and Description |
|---|
UIExecutorService(android.os.Handler handler) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
awaitTermination(long timeout,
java.util.concurrent.TimeUnit unit)
Blocks until all tasks have completed execution after a shutdown
request, or the timeout occurs, or the current thread is
interrupted, whichever happens first.
|
void |
execute(java.lang.Runnable command)
Executes the given command at some time in the future.
|
<T> java.util.List<java.util.concurrent.Future<T>> |
invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>> callables)
Executes the given tasks, returning a list of Futures holding
their status and results when all complete.
|
<T> java.util.List<java.util.concurrent.Future<T>> |
invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>> callables,
long timeout,
java.util.concurrent.TimeUnit unit)
Executes the given tasks, returning a list of Futures holding
their status and results
when all complete or the timeout expires, whichever happens first.
|
<T> T |
invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>> callables)
Executes the given tasks, returning the result
of one that has completed successfully (i.e., without throwing
an exception), if any do.
|
<T> T |
invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>> callables,
long timeout,
java.util.concurrent.TimeUnit unit)
Executes the given tasks, returning the result
of one that has completed successfully (i.e., without throwing
an exception), if any do before the given timeout elapses.
|
boolean |
isShutdown()
Returns
true if this executor has been shut down. |
boolean |
isTerminated()
Returns
true if all tasks have completed following shut down. |
void |
shutdown()
Initiates an orderly shutdown in which previously submitted
tasks are executed, but no new tasks will be accepted.
|
java.util.List<java.lang.Runnable> |
shutdownNow()
Attempts to stop all actively executing tasks, halts the
processing of waiting tasks, and returns a list of the tasks
that were awaiting execution.
|
<T> java.util.concurrent.Future<T> |
submit(java.util.concurrent.Callable<T> callable)
Submits a value-returning task for execution and returns a
Future representing the pending results of the task.
|
java.util.concurrent.Future |
submit(java.lang.Runnable runnable)
Submits a Runnable task for execution and returns a Future
representing that task.
|
<T> java.util.concurrent.Future<T> |
submit(java.lang.Runnable runnable,
T result)
Submits a Runnable task for execution and returns a Future
representing that task.
|
public void shutdown()
java.util.concurrent.ExecutorService
This method does not wait for previously submitted tasks to
complete execution. Use awaitTermination
to do that.
shutdown
in interface java.util.concurrent.ExecutorService
public java.util.List<java.lang.Runnable> shutdownNow()
java.util.concurrent.ExecutorService
This method does not wait for actively executing tasks to
terminate. Use awaitTermination
to
do that.
There are no guarantees beyond best-effort attempts to stop
processing actively executing tasks. For example, typical
implementations will cancel via Thread.interrupt()
, so any
task that fails to respond to interrupts may never terminate.
shutdownNow
in interface java.util.concurrent.ExecutorService
public boolean isShutdown()
java.util.concurrent.ExecutorService
true
if this executor has been shut down.isShutdown
in interface java.util.concurrent.ExecutorService
true
if this executor has been shut downpublic boolean isTerminated()
java.util.concurrent.ExecutorService
true
if all tasks have completed following shut down.
Note that isTerminated
is never true
unless
either shutdown
or shutdownNow
was called first.isTerminated
in interface java.util.concurrent.ExecutorService
true
if all tasks have completed following shut downpublic boolean awaitTermination(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
java.util.concurrent.ExecutorService
awaitTermination
in interface java.util.concurrent.ExecutorService
timeout
- the maximum time to waitunit
- the time unit of the timeout argumenttrue
if this executor terminated and
false
if the timeout elapsed before terminationjava.lang.InterruptedException
- if interrupted while waitingpublic <T> java.util.concurrent.Future<T> submit(java.util.concurrent.Callable<T> callable)
java.util.concurrent.ExecutorService
get
method will return the task's result upon
successful completion.
If you would like to immediately block waiting
for a task, you can use constructions of the form
result = exec.submit(aCallable).get();
Note: The Executors
class includes a set of methods
that can convert some other common closure-like objects,
for example, PrivilegedAction
to
Callable
form so they can be submitted.
submit
in interface java.util.concurrent.ExecutorService
callable
- the task to submitpublic <T> java.util.concurrent.Future<T> submit(java.lang.Runnable runnable, T result)
java.util.concurrent.ExecutorService
get
method will
return the given result upon successful completion.submit
in interface java.util.concurrent.ExecutorService
runnable
- the task to submitresult
- the result to returnpublic java.util.concurrent.Future submit(java.lang.Runnable runnable)
java.util.concurrent.ExecutorService
get
method will
return null
upon successful completion.submit
in interface java.util.concurrent.ExecutorService
runnable
- the task to submitpublic <T> java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>> callables) throws java.lang.InterruptedException
java.util.concurrent.ExecutorService
Future.isDone()
is true
for each
element of the returned list.
Note that a completed task could have
terminated either normally or by throwing an exception.
The results of this method are undefined if the given
collection is modified while this operation is in progress.invokeAll
in interface java.util.concurrent.ExecutorService
callables
- the collection of tasksjava.lang.InterruptedException
- if interrupted while waiting, in
which case unfinished tasks are cancelledpublic <T> java.util.List<java.util.concurrent.Future<T>> invokeAll(java.util.Collection<? extends java.util.concurrent.Callable<T>> callables, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
java.util.concurrent.ExecutorService
Future.isDone()
is true
for each
element of the returned list.
Upon return, tasks that have not completed are cancelled.
Note that a completed task could have
terminated either normally or by throwing an exception.
The results of this method are undefined if the given
collection is modified while this operation is in progress.invokeAll
in interface java.util.concurrent.ExecutorService
callables
- the collection of taskstimeout
- the maximum time to waitunit
- the time unit of the timeout argumentjava.lang.InterruptedException
- if interrupted while waiting, in
which case unfinished tasks are cancelledpublic <T> T invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>> callables) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
java.util.concurrent.ExecutorService
invokeAny
in interface java.util.concurrent.ExecutorService
callables
- the collection of tasksjava.lang.InterruptedException
- if interrupted while waitingjava.util.concurrent.ExecutionException
- if no task successfully completespublic <T> T invokeAny(java.util.Collection<? extends java.util.concurrent.Callable<T>> callables, long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
java.util.concurrent.ExecutorService
invokeAny
in interface java.util.concurrent.ExecutorService
callables
- the collection of taskstimeout
- the maximum time to waitunit
- the time unit of the timeout argumentjava.lang.InterruptedException
- if interrupted while waitingjava.util.concurrent.ExecutionException
- if no task successfully completesjava.util.concurrent.TimeoutException
- if the given timeout elapses before
any task successfully completespublic void execute(java.lang.Runnable command)
java.util.concurrent.Executor
Executor
implementation.execute
in interface java.util.concurrent.Executor
command
- the runnable task


Model UN
Bridging the Education Gap and Creating Global Citizens
Model United Nations is an authentic simulation of the UN General Assembly, UN Security Council, or other multilateral body, which introduces students to the world of diplomacy, negotiation, and decision making.
At Model UN, students step into the shoes of ambassadors of countries that are members of the UN, from Argentina to Zimbabwe. The students, better known as “delegates”, debate current issues on the organization’s vast agenda. They prepare draft resolutions, plot strategy, negotiate with supporters and adversaries, resolve conflicts, and navigate the UN’s rules of procedure – all in the interest of resolving problems that affect the world.
Before playing out their ambassadorial roles in Model UN, students research the particular global problem to be addressed. The problems are drawn from today’s headlines. Model UN delegates learn how the international community acts on its concerns about peace and security, human rights, the environment, food and hunger, economic development, and globalization.
Model UN delegates also look closely at the needs, aspirations, and foreign policy of the country they will “represent” at the event. The insights they gain from their exploration of history, geography, mathematics, culture, economics, and science contribute to the authenticity of the simulations once the actual role-playing gets underway, and ensures a lively and memorable experience.
Model UN not only involves young people in the study and discussion of global issues, but also encourages the development of skills useful throughout their lives – skills including research techniques, writing, public speaking, problem-solving, conflict resolution, compromise, and cooperation.
The popularity of participating in Model UN has contributed to the rapid growth of this activity over the past several decades. Many Model UN participants are repeaters, since the spirit of these simulations creates an appétit for this activity more commonly known as “M-U-N Fever”.
In fact, quite a few of today’s leaders in law, government, business, and the arts participated in Model UN during their academic careers – from U.S. Supreme Court Justice Stephen Breyer, to Chelsea Clinton and actor Samuel L. Jackson (Pulp Fiction).
As many states move to implement standards for global citizenship, Model UN is proving to be an innovative resource to prepare students for career and college success.


HEGE
You are a few steps away from your next buy.
If you make a new account on our platform you have the advantage of the latest headwear items.
Loading...


---
layout: archive
title: Lean Prover Zulip Chat Archive
permalink: 113488general/65968LeostalkinOxford.html
---
The archive URL format has changed. Please find this page at:
https://leanprover-community.github.io/archive/stream/113488-general/topic/Leo's.20talk.20in.20Oxford.html


Greet the first flower in full bloom
Go out for a walk...
The sun was bright and early.  Gradually, the sun fills the sky with its brilliance and a warm glow. The yolk looking sun has turned from yellowish brown to golden. Everyone is coming out and enjoying the warm and beautiful day, feeling the gentle heat. We celebrate the new year and appreciate the sun.
The flower that had been a tight bud only days ago had begun to open, already had a deeper blush of pink. The winter should still be in force but already spring had pushed it back to moderate temperatures and the kind of gentle breeze you don't notice unless you stop and be present in the moment. Just to watching them tumble will bring back memories of weddings, my own included. Fun times, beautiful times...


Before Change
temp = util.convert(state.state, float)
if temp is None:
self._cur_temp = None
self._unit = None
_LOGGER.error("Unable to parse sensor temperature: %s",
state.state)
return
self._cur_temp = temp
self._unit = unit
def _control_heating(self):
After Change
Update thermostat with latest state from sensor.
unit = state.attributes.get(ATTR_UNIT_OF_MEASUREMENT)
try:
self._cur_temp = self.hass.config.units.temperature(
float(state.state), unit)
except ValueError as ex:
_LOGGER.error("Unable to update from sensor: %s", ex)
def _control_heating(self):
Check if we need to turn heating on or off.
if not self._active and None not in (self._cur_temp,
self._target_temp):


Toggle navigation
×
Add account
Address
Private key
×
Buy
Order
Amount
×
Sell
Order
Amount
×
Other token
Address
Name
Decimals
×
Other base
Address
Name
Decimals


Experimental: This is an experimental feature that could change without warning.
BibTeX Tidy allows you to generate new keys for each BibTeX entry using a template language based on the JabRef key pattern.
You can either use the default template
[auth:required:lower][year:required][veryshorttitle:lower][duplicateNumber]
or specify a custom template.
You can include any text in the template. Any text within square braces will be evaluated as markers.
Write [PUBLISHER]
to output the publisher field. Note that
invalid characters (such as spaces) will be removed. The output can be
adjusted using modifiers (see Modifiers section below).
[auth]
: Last name of first authors[authEtAl]
: If 1 or 2 authors, both authors, otherwise first author and EtAl[authors]
: Last name all authors[authorsN]
: Last name N authors, with EtAl if more[veryshorttitle]
: First non-function word of the title[shorttitle]
: First three non-function words of the title[title]
: Full title, capitalized[fulltitle]
: Full title, verbatim[year]
: Year[duplicateLetter]
: If the multiple entries end up with the same key, then insert a letter a-z. By default this will be inserted at the end.[duplicateNumber]
: If the multiple entries end up with the same key, then insert a number.Function words: a, about, above, across, against, along, among, an, and, around, at, before, behind, below, beneath, beside, between, beyond, but, by, down, during, except, for, from, in, inside, into, like, near, nor, of, off, on, onto, or, since, so, the, through, to, toward, under, until, up, upon, with, within, without, yet
Modifiers allow you to change the output of a marker. For example,
[PUBLISHER:lower]
will output the publisher field in
lowercase.
:required
: If data is missing, revert to existing key:lower
: Convert to lowercase:upper
: Convert to uppercase:capitalize
: Capitalize first letter of each word


Clipt
A cross-machine clipboard powered by Node.js
$ git clone https://github.com/nasawa/clipt.git
$ nodejs client.js clipt.azurewebsites.net [id]


bidfresh by Schoolyard Booleans
The bidfresh platform consists of two components: the administrator web console and the iPhone bidder application.
The administrator web console allows organizations to create auctions, add items, monitor auction progress, view donors, and verify payments of items.
The iPhone application is for bidders at the auctions. Through the app users can search through auction items,
place bids, view bidding history and get notified when they have been outbid
Salesforce app Installation
Install the bidfresh app in your salesforce organization...
- Downlaod the app from the folowing url: https://login.salesforce.com/packaging/installPackage.apexp?p0=04tj0000000WOCs
- Press the 'Continue' button
Set up the bidfresh Connected App
- Go to setup -> develop -> sites
- Enter a subdomain.
- click "new" to create a new site
- Enter "bidfresh" as the site label, site name, and default web address
- specify the "Active Site Home Page" as any page… the value doesn't matter
- make sure the site is "active" and that "require https" is enabled
- on your new site, goto Public Access Settings -> enabled apex class access (near bottom)
- Of available classes, selected the following ones for public access:
- AuctionGrabber
- AuctionVenueGrabber
- FinishRegister
- ItemGrabber
- LoginUser
- NonprofitGroupGrabber
- PostingAuctionItemBid
- SingleNonprofitGrabber
- getBidderBids
Administrator Web Console Installation
To view the admin console...
- go to the following url: https://schoolyardbooleans-auction-app.herokuapp.com/oauth
- Press the 'Login with Salesforce' button
- For the Username, enter<EMAIL_ADDRESS>- For the password, enter penguin2
- You are now logged into the administrator web console. Feel free to explore!
Bidder iPhone Application Installation
To use the iPhone application...
- Clone the git repository https://github.com/SchoolyardBooleans/AuctionAppiOS.git
- Open the project in XCode (version 6.3 or greater). Go to File->Open and click on the folder of the cloned project
- Run the project on an iPhone 5 or 6 emulator or load it onto your phone


Version 0.9
Written by Doug Neiner
Additional Programming by Alexandre Leray, Tiou Lims, and Dennis Stevense (for Digital Deployment)
Open Sourced under the MIT License
Based on code and concept by Janko Jovanovic in his article: Automatically generate table of contents using jQuery .
This plugin creates a table of contents based on the

through

tags of a webpage, or subset of a webpage. It auto generates slug-like id’s for linking if they are not present already, can optionally add “Top” links to each heading, offers the choice of nested

or

lists or straight
links, and can optionally create a proportionate display based on the positioning of the headings.
Include the jQuery library and the Table of Contents Plugin

And call the plugin on an empty container element:

The container element determines the type of list that is displayed. A

container will produce a nested ordered list. A

container will produce a nested bulleted list. Any other container will produce a straight list of links, no nesting.
You cannot use ul
or

containers in combination with the proportionateSpacing
option.
The tableOfContents
method takes two parameters:
$("#table-of-contents-container").tableOfContents(scope, options)
scope
(default: document.body
)If provided, the scope must be a valid jQuery selector (as a string), jQuery collection object, or null. If scope isn’t null
or undefined
, it will limit the searching of the plugin to only that object and its children. If scope is null
or undefined
, then it defaults to document.body
.
options
(name
: default
)The following are the options that can accompany the function call:
$("#toc").tableOfContents(null, { optionName: "optionValue" } );
or can be set ahead of time by changing the defaultOptions object:
$.TableOfContents.defaultOptions.optionName = "optionValue";
startLevel
: 1
depth
: 3
startLevel
and depth
work together to create a range for the Table of Contents. startLevel
sets the lowest H tag that should be included. If you wanted your root elements to be all the

tags, you would set this option to 2
. depth
sets how deep you want your Table of Contents to be, including the startLevel
. If you wanted to have your root elements be the

tags, and wanted to also show

,

and

tags, you would set startLevel
to 2
and depth
to 4
.levelClass
: "toc-depth-%"

or a

, then a special class is applied to each link, specifying its depth in relation to the startLevel
. First level = 1, second level = 2, etc. You can change this setting, but be sure to include the % sign as it is replaced with the actual depth before being applied to the link.levelText
: "%"
topLinks
: false
true
or to the text/html you want it to display. If set to true
it defaults to using the word “Top” as the text for the link.topLinkClass
: toc-top-link
topBodyId
: toc-top
body
element. If no id is present, this id will be applied to the body
element.proportionateSpacing
: false
true
. If you set this to true you cannot use

or

as your container. Your container cannot have the CSS position
of static
. It must “haveLayout” by using the position
value of fixed
, absolute
or relative
. Finally, your container must have a fixed height.


--- layout: sketchbook title: Hello Three.js class: sketchbook-201905-three description: A hello, world for Three.js ---


This is a demo to show Visual Search using features extracted from Inception V3 Tenosrflow implementation
Upload an image to try