Questions tagged [edit]

to modify (a computer file) by, for example, deleting, inserting, moving, or copying text.

Edit can be done as part of coding or changing configuration files.

The tool which is used for editing is called an Editor. Common editors include vi, emacs etc.

3207 questions
45
votes
6 answers

Cannot edit checked out file (TFS) in Visual Studio 2013

Since I changed my windows password I can no longer type into a checked out file in Visual Studio 2013! Where before I just needed to start typing and it would check out the file in the background, now it won't even allow me to type into the file…
Seamus Barrett
  • 1,145
  • 1
  • 10
  • 15
44
votes
8 answers

Analyzing string input until it reaches a certain letter on Python

I need help in trying to write a certain part of a program. The idea is that a person would input a bunch of gibberish and the program will read it till it reaches an "!" (exclamation mark) so for example: input("Type something: ") Person types:…
anu_clarset
  • 459
  • 1
  • 4
  • 5
40
votes
6 answers

Github gist editing without changing URL

I have a gist with some javascript code in a script tag, like so: And I will need to keep editing the JS file on github.…
tckmn
  • 57,719
  • 27
  • 114
  • 156
40
votes
1 answer

How does one store history of edits effectively?

I was just wondering for sites like stackoverflow and wikipedia, they stores history of edits indefinitely and allows user to roll back the edits. Can someone recommend any resources/books/articles regarding how to do this using any suitable…
FurtiveFelon
  • 14,714
  • 27
  • 76
  • 97
36
votes
8 answers

Disable user edit in JTable

When a JTable component is created, cell editing is enabled by default. How can I prevent the user from editing the content of a JTable?
Parag
  • 7,746
  • 9
  • 24
  • 29
36
votes
2 answers

Restful Rails Edit vs Update

I was trying to redirect to a different page after editing an entry, I assumed that it was using the update code because you are updating the database. It took me some time to realise that I was using the wrong action in the controller. Can…
Rumpleteaser
  • 4,142
  • 6
  • 39
  • 52
34
votes
4 answers

Append text to file using sed

How can I write text to a file using sed? More specifically I would it add null variables to my blank text file that was created using touch. The syntax of sed is very confusing to me.
Geofferey
  • 2,862
  • 6
  • 21
  • 24
31
votes
4 answers

Is there a quick way to decrease the indentation of multiple lines in Python?

I am a newbie to python programming. I find that decreasing the indentation of a block of codes in python is quite annoying. For example, given the following code snippet for i in range(density): if i < 5: x, y = rnd(0,shape[1]//2)*2,…
sma
  • 877
  • 2
  • 9
  • 24
29
votes
3 answers

Editing YAML file by Python

I have a YAML file that looks like this: # Sense 1 - name : sense1 type : float value : 31 # sense 2 - name : sense2 type : uint32_t value : 1488 # Sense 3 - name : sense3 type : int32_t value : 0 - name : sense4 type :…
29
votes
8 answers

Batch / Find And Edit Lines in TXT file

I want to create a batch while which finds specific lines in a batch file and are able to edit these lines. Example: //TXT FILE// ex1 ex2 ex3 ex4 i want to let the batch file find 'ex3' and edit this to 'ex5' to let it look like…
Deniz Zoeteman
  • 9,691
  • 26
  • 70
  • 97
27
votes
12 answers

"Edit with IDLE" option missing from context menu

I have Python 2.7.5 that installed with ArcGIS 10.2.2. When I first right-clicked a .py script I'd previously written it listed the "Edit with IDLE" option in the context menu. However, this option no longer appears when I right-click a .py…
nokalake
  • 433
  • 2
  • 5
  • 11
23
votes
1 answer

How do I replace embedded resources in a .NET assembly programmatically?

I am trying to replace a Resource of an exe (.NET, C#) file using C# code. I have found this article and made this code (using Mono.Cecil 0.6): AssemblyDefinition asdDefinition = AssemblyFactory.GetAssembly("C:\\File.exe"); EmbeddedResource erTemp =…
eranj
  • 367
  • 1
  • 3
  • 8
22
votes
4 answers

Uneditable QListView

I have a QListView displaying a list of items but I don't want the items to be edited (Currently a double click on the item allows you to edit them). This is my Code: self.listView = QListView() self.model = QStringListModel([ "item1" , "item2" ,…
Jay
  • 3,373
  • 6
  • 38
  • 55
20
votes
1 answer

How can I use Gulp to add a line of text to a file

I've been trying to figure out how to add a line of text to any type of file using Gulp. For instance add: @import 'plugins' to my main.sass file. Or add a CDN to an index.html file. I did try: gulp.task('inject-plugins', function(){ …
Darryl Morley
  • 699
  • 1
  • 7
  • 20
20
votes
2 answers

Django edit user profile

I'm trying to create an "Edit Profile" form in the fronted. What happens is that my form(i'm not 100% sure) tries to create a user instead of finding the current user and update his profile. So I think that's the issue. Checked many questions here…
manosim
  • 3,630
  • 12
  • 45
  • 68