pascal

调用约定

点点圈 提交于 2020-02-05 03:07:29
#define CALLBACK __stdcall #define WINAPI __stdcall #define WINAPIV __cdecl #define APIENTRY WINAPI #define APIPRIVATE __stdcall #define PASCAL __stdcall 调用约定(Calling convention):决定函数参数传送时入栈和出栈的顺序,由调用者还是被调用者把参数弹出栈,以及编译器用来识别函数名字的修饰约定。 函数调用约定有多种,这里简单说一下: 1、__stdcall调用约定相当于16位动态库中经常使用的PASCAL调用约定。在32位的VC++5.0中PASCAL调用约定不再被支持(实际上它已被定义为__stdcall。除了__pascal外,__fortran和__syscall也不被支持),取而代之的是__stdcall调用约定。两者实质上是一致的,即函数的参数自右向左通过栈传递,被调用的函数在返回前清理传送参数的内存栈,但不同的是函数名的修饰部分(关于函数名的修饰部分在后面将详细说明)。 _stdcall是Pascal程序的缺省调用方式,通常用于Win32 Api中,函数采用从右到左的压栈方式,自己在退出时清空堆栈。VC将函数编译后会在函数名前面加上下划线前缀,在函数名后加上"@"和参数的字节数。 2、C调用约定(即用_

How to work with AMMediaType for video filters

和自甴很熟 提交于 2020-02-04 11:44:59
问题 I am using Video Resizer DSP Video Resizer DSP to resize my video. I work with Lazarus Free Pascal and DSPack. This site explains how to use: http://alax.info/blog/1371 CoCreateInstance the DSP as DMO and add it to DMO Wrapper Filter Use IWMResizerProps::SetFullCropRegion to initialize the DSP Connect input pin Set output type via IMediaObject::SetOutputType IGraphBuilder::ConnectDirect output pin I write this: //Create Resizer DMO hr := CoCreateInstance(CLSID_DMOWrapperFilter, NIL, CLSCTX

How to work with AMMediaType for video filters

别说谁变了你拦得住时间么 提交于 2020-02-04 11:42:04
问题 I am using Video Resizer DSP Video Resizer DSP to resize my video. I work with Lazarus Free Pascal and DSPack. This site explains how to use: http://alax.info/blog/1371 CoCreateInstance the DSP as DMO and add it to DMO Wrapper Filter Use IWMResizerProps::SetFullCropRegion to initialize the DSP Connect input pin Set output type via IMediaObject::SetOutputType IGraphBuilder::ConnectDirect output pin I write this: //Create Resizer DMO hr := CoCreateInstance(CLSID_DMOWrapperFilter, NIL, CLSCTX

How to compile picoProlog from source code?

