|
Hello mrithula8,
in a few time ago .. i have a same problem with u... and I have resolved the problem... may be you have problem with an declared variable in listbox or another object with another user (your) variable.
Just make i same because it will make your listbox or object will be get a null value.. that's it
|
|
|
|
|
Hi
Im building a parser for betting websites as a hobby project mainly for educational reasons. I have finished the underling design and database structure and can now parse a couple of websites that are easily parsable (such as Pinnaclesports which uses XML and Expekt where you can get all the odds on a single page).
For a page like Expekt I load the page with the WebAii testing framework, which makes life a lot easier when it comes to getting the data from the webpage.
But when it comes to websites which have nested tree stuctures and require a lot of clicks and no apparent way of showing lots of odds on a single page I am stuck, or really, I dont know where to begin. Example of such sites are Ladbrokes.com and Nordicbet.com (this one should be a lot easier)
Because of the structure (of Ladbrokes), at any given time there will be maybee 2000+ different pages so it seems its not the best way to go to every page individually and parse them. This approach would also be incredibly slow, and I know that there are odds comparision sites out there that parses 80+ bookmakers serveral times every miunte. Thus there must be a better way, I just don´t know what it is and I haven´t found any information about how to do it.
Is C# even a good language for this?
Any pointers toward where I can begin to look after how to solve my problem or tips of good resources would be greatly appreciated.
|
|
|
|
|
Hello,
How we can stop using of my picture on another process??, i makje this :
<br />
<br />
DirectoryInfo di3 = new DirectoryInfo(jpeg_path);<br />
<br />
foreach (FileInfo file3 in di3.GetFiles())<br />
{<br />
string name3 = file3.Name;
string fullName3 = file3.FullName;
<br />
File.Delete(fullName3);<br />
}
but in line : File.Delete(fullName3); i hav e an exception : in use by another process
Thank you verry mutch.
|
|
|
|
|
Kill the process and retry.
|
|
|
|
|
Hi,
is this folder full of images some or all of which you just used e.g. as in Image.FromFile?
Image.FromFile locks the file, making it impossible to delete until you do Image.Dispose().
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 9:20 AM
|
|
|
|
|
or use this instead
FileStream fs = new FileStream("FilePath", FileMode.Open);
Image.FromStream(fs);
fs.Close();
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
How we declare Image ?? thank you verry mutch
|
|
|
|
|
Image img = Image.FromStream(fs);
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
I work with pdfsharp to create pdf file, usually i set the path of my picture like DrawImage (picture_path, position);
bu with filestream how we can set the path? thank you verry mutch.
|
|
|
|
|
Quick one - is there anything wrong with throwing an exception in a constructor? I don't see anything wrong with it in principle, but it doesn't feel quite right (probably a throw back from my C++ days).
Had a quick trawl around the net and opionion seems divided, but I haven't found anything concrete wrong with it.
Regards,
Rob Philpott.
|
|
|
|
|
Quick answer; It might leave you with a partially constructed object, since the construction (and memory-allocation and stuff) is interupted.
I are troll
|
|
|
|
|
Quick continuation: In the event of an exception being thrown presumably the new statement would fail and .NET would GC the knackered object next cycle?
Regards,
Rob Philpott.
|
|
|
|
|
|
Eddy Vluggen wrote: I prefer to return "null"
How would a constructor do that?
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 9:21 AM
|
|
|
|
|
A constructor wouldn't, the factory-method that I meant to refer to would
I are troll
|
|
|
|
|
In my opinion, no. .Net will reclaim the resources even if the exception occurs in constructor.
I found this[^] article and found decent. I did not read it thoroughly though.
|
|
|
|
|
Cool. That's me convinced. Exceptions in constructors is fine then. Thanks!
Regards,
Rob Philpott.
|
|
|
|
|
Rob Philpott wrote: Exceptions in constructors is fine then
Of course. .NET does it all the time, have a look at FileInfo constructor e.g.
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
modified on Sunday, June 12, 2011 9:21 AM
|
|
|
|
|
Hi All,
I have some text (original message) as follows
<i>please see below. i will send another one where its coming on top of the email</i>
I am capturing this text in the mail_forward event in a string
I added some more text (<b>current text</b> which is combination of original message and some more new text)
In the Item_Send event I want to know the index of original message in the current text.
The problem is when I print current text it is as follows
<div>
<p class=MsoNormal>please see below. i will send another one where its coming on top of the email<o:p></o:p></p>
</div>
from where these extra lines and <p> tags <o:p> tags are coming? for this reason
I am unable to find original message in the current text. i.e. I want to find the index of original message in the new text. Can anyone tell me how to do this in c#
Thanks
Sridhar
|
|
|
|
|
hi,
This is mitesh doing engineering in IT. I need help do to the project for finding out the IP Address on LAN. The code must be in C# preferably.
If you can help please mail the code at mitesh_487@rediffmail.com
thank you,
please do it urgently.
|
|
|
|
|
|
namespace NKUtilities
{
using System;
using System.Net;
public class DNSUtility
{
public static int Main (string [] args)
{
String strHostName = new String ("");
if (args.Length == 0)
{
strHostName = Dns.GetHostName ();
Console.WriteLine ("Local Machine's Host Name: " + strHostName);
}
else
{
strHostName = args[0];
}
IPHostEntry ipEntry = DNS.GetHostByName (strHostName);
IPAddress [] addr = ipEntry.AddressList;
for (int i = 0; i < addr.Length; i++)
{
Console.WriteLine ("IP Address {0}: {1} ", i, addr[i].ToString ());
}
return 0;
}
}
}
|
|
|
|
|
Jack - you're it is not recommended that you feed these idiots with code, see d@nishes post, it is quite relevant.
Heaping scorn is a more appropriate answer. Giving a clue to where to look is even better eg point the idiot to the using System.Net; library, feeding an idiot code only encourages them.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
This way you are not helping the poster to learn. Hence I voted you down.
|
|
|
|
|
mitesh_487 wrote: This is mitesh doing engineering in IT.
And soon you will be working for some IT company without any knowledge. And flooding forums with "send me code" type questions.
mitesh_487 wrote: I need help do to the project for finding out the IP Address on LAN. The code must be in C# preferably.
Is this what you call help?
mitesh_487 wrote: If you can help please mail the code at mitesh_487@rediffmail.com
Great going. What do you expect to learn like this?
|
|
|
|