Codeception - Acceptance tests work but Functional test don't

北战南征 提交于 2019-12-08 19:08:48
问题 I am running the latest version of Codeception on a WAMP platform - My acceptance is very basic however works fine (see below): $I = new WebGuy($scenario); $I->wantTo('Log in to the website'); $I->amOnPage('/auth/login'); $I->fillField('identity',''); $I->fillField('password','password'); $I->click('Login'); In a nutshell - it checks the page is 'auth/login' fills out 2 form fields and clicks the login button. This works without any problems. Here is my identical functional

Visual C++ Command Line Compiler (CL.EXE) Redirect OBJ Files

前提是你 提交于 2019-12-08 18:27:16
问题 The compiler (CL.EXE) can take multiple source files, but likes to generate all the OBJ files in the directory that it is invoked. I couldn't find the compiler flag to set an output directory but I did find one for an individual OBJ, but it can't take multiple sources. Without having to specify each file to redirect the output and having lots of targets for NMAKE, is there an easy way to do it through CL? 回答1: It turns out the /Fo option actually works, but the directory you specify must end

Java SDK Manager Crashes with “flashplayerplugin” in the command line output

Deadly 提交于 2019-12-08 18:22:53
问题 I read few topics about sdk manger and java issues but my problem doesn't correspond to any. When i'm launching SDK manager.exe I get as output : flashplayerplugin As I was thinking that it was a Java issue I've launched sdk\tools\libs\find_java.exe (the .bat returns a blank line) I get as output : flashplayerpluginC:\Program Files\Java\jdk1.7.0_17\bin\java.exe I really don't understand why this flashplayerplugin is coming in the output and crashing the program. 回答1: I had the same issue. My

How can I get the CPU usage of a process with “tasklist” in Windows

此生再无相见时 提交于 2019-12-08 18:18:42
问题 I am writing a program in Java to periodically display the CPU and memory usage of a given process ID. My implementation invokes tasklist. It is pretty straightforward to get the memory usage by the following command: tasklist /fi "memusage ge 0" /fi "pid eq 2076" /v This will return the memory usage of process id 2076 and i can use this for my task. By invoking the following command, I can extract the CPU Time. tasklist /fi "pid eq 2076" /fi "CPUTIME ge 00:00:00" /v My question is, how would

postgresql - start on mac - `pg_ctl` not working

和自甴很熟 提交于 2019-12-08 17:45:21
问题 I want to use the pre-installed postgresql on my local machine (mac os 10.7.5), when I run which psql I find it (in /usr/bin/psql ), but then running pg_ctl -D /usr/bin/psql -l /usr/bin/psql/server.log start results in: -bash: pg_ctl: command not found How can I start/use my postgresql database? do I need to install it (with say Homebrew) or can I use the pre-installed one on my mac? I also tried using the initdb command ( initdb /usr/bin/psql -E utf8 ) and also go tthe same message: -bash:

Pass MySQL variables to script from command line

蹲街弑〆低调 提交于 2019-12-08 17:36:07
问题 I have a MySQL update script I'd like to run from the command line, but I want to be able to pass a stage domain variable to the script. I know this won't work, but it's the best way I can describe what I'm trying to do: $ -uroot -hlocalhost mydatabase --execute "SET @domain = '' " < ./sql/update_domain.sql Inside the script, I'm using the @domain variable, to update some configuration variables in a config table, using commands like this: UPDATE my_cfg SET value = @domain WHERE

How to unzip into specific directory without recreate all the path with bash script

醉酒当歌 提交于 2019-12-08 16:29:28
问题 In my ios application, I need to unzip an archive that is placed into /var/mobile/Library/Preferences/xxx into, for example, /var/mobile/Library/Preferences/tmp. My issue is that when I launch this: unzip /var/mobile/Library/Preferences/xxx/ -d /var/mobile/Library/Preferences/tmp/ in the tmp folder, there is all the archive path: /var/mobile/Library/Preferences/tmp/var/mobile/Library/Preferences/xxx/archive/... How could I do for only have /var/mobile/Library/Preferences/tmp

Gulp command opens gulp.js in notepad instead of running it

雨燕双飞 提交于 2019-12-08 16:17:04
问题 I installed it correctly I think. My package.json { "name": "my-project", "version": "0.1.0", "devDependencies": { "gulp": "^3.8.11", "gulp-concat": "^2.5.2" } } my gulp.js var gulp = require('gulp'); var concat = require('gulp-concat'); gulp.task('scripts', function() { return gulp.src('js/*.js') .pipe(concat('main.js')) .pipe(gulp.dest('build/js')); }); gulp.task('default', ['scripts']); my folder are as follow : ROOT/package.json ROOT/gulp.js ROOT/node-modules/ <-- my modules are here ROOT