Questions tagged [output]

-1

votes
1

answer
22

Views

Print data in a single csv file having different lengths using python

I have two files, one is a data frame while the other one is a list. I want to print both the files side by side so that a comparison can be done. The output should be like: Col1 Col2 Col3 A B C and so one. The first file consists of 14 columns while the second file which is a list c...
Dustrokes
1

votes
2

answer
36

Views

How to format a list to rows with certain number of items?

I'm having issues on formatting a list to a formatted output that each row contains five elements but I am stuck. words = ["letter", "good", "course", "land", "car", "tea", "speaker",\ "music", "length", "apple", "cash", "floor", "dance", "rice",\ "bow", "peach", "cook", "hot", "none", "word", "happ...
allendom
0

votes
0

answer
3

Views

Python 2.7 - redirect instantly output to log file

Python test.py script is collecting data non-stop. To exit script - ctrl/c is expected. File test.log is empty while script is running. Output to test.log is created only after script is finished. It is running on windows 2008 server. How to save ouput "on the fly", so I can check test.log and see t...
Tax Max
0

votes
1

answer
25

Views

how to call the python function by passing the output of the function as input to the function

I need to write a python function call logic that calls the python function multiple times. let's say for example I have a script test.py I'm running the script like python test.py val val=sys.argv[1] def check(param, val): . . . if val == valid.text: print '{:10s}:{:10}'.format(param, all.text) val...
dubru
1

votes
1

answer
4.8k

Views

Ansible: make output from a command become a key-value item/variable for the next command

I want to use this output (from a previous command) as an array of key-values or as an inventory for the next command in the same playbook stdout: hot-01: 10.100.0.101 hot-02: 10.100.0.102 hot-03: 10.100.0.103 .... hot-32: 10.100.0.132 like this: - shell: "echo {{ item.key }} has value {{ item.value...
ady8531
1

votes
2

answer
251

Views

How to avoid log being displayed after travis_wait?

travis_wait [minutes] allows to increase the timeout after no output has been produced to the specified argument on Travis CI. However in combination with output that exceeds the 4MB limit which I overcome by adding &> /tmp/somefile || tail -n 10000 /tmp/somefile the complete log is displayed after...
Karl Richter
1

votes
2

answer
177

Views

