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 System.Environment | |
| import System.Exit | |
| import Control.Monad | |
| import Data.Char | |
| import qualified Data.List as List | |
| main = do | |
| argv <- getArgs | |
| when (length argv /= 1) $ do | |
| putStrLn "usage:command filename" |
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
| #! /usr/bin/env node | |
| var fs = require('fs'); | |
| var readline = require('readline'); | |
| if (process.argv.length !== 3) { | |
| console.log("usage:command <file path>"); | |
| process.exit(1); | |
| } |
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
| #! /usr/bin/env node | |
| var http = require('http'); | |
| var querystring = require('querystring'); | |
| function queryAnswer(str) { | |
| var options = { | |
| host: 'spacetalky.textfile.org', | |
| method: 'GET'}; |
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
| String.prototype.splitN = function (n) { | |
| var a = []; | |
| var begin = 0; | |
| var i = 0; | |
| for (; i < this.length; i++) { | |
| if (i !== 0 && i % n == 0) { | |
| a.push(this.substring(begin, i)); | |
| begin = i; | |
| } |
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
| #! /usr/bin/ruby -w | |
| # encoding: utf-8 | |
| # | |
| def get_info(path) | |
| Info.new(path) | |
| end | |
| class Info | |
| def initialize(path) | |
| @path = path |
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
| (function() { | |
| window.onload = function() { | |
| /* 15.9 HTMLフォーム */ | |
| (function() { | |
| document.forms['submitForm'].onsubmit = function() { | |
| var text = document.forms['textForm']['mytext'].value; | |
| if (text.match(/^\d+$/)) { | |
| alert('送信しました'); | |
| return true; | |
| } |
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
| #!/usr/bin/env node | |
| 'use strict'; | |
| var http = require('http'); | |
| var url = require('url'); | |
| var fs = require('fs'); | |
| var mime = require('mime'); | |
| var exec = require('child_process').exec; | |
| var port = 20080; |
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
| <!DOCTYPE html> | |
| <html lang="ja"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>JavaScript</title> | |
| <style type="text/css" media="all"> | |
| h1,h2 { | |
| color: blue; | |
| font-style: italic; | |
| } |
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 | |
| dg_cli(FILE *fp, int sockfd, const SA *pservaddr, socklen_t servlen) | |
| { | |
| int n; | |
| const int on = 1; | |
| char sendline[MAXLINE], recvline[MAXLINE + 1]; | |
| socklen_t len; | |
| struct sockaddr *preply_addr; | |
| preply_addr = Malloc(servlen); |
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 <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <assert.h> | |
| static int mpermulate(char *prefix, char *array, char *match, long long* count) | |
| { | |
| char gemstring[16]; | |
| char newarray[16]; | |
| char last; |