http://yapcasia.org/2014/talk/list
ใใจใงๅผใฃ่ถใไบๅฎใชใฎใงใในใฟใใไปฅๅคใฏใใฏใใใในใใใ
- One layer down below. (20 ๅ)
- Kang-min Liu [ใฌใฎใฅใฉใผ] [ใใฎไป] [่ฑ่ช]
http://yapcasia.org/2014/talk/list
ใใจใงๅผใฃ่ถใไบๅฎใชใฎใงใในใฟใใไปฅๅคใฏใใฏใใใในใใใ
| CREATE TABLE user_event_ranking ( | |
| event_id INTEGER, | |
| user_id INTEGER, | |
| score INTEGER, | |
| PRIMARY KEY (event_id, user_id), | |
| INDEX KEY (event_id, score) | |
| ); | |
| CREATE TABLE user_event_ranking ( |
| <!doctype html> | |
| <html ng-app='sample'> | |
| <head> | |
| <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.22/angular.min.js"></script> | |
| <script> | |
| angular.module('sample', []) | |
| .controller('MainCtrl', ['$scope', function($scope) { | |
| $scope.bulk_check = function() { | |
| angular.forEach($scope.items, function(item) { |
| use List::UtilsBy qw/weighted_shuffle_by/; | |
| my @wlist = ( | |
| { value => 'a', weight => 0 }, | |
| { value => 'b', weight => 0 }, | |
| ); | |
| weighted_shuffle_by { $_->{weight} } @wlist; |
| use List::UtilsBy qw/weighted_shuffle_by/; | |
| my @wlist = ( | |
| { value => 'a', weight => 0 }, | |
| { value => 'b', weight => 0 }, | |
| ); | |
| weighted_shuffle_by { $_->{weight} } @wlist; |
ใฉใใใง่ฆใใใจใใฃใใใใในใญใผใใ ใฃใใใใพใใใ๏ผ๏ผ
http://yapcasia.org/2014/talk/show/ce6e777e-fb91-11e3-b7e8-e4a96aeab6a4
~/project/mobacon-pre (master) tree -L 1
.
โโโ Gemfile
โโโ Gemfile.lock
โโโ Procfile
| #!/usr/bin/env perl | |
| use 5.10.0; | |
| use strict; | |
| use warnings; | |
| use Test::More; | |
| sub hoge { join ',', ('?') x @_ } | |
| is hoge(qw/1 3 4 5/), '?,?,?,?'; |
| #!/usr/bin/env perl | |
| use 5.10.0; | |
| use strict; | |
| use warnings; | |
| use Test::More; | |
| sub hoge { | |
| my %ret; | |
| for my $row (@_) { |