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
return n.name==t.name&&n.message==t.message; | |
case"[object RegExp]": | |
case"[object String]": | |
return n==t+""; | |
case"[object Map]": | |
var f=L; | |
case"[object Set]": | |
if(f||(f=D),n.size!=t.size&&!(1&e))break; |
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 WordDoc_To_Pdf() | |
ActiveDocument.ExportAsFixedFormat OutputFileName:=ActiveDocument.FullName + ".pdf", _ | |
ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _ | |
wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, to:=99, _ | |
Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _ | |
CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _ | |
BitmapMissingFonts:=True, UseISO19005_1:=True | |
End Sub |
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
' For Inventor R9 (REALLY OLD) | |
Public Sub PublishDWG() | |
Dim myArray(1 To 1) As String | |
myArray(1) = "C:\temp\some.idw" | |
' Attempt to connect to a running instance of Inventor. | |
Dim oApp As Inventor.Application | |
On Error Resume Next | |
Set oApp = GetObject(, "Inventor.Application") | |
If Err Then |
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
libreoffice --headless --convert-to pdf myFile.docx |
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 Macro1() | |
Set cb = ActiveSheet.CheckBoxes.Add(99.75, 78, 24, 17.25) | |
With cb | |
.Name = "test" | |
.Value = xlOff | |
.LinkedCell = "$A$1" | |
.Display3DShading = False | |
End With | |
End Sub |
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 | |
const delay = time => new Promise(res=>setTimeout(()=>res(),time)); | |
// Usage | |
await delay(2000); | |
let results = await foo(); |
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
$ArrayList = [System.Collections.ArrayList]@() | |
# $i = $ArrayList.add('echo "Hello"') | |
Get-ChildItem -Path .\ -Recurse | Where-Object { | |
$_ -is [System.IO.FileInfo] ` | |
-and ($_.Directory.Name -eq 'Single') | |
} | ForEach-Object { | |
$ArrayList.add($_.FullName) | |
# $output = iex "& $command" |
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
Get-ChildItem -Path .\ -Recurse | Where-Object { | |
$_ -is [System.IO.FileInfo] ` | |
-and (($_.Directory.Name -eq 'Single' ` | |
-and $_.Length -gt (1*1024*1204)) ` | |
-or ($_.Directory.Name -eq 'Multiple' ` | |
-and $_.Length -gt (7*1024*1204))) | |
} | ForEach-Object {$_.FullName} | |
Write-Host "Press any key to continue ..." |
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
Option Explicit | |
Sub WorkWithArrayExample() | |
Dim DataRange As Variant | |
Dim Irow As Long | |
Dim Icol As Integer | |
DataRange = ActiveSheet.Range("A1:A10").Value ' read all the values at once from the Excel grid, put into an array | |
For Irow = LBound(DataRange,1) To UBound(DataRange, 1) ' Get the number of rows. | |
For Icol = LBound(DataRange,2) To UBound(DataRange, 2) ' Get the number of columns. |
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
$ArrayList = [System.Collections.ArrayList]@() | |
Get-ChildItem -Path .\ -Recurse | Where-Object { | |
$_ -is [System.IO.FileInfo] ` | |
-and ($_.Extension.ToLower().CompareTo('.pdf') -eq 0) ` | |
-and ($_.name.CompareTo('out.pdf') -ne 0) | |
} | ForEach-Object { | |
$ArrayList.add($_.FullName) | |
} | |
workflow Test-Workflow{ |
OlderNewer