Indlæg

Status for Universal Power Adapter for Mobile Devices (2019)

I quite like the idea of a common interchangable power supply for laptops, like micro-USB is/was the common interchangable power supply for phones. Hence I have been keeping half an eye on Universal Power Adapter for Mobile Devices. There doesn't seem to be any actual users of that standard, so I sent an email to IEEE inquiring if they knew of any users. This is the excellent reply I got from chair Leonard Tsai: Hi, Thue, I am the chair for IEEE 1823 working group and your email inquiry was forwarded to me early. Sorry about the belated reply as I just travelled to Asia. Currently the IT market which 1823 standard was originally intended had been swayed by USB SIG to use type C connector as alternatives. However, EU standard body had made inquiry to see if 1823 should be consider as the preferred connector for next get mobile device. Also, there are new interests from some automotive industry players that are looking at distributing DC bus inside a car (obvious that 1823 with CA…

Making the Trust 1200 Wireless tablet work on Linux

I have gotten access to an old wireless tablet ("wireless" as in the pen is battery powered, tablet is wired USB), and have gotten it work. Since it was not trivial to figure out how to do that, I though I would describe the steps. First the context: in the old days, X11 communicated directly with the hardware. So for a tablet to work, there needed to exist an X11 driver. There seem to be 2 kinds of tablets: Wacom tablets and non-Wacom tablets, with Wacom tablets generally having much better Linux support. So the first thing I found was some X11 Wizardpen drivers which had not been updated since 2011, which supposedly supported various non-Wacom tablets. This was very much a blind alley. After some further investigation, I found that in the newer Wayland architecture, tablet drivers had been moved into the kernel, and the Wayland project libinput had been created as a middle layer. And in fact the DIGImend project had already created a driver for my tablet (which turned o…

Status for Universal Power Adapter for Mobile Devices

I was curious about whether IEEE's Universal Power Adapter for Mobile Devices standard had been abandoned. Jonathan Goldberg of IEEE was kind enough to answer my email: Thue,

Good afternoon. In fact, P1823 recently completed a recirculation ballot and has been submitted to the IEEE Standards Review Committee (RevCom) for December 2014 review and possible approval by the IEEE Standards Association Standards Board.

Please let me know if you have any further questions on this project.

Regards,

Jonathan Goldberg
Client Services Manager
IEEE Standards Association

p: +1 732 562 6088
c: +1 732 570 0116
f: +1 732 562 1571
e: goldberg.j@ieee.org

IEEE - Fostering technological innovation and excellence for the benefit of humanity.

On Wed, Sep 24, 2014 at 12:04 PM, IEEE Standards webmail wrote:
(Message sent via IEEE Standards webmail)
-----------------------------------------

referer = http://standards.ieee.org/develop/project/1823.html
first_name = Thue
last_name = Kristensen
email = t…

Dashed line error in Apple PDF viewer

I had the Apple PDF viewer choke on a PDF document which worked wine in other PDF viewers. I tracked it down to a funny dashed line. As can be seen on page 155 of the PDF specification for the third edition, dashed lines are specified as fx "[1 2] 0", which means 1 unit on, 2 units off. To stop dashing, you should write a dash specification of "[] 0". I had a pdf which tried to stop dashing by writing "[ 1 0 ] 0" ("[ 1 0 ] 0 d" actually, I haven't looked into what the "d" means). This worked fine in most PDF viewers, but in Apple's viewer the document stopped rendering at that point. I assume that it is the 0-gap (the first "0") which confuses it. Fixing the PDF generator to use the "[] 0 d" from the specification made it work in Apple's PDF viewer. So now you know, if you come across the same problem :). I would report it to Apple, but they don't seem to let you report bugs if you do not have an …

The Sharing Knife

I liked the fantasy novels The Sharing Knife, so I asked Lois McMaster Bujold (the author) by email if more books in that series we planned. Her answer:

Hi Thue --

No, only the 4 so far. Nothing else is planned at this time.

There is, of course, a new Vorkosigan SF book coming out in November, _CryoBurn_.

bests, Lois.

Too bad :(

Kom uden om DR's flash-afspiller

Jeg ser nogen gange Bonderøven på DR1. Men selv om programmerne er tilgængelige via flash-afspilleren, så er DR er langsomme til at lægge programmerne ud til download. Flash-afspilleren er ret irriterende, da man for eksempel ikke kan putte den i fuldscreen, og så samtidigt klikke rundt på sin sekundære skærm.

Så siden flash-afspilleren må hente videoen et sted fra, så må jeg da også kunne hente den derfra, og så afspille den fra den downloadede fil.

Første trin er at bruge Chromium's developer tools til at "inspecte" flashplayeren på http://www.dr.dk/dr1/bonderoeven . Den har kildekoden

<object id="nettvPlayer" height="349px" width="620px" type="application/x-shockwave-flash" data="/nu/assets/swf/NetTVPlayer_10.swf">
<param name="quality" value="high">
<param name="allowScriptAccess" value="always">
<param name="wMode" value="transparent">
<p…
PHP's implementation of fgetcsv() and fputcsv() does not follow RFC 4180 or Wikipedia's description, and does not work in all cases with Excel or OO Calc, as described in bug http://bugs.php.net/bug.php?id=50686 .

Here is an RFC 4180-complient implementation in PHP. This can parse more than 1MiB of CSV text per second, so should be fast enough for most uses. It is fairly strict, in that it does not allow whitespace before the start of a quoted item, such as 1, "2" ,3 , in according to the standard, but it would be simple to make it laxer. It supports both \r\n and \n linebreaks, where the standard only supports \r\n. whitespace is just another data character, so '1, 2,3 ' becomes Array(1, " 2", "3 "). backslashes are also just another character, as backslashes have no special meaning in RFC 4180.

The code below may be used and redistributed without restrictions. You may consider buying me a beer if you find it useful.


class csv {

private s…