I hereby claim:
- I am tondrej on github.
- I am tondrej (https://keybase.io/tondrej) on keybase.
- I have a public key whose fingerprint is BF32 CE19 32B2 61E8 8F2F F6CD 9D6B 32D2 2E82 F39D
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Index: JwaWinPerf.pas | |
=================================================================== | |
--- JwaWinPerf.pas (revision 1115) | |
+++ JwaWinPerf.pas (working copy) | |
@@ -171,13 +171,21 @@ | |
// counter definition for this | |
// object | |
ObjectNameTitleIndex: DWORD; // Index to name in Title Database | |
+{$ifdef WIN64} | |
+ ObjectNameTitle: DWORD; // Should use this as an offset |
#!/bin/sh | |
# Check *.dfm files being committed for binary format, if so convert to text automatically. | |
for s in $(git diff --cached --name-only *.dfm); do | |
grep -qI '' $s | |
if [ $? = 1 ]; then | |
echo Converting $s from binary to text | |
convert -i -t $s > /dev/null | |
git add $s | |
fi |
// example usage... | |
procedure TDataModuleMain.DataModuleCreate(Sender: TObject); | |
begin | |
try | |
FRuntime := TChakraCoreRuntime.Create([ccroEnableExperimentalFeatures, ccroDispatchSetExceptionsToDebugger]); | |
FContext := TChakraCoreContext.Create(FRuntime); | |
FContext.Activate; | |
ChakraCoreCheck(JsCreateObject(FConsole)); | |
ChakraCoreCheck(JsAddRef(FConsole, nil)); | |
SetCallback(FConsole, 'assert', ConsoleAssertFunc, Self); |
Delphi and Free Pascal bindings and classes for Microsoft's ChakraCore library.
ChakraCore version: 1.7.6
Supported compilers:
Supported target platforms:
#!/bin/bash | |
BLACK=000 | |
BLUE=001 | |
RED=010 | |
MAGENTA=011 | |
GREEN=100 | |
AQUA=101 | |
YELLOW=110 | |
WHITE=111 |
unit Unit1; | |
{$mode objfpc}{$H+} | |
{$macro on} | |
interface | |
uses | |
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, ExtCtrls; |
Index: pascalbind.h | |
=================================================================== | |
--- pascalbind.h (revision 57427) | |
+++ pascalbind.h (working copy) | |
@@ -27,13 +27,13 @@ | |
#include "chandles.h" | |
-#if defined(__WIN32__) | |
+#if defined(__WIN32__) || defined(_WIN32) |
const | |
FastTextLib = 'fasttext.dll'; | |
type | |
TFastTextNNCallback = function(word: PAnsiChar; score: Single; data: Pointer): LongBool; cdecl; | |
function fasttext_new(out ft: TFastText): LongBool; cdecl; external FastTextLib; | |
function fasttext_release(ft: TFastText): LongBool; cdecl; external FastTextLib; | |
function fasttext_nn2(ft: TFastText; mx: TMatrix; positive, negative: PPAnsiChar; count: Integer; |
function nn_callback(word: PAnsiChar; score: Single; data: Pointer): LongBool; cdecl; | |
begin | |
Result := False; | |
Writeln(Format('''%s'': %f', [word, score])); | |
end; | |
procedure TFastTextConsole.NN2(const ModelFileName: string); | |
var | |
ft: TFastText; | |
mx: TMatrix; |