Duki 552 Nearly a Posting Virtuoso

If you don't mind me asking, why so much space? What will this system be used for, more specifically? That is enough space for 1,500 1080p quality movies (at roughly the typical 8GB each).

And absolutely not. You can purchase two networking cards, and use LACP or PAgP to logically tie them together. You have to make sure they are the same manufacturer (and preferably the same model). This gets into a bit of configuration on the switch IOS, but it's nothing too bad. Would only take about 15-20 minutes to setup.

Here's a little info on LACP.

Duki 552 Nearly a Posting Virtuoso

Never mind. Missed the part about "msconfig doesn't work".

Duki 552 Nearly a Posting Virtuoso

Try this.

Duki 552 Nearly a Posting Virtuoso

I decided to just create a ftp server instead, it was just easier.

Good for you. Keep it simple at the home :)

Duki 552 Nearly a Posting Virtuoso

Awesome. So what's your question?

Duki 552 Nearly a Posting Virtuoso

Welcome to Daniweb.

You need to cover a few bases here.

#1 You have to make sure everything is gigabit compliant. I would purchase a fully gigabit switch (doesn't have to be Cisco, though if you have the $$$ not a bad idea). You also have to make sure that your PCs have gigabit networking cards.

#2 Are you considering an actual server, or a desktop-turned-server setup? Either would work, you just need to ensure your processors are adequate... though don't over compensate. Network streaming isn't extremely processor intensive, I don't think. A single Quad-core will do fine.

#3 Is this a home project? How much $$ are you willing to put into your setup? Have you planned on future expansion (it's better to spend an extra $1,000 now than buy a whole new system next year)?

#4 If you can in fact afford a Cisco switch (or any managed switch) you could setup an EtherChannel, essentially coupling two network interfaces into one large one (e.g., turn two 1-gb links into one 2-gb link). This would require an extra networking card and an extra port on your switch.

The key is to avoid a bottleneck.
Hope this helps :)

Duki 552 Nearly a Posting Virtuoso

Diet Dr. Pepper

Duki 552 Nearly a Posting Virtuoso

Glad everything is starting to smooth over. I definitely understand the frustration of inheriting someone else's incompetence :)

If it were me (and I don't know your full situation) I would disable DCHP on anything and everything (including the wireless stuff) and run DHCP solely from your server.

What are the specs of your current server, and what all functions does it perform?

Duki 552 Nearly a Posting Virtuoso

It's strange that the MAC lead you to two devices, since they're supposed to be unique. Do you have any wireless gateways (linksys, netgear, etc.) that could have a DHCP service running on it?

Duki 552 Nearly a Posting Virtuoso

Any time :)

Duki 552 Nearly a Posting Virtuoso

Don't know what else to tell you other than to try a new motherboard/PSU.

Duki 552 Nearly a Posting Virtuoso

Hey rich,

Have you tried running Dell Diag.? We use Dell throughout our company, and this can be a huge time saver. You might reboot your XPS and see if there's an option already to run the diagnostics. It will take an hour or two, and you need to write down all of the error codes you get. Call Dell, and they'll give you the info on how to proceed.

Hope this helps. :)

Duki 552 Nearly a Posting Virtuoso

In the future, please use more descriptive titles :)

As for booting XP over the network with your setup... I'm fairly certain this isn't possible (without some sort of server or 3rd party application in the mix). I could be wrong though

Duki 552 Nearly a Posting Virtuoso

Might have something to do with the fact I was running it off of my flash drive. I'll give it a whirl again tomorrow.

Thanks for the help

Duki 552 Nearly a Posting Virtuoso

Hm, now I'm getting LINK errors:

Error 2 error LNK2020: unresolved token (0A0002C1) "public: bool __thiscall StackType::Identical(class StackType)" (?Identical@StackType@@$$FQAE_NV1@@Z) main.obj ch5 identical linked stack


Error 1 error LNK2034: metadata inconsistent with COFF symbol table: symbol '?Identical@StackType@@$$FQAE_NV1@@Z' (06000043) has inconsistent metadata with (0A0002C1) in main.obj StackType.obj ch5 identical linked stack


Error 3 fatal error LNK1120: 1 unresolved externals J:\Projects\ch5 identical linked stack\Debug\ch5 identical linked stack.exe 1 ch5 identical linked stack

