Posts

jquery - Android Disable zoom button inside a webview -

i'm using inappbrowser cordova plugin make webview website. it's working properly, 2 zoom buttons appears when start scroll webpage. how hide ? i'm using open webview: var ref = window.open("http://m.estadao.com.br", "_self", "location=no", "closebuttoncaption=return", "enableviewportscale=no"); zoom tks! you can pass zoom attribute value no option when using inappbrowser. var ref = window.open("http://m.estadao.com.br", "_self", "location=no","zoom=no", "closebuttoncaption=return", "enableviewportscale=no"); source - cordova inappbrowser github documentation .

python - Initial (default) value on Django ChoiceFilter select box -

i trying set initial, default value on select box created djangofilter choicefilter (more info here ). code seems pretty simple: class myfilter(filterset): choices = ( ('', 'any'), ('closed', 'closed'), ('new', 'new'), ) my_select_box = choicefilter(choices=choices, initial='new') class meta: model = mymodel fields = ('my_select_box') def __init__(self, *args, **kwargs): super(myfilter, self).__init__(*args, **kwargs) self.form.helper = formhelper() self.form.helper.form_method = 'get' self.form.helper.add_input(submit('submit', 'search')) self.form.helper.form_class = 'form-inline' self.form.helper.field_class = 'm-r m-b-sm' self.form.helper.label_class = 'm-r' on views.py: class myview(baselistview): content_template = "template.html...

c# - Xunit test IHttpActionResult web api 2 function for custom message -

i refactor web api functions (to take advantage of web api 2 changes) can't figure out how refactor xunit tests testing custom exception messages. i refactor this: [route("resetpassword"), httppost] public httpresponsemessage resetpassword([frombody] resetpasswordrequest request) { try { var resetpermission = _userpasswordresetrequestrepository.getbytoken(request.token); if (resetpermission.expires < datetimeoffset.now) throw new exception("token expired"); _userpasswordrepository.setpassword(resetpermission.userid, request.password); return request.createresponse(httpstatuscode.ok, "request received"); } catch (exception ex) { return request.createresponse(httpstatuscode.internalservererror, ex.message); } } to (return type changed ihttpactionresult, , return statements changed): [route("resetpassword"), httppost] public ihttpactionresult resetpassword([frombody] resetpasswordrequest re...

oracle11g - Cannot create Oracle user with specific password -

in oracle tried query create user act_app identified password profile app_profile default tablespace ts_module_d temporary tablespace temp; after sending query , got these 2 errors. password verification specified password failed password should contain @ least 1 digit, 1 character , 1 punctuation so modified query to create user act_app identified !234qwer profile app_profile default tablespace ts_module_d temporary tablespace temp; but got error missing or invalid option from manual: passwords must follow rules described in section " database object naming rules " !234qwer not valid object name because of leading ! therefor needs enclosed in double quotes: create user act_app identified "!234qwer" profile app_profile default tablespace ts_module_d temporary tablespace temp;

amazon s3 - Easiest way to persist Cassandra data to S3 using Spark -

i trying figure out how best store , retrieve data, s3 cassandra, using spark: have log data store in cassandra. run spark using dse perform analysis of data, , works beautifully. log data grows daily, , need 2 weeks worth in cassandra @ given time. still need store older logs somewhere @ least 6 months, , after research, s3 glaciar looks promising solution. i'd use spark, run daily job finds logs day 15, deletes them cassandra, , sends them s3. problem this: can't seem settle on right format save cassandra rows file, such can 1 day potentially load file spark, , run analysis, if have to. want run analysis in spark 1 day, not persist data cassandra. json seems obvious solution, there other format not considering? should use spark sql? advice appreciated before commit 1 format or another. apache spark designed kind of use case. storage format columnar databases. provides column compression , indexing. it becoming de facto standard. many big data platforms adoptin...

javascript - Reveal.js. How to temporarily disable the reveal property so that I can add other thing for example like telestration on top of the window -

i created canvas on top of reveal , have realized basic drawing functionality on canvas in test code. however, when show canvas , drawing stuff touch screen, captures drawing function , swiping sections @ same time. are there default settings can change temporarily disable swiping? thanks thinking or answering questions. it turns out there no switch function in reveal.js can turn slide function temporarily off or not. however, implement drawing functionality, there function called d3.event.stoppropagation(); or event.stoppropagation(); which can stop swipe or dragging action on canvas/d3 penetrating reveal.js swipe event.

html - Horizontal and vertical center a fixed width/height element in svg -

i have following html code: <div class="youtube-preview" style="background-color: #333; position: relative; width: 420px; height:316px"> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="80" height="55" style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);"> <rect width="100%" height="100%" rx="20" ry="0" fill="#fff"/> </svg> </div> this produces div has smaller box inside centered both vertically , horizontally, exact effect want. however, want convert svg. i've spent last 2 days looking a way center element (without scaling) in fluid dimensioned svg , couldn't find anything . is possible? seems pretty basic... notes: the "black box" can have width , height , ratio can change. the inner box has fixed dimensions , should not sc...