Questions tagged [suffix]

A suffix is a group of letters, usually of a regular form, that has a meaning within it's short form, that when applied to a word changes the meaning and/or intent of that word.

A suffix is a group of letters, usually of a regular form, that has a meaning within it's short form, that when applied to a word changes the meaning and/or intent of that word.

258 questions
-1
votes
1 answer

Merging/ pasting pairs of files in different directories that share the same suffix into single file

I would like to paste/ merge pairs of files that share the same suffix (eg. "_file12345.tsv" as below) from two different directories that have the same length, to make one combined file. I can't quite work out how to 'if file suffix in dir_1/…
-1
votes
1 answer

WooCommerce: Product price suffix based on product category

On my WooCommerce website I have fabric set to be sold per half meter, with the code below which is all working fine: function conditional_price_suffix( $price, $product ) { $product_id = $product->is_type('variation') ?…
-1
votes
2 answers

Adding a suffix to both elements in a list and to a variable at the same time

Say I have a list of strings: myList = ['apple','banana','orange'] and another string saved into a single variable: myVariable = 'fudge' I want to add the suffix _df2 to every element in myList, and also to myVariable. Therefore, I want my result…
-1
votes
1 answer

Server always adds suffix to url

I was playing around with wordpress on my linux machine, and now I am stuck as when i call the ip address on any browser xxx.xxx.xxx it always gets redirected to xxx.xxx.xxx/wordpress which was a directory below /var/www/html/ where i put all the…
talbx
  • 1
-1
votes
1 answer

What is the equivalent of Batch file syntax (*.* or *.csv) for python?

I am trying to open a file with python where the filename is 2018_01_25_(filename).csv. In batch files i used C:*.csv to open the csv file. I have tried this in python 2.7 but it doesnt work. a = pd.read_csv("filename.csv") i want to use, a =…
-1
votes
3 answers

Binary search to find longest common prefix

For an school assignment, we are implementing suffixarray, with the methods of building it and finding the longest common prefix. I manage to build and sort the suffix array quite easily but struggle with the LCP. I am trying to find the longest…
Isus
  • 143
  • 2
  • 16
-1
votes
2 answers

number of prefixes equal to suffixes

I am trying to find the number of prefixes equal to the suffixes and its length in a string of length n. They can overlap for eg if the string is "abacaba" then ans is {1, 3, 7} prefix of length 1 (a), 3 is "aba" and the whole string. The prefix "a"…
-1
votes
1 answer

Naming a file with a function suffix in matlab

I am trying to save multiple png files of circles with different colours in MATLAB. I wish to have multiple files with the name: RINGS_Base_ n being the number of different files displayed and colorname being the name of the colour…
Mraquel
  • 23
  • 8
-1
votes
1 answer

Remove Suffixes from list elements in python

I have to create a program that reads in lines of code until a single "." is entered, I have to remove punctuation, change all to lower case, remove stopwords and suffixes. I've manged all this except being able to remove suffixes, I've tried .strip…
Rydooo
  • 3
  • 1
  • 3
-1
votes
1 answer

Prolog PostFix Issue

I'm having trouble solving this prolog problem. Define a postfix predicate so that postfix(X,Y) says that X is a list that is a postfix of Y. That is, each element of X is equal to (unifies with) the corresponding element of Y, but Y may contain…
Musa Jamal
  • 77
  • 1
  • 6
-2
votes
2 answers

The longest prefix that is also suffix of two lists

So I have two lists: def function(w,w2): # => this is how I want to define my function (no more inputs than this 2 lists) I want to know the biggest prefix of w which is also suffix of w2. How can I do this only with logic (without importing…
-2
votes
1 answer

Add a suffix in the last part of lines that contain ">"

I have a text file that have the following structure: >RF1CLC1 DATADATADATADATA >RF1CLC2 DATADATADATADATA DATADATADATADATA DATADATADATADATA >RF2CLC13 DATADATADATADATA >RF2CLC24 DATADATADATADATA DATADATADATADATA and so on. I'm looking for a way to…
-2
votes
2 answers

C - ULL Prefix, Hex

I write a code: int main() { long long a = 1a1b2a2b3a3b4a4b; long *p1; long *p2; long *p3; long *p4; *p1 = 1a1b; *p2 = 2a2b; *p3 = 3a3b; *p4 = 4a4b; *p1 = &p2; *p2 = &p3; *p3 = &p4; printf("Die…
Roman
  • 113
  • 1
  • 1
  • 6
-2
votes
3 answers

Append counter to end of specific keys in a flat, associative array

I have an array that has 4 elements with the same key names, for example: { "Word" : "ok", "key_example" : "32", "key_example" : "23", "key_example" : "21", "key_example" : "67" } Is there any easy way that I can loop through this with PHP and…
user1419810
  • 836
  • 1
  • 16
  • 29
-4
votes
3 answers

replace/rename 1300 .png files at once, cmd or powershell? replace the last 4 digits of ever name

im a noob to the cmd and windows powershell, i do not want to mess anything up so im asking smarter people... this was my reference https://www.thomas-krenn.com/en/wiki/Cmd_commands_under_Windows i tried: find *.png -exec mv {} ${foo: -4} ; but i…
1 2 3
17
18