> [] * []
0
Why is this?
Because, it seems that []
gets cast to a 0
when performing arithmetic.
$ tree | |
. | |
├── Dockerfile | |
├── index.html | |
├── index.js | |
└── package.json | |
$ docker build . | |
Uploading context 6.144 kB | |
Uploading context |
$ ansible vagrant -a 'ls /home' | |
vagrant-host | success | rc=0 >> | |
vagrant | |
$ ansible vagrant -a 'cd /home' | |
vagrant-host | FAILED | rc=2 >> | |
[Errno 2] No such file or directory |
> [] * []
0
Why is this?
Because, it seems that []
gets cast to a 0
when performing arithmetic.
import string | |
def is_pangram(sentence): | |
""" | |
A pangram is a sentence that contains every letter of the alphabet. This | |
function determines whether the given sentence is a pangram. | |
>>> is_pangram('the quick brown fox jumps over the lazy dog') | |
True | |
""" |
# Robots | |
This is supposed to be the future. Where are my robot servants!? | |
The robots below could potentially be split up into a group of specialized robots. | |
Those independent robots could also potentially connect with each other and transform into a more powerful robot. | |
## Mailbot |
/** | |
* Firefox custom CSS for Numix GTK Theme | |
* To use with Firefox Numix Theme : https://addons.mozilla.org/fr/firefox/addon/numix-gtk3theme/ | |
* Better with Omnibar FIrefox Add-On : https://addons.mozilla.org/fr/firefox/addon/omnibar/ | |
*/ | |
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul); | |
/* Awesomebar improvements */ | |
#urlbar { |
# first import the global | |
from global import myspecialglobal | |
# now import bootstrap which changes the global | |
import bootstrap | |
# what is the value of myspecial global? | |
print myspecialglobal |
:- dynamic people/1. | |
:- dynamic portray_message/2. | |
:- use_module(library(prosqlite)). | |
set_gender(_, []). | |
set_gender(Sex, [Name|Names]) :- | |
sex(Name, Sex), | |
set_gender(Sex, Names). |
declare_mortals([]). | |
declare_mortals([X|Xs]) :- mortal(X), declare_mortals(Xs). | |
mortal(socrates). | |
main :- | |
OtherMortals = [plato, aristotle, philosoraptor], | |
declare_mortals(OtherMortals). | |
% ?- main. |