Search found 6382 matches

by infratec
Sun Apr 21, 2024 6:49 pm
Forum: Coding Questions
Topic: Speed up loop
Replies: 12
Views: 434

Re: Speed up loop

Simply search for myString :wink: Global myString.s = "@A#*+=-,. " I only showed the 'optimized' part. You had to copy the code from the first post and replace the corresponding part, after checked the original speed. But here it is a complete version with EnableExplicit: EnableExplicit Gl...
by infratec
Sun Apr 21, 2024 11:35 am
Forum: Coding Questions
Topic: Find the letter of drive by his name [Resolved]
Replies: 5
Views: 194

Re: Find the letter of drive by his name

Piero wrote: Sat Apr 20, 2024 9:33 pm Buy a Mac? :mrgreen:
This does not solve the problem:
Plugin several USB disks an find the mountpoint by the name of the disk.
by infratec
Sun Apr 21, 2024 11:28 am
Forum: Coding Questions
Topic: Find the letter of drive by his name [Resolved]
Replies: 5
Views: 194

Re: Find the letter of drive by his name

To reduce your enumeration: EnableExplicit Structure Char_Structure Char.s{1} EndStructure Define Chars.i Define Drive$ Define *Drives Define *Ptr.Char_Structure *Drives = AllocateMemory(1024) If *Drives *Ptr = *Drives Chars = GetLogicalDriveStrings_(MemorySize(*Drives), *Drives) While Chars If *Ptr...
by infratec
Sun Apr 21, 2024 10:52 am
Forum: Coding Questions
Topic: Speed up loop
Replies: 12
Views: 434

Re: Speed up loop

Meassured with: Procedure EventHandler() Protected.d StartTime, EndTime Select Event() Case #PB_Event_CloseWindow End Case #PB_Event_Gadget File = OpenFileRequester("Please choose image to load", "", "Image|*.bmp;*.jpg;*.png", 0) If IsImage(image) FreeImage(image) EndIf...
by infratec
Sun Apr 21, 2024 10:49 am
Forum: Coding Questions
Topic: Speed up loop
Replies: 12
Views: 434

Re: Speed up loop

Last step: Procedure AsciiToIMage(File$) Structure Character_Structure CharString.s{1} EndStructure Protected S.s Protected.i x, y, LoopCountX, LoopCountY Protected Ratio.d Protected.i NewWidth, NewHeight.i Protected.i width, Height.i Protected Color.i Protected.i r, g, b Protected Average.i Protect...
by infratec
Sun Apr 21, 2024 10:30 am
Forum: Coding Questions
Topic: Speed up loop
Replies: 12
Views: 434

Re: Speed up loop

Second step: Procedure AsciiToIMage(File$) Structure Character_Structure CharString.s{1} EndStructure Protected S.s Protected.i x, y, LoopCountX, LoopCountY Protected Ratio.d Protected.i NewWidth, NewHeight.i Protected.i width, Height.i Protected Color.i Protected.i r, g, b Protected Average.i Prote...
by infratec
Sun Apr 21, 2024 9:56 am
Forum: Coding Questions
Topic: Speed up loop
Replies: 12
Views: 434

Re: Speed up loop

A first step: Procedure AsciiToIMage(File$) Structure Character_Structure CharString.s{1} EndStructure Protected S.s Protected.i x, y, LoopCountX, LoopCountY Protected Ratio.d Protected.i NewWidth, NewHeight.i Protected.i width, Height.i Protected Color.i Protected.i r, g, b Protected Average.i Prot...
by infratec
Sun Apr 21, 2024 9:17 am
Forum: Coding Questions
Topic: Speed up loop
Replies: 12
Views: 434

Re: Speed up loop

I loaded a GIF and .... failed.

You should restict the files like this:

Code: Select all

File = OpenFileRequester("Please choose image to load", "", "Image|*.bmp;*.jpg;*.png", 0)
by infratec
Fri Apr 19, 2024 12:42 pm
Forum: Coding Questions
Topic: Check if UseSQLiteDatabase is called
Replies: 10
Views: 278

Re: Check if UseSQLiteDatabase is called

Code: Select all

SQLite = UseSQLiteDatabase()

If SQLite
	Debug "cool" ; Should be called
Else
	Debug "uncool"
EndIf
by infratec
Fri Apr 19, 2024 7:22 am
Forum: Tricks 'n' Tips
Topic: libcurl.pbi
Replies: 57
Views: 8826

Re: libcurl.pbi

Updated libcurl dlls to 8.7.1
by infratec
Thu Apr 18, 2024 6:55 pm
Forum: Coding Questions
Topic: Linker error
Replies: 3
Views: 104

Re: Linker error

Comment out stuff in your dll sourcecode.

If you reduced it to a minimum with fault, show us the code.
by infratec
Thu Apr 18, 2024 6:53 pm
Forum: Coding Questions
Topic: ReceiveHTTP doesnt work on Windows 7. Any solution?
Replies: 11
Views: 591

Re: ReceiveHTTP doesnt work on Windows 7. Any solution?

PureBasic is using libcurl :wink:

But if you want to do it yourself, use my libcurl.pbi and test HTTPRequestI()
by infratec
Wed Apr 17, 2024 9:53 am
Forum: Bugs - Linux
Topic: IMA when using NextIPAddress()
Replies: 1
Views: 292

Re: IMA when using NextIPAddress()

Just tested on the development PC: As soon as I used wg-quick up wg I get an IMA After wg-quick down wg It works again. For testing: apt install wireguard wg genkey | tee /etc/wireguard/private.key | wg pubkey > /etc/wireguard/public.key touch /etc/wireguard/wg.conf Insert into wg.conf: [Interface] ...
by infratec
Wed Apr 17, 2024 9:38 am
Forum: Bugs - Linux
Topic: IMA when using NextIPAddress()
Replies: 1
Views: 292

IMA when using NextIPAddress()

Hi, suddenly a program crashes with an IMA. It crashes when I call NextIPAddress() On the development PC it works (Debian 12.5) On the target PC IMA (Debian 12.5) Only difference: on the target PC is an additional wireguard interface. Code to test: EnableExplicit Define IP.i If OpenConsole() PrintN(...