By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
| # db/migrate/20101004063749_create_photos.rb | |
| class CreatePhotos < ActiveRecord::Migration | |
| def self.up | |
| create_table :photos do |t| | |
| t.string :name, :null => false | |
| t.binary :data, :null => false | |
| t.string :filename | |
| t.string :mime_type | |
| t.timestamps |
| http://stackoverflow.com/questions/22667401/postgres-json-data-type-rails-query | |
| http://stackoverflow.com/questions/40702813/query-on-postgres-json-array-field-in-rails | |
| #payload: [{"kind"=>"person"}] | |
| Segment.where("payload @> ?", [{kind: "person"}].to_json) | |
| #data: {"interest"=>["music", "movies", "programming"]} | |
| Segment.where("data @> ?", {"interest": ["music", "movies", "programming"]}.to_json) | |
| Segment.where("data #>> '{interest, 1}' = 'movies' ") | |
| Segment.where("jsonb_array_length(data->'interest') > 1") |
| /* | |
| * Convert from OpenCV image and write movie with FFmpeg | |
| * | |
| * Copyright (c) 2016 yohhoy | |
| */ | |
| #include <iostream> | |
| #include <vector> | |
| // FFmpeg | |
| extern "C" { | |
| #include <libavformat/avformat.h> |
| “body-parser”: “1.15.0”, | |
| “request”: “2.72.0”, | |
| “htmlparser”: “1.7.7”, | |
| “watson-developer-cloud”: “2.0.1” | |
| //note: add in dependencies |
| var express = require('express'); | |
| var request = require('request'); | |
| var bodyParser = require('body-parser'); | |
| var watson = require('watson-developer-cloud'); | |
| var app = express(); | |
| var contexid = ""; | |
| app.use(bodyParser.urlencoded({ extended: false })) | |
| app.use(bodyParser.json()) |
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
| #include <sys/types.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #include <event.h> | |
| #include <evhttp.h> |
| import { Component, Input } from '@angular/core'; | |
| import { Router } from '@angular/router'; | |
| import { AngularFire, FirebaseListObservable } from 'angularfire2'; | |
| import { Observable } from 'rxjs'; | |
| declare var firebase: any; | |
| interface Image { | |
| path: string; |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <netinet/tcp.h> | |
| #include <sys/socket.h> | |
| #include <sys/types.h> | |
| #include <netinet/in.h> |