Posts

c# - win10 UWP OnScreen Keyboard is not hiding -

i have created win 10 uwp application . in have popup light dismissal enabled. <popup x:name="addwebpagepopup" islightdismissenabled="true" isopen="{binding ispopupopen}" opened="addwebpagepopup_opened"> <textbox x:name="webpagenametextbox" text="{binding webpageurl, mode=twoway, updatesourcetrigger=propertychanged}" style="{staticresource texboxstyle}" keydown="webpagenametextbox_keydown" />` <button content="cancel" command="{binding cancelcommand}" horizontalcontentalignment="center"/> </popup> in addwebpagepopup_opened setting focus webpagenametextbox . in cancelcommand i setting ispopupopen false issue onscreenkeyboard in tablet mode. keyboard showing when popup opened , closing when cancel button clicked. issue there when touch outside popup. popup dismissed keyboard still visible. have idea why happen? when presses ...

c# - A generic error occurred in GDI+, Getting this exception in my code when i try to save optimized image on server -

here code below using redraw , save image. bitmap bitmap = new bitmap(httpcontext.current.server.mappath( filepath + path.getfilename(filename))); int newwidth = 100; int newheight = 100; int iwidth = bitmap.width; int iheight = bitmap.height; if (iwidth <= 100) newwidth = iwidth; if (iheight <= 100) newheight = iheight; bitmap.dispose(); // once got information, we'll process it. // create image object using original width , height. // define pixel format (for rich rgb color). system.drawing.image objoptimage = new system.drawing.bitmap(newwidth, newheight, system.drawing.imaging.pixelformat.format16bpprgb555); // original image. using (system.drawing.image objimg = system.drawing.image.fromfile(httpcontext.current.server.mappath(filepath + filename))) { // re-draw image using newly obtained pixel format. using (system.drawing.graphics ographic = system.drawing.graphics.fromimage(objoptimage)) { var _1 = ographic; ...

angularjs - How to scrape text from span with ng-if attribute using python? -

i trying scrape data paytm web page using python beautifulsoup https://paytm.com/shop/p/masha-mauve-satin-nighty-wnighw000nt14_45bbppfr?src=search-grid&tracker=autosuggest%7cundefined%7cmasha%20nighty%7cgrid%7csearch%7c1 . able scrap fields using direct class names fields using angularjs attributes , don't have idea how that. i know how scrape data of span defined class:- mrp = link_soup.find_all("span" , class_="price")[0].string.strip() but don't know how same mentioned code. code want scrape data:- <span ng-if="!product.product.isonlycarcategory">buy rs 329</span> i want scrape number 329 span. whole code:- <div itemprop="offers" itemscope="itemscope" itemtype="https://schema.org/offer" class="buy-bar"> <button class="md-raised fl md-button md-default-theme" ng-transclude="" type="button" ng-show="!product.produc...

c - Android AOSP linux service standard output -

im developing own watchdog linux service (init.rc) android image im cooking. these linux services use log libraries log.h show output of such services. have tried track these libraries in order find log output dumped. i havent found neither in android logcat nor /proc/kmsg or dmesg this log.h library linux services started in init.rc: #ifndef _init_log_h_ #define _init_log_h_ #include <cutils/klog.h> #define error(x...) klog_error("init", x) #define notice(x...) klog_notice("init", x) #define info(x...) klog_info("init", x) #define log_uevents 0 /* log uevent messages if 1. verbose */ #endif and example of using such library info("starting watchdogd\n"); to display log service in init.rc can start service /system/bin/logwrapper example service xupnpdx /system/bin/logwrapper /system/bin/xupnpdservice

kohana - How do I pass parameters after setting the content of a template? -

my problem lose parameters (i.e. can't use id variable) when inside if condition because occurs after press submit button in view (i.e. after set post array) public function action_resetpassword() { $this->template->content = view::factory('user/password/reset') ->bind('message', $message) ->bind('errors', $errors); if (http_request::post == $this->request->method()) { $id = $this->request->param('id'); if understand correctly wish pass parameters view set in if. can done 'binding' these variables view (i.e. pass reference) public function action_resetpassword() { $this->template->content = view::factory('user/password/reset') ->bind('message', $message) ->bind('errors', $errors) ->bind('id', $id); // empty variable defined here ... if (http_request::post == $this->request->m...

javascript - Error with require node.js SyntaxError: Unexpected identifier -

i new node.js. created file named events_scraper.js , put code in file: var request = require('request'); var cheerio = require('cheerio'); var fs = require('fs'); var regions = ['campania','molise','puglia','basilicata','sicilia','sardegna']; var domain = 'http://www.eventiesagre.it'; var basepath = 'http://www.eventiesagre.it/cerca/eventi/sagre/maggio/{{region}}/prov/cit/intit/rilib'; var result = 'path_to_folder{{region}}.json'; //start of scraper function getdata(path, region) { request(path, function (error, response, html) { if (!error && response.statuscode == 200) { var $ = cheerio.load(html); // research information each events var evt = { categoria: $('.category').text().trim().replace( /\s\s+/g, ' '), titolo: $('.summary').text(), sottotitolo: $('.titolo...

implementation of custom validation on click of Save & Submit Button in angularjs -

i new angularjs , need develop single page application. have requirement of implementation of angular validation. i have 10 fields(input, select , listbox) on page , 2 buttons(save , submit). when click on save 6 fields(just example) should have valid values , when click on submit button- 8 fields should checked. but problem is. if used form tag on page how implement these validation. your appreciated. write code in controller obj.haserrorwithsubmit = function (form, field, validation) { if (validation) { return ($scope.submitted && form[field].$error[validation]); } return (form[field].$dirty && form[field].$invalid) || ($scope.submitted && form[field].$invalid); }; obj.haserrorwithsave = function (form, field, validation) { if (validation) { return ($scope.save && form[field].$error[validation]); } return (form[field].$dirty && form[field].$invalid) || ($scope.submitted ``&...