I hereby claim:
- I am i-hun on github.
- I am ihun (https://keybase.io/ihun) on keybase.
- I have a public key ASBhm2M2hPPzVOZOB5EsVjOVTZquRH3ud-vu3GHQpELyKAo
To claim this, I am signing this object:
Notes to make IR shield (made by LinkSprite) work in Raspberry Pi 3 (bought from Amazon [1]). | |
The vendor has some documentation [2] but that is not complete and sufficient for Raspbian Stretch. | |
Following are the changes that I made to make it work. | |
$ sudo apt-get update | |
$ sudo apt-get install lirc | |
# Add the following lines to /etc/modules file | |
lirc_dev | |
lirc_rpi gpio_in_pin=18 gpio_out_pin=17 |
#! /usr/bin/env python | |
#-*- coding: utf-8 -*- | |
import json | |
import httplib2 | |
from datetime import datetime | |
from apiclient.discovery import build | |
from oauth2client.client import OAuth2WebServerFlow |
I hereby claim:
To claim this, I am signing this object:
from __future__ import division | |
from gensim import corpora, models, similarities, matutils | |
import numpy as np | |
import scipy.stats as stats | |
from scipy.sparse import linalg as splinalg | |
from scipy.sparse import * | |
import matplotlib.pyplot as plt | |
import h5py | |
from pymongo import MongoClient |
# Prototype | |
http://habrahabr.ru/post/117868/ | |
arguments -- переменная, доступная внутри функции и содержащая аргументы и ссылку на саму функцию. | |
Несмотря на доступ по индексу и наличие свойства length, arguments не является массивом, т.е не принадлежит типу Array. | |
Поэтому для arguments нельзя напрямую вызвать методы этого класса: | |
arguments.pop() // ошибка ! | |
Можно, однако, вызвать методы Array через apply/call: | |
var args = Array.prototype.slice.call(arguments, 0) //Мы вызываем метод slice прототипа Array от лица arguments. |
http://stackoverflow.com/questions/1122690/jquery-and-questions/1122740#1122740 | |
Let's rewrite this code a little bit to understand what's going on. | |
function complicatedFunction($) { | |
// the document.ready call goes here. | |
} | |
Next, how would you call this function? | |
complicatedFunction(someObject); | |
So inside the complicatedFunction $ refers to someObject. Agree? |
var eventsHandle = Meteor.subscribe('events'); | |
var onReady = Deps.autorun(function () { | |
eventsHandle.ready(); | |
}); | |
onReady.onInvalidate(function() { | |
Events.find().observeChanges({ | |
_suppress_initial: true, | |
added: function(id, event) { |
Не сразу понял, как в meteor выполнить сортировку по вложенным свойствам. Надо всего лишь взять их в кавычки: | |
Events.find({}, {sort: {"properties.title": 1}}); | |
Это правило применимо к mongoDB в целом. |
Template.nestedTemplate.events({ | |
'click a.class':function(event,template){ | |
var parentID = template.data._id; | |
console.log(parentID); | |
} | |
}); | |
//http://stackoverflow.com/questions/13091914/meteor-how-to-access-parent-properties-within-nested-templates |
$ git init | |
$ git add -A | |
$ git commit -m "Created Errors Package" | |
$ git remote add origin https://github.com/tmeasday/meteor-errors.git | |
$ git push origin master |