pascal

InnoSetup, prevent installation if any task is selected

为君一笑 提交于 2019-12-09 22:43:36
问题 My inno script has two tasks: [Tasks] Name: client; Description: Install FTP client Name: server; Description: Install FTP server I would like to deny the installation in a non-intrusive way if any task is selected, for non.intrusive I mean for example enabling/disabling the "next" button when one of both tasks are checked, no advertising messagbe-box. I'm not sure if innosetup has a parameter or a "check" function to do this in a simple way How I could do it? 回答1: There is no way to do what

Android 基础

末鹿安然 提交于 2019-12-09 17:39:33
高内聚,低耦合。 内填充,外填充 设置组件填充父容器时存在两种方式 内填充的部分存在于组件空间内,相当于页边距的效果 padding—— 用于设置四边的内边距 paddingLeft 、 paddingRight 、 paddingTop 、 paddingBottom 外填充的部分存在与组件空间外,类似于边界的间隔 margin—— 用于设置四边的外部间距 marginLeft 、 marginRight 、 marginTop 、 marginBottom 时间驱动模型(守株待兔) 事件源(树),监听器(农夫),事件(兔子撞树) 监听器:为每个事件编写处理方法 将监听器对象注册给事件源 事件源发生某个事件时调用监听器中对应的方法完成事件处理 Java的 三大框架 (Spring,Struts,Hidernate) spring 利用它的IOC和AOP来处理控制业务(负责对数据库的操作) struts 主要负责表示层的显示 hibernate 主要作用是数据的持久化到数据库 Java的三大特性 Java语言的三大特性即是:封装、继承、多态 Android常用视图 视图(view)是可视化的界面元素 任何可视化组件都需要从android.view .View类继承 视图类通常分3种:布局类、视图容器类、和基础视图类 布局类: 1. 线性布局 ( LinearLayout )

Get filename from full path in Pascal

流过昼夜 提交于 2019-12-09 03:56:43
问题 I'm wondering how to get a file name from full path in Pascal. In .NET, we have two functions - Path.GetFileName and String.IndexOf, both of them allow to accomplish the task. For example, "C:\docs\file.txt" will return "file.txt". What would be the Pascal equivalent? 回答1: It is the ExtractFileName function. Thanks to Ken's comment. 来源: https://stackoverflow.com/questions/6102873/get-filename-from-full-path-in-pascal

Quicksort drama

被刻印的时光 ゝ 提交于 2019-12-08 19:16:54
问题 I just could smash my head against the wall. I do not understand, why my following quicksort algorithm is not working. It is written in Pascal: program quicksort; Type iArray = array [0..8] of integer; var intArray, newArray : iArray; Function getIntArray(localIntArray : iArray) : iArray; begin localIntArray[0] := 3; localIntArray[1] := 1; localIntArray[2] := 8; localIntArray[3] := 4; localIntArray[4] := 9; localIntArray[5] := 0; localIntArray[6] := 8; localIntArray[7] := 2; localIntArray[8]

How do I get a registry value in Inno Setup when the value only uses the default name?

僤鯓⒐⒋嵵緔 提交于 2019-12-08 15:55:34
问题 I'm trying to get the install directory of an application from the Windows Registry (Google Sketchup in this case) with Inno Setup's Pascal scripting so I can install a plugin there. The registry key doesn't have a name, it just has "(Default)" in Regedit. I tried this: RegQueryStringValue( HKLM, 'SOFTWARE\Google\Google Sketchup 6', '(Default)', pluginLoc ); but it doesn't return a value. Any suggestions? 回答1: Just leave the SubKeyName empty, like so: [Code] function InitializeSetup():

How to read AD displayname

随声附和 提交于 2019-12-08 08:14:32
问题 I am using Delphi pascal ver. 4 I have a user initials and need to get the active directory display name from the initials so I do not want to change AD just read - a function will be nice like this: fullname, user :string; user:='DKTB' (call function) fullname:=getAdDispayName(user); (after call then fullname = 'Torben Bagge') I have used google to find it but was only able to find it in C and not pascal. 回答1: You can easily do this using the IDirectorySearch Interface. I made an quick

Windows Search 4 Query - Delphi Example

别来无恙 提交于 2019-12-08 07:51:13
问题 The following web page describes querying Windows Search programmatically: http://msdn.microsoft.com/en-us/library/aa965362.aspx Does anyone have examples using Delphi/Pascal? Examples I have in mind are fairly simple: Search for certain file types. Search for specific text within files. Limit these above searches to a certain path. 回答1: Here's one I did a while ago - be aware that it may be out of date: const GENERAL_COLUMNS = '"System.Itemname", "System.Size", "System.DateCreated", "System

Using ReadProcess function of kernel32.dll at pascal

南楼画角 提交于 2019-12-08 05:13:34
问题 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

Inno Setup - Check if multiple folders exist

杀马特。学长 韩版系。学妹 提交于 2019-12-08 04:26:35
问题 I have a custom uninstall page, which is invoked with this line: UninstallProgressForm.InnerNotebook.ActivePage := UninstallConfigsPage; Now, this just shows the page every time the uninstaller is run, but I need it to show only if certain folders exist (there's 6 of them). I could make an if statement with a bunch of or 's, but I'm wondering if there's a neater way to do it. 回答1: In general, there's no better way than calling DirExists for each folder: if DirExists('C:\path1') or DirExists(

Inno Setup - Check if multiple folders exist

◇◆丶佛笑我妖孽 提交于 2019-12-08 04:16:22
I have a custom uninstall page, which is invoked with this line: UninstallProgressForm.InnerNotebook.ActivePage := UninstallConfigsPage; Now, this just shows the page every time the uninstaller is run, but I need it to show only if certain folders exist (there's 6 of them). I could make an if statement with a bunch of or 's, but I'm wondering if there's a neater way to do it. In general, there's no better way than calling DirExists for each folder: if DirExists('C:\path1') or DirExists('C:\path2') or DirExists('C:\path3') then begin { ... } end; Though, when processing a set of files/folders,