topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 4:16 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

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 - chedabob [ switch to compact view ]

Pages: [1] 2next
1
Post New Requests Here / Re: IDEA: TrueCrypt Alternate GUI for Windows
« on: February 25, 2010, 08:30 AM »
Do you have a GUI mockup?

2
Post New Requests Here / Re: IDEA - A different type of computer timer
« on: February 05, 2008, 10:17 AM »
If you create a task in the Windows Task Scheduler, it will turn on your PC. I had a pesky backup program that kept turning my PC on every day at 5pm to perform a backup :(

3
Developer's Corner / Re: Writing a simple driving game (help!!)
« on: October 09, 2007, 12:14 PM »
Excellent!  Nothing better than the feeling one gets after solving a brain-buster.

Now that you have the thing working (grin) it's time to rip it all out and replace it with this:

I've found that performance can be enhanced greatly in these kinds of games by precalculating all the SIN/COS values for each possible direction of movement and storing them in lookup tables.  RAM is cheap, the data we're talking about is not huge (assuming something like 5 or 10-degree increments), and the performance improvements can be breathtaking.  Integer lookups are nearly instantaneous, unlike SIN/COS calculations.

And yes, my motto really is "fix it even if it's not broken".  :-)

I'm writing a simple driving game, no proper physics or anything, so performance isn't really an issue :p

And whatever you posted, I can't see it  :P

4
Developer's Corner / Re: Writing a simple driving game (help!!)
« on: October 09, 2007, 11:01 AM »
After hours and hours of swearing at the screen, poring over numerous tutorials and source files, I finally got it to work. Using degrees instead of radians was one problem, but also rotating around the wrong origin was the main issue.

5
Developer's Corner / Re: Writing a simple driving game (help!!)
« on: October 09, 2007, 10:17 AM »
Distance is the amount in pixels it should travel.


I can move the vehicle about in any direction I want, but calculating how far X and how far Y to travel based on the rotation is the bit I'm struggling with.

6
Developer's Corner / Writing a simple driving game (help!!)
« on: October 09, 2007, 09:50 AM »
Right, so I'm trying my best to write a simple driving game in XNA (that's not important). Basically, it's a 2D top down game, but I'm struggling to get the vehicle to move in the direction it is facing. Does anybody have a formula that would give me the new coordinates based on the source position, rotation, and the distance to travel? I did try:

X = distance * cos(rotation)
Y = distance * sin(rotation)

but I just ended up with a vehicle that would rotate around the point, and sometimes it might just travel in the direction it was facing :p

7
Developer's Corner / ASP.NET Issues
« on: May 18, 2007, 11:04 AM »
I've been asked to code a form for a website. The form contains 40 or so textboxes, so I just wrote some really long INSERT query (if there is a better way, please suggest it) to insert them in. Now, I keep getting "Object reference not set to an instance of an object" on the following code

