output

PHP cli script does not output anything

我的未来我决定 提交于 2019-12-03 09:59:29
So I have a php script which I execute using the following command: php -f my_script.php myArguments The script is under version control using svn. I just updated it, pasted the command to run it into a terminal, and executed it. However, there is no output. Not a failure message, not it printing anything, nothing. It looks like it never starts. Kind of like the following: me:/srv/scripts# php -f my_script.php myArguments me:/srv/scripts# Other scripts will run just fine. It is difficult for me to come up with an SSCCE, as I can't really share the code that is causing this, and I haven't been

In Gradle, how to print out a message in the console / Event Log?

和自甴很熟 提交于 2019-12-03 09:23:07
I'm trying to verify that my source and target paths are properly setup when I execute a deploy command. See the example below: (copied from: http://eppz.eu/blog/unity-android-plugin-tutorial-2/ ) android.libraryVariants.all { variant -> // Task names. String variantName = "${variant.name.capitalize()}"; // Like 'Debug' String deployTaskGroup = "plugin"; String deployTaskName = "deploy${variantName}PluginArchive"; // Like 'deployDebugPluginArchive' String dependencyTaskName = "assemble${variantName}"; // Like 'assembleDebug' // Source. String sourceAARFolder = "${buildDir.getPath()}/outputs

How to see the compiler output when running javac through an Ant task?

久未见 提交于 2019-12-03 08:37:45
问题 Is there any clearly explained and simple way to see the compiler output when running javac through an Ant task? Here is my javac Ant tag: <javac srcdir="${myproject.src}" destdir="${myproject.class}"> <!-- ... --> </javac> Here is the only error message I get: /path/to/build.xml:42: Compile failed; see the compiler error output for details. The problem is that I don't know how to see the compiler error output for details ... Few configuration elements that may help: Ant 1.6.5 Windows 7 x64

Download a file built in PHP output buffer from AJAX call

偶尔善良 提交于 2019-12-03 07:49:14
I am trying to build a CSV file in PHP, then call the PHP file from an AJAX call, which will then initiate a download of the CSV file upon success of the AJAX call. This works fine if I save a physical copy of the .csv on the server, but I would like to use php://ouput so I do not have to worry about physical files clogging up the server. Is it possible to initiate a download from returning php://output to AJAX? Here is my code: HTML/jquery: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <script type="text/javascript" language="javascript" src="jquery.js"></script> <script

Capture STDIN / STDERR / STDOUT of a process AFTER it's been started, using command line?

依然范特西╮ 提交于 2019-12-03 06:57:29
Thanks! My usercase: I started a lengthy interactive 'configure' process (say under 'screen'), and then realised I need to always answer 'no' until I see a particular keyword. Seems a waste of time to do this by hand (not to say that I can easily miss the keyword..) Thus it seems I want to pipe (a copy of) STDERR / STDOUT to a filter, and also be able to inject into the STDIN of a (console) process, AFTER it's been started, using command line? Is there a ready-made solution? The following tools seem help. To capture output, use strace -ewrite -p $PID It's not that clean (shows lines like:

Swift - Write an Array to a Text File

好久不见. 提交于 2019-12-03 06:34:46
I read into myArray (native Swift) from a file containing a few thousand lines of plain text.. myData = String.stringWithContentsOfFile(myPath, encoding: NSUTF8StringEncoding, error: nil) var myArray = myData.componentsSeparatedByString("\n") I change some of the text in myArray (no point pasting any of this code). Now I want to write the updated contents of myArray to a new file. I've tried this .. let myArray2 = myArray as NSArray myArray2.writeToFile(myPath, atomically: false) but the file content is then in the plist format. Is there any way to write an array of text strings to a file (or

Completely disable IPython output caching

天涯浪子 提交于 2019-12-03 06:02:59
问题 I'm dealing with some GB-sized numpy arrays in IPython. When I delete them, I definitely want them gone, in order to recover the memory. IPythons output cache is quite annoying there, as it keeps the objects alive even after deleting the last actively intended reference to them. I already set c.TerminalInteractiveShell.cache_size = 0 in the IPython configuration, but this only disables caching of entries to _oh , the other variables like _ , __ and so on are still created. I'm also aware of

How to show output in console when writing an RMarkdown notebook?

人盡茶涼 提交于 2019-12-03 05:50:31
I have a simple question, and I think I'm just not looking in the right place, or RStudio is not acting as expected. I'd like to know if there is an option to output the results of all my markdown code chunks to go to the plots window or the console. I'm starting to use R Notebooks to write in R Markdown. Say I type the command head(cars) into my .Rmd document. I press Ctrl + Enter, and the line is run. Up pops the first 6 lines of the cars dataframe into my script. I see that the line has been run in the console, but the output is not in the console. Why does this bug me? Sometimes my code

How can I hide skipped tasks output in Ansible

空扰寡人 提交于 2019-12-03 04:58:28
I have Ansible role, for example --- - name: Deploy app1 include: deploy-app1.yml when: 'deploy_project == "{{app1}}"' - name: Deploy app2 include: deploy-app2.yml when: 'deploy_project == "{{app2}}"' But I deploy only one app in one role call. When I deploy several apps, I call role several times. But every time there is a lot of skipped tasks output (from tasks which do not pass condition), which I do not want to see. How can I avoid it? Ansible allows you to control its output by using custom callbacks . In this case you can simply use the skippy callback which will not output anything on a

Outputting a Dataframe in R to a .csv

ⅰ亾dé卋堺 提交于 2019-12-03 04:45:48
So I'm trying to write a .csv file based on a data frame in R, but for some reason I keep getting the following error: Error in .External2(C_writetable, x, file, nrow(x), p, rnames, sep, eol, : unimplemented type 'list' in 'EncodeElement This is what traceback() is giving: 5: write.table(df, file = "df.csv", col.names = NA, sep = ",", dec = ".", qmethod = "double") 4: eval(expr, envir, enclos) 3: eval(expr, p) 2: eval.parent(Call) 1: write.csv(df, file = "df.csv") Any solution? One of your columns is of type list, so the data.frame is no longer 2-dimensional and can't be exported to a 2d csv