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 - Calloway

Pages: [1] 2
1
I've been doing HTML/CSS since I was seven and I'd be happy to do this, just message me at calloway at myself dot com so that I can send the files back to the right email address. It could take a week or two though as I'm currently on Holiday

2
QB64 Discussion / Re: Wiki accounts: apply here.
« on: November 24, 2019, 10:27:44 pm »
Heyo, can you grant me access oh holy odin?

3
Should there not be a request by the new owner to use the old members data/personal info or even the coding generated (after all the site was only quasi public- meaning limited to lovers of Qbasic and it's iterations), should the new owner of the site not be obligated to provide info on any change to privacy policies? I'm not sure if some of these issues aren't already standard unwritten expectations by members of these various programming sites.
I mean, if they're using the site for malicious purposes then I don't think they would be too avid about announcing privacy policies and contacting the old owner...

4
QB64 Discussion / Re: Top 10 Algorythm
« on: November 04, 2019, 10:51:35 pm »
If you're only finding top 10 then why are you keeping all the other data?

5
QB64 Discussion / Re: QB64 v1.3 released!
« on: April 14, 2019, 10:45:58 am »
Is there a changelog where you can see all the new updates, changes, bug fixes etc.? Also looks real nice :D

6
QB64 Discussion / Re: I finally found a Copyright License I like..
« on: March 02, 2019, 06:22:13 pm »
I still think this one is more straightforward

7
QB64 Discussion / Re: Help with a Small Program
« on: February 03, 2019, 09:13:36 pm »
Thank you haha you also showed me theres an error in my code, the QB64 coordinates displayed are very off

8
QB64 Discussion / Help with a Small Program
« on: February 03, 2019, 08:56:57 pm »
I have this old code (as in I don't know who made it or where it came from..) which I think I found on either the Wiki or an old post on the .net forum. Anyway, I wanted to just play around with it, so I made it kind of "responsive" like a website, I guess you could say. My question is how can I detect a mouse down over a certain area when the coordinates for that window will always be changing (due to it being re-sizable).
I've put some small text of where I want an Exit button to be, I just can't seem to figure out how to get it to act as a 'button'.


Maybe I'm just having a brain fart idk

Code: Text: [Select]
  1. _TITLE "Graph"
  2.  
  3. SCREEN _NEWIMAGE(1080, 720, 12)
  4. $RESIZE:ON
  5. $CHECKING:OFF
  6.  
  7. ' Origin in Cartesian coordinates. (Changes when mouse is clicked.)
  8. OriginX = -100
  9. OriginY = -100
  10.  
  11. ' Point of interest in Cartesian coordinates. (Changes while mouse moves.)
  12. x = _MOUSEX
  13. y = _MOUSEY
  14. IF x > 0 AND x < screenWidth AND y > 0 AND y < screenHeight THEN
  15.     GOSUB unconvert
  16.     OriginX = x
  17.     OriginY = y
  18. ELSE
  19.     ThePointX = 100
  20.     ThePointY = 100
  21. END IF
  22.  
  23. ' Main loop.
  24. DO: _LIMIT 60
  25.     DO WHILE _MOUSEINPUT
  26.         x = _MOUSEX
  27.         y = _MOUSEY
  28.         IF x > 0 AND x < screenWidth AND y > 0 AND y < screenHeight THEN
  29.  
  30.             GOSUB unconvert
  31.             ThePointX = x
  32.             ThePointY = y
  33.  
  34.             IF _MOUSEBUTTON(1) THEN
  35.                 IF _MOUSEY < -190 AND _MOUSEX < -110 AND _MOUSEX > -120 AND _MOUSEY > -220 THEN
  36.                     SYSTEM
  37.                 END IF
  38.                 x = _MOUSEX
  39.                 y = _MOUSEY
  40.                 GOSUB unconvert
  41.                 OriginX = x
  42.                 OriginY = y
  43.             END IF
  44.  
  45.         END IF
  46.         IF _RESIZE THEN
  47.             SCREEN _NEWIMAGE(_RESIZEWIDTH, _RESIZEHEIGHT, 256)
  48.             screenWidth = _RESIZEWIDTH
  49.             screenHeight = _RESIZEHEIGHT
  50.         END IF
  51.     LOOP
  52.     GOSUB DrawEverything
  53.  
  54. LOOP
  55.  
  56. SYSTEM 0
  57. $CHECKING:ON
  58. DrawEverything:
  59. CLS
  60. ' Make Cartesian grid.
  61. FOR x = OriginX TO screenWidth STEP 10
  62.     LINE (x, 0)-(x, screenHeight), 8
  63. NEXT
  64. FOR x = OriginX TO 0 STEP -10
  65.     LINE (x, 0)-(x, screenHeight), 8
  66. NEXT
  67. FOR y = OriginY TO screenHeight STEP 10
  68.     LINE (0, -y + screenHeight / 2)-(screenWidth, -y + screenHeight / 2), 8
  69. NEXT
  70. FOR y = OriginY TO -(screenHeight / 2) STEP -10
  71.     LINE (0, -y + screenHeight / 2)-(screenWidth, -y + screenHeight / 2), 8
  72. NEXT
  73. x = OriginX
  74. y = OriginY
  75. GOSUB convert
  76. LINE (0, y)-(screenWidth, y), 7
  77. LINE (x, 0)-(x, screenHeight), 7
  78. _PRINTSTRING (screenWidth - 8 * 6, y), "X-axis"
  79. _PRINTSTRING (x, 0), "Y-axis"
  80. _PRINTSTRING (x, y), "Origin"
  81. _PRINTSTRING (0, 0), "Exit"
  82. ' Draw the circle on which the position vector lives.
  83. Radius = SQR((ThePointX - OriginX) ^ 2 + (ThePointY - OriginY) ^ 2)
  84. x = OriginX
  85. y = OriginY
  86. GOSUB convert
  87. CIRCLE (x, y), Radius, 7
  88. ' Draw the vertical component.
  89. x = OriginX
  90. y = OriginY
  91. GOSUB convert
  92. x1 = x
  93. y1 = y
  94. x = ThePointX
  95. y = OriginY
  96. GOSUB convert
  97. x2 = x
  98. y2 = y
  99. LINE (x1, y1)-(x2, y2), 9
  100. LINE (x1, y1 + 1)-(x2, y2 + 1), 9
  101. LINE (x1, y1 - 1)-(x2, y2 - 1), 9
  102. ' Draw the horizontal component.
  103. x = ThePointX
  104. y = OriginY
  105. GOSUB convert
  106. x1 = x
  107. y1 = y
  108. x = ThePointX
  109. y = ThePointY
  110. GOSUB convert
  111. x2 = x
  112. y2 = y
  113. LINE (x1, y1)-(x2, y2), 4
  114. LINE (x1 - 1, y1)-(x2 - 1, y2), 4
  115. LINE (x1 + 1, y1)-(x2 + 1, y2), 4
  116. ' Draw position vector (aka the Hypotenuse).
  117. x = OriginX
  118. y = OriginY
  119. GOSUB convert
  120. x1 = x
  121. y1 = y
  122. x = ThePointX
  123. y = ThePointY
  124. GOSUB convert
  125. x2 = x
  126. y2 = y
  127. LINE (x1, y1)-(x2, y2), 10
  128. LINE (x1 + 1, y1)-(x2 + 1, y2), 10
  129. LINE (x1, y1 + 1)-(x2, y2 + 1), 10
  130. ' Write text.
  131. COLOR 7
  132. _PRINTSTRING (screenWidth - 250, 0), "-------Origin-------"
  133. _PRINTSTRING (screenWidth - 250, 15), "Cartesian/Polar/Qb64:"
  134. _PRINTSTRING (screenWidth - 250, 30), "X=0   , Y=0"
  135. _PRINTSTRING (screenWidth - 250, 45), "R=0   , Ang=undef"
  136. _PRINTSTRING (screenWidth - 250, 60), "x="
  137. _PRINTSTRING (screenWidth - 235, 60), STR$(OriginX + screenWidth / 2) + ", " + "y=" + STR$(-OriginY + screenHeight / 2)
  138. _PRINTSTRING (screenWidth - 250, 80), "-------Cursor-------"
  139. _PRINTSTRING (screenWidth - 250, 95), "Cartesian/Polar/Qb64:"
  140. _PRINTSTRING (screenWidth - 250, 110), "X=" + STR$(ThePointX - OriginX) + ", " + "Y=" + STR$(ThePointY - OriginY)
  141. ' Deal with radius calculation.
  142. Radius = SQR((ThePointX - OriginX) ^ 2 + (ThePointY - OriginY) ^ 2)
  143. IF Radius < .0001 THEN Radius = .0001
  144. _PRINTSTRING (screenWidth - 250, 130), "R=" + STR$(INT(Radius)) + ", " + "Ang=" + STR$(TheAngle)
  145. ' Deal with the anlge calculation.
  146. xdiff = ThePointX - OriginX
  147. ydiff = ThePointY - OriginY
  148. IF xdiff > 0 AND ydiff > 0 THEN ' First quadrant
  149.     TheAngle = INT((180 / 3.14159) * ATN(ydiff / xdiff))
  150. END IF
  151. IF xdiff < 0 AND ydiff > 0 THEN ' Second quadrant
  152.     TheAngle = 180 + INT((180 / 3.14159) * ATN(ydiff / xdiff))
  153. END IF
  154. IF xdiff < 0 AND ydiff < 0 THEN ' Third quadrant
  155.     TheAngle = 180 + INT((180 / 3.14159) * ATN(ydiff / xdiff))
  156. END IF
  157. IF xdiff > 0 AND ydiff < 0 THEN ' Fourth quadrant
  158.     TheAngle = 360 + INT((180 / 3.14159) * ATN(ydiff / xdiff))
  159. END IF
  160. IF SQR(ydiff ^ 2) < .0001 THEN ydiff = .0001
  161. IF SQR(xdiff ^ 2) < .0001 THEN xdiff = .0001
  162. _PRINTSTRING (screenWidth - 250, 145), "x=" + STR$(ThePointX + 320) + ", " + "y=" + STR$(-ThePointY + 240)
  163. _PRINTSTRING (screenWidth - 250, 200), "--------Trig--------"
  164. _PRINTSTRING (screenWidth - 250, 215), "sin(Ang)=" + "Opp" + "/" + "Hyp"
  165. _PRINTSTRING (screenWidth - 250, 230), "        =" + STR$(ydiff / Radius)
  166. _PRINTSTRING (screenWidth - 250, 245), "cos(Ang)=" + "Adj" + "/" + "Hyp"
  167. _PRINTSTRING (screenWidth - 250, 260), "        =" + STR$(xdiff / Radius)
  168. _PRINTSTRING (screenWidth - 250, 275), "tan(Ang)=" + "Opp" + "/" + "Adj"
  169. _PRINTSTRING (screenWidth - 250, 290), "        =" + STR$(ydiff / xdiff)
  170. _DISPLAY
  171. RETURN
  172.  
  173. convert:
  174. ' Converts Cartesian coordinates to QB64 coordinates.
  175. x0 = x: y0 = y
  176. x = x0 + screenWidth / 2
  177. y = -y0 + screenHeight / 2
  178. RETURN
  179.  
  180. unconvert:
  181. ' Converts QB64 coordinates to Cartesian coordinates.
  182. x0 = x: y0 = y
  183. x = x0 - screenWidth / 2
  184. y = -y0 + screenHeight / 2
  185. RETURN
  186.  

9
QB64 Discussion / Re: DatabaseTools?
« on: March 02, 2018, 12:15:12 am »
I don't really know of any libraries specifically made for databases but I do know Fellipe has a good library you could use 'as' a database... kinda...


https://github.com/FellippeHeitor/INI-Manager


Kind of a long shot to use as a database but oh whale, do what you gotta do

10
QB64 Discussion / TCP/IP Messenger not Working?
« on: July 23, 2017, 02:20:22 am »
Can anyone help me find the problem as to why TCP/IP will connect but won't send messages?
Here's the code

Code: QB64: [Select]
  1.  
  2. _TITLE "Messenger"
  3.  
  4.  
  5. PRINT "Welcome to Messenger"
  6. LOCATE , , 1
  7. client = _OPENCLIENT("TCP/IP:23456:96.37.234.146")
  8. IF client THEN
  9.     PRINT "[connected to host]"
  10.     _TITLE "Client"
  11.     INPUT "Enter your name: ", myname$
  12.     PRINT #client, myname$ + " connected!"
  13.     PRINT "To Exit, press the Escape key"
  14.     DO
  15.         GetMessage client
  16.         SendMessage myname$, mymessage$, client
  17.         _DELAY 0.01
  18.     LOOP
  19.     PRINT "Server wasn't found, hosting on LAN"
  20.     host = _OPENHOST("TCP/IP:23456")
  21.     IF host THEN
  22.         _TITLE "Host"
  23.         PRINT "[Beginning new chat session!]"
  24.         DIM Users(1 TO 10000)
  25.         numclients = 1
  26.         client = _OPENCLIENT("TCP/IP:23456:96.37.234.146")
  27.         IF client = 0 THEN PRINT "ERROR: could not attach host's personal client to host!"
  28.         INPUT "Enter your name:", myname$
  29.         PRINT #client, myname$ + " connected!"
  30.         PRINT "To Exit, press the Escape key"
  31.         PRINT "[Chat session active!]"
  32.         DO ' host main loop
  33.             newclient = _OPENCONNECTION(host)
  34.             IF newclient THEN
  35.                 numclients = numclients + 1
  36.                 Users(numclients) = newclient
  37.                 PRINT #Users(numclients), "Welcome!"
  38.             END IF
  39.             FOR i = 1 TO numclients
  40.                 IF Users(i) THEN
  41.                     INPUT #Users(i), message$
  42.                     IF message$ <> "" THEN
  43.                         FOR p = 1 TO numclients
  44.                             IF Users(p) THEN PRINT #Users(p), message$
  45.                         NEXT p
  46.                     END IF
  47.                 END IF
  48.             NEXT i
  49.             GetMessage client
  50.             SendMessage myname$, mymessage$, client
  51.             _DELAY 0.01
  52.         LOOP
  53.     END IF
  54.     PRINT "ERROR: Could not begin new host!"
  55.  
  56.  
  57. 'Frontend below
  58.  
  59.  
  60.  
  61.  
  62. SUB GetMessage (client)
  63. INPUT #client, newmessage$
  64. IF newmessage$ <> "" THEN
  65.     VIEW PRINT 1 TO 23
  66.     LOCATE 23, 1
  67.     PRINT newmessage$
  68.     VIEW PRINT 1 TO 24
  69.  
  70.  
  71. SUB SendMessage (myname$, mymessage$, client)
  72. k$ = INKEY$
  73. IF LEN(k$) THEN
  74.     IF k$ = CHR$(8) AND LEN(mymessage$) <> 0 THEN
  75.         mymessage$ = LEFT$(mymessage$, LEN(mymessage$) - 1)
  76.     ELSE
  77.         IF LEN(k$) = 1 AND ASC(k$) >= 32 THEN mymessage$ = mymessage$ + k$
  78.     END IF
  79. LOCATE 24, 1: PRINT SPACE$(80);
  80. LOCATE 24, 1: PRINT myname$ + ": "; mymessage$;
  81. IF k$ = CHR$(13) THEN ' [Enter] sends the message
  82.     IF mymessage$ = "" THEN SYSTEM ' [Enter] with no message ends program
  83.     PRINT #client, myname$ + ": " + mymessage$
  84.     mymessage$ = ""
  85. IF k$ = CHR$(27) THEN SYSTEM ' [Esc] key ends program
  86.  


I know that $CHECKING is off but when it's on it doesn't display any errors

11
QB64 Discussion / Re: Compound assignments
« on: July 23, 2017, 01:27:31 am »
--snip--
This was added or is this a request?

12
Programs / Re: Plasma Waves
« on: July 22, 2017, 07:54:39 pm »
And since there any errors (at least I can't find any)[/size] in the program, you can do
Code: QB64: [Select]
to speed it up a bit

13
Programs / Re: Plasma Waves
« on: July 21, 2017, 11:57:29 pm »

--snip--

This is a good way to say eff you to your epileptic friends (is cursing allowed on this forum?)

14
QB64 Discussion / Entropic Time Sim
« on: July 21, 2017, 03:31:27 pm »
I made this very complicated entropic time simulator that calculates space-time almost instantly
here is a wikipedia article on Entropy and Entropic Time


















this is using a floating 64 bit variable so if your running 32 bit it might not work for you.

15
QB64 Discussion / Re: Try to Recreate a Small Interpreter/Compiler
« on: July 18, 2017, 09:48:56 pm »
I wouldn't even call that a language; it's a data encoding at best.

It does, however, remind me of Brainfuck, which *is* Turing complete: https://en.m.wikipedia.org/wiki/Brainfuck
It's what it's mainly based off of

Pages: [1] 2