次のような機能を満す関数zipを作ってほしい。ただし次のような制約がある。
- C++11
- STLはOK
- BoostはNG
| template<int N, template<class T, class...A> class F, typename... U> | |
| auto map(const F<T(U...)> f, const std::array<U, N>&... containers) -> T | |
| { | |
| std::array< T, N > res; | |
| for (std::size_t i = 0; i != N; i++) { | |
| res[i] = f( containers[i]... ); | |
| } | |
| return res ; | |
| } |
| Process: hello_fltk [49218] | |
| Path: /Users/USER/*/hello_fltk.app/Contents/MacOS/hello_fltk | |
| Identifier: org.fltk.hello_fltk | |
| Version: 0 | |
| Code Type: X86-64 (Native) | |
| Parent Process: launchd [154] | |
| User ID: 501 | |
| Date/Time: 2013-10-15 17:43:12.216 +0900 | |
| OS Version: Mac OS X 10.8.5 (12F45) |
| #!/bin/sh | |
| for i in `jot $1` | |
| do | |
| wget --no-verbose --post-data "_method=POST&data%5BEntry%5D%5Bid%5D=32" --user-agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Firefox/24.0" http://124.37.251.169/cpf/stu_003/votes/index/page:1 -O /dev/null | |
| sleep 1 | |
| done |
| 18a19,20 | |
| > #include "relex.c" | |
| > #include "re_parse.c" | |
| 3545a3548,3554 | |
| > static VALUE | |
| > rb_reg_parse (VALUE re) | |
| > { | |
| > re_parse( RREGEXP_SRC_PTR(re) ); | |
| > return re; | |
| > } |
| %{ | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include "relex.h" | |
| //--------------------------------------------------------------------------- | |
| //#define YYDEBUG 1 | |
| //#define YYERROR_VERBOSE 1 | |
| //int yydebug = 1; |
| #define YYSTYPE char * | |
| extern int yylex (); | |
| extern void init_yyc (char **); | |
| extern void re_parse (char *); |
| require 'benchmark' | |
| re_alt = Regexp.compile('sa|st|tw|tu') | |
| re_opt = Regexp.compile('s[at]|t[wu]') | |
| match = 'abcdefghijklmnopqrstuvwxyz' | |
| not_match = 'sssstttttttttssssssssuuuuu' | |
| ntimes = 100000; | |
| Benchmark.bm(8) do |x| | |
| x.report('alt') { ntimes.times{ re_alt.match(match) } } |
| android-sdk freetype gradle libevent lua pcre texinfo | |
| atk gauche grails libffi lv php theora | |
| atkmm gd groovy libgcrypt mcrypt pidof tmux | |
| autojump gdbm harfbuzz libgpg-error md5sha1sum pixman tree | |
| base64 gdk-pixbuf haskell-platform libicns mecab pkg-config v8 | |
| bdw-gc gettext hevea libmpc mecab-ipadic python vimpager | |
| cairo ghc icu4c libntlm mercurial rea |