A short intro on classes in Python with code snippets and notes taken from the python docs
Class: a blue print for an instance
Instance: a constructed object of the class
Type: indicates the class the instance belongs to
Attribute: any object value : object.attribute
Method: a "callable attribute" defined in the class
Monday, May 25, 2015
Sunday, March 29, 2015
Flask pe Raspberry cu Postgres, nginx si uwsgi
Raspberry Arch Linux pe ARM. Install guide here
Se presupune ca sistemul e conectat la internet.
pacman -S nginx python2-virtualenv python-virtualenv uwsgi-plugin-python,uwsgi-plugin-python2 python2-setuptools python2-pip posgtresql bash-completion gcc pithon-pip vim htop atpo sudo nload minicom links tcpdump git tmux ntpd zsh
VLAN-uri
Am vrut sa am doua sisteme sa comunice prin switch pe vlan-uri separate.
Ar fi doua optiuni.
In sensul acesta trebuie sa facem in felul urmator:
Ar fi doua optiuni.
- SVI pe switch
- SVI pe linux.
In sensul acesta trebuie sa facem in felul urmator:
Saturday, February 21, 2015
Keeping track of notes - notepad on steroids
You may like Zimwiki .
It's a wiki based program that's bare bones, but has the basics: font format, headers, bullet lists, number lists, to do boxes.
It's a wiki based program that's bare bones, but has the basics: font format, headers, bullet lists, number lists, to do boxes.
Friday, February 13, 2015
Connecting a switch to GNS3
Connecting a switch to GNS3
VLANs
MAC Table overflow
VLANs
MAC Table overflow
Sunday, October 26, 2014
Haskell Introducere, Liste, uplu, functii, tipuri polimorfice, supraincarcare.
Tipurile de baza:
·
Bool – valori logice
Contine
valorile logice False si True.
·
Char – caractere
Contine toate caracterele
disponibile de la tastatura precum ‘a’, ‘_’, ‘V’, precum si un numar
de caractere de control precum ‘\n’, ‘\t’.
·
String – siruri de caractere
Acest tip contine toate
secventele de caractectere, precum “abc”, “1+2=3” si sirul vid “”.
·
Int – numere intregi intre -231 si 231 -1
·
Integer – numere intregi cu precizie
infinita
·
Float - single-precision
floating-point numbers
Thursday, October 23, 2014
Haskell - Defining custom data types
- allows us to add structure to the values in our programs
- defining our own types also imrpoves the safety of our code
- haskell will not allow us to accidentally mix values of two values that are structurally similar but have different names.
-- file: ch03/BookStore.hs
data BookInfo = Book Int String [String]
deriving (Show)
- The BookInfo after the
datakeyword is the name of our new type. We call BookInfo a type constructor. - The
Bookthat follows is the name of the value constructor (sometimes called a data constructor) - After
Book, the Int, String, and [String] that follow are the components of the type.
Subscribe to:
Posts (Atom)