Search Results: "js"

17 February 2007

Christian Perrier: fr: 99.980%, cs: 93.541%, de: 82.064%, sv: 79.796%, vi: 78.078%

atokx2 is OK now. twiki keeps us away from 100% Sad news with yet another uncoordinated upload of mysql-dfsg-5.0 which, as usual includes debconf templates changes. I yelled out loudly on debian-release about this. Today's uploads were php-json-ext, openldap2, laptop-net.

15 February 2007

Thijs Kinkhorst: AB+

Yesterday I've made my 38th blood donation. I can heartily recommend it to (almost) everyone. Especially if you are a "simple" full blood donor, it will take at most half an hour, a couple of times a year, at a moment you choose within a two-week interval. Oh, it doesn't really hurt and you get free coffee and sandwiches. If you're in the Netherlands, you can register on line. I think it's an easy way to do some good for society. I'm not a full blood but a plasma donor myself. I have the most rare blood type (AB), which means I can receive all other types but my blood can only be given to the 3% of the population that also has AB. That makes it not quite useful for donation, but it is useful to make medicine out of. During the donation the blood is filtered and only the plasma is kept, all other parts are pumped back into my circulation. This allows for a larger volume of plasma to be donated at a time, but has as a drawback that it needs an appointment and takes longer. The most commonly asked question is whether you get paid. You're not. The reasoning is that this could motivate people to be a bit too positive about their health situation when they need money, and thus could hold back relevant risk information. The selection procedure depends on a reduction of chances. This also leads to homosexuals being completely excluded from donations. While sound from a purely statistical reasoning, it is debatable whether this is fair on an individual level.

11 February 2007

Martin F. Krafft: Adding a note for IE users

I am not a web site designer, but occasionally I'll find myself creating a new website. No matter how ambitious I may be, it won't take long until I trip over Internet Explorer's pathetic XHTML+CSS handling. For sites that are not classified "business," I have long been using a little note at the top of pages, which would use the * html body hack along with display:none to display only in IE, simply because I can't be bothered and do not have the time to write hacks to cater for the family of broken browsers Microsoft forces upon most of the WWW users. This note would alert the reader that s/he'd be able to read all content, but as long as s/he'd be using an inferior browser, the layout and design would be off. There were three problems with this approach: text-mode browsers, search engines, and IE 7.0: text-mode browsers and search engines got to see the text (as they don't process CSS, generally), and I could not figure out how to prevent IE7 from hiding the note the massively skilled and capable Microsoft programmers fixed the oh-so-handy * html body hack and thus prevented CSS to be catered for the broken MS browsers, even though they still need cludges all over the place. I am sure it was just a side effect of clumsiness, but it's now fixed (as opposed to the million other bugs that persist). So today I sat down and implemented a Javascript solution, which uses the DOM to insert content, if it determined that it's running on Internet Explorer. I could have used the <!--[if IE]> ... <![endif]--> construct, but that only works on Windows and not on the Mac. Thus, the Javascript solution is better as it will reach more Internet Explorer users. I ended up using innerHTML, which is a non-DOM Microsoft hack, but in the end, I am coding this only for the Microsoft browsers, so I can just as well use their stuff. Note that you are welcome to use this script under the terms of the Artistic Licence 2.0. You will, however, need to ensure that the insertNote() function gets called after the DOM has loaded. I use this event handler for that. You can see the script in action on my Debian site, using a little hack to display it even in non-IE browsers. Suggestions welcome! NP: Amorphis / Elegy Update: lots of people have contacted me to let me know that the note was visible in Opera and Firefox and so on and so forth. This is due to the ?ie-note query string in the URL, which I added to allow non-IE visitors to view the note (for whatever reason). Simply remove the query string and visit the page directly and you will not see the note unless you are using Internet Exploder.

8 February 2007

Erich Schubert: Calendaring in a semantic wiki

... is the working title of my diploma thesis. Tomorrow I'll hold the introductory presentation on my topic in the research seminar. This is to explain my project to other members of the working group, so they can give me feedback and suggestions. What I'll be doing: Where I am: Difficulties: Fortunately, we have a rather strong research group here in Munich. There are experts for query and transformation languages (e.g. Xcerpt, SPEX - Querying XML Streams), temporal calculations (Computational Treatment of Temporal Notions, CTTN) and time modeling Calendar and Temporal Type System CaTTS); and I'm also working closely together with the author of IkeWiki and Xcerpt. And of course they're all nice people to work with!

