Posts

excel vba - Appending ranges based on a two dimensional conditional loop and exporting to a PDF -

i've tried looking @ other questions, doesn't seem work me. have worksheet called materialflow in have many columns , rows need columns (ones hard code) , rows (ones have word "card") in 8th column copied tab exported pdf keep getting errors. here code. i've managed copy "card" containing rows don't know how simultaneously of columns , associated headers. additionally, column qualifies row excluded, makes difficult. sub racks_list() dim sws worksheet dim rl worksheet set sws = sheets("materialflow") set rl = sheets("reports") dim slr long dim sr long dim l long dim counter range dim comb_range range dim bigrange range dim headers range dim cardcount long dim mycount long cardcount = 0 mycount = 1 each counter in worksheets("materialflow").range("h9", "h500") if counter.value = "card" cardcount = cardcount + 1 if mycount = 1 set comb_range = counter.entirerow ...

ruby on rails - SimpleForm 3 initializer for Bootstrap4 beta -

the current bootstrap 4 beta adds error class attributes directly input tag this: <div class="col-md-6 mb-3"> <label for="validationserver03">city</label> <input type="text" class="form-control is-invalid" id="validationserver03" placeholder="city" required> <div class="invalid-feedback"> please provide valid city. </div> </div> simpleform however, adds class field wrapper. there way change initializer adds error class input field instead of field wrapper?

How to exclude a folder from rsync -

i using rsync deploy git branch production server. currently, got js files stored in 2 locations: assets/js/ js/ when run rsync using --exclude js , non of both folders sync, while want assets/js/ folder synced , js/ folder inside root folder skipped. how can achieve this? you need specify pattern files , directories: using: cwrule [pattern_or_filename] cwrule,modifiers [pattern_or_filename] so have cw- js/ for more detailed info can see man page @ section include/exclude pattern rules from this link, hope helps

java - How to keep a users selection even after they close the app? Android -

so @ moment user select colour, shape , time. when app first starts there default each. want happen keep users selection 3 of these after close app while runs in background. if need me post ask away. thanks. after writing out problem was, it's not they're not being saved it's fact selections being saved not being displayed properly. i.e border or dropdown menu results it's default value instead of users selection. so values being saved(my bad) app overwrites these saves , doesn't use border or beings dropdown menu it's default value. circularimageview = (circularimageview)findviewbyid(r.id.activity_main_silver_color_button); circularimageview.setbordercolor(getresources().getcolor(r.color.unselected_border)); circularimageview = (circularimageview)findviewbyid(v.getid()); circularimageview.setbordercolor(getresources().getcolor(r.color.selected_border)); these work independent of each other when border selected, if color selected becomes ...

python - ~/virtualenvs/venv instead of ./venv -

i in team programmers. integrated virtualenvwrapper , since working on several projects. in team project, take account virtualenv located directly in project. hence, many files path directly ./venv/bin/python , , supervisor didn't want customize it. virtualenv on project located in ~/.virtualenvs . there clever idea link ./venv/bin/python ~/.virtualenvs/bin/python without changing nature of files? clear, path of virtual ~/virtualenvs/venv instead of ./venv . works if write ln -s ~/virtualenvs/venv ./venv , not clean such things. that's why wanted clean. update i have shell command , works well. #!/bin/bash cd ~ cd ./projects/work_projects/24-django/ workon venv i have management command named reboot-db-local #!/bin/bash source .mysql-context \ && mysql -u $mysql_user -p$mysql_password -e "drop database credit24h_dev;" \ && mysql -u $mysql_user -p$mysql_password -e "create database credit24h_dev charset=utf8;" \ && ...

caching - Laravel - Which cache driver to use? -

this first time dealing caching, , though looked through laravel docs , other various sites instructions of how set up, i'm still @ bit of loss 1 use , different cache drivers do. my current scenario have scheduling system can create pdfs of current week of classes. can choose date in future , make pdf of week well. frontend feature, visits site able use it. there many classes , variations of patterns classes can have, query have lot of records through. driver best out of supported cache drivers?? (apc, array, database, file, memcached & redis) brownie points i'd understanding of use , why can make best decisions future projects. each do/when best use them?? -- doesn't need answered accepted answer, i'd know. thanks! typically use cache frequent queries (when need perform particular read op write not frequently). if isn't case, fallback db. looking @ use case, sounds it's batch job run once week. so, it's infrequent task , data fre...

javascript - Detect that the Internet connection is offline? -

how detect internet connection offline in javascript? you can determine connection lost making failed xhr requests . the standard approach retry request few times. if doesn't go through, alert user check connection, , fail gracefully . sidenote: put entire application in "offline" state may lead lot of error-prone work of handling state.. wireless connections may come , go, etc. best bet may fail gracefully, preserve data, , alert user.. allowing them fix connection problem if there one, , continue using app fair amount of forgiveness. sidenote: check reliable site google connectivity, may not entirely useful trying make own request, because while google may available, own application may not be, , you're still going have handle own connection problem. trying send ping google way confirm internet connection down, if information useful you, might worth trouble. sidenote : sending ping achieved in same way make kind of two-way ajax request, ...