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
// うるう年 | |
Date.prototype.isLeapYear = function() { | |
var y = this.getFullYear(); | |
return (y % 4 == 0 && y % 100 != 0) || (y % 400 == 0); | |
}; | |
// 年間積算日 | |
Date.prototype.getDayOfYear = function() { | |
var days1 = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334] | |
var days2 = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335] |
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
package main | |
import ( | |
"crypto/rand" | |
"encoding/base64" | |
"fmt" | |
"log" | |
) | |
func main() { |
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
package main | |
// Patience Diff Advantages | |
// http://bramcohen.livejournal.com/73318.html | |
// | |
// Patience Diff, a brief summary | |
// http://alfedenzo.livejournal.com/170301.html | |
// | |
// 1. Match the first lines of both if they're identical, then match the | |
// second, third, etc. until a pair doesn't match. |
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 <windows.h> | |
#include <stdio.h> | |
#include <string.h> | |
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); | |
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) { | |
HWND hwnd; | |
MSG msg; | |
WNDCLASSEX cls; |
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
// cl /Idtl abcdiff.cpp | |
// https://github.com/cubicdaiya/dtl | |
#include <dtl/dtl.hpp> | |
#include <iostream> | |
#include <fstream> | |
#include <sstream> | |
#include <vector> | |
#include <string> |
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
diff --git a/src/ops.c b/src/ops.c | |
index 62d88a7..7fda2c7 100644 | |
--- a/src/ops.c | |
+++ b/src/ops.c | |
@@ -5407,6 +5407,8 @@ do_addsub(command, Prenum1, g_cmd) | |
int did_change = FALSE; | |
pos_T t = curwin->w_cursor; | |
int maxlen = 0; | |
+ pos_T startpos; | |
+ pos_T endpos; |
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
// cl /LD ctrlshiftkey.c user32.lib | |
#include <windows.h> | |
#ifdef _MSC_VER | |
# define EXPORT __declspec(dllexport) | |
# else | |
# define EXPORT | |
#endif |
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
# 太洋社 (http://taiyosha.co.jp/) のコミック発売予定一覧を取得する | |
# | |
# to get csv: | |
# taiyosha_comic.ps1 | ConvertTo-CSV | |
function ToUTF8($s) { | |
return [Text.Encoding]::UTF8.GetString([Text.Encoding]::GetEncoding("ISO-8859-1").GetBytes($s)) | |
} | |
function GetTable($url) { |
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
# Win32.Mak - Win32 application master NMAKE definitions file for the | |
# Microsoft Windows SDK programming samples | |
# Copyright (C) Microsoft Corporation | |
# ------------------------------------------------------------------------- | |
# This files should be included at the top of all MAKEFILEs as follows: | |
# !include <Win32.Mak> | |
# ------------------------------------------------------------------------- | |
# | |
# Define APPVER = [ 4.0 | 5.0 | 5.01 | 5.02 | 6.0 | 6.1] prior to including win32.mak to get | |
# build time checking for version dependencies and to mark the executable |