Categories
- Blog (104)
- Lua (13)
- Miscellaneous (48)
- Photos (6)
- Programming (33)
- Python (15)
- Sample (3)
- Web Design (3)
- Writing (2)
- Portfolio (40)
- Snippets (28)
- Blog (104)
Category Archives: Programming
How do you sort your cloths?
According to the massively credible spammers on Facebook, the following is a common question asked by Google interviewers to interviewees.
Imagine you have a closet full of shirts. It’s very difficult to find a shirt. What can you do to
…
Posted in Blog, Miscellaneous, Programming
Tagged algorithm, canvas, funny, google, interview, javascript, shirts, Sorting, stooge sort, visualization
Leave a comment
Javascript Syntax Highlighted Editor in 1Kb
I’ve just written an edit in place syntax highlighter for Javascript. The cool thing about it is that it’s under 1Kb (1023 bytes to be exact xD). Here’s the code:
// Revised Edit-In-Place syntax editor still sits
…
Posted in Blog, Programming, Snippets
Tagged 1kb, editor, javascript, js, syntax highlight
6 Comments
Rocket: A Lua Sqlite3 ORM manager
Relational databases are designed so that they can both store and describe data. Most programming level APIs do wonderful jobs of maintaining the former aspect. I mean, what ORM doesn’t automatically map the insert method to the so very generic…
See.lua – Documentation
See.lua – A Lua introspection library
> see(string) .byte(?) .char(?) .dump(?) .find(?) .format(?) .gfind(?) .gmatch(?) .gsub(?) .join(self, table, ...) .len(?) .lower(?) .match(?) .rep(?) .reverse(?) .sub(?) .upper(?)
Lua is a wonderful little language that lets you do…
Posted in Blog, Lua, Programming, Snippets
Tagged documentation, introspection, Lua, see
Leave a comment
see.lua – Introspecting Lua objects
As via its python equivalent, see.lua takes in an object and prints out a list of its elements as well as metatable methods in readable text.
> require "see" > s = see(string) .byte(?) .char(?) .dump(?) .find(?)
…
Posted in Blog, Lua, Programming, Snippets
Tagged function, introspect, Lua, object, parameters, see, table
1 Comment
Pydev: The Best Python IDE
While I don’t usually advertise, I love eclipse for all of its feature rich implementations of language specific IDE’s. Among those is Pydev, a complete first class IDE for Python.
Recently, Pydev just hit version 1.6.0 (Congratulations!) with the…
Posted in Programming, Python
Tagged eclipse, editor, ide, Programming, pydev, Python
Leave a comment
strcpy() implementation in C/C++
One of our ubiquitous C functions can be rather easily recreated via C:
char* strcpy(char* other, char* self){
while (*self) *other++=*self++;
*other = '\0';
}
Note that C strings are null terminating, hence we create a…