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
public setSelectedRow( | |
event: MouseEvent | KeyboardEvent, | |
rowTag: string, | |
// turnOffEditable: boolean = true | |
): void { | |
// 1. unselected if select again (this.selectedRow === rowTag) | |
this.selectedRow = this.selectedRow === rowTag ? null : rowTag; | |
// 2. refer to dicomEditModalShortcut component | |
this.selectedElement$.next(<HTMLElement>event.currentTarget); |
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 helloWord(arg1, collectionUID){ | |
console.log(collectionUID); // undefined | |
collectionUID = "222" | |
console.log(collectionUID); // 222 | |
try { | |
console.log(arg1) | |
console.log(collectionUID) | |
throw new Error("oh no") | |
} catch (error) { |
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
const promise = new Promise((resolve, reject) => { | |
console.log(1); | |
resolve(5); | |
console.log(2); | |
}).then(val => { | |
console.log(val); | |
}); | |
promise.then(() => { | |
console.log(3); |
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
import socket | |
import struct | |
import telnetlib | |
HOST = "192.168.1.111" | |
PORT = 2994 | |
s1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s1.connect((HOST, PORT)) |
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
#!/usr/bin/env node | |
const { exec } = require("child_process"); | |
exec("code --list-extensions", (err, stdout) => { | |
if (err) { return; } | |
const markdown = stdout.split("\n").filter( e => e ).map(extension => | |
`* [${extension}](https://marketplace.visualstudio.com/items\?itemName\=${extension})` | |
).join("\n"); | |
console.log(markdown); | |
}); |
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
export enum PreprocessStatus { | |
COMPLETE = 'complete', | |
INCOMPLETE = 'incomplete', | |
} | |
export type NA = 'NA'; | |
/** | |
* SeriesRemoteCacheStatus for Series level | |
*/ |
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
using namespace System.Management.Automation.Host | |
Add-Type -AssemblyName System.Device #Required to access System.Device.Location namespace | |
function get-weather{ | |
$GeoWatcher = New-Object System.Device.Location.GeoCoordinateWatcher #Create the required object | |
$GeoWatcher.Start() #Begin resolving current locaton |
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
/** | |
* Inner rounding | |
*/ | |
div { | |
outline: .6em solid #655; | |
box-shadow: 0 0 0 .4em #655; /* todo calculate max of this */ | |
max-width: 10em; | |
border-radius: .8em; |
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
/** | |
* Horizontal stripes | |
*/ | |
background: linear-gradient(#fb3 50%, #58a 0); | |
background-size: 100% 30px; |
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
/** | |
* Vertical stripes | |
*/ | |
background: linear-gradient(to right, #fb3 50%, #58a 0); | |
background-size: 30px 100%; |
NewerOlder