Search found 43 matches

by Evil1
Thu Jan 19, 2023 4:45 pm
Forum: Coding Questions
Topic: Base64 BLOB
Replies: 2
Views: 668

Re: Base64 BLOB

Thanks Marcus,

I figured it out, in this case the decoded Base64 was compressed with Zlib
by Evil1
Thu Jan 19, 2023 1:39 pm
Forum: Coding Questions
Topic: Base64 BLOB
Replies: 2
Views: 668

Base64 BLOB

Hi all,

I need some help with understanding how to decode a BLOB in Base64


I have a Base64 encoded BLOB

Snippet :-

eJztnV1sHFcVgMdpaBw7SdP8uM5PaRNC09LG/7Fdhza1vT9ZGseO7TgoLWxnZ6/tIbMzy8ys441omwaJh1AgRUBLVcEL4gV4ACGaKE4bgmoXWgQSUkX7UAEPSPwpal8oPyXcOzN3dmbnzuzEu2vF63OlTezdc889c ...
by Evil1
Sat Oct 24, 2020 9:49 pm
Forum: Coding Questions
Topic: Json array question
Replies: 5
Views: 1365

Re: Json array question

Sorry, you are right. In my mind I was working on the same thing, but in reality I was working on parsing the movie titles, based on code I found on the german Purebasic forum :-


InitNetwork()

EnableExplicit

Structure sMovie
vote_average.i
overview.s
original_language.s
release_date.s ...
by Evil1
Sat Oct 24, 2020 8:07 pm
Forum: Coding Questions
Topic: Json array question
Replies: 5
Views: 1365

Re: Json array question

I made some great progress, thanks to Infra. But now my application is crashing with a #JSON not intialised whilst parsing through some of the results :-

For example the folowing JSON returned results :-

{"page":1,"total_results":1,"total_pages":1,"results":[{"popularity":33.984,"id":13207,"video ...
by Evil1
Sat Oct 24, 2020 3:17 pm
Forum: Coding Questions
Topic: Json array question
Replies: 5
Views: 1365

Re: Json array question

Thanks Infra, it's easy when you know how :-)
by Evil1
Sat Oct 24, 2020 11:06 am
Forum: Coding Questions
Topic: Json array question
Replies: 5
Views: 1365

Json array question

Hi all,

I am new to JSON and am having difficulty figuring out how to grab the information from an array[object]

e.g. genres

https://i.ibb.co/ZhpgGSy/JSON.jpg


{"adult":false,"backdrop_path":null,"belongs_to_collection":null,"budget":0,"genres":[{"id":18,"name":"Drama"}],"homepage":null,"id ...
by Evil1
Sat Jun 27, 2020 9:45 pm
Forum: Windows
Topic: Auto W pusher
Replies: 0
Views: 1510

Auto W pusher

I have been playing a game that does not have an auto run option, e.g. you have to keep the W key pressed, so I put together the following that uses global shortcuts to simulate holding down the W key. You press CTRL1/CTRL 2 to activate/deactivate. Not sure this is the best way to do this as I am no ...
by Evil1
Mon Apr 13, 2020 6:56 pm
Forum: Coding Questions
Topic: How to disable camera & mic?
Replies: 3
Views: 1724

Re: How to disable camera & mic?

Hi there, the following three links may help, talks about using devcon and/or Comateplus :-

http://forums.purebasic.com/english/viewtopic.php?f=13&t=47830&hilit=disable+webcam&sid=28179da3df32d06ad8edd6dc7895e4ea
https://www.purebasic.fr/english/viewtopic.php?f=5&t=55245
https://devblogs ...
by Evil1
Sun Apr 12, 2020 9:20 pm
Forum: General Discussion
Topic: I must be bored - lol
Replies: 4
Views: 1986

Re: I must be bored - lol

https://i.ibb.co/KjKPcjh/dfit.jpg

...wrote some code - lol :- For a=1 To 100
a$=Str(a)
For b=1 To Len(a$)
If Mid(a$,b,1)="9": nine+1:Debug a$:EndIf
Next b
Next a

Debug nine

Indeed shorter, muscle memory forgets about the Countrsting command - meh 15 seconds to write, I wasn't trying to ...
by Evil1
Sun Apr 12, 2020 7:25 pm
Forum: General Discussion
Topic: I must be bored - lol
Replies: 4
Views: 1986

I must be bored - lol

I must be bored during this lockdown, someone posted this on PussJotter :-

https://i.ibb.co/KjKPcjh/dfit.jpg

I calculated it in my head and failed miserably, so wrote some code - lol :-

For a=1 To 100
a$=Str(a)
For b=1 To Len(a$)
If Mid(a$,b,1)="9": nine+1:Debug a$:EndIf
Next b
Next a ...
by Evil1
Fri Feb 28, 2020 11:19 pm
Forum: Coding Questions
Topic: Going Loopy
Replies: 21
Views: 4020

Re: Going Loopy

So the initial thread issue slowdown when compiled vs running in the IDE was down to my attempt at a progressbar :-

If ElapsedMilliseconds()-starttime >=20:starttime.q=ElapsedMilliseconds():SetGadgetState(ProgressBar_0,pg):EndIf
If ElapsedMilliseconds()-starttime >=20:starttime.q ...
by Evil1
Thu Feb 27, 2020 2:52 pm
Forum: Coding Questions
Topic: Going Loopy
Replies: 21
Views: 4020

Re: Going Loopy

Hi MarcUS56, I found some code that Wilbert wrote in ASM for counting lines in files and replaced your code block with his :-

While Not Eof(hFile)
ReadString(hFile)
Lines + 1
Wend
CloseFile(hFile)

Procedure CountFileByte(filename.s, byte)
Protected result, bytes_read
Protected buffer_size ...
by Evil1
Wed Feb 26, 2020 6:05 pm
Forum: Coding Questions
Topic: Going Loopy
Replies: 21
Views: 4020

Re: Going Loopy

Marc56us wrote:Hum, bug :oops:
Otherwise the program will always look for the same term (the one given at the opening).
Yes I noticed that :-)
by Evil1
Wed Feb 26, 2020 5:33 pm
Forum: Coding Questions
Topic: Going Loopy
Replies: 21
Views: 4020

Re: Going Loopy

That's great Marc56us, thanks for all your help. This is really helpful
by Evil1
Wed Feb 26, 2020 2:22 pm
Forum: Coding Questions
Topic: Going Loopy
Replies: 21
Views: 4020

Re: Going Loopy

If I understand correctly, the goal is to search for lines containing a keyword (here "Error") and add the line to a list ?

Running this part of the program as a Thread is not going to be any faster, it just allows not to block the rest of the program, i.e. the user will still be able to interrupt ...