Search found 1425 matches

by jj2007
Jul 03, 2020 20:00
Forum: Tips and Tricks
Topic: Fast text search (hash table / GLib)
Replies: 11
Views: 1223

Re: Fast text search (hash table / GLib)

Perhaps I should stop arguing with people who live in the Alps ;-)
by jj2007
Jul 03, 2020 19:15
Forum: Tips and Tricks
Topic: Fast text search (hash table / GLib)
Replies: 11
Views: 1223

Re: Fast text search (hash table / GLib)

Makoto WATANABE wrote:Yes I am so lazy!
Not my opinion, I just quoted somebody else ;-)

This forum is crammed full of threads discussing why little proggies don't compile as they should.
by jj2007
Jul 03, 2020 13:37
Forum: Tips and Tricks
Topic: Fast text search (hash table / GLib)
Replies: 11
Views: 1223

Re: Fast text search (hash table / GLib)

Makoto WATANABE wrote:This program is too difficult for me
TJF wrote:FB users are a bit lazy
(more)
by jj2007
Jul 02, 2020 17:00
Forum: Community Discussion
Topic: Getting old
Replies: 23
Views: 597

Re: Getting old

Grazie, marcov ;-)
by jj2007
Jul 02, 2020 14:30
Forum: Community Discussion
Topic: Getting old
Replies: 23
Views: 597

Re: Getting old

Translation, please!
by jj2007
Jul 02, 2020 8:04
Forum: Community Discussion
Topic: Getting old
Replies: 23
Views: 597

Re: Getting old

David Watson wrote:I'm at the 2^6-2^4 border... does that make me a whippersnapper?
Kids, keep out of this discussion!
by jj2007
Jul 02, 2020 7:55
Forum: Community Discussion
Topic: Getting old
Replies: 23
Views: 597

Re: Getting old

Nice story, David ;-) I can confirm that your brain is in good shape (and so can everybody else who follows your posts). What I find remarkable is that an awful lot of us programmers are beyond the 2^6 border. Is BASIC such an old dialect? Same for Masm coders btw - some are even beyond the 2^6+2^4 ...
by jj2007
Jul 01, 2020 21:53
Forum: Community Discussion
Topic: Windows 10 May 2020 Update
Replies: 16
Views: 385

Re: Windows 10 May 2020 Update

marcov wrote:the need to escape with \\.\ for the -W calls.
utf8 support in the terminal is also being worked on.
I've never used the \\.\ escapes, where do you need them? Re terminal: if you mean the console, there has been utf8 support since WinXP, just use chcp 65001
by jj2007
Jun 30, 2020 21:39
Forum: General
Topic: Open program by dragging file "onto it"
Replies: 15
Views: 324

Re: Open program by dragging file "onto it"

grindstone wrote:Why that complicated? It can be done with just one single line of code:

Code: Select all

Shell Chr(34) & Command(1) & Chr(34)
It seems to me that OP wanted something different:
nuxpergrandis wrote:Can I make a FreeBASIC program that can "open" a file in a sense most windows applications can do nowadays?
If you drag a txt file onto a text editor, usually the editor will start running and automatically display the file.
by jj2007
Jun 30, 2020 11:48
Forum: General
Topic: Open program by dragging file "onto it"
Replies: 15
Views: 324

Re: Open program by dragging file "onto it"

Here's a version that compiles under fbc 1.07.0 and related headers TmpFb.bas(12) error 23: File not found, "Gir/Gtk-3.0.bi" The OP, nuxpergrandis, has two posts, so he is a definitely a n00b. Throwing untested examples at him, or code that requires external libraries without even giving ...
by jj2007
Jun 30, 2020 8:07
Forum: General
Topic: Open program by dragging file "onto it"
Replies: 15
Views: 324

Re: Open program by dragging file "onto it"

Your gtk/gtk.bi header doesn't match the parameter list in the source at parameter 2. Why do you think that this is related to the operating system? Why do you compile a GUI program with option -s console ? Note: you've to rename the 'object' variable, since this symbol later became a keyword in FB...
by jj2007
Jun 29, 2020 22:54
Forum: General
Topic: How would you find the shortest distance in a set of points?
Replies: 23
Views: 429

Re: How would you find the shortest distance in a set of points?

@dodicat: I've tried to understand your code, and especially why you sum up the "total distance". You are not doing two loops as shown below, how will you identify the two closest points? Below pts() is the array of points. It's Assembly but I hope it's understandable. The instructions mov...
by jj2007
Jun 29, 2020 20:28
Forum: General
Topic: How would you find the shortest distance in a set of points?
Replies: 23
Views: 429

Re: How would you find the shortest distance in a set of points?

Thanks, that is much clearer now. Are you sure that dodicat's code sums up the elements (wrongly) as SQR(X1^2) + SQR(X2^2)?

Code: Select all

#define rawlength(a,b) ((a.x-b.x)*(a.x-b.x)+(a.y-b.y)*(a.y-b.y))
To me, it looks like the correct Pythagoras: A²+B²=C² or rather dx²+dy²=dist²
by jj2007
Jun 29, 2020 19:41
Forum: General
Topic: How would you find the shortest distance in a set of points?
Replies: 23
Views: 429

Re: How would you find the shortest distance in a set of points?

X1 = 1, X2 = 6 SUMi(Xi^2) = 37 SUMi(SQR(Xi^2)) = 7 X1 = 3, X2 = 5 SUMi(Xi^2) = 34 SUMi(SQR(Xi^2)) = 8 Between these two examples, SUMi(Xi^2) decreases while SUMi(SQR(Xi^2)) increases. Sorry, I can't follow you. What exactly is ...
by jj2007
Jun 29, 2020 19:26
Forum: General
Topic: Open program by dragging file "onto it"
Replies: 15
Views: 324

Re: Open program by dragging file "onto it"

Seems to be Linux only...
* compiling TmpFb.bas with -t 2000 -s console **
FreeBasic\tmp\TmpFb.bas(17) warning 3(1): Passing different pointer types, at parameter 2 of GTK_WINDOW_SET_TITLE()

Aborting due to runtime error 12 ("segmentation violation" signal)

Go to advanced search