some more learning programms

This commit is contained in:
Ananke 2017-04-15 15:59:12 +02:00
parent c3fcb60f7d
commit 5a945cdcb0
38 changed files with 0 additions and 104 deletions

23
Cargo.lock generated
View file

@ -1,23 +0,0 @@
[root]
name = "Rust_Playground"
version = "0.0.1"
dependencies = [
"rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "libc"
version = "0.2.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "rand"
version = "0.3.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
]
[metadata]
"checksum libc 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)" = "88ee81885f9f04bff991e306fea7c1c60a5f0f9e409e99f6b40e3311a3363135"
"checksum rand 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "022e0636ec2519ddae48154b028864bdce4eaf7d35226ab8e65c611be97b189d"

View file

@ -1,15 +0,0 @@
[package]
name = "Rust_Playground"
version = "0.0.1"
authors = [ "Clara Benedicta Maria Mueller <clara.mueller@vilera.de>" ]
[[bin]]
name = "main"
path = "/media/win_e/Clara_Daten/etc/Programmierung/Rust/src/main.rs"
[dependencies]
rand="0.3.0"

View file

@ -1,15 +0,0 @@
[package]
name = "hello_world"
version = "0.0.1"
authors = [ "Clara Benedicta Maria Mueller <clara.mueller@vilera.de>" ]
[[bin]]
name = "test"
path = "/media/win_e/Clara_Daten/etc/Programmierung/Rust/src/test.rs"
[dependencies]
rand="0.3.0"

View file

@ -1 +0,0 @@
{"rustc":9749998217168482212,"target":17950575461743581120,"profile":14528549471338536373,"local":{"variant":"MtimeBased","fields":[[1492264153,198746900],[47,109,101,100,105,97,47,119,105,110,95,101,47,67,108,97,114,97,95,68,97,116,101,110,47,101,116,99,47,80,114,111,103,114,97,109,109,105,101,114,117,110,103,47,82,117,115,116,47,115,114,99,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,82,117,115,116,95,80,108,97,121,103,114,111,117,110,100,45,48,57,101,57,101,56,98,52,55,102,54,55,54,50,54,101,47,100,101,112,45,98,105,110,45,109,97,105,110,45,48,57,101,57,101,56,98,52,55,102,54,55,54,50,54,101]]},"features":"None","deps":[["rand v0.3.15",127043405904794477]],"rustflags":[]}

View file

@ -1 +0,0 @@
{"rustc":9749998217168482212,"target":17950575461743581120,"profile":14528549471338536373,"local":{"variant":"MtimeBased","fields":[[1492077381,811763100],[47,109,101,100,105,97,47,119,105,110,95,101,47,67,108,97,114,97,95,68,97,116,101,110,47,101,116,99,47,80,114,111,103,114,97,109,109,105,101,114,117,110,103,47,82,117,115,116,47,115,114,99,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,104,101,108,108,111,95,119,111,114,108,100,45,48,99,56,102,52,100,97,55,102,57,51,99,57,99,53,99,47,100,101,112,45,98,105,110,45,109,97,105,110,45,48,99,56,102,52,100,97,55,102,57,51,99,57,99,53,99]]},"features":"None","deps":[["rand v0.3.15",127043405904794477]],"rustflags":[]}

View file

@ -1 +0,0 @@
{"rustc":9749998217168482212,"target":10994546209011070589,"profile":14528549471338536373,"local":{"variant":"MtimeBased","fields":[[1492072499,359251700],[47,109,101,100,105,97,47,119,105,110,95,101,47,67,108,97,114,97,95,68,97,116,101,110,47,101,116,99,47,80,114,111,103,114,97,109,109,105,101,114,117,110,103,47,82,117,115,116,47,115,114,99,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,104,101,108,108,111,95,119,111,114,108,100,45,57,52,51,56,49,55,100,52,54,99,48,52,52,53,53,56,47,100,101,112,45,98,105,110,45,116,101,115,116,45,57,52,51,56,49,55,100,52,54,99,48,52,52,53,53,56]]},"features":"None","deps":[["rand v0.3.15",127043405904794477]],"rustflags":[]}

