KBD

Keith Devens .com

Wednesday, December 3, 2008 Flag waving
Philosophy: the finding of bad reasons for what one believes by instinct. – Brave New World (paraphrased)

Archive: August 13, 2008

← August 12, 2008August 15, 2008 →

Daily link icon Wednesday, August 13, 2008

  1. Javascript Drag and Drop. Old, but pretty concise tutorial.

       (1) Tags: [Javascript]

Code to get the browser viewport size in javascript

function getViewport(){
  var e = window, a = 'inner';
  
  if(!('innerWidth' in e)){
    var t = document.documentElement
    e = t && t.clientWidth ? t : document.body 
    a = 'client';
  }
  
  return {width: e[a+'Width'], height: e[a+'Height']}
}

Modified slightly from a comment here.

Edit: the code in that comment didn't fully implement the original, and broke when I tried it in IE. So I've updated the code above.

  1. Editra is a new text editor written in Python, using Scintilla (via). Currently in alpha, so I'm not switching to it from what I currently use (PSPad), but it may be worth keeping an eye on. Incidentally, I still have to try Notepad++.

       (0) Tags: [Software]
← August 12, 2008August 15, 2008 →
December 2008
SunMonTueWedThuFriSat
 123456
78910111213
14151617181920
21222324252627
28293031 



RSS feed RSS feed for Keith's Weblog
Atom feed Atom feed for Keith's Weblog
Weblog archive
Recent comments
  on 4 posts

Recent comments XML

Perl 6 1.0 in March?

Doh, my mistake. I'm aware of the​relation between Parrot and Rakudo​but I'...

Keith: Dec 2, 1:03am

Free image hosting sites

Well, TinyPic has this in its​FAQ:

> Images and videos is in​your accoun...

Keith: Dec 1, 1:13am

Join a NameValueCollection into a querystring in C#

Well with a lamba expression, this​is what I came up​with:

?!code:csharp...

Gustaf Lindqvist: Nov 30, 4:38pm

Why no generic OrderedDictionary?

Check​http://www.codeproject.com/KB/recip​es/GenericOrderedDictionary.aspx?d...

Gabrielk: Nov 27, 6:57am

Generated in about 0.283s.

(Used 7 db queries)

mobile phone