Questions tagged [renaming]

347 questions
9
votes
1 answer

Renaming a class file no longer prompts to rename all occurrences

It used to be that when I renamed a class file (maybe also others) in VS2012, it prompted me to renamed everything, then did a nice refactor after renaming the class to the new file name. It suddenly stopped doing that. Does anyone know why it…
ProfK
  • 44,292
  • 106
  • 358
  • 713
8
votes
1 answer

TypeError: cannot do label indexing on with these indexers

I face an error after renaming a pandas dataframe column: B=pd.DataFrame(data=[[1,1,1],[2,2,2]],columns={'A','B','C'}) print(B.loc[0,'B']) B = B.rename(index=str,columns={'B':'B_B'}) print(B.loc[0,'B_B']) This code leads to folowing output: >…
Lazloo Xp
  • 638
  • 1
  • 5
  • 19
7
votes
1 answer

Cost of x86 register renaming

The following code compiling with gcc or clang on amd64 // gcc -O2 file.c -c int f(int a, int b, int c, int d) { return a & b & c & d; } produces following assembly: 0000000000000000 : 0: 89 d0 mov %edx,%eax 2: …
jtaylor
  • 2,079
  • 13
  • 18
7
votes
2 answers

Git: how to analyze code that has a multi-file history?

I'm about to move a ton of files around in an existing project. Before I do this, I'd like to have a firm grasp on some techniques used to analyze code that has a multi-file history. How can I use git to ask: "where did this line of code come from?"…
Dane O'Connor
  • 67,996
  • 36
  • 114
  • 164
7
votes
4 answers

a MYSQL script to convert the column names to lowercase

I am looking for a single MYSQL script to convert ALL column names in a database to lowercase in one go... I have inherited a MYSQL database that has a lot of mixed case column names (150 tables with a strange naming convention) and I don't want to…
Rippo
  • 20,457
  • 13
  • 68
  • 112
6
votes
3 answers

replace names of all directiories and files in PS

I want to replace all space characters into "_" in names of all subfolders and files. Unfortunately when I type: Get-ChildItem -recurse -name | ForEach-Object { Rename-Item $_ $_.replace(" ","_") } Error message: Rename-Item : Source and…
matandked
  • 1,207
  • 3
  • 22
  • 48
6
votes
3 answers

bulk rename of files to lowercase in git

I have an entire git repo where I'd like to rename all the files and direcories to lowercase. Running on Win7, I've added igorecase = false to the gitconfig and renamed a few files through eclipse. The resulting commit now has the two files, one all…
Ian Wood
  • 6,325
  • 5
  • 31
  • 71
6
votes
2 answers

SCP copying error : Not a directory

I want to copy a file from my local system to a remote host. I want to specify the file name while copying. This is my command for copying. scp config/1 root@remote:/home/user/config/2 I want to rename the file while copying or with the same name…
Muneeb K
  • 363
  • 5
  • 19
6
votes
2 answers

Make signal names coming from library links unique?

OK, I've been struggling with this for a while. What is the best way to accomplish the following: where Reaction Wheel 1-4 are links to the same block in a library. When the Speed Counter, Speed Direction and Current signals are added to the final…
Rody Oldenhuis
  • 36,880
  • 7
  • 47
  • 94
6
votes
1 answer

Rename columns by pattern in R

I would like to rename all my columns in a dataframe by a specific pattern. My input: Log.NE122 Log.NE244 Log.NE144 -0.33 0.98 1.0 My expected output: NE122 NE244 NE144 -0.33 0.98 1.0 Cheers.
user3091668
  • 1,834
  • 5
  • 20
  • 37
5
votes
1 answer

iCloud - renaming open documents on another device sometimes fails

The issue: I'm working on an iCloud document on device A, e.g. iPod Touch. Then I change the name of the document on device B, e.g. my Mac (via the Finder). The change goes up to the cloud and after a pause device A gets to hear about it. And…
Obliquely
  • 6,539
  • 2
  • 29
  • 50
5
votes
1 answer

bash: Truncate Filenames, keeping them unique

I'm using a for-loop similar to this one to truncate all filenames in a folder to 16 characters: for i in *; do Shortname=${i:0:16} # Let's assume I don't need the extension mv "$i" "$Shortname" done The problem is: Whenever two…
Martin
  • 53
  • 1
  • 3
5
votes
2 answers

Rename File with Creation Date & Time in Windows Batch

I have a directory tree with thousands of pdfs and tifs. A folder may contain multiple pdfs or tifs in that case they are numbered 1.pdf, 2.pdf etc... I have to make them available and making sure they are maually processed oldest files first - so I…
Philä Bu
  • 75
  • 1
  • 3
  • 9
4
votes
1 answer

Python- Renaming duplicated values based on another variable

Is there anyway to rename the values based on another variable? Over here I have two columns, one of which is ID and another is fruits. However, I was thinking would it be possible to uniquely identify them based on the ID ID Fruits 1 Apple 1 …
Denova
  • 51
  • 2
4
votes
1 answer

Problems with package renaming in Mercurial project

I have been using Mercurial for a while in my Java project. I work in a two man team. When I do merges, I find that file renaming has not caused many problems, but package renaming has caused major issues. Is this a known problem? Is there anything…
smuggledPancakes
  • 8,687
  • 18
  • 64
  • 104
1
2
3
23 24