huge is currently certified at Apprentice level.

Name: Hugues Marilleau
Member since: 2000-09-11 14:03:33
Last Login: N/A

FOAF RDF Share This

No personal information is available.

Recent blog entries by huge

Syndication: RSS 2.0
17 Dec 2003 (updated 1 Feb 2006 at 18:04 UTC) »

Double posts, removed.

17 Dec 2003 (updated 1 Feb 2006 at 17:53 UTC) »

Weird: On Monday, I posted my entry on Meerkat. Then, at the end of the day, it seems that the source code was not available so Meerkat was a lot less interesting. So I tried to update my diary entry, and do a preview. It take so long to preview that I finally gave up. Then, today, I log in to post a comment on one interesting thing I saw in the newspaper (see below) and when I log in, I was redirected on the entry I was editing with all my modifications available !! Groovy !!! But ... when I posted the edited comment, it appears as a new comment ! Is there a bug ?

info vs. man: No opinion. I use lots of man because I'm used to and don't use info because I don't know the keystrokes :-). Uh, and I like the search in man because you can search on the entire man page at a time. Other than that, I don't know enough man and info to have an opinion on them.

17 Dec 2003 (updated 1 Feb 2006 at 17:55 UTC) »

Well, Meerkat seems to have lots of problems. Too bad :(

Rulez !!! I think I just found the RSS reader I was waiting for : Web-based, open-source, perl based if possible (don't know PHP, Python or Ruby) and ... read the news by date : last posted articles/blog entries. This was the killer feat I couldn't find on most of the RSS reader and which (IMHO) is the one reason you would use a RSS reader : to save time.

I was thinking about this : why most of RSS readers/aggregators don't allow you to read the feeds by date ? And I think this is because some RSS version (0.9 and 0.91 and maybe 1.0) don't have date/time on entries. And so, the only way to have date/time on entries when you don't have them is to poll the RSS frequently (< each hour) and fetch the new entries on a database, add the date/time of the fetch and sort them after that. Which means a pretty heavy system. I eventually came to the conclusion that I need to build one by scratch with all this overweight. Now I think I will try Meerkat before ...

I don't have a O'Reilly Account now so I don't know if I will create one or install a copy of Meerkat on my PC but I think I will use it.

Does someone has feedback on Meerkat to give me ?

sh : je te plains si tu n'as que ça à faire de lurker ici pour poster un message juste quand je reviens ici ... :-)

So, it's the week-end here in France.

This is very cool because I just solved my bug on my HTML/CSV/Excel library on IIS/ASP at work. The aim of this library is to output 2-dimensions data in HTML file (table), CSV file or Excel file (with the Spreadsheet::WriteExcel library). You feed in the formats of the columns (name of the column, size, data type for Excel pretty formatting, etc) and the data and automagically you got the file with the right format. This is useful when you have a listing to display to the user on a Website and want her/him to be able to download it in CSV and/or Excel. You just have to build the format, write the subroutine which will output the data and plug it in the library, and voila.

The library is able to write the data to a file. It can also send the file to the user on a website with Content-Disposition: attachment; filename= ... It can handle CGI (with "print" statement to output the header and then the content) or Win32::ASP (with $Response -> AddHeader ).

Here was the bug:

Everything was working fine on CGI/Apache/Linux. CSV and HTML were OK for ASP/IIS/Windows. But it was not working for Excel files on ASP. No error message, just an empty file. I guess it was a binary/text problem because CSV/HTML worked and a quick test show me that local file writing on the server worked.

Here is the solution:

I began to search on the Perl Script Introduction and see this useful code snippet on BinaryWrite. Not bad but this is useful when you had your data in a scalar. Unfortunaly, Spreadsheet::WriteExcel just write to files or "-" to output on STDOUT. The "new" method help had some useful information on CGI interfacing or mod_perl but nothing on ASP. But the answer was in "", in the example 4. In this example, you can map a scalar to a file handle.

So, if I can get the output of Spreadsheet::WriteExcel in a string, turn binary mode on and output it to the browser, I'm in. Should work, in theory.

First step:

Install IO::Scalar:

install IO-Stringy
Code :
use IO::Scalar;
use Win32::OLE::Variant;
$Response -> {ContentType} = 'application/';
$Response -> AddHeader ('Content-Disposition', "attachment; filename=\"$filename\"");
(Hint : don't use "$Response -> AddHeader ('Content-Type')" because it will add the header, not overload the "text/html" Content-Type)


tie *XLS, 'IO::Scalar', \$xls_str;
$workbook  = Spreadsheet::WriteExcel -> new (\*XLS);
my $variant = Win32::OLE::Variant->new( VT_UI1, $xls_str);
So now, weeeeeeeeeeeek-end ...

15 older entries...


huge certified others as follows:

  • huge certified Inoshiro as Apprentice
  • huge certified sh as Apprentice
  • huge certified kuro5hin as Journeyer
  • huge certified timball as Apprentice
  • huge certified stefano as Apprentice
  • huge certified huge as Apprentice
  • huge certified rince as Apprentice
  • huge certified olg as Journeyer
  • huge certified zifnab as Journeyer
  • huge certified eviltofu as Apprentice
  • huge certified mathieu as Journeyer

Others have certified huge as follows:

  • ErikLevy certified huge as Apprentice
  • sh certified huge as Apprentice
  • huge certified huge as Apprentice
  • lerdsuwa certified huge as Apprentice
  • olg certified huge as Apprentice
  • thom certified huge as Apprentice
  • jLoki certified huge as Apprentice

[ Certification disabled because you're not logged in. ]

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

Share this page