OleDbCommand theCommand = new OleDbCommand();
        theCommand.Connection = theConnection;
        theCommand.CommandText = @"INSERT INTO [SQLserverSQL].[dbo].[Records]
           ([computerName]
           ,[operatingSystem]
           ,[serialNumber]
           ,[hardwareManufacturer]
           ,[modelType]
           ,[warrantyExpiration]
           ,[serverFunction]
           ,[retailCorporate]
           ,[dcenterStoreLocation]
           ,[rackNumber]
           ,[supportGroup]
           ,[cellNumber]
           ,[Product Number]
           ,[localAdminID]
           ,[localAdminPW]
           ,[cpuNumber]
           ,[cpuType]
           ,[cpuSpeed]
           ,[networkAdapters]
           ,[speedDuplex]
           ,[primaryIP]
           ,[secondaryIP]
           ,[riloName]
           ,[riloIP]
           ,[totalMemory]
           ,[totalDiskSpace]
           ,[C_OS]
           ,[D_Data]
           ,[E_Apps]
           ,[networkCableID]
           ,[power]
           ,[changeWindow]
           ,[appName]
           ,[businessOwner]
           ,[appVendor]
           ,[appSupportGroup]
           ,[appFunction]
           ,[appCode]
           ,[specialRequirements])
     VALUES
           (" + computerName.ToString()
           + "," + operatingSystem.SelectedIndex.ToString()
           + "," + serialNumber.ToString()
           + "," + hardwareManufacturer.SelectedIndex.ToString()
           + "," + modelType.SelectedIndex.ToString()
           + "," + warrantyExpiration.ToString()
           + "," + serverFunction.SelectedItem.ToString()
           + "," + retailCorporate.SelectedItem.ToString()
           + "," + dCenterStoreLocation.SelectedItem.ToString()
           + "," + gridLocation.SelectedItem.ToString()
           + "," + supportGrp.ToString()
           + "," + cellPagerNumber.ToString()
           + "," + productNumber.ToString()
           + "," + localAdminID.ToString()
           + "," + localAdminPW.ToString()
           + "," + cpuNumber.SelectedItem.ToString()
           + "," + cpuType.SelectedItem.ToString()
           + "," + cpuSpeed.SelectedItem.ToString()
           + "," + netAdapters.SelectedItem.ToString()
           + "," + speedDuplex.SelectedItem.ToString()
           + "," + primaryIP.ToString()
           + "," + secondaryIP.ToString()
           + "," + riloName.ToString()
           + "," + riloIP.ToString()
           + "," + totalMemory.ToString()
           + "," + totalDiskSpace.ToString()
           + "," + C_OS.SelectedItem.ToString()
           + "," + D_Data.SelectedItem.ToString()
           + "," + E_Apps.SelectedItem.ToString()
           + "," + netCableID.ToString()
           + "," + power.ToString()
           + "," + changeWindow.ToString()
           + "," + appName.ToString()
           + "," + businessOwner.ToString()
           + "," + appVendor.ToString()
           + "," + appSupportGrp.ToString()
           + "," + appFunc.ToString()
           + "," + appCode.ToString()
           + "," + specReq.ToString() + ")";

It occurs on the third line, but I don't know what's causing it, as this is the way I've always done it before. Any ideas?

8
Developer's Corner / Re: Introductory C# web-based tutorials
« on: March 10, 2007, 08:37 AM »
http://www.icsharpco...nSource/SD/Download/

If you compile the source, you could just run it straight to a USB drive.

I wouldn't ever recommend it over VS though.

9
hmm, I might have a go at this. Im pretty sure it could be done fairly easy using commandline parameters.

10
Developer's Corner / Re: Stratagus: A real-time strategy engine
« on: March 06, 2007, 09:55 AM »
Battle of Survival is awesome.

11
Developer's Corner / Re: grr SQL and C#
« on: February 28, 2007, 03:21 AM »
HAHA I finally did it. It was a combination of me trying to check one field type in the code, with a totally different type in the DB itself. For some reason I was using Long Date Strings, but they are never displayed to the user, so they don't actually provide any visual advantages, and they just become a major pain during the coding side.

Thanks for the help guys.

12
Developer's Corner / Re: Best Programming Music
« on: February 27, 2007, 02:11 PM »
I listen to XFM (local-ish radio station), or if im at college, whatever music I have loaded onto my phone.

Although recently ive been listening to ChristianRock.net (im not even religious or owt :P), but I can't at college, because of the damn firewall of dooom.

13
Developer's Corner / grr SQL and C#
« on: February 27, 2007, 12:10 PM »
So I have this code

string scope = null;
            try
            {
                OleDbCommand tableSearch = connection.CreateCommand();
                tableSearch.CommandText = "SELECT * FROM coursework WHERE DateDue BETWEEN '" + System.DateTime.Now.Date.ToString() +  "' AND '" + scope+ "'";//sql command
                //OleDbParameter todaysDate = new OleDbParameter();
                //tableSearch.Parameters.Add(todaysDate);
                //OleDbParameter dateDue = new OleDbParameter();
                //tableSearch.Parameters.Add(dateDue);//add a parameter
                //todaysDate.Value = System.DateTime.Now;
                if (whatScope == "week")
                {
                    //dateDue.Value = System.DateTime.Now.AddDays(7).ToLongDateString();//give the parameter a value
                }
                else if (whatScope == "month")
                {
                    //dateDue.Value = System.DateTime.Now.AddMonths(1).ToLongDateString();
                }
                else if (whatScope == "today")
                {
                    //dateDue.Value = System.DateTime.Now.ToLongDateString();
                    scope = System.DateTime.Now.Date.ToString();
                }
                OleDbDataReader reader = tableSearch.ExecuteReader();
                assignmentList.Items.Clear();
                while (reader.Read())
                    assignmentList.Items.Add(reader.GetString(0));
                reader.Close();
            }
            catch (OleDbException ex)
            {
                MessageBox.Show(ex.ToString());
            }

Im trying to get it so that it retrieves values from the DB between Today and X. The column DateDue is a Long Date column, but no matter what I try and put in the SQL query, I always get "Data Type Mismatch In Criteria Expression".

Any ideas?

14
Post New Requests Here / Re: MOVEALLTO C:\OLDDATA
« on: February 13, 2007, 05:57 AM »
done  ;D

http://chedabob.com/moveall.bat

youd be surprised how simple it was :P

before you run it, be aware, i cannot be held responsible if it goes nuts up. I shouldnt see why it would, but please, test it on some files that aren't critcal. It successfully moves c:\ati to c:\bleh on my machine, but I dont have enough space to test it on my machine

edit1: just tested it on my other drive. It worked fine.

15
This would be something interested to code.

Although, ive totally ditched all my cds, and I now have a backup of all my important discs on one of my HDDs. CDs are a major pain for me. Im too lazy to label them, put them away somewhere, and then look for them. I used to have stacks of unlabelled cd-rs, or cds without cases.

16
Developer's Corner / Re: Advanced C# Programmers?
« on: February 08, 2007, 03:01 PM »
Id be willing to have a look at it. I wouldn't say im advanced, but Ill give it a shot.

shoot me a pm.

17
If you are still interested, id do it. Its about 30 mins worth of work (if that  ;D)

18
Announce Your Software/Service/Product / Re: thinBasic on YouTube
« on: February 08, 2007, 01:58 PM »
if you have the bandwidth, and the cash, get Adobe Captivate.

19
Before I install, does this version still have that stupid friggin debugger that embeds itself into everything? You know, the one that makes just about every application crash, until you format, reinstall, then don't install VS.

20
What Im trying to do is find out where that value is coming from. If its just a simple matter of me expecting it in KB that are 1024 bytes, and its reading them out as 1000bytes in a KB, then Ill just modify the output. Ill do a bit mroe tommorrow.

Do you have any folders within your download folder? Or just files?

21
I could do it, but Id probably need to see the code for the page you want it on.

22
Post New Requests Here / Re: IDEA Text file of Folder contents
« on: January 20, 2007, 12:35 PM »
Right, its practically finished. It just needs drag N drop adding (which is a being a pain in the arse) and sorting out a small bug with file creation. At the moment, you enter the directory in one text box*, and the output file in the bottom, then you click "Lets Go!", but the main problem is if the output file does not exists, it is created, but the program holds it in memory, so when I come to write it, it can't, because its already in use. If anybody can shed some light on this, id be ever so grateful.

* I hope to change this so that it is just a small icon that remains onscreen, and when you drop a folder on it, it does its thing, and creates a file called output.txt in the same folder.

23
I could try this, don't think it would be too hard. Gimme half an hour, and Ill have a look

EDIT: Actually, might take a little longer than expected, I gotta get my head around this silly size method.

EDIT2: So, this is my code so far. Its not tidy or anything, but it works slightly. Could somebody explain why it gives me some stupid value? Like for My Pictures, it gives 1180, when in fact, the closest value it could be is 876kb (the actual value according to windows explorer).

private void button1_Click(object sender, EventArgs e)
        {
            string input = textBox1.Text.ToString();
            string [] directorylist = null;
            string [] filelist = null;
            directorylist = Directory.GetDirectories(input);
            int counterD = 0;
            int counterF = 0;
            double size = 0;
            if (Directory.Exists(input) == true)
            {
               do
               {
                   filelist = Directory.GetFiles(directorylist[counterD]);
                    do
                    {
                        size = size + filelist[counterF].Length;
                        counterF++;
                    }
                    while (counterF <= filelist.Length - 1);
                    counterF = 0;
                   counterD++;
               } while (counterD <= directorylist.Length - 1);
               MessageBox.Show(size.ToString());
            }
            else
            {
                MessageBox.Show("No such Directory. Check path and try again!");
            }
           
        }

24
Post New Requests Here / Re: IDEA Text file of Folder contents
« on: January 18, 2007, 03:37 PM »
I could try this. Luckily I have my C# Textbook with me XD

Edit: Actually, earliest I could get it done is Monday. I left my usb thumb drive in a computer at college, then the building got evacuated (the roof blew off), and I can't get my stuff back till monday. It just so happens that the only copy of the source code for my program that handles text files, is on that drive, and the code is also in my bag (also at college  :()

25
Developer's Corner / Re: Stupid database date picker
« on: January 18, 2007, 03:32 PM »
Well, I found a default value setting with the TableAdaptor, but it throws a wobbler when I set it. Im gonna speak to my tutor at college, when it opens again (the roof blew off :O)

Pages: [1] 2next