|
haseebbutt007 wrote: the windows installer automatically copy that DLL in System and System32 Folders
Why?? You don't need it in two places, only one. Any .DLL's your application uses should be placed in the applications folder under Program Files. The exception to this being an assembly that's registered in the GAC.
|
|
|
|
|
Thanks Sir for your kind reply. Can you please guide me about a link where I could find some tutorials about deployment in VS 2005. Waiting for your reply.
|
|
|
|
|
|
Obviously harder then typing it into a forum
-Larantz
|
|
|
|
|
OK, this is interesting, I think I've found a bug in the RegEx class in the .NET framework. Run the following as a simple console app...
using System.Text.RegularExpressions;
namespace RegExBug
{
class Program
{
static void Main(string[] args)
{
string emailPattern =
@"^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@(([0-9a-zA-Z])+([-\w]*[0-9a-zA-Z])*\.)+[a-zA-Z]{2,9})$";
Regex emailTest = new Regex(emailPattern);
if (emailTest.IsMatch("sad.couple.skint.tired.fedup@ukgateway.n"))
{
return;
}
}
}
}
Now when it gets to the code 'emailTest.IsMatch' the application will hang. It doesn't throw an exception, just hangs there for ages (possible infinite loop bug in RegEx class??). Wrapping a try catch around it does nothing either.
Anyone know what could be going on?
|
|
|
|
|
I just tested this snippet and it appears you're right, the app hangs. Actually, it just takes a really long time thanks to the nested quantifiers.
I just did a search on Microsoft feedback center, is this the bug you're hitting? Complex Regex evaluation hangs[^]
Microsoft has this to say on the BCL team blog[^]:
Well, actually, it doesn't hang. It just takes a really really long time, and you haven't waited long enough for it to finish. One of the pitfalls with regular expression is that you can write expressions which don't perform very well. In particular, you can end up with expressions whose search time grows exponentially with the length of the search string. I get bugs reporting that Regex hangs about once a month, and it always turns out to be an exponentially slow expression. Here's a simplified example of one of them:
([a-z]+)*=
There are two things interesting about this expression. First, notice that it has two quantifiers nested within each other. The inner one is the + quantifier for the character class, and the outer one is the *. Second, it has a character (the equals char) that must be matched at the end of the result. In English terms, this expression can be explained as
1. match any character a-z, one or more times
2. match step #1 zero or more times
3. match an equals
What will happen is that Regex will breeze through step 1 and 2 only to find that it can't match in step 3. That forces it to backtrack and try to match the first two steps differently. The trouble is that there are a lot of different ways that steps 1 and 2 can match, and Regex needs to try every single one before it can determine that the expression does not match the string.
|
|
|
|
|
Which all of course leads onto the next question :-
What is the best email validating regex?
"More functions should disregard input values and just return 12. It would make life easier." - comment posted on WTF
|
|
|
|
|
For which the correct answer is: There isn't one.
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
I agree. I've seen numerous ones all over the net and they all seem to have some kind of short coming. No silver bullet, cure all, I guess.
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
|
dan neely wrote: It's gargantuan, about the size of a large paragraph.
Holy moly
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Scott Dorman wrote: There isn't one.
No, there is one, it's just really big:
(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])
That matches all RFC 2822 email addresses. However, if you want a regex that validates 99% of the email addresses out there and still performs well, this one[^] should work well.
*edit* dang smileys :-p
|
|
|
|
|
I forgot about www.regular-expressions.info[^], time to bookmark it
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
thanks. it's very interesting....
|
|
|
|
|
Hi All,
I have a unicode string
string tempstr = "פסטיבל סגול ה- 11 - למדיטציה ואהבה";
odbcCmd.Text = "update myTable set testField '" + tempstr + "' where myIndex=3";
odbcCmd.ExecuteNonQuery();
After I run ExecuteNonQuery(), I found '???????' in the testField instead of Hebrew chars. I also tested out with languages other than English, it is inserting '????' instaead of unicode string. However, I run that Update string in the mySQL browser (not using any program), it inserted info/nicode string correctly.
Why is it?
I look at the field properties and it was set to utf8.
how can I insert non-english characters ino db please.
Thank You.
|
|
|
|
|
|
Thank You Giorgi,
I looked at the link you gave it to me and I tried it.
My TableOptions are following:
MyISAM Storage Engine, Charset=utf8, Collation= Utf8_general_ci
I tried with following two myConnection strings
1) cnnString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=imagingsql01;UID=roscoe; PASSWORD=roscoe;OPTION=3; Data Source=localhost; Persist Security Info=yes;character set=utf8;Database=myDBName;";//CHARSET=utf8;";
2) cnnString = "DRIVER={MySQL ODBC 3.51 Driver};SERVER=imagingsql01;UID=roscoe; PASSWORD=roscoe; OPTION=3; Data Source=localhost; Persist Security Info=yes;CHARSET=utf8;Database=myDBName;";
I tried both ways and still inserting '??????' to the table.
What else do I need to do to the table/code so the inserting can be done in proper way.
Thanks.
|
|
|
|
|
|
I am using 4.1.10a-nt-max
after I called Select Version();
|
|
|
|
|
Hello everyone
i'm not quite sure if this is the right forum for this.
in an application i'm writing, i try to create an excel sheet. the problem i have is when i try to set the left and center footers.
the Excel - Version I use for development is Excel 2002 but i use generated interop - assemblies from the Excel 2000 version.
i say:
<br />
ws.PageSetup.LeftFooter = "&14&N Seite(n)";<br />
ws.PageSetup.CenterFooter = "&14&F";<br />
ws is the worksheet.
anyway, in the page preview, the the left footer displays the filename instead of the pagecount and the center footer displays nothing at all
when i let excel generate macro code for the footers it says:
<br />
ws.PageSetup.LeftFooter = "&14&F Seite(n)"<br />
ws.PageSetup.CenterFooter = "&14&B"<br />
the workaround i found is telling Excel what i DON'T want in the Footers:
<br />
ws.PageSetup.LeftFooter = "&14&A Seite(n)";<br />
ws.PageSetup.CenterFooter = "&14&N";<br />
now it displays the correct information in the footer.
does anyone know where dis behaviour comes from?
i can generally live with it that way, i just curous about the why
greets
M@u
|
|
|
|
|
Not sure why that's happening
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
i have created a error page and have abought 20 page want to write a code in my master page where every page is dervied from that page please can some one tell how to write a that code and what code /
thank you
sandip patel
|
|
|
|
|
I wanna know how can I get the properties of flash (.swf , .fla) files within C# program.
|
|
|
|
|
Which properties? Specific to flash files?
|
|
|
|
|
how would you import this dll into your c# project?
old c style exports in the dll.
<br />
DBRESULT WINAPI dbLoginDataBase ( LPSTR lpDataBase, LPSTR lpDictionary, LPSTR lpUsername, LPSTR lpPassword )<br />
DBRESULT WINAPI dbReadSingleRecord ( LPSTR ViewName, LPSTR DataBuffer, LPWORD lpDataBufLen,<br />
LPSTR ParamBuffer, WORD ParamBufLen, RECPOS RecPos,<br />
BOOL Lock, LPDBOID lpDboID )<br />
<br />
typedef void * LPDBOID;<br />
<br />
any ideas? anyone?
Thanks!
|
|
|
|