Duki 552 Nearly a Posting Virtuoso

Just making sure, you're operating under a domain right? Is the DHCP server located on your domain controller?

Duki 552 Nearly a Posting Virtuoso

This should probably be posted in one of the web design forums.

Duki 552 Nearly a Posting Virtuoso

real world project? or a lab project?

Duki 552 Nearly a Posting Virtuoso

You'll have to specifically allow access to the users you want to have access to your files.

For example.
If you wanted to share a folder called Docs with a user named Bob. After sharing the folder Docs, right click on the folder and click the Security tab. This will display a list of users. So, if you want Bob to have access, you simply add the user Bob and create a password for them. Then specify their user properties in the Security tab.

This goes into more depth if you need it.

Hope this helps.

Duki 552 Nearly a Posting Virtuoso

Here's all of my code, to avoid further confusion. My apologies.

#pragma once
#include <iostream>
using namespace std ;

typedef char ItemType; 
struct NodeType
{
	ItemType info ;
	NodeType* next ;
};

class FullStack
// Exception class thrown by Push when stack is full.
{};

class EmptyStack
// Exception class thrown by Pop and Top when stack is emtpy.
{};

class StackType
{
public:
  StackType();		
  StackType(const StackType & copy) ;
  ~StackType();		
  void Push(ItemType);
  void Pop();
  ItemType Top();
  bool IsEmpty() const;
  bool IsFull() const;
  bool Identical(StackType stack) ;
private:
  NodeType* topPtr;
  int length ;
};



#include "StackType.h"

// Implementation file for linked StackType
void StackType::Push(ItemType newItem)
// Adds newItem to the top of the stack.
// Stack is bounded by size of memory.
// Pre:  Stack has been initialized.
// Post: If stack is full, FullStack exception is thrown;
//       else newItem is at the top of the stack.

{
  if (IsFull())
    throw FullStack();
  else
  {
    NodeType* location;
    location = new NodeType;
    location->info = newItem;
    location->next = topPtr;
    topPtr = location;
	length++ ;
  }
}
void StackType::Pop()
// Removes top item from Stack and returns it in item.
// Pre:  Stack has been initialized.
// Post: If stack is empty, EmptyStack exception is thrown;
//       else top element has been removed.
{
  if (IsEmpty())
    throw EmptyStack();
  else
  {  
    NodeType* tempPtr;
    tempPtr = topPtr;
    topPtr = topPtr->next;
    delete tempPtr;
	length++ ;
  }
}
ItemType StackType::Top()
// Returns a copy of the top item in the stack.
// Pre:  Stack has been …
Duki 552 Nearly a Posting Virtuoso

Oops. Here are my errors (same in both spots):

Error 1 error C2664: 'NodeType::NodeType(const NodeType &)' : cannot convert parameter 1 from 'ItemType' to 'const NodeType &' j:\Projects\ch5 identical linked stack\ch5 identical linked stack\StackType.cpp 66 ch5 identical linked stack

Duki 552 Nearly a Posting Virtuoso

Hey guys,
I'm getting an error at lines #9 and #14. Could someone tell me what I'm doing wrong?

StackType::StackType(const StackType & st)	// copy c-tor
{ 
	if ( st.topPtr == NULL )
		topPtr = NULL;
	else			    
	{	
		NodeType * stptr;	// pointer to source Stack
		NodeType * p;	// pointer to target Stack  
		topPtr = new NodeType(st.topPtr->info);    // first node
		stptr = st.topPtr->next;	// point to second Node
		p = topPtr;        // initialize pointer to Stack copy
		while ( stptr != NULL )   // deep copy other nodes
		{	
			p->next = new NodeType(stptr->info);
			p = p->next;	// update pointers
			stptr = stptr->next;
		} // endwhile
		p->next = NULL;
	} // endif
}
Duki 552 Nearly a Posting Virtuoso

Well, crap. Now I get this:

Item 1: a
Item 2: b
Item 3: c
Item 4: d
Item 5: e
Item 6: f


Copied item a into tmp
Copied item b into tmp
Copied item c into tmp
Copied item d into tmp
Copied item e into tmp


in loop
for loop

tmp dQ: a
tmp2 dQ: ═

