frederikm's Q&A profile
.NET Development To regex - or not to regex?
Hi, I have yet another regex query - this time regarding the retieval of a URL from HTML. I have a string called HTML, with a number of links on it. The format for these links is something like: <a href="/index/welcome.php action=one&section=27">one</a> Now, I only want the link which is called one (in the link text - so between the > and the </a>), and from that link I want everything between the " marks. Can anyone help me do this Thanks This pattern should work. \<a[^>]*\>([^<]*)\<\/a\> It is defined as: <a Any character not in ">" zero or more times > Capture Any character not in "<" ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Collision - Boundingbox
Hey guys it’s me again I have one further question. How can I make Boundingboxes and Collisiondetection. I now the sample in the help documentation but i don`t understand it and it doesn`t really work. Could someone give me a sample collision class Can you also show me how to use the class boundingbox i am to stupid for it. Thanks to all Thank you very much that was what i needed. 2 Last questions First one: what are these two parameters for NodeContent input, ContentProcessorContext context and where to i get it in my mesh Second one: I tried to use boundingsphere but aren't the to large for simple meshes like my player mesh. Because i thougth it ’s like a circle around the mesh isn't it ...Show All
Game Technologies: DirectX, XNA, XACT, etc. XNA with Windows Forms - Game does not stay active
I programmed my own FormsGraphicsComponent like this: public class FormsGraphicsComponent : IGraphicsDeviceService , IGraphicsDeviceManager , IDisposable { public FormsGraphicsComponent( Game game, IntPtr renderWindowHandle) { ... } ... } Then used a standard windows form as a base, placed a Panel on it, that I exposed as a property of the form. Starting with almost a standard game, I modified the main program to this: MainForm form = new MainForm (); using (MyGame game = new MyGame(form.RenderPanel)) { game.Begin(); form.Game = game; form.Show(); while (form.Created) { Application .DoEvents(); &nb ...Show All
SQL Server SQL Server 2005's sysperfinfo return Null !
When I want to get the SQL Server 2005's some performance from the sysperfinfo table using "select * from sysperfinfo", I found that it returns null. Why How can i get the values like sysperfinfo in SQL Server 2000's sysperfinfo Thanks a lot. Thanks for your help. The result of 'select * from sys.dm_os_performance_counters ' is still null. What's wrong I am waiting for your help. By the way, the version of SQL2005 is 'Microsoft SQL Server 2005 - 9.00.2047.00 (Intel X86) Apr 14 2006 01:12:25 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Evaluation Edition on Windows NT 5.0 (Build 2195: Service Pack 4) ' ...Show All
Smart Device Development Deploying Mobile Applications using SMS
I would like to deploy a client application to mobile devices. I have heard its possible to embed a link in an SMS message that will permit the download of a client application. How does this work and will it allow a .cab file and auto installation of same. Where can I find example code or a description of how this works. Client will be running on Win Mobile 5.0 devices. Any guidance would be appreciated... -- Thanks in advance. pretty much you send an sms with the link to your application, which the user clicks on and downloads the file, or rather navigates to the link they clicked on. That's all there is to it really. ...Show All
Smart Device Development Technique to view large jpgs
What's the best way to view a high resolution jpg photo I tried the picturebox control in a form approach, and it won't work for high resolution photos because when the Bitmap class converts the jpg to a bmp, it's too huge for the device. I would like to scale it to the screen size (I scaled it before and so I know it will work), but I have a "chicken or the egg" problem. I have to convert it to a Bitmap first before I can scale it. Bitmap hiResBmp = new Bitmap("hi_res_photo.jpg"); //dies here Bitmap smallBmp = MyScaleImageMethod(hiResBmp) pictureBox.Image = (Image)smallBmp; Or is the only solution to pre-process the jpgs (make them smaller) before loading them on the device Thanks ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Using vetex color
I am drawing 3 lines that represent the 3 axis. The 3 axis are to be 3 different colors. Is there a way to draw using the vertex color using BasicEffect or will I have to write my own Right now I am just rendering the 3 lines seperately changing the diffuse color each time. using ( VertexDeclaration decl = new VertexDeclaration ( m_graphics, VertexPositionColor .VertexElements)) { m_graphics.VertexDeclaration = decl; m_graphics.Vertices[0].SetSource(m_vb, 0, VertexPositionColor .SizeInBytes); BasicEffect bEffect = new BasicEffect (m_graphics, null ); bEffect.Projection = Matrix .CreatePerspectiveFieldOfView(( float ) Math .PI / 4.0f, 400.0f / 400.0f, 1.0f, 1000f); bEffect.View = Matrix .CreateLookAt( ...Show All
Internet Explorer Development Please help! :) How to completely disale IE cache?
Hi, How can I completely disable IE cache or set it's size to 0 I would like to test http throughput but I cannot manually clear the cache every time. Thanks, - Janne_K Janne_K wrote: Hi, How can I completely disable IE cache or set it's size to 0 I would like to test http throughput but I cannot manually clear the cache every time. Thanks, - Janne_K Or is there maybe some way to clear the cache each time IE starts Any kind of solution would help. ...Show All
SQL Server Login failed for user 'NT AUTHORITY\NETWORK SERVICE'
I have: (1) SQL 2005 on a member server, Windows Authentication (2) I'm using Visual Studio.Net 2005 on my Windows XP sp2 work station. (3) From my machine, within my development application, I have no problem accessing the Data in the SQL server. (4) I Receive the Login Failed error after I copy my project to the Test Web Server (Same machine that houses SQL) and test from either my machine or from the host server. More details of the error message are: Login failed for user 'NT AUTHORITY\NETWORK SERVICE'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Det ...Show All
Architecture Efficient Image comparision and sending Image Difference
Scenario: Client Program needs to send Screen shot after every 100 milli seconds. Now i want to compare 1st sent screen shot with the next captured screen shot. I want to calculate the image difference and send only the difference betwwen the two screenshots to the server. and then the 2nd Screenshot will be genrated on the server. Conversion to byte array and then comparision is possible but that is very slow. I need an efficient method. Because speed is the concern overhere. regards I'm not too sure about the code, but it seems ok. Anyway, you can try encode the difference by some algorithm such as run length encoding, since most of the time the screenshot wouldn't have much difference, which ...Show All
.NET Development Displaying Data
I had a checkbox (Template Field) in a Gridview, "ChkEmail". What i want to do is when ChkEmail.Checked = True, it will search the gridview selected row and find <asp : BoundField DataField ="Email" HeaderText ="Email" SortExpression ="Email" /> cell data and return the data to a textbox ("TxtEmail"). Display shd be like this (In the textbox);- " Email@email.com , Email2@email.com , Email3@email.com " How do i do that, i'm using VB language in VB.Net 2005 Thanks howzit you can loop through the rows as follows to see if the checkbox is checked or not if it is then textbox gets the value of the em ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Math.Abs inner workings?
I'm trying to decide how to structure my code based on Math.Abs function. Does it just flip the signed bit to make the number positive Or does it check for a negative value and if found, multiply the number by -1 Ummm.. If it matters to you that much, why don't you just write your own :) I mean you can't change the function in the Math lib even if you found out. Best thing would be for you to profile your code and find which routine have the best performance. ...Show All
Smart Device Development does there exist a fileopendialog for smartphone2003 in evc4?
tks No. Please see this: http://www.codecomments.com/archive425-2006-1-749631.html ...Show All
Windows Forms DLU vs Pixels
Hi, I'm reading some reference material I found on the net, they give a suggested distance for placing elements in the forms (example was a Dialog Box) for the apperance to look good and correct, the measurement they talk about is DLU (Dialog Box Units), and Visual Studio as far as I know handles pixels, is there a way to convert the units to DLU's or to be able to convert manually to the closest pixel range Example: 7 DLU = XXX Pixels or a formula to calculate the any given DLU to pixel and viceversa Any help would be appreciated. Thanks DLU's depend on the font used on the form. Quote from MSDN docs: " A DLU is based on the size of the dialog box font, normally 8-point MS Sans S ...Show All
Smart Device Development End Call Event
Hi, Is there a way for an application running on a smartphone (ex: SMT5600) to get a callback when a call ends I would like to write the code in C#, but if I need to I would be happy to use C++. Any advice would be appreciated. thanks, Jake You can do this using the State and Notification Broker APIs in Windows Mobile 5.0, but unfortunately there's no simple way to do this in earlier releases. You can probably find some sort of TAPI call that will do the trick, but you'll have to do it in C++ and it'll be messy. Neil ...Show All