陌路散爱 提交于 2020-02-04 04:12:49
问题 I am a student in Computer Science, and I am learning about logic programming with Prolog. I have found an interesting Prolog interpreter, picoProlog (http://spivey.oriel.ox.ac.uk/corner/Logic_Programming). To know more about Prolog, I am trying to compile their source code, but I failed. In this web page, they said: The interpreter source is written in a minimal dialect of Pascal, avoiding many features including pointers, but using macros to overcome some of Pascal's limitations, in a style

朝花夕拾之Matlab矩阵表示

我的未来我决定 提交于 2020-01-28 23:24:18
1.实数值矩阵输入 MATLAB的强大功能之一体现在能直接处理向量或矩阵。当然首要任务是输入待处理的向量或矩阵。 不管是任何矩阵(向量),我们可以直接按行方式输入每个元素:同一行中的元素用逗号(,)或者用空格符来分隔,且空格个数不限;不同的行用分号(;)分隔。所有元素处于一方括号([ ])内;当矩阵是多维(三维以上),且方括号内的元素是维数较低的矩阵时,会有多重的方括号。如: >> Time = [11 12 1 2 3 4 5 6 7 8 9 10] Time = 11 12 1 2 3 4 5 6 7 8 9 10 >> X_Data = [2.32 3.43;4.37 5.98] X_Data = 2.43 3.43 4.37 5.98 >> vect_a = [1 2 3 4 5] vect_a = 1 2 3 4 5 >> Matrix_B = [1 2 3; >> 2 3 4;3 4 5] Matrix_B = 1 2 3 2 3 4 3 4 5 >> Null_M = [ ] %生成一个空矩阵 2.复数矩阵输入 复数矩阵有两种生成方式: 第一种方式 例1-1 >> a=2.7;b=13/25; >> C=[1,2*a+i*b,b*sqrt(a); sin(pi/4),a+5*b,3.5+1] C= 1.0000 5.4000 + 0.5200i 0.8544 0

Leetcode【78】Pascal's Triangle II

纵然是瞬间 提交于 2020-01-28 12:00:08
class Solution(object): def getRow(self, rowIndex): """ :type rowIndex: int :rtype: List[int] """ res = [1] for i in range(1, rowIndex + 1): res.insert(0, 0) # j循环每次算出r[0]...r[j-1],再加上最后一个永远存在的1,正好是rowIndex+1个数 for j in range(i): res[j] = res[j] + res[j + 1] return res 来源: CSDN 作者: 请叫我算术嘉 链接: https://blog.csdn.net/ssjdoudou/article/details/103749050

Pascal: Incompatible types: got “LONGINT” expected “CHAR”

江枫思渺然 提交于 2020-01-24 21:37:15
问题 I keep getting the "98 / 39 comp1_~1.pas Error: Incompatible types: got "LONGINT" expected "CHAR". This is concerning line 6. Any help please. Function RollBowlDie(VirtualDiceGame : Boolean) : Integer; Var BowlDieResult : Char; Begin If VirtualDiceGame Then BowlDieResult := Random(6) + 1 Else Begin Repeat Writeln('Please roll the bowling die and then enter your result.'); Writeln; Writeln('Enter 1 if the result is a 1'); Writeln('Enter 2 if the result is a 2'); Writeln('Enter 3 if the result

RCNN论文翻译

爱⌒轻易说出口 提交于 2020-01-24 15:22:57
用于目标检测和语义分割的丰富特征层次结构的提取 1、摘要 过去几年,在权威数据集PASCAL上,物体检测的效果已经达到一个稳定水平。效果最好的方法是融合了多种图像低维特征和高维上下文环境的复杂结合系统。在这篇论文里,我们提出了一种简单并且可扩展的检测算法,可以将mAP在VOC2012最好结果的基础上提高30%以上,也就是达到了53.3%。我们的方法结合了两个关键的因素: 为了实现目标检测和语义分割,将大型卷积神经网络用于图像的候选区域。 由于带标签数据稀少,我们先针对辅助任务使用了监督性的预训练,然后再对特征任务进行微调,实验证明产生了明显的性能提升。 因为我们采用了带CNN的候选区域筛选法,我们就把我们的方法叫做R-CNN:Regions with CNN features.我们也把RCNN效果跟Overfit比较了下(OverFeat是最近提出的在与我们相似的CNN特征下采用滑动窗口进行目标检测的一种方法),结果发现RCNN在200类ILSVRC2013检测数据集上性能明显优于OVerFeat。本文完整系统源码在:http://www.cs.berkeley.edu/˜rbg/rcnn。 2、介绍 特征很重要。在过去几十年,不同视觉检测任务基本都建立在对SIFT和HOG特征的使用。但是如果我们回看在权威视觉检测任务比赛PASCAL VOC的性能变化,我们必须得承认在2010

Delete element from a static array

吃可爱长大的小学妹 提交于 2020-01-17 05:37:32
问题 I am trying to remove an item from an array. The array is not dynamic! I found many examples on how to do it for the dynamic variant but none for the static. example from delphi: var A: array of integer; begin ... A:=[1,2,3,4]; Delete(A,1,2); //A will become [1,4] ... end; example from another site: type TIntArray = array of Integer; procedure DeleteArrayElement(var AArray: TIntArray; const AIndex: Integer); begin Move(AArray[AIndex + 1], AArray[AIndex], SizeOf(AArray[0]) * (Length(AArray) -

runerror(102) file not assigned?

倾然丶 夕夏残阳落幕 提交于 2020-01-17 01:56:06
问题 begin reset(f); assignfile(f, 'data.txt'); Reset(f); found:= false; search := edit1.text ; repeat read(f, phone) ; read(f, cusfname); read(f, adress); found:= search = phone until eof(f) or found; if found then memo1.append(phone); memo1.append(cusfname); memo1.append(adress); closefile(f) ; if not found then showmessage('member not found'); When I run this I get runerror(102) file not assigned??????? p.s I have assigned the variables in the procedure publically. 回答1: First reset(f) is wrong,