Posts

linux - Where does, Carp library in Perl, print logs when run from crontab -

i have perl script uses carp (carp croak) print info , errors. when run directly can see output on console. when running script cronjob dont know messages going. already checked in /var/log/messages /var/log/cron . not found please help. man cron : when executing commands, output mailed owner of crontab (or user named in mailto environment variable in crontab, if such exists). job output can sent syslog using -s option.

jquery - Not showing data in month and year dropdown in datepicker -

Image
i using jquery datepicker month , year value. but problem is, in dropdown of month , year, white spaces visible, if hover in opened dropdown month , year respectively visible. if take mouse away, there blank white dropdown, again hover in dropdown list, month , year visible. can select then. problem is not visible. my code datepicker <script type="text/javascript"> jquery(function ($) { $("#<%= txtdob.clientid %>").datepicker({ changemonth: true, changeyear: true, dateformat: 'mm/dd/yy' }); }); </script> textbox in applying it: <div class="col-sm-5"> <asp:textbox id="txtdob" runat="server" placeholder="mm/dd/yyyy"></asp:textbox> </div> <div class="col-sm-4 no-padding"> ...

Nginx module: how to get variables value from conf file -

i have nginx server acting reverse proxy. downstream, request sets header info ssl protocol nginx use proxy. put info in variable in nginx.conf file called "$origin_ssl_protocol". looks like: proxy_ssl_protocols $origin_ssl_protocol; now problem how nginx module (the function handler) value of variable? far know, handler proxy_ssl_protocols "ngx_conf_set_bitmask_slot", , accepts pure values tlsv1, sslv3, rather variable holding these values. i want develop own module, know how nginx value of variable in conf file (assuming variable has valid value)?

ios - Background image for iPhones and iPads of various sizes -

i add background image ios , want background image have appropriate resolutions tablet , phone versions. design considerations should take account? resolution should image in? this list of current screen resolutions variety of devices: click resolutions you create 10 different images, 5 each landscape , portrait views. alternatively, create 2 or 4 images cater landscape , portrait views , use code check devices size size them appropriately. the advantages of creating right sized images means have precise background consistent across devices, if have logo's in background distortion may occur resizing of images across devices. conversely, creating 2-4 images should reduce memory size app downloaded packaged background images instead of 10, , if resized correctly, shouldn't out of place. i test 2-4 images using simulator, checking , performance on devices plan release to. if aren't happy, either customise layouts images stretch fit appropriately, or, sym...

android - SQLITE, Group by range of 1000s -

i have database of 2 columns in sqlite android id (int) | owner (varchar) 1477 jack 1578 jill : : 9277 hill 1) count of following: - (group 1000s range) range | count 0-999 0 1000-1999 5 : 8999-9999 7 2) count of following: - (group 100s range) range | count x1xx 5 x2xx 6 : x9xx 7 3) , group 10s range. i'm stuck how group by select count(*) mytable group ?? any pointers appreciated. integer division integers in sqlite3 yields integers: select id/1000 range_id, count(*) range_count mytable group range_id; to group 100 ids, change 1000 100 sqlite3 has printf() function might useful in make pretty column describe range if need prettier integer division of id group size.

jQuery - Sort array in ascending order -

i need sort nrarray array: var nrarray = nrarray.sort(); what above this: ["1", "17", "206", "22", "3", "6"] i need this: ["1", "3", "6", "17", "22", "206"] pass in comparison callback , use parseint like var arr = ["1", "17", "206", "22", "3", "6"]; arr.sort(function(a, b){ return parseint(a)- parseint(b); }); console.log(arr); update you dont need parseint a/b auto-converted numbers. because subtracting , javascript performs necessary type conversion. however, same cannot said a + b string concatenation.

sqlite - Raw Database content showing up in Rails View -

you can see here seems raw contents of db being printed page. can't see anywhere in code why there raw output of db printed view. here code index view: <div class="main"> <div="messages"> <%=@messages.each |t|%> <h2 class="subject"><%=t.subject%></h2> <p class="content"><%=t.content%></p> <% end %> <%=link_to "create message", edit_path%> </div> </div> the create form/view: <div class="formwrapper"> <%= form_for @messages |t|%> <div class ="inputs"> <%=t.text_field :subject%><br> <%=t.text_area :content%> <div class="submit"> <%=t.submit "submit"%> </div> <%end%> </div> </div> the controller: class messagescontroller ...