Skip to content

Instantly share code, notes, and snippets.

View dontpaniclabsgists's full-sized avatar

Don't Panic Labs dontpaniclabsgists

View GitHub Profile
$("#order-details tr").on('click', function(evt) {/*do something*/});
$("#order-details").on('click', ‘tr’, function(evt) {/*do something*/});
$("#order-details").on('click', ‘tr’, function(evt) {/*do something*/});
$("#order-details tr").on('click', function(evt) {/*do something*/});
<button (click)="downloadAndDisplayPdf"> open your pdf </button>
private async downloadAndDisplayPdf(): void {
const win = window.open("", "_blank")
Manager.GetIllustrationDownload()
.then((response) => {
If (win) {
// these lines let us take a pdf file and get a blob url that we can use to navigate to it directly in browser
const pdfFile = new File([response.fileContent], response.fileName, { type: 'application/pdf', lastModified: Date.now() });
const objectURL = URL.createObjectURL(pdfFile);
<button (click)="downloadAndDisplayPdf"> open your pdf </button>
private async downloadAndDisplayPdf(): void {
Manager.GetIllustrationDownload()
.then((response) => {
// these lines let us take a pdf file and get a blob url that we can use to navigate to it directly in browser
const pdfFile = new File([response.fileContent], response.fileName, { type: 'application/pdf', lastModified: Date.now() });
const objectURL = URL.createObjectURL(pdfFile);
window.open(objectUrl, "_blank")
SELECT
h.n as HourOfDay,
CASE
WHEN h.n BETWEEN 9 AND 17 THEN 15 + (h.n % 5) -- Higher during business hours
WHEN h.n BETWEEN 18 AND 22 THEN 8 + (h.n % 3) -- Medium in evening
ELSE 2 + (h.n % 3) -- Lower at night/early morning
END as OrderCount
FROM (
SELECT 0 as n UNION SELECT 1 UNION SELECT 2 UNION SELECT 3 UNION SELECT 4 UNION SELECT 5
UNION SELECT 6 UNION SELECT 7 UNION SELECT 8 UNION SELECT 9 UNION SELECT 10 UNION SELECT 11
SELECT TOP 1 * FROM SalesLT.SalesOrderHeader
"mcp": {
"servers": {
"mcp-server-chart": {
"command": "npx",
"args": ["-y", "@antv/mcp-server-chart"]
},
// existing servers...
}
}
npm install -g @antv/mcp-server-chart