ls <path> | ?{$_.Name -match "^$"}
is shorthand for
Get-Child <path> | Where-Child {$_.Name -match "^$"}
in powershell.
Versus
perl -le"foreach (){if(m/^$/){print $_ } }"
(function (){ | |
const double = (x) => x*2 | |
const output = [1,2,3].map(double); | |
console.log(output) // [2,4,6] | |
// Currying | |
const mult = (i) => (x) => x*i | |
let aMod = (arr) => (mult) => arr.map(mult); | |
const arr = [1,2,3]; | |
console.log(aMod(arr)(mult(2))); |
ls <path> | ?{$_.Name -match "^$"}
is shorthand for
Get-Child <path> | Where-Child {$_.Name -match "^$"}
in powershell.
Versus
perl -le"foreach (){if(m/^$/){print $_ } }"
await execFile(GHOST_SCRIPT_PATH,[ | |
`-q`,`-dNOPAUSE`, `-dBATCH`,`-dSAFER `, | |
`-sDEVICE=pdfwrite`, | |
`-dCompatibilityLevel=1.3`, | |
`-dPDFSETTINGS=/screen `, | |
`-dEmbedAllFonts=true`, | |
`-dSubsetFonts=true`, | |
`-dColorImageDownsampleType=/Bicubic`, | |
`-dColorImageResolution=300`, | |
`-dGrayImageDownsampleType=/Bicubic`, |
console.log([...Array((127-32)).keys()].map(e=>String.fromCharCode(e+32)).join('')) |
// Not sure this is accruate, but I was wondering about different styles. | |
(function(){ | |
let sum = e=>e+1; | |
let sub = e=>e-1; | |
let mul = e=>e*e; | |
let div = e=>1/e; | |
let dataSet = [1,2,3]; | |
let dataSet2 = [4,5,6]; | |
(function(){ // Generator Promise For Loop | |
let getFiringResult = delay => new Promise((o,x)=>setTimeout(()=>o(Math.random()),delay)); | |
const fireCannons = (function* (data){ | |
let index = 0; | |
while(index<5){ | |
index++; | |
yield getFiringResult(1000); | |
} | |
return; |
const path = require('path'); | |
const util = require('util'); | |
const { createLogger, format, transports } = require('winston'); | |
const { combine, timestamp, label, printf } = format; | |
const myFormat = printf(info => { | |
info.label = info.label.padStart(5,' '); | |
info.level.padStart(7,' '); | |
let re = /[\r\n]+/; | |
if(typeof info.message === "object") |
;with cte (ID, DeclarationItem, Declaration,SEQM) as | |
( | |
select ID, | |
cast(LEFT(CustomText01, 20) as varchar(20)) DeclarationItem, | |
RIGHT(CustomText01, | |
CASE | |
WHEN LEN(CustomText01)-20 > 0 THEN LEN(CustomText01)-20 | |
ELSE 0 | |
END | |
) Declaration, |
' Run inside of a .docm file's vba. | |
Option Explicit | |
Const sDir = "C:\temp\PDF\" | |
Const TESTING = False | |
Sub SaveDocAsPdf(wApp As Word.Application, fso As Variant, filePath As String, exportPath As String) | |
Dim wDoc As Word.Document | |
Set wDoc = wApp.Documents.Open(filePath) | |
wDoc.ExportAsFixedFormat OutputFileName:=exportPath, ExportFormat:=wdExportFormatPDF | |
wDoc.Close False |
<template> | |
<select> | |
<slot></slot> | |
</select> | |
</template> | |
<script> | |
export default { | |
name:'Select2', | |
props: { | |
'value':{ |