Introduce pet-projects dir
[lcapit-junk-code.git] / pet-projects / web / home-page / junkcode.html
blobc913b61707fbf6bafa61c7b55332468207238fad
1 <html>
2 <head>
3 <link rel="stylesheet" type="text/css" href="style.css" />
4 <title>Luiz's Junk Code</title>
5 </head>
6 <body>
8 <h2 align="center">Junk Code</h2>
10 <p>My junk code repository has some small projects and several code examples
11 in C, C++, C#, Python, Bash and AWK.</p>
13 <p>The most interesting ones are listed below and the repository information
14 is at the end of this page.</p>
16 <h4><a href="http://repo.or.cz/w/lcapit-junk-code.git?a=tree;f=linux-kernel;h=cdca626ada7a06e0459f73447201a369d6e958d8;hb=HEAD">Linux kernel code</a></h4>
18 <blockquote>
19 Some time ago I have tried to port the USB Serial layer to use the Serial
20 Core subsystem but it showed some problems with the fact that USB devices
21 have to sleep when changing device settings... Anyway, the original pachset
22 is <a href="http://repo.or.cz/w/lcapit-junk-code.git?a=tree;f=linux-kernel/PATCHES/serial-core-port-V0;h=624cbfd35598c75c54a3eb94717498113b8c785d;hb=HEAD">here</a>
23 and I have written two drivers to understand how the Serial Core and TTY
24 subsystems work, code is <a href="http://repo.or.cz/w/lcapit-junk-code.git?a=tree;f=linux-kernel/fake-serial;h=5156007bccd4aad615bf1a3f6d1c8dfcdb3751bb;hb=HEAD">here</a>.
25 </blockquote>
27 <blockquote>
28 Besides that the linux-kernel directory has examples of debugfs, netlink,
29 rbtree and others.
30 </blockquote>
32 <h4><a href="http://repo.or.cz/w/lcapit-junk-code.git?a=tree;f=books/mawc;h=16a11de9fa2c7ebadfaf1273a9f55b1ea1994cc6;hb=HEAD">Basic data structures</a></h4>
34 <blockquote>
35 There are examples of lists (singly-linked, doubly-linked and circulary-linked),
36 queue, stack, hash-tables and binary-tree.
37 </blockquote>
39 <h4><a href="http://repo.or.cz/w/lcapit-junk-code.git?a=tree;f=CEP;h=52e280c4271c59f027fb027b2f457129ee4a8b05;hb=HEAD">CEP program</a></h4>
41 <blockquote>
42 I have written a program to search for an address in
43 <a href="http://en.wikipedia.org/wiki/Curitiba">Curitiba</a> given the CEP
44 number (Brazil's post code system). The program can use the following data
45 structures to store the addresses information:
47 <ul>
48 <li>Singly-linked list</li>
49 <li>Binary search tree</li>
50 <li>AVL tree</li>
51 <li>AA tree</li>
52 </ul>
54 The user can choose the data structure in the command-line. There is also a
55 version in Python and C# with different data structures.
56 </blockquote>
58 <h4><a href="http://repo.or.cz/w/lcapit-junk-code.git?a=tree;f=static-data-structures;h=45489df03b48c87ed42859508d285ffcafd3a1d5;hb=HEAD">Static data structures</a></h4>
60 <blockquote>
61 Sometimes, when you are writting a program or library, you need to use something
62 better than an array to store data but you do not want to use dynamic memory
63 or anything complicated.
64 </blockquote>
66 <blockquote>
67 The solution is to use the "static version" of some known data structure.
68 </blockquote>
70 <h4><a href="http://repo.or.cz/w/lcapit-junk-code.git?a=tree;f=mega-sena;h=94b5b78808397f6c8f3b81773bb8b3b4b17f4b0c;hb=HEAD">Mega Sena program</a></h4>
72 <blockquote>
73 Mega-Sena is the name of Brazil's most valuable national loterry. I have
74 written a program which reads all the Mega-Sena results in memory (they
75 are available in the Web) and does the loterry.
76 </blockquote>
78 <blockquote>
79 The program uses a hash table to store its data, and the user can choose
80 the following types of hash-tables:
82 <ul>
83 <li>Open Addressing (linear probing)</li>
84 <li>Cuckoo hashing</li>
85 </ul>
87 </blockquote>
89 <h3>Repository</h3>
91 <ul>
92 <li><a href="http://repo.or.cz/w/lcapit-junk-code.git?a=tree">Browse</a> the source code</li>
93 <li>Repository page:
94 <a href="http://repo.or.cz/w/lcapit-junk-code.git">http://repo.or.cz/w/lcapit-junk-code.git</a></li>
95 <li>Clone command: $ git clone git://repo.or.cz/lcapit-junk-code.git</li>
96 </ul>
98 </body>
99 </html>