Questions tagged [output]

The externally observable consequences of calling a program on some input

The output of a program is the set of externally observable consequences of running a program on the given input.

A program's output can be manifested in several forms:

  1. What is printed to and/or
  2. What is written to an external file
  3. What changes are made to the inputs, which are then used in other functions or programs
9797 questions
4
votes
2 answers

Why does the output of my Python program look this (very odd) way?

I've worked with Python for a while, but I've never really done any concurrency in it before today. I stumbled upon this blog post and decided to make a similar (but simpler) example: import os import threading import Queue class…
cgt
  • 526
  • 6
  • 18
4
votes
2 answers

Write console output to file

Really new to this, I've read the answers on here and they have helped so far but I am still a bit stuck. I have managed to create a program that displays the users starsign from DOB input. Now I want to send the results to a text file. I can create…
user1937185
  • 93
  • 2
  • 2
  • 8
4
votes
4 answers

Matlab separate output into 2 variables

I have two float variables: x = 0.5; y = 1.5; I would like to floor them: x = floor(x); y = floor(y); Can i do it in a single command? this raises an error: [x y] = floor([x y]);
dynamic
  • 46,985
  • 55
  • 154
  • 231
4
votes
4 answers

create unique output variable name based on input variable name in matlab

I am making a program in matlab for data analysis of some biomedic data I collected. The calculations are really easy yet repetitive, hence my interest in writing a small program. I have one matric (200 x 99) per patient, stored in a variable with…
user1864405
  • 41
  • 1
  • 3
4
votes
1 answer

Calculating the distance and print it out

My task is to calculate the distance between a rectangle and the 0/0 point in an coordinate system and print a particular answer. If it's nearer than 100m (the unit of the system is meters, 1 unit = 1 meter), it should print 100m, if distance <…
4
votes
4 answers

Speed of output

I am coding in C++. Let s be some string. I am asked to determine which of the following is faster: cout << "s:" + s + "s:" + s + " s:" + s + "\n"; cout << "s:" << s << "s:" << s << " s:" << s << "\n"; I ran both of them repeatedly to find…
user44322
  • 351
  • 3
  • 8
4
votes
3 answers

Condor output file updating

I'm running several simulations using Condor and have coded the program so that it outputs a progress status in the console. This is done at the end of a loop where it simply prints the current time (this can also be percentage or elapsed time). The…
Max Z.
  • 801
  • 1
  • 9
  • 25
4
votes
1 answer

How to return a resultset from StoredProcedure using MySql?

I am writing a stored procedure using MySql which returns multiple rows using select statement. My code is as below drop procedure if exists GetAccounts; DELIMITER // CREATE PROCEDURE GetAccounts() BEGIN DECLARE rowcount int; SET @resultset =…
Gendaful
  • 5,522
  • 11
  • 57
  • 76
4
votes
1 answer

copying output from one R session to another R session

I am having 2 R sessions now working on one vector in each of the session with slight difference inside, say: session1: temp1 <- c(1:10) session2: temp2 <- c(2:11) I want to copy the temp1 from session1 into session2 and do a %in%, but I don't want…
lokheart
  • 23,743
  • 39
  • 98
  • 169
3
votes
1 answer

C++ std::printf formatting breaks with cyrillic alphabet

I've noticed somewhat of an unexpected behavior when using std::printf() with max field length specifiers like %10ls in conjuction with wchar_t (for cyrillic text). Code example I use: void printHeader() { printDelim(); …
Danny
  • 33
  • 5
3
votes
0 answers

Migrate a solution from VS2015 to VS2022

I am attempting to migrate a project from Visual Studio 2015 on Windows 10, to Visual Studio 2022 on Windows 11. I experienced several errors mostly to do with file paths but one error has me stumped -- Upon attempting to build the solution, I get…
3
votes
0 answers

how assign a number to output command in ruby

I want to list the networks from a airodump command and then assign a number for each network.Output of airodump is like this CH 1 ][ Elapsed: 24 s ][ 2022-06-22 11:12 BSSID PWR RXQ Beacons #Data, #/s CH MB ENC CIPHER AUTH…
Damien
  • 31
  • 3
3
votes
2 answers

How to flush fmt output in debug mode?

I'm experimenting with fmt and I do get output from code below #include int main() { fmt::print(fg(fmt::color::crimson) | fmt::emphasis::bold, "Hello, {}!\n", "world"); fmt::print(fg(fmt::color::floral_white) |…
KcFnMi
  • 5,516
  • 10
  • 62
  • 136
3
votes
0 answers

NiFi: "pipeline" or Input/Output ports between PG in different scopes?

We have a processor, lets say in "NiFi Flow">>"A">>"B">>"C" and we want to provide its output (lets say using an Output Port) to a (let say using an Input Port) which is in "NiFi Flow">>"1">>"2">>"3". How can we connect those Input/Output ports on…
3
votes
1 answer

Terraform - How to output input variable?

I have a custom terraform module which create an AWS EC2 instance, so it's relying on the aws provider. This terraform custom module is used as a base to describes the instance i want to create, but I also need some other information that will be…
Hoguss
  • 35
  • 1
  • 5