Posts

How to set default zoom level in php header for pdf while downloading -

i using following header download pdf header('pragma: public'); header('expires: 0'); header('cache-control: must-revalidate, post-check=0, pre-check=0'); header('cache-control: private',false); header('content-type: application/force-download'); header('content-disposition: attachment; filename="business report.pdf"'); header('content-transfer-encoding: binary'); is possible set default zoom level pdf when open pdf

Change setView dynamically according to select box in R shiny app -

i'm developing leaflet map in r shiny. in app want focus of map changed whenever lng , lat value in setview() changed. lng , lat values based on country select drop down box. use static value lng , lat in ifelse() function , app works. problem when want make things more generic: lng , lat mean of longitude , latitude subset of data chosen country, app doesn't show map anymore (from point of view calculation seems right) below simplified , workable r script: global.r: library(devtools) library(leaflet) library(htmlwidgets) library(shiny) library(shinydashboard) library(sp) library(rworldmap) library(rcurl) library(ggmap) df <- read.csv(url("https://docs.google.com/spreadsheets/d/1rrejiuxr4naftquqblppudgwvgegtbjexlpjdday2uw/pub?output=csv"), header = t, stringsasfactors = f) df$time <- as.date(df$time, "%d/%m/%y") ui.r header <- dashboardheader( title = 'shiny memery' ) body <- dashboardbody(...

IOS Xamarin can't read XML File -

so i've search everywhere. xamarin docs, goggle, here, w3. need store small data in xml file. created xml, got code lined , when go build it. ios.....can't find file. i've googled answer countless times, , same thing, make sure set content or make sure "embedded resource" i've tried both ways, can't find file access it. ios stupid? no issues in android, took 30 secs. add assets , boom there is. how ios recognize xml file(find it)? the code xdocuent doc = new xdocument.load("storedlogs.xml") < that line it throws error, through break points is. after steps through loop bind data in xml object logs a.id = x.element("id).value...... a.name......... , want basic offline storage. ios stupid? yes :p when add xml file embeddedresource , need read assembly instead of path for example: var readme = typeof(namespace.app).gettypeinfo().assembly .getmanifestresourcestrean("resourcename.xml"); u...

sql - Simplify easy LOOP queries to get rid of the LOOP -

are there ways simplify loop there no loop needed? in 1 .. 2 loop if = 1 give_bonus (president_id, 2000000); elsif = 2 give_bonus (ceo_id, 5000000); end if; end loop; you can call procedures: give_bonus (president_id, 2000000); give_bonus (ceo_id, 5000000);

android - is it possible to use web view as a html reader (offline)? -

i searching way zoom both text , picture in layout. according questions web view easy way it. after while found code webview: import android.app.activity; import android.os.bundle; import android.webkit.webview; public class webviewactivity extends activity { private webview webview; public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.webview); webview = (webview) findviewbyid(r.id.webview1); webview.getsettings().setjavascriptenabled(true); webview.loadurl("http://www.google.com"); } } i tried use file:/// instead of http:// used path: file:///sdcard/android/data/[my app package name]/about.html it seems working fine me, have serious problems. here problems: is path using works other android devices? i dont know how extract html files first run in path using. is there anyway load files assets? what source code extract files in first run? can use other formats pdf or doc...

ios - Entering Values that edit object size -

i have rectangle drawn on screen 3x3 squares inside of it. have variables in class can change number of squares if manually enter in code. want create button take view. user can enter in value square , change number of squares inside rectangle. example if user enters in 4 increase size of squares 4 squares 4 squares. wondering can more information on how implement this.

deployment - Git: auto pull from repository? -

is there way set git such listens updates remote repo , pull whenever changes? use case want deploy web app using git (so version control of deployed application) want put "central" git repo on github rather on web server (github's interface soooo nice). has gotten working? how heroku it? google-fu failing give me relevant results. git has "hooks", actions can executed after other actions. seem looking "post-receive hook". in github admin, can set post-receive url hit (with payload containing data pushed) everytime pushes repo. for it's worth, don't think auto-pull idea -- if wrong pushed branch ? i'd use tool capistrano (or equivalent) such things.