This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| int | |
| motion_count(Mat I) { | |
| const int size = motion_mask_size; | |
| resize(I, I, Size(size, size), 0, 0, INTER_NEAREST); | |
| int i = 0; | |
| int count = 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Mat | |
| hough(Mat src) { | |
| Mat gray; | |
| // cvtColor(src, gray, COLOR_RGB2GRAY); | |
| cvtColor(src, src, COLOR_BGR2RGB); | |
| cvtColor(src, gray, COLOR_RGB2GRAY); | |
| morph_ellipse(gray); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| map * :set hls<CR>:let @/ = '\<' . expand('<cword>') . '\>' <CR>:call histadd('/', @/)<CR>:echo @/<CR> | |
| map g* :set hls<CR>:let @/ = expand('<cword>') <CR>:call histadd('/', @/)<CR>:echo @/<CR> | |
| map # :set hls<CR>:let @/ = '\<' . expand('<cword>') . '\>' <CR>:call histadd('/', @/)<CR>:echo @/<CR> | |
| map g# :set hls<CR>:let @/ = expand('<cword>') <CR>:call histadd('/', @/)<CR>:echo @/<CR> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void | |
| bitwise() { | |
| const uchar X = 0; | |
| Mat mask = (Mat_<uchar>(1, 2) << | |
| 1, X | |
| ); | |
| threshold(mask, mask, X, 255, THRESH_BINARY); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| do shell script "open -n -a \"MacVim\"" | |
| (* | |
| run script "tell application \"MacVim\" to open \"/\"" | |
| *) | |
| (* | |
| do shell script "echo 1 | open -f -g -a MacVim" | |
| *) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| command! -complete=file -nargs=* FindArg call <SID>FindArgFunc(<q-args>) | |
| function! s:FindArgFunc(args) | |
| if a:args == "" | |
| let t:argv = input("argv: ", "", "file") | |
| else | |
| let t:argv = a:args | |
| endif | |
| endfunction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sub identify { | |
| my $file = shift; | |
| return unless (-e $file); | |
| $_ = `$I $file` if (-e $file); | |
| # debug | |
| # $_ = '1.JPG JPEG 2048x1536 2048x1536+2222+3333 8-bit sRGB 912KB 0.000u 0:00.000'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private CompositeSubscription composite; | |
| // ... | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| composite = new CompositeSubscription(); | |
| } | |
| @Override | |
| protected void onDestroy() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.AbstractMap.SimpleEntry; | |
| import java.util.Collection; | |
| import java.util.Arrays; | |
| import java.util.Set; | |
| import java.util.HashSet; | |
| import java.util.Map; | |
| class entry { | |
| public static void NSLog(String format, Object... args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| typedef void (*IMP)(void); | |
| typedef void (*IMP2); | |
| void | |
| ifc(int i, float f, char c) { | |
| } | |
| int | |
| main() { | |
| void *p = ifc; | |
| void *(f1) = ifc; |
NewerOlder