This file contains 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
- 掃除機 | |
- レンタル返却 | |
- 風呂、便所掃除 | |
- 買い出し | |
- ゴミ捨て | |
- チェック | |
- お金用意 | |
10:45 家発 | |
11:04 春日初 | |
春日(東京) |
This file contains 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
// | |
// main.c | |
// helloworld | |
// | |
// Created by kitazume yu on 11/11/24. | |
// Copyright (c) 2011年 none. All rights reserved. | |
// | |
#include <stdio.h> |
This file contains 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
#include <stdio.h> | |
# liner serch | |
int lookup(char *word, char *array[]) { | |
int i; | |
for (i = 0; array[i] != NULL; i++) { | |
if (strcmp(word, array[i]) == 0) | |
return i; | |
} | |
return -1; |
This file contains 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
[TapjoyConnect requestTapjoyConnect:TAPJOY_APPID secretKey:TAPJOY_SECRET]; | |
[Pankia initWithGameKey:GAME_KEY gameSecret:GAME_SECRET title:GAME_TITLE delegate:self options:launchOptions]; | |
[TapjoyConnect setUserID:[[PNUser currentUser] userId]]; |
This file contains 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
#include <stdio.h> | |
typedef struct Nameval Nameval; | |
struct Nameval { | |
char *name; | |
int value; | |
}; | |
int lookup(char *word, Nameval st[], int sts) { |
This file contains 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
#include <stdio.h> | |
typedef struct Nameval Nameval; | |
struct Nameval { | |
char *name; | |
int value; | |
}; | |
void swap(int v[], int i, int j) { | |
int tmp = v[i]; |
This file contains 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
#include <stdio.h> | |
int scmp(const void *p1, const void *p2) { | |
char *v1, *v2; | |
v1 = *(char **) p1; | |
v2 = *(char **) p2; | |
return strcmp(v1, v2); | |
} |
This file contains 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
Normal mode default mappings. | |
{lhs} {rhs} | |
-------- ----------------------------- | |
<TAB> <Plug>(vimfiler_switch_to_other_window) | |
j <Plug>(vimfiler_loop_cursor_down) | |
k <Plug>(vimfiler_loop_cursor_up) | |
gg <Plug>(vimfiler_cursor_top) | |
<C-l> <Plug>(vimfiler_redraw_screen) | |
<Space> <Plug>(vimfiler_toggle_mark_current_line) | |
<S-Space> <Plug>(vimfiler_toggle_mark_current_line_up) |
This file contains 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
# data | |
label = %w{aa, bb, cc} | |
v1 = [1, 2, 3] | |
v2 = [11, 22, 33] | |
# use zip | |
label.zip(v1) #= > [["aa,", 1], ["bb,", 2], ["cc", 3]] | |
label.zip(v1, v2) #= > [["aa,", 1, 11], ["bb,", 2, 22], ["cc", 3, 33]] | |
Hash[label.zip(v1)] #= > {"cc"=>3, "bb,"=>2, "aa,"=>1} | |
Hash[label.zip(v1.zip(v2))] #= > {"cc"=>[3, 33], "bb,"=>[2, 22], "aa,"=>[1, 11]} |
This file contains 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
class Hash | |
def values_classify | |
inject({}) do |options, (key, value)| | |
options[key] = value.class | |
options | |
end | |
end | |
def values_classify! | |
replace(self.values_classify) |
OlderNewer