Infarction 503 Posting Virtuoso

Hehe. A nurse, huh? Not bad, could use more of them around. Good luck with that :)

Infarction 503 Posting Virtuoso

Marvelous scripts and possessed nanobots freed memory while attacking a MSFT server.

Infarction 503 Posting Virtuoso

planner

Infarction 503 Posting Virtuoso

What are you planning on majoring in?

Infarction 503 Posting Virtuoso

They do indeed

Infarction 503 Posting Virtuoso

Yeah, I did the calculus thing too. It was so nice skipping a year of math when I got to university. Let me slack off even more than I already do (which is probably why I don't get better than a 3.5) :o

Infarction 503 Posting Virtuoso

grade school... ah, those were the days...

Infarction 503 Posting Virtuoso

Limits are what you make them :p

just teasin' ;)

Infarction 503 Posting Virtuoso

Tutoring is a class?

Infarction 503 Posting Virtuoso

That's excellent.

Or it means you need a few challenging classes ;)

/me goes off to grumbling about graduating from HS 112th in his class with a 3.5...

Infarction 503 Posting Virtuoso

Use < rather than <=. I didn't really read the code, except for that bit.

Infarction 503 Posting Virtuoso

Better no, easier perhaps...

Are you saying that it's worse, or that easier isn't better?

Infarction 503 Posting Virtuoso

> if (a(left) == b(left))
When did ( ) become the array subscript operator?

when [ left] got parsed out ;)

Infarction 503 Posting Virtuoso

Heh, the reason Narue and Salem were so abrubt with their responses is because the OP's question is basically asking "how to I break the rules for OOP without getting in trouble?" The answer that will usually work is to have get/set methods. Sometimes that isn't quite what you want, and you use a friend, but the OP specified that friends weren't allowed.

1. If you know the object layout, you can add appropriate offset to the pointer to an object of this type to get a simple pointer to the member variable (which will be exempt from all access checks by compiler)

This requires you to know how the compiler will lay the data out in memory, plus a bit of ugly hacking. Not a good solution.

2. Say the header file of your class that has this private member is provider.h. Add #define private public before including it:

Horrible idea. There's a reason for having private members, making them public is a very bad idea.

[edit:] by the way, Narue is very much an expert, and highly respected on the forum. She just has a sharp wit :p

Infarction 503 Posting Virtuoso

You'd know better than we what colors she likes... besides it's the thought (and perhaps the item) that counts, color takes a fairly distant third. ;)

If it was for myself, I'd probably get either blue or silver (or black if that was an option), but only due to color preferences :p

Infarction 503 Posting Virtuoso

A project I'm working on has this awful problem wherein the JFrame refuses to resize in Linux. I've tried the setResizable(true) method, both in the constructor and outside of it, but no go. It works fine on Windows. And I'm using Java 1.6 if that makes any difference. Am I just forgetting something stupid?

/* from main() */
ITSUCSFrame jf = new ITSUCSFrame();
jf.pack();
jf.setVisible(true);
jf.setResizable(true);
/* from constructor */
initComponents();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setResizable(true);
// the next line is to make it larger than a handful of pixels :(
setMinimumSize(new Dimension(800,600));
Infarction 503 Posting Virtuoso

Actually, I've heard Fedora has a new way of configuring X11 without an xorg.conf, but I don't know if it's out in FC6 or not (I think it's an optional package, or perhaps still in beta). FC7 will likely not have an xorg.config though, IIRC.

Infarction 503 Posting Virtuoso

My guess would be RAM, but I've not ever had a server undergoing a heavy load. Seems like it'd have more of a dependence on disk I/O than on processor time though...

Infarction 503 Posting Virtuoso

You're getting close, but you're still missing some things. For instance, if left > size, you don't return anything, which should be a compiler error. You did try to compile the code first, right? Like joeprogrammer suggested, you could use an extra condition to check if you just compared the last elements. Or, you could return true if left >= size, which would be just in an else block (fixes the above error as well, but someone could just call the function with the wrong left or size to get it to return true).

Other than that, it should be if(left < size) because of 0-based counting (the legal range of indices are 0 to size-1).

Infarction 503 Posting Virtuoso

Try running through your code on paper, as though you were the computer. You'll see that you're not using the left variable for anything, except the +1 before recursing. And you'll recurse infinitely unless a and b are different. Which they almost always will be, unless you're comparing an array to itself. You need to index the arrays (using left) and check for bounding errors to make sure you don't go over the length of the arrays. ;)

Infarction 503 Posting Virtuoso

Indeed, also you can use "friend" functions to classes - as indicated above. Example:
...

Yes, but the thread was about changing private variables without using friends. ;)

Infarction 503 Posting Virtuoso

