Search Results: "js"

27 May 2007

Alastair McKinstry: Darkness reduces Crime?

Thanks to Apparent Brightness for this snippet:
In the northern Swedish town of vertorne , a dispute between the local council and its electricity distributor has meant that the town has had no streetlighting for many months now (TV programme in Swedish about the controversy here). Today Swedish television and other media report that since the streetlights were switched off, thefts and burglaries have halved. Maybe the thieves are afraid of the dark , says council boss Arne Honkamaa. On the other hand, maybe it s being able to see the night sky that s reducing crime.
Tags ,

26 May 2007

David Welton: Airlines and rand()

Ilenia and I are looking for tickets to go "home" (Eugene, Oregon) this summer. We've had pretty good luck with Lufthansa in the past (as opposed to Air France, which lost a huge bag of my stuff), so we turned to them first to look for flights. I like the page they have for prices/dates, which gives you a nice way to look around for a better price without stabbing randomly at dates: Big long Lufthansa URL However, the maddening thing is that the prices change frequently. Not every day, but often after even 5 minutes! They bounce around up to 100 euro at a time. I understand the theory behind price descrimination, but this is the classic case where the customer ends up feeling like they're being made fun of and goes elsewhere. United, in our case, which offers a cheaper price for the same plane (they're Lufthansa's partner and thus share flights).

24 May 2007

Eddy Petrișor: Is not "my feature, or else"

Thijs, my post was more like "Hey Mozilla, I know you are busy and all, but, it would be nice to fix some bugs and maybe add some features from time to time.... come on, 7 years to start fixing[*] a bug is waaaaaaay(maybe enough to make your users go away) to much. That's why you suck!".

BTW Thijs, have you read at least the Reply-To-List thread in their bugzilla? Or the huge pile (now 126 open issues) of "keyboard shortcut" problems they have? I am saying that there is a lot of endless discussion around the subject until someone really tackles it. As an example, the real solution for (probably) most of those 126 keyboard issues would be to allow keyboard shortcut redefinition.

So this was mostly about response time, be it bug or feature, although the title was not so well chosen.

[*] note that the patch is from a first time contributor

Thijs Kinkhorst: Do as I say, or else

Eddy writes about Mozilla not implementing feature requests. His post basically reads: "You, free software developer, do not implement my wish. You suck big time.". I think that's a very sorry attitude to have. As a developer for a free software project, I occasionally get that attitude from users aswell: "Please implement this feature." And then later: "Why haven't you implemented my feature yet??" I always make sure to lecture such people like the following. I'm sorry, you don't get to tell me that I suck because I do not spend my voltuneer efforts according to your wishes. Eddy is free to supply a patch. Another strategy would be to put up a bounty. Or he can help in any other way he can think of. Maybe he can ask his money back. Better options to consider instead of blogging "Mozilla sucks big time"?

22 May 2007

Thijs Kinkhorst: Den en Rust revisited

