Category: scripting languages

scripting languages

“Closeable Kiosk” (2) — with user scripts

In my last blog post (http://www.smartpeer.net/2013/10/closeable-kiosk-with-firefox-user-styles/) I used user styles to create a “closeable kiosk” with firefox. Google chrome also supports user styles so similar styles can be applied to Chrome too.

Both firefox and Chrome support another “user scripts”, which “Allows you to customize the way a web page displays or behaves, by using small bits of JavaScript.”. it can be applied to selected pages only, or to all the sites/pages. Here is a way…


Read More »

“Closeable Kiosk” with firefox user styles

Recently I got request to create a “closeable browser-based kiosk”– basically a browser in full screen mode, can’t be minimized/resized/moved or returned to non-full screen mode, no browser file menus, no address bar/navigation bar so user have to be stay on the same page, and can’t go to other urls. However user should be able to close it using mouse. This is to be deployed on some real kiosk booths like the ones often seen in a museum. There is no keyboard on the kiosk so short cut key…


Read More »

[民工日记]自己写个简单MP3 ID3 tag转码工具

MP3 ID3 tag自动转码工具

老版本ID3 tag的标准本来只支持ISO-8859-1,也就是只能用西方拉丁字母。新的ID3 tag还支持Utf-16, 所以中文啊越南文之类的都能支持了。

问题是许多网上的mp3歌曲id3 tag编码很不规范。。。拿我来说吧,我有7000多首中文mp3。。。而这些中文歌曲的Id3编码是五花八门:

Gb2312/big5/big5hkjcs 甚至utf-8都有,还有很多根本没有tag而是把作者和歌名都放在文件名上。 这样听歌的时候就比较头痛了--在播放器里不知道现在听的是什么歌, 哪个歌手、专辑等。浏览、搜索歌曲也很不方便。在windows还好点,因为许多windows上的jukebox支持GBK编码能看不少繁体字,但到了苹果的OSX上就无法忍受了:OSX只支持unicode,…


Read More »

Passing an array of objects when calling a document/literal web service with perl soap::lite

One recent problem I encountered was that I had to write a PERL client for an existing document/literal web service. The service is using polymorphism– there are two methods:

Product[] getProducts1(Products[] products1);
Product[] getProducts2();

“Product” is only an interface. Product1 and Product2 are concret classes that implement the “product’ interface. and the objects in the products array are either Product1 objects or Product2 objects;

Interface Product {
    public String getName();

Read More »