Skip to content

Instantly share code, notes, and snippets.

View dontpaniclabsgists's full-sized avatar

Don't Panic Labs dontpaniclabsgists

View GitHub Profile
<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
"mcp": {
"servers": {
"mssql-adventureworks": {
"type": "stdio",
"command": "node",
"args": [
"/path/to/SQL-AI-samples/MssqlMcp/Node/dist/index.js"
],
"env": {
"SERVER_NAME": "your-server.database.windows.net",
git clone https://github.com/Azure-Samples/SQL-AI-samples
cd MssqlMcp/Node
npm install
npm run build
When building out the columns in the columns section, only use the following properties
- field: The property name in the data object
- header: The column header text
- type: The data type (text, date, number, etc.)
- sortable: Whether the column is sortable
Import and use the ItemListComponent in your template
- import { ItemListComponent } from '../../components/item-list/item-list.component';
- import { ItemListConfig } from '../../components/item-list/item-list.types';