You probably came here because your code is calling your component as a plain function call. This is now deprecated:
var MyComponent = require('MyComponent');
function render() {
return MyComponent({ foo: 'bar' }); // WARNING| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "net/http" | |
| ) | |
| type test_struct struct { | |
| Test string |
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
| " Set up Vundle to manage plugins | |
| set nocompatible | |
| filetype off | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() | |
| " let Vundle manage Vundle, required | |
| Plugin 'gmarik/vundle' |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/usr/bin/env ruby | |
| # Author : Emad Elsaid (https://github.com/blazeeboy) | |
| # it turns out that BBC website has a printable version of | |
| # the top 40 UK singles chart, that made me jump of joy :D | |
| require 'open-uri' | |
| # get BBC singles chart printable version | |
| page = open('http://www.bbc.co.uk/radio1/chart/singles/print').read | |
| # result has data as table so we'll extract keys from TH tags |
Command Line
pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb - load your rails into a pry sessionDebugger
| 'use strict'; | |
| var _ = require('lodash'); | |
| var keystone = require('keystone'); | |
| var range_check = require('range_check'); | |
| var util = require('util'); | |
| /** | |
| * | |
| */ |
I have following object:
var cities={10:'Tashkent', 14:'Karakalpakiya', 16:'Andijan'};I want sort it by city names, so after sort it should be:
var cities={16:'Andijan', 14:'Karakalpakiya', 10:'Tashkent'};But I can't sort object properties, instead can convert object into array, then sort items.
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |