Search found 42 matches

by Sergey
Sat Jul 12, 2025 10:21 am
Forum: Coding Questions
Topic: Order of JSON items
Replies: 9
Views: 481

Re: Order of JSON items


Hello Sergey,

your example does not work in my case.
I want to get the name in the same order as it is written, but I get Tom, Michel, Peter.

I gave you an idea how to order object members list
See Mijikai's exmaple


Interesting, here is what i came up with.

Hello, Mijikai. Yes, that's ...
by Sergey
Fri Jul 11, 2025 11:29 pm
Forum: The PureBasic Editor
Topic: IDE Tool "Jump to Marker"
Replies: 5
Views: 263

Re: IDE Tool "Jump to Marker"

Code: Select all

CompilerIf Not #PB_Compiler_DPIAware
	MessageRequester("Warning", "Enable DPIAware", #PB_MessageRequester_Warning)
	End
CompilerEndIf
Simple check for DPIAware :wink:
by Sergey
Fri Jul 11, 2025 5:47 pm
Forum: Coding Questions
Topic: Order of JSON items
Replies: 9
Views: 481

Re: Order of JSON items

Input$ = "{ " + Chr(34) + "x" + Chr(34) + ": 10, " +
Chr(34) + "y" + Chr(34) + ": 20, " +
Chr(34) + "z" + Chr(34) + ": 30 }"

ParseJSON(0, Input$)
ObjectValue = JSONValue(0)

If ExamineJSONMembers(ObjectValue)
While NextJSONMember(ObjectValue)
Debug Str(JSONMemberValue(ObjectValue ...
by Sergey
Thu Jul 10, 2025 7:09 pm
Forum: Coding Questions
Topic: Order of JSON items
Replies: 9
Views: 481

Re: Order of JSON items

I'm used a pointer to json object in memory (from min to max), maybe this help you order json members :wink:
by Sergey
Thu Jul 10, 2025 5:00 am
Forum: The PureBasic Editor
Topic: IDE Tool "Jump to Marker"
Replies: 5
Views: 263

Re: IDE Tool "Jump to Marker"

Michael Vogel, there 2 versions of source code
Second version starts at line 412 :wink:
Thanks, useful tool
by Sergey
Sat Jun 21, 2025 9:41 pm
Forum: Windows
Topic: WaitThread problem
Replies: 7
Views: 289

Re: WaitThread problem

Mijikai, very very nice! You're a genius! Thank you, now works fine.
I never used PostEvent and didn't know about its existence :)
by Sergey
Sat Jun 21, 2025 7:52 pm
Forum: Windows
Topic: WaitThread problem
Replies: 7
Views: 289

Re: WaitThread problem

Hi, jacdelad
This is a example, not working program

1) start_thread run once
2) how can I change listicon during the thread?
3) this is done specifically to show that the execution of WaitThread
does not allow to change the contents of the ListIconGadget

Procedure thread(param)
Delay(1000 ...
by Sergey
Sat Jun 21, 2025 6:26 pm
Forum: Windows
Topic: WaitThread problem
Replies: 7
Views: 289

WaitThread problem

Hi,
when I want to change listicon text in thread it becomes unlimited
Just comment line 3 and all will be ok, multithreading is enabled
PB6.21 final Win10 x64
Both codes WaitThread or While-Wend are freezing

Procedure thread(thread_param)
Delay(1000)
SetGadgetItemText(0, 0, "Wait")
Delay(1000 ...
by Sergey
Thu Mar 27, 2025 12:58 am
Forum: Coding Questions
Topic: Image not showing in window with ImageGadget
Replies: 5
Views: 238

Re: Image not showing in window with ImageGadget

Hi,
1) UsePNGImageDecoder() at the beginning
2) ImageID(Img_SplashScreen)
And all will be ok ;-)
by Sergey
Tue Mar 11, 2025 5:25 pm
Forum: General Discussion
Topic: Exchange on Face recognition and Face comparison
Replies: 8
Views: 1343

Re: Exchange on Face recognition and Face comparison

dige wrote: Tue Mar 11, 2025 10:04 am Wow, that's fantastic!
Recognizing faces, age, emotion etc. works very well.
I knew that you would like it
It also very simple to use
And it has many face detectors, try each of them

I wish you success in the adaptation of DeepFace on Purebasic 8)
by Sergey
Mon Mar 10, 2025 9:33 pm
Forum: General Discussion
Topic: Exchange on Face recognition and Face comparison
Replies: 8
Views: 1343

Re: Exchange on Face recognition and Face comparison

Yes, you're may run deepface on Python
https://github.com/serengil/deepface
Last released on Aug 17, 2024

Works well, every model about 500 MB (gender, race, age)
And maybe anybody transfer this project to PB once
by Sergey
Tue Mar 04, 2025 11:48 pm
Forum: The PureBasic Editor
Topic: structred list autofill error
Replies: 0
Views: 1915

structred list autofill error

Hi, please make space button such as escape button and space or select (I want it) when autofill window appear
Structure params_list
param1.s
param2.s
EndStructure

NewList my.params_list()

AddElement(my())
my()\

Just delete "\" character in last line and type it again...

If you're press ...
by Sergey
Mon Jan 13, 2025 10:37 pm
Forum: Coding Questions
Topic: HttpRequest with gzip
Replies: 24
Views: 5307

Re: HttpRequest with gzip

Hi, Rinzwind
I adapted Windows code from this forum to your needs,
just test it and correct lines how you want
Please wait for ending, on my PC it took about 18 sec. buffer 1024
Buffer 1024 * 1024 (1 MB) took 0.1 sec. 8)
No need any PB packer's code like ZIP or LZMA

EnableExplicit

#Z_BUFFER_SIZE ...
by Sergey
Mon Jan 13, 2025 9:51 pm
Forum: Tricks 'n' Tips
Topic: SetMenuItemImage and GetMenuItemImage [Windows only]
Replies: 11
Views: 3773

Re: SetMenuItemImage and GetMenuItemImage [Windows only]

And we don't dreamed of IMA at line 397 on PB6.20b2 x64 :)