Tomorrow I will be attending a cremation for the second time in two weeks - at the same crematorium even: Den en Rust in Bilthoven. (You won't believe how detailed Wikipedia treats the subject of cremation) Two weeks ago my friend and former flatmate BAAS (eng.: BOSS) died at the age of 34 after nine years of cancer. Still it came as a surprise to me: we've gotten a bit "used to" BAAS being subject to therapy every once in a while, recovering, and then starting the whole circle right over. It was a good service that highlighted the diverse social circles he was active in, and was concluded with a gathering that featured a lot of drinks and snacks. Tomorrow the service will be dedicated to my uncle Koert, who died last week at the age of 60, also from cancer. I surely didn't expect to return to "Den en Rust" that soon. I'm wondering what the service will be like, although it's in the same place, it will probably be quite different.

21 May 2007

MJ Ray: Leukemia Research Weston-super-Mare Bikeathon: Report

On Sunday 20 May, I rode in the Leukemia Research Weston-super-Mare Bikeathon which "has so far raised in excess of 120,000 for the charity." I finished the course of about 23 miles in a bit over 2 hours. That was slightly slower than I expected, but I hadn't anticipated the batched mass start (20 riders set off every 30s or so) and the relatively slow speed of the large group ride to the first hill where the short course filtered off. I wasn't the fastest or the slowest by a long way. The first hill, Bleadon Hill, was new to me and it was a bit of a pain. It was rideable, unlike the hill nearest me, but it continued upwards at a challenging gradient for a long time. I'd estimate it's about 4km and mostly over 5% - I'll not be riding it again in a hurry. The view from the top was almost worth it (even if it didn't photograph well, looking almost south at 11am) but then you remember that you've just ridden up there from sea level and everything aches. Getting down from that hill was also fun. The descent was through Canada Coombe, which looks about 10% down for about 1km and it's a narrow uneven road with loose gravel washed onto the road. Then it was a fairly direct link north to Locking and Worle, a flattish loop from the crematorium to Ebdon, Bourton, Icelton and Wick St Lawrence (which felt good, like I could ride it forever - it's amazing how easy a well-tuned bicycle feels) and back to town via Sand Bay and Kewstoke. [photo] The picture is of me outside the pavillion at Clarence Park, just after finishing. The pack contained repair kit, water, food, rain gear and extra top, none of which was needed. I didn't pack sun block or insect-repellent, which would have helped (although thankfully not vital)! Thanks to everyone who sponsored me. If you still want to contribute, please put it in the comments form with an email address, and/or email me directly.

20 May 2007

Thijs Kinkhorst: Merci pour l'invitation

I've been invited by my friends of Euro Disney S.C.A. for a preview of their two newest attractions. Not wanting to be rude, I confirmed my attendance, only to learn that the event apparently booked solid. Thanks for the invitation, guys.

Steve Kemp: Tell you, might not believe it, but

I would like to have a simple way of mirroring a webpage, including any referenced .css, .js, and images. owever to complicated matters I wish to mandate that the file will be saved as index.html regardless of what it was originally called. This appears to rule wget out, as the -output=index.html option trumps the -page-requisites flag (which is used to download images, etc which are referenced.) Is there a simple tool which will download a single webpage, save it to a user-defined local filename and also download referenced images/css files/javascript files? (Rewriting the file to make them work too) Using Perl I could pull down the page, and I guess I could parse the HTML manually but that seems non-trivial but I d imagine there is a tool out there to do the job. So far I ve looked at curl, httrack, and wget. If I m missing the obvious solution please point me at it .. (Yes, this is so that I can take snapshots of links added to my bookmark server.)

18 May 2007

MJ Ray: Leukemia Research Weston-super-Mare Bikeathon

On Sunday 20 May, I will be riding in the Leukemia Research Weston-super-Mare Bikeathon which "has so far raised in excess of 120,000 for the charity." If you'll sponsor me, please put it in the comments form with an email address, and/or email me directly.

17 May 2007

Andrew Stribblehill: Timing random disk seeks

I asked an interviewee how long it takes for a disk seek, and he replied that he thought it was between 4 and 8 milliseconds. Speaking with colleagues, the conventional wisdom was that it was around 10 ms. I was unsatisfied so I thought I would try it for myself.

time sudo perl -we '$disk="/dev/sda"; $n=1500; $blocks= blockdev --getsz $disk ; if (!$blocks) print "Enter capacity in manufacturer GB\n: "; $blocks=1953125*(
) ; use Time::HiRes "time"; open DISK, $disk; $start=time; for (0..$n) seek DISK, int(rand($blocks))*512, 0; sysread DISK, $x, 512 die; $now=time; $times[int(($now-$start)*1000)]++; $x=$now-$start; $s2+=$x**2; $s+=$x; $start=$now ; for (0..$#times) if ($t=$times[$_]) $tot+=$t; $median =$_ if $tot>=$n/2; printf "%3d %s\n", $_, "x" x ($t/2) . ($t%2?":":"") ; printf "\nTook %3.4gs for %d seeks of %s (%d GB)\n", $s, $n, $disk, $blocks/2097152; printf "Mean: %2.03gms; Median: %d-%dms; Std dev: %2.03gms\n", 1000*$s/$n, $median-1, $median, 1000*sqrt($s2/$n - ($s/$n)**2);’
It should be obvious that before you run this, you should check for yourself that it doesn’t do anything dangerous. Or at least check that $disk is set appropriately for your hardware and operating system. If you don’t have blockdev, estimate the number of 512-byte blocks and set $blocks to that value. (There are 1953125 blocks in a hard disk manufacturer’s "Gigabyte".) The graph it produces prints an ‘x’ for two seeks of a given number of milliseconds and a trailing ‘:’ if there was one left over. For me, on my one year old Linux 2.6.18 workstation with a 160 "GB" Western Digital (WDC WD1600JS — quoted seek time 8.9 ms) the typical output is:
  0 :
  3 :
  4 :
  5 x:
  6 xxxx:
  7 xxxxxxx
  8 xxxxxxxxxxx:
  9 xxxxxxxxxxxxxxxxx
 10 xxxxxxxxxxxxxxxxxxxxxxx
 11 xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
 12 xxxxxxxxxxxxxxxxxxxxxxxxx
 13 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
 14 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 15 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
 16 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 17 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
 18 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
 19 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 20 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 21 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 22 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
 23 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
 24 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
 25 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx:
 26 xxxxxxxxxxxxxxxxxx
 27 xxxxxxxxxxxxxxx
 28 xxxxxx:
 29 xxxxx:
 30 xxxx
 31 :
 32 :
 34 x
 35 :
 57 :
Took 27.69s for 1500 seeks of /dev/sda (149 GB)
Mean: 18.5ms; Median: 17-18ms; Std dev: 5.24ms
real    0m27.859s
user    0m0.116s
sys     0m0.044s
Why might I care? 18 milliseconds is almost a lifetime compared with anything else a modern PC does. It’s slower than my monitors’ refresh period! I can read around 1 MB from disk, 10 MB over a GigE link or 20 MB from RAM in this time. I can ping from Ireland to England, crossing 40 routers there and back, in the time it takes for my disk head to seek. Every time you read something from a previously unread file, it costs on average EIGHTEEN MILLISECONDS even before it starts reading. That’s just 55 in a second. This has obvious implications for I/O program performance, i.e. that of most servers. If anyone has a concern about my method, I’d be interested to hear it. I’d also like to see the timings for different disks. Either post the whole histogram or just the stats, plus the make and model of the disk. On Linux you can get this from dmesg or hdparm -I device. Update: I’ve made the script more robust under non-existence of blockdev.

13 May 2007

Romain Francoise: Hard drive shock resistance specs

The label on one of my new hard drives says the following:
Caution. Product warranty is void if any seal or label is removed, or if the drive experiences shock in excess of 350 Gs.
This piqued my curiosity, so I checked the specifications (extra click needed because of Javascript) and it turns out that the drive supports "nonoperative shocks" up to 300 Gs.

Does anybody know how that translates into real-world measures? In my experience, hard drives are pretty fragile even when they're powered down...

11 May 2007

David Welton: JavaFX

I'm not convinced. It looks to me like they're aiming at something a bit more dynamic/higher level than Java, in more or less the space that Javascript, Ruby and Python operate in. The declarative GUI stuff looks pretty good, but I don't know if the rest will make that worth it. The language itself seems neither here nor there. It's a lot like Javascript - but not quite. It doesn't have real hash tables, something I don't care for in JS, and I didn't see an eval() method in the documentation, which means that their aim is to make something that you compile, and that doesn't carry around an interpreter with it like most dynamic languages with eval have to. I wonder what kind of support it will get from Sun and the open source community? Will the internal Java group view this as some sort of competitor? I wonder what sort of discussions went on during the creation of this system at Sun. They can't have take the decision to make a new, incompatible language very lightly. A new language has to have a killer app to drive acceptance, and I don't quite see one for this. The FAQ sheds some light on where they'd like to go:
Why did you create another scripting language? JavaFX Script is specifically designed to optimize the creative process of building rich and compelling UIs leveraging Java Swing, Java 2D and Java 3D for developers and content authors. Why isn't Groovy enough? Groovy and other languages have two specific traits which don't precisely meet these needs, namely that they are generic in nature and don't provide the appropriate abstractions necessary to optimize the UI design process and similarly are designed specifically for programmers other than content authors.
So it does look like they're aiming for a language that makes it easy to quickly create GUI's for people who perhaps aren't expert enough (or patient enough) to deal with Java itself. Pity they didn't just stick with Tcl and Tk, which have had a more or less declarative syntax for specifying layout for something like 10 years, and in any case have a flexible enough syntax to "run DSL circles" around most languages that are currently popular. As the author of Hecl, I'm particularly curious about their mobile strategy. If I may be permitted a bit of hubris, it's nice that they see things my way, that mobile apps need a good scripting language in order to make them more accessible to the masses, but it wasn't too hard to see that coming, with the ever increasing capabilities of higher end phones, and the "scaling down" that scripting languages bring to programming (making it easier for people to get started even if they aren't experts). I wonder what sort of diffusion they'll get with their phone system, and how fast, and how easy it will actually be to program the phones. For many people it's probably not as important, but by creating a real interpreter, rather than something that's compiled and doesn't have an eval function, Hecl lets you download and execute code, which makes for some very interesting possibilities (as well as some risks, of course). That's probably not important though, if they can actually make a system that's widely used, and easier to create applications for than J2ME currently is. I wonder if they'll allow J2ME on the phone platform, or close that down in favor of JavaFX? Even for Big Companies, launching a new language is a difficult endeavour[1], and it will be a number of years before we see where this ends up, but I'm not convinced. [1] The Economics of Programming Languages

