sebastian_v_b's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. HLSL - do all my matrix math inside shader?
Hi All, Just getting into HLSL, and was wondering if someone can advise if there's any drawbacks or problems doing my matrix math inside the shader, like world * view * projection, offloading it from the CPU. Specifically, I want to pass in my world transform matrix for the object into the shader, and have it do: objectWorld * commonView * commonProjection thx, p. That's actually a bad thing to do on the shader, because it will be executed again and again for each vertex (or pixel). Actually, if you do this with a modern DX SDK, the HLSL compiler will take out these calculations and turn them into pre-shaders that are executed on the CPU once prior to sending the results as constants to the GPU. ...Show All
Visual Basic Textbox Caret Line, Col
I'm trying to find the Line and Column of the caret. When I searched these forums earlier, I found a this Function: This is getting trickier... I don't believe that the code you had to start with worked at all... What I've found is that in Visual Studio 2003 the return value of the TextBox.Lines property is being calculated based on CRLF characters. It does not seem to count wrapping. So if one line of text (no returns) spans multiple lines in the control, the Lines property still returns 1. In VS05 this is not the case. If one sentence spans three lines the property returns 3. I'd say that original code was meant for VS05. You'll have to write an algorithm that uses the current position, the number of characters in each line, ...Show All
Windows Forms Add a TextBox Control to DataGridView
I have added a TextBox Control called tb to a DataGridView Control called dgv as follows: dgv->Controls->Add(tb); I add data to tb: tb->Text = "This is some data"; This works fine except for one strange issue. When I click into the TextBox to edit data, the arrow, Home, and End keys get handled by the DataGridView control - they change the cell selection and have no effect on the caret's position. However, once I enter a character into the TextBox from the keyboard, these keys are handled by the TextBox control and will move the caret accordingly. How can I get the TextBox control to handle these keys (position the caret) without having to first enter a value from the keyboard Seems like some DataGridV ...Show All
.NET Development Executing Native Code From A Managed Thread
Hi -- I'm about to reread the Geoff Schilling/Dave Stutz book -- which, now that I know what I need to learn from it, will be much more meaningful and useful to me than when I read it the first time, But before I do I thought I would ask one basic question that you guys might be able to inform me about. I'm wondering if it is possible and easy and done fairly routinely to call unmanaged code (that makes, for example, extensive use of Thread Local Variables) from within a managed thread without having to do a thread context switch in some way to an unmanaged thread Don't I remember that there is some kind of managed environment stack frame that allows you to do this And if so, does the managed environment place any significant limitat ...Show All
SQL Server SQL Server 2005
When I click Start, All Programs, SQL Server 2005, SQL Server Management Stusio, SQL Server Management Studio Opens, then Connect to server Windows appears. Using Windows Authentication and server type as Database Engine, I click connect and get the message "cannot connect to server1. Additional Information: An error has occured while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings of SQL Server does not allow remote connections. (Provider: Named Pipes Provider, error:40 -Could not open a connection to SQL Server) (Microsoft SQL Server , Error: 1231)" I am using a stand alone Windows XP Professional Computer. What can I do to be ...Show All
Visual Studio 2008 (Pre-release) Problem with template parameter inference
Hi All, I want to extend all IEnumerable<T> with a method called SomeOp. Usually I would define the extension like this: static class Sequence { public static IEnumerable<T> SomeOp<T>(this IEnumerable<T> sequence, Func<T, bool> func) { return sequence; } } As the operation always returns an object of the input type, I want to be able to write: List<int> integers = new List<int>(); List<int> ints2 = integers.SomeOp(x => true); To do so, I defined the exension method like this: static class Sequence { public static Enum SomeOp<T, Enum>(this Enum sequence, Func<T, bool> func) where Enum : IEnumerable<T> { return sequence; } } Compil ...Show All
Software Development for Windows Vista Adding roles to WorkflowRoleCollection
Hello, I'm developing a workflow with ASP.NET authentication. I have assigned some event handlers in the workflow a WorkflowRoleCollection in their Roles property. When I want to fill the WorkflowRoleCollection with the roles that can raise the event, apparently I don't do it right. The problem is that when I raise that event I get an exception saying something like "authorization error in eventhandler guardaHorari1", and by checking the exception details I've thought that the problem is that when it checks the role of the user that tries to launch the event agains the workflowrolecollection, it doesn't find it there. I fill the collection this way: public WorkflowRoleCollection rolsModificadors = new WorkflowRoleCollection(); ...Show All
Visual C++ lpMaximumApplicationAddress invalid ?
In MSDN, it is stated that lpMaximumApplicationAddress should be the highest address available to applications and dlls. Hwoever, the following program crashes. int _tmain(int argc, _TCHAR* argv[]) { SYSTEM_INFO Info; GetSystemInfo(&Info); size_t m_MaxAddress = (size_t) Info.lpMaximumApplicationAddress; int* ptrmax = (int*)(m_MaxAddress); ptrmax--; unsigned char val; //test for reading validity unsigned char* ptrread = (unsigned char*)ptrmax; val = *(ptrread); //0xC0000005: Access violation reading location 0x7ffefffb. //test for writing validity unsigned char* ptrwrite = (unsigned char*)ptrmax; val = *(ptrwrite); *(ptrwrite) = val; //0xC0000005: Access violation reading location 0x7 ...Show All
SQL Server Accessing Report
Hi, I am using IIS 5 and MS SQL Server 2005. My problem is I can deply the report in report server but unable to access.After deplyin g the report when I typed the url( http://localhost/reportserver/......) in internet exploer I am getting an internal error. How can I solve this problem..... Best Regards, Anupam. I installed SQL Server in mixed mode(windows,sql server authentication) and no additional installation was there. Thanks, Anupam. ...Show All
Smart Device Development Program Hangs in VS2005/Device Emulator
I'm attempting to debug a project using Visual Studio 2005 and the Windows Mobile 5.0 Smartphone emulator. Everything was working ok - project was running etc, then for no apparent reason (no code or settings changes) the project now hangs as soon as it begins executing on the emulator. Also the program files and the test files I was using were no longer in the emulator's directory. Tried other projects(that all previously worked) - same result. Tried debugging my project and others on a device through VS 2005, all worked fine. To date I have tried... Uninstalling and re-installing the project via the emulator. Clearing the saved state. Soft re-setting the emulator. Hard re-setting the emulator. ...Show All
Architecture Multi-tiered Application with client Server Architecture
I want to Develop a Multi-tiered application with Client Server Architecture. I have one server and many clients around 10 to 15 or even more than that. I have one problem. When some master data is inserted by some clients it must be available to all the clients and server application at the same time and if the other clients has already opend the master form then it also immediately updated when another clients inserting record in that master. Can any one give me solution for this problem. How to implement this in .net 2.0 Thanks in advanced Nayan Thanks. Diego Dagum wrote: Hi Nayan, You'll find several application examples at the MSDN SQL Server Developer Center: http://msdn2.microsoft.com/en-us/ ...Show All
Windows Forms No Touch Deployment?
I hope this is the right place for this... I have a windows form exe that references 20 dlls. I created place for it on a server within a virtual folder. I can run the exe and it will call the dlls without any problems. The only issue I have is updating. Whenever I place an updated DLL into the folder the application will still run off the one in the Temporary Internet FIles instead of my updated one. I am using System.Reflection.Assembly.LoadFrom ( http://server/folder/dllname ) to call it. Any suggestions on how I can get it to update without having the users clean their Temporary Internet Cache. I am lost, I have searched for what seems like a week now on this. I could really use some help. Thanks in advance, SB ...Show All
Visual Studio Team System Question about importing
I am testing out TFS right now, and trying to get our Process Template set up. I am wondering if you can change your Work Items once you have imported in your Process Template.<br><br>i.e. I finish editing our Process Template and import it into our TFS and create a new project. Now, 6 months later someone wants me to add a new field to a WI or a new WI completely. Is it possible to just export our Process Template, edit it and re import it, and continue on (will our project update all the fields, WI's etc. ) or do we have to start out from scratch again with a new project What are the keys to doing this a seamlessly as possible Thanks for any help. Most people do the import export by using a ...Show All
Visual Basic [OTP]NEW to VB, Simple REFRESH Script... HELP PLEASE!!!!
Talk about frustration!!!!! This script is dying on line 10... It worked for over a year, and now it kicks out.. here is the script.. I'm sorry but these forums are for .NET programming questions only...please see any of the following links for help with VB6 Useful Links Visual Basic 6.0 on MSDN Library Visual Basic 6.0 Help and Support Visual Basic 6 Support on Windows Vista VB 6 Service Pack 6 Microsoft Visual Basic 6.0 Common Controls Visual Basic 6.0 Upgrade Guidance Visual Basic 6.0 Code Advisor Visual Basic 6.0 Upgrade Samples Visual Basic at the Movies Other VB Web Sites VB-Helper Code Guru Planet Source Code VB City VB Forums C ...Show All
SQL Server Move characters into seperate Columns
Hi, I need to move each character (ie, | or |x) from the below text in column 'Col' into seperate columns (col1,col2,col3,col4,col5,col6). I tried replacing each characters with increasing numeric nos but it replaced all of them into '1'. Could any suggest an alternate way. --Text I I I |x I I Please take a look at the link below: http://www.sommarskog.se/arrays-in-sql.html It has some queries and TVFs that you can use to split a string into values. You can then write a query like below in SQL Server 2005. select ps.[1] as col1, ps.[2] as col2, ps.[3] as col3, ps.[4] as col4, ps.[5] as col5 from split_str(@str, @delimiter = ' ') as s pivot ( min(s.value) for s.idx in ( [1], [2], [3], ...Show All
