Askabt creates chat rooms where users can connect from the Askabt widget (embedded on your site or app), as well as from their Gmail chat, when they're not using your site or app. This document describes how you can build applications that use Askabt to create chat communities within your app.
jQuery.fn.fixInView = function() { | |
var lastTop = 0, | |
columns = this, | |
$ = jQuery; | |
function reposition() { | |
var top = $(window).scrollTop(), | |
height = $(window).height(), | |
up = lastTop > top; | |
{ | |
"stations": { | |
"dhoby_ghaut": { | |
"name": "Dhoby Ghaut", | |
"lat": 1.298593, | |
"lon": 103.845909 | |
}, | |
"bras_basah": { | |
"name": "Bras Basah", | |
"lat": 1.296931, |
I hereby claim:
- I am aravindet on github.
- I am aravindet (https://keybase.io/aravindet) on keybase.
- I have a public key ASAD2M9v4IENHsTyWuQavGKDi5Jp6bvK-mJJZ38Di7g4WAo
To claim this, I am signing this object:
/* | |
Lets take any run-of-the-mill recursive algorithm, like factorial: | |
const factorial = n => (n <= 1) ? 1 : n * factorial(n - 1); | |
We want to break this computation up and do it during idle time, | |
yielding to the browser when there's high priority stuff to do like | |
handling events or painting the scren. | |
*/ |
Currently (March 2019) IE11 still needs to be supported, and this requires async/await to be transpiled. Babel's built-in path is to transform async-to-generator and use regenerator-runtime, which adds a significant bundle size penalty.
It would be preferable to transpile async/await to a Promise chain. There are several projects:
- Kneden which is incomplete and seems abandoned
- rpetrich's transform turns into a callback pyramid and not a promise chain
- fast-async which focuses on runtime performance and not bundle size.
After spending hours trying to find a half-decent API reference for the Selenium WebDriver JS (NodeJS) API, I resorted to examining the object. Properties of the driver
object:
{
controlFlow: [Function],
schedule: [Function],
getSession: [Function],
getCapabilities: [Function],
getCapability: [Function],
quit: [Function],
actions: [Function],
Postgres lacks convenient operators for modifying JSON or JSONB values. A common operation one might want to do is to change one property in a JSON column across multiple rows, like:
UPDATE example SET json_col = json_col || '{ "prop": true }'::jsonb WHERE <conditions>;
The ||
operator is the natural choice for this because it is also used for array and jstore concatenation in Postgres.
This short PLV8 function adds the JSON concatenation operator. It is significantly more powerful than the array and hstore counterparts, and are capable of: