Category: Programming
-
Keeping Temporary Files Out Of The Way In Emacs
Found some very useful emacs info in this this blog post. Put the following into your config and your temporary and autosave files will not clutter up your project directory. (defvar user-temporary-file-directory (concat temporary-file-directory user-login-name “/”)) (make-directory user-temporary-file-directory t) (setq backup-by-copying t) (setq backup-directory-alist `((“.” . ,user-temporary-file-directory) (,tramp-file-name-regexp nil))) (setq auto-save-list-file-prefix (concat user-temporary-file-directory “.auto-saves-“)) (setq…
-
How I Use ASP.Net Skins and Themes
Recently reading some discussion of themes, and skins were listed as bad, because they cut out the designer and required duplication for any non-server control element. As in the following: I want all my text input’s to have a blue background. So I said background=”blue” in an asp.net skin file, and create a blue style…
-
Simple String Extension in Ruby
Based on a blog post from Steve Yegge… #ruby class String def endswith(arg) (self =~ /.*#{arg}$/) != nil end end #to test irb>”extension”.endswith(“ion”)
-
Static vs Dynamic Scope
A discussion of static and dynamic scope for variables in programming languages. Emacs lisp is one of the few languages with dynamic scoping and this post takes a look at the difference.
-
Arrays as Objects in Javascript
Rhino Prompt… js> a[0] = 1; js> a.print = function () {for(var e in this) print (“a[” + e + “] = ” + a[e]);}; function () { for (var e in this) { print(“a[” + e + “] = ” + a[e]); } } js> a.print(); a[0] = 1 a[print] = function () {…