Duki 552 Nearly a Posting Virtuoso

Download Day is here!
Set a Guinness World Record
Enjoy a Better Web

Sounds like a good deal, right? All you have to do to help us set the record for the most software downloaded in 24 hours is get Firefox 3 now – it’s that easy. We're not asking you to swallow a sword or to balance 30 spoons on your face, although that would be kind of awesome.

Please download Firefox 3 by 11:16 a.m. PDT (18:16 UTC) on June 18, 2008. That's 11:16 a.m. in Mountain View, 2:16 p.m. in Toronto, 3:16 p.m. in Rio de Janeiro, 8:16 p.m. in Paris, Madrid, Berlin, Rome and Warsaw, 10:16 p.m. in Moscow, and June 19, 2008 at 2:16 a.m. in Beijing and 3:16 a.m. in Tokyo.

http://www.spreadfirefox.com/en-US/worldrecord/

Last I checked, they were averaging around 10,000 downloads per minute...
Download Counter: http://downloadcounter.sj.mozilla.com/

Duki 552 Nearly a Posting Virtuoso

Hey everyone,

We need to monitor who changes what files/folders and when they do that. Is there software that we can get to do this?

Duki 552 Nearly a Posting Virtuoso

Hey everyone,

I have Vista installed on my C: partition and XP installed on G:
Every time I reboot, the PC goes straight into XP, with no option for Vista. How can I make it to where the computer gives me the option at boot?

Duki 552 Nearly a Posting Virtuoso

Hey everyone,

I've been the IT at my workplace for about 2 years now. We use a piece of software that was developed in house by one of the previous ITs (about 6 years ago), and I think it was developed in VB6. We need to modify a couple of things in the software, but he didn't leave the source code when he left. Is there a way to decompile the .exe file we're using to access the source code so that we can modify it?

Duki 552 Nearly a Posting Virtuoso

Monitor is still for sell. Send me a PM.

Duki 552 Nearly a Posting Virtuoso

Not sure how to do that.

Is there a way to assign a value to a database during run time? Like could I do something that says If ProjectManager == Dan Then ContactID = 1 (ID is the key for the 2nd table)

Duki 552 Nearly a Posting Virtuoso

Hey everyone.

I have a program that will load project data according to the project number selected. One of the fields associated with the project number is the project manager. I have another table called Contact which is the contact information for the project mangers. I have a link setup that will show the Contact form, but how do I let the Contact form know which project manger's contact info to show?

Sorry if this isn't a good explanation of the problem.

Duki 552 Nearly a Posting Virtuoso

calazone and sprite

Duki 552 Nearly a Posting Virtuoso

I want to connect my PC to my TV. I have an s-video capable graphics card, but is this the best way? I want the clearest picture possible. Would a tv-tuner card like the Radeon Theater or All in Wonder cards work for better for this?

Duki 552 Nearly a Posting Virtuoso

fixed it. Since it's a domain computer I needed to do %username%.domain

thanks for trying to help!

Duki 552 Nearly a Posting Virtuoso

ah! excellent thanks!

Duki 552 Nearly a Posting Virtuoso

Hey guys,

Here's my code:

#include <iostream>
using namespace std ;

template<class T>
class Pair
{
public:
	Pair ( ) ;
	Pair (T v1 , T v2 ) ;
	void setFirst(T newV ) ;
	void setSecond(T newV ) ;
	T getFirst() const ;
	T getSecond() const ;
private:
	T first ;
	T second ;
} ;

template<class T>
Pair<T>::Pair(T v1 , T v2 ) : first(v1) , second(v2)
{ }

template<class T>
void Pair<T>::setFirst(T newV)
{ first = newV ; }

template<class T>
void Pair<T>::setSecond(T newV)
{ second = newV ; }

template<class T>
T Pair<T>::getFirst() const
{
	return first ;
}

template<class T>
T Pair<T>::getSecond() const
{
	return second ;
}

