hrubesh's Q&A profile
Visual C++ More C# -> C++/CLI issues w/generics
Does anyone know if there is a C++/CLI equivalent to the C# 'default' keyword when it is used to produce the default value for a generic type Below is a hack I came up with, which I do not consider to be the least bit elegant, and was wondering if there is something I'm missing or if someone knows of a better solution. ////////////////////////////////////////////////////////// /// /// the gc_default() macro can be used like C#'s default() /// Perhaps this syntactical sugar may be a bit much, as it /// may emit a distinct type for each generic param. #define gc_default(T) __gc_default<T>::__value ////////////////////////////////////////////////////////// generic<typename V> public ref struct __gc_default { public ...Show All
Visual Studio Team System Extraction/validation Rule Code
Is there anyway we can get coded versions of the built in extractio/validation rules I am writing some custom extraction rules and mine are only slight changes to the build in ones so it would nice to not have to write all of the code. VB code would be cool, but C# is fine now that I found a working convert. http://www.dotnettaxi.com/tools/converter.aspx Thank you to the person here who posted it!! ~Todd See my answer in the following post http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=509966&SiteID=1 ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Video/Animation Playback
Hi, I'm currently writing a library (for XNA/DirectX) for animation/soundless video playback, and I have a few design questions for the pros out there if you don't mind answering them : I'm having my animation class inherit from game component, and update the frame depending on game time in the overriden Update method, and render it in the overidden Draw method, but even when I preload my textures to render, playback is choppy. Not sure exactly why, but I notice this only when I have significant number of frames (I noticed it with 100 frames, but *not* with 10/15). This problem may be linked and solved by the 2nd point, so please read on. When I preload all the textures for the frames in the animation (and the no. of frames ...Show All
Visual C# show backspace and CR in a textbox
Hello, I wrote a program to simulate a terminal. however when i communicate with for example procomm or hyperterminal, the textbox can't translate the BKSP and CR. instead it just show some garbage character. Other characters work just fine. textbox1.SelectionStart = textbox1.TextLength; // put the cursor at the end of line textbox1.SelectionLength = 0; textbox1.SelectedText = str; textbox1.ScrollToCaret(); this is the way how i add the received string into the textbox. anybody has any idea how to solve this how would you delete the last character Im developing in a pocket pc environment. it doesn't seem like i have access to environment.newline. ...Show All
Visual Studio Second page always blank in report
Hello, I have a problem regarding a report created using data from SQL Server and called from a windows form. My report has always at least 10 pages and everytime I run it the second page does not show anything except some labels. Besides this, I have a group header, which counts something for every month. Every time the month changes, the number must be reset. This thing works a little bit, but once on 3 or 4 pages it counts 2 times the same number (ex: 1,2,3,3,4,5,etc...). I would appreciate any answer. Regards, ...Show All
SQL Server Can't copy a database
I want to make a working copy of a database to a new name on the same server. I use the wizard giving the same name for source and destination, but giving the db copy a new name. I get an error that says "One or m ore arguments are invalid." But no hint as to what is wrong. Is it that I can't copy on the same machine You want to do a 'backup database' and 'restore database' to create a new database based on the old database. Here is a script that you can use. use master go declare @db1 sysname,@db2 sysname, @name1 sysname, @name2 sysname, @file1 sysname,@file2 sysname, @sql nvarchar(1000) set @db1='Northwind' set @db2='NewBD' set @sql='select @name1=name,@file1=filename from '+@db1+'.. ...Show All
Game Technologies: DirectX, XNA, XACT, etc. My first game... Asteroid Defense.
In this game you are a ship protecting a planet from incoming asteroids. Controls: 360 controller: Left Joystick -- Move ship left and right. A -- Shoot Right or Left Trigger -- Change Weapon. Keyboard Left and Right Arrow Keys -- Move ship left and right. Up and Down Arrow Keys -- Change Weapon Space -- Shoot The weapon you are using is shown in the top left corner. The stronger the weapon you use, the less points you get for destroying an asteroid. Levels progress at timed intervals and more and more asteroids come down. You lose when one of them reaches the planet. Screenshot: http://www.rocketsoft.gm-school.uni.cc/uploads/ADScreen.JPG Game File: http://www.rocketsoft.gm-school.uni.cc/uploads/AsteroidDefense1.1.rar All in ...Show All
Visual Studio #Error if text in Globals!PageNumber Expression?
In my RDLC file, C# ASP.NET 2.0, VS 2005 Express, I'm unable to format "Page n of n" because I get the following error message if there is text in the format expression for Globals!PageNumber: Warning: The Value expression for the textbox ‘ textbox4’ contains an error: Input string was not in a correct format. (rsRuntimeErrorInExpression) I am able to include text with Globals!ExecutionTime. My entire XML for PageFooter is below. only textbox4 fails. Thanks for any ideas. Kim <PageFooter> <ReportItems> <Textbox Name="textbox10"> <Left>5.75in</Left> <Top>0.125in</Top> <ZIndex>2</ZIndex> <Width>1.75in</Width> ...Show All
SQL Server SQL Server 2005 Express Edition with Advanced Services SP1
i have an installation of SQL Server 2005 Express Edition and now i want to upgrade to SQL Server 2005 Express Edition with Advanced Services SP1 but without uninstall the old version...could someone help me... Sorry I didn't notice this earlier. In this case, Jens is not correct; the upgrade from SQL Express RTM to SQL Express Advanced SP1 is fully supported. I think the confusion is that there was a bug in the beta release of SQL Express Advnaced that prevented you from upgrading from the beta release to the final release of SQL Express Advanced. In general, you can always move up in Edition (i.e. SQL Express to SQL Express Advanced) as long as the Edition you are installing is at the same or higher service pack level (i.e. SQL E ...Show All
SQL Server Account lockout problem with sp_send_dbmail
I am running this code in a job: EXEC msdb.[dbo].sp_send_dbmail @profile_name = 'Blah Blah', @recipients = 'blah@blah.com' , @subject = 'Server Report 1', @body = '', @execute_query_database = 'DBInfo', @query = 'EXEC dbo.usp_SvrRpt1;', @query_result_header = 0, @query_result_width = 300, --@attach_query_result_as_file = 1, @query_result_separator = ''; GO Because I am creating a total of 6 server reports, I alter the subject and query like so: @subject = 'Server Report X' --where X is replaced with values 1 to 6 @query = 'EXEC dbo.usp_SvrRptX' --where X is replaced with values 1 to 6 I can run 4 reports without any problems. If I run more than 4 reports in the same batch, my network account under Windows 2000 Activity Direc ...Show All
Visual Studio Express Editions new line character
'Am using this code to convert a textbox (txtWords) entry into a list of words where each word ' is followed by a new line character so that a sentence is split into a list of words. So that if the sentence is - the quick brown fox, the list of words appears as the quick brown fox ie each word on a separate in a textbox Dim strWords() As String = txtWords.Text.Split(" ") Dim wordCount As Integer = strWords.Length For intCounter As Integer = 1 To wordCount Dim Words As String = strWords(intCounter - 1) 'this is where I have trouble. txtWords.Text = Words & " \n" Next Was also reading about Array.ForEach Generic Method. Would this help in acheiving the result If so how should I use this The syntax of this m ...Show All
Smart Device Development Beta of Microsoft Certification Exam 70-540
Microsoft Certification Exam 70-540 is available in Beta form right now! This is a Technology Specialist exam for application developers in the mobility space. The Preparation Guide is available for the Exam at: http://www.microsoft.com/learning/exams/70-540.mspx . To register visit one of our independent testing providers: * Thomson Prometric: http://www.prometric.com/ContactUs/T...rs/default.htm * Pearson VUE: http://www.vue.com/ms/ Please use the following promotional codes when registering: Exam 71-540: BTA540 Best of luck! Howard Dierking Product Planner Developer and Database Certifications Microsoft Corporation Hi Jeff, The reason that the scores for the mobility betas cannot be ...Show All
SQL Server how we get the text() value
how we get the text() value. your always give half answer, ---------------------------------------------------------------------------------------------------- Youe Solution declare @query varchar(8000) select @query = 'select month ' + ( SELECT distinct ',SUM(CASE WHEN Status = ''' + status + ''' THEN Count END) AS [' + status + ']' AS [text()] FROM sometable s FOR XML PATH('') ) + ' from SomeTable group by month' select @query exec (@query) It looks like you are just doing a FOR XML query, so you dont need to use the XQuery text() operator. You should be able to use SQL's CAST/CONVERT operators: http://msdn2.microsoft.com/en-us/library/ms187928.aspx ...Show All
.NET Development ODBC Error - Not a Valid Month
People.. my problem is that my application works fine on my machine , but when i installed in another PC, at the time to run the Query i get this error: "ODBC Oracle Error: Not a Valid Month " Can someone tell me how can i fix this .... That was the answer.. TO_DATE... since i started to use it in the SQL statement it works fine in others computers.. THANKS A LOT, PAUL / JAN !! ...Show All
Software Development for Windows Vista Where can I download RC1?Please give me the Site,TKS
Where can download RC1 TKS! It is not a public release and the release is only available for certain companies and users. If you do not know how to get it you probably are not part of this group. One way to gain access to it (legally) is to get a MSDN subscription. ...Show All