A common problem when downloading from a busy server is that it limits the amount of bandwidth given to a connection so that it can process all connections. Using multiple connections allows you to (often) fool the server into thinking that there's 2 separate computers, and then therefore you get twice the bandwidth, assuming that your bandwidth is large enough to acommadate the increased downspeed.

That is true, but how do you go about getting chunks of the file over multiple connections? It seems like that would only work when you're getting multiple files from the same server.

Infarction 503 Posting Virtuoso

hm, answers are a bit out of date (altavista? rofl)... anyways, 113 here

Infarction 503 Posting Virtuoso

An echo (heard this one before) :cool:

Aha! my theory was right... :p

Infarction 503 Posting Virtuoso

yes i just do

using namespace std

then im like

cout << "Hello";
cin >> variablex;

Then you haven't run into the scoping issues associated with that yet. ;)

Infarction 503 Posting Virtuoso

Download acc don do any thing which is extraordinary ......ya they do split up the files and dwlds it thru multiple connections but all its doin is utilizing ur available bandhwitdh to the fullest...it does not actually accelerate ur dwld.

How would that make the download faster? You send a request for a file to some server, it sends you the whole file. I don't think there's a non-p2p protocol that allows you to ask for specific sections of a file. And having multiple connections means having multiple sources of overhead. Odds are, either your connection will be used up anyways, or it's fast enough you don't need to worry about an accelerator...

Infarction 503 Posting Virtuoso

Not big on word games myself, but sometimes I get bored... :p

Infarction 503 Posting Virtuoso

sign language?

I think most of the ones people get on the first try come from a bit of thinking or just being familiar with the riddle. Though I wouldn't completely discount the effects of a quick google search ;)

Infarction 503 Posting Virtuoso

I think it good that children learn to write cursive-- it curbs the habit of writing sloppily; the older I got, though, the more I moved away from it. All the hours spent forming graceful loops on lined-paper lost it seems (like so much else in grade and high school, IMO).

Well, the time seems wasted, and the lesson certainly didn't stick in my head, but sometimes my writing looks almost cursive for a few letters at a time (usually when I'm taking notes quickly). Some people have sloppy cursive writing too though, and while I'd not claim my handwriting to be particularly neat, it's definitely readable.

Infarction 503 Posting Virtuoso

maybe use get and set functions? If you're doing it without friends, it seems like making main a friend is not allowed...

Infarction 503 Posting Virtuoso

Look into the Runtime.exec methods, as masijade suggested

Infarction 503 Posting Virtuoso

Indentation is just using tabs or spaces to mark where blocks start and end. Look at the difference (btw, there's some comments I added too):

#include<iostream.h>
#include<graphics.h>
#include<dos.h>
#include<conio.h>
void main() // should be int main()
{
  int gd=DETECT,gm,i,j,x,a,b,c,d,e,f;
  initgraph(&gd,&gm," ");
  { // why start a block here?
    setcolor(4);
    setbkcolor(0);
    settextstyle(4,0,6);
    for(a=0;a<=750;a=a+25)
      for(b=0;b<=7;b++)
      {
        { // why create a block here?
          setcolor(b);
          sound(100);
          delay(50);
          outtextxy(a,a,"COMPUTER PROJECT");
        }
        clearviewport();
      }
    for(c=0;c<=350;c=c+5)
      for(d=0;d<=7;d++)
      {
        setcolor(d);
        sound(50);
        outtextxy(250,250,"made by kanika");
        outtextxy(250,300,"and simran");
        rectangle(260-c,400-c,200-c,250+c);
      }
    clearviewport();
    { // why create a block here?

      for(f=0;f<=700;f=f+3)
        for(e=0;e<=7;e++)
        {
          setcolor(e);
          circle(360,250,f);
          outtextxy(100,230,"AnAlOg ClOcK");
        }
    }
    clearviewport();
    nosound();
    circle(290,250,200);
    outtextxy(260,40,"12");
    outtextxy(180,65,"11");
    outtextxy(120,135,"10");
    outtextxy(100,210,"9");
    outtextxy(120,280,"8");
    outtextxy(180,350,"7");
    outtextxy(260,390,"6");
    outtextxy(360,350,"5");
    outtextxy(440,280,"4");
    outtextxy(460,210,"3");
    outtextxy(440,135,"2");
    outtextxy(360,65,"1");
    for(j=360;j>=0;j=j-5)
      for(i=450;i>=0;i=i-5)
      {
        { // why create a block here?
          setcolor(4);
          setbkcolor(0);
          delay(100);
          pieslice(290,250,i,i--,100);
          circle(290,250,100);
          setfillstyle(0,0);
          floodfill(290,250,0);
        }
        delay(6000);
        pieslice(290,250,j,j--,50);
        circle(290,250,150);
        setfillstyle(0,0);
        floodfill(290,250,0);
      }
  }
}
getch(); // this isn't even in main()

Now, could you restate the prbblems you currently have? I can't run your program because of the headers you're using, but I'll try to help out again...

[edit:] Ok, I just noticed you didn't even put the code tags on your last post. Before I even consider helping you again, you need to learn to use them. It's really easy. When you post your code, you put [code] before it and [/code] after it. That will preserve the indentation when you copy your source and paste it in the post window. Using them is part of the rules of the forum, so …

Infarction 503 Posting Virtuoso

Kanika, please use code tags. Your code is unreadable without indentation. It's been mentioned three times in this thread already. Some comments in the code to describe what sections do would be nice as well. And since it's currently 2:00 AM here, I'll look at it when I get up in the morning.

Infarction 503 Posting Virtuoso

Some people do. Cursive for some people is closer to shorthand and done in a single flowing motion, so they can write things faster.

Infarction 503 Posting Virtuoso

you'll want to bind /dev and create a /proc somewhere inside the chroot environment as well before you actually enter it. Might be handy to copy DNS information as well if your 'net is working from the rescue boot...

Infarction 503 Posting Virtuoso

Indent your code and use [code] tags when you post, it'll make everyone happier. And it'll show you how what you posted and what I posted are different. ;)

