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
| diff --git a/test/dm/blk.c b/test/dm/blk.c | |
| index aa5cbc63777..704c8e52973 100644 | |
| --- a/test/dm/blk.c | |
| +++ b/test/dm/blk.c | |
| @@ -275,6 +275,10 @@ static int dm_test_blk_flags(struct unit_test_state *uts) | |
| ut_asserteq(-ENODEV, blk_next_device_err(BLKF_FIXED, &dev)); | |
| /* Look only for removable devices */ | |
| + ut_assertok(blk_find_first(BLKF_REMOVABLE, &dev)); | |
| + ut_assertnonnull(dev); |
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
| #include <stdbool.h> | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #define DIM 8 | |
| struct vec { | |
| int32_t x[DIM]; | |
| }; |
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
| #include <string.h> | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| struct team { | |
| const char *captain; | |
| int32_t cap_mmr; | |
| int32_t cash; | |
| }; |
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
| #include <zmq.h> | |
| int main(void) { | |
| void *context = zmq_ctx_new(); | |
| void *sock = zmq_socket(context, ZMQ_REQ); | |
| zmq_connect(sock, "tcp://localhost:5999"); |
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
| const steam = require('steam'); | |
| const steamClient = new steam.SteamClient(); | |
| const steamUser = new steam.SteamUser(steamClient); | |
| const dota2 = require('dota2'); | |
| const dotaClient = new dota2.Dota2Client(steamClient, true); | |
| if (fs.existsSync('steam-servers.json')) { | |
| steam.servers = JSON.parse(fs.readFileSync('steam-servers.json')); | |
| } |
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
| <?php | |
| /** | |
| * Convert a series of TIFF files given on the command line to pages in | |
| * a single PDF | |
| */ | |
| if ($argc < 3) { | |
| echo ('Convert a series of TIFF images as individual pages in a PDF'); | |
| echo ("\n".'Usage: php -f pdf_convert.php <output name> <input 1> <input 2> ...'); | |
| exit(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
| (defvar friends (evar friends '())) | |
| (defvar enemies (evar enemies '())) | |
| (defun start | |
| (say "Halt, who goes there?") | |
| (add-response "A friend." add-friend) | |
| (add-response "An enemy." add-enemy)) | |
| (defun add-friend | |
| (set-var! friends (cons (get-name character) friends)) |
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=shellcmd -nargs=+ Shell call s:RunShellCommand(<q-args>) | |
| function! s:RunShellCommand(cmdline) | |
| echo a:cmdline | |
| let expanded_cmdline = a:cmdline | |
| for part in split(a:cmdline, ' ') | |
| if part[0] =~ '\v[%#<]' | |
| let expanded_part = fnameescape(expand(part)) | |
| let expanded_cmdline = substitute(expanded_cmdline, part, expanded_part, '') | |
| endif | |
| endfor |
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
| WELL = require('well-rng'); | |
| _ = require('underscore'); | |
| loop_count = 1000; | |
| burn_count = 0; | |
| s = []; | |
| for (i = 0; i < 32; ++i) { | |
| s[i] = 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
| // Test 1: Do simple functions get inlined? | |
| var iter = 10000; | |
| var start, stop; | |
| function inc(a) { return a+1; } | |
| // Wrap test in a function to allow warmup of optimizer | |
| function test1_fn(iter) { | |
| var x; | |
| for (var i = 0; i < iter; ++i) { |
NewerOlder