Tuesday, December 13, 2011

MSDN Blog TFS 2005 Undoing a checkout that belongs to another user


MSDN Blogs > TFS Version Control and more .. > 
Undoing a checkout that belongs to another user
mrod 8 Jan 2007 1:04 PM 6
Since we shipped, we have gotten a lot of questions but there is one that keeps reappearing and I thought to write a short blog post so we can reference it in future discussions.
The question is- How do I undo someone else’s pending changes?
The scenario vary greatly but here are the top ones
  • I need to undo a pending change because I need to check-in and someone has it exclusively checked out
  • I just need to undo the checkout lock on the file and not the actual change itself
  • I need to undo all the changes in a workspace because the person has left the company or the group

Unfortunately, we do not support this from the GUI but you can achieve your goal from the command line. Assuming you are an administrator the command that you have to use is:
tf undo /workspace:OtherUserWorkspace;OtherUser  $/Project/ItemName.cs /s:http://yourtfsserver:8080
For the other scenarios I think I will borrow content from one of jmanning blog
1)      As an admin, you have the UnlockOther permission to all items in the version control repository.  This means that you can undo anyone else's locks on any item.  The command-line for that would be something like: tf lock /lock:none $/whatever/item/goes/here/web.config. The lock command is covered @ http://msdn2.microsoft.com/library/47b0c7w9(en-US,VS.80).aspx​
2) As admin, you also have the global version control permission AdminWorkspaces - this gives you the simpler and cleaner approach that you can just delete that user's workspace (you don't have to do it from his machine).  That will take with it any pending changes, any locks, etc. that the workspace was holding.  The command is just:  tf workspace /delete hisworkspace;DOMAIN\hisuser - the workspace command is covered at http://msdn2.microsoft.com/library/y901w7se(en-US,VS.80).aspx
Since the user has moved on to another company, team or project, deleting his workspace is likely the better answer. In addition, you do not have to manually undo that checkout lock (or worry about that user potentially having other locks held in that workspace).
-mario

Monday, May 30, 2011

Application Engineer

Application Engineer via IT Wiki The Application Engineer (also known as an Application Developer) defines the:
  • application solutions that meet Customer requirements,
  • physical software design from the detailed application requirements.
Contents
  1. Responsibilities
  2. Key Role Interactions
  3. Professional Skills
  4. Interpersonal Skills
Responsibilities
The main responsibilities of the Application Engineer are to:
  • Identify, define, and model the application requirements,
  • Define data structures and distribution to satisfy the application solution,
  • Define application solutions that meet Customer requirements,
  • Act as the main project team liaison between the Customer Representatives,
  • Prepare deliverables to support the development and deployment of the solution such as application guides and test plans,
  • Provide continuity during the transition from one stage to the next,
  • Define physical program units and data structures based on the logical model to satisfy the requirements of the application,
  • Prepare deployment and post deployment plans to support the conversion and deployment of the solution,
  • Design and build prototypes. On a RAD project, the Application Engineer builds the Rapid Prototype, which becomes the application system.
Key Role Interactions
The Application Engineer has key interactions with the following roles. These interactions are guidelines only and do not reflect all possible project organizations.
  • Application Architect. Develops application solutions to meet the business needs.
  • Data Architect. Develops an Information Architecture to meet the business needs.
  • Technical Architect. Obtains guidance and support on the implementation of specific technologies.
  • Team Leader. Reports on the status of assigned tasks and estimates and raises problems and concerns for resolution. Raises scope issues for resolution.
  • Human Factors Analyst. Reviews screen, report, and dialogue design and provides feedback.
  • Developers. Provide orientation on the application solution, explains processing requirements, data requirements, and program unit processing, and walks through program unit test plans.
  • Customer Representatives. Define application requirements, demonstrates application solutions, provides training, and guides testing activities.
  • Quality Assurance Manager. Presents deliverables for quality control inspections.
Professional Skills
Ability to:
  • perform the activities and tasks for which this role is responsible,
  • apply the techniques necessary to complete the responsibilities of this role,
  • use the tools required by these activities, tasks and techniques.
Experience:
  • with the selected System Development Environment, including the specific development tools sets, on at least one other project or work assignment,
  • in the application area on at least one other project or work assignment,
  • in defining requirements and conceptualizing solutions on a number of other projects or work assignments.
