Mohsen Kokabi's Q&A profile
Visual Studio Team System Date formats in .trx file
The results file (.trx) contains startTime and finishTime in Int64 format which is a bunch of digits. I was wondering if there is an easy way to change the output type so that these fields are more readable. If not, I would like to know what the Int64 means, so I can convert it to a Date/Time using code. Thanks, Hi Hammad, You can get those numbers from the UI, when loading the trx files. Int64 is a long value in C#, you can use System.DateTime class if you're interested in changing to a meaningful format programatically. Thanks, David Gorena Elizondo [MSFT] VSTS ...Show All
Visual Studio Team System Intellisense in TfsBuild.proj for the custom task
Hi, How to get the intellisense for the custom task in TfsBuild.proj There is no intellisense for TfsBuild.proj itself since there is no schema defined. You can get intellisense for the generic msbuild tasks by replacing the opening 'Project' element the following line at the top of your TfsBuild.proj file: <Project xmlns=" http://schemas.microsoft.com/developer/msbuild/2003 "> Patrick ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Trouble choosing a random spawn location in 2D tile based platformer
Hi everyone, I'm in the middle of creating a 2D tile based game. Just a minor problem I am encountering: I have a CSV file which is read into an array for the level map - this all works fine. I am have a second CSV file with the same number of rows/columns which holds numbers to represent spawn points for weapon power ups. I want the power ups to randomly appear, but only at one of a few specific locations, basically at one of the tiles where the value is '2'. The problem is I am trying to randomly pick a tile by using a do ... while loop, which is proving to be very costing, slowing the game to a halt until the loop finds a valid tile. I'm not very good at explaining this but hopefully you understand what I mean, anyway heres the code (be ...Show All
.NET Development MethodInfo and Out Parameters
Hi all, How to take the value of the out parameter of a Method which is invoked through Reflection For ex: string msg = "" ; object retObject = null ; MethodInfo mInfo = managerType.GetMethod( "Update" , BindingFlags .Public | BindingFlags .Instance, null , new Type [] { typeof ( string) , typeof ( string ).MakeByRefType(), typeof ( object ).MakeByRefType() }, null ); mInfo.Invoke(managerObject, new object [] {obj, msg, retObject }); In the above method invocation msg and retObject were out parameters in the method Update. Please help in getting these values after the method is invoked. Thanks, Suresh. I had a similar question and found ...Show All
SQL Server Need example -- SQLCMD -y
Hi, Please can any one let me know jhow to use -y option with SQLCMD. Hi, It is giving me an error C:\>sqlcmd 1> use lfin 2> sqlcmd -y 8000 -Q"SELECT definition FROM sys.sql_modules WHERE object_id = OBJECT_ID('PLocation');" 3> go Msg 102, Level 15, State 1, Server test, Line 2 Incorrect syntax near 'sqlcmd'. Thanks in advance ...Show All
Windows Forms Webbrowser Control:Position of images in iframes/frames
Hi All, I have a web browse control hosted in a windows form. I want to calculate the coordinates of all the images present in the web page displayed in the webbrowser. I am adding all the documents(main document and the iframe/frame documents) in a HTMLDocument list on the NavigateComplete2Event. I am using GetClientRects() to find the coordiantes. From these documents I am able to get the correct image position if it is the main browser document( i.e. when browserControl.Document.url = documentFromList.url), but for other documents, it gives the displaced image coordinates. The image, top-left coordinate returned for such documents is usually wrt (0,0).However, they return correct anchor coordinates. Is there any other approach ...Show All
Visual Studio ZipItem and ZipProject, Zip project contents at build time
I'm attempting to zip some contents of a project in order to create a Project Template (I've already created the template, I wish to rebuild it with each build). How can I use ZipItem and ZipProject, I cannot find documentation on their usage I've been looking at an IronPython example which generates Zip files using VSProject content with <Import Project="C:\Program Files\Visual Studio 2005 SDK\2006.07\VisualStudioIntegration\Tools\Build\Microsoft.VsSDK.targets" /> .... <ItemGroup> <ZipItem Include="Templates\ProjectItems\Entity\Entity.gmf" /> <ZipItem Include="Templates\ProjectItems\Entity\__TemplateIcon.ico" /> <ZipItem Include="Templates\ProjectItems\Entity\MyTempla ...Show All
Visual Studio 2008 (Pre-release) WSE066 Error
Hi, I'm getting the following error on a few clients. -------- Microsoft.Web.Services3.Security.SecurityFault: Message Expired ---> System.Exception: WSE066: Timestamp is expired. This indicates a stale message but may also be caused by lack of synchronization between sender and receiver clocks. Make sure the clocks are synchronized or use the timeToleranceInSeconds element in the microsoft.web.services3 configuration section to adjust tolerance for lack of clock synchronization. -------- I've set the timeToleranceInSeconds to 14400 and verified that the clients receiving this error are within this time window. Since this is only happening on about 5% of my clients, I think this is a client configuration issue and not a service re ...Show All
SQL Server Install regular SQL Server Management Studio over SQL Server Mangement Studio Express (SSMSE)
I installed SQL Server 2005 Express edition with the SQL Server Mangement Studio Express (SSMSE) on my work laptop. When I tried to manage the SQL Server 2005 instances on our servers, I couldn't expand/drill down on the DB Maintenance Plan. This prompted me to find out that this may be one of the features that are lacking in the "Express" version of the SSMS. Therefore I'm in the process of finding a way to 'upgrade' my SSMSE to regular SSMS. I popped the installation disc of "SQL Server 2005 Standard Edition" and there are client tools/components that I can install which I believe SSMS (Management Studio) is part of it. However when I clicked through the wizard I was told that all the components are already instal ...Show All
SQL Server Group age by a parameter and find out the value corresponding to that.
Hi guys... My goal is to change the given stored procedure so that I can find out the different age gorup according to users parameter and find out sumof these values for that group: s.TVmins, s.Notional$, COUNT(*) AS Qty, SUM(s.TVmins) AS TVMinsAmt, SUM(s.Notional$) AS NotionalAmt For that I am planning to put another parameter @count for the group interval and I need to group accordingly. So my answer should look like: if the user give the @count value as 10: the result should: age group TVMins Notional 1-9 1560 125632( the sum of that particluar group) 10-19 -- -- --- 91-100 -- --- I have a field DOB( Date of birth) , I have to extract age from that field first and then g ...Show All
SQL Server File System Task - output file variable syntax????
Hi This should be incredibly simple and easy, but I can't find any examples of how to do this. I just want to make a File System Task move a file, and have the destination be filename + date and time. For example \\server\share\filename02072007.txt What syntax do I use in a variable to make this work Thanks How about: " \\\\server\\share\\filename " + (DT_STR, 4, 1252)DATEPART("yyyy", @[System::StartTime]) + RIGHT("0" + (DT_STR, 2, 1252)DATEPART("mm", @[System::StartTime]), 2) + RIGHT("0" + (DT_STR, 2, 1252)DATEPART("dd", @[System::StartTime]), 2) Or something similar anyway!! -Jamie ...Show All
Visual C# Save my program for God's sake!!!!
Just as I was getting some decent work done on my project, I set down my keyboard to make a bathroom run, and once i returned, I found my cat lying on my keyboard... When I tried to clean up the constaint garbage that was created by him, I tried running my program and found a ton of new errors. What makes it worse is that I have this bugged sucker saved... Tried cleaning it up, and like a freakin moron, I saved it before I re-ran the program. Apparently I changed something mere mortals such as my self shouldn't have touched. partial class Form4 { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel. IContainer components = null ; ...Show All
Visual Studio Team System Help me!!!
When a variable is declared, the compiler will give the variable a default value. Such as When I declare like this “ int i;” , the compiler will give 0 to “ i“ So In the IL code is there any difference between “ int i;” and “ int i=0” If there is no difference between them, is there any other method to get the difference int i = 0; is actually a slight performance hit compared to int i; reason being that int i = 0; will allocate space on the heap and then it will apply the value of zero to the allocated memory. int i; will allocate the memory, and by default the value will return 0 until changed. to answer your question, I'm 99% sure that the IL retains the assignment (as it doesn' ...Show All
Visual Studio Express Editions Opening Form 2 with push of button on Form 1
Thanks for all your help so far. I am slowly working my thru my little program. And have come upon another problem. I have a button on my main screen that i want to open a second screen with. So far I have coded the button with: Dim myform as new Phone_Messages() myform.ShowDialog() My problem is that the second form loads behind the first form and I cant see it or enter anything onto it. Can anyone tell me where I am going wrong. Weird, I tested this and it worked fine, but try something like: Dim myform As New Phone_Messages() myform.ShowDialog() myform.Focus() I have no idea if this will work. ...Show All
SQL Server Dynamic RDLC generation layout problems. Overlapping.
I am dynamically creating an rdlc file at runtime. I use multiple Matrixes (Matrices ) throughout the report. The problem is, upon viewing, the report isnt rendered the same way as if it was created as design time. The matrices overlap, where as if I create a similar scenerio at design time, they are moved to accomodate the size of the previous element. I have tried many different things as far as the Top and Left attributes go, as well as setting the ZIndex on all of the items to be 1 or 0. Nothing seems to work, they all just overlap. If anyone has any input on this, it would be greatly appreciated. nomer This is an rdlc file that I am having the issue with. Can you notice anything that may cause ...Show All