6 February 2007

David Welton: Popouts with Rails

In a previous article about Stuff To Do, my ajaxified priority queue program, I talked about how best to keep track of the user's state of activity, should they so desire. I opted for the popup, as that was the best compromise between simplicity, and ease of use for the end user. From an end-user point of view, it's similar to how gtalk can detach from gmail if you want to run it in its own window. The trick was to implement the popup/popout in Rails, which actually ended up being pretty easy, and, all things considered, is a pretty cool technique. It's neat to pop stuff in and out of a web page. The easy part is popping out the window:
<%= link_to_remote("Pop out " + image_tag('popout', :border => 0),
                    :url =>   :controller => 'tasks', :action => 'popout'    ,
                   :title => 'Pop the status window into a popup window') -%>
Which subsequently calls popup.rjs:
page.replace_html('status', "<i><small>status in popup window</small></i></br>" +
                  link_to_remote("<small>Restore</small>",
                                  :url =>   :controller => 'tasks', :action => 'popin'  ,
                                 :title => 'Restore the status window'))
page << 'statuspopup();'
Which is pretty simple - the first call replaces the html in the status div, and the second calls the javascript function statuspopup. This lets us replace what was in the status window with some placeholder text and a 'restore' link in case things get screwy and the user wants to simply restore the old content of the div in question. It's worth noting that we also store the popped out status in session[:popped_out] in order to let the application know that the window is "popped out". This doesn't actually pop the window itself up. The statuspopup function in javascript (located in application.js) takes care of that:
function statuspopup()  
  window.newwindow = window.open('/tasks/openstatus','status',
                                 'height=10,width=210,status=no');
  return false;
 
