This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Neka je zadana baza znanja: | |
| zaposlenik::osoba. | |
| kupac::osoba. | |
| menadzer::zaposlenik. | |
| direktor::menadzer. | |
| stefica:kupac. | |
| ivek:zaposlenik. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| void quickSort(zaposlenici arr*, int left, int right) | |
| { | |
| int i = left, j = right; | |
| zaposlenici tmp; | |
| zaposlenici *pivot = arr[(left + right) / 2]; | |
| /* partition */ | |
| while (i <= j) { | |
| while (arr[i]->oib < pivot->oib) | |
| i++; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun rename-file-and-buffer (new-name) | |
| "Renames both current buffer and file it's visiting to NEW-NAME." | |
| (interactive "sNew name: ") | |
| (let ((name (buffer-name)) | |
| (filename (buffer-file-name))) | |
| (if (not filename) | |
| (message "Buffer '%s' is not visiting a file!" name) | |
| (if (get-buffer new-name) | |
| (message "A buffer named '%s' already exists!" new-name) | |
| (progn |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * mcwm, a small window manager for the X Window System using the X | |
| * protocol C Binding libraries. | |
| * | |
| * For 'user' configurable stuff, see config.h. | |
| * | |
| * MC, mc at the domain hack.org | |
| * http://hack.org/mc/ | |
| * | |
| * Copyright (c) 2010, 2011, 2012 Michael Cardell Widerkrantz, mc at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Async class for communication with I/O for saving taken photo | |
| * @param jpeg byte representation of given photo for saving to filesystem | |
| */ | |
| class SavePhotoTask extends AsyncTask<byte[], String, String> { | |
| @Override | |
| protected String doInBackground(byte[]... jpeg) { | |
| UUID image_name = UUID.randomUUID(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cdef class CArray: | |
| """Class for representing c-array. Due to lack of void ptr arithmetic support there is no void casting magic, therefore per type casting is needed.""" | |
| cdef public list PyList | |
| cdef public unsigned int PyListSize | |
| def __init__(self, arr=None): | |
| dprint("Initialize CArray in __init__") | |
| if arr is not None: | |
| self.PyList = self.fix_args(arr) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .. code-block:: bash | |
| git checkout gh-pages | |
| git merge -s ours master | |
| git checkout master | |
| git merge gh-pages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find . -mtime 0 -print | awk '{print "scp "$0" user@hostname:/a/b"}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| JS | |
| function validatePass(p1, p2) | |
| { | |
| if (p1.value != p2.value || p1.value == '' || p2.value == '') | |
| { | |
| p2.setCustomValidity('Password incorrect'); | |
| } else { | |
| p2.setCustomValidity(''); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://www.paulgraham.com/avg.html | |
| http://programmers.stackexchange.com/questions/55284/is-lisp-still-useful-in-todays-world-which-version-is-most-used | |
| http://norvig.com/paip.html | |
| http://stackoverflow.com/questions/108201/common-lisp-or-scheme |