In Android development I occasionally need test some separated functionality. Building the whole project takes time and may causes side-effects. That’s why I use command line compiler.
Continue readingKotlin Command Line Compiler
Reply
In Android development I occasionally need test some separated functionality. Building the whole project takes time and may causes side-effects. That’s why I use command line compiler.
Continue readingIn Python there exists logging module. You should use it instead of print function. In this article I’ll show you how use logging in sub-modules.
Continue readingIn Bash there are two well-known constructs named here-document and here-string. here-document is
wc << EOF
> one two three
> four five
> EOF
2 5 24
and here-string is
bc <<< 5*4
Continue reading files=(Screen*.png)
if [ $files = "Screen*.png" ]; then
echo "No match"
else
# Override or append
files[2]="test1"
# Remove
files=("${files[@]:0:1}" "${files[@]:3:4}")
# Length
echo ${#files[@]}
for file in "${files[@]}"; do
echo "$i"
done
for ((i = 0; i < ${#files[@]}; i++)); do
echo "${files[i]}"
done
fi
case "$a" in
"a")
echo "a"
;;
"b")
echo "b"
;;
*)
echo "else"
;;
esac
path="/var/www/html"
echo ${path##*/} # Last directory
# # from beginning, shortest match
# ## from beginning, longest match
# % from end, shortest match
# %% from end, longest match