|
ImageMagik does that ? OK, I didn't know that. In that case, p/invoke is your best bet, there are articles here on CP about it.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I have a following regex in my program
01 private void myMethod
02 {
03 string strInput = "http://www.yahoo.com/";
04 string p = strInput;
05 Regex myRegex = new Regex(@"http://(www\.)(?[^\.]+)\.com", RegexOptions.IgnoreCase);
06
07 MatchCollection MatchList = myRegex.Matches(strInput);
08
09 StringBuilder sb = new StringBuilder();
10 sb.Append(MatchList.Count + " Matches found\n");
11 sb.Append("==========================================\n");
12 rtbOutput.Text = sb.ToString();
13 }
But when i run the program i receie the following error
An unhandled exception of type 'System.ArgumentException' occurred in System.dll
Additional information: parsing "http://(www\.)(?[^\.]+)\.com" - Unrecognized grouping construct.
What am I doing Wrong?
o O º(`'·.,(`'·., ☆,.·''),.·'')º O o°
»·'"`»* *☆ t4ure4n ☆* *«·'"`«
°o O º(,.·''(,.·'' ☆`'·.,)`'·.,)º O o°
|
|
|
|
|
If I'm not mistaken then (? marks the start of a named group (see named group in MSDN).
Why do you have the ( and ) anyway?
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
Take the '?' question mark out of the group and put it in front of it, actually marking the fact that (www\.) is optional.
SkyWalker
|
|
|
|
|
Hi All,how can I pass variables from .aspx.cs to javascript...in javascript file how can I receive them?
please help me..
-- modified at 6:40 Friday 29th June, 2007
Hi,Im Razana
|
|
|
|
|
I feel like I've answered this one three times today.....
Just use the RegisterClientScriptBlock method on the page class to write javascript into the page, and build a string in your code behind that creates the variable.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Yes you can use RegisterClientScriptBlock...
but if you put some dynamic values in javascript you can use this one also..very easy and stright forward.
string str="Some Dynamic String";
Response.Write(" var ServerStr="+str+" ");
cheers
Ravi Kant Srivastava
(System Analyst)
HandsOn Technology & Engineering
Gurgaon
(India)
e-mail:ravikant@hte.co.in
Cell: +91-9999611388
|
|
|
|
|
Some problems with this
1 - you didn't put the variable in quotes
2 - Response.Write always puts the text at the top of the page, above the head tag, this is bad.
3 - RegisterClientScriptBlock lets you stop a script from being inserted more than once.
Ideally, if you want full control of the text's location, you should put it in the aspx, or put a literal control in the aspx that you can set to contain the script.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I need to do 3 Steps..
1.In java Script file, I've to get the value of textbox which is placed on .aspx file..
2.I've pass this value to another .aspx file to check whether the value of text box exsist in database..
3.Finally I have to pass a variable from the second .aspx file to the first .aspx file...
I did the above to...
I dont know the third one...that is my problem...
txtajaxscript.js
=================
var http = getHTTPObject();
var url="txtajaxcheck.aspx?id=";
function handleHttpResponse() {
if (http.readyState == 4) {
results = http.responseText;
document.getElementById("lbltxt").innerHTML= results;
}
}
function txtdisplay()
{
var txtvalue=document.getElementById("Text1").value;
document.getElementById("lbltxt").innerHTML=txtvalue ;
var http = getHTTPObject();
http.open("GET", url + escape(txtvalue), true);
http.onreadystatechange = handleHttpResponse;
http.send(null);
var role = "<%=role%>";
document.getElementById("lbltxt").innerHTML=role ;
}
function getHTTPObject() {
if (typeof XMLHttpRequest != 'undefined') {
return new XMLHttpRequest();
}
try {
return new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
try {
return new ActiveXObject("Microsoft.XMLHTTP");
} catch (e) {}
}
return false;
}
now I have to pass a variable from txtajaxcheck.aspx to txtajaxscript.js...and I have to get a variable here which is sent by txtajaxcheck.aspx ...
Help me please....
Hi,Im Razana
|
|
|
|
|
Hi,
my situation is that I am creating an updater for my application that updates a reference library in the database.
I have a master library and a client library. I basically want to be able to compare the master library with the clients library and update where necessary.
I could achieve this with the merge datasets, then call get changes and update the database. However what I must avoid is that the client may have made changes to their library and I don't want to override there specific changes with the master database.
Any ideas how I might acomplish this?
Thanks
Paul
|
|
|
|
|
I suggest to use an approach of your own, not the Merge method. The Merge method updates the values in the target DataSet.
Why not just loop through all rows in the Master DataSet, look for a row in the CLient DataSet with same id (or something similar) and if none is found, then load the master row to the client DataSet.
Methods to use:
- foreach () for looping over Master DataSet
- FindById(id) for searching the row in Client DataSet (assuming it's a typed DataSet with PrimaryKey id)
- LoadRow(row) to load row into Client DataSet
Happy Programming
Urs
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
Thanks for your reply.
I think we are going to stick with our XML approach but we were wondering if an object based approach was feasible.
With the XML approach we do the following:
1)Generate XML on the master database (contains updates/changes)
2)Then compare the XML with old XML generated on the last update.
3)Work through the XML and outputting where any changes are discovered.
4) The out put contains information on the row and particular field that is different
5)We can then call SQL to update the specific fields that have changed as well as insert/delete rows where appropriate.
Is there any easy way to do that using objects. Or is it best to stick with the XML approach?
Regards
Paul
|
|
|
|
|
I want to stop execution of the code for some minutes, how can i achieve that.
i.e
MessageBox.Show("Message 1");
//Stop for some min
MessageBox.Show("Message 2");
CAn you please give me a hint
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Hello,
Thread.Sleep will do so!
All the best,
Martin
|
|
|
|
|
An alternative to Thread.Sleep is using a Timer.
Happy Programming
Urs
-^-^-^-^-^-
no risk no funk
|
|
|
|
|
MessageBox.Show doesn't have functionality to close the form. Write your own form, and have a method you call which shows the form modally, and runs a timer, then it closes itself.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
A form is actually doing nothing, just "sitting" on the screen, waiting for the user to use its graphical interface.
Put your code in a thread, and you can manage the execution of the thread the way you like.
SkyWalker
|
|
|
|
|
when i pass XmlDocument object (which is not null) as paramenter to a web service function from front end
But it remains null when i see it by debuggin in the web service function
What can be the cause.
Passing class object as parameter to web services
RSONS
|
|
|
|
|
same problem here while calling asp.net web service in PHP
any help
Ravi Kant Srivastava
(System Analyst)
HandsOn Technology & Engineering
Gurgaon
(India)
e-mail:ravikant@hte.co.in
|
|
|
|
|
Hi
I have solved the problem by sending XmlNode instead of XMLDocument as parameter to function
From client side i am sending objXmlDoument.DocumentElement to ws function
Plz check it in your asp.net and php
I think it ll also help you
|
|
|
|
|
hi,
i have to inherit from multiple classes. a base class i wrote, and a wpf class, like Image or so, because i'm writing some custom controls.
i know c# doesn't have multiple inheritance. how can i achieve multiple inheritance functionality?
thanks,
donovan
rather have something you don't need, than need something you don't have
|
|
|
|
|
|
|
The official way of simulating multiple inheritance is to combine single inheritance with composition.
Kevin
|
|
|
|
|
thanks,but how can i use the code that adds my custom event handlers in my class when i convert it to an interface?
rather have something you don't need, than need something you don't have
|
|
|
|