
dsgreen57
Avatar/Signature-
Posts
66 -
Joined
-
Last visited
dsgreen57's Achievements
Newbie (1/14)
0
Reputation
-
the following is a url for a code download, which includes a complete splash screen example in VB.NET it loads a splash screen and starts the main application in a seperate thread http://support.apress.com/signup.asp?bP=/books.asp?s=0%
-
okay I have got closer to solving this.. System.Text.RegularExpressions.Regex myRegEx = new System.Text.RegularExpressions.Regex(@"album=(?<ID>\d*)"); System.Text.RegularExpressions.Match m; m = myRegEx.Match(html); if ( m.Success ) { if ( m.Groups["ID"].Success ) { return Convert.ToInt32(m.Groups["ID"].Value); } } else { return 0; } This returns the first instance found what I need to do now is analyse the second part and return results which match the first part and are like Waiting for the Punch.
-
I have to admit regular expressions elude me, I am terrible at them I am currently loading a website into a .NET class and then need to find whether a match was found. <table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"width:100%;border-collapse:collapse;\"> <tr class=\"litm_0\"><td align=\"Left\">Launch<br>SoundsLike<br>Station</td><td align=\"Left\">Album Name</td> <td align=\"Left\">by Artist</td></tr><tr><td colspan=\"3\" style=\"background-color:#7D0000;\"> <img src=\"http://entimg.msn.com/i/sp.gif\" alt=\"\" border=\"0\" style=\"height:1px;width:1px;\" /></td> </tr><tr class=\"litm_2\"><td><a href=\"/radio/launchradio.aspx?url=%2fsearch%2fDefault.aspx%3ftp%3dalbum%26ss%3dWaiting%2bFor%2bThe%2bPunch&rcd=slalb1& type=album&id=282060\"><img src=\"http://entimg.msn.com/i/radg.gif\" width=\"15\" height=\"15\"border=\"0\" alt=\"Play a SoundsLike station based on the album "Waiting for the Punchline"\" ></a></td><td> <a class=\"subhead2\" href=\"/album/?album=282060\">Waiting for the Punchline</a></td><td> <a href=\"/artist/?artist=101878\">Extreme</a></td></tr><tr class=\"litm_1\"> OK so to get these results I queried a website and then extracted just the results section, now I know by looking at the html that the correct part is the following : href=\"/album/?=282060\">Waiting for the Punchline</a></t><td> How can I write a regular expression, which would extract just that line I specifically need the artist ID, ie. I need to return 282060 from the method.
-
Well this forum hasn't really got a suitable area for this post, so general is the best place in the circumstances so here goes... I am developing a home music system on my pc, and have run across some problems with the Windows Media Player 9 SDK. I need to access the Media Library this should be able to be done using a Primary Interop Assembly (PIA), which is supplied, some of the method calls haven't been included in the PIA. Reading an article on MSDN http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwmt/html/vb_player_article.asp Well this is quite true, running the code included in the article works lblTitle.Text = "Title: " & Player.currentMedia.getItemInfoByType("Title", "", 0) Now, here's the problem the same in C# doesn't, C# knows that the declaration is not included within the Interop code and will not build if you ignore errors it will run but returns the wrong result. Why can Visual Basic .NET run this code and C# can't, is there something you can do within the settings of the compiler to make C# run the code successfully or an attribute you can apply to the code.
-
Design decisions.. static methods and singletons, good or bad?
dsgreen57 replied to wyrd's topic in Water Cooler
Sorry wyrd I will post some code when I get chance to show you what I mean -
I have the a similar problem with adding items to menu's for example if I add a shortcut to a macro, when a close .net and re-open the menu I added has gone. Rather annoying really always assumed I had done something wrong, but maybe its a bug
-
Design decisions.. static methods and singletons, good or bad?
dsgreen57 replied to wyrd's topic in Water Cooler
One area which springs to mind and there are loads which use Singleton's is the game loop in games programming. I often write the game loop within a class and obviously you don't want two of them running. -
Write a class, which encapsulates the logix and use this class to determine whether things have changed for example. class MyBusinessLogic { private string propertyOne; private string propertyTwo; private mflgDirty; public MyBusinessLogic { } public string PropertyOne { get { return propertyOne; } set { if ( propertyOne <> value ) { PropertyOne = value; mflgDirty = true; } } } public bool IsDirty() { return mflgDirty; } } Oh by the way your asking for trouble insulting people on a forum! For more information on the above goto Google and search for Rockford Lhotka and look at his CSLA Architecture, which will give you what you wanted. And one last note the other way mentioned does work, just write the following line in the method. if ( mflgLoading ) exit Obviously you have set the flag in the first place but you would want us to spoon feed answers to you.
-
Efficient Iteration of a Dataset
dsgreen57 replied to Enigma151's topic in Database / XML / Reporting
the other way you could do it is retrieve the xml of the DataSet, then perform a transform of the data, using a XSLT transform, then pass the updated Xml back to the DataSet. -
You will probably find within the Page_Load event of the page you are rebinding the DataGrid. You need to enclose the call to rebind the DataGrid within code like: if ( !IsPostBack ) { myDataGrid.DataSource = GetDataSource(); myDataGrid.DataBind(); } In between the user clicking Save and your OnUpdate() method being run the DataGrid is rebound restoring the values for you, which is probably not what you intended.
-
I have this bug never used to happen must only be in the last week though.
-
My company have recently made the switch from VB 6 to .NET Development. Although true there are tools out there, which will do this... I wouldn't sell it as a major benefit by far the best one is you can debug and step through code seamlessly through languages. I also wouldn't focus on converting the whole team in one go... how we eventually changed was small applications for clients, which proved to be much easier to write in C#. Next time a small project comes up weigh up what is the best language to write it in... suggest writing in .NET.. Only really works for small applications otherwise risk of failure to your boss is too great. Start working in your own time on little applications related to your line of work, and show these to your boss.
-
Does the application ever run out of memory because it is a well known fact that the garbage collector is inheritantly lazy and it wont clean memory unless required by another application. So most the time you don't have to worry about it because if the system needs the memory back then the Garbage Collector will release the memory again.
-
Found an interesting article flipcode.com related to whether to quit or stay in college. http://www.flipcode.com/interviews/school/
-
lol, don't let me stop you getting the SQL one