|
How far you have done until now?
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
|
|
|
|
|
string[] small = matrix.Split(new char[] { ' ', '<', '>' });
it just saves the strings between the delimiters ,but i want them too ( if i had only one delimitor , that wouldn't have been a problem, but i have 3 of them and i want them in the exact order )
|
|
|
|
|
I'd suggest writing your own split function. Easy enough to do, use a StringBuilder and add each character one by one. If its one of your delimiters, add the string so far to the list and start again with an empty one.
Regards,
Rob Philpott.
|
|
|
|
|
after 2 hours sleep :
Regex RE = new Regex((@"([\ \<\<])"));
string[] small= (RE.Split( matrix ));
works
|
|
|
|
|
Yikes! That's scary. How's the performance though?
Regards,
Rob Philpott.
|
|
|
|
|
Here you go..
string str = "123 <456> <345> 456><7<";
Regex RE = new Regex(@"(^|\ |\<|\> )\w+($|\ |\<|\> )");
MatchCollection MC = RE.Matches(str);
if (MC.Count == 0) MessageBox.Show("No match");
foreach (Match M in MC)
{
MessageBox.Show(M.ToString());
}
8.Kelvin()
{
while (!(the machine can program itself))
Wont_stop_coding = true;
}
|
|
|
|
|
Hi ,
I need help...
I have a Datatable with wich i populate data to Gridview..... I also have a Button named "Email" at the bottom of the page . When the user clicks the Email button. an email has to be sent to manager@abc.com containing the contents of datatable in table format.
I am able to show the data in gridview, but i want the code to send the EMAIL with contents of datatable in table format.
I am using ASP.Net 2.0 with C#
will be waiting for reply.. plz help me out...
Thanks
|
|
|
|
|
Why don't you export it to excel or csv?
|
|
|
|
|
At any given time the Datatable would only contain 9 records with 7 columns,It is a small table hence my manager wants me to show it in the body of email instead of moving the data to excel doc and then attaching it to the email.
|
|
|
|
|
Hi Guys,
Occasionally seen in License Agreements, The text containing in the Text Box is so long that the user has to scroll up and down to view the entire text (most users dont prefer to ). However, when I try to enter a long paragraph in the text box by braodening the length and breadth of the text box, I am only able to get a partial view of the paragraph, i.e., only half of the paragraph is visible and the other remains below which is not viewable. How can I implement the scrollbar in the text box which has long paragraphs to be insersed in, such that I am able to see the texts, no matter how long they are, using the scroll bar to scroll up and down?
I believe the this question is about desiging. It some code also must be implemented here, please tell me....
Your help will be appreciated....
Thanx, Rajdeep.NET!
|
|
|
|
|
|
Thanx Tom
|
|
|
|
|
Set the TextBox's Multiline property to true and ScrollBars to Vertical. It might be a good idea to set ReadOnly to true as well.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
Thanx Davey!
|
|
|
|
|
Hi all,
i'm trying to create a OU in AD to have a otherWellKnownObjects attribute.
i can access the OU fine while connecting to it normally. but as soon as i try to access it via the otherWellKnownObjects attribute i get the error - "There is no such object on the server" and when i check the attribute in AD is it no longer set to null but i am unable to view its value!
any ideas?
Many thanks,
Phil.
|
|
|
|
|
I have spent some hours trying to read a checkbox enabled status on form1 from a different thread without any joy. Lots of research about Invoke etc has shown me how to write to the form but no clue as to how to read from the form. Can anyone here point me in the right direction please?
Cheers, Bruce
|
|
|
|
|
I didn't try it, but Invoke should do the trick to read a check box state.
|
|
|
|
|
Why use Invoke? Just read the control like usual..
private void btnReadControlThread_Click(object sender, EventArgs e)
{
Thread thread = new Thread(ThreadReadControl);
thread.Start();
}
private void ThreadReadControl()
{
MessageBox.Show("Enable status is " + cbEnableStatus.Checked.ToString());
}
8.Kelvin()
{
while (!(the machine can program itself))
Wont_stop_coding = true;
}
|
|
|
|
|
Many thanks. Typical! me trying to overcomplicate things again. Cheers Bruce
|
|
|
|
|
Not sure about the safety of reading properties directly across threads as opposed to calling methods etc...
I suppose you could provide a GetEnabled (and if needed SetEnabled) method that use the property's getter (and setter) and call Invoke on that.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)
|
|
|
|
|
I try following code;
WebClient wClient = new WebClient();
wClient.DownloadFile("http://www.google.com", "C:\\google.html");
But those code do not download resource file (like css, image...). How can I download COMPLETE web page using with C#.NET
Best Regards...
|
|
|
|
|
Download the html page, use regular expressions or something similar to find references to images or css on the html,and download them as well...
|
|
|
|
|
Its really hard way.
I download http://www.google.com/
And I read source, find <img src=images/hp0.gif width=158 height=78 alt="Google">
Than I download http://www.google.com/images/hp0.gif
|
|
|
|
|
Hi Guys. I have a slight problem. My application usses EarlyBinding.where I reference Excel 12. Problem I'm having is that most of the machines targeted have Excel 10 or Excel 11 installed so when installing the App or running it I get a GAC error. This I know is that the versions are not backward compatable. My question is, how do I go from earlybinding to LateBinding with as little changes possible. Below I instanciate my Excel Workbook etc. My code is doing loads of stuff and I wouldn't want to rewrite all of it.
Microsoft.Office.Interop.Excel.Application objExcel =
new Microsoft.Office.Interop.Excel.Application();
objExcel.Visible = false;
Microsoft.Office.Interop.Excel.Workbook objBook =
objExcel.Workbooks.Add(System.Reflection.Missing.Value);
Microsoft.Office.Interop.Excel.Worksheet objSheet =
(Microsoft.Office.Interop.Excel.Worksheet)
objBook.Worksheets.get_Item(1);
Microsoft.Office.Interop.Excel.Range objRange;
Any advice would be appreciated.
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
You can do this using something like this:
object xl = Activator.CreateInstance(Type.GetTypeFromProgID("Excel.Application"));
object books = xl.GetType().InvokeMember(
"Workbooks", BindingFlags.GetProperty, null, xl, null);
object book = books.GetType().InvokeMember( "Add",
BindingFlags.InvokeMethod, null, books, null );
object sheets = book.GetType().InvokeMember( "Worksheets",
BindingFlags.GetProperty,null, book, null );
object[] parameters;
parameters = new object[1];
parameters[0] = 1;
object sheet = sheets.GetType().InvokeMember( "Item",
BindingFlags.GetProperty, null, sheets, parameters );
parameters = new object[2];
parameters[0] = "A1";
parameters[1] = Missing.Value;
object range = sheet.GetType().InvokeMember( "Range",
BindingFlags.GetProperty, null, sheet, parameters );
parameters = new object[1];
parameters[0] = "1";
range.GetType().InvokeMember( "Value",
BindingFlags.SetProperty, null, range, parameters );
parameters = new object[1];
parameters[0] = true;
xl.GetType().InvokeMember( "Visible",
BindingFlags.SetProperty, null, xl, parameters ); I've just knocked this together in Notepad, so I apologise if it's not 100% perfect.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|