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 FileExists(ByVal fname As String) As String | |
Dim objFSO As Object | |
Set objFSO = CreateObject("Scripting.FileSystemObject") | |
If objFSO.FileExists(fname) Then | |
FileExists = "1" | |
Else | |
FileExists = "0" | |
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
from ftplib import FTP | |
from optparse import OptionParser | |
import sys | |
class ETP(FTP): | |
def set_result_type(self, result_type): | |
# 0: default | |
# 1: ftp link | |
# 2: UNC format | |
self.result_type = result_type |
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 | |
es.exe %* | |
python etpclient.py -s 192.168.1.56 -t 210 %* | |
REM more computers running Everything ETP server ... |
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
Public Sub 打印当前() | |
Dim acadApp As AcadApplication, objDoc As AcadDocument | |
On Error Resume Next |
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
Public Sub cc()'''wshom.ocx | |
Dim WshShell As WshShell, bKey | |
Set WshShell = CreateObject("WScript.Shell") | |
'WshShell.RegWrite "HKCU\Software\ACME\FortuneTeller\", 1, "REG_BINARY" | |
'WshShell.RegWrite "HKCU\Software\ACME\FortuneTeller\MindReader", "Goocher!", "REG_SZ" | |
Debug.Print WshShell.RegRead("HKCU\Software\FinePrint Software\pdfFactory4\FinePrinters\pdfFactory Pro\PrinterDriverData\ShowDlg") | |
Debug.Print WshShell.RegRead("HKCU\Software\FinePrint Software\pdfFactory4\FinePrinters\pdfFactory Pro\PrinterDriverData\PdfAction") | |
'Debug.Print WshShell.RegRead("HKCU\Software\FinePrint Software\pdfFactory4\OutputFile") |
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
'计算两经纬度之间距离=cal_long_lat(经度1,纬度1,经度2,纬度2) | |
Public Function Cal_Long_Lat(ByVal long1 As Double, ByVal lat1 As Double, ByVal long2 As Double, ByVal lat2 As Double) As Double | |
Const PI As Double = 3.1415926535 | |
Dim AngleLong1, AngleLat1, AngleLong2, AngleLat2 As Double | |
AngleLong1 = long1 * PI / 180 | |
AngleLat1 = lat1 * PI / 180 | |
AngleLong2 = long2 * PI / 180 | |
AngleLat2 = lat2 * PI / 180 | |
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
'IMPORTANT - CHANGE gtExampleLoad() to include gtDoit() for each Gist you want to load | |
' bootstrap code to update VBA modules from gists | |
' all code is in this module - so no classes etc. | |
' latebinding is used to avoid need for any references | |
' can be found at https://gist.github.com/3403537 | |
Option Explicit | |
' v2.04 - 3403537 | |
' if you are using your own gists - change this | |
Const gistOwner = "brucemcpherson" |
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
(defun c:lsp () | |
(prompt "\n load lisp app and call xdd ...") | |
;;; (setq lspname (getstring "\nENTER LSP FILENAME:> ")) | |
(load "C:\\Users\\atv023\\Desktop\\tmp.lsp") | |
(prompt "\n load success ...") | |
(prompt "\n call .XDD ...") | |
(c:xdd) | |
) |
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 lab() | |
For Each col In ActiveSheet.UsedRange | |
For Each c In col | |
If c.Row > 4 And c.Column > 3 Then | |
Debug.Print c |
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.IO; | |
using Microsoft.Office.Interop.Excel; | |
using Microsoft.VisualStudio.TestTools.UnitTesting; | |
namespace CSharpUnitTestProject1 | |
{ | |
[TestClass] | |
public class DataProcessTest | |
{ |
OlderNewer