Here is my updated copy c-tor:

QueType::QueType (QueType const& other)	//copy c-tor
{
	ItemType * tmp = new ItemType[other.size] ;
	size = other.size ;
	for (int i = (other.front + 1) ; i < other.rear ; i++)
	{
		tmp[i] = other.items[i] ;
		cout << "Copied item " << tmp[i] << " into tmp" << endl ;
	}

	items = tmp ;
	front = other.front ;
	rear = other.rear ;
	size = other.size ;
	maxQue = other.maxQue ;

	cout << items[size-1] << endl ;
	cout << tmp[size-1] << endl ;
}
Duki 552 Nearly a Posting Virtuoso

Ok here's my latest code (using the non-recursive version). And I'm stuck.

#pragma once

#include <iostream>
using namespace std;

class FullQueue
{};  

class EmptyQueue
{};  
typedef char ItemType;
class QueType
{
public: 
    QueType();
    // Class constructor.
    // Because there is a default constructor, the precondition 
    // that the queue has been initialized is omitted.
    QueType(int max);
    // Parameterized class constructor.
	QueType(const QueType& other);
	// Copy constructor.
    ~QueType();
    // Class destructor.
    void MakeEmpty();
    // Function: Initializes the queue to an empty state.
    // Post: Queue is empty.
    bool IsEmpty() const;
    // Function: Determines whether the queue is empty.
    // Post: Function value = (queue is empty)
    bool IsFull() const;
    // Function: Determines whether the queue is full.
    // Post: Function value = (queue is full)
    void Enqueue(ItemType newItem);
    // Function: Adds newItem to the rear of the queue.
    // Post: If (queue is full) FullQueue exception is thrown
    //       else newItem is at rear of queue.
    void Dequeue(ItemType& item);
    // Function: Removes front item from the queue and returns it in item.
    // Post: If (queue is empty) EmptyQueue exception is thrown
    //       and item is undefined
    //       else front element has been removed from queue and
    //       item is a copy of removed element.
	int GetLen() ;
private:
    int front;
    int rear;
	int size ;
    ItemType* items;
    int maxQue;
};


#include "QueType.h"

QueType::QueType(int max)
// Parameterized class constructor
// Post: maxQue, front, and rear have been initialized.
//       The array to hold the queue elements has been dynamically
// …
Duki 552 Nearly a Posting Virtuoso

I get the same error when I'm not using recursion. Here's my non-recursive version:

bool Identical(QueType que1, QueType que2)
{
	bool iden = true ;
	if (que1.GetLen() == que2.GetLen())
	{
		cout << "in loop" << endl ;
		ItemType tmp ;
		ItemType tmp2 ;
		for (int i = 0 ; i < que1.GetLen() ; i++)
		{
			cout << "for loop" << endl ;
			que1.Dequeue(tmp);
			que2.Dequeue(tmp2);
			if (tmp != tmp2)
				 iden = false ;
			que1.Enqueue(tmp) ;
			que2.Enqueue(tmp2) ;
		}
	}
	else
		iden = false ;

	return iden ;
}

It blows up right before the first Dequeue().
Am I still not doing something right in my copy-ctor?

Duki 552 Nearly a Posting Virtuoso

Ok, here's my code thus far:

// Test driver
#include "QueType.h"

bool Identical(QueType que1, QueType que2) ;
	// Function:  Determines if two queues are identical.
	// Pre:		que1 and que2 have been initialzed.
	// Post:	Queues are unchanged.
	//			Function value = (queue 1 and queue 2 are identical).

int main()
{
	QueType que ;
	ItemType a = 'a' ;
	ItemType b = 'b' ;
	ItemType c = 'c' ;
	ItemType d = 'd' ;
	ItemType e = 'e' ;
	ItemType f = 'f' ;

	que.Enqueue(a) ;
	que.Enqueue(b) ;
	que.Enqueue(c) ;
	que.Enqueue(d) ;
	que.Enqueue(e) ;
	que.Enqueue(f) ;

	for (int i = 1 ; i <= 6 ; i++)
	{
		ItemType tmp ;
		que.Dequeue(tmp) ;
		cout << "Item " << i << ":  " << tmp << endl ;
	}

	que.Enqueue(a) ;
	que.Enqueue(b) ;
	que.Enqueue(c) ;
	que.Enqueue(d) ;
	que.Enqueue(e) ;
	que.Enqueue(f) ;

	QueType queTwo ;

	queTwo.Enqueue(a) ;
	queTwo.Enqueue(b) ;
	queTwo.Enqueue(c) ;
	queTwo.Enqueue(d) ;
	queTwo.Enqueue(e) ;
	queTwo.Enqueue(f) ;

	bool iden ;
	iden = Identical(que, queTwo) ;

	if (iden)
		cout << "Identical!\n" ;
	else
		cout << "Not Identical!\n" ;


	return 0;
}

