pascal

Pascal 定理的严格证明问题

你。 提交于 2019-12-06 21:46:25
Pascal定理的严格证明 。 方式。” 这里是指 射影几何中有关 “ 圆锥曲线(注: 在 射影几何中称二阶点列 )上任意六点连成的六边形(hexagon, 或 六角形 )三对对边交的交点在一直线上” 的定理。这是17世纪法国数学家Pascal十六岁时提出但可能未被证明或完全证明的一个内容极为丰富的定理,据说当时Pascal把这种 六边形或 六角形(hexagon)称为神秘六角星(法文 hexagramme mystique ),这就把 六角形(hexagon) 与 六角星( hexagram ) 概念混淆起来了, 六角形(hexagon) 是一个多边形,而 六角星( hexagram ) 不是一个多边形,而是两个 多边形 (3角形)交叉叠加在一起的图形。 当今书上或网上对Pascal定理的 证明 已有许多,但看来没有一种证明说得上理想与完善。许多不完善的地方也是概念未讲清,或采用非射影几何的方法来证明,如 1. 只就一种圆锥曲线类型进行证明,且大多是以 椭圆甚至圆 为特例 来证明,而不说明 圆锥曲线还有 抛物线、双曲线等 其他 类型。要补救这一点或许很容易,但至少应该交待一下; 2. 圆锥曲线上六个点(如1,2,3,4,5,6六点,或A,B,C,D,E,F 六点 )有6!=720 种排列方式,能组成720/(2*6)=60种不同形状的6边形或6角形(Hexagons

Using ReadProcess function of kernel32.dll at pascal

廉价感情. 提交于 2019-12-06 21:13:26
I override the function library kernel32.dll in Pascal and OpenProcess function returns 0. Function GetLastError() returns 87 error, that means ERROR_INVALID_PARAMETER 87 (0x57) The parameter is incorrect. What could be wrong? Program UODll; const search_window = 'Ultima Online - xxx (The Abyss)'; function FindWindow(C1, C2: PChar): Longint; external 'FindWindowA@user32.dll stdcall'; function GetWindowThreadProcessId(hWnd: Longint; opt: Word): Word; external 'GetWindowThreadProcessId@user32.dll stdcall'; function OpenProcess(dwDesiredAccess: Word; inherit: Byte; pid: Word): Longint; external

Do console apps run faster than GUI apps? [closed]

╄→гoц情女王★ 提交于 2019-12-06 17:15:07
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 9 years ago . I am relatively new to world of programming. I have a few performance questions: Do console apps run faster than apps with a graphical user interface? Are languages like C and Pascal faster than object oriented

Encode string to Base64 in Inno Setup (Unicode Version of Inno Setup)

天大地大妈咪最大 提交于 2019-12-06 14:45:57
Problem I tried to use the Pascal function EncodeStringBase64 , assuming Inno Setup had access to the Pascal standard library but it fails to find it and provides an Unknown Identifier error. https://www.freepascal.org/docs-html/fcl/base64/encodestringbase64.html I also found this code to carry out the conversion but it seems to be restricted to AnsiStrings. https://github.com/docker/toolbox/blob/master/windows/base64.iss Question Ideally I'd like to use the standard library function, is there any way that I can access it? If not, is the code using AnsiStrings safe to use on normal Unicode

Creating a Binary Tree for a Knockout Tournament

人盡茶涼 提交于 2019-12-06 13:45:44
I am trying to create a binary tree for use in a knockout tournament. The tree consists of TNodes with Left and Right pointers. This is the code that I have come up with (below); however, it runs into difficulties with the pointers in the CreateTree section. Once this creates an empty tree of large enough size, I need to add the names on the Memo1.List to the bottoms of the tree so I can pair them up for matches. How would I do this? Type TNodePtr = ^TNode; TNode = Record Data:String; Left:TNodePtr; Right:TNodePtr; end; Type TTree = Class Private Root:TNodePtr; Public Function GetRoot:TNodePtr

Delphi Pascal - Using SetFilePointerEx and GetFileSizeEx, Getting Physical Media exact size when reading as a file

扶醉桌前 提交于 2019-12-06 13:33:49
I do not know how to use any API that is not in the RTL. I have been using SetFilePointer and GetFileSize to read a Physical Disk into a buffer and dump it to a file, something like this in a loop does the job for flash memory cards under 2GB: SetFilePointer(PD,0,nil,FILE_BEGIN); SetLength(Buffer,512); ReadFile(PD,Buffer[0],512,BytesReturned,nil); However GetFileSize has a limit at 2GB and so does SetFilePointer. I have absolutley no idea how to delcare an external API, I have looked at the RTL and googled for many examples and have found no correct answer. I tried this function GetFileSizeEx

Inno Setup: Exec can't read string?

本秂侑毒 提交于 2019-12-06 13:01:45
I'm trying to put together a simple Inno Setup installer which looks for the previous version and removes it before proceeding. Everything is working fine until I get the following code: if Exec(UninstallString, '/SILENT', '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then begin MsgBox('Previous version found and uninstalled successfully.', mbInformation, MB_OK); end else begin MsgBox('Please uninstall the previous version of this mod before continuing.', mbInformation, MB_OK); Result := FALSE; end; It's a very simple bit of code, but it ALWAYS fails. I've checked the contents of

Pascal Object: how to do a typed forward declaration?

邮差的信 提交于 2019-12-06 11:21:31
I'm translating the great fmod C header to Pascal, and I'm stuck because of a forward declaration. If I declare the function before the type, the error is "FMOD_CODEC_STATE: unknown", and if I declare the FMOD_CODEC_STATE before the function, the error is "FMOD_CODEC_METADATACALLBACK: unknown" Any idea how I could solve this problem? Thank you very much ! type FMOD_CODEC_STATE = Record numsubsounds: Integer; waveformat: array[0..0] of FMOD_CODEC_WAVEFORMAT; plugindata: Pointer; filehandle: Pointer; filesize: Cardinal; fileread: FMOD_FILE_READCALLBACK; fileseek: FMOD_FILE_SEEKCALLBACK; metadata

What is the best way to generate Pythagorean triples?

China☆狼群 提交于 2019-12-06 10:50:49
问题 I have tried with that simple code when you just check all the combinations for a and b and then check if square root of c is an integer, but that code is really slow, then I have tried with Euclid's formula a = d*(n^2 - m^2) b = 2*n*m*d c = d*(n^2 + m^2) and I have written a code where you first find n with trunc(sqrt(max_value)) //this is in pascal and then you check every combination of 0 < m < n but I get duplicate results, like if n is 7, m is 5 and d is 1, and n is 6, m is 1 and d is 2

Delphi面向对象的编程思想

折月煮酒 提交于 2019-12-06 08:39:28
第一章、建立面向对象的新思维 1.1.1历史背景 目前对象技术的前沿课题包括设计模式、分布式对象系统、和基于网络的对象应用等 目前面向对象的语言包含4个基本的分支: 1.基于Smalltalk的:包括Smalltalk的5个版本,以Smalltalk-80为代表 2.基于C的:包括Objective-C、C++、Java、C#. 3.基于LISP的:包括Flavors、XLISP、LOOPS、CLOS。 4.基于PASCAL的:包括Delphi(Object Pascal)、Turbo Pascal、Eiffel、Ada95 1.1.2面向过程和面向对象 在面向对象编程中,程序被看做是相互协作的对象的集合,每个对象都是某个类的实例,所有的类构成一个通过继承关系相联系的层次结构。面向对象的语言常常具有以下特征: 对象生成功能、消息传递机制、 来源: https://www.cnblogs.com/ximi07/p/11972908.html