|
Vega02 wrote: Shouldn't the hash codes be the same, since they represent the same underlying value?
No, the values are boxed in a type Object, and the hash code of the Object is not based on the boxed value.
The GetHashCode method of the Object type is not suitable for use as key in a hash table. From the documentation:
"the default implementation of this method must not be used as a unique object identifier for hashing purposes"
MSDN Library: Object.GetHashCode method[^]
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
|
hi
As you told that you use msaccess database then no requirement to include database seprately. to deploy your project do the following..
1. File -> New Project -> Choose Other Project -> then Setup project
2. In the application folder add all the files available into your bin folder including the database file also.
Yogesh Agarwal
|
|
|
|
|
Hello,
I'm trying to make connection between a C# client to a C++ server.
Since I'm new at C/S I just downloaded sample programs, and tested them.
I downloaded the C++ server (and client) from:
http://www.codeproject.com/KB/IP/client_server_socket.aspx
The communication succeeded.
I also downloaded C# C/S from:
http://www.codeproject.com/KB/IP/tcpclientserver.aspx
It also worked.
But when I tried to make a connection from the C# client to the C++ server it didn't work (later on I also tried other versions of servers and clients in both languages – none worked).
What I see is that the client succeeded to connect to the server, but it didn’t succeed to send anything to the server, and the server stayed blocked waiting for the client's message (I encountered a version in which the server did get a message, i.e. was released from the blocking condition, but the message was empty).
BTW, when I changed the code such that only the server sends a message to the client - everything worked.
I don't know what problem to look for, nor if there is any known problems in this scenario.
I will really appreciate any help or idea what to do.
Thanks,
Itzik
|
|
|
|
|
Probably you need to examine what the code does in both instances to make sure they are communicating on the same port, and expecting to send/recieve data in the same format.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Thanks for your reply.
I checked it over and over ):
The ports are OK (The server does get the connection from the client).
Regarding the formats: the server is not released from the blocking situation of waiting for data (receive). So, is it possible that C# sends different format for simple strings (UTF, or something else) than C++, and is this format change can cause that the 'receive' function stays blocked?
modified on Tuesday, March 4, 2008 11:56 AM
|
|
|
|
|
Hi,
I am using Crystal Report Designer in my C# project. and kindly let me know, how may I create PDF file on button press?
"Is there any ready made samples about my said subject?"
Thank you in advance
(Riaz)
|
|
|
|
|
Most PDF librarys probably come with a sample that does what you want. You can't create a PDF without a PDF library.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Adding to Christian's reply, you need to use a library that would enable you to create PDF files on the fly. You may try iTextSharp[^].
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
|
Hi there,
I have to get processes info for a system but I m having an Exception "Access is denied" in this code,
<br />
try<br />
{<br />
processes = Process.GetProcesses(mcName);<br />
int nThreadsCount = 0;<br />
foreach (Process p in processes)<br />
{<br />
<br />
string[] prcDetails = new string[]{p.ProcessName,<br />
p.Id.ToString(),<br />
p.StartTime.ToShortTimeString(),<br />
p.TotalProcessorTime.Duration().Hours.ToString()+":"+p.TotalProcessorTime.Duration().Minutes.ToString()+":"+p.TotalProcessorTime.Duration().Seconds.ToString(),<br />
p.Threads.Count.ToString(),<br />
p.HandleCount.ToString()};<br />
<br />
nThreadsCount += p.Threads.Count;<br />
<br />
}<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show(ex.Message); <br />
}
When I commented the statement
p.StartTime.ToShortTimeString(),
then next statement which is also getting-time-related property
p.TotalProcessorTime.Duration().Hours.ToString()
is also causing same exception.
Here is the Sysem Trace:
" at System.Diagnostics.ProcessManager.OpenProcess(Int32 processId, Int32 access, Boolean throwIfExited)\r\n at System.Diagnostics.Process.GetProcessHandle(Int32 access, Boolean throwIfExited)\r\n at System.Diagnostics.Process.GetProcessTimes()\r\n at System.Diagnostics.Process.get_StartTime()\r\n at CustomizedTaskManager.frmmain.LoadAllProcessesOnStartup() in E:\\MyProjects\\Programing\\C#\\Task Manager\\CustomizedTaskManager\\CustomizedTaskManager\\Form1.cs:line 100"
best regards,
|
|
|
|
|
What process are you trying to get to ? I guess access is denied.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi there,
Thanx for reply Graus.
This process is causing the exception.
Name: msdtc
MS DTCconsole program
ImagePath: C:\WINDOWS\system32\msdtc.exe
I m running this code in Vs 2005, While same code is running succesfully in VS 2003. I can't understand this weird behaviour.
Here is complete code of my method, u can test it on VS03.
public static void ListAllProcesses()<br />
{<br />
Process[] processes = null;<br />
string mcName = ".";<br />
try<br />
{<br />
processes = Process.GetProcesses(mcName); <br />
foreach (Process p in processes)<br />
{<br />
<br />
Console.Write("\nProcessName: " + p.ProcessName);<br />
Console.Write("\tID: " + p.Id.ToString());<br />
Console.Write("\tStartTime: " + p.StartTime.ToShortTimeString());<br />
Console.Write("\tCPUTime: " + p.TotalProcessorTime.Duration().Hours.ToString()+":"+p.TotalProcessorTime.Duration().Minutes.ToString()+":"+p.TotalProcessorTime.Duration().Seconds.ToString()); <br />
<br />
}<br />
}<br />
catch (Exception ex)<br />
{<br />
MessageBox.Show(ex.Message); <br />
}<br />
}
best regards,
Cyber Friend
|
|
|
|
|
|
Remote sensing image(b&W - captured by satellite), segmentation of the image is separeted by roads, trees, buildings, water levles done in C#.net or vb.net. Any possible ways to implement this.
|
|
|
|
|
Yes, I have no doubt.
There are tons of image processing books that cover image segmentation. What sort of answer were you hoping for ?
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi all,
Wanna create a new website with 3/n tier.I want to keep all the business logic and DAL in different projects, in the same solution.
Please tell me the most efficient way to do this
should I add a new windows project to solution and start coding at the same place or
create an individual project and after successfully building it add it to my solution
or any other efficient way is there other than these two. Please give me your suggestions.
With Thanks & Regards
Amit Sk Sharma
modified on Tuesday, March 4, 2008 12:52 AM
|
|
|
|
|
Wow. I'm not sure if you're serious. You can do whatever you like, although it stands to reason that the process with the least steps is to create the project within the existing solution, you'll lose valuable micro seconds if you do it the other way.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
That's the thing I wish to know; do this effects the functioning/ performance or it's just like to add a project having logic with it.
With Thanks & Regards
Amit Sk Sharma
|
|
|
|
|
Well, I'm not sure how you think it could affect anything. Code is code. The way it builds won't change by how it was added to a solution, in fact, the two methods you suggest, each create exactly the same thing, a project that gets built within the context of a solution.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hi,
First u select a Blank Solution From Visual Studio-> File -> New-> Project -> Other Project Types -> Visual Studio Solutions -> Blank Solution.
Then add projects or website as u wish to this blank solution..U can add n projetcs to ur solution..it deosnt matter at all..
if u need any further clarification, plz reply me
rgds
kannan ambadi
|
|
|
|
|
The only doubt remained is the projects to be added should be windows application or it can be something else (I wish to keep only class files in that project, which will be used for Data Access Layer and Business Logic Layer)
With Thanks & Regards
Amit Sk Sharma
|
|
|
|
|
You can use Class Library project.
|
|
|
|
|
As there is no interface needed for other two layers BLL and DAL so you should make them class libraries.
Create a new web application project and add your other two class libraries in the same solution. this will help u out when u start coding.
|
|
|
|
|
Hello Friends,
I am developing an barcode application and i am facing a problem that i am unable to arrange multiple prints on a single page it only print one barcode on one page another barcode on another page. So how can i arrange multiple barcode print on single page.
|
|
|
|