|
Not without seeing the page.
As mentioned, the data I scrape is in a table, so the page contains:
<td width="473" class="playlist">4:08 pm - The Beatles - Can't Buy Me Love<br>4:10 pm - The Doors - Break On Through<br>4:13 pm - Meat Loaf - Paradise By the Dashboard Light<br>4:21 pm - Klaatu - Mister Manson<br>4:25 pm - Bob Seger & The Silver Bullet Band - Long Twin Silver Line<br>4:29 pm - Eagles - Those Shoes<br></td>
and I use a Regular Expression to match <td width="473" class="playlist"> the data I want <br></td> ;
Then I split further on <br> and hyphen.
You will need to find such a pattern in the page you're reading.
|
|
|
|
|
Thanks so much for your help.
Here is the problem :
I am trying to read data from a certain URl .Every time you run the Url with Different param it gives a result like the following. For instance runinng http://data.com/data.aspx?datefrom=20090601&dateto=20090621
will give a result of a comman separated data like the following.
"john","wood","20090203"
"terry",'brown",20090209"
etc..
How will i read that and get it in to Sql Table?All i have to run is the above URL to generate the value.
Please advice.
Thank you in advance
|
|
|
|
|
is possible?
The Thread object getting with Thread ID
System.Threading.Thread th = thread.id <------------- ?
There will be what kind of method and peels?
.
|
|
|
|
|
|
How can I add 12 years minus 1 day to a date please?
So, for example, if the original date is 09/06/2009 (June 9th, 2009) the calculated date will give me 08/06/2021.
|
|
|
|
|
|
I have just realised this after I posted my question
Many thanks for pointing this out.
|
|
|
|
|
Something like this perhaps:
DateTime newDate = DateTime.Now.AddYears(12).AddDays(-1);
"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
|
|
|
|
|
public DateTime TwelveYearsMinusOne(DateTime start)
{
return start.AddYears(12).AddDays(-1);
}
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) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Using c# BHO, I want to replace the innertext of an HTML Element on browser (IE6).
IHTMLElement HtmlElemen; // where HTMLElemen.innerHTML = <TD>Hello World!</TD>
obj = (object)HtmlElemen;
obj.GetType().GetProperty("innerText").GetValue();
obj.GetType().GetProperty("innerText").SetValue();
if normally HTMLElemen.innerText gives "Hello World!",
then how can I get the same thing i.e., "Hello World!" from the obj.GetType().GetProperty("innerText").GetValue();
|
|
|
|
|
Hi all,
I've two int arrays, something like this.
{41, 3, 5, 37, 59, 4}
{3, 59, 4, 5, 37}
As you can see 41 is not in the second array. I want to find that actually in a C# code. Basically I want to find the value which is exists only in one array.
Any comments?
Thanks a lot.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
There might be a simpler way, but try just to iterate through the two arrays with a nested for loop and se if the items in the first array exist in the second.
|
|
|
|
|
Actually I've look at that, have no clue about that's the best way I can take.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Enumerable.Except (since .NET 3.5)
Dust Signs
The number you dialed is imaginary. Please turn your phone by 90 degrees and try again
|
|
|
|
|
himanshu
|
|
|
|
|
Thanks a lot.
Actually now my application have a slight change. Now all my elements are in a list. So I've two lists now. So how can I do this.
Thanks
I appreciate your help all the time...
CodingLover
|
|
|
|
|
Which list are you using exactly? A generic List<t>? As it also implements IEnumerable you should be able to use the extension methods on them equally.
Dust Signs
The number you dialed is imaginary. Please turn your phone by 90 degrees and try again
|
|
|
|
|
Sounds like a set operation, I'd use sets.
|
|
|
|
|
hi
how can i measure string height without using Graphics.MeasureString()?
i've tried to use GraphicsPath and AddString() then to GetBounds() but that gives me the exact height, but i need the height like MeasureString() function.
the reason i can't use Graphics is that i need to calculate something about the string height in a function that doesn't get Graphics variable. (in the function that does have the Graphics variable i'm using 300 dpi).
|
|
|
|
|
|
i'm using 1.1 Framework, so i think i can't use it
|
|
|
|
|
You don't need to receive a Graphics object to use one in your method. What you could do is create a 1 by 1 bitmap, and then retrieve the Graphics object from that.
using (Bitmap img = new Bitmap(1,1))
{
float resolution = 300;
img.SetResolution(resolution, resolution);
using (Graphics g = Graphics.FromImage(img))
{
}
}
"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
|
|
|
|
|
The Graphics context dictates the way the Fonts are rendered. It is not possible to accurately measure a string without knowing where it is going. All other option require guessing in the method. If you want to guess you can look-up the font characteristics and roll your own, or as suggested earlier create a fake graphics context that does not match the device. Unfortunately, it will be buggy in some edge cases that may be hard to detect in development but the client will notice immediately. The best thing to do is to pass a reference to the Graphics context everywhere you want to draw to a device.
|
|
|
|
|
Hi friends, I explain you my problem. I have my application installed on Vista 64bit, without Visual studio 2008 kit installed on the machine. Sometimes the application crash in particular situation, so windows doesn't start a debug to see the error line. Why?. Is it possible to install a free debugger on the machine without install Visual Studio 2008?
Thank you, wait some suggestions.
Bye Bye
Andrea
|
|
|
|
|
You should rather log this somewhere in file, event log etc. This will give you an idea where it went wrong so that the code can be reviewed and possible problem can be understood.
Manas Bhardwaj
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|