|
I know how to do this in C++, but a bit rusty on C,
char line[1024]="d(Text1)b(ID1)n(node1)d(Text2)b(ID2)n(node2)d(Text3)b(ID3)n(node3)...
I would like to parse the line above into item0 = d(Text1)b(ID1)n(node1), item2 - d(Text2)b(ID2)n(node2)... and so forth
char *py;
char *px = line;
while ((py=strstr(px,"d(")) != NULL) {
// if ((px=strstr(py,")")) == NULL)
// printf("error1");
px++;
}
return 0;
Thanks
|
|
|
|
|
Because you posted this in the C# forum I assume you mean you want a solution in C#, so I recommend using a Regular Expression.
Something like this might be a good start: d\([^)]*\)b\([^)]*\)n\([^)]*\)
If not, there is a Regular Expressions forum.
|
|
|
|
|
Sorry, I meant to post it on the C/C++ forum, will post it there.
Thanks
|
|
|
|
|
There is only a pound of difference between C and C #
No comment
|
|
|
|
|
That's quite a sharp comment, although if you were British you might have made a hash of it.
|
|
|
|
|
Hello,
i have an application written in C# with VS 2010 Prof and i am using SQL Server Express 2008.
It is a client Server app but the Server (SQL-Server) coud run on a client.
What is the best way to make an installation file which installs my app as a Server.
That means i have to make a installation file which installs my app and sql-server Express 2008 and i need another installation which installs only the client.
Or it is possible to make one installation file which asks to install the sql-server ?
thanks so far
jogi
|
|
|
|
|
You should not include SQL Server in your installation. There are a couple of reasons:
0) You can only distribute SQL Server Express for copyright reasons - not SQL Server full version.
1) They may already have SQL Server installed on the network. If so, then they will presumably want to use that version.
2) If they do have SQL server installed and you start proliferating SQL server Express instances, you are going to annoy the heck out of the database administrator...
3) A single site installation of SQl Server is a lot more likely to be backed up than a number of scattered version under user control.
4) Sql server is quite complex for a "normal" user to install and administer - it is not a good idea!
5) It will destroy the primary advantage of using Sql Server over SqlCE or SQLite - multiuser access. If everyone installs their own copy of SQL server, then you will have multiple copies of your database, each used by a single person. This will cause some confusion, and (depending on how you wrote the original database) may take some considerable effort to combine into a single instance when the problem is realized.
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
So You used the same text again
Frazzle the name say's it all
|
|
|
|
|
That's why I have it in the database!
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
I agree with Griff. Just document that SQL Server is required and let the user decide how best to satisfy the requirement.
I would also add that if you include version X of some software it may be out of date by the time a user installs it. (SQL Server 2012 is just around the corner, the user may even have a beta.)
|
|
|
|
|
|
Hi,
Here I'm getting one problem. I can't able to print text on Cheque.
give me full description to this problem, please help me..... ![Blush | :O](https://www.codeproject.com/script/Forums/Images/smiley_redface.gif)
|
|
|
|
|
Please tell us what is the component you are using there ? (exp: Crystal report)
|
|
|
|
|
Hello Everybody,
I am using Session in web service. But i am using web service in window application .
when i am calling method of web service object. It generate error. object refrence not set to an instance of an object.
Pls provide me help for this topic.
If you can think then I Can.
|
|
|
|
|
Look at the reference where the error occurs and try to diagnose why it has not been initialised with a reference to a real object.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
you can attach the debugger to the client code. When you hit the web service call, step into it. This will load your web service into your runtime or go to a separate debugger(if the web service is attached to your another instance of the debugger).
Step into your code to see where the object reference is null.
Something you can inspect is to see - Does your webservice need authentication? Is the authentication information setup correctly before the call?
|
|
|
|
|
I have 3 lists inside each i am having CD class inside CD there are 5-6 nested classes (CDA, CDB, CDC ...) inside each nested class i have 25-30 double collection properties.
I want to add these 3 lists....
Can anyone help me plz??
|
|
|
|
|
I need some more clarity on "What exactly you want to do ?"
|
|
|
|
|
CD contains chart data for one analysis which is used to generate charts based on analysis you did. CDA , CDB ... each nested class containing data to generate one chart. i mean CDA for one chart . CDB for 2nd chart.. CDC for 3rd chart...... like this..
Now client wants to generate charts by selecting two or more analysis.
So now i am struggling to find out how can I add data for multiple analysis.
Is it clear or i need to elaborate more
|
|
|
|
|
saurabh001 wrote: I want to add these 3 lists....
Add them to what? To each other, then just create a new list and add each one to the new list. To some other list or object ... ?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
yes.. Add them to new list ..
|
|
|
|
|
Adding lists is a simple matter (see here[^]), what is your difficulty?
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Use the List<T>.AddRange function - it will add all the elements of any IEmumerable to a List<T>
List<string> l1 = new List<string>();
...
List<string> l2 = new List<string>();
...
l2.AddRange(l1)
;
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
Hi OriginalGriff,
I dont want to append list. i want sum
Regards
Saurabh
|
|
|
|
|
I suggest you repost this here, or on C# QA, with a code example clearly showing the structure of the Lists, and clearly showing exactly what the final result's structure (another List ?) should be, and telling us, clearly, how the final result is composed from the outermost Classes, using the innermost Classes, and their inner Properties (of Type: List of doubles).
From what you've disclosed here, we can only make "wild guesses" at the underlying structure like:
public class CD
{
public CD(?) {?}
public class CDA
{
public CDA(?) {?}
public List<double> cda1 {get; set;}
public List<double> cda2 {get; set;}
}
public class CDB {}
public class CDC {}
}
public List1<CD> list1 = new List<CD>();
public List2<CD> list2 = new List<CD>();
public List3<CD> list3 = new List<CD>();
public List<CD> SumOfLists = You need to clarify exactly what you mean by "nested." And, is inheritance used in any way here ?
"Anyone who shows me my 'blind spots' gives me the gift of sight." ... a thought from the shallows of the deeply shallow mind of ... Bill
|
|
|
|