I have a little experimental machine for playing with different distributions. Lately, the HP Mini 110-1081TU has been running MeeGo . Now it has been commissioned to run Linux Mint . This comes in a variety of flavours. The one reviewed here is Linx Mint Debian 201109 . While the download was a monstrous 1.1G, the installation is the fastest I've ever seen. It literally took 10 minutes! Post Installation - Wireless This is where the fun begins. First off, I had trouble getting wireless to work. Reading dmesg gave very helpful instructions. Read the recommendations carefully! Doing so can save you much time and effort. The HP Mini 110 uses a Broadcom 4312 WLAN . Install the packages b43-fwcutter and firmware-b43-lpphy-installer . I recommend the Linux Wireless page as it has exceptionally good documentation. Post Installation - Sound Sound quality is actually better than under previous Linux distributions I've tried. So I wa...
Magic Triangles This puzzle features in CSIRO 's Double Helix blog post, A Magic Triangle Brainteaser . The Magic Triangle problem involves arranging integers on a triangle. Consider a triangle with a circle at each vertex and along each side: Arrange the numbers 1 to 6 in the circles so that each side sums to the same value. This specific challenge requires each side to sum to 10. Method for Triangles First, label the nodes sequentially starting from any vertex: The solution involves the following steps: Generate all permutations of numbers 1 to 6 as a , b , c , d , e , f . Filter permutations to satisfy the magic shape condition: $a + b + c = c + d e = e + f + a$. Apply the final condition: a + b + c = 10 . Using Haskell Generate all permutations of the numbers 1 to 6: import Data.List permutations [ 1 .. 6 ] This yields 6! = 720 permutations. Filter for sides with equal sums: [ [(a,b,c), (c,d,e), (e,f,a)] | ...
I have been using Makefiles where command line tools for building a project are not generally available. This includes LaTeX documents and recently R projects. So here is an R script that can be used to render R markdown to PDF. #!/usr/bin/env R # Render R markdown to PDF. # Invoke with: # > R -q -f make.R --args my_report.Rmd # load packages require ( rmarkdown ) # require a parameter naming file to render if ( length ( args ) == 0 ) { stop ( "Error: missing file operand" , call. = TRUE ) } else { # read report to render from command line for ( rmd in commandArgs ( trailingOnly = TRUE )) { # render Rmd to PDF if ( grepl ( " \\ .Rmd$" , rmd ) && file.exists ( rmd )) { render ( rmd , pdf_document ()) } else { print ( paste ( "Ignoring: " , rmd )) } } } It will process Rmd files listed after the --args parameter. This script can t...
Comments