Search found 969 matches

by badidea
Oct 22, 2018 19:51
Forum: General
Topic: Linux/Windows cross-platform sockets
Replies: 3
Views: 61

Re: Linux/Windows cross-platform sockets

[S]imple [N]etwork [C]onnection win and lin 32/64-bit. Or no library, see: https://freebasic.net/forum/viewtopic.php?f=2&t=25618 and https://beej.us/guide/bgnet/html/multi/index.html Winsock is based on Berkeley sockets: https://en.wikipedia.org/wiki/Winsock, so conversion to linux should not b...
by badidea
Oct 22, 2018 18:15
Forum: General
Topic: A bigger font
Replies: 13
Views: 207

Re: A bigger font

The problem is of corse, I have 256 times declare an image. Or 128 for ASCII only There is something like arrays, you know? Arrays are not limited to numbers, you can have arrays of images, arrays of bicycles, arrays of windows, arrays of arrays of arrays of trouble, anything. const as integer MAX_...
by badidea
Oct 21, 2018 17:56
Forum: DOS
Topic: Help required in initialising FreeBASIC
Replies: 2
Views: 56

Re: Help required in initialising FreeBASIC

I have to be considered a rank beginner as I have not looked at the BASIC programming language since the mid-1970's. I have decided to jump in off the deep end and have downloaded and installed FreeBASIC V1.05.0 and FBIde0.4.6r4. Welcome! Sound like another one retired form work and returning to an...
by badidea
Oct 21, 2018 15:49
Forum: General
Topic: A bigger font
Replies: 13
Views: 207

Re: A bigger font

You make an image of it, and use put (https://freebasic.net/wiki/wikka.php?wa ... utgraphics). Will be a lot faster.
by badidea
Oct 20, 2018 17:51
Forum: Linux
Topic: Changing to Root & Back within FB
Replies: 15
Views: 174

Re: Changing to Root & Back within FB

Dinosaur wrote:You have done well badidea.

Thanks, with all this linux stuff I am another day behind on the game development competition. Luckily, this thread issue seems solved.
by badidea
Oct 20, 2018 9:35
Forum: Linux
Topic: Changing to Root & Back within FB
Replies: 15
Views: 174

Re: Changing to Root & Back within FB

I know nothing about the expect script, but it only seems to complicate things. I changed the testing code. Irrelevant stuff out. Added error checking. I also added a graphics screen, because I don't how to start a terminal screen when starting the program from desktop. #Include "crt/pthread.bi...
by badidea
Oct 19, 2018 23:01
Forum: Tips and Tricks
Topic: Collision detection circle <-> rectangle with position correction
Replies: 2
Views: 109

Collision detection circle <-> rectangle with position correction

A collision detection routine (and example) where the position of the circle (at the mouse position) is corrected when colliding with a rectangle. The routine is a bit long, probably room for improvement. Also, when the mouse-cursor is inside the rectangle, there is a preference for on top or below ...
by badidea
Oct 19, 2018 22:52
Forum: Tips and Tricks
Topic: Guidelines for posting Tips and Tricks
Replies: 10
Views: 520

Re: Guidelines for posting Tips and Tricks

Shouldn't this topic be a sticky one (always on top)?
by badidea
Oct 19, 2018 20:39
Forum: Linux
Topic: Changing to Root & Back within FB
Replies: 15
Views: 174

Re: Changing to Root & Back within FB

You can make 'root' the 'owner' of the file / program and set the 'SUID/GUID bit'. This way the program is executed a superuser and can be started by a normal user. I have never tried this myself however. Some heavy reading: https://unix.stackexchange.com/questions/79395/how-does-the-sticky-bit-work...
by badidea
Oct 19, 2018 20:09
Forum: Linux
Topic: Changing to Root & Back within FB
Replies: 15
Views: 174

Re: Changing to Root & Back within FB

The full code is:... That does not seem like the full code. Cannot run it, parts missing. If your program needs superuser rights, why not run your program as superuser? 'sudo ./myprogram' Then no need to store your password in a .bas file. BTW: I have been using linux for ~8 years now, but I am cer...
by badidea
Oct 19, 2018 19:03
Forum: Linux
Topic: Changing to Root & Back within FB
Replies: 15
Views: 174

Re: Changing to Root & Back within FB

But I got what looks like a file listing It is: "ls". But the file listing is done with 'administrative rights' Not sure what you actually want to do, but "ls" can be replaced with the actual program or command you want to do. To run administrative tasks in Linux, you must have ...
by badidea
Oct 19, 2018 18:34
Forum: Linux
Topic: Changing to Root & Back within FB
Replies: 15
Views: 174

Re: Changing to Root & Back within FB

On Ubuntu, this seems to work:

Code: Select all

shell "echo " & myPassWord & " | sudo -S ls"

On Ubuntu, a normal user can have superuser rights (for some time). The actual root account is not used.
by badidea
Oct 19, 2018 9:35
Forum: General
Topic: Fast random integers
Replies: 49
Views: 745

Re: Fast random integers

I think the NSA noticed your crypto activities and remotely changed your Intel cpu with their backdoor in Windows.
by badidea
Oct 18, 2018 17:32
Forum: General
Topic: Fast random integers
Replies: 49
Views: 745

Re: Fast random integers

deltarho[1859] wrote:windows.bi is only used in this code so only if the target is Win32

Check, PCG32II with your test program (above) works fine.
by badidea
Oct 17, 2018 23:16
Forum: General
Topic: Fast random integers
Replies: 49
Views: 745

Re: Fast random integers

I did get a significant difference, maybe your c-compiler back-end understands that the first loop does nothing? And reduces it to nothing?

I saw a windows.bi which my pc probably does not understand.

Go to advanced search