ASM --- * "invalid effective address" mov [ebp-32-edi*4], 1 nie działa Zadziała mov [ebp-48+edi*4], 1 ale trzeba przebiegać edi w drugą stronę C++ --- * Bezpieczne wczytywanie liczb ze strumienia int x; std::cout << "Podaj liczbę: " << std::flush; std::cin >> x; while (!std::cin.good()) { std::cin.clear(); std::cin.ignore(255,'\n'); std::cout << "Podaj liczbę: " << std::flush; std::cin >> x; } * operatory (na przykładzie iteratorów) /// A const_iterator. /// It also serves as a base for the (not const) iterator. class const_iterator : public std::iterator > { public: typedef std::pair T; protected: /// Points to the tree element Node* node; friend class TreeMap; const_iterator(Node* x) : node(x) {} public: const_iterator() {} const_iterator(const const_iterator& a) : node(a.node) {} inline const T& operator*() const { return node->data; } inline const T* operator->() const { return &(node->data); } // preincrement /*inline*/ const_iterator& operator++(); // postincrement /*inline*/ const_iterator operator++(int); // predecrement /*inline*/ const_iterator& operator--(); // postdecrement /*inline*/ const_iterator operator--(int); inline bool operator==(const const_iterator& a) const { return node == a.node; } inline bool operator!=(const const_iterator& a) const { return node != a.node; } }; /// An iterator. class iterator : public const_iterator { iterator(Node* x) : const_iterator(x) {} friend class TreeMap; public: iterator() {} iterator(const const_iterator& a) : const_iterator(a) {} iterator(const iterator& a) { node = a.node; } inline T& operator*() const { return node->data; } inline T* operator->() const { return &(node->data); } iterator& operator++() { // preincrement ++(*(const_iterator*)this); return (*this); } iterator operator++(int) { // postincrement iterator temp = *this; ++*this; return temp; } iterator& operator--() { // predecrement --(*(const_iterator*)this); return (*this); } iterator operator--(int) { // postdecrement iterator temp = *this; --*this; return temp; } }; JS --- * Problem z `getAttribute` w IE? http://tobielangel.com/2007/1/11/attribute-nightmare-in-ie/ * Porządna obsługa ciasteczek? http://www.alistapart.com/stories/alternate/ * Przekazanie funkcji jako argument? Funkcja to też zmienna. Np.: `obj.addEventListener('click', fun);` * Nie działają atrybuty w obiektach? Zamiast `obj.foo` wypróbuj `obj['foo']` * (prawdopodobnie) Najfajniejszy edytor na stronę: http://www.wymeditor.org/ - WYSIWYM - What You See Is What You Mean * addEvent? że niby attachEvent(IE) == obj.addEventListener(other) http://www.quirksmode.org/blog/archives/2005/08/addevent_consid.html http://www.dustindiaz.com/rock-solid-addevent/ * setInterval/Timeout(func, delay, param1, ...) w IE setInterval(function() { func(param1, ...); }, delay); RegExp --- * cokolwiek-nie-foo foo /([^(foo)])*foo/ Bash --- * backup wraz z zachowaniem praw i właścicieli tar -czvf katalog.tgz katalog/ * rozpakowanie tag -xzvf katalog.tgz Arch --- * bardzo fajny mirror http://mirrors.gigenet.com/archlinux/testing/os/i686/