delphi-xe5

faster alternative to InttoStr/StrToInt?

核能气质少年 提交于 2019-12-02 21:18:15
I wonder if there are faster alternative than System.IntToStr / System.StrToInt . There is a fast version but only UTF8. Which is Int32ToUTF8 from SynCommons.pas and due to slow string conversions it is bound to be slow. The purepascal RTL versions are really slow for 64 bit. This routine is approximately 40% faster than the routine in the RTL. It could be much faster if you worked with WideChar[] buffers because the string allocation is taking up 75% of the time used by the conversion routine: IntS32ToWide: 5,50 ns/item (PWideChar) IntToStr: 34,51 ns/item (RTL) IntS32ToStr: 24,77 ns/item (RTL

Correctly using TAniIndicator in firemonkey mobile dev for wait for processing

↘锁芯ラ 提交于 2019-12-02 17:47:57
I am using Delphi XE-5 (Firemonkey Mobile Application) I am trying to get the TAniIndicator to work, by displaying during my long processing. I have a TAniIndicator (AniIndi) on my main form, but it does not spin. It displays correctly, but does not spin. begin Loading:= True; AniIndi.Visible:= True; AniIndi.Enabled:= True; UpdateAll; Application.ProcessMessages; //do my processsing here Loading:= False; AniIndi.Enabled:= False; AniIndi.Visible:= False; UpdateAll; Application.ProcessMessages; end; //EDIT BASED ON REMY's ANSWER TLoadThread = class(TThread) public Config: Boolean; constructor

Getting HTML from response stream using Indy's IDTCPClient [closed]

北城余情 提交于 2019-12-02 13:43:55
I have a component that a previous employee has created. It uses Indy (IDTCPClient) and the following method to perform requests (Where "aReadHeader" is a predefined Uri built before being passed in). function TMyConnector.GET(aRawHeader: String): String; begin if Not Connected then Connected := True; if Connected then begin FRawRequest := 'GET /'+ aRawHeader + ' HTTP/'+HTTPVerText+#13#10+ 'Host: '+FHost+#13#10+ 'Cookie: UserHPos=IOGLO00003000090000C000BS; '+ 'LOSID=qsBiy/wEDCq6tOXFzGbOlTD1lmo5AXdFnCkbzzPn6+qCeheYVyTcumRrjsqh+Hds4Fr2gZDazfDzGN1RA+nnHuQQeBy78ZUgctrZyyy9MnGl2qI/ulkV6EPxAfmmLg

Wildcard for arbitrary generic List

拈花ヽ惹草 提交于 2019-12-02 12:18:16
I have a class MyClass, which is not generic and contains and does something with an arbitrary TList. I wish to replace the TList with the generic TList, but MyClass has to stay non-generic. Since Delphi is invariant something like this doesn't work: list1: TList<TObject> list2: TList<MyType> //MyType extends TObject [...] list1 := list2 Furthermore there seems to be no non-generic Superclass of TList, just IEnumerable. Is there a way to declare a placeholder/wildcard for TList with an arbitrary T? This is a problem of missing support for Co- and Contravariance in Delphi. However if you know

Can Delphi XE5 produce apps for Windows 8 RT and Windows Phone 8?

点点圈 提交于 2019-12-02 10:03:13
问题 Is it possible to use Delphi XE5 or RAD Studio XE5 to create apps for Windows 8 RT (ARM based tablets) and Windows Phone 8, using the same code (Firemonkey) as for Android and iOS? I searched Embarcadero's website on windows development but it goes a long way to avoid mentioning Windows 8 RT and Windows Phone 8. It states that Your apps will run on Windows desktops and x86 based tablets with Intel and Intel Atom hardware such as Microsoft Surface Professional, Slate tablets from HP, Asus and

Can Delphi XE5 produce apps for Windows 8 RT and Windows Phone 8?

百般思念 提交于 2019-12-02 07:33:25
Is it possible to use Delphi XE5 or RAD Studio XE5 to create apps for Windows 8 RT (ARM based tablets) and Windows Phone 8, using the same code (Firemonkey) as for Android and iOS? I searched Embarcadero's website on windows development but it goes a long way to avoid mentioning Windows 8 RT and Windows Phone 8. It states that Your apps will run on Windows desktops and x86 based tablets with Intel and Intel Atom hardware such as Microsoft Surface Professional, Slate tablets from HP, Asus and others, as well as AMD processor based tablets from Acer, Samsung and more. Does this mean that Windows

Passwords and Delphi TZipFile

风流意气都作罢 提交于 2019-12-01 17:15:44
Is Delphi XE5 TZipFile able to handle encrypted/password protected zip files? Or must users use third party software to handle this? Any help would be appreciated. Looking at the source code for System.Zip , I see no indication of anything that would allow working with encrypted Zip files. There is no provision for specifying a password for either zipping or extracting files or creating a Zip archive. You could always include support for encrypted archives using Turbo Power Abbrevia , open-sourced several years ago by Turbo Power. It's been updated to support XE5, according to the SVN

Passwords and Delphi TZipFile

五迷三道 提交于 2019-12-01 17:09:24
问题 Is Delphi XE5 TZipFile able to handle encrypted/password protected zip files? Or must users use third party software to handle this? Any help would be appreciated. 回答1: Looking at the source code for System.Zip , I see no indication of anything that would allow working with encrypted Zip files. There is no provision for specifying a password for either zipping or extracting files or creating a Zip archive. You could always include support for encrypted archives using Turbo Power Abbrevia,

XE5 Android TBitmap.LoadFromStream fail inside a thread

那年仲夏 提交于 2019-12-01 12:24:12
I am creating a simple game for Android using Delphi XE5. I have a few resources, PNGs and Jpegs, I wanted to show a loading screen while my program loads up all the resources. But I found putting TBitmap.LoadFromFile, or TBitmap.LoadFromStream code inside a android thread, caused the App to quit immediately and return to Launcher, in debug mode Delphi don't even catch an exception. (The code works perfectly on Windows, and without thread on Android) I had to open logcat to see what went on, I saw something like "Error creating drawing context". My question is there a way to make a loading

Get SD card and executable path in Android and iOS with Delphi XE5 [closed]

送分小仙女□ 提交于 2019-12-01 08:23:36
How do I get the SD card path and how do I get the executable path in Android and iOS using Delphi XE5? Use System.IoUtils.TPath . The SD card path is obtained by using TPath.GetDocumentsPath , and the base directory of the app should be found with TPath.GetHomePath . uses IOUtils; var AppPath, CardPath: string; AppPath := TPath.GetHomePath; CardPath :- TPath.GetDocumentsPath; There are several other system path related functions in TPath as well, including these (and many others - you'll have to see which apply to Android and iOS, as the docs aren't clear) GetTempPath GetPublicPath