Troy Lundin's Q&A profile
Visual C# Returning an array
I still need help understanding what is happening here: class ParamArrayWithReturn { public static void Main() { F(3, 2, 15); } public static int[][] F(int n, int m, int value) { int[][] x = new int[ n ][]; for (int i = 0; i < n; i++) { x[ i ] = new int[m]; for (int j = 0; j < m; j++) x[ i ][j] = value; } return x; } } I see that we are going to dimension array to 3 indexes. Then I see what happens after that is that we then create two internal array indexes inside those 3. I also see that in this case, we will end up having the value of 15 at each index. I believe it will look something like this: 15, 15 15,15 15, 15 Now why would we return x here And what happens to it when it returns to the method call I am confused by that part ...Show All
Game Technologies: DirectX, XNA, XACT, etc. DBP Contest
if i enter the warp up i can not enter the main compo Michael Hansen wrote: yo but is says that if you win in the warm up you can not win in the main event or mabye i have miss read the official rulez Based on you interpretation, if the "main" contest's prize is a deal to publish your game and the "warm up" offers USD 500 + MS Win Vista Home Premium, which one would you choose to enter I don't think that is the case. I agree on what has been said in this thread that both contests are to some extent unrelated, so you can enter both and potentially be eligible to win both, but only once per contest (that is, only one of your games could win per contest , regardless the number of you ...Show All
Smart Device Development Win Mobile 5.0 SDK for Smartphone and Win Mobile 5.0 SDK for PocketPC
Is it safe for me to install both these SDK's on the same machine Also, they won't effect any VS projects that I currently have that use earlier versions of the SDK's will they Yes, it is safe and even necessary if you need to develop for both PPC and SP. It won’t affect your current projects but would add new project templates and emulators for WM 5.0 SP and PPC. ...Show All
SQL Server Accessing previous row in Asynch Script Component
I have a series of records that are timestamped and ordered by time ascending. i.e. Time TimeToNext 02/07/2007 11:38:22 0:00:21 <--- Need to calculate these 02/07/2007 11:38:43 0:00:22 <--- Need to calculate these 02/07/2007 11:39:06 0:00:00 <--- Need to calculate these 02/07/2007 11:39:06 0:00:36 <--- Need to calculate these 02/07/2007 11:39:42 0:00:28 <--- Need to calculate these 02/07/2007 11:40:10 0:00:26 <--- Need to calculate these 02/07/2007 11:40:36 Last Record <--- Need to calculate these I need to calculate the difference in time between each of these records. The flow ...Show All
Windows Forms ClickOnce deployment prerequisite error
Hello everyone, I have a project with a few prerequisites. The problem is that when I try to deploy this in the client's computers with user permissions it fails saying the computer doesn't have the permissions required.....This the log for installing the Crystal Reports .Net 2.0 prerequisite: The following properties have been set: Property: [AdminUser] = false {boolean} Property: [ProcessorArchitecture] = Intel {string} Property: [VersionNT] = 5.1.2 {version} Running checks for package 'Microsoft Data Access Components 2.8', phase BuildList Reading value 'FullInstallVer' of registry key 'HKLM\Software\Microsoft\DataAccess' Read string value '2.81.1117.0' Setting value '2.81.1117.0 {string}' for property 'MDACVersion' The following ...Show All
SQL Server Replicate column to subscriber - even it if is unchanged in UPDATE statement
Set publisher database table column to 1. Replicate table to subscriber (column is also 1 on subscriber once it is replicated). Set subscriber database column to 2. Update publisher database column to 1 (even though it is already 1). Change is NOT replicated to subscriber (it stays at 2). This means that replication is comparing the insert statement to its current value in the database. Is there any way to change this behavior We want the the column to replicate to the subscriber. Thanks Peng...XCALL works for what I want to do. Now, I have another problem which I will post a new thread for: Changing Article Properties without a new Snapshot. Linda ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Extracting the transformation matrix for a subobject in a mesh
I have an x-file containing some objects objects. I would like to load this as a mesh and then extract the transformation matrix for some of these subobjects. If I have designed a model (in 3ds max) with a box located at 0,0,0 and another located at 1,2,3 and neither one is rotated or scaled, then the xfile consists of the two boxes and each has a transformation matrix. The first has the identity matrix as its transformation and the second one has a translation to 1,2,3 as its matrix. How can I extract those two matrices without writing code to parse the xfile I need this to build a mechanical model onto which I plcae a number of connector pads. Later I want to design other objects and mount them on those connectors. For example i ...Show All
Windows Forms Custom Control Settings Persistence
Would someone have a simple example for me: I want to add user persistence for a user control. It's a trackbar with a text box below and a Caption above. A contextmenu brings up a propertygrid and lets the user change e.g. Maximum, Minimum, Caption Text etc. Of course he wants his changes persisted and I would like to place that functionality in the control so I don't have to worry about it any more. The IPersistComponentSettings stuff is a bit intimidating, so I would appreciate some example or some tutorial help... Thnx ! See this sample: Implementing IPersistComponentSettings . and this . ...Show All
SQL Server Conversion from MS Access SQL Code...nested if statements
INSERT INTO EligSummary ( PlanVariation) SELECT DISTINCT IIf(Left([BPI],1)=2 Or Left([BPI],1)=3, '1. MED EE', '2. MED DEP' AS PlanVariation) The above is the code i would use in access to Assign either the value 'MED EE' or 'MED DEP' to the PlanVariation field. I am new to SQL Server - how would I accomplish this in SQL Server 2000 If I use SQL INSERT INTO EligSummary (PlanVariation) SELECT Planvariation = CASE left([BPI],1) WHEN 1 THEN 'EE NON MED' WHEN 2 THEN 'MED DEP' ..it requires me to GROUP by on BPI which would cause it to enter 15 different rows for each BPI code as opposed to 2 for EE NON MED and MED DEP...... I would appreciate any help you could give me with this! ...Show All
Audio and Video Development Extending Classes in HDi - not working in Emulator
We're seeing some weird behavior on the Toshiba Emulator. Object oriented javascript runs well in HDi - you can have multiple extensions of a class and they act as expected. However when this script was run in the Emulator all extended classes act like the very last class loaded. So for example if a Food class is extended to veggie, fruit and grain; in they Emulator they all act like the grain class (assuming it was the last one loaded). Am I missing something in the ECMA spec that prohibits object oriented javascript Hey Will, Here is what the spec says ECMAScript supports prototype-based inheritance. Every constructor has an associated prototype, and every object created by that constructor has an implicit referenc ...Show All
Visual Studio Express Editions Basic Game and Interface, How to
Hi there, im new to Visual basic 2005 and im trying to create a simple game using snippits of video and a computer interface to run the game, the only snag is i have no idea where to start. The idea is one video is shown and upon an input on the interface is activated, another video is played. Thats the basis of it. If any one has any info that may help or have any idea if its possible, it would be extremly useful. Thanks. I would think that the wondows media player object would be the place to start. Tools | Choose tool box object | com tab ... find the windows media player Addit to the tool box and start learning how to use videos with it. Then you'll probably be interested in the MCISENDST ...Show All
Windows Forms CheckBoxList does not contain a public definition of 'GetEnumerator' error
Hi, I have a CheckboxList on a web form. I want to cycle through the checkboxes in the list to determine which boxes have been checked. Seems easy enough..but I'm getting an error that the "CheckBoxList does not contain a public definition of 'GetEnumerator'". Here's my code: foreach ( CheckBox cb in cbSRlist) { // get Sales Region the user has access privs for if (cb.Checked){ Response.Write(cb.Text + "<BR>" ); } } ...the error is actually caused by the foreach statement which can't operate on the checkboxlist because it doesn't have a public def of 'getEnumerator. The same error occurs if I replace 'CheckBox' with 'ListItem' in the above foreach stmt. what am I missing th ...Show All
Visual Basic Checkbox and Option button in VB6 sp6 displayed in Black in Vista
The Checkbox and Option button appears black in a form when running the compiled (exe) program in Vista Beta2 Build 5384 and I use a manifest file (Exename.exe.manifest) when running the program. I already adjust the Backcolor and the MaskColor property still it appears black where you cannot read anymore the text. Any solution or alternative to this. We're sorry but these fora are for Dot.Net software. If you have a VB6 question, please make use of the Visual Basic 6.0 Resource Center to find a solution to your problem. OTP ...Show All
Smart Device Development Display html image other than webbrowser control
Hi all, I am displaying a html file using Webbrowser control.I want to display the image file that occurs in the html file in other control other then webbrowser. For example , <html> <body> <P> This is sample html file. <a href="\My Documents\1.jpg">Click here</a> </p> </body> </html> if i click the text click here the image 1.jpg should be displayed in some other controls like picture box.So how to do I am using netcf 1.0 with webbrowser control of opennetcf. Hi, You could try handling the Navigating event and detecting the specific image URL in question (or perhaps parse the URL to see if it specifies an image) and then ...Show All
Visual Studio Function evaluation disabled because a previous function evaluation timed out. You must continue execution
This error happens when you sit at a check-point for around 30-40 seconds. Is there a way to disable this When I attempt to continue execution (to another break-point on the next line), it does not stop. Is this a Visual Studio setting or a runtime setting. Hi, What is happening is that break state was reached and something is being evaluated (e.g. property) in the Locals/Watch/etc window. Looks like this is timing out. You can disable property evaluation by default via the option Tools -> Options -> Debugging -> General -> Enable property evaluation and other implicit function calls. The side effect is that properties will not be evaluated by default. See blog entries like http://blogs. ...Show All
