delphi-xe2

EIPHTTPProtocolExceptionPeer exception using PutBlock with array of bytes all set to zero

♀尐吖头ヾ 提交于 2019-12-11 02:16:16
问题 Using Delphi XE2 Update 3 I'm having a problem uploading a block of zero bytes to Azure. When I say zero bytes, I mean an array of bytes with each element set to zero (it's not zero length). For example: var ConInfo: TAzureConnectionInfo; RespInfo: TCloudResponseInfo; BlobService: TAzureBlobService; Content: TBytes; MD5: String; Hasher: TIdHashMessageDigest5; begin ConInfo:=TAzureConnectionInfo.Create(self); ConInfo.AccountName:='YOUR ACCOUNT NAME'; ConInfo.AccountKey:='YOUR ACCOUNT KEY';

Stringlist and CSV

社会主义新天地 提交于 2019-12-11 02:10:19
问题 How can i access the individual records based on Index in Stringlist after loading this CSV file in to it. CSV Example: Record0;Record1;Record2 Record0;Record1;Record2 Record0;Record1;Record2 Record0;Record1;Record2 回答1: SplitString will split your string with delimiters you define. In this example space and ; character. Update Added an example of an indexed split function. ( SplitByIndex ). Update 2 Added an example ( SplitByIndexAlt ) not using SplitString , but TStringList.DelimitedText .

Is it possible to modify VCL styles at runtime?

瘦欲@ 提交于 2019-12-11 01:43:32
问题 I have a TabControl in which each tab represents a distinct set of data. My application uses VCL Styles , and thus setting OwnerDraw to True does not lead to OnDrawTab being called. I was wondering if it is possible to somehow intercept the routine which draws a specific control using VCL Styles (in my case, TabControl ), and change the way the control is drawn (for instance, change the Canvas.Font , etc.). 回答1: To change the font color of a tabsheet using the vcl styles, you must override

making a base64 decoded text visible without changing “windows language for non unicode program settings” "

為{幸葍}努か 提交于 2019-12-11 00:56:09
问题 I encoded a text in a TMemo using base64 encoding tools ( like Indy tools ) but after decoding the result text, I just get some " ? " characters instead of the correct text . the original text is in persian language . THE QUESTION IS : I can see the decoded text if I set the windows"language for non unicode programs " on persian language . but I wanna make the decoded text visible without changing the " windows non unicode ... " . Its about two weeks Im stuck on this ! I tried

Change colour of TLabel in FireMonkey iOS app, and add items to TStringGrid?

拈花ヽ惹草 提交于 2019-12-10 23:25:16
问题 I managed to get Xcode (running as a VM under Windows) pushing an XE2 build FireMonkey iOS HD app to my (jailbroken) iPhone after XE-script-prep (creating the Xcode folder), with a valid company certificate. Anyway, faking the native cocoa controls seems a little seedy, but sticking a TToolbar (panel with standard iPhone gradient), a couple of TSpeedButtons (which have this curious V slope thing going on), and a TStringGrid and you're almost in the realms of basic iPhone app design. Drop a

OpenSSL 1.0.2.g update breaks my Delphi app

与世无争的帅哥 提交于 2019-12-10 23:08:52
问题 My Win32 program fails after an upgrade from OpenSSL 1.02f to 1.02g. I made sure to reboot after the upgrade, and I have verified that the correct libeay32.dll , libssl32.dll , and ssleay32.dll are in C:\Windows\SysWOW64 (and it does not help either if I copy them to my app directory). var lIOHandleSSL : TIdServerIOHandlerSSLOpenSSL; FWebBrokerBridge : TIdHTTPWebBrokerBridge; // = class(TIdCustomHTTPServer) begin FWebBrokerBridge := TIdHTTPWebBrokerBridge.Create(Self); LIOHandleSSL :=

Suggested method for dealing with invalid XML

最后都变了- 提交于 2019-12-10 22:46:40
问题 I'm trying to integrate a program with a 3rd party service using Delphi XE2. The problem I'm running into is that the service isn't escaping any of their values in the XML documents they send me. This is one of their "sample" xml documents <plans type="array"> <plan> <id type="integer">1</id> <series-title>A New Plan</series-title> <dates>January 16 & 17, 2010</dates> <plan-title>A New Plan For Your Family</plan-title> </plan> ... </plans> My original plan was just to wrap all the data in

How can I add a border to every form in my application without modifying each form's code?

自古美人都是妖i 提交于 2019-12-10 21:23:08
问题 We have a large legacy database driven VCL application which consists of over 300 different forms. We would like to provide a practice (dummy) database along with our software which is installed alongside their production database - with the ability to switch in-between them (for training / practice, etc.). The problem is that when users are using the practice mode, we have to make something very clear to stand out to them so they know they're working in the practice mode. The most ideal

How to fix unresolved types when importing Exchange Web Services (EWS) wsdl file?

删除回忆录丶 提交于 2019-12-10 20:41:45
问题 When importing the wsdl file from https://ourmail.server/ews/services.wsdl, I initially got a ton of "The following types, referred to in the WSDL document are not being represented in this file" in the generated services.pas. I then downloaded the wdsl file to disk, saw that it referenced http://schemas.microsoft.com/exchange/services/2006/messages and http://schemas.microsoft.com/exchange/services/2006/types, downloaded https://ourmail.server/ews/types.xsd and https://ourmail.server/ews

OpenGL Rapid Flickering Issues - and now not showing image

橙三吉。 提交于 2019-12-10 20:28:48
问题 I'm having some troubles with OpenGL. First of all, I have a custom control which I'm building, encapsulating OpenGL. I'm having a problem where it rapidly flickers, like it's 'flashing'. The control was too large and complex to post here, so I made a new small demo app to demonstrate and recreate the same scenario. The problem now: I'm not getting any image. Things would show fine in my custom control, but since I've copied the code and stripped it down in a small demo app, it won't show the