This gist is updated daily via cron job and lists stats for npm packages:
- Top 1,000 most depended-upon packages
- Top 1,000 packages with largest number of dependencies
- Top 1,000 packages with highest PageRank score
#!/bin/bash | |
# Sign a file with a private key using OpenSSL | |
# Encode the signature in Base64 format | |
# | |
# Usage: sign <file> <private_key> | |
# | |
# NOTE: to generate a public/private key use the following commands: | |
# | |
# openssl genrsa -aes128 -passout pass:<passphrase> -out private.pem 2048 | |
# openssl rsa -in private.pem -passin pass:<passphrase> -pubout -out public.pem |
На клиенте используем стэк фейсбука:
На сервере используем:
// Starkflow comments + github project node js | |
// + https://github.com/jrgcubano/face-detection-node-opencv | |
// + http://blog.stevenedouard.com/stroll-node-facial-recognition-3rd-party-apis/ | |
I believe that you're using the node-opencv library ? You will need some more steps. You have to train your opencv system which than allows you to use the method "predictSync" from FaceRecongizer(). | |
The node-opencv library has a FaceRecognizer Object which you first initialize. | |
Initialize FaceRecognizer: var FaceRecognizer = new cv.FaceRecognizer(); | |
You have to read all the images, create a specific array and train your FaceRecognizer with that. For my purpose, I'm saving each user in a DB and they get a unique ID which I'm using to create a specific subfolder and this is later used. Here is my code: |
Эта статья перенесена сюда: https://github.com/codedokode/pasta/blob/master/php/collation.md Ниже идет старая, неподдерживаемая версия статьи.
В программировании строки можно сравнивать. При этом обычно подразумевается алфавитное сравнение, то есть меньше то слово, которое идет раньше по алфавиту. Если начальные буквы совпадают, то меньше то слово, которое короче. Например, "аббат" < "аккорд", "кот" < "котёнок".
Если разобраться в теме сравнения строк на любых языках (а не только на русском), то все выглядит гораздо сложнее и появляется много особенностей, которые надо учитывать(по-английски эта тема называется «collation»). И проблема не в том, что там много букв из разных алфавитов, а в том что одни и те же буквы имеют разный порядок в разных языках. Например, буквы с точечками и черточками сравниваются по-разному: http://en.wikipedia.org/wiki/Alphabetical_order#Language-specific_conventions
В некоторых языках буквы вроде å
идут после z
, в некоторых между a
и b
. В некорых (английский) они им
Some thoughts on using node-postgres in a web application
This is the approach I've been using for the past year or so. I'm sure I'll change and it will change as I grow & am exposed to more ideas, but it's worked alright for me so far.
I would definitely use a single pool of clients throughout the application. node-postgres ships with a pool implementation that has always met my needs, but it's also fine to just use the require('pg').Client
prototype and implement your own pool if you know what you're doing & have some custom requirements on the pool.
/** | |
* Explore plugin. | |
*/ | |
Draw.loadPlugin(function(ui) | |
{ | |
// Adds resource for action | |
mxResources.parse('exploreFromHere=Explore from here...'); | |
// Max number of edges per page | |
var pageSize = 20; |
/** | |
Build HISTORY.md from your GitHub Tags and Milestones. | |
Note: Tag and Milestone name/title MUST MATCH! | |
**/ | |
var | |
GitHubApi = require('github'), | |
async = require('async'), | |
fs = require('fs'), |