Colin Wu

0

votes
0

answer
3

views

Compiled Perl (with ActiveTCL) won't run on some Windows 10

I am at a complete loss and am hoping someone could provide at least a hint... I wrote a (Strawberry) Perl program that uses ActiveTCL to create a GUI interface. I then 'compiled' it using pp on my Windows 10 Pro system and sent it to a friend. When he tried to run it, his Win 10 Pro system put up a...
Colin Wu
1

votes
1

answer
69

views

Perl Tkx: How to pass a variable as a parameter to a button's callback

Given this Perl/Tkx code fragment: @itemList = ({'attrib1' => 'name1', 'attrib2' => 'value1'}, {'attrib1' => 'name2', 'attrib2' => 'value2'}); $row = 0; foreach $item (@itemList) { push(@btn_list, new_ttk__button(-text => $item->{'attrib1'}, -command => sub {do_something($item->{'attrib2'});})); $bt...
Colin Wu
1

votes
1

answer
630

views

What does “&:name” mean in Ruby [duplicate]

This question already has an answer here: What does map(&:name) mean in Ruby? 14 answers I saw it in some sample Ruby code someone had posted. It was something like: a.sort_by(&:name) where a is an array or ActiveRecord objects and :name is one of the attributes. I have never seen &:name and Ruby's...
Colin Wu
1

votes
2

answer
633

views

paperclip 5.1 content-type validation too strict

I need to upload attachments with extension of .txt but evaluate to mime-type 'application/octet-stream' by the file command. The file is automatically generated by a piece of equipment and it is not feasible to rename it before uploading. I have tried: class Book < ActiveRecord::Base has_attached_f...
Colin Wu
2

votes
0

answer
1.1k

views

How to debug kernel oops “Unable to handle kernel paging request”

I changed some configuration and build a new uImage. Then I move the new uImage to /boot When I start the system, I find an oops in dmesg. The system looks working well, except that 'insmod xxx' can not be run. I am not familiar with kernel, and don't know how to debug this. In addition, I have...
colin wu
2

votes
1

answer
625

views

Auto-update text field depending on selected option

Rails ver: 4.0.0 Hi all, In my form I have a drop-down selection of client names. I would like to have a text box containing the client's address be updated whenever the selection is changed (before clicking the submit button to finalize the update). The reason is I am working with legacy data from...
Colin Wu