bool Identical(QueType que1, QueType que2)
{
	if (que1.IsEmpty() != true && que2.IsEmpty() != true)
	{
		cout << "in loop\n" ;
		ItemType tmp1 ;
		ItemType tmp2 ;
		que1.Dequeue(tmp1) ;
		que2.Dequeue(tmp2) ;
		cout << "Que 1, Item:  " << tmp1 << endl ;
		cout << "Que 2, Item:  " << tmp2 << endl ;

		if (tmp1 == tmp2)
			Identical(que1, que2) ;
		else
		{
			que1.Enqueue(tmp1) ;
			que2.Enqueue(tmp2) ;
			return false ;
		}

		que1.Enqueue(tmp1) …
Duki 552 Nearly a Posting Virtuoso

How about JAUS?
It's a standard for (wireless) network communication for robotics. Could implement this into a custom piece of software?

Duki 552 Nearly a Posting Virtuoso

have you tried

system("pause") ;

?

Duki 552 Nearly a Posting Virtuoso

Take a look at this.

That explains it better than I can.

Duki 552 Nearly a Posting Virtuoso

If you know c++, you know a lot of c#.

Rashakil Fol commented: can we say "non sequitor"? -2
Duki 552 Nearly a Posting Virtuoso

can you post your updated code so that I know we're on the same page?

Duki 552 Nearly a Posting Virtuoso

No problem :)
1) Make sure the while loop is around the entire program... ending right before return 0 ; This way you can do "Try again? (y/n): " and you can change the if statement to if (letter == 'n' || letter =='N') THEN done = true ;

So your while loop should still be while(!done). Does that make sense?

I'm doing hw of my own right now, so I'm still looking at the rest of your program as I get time. I'll post back in a few minutes. Until then, do some desk checking (essential to every program you ever write).. get out a piece of paper and write down step by step what happens.

Duki 552 Nearly a Posting Virtuoso

You could change your while condition to while(done) instead of while(!done)... however you then have the problem of when the user gets to the end of the program, it doesn't re-execute the instructions() function.

Why don't you try putting a while loop around the entire program, take out the option to end the program from the instructions() function, and add the option right before the loop ends. Something like this:

Mostly pseudo code:

while(not done)
{
switch instructions()
    case 1:  manual() ;
break ;
    case 2:  file() ;
break ;
.
.
.
hangman game
.
.
.
cout << "Try again? (y/n):  " << flush ;
cin >> ans ;
if (ans == 'y' || ans == 'Y')
   done= true ;
else
   done = false ;
}//end while
cout << "-- Program Complete  --" << endl ;
Duki 552 Nearly a Posting Virtuoso

\\mistake

Duki 552 Nearly a Posting Virtuoso

I see a couple of things right off, but I haven't had time to get through the whole program.

1) You're not exiting your while loop until they select Done. Your condition is while(!done).

2) Your manual program should return the string that is input, shouldn't it?

Duki 552 Nearly a Posting Virtuoso

What type of "really odd things"?

Duki 552 Nearly a Posting Virtuoso

I don't understand. How do I set data to tmp?

Duki 552 Nearly a Posting Virtuoso

Thanks guys.
I realize I could do without recursion, but it was (for once) the first solution that came to mind.. so I thought what the heck, lets try it.

I'll fix the errors you've noted, thanks!

I don't think I can use the default copy-ctor because once it leaves the function it will destruct my dynamic memory won't it? I've written my own, I don't have it with me but it's something similar to this:

QueType::QueType(QueType const& other)
{
     size = other.size ;
     ItemType * tmp = new ItemType[size] ;
     for (int i = 0 ; i < size ; i++)
           tmp[i] = other.items[i] ;
}

