Posts

How to send http request without scheme in python? -

enurl='res.iweshow.com' sr = requests.get(enurl) print(sr) when send http request using requests module in python, here traceback: raise invalidschema("no connection adapters found '%s'" % url)requests.exceptions.invalidschema: no connection adapters found if intention use http, indicated in question, answer "add http scheme in". use urlparse check if scheme absent url. in case of proxy, default scheme http see here , here

How to use “Native Wifi API” Windows API functions with ruby -

my setup: windows 7, ruby 1.9.3 i want manage wireless nic access different wireless routers, here's have tried: method 1: netsh wlan managing wlan adapter through netsh command tools. so setup wireless network in windows , exported using netsh wlan export profile name="wuhongliang" folder = "d:\" interface="wireless" key=clear which worked, can add profile , connect doing: > netsh wlan add profile ^ filename="d:\wireless-wuhongliang.xml" ^ interface="wireless" profile wuhongliang added on interface wireless. > netsh wlan connect name="wuhongliang" ^ ssid="wuhongliang" connection request completed successfully. which works , connects me wlan using exported profile. so looking @ xml profile: <?xml version="1.0" ?> <wlanprofile xmlns="http://www.microsoft.com/networking/wlan/profile/v1"> <name>wuhongliang</name> <ssidconfig> ...

firefox - Two weeks future date from calendar selenium ide -

i using selenium ide plugin , want select future date 14 days today's date. way can using calendar pop-up. have used variable store setdate+14 function, unable understand how can used date choose calender? also, how can navigate next month when current date more 16/ 17th of current month. thanks

cordova - Tap/Touch events not working on Samsung Android 4.4.4 and 5 -

i developed app cordova worked fine until android 5.0. issue app can swipe cannot tap/touch specific elements within app (actually works if tap multiple times). taps work expected such buttons. other elements images etc. doesn't work (i have images in carousel when tapped executes function) can why happening , happening on android 4.4.4 , up. my code below nova.touch.bindclick = function(selector, func) { if (nova.application.istouchable === false) { $(selector).click(function(e) { func.call(this, e); }); return; } var ismoving = false; var starttime = null; $(selector).bind(this.eventnames.touchstart, function(e) { ismoving = false; starttime = new date(); $(this).addclass("touching"); }); $(selector).bind(this.eventnames.touchmove, function(e) { ismoving = true; }); $(selector).bind(this.eventnames.touchend, function(e) { var $me = $(this); $...

html - PHP mail function doesn't complete sending of e-mail -

<?php $name = $_post['name']; $email = $_post['email']; $message = $_post['message']; $from = 'from: yoursite.com'; $to = 'contact@yoursite.com'; $subject = 'customer inquiry'; $body = "from: $name\n e-mail: $email\n message:\n $message"; if ($_post['submit']) { if (mail ($to, $subject, $body, $from)) { echo '<p>your message has been sent!</p>'; } else { echo '<p>something went wrong, go , try again!</p>'; } } ?> i've tried creating simple mail form. form on index.html page, submits separate "thank submission" page, thankyou.php , above php code embedded. code submits perfectly, never sends email. please help. there variety of reasons script appears not sending emails. it's difficult diagnose these things unless there obvious syntax error. without 1 need...

c# - JavaScript executes and works on MSVS but doesn't work when published -

i working lightswitch, , using javascript hide buttons based on current user permissions. following tutorial msdn: https://msdn.microsoft.com/en-us/library/ff852062.aspx this page /// <reference path="~/generatedartifacts/viewmodel.js" /> myapp.inicio.visualizaragenda_execute = function (screen) { window.location = "../webforms/agenda.aspx"; }; myapp.inicio.visualizarcorridaexecutadacompleta_execute = function (screen) { // write code here. window.location = "../webforms/corridaexecutadacorridacompleta.aspx"; }; myapp.inicio.coletamotoristacorridas_execute = function (screen) { window.location = "../webforms/coletamotoristacorrida.aspx"; }; myapp.inicio.created = function (screen) { //screen.getcanexecuteclientes().then(function success() { // screen.findcontentitem("showbrowseclientes").isvisible = true; //}, function error() { // screen.findcontentitem("showbrowseclientes").isvisible = false; //}) /...

Need to know how to process 1 XML file with 2 XSL files using PHP SimpleXML -

i new xsl. need process same xml file 2 xsl files using php simplexml. have tried few different approaches no luck. $xmlfile = 'media/xml_files/article.xml'; if (file_exists($xmlfile)) { $xml = simplexml_load_file($xmlfile) or die("error: cannot create object");} $xslfile = media/xsl_files/jats-html.xsl; $xsl = simplexml_load_file($xslfile); $proc = new xsltprocessor; $proc->importstylesheet($xsl); echo $proc->transformtoxml($xml); i need process xml jats-pmccit.xsl before goes through jats-html.xsl transform. can please point me in right direction? can't seem find answer online anywhere. you can try using xsltprocessor::transformtodoc() process first transformation , intermediate transformation result in domdocument object type. can pass domdocument object transformtoxml() final transformation result.