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
// Desafรญo: bรบsqueda binaria | |
/* Returns either the index of the location in the array, | |
or -1 if the array did not contain the targetValue */ | |
var doSearch = function(array, targetValue) { | |
var min = 0; | |
var max = array.length - 1; | |
var guess; | |
var guessTotal = 0; | |
while(min <= max) { |
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
error: Could not compile `cargo-registry`. | |
Build failed, waiting for other jobs to finish... | |
error: linking with `cc` failed: exit code: 1 | |
| | |
= note: "cc" "-m64" "-L" "/Users/willyaguirre/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/willyaguirre/Documents/crates.io/target/debug/deps/fill_in_user_id-47a7d63419b7ac74.0.o" "-o" "/Users/willyaguirre/Documents/crates.io/target/debug/deps/fill_in_user_id-47a7d63419b7ac74" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/willyaguirre/Documents/crates.io/target/debug/deps" "-L" "/usr/local/opt/openssl/lib" "-L" "/Users/willyaguirre/Documents/crates.io/target/debug/build/miniz-sys-07cc64aa136ffbd3/out" "-L" "/Users/willyaguirre/Documents/crates.io/target/debug/build/civet-sys-ab809128bf9ce92f/out" "-L" "/usr/local/opt/postgresql/lib" "-L" "/Users/willyaguirre/Documents/crates.io/target/debug/build/libgit2-sys-845a9d1966fb3c83/out/lib" "-L" "/Users/willyaguirre/Documents/crates.io/target/debug/build/libssh2-sys-e9c86e5c2 |
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
error: linking with `cc` failed: exit code: 1 | |
| | |
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/willy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/cargo-install.zqyfBi86dW0k/release/deps/diesel-1f378c0ad134545a.0.o" "-o" "/tmp/cargo-install.zqyfBi86dW0k/release/deps/diesel-1f378c0ad134545a" "-Wl,--gc-sections" "-pie" "-Wl,-O1" "-nodefaultlibs" "-L" "/tmp/cargo-install.zqyfBi86dW0k/release/deps" "-L" "/usr/lib/x86_64-linux-gnu" "-L" "/home/willy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,-Bstatic" "/tmp/cargo-install.zqyfBi86dW0k/release/deps/libchrono-21a8fd17ede0a40d.rlib" "/tmp/cargo-install.zqyfBi86dW0k/release/deps/libnum-8a86700acf122db7.rlib" "/tmp/cargo-install.zqyfBi86dW0k/release/deps/libnum_iter-4209cfa1772400b0.rlib" "/tmp/cargo-install.zqyfBi86dW0k/release/deps/libdiesel_infer_schema-6b822eb23bda9b8c.rlib" "/tmp/cargo-install.zqyfBi86dW0k/release/deps/libnum_int |
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
Compiling diesel_codegen v0.12.0 | |
error: linking with `cc` failed: exit code: 1 | |
| | |
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" | |
"/home/willy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" | |
"/home/willy/poll/target/debug/deps/diesel_codegen-729fbadff06b79fd.0.o" "-o" | |
"/home/willy/poll/target/debug/deps/libdiesel_codegen-729fbadff06b79fd.so" | |
"/home/willy/poll/target/debug/deps/diesel_codegen-729fbadff06b79fd.crate.metadata.o" | |
"-Wl,--gc-sections" "-nodefaultlibs" "-L" "/home/willy/poll/target/debug/deps" "-L" | |
"/home/willy/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" |
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
pub fn post(&self, path: &str, map: &HashMap<String, Box<Any>>) -> String { | |
let mut body_response = String::new(); | |
let url = get_url(path); | |
let client2 = reqwest::Client::new().unwrap(); | |
client2.post(&url) | |
.headers(self.get_headers()) | |
.json(&map) | |
.send() | |
.unwrap() | |
.read_to_string(&mut body_response) |
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
fn main() { | |
// Match | |
let x = 5; | |
match x { | |
1 => println!("one"), | |
2 => println!("two"), | |
3 => println!("three"), | |
4 => println!("four"), |
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
fn main() { | |
// String | |
let greeting = "Hello there."; // greeting: &'static str | |
let s = "foo | |
bar"; | |
println!("lines {:?}", s); |
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
// Functions | |
pub fn suma(a: i32, b: i32) -> i32 { | |
a + b | |
} | |
fn resta(a: i32, b: i32) { | |
let r: i32 = a - b; | |
println!("Result {:?}", r); | |
} |
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
fn main() { | |
let r: i32 = sum(4,5); | |
println!("{:?}", r); | |
println!("Hello, world!"); | |
} | |
/// # Examples | |
/// | |
/// ``` |
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>PouchDB</title> | |
<link rel="stylesheet" href="https://cdn.concisecss.com/concise.min.css"> | |
<link rel="stylesheet" href="https://cdn.concisecss.com/concise-ui/concise-ui.min.css"> | |
</head> | |
<body> | |
<main grid> |