Redirect output from running process (Visual C#)

I have a console that is running and I need to get the output. I cannot use startprocess to start the console as it is spawned separately. I do not have access to the source code, I am simply trying to redirect the output from the console while it is already running.
Matt Lynch
0

votes
0

answer
4

Views

Build action: is it ok to reference file paths within project solution? How do you select a build action for file that does not yet exist?

I have a project which dynamically creates/removes/modifies xml files within my project solution. I have set "build action" to "content" and "copy to output directory" to "copy if newer". However, I cannot select these options for files that are dynamically created after the program has started runn...
Joe Joe Joe
1

votes
3

answer
220

Views

Caching compressed data from WCF on IIS

I have a WCF service hosted on IIS. Size of responses are quite big so I require a dynamic data compression that is enabled on IIS side (Service uses wsHttpBinding). At some point I realize that I need caching of the compressed data too. Each of the requests to server is unique but return only one o...
Anton Kattsyn
1

votes
2

answer
1.7k

Views

How to split and write the output of a linux command to multiple files of a specific size?

How can I split and write the output of my command in Linux bash, to multiple (text) 5M files (number of files does not matter)?
UserYmY
1

votes
3

answer
127

Views

Returning or outputting a @tableVariable in SQL

Is it possible to return or output a @tableVariable in SQL Server? For example for the following stored procedure, how do I return the @TSV table variable? ALTER PROCEDURE MyStoredProdecure @Parameter1 INT, @Parameter2 INT AS BEGIN DECLARE @TSV TABLE ( Transition_Set_Variable_ID INT, Passed BIT ) IN...
hermann
1

votes
2

answer
935

Views

Redirecting output of an external application started with glib

I'm trying to use vala to start an external application using GLib with spawn_command_line_sync(). According to the documentation (http://valadoc.org/#!api=glib-2.0/GLib.Process.spawn_sync) you can pass a string to store the output of the external application. While this works fine when starting a s...
Ansgar
1

votes
2

answer
380

Views

Cout gives no output after declaring an std::string variable

I've written a simple program returning the hostname of the IP address passed as an argument. The program uses two functions: getaddrinfo() and getnameinfo(). I'm using Linux Mint, Netbeans IDE and the G++ compiler. The output is alright, there are no errors, but when I declare an std::string str; t...
Woy
1

votes
1

answer
15.1k

Views

I want to clear my output screen in Java using NetBeans IDE 6.9.1

My entire code can be found at the link below, I'm linking it for the sake of a shorter post http://pastebin.com/6kw8cx3b I want to clear the Output screen, I'm to make the program simulate a user pressing ctrl+L, which in NetBeans IDE 6.9.1 (which I'm using) clears my output window. However, I'm g...
Brandon Durst
1

votes
2

answer
1.4k

Views

Sanitizing/Escaping user input and output

I know I've already asked a question about sanitizing and escaping, but I have a question which didn't get answered. Okay, here it goes. If I have a PHP-script and I GET the users input and SELECT it from a mySQL database, would it matter/be any security risk, if I didn't escape < and > through the...
AnonymousJ
16

votes
4

answer
332

Views

Why setting a single bit bit-field results in consistent but unexpected behaviour?

I saw below code in this Quora post: #include struct mystruct { int enabled:1; }; int main() { struct mystruct s; s.enabled = 1; if(s.enabled == 1) printf("Is enabled\n"); // we think this to print else printf("Is disabled\n"); } It applies to both C & C++. The output of the code is unexpectedly,...
iammilind
1

votes
1

answer
4.8k

Views

Storing output from nested for loops in r

I feel like I should have found/understood the answer to this by now after frequent searches and lots of forum reading, but it's still really confusing to me. I have two nested for loops in r and need to save the output to a variable but I don't exactly know what to assign and where. The code functi...
Misc
1

votes
2

answer
78

Views

Filtering output lines that are between certain lines

I've a command that I launch from the bash shell, that outputs a whole bunch of lines. I want to see all it's output except the lines between lines "Looking for changes" and "Waiting for changes from server" So let's say the actual output is - Line 1 Line 2 Looking for changes Line 3 Line 4 Waiting...
0cd
1

votes
1

answer
163

Views

To much blanks in variable (Uncaught SyntaxError: Unexpected token ILLEGAL )

alert(name); The output should be 'pikkertonnode_1334187978' The 2nd ' is to far away from the end of the text. This is my code: var name; var namehelp; // For individually tab function refresher() { var url = 'output.php?string=' + choice[0].innerText; var split = url.split("[new]"); var serie...
Susanne92
1

votes
3

answer
100

Views

I/O in C Errors

I'm trying for hours to find the answer for this question i've got in university. I tried running this with writing a file with two lines of : hello world and it reads the file perfectly, So i cant find the answer. I would appreciate your help ! A student wrote the next function for reading a text f...
user2630165
1

votes
1

answer
3.4k

Views

How do I pass a struct field as a function output in MATLAB?

I have a function that uses structs. I would like to pass one of the fields of a struct as an output from the function. Here's an example of what I'd like to do: function MyStructure.myField = my_function(input) MyStructure.myField = input * 3; However, MATLAB doesn't allow the dot (.) notation in f...
CaptainProg
1

votes
1

answer
146

Views

JAVA - External exe locking when called from launcher

I have been trying to use a custom output stream to display the output from an executable on a Jtext area. The executable is called from a button via try { Process p = Runtime.getRuntime().exec("cgminer.exe" + " -o " + Infos.Address + ":" + Infos.Port + " -u " + Infos.User + " -p " + Infos.Password...
Nixsy
1

votes
2

answer
108

Views

Break shell output to files

I know I can output script output to a file using : /path/to/script.sh >& path/to/output.log The thing is, I'm making an infinite loop in Java that my shell will run, thus the output file will become extremely large. Is there anyway using linux commands to break the output by max file size to split...
eric.itzhak
1

votes
1

answer
94

Views

Change output path of program in bash

I just got a mac, and since I am more used to windows cmd than bash in linux and mac, I am struggling with this. I am trying to change an output path using bash to make some apps portable. In cmd, it was something like this Set APPDATA=%CD%/certainfolderforportablestuff How does this work in bash? J...
hyperum
1

votes
2

answer
1.4k

Views

CMAKE - Changing outdir macro through cmake

Reading others questions here I found that is possible to change the outdir macro inside de visual studio. I really searched but didn't found/understand how to do it. It's kind simple. I just want to change the Project property -> Configuration Properties -> General -> Output Directory. Because I kn...
Kaique Gomes
1

votes
1

answer
4.8k

Views

powershell - adding a string to output fill name is throwing an error

I have this function where I want the output file name should be same as the filename with "_new.log" added to the end. This is my script. it does not work. Function IIS-CleanUp1($file) { Get-Content $file | ? { $_ -match $control -and $_ -notmatch '^\#'} | Out-File $file + "_new.log" } IIS-CleanUp1...
user1666952
1

votes
3

answer
107

Views

odd output when using multiple classes

I am very new with java programming and I am close to finishing a very big project for me. I am trying to make an employee registry that simply relays information back. Whenever I enter the info it just returns stuff like [email protected] My classes are below and any help would be appreciated. Main: i...
Alexander Gulea
1

votes
1

answer
35

Views

Get number of files acted upon by bash commands

How would I go about getting, as output from an rm -r command on a folder, the number of files it operated on? Thanks!
loganhasson
1

votes
1

answer
38

Views

Output not displayed when assigning the return value of a function to a variable

If I have a very simple script that contains a function that just does the following: function saySomething() { Write-Output "Saying someting..." } If I call this function from the console the output is displayed. If I, however, do the following: $something = saySomething Then no output is displaye...
hax0r_n_code
1

votes
4

answer
160

Views

C - Read by basic I/O reads only “\n”

I have a problem at my C-lecture skill practice. My exercise is to read a text document (which is in the same directory like the program) char by char and write it reversed (so from the end to the beginning, char by char) at the Terminal (i have to work at Ubuntu). Unfortunately it doesn't work - "...
Philipp Doublehammer
1

votes
1

answer
5.3k

Views

html2pdf - Output('example.pdf','D'); error

I have managed to get a PDF of my HTML to display exactly as required in the browser, but can't get it to download, using $html2pdf->Output('example.pdf','D'); It produces The server encountered an internal error or misconfiguration and was unable to complete your request. All the other output comma...
MikeRG
1

votes
1

answer
3.2k

Views

BufferedWriter not writing to text file

So I'm using a BufferedWriter and would like to write some text to a text file. try { BufferedWriter b = new BufferedWriter(new FileWriter ("/home/usr/Desktop/logger/logs.txt")); b.write("hello"); } catch (Exception e1) { e1.printStackTrace(); } For some reason the text document is being created bu...
user2612619
1

votes
1

answer
3.5k

Views

How to update status and progress from a seperate thread in JavaFX

I need to be able to call a separate thread. The thread analysis a file and pull stats from that. The analyzing of the file can take up to 2 minutes and during the analysis data is printed to the logs. I would like to have a TextArea on the front end that needs to print out the analysis (as it anal...
Chrispie
1

votes
1

answer
132

Views

c++ code magically add 1 to the output

So I can't figure this out. (obviously) Basically the variable count is declared in the beginning, then only modified or incremented in one place. The expected final count is 78682. And when count is equal to that, I'll print out the string "ok". When count is incremented to 78683, the code checks...
TurtleTread
1

votes
2

answer
4.5k

Views

VHDL internal signal to change output - not working?

I have this PC module, very simple (Code at the end). I first generate some input signal port_int and at the end of the process say pc_out
Vidak
1

votes
2

answer
5.5k

Views

Print SSH output from Cisco Router to a text file

I am a newbie to Python as well as the programming world. After a bit of research for the past 2 days am now able to successfully SSH into the Cisco router and execute set of commands. However my original goal is to print the resultant output to a text file. Checked lots of posts by forum members wh...
Raj
1

votes
1

answer
104

Views

why first code give error and second does not?

This is the first code: #include #include void test(int,int); int main() { int p=23,f=24; test(&p,&f); printf("%d %d\n",p,f); return 0; } void test(int q,int g) { q=q+q; g=g+g; } This code generates TYPE MISMATCH ERROR maybe due to the fact that I have passed address of variable as argument d...
1

votes
2

answer
52

Views

How can i get the image source from the other site? [closed]

I had so many web site addresses which have images I want to have. I want to know the image source at that web site. Below is my php code. but that doesn't work. Please, Would you complete above incomplete code?
user3183995
1

votes
2

answer
360

Views

SUM and average weight PHP

I'm working on something that calculates me total weight of my class and average weight of my class. In $T I entered weight of girls in class, in Echo "SUM OF WHOLE CLASS IS : $s"; must be SUM of weight of whole class and echo "AVERAGE WEIGHT IS $p"; is average weight of class.. I dont see where...
LV_
1

votes
3

answer
476

Views

How can output be directed to specific coordinates in the linux terminal?

To be more specific, I am looking for an equivalent to the Windows API function: WriteConsoleOutputCharacter. I know this style of direct output is possible, as I have seen the behaviour used before in the time that I have used Linux. However, I am still a baby when it comes to Linux specific C li...
Caleb Waggoner

View additional questions