Perl documentation (POD) browsers? [closed] - perl

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/).

Related

How to detect if a PNG was edited with PhotoShop? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 9 years ago.
Improve this question
I have a directory of screen shots of some software in PNG format. I found that one was edited in PhotoShop, or a similar tool. I would like to identify additional PNGs in the directory that were also edited. If the editor were careless, is there any batch tool that could be used to see if the files were opened and saved from PhotoShop, e.g. by looking at the metadata or other details?
A heuristic (purely empirical, this is not documented by Adobe, hence it can change from version to version) is to look for a iCCP chunk with the name 'Photoshop ICC profile'.
A quick and dirty oneliner (linux or mingw):
$ head -c 256 file.png | perl -e '$/=undef; print ((<> =~ /iCCPPhotoshop/)?
"photoshop" : "normal");'
Worked for me, but it's obviously not infalible. The head -c 256 takes into account that the chunk will be before the pixels data (and the palette if present), so as not to grep the entire image.
Bear also in mind that if the image was edited in Photoshop and afterwards edited by other editor or processor, the iCCP will probably not survive.
If you want to peek inside the PNG structure, there is this neat tool for Windows: http://entropymine.com/jason/tweakpng/
There is a website called image edited that is a quick and easy process.
totneschap stole my answer shakes fist
however I remember from my forensic days in uni, checking the metadata of the image is the best way, you can use the image edited website or you can use http://fotoforensics.com/,
we used to have a tool which would tell us edited version, dates of edit etc however I am struggling with the name of it, if I can remember I will edit the post, but the websites seem like the best answer.
Try FotoForensics. It will tell you if the image is edited or not.

