Instructions
cargo new test-rustgym-longestcommonprefix
cd test-rustgym-longestcommonprefix
- copy src/main.rs from below file
cargo test
#!/bin/bash | |
# from https://raw.githubusercontent.com/golemfactory/golem/develop/Installer/Installer_Linux/install.sh | |
# Usage: bash spinner.sh | |
spin='⡄⡆⡇⠇⠃⠋⠉⠙⠘⠚⠒⠖⠆⠦⠤⢤⢠⣠⣀⣄' | |
printf "hey there .. working " | |
while true | |
do |
Instructions
cargo new test-rustgym-longestcommonprefix
cd test-rustgym-longestcommonprefix
cargo test
+-------------------------+------------------------+---------------------+-----------------+-----------------+-------------+ | |
| . | ImageMagick-6 | NetworkManager | ODBCDataSources | PackageKit | UPower | | |
+-------------------------+------------------------+---------------------+-----------------+-----------------+-------------+ | |
| adduser.conf | coder.xml | NetworkManager.conf | | PackageKit.conf | UPower.conf | | |
| anacrontab | colors.xml | conf.d | | Vendor.conf | | | |
| apg.conf | delegates.xml | dispatcher.d | | | | | |
| appstream.conf | log.xml | dnsmasq* (2) | | | | | |
| bash* (2) | magic.xml | system-connections | | | | | |
| bindresvport.blacklist |
// Based on https://github.com/redox-os/orbtk/blob/a9653954fed7275328bc8e893c3465506154571e/examples/clear.rs | |
// Modified to add a trait member called "summary" which is either implemented as a Book or a NewsArticle | |
// The summarize button would call the trait function "summarize" (be it from Book or NewsArticle). | |
// I couldn't get this to work yet, with the troubling sections marked with FIXME | |
use orbtk::prelude::*; | |
//--------------------------------------- | |
// https://doc.rust-lang.org/1.30.0/book/second-edition/ch10-02-traits.html | |
pub trait Summary { |
If file is large, use https://stackoverflow.com/a/39225039/4126114 instead
// from https://github.com/FBerendsen/niftireg/blob/fc526c152fd5eaced271d1d6de7c16661b2abd3e/reg-lib/cuda/checkCudaCard.cpp | |
// | |
// rm test | |
// g++ -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda test.cpp # undefined reference to cudaGetDeviceCount | |
// PATH=$PATH:/usr/local/cuda/bin/ | |
// nvcc -x cu test.cpp --std=c++11 -lineinfo -o test | |
#include <cuda_runtime.h> | |
//#include <cuda.h> |