Here's what I did to get things working.
Yep, over at: https://developer.apple.com
hello gist :) | |
update it .. :) |
type Message struct { | |
Value string | |
} | |
func MakeElastic() (<-chan Message, chan<- Message) { | |
input := make(chan Message, 64) | |
output := make(chan Message, 64) | |
middle := make(chan []Message, 1) |
package main | |
import ( | |
"fmt" | |
) | |
func main() { | |
queue := []int{1, 2, 3, 4, 5} |
<?php | |
/* Elasticsearch pinyin index setting */ | |
$index->create( array( | |
"analysis" => array( | |
"analyzer" => array( | |
"hl_pinyin_analyzer" => array( | |
"tokenizer" => "my_pinyin", | |
"filter" => array("standard","my_ngram_tokenizer"), | |
), |
Here's what I did to get things working.
Yep, over at: https://developer.apple.com
// Framework grid generation | |
// | |
// Used only by Bootstrap to generate the correct number of grid classes given | |
// any value of `@grid-columns`. | |
.make-grid-columns() { | |
// Common styles for all sizes of grid columns, widths 1-12 | |
.col(@index) { // initial | |
@item: ~".col-xs-@{index}, .col-sm-@{index}, .col-md-@{index}, .col-lg-@{index}"; | |
.col((@index + 1), @item); |
//AF Upload | |
UIImage *image = [UIImage imageNamed:@"1.png"]; | |
NSData *dataImage = UIImageJPEGRepresentation(image, 1.0); | |
AFHTTPRequestOperationManager *manage = [AFHTTPRequestOperationManager manager]; | |
[manage POST:User_Image parameters:nil constructingBodyWithBlock:^(id<AFMultipartFormData> formData) { | |
[formData appendPartWithFileData:dataImage name:@"file" fileName:@"1.png"mimeType:@"image/jpeg"]; | |
} success:^(AFHTTPRequestOperation *operation, id responseObject) { | |
NSString *str = [responseObject objectForKey:@"msg"]; | |
NSLog(@"%@",str); | |
} failure:^(AFHTTPRequestOperation *operation, NSError *error) { |
# usage: `python ~/Desktop/contours.py 1994-654-12_v02.tif` | |
# output is to a squareless.txt file and the directory "out" | |
# Working well with thumbnails with 400px as their longest side - untested with other dimensions | |
# for i in $(ls -1 | grep tif); do python /Users/artsyinc/Documents/resistance/experiments/artwork_image_cropping/contours.py $i; done | |
import cv2 | |
import numpy as np | |
from matplotlib import pyplot as plt | |
import sys |
//scrollTop | |
function scrollTo(element, to, duration) { | |
var start = element.scrollTop, | |
change = to - start, | |
currentTime = 0, | |
increment = 20; | |
var animateScroll = function(){ | |
currentTime += increment; | |
var val = Math.easeInOutQuad(currentTime, start, change, duration); |
//implements it for Zili | |
(function(data){ | |
// console.log(data) | |
var AggregationData = {} // 用字面量创建一个空对象 | |
var len = data.length | |
for( var i = 0, item, barcode; i<len ; i++ ){ |