|
Somehow .Net 2003 wants to rebuild my solution even on a simple 'build' command. This has never happened before, and I really don't know what to do.
Could someone please helpe me?
AmmA
|
|
|
|
|
|
That worked! thank you very much
|
|
|
|
|
Hail everyone,
I started a new project recently and now, in a design stage, I've got some points where I'd like to have as many opinions as possible.
First of all, the data handling. Let's say I have tons of small object which are referenced by some other object and those are referenced by others. We can see it as a forest with trees and leaves on those trees. So, it's logical to make an array of leaves, trees and forests(cuz I will have more than one forest). But on leaves I might have insects and those insects will be created by other coders. So I need another array of some general insect objects on each leaf. Those insects can be very different, but they should have the only one in common, they should have a possibility to be on a very sectain leaf in my forest. Looks like pretty trivial, though I expressed it in a bizarre form. But there are some disputable points. As such, where to store insect objects, inside an array on the leaf or inside some other global array? Logicaly an insect object must be inside the leaf object (cuz an insect can't be on more than one leaf in a time, so it's not wise to use any kind of refereces), but in the same time we don't know what kind of insect we have, so we can make an array of a generalized insect object and use conversion, but what will happen to data of derived class then? Another question is how to make a copy of a tree, and make it fast, if we want to modify it without modifying an original instance of the forest? Or maybe this idea about arrays is wrong in general and there some better ways to do that?
Sorry for such a long post.
I will be happy with any kind of remarks and ideas.
Small remark though. I will have LOTS of leaves cuz number of trees in one forest can be about 500k. And another things, I am not allowed to use any kind of language extensions but STL.
Thanks in advance.
|
|
|
|
|
ummmmmm i dont think the technicalities of the storage mechanism is where u want to be looking here ... how its stored is not that important
why dont u make some classes for each of the main components in ur design, ie:
forest
tree
leaf
etc
then worry about the internal storage of each class as u get there
personally i would use cobjlist's or some such but ur requirements may be diff
"there is no spoon" biz stuff about me
|
|
|
|
|
Doea CPU ID is something unique for each computer/processor? I need something unique in hardware that does not change with changing OS and unique for EACH machine?
Mazy
No sig. available now.
|
|
|
|
|
CPU ID is not universally available, some manufacturers disable the instruction.
What I've done is a compound key comprised of a variety of hardware ID's/serial numbers, but even that can't be guaranteed unique, you'd be surprised at the major HW vendors that put out motherboards and such with the same serial numbers in all their machines.
MAC address is good, but it all depends on your target audience. A lot of cards can have their MAC addresses changed by someone with the manufacturer's utilities, so if you're dealing with someone savy.
This is a thorny problem...
|
|
|
|
|
Thanks for your reply.
Mark Tutt wrote:
CPU ID is not universally available, some manufacturers disable the instruction
Well,I don't need 100%,Could we said it is unique in Intel and AMD cpu's?
Mazy
No sig. available now.
|
|
|
|
|
It is, but by not universally available I meant that on some machines you cannot access the CPU ID.
For example, on about 50% of the major manufacturers machines we tested while developing our licensing code, the CPU ID instruction is disabled (I believe by the bios), i.e. you get a null response to the query.
If you can get it returned, it is supposed to be unique. But because of the inconsistency of it being available, we couldn't use it.
|
|
|
|
|
hmmmm,thanks for your help.
Mazy
No sig. available now.
|
|
|
|
|
In other word,I mean is that available in these CPU's(AMD,Intel)?
Mazy
No sig. available now.
|
|
|
|
|
Well, my app is using CStringArray and CUIntArray, and I would like to know how to sort them, I mean, if I insert into my collection lots of times (example: "12:15", "18:25"...) I would like to know how to sort them ascendent or descendent. Same with CUIntArray.
Please help, I think this is interesting...
Thank you !!
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
if ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
good one ,not the question but the Signature...take care...
utkarsh sharma
"Not everything that counts can be counted, and not everything that can be counted counts."
|
|
|
|
|
Yes, I'm from spain and my english is not very good. Well, do you know how to do it ?? I would like to have some kind of object/function/class that would be able to sort a collection or something like that.
Thanks in advance.
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
if ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
/*Assuming we have a CStringArray strItems,
then this code sorts it using a very simple
bubble sort .There are many different
sorting algorithms which you could use
*/
for (int nOuter = 0; nOuter < strItems.GetSize() - 1; nOuter++)
{
for (int nInner = strItems.GetSize() - 1; nInner > nOuter; --nInner)
{
if (strItems[nInner - 1] > strItems[nInner])
{
CString strTemp = strItems[nInner];
strItems[nInner] = strItems[nInner - 1];
strItems[nInner - 1] = strTemp;
}//end of if
}//end of inner for
}// end of outer for
-----
and previous mail was not a fun of any body's english but I feel u'r signature is ossum..
utkarsh sharma
"Not everything that counts can be counted, and not everything that can be counted counts."
|
|
|
|
|
Well, i'm going to test it, thank you very much... altough I don't underestand that code completely because I don't think it will sort them alphabetical, but if you say so, I believe you.
PD: I know my english is not very good, and I'm sorry about that. Thank you for your effort.
Thank you so much !!!
Written by: Rafael Fernández López.
void life ( bool me, bool her )
{
if ( her )
{
me = true ;
}
else
{
me = false ;
} }
|
|
|
|
|
hi honey..
You can use the sample code sort a CStringArray object.
The main() function constructs a CStringArray object,
adds elements to it, prints out the elements,
calls the sort() member function to sort it, and then prints the sorted elements.
The sort() function uses the Bubble Sort algorithm to sort the array and calls the CompareAndSwap()
function to compare each string and swap them if necessary.
//Sample Code
/*
* Compile options needed: /MT
*/
class CSortStringArray : public CStringArray {
public:
void Sort();
private:
BOOL CompareAndSwap(int pos);
};
void CSortStringArray::Sort()
{
BOOL bNotDone = TRUE;
while (bNotDone)
{
bNotDone = FALSE;
for(int pos = 0;pos < GetUpperBound();pos++)
bNotDone |= CompareAndSwap(pos);
}
}
BOOL CSortStringArray::CompareAndSwap(int pos)
{
CString temp;
int posFirst = pos;
int posNext = pos + 1;
if (GetAt(posFirst).CompareNoCase(GetAt(posNext)) > 0)
{
temp = GetAt(posFirst);
SetAt(posFirst, GetAt(posNext));
SetAt(posNext, temp);
return TRUE;
}
return FALSE;
}
void main()
{
CSortStringArray sortArray;
sortArray.Add(CString("Zebra"));
sortArray.Add(CString("Bat"));
sortArray.Add(CString("Apple"));
sortArray.Add(CString("Mango"));
for (int i = 0; i <= sortArray.GetUpperBound(); i++)
cout << sortArray[i] << endl;
sortArray.Sort();
cout << endl;
for (int j = 0; j <= sortArray.GetUpperBound(); j++)
cout << sortArray[j] << endl;
}
take care...
utkarsh sharma
"Not everything that counts can be counted, and not everything that can be counted counts."
|
|
|
|
|
hi honey..
You can use the sample code sort a CStringArray object.
The main() function constructs a CStringArray object,
adds elements to it, prints out the elements,
calls the sort() member function to sort it, and then prints the sorted elements.
The sort() function uses the Bubble Sort algorithm to sort the array and calls the CompareAndSwap()
function to compare each string and swap them if necessary.
//Sample Code
/*
* Compile options needed: /MT
*/
class CSortStringArray : public CStringArray {
public:
void Sort();
private:
BOOL CompareAndSwap(int pos);
};
void CSortStringArray::Sort()
{
BOOL bNotDone = TRUE;
while (bNotDone)
{
bNotDone = FALSE;
for(int pos = 0;pos < GetUpperBound();pos++)
bNotDone |= CompareAndSwap(pos);
}
}
BOOL CSortStringArray::CompareAndSwap(int pos)
{
CString temp;
int posFirst = pos;
int posNext = pos + 1;
if (GetAt(posFirst).CompareNoCase(GetAt(posNext)) > 0)
{
temp = GetAt(posFirst);
SetAt(posFirst, GetAt(posNext));
SetAt(posNext, temp);
return TRUE;
}
return FALSE;
}
void main()
{
CSortStringArray sortArray;
sortArray.Add(CString("Zebra"));
sortArray.Add(CString("Bat"));
sortArray.Add(CString("Apple"));
sortArray.Add(CString("Mango"));
for (int i = 0; i <= sortArray.GetUpperBound(); i++)
cout << sortArray[i] << endl;
sortArray.Sort();
cout << endl;
for (int j = 0; j <= sortArray.GetUpperBound(); j++)
cout << sortArray[j] << endl;
}
take care...
utkarsh sharma
"Not everything that counts can be counted, and not everything that can be counted counts."
|
|
|
|
|
Hello,
I am in the process of making a remote controll like application. What I mean by "remote control", is the client program will send a command to the server (EX.run_program). Then the server program will recieve that command, and know how to handle it. Anyways, I want to know how I can do this. Any help will be appriciated!
|
|
|
|
|
simple http stuff will do for this if u have the correct way of running .exes on the server
"there is no spoon" biz stuff about me
|
|
|
|
|
Does DLL related to PCI driver? what is the connection between this things?
|
|
|
|
|
For some types of hardware, the manufacturer will include a DLL that applications use to communicate with the device driver.
For example, suppose you have an image capture board that accepts data from a digital camera. The manufacturer would give you a DLL that contained functions for controlling the camera and capturing images, since these functions are not covered by the normal Windows API. Your applications calls functions in the DLL, which in turn communicates with the device driver.
Software Zen: delete this;
|
|
|
|
|
hi..i 'm develop a driver for PCI expansion slot using C++. i have to access the PCI installation and detection as manually by using C++.can someone give me some idea in order to make a move ?pls help me coz i really need some help..tq (
|
|
|
|
|
i think you can use WMI for that..
see: msdn help on wmi for examples
|
|
|
|
|
During the time i compile my VC6.0 project in VC7.0
I get these error during linking process.
TestMC error LNK2001: unresolved external symbol "void __cdecl std::_Xlen(void)" (?_Xlen@std@@YAXXZ)
TestMC error LNK2001: unresolved external symbol "void __cdecl std::_Xran
What are the needed header files or static libraries?
thanks
|
|
|
|