Getting version of Ruby when a feature was added - ruby

Is anyone aware of how to retrieve the exact version (major, minor, patch) that a specific feature was added/removed/altered to the Ruby language?
Obviously one could comb through the history to find out, which is not ideal, and can be cumbersome to navigate. Was curious if anyone might know a better way to do it, as the documentation doesn't state when a method, class, etc. was added.
When documenting my own gems with YARD, it is easy to just add a #since tag to clearly show when something was added, but the Ruby API doesn't seem to have any such mechanism in its own documentation.
When writing gems, it is obviously handy to know such details when managing dependencies, and I was hoping there was a simpler solution, such as simply typing a method name into a website, and seeing the exact version it was added.
To clarify, basically a "changelog" for any item. For example, type in method name, see log of when it was added, changed, deprecated, removed, etc.
A prime example would be something akin to .NET Core's Reverse Package Search.

I was just doing this, unfortunately my answer is what you were hoping to avoid.
I was looking through history, but able to use GitHub's handy Blame feature to help track down when a specific line was edited. With this I could open the file in question click "Blame" and see when it was last edited/created.
Was a great way to track down when Exception2MessageMapper was added to the standard library. It was 17 years ago, as part of v1.4.0:
https://github.com/ruby/ruby/blame/trunk/lib/e2mmap.rb#L55

Related

Check if WM_PARENTNOTIFY is deprecated API?

According to docs WM_PARENTNOTIFY seems to be deprecated, this sounds unusual but if this is the case then what API does replace it?
WM_PARENTNOTIFY message
It's not deprecated, you just happen to hit a bit outdated link.
The most recent I believe is this one.
You seem to have gotten confused by the disclaimer on this documentation entry. There are two parts to it:
We're no longer updating this content regularly.
This refers to the documentation itself. It got frozen at some point, when Microsoft decided to change their documentation site for the n-th time (with n > 3). Though it's probably the second part that had you confused:
Check the Microsoft Product Lifecycle for information about how this product, service, technology, or API is supported.
Since this documentation no longer receives updates, there's no promise made as to whether the content still applies. It could (and generally is) still accurate, but it could be wrong or outdated as well, and you would need to check elsewhere.
That elsewhere is here: WM_PARENTNOTIFY. It would certainly be nice to have the old documentation auto-redirect to the new content (and sometimes this works, too, easily identifiable by a query string that contains the redirectedfrom=MSDN parameter). If in doubt you can identify up-to-date documentation by an Edit link at the top right corner.

How to configure PythonAnalyzer to look for standard library typings?

I am creating a PythonAnalyzer using the following code:
var interpreterFactory = InterpreterFactoryCreator.CreateAnalysisInterpreterFactory(
PythonLanguageVersion.V36.ToVersion());
var analyzer = PythonAnalyzer.Create(interpreterFactory);
Later on I also create and analyze a simple python module, that looks like this:
name = input('What is your name?\n')
print('Hi, %s.' % name)
Then I do module.Analysis.GetValuesByIndex("name", 4).
At this moment I expected the "value" to be 'str', because that's what Visual Studio shows when I open the same file in it. However, I get 'object' instead. So it seems that the PythonAnalyzer when constructed as mentioned above lacks some important information about where to look for standard library and/or its types.
Unfortunately, the documentation on PythonAnalyzer is lacking, so I was hoping the community could help understand how to configure it properly.
Congratulations on getting so far :)
What you're hitting here is the fact that CreateAnalysisInterpreterFactory is really intended for "pure" cases, where you have access to all the code that you're trying to analyze and nothing needs to be looked up. It is mostly used for the unit tests, or as a fallback when no copies of Python are installed. Depending on precisely which version of PTVS you are using, the bare information you're getting is either coming from DefaultDB\v3\python.pyi or CompletionDB\__builtin__.idb, both of which are somewhat lacking (by design).
Assuming you have a copy of Python installed, I would suggest creating an instance of InterpreterConfiguration with all of its details, and passing that to CreateInterpreterFactory (without "Analysis").
If you're on the latest sources (strongly recommended), this may run the interpreter in the background to collect information from it (you can control caching of this info with the DatabasePath and UseExistingCache members of InterpreterFactoryCreationOptions). If you are using the older version still, you'll need to trigger a completion DB regeneration or have one that you've created through VS.
And a final caveat: this part of PTVS is currently under some pretty heavy development at time of writing, so you'll either want to keep updating the version you're working against or stick with a slightly older one. Also feel free to post questions like this on the GitHub site, as while this is technically public API, it's barely documented at all and so the best help will come from the dev team.

How to modify com_mailto to fit out needs

