Search found 5186 matches

by counting_pine
Nov 10, 2017 13:27
Forum: Tips and Tricks
Topic: Z Order
Replies: 2
Views: 76

Re: Z Order

That's pretty effective for not much code. I was impressed enough with the movable/sizable windows!
by counting_pine
Nov 06, 2017 12:22
Forum: General
Topic: Remove elements repeted
Replies: 22
Views: 389

Re: Remove elements repeted

fxm wrote:Dim s(0 To n-1)
which is more explicit

Yes, its meaning is much more obvious.
by counting_pine
Oct 31, 2017 20:47
Forum: General
Topic: Array Out-of-Bounds When It's Not
Replies: 5
Views: 173

Re: Array Out-of-Bounds When It's Not

It happens. It's always interesting to come across new ways of making bugs. Thanks for sharing the answer with us :)
by counting_pine
Oct 26, 2017 11:48
Forum: Community Discussion
Topic: FreeBASIC OpenBSD package
Replies: 15
Views: 447

Re: FreeBASIC OpenBSD package

Hi ibara, welcome to the forum, and thanks for taking the time to make this package! I personally have only really had any exposure to BSD through pfSense recently, but it seems like a potentially interesting discussion, and you're welcome to have it here if you want. Maybe it would be worth adding ...
by counting_pine
Oct 24, 2017 22:48
Forum: General
Topic: timing program for sort routine's
Replies: 17
Views: 1164

Re: timing program for sort routine's

This routine will sort 4 numbers: sub sort4( arr() as long ) #define A arr(1) #define B arr(2) #define C arr(3) #define D arr(4) if A <= B then ' A <= B if B <= C then ' A <= B <= C if C <= D then ' A <= B <= C <= D '' already sorted else ' A <= B <= C, D < C if B <= D then ' A <= B <= D < C swap C,...
by counting_pine
Oct 20, 2017 11:59
Forum: Projects
Topic: Pure FB Runtime Library (in progress)
Replies: 103
Views: 3129

Re: Pure FB Runtime Library (in progress)

If anyone wants to help out like TeeEmCee did, please feel free. On that note, just to say, GitHub makes it really easy to fork the project, edit a file, and submit back a pull request. I've just done one here, all with just a web browser*: https://github.com/ImortisInglorian/fbrtLib/pull/3 (*I did...
by counting_pine
Oct 20, 2017 11:36
Forum: Documentation
Topic: Wiki signups
Replies: 25
Views: 890

Re: Wiki signups

I just tried with DjPeters, and a password of my own choosing. I got the md5 hash with 'printf mypassword | md5sum'. It worked for me. Maybe try reproducing your password the exact same way? If it fails again, give me an address and I'll email you a temporary password. PS. It looks like you also hav...
by counting_pine
Oct 19, 2017 12:39
Forum: Tips and Tricks
Topic: HiDWord(), LoDWord(), Macro's to split a U/LongInt
Replies: 5
Views: 207

Re: HiDWord(), LoDWord(), Macro's to split a U/LongInt

Just to say that using pointers will make it endian-dependent, and may offend GCC with strict-aliasing rules.
by counting_pine
Oct 19, 2017 12:27
Forum: Documentation
Topic: Wiki signups
Replies: 25
Views: 890

Re: Wiki signups

OK, try now with 'DjPeters'.
by counting_pine
Oct 18, 2017 12:09
Forum: Documentation
Topic: Wiki signups
Replies: 25
Views: 890

Re: Wiki signups

angros47 wrote:Username: angros47

Done :)
by counting_pine
Oct 16, 2017 11:37
Forum: General
Topic: Problem with len()
Replies: 8
Views: 308

Re: Problem with len()

I guess we should add it to the "list of things that need fixing before anyone should consider using fixed-length STRINGs in their project".
by counting_pine
Oct 10, 2017 18:29
Forum: Tips and Tricks
Topic: Count unique colors used in an image using GDIPlus [Windows only]
Replies: 20
Views: 470

Re: Count unique colors used in an image using GDIPlus [Windows only]

I don’t recognise all of that code.. But basically, ‘if a and (1 shl n)’ is a way of testing the nth bit of a, whether it is set or not. There are 64 bits in a ulongint, so you need (N/64) ulongints to store N bits. (Note that if N doesn’t divide 64, the result is rounded up.) The nth bit can found ...
by counting_pine
Oct 10, 2017 11:37
Forum: Tips and Tricks
Topic: Count unique colors used in an image using GDIPlus [Windows only]
Replies: 20
Views: 470

Re: Count unique colors used in an image using GDIPlus [Windows only]

You're right, since the boolean type is 1 byte, there is no reason not to use it over a ubyte.
I'm still of the opinion that it's bloated to use 8 bits instead of 1, but it might be slightly faster in practice, and makes for more readable code.
by counting_pine
Oct 09, 2017 11:37
Forum: Tips and Tricks
Topic: Count unique colors used in an image using GDIPlus [Windows only]
Replies: 20
Views: 470

Re: Count unique colors used in an image using GDIPlus [Windows only]

It seems like you're rejecting the 2MB array idea because it's too small? Here's roughly what it would look like anyway: GdipBitmapLockBits(hImage, Cast(Any Ptr, @tRect), ImageLockModeRead, PixelFormat32bppARGB, @tBitmapData) redim as ulongint acolors(0 to (2^24) \ 64 - 1) For iY as long = 0 To iH -...
by counting_pine
Oct 09, 2017 11:19
Forum: General
Topic: Command$ gives wrong data
Replies: 14
Views: 195

Re: Command$ gives wrong data

This is to do with file globbing - it's enabled by default on all platforms. There is more info at /wiki/KeyPgCommand.

Go to advanced search