Where Can You Find the build_rust.sh Script?

Problem scenario
You want to use Rust and Incubed (the Blockchains in3 crate). You search for “build_rust.sh”, but you find irrelevant build-rust.sh files. How do you find the one with the underscore (or underbar) and not the hyphen/dash?

Solution
Here is the content:

#!/bin/sh
cd ..
mkdir -p rust/in3-sys/in3-core
mkdir -p rust/in3-sys/in3-core/c
cp -r c/CMakeLists.txt c/macro.cmake c/compiler.cmake c/docs c/src c/include rust/in3-sys/in3-core/c/
cp CMakeLists.txt rust/in3-sys/in3-core/
export UPDATE_IN3_BINDINGS=1
cd rust &&  » Read more..

How Do You Find the Vertical Scroll Bar to Browse Emails in Apple Mail?

Problem Scenario
You are using Apple Mail. You want to scroll up and down to see the senders and subjects of emails. You cannot find the vertical scroll bar. What should you do?

Solution
Increase or decrease the window’s vertical length by clicking and holding a horizontal edge of the window with the mouse and moving the edge in one direction. After you do this the vertical scroll bar should appear.

 » Read more..

How Do You Fix a Python Program that Returns “Killed”?

Problem scenario
You are trying to write a Python program. It returns “Killed” on a Linux terminal. How should you fix this?

Possible Solution #1
Refactor your code. There is a programming method called “brute force” which is a reference to creating an exhaustive number of possibilities and processing those possibilities. This method will not work for certain problems because the input size is too large.

 » Read more..

How Do You Sign out of Uber.com when Using a Web Browser?

Problem scenario
You have logged into Uber. You are not sure how to log out of the web browser. You do not want to just close the web browser. What should you do?

Solution
Click “Help”.
In the next page you should see your name in the upper right hand corner. Click it, then click “Log off”.

 » Read more..

How Do You Troubleshoot the Python Problem “UnicodeEncodeError: ‘ascii’ codec can’t encode character”?

Problem scenario
You are trying to print out a variable in Python. But you get an error like this: “UnicodeEncodeError: ‘ascii’ codec can’t encode character ‘\xa0’ in position 70567: ordinal not in range(128)”

What should you do?

Solution
Root cause: A variable needs to be encoded as UTF instead of the default ASCII encoding.

Procedures
Assuming that var1 is a variable holding the results of a requests.get(url),

 » Read more..

How Do You Troubleshoot the C Error “No such file or directory…compilation terminated”?

Problem scenario
You try to compile a C program, but it fails with “compilation terminated.” The error message says “foobar/foobar.h No such file or directory.” What should you do?

Solution
This solution does not address where should header files for c go. But it addresses the problem.
Find where foobar.h is: sudo find / -name foobar.h

Run the gcc command again,

 » Read more..

How Do You Troubleshoot the Cargo/Rust Error “use of undeclared type or module”?

Problem Scenario
You run a “cargo run” command. You get an error like one or more of the following:

use of undeclared type or module api

use of undeclared type or module serde_json

use of undeclared type or module async-std

What should you do?

Solution
Update the Cargo.toml file. The dependencies section should have an entry like one of the following (but the version number may or may not differ):

[package]
name = “in3-tutorial”
version = “0.0.1”
authors = [”reader@medium.com”]
edition = “2018”

[dependencies]
in3 = “0.1.7”
async-std = “1.5.0”
futures-executor = “0.3.5”
serde_json = “1.0”
ethabi = “13.0.0”
ethereum_abi = “0.2.0”
ethbloom = “0.10.0”

[[bin]]
name = “in3”
path = “/home/jdoe/rust/contint.rs”

If you are not sure what version is valid,

 » Read more..

How Do You Delete an Instavoice Voicemail?

Problem scenario
You have some Instavoice voicemails on your smart phone. You want to delete them. What do you do?

Solution
Go to the voicemails in the app. Tap and hold a voicemail you want to delete. It should be highlighted with a gray color. A trash can icon should appear in the upper right hand corner. Click the trash can icon.

 » Read more..

How Do You Troubleshoot “cp: cannot stat …: No such file or directory” when Running build_rust.sh?

Problem scenario
You are running build_rust.sh to use Blockchains’ Incubed. But you get an error message like this:

cp: cannot stat ‘c/CMakeLists.txt’: No such file or directory
cp: cannot stat ‘c/macro.cmake’: No such file or directory
cp: cannot stat ‘c/compiler.cmake’: No such file or directory
cp: cannot stat ‘c/docs’: No such file or directory
cp: cannot stat ‘c/src’: No such file or directory
cp: cannot stat ‘c/include’: No such file or directory
cp: cannot stat ‘CMakeLists.txt’: No such file or directory

What should you do?

 » Read more..

How Do You Briefly Look at the Conditions of Kubernetes Nodes?

Problem scenario
What is a good command to see the overall health of your Kubernetes servers (nodes)?

Solution
Run this command: kubectl describe nodes

 » Read more..