Welcome to Elitecoder's Wiki -
Here I will post various things related to my understanding of programming, embedded systems and many other things as I come to discover them.
You are welcome to add on my knowledge and correct any misunderstandings.
During 2007 and 2008, I worked at Center for High Performance Embedded Systems and most of my work involved developing device drivers and middle-ware for T-Kernel Operating System. Following are a few articles explaining how to develop device drivers and subsystems for SH7727 based T-Engines.
SDI [Simple Driver Interface] Device Driver Development
1. SDI Device Driver Guide Part 1
2. SDI Device Driver Guide Part 2
3. Device Driver Demo Source Code
T-Kernel Sub-system Development
1. Sub-System Guide Part 1
2. Sub-System Guide Part 2
3. SubSystem Demo Source Code
Loading Applications on Startup
HOWTO: Load an Application at System Startup
Following is a list of my Projects, personal as well as course-work:
Course-Work Projects
- Travelling Salesman Problem (Fall 2008)
- Block Cipher Modes of Operation (Fall 2008)
- Secure Employee Authentication Scheme (Fall 2008)
- Secure FTP With In-Built Authentication (Fall 2008)
Personal Projects
A few things I found interesting in Ruby (The Programming Language), can be found at my ruby nuggets page.
Similarly, here is the page for rails nuggets.
Following are some of my Ruby Snippets at Github Gist:
2. Changing Names of MP3 Song Files (present in a directory) using Tag Information. (For Win32)
Regular Expressions Cheat Sheet
1. Matching a string - "Ben" (Case sensitive)
Note - You need to surround the reg-ex expression with "/" and "/" in ruby.
String = "I am Ben"
Regex = /Ben/
Will Match = "I am Ben"
Note - You can also match all occurances but need to pass a flag for that. To-Do - Need to figure out how to pass that flag in ruby.
2. "." will match any character - so "/c.t/" will match cat and cot
3. In order to match special characters, you need "\" to escape them. Thus "/\./" will match a "."
4. "[" and "]" will match any and only those characters defined between them. so [ns] will only match n or s.
5. Range
"[0-9]" means ranging from 0 to 9. Similarly "[a-z]"
6. Don't use stupid ranges like "[3-1]" coz it will make the pattern to stop working as a whole.
7. Anything But Matching
"^" Metacharacter will match anything but the character succeeding it.
8. Matching special characters like whitespaces
[\b] - Backspace
\f - Form Feed
\n - Line Feed
\r - Carriage Return
\t - Tab
\v - Vertical Tab
9. Shortcuts
\d - Same as [0-9]
\D - Same as [^0-9]
\w - Same as [A-Za-z0-9_]
\W - Same as [^A-Za-z0-9_]
\s - Same as any whitespace character
\S - Same as Anything but any whitespace character
10.
/\w+[ \w.] *@[\w. ] +\. \w+/
\w+ matches any alphanumeric character but not . (the valid characters with which to start an email address). After the initial valid characters, it is indeed possible to have a . and additional characters, although these may in fact not be present. [\w. ] * matches zero or more instances of . or alphanumeric characters, which is exactly what was needed.
11. ? matches optional text (and so zero instances will match). But unlike +, ? matches only zero or one instance of a character (or set), but not more than one.
# Range Interval Matching
Intervals may also be used to specify a range of values—a minimum and a maximum number of instances that are to be matched. Ranges are specified as { 2, 4} (which would mean a minimum of 2 and a maximum of 4). Also, { 3, } means match at least 3 instances, or stated differently, match 3 or more instances.
# Lazy Identifiers
Metacharacters such as * and + are greedy; that is, they look for the greatest possible match as opposed to the smallest. It is almost as if the matching starts from the end of the text, working backward until the next match is found, in contrast to starting from the beginning. This is deliberate and by design, quantifiers are greedy.
But what if you don't want greedy matching? The solution is to use lazy versions of these quantifiers (they are referred to as being lazy because they match the fewest characters instead of the most). Lazy quantifiers are defined by appending an ? to the quantifier being used, and each of the greedy quantifiers has a lazy equivalent, *?, +? , {n,}?
I solve puzzles at times. Following are a few of my solutions.
Solitaire Cipher
Linked List Problems
By moc.liamg|arorahtrahdis.sti#natiT
Well I am getting rusty, so I am trying something new this time .
The Clock is ticking: You get 6 hours to finish a project!!
Hour UNO
During this 6 hour session I will prepare a Requirement Doc , an algorithm and implement the same within 6 hours . Its not really a big project but doing it properly within this time frame is important.
For the first of these sessions lets Take a simple mini project.
IP MESSENGER
If I am unable to make it then The page goes ….. I will update the section along with time
Time right now is 7:56 PM IST 16 Nov 2010
Count down begins at 8:00PM
Just One line to myself
- HAVE FUN!!!
I will update only if there are any major updates, Otherwise only expect hourly updates.
20:01 . Time to Start :).
20:20 Got a Nice template from MS OFFICE online and now starting to write a small proposal down.
Also started downloading Netbeans as thought maybe lets make it using Java. (Next time some other language)
GTG will update soon :).
Hour TWO
21:07 Sorry for the late update .
Almost finished with the first cut of the Proposal. I am going to update the same in my google docs . Link coming up soon.
Another update . Seems i am missing JDK 1.6 so . 11 minutes to jdk download . Guess I can use this time to revisit my Proposal . But U will be able to see the first cut :). Brb Let me upload.
21:18
All Project Related Documentation here
Use the above link to see all the project related documentation.
21:49 Downloaded the latest version of JDK , Updated the Proposal with Use Cases and Tools used. Refer V0.2
Next Tast Installation of all the tools .
Keep on waiting for the next Update .. :).
Hour THREE
22:10 Installed JDK , Now installing Netbeans .
BTW had dinner in mean time . Had a nice meal .
Seems Netbeans is taking its time . So lets have a quick recap. of last 2 hours.
- Done with a base version of Proposal
- Almost finished with tool installation
Next we are left with Design and Coding part Next 4 Hours
Considering Design what we are trying to implement is a client server model and a GUI that interacts with the client server model. Now the most important part without which our application is destined to doom is the client server part .So lets start with it first.
20:17:
In IP Messenger a system acts both as a client and a server at the same time . So we need to establish client server connections on the internet and to be able to transfer various types of messages like text and byte messages through it .
According to a mentor of mine we should have a "Hello World" application running whenever we are trying to make a project. So if we go by that way .
The FIRST Step will be to setup a Client Server Model where I can send and receive a message like Hello world.
20:24 Starting to work on a Hello World application.
20:37 Did some goggling and found some material related to socket from which i can start working on
Now for basic client and Server Setup .
Server :
- Opens a port to accept connection
- Waits till it gets a connection
- Then Services that connection
- Closes the connection
Client
- Tries Connecting to a remote server on some port .
- If connection is established then it sends the request to the server
- Response for the request is recvied
- Another request is sent if required
- Close the connection
20:49 So considering the above basic flow and algo creating 2 java projects Named Client and Server in Netbeans . Will update you shortly.
Hour FOUR (Deadline Approaching)
23:01 http://systembash.com/content/a-simple-java-tcp-server-and-tcp-client/ used the link to setup a Client Server Hello World Application.
23:04 Now Starting with GUI Design.
Target 23:45 GUI Design Complete.
23:30 Layout Design Completed
23:40: 
Basic layout completed . So lets start with Actual Application Coding .
IP messenger Startup :
23:49
- On startup Layout should be displayed also a server should be started in the back end that accepts connections from Other IP messengers.
- User can connect to another IP messenger by Keying in the IP of that machine and Pressing connect or Connect using the
- On getting a connection a dialog box should be shown to validate if connection should be allowed or not.
Working on the 1st point for next 30 minutes.
+ Hour Five!!
00:16 17-11-2010 NEXT DAY
Working on the Server Part of the IP messenger
- Created a Server Class that extends Thread class
- Created Constructor and stop methods to start and stop server.
- Now Need to Create DataTransferObjects that stores and passes data between the GUI and Backend and can be used to send data through the stream too.
- After that need to modify the server and client class to use DTO objects
1. Scope Operator in C++
2. Difference between Inline functions and #define macros
3. Constant Pointers - Interesting
List of orphaned pages
6 Hour Coding Session (6-hour-coding-session)Authentication Details (secure-employee-auth-auth-details)
AUTH TLS (auth-tls)
Cipher Block Chaining (block-cipher-cbc)
Comparison of Running Times (travelling-salesman-comparison-running-times)
Counter Mode (block-cipher-ctr)
File Transfer (secure-ftp-file-transfer)
Flaw in the System (secure-employee-auth-flaw)
Forum Categories (forum:start)
Forum Category (forum:category)
Forum Thread (forum:thread)
FTP Over SSH (ftp-over-ssh)
FTPS (ftps)
Future Work (secure-ftp-future-work)
Home (home)
How to Get Variables work for me? (variable-declaration-initilization-and-assignments)
How to use variables for basic calculation (how-to-use-variables-for-basic-calculation)
Implicit FTPS (implicit-ftps)
k-Bit Cipher Block Chaining (block-cipher-cfb)
Message Authentication Codes (block-cipher-mac)
New Forum Thread (forum:new-thread)
Objectives Achieved (secure-ftp-objectives-achieved)
Programming Exploration (programming-exploration)
Projects (projects)
Recent Threads (forum:recent-threads)
Redundant Messages (secure-employee-auth-redundant)
Registration Details (secure-employee-auth-reg-details)
Ruby Scripts (ruby-scripts)
Search the site (search:site)
Secure Employee Auth Improve (secure-employee-auth-improve)
SFTP (sftp)
Strengths (secure-ftp-strengths)
Page tags (system:page-tags)
User Authentication (secure-ftp-user-authentication)
User Registration Protocol (secure-ftp-user-registration)
Weaknesses (secure-ftp-weaknesses)
Weakness of the System (secure-employee-auth-weakness)
Cheers!!
ofni.redocetile|lukum#redocetilE





