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
program Foo; | |
function Bar(N: Integer): Integer; | |
begin | |
if (N > 0) then | |
Bar := Bar(N - 1); | |
end; | |
begin | |
Bar(5); |
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
(* | |
* This is sample code (My memorandum) | |
* System.Net.HttpClient.THttpClient class | |
* | |
* Programmed by HOSOKAWA Jun / twitter @pik | |
*) | |
program MVPCounter; | |
{$APPTYPE CONSOLE} |
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
program StaticOverride; | |
type | |
TFoo = class | |
public | |
class procedure Bar; virtual; | |
end; | |
TBar = class(TFoo) | |
public |
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
(* | |
* 概要 Base64 エンコード | |
* 引数 iSrc エンコードしたいストリーム | |
* iDest エンコード結果格納先 | |
* iSepCount セパレータを入れる場所(32 なら 32 個エンコードした所で入る) | |
* iSep セパレータ | |
*) | |
procedure EncodeBase64( | |
const iSrc, iDest: TStream; | |
iSepCount: Integer = 0; |
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
(* | |
* Get File Size | |
* | |
* Copyright (c) 2015, 2016 HOSOKAWA Jun. | |
* | |
* CONTACT | |
* Twitter @pik or freeonterminate@gmail.com | |
* | |
* LAST UPDATE | |
* 2016/03/30 Delete warning |
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
{$WARNINGS OFF} | |
begin | |
(procedure(F: array of const)begin end)([ | |
// 定番のやつ | |
(function(const Count: Integer): Integer | |
begin | |
for Result := 0 to Count - 1 do | |
Writeln('Good-bye, semicolon world !') | |
end |
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
program FizzBuzz; | |
uses | |
System.SysUtils; | |
var | |
i: Integer; | |
Values: array [0.. 3] of String = ('', 'Fizz', 'Buzz', 'FizzBuzz'); | |
begin | |
for i := 1 to 100 do | |
begin | |
Values[0] := i.ToString; |
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
function IsATOK: Boolean; | |
var | |
Name: JString; | |
begin | |
Result := False; | |
Name := | |
TJSettings_Secure.JavaClass.getString( | |
TAndroidHelper.Context.getContentResolver(), | |
TJSettings_Secure.JavaClass.DEFAULT_INPUT_METHOD); |
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
function ToCharCode(const iText: String; const iUTF8: Boolean): String; | |
var | |
M: TMarshaller; | |
function ToHexString(const iByte: TPtrWrapper): String; | |
var | |
Chars: PByteArray; | |
i: Integer; | |
SB: TStringBuilder; | |
begin |
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
program QuoeeeeUeuooowww; | |
const | |
MEM_SIZE = 1024; | |
MEM_HIGH = MEM_SIZE - 1; | |
CMD_NEXT = 'く'; //'>'; | |
CMD_PREV = 'う'; //'<'; | |
CMD_INC = 'w'; //'+'; | |
CMD_DEC = 'お'; //'-'; | |
CMD_OUTPUT = 'ー'; //'.'; |