|
What is the difference between asp and asp.net?
Both active server pages right?
|
|
|
|
|
No, asp is the old framework, it uses VBSCript and JScript. In ASP, you have to build your result sets using the sort of code you're using. ASP.NET is the framework that gives you access to things like codebehind, code reuse, etc. It's a whole different world. There's not enough money in the world for me to ever take an asp project again.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
But they are both actice server pages, but ASPX is the more efficient one correct?
|
|
|
|
|
They are both an ISAPI filter at the end of the day. Look, ANY framework generates HTML, but that doesn't mean you can do anything you want just writing your own HTML. ASP.NET is named as it is to show that it's the successor of asp. Have you ever used asp ? If you haven't, then I have no idea why you're generating code as you are ( especially putting in body and form tags ), but I promise you, it's the difference between cutting down the tallest tree in the forest with a chainsaw, or with a wet herring.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
No, I myself, have never used asp, although my dad works for Microsoft, and he taught me how to code, he did it that way, so I do. I have never used a datagrid before, can you give me a quick lesson or article to help me out.
Thanks a ton man, you have help me threw some problems before, thanks for all your help.
|
|
|
|
|
ExpertComing wrote:
No, I myself, have never used asp
Half your luck
This[^] is the best site for info on the datagrid.
Here[^] is a good place to start on MSDN.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have the following c++ declaration
static FT_STATUS FT_ListDevicesEx(String *DevicesList);
{
DevicesList = "Hello";
}
Inside this function I modify the DeviceList string, but when I return to my c# code the string is not changed.
in c# i use the following code to pass the string.
string a = "12345";
FTDI.FT_ListDevicesEx(a);
When I arrive in ListDevicesEx the DevicesList string is 12345, then is modified in Hello, but at return in c# a = 12345 again!
What is the solution ?
Best regards.
|
|
|
|
|
You need to use the "ref" keyword from C#. Also, make sure that the "ref"-style usage is declared for the C++ function as well (if it isn't already set that way).
John
"You said a whole sentence with no words in it, and I understood you!" -- my wife as she cries about slowly becoming a geek.
|
|
|
|
|
|
<br />
Regex regex = new Regex(@"(?>\w|\d|\s|\B)[^;]+"); <br />
<br />
my input:<br />
matchCollectionReceivers = regex.Matches("Gerald...'§'ö3 Hello; Mike; Fuxxe123_10");<br />
<br />
output: array[0] = "Gerald...'§'ö3 Hello";<br />
array[1] = " Mike";<br />
|------- here is a space...i dont like that!<br />
arrey[2] = " Fuxxe123_10";<br />
<br />
<br />
Regex regex = new Regex(@"(?>\w|\d|\s|\B)[^; ]+"); <---- don't work!?<br />
how can i say all characters but without "; " ?
cu
|
|
|
|
|
Have you tried [^;\s]+ ?
modified 12-Sep-18 21:01pm.
|
|
|
|
|
What about this?
(?>\w|\d||\B)[^;\s]+
Btw, if you want to strip all string with an ; or \s between each other, why not use the String.Split() function?
modified 12-Sep-18 21:01pm.
|
|
|
|
|
hi,
<br />
input "Gerald 123; Franz!'§§"<br />
<br />
regex: Regex regex = new Regex(@"(?>\w|\d|\B)[^;\s]+");<br />
<br />
output:<br />
array[0] = "Gerald";<br />
array[1] = "123";<br />
array[2] = "Franz!'§§";<br />
<br />
but i want have: array[1] = "Gerald 123";<br />
array[2] = "Franz!'§§";<br />
<br />
i know its better to use the split function
but i want to run that with regex...but it's not possible?
cu
|
|
|
|
|
Do you actually want to split the spaces or the semicolons?
modified 12-Sep-18 21:01pm.
|
|
|
|
|
hi,
the regex should work like that:
<br />
char[] separators = new char[] {';'}; <br />
foreach (string sub in textBox_Receivers.Text.Split(separators))<br />
{<br />
string str = sub.Substring(0, sub.Length);<br />
if(str.StartsWith(" ")) <br />
{<br />
str = str.Remove(0,1); <br />
}<br />
<br />
Receivers.Add(str);<br />
} <br />
cu
-- modified at 16:05 Thursday 8th September, 2005
|
|
|
|
|
\s?([^;]+)
This one works fine for me
modified 12-Sep-18 21:01pm.
|
|
|
|
|
hi,
yeah thats fine:
<br />
MatchCollection matchCollectionReceivers;<br />
Regex regex = new Regex(@"\s?([^;]+)"); <------- whats the '?' here? = AND?<br />
matchCollectionReceivers = regex.Matches(textBox_Receivers.Text);<br />
<br />
foreach (Match m in matchCollectionReceivers) <br />
{ <br />
string str = m.Value;<br />
if(str.StartsWith(" "))<br />
{<br />
str = str.Remove(0,1);<br />
}<br />
<br />
Receivers.Add(str);<br />
}<br />
advantage: less code lines than the .split() version
cu+thx
|
|
|
|
|
No, the ? means that the space is optional.
But your code is wrong - I put brackets around the [^;]+ so that the results will be stored in a GroupCollection. This way you don't need to check for any leading spaces anymore.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Regex r = new Regex(@"\s?([^;]+)");
MatchCollection m = r.Matches("Gerald 123; Franz!'§§");
foreach (Match mc in m)
{
Console.WriteLine(mc.Groups[1].ToString());
}
modified 12-Sep-18 21:01pm.
|
|
|
|
|
hi, look for my last code past! i can see brackets around: Regex regex = new Regex(@"\s?([^;]+)");
why do you write mc.Groups[1]? in m.Groups[2] are the space?
cu
|
|
|
|
|
mc.Groups[0] is the whole matched group including the optional space, while mc.Groups[1] is the group matched by the ([^;]+)
There is no mc.Groups[2] as far as I know.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Forgive my ignorance, I am often given small tasks on projects where I have little experience, and not a lot of time for a learning curve on so short a task.
I've been asked to make minor mods to a C program.
The files I have are .cpp and .h . This is C, as opposed to C++, correct?
And I cannot (at least, not effectively) edit and compile this in Visual Studio? (There is no .sln file and the .cpp and .h files do not show up as 'add existing'-able files.)
I'm googling for answers about how I'm going to go about this, but most info out there sort of starts at a lower level of info than I'm looking for.
I'll probably be back with more questions when I go to compile and such (like where do I get/put all the class libraries and stuff), so any preemptive help on the 'start-to-end' of a C program is appreciated.
Thanks.
________________________________________________________________________
Dave
Y10K bug! Let's not get caught with our pants down **AGAIN**! (DC 02002)
|
|
|
|
|
I'll help you out, although C has little to do with C#
.cpp is indeed associated with C++. If you do not have a solution then make one, then add the files in and hope things work. You might want to go to the project settings to configure additional include directory, libraries, and other settings. I cannot help you any further since I dont know what files you are working with.
If you need additional help getting things working I suggest you post in the C++ forum.
Alex Korchemniy
|
|
|
|
|
Thanks, yes. I was opening the wrong type of project. Now I just have to figure out why these two files are is missing. The debugger chokes on includes called wx/wxprec.h and stdafx.h.
There is a stdafx.h in a subfolder, but adding it to the project doesn't fix the problem.
I'm going to take this over to the C++ forum. Thanks for your help.
________________________________________________________________________
Dave
Y10K bug! Let's not get caught with our pants down **AGAIN**! (DC 02002)
-- modified at 16:45 Thursday 8th September, 2005
|
|
|
|
|
DaveC426913 wrote:
The files I have are .cpp and .h . This is C, as opposed to C++, correct?
No, cpp stands for C++. A C++ program rarely uses .hpp instead of .h.
DaveC426913 wrote:
And I cannot (at least, not effectively) edit and compile this in Visual Studio? (There is no .sln file and the .cpp and .h files do not show up as 'add existing'-able files.)
Try creating a console application and then adding these files to it.
Where did these files come from ? Why are you trying to compile them outside of a project, surely they will end up in a project, can't you compile them there ?
Christian Graus - Microsoft MVP - C++
|
|
|
|