b6s's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Port asm to HLSL help please
Could someone who is more intelligent than me please convert the below asm code to HLSL. You will have a place in heaven if you do this ..... :O) Thanks, Dave PixelShader = asm { ps_1_1 tex t0 tex t1 // Specular dp3_sat r1, t1_bx2, v1_bx2 // r1 = (2.0 * (NormalMap - 0.5)) * (2.0 * (vSpecular - 0.5)) dp3_sat r0, t1_bx2, v0_bx2 mul_sat r1, r1, r0 mul_sat r1, r1, r1 mul_sat r1, r1, c2 // Diffuse + Ambient dp3_sat r0, t1, v0_bx2 mad_sat r0, r0, c1, c0 mad_sat r0, r0, t0, r1 }; PixelShaderConstant1[0] = (cAmbient); PixelShaderConstant1[1] = (cDiffuse); PixelShaderConstant1[2] = (cSpecular); the asm shader ...Show All
Visual Basic Question about Visual Basic 2005 connect to SQL Server 2000
I want to display two join tables information in one data grid in VB2005, how i can do that Can any one tell me You could also create a View in the SQL server, using essentially the same JOIN as Dman1 described. Then use the View as a source for your data grid. ...Show All
Visual C# How to Insert Only the newest row added to the dataset
I have a dataset that contains some 3 rows....when i add a new row and I want to insert that new row it inserts all three rows again so i end up with seven rows the 3 that were there already, a copy of the 3 that was there and then 1 for the new row.....when i just want it to insert the newest row that i added to the dataset...Is there anyway to get this done foreach (System.Data.DataRow currentRow in _dsContacts.Tables[0].Rows) { currentRow["CustomerID"] = this ._CustomerID; currentRow["TypeOfContact"] = this ._ContactType; string sql = System.Configuration.ConfigurationSettings.AppSettings["ConnectionString"]; using (SqlConnection connect = new SqlConnection(sql)) { using (SqlC ...Show All
Visual Studio Prevent rules from firing during model deserialization
I have code in my custom rules that connects to a database and populates values in the associated model entities. Obviously, all this information is persisted in the dsl file, so I dont actually want these rules to execute when loading up the diagram into the designer (this causes the 'Add' rules to be fired for example), only when I actually drag and drop a new object onto the canvas. Is there some way I can tell the system, or some code I can put into my rules, that can determine if the rules is being fired during model deserialization This would be very helpful... Thanks!! found the answer! http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=505399&SiteID=1 Thanks (c; ...Show All
Smart Device Development Getting Focus Handle after lost
Hello, i need help related to getting focus. when it loss focus through any reason (i.e any phone) because i loss the focus my application is still running it draw white images inside of actuall images. i want some event or API that will remind my application that focus is back to the application so i will redraw the content (photo). any code sample or resourses is highly appreciated. Thanks in advance Regards Salman Try SetForegroundWindow and ShowWindow then do UpdateWindow. SetForegroundWindow((HWND)((ULONG) hWnd | 0x00000001)); ShowWindow(hWnd, SW_NORMAL); UpdateWindow(hWnd); ...Show All
Visual Basic How to insert data (probably simple question)
I am quite newbie and I have one, probably simple question. I try to insert data into my database (SQL Server 2005) with this code (VS .NET 2003): Friend Sub Datainsert(ByVal Name As String, ByVal Surname As String, ByVal DateOfGame As Date) Dim ConnectMe As New Odbc.OdbcConnection ConnectMe.ConnectionString = "Driver={SQL Native Client};Server=localhost;Database=ProjektKoncowy;Trusted_Connection=yes;" Dim Writeit As New Odbc.OdbcCommand("INSERT INTO ProjektKoncowy.dbo.Wyniki (Name, Surname, Points, Status, DateOfGame, KindOfGame, Autor) VALUES (Name, Surname , ' 3 ', ' 1 ', DateOfGame ,' 4 ','John Smith')", ConnectMe) Writeit.Connection.Open() Writeit.ExecuteNonQuery() ConnectMe.Close() End Su ...Show All
SQL Server dimension design
In my telco cube, I want to analyze usage. Eg how much sms's a subscriber has sent. The fact table is completely denormalized and has lots of columns with different types of usage. For example, following columns occur: MO_VOI_PEAK MO_VOI_OFFPEAK MO_VOI_WEEK MO_VOI_WEEKEND Now the sum of these fields overlap. Evenings during the week are also offpeak... This is only an example. Different categories occur for different products, like voice, sms, mms and so on. And not all categories apply to all products. Eg, mms does not have the peak and offpeak distinction. Is it possible to put this into one dimension, without aggregating double I have already normalised the fact table, meaning tha ...Show All
Visual Studio 2008 (Pre-release) Switchable Panel overlay
Hi guys n gals, I'd like to create a panel that can be "activated" to be drawn over a panel/page in my application. THe idea is that this panel fades over the current page in my xaml app and shows a "waiting.." message when a server call takes longer than expected. The only solution i can think of is to have a canvas as the base container for everything and then dynamically add/remove a panel to it at the "front" z index. The problem is doesnt that mean the other child components wont automatically resize if they are added to a canvas The app still needs dynamic resizing.... Any ideas Cheers, S> In addition to Doug's approach, you could also give the contain ...Show All
Visual Studio Team System Code analysis check-in policy.
Hi, 1. Do I need VSTS for Software Developers for the code analysis check-in policy to work 2. If not then how do I enable the built-in code analysis 3. I noticed I've got the fxcop folder and rules under "C:\Program Files\Microsoft Visual Studio 8\Team Tools\Static Analysis Tools" - does this help me regards, Av Hi Av, 1) Yes. You can get more details here: http://msdn2.microsoft.com/en-us/library/ms182075(VS.80).aspx . Notice that this is all under the Team Edition for Developers section. -Matt ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Error when starting new project
Well, I'll start with some background information... I'm on WinXP home, SP2, on a laptop. When I go to start a new project (just file>new project>windows game) it gives me "the specified module could not be found" . I have Visual C# express, and "XNA Game Studio Express (Beta 2) Version 1.0" installed. I have searched for this error, and couldn't find anything of any help to me. I have also tried uninstalling, and reinstalling everything. So, any help (that doesn't involve too many more reinstalls) would be greatly appreciated. Thanks. I did have beta 1 installed, and I did uninstall it before upgrading. I actually uninstalled C# studio as well... A friend of mine has been getting the same error as ...Show All
Smart Device Development Question from newbie about reading file name from listview
Hello I've been searching forums for solution of my problem. I think it's very simple but I have no idea how to make it works. In my project I have got a simple listview with *.txt file names from program directory. I would apprecciate it if someone told me how to get value (file name) of currently selected key. Any help would be welcomed! Something tells me we're not using the same programing language lol... ...Show All
Visual Studio Team System Pass in parameter to TeamBuild
I know that TFSBuild.rsp can be used to pass in msbuild parameters to the command line when a TeamBuild is fired, but is there any way to do this on the command line directly e.g. in my TFSBuild.rsp file I have: /p:SkipClean=true;SkipInitializeWorkspace=true;ForceGet=false this will carry out an incremental build,, but I dont always want to do it so I'd rather pass these in on the command line when using TFSBuild.exe to start a build. Is it possible We did face the same issue. But we created a file called "c:\Project1\build.option" in the build server <Propertygroup> <SkipClean>true</SkipClean> <SkipInitializeWorkspace>true</SkipInitializeWorkspace> <Fo ...Show All
Visual Studio Team System TeamSuite including Database Professional
Hello! You write that Database Professional will be available as MSDN Download around 7th or 8th December. What about the TeamSuite Version including Database Professional When will this be available And to make it more difficult: I like to know also about the German version :) Regards CSharpNewbie22 >>We have installed the German version of VS 2005 TeamSuite. So we can install the Database Professional English Version that comes out this week with this installation without problems << I'm not 110% sure but I think so since the localisation is for the most part menus and the help files and that is VS general. What could be a problem is the location of the solution file ...Show All
.NET Development Issue About Registry Entry Through Setup
Hello All Actually I have made a setup project that has to make the entry in registry.The specified dll will be in the %Systemdrive%Program Files folder at the client machine from where the setup will run. I have make this registry entry value type as Reg_EXPAND_SZ and its path as %Systemdrive%Program Files but when this setup runs it makes the entry as %Systemdrive%Program Files, I wonder why setup don't replaces the SystemDrive with (c:/,d:/) while it runs. I want the entry with the C:/ProgramFIles ....and I wanted that setup to detect the systemdrive at the Target Machine and then replace the variable "systemdrive" with actual drive and then make the entry in the registry. your help in this ...Show All
Smart Device Development How to remove or kill default phone application (cprog.exe) from WM2003 SE Phone
Hi guys! I have an application, which phone functionality for WM2003 SE Phone (T-mobile MDA III). The default phone app. of PPC - cprog.exe is very "insolent" and in some cases shows differnet UI elements! If I kill its process, after some seconds Services.exe starts it again! My question is: Is possible to remove or kill cprog.exe Regards Hi Alex I can't understand something! I was create a program, which use RIL - with managed (netcf) and unmanaged (eVC dll) parts! I'm catching the changes in network signal quality, notifications for calls, Network operator info and others... In the same time you say, that "you don't want to use RIL directly ". Ok, but why my program works Thanks and ...Show All
