#require.js #PoC #topological-sorting #DAG
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 npmPackageName = "ts-morph"; // <--- change name | |
const got = require("got@11.8.2"); | |
const url = (name) => | |
`https://api.npms.io/v2/package/${encodeURIComponent(name)}`; | |
const map = []; | |
require("npm-pack-dependents@2.0.0")(npmPackageName) | |
.then((dependents) => { | |
return Promise.allSettled( | |
dependents.map((d) => { |
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 class GenericSqlProvider | |
{ | |
private readonly string connectionString; | |
public GenericSqlProvider(string connectionString) | |
{ | |
this.connectionString = connectionString; | |
} | |
public IResult<ProcedureResult> ExecuteCall(string procedureName, IDictionary<string, object> input) |
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
// conditional promises chaining | |
function preTask(): Promise<void> { | |
console.log('pre task'); | |
return Promise.resolve(); | |
} | |
function task1(): Promise<void> { | |
console.log('task for type1'); | |
return Promise.resolve(); |
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
let app = {}; | |
import * as arrowFunction from './test_arrowFunction.js'; | |
app.arrowFunction = arrowFunction; | |
import * as exportDefaultClass from './test_exportDefaultClass.js'; | |
app.exportDefaultClass = exportDefaultClass; | |
window.app = app; | |
console.log(app); |
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 static T XmlDeserializeFromString<T>(string objectData) | |
{ | |
return (T)XmlDeserializeFromString(objectData, typeof(T)); | |
} | |
public static object XmlDeserializeFromString(string objectData, Type type) | |
{ | |
var serializer = new XmlSerializer(type); | |
object result; |
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 System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Timers; | |
using Timer = System.Timers.Timer; | |
public class TimerAction | |
{ | |
private readonly Action action; | |
private readonly Timer timer; |
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 class SortableBindingList<T> : BindingList<T> | |
{ | |
private readonly Dictionary<Type, PropertyComparer<T>> comparers; | |
private bool isSorted; | |
private ListSortDirection listSortDirection; | |
private PropertyDescriptor propertyDescriptor; | |
public SortableBindingList() | |
: base(new List<T>()) | |
{ |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>abc abcd</title> | |
<script> | |
function ReplaceNode(textNode, eNode) { | |
textNode.parentNode.replaceChild(textNode, eNode); | |
} | |
function DecorateText(node, match, offset) { |
NewerOlder