Posts

Showing posts from 2011

XNB File format

00: 'X' 01: 'N' 02: 'B' 03: 'w' 04-05 : 8004h -> compressed stream, 0004h -> uncompressed stream 06-09: compressedSize 0A-0D: decompressedSize 0E: start of data

Compress-a-sequence

During my attempt to learn LISP/Clojure, I tried the problems in www.4Clojure.com 4Clojure problem #30 : Write a function which removes consecutive duplicates from a sequence. so that ( = ( __ [ 1 1 2 3 3 2 2 3 ] ) '( 1 2 3 2 3 ) ) and ( = ( __ [ [ 1 2 ] [ 1 2 ] [ 3 4 ] [ 1 2 ] ] ) '( [ 1 2 ] [ 3 4 ] [ 1 2 ] ) ) My solution : ;; ywidyatama's solution to Compress a Sequence ;; https://4clojure.com/problem/30 ( fn dedupstr2 [ s ] ( reduce ( fn dedup-reduce [ seq_or_n1 n2 ] ( let [ lastn1 ( if ( seq? seq_or_n1 ) ( last seq_or_n1 ) seq_or_n1 ) , seq1 ( if ( seq? seq_or_n1 ) seq_or_n1 ( seq [ seq_or_n1 ])) ] ( if ( = n2 lastn1 ) seq1 ( concat seq1 ( seq [ n2 ]))) )) s ) )

Make Rational Team Concert URLs behave

When Rational Team Concert sends email, or show a dependency link to another work item, it uses the hostname in the URL. Imagine that I installed Rational Team Concert in a sandbox server in our intranet, and without any need to register the sandbox server to the DNS. When RTC server sends email, and clicked by any of our programmers, the URL pops up with the hostname - but of course the hostname is not registered in the DNS so we have server not found error. Recent googling turned out this IBM page that may be of assistance. And I use the /jazz variation of the URL, even tough the page says otherwise. Here is the excerpt from the page : Open a browser and log in as a member of the JazzAdmins group to the Admin Web UI on the Jazz Team Server: For IBM® Rational® Team Concert , typically the URL for the Admin Web UI is https:// host-name :9443/rtc/admin . In the Admin Web UI, click the Server tab. For IBM Rational Quality Manager , typically the URL for the Admin Web UI is https:// hos