Home | Blog Roll |  Link Roll |  Colophon/About| |


Archive for December, 2006

The Cookies of Xmas

Saturday, December 23rd, 2006

ET has been busy, and the results have been yummy:
a small plate of short bread, and xmas biscotti, almond crescent, Amoretti cookies, & hazelnut button cookies
xmas 007 (Small)cookies

sugar cookies
xmas 002 (Small) cookies

gingerbread men
xmas 003 (Small)cookies

more gingerbread folk
xmas 001 (Small) cookies
Happy Newtonmas!

SNTT Structured DbColumn’s in Lotus Notes

Thursday, December 21st, 2006

Back in February I posted Structured DBlookup’s in Lotus Notes. Very popular. Implicit in that was that the same could be applied to DbColumn’s, but the web (and Google) is all about being explicit, so here we go :

class := "Notes";
Cache := "NoCache";
server := @Subset(@DbName; 1);
database := @Subset(@DbName; -1);
view := "In Progress";
columnNumber :=1;
value := @DbColumn( class : cache ; server : database ; view ; columnNumber );
@If(@IsError(value);@Return(@Text(value));@Unique(@Sort(Value)));

The commentary in the Structured DBlookup’s in Lotus Notes post still applies.

The changes from the DBLookup are : no key and you have to read a columnNumber, not a field name.

In general : Having views just for lookups are a very very good thing. You can append columns to such a lookup view but should never insert or delete them. (you don’t know what you might break) As of R6 you can use the @Sort function to order the result without a new lookup view. I also did a @Unique to remove duplicate, which is usually a good thing to do.

It’s self-documenting and error checking - so I’m less likely to make a mistake. Enjoy (technorati.com tags : , ) and Happy Holidays / New Year.

Update (Jan 3 2007): Based on this Notes Forum comment by Ben Langhinrichs, I would revise the last 2 lines to :

value := @Unique(@trim(@DbColumn( class : cache ; server : database ; view ; columnNumber )));
@If(@IsError(value);@Return(@Text(value));@Sort(Value));

since in R6.x+,Interim results in a formula can be greater than 64KB, but the end result of the formula cannot.

SNTT : Export any Lotus Notes View to Excel from Domino Web, automagically

Thursday, December 14th, 2006

As an update to Export any Lotus Notes View to CSV or Excel, automagically, and as an answer to a being asked how you would do this, here is some similar code to export a view from the web brower to Excel :

WebExcelPrint.txt

Import it into a Lotus Script Agent, and call it with a url like http://ServerName/YourDatabase.nsf/WebAgentName?OpenAgent&ViewNameToExport

The Initialize routine parse’s the ViewNameToExport off of the Query String, and opens that view object.

The tricky/clever/sneaky part is the :
Print |Content-Type:application/vnd.ms-excel|
which will create and open (if excel is a registed application) the spreadsheet sheet.

You can also do something like this, after that line,:
Print |Content-disposition: attachment; filename=| & ViewName & |.xls|
which we let you set the filename of the spreadsheet.

You can also do a bunch more formating of the table cells, and I believe you can pass thur some Excel formulas. (see Microsofts’ Excel Web Connectivity Kit for more details on this.)

See (new father) Jake Howlett’s excelent CodeStore article on Keeping the boss happy for more variations. Enjoy (technorati.com tags :, )

SNTT : Export any Lotus Notes View to CSV or Excel, automagically

Thursday, December 7th, 2006

Here is a some very generic code which will work on any Lotus Notes View to print out the contents to a Comma Separated Value (CSV) file, or as an Excel File, with minimum formating, as a general export routines.

ViewCSVPrint.txt
ViewExcelPrint.txt

Import them to a manual agent or a shared action button, open a view and go.

