Notes, summaries, assignments, exams, and exercises for Technology for Primary education

LaTeX Document Template for Landscape Multi-Column Layouts

Technology2.65 KB

The following LaTeX source defines a compact landscape document with three columns, reduced section spacing, and no header or footer. It is well suited to cheat sheets and dense reference material.

Document Setup and Packages

\documentclass[10pt,landscape]{article}
\usepackage{multicol}
\usepackage{calc}
\usepackage{ifthen}
\usepackage[landscape]{geometry}
\usepackage{amsmath,amsthm,amsfonts,amssymb}
\usepackage{color,graphicx,overpic}
\usepackage{hyperref}
\pdfinfo{
  /Title (example.pdf)
  /Creator (TeX)
  /Producer (pdfTeX 1.40.0)
  /Author (Seamus)
  /Subject (Example)
  /Keywords (pdflatex, latex, pdftex, tex)}

This sets page margins to 0.5 inch when using letter paper, and to 1 cm when using A4 paper. For other paper sizes, the default 1...

Continue reading "LaTeX Document Template for Landscape Multi-Column Layouts" »

Wzorce projektowe PHP – Behavioral, Creational, Structural i optymalizacja baz danych

Technology33.56 KB

Behavioralne wzorce projektowe

Behavioralne wzorce projektowe wspomagają procesy i mechanizmy komunikacji pomiędzy obiektami klas. Dzięki ich wykorzystaniu możemy zwiększyć elastyczność i wydajność prowadzenia wymiany danych.

Iterator

Iterator wykorzystujemy po to, by traktować obiekt jako listę / kolekcję obiektów.

/*
 * Wykorzystujemy po to, by traktować obiekt jako listę / kolekcję obiektów
 */

namespace Patterns\Behavioral\Iterator;

use Iterator;

class ListaPiwIterator implements Iterator
{
   private $listaPiw;
   protected $aktualnePiwo = 0;

   public function __construct(ListaPiw $listaPiw)
   {
       $this->listaPiw = $listaPiw;
   }

   public function current()
   {
       return $this->aktualnePiwo->getBook(
...
Continue reading "Wzorce projektowe PHP – Behavioral, Creational, Structural i optymalizacja baz danych" »