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
| interface Chunk { | |
| type: "code" | "comment"; | |
| content: string; | |
| } | |
| function* splitCodeAndComments(code: string): Generator<Chunk> { | |
| let startIndex = 0; | |
| while (startIndex < code.length) { | |
| const multiLineCommentStartIndex = code.indexOf("/*", startIndex); |
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
| # I claim this list together from: from https://www.reddit.com/r/pihole/comments/6qmpv6/blacklists_for_lg_webos_tvs/ , https://raw.githubusercontent.com/Perflyst/PiHoleBlocklist/master/SmartTV.txt and others. | |
| # Some elements are self-explanatory, so the sub-sub domain for the respective countries. A lot is self-explanatory, if you like you can sort the services correctly, I was too lazy for that. | |
| 0.0.0.0 ad.lgappstv.com | |
| 0.0.0.0 smartshare.lgtvsdp.com | |
| 0.0.0.0 ibis.lgappstv.com | |
| 0.0.0.0 lgad.cjpowercast.com.edgesuite.net | |
| 0.0.0.0 ngfts.lge.com | |
| # non us |
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
| type PromiseOrUndefined = Promise<{}>|undefined; | |
| class PromiseHoldingType<T extends PromiseOrUndefined> { | |
| private _value: T; | |
| constructor(value: T) { | |
| this._value = value; | |
| } |
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
| /// Determines the top-most model from a list of models — that is, the model | |
| /// that draws in front of the others. | |
| /// | |
| /// NOTE: This relies on a RenderObject's children iterating in draw order. It | |
| /// appears this is the case most of the time, but there are no guarantees. | |
| /// | |
| /// Algorithm: | |
| /// | |
| /// The general idea is this: We walk the [RenderObject] ancestry of each of the | |
| /// models, marking each RenderObject owned by their respective model. When a |
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 'package:test_api/src/backend/invoker.dart'; | |
| void main() { | |
| test('this is the name of a test', () { | |
| // Probably shouldn't be doing this in most cases...but it can be useful | |
| final liveTest = Invoker.current.liveTest; | |
| print(liveTest.test.name); | |
| }); | |
| } |
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
| const viewportWidth = document.documentElement.clientWidth; | |
| const viewportHeight = document.documentElement.clientHeight; | |
| removeObscuringFixeds(document.body.querySelectorAll(':scope *')); | |
| enableScroll(); | |
| function removeObscuringFixeds(elements) { | |
| elements = Array.from(elements); | |
| for (var el of elements) { | |
| const style = getComputedStyle(el); |
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 'package:flutter/material.dart'; | |
| import 'package:flutter_layout_grid/flutter_layout_grid.dart'; | |
| import 'package:flutter_layout_grid/src/rendering/layout_grid.dart'; | |
| void main() { | |
| runApp(FindRenderLayoutGridExample()); | |
| } | |
| class FindRenderLayoutGridExample extends StatelessWidget { | |
| @override |
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 'dart:async'; | |
| void main() async { | |
| final c = Completer(); | |
| try { | |
| // I would expect this to either fail noisely because it can't complete OR | |
| // stall endlessly, but instead it triggers a silent exit. VM exits with a 0. | |
| await c.future; | |
| } catch (e) { |
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
| class observable { | |
| const observable(this.comparator); | |
| final bool Function(Object a, Object b) comparator; | |
| } | |
| bool standardEquality(Object a, Object b) => a == b; | |
| class Foo { | |
| @observable(standardEquality) | |
| bool flag; |
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 ($R) { | |
| $R.compileTime = '1304957970'; | |
| $R.path = 'http://readable.tastefulwords.com/'; | |
| $R.linksPath = 'http://readable.tastefulwords.com/'; | |
| $R.win = window; | |
| $R.embedded = ('embeddedOptions' in $R); |
NewerOlder