template<class T>
T addUp(const Pair<T>& thePair) ;
typedef Pair<double> PairOfDbl ;
typedef Pair<int> PairOfInt ;
int main ( )
{
	PairOfDbl pair1 ;
	PairOfInt pair2 ;

	pair1.setFirst ( 10.3 ) ;
	pair1.setSecond ( 20.72 ) ;

	pair2.setFirst ( 15 ) ;
	pair2.setSecond ( 35 ) ;

	cout << addUp ( pair1 ) << endl ;
	cout << addUp ( pair2 ) << endl ;

	return 0 ;
}

template<class T>
T addUp(const Pair<T>& thePair)
{
	return (thePair.getFirst() + thePair.getSecond());
}

I'm getting about 5 LINK errors. What am I missing? =\

Duki 552 Nearly a Posting Virtuoso

sierra mist.

Duki 552 Nearly a Posting Virtuoso

Well yes and no. We recently installed new servers, which do not give this error. I figure it was something configured wrong in DNS or DHCP on my behalf; it was my first DC.

Duki 552 Nearly a Posting Virtuoso

Hm, the double quotes are needed because the path has spaces. The directory is there; it works with the username.

thanks.

Duki 552 Nearly a Posting Virtuoso

Hey everyone... could someone tell me why this isn't working? I get "The specified path could not be found." when I run it.

@echo off
REM###########################################################################

REM Author: Caleb
REM Date: 11-14-2007
REM Contact: -

REM Description: This .bat file is to copy necessary .cui, .mnl, and .mnr files from Autodesk 2007 to the REM @REM   Autodesk 2008 support folder

REM############################################################################

echo Copying Autodesk 2007 .cui files to Autodesk 2008 Support directory...
copy "C:\Documents and Settings\%USERNAME%\Application Data\Autodesk\C3D 2007\enu\Support\*.cui" "C:\Documents and Settings\%USERNAME\Application Data\Autodesk\C3D 2008\enu\Support"
pause

echo Copying Autodesk 2007 .mnl files to Autodesk 2008 Support directory...
copy "C:\Documents and Settings\%USERNAME%\Application Data\Autodesk\C3D 2007\enu\Support\*.mnl" "C:\Documents and Settings\%USERNAME%\Application Data\Autodesk\C3D 2008\enu\Support"
pause

echo Copying Autodesk 2007 .mnr files to Autodesk 2008 Support directory...
copy "C:\Documents and Settings\%USERNAME%\Application Data\Autodesk\C3D 2007\enu\Support\*.mnr" "C:\Documents and Settings\%USERNAME%\Application Data\Autodesk\C3D 2008\enu\Support"
pause
Duki 552 Nearly a Posting Virtuoso

Alright, thanks! Marking this one as solved. :)

Duki 552 Nearly a Posting Virtuoso

It's a 300 level. It would be the 3rd semester of C++ classes. I've taken structured, and am finishing up OOP now.

The catalog describes the course like so:

This course introduces various data structures used in problem solving. Arrays, queues, lists, trees, graphs, and files are represented by using abstract data types in high level programming language. Applications studied my include recursion, searching, sorting, scheduling, parsing, and memory management.

I really want to take the course but A) the professor assigns so much homework that I lose track of every other class, including my networking classes, and B) I'm already taking 21 hours next semester. Picking this class up would force me to drop a required class and use Data Structures as an elective where I could be using something like Database Administration or Project Management. I don't know. What do you think?

Duki 552 Nearly a Posting Virtuoso

Ah, ok. Yeah, my book touched on the overhead of virtual functions a bit.

Since we're on the topic of Polymorphism, do you have any good programming exercises I might be able to do? Strange question, I know. The book I'm using has really bad, somewhat non-realistic (in terms of in-the-field application) projects that put Polymorphism to use. My professor said he was going to try to find a better project, but I haven't heard anything yet. Can you think of a real-world application that might use polymorphism? If not, no problem. I just know you're obviously in the field doing this stuff and figured you might have an idea right off.

Duki 552 Nearly a Posting Virtuoso

How important are data structures in C++? I'm majoring in networking and going to grad school for MISM with a focus in networking. If I have a firm understanding of C++ concepts such as encapsulation, inheritance, recursion, polymorphism, templates, and exception handling will topics in data structures benefit me at all? The main reason I took OOP was to exercise by brain figuring it would teach me to think differently and gain better problem solving skills. How will data structures apply to this? Will it do anything for me that classes such as Calculus and Modern Geometry won't?

