This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as effects from "redux-saga/effects"; | |
import { END, eventChannel } from "redux-saga"; | |
import * as constants from "../actions/constants"; | |
import io from "socket.io-client"; | |
export function* processTaskTimeConsuming() { | |
yield effects.delay(3000 + 1000 * Math.random()); | |
} | |
function* doProcessTask(name) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as effects from "redux-saga/effects"; | |
import * as constants from "../actions/constants"; | |
function* processTaskTimeConsuming() { | |
yield effects.delay(1000 + 1000 * Math.random()); | |
return true; | |
} | |
function* doProcessTask(name) { | |
try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as effects from "redux-saga/effects"; | |
import * as constants from "../actions/constants"; | |
function* processTaskTimeConsuming() { | |
yield effects.delay(1000 + 1000 * Math.random()); | |
} | |
function* doProcessTask(name) { | |
try { | |
yield effects.put({ type: constants.TASK_PROCESS_START, name }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as effects from "redux-saga/effects"; | |
import * as constants from "../actions/constants"; | |
function* processTaskTimeConsuming() { | |
yield effects.delay(1000 + 1000 * Math.random()); | |
} | |
function* doProcessTask(name) { | |
try { | |
yield effects.put({ type: constants.TASK_PROCESS_START, name }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as effects from "redux-saga/effects"; | |
import * as constants from "../actions/constants"; | |
function* processTaskTimeConsuming() { | |
yield effects.delay(1000 + 1000 * Math.random()); | |
if (Math.random() > 0.5) { | |
return true; | |
} else { | |
throw new Error("Something is not right!"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Math.Vector3 exposing (..) | |
import WebGL exposing (..) | |
import Html exposing (Html) | |
import Html.App as Html | |
import Html.Attributes exposing (width, height, style) | |
-- Create a mesh with a triangle and a square | |
type alias Vertex = { position : Vec3 } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Builder extends ContainerAware | |
{ | |
public function adminMenu(FactoryInterface $factory, array $options) | |
{ | |
$menu = $factory->createItem('root'); | |
$menu->setChildrenAttribute('class', 'nav'); //esto es el tema | |
$menu->setCurrentUri($this->container->get('request')->getRequestUri()); | |
... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.Math.*; | |
public class Progressbar { | |
private int max; | |
private int current; | |
private String name; | |
private long start; | |
private long lastUpdate; | |
public Progressbar(int max, String name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SYMFREPO="git://symfony-git.git.sourceforge.net/gitroot/symfony-git/symfony-git" | |
DBUSER="root" | |
DBPASS="" | |
VENDOR_DIR="lib/vendor/symfony" | |
if [ -z "$DBPASS" ]; then | |
echo edit setupsymfony.sh to add your mysql password on line 4: DBPASS=\"password\" | |
exit |