Posts

vba - Automatically add rows into a MS Word table in a loop as long as you read data from the excel sheet -

i'm vba newbie , having lots of errors , problems go on task. appreciated. basically have textbox (textbox1) in word doc. have users type in. it'll number , text references folder excel files numbers name. all excel files in folder has same formatting (created same template), number of rows in each file differs 1 another. my boss wants me create vba code in word import data excel word doc, problem occurs varying number of rows in each file, users can select existing file in folder. someone suggested creating rows in loop long there data pull excel, cannot code work. keeps failing i'm setting word table cell , excel cell equal each other (which don't know i'm doing right). here have far: private sub commandbutton1_click() dim tbl table dim row row set tbl = activedocument.tables(3) set row = tbl.rows.add(beforerow:=tbl.rows(1)) tbl.rows(1).range.formattedtext = tbl.rows(2).range.formattedtext '~~~> required above code inserts blank row...

Pointer to different data type in C -

i have compiled , run following program in c: #include <stdio.h> #include <stdint.h> #include <inttypes.h> int main(int argc, char* argv[]){ uint8_t data[8] = {0, 1, 2, 3, 4, 5, 6, 7}; uint32_t* pointer32 = &data[0]; uint64_t* pointer64 = &data[0]; printf("%" priu64 "\n", *pointer64); printf("%" priu32 "\n", *(pointer32++)); printf("%" priu32 "\n", *pointer32); return 0; } and received following expected output: 506097522914230528 50462976 117835012 the output correct , corresponds bitwise interpretation of data unsigned 64-bit integer , unsigned 32-bit integers. tried on 64-bit machine running ubuntu 14.04. compiled stock gcc compiler (4.8.4?). compiler throw "assignment incompatible pointer type" warning (which can safely ignored because incompatible assignment intended). is reliable way of converting , interpreting data in "data" array, or better r...

Elixir online IDE/playground website -

is there website allow test elixir snippets, save them , share like: http://haskellstub.com/ http://ideone.com/ http://www.tutorialspoint.com/codingground.htm i find like: http://www.tryerlang.org/ , http://try-elixir.herokuapp.com/ not allow share code, , second use elixir v0.10.2 . finally found wandbox 😎 features: elixir 1.1.0dev allow edit in vim/emacs mode execution of code syntax highlighting adding options commandline sharing links other supported languages[ bash script lazy k c lisp c# lua c++ php cpp pascal coffeescript perl d python elixir rill erlang ruby groovy rust haskell sql java scala javascript vim script] example: fizzbuzz problem

mysql - DATE in a between dynamic -

i need build sql query following select pi.desc, pa.nameaddress, pi.ref, pi.descitem, pi.quantity, pi.totaldf, pi.code, pi.codebl, cl.dateship, po.dtvalidated, po.supervisordate, datediff(po.supervisordate, po.dtvalidated) 'diffvalidsupervisor', datediff(cl.dtlivr, po.supervisordate) 'diffexpevalid', year(cl.dtlivr), month(cl.dtlivr) new.proforma_item pi inner join old.cdestk_lig cl on pi.codecde = cl.codcde inner join new.proforma po on po.idproforma = pi.idproforma inner join new.proforma_address pa on po.idproforma = pa.idproforma group pi.desc, pi.ref, pi.descitem, pi.code, pi.codebl, cl.dateship, po.dtvalidated, po.supervisordate, month(cl.dateship), po.dateinvoice having (po.dateinvoice between '2014-01-01' , '2014-12-31') but each year have review request change year. want make dynamic, because change manually crazy in our architecture. the best of is: say 15 june 2015 . be...

javascript - Path of template in js file in Symfony/angular project -

i working on angularjs/symfony project , cant figure out how define correctly path of twig template in js. the path to: -the original js -the template -the js path assetic ... +-src/ | +-mycompany/ | +-mybundle/ | +-resources/ | +-public/ | +-js/ | +-directive/ | +-my_file.js | +-view/ | +-template/ | my_template.html.twig +-web/ | bundles/ | +-mybundle/ | +-js/ | +-my_fil.js ... my js code: return { templateurl: '?' } so, there way include path bundle asset file? (i tried @bundle/ notation, didnt work). or, when include js in html, use js of bundle , not 1 of asset? thanks that be {% javascripts filter='?uglifyjs2' '@appbundle/resources/assets/js/your-file.js' '@appbundle/resources/assets/js/your-second-file.js' '@appbundle/resources/assets/js/adm...

java - Handler returning without Activity? -

i using handler update ui after thread returns - following method gets run thread (in fragment) public void signedin(final boolean success, final string error) { handler mainhandler = new handler(getactivity().getmainlooper()); mainhandler.post(new runnable() { @override public void run() { if(success) { toast.maketext(getactivity(), "signed in!", toast.length_short).show(); } else if (!success) { toast.maketext(getactivity(), "failed!" + error, toast.length_short).show(); } } }); } this works fine, if rotate phone @ correct time, handler gets called before activity has been created, getactivity() returns null , application crashes. can't wrap method in if (getactivity() != null), otherwise won't update ui @ all. what best way approach problem? android have can use around this? thanks, kevin....

Access SAP GUI for a linux -

i have sap installed on linux , sap gui on windows. for sap setups installed on windows, had installed webdynpro , able access them gui. linux, not sure configuration has done sap gui enable access. webdynpro (abap) proprietary declarative programming language runs on abap application server (and operating system independent). typically web dynpro applications commonly accessed via web browser i.e. client not have have sap gui (the client) installed view , access them, although technically possible view web dynpro applications via gui (it embedded web view). in order view applications typically need enable set of services of internet communication framework (icf) ensure host name of server configured correctly (should operate on qualified domain name) - set in instance profile (transaction rz10). so in summary os should not influence whether can access web dynpro application or not, rather sap system settings.