Search found 6343 matches

by infratec
Mon Mar 25, 2024 2:26 pm
Forum: Coding Questions
Topic: quick reading a file of 15 GByte.... how?
Replies: 22
Views: 941

Re: quick reading a file of 15 GByte.... how?

You can also try this: EnableExplicit #BufferSize = 65535 Define.i InFile, OutFile, ReadLen, Offset, Found, State Define *Buffer, *BufferEnd, *Ptr.Ascii, *LastEOL Define Filename$, Line$ Filename$ = OpenFileRequester("Choose a CSV file", "", "CSV|*.csv", 0) If Filename$...
by infratec
Mon Mar 25, 2024 12:51 pm
Forum: Coding Questions
Topic: quick reading a file of 15 GByte.... how?
Replies: 22
Views: 941

Re: quick reading a file of 15 GByte.... how?

I edit my example above.

You can create once a database file and afterwards it select your requested entries.
You can check how long it takes when you don't import the CSV file again.

But ... the debug output needs more time then writing the data in a new file.
by infratec
Mon Mar 25, 2024 10:16 am
Forum: Coding Questions
Topic: quick reading a file of 15 GByte.... how?
Replies: 22
Views: 941

Re: quick reading a file of 15 GByte.... how?

A 'slow' example. But if you imported the CSV file once, it should be very fast to find the call dates to someone. EnableExplicit UseSQLiteDatabase() Define.i DB, Records, File Define Filename$, Tablename$, SQL$, Line$ Filename$ = OpenFileRequester("Choose a DB", "", "SQLite...
by infratec
Mon Mar 25, 2024 8:19 am
Forum: Coding Questions
Topic: quick reading a file of 15 GByte.... how?
Replies: 22
Views: 941

Re: quick reading a file of 15 GByte.... how?

You should definately import this file in a SQLite database.
If this is done once, you have very fast access to all data you want.
by infratec
Fri Mar 22, 2024 8:31 am
Forum: Coding Questions
Topic: [Solved] Global Chr() problem
Replies: 19
Views: 725

Re: Global Chr() problem

Your small example on top of your first post works here without problems and showing a dot in the debug window.

PB 6.10 b8 ASM x32 on Win10 x64
by infratec
Wed Mar 20, 2024 9:46 am
Forum: Coding Questions
Topic: WebViewGadget deployment and other questions
Replies: 10
Views: 407

Re: WebViewGadget deployment and other questions

You don't need a web-browser.
You use the WebViewGadget() :wink:

Proxy is a problem on Linux and macOS.
On windows I implemented this in my WebView2Gadget(), the PB WebViewGadget() does not support it (up to now)

Or you have to use the global Proxy settings of the OS, which is not nice.
by infratec
Tue Mar 19, 2024 5:57 pm
Forum: Coding Questions
Topic: WebViewGadget deployment and other questions
Replies: 10
Views: 407

Re: WebViewGadget deployment and other questions

Linux webkit macOS webkit windows Edge webview2 If you own a up to date Win10 version, 'Microsoft Edge WebView2-Runtime' is installed. For older systems you have to install it by hand. I use my own WebView2Gadget(), since not all stuff what I needed is not available in PB (up to now). I already stum...
by infratec
Sun Mar 17, 2024 10:30 am
Forum: Off Topic
Topic: The US government asks not to use C/C++ due to memory vulnerabilities.
Replies: 14
Views: 688

Re: The US government asks not to use C/C++ due to memory vulnerabilities.

It is a question of programming and not of the language. C is 'low level'. the programmer has to take care about what he is doing. Maybe the programmers get worse or lazy. Or they use 'frameworks' which are not well done. (the fault was done by other programmers :mrgreen: ) To compensate that, a lan...
by infratec
Sat Mar 16, 2024 7:49 pm
Forum: Coding Questions
Topic: Programming a Timer
Replies: 14
Views: 525

Re: Programming a Timer

Why is BindEvent() better? My version catches the event in the main program event loop. This loop executes all events one after an other. If you move heavily the mose, for example, then there are many events to process. This can result in a short delay until the timer event is processed. But the fau...
by infratec
Sat Mar 16, 2024 7:37 pm
Forum: Coding Questions
Topic: Eumeration bug ???
Replies: 5
Views: 172

Re: Eumeration bug ???

Found it: you mean the help for enumeration. But ... you forgot the first part: Example: Named enumeration Enumeration Gadget #GadgetInfo ; will be 0 #GadgetText ; will be 1 #GadgetOK ; will be 2 EndEnumeration Enumeration Window #FirstWindow ; will be 0 #SecondWindow ; will be 1 EndEnumeration Enum...
by infratec
Sat Mar 16, 2024 4:41 pm
Forum: Coding Questions
Topic: Eumeration bug ???
Replies: 5
Views: 172

Re: Eumeration bug ???

Where in the documentation? The enumeration only has a startvalue when both enumerations have the same name. Else it starts from 0 if you don't set a start value. Enumeration Test #FirstWindow ; equals 0 #SecondWindow ; equals 1 EndEnumeration Enumeration Test #GadgetCancel ; equals 2 #GadgetImage ;...
by infratec
Sat Mar 16, 2024 4:19 pm
Forum: Coding Questions
Topic: Programming a Timer
Replies: 14
Views: 525

Re: Programming a Timer

Faster :wink: EnableExplicit #XCounterDefaultValue = 10 #LongTimerDefaultValue = 45 #ShortTimerDefaultValue = 15 Define.i LongTimerCounter, ShortTimerCounter, Event, XCounter OpenWindow(0, 0, 0, 200, 100, "Timer", #PB_Window_SystemMenu) CreateStatusBar(0, WindowID(0)) AddStatusBarField(60)...
by infratec
Sat Mar 16, 2024 3:23 pm
Forum: Coding Questions
Topic: AlignC not colored
Replies: 4
Views: 202

Re: AlignC not colored

Ups... it was a Macro.

And I have autocompletion on for macros.
by infratec
Sat Mar 16, 2024 12:04 pm
Forum: Coding Questions
Topic: AlignC not colored
Replies: 4
Views: 202

AlignC not colored

In the IDE of PB 6.10 beta 8 the word AlignC stays black.
Align is colored.
by infratec
Sat Mar 16, 2024 10:45 am
Forum: Coding Questions
Topic: FindMapElement() need a simple pointer example
Replies: 6
Views: 254

Re: FindMapElement() need a simple pointer example

.String is a structure like .Integer .Ascii ...

You can find them in ... 'Tools'->'Structure directory' (or similar, since I use the german IDE)