Day: ‍‍ז׳ מנחם אב תשס״ה – August 12, 2005

  • Converting between DOS and Unix

    Quick Overview DOS (and Windows) use different formats to mark the ned of a line in a text file. DOS uses a CR-LF, while Unix just uses a LF. There are many ways to switch between the formats.. some common ones are below Explicit Programs The programs dos2unix and unix2dos provide a simple way to […]

  • Careful of AWK Comments

    Passing a script with comments from a shell script. If you’re like me, you write awk scripts by creating a file, let’s say script.sh, and it looks something like this (let’s say.. count lines where the 2nd comma-delimited number is greater than 3): #!/bin/sh<br /> awk -F, ‘BEGIN {<br /> # Minimum threashold<br /> THRESHHOLD=3<br […]

  • Full Matrix to Half Matrix

    Quick Overview How to make a directed representation of a symetric matrix into an undirected representation. Overview That’s a long task. Really what it means is as follows. Suppose I have a matrix, let’s say, A[i,j]. Now, if A is sparse (that is, most of the elements are zero / null / any constant value), […]

  • Bezeq PPPoA with an Alcatel Speedtouch 510

    Quick Overview Bezeq is the telephone company in Israel, and the supplier for ADSL lines here. Although one can sign up for any ISP they choose, all lines come from Bezeq, and use their setup. By default, the modems they give try and use PPTP or PPPoE, requiring a dialer program running on a PC. […]

  • Nested Lists in XHTML

    Quick Overview If you want to nest lists in HTML, you probably did something like the following (although you may not have done the indenting) &lt;ul&gt;<br /> &nbsp;&nbsp;&lt;li&gt;List Item 1&lt;/li&gt;<br /> &nbsp;&nbsp;&lt;ul&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Sublist Item 1&lt;/li&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Sublist Item 2&lt;/li&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&lt;ul&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Subsublist Item 1&lt;/li&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;<br /> &nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Sublist Item 3&lt;/li&gt;<br /> &nbsp;&nbsp;&lt;/ul&gt;<br /> […]