This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param( | |
| [switch]$quiet | |
| ) | |
| $zipExe = "C:\Program Files\7-Zip\7z.exe" | |
| $dateStr = '{0:yyyy-MM-dd}' -f (Get-Date) | |
| $buFileName = "\\my-machine\c$\Users\me\Documents\backup\VM_MyDocBU_" + $dateStr + ".7z" | |
| $myDocs = "C:\Users\me\Documents" | |
| pushd | |
| cd $myDocs | |
| & $zipExe a -r $buFileName $myDocs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; comment/uncomment, the way it was intended to be... | |
| #IfWinActive ahk_class AxMainFrame | |
| ^k:: | |
| Transform, CtrlC, Chr, 3 | |
| Transform, CtrlU, Chr, 21 | |
| Input Key, L1 M T1 | |
| if Key = %CtrlC% | |
| Send ^e^c | |
| if Key = %CtrlU% | |
| Send ^e^u |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void exportAllProjects() | |
| { | |
| // get the project list, and export all projects. | |
| Array projects; | |
| int i; | |
| ProjectNode sharedProjects, privateProjects, projectNode; | |
| str myDocsPath, filePath; | |
| #WinAPI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [string]$tf = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe" | |
| pushd | |
| cd c:\ax2012tfs | |
| & $tf history /r /stopafter:50 * | |
| popd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [string]$tf = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe" | |
| [string]$npp = "C:\Program Files (x86)\Notepad++\notepad++.exe" | |
| # [string]$tempFile = [System.IO.Path]::GetTempFileName() | |
| [string]$tempFile = "$env:temp\tfStatus.txt" | |
| pushd | |
| cd c:\ax2012tfs | |
| & $tf status > $tempFile | |
| popd | |
| & $npp $tempFile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| param ( | |
| [string]$cs1 = $( Read-Host "Enter changeset 1 (as c9999)" ), | |
| [string]$cs2 = $( Read-Host "Enter changeset 2 (as c9999)" ) | |
| ) | |
| [string]$tf = "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\TF.exe" | |
| [string]$npp = "C:\Program Files (x86)\Notepad++\notepad++.exe" | |
| [string]$tempFile = "$env:temp\tfDiff.diff" | |
| pushd | |
| cd c:\ax2012tfs | |
| & $tf diff cus /v:$cs1~$cs2 /r /f:unified > $tempFile |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static void AjhDictEnumTest(Args _args) | |
| { | |
| // originally from http://arsalanax.blogspot.com/2012/02/get-values-of-base-enums-using-code-in.html | |
| EnumId enumId = enumNum(ActionType); | |
| DictEnum dictEnum = new DictEnum(enumId); | |
| int nElements = dictEnum.values(); | |
| int i; | |
| for (i=0; i < nElements; i++) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static void AjhTestTextBuffer(Args _args) | |
| { | |
| // ajh 2013-05-24: is the TextBuffer faster than using string concatenation? | |
| // from http://www.mail-archive.com/axapta-knowledge-village@yahoogroups.com/msg07289.html | |
| TextBuffer tb; | |
| str a,b; | |
| int i,j; | |
| int ts, te; | |
| ts = WinAPI::getTickCount(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// return true is the specified user is in any of the roles in the roleNames container. | |
| /// </summary> | |
| /// <param name="axUserId"> | |
| /// AX user id, e.g. curUserId() | |
| /// </param> | |
| /// <param name="roleNames"> | |
| /// container of role names to check. (use role NAME, not label.) | |
| /// </param> | |
| /// <returns> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /// <summary> | |
| /// return true is the specified user is in any of the roles in the roleNames container. | |
| /// </summary> | |
| /// <param name="axUserId"> | |
| /// AX user id, e.g. curUserId() | |
| /// </param> | |
| /// <param name="roleNames"> | |
| /// container of role names to check. (use role NAME, not label.) | |
| /// </param> | |
| /// <returns> |