9,087 questions
0
votes
2
answers
75
views
Writing a JSON to Oracle CLOB column with Nifi
I have processor in Apache Nifi which prepares a big json (it varies between 4k to 500k), now I have the json which has nested objects and arrays in it. The flowfile has an attribute named "...
-2
votes
1
answer
129
views
Why does python seem to handle strings with escaped quotes differently? [closed]
I try to split a string by multiple (complex) delimiters. Those delimiters should only be used when not inside quotes (either single-quotes ' or double-quotes " ). But those quotes should only be ...
1
vote
1
answer
129
views
Escaping % from nested Batch scripts inside a loop
I have a batch escaping problem involving 3 files:
chain.bat conatins this code:
for %%x in (%*) do (
%%~x
)
b.bat contains this code:
chcp 65001 >nul
start chrome --profile-directory="...
2
votes
1
answer
68
views
backslash count in raw string interpolation in scala
I am using Scala 3.3.7.
When I do
val str1 = raw"\\\" // compile error: unclosed string literal
It is considering the \" as a single character.
But when I do
val str1 = raw"\\\\&...
0
votes
1
answer
45
views
In APIM policy, I keep getting error on characters from the named value
<set-header name="password" exists-action="override"> <value>@("{{ERP_UKG_pwd_TST}}")</value> </set-header>
the named value ERP_UKG_pwd_TST refers ...
1
vote
1
answer
238
views
Can't get 7-zip to work via vbscript to calculate a CRC32 for a file with spaces in the filename
I'm in need to generate a CRC32 efficiently from within vbScript. I'm aware of doing this with CRC32 tables and so on, but this is very slow for large files. Therefore I'm using 7-zip.exe with option ...
11
votes
4
answers
769
views
How to correctly pass a filename with a single quote to ffmpeg's subtitles filter in Python?
I'm writing a Python script using subprocess to hardcode subtitles onto a video. My code builds a complex filter graph for ffmpeg's -vf argument, which includes burning in multiple layers of styled ...
2
votes
3
answers
160
views
When setting pattern property from a string in JavaScript, how to preserve the backslashes?
Related to Properly simulate "pattern" attribute with javascript:
How do I set an input pattern using JavaScript?
when I try element.pattern = 'a\S' (as a trivial example), then the pattern ...
1
vote
0
answers
46
views
Escape type="html" for Atom XML
The W3C Atom docs contain this paragraph:
If type="html", then this element contains entity escaped html.
<title type="html">
AT&amp;T bought &lt;b&...
0
votes
2
answers
120
views
Standardize/normalize HTML character escapes in Java
I'm trying to compare HTML fragments that have been processed by two different systems, to check that the results are equivalent, in particular regarding character escapes. I need a version of the ...
1
vote
3
answers
179
views
How to replace unescaped double quote in string list
I have an output from the LLM call, which includes a string list. But the LLM is not smart enough to escape the double quote (") in the string, which will cause the json.loads error. How could I ...
1
vote
1
answer
103
views
expect regular expression does not work with [yes/NO]
I'm running easyrsa init-pki in bash script, and use expect to auto answer the questions, but the following expect settings are not working as expected:
expect {
-re {Confirm removal:} {send "...
2
votes
1
answer
36
views
URL rewrite with an unencoded hash (#) character and an encoded space (%20)
I am looking to create a rewrite file (.htaccess) for the National Library of Medicine (NLM) Classification, which uses URLs of this form (https://classification.nlm.nih.gov/schedules/QS#QS%2023) to ...
0
votes
1
answer
58
views
Backslashes interfering with json processing [duplicate]
I'm having trouble processing a file in R. I've seen that backslashes are difficult to deal with in R, but that question is old and I'm hoping that someone has something that will help. Here's an ...
1
vote
1
answer
87
views
How do I escape spaces in arguments that are a part of a pre-commit hook’s entry value?
I’m currently working on a few repositories that contain Nix flakes. You can test a Nix flake by running this Bash command:
nix flake check
That command will only work if you have the nix-command and ...
1
vote
0
answers
49
views
Has handling of escape characters in quoted strings changed between Python 3.10 and 3.13? [duplicate]
I have a program that works under Python 3.10.2 Windows that contains a line like this:
outfilename = outpathname+"\cfile.txt"
outfilename ends up looking like
c:\some\path\cfile.txt"
...
3
votes
4
answers
174
views
Efficiently convert forward slash to back slash in R
My question relates to the following question/answer from 2013:
Efficiently convert backslash to forward slash in R
I posted a question to the solution proposed by 'Arun' and 'flodel' at the link ...
2
votes
1
answer
84
views
Why use this syntax `{": "}` in React instead of just writing a colon
I saw this code snippet on the React dev page (https://react.dev/reference/react/memo#updating-a-memoized-component-using-state):
export default function MyApp() {
const [name, setName] = useState(''...
0
votes
0
answers
37
views
How do you send an escape set code page command to a legacy printer?
Sending ESC commands to a legacy matrix printer can be done easily in FreeBSD (and others) using:
printf '\033k0' | lpr -P lp
Above command chooses one font in a legacy STAR LC 7211 (seems to use ESC/...
0
votes
2
answers
58
views
Search Queries in MariaDB escaping - , spaces and
I have a MariaDB database with a huge list of part numbers. But I need to be able to make search queries for the product where users might not use the right seperating characters. For example the part ...
1
vote
1
answer
47
views
How to get the French tooltip text button to work? It works in English and German
HTML Newbie here
I want a button that uses the normal encoding, and also displays French. However, there are also some apostrophes (French altert texts is: Dans l'envelope.), so naturally I escaped ...
0
votes
1
answer
197
views
How to escape double curly braces in a promptfoo evaluation config?
I'd like to give this prompt to the LLM:
Output this exact string:{{some_string}}"
I.e., {{some_string}} shall not be replaced by Promptfoo with some variable, but be verbatim instead.
My current ...
0
votes
1
answer
82
views
How to prevent unescaped program arguments
This test program parses a single text argument, which could be a URL:
#!/usr/bin/env python
import argparse
def parse_input():
parser = argparse.ArgumentParser(
description='Program ...
3
votes
3
answers
140
views
regex to match all unescaped '$' in a regex string
I want to build a regex that will match all unescaped $ in strings that represents a regex.
In this case, a character is unescaped if it contains an equal number of backslashes behind it (each pair of ...
0
votes
0
answers
74
views
Why does my last printed line disappear when using \r in VS Code terminal
why in this code in the vs code the last output cleared I think we should have "...." ??
from time import sleep
c=1
while c<5 :
print("."*c+"\r",end='')
sleep(...
-1
votes
1
answer
156
views
How do I use the printf command with a format string beginning with "-"? [duplicate]
I have some items:
items=(one two three)
And I want to print them with leading -, to give this output:
- one
- two
- three
The obvious format string fails:
printf '- %s\n' "${items[@]}"
...
1
vote
1
answer
91
views
Powershell escape in LUA script
Trying to kill some child processes (given parent pid) from within a lua script. Found solution using wmic but prefer using powershell.
I can run each of these powershell commands in a standard ...
-4
votes
1
answer
225
views
How to pass raw JSON with spaces and tabs to a struct in Go without extra escaping or marshaling
I'm working with a Go application where I need to pass raw JSON data to a struct field, but I am encountering issues with extra escaping when marshaling the struct, especially when the raw JSON ...
0
votes
1
answer
90
views
Can't Query AWS Athena Presto Table Because of Dash Character in Column name
I have a file in S3 with the following contents:
{"foo-bar": {"name":"Mercury","distanceFromSun":0.39,"orbitalPeriod":0.24,"dayLength":58.65}...
-3
votes
1
answer
92
views
Using special characters in a Django template tags
I am trying to make a field with Django Tweaks and I am trying to add some HTMX attributes. I want to use the following syntax:
{% render_field field <other attributes> hx-vals='{"country&...
0
votes
0
answers
111
views
Dbeaver Generate SQL function adds unwanted escape characters
Often I want to make copies of a report in my reports table for some small modifications. Then I always query the report I want to copy select * from reports where id = 1 After that I right click on ...
1
vote
2
answers
147
views
Mixing \e and other escape characters
I recently came to know how ANSI-C quoted strings can be used to give colourful prompts to commands that do not recognize escape characters. For e.g.
% read -q $'val? \e[31mFoobar\e[0m:' ...
-1
votes
1
answer
65
views
Disable escaping XML text passed through command line
General overview
I have a part of a XML file that comes from outside the XML (or the xslt itself) cause it's dynamically generated by another process. So I give it through the command line.
The ...
0
votes
0
answers
48
views
Error: Unable to parse JSON, Kotlin REST Json Payload contains escaped double quotes
I am facing one issue. The application is Kotlin + Java. I am calling a Kotlin REST Resource passing the escaped backslash in the payload (This request is coming from external client). but I am ...
0
votes
0
answers
35
views
Formula in VBA not match in may range [duplicate]
Please Help me for this Script on VBA Excel:
Range("A7").Formula = "=SUMPRODUCT((Table_Query_dBF_Monde[INVOICENO]<>"")/COUNTIF(Table_Query_dBF_Monde[INVOICENO];...
0
votes
0
answers
54
views
Including an email address in a SQL SELECT statement that includes a single quote [duplicate]
I am working on a process that needs to retrieve records from a cosmos database that may include quotes in the email address. When building the select statement I have tried to replace the single ...
0
votes
3
answers
131
views
ADF Snowflake Source Copy Activity Query
I have an ADF Copy Activity (Snowflake source, Azure Storage sink) which passes in the schema and table name using variables. Below is the dynamic query...
Dynamic query
It is failing with the error '...
0
votes
2
answers
113
views
Prevent square brackets being turned into \link in conversion from ROxygen to Rd
I am copying a function from the checkmate package which contains the following bit of ROxygen documentation:
#' \item{strict:}{Performs checks like with \dQuote{unique} and additionally fails for ...
1
vote
2
answers
59
views
Get mediainfo Height in Batch: wrong answer returned if property is defined (%% var escape)
I have this batch which works as expected giving the video height using mediainfo
@echo off
setlocal enableextensions enabledelayedexpansion
REM set "HEIGTH=1081"
for /f "tokens=* ...
2
votes
2
answers
366
views
Running a Powershell Start-Process command, with arguments containing spaces, from a batch script
I can't get this batch script to work, even though I tried a lot of things, I'm now stuck.
The intention is for the batch script to re-run itself elevated, using PowerShell and Start-Process, if the ...
1
vote
2
answers
160
views
Escaping special characters in a Vespa YQL `matches` query
By trial and error, I've found that the special characters requiring escapement in a Vespa matches query include more than just the quote " and backslash \ characters noted at https://docs.vespa....
-7
votes
2
answers
102
views
Problems making a regex more readable than its literal [closed]
The following regex has been validated on regex101 and works fine, matching either "()", or "[]" or "{}":
\(\)|\[]|\{}
However:
it's not so readable
in Java gets even ...
1
vote
0
answers
31
views
Passing Special Characters with a space in MSI command-line parameters Across Scenarios [duplicate]
I am using this setup.exe to install the application by passing MSI parameters directly to the MSI via the command line:
setup.exe/s /v"/l*V installer.log INSTALLDIR="""C:\Program ...
0
votes
0
answers
103
views
How to pass a space and a double quote together in MSI command-line parameters?
I am trying to install a desktop application through the command line. The application comes with an installer package, such as setup.exe, which was created using InstallShield.
I am using this setup....
1
vote
1
answer
65
views
mysql 8.0 process json with escape mark '\'
SET @v = '{"a":" \\u3b7e - c:\\user\\abc - \\"ET\\" "}';
SET @j = CAST(@v AS JSON);
failed Error Code: 3141. Invalid JSON text in argument 1 to function cast_as_json: &...
1
vote
2
answers
129
views
Post a password with an exclamation mark ! from a Windows server to a Linux server
I've been having a hard time trying to figure out how to post a password that has a exclamation point ! from a Windows server to a Linux server. I only mention linux because linux uses ! for
The ...
0
votes
1
answer
118
views
Why is Python Rich printing in green?
Using Rich I get what I think is a spurious green output in the console.
In the following code, the "d:c" is coloured green, the rest of the text is as expected.
from rich.logging import ...
-1
votes
1
answer
123
views
"What can I use in place of < and > in HTML?"
I am trying to display < and > symbols as plain text in an HTML document, but they get interpreted as HTML tags. I used < and >, which work fine, but I'm wondering if there are ...
-1
votes
2
answers
96
views
Using the escape function to concatenate the title with the colors together to show on my store
I am having issue to concatenate the title with the colors in this form ( " Title (color, color, color)" ).
Script works great with "Title": escape ((title)) but now when adding (...
1
vote
1
answer
611
views
how can i properly include a path with spaces in cmake on windows powershell and augment it with variable or command to pass to gcc?
the only thing that works is manually putting the entire path with single qoutes '.
like
cmake -G Ninja -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_FLAGS='-IC:/Program" "...