Interpersonal Skills
All team members require a high level of:
  • Personal Attributes,
  • General Business Skills.
Related White Papers, Webcasts and Content:
  • The 2010 Application Delivery Handbook
  • Empowering the "Business Developer:" Accentuate the Positives and Eliminate the Negatives of Businessperson-Developed Applications
  • Avoid These 7 Fatal Flaws When Choosing Your ERP Solution
  • Rapid Application Development (RAD) Critical Success Factors (Blogs)
  • Application_Architect (Wiki)
  • Architect job advertisements (Groups)
  • Designing an Application Solution for SQL Server 2005 (Training)
  • Industry Overview: Information Technology (Training)
  • Developing Applications that Use SQL Server Support Services (Training)

Tuesday, March 15, 2011

Mod Check 11 CPU too high

I put together a VB.NET function to create a mod 11 check digit. The code is in no way unique to any individual or scenario. Anyone can find hundreds of variations in any basic example book, bulletin board or web site.
The function is inefficient; it uses too much CPU for too long to be useful in the “real world”.
What is done wrong or in a way that can be improved and still function on a 32-bit OS such as Windows XP Sp3, Vista and/or 7?

    ''' <summary>
    ''' Mod Check 11 pegging CPU too high
    ''' </summary>
    ''' <param name="controlNumber">base Account Number i.e. 000345</param>
    ''' <param name="divisor">11</param>
    ''' <param name="weights">137</param>
    ''' <returns>account number i.e. 0003456</returns>
    ''' <remarks>The basics are standard create and attach a check digit to an "base Account"</remarks>
    Public Shared Function CalculateMOD(ByVal controlNumber As String, ByVal divisor As Int32, ByVal weights As Int64) As String
        ' Get Weights Char Array
        Dim validWeights() As Char = weights.ToString.ToCharArray()
        Dim formulaValidWeights As String = New String(validWeights)
        Dim sum As Int32 = 0
        Dim checkDigit As String = String.Empty
        ''Set the weight beginning=2.  
        Dim weightindex As Int32 = 0
        Dim baseAccount() As Char = controlNumber.ToCharArray()
        ' Reverse baseAccount Char Array order
        Array.Reverse(baseAccount)
        ' controlNumberArray - baseAccount Char Array reversed
        Dim controlNumberArray As String = New String(baseAccount)
        For controlNumberIndex As Int32 = 0 To controlNumberArray.Length - 1
            ''sets the weight count to loop from 0 up to weight length.  
            If (weightindex > validWeights.Length - 1) Then
                ''resets weightcount to 0 again.  
                weightindex = 0
            End If
            sum += Convert.ToInt32(controlNumberArray.Substring(controlNumberIndex, 1), CultureInfo.InvariantCulture) * Convert.ToInt32(formulaValidWeights.Substring(weightindex, 1))
            weightindex += 1
        Next
        Dim remainder As Int32 = sum Mod divisor
        Select Case remainder
            Case 0
                checkDigit = Convert.ToString(0, CultureInfo.InvariantCulture)
            Case 1
                checkDigit = "-"
            Case Else
                checkDigit = Convert.ToString((divisor - remainder), CultureInfo.InvariantCulture)
        End Select
        controlNumber = controlNumber + checkDigit
        Return controlNumber
    End Function

Tuesday, February 22, 2011

.NET Runtime version 2.0.50727.3615 - Fatal Execution Engine Error (7A0360B0) (80131506)

Phil's fairly useful blog, Monday, 11 January 2010, Visual Studio 2008 crash using Reporting Services 2008 charts
http://phil-austin.blogspot.com/2010/01/visual-studio-2008-crash-using.html
Seems relevant to my recent .NET Framework crashing issues

In my case Visual Studio 2008 SP1 silently and completely aborts when loading an up until now working Solution (SQL SERVER 2008 SP1, .NET 3.5 SP1, VSTS 2008 Developer, VSTS 2008 Database, TeamExplorer 2008, TFS 2005)
Initially, I crated a blank solution, imported the projects, overwrote the existing solution, bound back to TFS and checked in.
This process seemed to have fixed the issue for a few days, then the crashes started again.

Something new to the environment - SQL SERVER 2008 R2 Express
So we'll strip that out, rebuild the SQL SERVER 2008 Development Ed with Service Packs, SP the VS editions and attempt to move forward.

