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
Compiling rust-scraper v0.1.0 (file:///home/tom/Desktop/rust-scraper) | |
warning: unused import: `cssparser::ParseError` | |
--> src/main.rs:9:5 | |
| | |
9 | use cssparser::ParseError; | |
| ^^^^^^^^^^^^^^^^^^^^^ | |
| | |
= note: #[warn(unused_imports)] on by default | |
error[E0277]: the trait bound `cssparser::ParseError<'_, selectors::parser::SelectorParseErrorKind<'_>>: std::error::Error` is not satisfied |
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
browser.runtime.onMessage.addListener(message => { | |
browser.search.search({query: "foobar"}); | |
}); |
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 FeedParser = { | |
fetchXML(url) { | |
return new Promise((resolve, reject) => { | |
let request = new XMLHttpRequest(); | |
request.open("GET", url, true); | |
request.addEventListener("load", (event) => { | |
if (request.responseXML) { | |
resolve(request.responseXML); | |
} else { |
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
{ | |
"manifest_version": 2, | |
"version": "1.0", | |
"name": "my search plugin", | |
"chrome_settings_overrides": { | |
"search_provider": { | |
"name": "My duckduckgo", | |
"search_url": "https://duckduckgo.com/?kae=d&kp=-1&kn=1&kg=p&kl=wt-wt&kad=en_US&k1=-1&kaj=u&kal=-1&kak=-1&kz=-1", | |
"search_url_post_params": "kd=-1&k1=-1&kg=p&kl=-1&kp=-1&kn=1&q={searchTerms}", | |
"is_default": false |
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
extern crate reqwest; | |
#[macro_use] | |
extern crate error_chain; | |
#[macro_use] | |
extern crate serde_derive; | |
extern crate serde; | |
extern crate serde_json; | |
extern crate url; |
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
#include <stdio.h> | |
#include <string.h> | |
#include <emmintrin.h> // SSE2 | |
#include <time.h> | |
static inline | |
bool is_foo(char c) { | |
return c == '"' || c == '\\' || c < ' '; | |
} |
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 {square} from "/b.js"; | |
alert(square(5)); |
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
# HG changeset patch | |
# Parent 77d22efb44b189d4ec0d0e25ae04195f3cbf86a9 | |
diff --git a/js/src/jit/BaselineCacheIR.cpp b/js/src/jit/BaselineCacheIR.cpp | |
--- a/js/src/jit/BaselineCacheIR.cpp | |
+++ b/js/src/jit/BaselineCacheIR.cpp | |
@@ -1854,6 +1854,15 @@ BaselineCacheIRCompiler::emitLoadProto() | |
} | |
bool |
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 canvas = Dom_html.getElementById("test-canvas"); | |
let gl = WebGL.getContext(Js.coerce canvas Dom_html.CoerceTo.canvas (fun _ => assert false)); | |
Graphics.clear(gl, {r: 1.0, g: 0.7, b: 1.0, a: 1.0}); | |
let gl2 = Js.Opt.get gl (fun _ => assert false); | |
gl2#clearColor(1.0, 0.7, 1.0, 1.0); | |
Error: This expression has type WebGL.renderingContext Js.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
let canvas = Dom_html.getElementById("test-canvas"); | |
let gl = WebGL.getContext(Js.coerce canvas Dom_html.CoerceTo.canvas (fun _ => assert false)); | |
Graphics.clear(gl, {r: 1.0, g: 0.7, b: 1.0, a: 1.0}); | |
gl.clearColor(1.0, 0.7, 1.0, 1.0); |