Thijs Kinkhorst: SquirrelMail 1.4.10a released

Yesterday we released version 1.4.10a of SquirrelMail. It fixes mostly small-time bugs and glitches, and a security bug in the HTML filter. While the 1.4 branch is getting very solid, the HTML filter remains the main point of sorrow. The problem is that we receive incoming HTML in a mail message, and then need to transform that into HTML that's safe to present to the user. This is done by stripping out anything that could cause trouble. You wouldn't believe which degenerated content is still parsed by some browsers, so this is a never ending fight. A proper solution would be to white list what is allowed. This essentially means implementing a full HTML parser that parses the incoming mail and only accepts things known to be good. Co-developer Marc Groot Koerkamp has done good work towards this already, but it's no simple feat and not quite finished yet. So we'll have to keep patching up the current filter for a while I'm afraid.

8 May 2007

David Welton: Permission denied to get property Object.constructor

I struggled a little bit to figure out what was going on with the Prototype javascript library in terms of this error I was getting in my application, rather cryptically reported as:
[Exception... "'Permission denied to get property 
Object.constructor' when calling method:
[nsIDOMEventListener::handleEvent]" nsresult: "0x8057001e
(NS_ERROR_XPC_JS_THREW_STRING)" location: "<unknown>" data: no]
I was setting up an observer to make some async requests when a checkbox is set or unset. Setting the checkbox to true worked just fine, but unsetting it seems to cause the above exception. It turns out the fix is pretty simple. Instead of this:
<%= observe_field('blah_yes', :url =>
                   :action => 'set_blah', :id => @someobj.id ,
                  :update => 'blahmessages') %>
I made sure to use a :with parameter:
<%= observe_field('blah_yes', :url =>
                   :action => 'set_blah', :id => @someobj.id ,
                  :update => 'blahmessages', :with => 'yes') %>
My guess as to what's occuring comes from the parameters passed into my controller. Before the modification:
 "action"=>"set_blah", "id"=>"4", "1"=>"", "controller"=>"xyz" 
That "1" is being passed as the variable name, rather than its value... After adding the with, the parameters come in like so when it's being set:
 "action"=>"set_blah", "id"=>"4", "controller"=>"xyz", "yeah"=>"1" 
And like so when it isn't... aha!
  "action"=>"set_blah", "id"=>"4", "controller"=>"xyz", "yeah"=>"null" 
I bet that null is what was causing problems. I thought I'd publish it so that an answer is available for those searching with google, as I wasn't able to find one. Perhaps the Prototype library should be a little bit more careful with its data somewhere in order to fail more gracefully, but I'm not sure where one would go about looking.

5 May 2007

Thijs Kinkhorst: New key

Hey everybody! Getting tired of hex numbers? Here's another one: E0D3 FAAA 6F50 A5DA 9D5B 2938 3396 1588 E1C2 1845!!! It's the fingerprint of my new GPG key, which is more secure than my previous one for a variety of reasons, and it has my birthday (not year) as the date. Wow! Today I revoked my key 0x165EE79B from 1997-06-23. I'll revoke my 0x957D58CF key from 2003-10-28 in due time, when the new one has been in active use for a decent while.

3 May 2007

Ian Murdock: Come see me at CommunityOne next week

I’ll be making my first big appearance as a Sun employee next Monday at CommunityOne in San Francisco (this is the day before JavaOne). In addition to participating in the keynote with Tim O’Reilly, Rich Green, and Tim Bray, I’ve put together a track called Linux vs. Solaris? designed to show that the gap between Linux and Solaris isn’t as wide as one might think:
All too often, technologies are pitted against each other in the popular imagination, and Linux and Solaris are no exception—”Linux vs. Solaris” certainly does make a catchy soundbyte. Despite the juxtaposition, Linux and Solaris have much in common—both are open source, have common ancestry, and are similar enough that both users and developers can move back and forth between them with comparative ease. The “vs.” mentality is caused as much by lack of understanding of the “other side” as anything else. In this track, we will focus on the similarities between Linux and Solaris rather than the differences, the goal being to increase understanding of Solaris among Linux users and developers and vice versa. Where we discuss differences, these differences will be expressed in terms of “how we can learn from each other”. We will also discuss the migration up the stack of developer platforms and address the question, “Do operating systems still matter?” The ultimate goal of the track is to change the conversation: Not Linux vs. Solaris, but open vs. closed.
The track includes four sessions. I’ll kick things off by answering the burning question: “What’s a Linux guy doing at Sun?” Next, Jeff Bailey of Canonical and Bart Smaalders of Sun will take us “inside the sausage factory” to show how Ubuntu and Solaris, respectively, get made. Next, Don Kretsch of Sun and Joe Little of Stanford will show us Solaris Express Developer Edition and Nexenta, two very different takes on OpenSolaris. And last but certainly not least, Josh Berkus, Robert Lor, Harpreet Singh, Tim Bray, and Greg Luck will highlight why the OS still very much matters even as software development moves up the stack. Of course, there are a number of other great tracks as well. If operating systems are your bag, you should also check out the OpenSolaris track. Fortunately, my times don’t overlap with Ben Rockwood’s introduction to OpenSolaris, nor will I have to miss the opportunity to see the amazing Bryan Cantrill, Adam Leventhal, and Mike Shapiro educate, entertain, and gesticulate wildly! If you’re in San Francisco or the Bay area or are already planning to be at JavaOne, you should definitely plan to attend CommunityOne too. Register today! (P.S. - It’s free!)

2 May 2007

Michal &#268;iha&#345;: What happened on last day of April?

I just looked on server statistics and I was shocked by amount of spam and viruses rejected during last three days. Is there some new virus for Windows which tries random email addresses on all servers it can reach? I didn't analyse those messages, as they are rejected at RCPT time, because sender tries random addresses which do not work on my server. For now I try to reduce them by blacklisting in iptables, but this doesn't seem to help much as IP addresses change too often. I think that graph shows best what big change has happened: Mail graphs Update: It seems to be new Sober variant causing this mess.

30 April 2007

Gustavo Franco: debian monkeys for a better website

I'm here to tell you that I'm releasing debian monkeys 0.3 right now (greasemonkey user script), after the huge amount of feedback about my last post. In other words, you can do more than provide feedback based on a screenshot. You can test it on Fire^W Iceweasel and Epiphany over all the Debian's website content.

I'm writing debian monkeys in a way that it will be trivial merge the changes back to the Debian's website if the webmasters agree and extend it to work over more *.debian.org sites. Actually, the changes applied over www.debian.org are: mentors.debian.net CSS with minor changes based on user feedback, navbar removal, new and persistent sidebar.

How to see www.debian.org like the screenshot above ?
Send your comments, but please read before the known issues below. Patches to the user script source code are also appreciated, keep in mind that I can reject javascript black magic for a while due to the possibility of merge back my changes to the Debian official website.

Known Issues:
More information, issue tracking and wiki at: debian monkeys official website.

29 April 2007

MJ Ray: Disruptive Library Technology Jester

Ben O commented:
"One blog that spans the divide between paper-bound librarians and the digital world is the Disruptive Library Technology Jester I found it as we both are working with a piece of software called 'Fedora' (not the RedHat distro, but http://www.fedora.info/ an interesting open source XML-centric file repository software.)"

23 April 2007

MJ Ray: Software: More Free Free Demo

"a monthly public demonstration of Free Open Source Software (FOSS), aimed primarily at beginners. It's not specifically for Linux, as the software will be demoed on a WinXP system to lure people in ;) -- however, I will make some live linux distro CDs for the event. Here's the details: Title: Introduction to Free Software
Date: Wednesday 18th April
Time: Lunchtime 1-2pm
Place: Cube Cinema, Dove Street South, Bristol BS2 8JS
Map
Price: Free
The website"
The second one will be on 26th May 2007 at the Cube Cinema, Dove Street South, Bristol BS2 8JS (Map), 1pm-3pm, and is hopefully a music one with a barbecue (weather permitting!).

Next.

Previous.