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
| using System; | |
| namespace Example | |
| { | |
| delegate void Callback(int x); | |
| class Application |
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
| // Example of memory allocation in C. | |
| // For educational purposes only. | |
| // Author: Vaclav Bohac | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int main( void ) |
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
| // Example of message queue in C. | |
| // For educational purposes only. | |
| // Author: Vaclav Bohac | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <errno.h> | |
| #include <string.h> | |
| #include <signal.h> |
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
| // Deletes message queue in C. | |
| // For educational purposes only. | |
| // Author: Vaclav Bohac | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <errno.h> | |
| #include <string.h> | |
| #include <signal.h> |
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
| BIN = matrix | |
| matrix: matrix.pas | |
| fpc matrix.pas -o$(BIN) | |
| clean: | |
| rm *.o $(BIN) |
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
| # Vaclav Bohac (c) 2011 | |
| FLAGS = -D__USE_REENTRANT -lpthread | |
| hthread: hello-thread.o | |
| cc $(FLAGS) -o $@ $< | |
| hello-thread.o: hello-thread.c | |
| cc -o $@ -c $< |
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
| all: test.dll | |
| test.dll: TestSerialization.cs | |
| mono-csc -t:library -pkg:mono-nunit $< -out:$@ | |
| test: test.dll | |
| nunit-console $< | |
| clean: | |
| -rm test.dll *.xml |
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
| object Primes { | |
| def iterate(max: Int, callback: (Int) => Boolean) { | |
| for (i <- 1 to max) { | |
| if (callback(i)) { | |
| println(i) | |
| } | |
| } | |
| } | |
| def isPrime(number: Int) : Boolean = { |
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
| " ~/.vim/filetype.vim | |
| " Detecting latte in vim. | |
| if exists("did_load_filetypes") | |
| finish | |
| endif | |
| augroup filetypedetect | |
| au! BufRead,BufNewFile *.latte setfiletype smarty | |
| au! BufRead,BufNewFile *.phtml setfiletype smarty | |
| au! BufRead,BufNewFile *.neon setfiletype yaml |
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
| " Set up color theme. " | |
| (add-to-list 'load-path ".emacs.d") | |
| (require 'color-theme) | |
| (require 'color-theme-gruber-darker) | |
| (eval-after-load "color-theme" | |
| '(progn | |
| (color-theme-initialize) |