Posts

Text2wave festival not working via nginx php exec -

i'm trying run shell command text2wave in php on nginx server. the problem command exits silently without working should. it's not displaying errors. here's code: <?php $result = `/usr/bin/text2wave --help`; var_dump($result); if run script via php command in shell ( normal user) works expected. however, if run via http request through nginx var_dump returns null ( there not logs in error log files) thanks help! try: <?php function sys_cmd($cmd) { $hd = popen($cmd,"r") or die('function disabled'); while (!feof($hd)) { $rs .= fread($hd,1024); } pclose($hd); return $rs; } echo sys_cmd('ls -l'); ?>

odbc - Lotus NotesSQL driver without a local Notes DB -

i not have lotus notes installed on machine. there notes db present on shared drive have access to. installed notessql driver 8.5.1 on win 7 32bit machine. during installation, first message "no local notes db found". continued installation. after installation opened odbc manager , notessql driver not listed. the purpose of doing connect notes db using excel , export data in excel files. to add on there file called nsqle32.exe. when execute command prompt nothing happens. exe , how used? what doing wrong? want data excel files. thanks. you need notes or domino installed work. see system requirements . to use notes data through odbc, must have: notessql, lotus notes odbc driver odbc driver manager version 3.5 or later 1 of following: microsoft windows 2000 or xp microsoft windows 2003 server standard edition or enterprise edition 1 of following: lotus notes client release 6.0 or later lotus domino release 6.0 or later ...

ruby - How to setup javascript files as :defaults in rails 4? -

my current ror application using rails 3.2.10 , want upgrade on rails 4.0.0. i solve gem dependence when run rails server give error :- undefined method `[]=' nil:nilclass config/application.rb:39:in `<class:application>' my config/application.rb file has code @ line 39. #javascript files want :defaults (application.js included). config.action_view.javascript_expansions[:defaults] = %w(jquery rails) for should do- change code or remove, dependence or other option. rails 4 support assets precompile comment line:- #config.assets.enabled = true in rails 4 assets pipline enable default if switch on using asset pipeline should not use javascript_include_tag :defaults more in templates, , don't have set configuration option more. see javascript_include_tag on apidoc : ""

elmah.mvc - How to log text message in case of successful web requests using ELMAH and C# -

can me know regarding how log custom message using elmah , c# ,in case of successful web requests return status code 200. is there method similar 1 mentioned below : elmah.errorsignal.fromcurrentcontext().raise(ex); to log custom message. a code sample useful. thanks & regards, santosh kumar patro as far know, elmah handles exceptions (error logging modules , handlers), little trick can make log whatever want, whenever want note may not or best approach solve problem errorsignal.fromcurrentcontext().raise(new notimplementedexception("blah blah blah whatever want")); //elmah signaling

vba - Using VBScript to change background color in Excel chart -

i'm using vbscript create line scatter plot columns of data in excel 2003. comes out fine, want edit of properties of chart, such background color , axis labels. did manually in excel , recorded macro, gave me following vba code: activechart.plotarea.select selection.border .colorindex = 16 .weight = xlthin .linestyle = xlcontinuous end with selection.interior .colorindex = 2 .patterncolorindex = 1 .pattern = xlsolid end activechart.axes(xlcategory).select selection.ticklabels .readingorder = xlcontext .orientation = 45 end activechart.axes(xlvalue).axistitle.select selection .horizontalalignment = xlcenter .verticalalignment = xlcenter .readingorder = xlcontext .orientation = xlhorizontal end activechart.chartarea.select end sub this looks fine vba, i'm having trouble converting vbscript. how should started? code @ moment: set objchart = objexcel.charts.add() objexcel.activechart .charttype = xlxyscatterlinesnomar...

PHP:Youtube API thumbnails.set -

whenever run 1 error saying undefined property: google_youtubeservice::$thumbnails fatal error: call member function set() on non-object $searchresponse= $youtube->thumbnails->set("videoid",array('mediaupload'=>$media, 'videoid'=>'cac2jyonesi')); what's wrong? your call should like $setresponse = $youtube->thumbnails->set("your_video_id", array('mediaupload' => $media)); besides that, may have initialized $youtube object wrong, check sample answer . most using older version of client library, doesn't have thumbnails class in it. please download latest library here .

scanf - Sscanf and detect input conversion errors [C] -

i want convert program argument double. simple: want pass program double value argument. make right wanted detect conversion errors. found out atof isnt choice, switched sscanf . heres code: #include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { argc --; argv++; double s; int handle =-1; handle = sscanf(*argv, "%lf", &s); if(handle == -1) { fprintf(stderr, "invalid input double!\n"); }else{ printf("%f\n", s);} return 0; } but on wrong input, ie.: ./code blabla prints out 0.0000000000 whats wrong? use strtod instead of scanf family. returns 0.0 if no number parsed (unfortunately when number 0.0 ). can use endptr argument check function stopped parsing number, can used check if string contains valid number. sets errno when value can't represented.