How can I index my source code? [closed] - full-text-search

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 8 years ago.
Improve this question
Are there any tools out there that will index source code, client side, and provide blazing fast search results?
How can I index our internal source code? is related but covers server side tools.

Everything and Locate32 are nice indexing-tools on the windows platform. Just one problem, they only index the file-names.
DocFetcher is another solution, it tries to index the content of the files, but have big memory issues as it cannot index the content of bigger files, and just skips them
I'm also on the search for something to index my data, and i want some tool like locate32 wich is supernice to integrate with the windows shell, but it would be nice to get it to index the content of files also, only brute word indexing, no magic to be done to the data, but let me do plain wildcard searches, like words starting with, ending with, and containing.
But the search is still on.. (for an app, that is..)

Install ctags.
Then ctags -R in the root of your source tree. Many editors, including Vim, can use the resulting tags file to give near-instant search results.

I know this is an old question, but maybe this will help someone else.
Take a look at CodeIDX: http://sourceforge.net/projects/codeidx/.
Using CodeIDX you can index multiple directories using filetype filters and search the created index.
You can open multiple searches at the same time and the results can be viewed in a preview.

Using GNU Global you can get browsable, searchable source code. You can run this locally too or use all the tools that go with it (like less to go straight to a function definition).
See http://www.tamacom.com/tour/kernel/linux/ for an example of the Linux Kernel.

Related

