Posts

node.js - cordova is not adding android platform -

i using windows 10. have sucessfully installed android studio , java. using latest android studio version 2.3.3. cordova version 7.0.1 nodejs version 7.7.0 npm version 4.1.2 using android api level 25 when using cordova platform add android shows error error: failed fetch platform cordova-android@~6.2.2 either connection problem, or platform spec incorrect. check connection , platform name/version/url. error: cmd: command failed exit code enoent how add android platform . please solve issue. my enviromental variable path missing "c:\windows\system32". after adding path. have sucessfully running. , have installed git on system.

javascript - Replacing all "E" characters in file to "Z" and all "Z" characters to "E" -

i want replace "e" characters in file "z" , "z" characters "e", problem once replace 1 of them, cant replace other, because characters e/z you use function , object replacments. var string = 'eaebzczdz'; string = string.replace(/[ez]/g, s => ({ e: 'z', z: 'e' }[s])); console.log(string);

email - Grab Warning and error messages and cast them in a variable with PHP -

i've got cron job , when run in terminal displays warning: warning: mysql_query() expects parameter 2 resource, boolean given in /dbcon.php on line 116. i grab above text , put them variable can send email. what have done this: //debugging ... if ($this->dbh === false) { //get warning/error type..... $error = error_reporting(e_error | e_warning); //get script name... $file = $_server['php_self']; //get current file name... $class = __file__; //send email if connect() return false... $this->process($error, $file, $class); } however, $error sent email code. i've tried error_log() couldn't make work. had @ other sof 'similar' posts did not have success.

android - Java URIMatcher using query parameters -

i using urimatcher parse pattern scheme. trying use query parameters this myscheme://search/item?id=3&is_visible=true but can't parse id , is_visible value. urimatcher urimatcher = new urimatcher(urimatcher.no_match); urimatcher.adduri("search", "item", 123); and data use uri.getqueryparameter("id"); can value query parameter?

java - Eclipse error : cannot be resolved to a type -

so doing exercise simulates car instruments. there 3 classes in total : fuelgauge , odometer , carinstrumentsimulator (the 1 main method). 2 first ones each have constructor have defined. whenever type in main : public static void main(string[] args) { carinstrumentsimulator carinstrumentsimulator = new carinstrumentsimulator(); fuelgauge fuel = carinstrumentsimulator.new fuelgauge(); odometer odometer = carinstrumentsimulator.new odometer(0, fuel); i carinstrumentsimulator.fuelgauge cannot resolved type error in eclipse(and same odometer), got line of code correction detailed in website got exercise ( https://www.leveluplunch.com/java/exercises/car-instrument-simulator/ ) new java , coding in general, wondering : 1) syntax mean: fuelgauge fuel = carinstrumentsimulator.new fuelgauge(); 2) why there problem syntax? thanks in advance ^^ i think that's typo in source . try instead: fuelgauge fuel = new fuelgauge(); odometer odometer = new o...

html - Woocommerce Pre-checkout Form -

i looking setup website running on woocommerce. need have multi-question form needs answered before each product can added cart. if user fails give “correct” answers, product not added. , if registered need answer once each product. apparently gravity forms might option not see documentation me this, can recommend anything? thanks :)

javascript - Canvas drawing takes a lot of time on Safari but not on Chrome or FF -

Image
i making kaleidoscope on website. take image (either via drag & drop or default image on load) , copy 10 times (one each slice of kaleidoscope). on mouse move, rotation , scale of slices adjusted achieve desired effect. on google chrome , firefox, works seamlessly, without lag. however, on safari website unusable slow. missing something? here jsfiddle showing problem. please note tried replacing settimeout(update, 1000 / 60) requestanimationframe, without improvements. jsfiddle: link $(document).ready(function () { //script kaleidoscope base var dragdrop, kaleidoscope, c, dragger, gui, i, image, kaleidoscope, len, onchange, onmousemoved, options, ref, tr, tx, ty, update, bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; kaleidoscope = (function() { kaleidoscope.prototype.half_pi = math.pi / 2; kaleidoscope.prototype.two_pi = math.pi * 2; var optimal_radius = window.innerheight; if (...