|
Is it a programming question or is he asking programming preference.
Brainware Error - reboot required.
|
|
|
|
|
Anonymous properties are a convenience. Don't abuse them - be consistent with your approach to them.
|
|
|
|
|
Hi! all. Right now m working on a win Email application.I need to create a user interface and so users can select the recipients from Exchange Server Address Book, so user can send e-mail with attachment to the recipients in web application. so, anybody have any idea about that.i need a sample so i can use it in my project.
thanks..
|
|
|
|
|
Hello,
is there a function in C# to convert hexadecimal to a 64Bit floating point number. Or do i have to find out manually the mantissa and the exponent.
(I'm also looking for function to convert a decimal into a hexadecimal.)
Thanks in advance, Felix.
|
|
|
|
|
There is no such thing as a conversion from decimal to hex. They are the same thing internally, what you want to do, is to display them in a different format. So, you need the ToString method, which has overloads that take format strings. I've never seen a hexadecimal floating point number used anywhere, but if it's already floating point, it's not hex in memory, it's just a number.
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 )
|
|
|
|
|
This is exactly was i was searching:
BitConverter.Int64BitsToDouble(doubleValueHere)
|
|
|
|
|
Christian Graus wrote: There is no such thing as a conversion from decimal to hex.
He didnt ask that.
|
|
|
|
|
I had the same problem, and I resolved it creating a C dll with 2 function:
//convert float TO buffer (4 Byte)
int _stdcall floatTOhex(float &value,char buffer[])
{
memcpy(buffer,&value,sizeof(float));
return 0;
}
//convert buffer (4 byte) to float
int _stdcall hexTOfloat(float &value,char buffer[])
{
memcpy(&value,buffer,sizeof(float));
return 0;
}
I Call in C# with PInvoke
[DllImport("float2hex.dll", EntryPoint="floatTOhex")]
public static extern int floatTOhex(ref float value,byte[] buffer);
[DllImport("float2hex.dll", EntryPoint="hexTOfloat")]
public static extern int hexTOfloat(ref float value,byte[] buffer);
example:
byte[] temp=new byte[4];
float f=0.10F;
floatTOhex(ref f,temp)); //load in buffer temp 4 HEX from float
hexTOfloat(ref f,temp); //load in f the buffer temp value;
I think you can adjust it for 64 bit float.
Look-out for little or big endian
|
|
|
|
|
kassio wrote: I had the same problem, and I resolved it creating a C dll with 2 function:
Why oh why? The BitConverter not entreprisy enough?
|
|
|
|
|
For a project I need to read XML files( which is send through a control system of a machine ) and store it in a data base, but I need to be able to read it as soon as it comes. Is it possible to be able to automatically refresh and check for any XML file that might have come and then read it. Any help or comment is welcome. Thanks ..
|
|
|
|
|
Take a look at the FileSystemWatcher class. Tell it the directory to watch and what to watch for and then upload the contents in response to it.
|
|
|
|
|
I want to delete a node of an XML file.
code:
XmlDocument xmlDoc = new XmlDocument();
string strXmlFile = Server.MapPath("ccc.xml");
doxml xmlTool = new doxml(strXmlFile1);//load xml
XmlNodeList xnl = xmlDoc.SelectSingleNode("bookstore").ChildNodes;
foreach (XmlNode xn in xnl)
{
XmlElement xe = (XmlElement)xn;
if (xe.GetAttribute("ISBN") == "2-3631-4")
{
xe.RemoveAll();
break;
}
}
xmlTool.Save();
XML:
<bookstore>
<book genre="fantasy" isbn="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price>
</book>
</bookstore>
but xnl(XmlNodeList xnl = xmlDoc.SelectSingleNode("bookstore").ChildNodes) is always NULL,I don't know what the problem is.
Please tell me,thank you.
|
|
|
|
|
Nash_exe wrote: xe.GetAttribute("ISBN") == "2-3631-4")
This is not a valid ISBN.
Nash_exe wrote: XmlNodeList xnl = xmlDoc.SelectSingleNode("bookstore").ChildNodes;
Not sure why you don't just do /bookstore/book, but the problem is that you don't have the leading slash, I believe. "/bookstore").ChildNodes ( while not sensible ) should work.
I am not sure if removeall is what you want, either. I suspect you want to store the nodes you want to remove, then call RemoveNode on the xmlDoc to remove them.
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 )
|
|
|
|
|
You're not loading the file into xmlDoc.
and try
xmlDoc.DocumentElement.ChildNodes
|
|
|
|
|
|
please read the guide on how to ask questions. 'Help' doesn't tell us anything, everyone wants help, that's why they post here.
Member 3633992 wrote: have to take user stroke as input and then calculate the slope of the user stroke and then on the basis of that slope determine which shape the user wants to draw with the help of nueral network and replace that shape with the shape in training data set as user cannt draw shape accurate with mouse
Wow - you're new to C# ? This sounds like the wrong project for you then.
Your code is an unreasonable mess. x, x1, xx, xxx, X, there is no way to know what all your variables mean. What is this code trying to do ? What does it do ? Where is it broken ?
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...
am working on a addin in that one part is to move mails from one folder to other folder both folders are subfolder of inbox...
so can anybody tell me now ... how to move mail from one folder to another is thereany existing function is there..
please help me here...
Thanks in advance...
vikas da
|
|
|
|
|
Hello,
I have a scenirio where i have to create an excel that can replicate my web application.
Let me explain the situation
THis is a survey application.We will be getting the questions from DB and display them one at a time to the user. The answering mode can be anything like single line, mutichoice etcc..(Text box, Check box ).
We dynamically create this in webpage.
Now i need to distribute this survey offline.ie each question should come as a seperate excel sheet and it should replicate exactly how it is shown in web page.
Any ideas ? kindly let me know
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
One option is to use VSTO (Visual Studio Tools for Office) and create an Excel Addin. Another option is to wrap Excel and use automation - either way, you've got some serious coding ahead of you.
|
|
|
|
|
Hi Pete,
Thanks for the reply. Let me do some reserch on that.
Have a nice day
Laddie
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
I just thought of one more option. I have already created the code to dynamically generate the web content which i am using in web apps. Is there a possibility that i can create a mht file and get it opened in Excel as different sheets?.
The excal can save multiple sheets as a single mht file. But how about the other way round ?
Any ideas..Kindly let me know.
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
hi
how can right click on a row og datagridview and select thats row?
|
|
|
|
|
|
Hey guys
how can i put the contents of a string variable into a crystal report? ive been trying it for hours and im going no were slowly
thanx
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|