Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Kitty Hello

Pages: 1 2 [3] 4 5 ... 703
31
Fixed in current beta. Can you try?

32
Announcements / Re: Comming up features
« on: 2021-Mar-13 »
Get the beta branch. The Shoebox bug is fixed. You need to recreate the SBX files, though.

33
Shoebox compression is totally broken. I'm trying to fix, but I think I will have to reimplement another compression library, making your old sbx files broken. I'll add a header to give you a warning.
I'm sorry. This is a lot of work and I hope to find time for it, soon. I spend a few hours just to track the bug...

34
GLBasic - en / Re: Windows - Universal App?
« on: 2021-Mar-13 »
I found a way to make appx packages for the Windows App Store. Are you interested?

35
Math / Re: Hex To Decimal and Decimal to Hex
« on: 2021-Mar-13 »
There is a builtins HEX$(), are you aware of that?

36
Off Topic / Re: DLB/GLB
« on: 2021-Mar-13 »
What programming language would you use for the final product?

37
Userlibs [ *.gbal] / Dictionary, SortedList
« on: 2021-Feb-05 »
Here's an improved version of the Dictionary and a Sorted List for strings. I'll include that into the GLBasic Samples folder, because it's very handy, okay?
Code: (glbasic) [Select]
// --------------------------------- //
// Project: T_Dictionary
// Start: Friday, August 16, 2019
// IDE Version: 16.252

TYPE T_DictionaryPair
key$
val$
ENDTYPE

TYPE TDictionary
pairs[] AS T_DictionaryPair

// ------------------------------------------ //
//! Get string at given key
// ------------------------------------------ //
FUNCTION get$: key$
LOCAL i% = _index(key$, FALSE)
IF i>=0 THEN RETURN self.pairs[i].val$
RETURN ""
ENDFUNCTION

// ------------------------------------------ //
//! Set string at given key
// ------------------------------------------ //
FUNCTION set%: key$, val$
LOCAL i% = _index(key$, TRUE)
self.pairs[i].val$ = val$
ENDFUNCTION

// ------------------------------------------ //
//! Get index in pairs[] for given string
// ------------------------------------------ //
FUNCTION _index%: BYREF name$, create%=TRUE
LOCAL up%, dn%, mid%
up=0; dn=LEN(self.pairs[])-1
WHILE up < dn
mid = (up+dn) / 2
IF self.pairs[mid].key$ > name$
dn=MAX(mid-1, up)
ELSE
IF self.pairs[mid].key$ < name$
up=MIN(dn, mid+1)
ELSE
RETURN mid // not bigger, not smaller, guess what!?
ENDIF
ENDIF
WEND

IF LEN(self.pairs[]) AND self.pairs[up].key$ = name$ THEN RETURN up

// not found. But must be at [up].
IF create%
dn = LEN(self.pairs[]) // one below last
REDIM self.pairs[dn+1]
FOR mid = dn TO up+1 STEP -1
self.pairs[mid] = self.pairs[mid-1]
NEXT
IF dn>0 AND self.pairs[up].key$ < name$ THEN up=up+1

ALIAS where AS self.pairs[up]
where.key$ = name$
where.val$ = ""
RETURN up
ENDIF
RETURN -1
ENDFUNCTION
ENDTYPE


TYPE TSortedSet
keys$[]

// ------------------------------------------ //
//! Get string at given key
// ------------------------------------------ //
FUNCTION isSet%: key$
LOCAL i% = _index(key$, FALSE)
IF i>=0 THEN RETURN TRUE
RETURN FALSE
ENDFUNCTION

// ------------------------------------------ //
//! Set string at given key
// ------------------------------------------ //
FUNCTION insert%: key$
_index(key$, TRUE)
ENDFUNCTION

// ------------------------------------------ //
//! Get index in pairs[] for given string
// ------------------------------------------ //
FUNCTION _index%: BYREF name$, create%=TRUE
LOCAL up%, dn%, mid%
up=0; dn=LEN(self.keys$)-1
WHILE up < dn
mid = (up+dn) / 2
IF self.keys$[mid] > name$
dn=MAX(mid-1, up)
ELSE
IF self.keys$[mid] < name$
up=MIN(dn, mid+1)
ELSE
RETURN mid // not bigger, not smaller, guess what!?
ENDIF
ENDIF
WEND

IF LEN(self.keys$[]) AND self.keys$[up] = name$ THEN RETURN up