The CVS export prompts you for a file Location, the Excel export (assuming you have MS Excel installed) opens a excel file (it makes it visible at the end) with the results. (you could easily modidy the Excel export to prompt for a - or just use a hard coded default - file path and name, and save to the file system.

A couple of things to note :

  • The ViewCSVPrint routine in the CVS export does not use any UI objects so it could be called by a scheduled agent and run on the server, as long as you supply a valid View object (using a notesDatabase.GetView( viewName$ ) call) and a valid FileNamePath. By giving the file a “.csv” extension the file can be auto magically opened in excel, as well as processed by other programs. (CSV and XML files are the Lingua franca’s of computer systems.)
  • The Excel export must run on a workstation, which must have Excel installed. It is possible to use Java (or other languages) libraries that create excel files on a sever, but I’m not going there. I’m using the LSX OLE libraries available and you can figure out more by looking at Microsoft’s own excel VBA help.
  • In the Excel export I’m using an ugly hack in the intializeColumnArrayValues sub routine to map the column number to the excel column letter label. This limits it to 12 columns at presents, but would be trival to extend. Even better if I figured out some clever way to translate column # 17 to chr(”A”) + 14 - 1 = “n” or something. When I can marshal my brain cells I’ll do just that for a future SNTT.
  • The CVS also runs very very fast for very large numbers of rows, compared to the Excel export. Seconds compared to minutes.
  • Both exports works best with flat (non- categorized) views where all the columns have titles and without hidden columns. This is because I’m using a ViewEntryCollection which never contains categories. But, they will work ony any view.
  • For the Excel export, I’m splitting and freezing the header row, and doing some fit to size on the data, but that’s it. You could do some more formatting by querying the columns and depending on the type (number or data) or formating (left alignment, number of decimals) then apply that to the excel data column.

Enjoy (technorati.com tags :, )

Update : See also
SNTT : Export any Lotus Notes View to Excel from Domino Web, automagically

Update March 20th 2007 : Lotus Guru, aka Kevin Pettitt, borrowed the code here and worked it to Make Attractive Exports of Categorized Notes Views. That’a Boy Kev!

CosPlay Cafe comes to Toronto

Saturday, December 2nd, 2006

Restaurants and Cafes devoted to “costume play,” or cosplay as the Japanese call it, first appeared in , Tokyo’s discount electronics store district, in the late 90’s.

Well during the summer, opened in Toronto’s east end at 1883 McNicoll Ave. (at Kennedy Rd close to .), to provide the french maid variation of CosPlay Cafe. (There is at least one famous “Butler Cafe” in Tokyo called Swallowtail, where the staff are very well-dressed males in a waiter’s uniform or an elegant butler suit severing the female clients.)

The Star did a food review : French maids, Asian food and the Globe and Mail noticed : In a Scarborough café, it’s maid to order.

This trend has spread to South Korea, China, Hong Kong, and Taiwan, but is the first in Canada (amusing comment on MegaToyo site :Maid Cafe In The Great White North? Yes!). (are there any in the US?) Once again proving we are a suburb of Hong Kong.

If you can’t visit anytime soon, checkout this YouTube video, to get an idea. (Welcome Boing Boing & Sea Slug readers!)

Update : The National Post now has also a story: Scarborough cafe takes customers ‘inside the cartoon’, as of Tuesday December 05.

Cory’s away and this story got re-posted to Cosplay restaurant in Toronto on BoingBoing, leading to SlashFood which looks to have been sparked a Reuters story : via New Zealand, and China .

See also a video visit to Singapore’s Maid Cafe on Zer0’s blog

Update Feb 1st 2007 : CBC’s TV The Hour did a piece on on January 15th, and has a video clip up :

It’s not your ordinary cafe, it’s kinda like Hooters. Except instead of tank tops and shorts, the staff dress up in French maid outfits.It’s a weird phenomenon in Japan, now, they’ve set up shop in Toronto.

The Hour takes a look at this new genre of cafe.

and today, Metro Morning (CBC Radio) just covered it in it’s food column Beyond Burgers, where Catherine Jheon (CJ) gave the thumbs up for the food, even if Andy couldn’t quite get over the imagery. CJ’s comments are on her FoodTV.ca blog as well as the Beyond Burgers site (with a Mp3 of segment).

Update : Scott Frye’s AnimeLife blog has moved and his iMaid posting is now at


Close
  • Social Web
  • E-mail
E-mail It