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
{ | |
最新版は github に引っ越しました | |
FMX.Log newest version moved to github. | |
https://github.com/freeonterminate/delphi/tree/master/FMXLog | |
} |
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; | |
S: array [0.. 2] of String = ('', 'Fizz', 'Buzz'); | |
begin | |
for i := 1 to 100 do | |
Writeln(S[Ord(i mod 3 = 0)] + S[Ord(i mod 5 = 0) shl 1], i.ToString.Substring(0, (i mod 3) * (i mod 5) * $ff)); | |
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
unit Unit1; | |
interface | |
uses | |
System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, | |
FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls; | |
type | |
TForm1 = class(TForm) |
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
uses | |
Androidapi.JNI.JavaTypes, | |
Androidapi.JNI.GraphicsContentViewText, | |
FMX.Log, | |
FMX.Helpers.Android; | |
procedure StartIntent; | |
var | |
Intent: JIntent; | |
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
uses | |
Macapi.ObjectiveC, | |
Macapi.CocoaTypes, | |
Macapi.Foundation, | |
Macapi.AppKit, | |
FMX.Platform.Mac | |
procedure SetMinSize(const iForm: TForm; const iMinW, iMin: Integer); | |
var | |
Wnd: NSWindow; // OS X 用のクラスがそのまま使えてる |
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
unit uKeyHook; | |
interface | |
uses | |
Winapi.Windows; | |
type | |
TKeyHookEvent = procedure(const iVKKey, iState: DWORD) of object; |
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 Project1; | |
uses | |
System.SysUtils; | |
type | |
TTest<T> = record | |
Value: T; | |
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 Project1; | |
type | |
IFoo<T> = interface; | |
TBar<T> = record | |
Value: IFoo<TArray<T>>; | |
end; | |
IFoo<T> = interface |
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 Project1; | |
type | |
TFoo<T> = class; // interface から class に変えた | |
TBaz<T> = record | |
Value: TFoo<TArray<T>>; // E2604 ジェネリック型を再帰的に使用しています | |
end; | |
TFoo<T> = class |
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
// | |
// あんまり、おこらないかもしれない! | |
// | |
// IFMXApplicationEventService をTPlatformServices.Current.GetPlatformService から取り出して | |
// AppEventService.SetApplicationEventHandler(AppEvent); をして | |
// そのイベントハンドラで以下の様にする | |
function TLifecycleManager.AppEvent( | |
iAppEvent: TApplicationEvent; | |
iContext: TObject): Boolean; |
OlderNewer