And then the openstatus action opens the same rails partial that the regular page does:
<%= render(:partial => '/tasks/status', ...
Meaning that you don't have to rewrite the same code in two places. So, that's all it takes to pop up a new window, and replace the contents of the old div in the html page giving the user the sense of having popped a piece of the page out into a popup. So far so good. Now what happens when the user closes the popup? Luckily, we get a reference to the window that opened the popup called window.opener that we can use to comunicate with the main window. For instance, in our case we set up an event listener to fire when the window closes:
window.addEventListener("unload", statusClosed, false);
And this, in turn, takes care of popping the window back into the main page:
function statusClosed()  
new Ajax.Request('/tasks/popin',   method: 'get', asynchronous: false  )
$('popoutlink').style.display = 'inline';
w = window.opener;
target = w.window.document.getElementById('status');
code = $('onidle').childNodes[1].innerHTML;
target.innerHTML = $('status').innerHTML;
target.style['backgroundColor'] = '#bbddbb';
target.style['backgroundColor'] = '#bbddbb';
w.eval(code);
 
Once again, pretty simple. What's happening: We also fix up the color just a bit, to mark the user as active. All in all, it's pretty useful for time tracking. In Linux, it's ver easy to set the new popup to follow you around the screen, making it so that it's not a bother at all to wave the mouse at it to let the application know you're online. All you do is set the 'on top' and 'always on visible workspace' options - at least in Gnome.

2 February 2007

MJ Ray: Bad Tech Links for 2007-02-02

"Guidelines for the Secure Operation of the Internet" (RFC1281)
Read it and weep.
Techblogging: DoSing spammers
I've done this in the past, by having a CGI rabbit-hole in a semi-hidden link near the start of the page which just generated 1000s of invalid email addresses. For bonus points, use addresses with MX servers which will never be online again, or maybe with a MX that tarpits and rejects all mail eventually. Get enough points and the spammer will either stop scanning your site or waste a lot of time on you.
Google scanned by spammers [Techblogging]
I don't use pingomatic, but a few of my pages are ranked high enough to attract spammers every time I update them. I think blog spammers probably are using subscription tools to find the most active/most syndicated sites to spam. Can we redesign the tools to defeat them?
BBC News Technology UK Edition: Ads help Google profits triple
But hey, why should Google care about spammers when their externalisation to date is making Google rich?
Techblogging: Web 2.0 security issues incoming
I dislike Web 2.0 so far because it is often inaccessible - this suggests it's often insecure too.
Software Patents Petition
Need more brains... come on, sign the petition, even if it has a bit of hyperbole/invective and a typo or two. Last I heard, it's behind adopting Spandau Ballet's Gold as national anthem, for crying out loud!
The Irascible Professor-commentary of the day 06-07-06. Calculator dependence.
Parents, don't let your children grow up to be calculator junkies!
Zugschlusbeobachtungen: Which kind of software suspend?
I think I heard Matthew Garrett give an interview somewhere (LUG Radio?) which summarised the suspend situation as something like "it works well except when it doesn't." My computer usually software-suspends, but sometimes it crashes and sometimes is often enough to deter me from suspending it often. I really ought to debug it, but it's not a priority yet.
'Cheap and tacky' wedding email that went global - 19 Nov 2006 - National
"The marquee company's CEO, Klaus Jorgensen, said he had sacked the employee responsible - who turned out to be his wife"
NoDaddy.Com - Exposing the Many Reasons Not to Trust GoDaddy with Your Domain Names
"They didn't give me a chance to dispute or resolve the problem -- just a voicemail saying my domain was scheduled for suspension , followed up by a Domain Suspension Notice exactly 52 seconds later. Note that neither of these included a phone number for the abuse department or a reason for the shutdown."
The 'Ow' starts now / freedom bits / greve / Fellows / The Fellowship - Fellowship of FSFE
FSFE's Georg Greve won't be upgrading to Vista, which I saw called "Windows Fista" on the BBC's site - disgruntled journo, over-aggressive MS PR or typo?
BBC NEWS Have Your Say Will you be getting Microsoft Vista?
Nearly 2000 comments, most "No" AFAIS
Microsoft files for patent on "modular operating system"
Microsoft patents Linux?
Hacking gadflies: Marechal, A dystopian future''
Another comment on the MS patent.
BBC NEWS Technology Triple threat targets Word users
While I'm boggling at Microsoft, I hope all their customers saw this little Christmas present from 20 December.
BBC News Technology UK Edition: Sony CD compensation agreed
No Christmas for Sony, remember? They pay out a year or so late.
BBC Trust - On-demand Services' consultation
A remarkable consultation that includes a question "How important is it that the proposed seven-day catch-up service over the internet is available to consumers who are not using Microsoft software?", but the questionnaire doesn't work in all browsers. Do you think this biases the responses? Yes, yes or yes?
Digg - Pressure the BBC to embrace open standards, not just Microsoft technology!
Digg is the new slashdot. Just add hot grits.
BBC News Technology UK Edition: Vista has speech recognition hole
"for the flaw to be exploited the speech recognition feature would need to be activated and configured and both microphone and speakers would have to be switched on." Well, my speakers are embedded in the screen, my microphone doesn't have an on/off switch and I leave it switched on in the mixer so that I can answer the softphone quickly... I doubt I'm the only one who doesn't switch the mic off after every use. Are Microsoft living in the real world any more?

1 February 2007

MJ Ray: Environment: Links for 2007-02-01

Milton Country Park
This park near Cambridge is under threat, partly due to council mismanagement.
Climate change prompts Cabinet change in Canada - CNN.com
Carry on flying, says Blair - science will save the planet Special Reports Guardian Unlimited Politics
Weston and Worle News: Recycling Service Branded Rubbish
"A Weston resident has branded the town's recycling service rubbish and joined calls for it to be investigated.Carolyn Jones, who moved to Weston Village from south Gloucestershire 18 months ago,..." I've had to telephone and get Biffa to come back after they missed my collection every time since New Year. What's going on?
Linux Ecology-HOWTO
Nuclear Power?
Cycle Parking Farcility of the Month
CTC - Cyclist who refused to stay in the gutter wins
So you are allowed to cycle on the roads in Telford, despite what the police there think. More coverage:
Cyclist's conviction thrown out : Shropshire Star
BBC NEWS England Shropshire Cyclist wins road blocking appeal
Cycle-lanes - epetition reply
A relevant reminder from Tony Bliar's office that cyclists don't have to use useless cycle lanes.
Trains Swindon - Melksham - Westbury - SLASHED by the DfT and First
Campaign site about the government-enforced cuts to Great Western services in the Wiltshire/Somerset/Bristol area.
EDP24 - Dangerous driver in cyclist death jailed
BBC NEWS England Norfolk Tired motorist jailed over death
High-res plans of the TdF London stages

Miriam Ruiz: Trying JSON for config files

Defining a grammatical structure for configuration files is a bit of a headache. The most easy way to get something to work is probably using INI files, but they’re somehow very limited for setting up configurations that are not quite trivial. The next obvious file format to look at are probably XML files, which are extremelly powerful for defining data structures, and are really fashion. While this might probably be the best choice when programming in certain languages, like Java or C#, especially if you use editors that are XML-oriented, it might not be the best for me. I’ve also seen that some projects read their configuration from script-languages files, such as lua. This might be quite interesting if you also allow embedded functions in that language in your code, for defining event responses, macros, or conditional configurations. Some other projects define their own grammar, maybe using Flex lexical analyser and GNU bison. I’ve recently come across JSON, which is a lightweight data-interchange format that is defined from a subset of the object literal notation of JavaScript. It is text-based and easily readable by humans, and suitable for representing objects and other data structures. There are libraries for reading these kind of files from many languages, and even though it seems to be very oriented towards structured data transmission over network connections (serialization), it might be useful for describing the initial setup of a program. I plan to use json-c from C. Lets see what comes out from there.

Thijs Kinkhorst: Short Stay Solutions

The housing situation for foreign students in Utrecht is far from optimal, but the most problematic is that there's no clear point where those students can go when they have an issue with their housing. Since most stay here only for periods ranging from one to twelve months, they're understandably not organising this themselves. I'm therefore delighted that after two years of talk, we've finally decided on a single point where Short Stay tennants can get help. USF Studentensteunpunt will welcome questions and issues from them, and our task is to make sure this point is well known by the foreign students, and to assist with any complaints that USF can't solve on its own. One wonders why this had to take so long, but we can finally start :-)

31 January 2007

Thijs Kinkhorst: Taking some rest after a busy weekend

Friday was my birthday party, and is was a success. I got some nice presents even though I was unable to think up even one thing for my wish list beforehand. As an experiment I bought vegetarian bitterballs (a popular Dutch snack) to deep-fry, which were surprisingly well received. Stefan arrived at 03.00 so the party could then really commence. Saturday afternoon I spent with Matthijs tweaking some of our 1996 internet project, after which I went to visit Gerd-Jan's birthday party, who was born on the same day (and year) as myself, so I couldn't miss that. I was persuaded to join in on the current fad, poker, which left me with a whopping debt of five euros. Sunday marked the last day of the Winter Efteling season, which I visited with some Eftelist-moderators. I do not really like the WE, especially because it mostly lacks the green environment and real snow, but gains rain and cold, but it was interesting to study the Vogel Rok improvements. We closed the season off with some drinks in the Efteling Hotel bar, where I suddenly discovered it to be midnight. Not that I'm Cinderella, it rather meant that the last trains had already left. Jos and Ilona were kind enough to drop me off at Rotterdam Central station around 1:05, where I could take the 2:00 train. The night train takes this scenic route: Rotterdam, Delft, The Hague, Leiden, Schiphol Airport, Amsterdam, Utrecht; so it was 4:15 when I was home. Now for some rest.

25 January 2007

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.)

