Search found 2093 matches

by badidea
Sep 17, 2020 21:40
Forum: Beginners
Topic: Output to file on disk in windows 10
Replies: 3
Views: 141

Re: Output to file on disk in windows 10

An example use: dim as string fileName1 = "test_file_1.txt" dim as string fileName2 = "test_file_2.txt" if open(fileName1 for output as #1) <> 0 then print "Error opening: " & fileName1 end 'closes all open files as well else print "File created: " & f...
by badidea
Sep 17, 2020 21:30
Forum: General
Topic: Project of a multiplatform version of FreeBasic Miner
Replies: 19
Views: 405

Re: Project of a multiplatform version of FreeBasic Miner

SARG wrote:
badidea wrote:http://games.freebasic.net/dumpbyid.php?input=166
Avast is not very happy when downloading. It reports a malware
Maybe a false positive.

I don't know. Not my website, not my program and most likely the virus does not support my OS as well.
by badidea
Sep 17, 2020 21:28
Forum: General
Topic: Project of a multiplatform version of FreeBasic Miner
Replies: 19
Views: 405

Re: Project of a multiplatform version of FreeBasic Miner

Roland Chastain wrote:So I have to install fbc 32 bits under Linux... or to find the cause of the problem. If someone has an idea, please let me know.

Check the use of timer variables, they need to be of type double on linux, else you get weird behavior.
I can have a look at the code this weekend. Hope I don't forget.
by badidea
Sep 16, 2020 21:29
Forum: General
Topic: Project of a multiplatform version of FreeBasic Miner
Replies: 19
Views: 405

Re: Project of a multiplatform version of FreeBasic Miner

I know nothing of the MMSystem library, but I would try Joshy's library mentioned above or this one from angros47: https://sourceforge.net/projects/freeba ... ary/files/ with more info at: viewtopic.php?f=17&t=26256
by badidea
Sep 13, 2020 10:25
Forum: General
Topic: Corona virus simulator
Replies: 47
Views: 2616

Re: Corona virus simulator

Dear badidea; Your "Apr 01, 2020 22:23" program is visual and very interesting. I would like to introduce your program with Japanese comments to Japanese people on my site. Please give me your permission. P.S. In Japan, thanks to "Factor X", the death toll from corona is only 1,...
by badidea
Sep 10, 2020 23:39
Forum: Beginners
Topic: Initialising an array with many empty elements
Replies: 15
Views: 410

Re: Initialising an array with many empty elements

You could put the error codes and description in a separate (text) file:

1, "Raw Read Error Rate"
2, "Throughput Performance"
254, "Free Fall Sensor"


And read this at start and fill each listed error.
by badidea
Sep 10, 2020 23:18
Forum: General
Topic: Star Wars "Light Saber"
Replies: 15
Views: 287

Re: Star Wars "Light Saber"

At the National Ignition Facility they try to point 192 high power lasers in a tiny capsule filled with deuterium and tritium to create small nuclear explosion. They have not succeeded yet. The installation is also not very portable: https://en.wikipedia.org/wiki/National_Ignition_Facility#/media/Fi...
by badidea
Sep 10, 2020 22:48
Forum: General
Topic: INSTR()
Replies: 7
Views: 133

Re: INSTR()

function firstNonZeroPos(numberStr as string) as integer for i as integer = 0 to len(numberStr) - 1 if numberStr[i] <> asc("0") then return i + 1 next return 0 end function print firstNonZeroPos("000123456789") print firstNonZeroPos("123456789") print firstNonZeroPos(&...
by badidea
Sep 08, 2020 18:26
Forum: Tips and Tricks
Topic: Perlin noise flow field with particles
Replies: 7
Views: 242

Re: Perlin noise flow field with particles

Gunslinger wrote:Dim n as vec2 = any

That prevents setting vec2 to (0, 0) first. Contents will be uncleared memory. A bit faster.
by badidea
Sep 08, 2020 17:58
Forum: Tips and Tricks
Topic: [S]imple [N]etwork [C]onnection win and lin 32/64-bit.
Replies: 89
Views: 17819

Re: [S]imple [N]etwork [C]onnection win and lin 32/64-bit.

Status = Connection->PutData(.TxPtr,40) 'I cant check Status because program ends with the above statement. How can that be? If I look at PutData(), it can return -1 or size (does not call end() ). It does call 'send()'. Then send() terminates your program? Sounds strange to me. CanPut(...
by badidea
Sep 03, 2020 22:51
Forum: Beginners
Topic: Slow printing to console screen
Replies: 14
Views: 323

Re: Slow printing to console screen

My times on Ubuntu mate, mate terminal:
0.083...
0.037...
0.011...
0.0046...
by badidea
Sep 03, 2020 21:44
Forum: General
Topic: Commandline parsing problem
Replies: 25
Views: 1891

Re: Commandline parsing problem

Ubuntu mate 18.04, 64-bit, mate terminal 1.20.0: for i as ulong = 0 to 3 print command(i), next print $ ./test "abc" d e ./test abc d e $ ./test a\\b d"e f"g h ./test a\b de fg h $ ./test a\\\"b c d ./test a\"b c d $ ./test a\\\\"b c" d e ./test a\\b c d e Sec...
by badidea
Sep 03, 2020 21:30
Forum: Beginners
Topic: Slow printing to console screen
Replies: 14
Views: 323

Re: Slow printing to console screen

fzabkar wrote:Is this a Windows "thing", or is it FB?

I always thought it was a linux thing: Extremely slow screen handling
by badidea
Sep 01, 2020 20:36
Forum: Beginners
Topic: How a parse from Html
Replies: 4
Views: 162

Re: How a parse from Html

To get the html string from the website: - If your are using linux then via 'wget' is easy, see e.g.: Short linux program to download files from the internet - On windows, there is probably some winapi call for it (outside of my knowledge). - Use a library: [S]imple [N]etwork [C]onnection win and li...

Go to advanced search