This file contains 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
Function concat(useThis As Range, Optional delim As String) As String | |
' this function will concatenate a range of cells and return one string | |
' useful when you have a rather large range of cells that you need to add up | |
Dim retVal, dlm As String | |
retVal = "" | |
If delim = Null Then | |
dlm = "" | |
Else | |
dlm = delim | |
End If |
This file contains 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
#IfWinActive, ahk_class ahk_class XLMAIN | |
LShift & WheelUp::ComObjActive("Excel.Application").ActiveWindow.SmallScroll(0,0,0,1) ; Scroll left. | |
LShift & WheelDown::ComObjActive("Excel.Application").ActiveWindow.SmallScroll(0,0,1) ; Scroll right. | |
#IfWinActive | |
~LShift & WheelUp:: ; Scroll left. | |
ControlGetFocus, fcontrol, A | |
Loop 2 ; <-- Increase this value to scroll faster. | |
SendMessage, 0x114, 0, 0, %fcontrol%, A ; 0x114 is WM_HSCROLL and the 0 after it is SB_LINERIGHT. | |
return |
This file contains 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
@echo off | |
cmdkey /generic:123.456.789.012 /user:MyDummyID /pass:MyDummyPw | |
mstsc /v:123.456.789.012 |
This file contains 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
Sub CreateTableOfContents() | |
'Step 1: Declare Variables | |
Dim i As Long | |
'Step 2: Delete Previous TOC worksheet if Exists | |
On Error Resume Next | |
With Application | |
.DisplayAlerts = False | |
.ScreenUpdating = False | |
End With | |
Sheets("TOC").Delete |
This file contains 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
@echo off | |
FOR /D %%G in ("*") DO ( | |
PUSHD "%%G" | |
FOR /F "delims=" %%H in ('dir /a-d /b * ^|find /C /V ""') DO echo %%G %%H>>"..\count.txt" | |
POPD | |
) |
This file contains 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
' rng: Cell chứa chuỗi cần cắt | |
' c : chuỗi con dùng làm delimiter | |
' n : vị trí chuỗi con cần lấy (bắt đầu từ 0) | |
Function TokenizeAt(rng As Range, c As String, n As Integer) | |
Dim ret As String | |
If (rng.Cells.Count > 1) Then | |
ret = "Only allow 1 cell" | |
End If | |
This file contains 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
using System; | |
using System.Windows.Forms; | |
using Project1; | |
namespace MainForm | |
{ | |
public partial class MainForm : Form | |
{ | |
public MainForm() | |
{ |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.ComponentModel; | |
using System.Data; | |
using System.Drawing; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Windows.Forms; |
This file contains 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
NETSH interface set interface name="Ethernet" admin=ENABLE | |
NETSH interface set interface name="Wi-Fi" admin=DISABLED | |
REG add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 1 /f |
This file contains 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
private void btnMerge_Click(object sender, EventArgs e) | |
{ | |
for (int i = 0; i < totalFile; i++) | |
{ | |
toolStripStatusLabel1.Text = "Processing (" + Convert.ToString(i + 1) + "/" + totalFile + "): " + Path.GetFileName(allLandmark[i]) +"..."; | |
// do something | |
} | |
toolStripStatusLabel1.Text = "Processed ("+ totalFile + "/" + totalFile + ")"; | |
MessageBox.Show("Done"); |
OlderNewer