Joe Horton's Q&A profile
Visual Studio 2008 (Pre-release) Whats the best way to determine whether or not an Entity already exists in the DB
I'm asking with regards to using Linq to Entities. Lets assume that before I persist an Entity, I want to make sure that it doesn't already exist. I notice there's a GetObjectByKey method, but it throws an exception if the key is not found. Also, I can't do something like... var e = (from c in model.MyEntities where c.Name = "Senkwe" select c); if(e.Count() > 0) //Can't do this because Count() is not yet implemented e.ToSequence().First() // Will throw an exception for an empty sequence (and First() is not even implemented actually) Any workarounds I'm missing Thanks. Senkwe Senkwe, Sorry about that. Misinterpreted your question. This code ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Game Design Question: Multithreading
My understanding of the game loop in XNA (excluding setup and teardown) is: 1. Update 2. Draw I know there are benefits to multithreading an application but am unsure how to apply that to game design. I'm stuck on the idea that you need to complete all your updates for game state, running scripts, and so on, before you move on to drawing. The only benefit to multithreading during the Update stage that I see would be to get update tasks done faster. But all the threads would have to finish up their work before moving on to drawing. Actually, that's what I do with my Earth Orbit demo: I have a thread that computes the day-night texture on the fly as Earth rotates during its day. This happens as a background task so that it is rea ...Show All
Visual Studio Team System Deleted Folder still visible- Can't remove
I deleted a folder. Other users can't see the folder but I can. I checked and unchecked show deleted items just to be sure. I did Get Latest and Get Specific version on the entire project (with force get). I did refresh on the tree. I restarted the IDE. Still shows the folder after that. Richard Berg MSFT wrote: Well, it's not SCE's fault. The server thinks you still have an old (non-deleted) version of the item. Running Get should fix it. But we can see the item was deleted. I have run get from the root of the project and that folder itself, both get specific (force) and get latest with no luck. ...Show All
.NET Development reading a dataset!
dear All please excuse me if I use the wrong terminology as i am brand new to the world of IT. I have created a dataset ds and read an xml schema into it. here is my xml <myroot> <prec number="1"> <equation id=1> <x></x> <y></y> </equation> <equation id=2> <x></x> <y></y> </equation> </prec1> <prec number="2"> <equation id=1> <x></x> <y></y> </equation> <equation id=2> <x></x> <y></y> </equation> <equation id=3> & ...Show All
Audio and Video Development VMR9 Renderless with YUV Mixer mode black screen issue
Hi all, I render video (TV or DVD) on Vista with VMR9 Renderless (Basic or D3D Scene) and with YUV Mixer mode, video display black; On XP, it works well. If I disable YUV Mixer mode, it will display normal, does Vista not support YUV Mixer mode Who can tell me the reason Thanks in advance! Regards, Zhiquan Would you mind telling us what kind of video card you have Does this happen with all content or just with specific videos (If it's just specific videos, please tell us where we can find something that will reproduce your issue...) ...Show All
Visual Studio Menu items disappear on first use
Following the model suggested in sample code, I've been able to add to the main menus in the Visual Studio development environment with my Add-In. Curiously, however, my menu items disappear after my first attempt to use any of them. The menus don't, nor do submenus. Only the menu items do. Here's how I am creating them: IdeCommand = IdeCommands.AddNamedCommand2( _ _addInInstance, UniqueName, MenuCaption, Description, True, 0, Nothing, _ CType(vsCommandStatus.vsCommandStatusSupported, Integer) + _ CType(vsCommandStatus.vsCommandStatusEnabled, Integer), _ vsCommandStyle.vsCommandStylePictAndText, _ vsCommandControlType.vsCommandControlTypeButton _ ) IdeCommand.AddControl( _ ParentMenu.CommandBar, _ ParentMenu.CommandBar.C ...Show All
Visual C# Why C# does not provide to inherit more than one class (Multiple inhetance)?
Hi, I have a besic question. can any one explain why microsoft removed the multiple inheritance feature from c#, while it is available in c++; thanks in davance There is no definitive answer to this question. Multiple inheritence results many problems such as diamond problem so microsoft may be didn't include the multiple inheritence in c#. A / \ B C \ / D So which copy of A does D get The one from B, the one from C Both This way various languages resolve this problems is discussed here: Also you can achieve multiple inheritence through interfaces so no need of multiple class inheritence.Also this concept of multiple class inhritence is a bit confusing. ...Show All
.NET Development SmtpClient.send is not working on smtp.gmail.com but SmtpMail (.Net1.1) are working very well. I don't know why?
using System; using System.Net; using System.Net.Mail; using System.Net.Mime; using System.Threading; using System.ComponentModel; namespace Examples.SmptExamples.Async { public class SimpleAsynchronousExample { static bool mailSent = false ; private static void SendCompletedCallback( object sender, AsyncCompletedEventArgs e) { // Get the unique identifier for this asynchronous operation. String token = ( string ) e.UserState; Console .WriteLine( "sending begin....." ); if (e.Cancelled) { Console .WriteLine( "[{0}] Send canceled." , token); } if (e.Error != null ) { Console .WriteLine( "[{0}] {1}" ...Show All
Visual C++ Accessing Image resource (bitmap)
Hi, I tried but without success to access a bitmap file which I added in my application resource file as following: "resource.h" #define IDB_LOGOBWVISU 107 "app.rc" IDB_LOGOBWVISU BITMAP "Dessins\\LogobwVISU.bmp" How do I access this resource from within managed C++ code taking into account that I want to assign it to following Image object: System::Drawing::Image* Logo_Visu; Many thanks in advance, Stephane Hi Kenny, I followed your suggestion and went to following location: Configuration Properties > Linker > Input > Additional Dependencies When I click on the "..." button to add " ...Show All
SQL Server AVG MDX Function
I have been trying to solve a calculated measure using both the sum/count methods and the avg function, but neither is working for the result that I want. We are trying to come up with an average course score based on an average test score. Example: user takes two tests (test1 twice for 50% and 100% - avg = 75% test2 once for 100%) and the course average would be (75+100)/2 = 87.5%. In our MDX we are getting (50+100+100)/3 = 83.33% instead. We do have a hierarchy set based on course-->test-->test iteration where test iteration is each individual score. The overall average works the way you would typically thing with the sum/count method, but not based on how we want it to calculate AVG(AVG(test1 scores) + AVG(Test2 scorces)). I t ...Show All
Visual Basic MessageBox.Show is Not Displayed Properly!
I’m using Visual Basic 2005, I have experienced a problem with displaying a message box after opening several windows form in the same project. After the messagebox.show function is executed, the project freezes which is a correct behavior (You can hear a sound if it is a typed message box), but the message box is NOT displayed on screen! You need to open any application with a maximize mode and minimize it again to see the message box! As a wasted effort, I tried to re-install .NET Framework 2 and Visual Basic! Please Help Thank you for your interest and respond, but I have figured out what the problem was! I have a form that I used to display datagridview images column, ...Show All
Windows Live Developer Forums Polygons
I have this great demographics layer in a GIS format that is separated into polygons. I would like to throw this layer onto VE and make each polygon highlight when hovered over. In addition, once I click on the polygon, it would either zoom into that area, or pop-up a window with more info, or do additional things...Has anyone done that already Sorry almost overlooked your response: Your probably looking at the polygon tool thats available on local.live.com and want to duplicate that functionality in your program. At the moment it hasn't been released in the API and currently the polygons that you do stick on the map are (not exactly though) static images. ...Show All
SQL Server SSIS Package Configuration Filter
We have more than 100 packages which referenced many of the same data sources. In ideal situation, we would like to create three master filters based on the dev, test, and prod servers and all packages can just reference the same filters. However since one package normally only use a subset of master connections defined in the configuration files, if only those subset of connections are set up in the package, when the package is first open in BIDS, lots of errors will pop up saying that it could not find the connections defined in the configuration files. Even though this will not cost runtime error, it is still very annoying. Does anyone have better ideas on how to handle this Jamie, Thanks for your r ...Show All
Game Technologies: DirectX, XNA, XACT, etc. please help
I'de put a pictuer up of the insidint but i can't. When i try to debug it will say, "Couldn't connect (ALOT of stuff) please rebuild project, or place in the right location." i put the right location and i started all over but it's like not working for me soneone please help me!! Using my psychic powers, I believe the original poster is trying to cross-debug from Windows to Xbox 360. When trying to start the program, the 360 apparently does not answer, and the IDE will generate an error about that fact. Make sure that you're signed in to the creator's club, have set up the Xbox to listen for PC connections, have added the right IP address, etc. I think there might even be an Xbox remote d ...Show All
Visual Studio Team System Visio 7.1 for EA and VS2005
Background: My system has the following software, installed in this order: 1) Windows XP Pro SP1 2) MS Office 2000 Pro 3) Visual Studio .NET 2003 Enterprise Developer 4) MS Project Standard 2002 5) WinXP SP2 update 6) All .NET framework 1.1 updates to that point (current on box is 1.1.4322) 7) MS Office Professional 2003 (upgrade from 2000 Pro) 8) Visio Professional 2003 9) .NET Framework 2.0 Beta (2.0.40607) 10) .NET Framework 2.0 Beta (2.0.50215) 11) Visual Studio 2005 (beta 2.050215-4400) Now here is the problem; I now need specifically to use the Enterprise Architect Edition of Visio for some UML modeling and integration with VS2003 projects etc. Both before and after a complete uninstall of Visio Pro 2003 (reboot), The Vis ...Show All
