Search found 1568 matches

by the.weavster
Sun Aug 10, 2025 6:20 pm
Forum: Feature Requests and Wishlists
Topic: Week number in a Year
Replies: 9
Views: 1888

Re: Week number in a Year

Don't forget SQLite date functions are available to you:

Code: Select all

SELECT strftime('%V', '2025-08-10') AS weekno
by the.weavster
Fri Apr 25, 2025 11:06 am
Forum: Tricks 'n' Tips
Topic: Grid - WebView JS (Tabulator)
Replies: 10
Views: 2297

Re: Grid - WebView JS (Tabulator)

A related tip:

Tabulator wants the record data in this format:

[
{id:1, name:"Oli Bob", age:"12", col:"red", dob:""},
{id:2, name:"Mary May", age:"1", col:"blue", dob:"14/05/1982"},
{id:3, name:"Christine Lobowski", age:"42", col:"green", dob:"22/05/1982"},
{id:4, name:"Brendon Philips", age ...
by the.weavster
Fri Apr 25, 2025 10:56 am
Forum: Tricks 'n' Tips
Topic: Grid - WebView JS (Tabulator)
Replies: 10
Views: 2297

Re: Grid - WebView JS (Tabulator)

Mesa wrote: Fri Apr 25, 2025 10:33 am It doesn't make any difference if the JS and CSS are loaded locally.
It can do, you can't load ES6 modules via the file:// protocol so you have to be careful which version of the Tabulator files you use.
by the.weavster
Wed Apr 16, 2025 4:01 pm
Forum: Feature Requests and Wishlists
Topic: Cosmopolitan Libc
Replies: 5
Views: 1222

Re: Cosmopolitan Libc


May be it works for a console hello world, but is there more complex apps (with GUI) for this ?

It seems much more capable than just hello world, there's a list of binaries compiled with it here which includes Python, PHP, SQLite3, ...

As for GUIs I think somebody got SDL working but I think ...
by the.weavster
Wed Apr 16, 2025 8:23 am
Forum: Feature Requests and Wishlists
Topic: Cosmopolitan Libc
Replies: 5
Views: 1222

Cosmopolitan Libc

This seems interesting:

" Cosmopolitan Libc makes C a build-anywhere run-anywhere language, like Java, except it doesn't need an interpreter or virtual machine. Instead, it reconfigures stock GCC and Clang to output a POSIX-approved polyglot format that runs natively on Linux + Mac + Windows ...
by the.weavster
Sun Feb 23, 2025 9:03 pm
Forum: Coding Questions
Topic: CheckFileName()
Replies: 5
Views: 472

Re: CheckFileName()

AZJIO wrote: Sun Feb 23, 2025 6:56 pm Then you need FileSize()
The path / file may not exist (yet), it's a string coming in from a script and I'm trying to perform a sanity check to make sure it could reasonably be interpreted as a path for the current OS.
by the.weavster
Sun Feb 23, 2025 6:48 pm
Forum: Coding Questions
Topic: CheckFileName()
Replies: 5
Views: 472

Re: CheckFileName()

Ah, so it only checks the file name bit :oops:
I was using it to check a whole path string :lol:
by the.weavster
Sun Feb 23, 2025 5:38 pm
Forum: Coding Questions
Topic: CheckFileName()
Replies: 5
Views: 472

CheckFileName()

PB 6.20 on MX Linux (Debian)

This returns zero:

Code: Select all

Debug CheckFilename("/home")
I can't currently check other platforms...

// Moved from "Bugs - Linux" to "Coding Questions" (Kiffi)
by the.weavster
Tue Feb 18, 2025 11:39 am
Forum: Off Topic
Topic: Mike Shah's PureBasic - First Impression
Replies: 43
Views: 10064

Re: Mike Shah's PureBasic - First Impression

Mike Shah wrote:Fred, thanks for building a wonderful tool! Any interest in coming on the channel to chat about PureBasic or SpiderBasic?
@Fred
Are you taking up the invite?
by the.weavster
Sat Feb 08, 2025 12:21 pm
Forum: Announcement
Topic: Interview by Quin and Nsstudios
Replies: 43
Views: 14236

Re: Interview by Quin and Nsstudios


Quin: Is there any chance of SpiderBasic/PureBasic ever compiling to WebAssembly?

No, I don’t think so.

@Fred
May I ask why? Emscripten is designed to be a drop in replacement for gcc that compiles C to WebAssembly...


A high level view of the Emscripten toolchain is given below [see link ...
by the.weavster
Thu Feb 06, 2025 7:15 pm
Forum: Coding Questions
Topic: HTML color -> PB color -> libxlsxwriter color
Replies: 8
Views: 1506

Re: HTML color -> PB color -> libxlsxwriter color

Thank you both :D

I actually thought I had tried reversing RGB but I'd obviously slipped up doing it because that is working now 8)
by the.weavster
Thu Feb 06, 2025 6:30 pm
Forum: Coding Questions
Topic: HTML color -> PB color -> libxlsxwriter color
Replies: 8
Views: 1506

Re: HTML color -> PB color -> libxlsxwriter color


So probably libxlsxwriter using BGR not RGB

I don't think so as the declaration of cyan in libxlsxwriter's format.h header file is:

LXW_COLOR_CYAN = 0x00FFFF


Which matches cyan in HTML : #00FFFF

I have tried using PB's RGB() directly, also poking to the first 3 bytes, poking to the last 3 ...
by the.weavster
Thu Feb 06, 2025 5:13 pm
Forum: Coding Questions
Topic: HTML color -> PB color -> libxlsxwriter color
Replies: 8
Views: 1506

HTML color -> PB color -> libxlsxwriter color

I have this procedure that turns a HTML color string into a PB color:


Procedure.l ColorStringToNumber(col.s)
Define.l ncol = 0
Define.s xcol = ""
If Left(col, 1) = "#"
Define.s xcol = LSet(col, 7, "0")
Define.a nR = Val("$" + Mid(xcol, 2, 2))
Define.a nG = Val("$" + Mid(xcol, 4, 2))
Define ...
by the.weavster
Mon Feb 03, 2025 7:40 pm
Forum: Coding Questions
Topic: #PB_Any object result values after PB 6.20
Replies: 17
Views: 4973

Re: #PB_Any object result values after PB 6.20

I don't really understand the use case but...
How about an alternative version of OpenFile() rather than MyPB_Any():


#MAXLOOP = 10

fpath.s = "E:\Temp\"

Dim flist(#MAXLOOP)

Procedure.i OpenFileEx(Filename$, Flags)
Static pb_any.i
If pb_any = 0 : pb_any = 123 : EndIf ; <- change initial index ...
by the.weavster
Thu Jan 30, 2025 5:52 pm
Forum: Linux
Topic: gdk_threads_set_lock_functions
Replies: 1
Views: 4966

Re: gdk_threads_set_lock_functions

This is still happening. It doesn't seem to cause any issues but I'd like it to be gone :?