Thanks! :)

Duki 552 Nearly a Posting Virtuoso

Thanks! Great explanation!

So would you say to never use redefined methods? Is it worth the resource overhead to make all functions virtual (as opposed to redefined)?

Duki 552 Nearly a Posting Virtuoso

Hey guys,

my prof is looking for a good polymorphism project. The one's in the book weren't good at all. Could someone give a suggestion?

Duki 552 Nearly a Posting Virtuoso

Could someone explain the difference between Overloading, Redefining, and Overriding functions?
A nutshell answer will work fine; I just need something to stick in my brain for tomorrow's test. I know the concepts behind these tools, but I just need a simple way of defining the difference between them.

Duki 552 Nearly a Posting Virtuoso

bottled water.

Duki 552 Nearly a Posting Virtuoso

Sorry if I sounded rude; honestly, I was trying to. It's just getting late, and I'm tired. My appologies.

I'm not sure where the problem is. I just started using rand() and am not sure what srand() is.

Maybe a more descriptive explanation of the problem I'm having:

When I run the program it's supposed to have random effects on the character's attributes (stated at the top of the first post). The problem is, every time I run the program, I get the same exact results. Nothing changes. I wanted the outcome (winner) to be by chance every time I run the program, but it's like rand() is giving me the same numbers with every compilation.

Duki 552 Nearly a Posting Virtuoso

Why do people apologise for doing bad things rather than just doing what they know they should? :icon_confused:

I clearly said "so far", meaning I was going to get around to it, but didn't see it as a priority for the moment.

Not wanting to waste time looking through 400+ lines of code for that 1 wayward statement, all I can suggest without you being more specific is that srand() should only be called once at the beginning of the program.

If this doesn't help, give us a clue as to what to look at.

If you would have looked through the code, you would see that doing rand() once is not an opption since it has to be nested in a loop to be effective.

It didn't help; and if you're going to be condescending in every post, I'd rather you not waste your time trying to help.

Duki 552 Nearly a Posting Virtuoso

Hey everyone,

I'm still tweaking the attributes but here is what I've got:

All races: dmg = rand, where 0 < r < str

Human
25% chance of blocking
5% chance of double attack (attack x2)
10% chance of dmg+60

Elf
5% chance of blocking
35% chance of double attack

Balrog
35% chance of attacking twice

Cyberdemon
35% chance of blocking


Balrog and Cyberdemon are inherited from Demon; all objects of class Demon have a 10% chance of inflicting dmg+50.

My code (very few comments so far, sorry):

#pragma once

#include <string>
#include <iostream>
using namespace std ;

class Creature
{
public:
    Creature ( ) ;
    Creature ( int newStr , int newHp ) ;
    int getDmg ( ) ;
    void takeHit ( int dmg ) ;
//protected:
    int str ;
    int hp ;
    string getSepcies ( ) ;
} ;





#include "creature.h"

Creature::Creature ( ) : str ( 15 ) , hp ( 250 )
{ }

Creature::Creature ( int newStr , int newHp ) : str ( newStr ) , hp ( newHp )
{ }

int Creature::getDmg ( )
{
    int damage ;

    //All creatures inflict damage which is a random number up to their strength
    damage = ( rand() % str ) + 1 ;
    //cout << "Default Creature attacks for " << damage << " points!" << endl ;

    return damage ;
}

void Creature::takeHit ( int …
Duki 552 Nearly a Posting Virtuoso

I've done that, and saved it as a .bat file. Didn't work though.

Duki 552 Nearly a Posting Virtuoso

I don't know which DOS commands to use though :( i r newb, i know.

Duki 552 Nearly a Posting Virtuoso

Thanks a ton. Your explanations are really helping me to grasp the concepts.

Also, on the other two problems you were helping me with, they're fixed now. Thanks a bunch.

It helped a lot. As always. :)

Duki 552 Nearly a Posting Virtuoso

bump

WaltP commented: c'mon you know better than to bump a thread. -2
christina>you commented: oh c'mon... you know better than to bump a thread caleb!! shame on you. =] +15
ndeniche commented: heh +3
Duki 552 Nearly a Posting Virtuoso