Andree Leidenfrost: linux.conf.au 2007 Gleanings

I was fortunate enough to attend lca2007 last week and to meet Bruno Cornec, the Mondo Rescue project leader, for the first time in the flesh.

The conference was pretty cool, and I found the quality of the program to be generally impressingly high: Excellent topics, superb presentation skills, humor and genuine passion for the topic at hand. The atmosphere and organisation were great, too - extremely well done, 7 Team!

My personal two highlights were:
Apart from the conference as such, it was super cool to meet Bruno. We had a number of good conversations and did some nice hacking, burning the midnight oil a couple of times. And HP gave me a (used) zx2000 (which Bruno carried all the way from France to Sydney!) to enable me to work on the (Debian) Itanium port of Mondo Rescue - thank you HP and Bruno! Bruno's talk was well received, and it was great to actually meet people that use the software that I spend quite a bit of time on. :-)

Finally, there is the Linus phenomenon (so you can tell this is my first
Linux conference) - he amazingly is basically left in peace: People who know him obviously talk to him and he participates vividly in discussions and so forth, but everyone else does the business as usual thing - no autographs, no photos, no nothing. I was (positively) impressed and refrained from asking him to sign my copy of Just for Fun (just kidding).

Finally, finally, I propose to find an alternative for the term 'awesome' next year. ;-)

