This file contains hidden or 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
| /** | |
| * Convenient shortcut | |
| */ | |
| Object.defineProperty(window, 'define', { | |
| value: (property, ...meta) => meta.length == 2 ? Object.defineProperty(meta[0], property, meta[1]) : Object.defineProperty(window, property, meta[0]), | |
| writable: false, | |
| enumerable: true | |
| }) |
This file contains hidden or 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 default class EventHandler { | |
| constructor(eventStream) { | |
| this.eventStream = eventStream | |
| } | |
| on(topic, fn) { | |
| this.eventStream.addEventListener(topic, fn) | |
| return this | |
| } | |
| } |
This file contains hidden or 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 Observable(observe) { | |
| this.map = f => { | |
| return new Observable(cb => { | |
| this.observe(x => { | |
| cb(f(x)); | |
| }); | |
| }); | |
| } | |
| this.flatMap = f => { |
This file contains hidden or 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 histogramChart(color_value, title, xAxisTitle, yAxisTitle, num_of_of_bins) { | |
| var margin = {top: 30, right: 40, bottom: 50, left: 50}, | |
| width = 460, | |
| height = 300; | |
| var histogram = d3.layout.histogram(), | |
| x = d3.scale.ordinal(), | |
| y = d3.scale.linear(), | |
| xAxis = d3.svg.axis().scale(x).orient("bottom").tickSize(6, 0), | |
| yAxis = d3.svg.axis() |
This file contains hidden or 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
| license: gpl-3.0 | |
| height: 620 | |
| border: no |
This file contains hidden or 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 interface IAnalyticsHttpWrapper | |
| { | |
| Task<T> GetAsynchronous<T>(string path); | |
| } | |
| public class AnalyticsHttpWrapper : IAnalyticsHttpWrapper | |
| { | |
| private readonly IHttpClientFactory _httpClientFactory; | |
| private readonly string _httpClientName; | |
| private readonly HttpClient _httpClient; |
This file contains hidden or 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> | |
| <meta charset="utf-8" /> | |
| <title>Build-free Angular 17 app with @babel/standalone</title> | |
| <script type="importmap"> | |
| { | |
| "imports": { | |
| "@angular/common": "https://esm.sh/v135/@angular/common@17.0.3?dev", |
This file contains hidden or 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
| async function compressAndEncode(inputString) { | |
| const encoder = new TextEncoder(); | |
| // Create a ReadableStream from the input string | |
| const inputReadableStream = new ReadableStream({ | |
| start(controller) { | |
| controller.enqueue(encoder.encode(inputString)); | |
| controller.close(); | |
| } | |
| }); |
This file contains hidden or 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 webview | |
| import pywebio | |
| from pywebio.platform.flask import webio_view | |
| from flask import Flask, escape, request, send_from_directory, current_app, url_for | |
| from pywebio import STATIC_PATH | |
| from pywebio.input import * | |
| from pywebio.output import * | |
| from pywebio.session import * | |
| import logging | |
| from datetime import date, timedelta |
This file contains hidden or 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 lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>My Angular from Scratch</title> | |
| <style> | |
| .my-component { | |
| font-family: Arial, sans-serif; |
OlderNewer