|
Yes that would be the most practical solution.
I've just been looking at the FileInfo constructor documentation and to be honest MS could do themselves a favour if they copied some of the info over to the DirectoryInfo page as it mentions empty paths and the NotSupportedException for embedded ':'.
Alan.
|
|
|
|
|
get any API for get count number of hits occurred for a particular keyword date wise from Gnews,facebook and twitter.
|
|
|
|
|
..there's not a unified api available that allows you to search all these sites in a single call. You'll have to make an interface to each site, using the SDK or API's provided by them.
Facebook[^]
Twitter[^]
Google News doesn't provide an API (it's not required). but there are feeds available for non commercial use.
Bastard Programmer from Hell
|
|
|
|
|
I am making a media player. so I need tool bar and seek bar. how I get these. thanks.
|
|
|
|
|
Are you using Win Forms? Just add a toolbar and add buttons to them. What issues are you having?
|
|
|
|
|
thanks.I need seek bar and volume bar as like in new vlc player.
|
|
|
|
|
|
|
|
that is a nice link ...all code and steps are given...
|
|
|
|
|
|
|
I'm trying to create a ListBox on the fly without using any XAML code. I got it working - almost. What I have is an array of TextBoxes of 'Zone Descriptions'. I can put those into the ListBox as ListBoxItems, and it works great - no problem.
I want to add at the front of the TextBox a TextBlock or header that says 'Zone 1' or whatever the zone is along with the TextBox, which is user changeable. I have an array of TextBlocks (I probably could have had strings just as well). But, I can't (or don't know how to) adjust the ListBoxItem.Content to hold both the TextBlock and TextBox combo. LBI[i].Content = TBlkZoneDesc[i] + TBxZoneDesc[i] is what I want to do, but that syntax is not allowed. Doing either one separately works fine, but not both.
Do anyone have a suggestion on how to do that?
ListBox LBZoneDesc = new ListBox();
LBZoneDesc.Width = 300;
LBZoneDesc.Height = 240;
Grid.SetColumn(LBZoneDesc,0);
Grid.SetRow(LBZoneDesc,2);
ListBoxItem[] LBI = new ListBoxItem[64];
for (byte i = 0; i < 5; i++)
{
LBI[i] = new ListBoxItem();
LBI[i].Padding = new Thickness(2);
// LBI[i].Content = TBlkZoneDesc[i];
LBI[i].Content = TBxZoneDesc[i];
LBZoneDesc.Items.Add(LBI[i]);
}
C0Grid.Children.Add(LBZoneDesc);
|
|
|
|
|
Hello,
I have an issue in regular expression matching...
string x = "user = 'sa' password='eX65dere' server = 'localhost'";
Regex rx = new Regex("password=\'([a-zA-Z0-9]\\_+)\'");
var r = rx.Match(x);
if (r.Groups.Count > 0)
{
var g1 = r.Groups[0];
MessageBox.Show(g1.ToString());
}
while executing this, I have got the following error message. parsing "password='([a-zA-Z0-9]\_+)'" - Unrecognized escape sequence \_.
the following will work fine, when i try to add _ to the expression the exception occurs.
Regex rx = new Regex("password=\'([a-zA-Z0-9]+)\'");
Can anyone help me on this?
|
|
|
|
|
I have solved this by changing the expression as follows...
Regex rx = new Regex(@"password='([a-zA-Z0-9\\%^&_*]+)\'");
Regards
Sebastian
|
|
|
|
|
Why are you escaping the underscore character? it is a normal character as far as Regex is concerned, just like + and -
|
|
|
|
|
Snap!
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Simple. Underscore is not a metacharacter, so it doesn't need escaping (preceding with backslash).
Cheers,
Peter
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|
|
Got the idea, Thanks...
again i have another question... Here is my updated expression...
string x = "user = 'sa' password='e X65dere!@#$%^&*()' server = 'localhost'";
Regex rx = new Regex(@"password=\'([a-zA-Z0-9\\!@#$%^&*|() _'""*-+{}<>,.;/?:~`\[\]\\\\]+)\'");
var r = rx.Match(x);
if (r.Groups.Count > 0)
{
var g1 = r.Groups[0];
MessageBox.Show(g1.ToString());
}
In this case it will match for every small & large cap letters, numbers and special characters except = . If the password contains = the expression fails... can you please help?
modified 23-Mar-12 8:00am.
|
|
|
|
|
The reason is the quantifier + is greedy quantifier, that is it matches everything that matches the pattern up to the end of the input string. In your case it matches
password='e X65dere!@#$%^&*()' server = 'localhost'
when = is put in the pattern as every thing in between the first ' and last ' matches according to the pattern given when = included. To change this behaviour use the lazy quantifier that is +? instead of + alone.
|
|
|
|
|
great help....worked...thanks
|
|
|
|
|
Thank you
modified 25-Mar-12 2:57am.
|
|
|
|
|
Hey everybody,
I'm experiencing a pretty awful error on visual studio 2008
That error happens when I try to make a new WPF application, and I don't know why.
Here's the image for the error:click here
I hope someone can help me out!
Thank you!
EDIT: Sorry for posting it in the wrong section!
|
|
|
|
|
It seems the project was created by a Professional or Ultimate version of Visual Studio and you're using the Express version?
/ravi
|
|
|
|
|
I'm using the express edition on Visual Studio 2008.
And I'm using windows XP Professional SP2
|
|
|
|