22 January 2007

Ian Murdock: More on the importance of backward compatibility

There were a lot of good comments on my post about the importance of backward compatibility the other day (both here and in the blogosphere), and a lot more of them were positive than I was expecting, which I find encouraging. A fair number of people called me out for using such a bad example—come on, changing the OS to fix a buggy application? Fair enough. Perhaps I diminished the point I was trying to make by referencing that extreme example, but it’s a worthwhile example for one reason: At Microsoft, the user experience comes first, notbefore developer sensibilities. Fortunately, as others (rightly) point out, it’s hard to imagine a situation where such extremes would be necessary in the Linux world—for one thing, we don’t have the sheer number of legacy binary applications to deal with, nor do we have the same volume or average user profile as Windows. But the point stands. User experience should always win. If you want another example, one from a company who any developer would agree is an outstanding engineering organization, here’s one: “Sun has maintained binary compatibility between operating system releases for nearly a decade, enabling existing Solaris applications to run unmodified on Solaris 10. This means that Solaris applications developed ten years ago will run on Solaris 10 unchanged, taking full advantage of new and advanced Solaris features.”

Thijs Kinkhorst: Twenty-seven and counting

I'll be turning twenty-seven this week. A classic occasion for celebration. If you read this, and can find out where it will take place, you're invited: this Friday from 21.00 at OS/9. You can join earlier for dinner if you wish, in that case, let me know.

19 January 2007

Biella Coleman: Internet Radio Under Threat

Probably one of my favorite things about the Internet (and high speed connections) is Internet Radio. My favorite stations are: Space Station, Secret Agent and Tag’s Trance Trip on soma fm out of SF, John in the (weekday) morning on kexp out of Seattle and the The Terrordome and
Asiko Africa Phantom Pyramid
hosted by the simply amazing (really, check out his shows) Minister Faust out of Edmonton. But thanks to witless senators, all this awesomeness is under threat (and most of your probably already know). So support the effort to stop the shenanigans and let’s keep Internet Radio alive… And if you know of any other awesome radio shows or music, please do pass along. I am looking for a good salsa station, classical music and more dance music.

Thijs Kinkhorst: SUV's and Airbuses

