const add = (x) => (y) => x + y;
const addTen = add(10);
const incerement = add(1)
console.log(addTen(4)); // 14
console.log(incremenet(5)); // 6
This file contains 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 | |
// more: http://baylorrae.com/php-pubsub/ | |
class PubSub | |
{ | |
private static $events = array(); // all subscriptions | |
// Don't allow PubSub to be initialized outside this class |
This file contains 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
/* eslint-disable no-unreachable */ | |
/* eslint-disable require-atomic-updates */ | |
// import _ from "lodash"; // LODASH is imported and used globally, configured in webpack | |
import axios from "axios" | |
import store from "store" // store is the Vuex store instance | |
import router from "router" // router is the Vue Router instance | |
import { warn, warnDialogParse } from "utils/alerts" // helpers to show alerts and error messages | |
// create an axios instance |
This file contains 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
<script> | |
import { isValidMultiName } from '@/util/folders' | |
import FOLDER_CURRENT from '@/graphql/folder/folderCurrent.gql' | |
import FOLDERS_FAVORITE from '@/graphql/folder/foldersFavorite.gql' | |
import FOLDER_OPEN from '@/graphql/folder/folderOpen.gql' | |
import FOLDER_OPEN_PARENT from '@/graphql/folder/folderOpenParent.gql' | |
import FOLDER_SET_FAVORITE from '@/graphql/folder/folderSetFavorite.gql' | |
import PROJECT_CWD_RESET from '@/graphql/project/projectCwdReset.gql' | |
import FOLDER_CREATE from '@/graphql/folder/folderCreate.gql' |
This file contains 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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Bootstrap Masonry Template</title> | |
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="style.css"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700"> |
- If you go there for a couple of days try to rent a room with AirBNB, is cheaper than hotels and you'll save a lot using the kitchen. Everything is really expensive in Colonia, so eating in a restaurant can be VERY expensive. I can recommend you a guy who is a developer and has an apartment for rent
- Buy some Uruguayan pesos before going there to have pocket cash. Don't use Argentinean pesos because they will take advantage of you. Don't buy uruguayan pesos in Colonia, do it in Argentina before traveling
- Don't withdraw Uruguayan pesos the ATM, do dollars and then if you need pesos you can sell dollars which will be much cheaper
- Not every business will accept the Payoneer card, but those who do, you need to tell them is a prepaid or debit card. You'll be asked to enter your PIN
- Ferries: Colonia Express is the cheapest, but their service is not as good as Buquebus. If you chose to do Buquebus buy your tickets in Seacat instead of doing it directly in BuqueBus
- If you go for the day
This file contains 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 {Injectable, EventEmitter} from 'angular2/core'; | |
@Injectable() | |
export class EmitterService { | |
private static _emitters: { [ID: string]: EventEmitter<any> } = {}; | |
static get(ID: string): EventEmitter<any> { | |
if (!this._emitters[ID]) | |
this._emitters[ID] = new EventEmitter(); | |
return this._emitters[ID]; |
This file contains 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
let child = require("child_process") | |
let source_map = require("source-map") | |
let SourceMapConsumer = source_map.SourceMapConsumer | |
let path = require("path") | |
var crypto = require('crypto'); | |
module.exports = function(source, sourceMap) { | |
this.cacheable() | |
this.async() | |
var self = this |
This file contains 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
public class ReactiveTextViewHolder<T> extends ReactiveViewHolder<T> { | |
private TextView label; | |
private T currentItem; | |
public ReactiveTextViewHolder(View itemView) { | |
super(itemView); | |
label = (TextView) itemView.findViewById(android.R.id.text1); | |
} |
This file contains 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 Vue from 'vue' | |
import { validationMixin } from 'vuelidate' | |
import { required, minLength } from 'vuelidate/lib/validators' | |
export default function (store) { | |
const validator = new Vue({ | |
mixins: [ | |
validationMixin | |
], | |
computed: { |
OlderNewer