|
Message Closed
modified 23-Nov-14 7:22am.
|
|
|
|
|
The code is in C++.
And in C# project he is using C++ DLL.
Can u give the code which is in C#?
|
|
|
|
|
I wish to know is there a way that I can send any clase that uses the System.IO.Stream base to a function.
public void Display(System.IO.Stream _data)
{...}
System.IO.FileStream _file=System.IO.File.Open(_FileName.ToString(), System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.ReadWrite, System.IO.FileShare.ReadWrite);
Display(_file); <- works fine,
System.IO.StreamWriter writer = new System.IO.StreamWriter("Filepath.txt");
Display(writer); <- No GO.
woops!! yes its true it works for FileStream its StreamReader inwhich doesnt.
modified on Tuesday, November 3, 2009 1:50 PM
|
|
|
|
|
You cant, at first you can use the StreamReader(Stream) constructor, Pass your FileStream instance to convert FileStream to StreamReader.
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
I have found some libs that can do this. Libs like ICSharpCode.SharpZipLib.BZip2.BZip2.Decompress(stream in,stream out);
I want to know how can they do this? I tried several ways but all with failure.
|
|
|
|
|
Need to do some more RnD regarding this...
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Makes no sense to me, FileStream derives from Stream
|
|
|
|
|
it works fine for me, as it should.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
|
Hello guys,
I know this isn't the WCF Message board but the problem isn't directly with WCF. Now my problem is that at work in our application we have a main client that access certain information from a WCF that than that access the database. And the other business objects are stored in seperate dlls. Now an instance of the WCf service that we are using is being called from the mdi client. now the problem is that i want to access that instance of the service from one of my business objects without having to create a web reference to the service in that dll. Hope i explained my self well and you can understand me sorry if i didn't Any help would creatly be appreciated.
Thank you
Regards,
Christian Pace
|
|
|
|
|
If you are asking if you can have application A call application X (WCF server) without using WCF or even sockets then no.
If you are asking if you can use functionality from X in A directly then that depends on the functionality.
|
|
|
|
|
A c# application (Visual Studio 2005) creates a SQL EXPRESS database file (.mdf)
How can I convert it in a text file (csv or other)?
thanks
Mauro Savoiardo
|
|
|
|
|
loop through database and and when you get each item, save it to a file.
What kind of file is this .mdf? (I Know that .mdf and .mds are used by Alcohol when creating images from CD/DVD)
|
|
|
|
|
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
c# Visual Studio 2005 generates a database file .mdf
thanks for suggestion
Mauro Savoiardo
|
|
|
|
|
Why you bother to convert SQL server mdf file you can't. you can export the data in a CSV files. You just need to fill a dataset and export, that's it.
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
I works in Visual Studio 2005 enviroment ... how can export data in CSV file?
thanks
Mauro Savoiardo
|
|
|
|
|
Try this
Exporting Data into Excel in Multiple Worksheets
Thanks
Md. Marufuzzaman
Don't forget to click [Vote] / [Good Answer] on the post(s) that helped you.
I will not say I have failed 1000 times; I will say that I have discovered 1000 ways that can cause failure – Thomas Edison.
|
|
|
|
|
Use SQL Server Management Studio to access the database and export the tables to whatever format you want; including scripts, text, Excel, MS Access, etc.
|
|
|
|
|
I have created a report using excel but when i open it its centered on the last cell it wrote to. How can i save it to open on a specific cell ??
Thanks in advance
|
|
|
|
|
DinoRondelly wrote: How can i save it to open on a specific cell ??
Excel always retains the cursor position in its worksheets. I guess all you need to do is select the cell you want it to focus on before closing the file.
|
|
|
|
|
I try to send (ALT+B) to serial port to send the BREAK signal.
But i can't do it success.
Have anyone can help me how to send the BREAK signal to serial port (RS232) ?
thx
|
|
|
|
|
Horribly complex: Break[^]
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Forgive me if my question is unclear, I'll do my best to clarify it as best as I can.
What I'm trying to do is "Tokenize" nested formula's by using RegEx.
Consider the following formula in LaTeX:
LaTeX Example 1: text before \frac{ \frac{ SubPart 1 }{ SubPart 2 } }{ Part 2 } text after What I need is a RegEx that can tokenize this LaTeX formula to output the following tokenlist:
Token[0] = text before
Token[1] = \frac{ \frac{ SubPart 1 }{ SubPart 2 } }{ Part 2 }
Token[2] = text after
Looking at Token[1], it has a nested fracture (\frac{...}) in its top-part.
That's the way I need it to be to build an object tree.
In a sense, the fracture in the top-part is a child to it's parent fracture.
Consider the following formula in LaTeX:
LaTeX Example 2: text before \frac{ \left ( SubPart 1 + SubPart 2 \ right ) }{ Part 2 } text after This should result in the following tokenlist:
Token[0] = text before
Token[1] = \frac{ \left ( SubPart 1 + SubPart 2 \ right ) }{ Part 2 }
Token[2] = text after
Again, looking at Token[1], it has a nested subformula in it.
In this case, the subformula is a child, associated to the toppart of the fracture, to the fracture object.
Final example (and then I assume you catch my drift):
text before \left ( \frac{ SubPart 1 }{ SubPart 2 } \ right ) + X text after This should result in the following tokenlist:
Token[0] = text before
Token[1] = \left ( \frac{ SubPart 1 }{ SubPart 2 } \ right )
Token[2] = + X text after
The nested-/sub-formulas will be processed when the parent formula is being constructed, so we need not worry about that part of it here.
What I need, is a RegEx that can handle formula dimensions to the nth degree.
Right now I do this by stepping through the string and seeing if I have a match in the sub-string for a particular item.
When found, I add 1 to a level counter and run an internal loop to find the final closing "}" that brings the level back to 0;
This works fine, but I've been commented upon by using this method and not using tokens, begotten with the use of RegEx.
If anyone has a suggestion of how I should construct my regex, then please let me know.
I've gotten as far as:
Fracture : (\\frac{[\W].*?((}\s)|(}$)))*
Subformula : (\\left \([\W].*?\\right \))*
But as you would guess, this fails miserably when having to deal with nested or multidimensional formulas.
Any help and/or insight on the matter would be greatly appreciated.
modified on Tuesday, November 3, 2009 10:28 AM
|
|
|
|
|
For what purpose? Do your have example input and output?
|
|
|
|