121 questions
2
votes
1
answer
582
views
Assembly Program for Pascal's Triangle Prints Garbled Output Beyond Row 4
I'm developing an Assembly program using the Irvine32 library to print Pascal's Triangle based on user input (ranging from 1 to 13 rows). While the program correctly displays the first few rows, ...
0
votes
1
answer
136
views
How can I both export execution plan XML and get column names in tables?
I need to get both the full text of an actual execution plan and my full table of results with column names from sqlcmd. My first requirement forces to me pass in -y 0 as documented here. However, ...
0
votes
0
answers
36
views
Output Formatting Issue in Python Code for Employee Hierarchy
I'm encountering an issue with the output formatting in my Python code related to displaying the hierarchy of employees in a company. Despite implementing the logic correctly, the output is displaying ...
-1
votes
1
answer
169
views
NewtonsoftJsonOutputFormatter Customized but it wont work
I have a custom output formatter like below:
public class WrappedJsonOutputFormatter : NewtonsoftJsonOutputFormatter
{
public ApiVersion Version { get; set; }
public ...
1
vote
1
answer
412
views
Can I redefine output formatter for one controller method in Net Core 6?
All my method in Backend API working fine and return correct JSON by the same way
Return OK(obj)
Return Unauthorized()
Return StatusCode(StatusCodes.Status500InternalServerError, obj)
But in one ...
0
votes
1
answer
58
views
How can I change the code below to produce horizontal annotations in Stanford NLP?
When I use the code java -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLP -annotators tokenize,ssplit,pos,lemma -file 1.txt -outputFormat conll -output.columns lemma to annotate this ...
0
votes
1
answer
307
views
kubectl on on Powershell gives a string representation of a custom object created from JSON
I ran into this weird issue and wonder if how to resolve it.
On my Windows machine running Powershell 5.1.19041.1682 (major.minor.build.revision), this command below gives me a proper JSON.
PS C:\...
0
votes
0
answers
539
views
Formatting MySQL output in online IDE
Test platform Used - HackerRank | MySQL/MSSQL
Recently attempted an code assessment for a job post involving SQL questions. I was able to get the correct output for the problem statement but the ...
0
votes
2
answers
1k
views
I'm trying to make a user enter 10 names and make them into a list and remove the even words in the said list
name1 = str (input("Please Enter a Name:"))
lista = []
lista.append(name1)
if name1 % 2 == 0:
lista.remove(name1)
This is the part where my code messes up it says " TypeError: not ...
1
vote
1
answer
4k
views
Specify comma as decimal separator in all outputs (SAS 9.4)
My data has '.' as decimal separator, but that's not the problem for me.
I want all outputs in SAS to use comma as decimal separator, and use dot as 3-digit separator, but I don't find a global ...
1
vote
1
answer
775
views
Add integer to a float and get the output as float in r [duplicate]
x <- 1626307200
y = 0.034
x+y
I want to add these two numbers in r and save it as a float (1626307200.034).
Both numbers are in numeric format.
Tried several ways but didn't work
1
vote
1
answer
720
views
Convert dataframe display float format to human readable for output display purpose only
I wish to display the dataframe column values in human readable format like 10, 100, 1K, 1M, 1B, etc.
So far, I could convert the scientific values (say) 1.111111e1 to numeric float format using ...
1
vote
1
answer
700
views
Is There a Way to Cause Powershell to Use a Particular Format for a Function's Output?
I wish to suggest (perhaps enforce, but I am not firm on the semantics yet) a particular format for the output of a PowerShell function.
about_Format.ps1xml (versioned for PowerShell 7.1) says this: '...
2
votes
2
answers
185
views
python split problems I need the data output to look different
s = "ez , dad , tada"
print(s.split(" , "))
prints the following:
['ez', 'dad', 'tada']
The problems is, I need the output to be with double quotes, not with single quotes, like ...
0
votes
1
answer
248
views
python Tabulate library: TypeError: zip_longest argument #1 must support iteration
I have this dictionary: {'id': 1, 'inner': {'test1': 1, 'test2': 2}} which I want to tabulate, but I get the following exception:
>>> from tabulate import tabulate
>>> d = {'id': 1, ...
0
votes
2
answers
514
views
Add an opening brace to the beginning of a list in tcl
I am trying to find the Cartesian product of two sets in tcl. My logic is ready, but I need to beautify the output and put an opening brace at the beginning of the list. I am able to append at the end ...
0
votes
0
answers
300
views
How to format the output in a for loop
Hello I have this output as below:
NixonOp 11.99 Operations
Cable Management 29.59 IT Department
Server Maintenance 30.5915 IT Department
Management Lessons 89.541 ...
-1
votes
1
answer
83
views
How to just get text BeautifulSoup
I am a first time poster. I'm making a program to tell the weather with requests and BeautifulSoup that is formatting the proper information wrong. I have
import requests
from bs4 import BeautifulSoup
...
1
vote
1
answer
81
views
How to print output of multiple txt file in tabular format with Python code?
I have tried to best fit my data set for more than 700 txt files with a single run. And I want the output parameter obtained from all files into a tabular format.I have tried in this way
def resid(...
0
votes
1
answer
455
views
Controlling output of Boost.Test source location format
Catch2 and Boost.Test provide similar features for writing unit tests.
For a certain project I have to use Boost.Test instead of Catch2.
The problem I have is that both use different format outputs.
...
0
votes
0
answers
96
views
SQL Output file contains nulls but I'm using isnull in my select statement
SQL Output file contains nulls but I'm using isnull in my select statement
Here is my code. I am still getting NULLs in my output file for columns Modifer1 and Modifier2.
Select
A.SvcProvSvcId as ...
2
votes
1
answer
450
views
C: display colored output to console not working
I am using Xcode and trying to display colored output to the console. it isn't working and I don't know why, I've looked at other stack overflow posts and tried the code that works.
help is ...
0
votes
1
answer
1k
views
difference between XmlSerializerOutputFormatter and XmlDataContractSerializerOutputFormatter
I am wondering what is the difference between these two serializers. when setting accept header = application/xml. Am using Plain DTOs as return values, Which one is preferred? Also consumer of the ...
0
votes
1
answer
427
views
Ignore any specific casing of response object in .NET core 2.2 WebAPI
In .NET core Webapi, by default, return json is in camel case and can be formatted to return title case. That is fine.Is it possible to ignore the case completely.Means, the return json name and ...
-5
votes
1
answer
132
views
String Formatting for a list
I'm making a shopping list using data from a CSV file. I've run to a roadblock around the output formatting. I'm not very familiar with java, as I'm brand new to coding. I was wondering if anyone ...
2
votes
1
answer
2k
views
Output file doesn't match Write-Host
When I Write-Host from my .ps1 file I see:
Parentfolder >> ChildFolder
When I output to a file, I see:
ParentFolder
>>
ChildFolder
I am using a simple write-host ($childgroup.name), ">...
0
votes
0
answers
79
views
Windows GNU Make breaks POSIX color codes in certain cases, but why?
I have some problem with a GNU make project on Windows 10.
I'm trying to add google unit tests in my Makefile and I started to experiment with targets like these:
utest_compile:
@echo Compile unit ...
0
votes
2
answers
72
views
recite and tip output alignment C++, output formatting
I'm writing this code for my programming class and I got everything else to work however my output formatting isn't working out for me.
#include <iostream>
#include <iomanip>
#include <...
0
votes
1
answer
78
views
My output is suppose to align on the $ like my professors. However I'm not sure how to use setw()
My output isn't aligning on $
I tried cout << left << setw(1) on all of my cout
#include <iostream>
#include <ios>
#include <iomanip>
using namespace std;
int main() {
...
2
votes
2
answers
6k
views
Write list-of-list to text file with writelines, space-separated?
I want to write a list-of-list to text file with writelines(), and using space as separators. Is there an easier way to do it than the following code?
myList = [[1, 'A1', 100, '1001', '1', '1001', '...
0
votes
2
answers
900
views
How can i add a tabulator character to my query
I wrote 3 queries:
select column1 from table_name1 where -- conditions)
||' TEXT2: '|| (select column2 from table_name2 where -- conditions)
||' TEXT3: '|| (select column3 from ...
0
votes
1
answer
14
views
The output returns in string format and not int. Eg: the function returns "1563.7383" instead of 1563.7383
def polysum(n,s):
import math
r = math.pi/n
area = ((0.25)*n*(s**2))/ math.tan(r)
per = n*s
total = area + (per**2)
return ("%.4f" % total)
The output returns in string format ...
0
votes
1
answer
165
views
How to change output format for Niftynet?
Is it possible to set output format in configuration file for Niftynet?
e.g. I would like to have my output as png.
My output is currently in .nii.gz format.
Thank you.
0
votes
0
answers
152
views
Why showpoint is limited to six significant digits in C++?
Why is it that in C++, the showpoint manipulator only has a limit of six significant figures? If anything is beyond six figures, weird things happen. Here's what got me into this question:
int main()
...
2
votes
3
answers
18k
views
Bold formatting in Python console
I have defined a list in Python code.
list = ['kumar','satheesh','rajan']
BOLD = '\033[1m'
for i, item in enumerate(list):
list[i] = BOLD + item
print (list)
But I am getting the output as ['...
2
votes
1
answer
2k
views
How to custom-format the display of numpy array column brackets, in LaTeX for Jupyter notebook?
I am studying DL on deeplearning.ai. In this course Andrew stacks training examples in columns like following.
where numpy actually print array like this.
My question is, how to customize the output ...
0
votes
0
answers
79
views
Conditional color formatting of pandas data for export to Excel [duplicate]
I have a pandas dataFrame containing classifier prediction output:
actual_label predicted_label
1 1
1 2
(The first prediction is right and second prediction is wrong). ...
1
vote
1
answer
85
views
typeError: not all arguments convereted during string formatting
I have a function as follows (I am working on python2.7):
def ip_split(ip):
rtr, mask = cidr.split('/')
ip = ipaddress.ip_address(unicode(...
-3
votes
2
answers
54
views
Output formatting of a list
Have a piece of code in python :
print (sorted([(r,len(f)) for r,d,f in os.walk(directory_path)],key=lambda x : x[1],reverse = True))
which gives output like :
[('/etc/ssl/certs', 595), ('/etc/...
1
vote
2
answers
3k
views
Formatting float value in C language
I need to print .5 as 0.5 using the printf statement in C language.
It can be done easily using the following code.
printf("%03f", myfloatvalue);
But the situation is myfloatvalue is dynamic. So i ...
0
votes
0
answers
112
views
Output formatting on OpenCV Python Face Recognition program
I am currently working on a face recognition project. My face recognition system shows recognized face ID in a white square box like below:
But I want to format the output like below:
Output is ...
12
votes
2
answers
22k
views
How to get newline on every iteration in jq
I have the following file
[
{
"id": 1,
"name": "Arthur",
"age": "21"
},
{
"id": 2,
"name": "Richard",
"age": "32"
}
]
To display login and id together, I am using the ...
0
votes
1
answer
52
views
Avoid to add namespaces into XML (java)
After make changes inside XML file I want to save my result. I'm using below code:
OutputStream outputStream = new FileOutputStream(
new File("C:\\Users\\ABC\\Desktop\\abc.xml")
);
OutputFormat ...
5
votes
2
answers
3k
views
Format [pscustomobject] instances returned by Invoke-RestMethod or ConvertFrom-Json
I am trying to create a table from a JSON file I am receiving from a RESTful API.
When I print the property of the json object I get an output like this:
PS> Write-Output JSON.Object
Object1 ...
4
votes
3
answers
670
views
Given a printf statement in C, how do I construct a char * buffer, and know its length?
I have an MPI process that I need to print to a file. The MPI system uses functional commands like MPI_File_iwrite, which accept a buffer (a char pointer, for instance) and an integer length. Then, ...
0
votes
2
answers
768
views
Function: Print border around list
I'm trying to print a border of "#" around the list provided and so far managed to get the correct length. But there's a condition where it would print a '.' on the row on the right side where 'A' ...
1
vote
1
answer
909
views
How to print 4 lists vertically next to each other, my second list has trailing newlines
I have four lists called items2 ( quantity) , items ( the codes) , newprice_list (final price) and product_list (the name of the products). I tried to print them side-by-side like this:
123213 ...
-3
votes
4
answers
2k
views
Print multidimensional array of chars
I am trying to print the below two dimensional string array in C as below:
char text[10][80] = {
"0", "Zero",
"1", "One",
"2", "Two",
"3", "Three",
"4", "Four",
};
The output ...
2
votes
2
answers
349
views
How to separate a word with white spaces into two columns in C++
I have a file contains a list of phone numbers in the following form:
Arvind 72580931
Sachin 7252890
My question is how can we display the contents in two columns?
74
votes
6
answers
125k
views
How to format the output of kubectl describe to JSON
kubectl get command has this flag -o to format the output.
Is there a similar way to format the output of the kubectl describe command?
For example:
kubectl describe -o="jsonpath={...}" pods my-rc
...