IDE typing mode, emacs or vim [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
First of all, this is not a question on emacs vs vim. I use eclipse IDE for programming and I intend to continue using it. Having read many advantages of emacs and vim, especially the ability to do almost anything without using the mouse, I want to use a similar typing/editing scheme in my eclipse IDE; I'm aware that there are plugins available for eclipse to change the editing style to emacs or vim (emacs+, vrapper to name a few..).
Since I plan to continue using eclipse, the various advantages of vim and emacs like small memory foot print, vim/elisp scripting, availability on different platforms, configurablity etc are all lost. I want to import only the text editing scheme to eclipse and master it while keeping all of eclipse's features.
So, I would like to have an objective comparison of the benefits/disadvantages of only the text editing styles of emacs and vim.
EDIT: the reason I cannot move away from eclipse is because my company uses a customized version of eclipse which has specific plugins and dsls to interact with our product(hardware)
I cannot move away from eclipse because my company uses a customized version of eclipse
Please note that Vim is not an IDE (a search will bring up various discussions of this topic), therefore this dichotomy does not exist. You can very well use both Vim (for text editing) and a real IDE (for debugging, source code browsing, etc.), in parallel. A simple "launch current file in Vim" integration is quickly done, and you've already noted that there are several plugins that bring the basic key bindings (but not the huge customizability) into the IDE.
Also, it strikes me as odd that you have no preconception of Vim vs. Emacs yet. Most people breathe and live their key bindings so much that they desire them in their IDE, too; you just seem to "have heard" about those advantages, but haven't experienced them yet.
My advice: Use your IDE for work (as you have to, anyway), and try out Vim (as well as Emacs) in parallel, maybe for recreational tasks, a little scripting, blogging, whatever. You can then see for yourself whether you'll "get hooked" on one of them, or maybe the IDE will just work out fine for you. Also, time will tell whether a simple integration is sufficient, or whether you want something tight and deep like the Eclim project.
I can only tell something about vim, I have used emacs once in a while, but it doesn't seem to be compatible with me. Although I really like scheme which is a lisp dialect. Vimscript is a horror to program in, but it is possible.
The main feature vim offers is that it adds structure to text beyond the syntax of your language. You can manoeuvre, edit and transform your text with vim's movements. These are at the heart of vim and have to be learned well. This in combination of modes, makes vim a powerful tool for text editing.
On the other hand, for code editing, vim needs some modifications to be useful. You will a considerable amount of configuration. Most people keep their vim configuration in a fire and bullet-proof safe, so they will not lose their painfully built stack of options, plugins and other configurational paraphernalia. That is including me. A vimrc is quite personal. Emacs is easier to configure. I could pick it up much faster.
You have to learn a tremendous amount of knowledge to even be able to use it. Emacs is much easier, you can use it at once. My first encounter with vim was being not be able to leave the damn program, whatever I did. My second encounter, was carefully hitting i and the type some text and quickly hit :wq. But somewhere later I suddenly wanted to tame it.
Vim has macro's, which make a lot of text transforming tasks fun. E.g. this removes al spaces at the end of a line, something I sometimes run to stop the nagging of pylint about spaces:
qs:g/ $/s///g<CR>#sq
You should read this as: record a macro in register s, replace globally all spaces at the end with nothing, apply macro in register s, stop recording. When hitting:
#s
This macro will run endlessly, until you are satisfied. I still want to find one, which stops after he hunted the last space. This makes vim fun, it is a little language with one letter commands. You can combine letters together:
4f,d$
This means find he 4th comma (,) and delete (d) the line from there till the end ($). That makes it quite attractive.
I would personally go for vim, but you have to try the editors out. They have different philosophies and one of those will bite you and the other will seem reasonable. I don't believe you will find many people, who uses both and mastered both. They are both usable as code editor.
I still have emacs on my wishlist, maybe I will swap.
I would suggest reading these answers as they contain a good amount of differences between the two (although a lot of the benefits mentioned don't matter for you). I strongly suggest just trying them out.
A big difference that you will notice is that Vim uses modes, which makes it have a high initial learning curve, while Emacs is modeless, and you can use it like a normal text editor (notepad), but with added functionality. And his is where your style/preference matters. I personally don't like holding control down to move around in Emacs, where in Vim, you escape to normal mode and use hjkl to move around.
This might be of interest:
https://github.com/senny/emacs-eclim
It's a frontend to eclipse, providing Emacs features alongside with Eclipse, not just to mimic Emacs-keys only.
Some screenshots here:
http://www.skybert.net/emacs/java/

What is the native way to create a shortcut (.LNK file) from the Windows XP command line? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
EDIT!
Sorry to change the question on everyone, but I am really just asking:
How do I create a shortcut (.LNK) file from the command line with as little outside help as possible? I really don't want to run a VBscript or to download a program to do it for me. Is it really that hard?
Thanks to everyone who provided exceptional answers when I didn't really know what I was asking yet!
The original title of this question was:
Windows equivalent of Unix ln -s for
creating shortcuts from the command
line?
The original question text of this question was:
On *nix, I can create a symbolic link
to a file very easily from the command
line using ln -s.
How do I natively create a
shortcut to a file using the Windows
XP command prompt?
Note: This is not the
approach I want to take. I want to do
it the way Windows does it. I want to
do it the right way.
Windows XP and later has the fsutil command, which can create "hardlinks" to files.
See:
MSDN: Hard Links and Junctions
JSI Tip 10153: The Windows XP FSUTIL.EXE HARDLINK CREATE command
XP doesn't have symlinks. On Vista, the command is mklink. Shortcuts are not symlinks.
This is not a native Windows call, but you should probably look into Windows Sysinternals' Junction. This is a very handy tool of good quality.
If you don't want to rely on external software, you should look at kb205524 for native ways of creating junction points.
http://www.ss64.com/nt/shortcut.html
EDIT:
Sorry I deleted that. .. but that is an old NT command ... don't know if it active on XP.
I have a file called shortcut.exe on my system. Honestly, I have no idea where I got it. :-( But a quick search came up with the following website:
http://www.optimumx.com/download/#Shortcut
Maybe that will work for you?
mklink link target
Unfortunately, this only works on Vista/Server 2008 or newer.
Actually NTFS does support symbolic links. See Wikipedia NTFS_symbolic_link
Softlinks are supported by the file system used by windows.
Though this functionality is not exposed by any standard windows tools.
There are opensource tools available that can do the trick though.
Everyone seems to be beating around this bush, but I haven't seen anyone actually come out and say it yet: NTFS supports something called "junction points", which are very similar, though slightly less useful than, symlinks. These are different than both shortcuts and hard links. I use them regularly for building different versions of our software at the same location on my system (just repoint the build directory link to a different SVN checkout). The tool I use for this is called ntfslink. That page also contains a pretty good explanation of how NTFS junction points work and which versions of Windows support which features. I use it on Win Server 2k3. The ntfslink program is a shell extension, but there are other similar utilities that work from the command line. There are also Windows API functions available to create them if you want to do it programmatically from whatever app you're developing.
I don't know if this EXACTLY answers the question, but it sure makes life easier!
Go to where the program's installed. Create a shortcut to the .EXE or startup file. Put the shortcut on the desktop so you know where it is! Then drag the shortcut to the START button (in XP). When the START menu appears, drop it ABOVE the little line (so it stays visible). Hey presto - an instantly created .LNK file with Windows doing all the work for you (yes this DOES work, I've just this second done it/worked it out when I read the question here.)

Any Notepad++ plugins to automatically save document versions [closed]

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.

What's the best way of diffing Crystal Reports? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
If you have two versions of the same report (.rpt) and you want to establish what the exact differences are, what is the best way to go about this? I've seen some commercial tools to do this, but I'm not too interested in forking out cash for something that should be relatively straight forward. Can I hook into the Crystal API and simply list all of the properties of every field or something? Please someone tell me that there's an Open Source project somewhere that does this... #:-)
#Kogus, wouldn't diffing the outputs as text hide any formatting differences?
#ladoucep, I don't seem to be able to export the report without data.
Can I hook into the Crystal API and
simply list all of the properties of
every field or something? Please
someone tell me that there's an Open
Source project somewhere that does
this... #:-)
There is in fact, such an API. I wrote a VB6 application to do just what you asked and more. I think I even migrated it to VB.Net. As it was for my own use, I didn't spend much time making it 'polished'. I've been intending to release it, but I haven't had the time...
Another approach that I've used in the past is to create an Access application to help manage large, report-development projects. One of it's many features includes the ability to extract the tables that are used by the report, and the SQL statements used by its Commands and SQL Expressions. It's intent is to give one a global perspective of which reports use which tables. I probably still have it somewhere...
** edit 1 **
BusinessObjects Enterprise XI (R?) has a feature named 'Meta Manager'. It will periodically examine the contents of the Repository and save the results to a database. It uses the Report-Application Service (RAS) to generate the meta data. It's an additional, 5-figure license, of course.
** edit 2 **
Consider using PowerShell to do the work: PsCrystal.
One helpful technique is to output both versions of the report to plain text, then diff those outputs.
You could write something using the crystal report component to describe every property of the report, like you described. Then you could output that to text, and diff those. I'm not aware of any open source tool that does it for you, but it would not be terribly hard to write it.
#question in the post:
Diffing the outputs would only show formatting changes if the relative positions had changed. For example, if i had this:
before:
First name, last name, addresss
after:
Last Name, First Name, Address
Then that would show up as a difference.
But if I had just bumped the address column over a few pixels, or changed it from plain text to bold, then you are right, that would not show up.
One technique I have used to great effect in the past is to print out reports from both versions based on the same data. I then take the first page from each version, lay one on top of the other (it is important not to mix them up) and hold them up to a window. It is generally quite easy to see any differences, and these differences can be manually annotated with a suitable writing instrument such as a pencil. Repeat for each page in the report.
Admittedly, for large reports this can be quite time consuming and error prone, but these limitataions can be overcome with patience and care.