// not found. But must be at [up].
IF create%
dn = LEN(self.keys$[]) // one below last
REDIM self.keys$[dn+1]
FOR mid = dn TO up+1 STEP -1
self.keys$[mid] = self.keys$[mid-1]
NEXT
IF dn>0 AND self.keys$[up] < name$ THEN up=up+1

self.keys$[up] = name$
RETURN up
ENDIF
RETURN -1
ENDFUNCTION
ENDTYPE


Test program
Code: (glbasic) [Select]
LOCAL sose AS TSortedSet

sose.insert("cat")
sose.insert("mouse")
sose.insert("dog")
sose.insert("bird")
STDOUT "isset dog " + sose.isSet("dog") + "\n"
STDOUT "isset rat " + sose.isSet("rat") + "\n"
FOREACH k$ IN sose.keys$[]
STDOUT "-" + k$ + "\n"
NEXT

STDOUT "------------------\n"

LOCAL dict AS TDictionary

dict.set("cats", 5)
dict.set("mice", 7)
dict.set("dogs", "many")
dict.set("birds", "any")
STDOUT "dogs: " + dict.get$("dogs") + "\n"
STDOUT "rats: " + dict.get$("rats") + "\n"
FOREACH p IN dict.pairs[]
STDOUT "-" + p.key$ + " = " + p.val$ + "\n"
NEXT
KEYWAIT


Here's the output
Code: (glbasic) [Select]
isset dog 1
isset rat 0
-bird
-cat
-dog
-mouse
------------------
dogs: many
rats:
-birds = any
-cats = 5
-dogs = many
-mice = 7

38
OK, sounds interesting.

39
Off Topic / Romantic Lockdown?
« on: 2021-Jan-29 »
For those of us, who are married, the current lockdown situation might be a great challenge, because women do need care, adventure and variation. Before the lockdown, this was made easy for us, because there was restaurants, day trips and gathering with friends. We could even stay out after 9pm. Remember, on our wedding day, we (hopefully) all promised to "love and care" for the bride.
For me, love, that is not "I like what you have/are", it's more a "It's not because of the one you love - it's my free will. I want to put great effort to bring her joy. Take some of her burden. ". That kind of love.
How will this work with the latest limitations put on us? I am sort of desperately clueless.
So, maybe you have better ideas that you want to share, to make our wedding promise shine brightly true in a dark world full of lies.

Rules
-Post your idea
-Don't talk about the lockdown
-Don't post your opinion on the lockdown
-Don't ask on our opinion on the lockdown
-Don't try to think logically about the lockdown
-Do not complain about the lockdown or the gouverment or anyone responsible for the lockdown.



So, what I have is:

Make a fire
If you have a garden, get some metal bowl, the bigger the better, put some dry wood on (you can get that in a supermarket, here. But also a farmer close by migtht sell you a sack). Put some liqud fire starter above and burn it. Beware, when it's cold outside, it took me a full hour to get it burning properly. Add some garden chairs, maybe two branches and some marshmellows.
It worked fine, but for sure you will have the kids attending ;). So I'd give a romance rating of 7/10.


Watch the dusk
Open google maps, find a nearby place with a hill or a small mountain, that has a road on the west side. Then find a restaurant, that offers take-away food nearby. Order food, driver to that place, pull the handbrake and keep the engine running (Yeah, sue me Greta!) and watch the sun go down. Make sure to have a pack of wet tissues in the car for the fingers. Also, this might need good timing. Alternatively, just drive to a parking lot at a lake nearby and leact the lights on, if you're too late for dawn.
We did this (again with the whole family). It's no substitute for a real restaurant, but hey, better than netflix. 6/10?

40
Fixed in next update.

41
Off Topic / Re: Happy New Year Guys!
« on: 2021-Jan-23 »
Happy new year. I have low hopes for any improvement. But, let's not get politically, here.

43
GLBasic - de / Re: Transparenz
« on: 2020-Dec-30 »
Ich kenne das so, dass man den Desktop als bitmap "grabbed" und dann den Bereich wiederum zeichnet. Alternative wäre:
https://stackoverflow.com/questions/62252362/winapi-how-to-draw-opaque-text-on-a-transparent-window-background

44
Announcements / Re: Comming up features
« on: 2020-Dec-01 »
OK, I'll quite the possibility to drop the "self.". I'm sorry.

45
Announcements / Re: Comming up features
« on: 2020-Nov-26 »
Good find on the IDE. The compiler issue is harder. Can you redesign this piece of code, please  =D

Pages: 1 2 [3] 4 5 ... 703