Even though I'm trying to strip an SQL Server 2008 R2 Express Edition, I found this blog helpful http://sqlblog.com/blogs/aaron_bertrand/archive/2010/10/25/fun-with-software-uninstalling-sql-server-2008-r2-evaluation-edition.aspx
Why?
Because internally the SQL Server 2008 R2 Express Edition is reporting itself to be an Expired Evaluation Edition?
I was required to strip out all 10.5x instances of SQL SERVER 2008 objects, tools, shared components.
Run VS2008 SP1
Run SQL SERVER 2008 Development Ed – added edit existing instances
Run SQL SERVER 2008 SP2

Wednesday, July 28, 2010

Converting string value of an Enum entry to a valid instance of the Enum

"How do I convert a string value of an Enum entry to a valid instance of the Enum?"

C#

String [VariableName] = "StringValue";

[EnumType] [VariableName1] = ([EnumType])Enum.Parse(typeof([EnumType]),[VariableName]);

Example:

String ListSortDirectionString = "Ascending";

System.ComponentModel.ListSortDirection ListSortDirectionEnum = (System.ComponentModel.ListSortDirection)Enum.Parse(typeof(System.ComponentModel.ListSortDirection), ListSortDirectionString);

VB.NET (Option explicit ON, Option strict ON)

DIM [VariableName] AS String = "StringValue";

DIM [VariableName1] AS [EnumType] = CType(Enum.Parse(GetType([EnumType]), [VariableName], True), [EnumType])

Example:

Dim ListSortDirectionString As String = "Ascending"

Dim ListSortDirectionEnum As System.ComponentModel.ListSortDirection = CType([Enum].Parse(GetType(System.ComponentModel.ListSortDirection), ListSortDirectionString, True), System.ComponentModel.ListSortDirection)

Tuesday, March 30, 2010

Visual Studio - hexadecimal editor

I have a project that parses large text files from one third-party source into a bunch of small text files for another third-party printer interface.
Using Regular Expression and Hexadecimal File Editors have been a base necessity.
For example, almost none of the newer print systems use a Form Feed - character code 12 in decimal (0xC in hexadecimal) - Chr(12) -Regular Expression \f - Hexadecimal View 0C
Of course, the third-party printer interface in this scenario required the Form Feed be kept in position.

Nearly every six months, like this week, another alteration is asked for and I find myself back in the code.



Due to the infrequency of use, I find it difficult to keep the details of Regular Expression syntax in my head so I use Expresso from Ultrapico (http://www.ultrapico.com/) which does an excellent job of translating what I want into a .NET Framework Language code snippet.

For my project development I use Visual Studio 2008 SP1 which has as much of a hexadecimal editor "Binary Editor" as I need.

=============================
Visual Studio - hexadecimal editor

Go to File -> Open -> file

Select the file that you want to open, the Open button state will change to enable

Click the small drop down list at the right of the Open button and select Open With

You will get a list of additional editors, choose Binary Editor

http://francoisbeaussier.blogspot.com/2007/04/visual-studio-has-also-hexadecimal.html

Friday, March 26, 2010

Puzzle Eye

I started a puzzle long ago. I was given a block of pieces fit together forming an eye looking at me. “This piece goes just like this,” the elder said as he left me to finish the rest.

The puzzle was large and complex.

Taking my time I found other parts that that fitted together making small understandable blocks, but none fit with the eye. Over time I pieced together a border many small blocks which I had worked out fit into place within the boarder, but not the eye… Surely it would go in this space here, my reason would argue against my experience.

The eye did not fit; more of the puzzle came together; the eye did not fit…

Perhaps I have made an assumption I am not aware of… What do I know?

I know, what I know may be wrong… I carefully dismantled the eye and tested each piece.

Over and over they only came together again as an eye starting at me…

More of the puzzle came together, but as always, the eye did not fit…

Take a break; walk away; come back and try again;

More of the puzzle came together; maybe the eye was not a part of this puzzle…

But then why was it here, given and left staring at me?

Or was that an assumption too?

Then I laughed; I laughed until I was short of breath and tears stained my checks.

Oh, what Joy!

Oh, what a fool I am.

I turned the eye completely round and dropped it into place.