Questions tagged [prefix]

A prefix is a part of a word attached to a beginning of a word which modifies the meaning of that stem.

A prefix is a part of a word attached to a beginning of a word which modifies the meaning of that stem. Prefixes are generally adding an attribute to the base-word. For example the word "prefix" is composed by the prefix of "pre" and the base-word of "fix". The prefix of "pre" means before.

Prefix may also refer to:

1325 questions
299
votes
23 answers

nvm is not compatible with the npm config "prefix" option:

I am trying to run another NodeJS version with nvm but getting this error: $ nvm use v4.2.4 nvm is not compatible with the npm config "prefix" option: currently set to "/Users/z/.npm-global" Run `npm config delete prefix` or `nvm use…
Dmitri Zaitsev
  • 13,548
  • 11
  • 76
  • 110
136
votes
11 answers

How to rename with prefix/suffix?

How do I do mv original.filename new.original.filename without retyping the original filename? I would imagine being able to do something like mv -p=new. original.filename or perhaps mv original.filename new.~ or whatever - but I can't see anything…
Peter Boughton
  • 110,170
  • 32
  • 120
  • 176
109
votes
5 answers

Python regex - r prefix

Can anyone explain why example 1 below works, when the r prefix is not used? I thought the r prefix must be used whenever escape sequences are used. Example 2 and example 3 demonstrate this. # example 1 import re print (re.sub('\s+', ' ', 'hello …
JT.
  • 1,099
  • 2
  • 8
  • 3
102
votes
9 answers

Rename multiple files in a folder, add a prefix (Windows)

I'd like to batch rename files in a folder, prefixing the folder's name into the new names. i.e. files in C:\house chores\ will all be renamed house chores - $old_name.
ofer.sheffer
  • 5,417
  • 7
  • 25
  • 26
93
votes
12 answers

Determine the common prefix of multiple strings

I have a set of strings, e.g. my_prefix_what_ever my_prefix_what_so_ever my_prefix_doesnt_matter I simply want to find the longest common portion of these strings, here the prefix. In the above the result should be my_prefix_ The…
Kawu
  • 13,647
  • 34
  • 123
  • 195
91
votes
4 answers

How to remove a path prefix in python?

I wanted to know what is the pythonic function for this : I want to remove everything before the wa path. p = path.split('/') counter = 0 while True: if p[counter] == 'wa': break counter += 1 path = '/'+'/'.join(p[counter:]) For…
Natim
  • 17,274
  • 23
  • 92
  • 150
91
votes
8 answers

Add a prefix to each item of a PHP array

I have a PHP array of numbers, which I would like to prefix with a minus (-). I think through the use of explode and implode it would be possible but my knowledge of php is not possible to actually do it. Any help would be appreciated. Essentially I…
MBL
  • 1,197
  • 2
  • 11
  • 17
83
votes
6 answers

targetNamespace and xmlns without prefix, what is the difference?

In an xml schema document, if I have both the targetNamespace and the xmlns without a prefix. What is the exact…
Abe
  • 8,623
  • 10
  • 50
  • 74
71
votes
2 answers

The difference between C and C++ regarding the ++ operator

I have been fooling around with some code and saw something that I don't understand the "why" of. int i = 6; int j; int *ptr = &i; int *ptr1 = &j j = i++; //now j == 6 and i == 7. Straightforward. What if you put the operator on the left side of…
Moe45673
  • 854
  • 10
  • 20
62
votes
14 answers

Check if one string is a prefix of another

I have two strings which I'd like to compare: String and String:. Is there a library function that would return true when passed these two strings, but false for say String and OtherString? To be precise, I want to know whether one string is a…
fredley
  • 32,953
  • 42
  • 145
  • 236
53
votes
1 answer

makefile: how to add a prefix to the basename?

I have a list of file path like that: FILE_PATH := a1.so a2.so bla/a3.so bla/a3.so bla/blo/a4.so.... I need to add a prefix to the basename in order to get: FILE_PATH_PREFIXED := liba1.so liba2.so bla/liba3.so bla/liba3.so bla/blo/liba4.so.... any…
dm76
  • 4,130
  • 8
  • 35
  • 46
52
votes
9 answers

Where does the k prefix for constants come from?

it's a pretty common practice that constants are prefixed with k (e.g. k_pi). But what does the k mean? Is it simply that c already meant char?
Johan Kotlinski
  • 25,185
  • 9
  • 78
  • 101
47
votes
2 answers

Linux configure/make, --prefix?

Bear with me, this one's not very easy to explain... I'm trying to configure, make and make install Xfce into my buildroot build directory. When configuring I'm using --prefix=/home/me/somefolder/mybuild/output/target so that it builds to the…
Xleedos
  • 948
  • 2
  • 9
  • 17
46
votes
5 answers

How to remove filename prefix with a Posix shell

How can I remove the filename prefix in Bash as in the following example: XY TD-11212239.pdf to get 11212239.pdf i.e, remove XY TD-?
hamid
  • 511
  • 1
  • 5
  • 5
38
votes
3 answers

What does the '@' prefix do in PHP?

What does the '@' symbol do in the following code? @mkdir(ROOT. "cache/");
Rich Turner
  • 10,800
  • 1
  • 51
  • 68
1
2 3
88 89