Where can I find documentation on NumPy's delineation of its directories? - numpy

This may be a stupid question, but...
Where can I find a simple explanation of what goes under 'lib,' vs 'core'? How do I know whether a function goes under fromnumeric.py, or function_base.py? Some of the .py files have explanation strings at the beginning, but others do not.

You may double check the numpy/reference and numpy/user guides.

Related

Comments that control uncrustify behaviour

In this question (https://stackoverflow.com/questions/15097501/can-uncrustify-be-prevented-from-modifying-certain-sections-of-code) i learned that i can use *INDENT-OFF* to exclude uncrustify action on certain parts of code.
Unfortunately i was not able to find this information anywhere else.
Does anybody know where i can look this up? Are there other comments which control uncrustifiy behaviour?
The *INDENT-ON* and *INDENT-OFF* are defined in the uncrustify_types.h file in the source code
See also Ben Gardner's comment: https://sourceforge.net/p/uncrustify/bugs/343/#0394

How to create documentation for instance variable and methods in Xcode?

I'd like to be able to Alt-Click an instance variable (or a method) as part of the program i created and read what it's purpose is.
The fact that Xcode is telling me the class variable is declared at - is nice but not enough. In this case i'd like to see custom text i typed to describe what an asset really is. Additionally type of the ivar would also be useful to know.
How can this be done? In this case, i wonder what exactly did i mean by assets
I specifically wonder if this information can be viewed from inside Xcode, similar to how Eclipse shows JavaDoc content.
You would need to create a documentation set for your project and install it in Xcode. appledoc can help you with this. This is a command-line tool that can generate documentation in Apple's style from specially formatted comments in your headers. You can also integrate this into your build process with a run script build phase, so that documentation is always up-to-date.
For small projects, it's usually not worth the effort though and you're probably better off just adding comments to your header files and jumping there with Cmd-click (Ctrl+Cmd+left-arrow to go back to where you came from).
You'll probably want to take a look at Apple's documentation on Documentation Sets as well as their article on generating doc sets using Doxygen. The latter is based on Xcode 3.x, so how relevant it is is somewhat questionable, but it'd be a good idea to take a look nonetheless.
That said, if you decide to use Doxygen (alternatives like HeaderDoc can be used for documentation, but I'm not sure what's available to you as far as creating doc sets goes), it looks like the main point is you'll want to throw GENERATE_DOCSET=YES into your Doxyfile (or whatever you decide to call it). After that, you'd just throw the results into ~/Library/Developer/Shared/Documentation/DocSets (according to Doxygen's documentation). I don't know whether this works in Xcode 4.x - it's worth a shot though, and it'd be nice to hear back on it.
Note: most of this was based on this answer by Barry Wark. Figure credit is due there, since I wouldn't have bothered looking into this were it not for his answer.

Difference between (plain) Classworlds and Plexus Classworlds?

Can anyone please explain the difference between plexus-classworlds and (plain) classworlds?
These two are confusing and can't see the difference. Plexus classworlds contains almost no description. Apparently, a maven-based Java project uses both, I don't understand why.
Is it possible to replace classworlds with plexus-classworlds without much hassle?
I'm gonna answer that, even though the question is so old...
classworlds was migrated to plexus-classworlds, but the documentation on the site doesn't seem to keep up with that... the best docs I've seen was on classworlds 1.1-SNAPSHOT, although the current is plexus-classworlds 2.4.1-SNAPSHOT, and there is hardly any doc there.
if you look at plexus-classworlds, you can also see the original org.codehaus.classworlds package, with class comments like this:
A compatibility wrapper for org.codehaus.plexus.classworlds.launcher.Launcher provided for legacy code
which means that they thought about migration, but of course nothing replaces a thorough test.

Weird function names in Quartz Core: what gives?

Out of curiosity, what may the rationale behind these function names (found in Apple's Quartz Core framework) be?
ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv()
ZNK2CA6Render9Animation9next_timeEdRd()
ZN2CA11GenericRectIiE5insetEii()
Do you think the developers somehow encoded argument types in function names? How do you find yourself putting "EP19" in there in the course of day-to-day coding? In what circumstances do such barely readable function names actually help you read code and otherwise be more productive?
Thanks in advance for any hints, and Merry Christmas!
These 'mangled' names are automatically generated by the C++ compiler and indeed encode type information.

Visual Studio - automatically add necessary spaces to comments

When I'm writing comments in my code, I often forget to add the initial space after the comment identifier.
'this is a comment
when really it is supposed to be
' this is a comment
I realize this is quite trivial, and you could simply say "just add the damn space you idiot", but I'd really like to automate this so that I just don't have to worry about it.
Can anyone point me in the right direction of an elegant way to add the comment space?
note I do realize that a catch all string replace or regex replace could screw up other things ... IE:
Dim something As String = "I'm a nerd"
would actually come out
Dim something As String = "I' m a nerd"
So the way I see this being resolved is if it's only on a line by it's self and is not followed by a second single quote... IE: '' would not trigger the replacement.
You could always get a copy of resharper and one of the rules in there is what you are describing. Once you finish with your code you can do a format on the whole file or even solution and it will globally fix that rule for you.
This would be a pretty good case for an editor extension. You can detect when a line is whitespace, apostrophe, not white space and either insert the space or put a decoration so you will learn to follow the pattern. If you've moved to 2010, consider it - they are really pretty easy to write.
I had and have similiar problems. This is a habit which you can change. Yet, sometimes your brain is just wired to make the same mistakes. For instance, no matter what I do, I always type data instead of date.
You can change your behavior. Find some method that you find helpful for changing habits. Create a "personal code review" checklist and add this item. After a few months, you will find the space comes naturally.
If this is one of the "hard-wired" brain goofs, then create a *Visual Studio" macro that visit's CodeDom. Through the CodeDom namespace it is easy to find comments and make changes as needed. Why use regular-expressions?
If you want to use regular-expressions, because you are familiar and it is easier, then create a better expression to avoid potential errors.
Refactoring VB.NET code with regular expressions at http://www.vbmigration.com/Blog/post/2008/07/Refactoring-VB%2cNET-code-with-regular-expressions.aspx should be helpful in creating better regular-expressions.