Small help with immutable types...
// private readonly int _age;
// public int Age { get { return _age; } }
public int Age { get; }
//Code src: http://lethanhname.blogspot.co.id/2014/03/epicor-launch-form-with-parameters.html | |
public void CallLot(string PartNum,string LotNum) | |
{ | |
try | |
{ | |
string[] CompoundKeys =new string[]{PartNum,LotNum}; | |
CompoundKeyBinding cb=new CompoundKeyBinding(CompoundKeys,null,null); | |
LaunchFormOptions opts = new LaunchFormOptions(); | |
opts.ValueIn=cb; |
const zip = (arr, ...arrs) => { | |
return arr.map((val, i) => arrs.reduce((a, arr) => [...a, arr[i]], [val])); | |
} | |
// example | |
const a = [1, 2, 3]; | |
const b = [4, 5, 6]; | |
const c = [7, 8, 9]; |
import subprocess | |
import select | |
from logging import DEBUG, ERROR | |
def call(popenargs, logger, stdout_log_level=DEBUG, stderr_log_level=ERROR, **kwargs): | |
""" | |
Variant of subprocess.call that accepts a logger instead of stdout/stderr, | |
and logs stdout messages via logger.debug and stderr messages via | |
logger.error. |
var myShipVia = (from ShipVia_row in ttShipHead | |
where ShipVia_row.ShipViaCode=="12345" | |
select ShipVia_row).FirstOrDefault(); | |
if (myShipVia!=null) | |
{ | |
ShipViaDisabled = myShipVia.UDField<bool>("Disabled_c"); | |
} | |
/* |
There are so many great GIFs out there and I want to have copies of them. Twitter makes that harder than it should be by converting them to MP4 and not providing access to the source material. To make it easier, I made a bash pipeline that takes a tweet URL and a filename, extracts the MP4 from that tweet and uses ffmpeg to convert back to GIF.
brew install ffmpeg
apt install ffmpeg
A set of gists for re-use throughout various Epicor customizations.
#!/bin/bash | |
### | |
### my-script — does one thing well | |
### | |
### Usage: | |
### my-script <input> <output> | |
### | |
### Options: | |
### <input> Input file to read. | |
### <output> Output file to write. Use '-' for stdout. |
Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math
This work is released under a Creative Commons Attribution-NoDerivatives 4.0 International License.
"OpenPGP" refers to the OpenPGP protocol, in much the same way that HTML refers to the protocol that specifies how to write a web page. "GnuPG", "SequoiaPGP", "OpenPGP.js", and others are implementations of the OpenPGP protocol in the same way that Mozilla Firefox, Google Chromium, and Microsoft Edge refer to software packages that process HTML data.