lance_sibley (
lance_sibley) wrote2006-12-09 12:14 am
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Entry tags:
Meh.
I had a mediocre night tonight at the bowling alley - 161, 149, 155. And my team only won one out of three games. Not to mention, we discovered that thanks to some clause in the league Constitution, we lost one of the points we thought we had taken last week when the other team failed to show up, because we didn't break 1050 (we had 1041).
WTF? The other team doesn't show up, doesn't declare their scores or bowl off, and we still are deemed to have lost a game against them? That makes no sense at all.
The weird thing is that it was someone who's not even the league statistician who somehow found out and filed a complaint about us with the league executive. I have no idea how he saw the scoresheets... anyway, Mario is submitting an amendment to the Constitution at the annual general meeting in January. This is ridiculous.
On the bright side, I got those changes I was making to my C# assignment completed this afternoon. I'm sure that I had previously found a way of modifying a record in the middle of an existing file (I'm not crazy, am I,
carynb? Didn't I show you how I had done something along those lines in class last week?), but that code doesn't seem to be in any of the projects I have on my computer here at home. Using the Write file access mode, I can overwrite the file starting from the beginning. Using the ReadWrite mode, it appends everything to the end, even if I read up to the point where I want to change the file and then write my changed record. A Google search failed to turn up any way of overwriting records that are in the middle of the file. So as it stands now, I'm reading the file record-by-record and writing the record to a second file, unless the record I've just read is the one I'm updating - in which case, I'm writing the updated version. Then I'm closing the file, deleting the original and renaming the new file to the original name.
I was talking to Mario tonight about this, and he couldn't think of any other way of doing it without using something called Ajax Gadgets. He suggested that I put the following somewhere in my code as a comment: "No sane person would ever do this. Sane people would use a database."
Anyhoo, I had considered going out tonight, but a) I'm sore from bowling (another sign that I was bowling poorly - when I'm bowling well, my body doesn't bitch at me), and b) it's freezing out there (according to www.theweathernetwork.ca, it's only -4 with a wind chill of -12, but it felt like -20 when I got home an hour and a half ago). So fuck that noise.
WTF? The other team doesn't show up, doesn't declare their scores or bowl off, and we still are deemed to have lost a game against them? That makes no sense at all.
The weird thing is that it was someone who's not even the league statistician who somehow found out and filed a complaint about us with the league executive. I have no idea how he saw the scoresheets... anyway, Mario is submitting an amendment to the Constitution at the annual general meeting in January. This is ridiculous.
On the bright side, I got those changes I was making to my C# assignment completed this afternoon. I'm sure that I had previously found a way of modifying a record in the middle of an existing file (I'm not crazy, am I,
![[livejournal.com profile]](https://www.dreamwidth.org/img/external/lj-userinfo.gif)
I was talking to Mario tonight about this, and he couldn't think of any other way of doing it without using something called Ajax Gadgets. He suggested that I put the following somewhere in my code as a comment: "No sane person would ever do this. Sane people would use a database."
Anyhoo, I had considered going out tonight, but a) I'm sore from bowling (another sign that I was bowling poorly - when I'm bowling well, my body doesn't bitch at me), and b) it's freezing out there (according to www.theweathernetwork.ca, it's only -4 with a wind chill of -12, but it felt like -20 when I got home an hour and a half ago). So fuck that noise.
no subject
no subject
I'm wondering if I could pass the entire array from the address label back up to the form in my AddressUpdatedEventArgs, but that seems to be a bit much - not to mention, it would be a strain on memory once the file got to a certain size, wouldn't it?
no subject
no subject
As for cold, it got cold here quickly as well. Yesterday the wind was gusting so that the 40deg felt like it was in the 20s. Though that hardly beats that negative weather there in Canada.
no subject
It's not really that confusing - I may just not be very adept at describing what I'm doing, as a lot of the terminology for OO programming is new to me.
As for cold, it got cold here quickly as well. Yesterday the wind was gusting so that the 40deg felt like it was in the 20s. Though that hardly beats that negative weather there in Canada.
Remember to convert from Celcius to Fahrenheit when I talk about temperatures. :P
Current temperature: -3C = 26.6F
Current wind chill: -10C = 14F
Current Lance-will-feel-like-if-he-goes-out: -20C = -4F
no subject
I am not sure how to do it in a flat file as I am always using a MSSQL backend.
The assignment specifically said to use a CSV, though. We didn't start SQL Server until after the assignment was given to us. If there were a third assignment (I doubt that there will be, since this is supposed to be the last week of classes), it would probably involve using a database. I imagine the final will include that material, though.
As for Ajax not sure that is in the scope of your course.
No, I'm pretty sure it isn't. If I remember tomorrow night, I may mention it to the instructor and see what he says, though.
no subject
You didn't actually show me, no. *g* You did say that you were having trouble actually overwriting a line, since once you'd read the line, you couldn't back up.
I'm actually reading the entire file into a collection in the beginning, and writing out the whole thing when a new record is saved. I actually have the list box is in my local form - only address panel is in my Windows Control Library - so that I can access the individual items in the collection.
It's funny, there's actually a piece of shareware I use (Readerware, for cataloging my books and records) that seems to work exactly this way. The data is actually in a csv file. So, apparently, there is an actual use for this, in a small application. *g*
no subject
That was the final < /addresses > tag in the XML file, though. I'm pretty sure I was able to overwrite a specific address - it was when I was trying to add data between the final address and the < /addresses > tag that I was having that particular problem.
Then again, maybe I'm misremembering.
I'm actually reading the entire file into a collection in the beginning, and writing out the whole thing when a new record is saved. I actually have the list box is in my local form - only address panel is in my Windows Control Library - so that I can access the individual items in the collection.
Interesting - I included the list box in the address panel. Maybe we weren't supposed to? Oh, well, I'm not changing it now. I don't want to break it. :)
It's funny, there's actually a piece of shareware I use (Readerware, for cataloging my books and records) that seems to work exactly this way. The data is actually in a csv file. So, apparently, there is an actual use for this, in a small application. *g*
I was thinking about that when I recalled