GGardiner's Q&A profile
Visual Studio 2008 (Pre-release) Generate Proxy classes
Hey! I are building a chat client/server with WCD and it works grate. But when i Added A Datacontract(chatMessage)(Instead of simple string) i cand generate the proxy class to the client This is how my Contracts looks like: [DataContract] public class chatMessage { [DataMember] private DateTime mSent; [DataMember] private string mSentBy = ""; [DataMember] private string mMessage = ""; public DateTime sent { get { return mSent; } set { mSent = value; } } public string sentBy { get { return mSentBy; } set { mSentBy = value; } } public string message { get { return mMessage; } set { mMessage = value; } } } //The interface the service expose ...Show All
Silverlight (formerly WPF/E) Creating animations programmatically
Hi Everyone, Is there a way to programmatically create storyboards in the current drop Example: I have a number of objects and an animation that I want to be applying to some of the objects programmatically. A new animation might be needed before the previous one completes, so naturally I'd want to design the storyboard once, and then clone a new storyboard each time it's needed, set the target and start it. Ideally it would be great to have controls / resources for that. But here's what I'm trying to do in the current CTP: this.xaml = '<Line><Line.Triggers><EventTrigger><EventTrigger.Actions><BeginStoryboard>'; this.xaml += '<Storyboard x:Name="{name}" Storyboard.TargetName="{targetName ...Show All
Windows Forms Order of event
What is the order of event after the valuechanged in a combo box or datetime picker in the valuechanged event , i wanted to check if the input in valid or not if not, i will assign the value to the default but it happens in this valuechange and it will have infinite looping. regards Alu You should not rely on the order of events unless the events are specified as occurring in a specific order (such as BeginSomething, EndSomething). The ordering of events is an implementation detail. As far as defaulting invalid values you can handle that in the ValueChanged event handler. You should not get in an infinite loop provided that the new value is valid. Take this sample code: ValueChanged handler (E1) { if not valid Value ...Show All
Visual Studio Team System Skipping a webtest in the PreWebTest event
Hi, I need the ability to skip an entire webtest if my test meets certain criteria. Currently I'm just stopping the webtest, but in the results it still counts it as a fully run test. Anyone know how to have it skip the test entirely so that it doesn't show in the Total Tests run Thanks, Cliff Yeah, I messed with that but it's not exactly what I need. Basically I need to skip the entire test so that it doesn't count in the total tests run. I my case I have a set of data that may be in use and can't be run synchronously. Thanks! Cliff ...Show All
Visual Basic VB.Net & Windows ZIP Utility
I'm trying to create a zip file though vb.net and move files into it using the built in windows zip utlity. so far I can create the zip, but not able to move any files to it. Here's my code: Dim emptyZip As Byte () = {80, 75, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} 'Dim oApp As Object File.WriteAllBytes( "c:\x.zip" , emptyZip) 'The following code I found somewhere but doesn't work 'oApp = CreateObject("Shell.Application") 'oApp.Namespace("c:\x.zip").CopyHere("c:\Book1.xls") Any Suggestions Here's as method using shell32.dll. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Collision Detection in 2D Games
Hi, So far I have figured out how to get object moving on the screen. I have also figured out how to detect colissions at the edges of the screen. However, I am having trouble figuring out how to detect the collision between two objects. Say for example, two bouncing balls in a 2D game. How can I detect the collision of this two objects I imagine it has something to do with sine and cosine Thanks, Oblivion. Hey Michael. Thanks for the great tutorial on colission detection. That helped out a lot. BTW, you have great collection of tutorials. However, most of them (the beta 1 versions) are rather difficult to use and learn from due to the changes form beta 1 to beta 2. Are you planning on conv ...Show All
.NET Development One-Way IM
Hey I was wondering how I would go about making a program that would send text or numbers to my computer from another computer. This is basically like an IM program, but one way. Any help well, it would be even easier to copy the file to a shared folder on the destination pc simply use System.IO.File.Copy(source, destination) ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Xbox 360 Development
Yes I know it's a little early but since beta 1 of the XNA Game Studio Express won't have Xbox 360 development will beta 2 include this or not Is it too early to tell -- Mike You would think that they would want to beta this feature but something in the faq said that MS does not beta this type of thing on 360. That being said I think they will have a private beta 2. ...Show All
SQL Server Dim design / MDX help
I have two queries one runs very fast and other very slow. The difference is very little is both. I must be doing some thing wrong is dimension design but not able to solve it. [Eq up 2sd %] - is a calculated member which I bring to Pivot table to test fast and slow running queries. When I look into profiler fast query has some events "Query Subcube" and then end query but for slow one I get "Query Subcube" then there is pause with Notification - Flight Recorder Snapshot begin then Server state discover begin/end and same group again and again. My Instrument Sector Dim has attributes (attributes -> <relation>) Instrument Desc -> Issuer Desc, Issuer Desc -> Sub Ind cd, Sub Ind cd -> Ind Cd, Ind Cd -> Inst ...Show All
.NET Development Memory build up
Hi, I have an application that uses .NET remoting. I am having some problems with regards to memory, the server application just keeps on building up memory and its not reclaiming it. My application includes formula calculations that may run a very long time. After the memory build up it throws an OutOfMemoryException. I tried disposing objects and object references and still no luck. The funny thing about it is I tried running a fewer batch of calculations just to see if the server is reclaiming its memory after calculating successfully, to my surprise it doesn't. Another wierd thing is that after the calculations, maximizing and minimizing the server console application does the trick of reclaiming the memory. Any opinions would be ve ...Show All
Visual Studio Team System Advice on procedures for managing code reuse with TFS Source Control
Hi, This is probably going to be a long post. I am responsible for managing code reuse in my organisation, and I am looking for some advice on using TFS source control. I have somewhat simplified things for the sake of clarity. Lets say we have some developers working on project A. They develop an assembly that contains some useful validation functionality that I would like other development projects (projects B and C) to have access to. I have a seperate source control entry for reusable code called "framework", so my source tree currently looks like this: \$ - Project A - UI - Domain - Framework.Validation - Project B - UI - Domain - Project C - UI - Domain - Framework Now, I want to move the validation code t ...Show All
Game Technologies: DirectX, XNA, XACT, etc. 2D Sprite Rotation Issue
For some reason my sprite will jitter while moving if I rotate to 270 degrees (it flips at exactly 270 degrees). Any suggestions float xSpeed = (float)(Math.Sin(Angle) * mSpeed); float ySpeed = (float)(Math.Sqrt((mSpeed * mSpeed) - (xSpeed * xSpeed))); if (adjustedAngle < 0) { ySpeed = ySpeed * -1.0f; } if (adjustedAngle < -180) { ySpeed = ySpeed * -1.0f; } if (adjustedAngle < 90 || adjustedAngle > -90) { xSpeed = xSpeed * -1.0f; } if (adjustedAngle < -270 || adjustedAngle > 270) { xSpeed = xSpeed * -1.0f; } ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Vector maths methods...
Following a long day of writing and debugging some nasty rigid body physics code, and feeling the pain of the maths library I have to use for this C++ work, I thought I'd take another look at the XNA maths code to see if the results would be more readable (as you might hope ;). ... But my quick look at the framework docs seems to show more deficiencies than in the code I have been using all day... 1/ There is no Point3 class. This is a real pain as libraries that don't distinguish points and vectors are a right pain - transforming a point by a 4x4 matrix will result in a different result to transforming a vector. (And I don't want to resort to coding every point/vector as a homogeneous coordinate either!). There appears to be a ...Show All
Visual C++ wide characters
#include "stdafx.h" #include <iostream> #include <string> int main() { std::cout << "Please enter your first name: "; std::string name; std::cin >> name; std::cout << "Hello, " << name << "!" << std::endl; return 0; } wchar_t where do i put this in for wide characters like japanese thanx You need to replace cout, cin and string with wcout, wcin and wstring. You will also need to add the L prefix to string constants to make them wide strings: #include "stdafx.h" #include <iostream> #include <string> int main() { std::wcout << L"Please enter your first name: "; std::wstring na ...Show All
.NET Development How can i include other aspx files into my current apsx file
i want to include already build aspx file into my current apsx file, how can i do this. in simple asp, i have done it using directives. can any one tell me the exact syntax of including other files. Can this method be used for integrating aspx into classic asp. With Classic asp we usr the #include,. I have some classic Asp prgs that I want to use and include aspx into. ...Show All