View file

@ -1 +0,0 @@
{"rustc":9749998217168482212,"target":12335968779674043000,"profile":14528549471338536373,"local":{"variant":"Precalculated","fields":["0.2.21"]},"features":"Some([\"default\", \"use_std\"])","deps":[],"rustflags":[]}

View file

@ -1 +0,0 @@
{"rustc":9749998217168482212,"target":16630976334449306048,"profile":14528549471338536373,"local":{"variant":"Precalculated","fields":["0.3.15"]},"features":"None","deps":[["libc v0.2.21",6532433197170361632]],"rustflags":[]}

Binary file not shown.

View file

@ -1 +0,0 @@
/media/win_e/Clara_Daten/etc/Programmierung/Rust/src/target/debug/main: /media/win_e/Clara_Daten/etc/Programmierung/Rust/src/main.rs

Binary file not shown.

View file

@ -1 +0,0 @@
/media/win_e/Clara_Daten/etc/Programmierung/Rust/src/target/debug/test: /media/win_e/Clara_Daten/etc/Programmierung/Rust/src/test.rs

4
test2/Cargo.lock generated
View file

@ -1,4 +0,0 @@
[root]
name = "test2"
version = "0.1.0"

View file

@ -1,6 +0,0 @@
[package]
name = "test2"
version = "0.1.0"
authors = ["clara <clara.mueller@vilera.de>"]
[dependencies]

View file

@ -1,26 +0,0 @@
// another rust programm
// let's get started ^.^
use std::io; // use io library from the standard library
// rust only uses few things by default ('prelude') -> add your needs!
//main function
fn main() {
println!("guess a number!"); // macro, prints string
println!("please input your guess!."); // macro, prints string
let mut guess = String::new(); // let -> create 'variable bindings'; String -> string type (UTF-8 encoded bit of text); '::' -> associate function; 'new()' -> created empty
let foo = 5; // 'foo' is immutable
let mut bar = 5; //'bar' is mutable
io::stdin().read_line(&mut guess) // calling associated function // without std::io -> written 'std::io::stdin()' //returns handle to standard input
// read_line() -> calling method (like associate function, only on parcticular instant of type) an handle
// read_line():&mut guess -> passing argument to mutable reference of guess
.expect("failed to read line"); // io::Result encodes error handling information // not successful -> panic! with message "failed to read line"
println!("you guessed: {}", guess); // print out saved string from STDIN
println!("FOO: {} & BAR: {}", foo, bar) // print out string variables
}

View file

@ -1 +0,0 @@
{"rustc":9749998217168482212,"target":11282531132251368481,"profile":14528549471338536373,"local":{"variant":"MtimeBased","fields":[[1492017977,202731800],[47,109,101,100,105,97,47,119,105,110,95,101,47,67,108,97,114,97,95,68,97,116,101,110,47,101,116,99,47,80,114,111,103,114,97,109,109,105,101,114,117,110,103,47,82,117,115,116,47,115,114,99,47,116,101,115,116,50,47,116,97,114,103,101,116,47,100,101,98,117,103,47,46,102,105,110,103,101,114,112,114,105,110,116,47,116,101,115,116,50,45,48,51,100,54,98,99,48,97,98,102,49,50,51,51,100,100,47,100,101,112,45,98,105,110,45,116,101,115,116,50,45,48,51,100,54,98,99,48,97,98,102,49,50,51,51,100,100]]},"features":"None","deps":[],"rustflags":[]}

Binary file not shown.

View file

@ -1 +0,0 @@
/media/win_e/Clara_Daten/etc/Programmierung/Rust/src/test2/target/debug/test2: /media/win_e/Clara_Daten/etc/Programmierung/Rust/src/test2/src/main.rs