I'm developing a site for my company and I also need to modify the native component "mailto" to fit our needs.
I'm working with a joomla 2.5
I was wondering if future updates occur, what will happen to the lines I've added, for example, in "\components\com_mailto\controller.php"...
I haven't find answers on the net.
Also, for the same reason, I've modified the default layout of an article. Should I rename it? and if yes, how, because I couldn't do it (when I've tried the article did not display).
Thanks for your help
Before starting to edit core Joomla components, should should always have a look at the options you have. I don't believe in editing core file as it simply causes problems for updates when released, therefore in my opinion, you have 2 options:
I always make a note of all my requirements and start looking for a 3rd party extension that caters for my requirements.
If I cannot find a 3rd party extension and don't particularly want to start digging into it's code, I would go with developing a plugin. Plugins are used to manipulate the behavior or something and therefore come in extremely handy for when you would require core editing.
Editing the layout of an extension view is completely fine, but it's strongly recommended you make a Template Override so that if the extension does ever get updated, your changes won't get overridden.
So to answer you initial question, any line you have added to the controller.php file will get overridden when you decide to update the extension.
Hope this helps
While the answer from Lodder is totally valid, as a last resource you can also consider forking the com_mailto as a separate component.
This has some disadvantages:
you need to rename all the files involved (controllers, models, views)
you need to maintain it and keep in in sync with future updates (consider than you are now on 2.5.x and in a year you might want to upgrade to 3.x).

Any modern, newer, better alernatives to Ariel Flesler's scrollTo/serialScroll?

I'm using both scrollTo and the "child"-plugin serialScroll quite frequently, and like them because they
Actually SCROLL things, rather than animating css-properties (margin/position etc)
Are flexible and can be used in many different situations, unlike lots of other scroller/sliders that adds a bunch of bells and whistles that you don't really need.
Thing is, the plugins haven't been updated since 2009, and although they still work just fine, regardless of jquery version, there are things that could need improving (like the ability to change settings after initilaisation), and overall it doesn't fell optimal to use a 3 year old plugin, solid and stable as it is.
Does anyone have a suggestion of other plugins that might do the same thing, perhaps better?
http://flesler.blogspot.se/2007/10/jqueryscrollto.html
This is an old question, but for the record, as Shauna said, the plugins aren't outdated, OP might have been looking at Google code hosting which is indeed out of date.
The plugin is now hosted on Github. There's no much of a need to update it too often given it's very stable already, but I do land some commits every now and then when needed.
I don't have a suggestion for anything better (even Google is coming up with Flesler's plugin or hand-written from base JavaScript or jQuery), but Flesler is still updating the plugin. You can find the latest version in GitHub.

What do I need to know to create Xcode project templates?

I know some of the tutorials for creating Xcode project templates, for example this one here: http://robnapier.net/blog/project-templates-364
This is the best one I could find. All others basically repeat the same info, or are no longer up to date, or worse tell me that even they don't know what they're doing. Possibly useful tools that are linked to here and in other places are no longer available.
I keep running into roadblocks, and would like to gather as much information as possible on the process of creating Xcode project templates. Info that is most importantly up to date (at least it must be relevant for Xcode 3 or higher).
For example, what I'd like to see is:
a description of the
TemplateChooser.plist and similar
plist files and what these options do
(in my case, once I add a
TemplateChooser.plist, my project
disappears from the Xcode project
template list)
how to create a project template that references another .xcodeproj (when I do that, the other .xcodeproj appears in the project template list even though it doesn't use the special naming convention)
processes that can be applied, for example is it possible to run a script during the creating of a project from a template? This would be useful to unzip certain files into the newly created project.
If you have the answer or suggestions to any of the issues above, I'd appreciate that. Otherwise any link to good Xcode project template resources would be highly recommended. Especially if there is an official documentation from Apple - I haven't found one yet which seems to imply that project templates are undocumented.
Have you seen these:
http://www.sodeso.nl/?p=895
http://www.codeproject.com/KB/iPhone/CreatingXcodeProject.aspx
If you say you have searched, I'm pretty sure you've already seen the links but these are the best resources I could find with my 'googlabilities'
You might try contact this guy - http://linkedin.com/in/mottishneor he has some related messages around the web
The links suggested by FX are also not bad at all!
There is indeed little XCode template info out there. What I have found of interest are the following links (I documented myself on the topic, but haven't yet gone any further):
a Google Code search reveals a few examples, but not much
in particular, I found interesting to look at the code provided by Three20; they have some basic examples, like here
referencing another project worked for me, so maybe you could open a specific question about that giving more details?
there is information scattered on the Apple mailing-lists
there is no official documentation from Apple, as is evidenced by the lack of results to this query
I'm sorry if this is not a Enlighting, concise answer. As you said, it's not well documented, and sources are all over the place. I just hope I could highlight some places to find information that your own searches might not have reached :)
I don't have a Mac anymore, so this is as much as I can give you without testing this myself. As far as I can tell, Xcode templates are undocumented by Apple.
This guy has some guides for messing with Xcode templates but the info is pretty sparse. My suggestion for working with templateChooser.plist is to try to only edit that file in the interface builder.
This guide is a good example of how to add a reference to another .xcodeproj. For the reason you were having trouble adding a reference to your project we probably need more information.
If you scroll way down in this doc you can that each template already includes a script called myscript.sh. This script will show up in the scripts menu for projects built with that template. That isn't quite as convenient as running scripts automatically, but it's better than nothing.
In conclusion, Xcode template documentation is a nightmare. It looks like there are a lot of powerful features there, but they are obscured because of lack of user friendlyness and because documentation lags far behind Apples updates of Xcode. It just doesn't seem to be a priority for them. I hope this helps.
And yet another video link http://howtomakeiphoneapps.com/2010/10/how-to-make-custom-xcode-templates-with-video/

Resources