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
x=document.evaluate(`//span[text()='Sponsorowane']`, document, null, XPathResult.ANY_TYPE, null); | |
s=[];while (x1 = x.iterateNext()) s.push(x1); | |
s.forEach(a=>a.parentElement.remove()); |
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(){ | |
removed=0; | |
document.title="0"; | |
document.querySelectorAll("[role='complementary']").forEach(it=>it.remove()) | |
setInterval(() => { | |
rm=(e2d)=>{ | |
if(!e2d)return; | |
e2d.remove(); | |
removed++; | |
document.title=`${removed}`; |
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
QuotedObject | |
= Object | |
/ "'" v:Object "'" { return v } | |
/ '"' v:Object '"' { return v } | |
Object = UnnamedObject / NamedObject | |
UnnamedObject = "{" fieldValues:FieldValues "}" { return fieldValues.reduce((r,v)=>({...r, ...v})) } | |
NamedObject = name:Name value:UnnamedObject { return {[name]: 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
function Calculator() { | |
const [input, setInput] = useState(''); | |
const [result, setResult] = useState<number>() | |
return <div> | |
<input data-testid='expression' onChange={e => setInput(e.target.value)}/> | |
<button data-testid='calculate' onClick={() => setResult(eval(input))}/> | |
<div data-testid='result'>{result}</div> | |
</div> | |
}; |
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
it('should calculate on click', () => { | |
// given: | |
render(<Calculator/>); | |
// when | |
typeIn('expression', '6 * 7'); | |
clickOn('calculate'); | |
// then | |
expect(textOf('result')).toBe('42'); |
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
#!/bin/bash | |
set -eu | |
function getPairIds { | |
xinput test-xi2 --root | awk ' | |
BEGIN{FS="[()]"} | |
/EVENT.*KeyPress[)]/ {key=1} | |
/EVENT.*ButtonPress[)]/ {mouse=1} | |
key && /device: / {kId=$2;key=0} | |
mouse && /device: / {mId=$2;mouse=0} |
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 interface User { | |
/** | |
* @type {string} | |
* @memberof User | |
*/ | |
email: string; // 1 | |
/** | |
* @type {string} | |
* @memberof User | |
*/ |
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
"User": { | |
"type": "object", | |
"required": ["email", "roles"], | |
"properties": { | |
"email": { | |
"type": "string" | |
}, | |
"firstName": { | |
"type": "string" | |
}, |
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
"/groups": { | |
"get": { | |
"operationId": "allGroupsUsingGET", | |
"responses": { | |
"200": { | |
"description": "OK", | |
"schema": { | |
"type": "array", | |
"items": { "$ref": "#/definitions/Group" } | |
} |
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
package org.dhatim.fastexcel; | |
import java.util.concurrent.CompletableFuture; | |
import static java.lang.String.format; | |
public class UsedMemoryMonitor<E extends Exception> { | |
volatile boolean stop = false; | |
volatile long maxUsedMemoryMB = 0; |
NewerOlder