|
Hi manoj,
Thanks 4 ur reply.
But still i m getting an error message i.e. "could not find the path"
can u tell me in some more detail way..like complete path for the file..or any live example...
Devesh Mishra
|
|
|
|
|
thanks...i got it man..
Devesh Mishra
|
|
|
|
|
Dear All,
I need to convert a .txt file into a .csv file. How can I do this? Please help me.
Thanx
|
|
|
|
|
That will depend on what is inside the .txt file. A txt file can contain anything whereas .csv file contains some kind of delimited data.
But you could try to read the txt file using a StringReader and convert the data into csv as per your requirements and the save this to csv using StringWriter.
|
|
|
|
|
Mr Perfect wrote: I need to convert a .txt file into a .csv file. How can I do this?
Change the file extension?
Seriously - What format is the TXT file in?
|
|
|
|
|
It contains some data seperated by delimiter.
|
|
|
|
|
Mr Perfect wrote: It contains some data seperated by delimiter.
That's a bit of a vague file format specification there.
We are trying to be helpful, but you need to help us to help you. You need to give us the information about your problem so we can help you find a solution.
What sort of delimiter? What will constitute one line in the resulting CSV file? Do you really just want to replace one delimiter for another?
|
|
|
|
|
Delimiter may be a comma or semicolon or tab
|
|
|
|
|
Read the entire file into a string. Use Replace to replace one delimiter with another. Save the new string to disk.
|
|
|
|
|
there is next code:
<br />
int a;<br />
int b;<br />
<br />
a = 5;<br />
<br />
b = ++a + ++a;
Try it compile and run in various languages: C++ and C# and Java.
I had got different results even in the same compiler (Watcom C++) -- with and without optimisation.
A
|
|
|
|
|
++a is the prefix incrementor
a++ is the postfix incrementor
if a = 5 then ++a returns 6 and a becomes 6
if a = 5 then a++ returns 5 and a becomes 6
therefore
b = ++a + ++a
= 6 + 7
= 13
|
|
|
|
|
You are correct and this is what i got with c# as well, but c++ gave me 14.
|
|
|
|
|
I have read this statement in a book.
"The results of expressions which use same variables with increment operators more than once are unpredicatble in C Language"
int i=0;
i=i++ + ++i; //3 not 2
-----------------
int i=0,j=0;
j=i++ + ++i; //2 as esxpected
You can try with lot of examples...
Regards,
Arun Kumar.A
|
|
|
|
|
It would indeed seem that way. If I do the following in c++ I do get the expected result
int a;
int b;
a = 5;
b = ++a;
b += ++a;
|
|
|
|
|
Try to use the variable 'a' more than once(with increment/decrement operator) in a single expression and assign the result to 'a' itself.
You will get unexpected results.
Regards,
Arun Kumar.A
|
|
|
|
|
However. It's strange, C++ gives 14 at the same time C# gives 13.
The different interpretation of statements?
A
|
|
|
|
|
In C++ this expression results in undefined behavior. Look
here[^] for details.
Regards,
Tim
|
|
|
|
|
I tried the following code to check "Allow Interact with desktop" of the Log on Property of my service using the following code but it is not working, but that option is checked. If I Uncheck and check it manually it is interacting with the desktop. Why????????
I tried this code in ServiceInstaller_AfterInstall,ServiceInstaller_BeforeInstall,OnStart()of the service and Service Class Constructor
--CODE--
Microsoft.Win32.RegistryKey ckey =
Microsoft.Win32.Registry.LocalMachine.OpenSubKey(@"SYSTEM\CurrentControlSet\Services\Sample_Service", true);
if (ckey != null)
{
if (ckey.GetValue("Type") != null)
{
ckey.SetValue("Type", ((int)ckey.GetValue("Type") | 256));
}
}
--CODE--
Please Help Me
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
How can i send sms from my application to any mobile device.
How to achieve this???
reply soon
Regards,
|
|
|
|
|
Hi,
try the article search for "sms", there are lots of articles on cp about this topic.
|
|
|
|
|
Hi,
You need to use a Mobile Phone manufacrture's library. Using that you can send sms to from your application. These libraries have very simple interface.
There are two way to send the sms using these libraries.
1) Using a mobile handset
2) Using a getway.
One such library I do remeber is from Nokia.
Manoj
Never Gives up
|
|
|
|
|
Hi,
Can anyone have idea about how can i get a sub(small) dataTable from a huge dataTable?
datatable.select() returns only datarows that is time consuming in case of huge database. I want a fast method.......
Thanks
Syed Shahid Hussain
|
|
|
|
|
I don't know if this is the best way but I usually go back to the database to return any 'sub' data. For me this has always been the fastest method and would do this unless I need to limit network traffic for some reason.
|
|
|
|
|
Query in 30,000 for 10 times in 1 min is simply killing the aplication....
I want any System mechanism to solve my problem.
Syed Shahid Hussain
|
|
|
|
|
make a view of your table
use dataview class
to do that
|
|
|
|