VMWARE ESXi-Customizer-PS Troubleshoot

ESXi-Customizer-PS official site

Troubleshoot:

1. PowerShell :Set ExecutionPolicy to RemoteSigned
Lunch PowerShell as administrator

Set-ExecutionPolicy RemoteSigned

2. Use test first

.\ESXi-Customizer-PS-v2.4.ps1 -test

3.Network Exception:

Connecting the VMware ESXi Online depot ...Add-EsxSoftwaredepot : Could not download from depot at
https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml, skipping
(('https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml', '', '[Errno 4] IOError: <urlopen
error &#91;Errno 10013&#93; An attempt was made to access a socket in a way forbidden by its access permissions>'))
At C:\script\ESXi-Customizer-PS-v2.4.ps1:231 char:22
+     if ($basedepot = Add-EsxSoftwaredepot $vmwdepotURL) {
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ReadError: (System.String[]:String[]) [Add-EsxSoftwareDepot], Exception
    + FullyQualifiedErrorId : ConnectDepotError,VMware.ImageBuilder.Commands.AddDepot


FATAL ERROR: Cannot add VMware ESXi Online depot. Please check your Internet connectivity and/or proxy settings!

Try change Endpoint security / Anti-Virus Software setting, Your PowerShell can’t access network.

4. Rufus update menu.c32 fail:
Download menu.c32 in https://rufus.akeo.ie/downloads/
After Rufus write to USB drive, copy menu.c32 to USB drive root directory.

P.S.
ESXI install hang on “initializing IOV”.
Disable Intel VT-d in BIOS when your CPU does not support VT-d.

jqGrid MVC – Add button row with icon

View:

function Grid_ViewFileLinkColumnFormatter(cellValue, options, rowObject) {
var cellHtml;
cellHtml = "";
return cellHtml;
}
function UploadedFile_RenewalAttachmentAdminGrid_AfterAjaxRequest() {
//Format column icon
$(".PopupIcon").button({
text: false,
icons: {
primary: "ui-icon-search"
}
});

}
function DownloadFile_PopupIcon_Click(fileID) {
var URL = '@Url.Action("GetFile")' + "?fileID=" + fileID;
window.open(URL);
}

jqGrid MVC – Row double click to edit row

Controller:
Private Sub Contact_SetupGrid(ordersGrid As JQGrid)
With ordersGrid
.ClientSideEvents.RowDoubleClick = "Contact_dblClickRow"
End With
End Sub

View:
function Contact_dblClickRow(rowID, isSelected) {
var editDialogOptions = $(this).getGridParam('editDialogOptions');
$(this).editGridRow(rowID, editDialogOptions);
}

OpenCV Auto Rotation (Deskewing) 自動校正角度

利用 OpenCV 自動校正角度

Plan:
EMGU (OpenCV for .Net) -> Read image -> Display and confirm -> Save

Link:
Rotation (Deskewing)
http://felix.abecassis.me/2011/10/opencv-rotation-deskewing/
http://www.emgu.com/wiki/index.php/Working_with_Images

How-To use EMGU (OpenCV for .Net)
http://www.codeproject.com/Articles/257502/Creating-Your-First-EMGU-Image-Processing-Project
http://yy-programer.blogspot.tw/2012/07/emgucv.html
http://www.dotblogs.com.tw/chou/archive/2009/06/13/8812.aspx