13,876 questions
-6
votes
1
answer
92
views
Formatting the first symbol of a string to be upper case - a private method or formatting on the go?
In a class that has a bunch of functions, should I be making a separate private method specifically for formatting or should I just be formatting in every function that requires a string to be ...
0
votes
1
answer
106
views
Why is my exported Google sheets adding trailing zero to character when read by read_excel in R?
I have a data sheet that I am entering in Google Sheets and importing into R as an .xslx file. One of the columns in the datasheet is a character variable representing the specimen numbers of each ...
-2
votes
0
answers
29
views
TOC (Table of Contents) dot leaders and page numbers not aligning properly [closed]
[https://prnt.sc/-yrGCth-33oS]
Hi everyone, I’m having a persistent issue with Word’s Table of Contents formatting and I can’t fix it through styles or tab stops.
In my TOC, the dot leaders stop at 14....
2
votes
1
answer
55
views
PyCharm autoformatter aggressively wraps SQL keywords inside Python triple-quoted strings
I’m writing SQL inside Python using triple-quoted strings, like this:
schema = """
CREATE TABLE IF NOT EXISTS peers (
id INTEGER PRIMARY KEY AUTOINCREMENT,
host TEXT ...
1
vote
1
answer
189
views
Format() Entire Strings (Rather Than Characters)
Background
VBA has a Format() function which converts any value to its textual representation. This is useful for numbers and Dates and times, but it can also be used on Strings.
Debug.Print Format(&...
0
votes
0
answers
48
views
in SQLFluff, How can I configure newlines with operators to be indented?
SQLFluff has a rule for choosing either of
SELECT
a +
b
FROM
or
SELECT
a
+ b
FROM
The docs give the examples exactly those two ways. But, to my eye those are both clearly wrong! The problem ...
0
votes
0
answers
15
views
XDCAM formatting SDK
I am currently developing an application that manages multiple drives
and among them would be an XDCAM drive media.
This application main function is to format the drives.
For other drives I am using ...
0
votes
0
answers
65
views
links in HTML text in jspdf
I'm using jspdf to render text that I get from a text editor (which means the text has HTML tags and styles and classes), i'm using the method .html
when the note is basic text and it's working fine, ...
0
votes
1
answer
93
views
Markdown Table Displays Correctly in Console but Misaligned in Mezon
I am working on a C# application that generates a Markdown table to summarize project timesheet data. I want to send it to a Discord like platform called Mezon. The table displays correctly (with ...
0
votes
1
answer
60
views
How do I change the axis in excel from mmm-yy to qq-yy? [duplicate]
I want to change the format of an axis from mmm-yy to qq-yy. Example, I want "Dec-22" to be "Q4-22". The dates are NOT in the data, so I can't change the date format in the data ...
0
votes
2
answers
61
views
How do I make the image in these divs align to the bottom of the container
enter image description here
I want the image below the text to be aligned to the bottom instead of directly under it, both containers are the exact same with formatting.
they are in this container :
....
0
votes
1
answer
70
views
In CSS how to left-align the marker of a list item in an <ol> at .375", the text at .75", and the second (wrap-around) line of the list item at 0.0"?
How do you format an Ordered list so that each list marker (a., b.,) begins at .375in, and the list item text begins at .75 inches.
the second line of the list item (wrap-around text) should begin to ...
1
vote
1
answer
107
views
Formatting a word table created in excel using VBA
I have a table like this excel table and I want to create a Word Table to look like this
I am a novice user of VBA so this is genuinely killing me because I can't figure out how to make this happen.
...
0
votes
0
answers
80
views
How to format brace for array element into new line?
I have the following .clang-format:
---
BasedOnStyle: WebKit
BreakBeforeBraces: Attach
BreakConstructorInitializers: BeforeColon
ColumnLimit: 0
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
...
1
vote
1
answer
284
views
handle dbt variables while using sqlfluff
I'm using VS Code on macOS. I installed sqlfluff locally using pip. I also installed it via the extensions UI.
I am trying to format my code manually via the UI. When I select my code, do a left click ...
0
votes
0
answers
69
views
How to make PEP8 formatter vscode extension to allow long lines?
How to make PEP8 formatter vscode extension to allow long lines for python? Currently the formatting enforce too short lines.
Furthermore, I really like the auto-formatting in pycharm. Is there a way ...
0
votes
0
answers
109
views
VS Code does not correctly indent closing parenthesis in Go import() or func(){} statement
I'm using VS Code on Nobara Linux (a Fedora-based distro) and working with the Go programming language.
When I type the following and press Enter after import(: import(⏎)
The result I get is:
import(
)...
1
vote
1
answer
59
views
Can I tell if the previous line on a text console wrapped around?
In writing a C# console app's log output, I am sometimes overwriting the previous line for aesthetic purposes. I'm currently doing this by using the command:
Console.SetCursorPosition(0, Console....
1
vote
1
answer
159
views
Is there a way to partially remove minted highlighting in LaTex?
I am using LaTeX for writing a thesis, including the package minted to highlight code. In my case, it is Razor code, which means a mixture of html and C#.
The following code is an example for my ...
2
votes
0
answers
85
views
Is there a way to run Eclipse clean up without using the GUI, aka in headless mode?
I'm looking for a way to apply Eclipse Java cleanup rules (not just code formatting) to a set of .java source files from the command line. Specifically, I want to replicate the effect of Eclipse's ...
0
votes
2
answers
188
views
Can I create a new string at compile time and use at runtime?
I am writing a log function that takes a format string and a variable number of arguments and captures std::source_location. This is not straightforward, so I tried the FormatWithLocation solution ...
1
vote
0
answers
120
views
How do I format all files in a powershell project in vscode using PSScriptAnalyzer?
Currently i use a tasks.json file with
{
"version": "2.0.0",
"tasks": [
{
"label": "Format PowerShell Scripts",
...
0
votes
0
answers
62
views
how can I control the width of the "total" column in a gt table on a Quarto HTML page
In a gt table like this:
mtcars |> group_by(cyl) |>
select(cyl, mpg, disp, hp, wt) |>
gt() |>
grand_summary_rows(
columns = where(is.numeric),
fns = list(
"...
1
vote
0
answers
43
views
Displaying a message while formatting a thumb drive
I've been struggling with this code which displays a message while formatting a thumb drive.
The code has been cobbled together using various snippets from StackOverflow.
While it does what its ...
1
vote
0
answers
101
views
Format Alpine.js code in templ in Visual Studio Code
I am using AlpineJS with Templ and golang in Visual Studio Code. How can I get format document (Ctrl+Shift+i) to work for the x-data, x-init, etc attributes to work in Visual Studio Code?
I currently ...
-1
votes
1
answer
108
views
Conversion failed when converting the nvarchar value **** to data type int in synapse
I'm trying to figure out this error:
Conversion failed when converting the nvarchar value **** to data type int
This is happening in Synapse but I cannot understand why it wants to convert it to INT ...
0
votes
2
answers
119
views
Conditional formatting custom formula that can compare a string referenced on another sheet
I am trying to indirectly reference another sheet within my Google sheets document in order to compare a string and color the cell accordingly if the text matches. Let's say that Sheet 1 is a list of ...
1
vote
1
answer
139
views
Prettier. Right new line transition for closing html tag
Please help me to configure prettier for correct new line transition of closing tag for all cases.
Prettier config:
{
"bracketSameLine": true,
"singleAttributePerLine": true,
...
2
votes
1
answer
62
views
How should I take a matrix from input?
As we know input makes the inputs to string. How can I take matrix like this ([[1,2],[3,4]]) from input() by user and have it like a normal 2D list to do some thing on it.
It should be like that
data =...
3
votes
0
answers
123
views
Visual Studio Code - format indentation of long parameter lists on enter
I've been using Visual Studio Code for C++ development. I ran into an annoyance with long parameter lists, both in declarations / definitions and calls.
Visual Studio does this:
foo ...
0
votes
1
answer
58
views
How to highlight multiple cells that are blank AND have a table with column names that give the location of the column that is blank
I have an excel sheet with over 250 points and multiple columns - I am trying to automate the file so certain columns (not all columns but few) with blank cells get highlighted yellow and also have a ...
0
votes
0
answers
26
views
Visual studio templates angle brackets indentation
how do I get visual studio to add indentation so that this
using TExample = MyClassA<
MyClassB<
MyClassC,
MyClassD>,
MyClassE>;
is formatted by VS to
using TExample = ...
0
votes
0
answers
118
views
Data Extraction from .txt file, formatting nightmare
I am writing code to extra data from a text file, the .txt file contains repeating sections in a 28x99(max) grid, the column size changes slightly depending on the data in the grid. For example below ...
2
votes
0
answers
97
views
R ggplot2 label with math expression coming from a function variable [closed]
I'm trying to create a function that plots an image based on a given data and label the image according to an input variable (which currently I have as a string). I would like to make the labels ...
1
vote
0
answers
90
views
Maintaining cursor position after formatting user input in `TextField`
ParseableFormat is built-in way of handling formatting during input in TextFields but it provides no visual live feedback before submitting.
If I try to format user input .onChange I face another ...
0
votes
1
answer
42
views
How can you apply auto format to method calls in variable declarations in Visual Studio?
My auto format rules are set to add a space before and after parens in method calls, but they do not apply if the method call is in the same line as a declaration.
I've gone through the formatting ...
0
votes
0
answers
300
views
How can I force Allman style formatting across all languages in Visual Studio Code?
I'm coming from Sublime text as my code editor for 10+ years to Visual Studio Code. One of the main things I can't seem to get customized is how it handles curly braces in css. Javascript, php, etc ...
0
votes
0
answers
43
views
In ArcGIS Pro, how can I use Arcade to shift a label?
I'm working on a project in ArcGIS Pro that involves labeling parks. I have set the parks to display at a certain scale (1:10,000) that works for the majority of parks, but it doesn't work for a few ...
1
vote
1
answer
116
views
formatting single expression methods when saving a file
single expression methods
public void Method()
{
Expression;
}
need to format in
Method() => Expression;
0
votes
0
answers
19
views
How to ensure the correct formatting of progress bars while downloading using boto3 and tqdm?
I am using the following function to download files from S3 using boto3 and tqdm:
def download_data(*, folder_path, Bucket, Prefix):
"""
Download the data into a folder from S3 ...
2
votes
1
answer
145
views
Where can I find the list of Format Symbols (for dates and times) that are supported in R?
Is there a list of Format Symbols (like %F or %A) and or definitions for such symbols that can be accessed inside R?
Background
When searching for a way to transform characters to dates in R I came ...
0
votes
4
answers
124
views
Create string based on array values
I am trying to create a tree structure like the tree command.
To keep track of the "heirarchy", I have an array like ("true" "true" "false") or ("true&...
2
votes
1
answer
72
views
Add count in variables label in gt_summary
I'm using gt_summary for my project, and so far I include the missing values as a separate row for each variable, through the missing arg of tbl_summary.
However, I am trying to add in the variable ...
2
votes
1
answer
98
views
Handling Semicolons in CSV to Prevent Splitting Across Cells in Go
I am generating a CSV file in a Go HTTP handler and sending it as a response. Some of my text fields contain semicolons (;), which causes issues when opening the file in applications like Excel. The ...
0
votes
0
answers
33
views
How to automatically wrap markdown paragraphs on save in VS Code [duplicate]
As a bit of a code neat-freak, I find myself formatting my README.mds and other various markdown files too much. Often this results in me spending time reformatting an entire paragraph in order to ...
0
votes
2
answers
293
views
Formatting is not working properly in dart [duplicate]
I installed vsc and I have a problem with formatting the code in dart as below.
Lines do not maintain folds and commas are removed.
Can anyone help?
0
votes
0
answers
33
views
Can you add a custom 'See All' button to a view using tileProps in a SharePoint JSON-formatted view?
I am trying to build a simple tile view of some videos, (show their thumbnails and the description of the video), but I also want to add my own 'See All' link. The link out of the box will go to the ...
0
votes
0
answers
191
views
In Zed IDE, What is the correct XML format for enabling code edits by the AI assistant?
I'm trying to set up prompts to allow Zed IDE's AI assistant to apply direct changes to files for me to accept. However, I haven't found any documentation on the required syntax and structure for ...
0
votes
1
answer
119
views
VBA Custom ColorIndex
Is it possible to create a custom ColorIndex for VBA in Excel?
The workbook I'm working on has an excessive number of conditional formatting rules. I'm trying to convert those rules to a VBA script ...
0
votes
2
answers
56
views
Pandas DataFrame conditional formatting function with additional inputs
I developed a Qt GUI that reads data from a database and displays it on the screen in a table. The table includes conditional formatting which colors cell backgrounds based on cell contents. For ...