Alright, that all makes sense. Thanks.
Question though: When do you overload the istream?

Duki 552 Nearly a Posting Virtuoso

I understand how to make the script autorun, but I need help writing it.
Thanks though

Duki 552 Nearly a Posting Virtuoso

The key to your problem was described by Duoas so I won't repeat it.

so your rant in post #3 was pointless, seeing as my question has been answered and I'm working on fixing my program already... thanks tho! :)

Duki 552 Nearly a Posting Virtuoso

>>same problem
Same problem as what?? I have no idea what you problem is. When starting a new thread do not make it dependent on a previous thread. If there is a problem then you need to describe what the problem is. To keep from repeating yourself you should not have started a new thread but just posted to the original thread so that everyone knows what the hell you are talking about.

ok :(

I'm having a problem with getline and cin.ignore(). Prompts keep getting skipped when more than one word is used. In the first example above, it goes straight from Body: to Path:

Duki 552 Nearly a Posting Virtuoso
#pragma once

#include <string>
#include <iostream>
using namespace std ;

class Document
{
public:
    Document ( ) ;
    Document operator= ( const Document & d ) ;

    void setText ( ) ;
    string getText ( ) ;
protected:
    string text ;
} ;

#include "document.h"

Document::Document ( ) : text ( "No text set" )
{ }

Document Document::operator =( const Document & d )
{
    text = d.text ;

    return *this ;
}

void Document::setText ( )
{
    cout << "Body:  " << endl ;
    getline ( cin , text ) ;
}

string Document::getText ( )
{
    return text ;
}

#pragma once

#include "document.h"
#include <string>
#include <iostream>
using namespace std ;

class Email : public Document
{
public:
    Email ( ) ;
    Email ( string s , string r , string t ) ;

    Email operator =( const Email & e ) ;

    void setData ( ) ;
    string getSender ( ) ;
    string getRecipient ( ) ;
    string getTitle ( ) ;
protected:
    string sender ;
    string recipient ;
    string title ;
} ;

#include "email.h"

Email::Email ( ) : Document ( ) , sender ( "None" ) , recipient ( "None" ) , title ( "None" )
{ }

Email::Email ( string s , string r , string t ) : Document ( ) , sender ( s ) , recipient ( r ) , title ( t )
{ }

Email Email::operator =( const Email & e )
{
    Document::operator= ( e …
Duki 552 Nearly a Posting Virtuoso

Firstly, don't use output methods (cout, etc.) inside an overloaded input operator (>>). That is just bad design no matter how you look at it. Yes, I know it can be done, but it breaks every model there is, and will lead to future failures. Use instead a named method like getTruckInfoFromUser() or somesuch if you plan to use both input and output methods together. Don't disguise them both under the pretense of only one.

Not sure I understand. If I use getTruckInfo(), there will be no point for overloading the istream, correct? Or could I do something along the lines of

string Truck::getManf ( )
{
     string manf ;

     cout << "Manufacturer:  " << flush ;
     cin >> manf ;
     return manf ;
}

istream & operator >>( istream & is , Vehicle & v )
{
   is >> getManf ;
   return is ;
}
Duki 552 Nearly a Posting Virtuoso

I have a .ini file setup that does a complete installation with no user intervention. I need a way to run the link through a script though.

Duki 552 Nearly a Posting Virtuoso

Ok, I'm going post all of my code, and hopefully someone can tell me where my error is at. I'm guessing I need to do a cin.ignore() somewhere, but I'm not sure where. I've tried it in a couple of places, but nothing has fixed the problem completely.

#include <string>
#include <iostream>
using namespace std ;

class Person
{
public:
    Person ( ) ;
    Person ( string theName ) ;
    Person ( const Person & theObject ) ;

    string getName ( ) const ;
    Person operator =( const Person & rtSide ) ;
    friend istream & operator >>( istream & is , Person & p ) ;
    friend ostream & operator <<( ostream & os , const Person & p ) ;
private:
    string name ;
} ;



#include "person.h"

Person::Person ( ) : name ( "John Doe" )
{ }

Person::Person ( string theName ) : name ( theName )
{ }

Person::Person ( const Person & theObject )
{
    name = theObject.name ;
}

Person Person::operator =( const Person & rtSide )
{
    //useless here
    if ( name == rtSide.name )
        return *this ;

    name = rtSide.name ;
    return *this ;
}

istream & operator >>( istream & is , Person & p )
{
    cout << "Name:  " << flush ;
    getline ( is , p.name ) ;
    
    return is ;
}

ostream & operator <<( ostream & os , const Person & p )
{
    os << "Name:  " << p.name << endl ;

    return …
Duki 552 Nearly a Posting Virtuoso

well, considering it's more pertaining to DOS....

Duki 552 Nearly a Posting Virtuoso

Hey guys,

Could someone show me how to write a batch file to install software? I just need something very basic that, when run, will auto install the software.

I know it isn't that hard, but I don't know how. :(
thanks!

Duki 552 Nearly a Posting Virtuoso

Is there any reason to check for self assignment, if you're not using array's or pointers, when overloading the = operator?

For example, if the only datatypes in Vehicle are int cylinders and string manufacturer, do I really need to check before assigning? If so, what's the point?

Duki 552 Nearly a Posting Virtuoso

but when redefining the << and >>, how do I specify which class the overloading pertains to?

all of them start with

ostream & operator<<(ostream & os, const Complex & c)

edit] funny how when you post questions you answer them yourself after re-reading it. Man I feel dumb. Thanks.

Duki 552 Nearly a Posting Virtuoso

I have a class called Person.
I also have a class called Truck, inherited from class Vehicle.

I want to overload the iostream operators for all three classes so that I can do statements such as:

Person a ;
Vehicle b ;
Truck c ;

cin >> a ;
cin >> b ;
cin >> c ;

Is this possible? If so, how?

Duki 552 Nearly a Posting Virtuoso

Hey guys,

I'm looking at taking a PHP course in the spring. The prof and I get along well, and she said I could waive the college's prerequisites and sign up if I wanted to. The prerequisites (in the college catalog) are a couple of HTML courses.

My question is this: should I be ok with signing up for the PHP class if I know very little HTML? Is PHP highly dependant on HTML? I've taken C++ and VB.NET, so I understand programming logic from an application point of view; will this help me in PHP?

Thanks for any advice!

Duki 552 Nearly a Posting Virtuoso

Roasted turkey with stuffing and mashers, also a helping of green beans spiked with cranberries. Since the berries are in season, cranberry juice too.

Wow, half a Thanksgiving feast! That sounds incredible right now.

I'm getting ready to have a bowl of strawberry miniwheats cereal.... or maybe penut butter captain crunch.

Duki 552 Nearly a Posting Virtuoso

I'm not sure what that means =(

Duki 552 Nearly a Posting Virtuoso

Visual C++ Express

Duki 552 Nearly a Posting Virtuoso

Ok, I just took the namespace out completely. Now i get this

1>assign18.obj : error LNK2028: unresolved token (0A00032B) "public: void __thiscall TitledEmployee::setTitle(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?setTitle@TitledEmployee@@$$FQAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "int __cdecl main(void)" (?main@@$$HYAHXZ)

edit] maybe because I didn't define it.

Duki 552 Nearly a Posting Virtuoso

I'm trying to write an asp.net page that will keep variables using the .value command. It's not working. Here's my code

Dim custID As Integer
        Dim noMovies As Integer
        Dim price As Double
        Dim discount As Double
        Dim total As Double

            custID = Integer.Parse(Me.idTextBox.Text)
            noMovies = Integer.Parse(Me.numMovTextBox.Text)
            price = noMovies * RENTAL_RATE
            discount = price * DISCOUNT_RATE
            total = price - discount


        totSales += 1
        'totSalesHiddenField.value = totSales.ToString()    couldn't get this working for the life of me
        totIncome += total

            priceTextBox.Text = price.ToString("C")
            discountTextBox.Text = discount.ToString("C")
            totDueTextBox.Text = total.ToString("C")

            totSalesTextBox.Text = totSales
            totRevTextBox.Text = totIncome.ToString("C")

I keep getting errors that .value is not part of string, decimal, integer, etc