Resolution of error "Run-time error '3709'" at make-table from sql select statement
Navigating the Database Landscape in India: Finding the Right Partner
In today's digital age, choosing a reliable database management company in India is crucial for businesses aiming to thrive in a data-driven environment. With a plethora of options available, it's essential to consider factors like expertise, scalability, and security. From startups to enterprises, the demand for efficient data management solutions is on the rise, driving the need for competent service providers. Let's share insights, experiences, and recommendations on selecting the best database management company in India. Whether it's cloud-based solutions, data warehousing, or analytics, let's discuss the key players and emerging trends shaping the database industry in India.
sequential file save read option button
I think I can record but I can't read with the option button checkbox
I don't know if I do the recording procedure correctly
pass data to another asp page
ok so i have a page with a gridview on it and it displays rows from sql table. i have also a link assigned to each row:
<asp:GridView ID="GridViewMatters" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridViewMatters_RowDataBound">
<Columns>
<asp:BoundField DataField="client_ref" HeaderText="Client Reference" />
<asp:BoundField DataField="our_ref" HeaderText="Our Reference" />
<asp:BoundField DataField="client_name" HeaderText="First Name" />
<asp:BoundField DataField="section_name" HeaderText="Second Name" />
<asp:BoundField DataField="curr_status" HeaderText="Status" />
<asp:TemplateField HeaderText="">
<ItemTemplate>
<asp:HyperLink ID="lnkDetails" runat="server" Text="View" NavigateUrl='<%# Eval("our_ref", "MD_Overall.aspx?id={0}") %>' />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
this works fine and the url that gets displayed is good. But i would like to send the our_ref attribute to the page itself aswell as the url and use it make further queries.
Thanks
G
Bouncing Balls: Creating a new ball when two balls collide
Hello,
I have a program which creates multiple balls and bounces them off when they collide. This works fine.
import java.awt.Rectangle;
public class Ball{
private int x = 0;
private int y = 0;
private int radius;
private int panelwidth = 500;
private int panelheight = 500;
private int xDx = 1;
private int yDy = 1;
private boolean xUp, yUp;
public Ball(int x, int y, int radius){
this.x = x;
this.y = y;
this.radius = radius;
this.xUp = false;
this.yUp = false;
this.xDx = 1;
this.yDy = 1;
}
public void move(){
if ( y <= 0 ) {
yUp = true;
yDy = ( int ) ( Math.random() * 5 + 2 );
}
else if ( y >= this.panelheight - 2* this.radius ) {
yDy = ( int ) ( Math.random() * 5 + 2 );
yUp = false;
}
if ( x <= 0 ) {
xUp = true;
xDx = ( int ) ( Math.random() * 5 + 2 );
}
else if ( x >= this.panelwidth - 2 * this.radius ) {
xUp = false;
xDx = ( int ) ( Math.random() * 5 + 2 );
}
if (xUp)
x += xDx;
else
x -= xDx;
if ( yUp )
y += yDy;
else
y -= yDy;
}
public int getX(){
return this.x;
}
public int getY(){
return this.y;
}
public void changeDirection(Ball b){
if (this.x <= b.x && this.y <= b.y){
this.xUp = false;
this.yUp = false;
b.xUp = true;
b.yUp = true;
}
else if (this.x <= b.x && this.y >= b.y){
this.xUp = false;
this.yUp = true;
b.xUp = true;
b.yUp = false;
}
}
public void setY(int y ){
this.y = y;
}
public int getRadius(){
return this.radius;
}
public Rectangle getBounds(){
return new Rectangle(this.x, this.y, this.radius, this.radius);
}
public boolean collides(Ball b){
return this.getBounds().intersects(b.getBounds());
}
}
import javax.swing.JFrame;
public class Frame{
public static void main( String args[] ) {
JFrame frame = new JFrame( "Bouncing Balls" );
Ball b[] = new Ball[6];
b[0] = new Ball (10, 10,40);
b[1] = new Ball (100, 100, 40);
b[2] = new Ball (20, 188,40);
b[3] = new Ball (144, 100,40);
b[4] = new Ball (220, 138,40);
b[5] = new Ball (14, 10,40);
BallPanel bp = new BallPanel(b);
frame.add( bp );
frame.setSize( 500, 500 );
frame.setVisible( true );
}
}
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JPanel;
import javax.swing.Timer;
import java.awt.Graphics;
import java.awt.Color;
public class BallPanel extends JPanel implements ActionListener {
private int delay = 10;
protected Timer timer;
Ball b[];
public BallPanel(Ball b[]) {
this.b= new Ball[b.length];
for (int i = 0; i <b.length; i++){
this.b[i] = b[i];
}
timer = new Timer(delay, this);
timer.start();
}
public void actionPerformed(ActionEvent e) {
repaint();
}
public void paintComponent( Graphics g ) {
super.paintComponent( g );
g.setColor(Color.red);
// move the balls
for (int i = 0; i <b.length; i++){
this.b[i].move();
}
// check for collision and change direction if balls collide
for (int i = 0; i <b.length; i++){
for (int j = 0; j <b.length; j++){
if (i!= j && b[i].collides(b[j])){
b[i].changeDirection(b[j]);
}
}
}
// draw the balls
for (int i = 0; i <b.length; i++){
g.fillOval(this.b[i].getX(), this.b[i].getY() , this.b[i].getRadius(), this.b[i].getRadius());
}
}
}
I would like to add a new ball when two balls collide in the Ball Panel class. When I tried creating a new ball in the nested loop that checks for collision (used an array list), and then called the move and the fill oval methods, the program froze. Can you tell me why? What is the proper way to handle creating a new ball upon collision and make it move etc.?
Thank you
Read file properties of video files in C++
I want to figure out what Windows does when you right-click a video file and check properties and I would like to write a similar piece of code in C++.
I should be able to figure out how to read the file type and size, but I'm lost in how to get details of the video like resolution and runtime.
Which API commands does Windows use there?
VB2010- why i get a different vertical size\color on RayCasting?
these is the VB6 function for RayCasting:
Private Sub DrawRays()
Dim StepX As Double
Dim StepY As Double
Dim VertX As Double
Dim VertY As Double
Dim HorizX As Double
Dim HorizY As Double
Dim MapX As Long
Dim MapY As Long
Dim HorizDist As Double
Dim VertDist As Double
Dim WallDistance As Double
Dim RayHeight As Double
Dim RayRadians As Double
Dim RadiansSteps As Double
Dim RayCount As Long
Dim RayCounts As Long
Dim OffSetGrid As Long
RayCount = imgverticalline.Width
MapX = Player.MapX
MapY = Player.MapY
RadiansSteps = Radian60 / RayCount
RayRadians = (Player.Radians - Radian30)
RayCounts = 0
Do While RayCounts < RayCount
If (RayRadians > Radian360) Then RayRadians = 0.001
'Check for horizontal intersections:
If RayRadians >= 0 And RayRadians <= Math.PI Then 'Facing down
HorizY = (Fix(player.PosY / ObjectSize) * ObjectSize) + ObjectSize ' Calculate grid position
HorizX = player.PosX + (HorizY - player.PosY) / Math.Tan(RayRadians)
StepY = ObjectSize
ElseIf RayRadians = 0 Or RayRadians = Math.PI Then
HorizY = player.PosY
HorizX = player.PosX
Else 'Facing Up
HorizY = (Fix(player.PosY / ObjectSize) * ObjectSize) - 1
HorizX = player.PosX + (HorizY - player.PosY) / Math.Tan(RayRadians)
StepY = -ObjectSize
End If
StepX = StepY / Math.Tan(RayRadians)
MapX = GetPositionMap(HorizX)
MapY = GetPositionMap(HorizY)
Do
If MapX < 0 Or MapX > 9 Or MapY < 0 Or MapY > 9 Then Exit Do
If levelmap0(MapY, MapX) = Color.Black Then Exit Do
HorizX = HorizX + StepX
HorizY = HorizY + StepY
MapX = GetPositionMap(HorizX)
MapY = GetPositionMap(HorizY)
Loop
HorizDist = Math.Abs((player.PosX - HorizX) / Math.Cos(RayRadians))
'Check for vertical intersections:
If RayRadians < Radian90 Or RayRadians > Radian270 Then 'Facing right
VertX = (Fix(Player.PosX / ObjectSize) * ObjectSize) + ObjectSize ' Calculate grid position
VertY = player.PosY + (player.PosX - VertX) * -Math.Tan(RayRadians)
StepX = ObjectSize
ElseIf RayRadians = Radian90 Or RayRadians = Radian270 Then
VertY = Player.PosY
VertX = Player.PosX
Else 'Facing left
VertX = (Fix(Player.PosX / ObjectSize) * ObjectSize) - 1
VertY = player.PosY + (player.PosX - VertX) * -Math.Tan(RayRadians)
StepX = -ObjectSize
End If
StepY = StepX * Math.Tan(RayRadians)
MapX = GetPositionMap(VertX)
MapY = GetPositionMap(VertY)
Do
If MapX < 0 Or MapX > 9 Or MapY < 0 Or MapY > 9 Then Exit Do
If levelmap0(MapY, MapX) = Color.Black Then Exit Do
VertX = VertX + StepX
VertY = VertY + StepY
MapX = GetPositionMap(VertX)
MapY = GetPositionMap(VertY)
Loop
VertDist = Math.Abs((player.PosX - VertX) / Math.Cos(RayRadians))
Dim VertColor As Color
If VertDist <= HorizDist Then
WallDistance = VertDist
OffSetGrid = VertY Mod ObjectSize
VertColor = Color.Aqua
Else
OffSetGrid = HorizX Mod ObjectSize
WallDistance = HorizDist
VertColor = Color.Blue
End If
WallDistance = WallDistance * Math.Cos(RayRadians - player.Radians) 'avoiding the Fish Effect
RayHeight = (ObjectSize / WallDistance) * 200 ' is the height screen\
If (OffSetGrid = ObjectSize) Then RayHeight -= 1
'picWall1.DrawTextureVerticalLine(A.MemoryHDC, OffSetGrid, Fix(RayHeight * 4), RayCounts, 5)
imgverticalline.ForeColor(RGB(VertColor.R, VertColor.G, VertColor.B))
imgverticalline.DrawLine(RayCounts, imgverticalline.Height / 2 - RayHeight \ 2, RayCounts, imgverticalline.Height / 2 + RayHeight \ 2)
RayRadians = RayRadians + RadiansSteps
RayCounts = RayCounts + 1
Loop
End Sub
result:
https://imgur.com/gllD3qg
when the 'OffSetGrid' is zero or ObjectSize, i get that different color bar... and i don't know why...
i tried severalthings without success... and yes i'm here too: https://www.vbforums.com/showthread.php?902527-VB6-raycasting-how-get-the-image-line
but without success :(
Installing programs from Github
Hi
I downloaded Tkinter Designer, but theres no exe there.
Ive used Thonny as a "compiler" for running scripts, and I used it to "make" a a simple program, but I dont know how to save as an exe, and I dont know how I would put these files into Thonny.
Am I even using the right program ?
How can I upload a tar.bz2 file to openstack swift object storage container
I wrote a Python script that included the python-swiftclient module to connect to the OpenStack Object Storage and upload some files to the OpenStack Object Storage container
It works great if I upload a file that ends with the extension .gz however, Im getting an error regarding the TarFile object having no attribute read after running my script.
when it comes to the compressed file that ends with the extension .tar.bz2.
Ive included the Python script and the errors I got after running it. Please show me where Im wrong, and I would like some assistance in solving this issue. Im a beginner in Python.
from keystoneauth1 import session
from keystoneauth1.identity import v3
from swiftclient.client import Connection
from swiftclient.client import ClientException
import gzip
import tarfile
# Create a password auth plugin
auth = v3.Password(auth_url='https://cloud.company.com:5000/v3/',
username='myaccount',
password='mypassword',
user_domain_name='Default',
project_name='myproject',
project_domain_name='Default')
# Create session
keystone_session = session.Session(auth=auth)
# Create swiftclient Connection
swift_conn = Connection(session=keystone_session)
# Create a new object with the contents of Netbox database backup
with gzip.open('/var/backup/netbox_backups/netbox_2024-03-16.psql.gz', 'rb') as file:
swift_conn.put_object(
container,
'object_netbox_2024-03-16.psql.gz',
contents=file,
content_type='application/gzip'
)
# Confirm the presence of the object holding the Netbox database backup
obj1 = 'object_netbox_2024-03-16.psql.gz'
container = 'netbox-backups'
try:
resp_headers = swift_conn.head_object(container, obj1)
print("The object " + obj1 + " was successfully created")
except ClientException as e:
if e.http_status == '404':
print("The object " + obj1 + " was not found!")
else:
print("An error occurred checking for the existence of the object " + obj1)
# Create a new object with the contents of the compressed Netbox media backup
with tarfile.open('/var/backup/netbox_backups/netbox_media_2024-03-20.tar.bz2', mode='r:bz2') as file_tar_bz2:
# Read the contents of the compressed Netbox media backup file
file_contents = file_tar_bz2.read()
# Create a file-like object from the contents of the compressed Netbox media backup file
my_file_like_object = io.BytesIO(file_contents)
# Upload the returned contents to the OpenStack Object Storage container
swift_conn.put_object(
container,
'object_netbox_media_2024-03-20.tar.bz2',
contents=file_tar_bz2,
content_type='application/x-tar'
)
# Confirm the presence of the object holding the compressed Netbox media backup
obj2 = 'object_netbox_media_2024-03-16.tar.bz2'
container = 'netbox-backups'
try:
resp_headers = swift_conn.head_object(container, obj2)
print("The object " + obj2 + " was successfully created")
except ClientException as e:
if e.http_status == '404':
print("The object " + obj2 + " was not found!")
else:
print("An error occurred checking for the existence of the object " + obj2)
Below is the error I got after running the script.
Python
Traceback (most recent call last):
File "/opt/scripts/netbox_backups_transfer.py", line 57, in <module>
file_contents = file_tar_bz2.read()
AttributeError: 'TarFile' object has no attribute 'read'
ABC for Github-programs and Python
Hi
I want to make use of GitHub-programs, and so I downloaded a bunch of Python-tools. When I run this command in "Python 3.12", which looks like CMD to me, I get a syntax error.
"To create a virtual environment, Python supplies a built in venv module which provides the basic functionality needed for the virtual environment. Running the command below will create a virtual environment named "openai-env" inside the current folder you have selected in your terminal / command line: python -m venv openai-env"
The instructions said nothing about how to "select" a folder, and I have no idea how to do that, so maybe thats whats going on. It says its included in the program, so..
Any clue?
P.S.
If you know of a good guide to this whole, general question of using Github-programs, that would be much appreciated. As I gather, its entire programs sometimes, sometimes just scripts, and sometimes just modules or snippets of code. How to put a general framework together would be awesome to learn, the dream being to have like a "test-program", as in a blank program with basic stuff in place, like a file menu on the top, keyboard and mouse-compatibility, and stuff like that; a program that looks just like a normal Windows-program, only you can put stuff in it. A GUI? Is that what it is? I guess the more relevant question is; is there a GUI like this that I can put in a website? Some sort of template code that you can shimmy into HTML ?
Thanks
VB2010: how use CopyMemory() API function?
How use and declare CopyMemory() API function VB2010?
how convert cur images to image?
how can i convert cursor files to image?
i need see the cur\ani on picturebox?(just for learning)
Private Sub btnChooseImage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnChooseImage.Click
If (ofdChooseFile.ShowDialog = Windows.Forms.DialogResult.OK) Then
If (ofdChooseFile.FilterIndex = 6) Then
Dim cur As New Cursor(ofdChooseFile.FileName)
PicShowImage.Image = cur 'error yes
Else
PicShowImage.Image = Image.FromFile(ofdChooseFile.FileName)
End If
Me.Text = "Image Viewer: " & ofdChooseFile.FileName
End If
End Sub
how can i get the image from a cursor?
the Cursor object read cur files and ani?
Why am getting different syntax errors when running a Python script
I am working on an exercise from Google's Python class dealing with popular baby names. I have the program running properly when using only one filename, but when I try to use the wildcard to get all files with baby####.html files I get differing errors every time I run the program.
Here is the problem code:
matches = re.findall('<td>[0-9]+<\/td><td>(\w+)<\/td><td>(\w+)', file)
for match in matches:
#print(match)
rank = match[0]
name = match[1]
item = (year, name, rank)
names.append(item)
#print(item)
name = match[2]
item = (year, name, rank)
names.append(item)
#print(item)`
On the re.findall statement, the error message invalid escape sequence on \d, so I changed it to look for a numeric range.
When I ran the program again, I get a subscript out of range error on the name = match[2], which is the female name in a tuple with (popularity, male name, female name) in it. When I ran the program last night on a single file, I got the results I expected. But now, not even the single file run works. Keep in mind, in both instances, the same code is being executed.
Obviously, I'm new to Python, but have a solid understanding of how object oriented design works, having taught myself VB.NET, C# and Java.
I don't understand why running the same code with the same parameters causes these errors. It's very frustrating when the language itself has these kinds of issues.
As always, any help is appreciated!
Tom
how converte C to VB6?
how can i convert these C line:
(py>>6)<<6)
to VB6?
Extracting values from a regex match
I am trying to extract three values from the td tags in an html downloaded file.
<tr align="right"><td>236</td><td>Roy</td><td>Allyson</td>
<tr align="right"><td>237</td><td>Marvin</td><td>Pamela</td>
<tr align="right"><td>238</td><td>Micah</td><td>Kristine</td>
<tr align="right"><td>239</td><td>Collin</td><td>Raquel</td>
I am using the pattern match = re.findall(r'<td.?>([\d+])([.?])*<\/td>', file)
The file is created with a read() statement.
The output should look like
(236, "Roy", "Allyson")
(237, "Marvin", "Pamela")
(238, "Micah", "Kristine")
(239, "Collin", "Raquel")
What I get is
(236, "")
(237, "")
(238, "")
(239, "")
I've tried different variations of the same pattern and get
('236', '23', '6')
('Roy', '', 'Roy)
('Allyson', '', 'Alison')
('237', '23', '7')
('Marvin', '', 'Marvin')
('Pamela', '', 'Pamela')
('238', '23', '8')
('Micah', '', 'Micah')
('Kristine', '', 'Kristine')
('239', '23', '9')
('Collin', '', 'Collin')
('Raquel', '', 'Raquel')
I'm relatively new to regular expressions so be gently, but any help would
be appreciated.
PS: I'm using Pythoon
Extracting values from capturing groups in regex
I am trying to extract three values from the td tags in an html downloaded file.
<tr align="right"><td>236</td><td>Roy</td><td>Allyson</td>
<tr align="right"><td>237</td><td>Marvin</td><td>Pamela</td>
<tr align="right"><td>238</td><td>Micah</td><td>Kristine</td>
<tr align="right"><td>239</td><td>Collin</td><td>Raquel</td>
I am using the pattern match = re.findall(r'<td.?>([\d+])([.?])*<\/td>', file)
The file is created with a read() statement.
The output should look like
(236, "Roy", "Allyson")
(237, "Marvin", "Pamela")
(238, "Micah", "Kristine")
(239, "Collin", "Raquel")
What I get is
(236, "")
(237, "")
(s38, "")
(239, "")
I've tried different variations of the same pattern and get
('236', '23', '6')
('Roy', '', 'Roy)
('Allyson', '', 'Alison')
('237', '23', '7')
('Marvin', '', 'Marvin')
('Pamela', '', 'Pamela')
('238', '23', '8')
('Micah', '', 'Micah')
('Kristine', '', 'Kristine')
('239', '23', '9')
('Collin', '', 'Collin')
('Raquel', '', 'Raquel')
I'm relatively new to regular expressions so be gently, but any help would
be appreciated.
PS: I'm using Pythoon
Design vs. Coding
I was thinking that one way that a coding team could work would be that coders would be rotated through several roles. This would prevent people from getting too comfortable towards the goal of preventing problem areas (code quality wise) from developing in the department.
- Architecture
- Production Coding
- Documentation
- Quality Control
Splitting off architecture as a role will help, I hope to clarifty role-wise for a coder when they are expected to have input on process, vs. when I'd be happier if they were actively attempting to hit a metric and fulfill a specification.
VB6 – RayCasting: why my Vertical intersection is so big?
heres my RayCasting function:
Private Sub DrawRays2()
Dim AY As Double
Dim AX As Double
Dim StepX As Double
Dim StepY As Double
Dim VertX As Double
Dim VertY As Double
Dim HorizX As Double
Dim HorizY As Double
Dim MapX As Long
Dim MapY As Long
Dim HorizDist As Double
Dim VertDist As Double
Dim WallDistance As Double
Dim RayHeight As Double
MapX = Player.MapX
MapY = Player.MapY
On Error Resume Next
' 'Check for horizontal intersections:
If ((Player.Radians > 0 And Player.Radians < PI)) Then 'Facing down
AY = (Int(Player.PosY / ObjectSize) * ObjectSize) + ObjectSize ' Calculate grid position
AX = Player.PosX + (AY - Player.PosY) / Tan(Player.Radians)
StepY = ObjectSize
ElseIf ((Player.Radians = 0 And Player.Radians = PI)) Then
AY = Player.PosY
AX = Player.PosX
Else 'Facing Up
AY = (Int(Player.PosY / ObjectSize) * ObjectSize) - 1
AX = Player.PosX + (AY - Player.PosY) / Tan(Player.Radians)
StepY = -ObjectSize
End If
HorizX = AX
HorizY = AY
StepX = StepY / Tan(Player.Radians)
MapX = Fix((HorizX) / ObjectSize)
MapY = Fix((HorizY) / ObjectSize)
A.SetPixel (Fix(HorizX)), (Fix(HorizY)), ColorConstants.vbCyan
If LevelMap0(MapY, MapX) <> vbBlue Then
Do
HorizX = HorizX + StepX
HorizY = HorizY + StepY
MapX = Fix((HorizX) / ObjectSize)
MapY = Fix((HorizY) / ObjectSize)
A.SetPixel (Fix(HorizX)), (Fix(HorizY)), ColorConstants.vbCyan
If LevelMap0(MapY, MapX) = vbBlue Then
Exit Do
End If
DoEvents
Loop
End If
HorizDist = Sqr(((HorizX - Player.PosX) * (HorizX - Player.PosX)) + ((HorizY - Player.PosY) * (HorizY - Player.PosY)))
'Check for vertical intersections:
If ((Player.Radians < PI / 2 Or Player.Radians > 3 * PI / 2)) Then 'Facing right
AX = (Int(Player.PosX / ObjectSize) * ObjectSize) + ObjectSize ' Calculate grid position
AY = Player.PosY + (Player.PosX - AX) * Tan(Player.Radians)
StepX = ObjectSize
ElseIf ((Player.Radians = PI / 2 Or Player.Radians = 3 * PI / 2)) Then
AY = Player.PosY
AX = Player.PosX
Else 'Facing left
AX = (Int(Player.PosX / ObjectSize) * ObjectSize) - 1
AY = Player.PosY + (Player.PosX - AX) * Tan(Player.Radians)
StepX = -ObjectSize
End If
VertX = AX
VertY = AY
StepY = StepX * Tan(Player.Radians)
MapX = Fix((VertX) / ObjectSize)
MapY = Fix((VertY) / ObjectSize)
A.SetPixel (Fix(VertX)), (Fix(VertY)), vbYellow
If LevelMap0(MapY, MapX) <> vbBlue Then
Do
VertX = VertX + StepX
VertY = VertY + StepY
MapX = Fix((VertX) / ObjectSize)
MapY = Fix((VertY) / ObjectSize)
A.SetPixel (Fix(VertX)), (Fix(VertY)), vbYellow
If LevelMap0(MapY, MapX) = vbBlue Then
Exit Do
End If
DoEvents
Loop
End If
VertDist = Sqr(((VertX - Player.PosX)) * ((VertX - Player.PosX))) + (((VertY - Player.PosY)) * ((VertY - Player.PosY)))
A.ForeColor vbRed
'obter o a linha mais curta(horizontal ou vertical):
If VertDist < HorizDist Then
' Draw the vertical ray:
A.DrawLine Fix(Player.PosX), Fix(Player.PosY), Fix(VertX), Fix(VertY)
WallDistance = VertDist
Debug.Print VertDist & vbTab & "Draw Vertical" & vbTab & HorizDist & vbTab & "Horizontal line"
Else
' Draw the horzontal ray:
A.DrawLine Fix(Player.PosX), Fix(Player.PosY), Fix(HorizX), Fix(HorizY)
WallDistance = HorizDist
Debug.Print HorizDist & vbTab & " Draw Horizontal" & vbTab & VertDist & vbTab & "vertical line"
End If
WallDistance = WallDistance * Cos(Player.Radians)
RayHeight = ObjectSize / WallDistance * 320
A.ForeColor vbBlue
A.DrawLine 475 + 50, 200 / 2 - RayHeight / 2, 475 + 50, 200 / 2 + RayHeight / 2
End Sub
output:
35,4424985851603 Draw Horizontal 4548,40096311184 vertical line
the Horizontal intersection works fine.. but why the Vertical intersection give me so big values(4548,40096311184)?
why the horizontal works fine but not the vertical?