Alright, thanks guys. I'm working from a sketchy textbook that doesn't actually explain what it's doing all too well, and I've found horrible errors in it. Luckily it's for a high school class, not college. Anyway, I found a more sensible selection sort on Google so I'm gonna use that instead.
shill
@shill
Best posts made by shill
Latest posts made by shill
-
RE: Which sorting algorithm is this?
-
Which sorting algorithm is this?
for (int index=0; index<items.length; index++) {
for (int subIndex=index; subIndex<items.length; subIndex++) {
if (items[subIndex] < items[index]) {
int temp = items[index];
items[index] = items[subIndex];
items[subIndex] = temp;
}
}
}
It's supposed to be a "selection sort", but I suspect it's something more of a bubble sort. -
RE: Bell Canada WTF!
This isn't a stupid suggestion, as I'm sure you found out when you unplugged all the phones and plugged them back in to find a different situation than when you started. By unplugging all the phones on the line you're basically floating it, which the telco's equipment will detect. Then when you plug it back in you reconnect the circuit. Who knows whether this will cause their system to reset some status on your line?
Well, it didn't help a bit. The tech came to our apartment, and discovered, to no surprise, that the problem had nothing to do with our end and needed to be reported to the CO. Of course, today is a Saturday so nobody's there.
-
RE: Bell Canada WTF!
Yeah, but it involved somebody else's line too. Anyway, now our outgoing number is the same as somebody else's, but our incoming number isn't connected to anything.
-
Bell Canada WTF!
This is a long one.
I must tell a little bit of backstory to start this off. We've had Bell internet and phone service for a long time. They used to be on separate bills, but we eventually got them consolidated. Then, three years ago, my mom and dad got divorced. The internet and phone accounts were in his name, but he moved out. He never bothered calling to get the name changed on the bill.
My mom eventually called and got the name changed on the bill. All was thought to be well. Now, today she noticed her bill was a little high. The reason for this is that Bell just raised the monthly fee for their "grandfathered" Internet plans. We were on a 5 Mbit/s plan, and it had unlimited bandwidth because that's what we signed up for, but of course no ISP wants to give unlimited bandwidth anymore, so the new plan they offered is about $20 cheaper, and 7 Mbit/s, but has a monthly bandwidth cap of 60 GB. We can live with that.
This new internet plan also comes with a free wireless ADSL2+ modem/router. We received it today, and this is where the trouble began. My mom called Bell to inquire why my dad's name was on it. The rep my mom talked to suggested that my dad must have opened an account with my mom's address, citing recent account activity with his name and her address. Now, I found this a little suspicious, since the date he supposedly signed up was just two days ago, which happened to be the date on which we signed up for the new plan. My mom called my dad, and sure enough, he's still happy with his Rogers phone and internet. My next course of action was to sign up for Bell online self-service, and to my dismay, I discovered that the name associated with the internet account was still my dad's name. So, in case you didn't catch that, the reason the rep thought my dad signed up recently was because we upgraded our account which was still under his name. One should like to think they'd be able to tell the difference, but the billing department has no idea how the internet department works. I can only assume that they thought since they'd changed the name on the bill, which includes internet charges, that the owner of the internet account would have been changed as well.
Of course, this didn't really matter too much, but it was foreshadowing for what was about to come. I can only assume that the two major events in this story are connected.
Shortly after getting off the phone with Bell, my mom received a phone call. Well, not really. Her phone rang once, and when she picked it up, there was nothing at the other end. She hung up, and a few seconds later, it rang again. I told her to wait for more rings, but it only rang once. She was mystified, but continued her day otherwise normally. When later she tried to call our land line from her cell phone, she heard rings on her end, but I, being at home, heard nothing. So it was confirmed that nobody was getting through to our line. It was at this time that my mom phoned my grandma. My grandma then said something very strange. She said that she saw a number of someone she didn't know on the call display. She answered it and my mom was on the other end.
So now, we have our number crossed with somebody who lives one street east and one street south of us (I love reverse phone number lookups).
Baffled, my mom phoned Bell (again). The service rep seemed to barely understand, and first offered the suggestion that we unplug all our phones and plug them in again. After we barely managed to suppress our laughter, my mom said that the problem was not with the phones themselves, so the rep told us they'd be sending a tech to our apartment, and that support was free unless it was found to be our fault, in which case we would be charged $80. I really don't know how this could be our fault unless, in a drunken blackout, I climbed a telephone pole and switched the wires.
Update:
I ended up unplugging all the phones anyway since I got a couple of phone calls meant for somebody else. Sure, I could've just taken one of them off the hook, but I thought I'd try the suggestion. Now that I plugged them in again, they all give me some kind of morse code when I pick up the receiver, and the number still isn't ours (verified with my cell phone).
The next update will come after the tech arrives tomorrow. I don't know how he's going to be able to solve the problem by coming to the apartment, but who knows what wonders can be accomplished in this daring age.
-
RE: Can you please review my C codes and tell me if it is good so far?
Well, the problem seems to be that you're using an obselete program (CircuitMaker 2000) to export to a format (WMF) that didn't even have a public specification until 2006. Out of all the programs I've tried, two of them were able to correctly display your WMF, but sadly they were not programs that could convert it.
-
RE: An exercise in mathiness
The sad part is that I actually figured out how they got those numbers. I was hoping someone would figure it out.
Here goes:
1) convert the user's input into radians2) use that radian value as an INPUT to the arc* functions
3) bash head repeatedly
-
An exercise in mathiness
Here is a Java exercise from a certain Java textbook (I don't actually know the title or author, since all I got was this photocopy). Try to figure out how many things are wrong with it (I count at least three).
-
Google Toolbar Autofill
Apparently my Google Toolbar can autofill an XKCD comic.