Tuesday, January 24, 2017

Wednesday, January 18, 2017

Remove lock from locked files in other work-spaces TFS

You can use visual studio sidekick. But its really easy to run following command on visual studio command prompt. Make sure you are running visual studio command prompt as administrator.

tf undo  /workspace:COMPUTERNAME $SERVERPATHTOFILE

Thursday, January 5, 2017

File transfer plugin not working - apche cordova, windows 10

I had this problem for weeks. It's seems to be this issue comes to me randomly for no reason. But finally I found the solution. But the reason for this problem is still hidden.

First of all it is not a problem with apache cordova or visual studio. It's windows 10 network settings. All I had to do is reset network settings of my windows 10 computer.


Search "Settings".

Click on "Network and Ethernet"

Click on "Status"

Click on "Network Reset" .

Restart your computer.





Tuesday, January 3, 2017

Convert decimal coordinates to normal readable coordinates.

Sample input ::

FieldValue = 51.467696956223364, -0.1153564453125;


function GetStringCoordinate (FieldValue) {
    if (FieldValue != null && FieldValue != undefined && FieldValue != '') {
         
        var coordinateArray = FieldValue.split(',');
        if (coordinateArray.length == 2) {
            var latFloat = parseFloat(coordinateArray[0]);
            var lngFloat = parseFloat(coordinateArray[1]);

            //latitude formatting 
            var latCh = coordinateArray[0] > 0 ? 'N' : 'S';
            var latD = Math.trunc(coordinateArray[0]);
            var latM = Math.trunc(coordinateArray[0] * 60 % 60)
            var latS = Math.trunc((Math.abs(coordinateArray[0]) * 3600) % 60)
            var latStr = latD + "° " + latM + "′ " + latS + "″ " + latCh;

            //longitude formatting 
            var lngCh = coordinateArray[1] > 0 ? 'E' : 'W';
            var lngD = Math.trunc(coordinateArray[1]);
            var lngM = Math.trunc(coordinateArray[1] * 60 % 60)
            var lngS = Math.trunc((Math.abs(coordinateArray[1]) * 3600) % 60)
            var lngStr = lngD + "° " + lngM + "′ " + lngS + "″ " + lngCh;
        }

        return latStr + ', ' + lngStr;
    }

    return '';
};