Posts

Converting time stamps in excel to dates -

i have large excel spread sheet has column of time stamps. know convert on date? there function can use? tried format cell date doesn't work. file 91,568 kb. if there simpler way great. i'm open ideas. thank in advance :) p.s. don't know programming languages use formula , set formatting desired time format: =(((column_id_here/60)/60)/24)+date(1970,1,1) source: http://www.bajb.net/2010/05/excel-timestamp-to-date/ tested in libreoffice

apache - In a Struts Action, can I write out a byte array as well as redirect the page? (Struts 1, Java) -

i'm working on project in which, after user submits form, i'd have them download pdf file (filled out information form) redirect them page. know how redirect (returning actionforward set redirect correct jsp) , know how send pdf (i build using itext library, write byte array out httpservletresponse 's output stream), i'm not sure how both without sort of kludge. i'm guessing i'll have 1 of 2 using javascript/ajax, wondering if there more elegant way struts. not servlets. what end doing in these situations request file timestamp request parameter. when write response set cookie timestamp. every few moments on client side check see if cookie exists, if does, window.location 'redirect' page.

php - How to create hierarchical json using data from a psql database? -

Image
i using php connect psql database , have initial code connect database, access table , set column array etc. i, however, have been struggling data desired format code running on. input in json hierarchical data form, following. function getdata() { return { "name": "data", "children": [ { "name": "america", "children": [ { "name": "ma", "children": [ {"name": "westborough", "order": 30}, {"name": "southborough", "order":20} ] }, { "name": "nh", "children": [ {"name": "nashua", "order": 12} ] }, { "name": "ca", "children": [ {"name": "sanfransico", "order": 17} ] } ] } ] }; this code have using php: <...

bash - Replacing strings in one file with strings from second file -

i've been searching couple of days haven't got right answer i have 2 files this: file1: >contig-100_23331 length_200 read_count_4043 tcag... >contig-100_23332 length_200 read_count_4508 ttca... >contig-100_23333 length_200 read_count_184 ttcc... file2: >contig-100_23331_cov:_30.9135 >contig-100_23332_cov:_125.591 >contig-100_23333_cov:_5.97537 i want replace lines names (>contig... length...) in file1 lines names in file2. note file2 contains contig names (no sequence). i suppose theres way sed , can't find solution thanks in advance! one possibility use sed create sed -script file2 used on file1 : sed 's/^\(>contig-[0-9]*_[0-9]*\)_.*/s%^\1 %& %/' file2 > sed.script sed -f sed.script file1 > file.out rm -f sed.script for sample file2 , sed.script contain: s%^>contig-100_23331 %>contig-100_23331_cov:_30.9135 % s%^>contig-100_23332 %>contig-100_23332_cov:_125.591 % s%^>contig-100...

javascript - Wordpress slider not showing up/transparent text/ and missing drop down menu -

i have seen issue on other posts can't seem find answer fixes particular site issue. site working fine until transferred host- had edit lot of wordpress php code work again, did nothing template. www.tnapothecary.com for whatever reason visual editor buttons gone on wordpress page editor. have updated lastest wordpress , nothing still working. ideas on how can text show again? the other issue i'm having slider not showing , drop down menu isn't working. thinking js issue, after replacing theme js , tinymce files- nothing did trick. ideas appreciated. thanks ben

php - display different tables based on a selected checkbox value for a current user in session -

when user registers there multiple healthcondition checkboxes user select ever applies them. allowed select 1 or more condition. i want set query when user logs in automatically see table showing foodoptions based on selected healthcondition/s upon registeration. able store these values in database i'm not sure how go retrieving these values , setting specific condition pull foods each of checkboxes database depending on on ever stored in database.... currently healthcondition stored diabetes, high cholesterol etc under field name healthcondition in member table. totally new , stressed out... please me .... please select of following conditions apply you: diabetes type1 diabetes type2 anemia high cholesterol pregnant none of above this code inserts data database if(isset($_post['healthcondition'])) { $healthcondition = implode(",", $_post['healthc...

stylesheet - css: many sibling selectors on the same line -

in stilesheet have similar of follows: h2.foo1 ~ p.bar1 { ... } h2.foo2 ~ p.bar2 { ... } h2.foo3 ~ p.bar3 { ... } since properties defined within brackets same all, can combine above lines in one, , how? is, similar to: h2.foo1 ~ p.bar1 (?) h2.foo2 ~ p.bar2 (?) h2.foo3 ~ p.bar3(?) { ... } comma. h2.foo1 ~ p.bar1, h2.foo2 ~ p.bar2, h2.foo3 ~ p.bar3 { ... }