You can display / refresh / add participants by passing to the participants
property an array of participants. See the examples below:
Displaying some participants:
participants = [
// prettified version of what can be found here: | |
// https://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Longest_common_subsequence#JavaScript | |
function LCS(a, b) { | |
var m = a.length, | |
n = b.length, | |
C = [], | |
i, | |
j; | |
for (i = 0; i <= m; i++) C.push([0]); |
// Initialize with UUID (from successful authentication response with backend) | |
var p = PUBNUB.init({ | |
publish_key: "...", | |
subscribe_key: "...", | |
uuid: "0c2340c2-8cc1-4898-8868-444ba77d02d2::web" | |
}); |
<?php | |
class TailRecursion | |
{ | |
public $func; | |
public $acc; | |
public $recursing; | |
public function tail() | |
{ | |
return call_user_func_array($this->func, func_get_args()); |
log = console.log.bind(console); | |
maybe = v => { | |
function * f () { | |
if (v) yield v; | |
} | |
f.bind = f => | |
v ? f(v) : maybe(); |
<?php | |
namespace Infun\HttpFoundation\File; | |
use Symfony\Component\HttpFoundation\File\File; | |
class ApiUploadedFile extends File | |
{ | |
public function __construct($base64Content) |
npm install -g create-react-app
Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.
// connect() is a function that injects Redux-related props into your component. | |
// You can inject data and callbacks that change that data by dispatching actions. | |
function connect(mapStateToProps, mapDispatchToProps) { | |
// It lets us inject component as the last step so people can use it as a decorator. | |
// Generally you don't need to worry about it. | |
return function (WrappedComponent) { | |
// It returns a component | |
return class extends React.Component { | |
render() { | |
return ( |
var mediaJSON = { "categories" : [ { "name" : "Movies", | |
"videos" : [ | |
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ], | |
"subtitle" : "By Blender Foundation", | |
"thumb" : "images/BigBuckBunny.jpg", | |
"title" : "Big Buck Bunny" | |
}, | |
{ "description" : "The first Blender Open Movie from 2006", | |
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ], |