As far as the actual error, I can't remember it really, but I always get this error when trying to pass dynamic memory to a function.
I've read about functions like memcpy() or copy() (in <algorithm>), but I have no clue how to use these.

Thanks again for giving me a hand.

Duki 552 Nearly a Posting Virtuoso

Hey guys, I have a function that compares two dynamic arrays and returns true or false if they're identical.

bool Identical(QueType que1, QueType que2)
{
	if (que1.IsEmpty() != true && que2.IsEmpty() != true)
	{
		cout << "in loop\n" ;
		ItemType tmp1 ;
		ItemType tmp2 ;
		que1.Dequeue(tmp1) ;
		que2.Dequeue(tmp2) ;

		if (tmp1 == tmp2)
			Identical(que1, que2) ;
		else
			return false ;

		que1.Enqueue(tmp1) ;
		que2.Enqueue(tmp2) ;
	}
	return true ;
}

I keep getting a runtime error at the very end of this code. I know it's when the function exits because I've put cout << statements at the very end before it returns to main().

I assume this has something to do with the copying being shallow instead of deep, and it's trying to destruct already-destrcuted memory... but i'm not sure.

Please help!

Duki 552 Nearly a Posting Virtuoso

Thanks for your help! :)

Duki 552 Nearly a Posting Virtuoso

Here are my updated answers.... I'm still not sure I quite understand this.

a.	OK
b.	Invalid; *(ptr2->next) is not a valid type for listData->next
c.	Invalid; listData cannot be de-referenced to accept a value of type pointer
d.	Invalid; ptr2 cannot be assigned a non-pointer value type
e.	OK
f.	OK
Duki 552 Nearly a Posting Virtuoso

I don't think so? It's just a pointer to the first object in the linked list.

The objects contain a) data member (info) and b) address to next object (next).

I'm a little confused though, so I could be wrong?

Duki 552 Nearly a Posting Virtuoso

Ok, so for example ptr->next can't be assigned ptr2->info ?

How about c)... listData is the starting pointer in the linked list. There's nothing wrong with this statement is there?

Duki 552 Nearly a Posting Virtuoso

I have an assignment question that says "Decide whether the syntax of the following statements is valid or invalid."

These are the statements:

a)  listData->next = ptr1->next ;
b)  listData->next = *(ptr2->next) ;
c)  *listData = ptr2 ;
d)  ptr2 = ptr1->next->info ;
e)  ptr1->info = ptr2->info ;
f)  ptr2 = ptr2->next->next ;

where next is the address of the next object, and info is the data.

I see no syntax errors... what don't I understand? :(

Duki 552 Nearly a Posting Virtuoso

Awesome, thanks guys. This will definitely get me on my way! :)

Duki 552 Nearly a Posting Virtuoso

Hey guys,

I'm going to be starting a research project pertaining to JAUS. Basically, this is a standardized protocol to be used in autonomous robotics... someone will essentially connect to a robots IP and be able to transmit various commands over 802.11.

I not exactly sure where to start, so I'll just list the questions I have right now, and maybe someone can point me in the right direction.

- How can you communicate with a network card using c++?
- How can you interpret IP packets using c++?
- Are there SDK packages that might help me to do this?

Thanks for you help!

Duki 552 Nearly a Posting Virtuoso

Hey guys,

Does anyone know of a simple way to correct the geometry issue experienced with video cameras? i.e., the top of the screen is much wider (in distance) than say the middle. I need to correct this, so that I can plot pixels onto a 2D map.

Duki 552 Nearly a Posting Virtuoso

In one of my C# books, this is written:

"if you write this application in VB.NET or any other language compliant with the .NET CLS, you will have compiled it into more or less the same MSIL. By design, IL code created from different languages is virtually indistinguishable"

I was then asked this question: Why is there a difference between C# and VB in speed? I don't understand the above statement very well, but it seems to be saying that we end up with almost the same executable code.

I couldn't answer the question, so I thought I would ask you guys. Thanks!

Duki 552 Nearly a Posting Virtuoso

Cool. Any suggestions on a C# graphics book?

Duki 552 Nearly a Posting Virtuoso

Does anyone know of a compiler that will let you utilize WPF in Linux?