Infarction 503 Posting Virtuoso

<iostream.h> is a deprecated header, and was never part of standard C++. I'm assuming you're using VC++6.0 or a similarly older version of Borland. The standard header is <iostream> so you may have to change it between school and home. You may consider raising the issue with your teacher, but there's a chance that he doesn't care, or may even get mad at you.

I really want to start working with <stdio.h> and printf() but I don't think my teacher would accept the work, since he's hellbent on getting us to code with older techniques. (Seems like the lines we're writing aren't very "hip" anymore, since everywhere I look outputs are accomplished with printf() and such.)

printf() is the C way of managing output, and it's much older than C++ output using cout. ;)

Infarction 503 Posting Virtuoso

hm, I'd do that but I don't write in cursive... :(

Infarction 503 Posting Virtuoso

I think if you boot into your rescue mode and then mount and chroot to your install, then you'll be able to use dmesg and syslog. I can never remember how to chroot though, so you'd have to look around for instructions on that.

Infarction 503 Posting Virtuoso

I'd venture to say they don't work. Your bandwidth is limited, and unless a download accelerator is making the tubes bigger, you won't get any more flow. Unless they have a special feature of compressing the file before you download it, but that seems overly complicated when good avertisting will get their product out...

Infarction 503 Posting Virtuoso

Just to nitpick a li'l: a char and a character string are very different. For a character string, you'll need to do like joeprogrammer says, which would be correct for your example. You can also add the value of a single character (char) to an integer, but remember that a char value is not necessarily it's integer representation. That is '0' != 0, '1' != 1, etc...

Infarction 503 Posting Virtuoso

I find the forums quite easy to use. The layout's really nice, and the 'Posts since last visit' feature makes it really easy to tell where I left off on my last visit. The site is very clean (especially with ad-blockers :o) and gets relatively little spam. And I've no complaints against the moderator staff. Overall you guys are doing a very excellent job.

DaniWeb has become one of two forums I spend entirely too much time on, which is a very good sign. ;)

Infarction 503 Posting Virtuoso
mattyd commented: Retro Junk! Link :) \\ MattyD +3
Infarction 503 Posting Virtuoso

Only social networking site I use is Facebook, which still has a nice clean interface. I can't stand myspace pages though, they're about as bad as <marquee> and <blink>. I will admit, I'm basing that on approximately 2 page loads though (took less time to close the tab than it took to load the page :p)

Infarction 503 Posting Virtuoso

silence

[edit:] sniped :p

Infarction 503 Posting Virtuoso

I've heard that OSX is a pain to set up XGL for as well, but not having a Mac myself I've not investigated it. Replacing the kernel does sound familiar though.

Infarction 503 Posting Virtuoso

my guess would be that the drivers aren't compatible with WinXP64, but can't say for sure...

Infarction 503 Posting Virtuoso

You can run compiz or beryl for any DE, so it's not really fair to say KDE or Gnome is better. Afterall, you're just replacing the WM. And for non-accelerated eye-candy, Enlightenment seems pretty popular.

I don't know that there's any other 3D accelerated WMs out yet for Linux...

Infarction 503 Posting Virtuoso

I've this feeling of not being quite alive rather a lot, so who knows...

Either you've stayed up too late too many times with the coffee pot, or you just need some more coffee to drink :p

Infarction 503 Posting Virtuoso

and is there a logical problem with your code...?

By the way, main should return a type int ;)