Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Does anyone know of any notepad++ plugin that saves a version of whatever I'm working on periodically? Ideally, it would save many versions with the automatic version number and the date in the title, and perhaps store them in a zipped archive to save space.
Does something like this exist already, or shold I attempt to write such a plugin myself?
Thanks,
Cameron
P.S. It should be freeware or (preferably) open-source.
Settings > Preferences > Backup tab > Click Verbose Backup
This will time stamp a copy of your file every time you save.
Update:
AutoSave allows to automatically save the currently open files based on a timer schedule (default is 1 min) and/or upon the application losing focus. The plugin offers a couple of options to save the current (or all the files), selecting only the named ones, accessible through a menu.
[Via Lifehacker]
Update2:
BEWARE: If the Custom Backup Directory you set to is deleted/moved, then the backups won't happen! No error is thrown notifying you of the dead link!
You might be better off looking into something closer to "real" version control - Mercurial, perhaps. It doesn't require a server, and it's really easy to set up.
To automate it, you could turn on autosave in Notepad++, and set up a windows scheduled task to do an hg commit every few minutes.
It seems that you are a Windows user, so you have an option of using shadow copies, but copies are probably not generated often enough.
IntelliJ Idea and some other Java IDEs have local history feature.
I personally use TortoiseSVN and svn server on Dreamhost. This had additional benefit of having my files stored off-site in case of disaster.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am working on a large project with thousands of java files, original author of project used some custom formatting to format java file which we don't have now, I tried to create a similar format in eclipse but it did't worked for me because there is still many differences, after writing code when i do press Ctrl+Shift+F it formats the document, but main problem comes when we have to merge file or compare with previous SVN version of file, because formatting of file changes, SVN shows thousands of changes which are not even true changes, and it even become impossible to merge it properly, What i want if i could extract format XML by giving my java file is it possible , Reverse engineering.
I don't know a way to reverse engineer a XML file from your code, but here is what you can certainly do:
Check out the code and freeze the trunk so that noone else can commit the code
Apply whatever formatting rules you want to apply - and apply this across your codebase
Once you have done formatting changes- do whatever sanity checks you do before committing code (Like build, basic tests etc.)
Now commit this code as "Formatting changes only- NO CODE CHANGED" - that way you have a logical commit of only formatting changes
Now ask other developers to update their codebase. Thus you will have changed to new formatting rules without affecting anything.
Also whatever rules you have in XML - ask other developers to implement in their IDE - so future commits are consistent in style and formatting.
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
My java code which almost spanned 3000 lines was open on Eclipse code window as I was working on that. Suddenly my PC froze and I had to restart it. Later when I opened eclipse it threw some error saying some org.eclipse... file was corrupt, dint bother to write it down, my fault :(
But later it showed "could not read metadata for workspace dir.metadata.plugins\org.eclipse.core.resources.root.indexes\properties.index" in my java code file.
I restarted eclipse to get rid of the error, but the result was disastrous; the java code file was empty. My worry is, after my last backup, I had done a lot of changes to it here n there.
Finally I could figure it out. jst need to compare with local history :P
Am not sure if this will work but you can give these 2 methods a try:
Right click file-->Team-->Show local history (Try to look for the file in "history view")
If this fails,try
2. Manually go to "Eclipse workspace.metadata.plugins\org.eclipse.core.resources.history"
You can find a list of folders named with few letters, use the “Date Modified” column and open the latest of those folders to get the recent files you were working on.
In that folder, you can find some files with unusual naming, open the files with some text editor to find the file you are searching for, if possible try to match the file size.
Let me know if this helps.
:)
Welcome to Stack Overflow, Johny
I think you may find your code in your 'Local History'
Refer :
How to recover Java file from Eclipse Project that damaged by getting power off?
eclipse recovering from crash
http://www.coderanch.com/t/473927/vc/recover-java-File-Deleted-Eclipse
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I'm looking for is a good on-screen POD reading experience.
For years, I've used perldoc or man running in an xterm to read Perl documentation on screen, and a small custom program built around Pod::LaTeX to print it. The printed version is good: the script does a nice job. However, on-screen reading is painful:
You can search, but good luck finding e.g., the as section in DBIx::Class::ResultSet. Less doesn't know anything about the structure of the document, and searches for common English words are pointless.
I fear every time the document tells me see section so-and-so. Great. Now I have to find that. And then getting back to where I was won't be trivial (though that may be my less ignorance showing)
See document so-and-so is worse. !perldoc foo works, but switching between the two documents is then hard. You can mostly get around this by suspending less and running perldoc from the shell, but that's more keystrokes and I'm lazy.
Formatting leaves a lot to be desired.
I want to be able to click a table of contents, and go to that section. I want to be able to click that "see other" and go there. And so on. So far, I know of two possibilities:
search.cpan.org, example DBIx::Class::ResultSet. Requires an Internet connection, but that's not normally a problem.
Podbrowser. Just started trying this, looks pretty nice.
I'm running Debian GNU/Linux, both Lenny and Squeeze. But please suggest programs for all platforms to make this as useful as possible.
You can try Pod::Browser which is built-in http server that you can connect to with your browser, or something like Tk::Pod which is gui pod browser.
Have you seen CPAN::Mini::Webserver or Pod::POM::Web or Apache::Perldoc? These set up a local way for you to see nice, HTML versions of your docs.
I would recomment converting all your POD to HTML using pod2html
This makes it browsable, linked and nice looking, and you can customize look&feel via css.
Just to add two more POD servers that seemed to have been missed thus far!
Pod::Server
Pod::Webserver
Have a look also at Gtk2::Ex::PodViewer that is an excellent GUI viewer based on GTK. If you are using also Windows you can find a prebuilt wrapper in Camelbox (http://code.google.com/p/camelbox/).
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 13 years ago.
Improve this question
I'm using eclipse, when i close eclipse, it ask me save a file, I press yes and eclipse shuts down. When I open my computer I see that the drive only has 3 bytes left, and I get a bad feeling. I go to my file and oh my god, it's totally blank, size is 0 byte! :(
I need that file back, can a free recovery program can work on this case?
Sometimes Eclipse keeps the changes it made to the files you edit. Does not always work but it's worth a try :
Find you file in your (package, project, navigator) explorer.
Right click on your file and look for the menus to compare... (I recommend Compare though in your case it will not matter since the file is now empty)
Choose Local History... from the sub menu
If you are lucky and had been using Eclipse to edit the file you should find a few entries there. Look them up, chances are you will find the content.
This has helped me countless times and saved my ass on many occasions. However, every times I resort to it I always feel like hitting my head with a baseball bat for not commiting changes to the source control system earlier.
good luck, if that does not work I fear the SO will not be of much help to you :-(
--- EDIT ---
Little something that can help make this trick a tad bit more useful.
you can change the amount of information Eclipse keeps in local history, go to your preferences and then general->Workspace->Local History (Indigo here, may be different on other versions). If you tend to be light headed or burn the midnight oil a bit too much this will help you repair the next day that bug fix you insisted on finishing before going to sleep.
If you know some phrase or uncommon word from your file, you can search the raw sectors of the hard drive for pieces of text. This will turn up the text anywhere it might have been written: as paged out virtual memory, as a stil-existant file (temp file or saved file), or as temporary or saved file that was deleted and the space has not yet been rewritten.
But it will be slow. And if the file was never written to disk, it will yield nothing. And what it yields may be fragmented or incomplete.
Boot a Knoppix CD and start grepping! Knoppix is a linux installation that runs from CD, without writing to your hard drive.
get knoppix: http://www.kernel.org/pub/dist/knoppix/KNOPPIX_V6.0.1CD-2009-02-08-EN.iso)
Boot it. Start a terminal. Search the hard drive:
$ sudo grep "Four score and seven years" /dev/hda
If it turns up anything, copy and paste to a text editor, and save to usb stick or send it to yourself via web-based email.
If you have SCSI or SATA disks, you need to use /dev/sda instead of /dev/hda
The other answer is correct, every moment that OS continues running decreases your recovery chances. pull the power and use another computer to prepare the knoppix CD.
First, turn off the computer. Every second that it is on and being used at this point reduces the chance you'll recover your file.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
It's very painful to add multiple tickets to Trac or to have it as your own todo list. That causes people to use their own task management tools so tasks are then spread all around.
Is there any plugin or macro that would quicken the process of adding a ticket?
The following allows you to type a quick note. The note becomes a Trac ticket, assigned to yourself. I use this for very quick bugs and/or features I don't want to forget. Or, if I make up a feature I open then close a ticket for it, so I get full credit :)
- j
#!/usr/bin/env python
'''
trac-bug: add bug/feature to current Trac project, from the command line.
Specify Trac project directory in TRAC_ENV environment variable.
'''
import os, sys
TRAC_ENV = os.environ.get('TRAC_ENV') or os.path.expanduser('~/trac/projectenv')
if not os.path.isdir(TRAC_ENV):
print >>sys.stderr, "Set TRAC_ENV to the Trac project directory."
sys.exit(2)
from trac.env import open_environment
from trac.ticket import Ticket
t = Ticket(open_environment(TRAC_ENV))
desc = ' '.join(sys.argv[1:])
info = dict(
status='open',
owner=os.environ['USER'], reporter=os.environ['USER'],
description = desc, summary=desc
)
t.populate(info)
num = t.insert()
if not num:
print >>sys.stderr, "Ticket not created"
print >>sys.stder, vals
sys.exit(1)
print "Ticket #%d: %s" % (num,desc)
sys.exit(0) # all is well
Usage is brief:
$ trac-bug out of beer
Ticket #9: out of beer
If you're using Eclipse: Mylyn is perfect.
Otherwise you could always get the XML RPC plugin. http://trac-hacks.org/wiki/XmlRpcPlugin and roll your own little tool.
For quickly creating similar tickets, you could use the Clone plugin: http://trac-hacks.org/wiki/CloneTicketPlugin
Edit And I second Espen's idea with the SVN checkin hook, it works great for us, as well.
You could try using EmailtoTrack, so you can create tickets just by sending emails.
(Another neat track tip, if not directly related to your question, is to use a commit hook with your version control system so you can close tickets by doing commits. I've only tried this one for SVN, but it shouldn't be hard to port.)
There is also a command-line trac ticket creator on track-hacks, you have to run it on the same machine as the trac repo resides. I find the command line addition to be much faster than the web-based one.
http://trac-hacks.org/wiki/TicketToTracScript
Meanwhile one programmed TicketImportPlugin which creates or updates multiple tickets in one user interaction from Excel table.
If Mylyn is working for you, consider checking out http://tasktop.com too. Tasktop extends Mylyn with powerful productivity features such as automatic time tracking, web browsing support, email and calendar integration, and more.