|
The primary advantages of XML are:
* human-readable and editable
* can be transformed into different formats using XSLT
* can be queried using XPath expressions
* well defined programmer APIs for editing existing data
* .NET supports serializing objects to XML (and vice versa)
my blog
|
|
|
|
|
The primary disadvantages of XML are:
- big files (because of verbosity)
- appending is slow
Just for record. There are lots of articles on the web discussing topics where to use XML and where XML is not suitable for some reason.
David
Never forget: "Stay kul and happy" (I.A.)
David's thoughts / dnhsoftware.org / MyHTMLTidy
|
|
|
|
|
Happy Friday! Gurus,
I am trying to use the logics from Intel OpenCV DLLs, which were originally compiled by MSVC++ 6. From C# or ASP.NET Apps, when I was trying to add reference to these DLLs (i.e. cv096.dll or cxcore096.dll), I got this error:
“A reference to ‘D:\Programs\OpenCV\bin\cv096.dll’ could not be added. This is not a valid assembly or COM component. Only assemblies with extension ‘dll’ and COM components can be referenced. Please make sure it is a valid assembly or COM component.”
Note: The source code of Intel OpenCV DLLs is open source. I can open this source code project in either MSVC++ 6 or VS.NET 2003.
Question: How can I use these DLLs in .NET environment, preferably in ASP.NET and C# projects?
Thanks with a million
Khang
|
|
|
|
|
|
David, Thanks for replying that quick. I appreciate your tip so much. Have a great day.
Khang
|
|
|
|
|
And i dont mean how do i read/write to the registry, i mean where do i put keys and values?
this is so that when my app ouputs a file, the user doesn't need to do file-open with, and its already done.
|
|
|
|
|
Opoen regedit and start poking around in HKEY_CLASSES_ROOT. For example, if you're used to doubling clicking a .LOG file and having it open in Notepad, scroll down until you find a key called .log and click on it. You'll find something under the default value (right-side of regedit), usually its txtfile .
Now continue to scroll down the HKEY_CLASSES_ROOT keys until you find txtfile . You'll find a bunch of stuff under that key. You're probably looking for something like this.
You'll have to duplicate both keys for your application, depending on what you want to support in your app. If you're familiar with command line arguments work, it'll be obvious what's going on in these keys.
Now all you have to do is add command line argument support to your application and you'll be all set.
[EDIT]
Oh yeah! If you screw up your registry, it's not my fault! My hand wasn't on the mouse when it happened.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
that's too simple in c#
Microsoft.Win32.RegistryKey reg= Microsoft.Win32.Registry.ClassesRoot;
if(reg.OpenSubKey(".myE")!=null)
{
reg=reg.CreateSubKey(".myE");//your application extension key
reg.SetValue("","MyApp");//reference to the key contains shell commands for your extension
reg= Microsoft.Win32.Registry.ClassesRoot;
reg=reg.CreateSubKey("MyApp");//the key contains commands windows will use when find your extension
reg=reg.CreateSubKey("Shell");
reg=reg.CreateSubKey("Open"); //open commond
reg=reg.CreateSubKey("Command");
reg.SetValue("","c:\\windows\\notepad.exe");//the path of your application which will open the files with your extension
}
}//already exists
marcoryos
|
|
|
|
|
I never said I would write it for him. I just pointed out how to figure out what's involved in getting it to work. It's up to him to write the Registry modification code.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I am trying to read data from an Excel spreadsheet which contains data with which I want to perform string manipulation and then save to SQL srvr.. any advice and help will be greatly appreciated.
all the data in the spreadsheet are of a string data type..
Thanks
Afzal Hassen
|
|
|
|
|
Hi,
if u want to retrieve data using OLEDB Object than this link will help u.
http://support.microsoft.com/default.aspx?scid=kb;en-us;316831[^]
else
u if u want to read data cell wise u can use...........
Dim exlApp As New Excel.Application()<br />
Dim exlBook As Excel.Workbook = exlApp.Workbooks.Open(tbFileName.Text.Trim)<br />
Dim exlSheet As Excel.Worksheet = exlBook.Worksheets.Item(tbWorkBook.Text.Trim)<br />
<br />
for intCounter = 1 to TotalRows<br />
<br />
strFirstColValue= exlSheet.Cells.Range("A1" & intCounter).Value<br />
'after reading values u can insert these into Datatable using New dataRow....\<br />
next
I hope this will help u................:->
Regards,
Ritesh
|
|
|
|
|
|
Hi all
Has anyone done any development of desktop sharing across networks /internet?
I would be very interested in any who has or has the skill to write such a product!! (and I know all the others that are free like VNC - but they are no good for this)
Serious Very Experienced Developer needed for this one. And I am willing to pay a reasonable amount for this.
If you think you are the person and very able to do this email me at
ian"at"ianhutty.karoo.co.uk with a rough price.
Basically look at Gotoassit.com or Webex.com (smart-tech by webex) and you will know what I am aiming for.
Regards
IH
IH
|
|
|
|
|
You're mistaking us for Rent-A-Coder. Try there...http://www.rentacoder.com[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
I have three forms. Form1 have i datagrid1 and Form2 have datagrid. First data come from form3 to Form2 datagrid and then a button click data transfer to form1 datagrid. here i add some more row and then i click on save button grid data save in to db.
I work i have do in code base not designer mode. I hope you understand me points.
Please help me as soon as possible.
|
|
|
|
|
Hi,
When you add a Crystal report file into the project you can create an object like CrystalReport1 report = new CrystalReport1();
then you can bind this object to the viewer. (push method)
You can also open a .rpt file and bind this to the viewer. (pull method)
My question is: can you create an object like method 1 with an .rpt file?
I want to read out which data is needed and then perform the query manually via code, not via the Crystal Report. (the problem is that the data has to be sent through port 80.)
So the customer can create an rpt file and we want to analyze it and do our stuff before passing it to (another) client.
I've tried the Load button, but this one doesn't seem to have correct intellisense. (always says, no overloaded method of Load takes n parameters.)
Hope somebody can help me.
No hurries, no worries.
|
|
|
|
|
Hello folks
I am in the process of improving the stability and usability of a program I wrote (which uses plugins).
Currently, I simply load every DLL in a certain directory, assuming that noone would ever put a DLL in there which did NOT implement my interface.
I have read some articles on CP, all dealing with PlugIns - and every single article I read does it the same way, also assuming that every file is a valid plugin.
Can someone help me out here?
I have this feeling that I am definitely missing something very basic and that I will slam my head against a wall as soon as someone replies here...
Cheers
Sid
|
|
|
|
|
Hi Sid!
There's no way to decide whether an assembly contains a type that implements your interface without loading the assembly.
You have to load the assembly to get access to the types defined in the assembly and when none of the types implements your interface then you have found out that this dll isn't a valid plugin.
In order to be able to unload the assembly you must load your assemblies into a separate AppDomain , but that's shown in the existing articles I guess...
Regards,
mav
|
|
|
|
|
Hey!
If i Create a MemoryStrem, and write data to this stream at the folowing way
<br />
StreamWriter sw = new StreamWriter(StrmStore.getUnitStream);
sw.Write(data);
And then i want to read the data in the stream from another part of the program that have access to this MemoryStream
<br />
char[] buffer = new char[memoryStream.Length];<br />
sr.Read(buffer, 0, (int)memoryStream.Length);<br />
<br />
string test = new string(buffer);<br />
The problem is that the position where the streamreader will read is set to the last element in the stream(probly by the stream writer that writed the data), and when the stream reader is reading it is not removing the readed elements?
What am i doing wrong? Maby i shold solve this problem another way?
BestRegards
Jimmy
|
|
|
|
|
A MemoryStream is basically an array of bytes that's growing dynamically when data is written into the MemoryStream.
Like every Stream , MemoryStream also has a Position property that is marking the position where the next read or write will occur.
So if you want to read from the beginning, you'll have to set memoryStream.Position to 0.
Just reading from the MemoryStream doesn't remove the bytes read, so if you want this behaviour you should look for a FIFO stream implementation.
I think Ianier Munoz has such a class in his
A low-level audio player in C#[^].
Regards,
mav
|
|
|
|
|
Thanks!
Say that im about to read the stream, and i sets the position to 0. Then my writer whant to write to the stream in anohter part of the program, then it will write the new data on position 0, this would make alot of problem i think?
The ultimate solution would be a stream where i write data last in the array, and when reading i read from the beginning, and every readed byte will be removed from the array.
Is a stream like this cald a FIFO stream?
BestRegards
Jimmy
|
|
|
|
|
FIFO first in first out
(http://www.codeproject.com/cs/media/cswavrec.asp)
|
|
|
|
|
Hi
i needed to import a picture in a word document
problem is not to import the picture but get the picture at the end of
the document
Can someone help me please
thanks
|
|
|
|
|
hi all
i am having a problem. I have a tree view having some nodes. the same nodes are also present in the rtb(rich text box). what i want to do is that when i click on a perticular node, that node in the rtb should be highlighted. also reverse.
can anyone help me in this regards?
|
|
|
|
|
Nodes are present in the Richtextbox? What does that mean? Do you have the text of all the nodes in the textbox? If so, you can just subscribe to the Clicked event on the Tree, get the selected node and find the text of the node in the textbox..
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|