Search found 1785 matches

by jassing
Fri Aug 09, 2024 6:30 pm
Forum: Bugs - IDE
Topic: Ongoing IDE lockups
Replies: 11
Views: 8903

Re: Ongoing IDE lockups

No prefs, virgin environment, no session history, still happened. Maybe scintilla?
by jassing
Sat Jun 15, 2024 11:21 pm
Forum: Coding Questions
Topic: module question
Replies: 6
Views: 1343

Re: module question


Can you call a module from within a module? I tried to do that and got an error "Module not found (and the details)". I can call from the main without problem. Or am I doing something wrong?



DeclareModule mod1
Declare func1()
EndDeclareModule
Module mod1
Procedure func1()
Debug "mod1 ...
by jassing
Fri Jun 14, 2024 7:37 pm
Forum: Tricks 'n' Tips
Topic: enhanced formatdate/parsedate
Replies: 2
Views: 1065

Re: enhanced formatdate/parsedate

Apparently this is redundant, dateEx handles it.
by jassing
Fri Jun 14, 2024 7:28 pm
Forum: Tricks 'n' Tips
Topic: enhanced formatdate/parsedate
Replies: 2
Views: 1065

enhanced formatdate/parsedate

I had to parse some date formats for a syslog server I wrote. It's been in use for a while, but really, rather limited in use in terms of what it does/handles on a regular basis
This handles a lot more than standard formatdate() tkens %yyy%/%hh etc. as well as parsing those dates.

Maybe someone ...
by jassing
Tue Jun 11, 2024 2:14 pm
Forum: General Discussion
Topic: Reducing session history size
Replies: 8
Views: 2473

Re: Reducing session history size

Curious. I guess do a search & replace on "days" to "180" .

Here is a simpled example. Note, this example has saving any changes commented out
EnableExplicit
UseSQLiteDatabase()

#file$ = "c:\temp\dump\d\backup\history.db"
#daysOld=180

Debug "Removing records older than "+Str( #daysOld )+" days ...
by jassing
Mon Jun 10, 2024 10:19 pm
Forum: General Discussion
Topic: Reducing session history size
Replies: 8
Views: 2473

Re: Reducing session history size


The database hasn't remained large (the file is now only 144 MB compared to 757 MB), but why does the debug output say "Removing records older than 365 days" when I told it to only remove older than 180 days? Has it kept history that I didn't want? I know nothing about SQLite.


How did you ...
by jassing
Mon Jun 10, 2024 10:16 pm
Forum: Coding Questions
Topic: NetWork questions
Replies: 5
Views: 1359

Re: NetWork questions

the id's are generated automatically.
Did you see the examples networkClient.pb and networkServer.pb?
by jassing
Mon Jun 10, 2024 7:25 pm
Forum: General Discussion
Topic: Reducing session history size
Replies: 8
Views: 2473

Re: Reducing session history size

Over time, database files can grow. Leaving empty space.

Do this, before the 'vacuum'
If DatabaseQuery(db,"pragma freelist_count")
If NextDatabaseRow(db)
Debug "Free count "+FormatNumber(GetDatabaseLong(db,0),0)
EndIf
FinishDatabaseQuery(db)
EndIf


I'm betting it's a rather large #.
The ...
by jassing
Sun Jun 09, 2024 4:27 pm
Forum: General Discussion
Topic: Reducing session history size
Replies: 8
Views: 2473

Re: Reducing session history size

Old post, but I'm working on a more robust cleaner (removing invalid/corrupt records, mismatched records, etc)

In case anyone else wants to, here's a simple way to remove older records:

UseSQLiteDatabase()
Declare removeOlder( cHistoryDB.s, days=-1 )

removeOlder( "c:\temp\dump\d\backup\history ...
by jassing
Sun Jun 09, 2024 5:09 am
Forum: Tricks 'n' Tips
Topic: [Windows] WindowsVersion()
Replies: 14
Views: 7212

Re: [Windows] WindowsVersion()

This is some older code, and needs updating, but it might get you started... this is not my code.

; after
; https://msdn.microsoft.com/en-us/library/windows/hardware/ff563620(v=vs.85).aspx
; https://stackoverflow.com/questions/38102565/how-can-a-vb-6-app-determine-if-it-is-running-on-windows-10 ...
by jassing
Sun Jun 09, 2024 4:55 am
Forum: Coding Questions
Topic: [Solved] Directory loop without global?
Replies: 6
Views: 1236

Re: Directory loop without global?

Or keep it simple... (now with thread demo) (assuming you don't need the size in one location, just from individual threads)

EnableExplicit

Procedure.q FolderSize(dir$)
Protected size.q, dir
dir=ExamineDirectory(#PB_Any,dir$,"")

If dir
While NextDirectoryEntry(dir)
If DirectoryEntryType ...
by jassing
Sun Jun 02, 2024 7:37 pm
Forum: Coding Questions
Topic: C vs ASM math. (again)
Replies: 6
Views: 2086

C vs ASM math. (again)

(I'm using 6.11b3 x64, didn't try x86)
run this under C backend, then ASM backend. Will the backends ever agree on math, or are workarounds the norm?

Code: Select all

Define t
Debug @t % 32
by jassing
Fri May 31, 2024 9:56 pm
Forum: Feature Requests and Wishlists
Topic: "help" on procedures
Replies: 4
Views: 1616

"help" on procedures

Could not find a wiki article on this... so I hope this isn't redundant or already implemented (sorry if it is)

when you enter a PB command [eg: OpenDatabase()] a statusbar entry pops up at the bottom (in addition to parameters, it shows a description: "Opens the specified database")

in a shared ...
by jassing
Fri May 31, 2024 4:29 am
Forum: Coding Questions
Topic: #PB_EventType_FirstCustomValue quetion
Replies: 4
Views: 1563

Re: #PB_EventType_FirstCustomValue quetion

Less than ideal. Requires a modicum of cooperation not always easy, or reliable.
by jassing
Fri May 31, 2024 4:08 am
Forum: Coding Questions
Topic: #PB_EventType_FirstCustomValue quetion
Replies: 4
Views: 1563

#PB_EventType_FirstCustomValue quetion

How can I work around this? (without knowing the what the other did)
I had done something like: Enumeration #PB_EventType_FirstCustomValue+1000, but this leaves open manual collisions by chance.

DeclareModule abc
Declare xyz()
EndDeclareModule
Module abc
Enumeration #PB_EventType ...