Easiest Way to Find XPath Of An Element [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 4 years ago.
Improve this question
I am learning Scrapy and wondering is there some existing tool - probably Chrome Maybe Web Developer or Firefox plug-in to quickly get the XPath of a web element. Or the best way to go is learn Xpath and build the Xpath yourself from scratch.
For Chrome...
There are plugins such as XPath Helper that can produce an XPath to a given element on an HTML page. You can also right-click on an element in a page and pull up its position in the Elements tab. From there, you can right-click and select Copy XPath.
And to really learn XPath, I'd recommend directly writing your own from scratch. You can select nodes directly from the console by using $x(). For example, here's how to select the search form on this page:
> $x("//form[#id='search']")
[<form id=​"search" action=​"/​search" method=​"get" autocomplete=​"on">​…​</form>​]
Note that the form element will be expandable interactively in the console.
Here's how to select all of the text nodes on this page that contain the word Thanks:
> $x("//text()[contains(.,'Thanks')]")
["Thanks a lot!", "Thanks for contributing an answer to Stack Overflow!"]
Note that you'll get more matches than I originally did if you try it on this page. Strange loop.
Here's how to select the number of votes this answer has received:
> $x("//div[#id='answer-18839594']//span[#class='vote-count-post ']/text()")
["0"]
Note an unfortunate robustness issue where vote-count-post must include a trailing space to mirror the current source. Note also the unfortunately low value returned by that XPath. ;-)
There is no such thing as "the XPath of an element". There are a variety of paths you might be interested in. The shortest machine-executable path is probably along the lines *[3]/*[1]/*[2]. The most readable path is something like chap[3]/section[1]/para[2]; but this may be dependent on the namespace context. For a context-free path you might want *[local-name()='chap' and namespace-uri()='...'][1]/*[local-name()='section' and namespace-uri()='...'][3]. But sometimes when people ask for "the path", they just want chap/section/para, that is, a path that selects many elements including the target element. But for some purposes, the most usable XPath expression might be id('Intro').

Auto-Completion [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
How does Google or amazon implement the auto-suggestion at their search box. I am looking for the algorithm with technology stack.
PS: I have searched over the net and found this and this and many many more. But I am more interested in not what they do but how they do it. NoSQL database to store the phases? or is it sorted or hashed according to keyword's? So to rephrase the question: Given the list of different searches ignoring personalization, geographic-location etc, How do they store, manage and suggest it so well.
This comes under the domain of stastical language processing problems. Take a look at spelling suggestion article by Norvig. Auto - completion will use a similar mechanism.
The idea is that from past searches, you know the probability of phrases (or better called bigram, trigram, ngram). For each such phrase, the auto complete selects the one having max value of
P(phrase|word_typed) = P(word_typed|phrase) P(phrase) / P(word_typed)
P(phrase|word_typed) = Probability that phrase is right phrase if word typed
so far is word_typed
Norvig's article is a very accessible and great explanation of this concept.
Google takes your input and gives TOP4 RESULTS ACCORDING TO THE RANK IDs [if results are less it returns parameters as empty strings] given to different keywords which differ dynamically by the hit and miss count.
Then, they make a search query and returns 4 fields with url, title, and 2 more fields in Json, omnibox then populates the data using prepopulate functions in Chrome trunk.

Trying to find a reference to the manual but can't [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 5 years ago.
Improve this question
Simple question, what is the best way on windows to search the documentation. This time I was wanting information on 'while'(resolved now by google) but I still can't can't get ri or the chm documentation on windows to give a result to while.
If I type in the Keyword in search in the chm it doesn't return 'while' it returns many results but not 'while' same for index search.
so In installed ri.
>rdoc --all --ri
but if I search while
C:\Ruby193\bin>ri 'while'
Nothing known about .while
I would like to read from the official results. Whats the best?
Also tried ri interactive but same result.
C:\Documents and Settings\renshaw>ri -i
Enter the method name you want to look up.
You can use tab to autocomplete.
Enter a blank line to exit.
>> while
Nothing known about .while
>>
That's because ri gives you information about methods, and not language syntax. while is Ruby's keyword, just like begin. If you try you won't find anything about begin in ri. Instead you can try ri File::read for example.
For Ruby core language keywords and topics, use the ruby: prefix.
If you ran ri ruby:while, you would get a list of pages. In that list is syntax/control_expressions.rdoc, which probably contains the information that you want.
ri ruby:control_expressions
Gives you the documentation for core Ruby control expressions (which includes while).

Printing source code on Windows [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
What is the best Windows program to print out source code (more generally, text files)? I'd like the following features:
Includes line numbers
Option of printing 2 or 4 pages on a single sheet of paper.
Header includes filename and timestamp.
Notepad++ is an excellent tool for this (and it's free!). You can print the code out both in normal text, as well as marked-up with colour as you see it on the screen!
I tried the suggested Notepad++ and Codex, but I find them too limiting.
I could not print two columns per sheet in either one of them.
I like to maximize the amount of code per sheet.
A decade ago I would use pcps to print multiple columns of source code, but that software is just too old and cumbersome in this day and age.
For now, I would suggest this, if you want multi column output: http://www.lerup.com/printfile/
UltraEdit works pretty well for all three of those.
www.ultraedit.com
I use Context for most of my non-Visual Studio development, and it does what you asked for and is free. I don't know how well it does color, but the source code colors print in a couple of varying boldnesses, which makes it pretty readable in black and white.
I just use the printer dialog to set the multi-pages per sheet option.
I'm using Codex: http://www.snapfiles.com/get/codex.html
Works pretty good, can both print and publish (export to HTML).
Crimson Editor looks great too!

Where can I find a good template for a software application user guide? [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 5 years ago.
Improve this question
Looking for links to resources that will help me write a user guide for a software application. I'm after something that will help me to structure my guide, give it an appropriate writing style, and ensure that it has an excellent look and feel throughout.
This link has some strong points. Each point is presented with clear speech and with inline justifications.
When writing procedures, use the
active voice (e.g. Click this) and
address users directly (write "you"
rather than "the user").
When explaining an action, use the
"command" form of the verb:
"Choose an option from the menu and
press [ENTER]."
http://www.klariti.com/technical-writing/User-Guides-Tutorial.shtml
Here is the complete list of the topics covered on the aforementioned article:
Front Page (cover pages)
Cover and Title Page
Disclaimer
Preface
Contents
Body of the guide
Procedures
Writing procedures
Chunking text
Number your steps
Using the If-Then Approach
Reference Materials
Back Matter
Glossary
Index
Establishing Standards
Document Format
Structure Style
Technical Language
Addressing the User
Presenting your material
Special Requirements
For structure and look+feel, consider using a framework such as DocBook.
DocBook uses an XML markup schema that makes you think about how your document should be arranged. There are XSL transformations to convert it to common formats like HTML and PDF with a whole load of config options to make it look the way you want. And it's open-source (free). There are downsides of course: the schema's pretty big, and editing can be hard work without a good XML editor.
Examples: http://wiki.docbook.org/topic/WhoUsesDocBook

Resources