rename

How to rename a table in SQL Server?

寵の児 提交于 2019-12-18 09:55:07
问题 The SQL query that I have used is : ALTER TABLE oldtable RENAME TO newtable; But, it gives me an error. Server: Msg 156, Level 15, State 1, Line 1 Incorrect syntax near the keyword 'TO'. 回答1: To rename a table in SQL Server, use the sp_rename command: exec sp_rename 'schema.old_table_name', 'new_table_name' 回答2: To rename a column: sp_rename 'table_name.old_column_name', 'new_column_name' , 'COLUMN'; To rename a table: sp_rename 'old_table_name','new_table_name'; 回答3: When using sp_rename

Updated: Plyr rename() not recognizing identical 'x'; Error: The following `from` values were not present in `x`:

做~自己de王妃 提交于 2019-12-18 09:45:15
问题 R 3.2.4 Plyr updated 2016-03-10 I am trying to rename columns in a large data set and running into the "The following from values were not present in x :" error. The columns from origin export are atrocious, which is why I'm using plyr rename, but it seems that even rename is having trouble. Example trouble column is [,3] in the linked data set and is titled: "Experimental.or.quasi.experimental..evaluation..compares.mentored.youth.to.a.comparison.or.â.œcontrolâ...group.of.non.mentored.youth.

Using command prompt batch files to move and automatically rename duplicate files

怎甘沉沦 提交于 2019-12-18 07:24:15
问题 So, here's what I have: I created a small batch file to record the results of a ping test to a text file. What I want to do is run the batch file and move the results log to a specific folder on the Desktop automatically. Then, if the target filename exists, automatically rename accordingly. Meaning, if File1 exists, create File2, File3, so on and so forth. Here's what I have so far: @echo off color A title Ping Test :A echo. cls ping google.com -n 4 > C:\Users\%username%\Desktop\pingresults

In Git, how do I get a detailed list of file changes from one revision to another?

久未见 提交于 2019-12-17 22:41:56
问题 I use a Git repository on my server to version user data files sent to the server. I'm interested in getting a list of changed files between any two revisions. I know about git diff --name-only <rev1> <rev2> , but this only gives me a list of file names. I'm especially interested in renames and copies, too. Ideally, the output would be something like this: updated: userData.txt renamed: picture.jpg -> background.jpg copied: song.mp3 -> song.mp3.bkp Is it possible? --name-status also doesn't

Rename and Deleting Elasticsearch Indexes

放肆的年华 提交于 2019-12-17 20:54:29
问题 I'm using C# .NET application with NEST to create an index. I've created an elasticsearch index that customers can query called index_1. I then build another version of the index using a different instance of the application and call it index_1_temp. What is the safest way for me to rename index_1_temp to index_1 then delete the original index_1? I know ES has aliases but I'm not sure how to use them for this task EDIT: The original index does not have an Alias associated with it. 回答1: I

php rename() Device or resource busy

ε祈祈猫儿з 提交于 2019-12-17 19:32:09
问题 I have code that gives the following error: Warning: [function.rename]: Device or resource busy in if ($handle = opendir($temp_images)) { /* This is the correct way to loop over the directory. */ while (false !== ($file = readdir($handle))) { if ($file == $file) { } $path = ''; $dir_handle = opendir($path); chdir($path); $oldfile = $path.$file ; $newfile = $path.preg_replace('/[\\&\\%\\$\\ ]+/', '-', $file); // replace &%$ with a - if(FALSE == rename($oldfile, $newfile)) { } } closedir(

using header() to rewrite filename in URL for dynamic pdf

泄露秘密 提交于 2019-12-17 10:57:48
问题 I have a php script that generates a pdf report. When we go to save the pdf document, the filename that Acrobat suggests is report_pdf, since the php script is named report_pdf.php. I would like to dynamically name the pdf file, so I don't have to type the appropriate name for the report each time that I save it. Asking on a news group, someone suggested this, where filename="July Report.pdf" is the intended name of the report <? header('Content-Type: application/pdf'); header('Content

Is there a way to change a SVN users username through the entire repository history?

时光怂恿深爱的人放手 提交于 2019-12-17 10:33:10
问题 When my team first started out with SVN we all just used our first names when committing to the repository, however, now that our team has grown, we are running into issues because we just hired a second Mike . What we would like to do is change everybody's usernames to be the same as the username on their computer (first name initial + last name). The issue that I'm seeing is that the SVN history will still show the old usernames on commits. Is there a tool out there for changing usernames

Is there a way to change a SVN users username through the entire repository history?

非 Y 不嫁゛ 提交于 2019-12-17 10:32:51
问题 When my team first started out with SVN we all just used our first names when committing to the repository, however, now that our team has grown, we are running into issues because we just hired a second Mike . What we would like to do is change everybody's usernames to be the same as the username on their computer (first name initial + last name). The issue that I'm seeing is that the SVN history will still show the old usernames on commits. Is there a tool out there for changing usernames

How to move files using FTP commands

China☆狼群 提交于 2019-12-17 08:30:12
问题 Path of source file is : /public_html/upload/64/SomeMusic.mp3 And I want to move it to this path : /public_html/archive/2011/05/64/SomeMusic.mp3 How can i do this using FTP commands? 回答1: In FTP client: rename /public_html/upload/64/SomeMusic.mp3 /public_html/archive/2011/05/64/SomeMusic.mp3 With FTP commands: RNFR /public_html/upload/64/SomeMusic.mp3 RNTO /public_html/archive/2011/05/64/SomeMusic.mp3 source: http://www.nsftools.com/tips/RawFTP.htm 回答2: Just in case someone else will search