sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh
use std::any::type_name; | |
use tokio_retry::strategy::{jitter, FixedInterval}; | |
use tokio_retry::Retry; | |
#[derive(Debug)] | |
struct ImageId { | |
id: Option<String>, | |
} | |
async fn action() -> Result<ImageId, ()> { |
I'm facing this exact issues on my ASUS TUF FX505.
FN + <Up>
, FN + <Down>
/sys/class/leds/
(how linux kernel handles leds) does not have a corresponding device:~[/sys/class/leds]$ tree .
.
├── asus-wireless::airplane -> ../../devices/LNXSYSTM:00/LNXSYBUS:00/ATK4002:00/leds/asus-wireless::airplane
/* | |
* Demonstrate using an http server and an HTML form to control an LED. | |
* The http server runs on the ESP8266. | |
* | |
* Connect to "http://esp8266WebForm.local" or "http://<IP address>" | |
* to bring up an HTML form to control the LED connected GPIO#0. This works | |
* for the Adafruit ESP8266 HUZZAH but the LED may be on a different pin on | |
* other breakout boards. | |
* | |
* Imperatives to turn the LED on/off using a non-browser http client. |
Scala provides many tools to help us build programs with less runtime errors.
Instead of relying on nulls, the recommended practice is to use the Option
type.
Instead of throwing exceptions, Try
and Either
types are used for representing potential error scenarios.
What’s common with these features is that they’re used for capturing runtime features in the type system,
thus lifting the runtime scenario handling to the compilation phase:
your program doesn’t compile until you’ve explicitly handled nulls, exceptions, and other runtime features in your code.
In his “Strategic Scala Style” blog post series,
$ mkdir ~/selenium
$ cd ~/selenium
$ wget http://goo.gl/rQhaxb
$ mv selenium-server-standalone-2.49.1.jar ~/selenium/
import shapeless._ | |
import ops.hlist.Tupler | |
trait TupleGeneric[C <: Product] extends Serializable { | |
type Repr <: Product | |
def to(t : C) : Repr | |
def from(r : Repr) : C | |
} |
import cats.{Id,Monad} | |
import cats.state.State | |
import cats.std.function._ | |
import scala.language.higherKinds._ | |
// Call Example.example.run to see the example running | |
object Example { | |
type MyState[A] = State[Int, A] |