ng-options is complex. Basic use It seems like a good idea to define an array to hold selection option information. $scope.choices = [ {id:'A', text:'Choice A'}, {id:'B', text:'Choice B'} ]; To construct a dropdown list with angular, here's the <select> template. <select ng-model="selectedItem" ng-options="item.text for item in choices"> </select> This ng-options's format…

I tried to log in to a machine via docker-machine ssh command, I got the following error: $ docker-machine ssh ec2new exit status 255 You can show debug message with -v option (after the machine name): $ docker-machine ssh ec2new -v @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@…

[angularjs enable submit button] Angular.js provides a mechanism called Validator. Form input is evaluated everytime you type something. Form's validity is exported as formEntry.$valid. where formEntry is a value specified as name= parameter of the form. <form name="registration"> <input type="text" ng-model="email" required> </form> {{registration.$valid}} {{registration…

I wanted to do this a few times, but not frequently enough that I ended up with spending time seaching solutions every time. Here's how to do it: Select all the rows you want to adjust height. On the inspector, select 'format' > Table. At the bottom, there's [Row & Column Size]. Click [Fit] button. …

I was looking into Golang's C integration. I spent hours understanding it and it was rather tricky. What I wanted to do was to allocate three char* via C's malloc(). In C, the malloc line would look like this: int len = 3; char* p = (char*)malloc(sizeof(char*) * len); I translated this to golang: // NG: this won't compile len := 3 p := C.malloc(unsafe.Sizeof(*C.char) * len) And this has…

I've recently got MK809III Android mini PC. I wanted to put Linux on it. I've flashed U-boot to it, but I didn't see anything on HDMI output during the boot. I wanted to see boot log. It seems like MK809III is manufactured by many companies and the circuit layout is slightly different from a model to another. For this particular model, I saw three pads on the edge of the circuit board. With a …

I wanted to use a tftp server to supply a firmware file for an OpenWRT machine. I've installed it, but I couldn't access it. [macbook 192.168.1.69]---+ +----[fedora 192.168.1.234] | | [ HUB ] mac$ ping 192.168.1.234 => worked mac$ ssh 192.168.1.234 => worked mac$ tftp 192.168.1.234 tftp> get TEST_FILE Transfer timed out. As s…

Here's how I connected NixCore X1 to my local wifi network. /etc/config/wireless config wifi-device radio0 option type mac80211 option channel 11 option hwmode 11g option path '10180000.wmac' option htmode HT20 config wifi-iface option device radio0 option network wwan option mode sta option ssid M…

I've created /etc/opkg/base-feeds.conf by looking at some web page, but it turned out that that configuration was probably outdated: src all http://iotdk.intel.com/repos/1.1/iotdk/all src x86 http://iotdk.intel.com/repos/1.1/iotdk/x86 src i586 http://iotdk.intel.com/repos/1.1/iotdk/i586 As it is on intel.com, it seems legitimate, but Version 1.1 turned out to be somewhat old. Edison f…

brew update caused Error: The /usr/local directory is not writable error. This seems like a known issue with OS X El Capitan. $ ls -ld /usr/local/ drwxr-xr-x 23 root wheel 782 Nov 24 18:04 /usr/local// $ sudo chown -R $(whoami):admin /usr/local/ $ ls -ld /usr/local/ drwxr-xr-x 23 gaku admin 782 Nov 24 18:04 /usr/local// brew update executed successfully again.…