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 java.io.BufferedReader | |
import java.io.InputStreamReader | |
import java.net.HttpURLConnection | |
import java.net.URI | |
import java.net.URL | |
fun main() { | |
val apiUrl = "https://catfact.ninja/fact" //API endpoint | |
// add proxy support if your pc is behind a corporate proxy | |
System.setProperty("java.net.useSystemProxies", "true"); |
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 'dart:convert' as convert; | |
import 'package:http/http.dart' as http; | |
void main(List<String> arguments) async { | |
final urlHttpBin = Uri.https('httpbin.org', '/basic-auth/myuser/mypasswd'); | |
const base64Encoder = convert.Base64Encoder(); | |
var creds64 = base64Encoder.convert('myuser:mypasswd'.codeUnits); | |
// https://pub.dev/documentation/http/latest/http/Client-class.html |
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
void Main() | |
{ | |
// Linqpad program to test the custom serializer to handle strings with value null: string foo = "\"null\""; | |
// based on this answer https://stackoverflow.com/a/74857003/819887 | |
try | |
{ | |
//TestClass.Test(); | |
foreach (var jsonWithConfig in GetJson()) | |
{ | |
jsonWithConfig.Dump("jsonWithConfig"); |
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
class Werkzeug extends Werkzeug__Standard { | |
static private $A_Cache = array(); | |
const PARAMETER_BAUJAHR = 1; | |
const PARAMETER_FAHRZEUGPROJEKT = 2; | |
const PARAMETER_HERSTELLER = 3; | |
static function Get_Data_Baujahr(){ |
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> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="panel.css"/> | |
</head> | |
<body> | |
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
2019/09/03 01:20:24 -exclude-checks arraySyntax, PHPDocC:\Dev\PHP\ResourceSpace_9_0_13357\include | |
2019/09/03 01:20:25 error using cmnd.CombinedOutput() | |
2019/09/03 01:20:25 exit status 2 | |
2019/09/03 01:20:25 what does this mean? | |
2019/09/03 01:20:25 2019/09/03 01:20:24.418022 Started | |
2019/09/03 01:20:24.931815 Indexing [C:\Dev\PHP\ResourceSpace_9_0_13357\include] | |
2019/09/03 01:20:25.243995 Linting | |
<critical> INFO phpdocLint: PHPDoc is incorrect: use int type instead of integer on line 4 at C:\Dev\PHP\ResourceSpace_9_0_13357\include\annotation_functions.php:9 | |
function getAnnotation($ref) | |
^^^^^^^^^^^^^ |
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
@page "/todo" | |
<h1>Todo (@todos.Count(todo => !todo.IsDone))</h1> | |
<ul> | |
@foreach (var todo in todos) | |
{ | |
<li> | |
<input type="checkbox" @bind="todo.IsDone" /> |
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
document.onreadystatechange = function () { | |
console.log("content script was fired onreadystatechange "); | |
class PageMeasurement { | |
constructor(url) { | |
this.url = url; | |
this.date = Date.now(); | |
var t = window.performance.timing; |
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
// With GreaseMonkey create a new script that would look like the following: | |
// ==UserScript== | |
// @name test | |
// @description test desc | |
// @include *://www.mysite.com/* | |
// @grant none | |
// @version 0.1 | |
// ==/UserScript== |
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
"use strict" | |
// MIT Licence a snippet to be run inside the chrome dev tools | |
// not fully working yet | |
// see https://stackoverflow.com/questions/47686564/chrome-devtools-run-snippet-to-load-pages | |
function getPerformanceTimings() | |
{ | |
var t = window.performance.timing; | |
var timings = []; |
NewerOlder