1,368 questions
-1
votes
1
answer
107
views
C++Builder 12 problem with XML prefixes - property Text from IXMLNode is always empty
If I try to read an XML document without prefixes, it works fine. But with prefixes, I'm not getting the content.
Sample:
<rsm:CrossIndustryInvoice xmlns:a="urn:un:unece:uncefact:data:standard:...
4
votes
1
answer
81
views
Add prefix to all URLs while using Blueprint
I am trying to prefix all endpoints with /api/, but I am getting 404 in return if not providing directly in the URL or while registering blueprint.
main.py
from init import app
from modules.User ...
1
vote
2
answers
98
views
Find only XPath-entries without any prefix by regular expression
My problem is pretty straight forward, but yet I didn‘t come up with a solution for it - probably because my knowledge about regular expressions is very basic.
I am trying to match only the entries of ...
0
votes
1
answer
48
views
When dumping Java beans with SnakeYAML, how to get rid of the tag prefix (!!…)? [duplicate]
I am using SnakeYAML to dump my Java bean objects to a YAML file.
The resulting YAML file looks like this:
- !!com.catalog.Being
type: human
name: john
origin: earth
- !!com.catalog.Being
type:...
0
votes
1
answer
85
views
Display currency symbol in WooCommerce product depending on ACF result
I want to switch between two currency symbols on a Woocommerce product depending on what the user selects on a specific ACF field. Site is a real estate catalogue, there is no monetary transactions so ...
2
votes
1
answer
141
views
Using Middleware and Prefix or any other parameter simultaneously in Route Groups
What I need is to use prefix() with Middleware simultaneously within Laravel.
For example this code:
Route::prefix('admin')->group(function () {
Route::get('/users', function () {
// ...
2
votes
1
answer
116
views
SPSS macro to add prefix to all variables in dataset
I'm planning to merge data from different sets, but before I do I'd like to add prefixes to all variables in each dataset so that we can later easily determine where the variables initially came from. ...
0
votes
3
answers
126
views
Group values of a flat array into sets of consecutive strings with the same leading characters
I have a dynamic array, each group of lines start with a specific code "S10.G00.00", "S10.G00.01", "S10.G00.02" ...
The array may be like this:
array:20 [▼
0 => &...
1
vote
2
answers
98
views
How to add a suffix to duplicates array of objects using javascript?
I've got a following array of objects
let views = [
{
name: "A View",
active: true,
},
{
name: "B View",
active: false,
},
{
name: "C View",
...
2
votes
1
answer
237
views
Add prefix to some java spring boot controllers
Is there a way to add a prefix to a group od controllers leaving the rest of the controllers out of this prefix
example:
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping(value = "/...
2
votes
0
answers
107
views
The list of urlpatterns should not have a prefix string
In Django 5.0 I get the error:
The list of urlpatterns should not have a prefix string.
My code is:
from django.conf.urls import url
from django.urls import path, include
from django.contrib import ...
2
votes
0
answers
127
views
Nuxt router prefix changes url for _nuxt folder request
I added a prefix on my nuxt config.
Everything works fine, but when my app is published online, when the app starts and build, the local fetch for _nuxt directory are wrong (I have 4 url that fetch ...
-1
votes
3
answers
721
views
Get Ipv6 prefix using ip command in bash script
i have with the command below the ipv6 address on my interface:
> ip -6 a show dev wlan0
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
...
1
vote
5
answers
191
views
F-string format for conditionally prefixing a value
I want to create an f-string that combines two strings, prepending a '.' character to the second if it is not empty.
reference = "file"
modifier = "read"
print(f"unknown ...
2
votes
1
answer
74
views
Django - change form prefix separator
I'm using form prefix to render the same django form twice in the same template and avoid identical fields id's.
When you do so, the separator between the prefix and the field name is '-', I would ...
0
votes
0
answers
44
views
Laravel: Storing full path of image in database and showing it in the UI
I have uploaded an image in s3 bucket and attached a CloudFront distribution to that bucket. I have stored the full image path (which is a valid image) in my database. i.e.
https:/d3l9brpcqhhun7....
0
votes
1
answer
46
views
PyQT5 QtSerialPort checksum prefix question
The follow configuration: Raspberry Rpi4B / Python 3.11.2 / PyQt5 5.15.9
The follow configuration: Raspberry Rpi4B / Python 3.11.2 / PyQt5 5.15.9
I have a question about how to adjust prefix checksum ...
-1
votes
0
answers
28
views
why do prefixes in an array have no effect? [duplicate]
solving a problem in leetcode, I needed to create a matrix and take data from another matrix,
for this I wrote res[0][0]=s[0][0], but for some reason Python assigned all res[0-2][0] values to s[0][0]...
0
votes
1
answer
62
views
Regex to find digits not immedidately after certain word?
How to find invoice number from different companies which may have different order of invoice number, unit cost and total cost?
Following is specific example of a company XYZ which I need to get ...
1
vote
1
answer
93
views
Prefix on FastAPI url to switch databases?
FastAPI Routing Question:
Hi, I've got 3 databases set up (master databases that is, postgres instances) as such:
master1:
- db1:
- tables...
- db2:
- and so on...
-...
2
votes
2
answers
80
views
How can I create a new php array from an existing array where the prefix of the array values is used to determine it as being unique?
Supposing I have this php array:
$booklist =
Array
(
[0] => Peppa / Season 2 / 43 The Quarrel / Page 1
[1] => Nursery Rhymes / Wheels On The Bus / Page 1
[2] => Wonderskills / ...
0
votes
1
answer
441
views
Compile latest openssl with mingw64 within cygwin on Windows 11 vs install prefix path definition
I spent lot of time to compile latest OpenSSL with mingw64 within CygWin on Windows 11.
Public information mentioned use install prefix like \cygdrive\c\install_folder but you need these commands ...
0
votes
0
answers
21
views
Adding a prefix to all output lines of "apt-update && apt-upgrade in BASH? [duplicate]
I'm trying to add a prefix to all output of the following command:
sudo apt update && sudo apt -y upgrade
I've been scouring the internet and it seem there are 2 outputs to handle. STDOUT, and ...
1
vote
0
answers
102
views
Is it possible to use IPv4 prefixes (subnets) as "public IPs" in the network interface of an AWS EC2 instance?
I transferred a /24 subnet (256 IPs) to AWS via BYOIP and I would like to assign some of these IPs to EC2 instances.
I know it is possible to assign a small subset directly to the instance's network ...
0
votes
0
answers
34
views
Input precedence value and stack precedence value
There is some eror in input precedence value and stack precedence value for conversion of infix expression to prefix expression(in the table).
Please provide the corrected value:
|Symbol| Stack | ...
0
votes
0
answers
172
views
Detect prefix and/or suffix in python
I'm trying to write a program to detect whether a word has a prefix and/or a suffix. Normally, I'd just use .startswith() and .endswith(). I'd prefer not to use that here because certain words, like '...
1
vote
1
answer
81
views
Longest common substring with restrictions
I have a function that finds and prints the longest common chain between two DNA chains. However I want to add some checks so my program can ignore characters that are not bases ('A', 'T', 'C', 'G')
...
0
votes
1
answer
112
views
I want to add prefix to all routes in Lavarel
I want to add prefix to all router like this:
courses.org/mycaliforniapermit/register (course 1)
courses.org/mycaliforniapermit/admin/login (course 1 backend)
courses.org/mycaliforniapermit/login (...
1
vote
1
answer
222
views
Convert prefix to infix with minimum number of parentheses
Right now this is my code:
precedence = {
"+": 1,
"-": 1,
"*": 2,
"/": 2,
"": 0
}
def is_operator(token):
ope = set(['+', '-',...
3
votes
2
answers
476
views
Coalesce inside an across statement using column name and a prefix
Again I feel like I should be able to do something to seems not quite complicated but I can't figure it out.
I have a dataframe df with variables a1, v_a1, a2, v_a2 and so on. All I want to do is ...
1
vote
1
answer
75
views
Create multiple columns with same prefix based on conditions from multiple columns
I have data that look like this, with the dates of Birth and Death for patients.
ID DOB Birth_Year DOD Death_Year
1 2016-10-01 2016 2019-10-15 2019
2 2017-07-01 ...
0
votes
1
answer
1k
views
How to do SNS filtering with prefix matching on String.Array type message attribute
Is there a way to apply SNS filtering to match all messages that has message attribute 'MyMessageAttribute ' ( type = String.Array ) and any of its value start with "MyPrefix" ?
I have ...
0
votes
0
answers
67
views
How does printf() execute its arguments with prefix and postfix unary operators?
I wrote a simple code for printf in C with unary prefix operator as the following:
#include <stdio.h>
int main() {
int i=5;
printf("%d %d %d",++i,i,i+1);
return 0;
}
And ...
0
votes
0
answers
116
views
xsd schema: How to omit namespace prefix in XML instance document
I have this XML schema:
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:r="urn:rt"
targetNamespace="urn:rt">
<element name="RTC&...
0
votes
1
answer
311
views
Nestjs setGlobalPrefix exclude option not working
All my routes should have api prefix, except the .well-known route so I've added that path into the exclude option of the setGlobalPrefix method
app.setGlobalPrefix('api', { exclude: ['.well-known'] ...
0
votes
1
answer
135
views
Insert prefix to all pandas dataframe columns names
I have created the following pandas dataframe:
import pandas as pd
ds = {"col1":[1,2,3,4,5], "col2":[6,7,8,9,10]}
df = pd.DataFrame(data=ds)
print(df)
Which looks like this:
...
0
votes
1
answer
537
views
How to use svg-chunk-webpack-plugin along with prefixing the svg IDs using webpack 5?
Hi I have got lot of individual svg files which I want to chunk in a single file using svg-chunk-webpack-plugin.
I followed the example here and was able to do it.
It is internally taking care of ...
0
votes
2
answers
101
views
PHP - Count Unique Word and Add Counted Prefix
I tried this
$data = "air;air;air;bus;air;air;bus;air;air";
$a = substr_count($data,"air");
$b = substr_count($data,"bus");
$data = implode($a . ' x ', array_unique(...
1
vote
2
answers
838
views
In bash, how to sort while ignoring a prefix?
I know the sort command can be made to use only some of the information on each input line as the sort key, e.g. using sort -k 2 to skip the initial sequence of characters up to a whitespace; and I ...
0
votes
1
answer
162
views
Python: Nextcord Bot custom prefix not displaying properly
this is my first question here and I hope that I'll find an answer for my problem.
Situation:
I'm not a programmer but I'm currently learning python (interesting and fun). I looked for interesting ...
0
votes
1
answer
506
views
codesignal remove palindrome prefixes and return string
You are given a string s. Consider the following algorithm applied to this string:
Take all the prefixes of the string, and choose the longest palindrome between them.
If this chosen prefix contains ...
1
vote
2
answers
323
views
Deal with last character of backslash in "r" prefix and "+" in Python
From the link, the r prefix is about raw string. Actually, there are some situations that cause me very difficult to understand the r's function. Let me express my opinion:
'H:\\Education' equals r'H:...
0
votes
1
answer
687
views
Automating Deletion of Azure Blob Storage using Lifecycle Management and Filter in azure blob storage
I've been actively working with Azure Blob Storage and its lifecycle management features. In this context, I have a Blob Storage account dedicated to storing my database backups. These backups are ...
0
votes
1
answer
970
views
Moving blob that triggered Azure function from "sub folder" to "sub folder"
So what is the best way to move a blog that triggered an azure function between "sub folders" in blob container. I know that Azure function blob containers are flat, so the thing i call sub ...
0
votes
1
answer
95
views
Autofill numbers with letter prefixes in excel
How do I autofill in excel when there is a prefix? Here is my code that autofills column A with user input start number and last number. But I want to modify it so that it can handle numbers with ...
2
votes
0
answers
107
views
How to find definition of predicate in YAGO like domain,range,comment?
Thesedays I have been struggling to construct a new dataset with opensource dataset.
The first opensource dataset I downloaded is YAGO4.5. I have to take all the predicates of triples and analyse ...
0
votes
1
answer
85
views
bullk rename files by keeping current file name and extension but adding a meaningful keyword prefix (with what we searched)
I am supposed to carefully (without error or data loss) rename files in a particular directory on linux samba share, which contains hundreds of files (mostly images, docs, pdf guides and ebooks) with ...
0
votes
3
answers
878
views
Use traefik to run oblivious backend under a prefix
Given the following situation:
Actual entrypoint from the web is https://my.tld/customprefix
The application is unaware of the prefix and listens to /
This means that the application will redirect ...
-1
votes
2
answers
687
views
What are the common ways to distinguish between identifier of local variables and global variables?
I write a function with using same identifier for local variable and globel variable, as shown as following codes:
def func(time_len, num_nodes):
pass
if __name__ == '__main__':
time_len, ...
0
votes
1
answer
3k
views
Automatically add a prefix or suffix onto all columns after a JOIN [duplicate]
I have a sql query that joins 2 tables on the column product_id. Pretty straight forward. Result is below:
However, after joining, I realized I have to do a subquery with all the columns listed here. ...