I have seen programmers using comments like following format:
/*! This is a sample comment
*/
I have seen such comments for the first time while ios development i.e in objective-c.
What is the significance of '!'(exclamation mark) here?
That's the introductionary tag for HeaderDoc
You usually see it in a comment that is "linked" to a method, function or variable.
e.g.:
/*!
This is a comment about FunctionName.
*/
char *FunctionName(int k);
If you use those comments in Xcode 5.1 you can have those documentation popovers (Option + click on methods) for your own code:
So expect to see those things more frequently in the future. :-)
And if you want to use them yourself, I would recommend to have a look at VVDocumenter, a Xcode plugin that makes the creation of those a bit easier.
Related
I used to use "iter_dialogs" to get a list of available chats. But this method has stopped working. Can you suggest an alternative? And is it possible to get a list of report-bots to write to them later? I will be very glad of any help.
iter_dialogs() doesn't work anymore, as it has been replaced by get_dialogs(). See Pyrogram's Release Notes for v2:
Iter_ methods have been removed:* This means there is now only one way of iterating through items by using the respective get_* methods which are all turned into generators. Some of the methods have been renamed as well:
iter_history becomes get_chat_history().
iter_chat_members becomes get_chat_members().
iter_dialogs becomes get_dialogs().
iter_profile_photos becomes get_chat_photos().
As for your second question about report bots, I have no idea what you're talking about there. You might want to edit your question to add more detail.
I would like to know if Kamcord can also be used to share screen snapshots? If yes, how can this be done?
I have not done it yet, but I believe you are looking for what is handled by two functions defined in their headers:
+ (UIImage *)snapshot;
+ (BOOL)snapshotNextFrameWithCompletionHandler:(void(^)(UIImage * image, NSURL * imageURL))handler saveToURL:(NSURL *)destinationURL;
Check out their header for a description of those functions purpose:
https://github.com/kamcord/kamcord-ios-sdk/blob/master/Kamcord.embeddedframework/Kamcord.framework/Headers/Kamcord.h
(This is all as of v1.7.6)
You are going to have to decide when to call that (i.e., when something interesting happens in your app worthy of a single image.)
Send an email over support#kamcord.com to confirm. They are super responsive to questions like this.
Edit: Cleaned up grammatical errors
I've noticed that Xcode 5 now parses method documentation automatically. For example:
/**
Fetches a conversation with user.
#param user The other user in the conversation.
#return A conversation
*/
+ (Conversation *)conversationWithUser:(User *)user;
It supports multiple # tokens (don't know how to call them). For example:
#warning
#note
However, I still haven't found a way or what format this is, so that I can add bold text, or italics, or links.
Does anyone know what documentation format this is?
I found out how to get bold and italics. It uses this doxygen format. It doesn't seem to recognize all commands, but some work:
/**
Resumes \b network operation queues.
*/
- (void)resume;
The \b there would make network bold. \a yields italics and \c monospaced text.
According to the new features in XCode 5 (Under Documentation):
Project documentation from framework API reference documentation and structured comments in your own source code are displayed in the quick help panel and in code completion popover views. Doxygen and HeaderDoc structured comments are supported formats.
You can check the Header Doc User guide.
Apparently, it uses a subset of these features, many of them don't work.
It's not complete. It doesn't support all doxygen tags at the moment -- only a basic subset.
In the meantime, you can use flags like -Wdocumentation and -Wdocumentation-unknown-command (or better, start with -Weverything and reduce), and clang will notify you if it encounters something which is unrecognized or malformed. If you want a complete list of what tags are available, I would check the trunk.
I have an iOS App disassembly which has the following block:
There are 'greyed out' comments in the picture of great interest which we want to capture from IDAPython. Such as which selectors are used on imported Framework objects such as UIWindow, CLHeading etc. IDA python however only has calls to get Repeatable comments, regular comments and function comments. Any idea which idc/idapython function gets this 'greyed out' comments? I assume they are repeatable comments from somewhere. Thanks.
UPDATES
The grey out comments are repeatable comments so I tried following the labeled address (selRef_setLastHeading on the third line) to the repeatable comment and arrived at this line:
However, when I did a RptCmt(here()) at that address, I was expecting #selector(setLastHeading:) to be returned as the comment but it returned an empty string..
The grey comments are repeating comments from the referenced item, thus for the first grey comment on the third line, if you went to the selRef_setLastHeading_ it should have a repeating comment.
If this was in a structured data block, I'd say read the address and then use that for the comment request function (sorry no IDApython experience just IDC script). but as they are an operand of an instruction, for this type of thing I'd tend to write a script that had a switch based on the instruction so you knew how to decode the reference address.
I'm found a stupid way to get the grey comments,something likes below.
widget = ida_kernwin.open_xrefs_window(pk_ea)
title = ida_kernwin.get_widget_title(widget)
ida_kernwin.close_widget(widget,0)
print(title)
In org-mode, I have defined a figure+caption like this:
#+CAPTION: My great figure
#+LABEL: fig:myfigure
[[myfigure.png]]
How do I write "See figure [myfigure]"? I've found the following syntax:
See figure \ref{fig:myfigure}
but this looks ugly in the source file. In particular, you cannot use it for actually jumping to the figure.
You actually don't need '#+NAME', it works fine if you use '#+LABEL', which won't break your short-caption for list of figures.
Orgmode does now offer a 'jumpable', enumerated or link with name of your choice in the exported (latex, html) text if you link with:
see figure [[fig:myfigure]].
or
see figure [[fig:myfigure][figurenameintext]].
I would have added this as a comment, but I don't have the reputation yet.
--
In response to your comment (still can't comment): you do need the '#+NAME' for it to jump within the .org source file; as mentioned in the manual, and i also just confirmed that works. Not sure about the short-captions in the latest version.
With a very recent org-mode, you can use #+name:, see:
http://thread.gmane.org/gmane.emacs.orgmode/62644/focus=62646
#+CAPTION: My great figure
#+LABEL: fig:myfigure
#+name: fig:myfigure
[[test.png]]
See figure [[fig:myfigure][test]].
This works for me to jump from the link , but has no effect when exporting, I'm afraid...