Happy global warming...:-(... Please spread the word around: we are all responsible for this with our daily attitude with regards to the respect of our environment. Environment respect is no more (and has never been) a joke.
Says the guy blogging about booking flights from Paris to Edinburgh...

18 January 2007

Thijs Kinkhorst: I Made It

It was supposed to get better after 21.00, but I must admit that even after all news of today I underestimated the ride: having to step off my bike, being sandblasted, riding on bus lanes past trees snapped like cheap chopsticks. Some parts of the city were a maze with all the blocked roads, and I even had to get on my knees to get past one of the blocks (with my bike). But I made it and am now in the warm comfort of a home with only one tile missing.

Thijs Kinkhorst: On government crisis response

I'm here at university centre de Uithof. The government is advising against any travel due to a 10-11 Bft storm passing over the country. Earlier today, a tall crane collapsed onto one of the university buildings here, leaving luckily only a couple of people wounded. Since there's food and heating here, I'll just stay for now. The Ministery of Interior is boasting about its new initiative: a crisis website meant for situations where normal government websites cannot keep up with the high load: www.crisis.nl. According to the ministery, this website can handle "10 milion of visits per 5 minutes". The website performs very badly, being more down than up. A closer inspection seems that the site is using some content management system based on cold fusion. The website is also illustrated with nice pictures. I wonder where the ministery has sourced its advice. What about serving simple, static HTML pages (perhaps generated from some CMS)? How about not creating a lot more load with superfluous illustrations? Just a few ideas.

17 January 2007

Uwe Hermann: Surge in GPL source code releases

Is this just me or do we see a highly increased rate of (important and interesting) stuff being released (or announced to be released soon) under the terms of the GPL lately? A few examples: This is a great trend and good news for all of us. A special thanks to Sun for releasing more and more stuff under free licenses!

13 January 2007

Erich Schubert: More on configuration files

Gunnar doesn't like the idea of recommending XML for configuration files, why do you need to be able to edit a XML-file with a non-XML-aware editor if you don't like the raw syntax? If you don't like the raw syntax, use an editor that gives you a different representation. Or use some transformation. Write a tool that converts YAML to XML and back, if you like YAML better. (Btw, this is another reason to use a common library for configuration file handling - let people choose their configuration file formats!) Writing XML in the raw with a good schema-aware editor with syntax highlighting is actually quite nice. Have you ever edited an XML file with eclipse? You really should do that... I once opened my Openbox (a rather minimalistic window manager) configuration file in eclipse. Guess what, it was giving me useful syntax completion! It had loaded and used the referenced schema file. openbox configuration in eclipse It's not as if I think XML is the ultimate thing; (nor is Eclipse an editor I'd use for configuration files; startup takes years and it frequently crashes for me. vim also has some XML support...) IMHO there is a lot in XML that should be stripped (such as attributes); I like JSON syntax better, except it's in turn lacking essential information such as character encoding, namespaces and schema information. I also don't thin JSON allows comments. But when handling information from multiple sources (and multiple schemes), XML is really useful. It removes most of the quessing needed for handling other formats. And that is what I'm precisely advocating: use standardized formats. Consider for example the apache configuration. Do you know of any tool that can parse the apache configuration files other than apache? Some parts look like SGML/XML, but they don't have much more in common than using < and >. When you are in need of automating something with apache, you'll be annoyed by this. If apache would be using something where you have a reliable parser ready for - that would be nice. Have a look at the xchat.conf configuration file. It uses "key = value", but they have these extra spaces there and don't use quoting, this means the file can't be loaded by many parsers, e.g. bash. Now lets use at buttons.conf - compeltely different syntax, "KEY value" blocks, separated by empty lines... Btw, note that configuration handling with XML to me means also keeping comments somehow... most applications will nuke any comments in their configuration files; which is funny since most configuration syntaxes do have a notion of comments, but did you ever come across an application using sh-style configuration (i.e. that you could source in bash/dash/zsh), that keeps comments? P.S. The YAML homepage is not YAML. It's valid XHTML. Only if you strip out all the tags and attributes and use only the text content within the /html/body/pre tag, then you have something which probably is YAML. This compatibility with HTML is probably why XML was at all successful.

Next.

Previous.