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
When commenting methods for Java in Android Studio, I can type /** and AS generates javadoc with method parameters and return type for me. But it seems it doesn't work for Kotlin.
Is there some way to teach AS to generate method docs in Kotlin KDoc format automatically?
Edit: yes, this question is about the same thing as the possible duplicate, but my question isn't "why?", I understand that KDoc has different format. My question is if there is a way to do the same for Kotlin in AS? Maybe there is a way to add/edit this template or something like this?
Since January 2019, there is a plugin on the Jetbrains website called kdoc-generator.
https://plugins.jetbrains.com/plugin/10389-kdoc-generator
Plugin to generate class and method KDoc.
This generator functions exactly like JavaDoc.
That means when you create a commentary with "/**" and press enter, the kdoc-generator creates automatically "#param" or "#return" tags for the parameter and return values of the method directly below this created commentary.
When you type /**
in your file above a method you wrote and then press enter you get something similar to this:
/**
*
* #param str
* #param age
*/
fun foo(str: String, age: Int) {
}
To install this Plugin directly in Android Studio:
open File/Settings (Mac: AndroidStudio/Preferences)
choose Plugins
click Browse repositories...
enter "kdoc-generator" in searchbar
klick Install
restart Android Studio
Now the kdoc-generator is installed and you can use it directly.
Additionally Jetbrains developed a documentation engine for Kotlin, that you can use to convert your documentation in Kotlin files to some standard formats, e.g. HTML
https://github.com/Kotlin/dokka
Dokka is a documentation engine for Kotlin, performing the same function as javadoc for Java. Just like Kotlin itself, Dokka fully supports mixed-language Java/Kotlin projects. It understands standard Javadoc comments in Java files and KDoc comments in Kotlin files, and can generate documentation in multiple formats including standard Javadoc, HTML and Markdown.
As this is most likely a bug with IntelliJ, I've taken the liberty of filing a bug report here. You can choose to watch this issue to get notified of any updates.
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed yesterday.
Improve this question
I'm trying to follow this advice here on how to format your TOC using a bookmark:
https://www.kdpcommunity.com/s/question/0D5f400000FHVFhCAP/google-docs-and-toc?language=en_US
But none of it works., My KDP pages still shows:
I do not believe the advice in that thread is accurate. If it is, I have been unable to replicate it. I have tried the following, none of which have worked:
Added Headings to the document and then auto-generating the ToC.
Additionally Bookmarking those headings
Changing the auto-generated ToC so it links to the Bookmarks rather than the headings.
Not using the auto-generated ToC and instead manually building one with links to Bookmarks
All of these will create a working table of contents which is not then recognised by KDP. I have not found any solution for getting a table of content generated in Google Docs (by any method) to show when upload to KDP. I assume this is because of the way Google Docs generates the Word doc which is required for KDP. The only workable solution appears to be to edit your document through a third party (either Word or some other package) once you've exported it from Google Docs.
I suspect there's a glitch in Amazon's programming. I have been uploading my books for years in Word with a manually created TOC that meets Smashwords' specifications (they're very picky). KDP always recognized the TOC until about a year ago. Suddenly even books that I've updated in a minor way and re-uploaded are marked as lacking a TOC. Yet when I opened their previewer, there's the TOC and I can click the links and they work fine. I appreciate that others have tried these multiple time-wasting attempts to fix the problem and that they don't work any better than my time-tasted (but no longer recognized) method.
First of all, I Google it, and find no answer to this. Also, I've found some questions here, but they dated 2016 and 2017. Now we have 2019.
I'm used to Java in Android Studio. When I override methods, IDE puts them in order - how they placed in parent class or implemented interface.
Also when I'm developing, for example, Repository pattern:
I create an interface.
Create classes which implements this interface
When I am adding functions in interface and then I override (ctrl+o, or alt+Enter on class name) them in my classes: In Java they placed at the same position as they defined in my interface, In Kotlin - the placed in top of the class (this is really bad!)
Also, code does not get reformatted automatically, for example: global vars placed on top, then goes constructors, etc.
So I'm asking.
It's just me? I've tried deleting all Android Studio settings, reinstalling, etc. It did nothing. Also, Googling did not take any results.
Is there any solution to all of this? Because I really liked kotlin, but this inconvenience is just very annoying.
Maybe this plugin Kotlin Code Sorter can fulfill your request. But this plugin only distinguishes the property, class, constructor or function. That the differences are inside some topics likes private, lateinit, val or var can not be order.
Android Studio/IntelliJ official doesn’t have support for the Kotlin code rearrangement.
First select that code which you want to rearrange or reformatted.
Than Just press ctrl+alt+L for rearrange or reformatted code.
Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 years ago.
Improve this question
I am developing an navigation android app that use Skobbler SDK. Currently, the advice received is totally voice data, but I would like to know the name of next path in the route.
Could anyone tell me how can I get the name of the next path when navigating. For example, when I get the instruction is "turn left in 200 meters", how to know what is name of the next path after turn left.
Thanks.
In the 2.3 version, by default the street name is not included in the audio advices - this is due to the fact that we use mp3 files for the audio and street names can not be handled this way.
In 2.4 you will have the possibility of using TextToSpeech as an alternative audio engine so you'll have the possibility of using street names.
What can you do in 2.3?
Handle the didChangeNextStreetName (iOS) callback - this should provide information you are looking for (on Android it's onUpdateNavigationState and call in the SKNavigationState object the getNextAdviceNextStreetName method)
Modify the config file of the advices engine to include the name of the street in the advices (send an email to support for this information)
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 6 years ago.
The community reviewed whether to reopen this question 2 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I am looking to pull together all of the XML schemas that Office 2007/2010/2013 documents abide by. I have found a number from the ISO/IEC 29500:2012 spec and ECMA-376 spec. I have also located a few on w3.org (e.g. xmldsig#). But I have been unable to find the majority of them (e.g. the schemas for http://schemas.openxmlformats.org/spreadsheetml/2006/main).
Searching on microsoft.com only yields pages like this that seem to have this content. However, most of these schemas do <xs:imports>s to files that I can't find.
Has anyone else had any luck finding these files?
Note: I've left my original content below; feel free to remove it if that is the preferred way to post answers.
Initially I could not find a clear source for the namespace
http://schemas.openxmlformats.org/spreadsheetml/2006/main.
I found that http://purl.oclc.org/ooxml/spreadsheetml/main is used in the ISO/IEC 29500-1 and ECMA-376 documents.
When I was looking through the files in zip 'ECMA-376, Fourth Edition, Part 1 - Fundamentals And Markup Language Reference.zip' I noticed there are two sets of XML schema files:
OfficeOpenXML-XMLSchema-Strict (In Part 1)
OfficeOpenXML-XMLSchema-Transitional (In Part 4)
I found that the Strict schema uses the purl.oclc.org namespace while the transitional schema uses the schemas.openxmlformats.org. Both sets contain the sml.xsd file (Defines SpreadsheetML) but with some differences. It seems that the different version of MS Office support different verisons of the standards (found on http://en.wikipedia.org/wiki/Office_Open_XML).
Original answer:
It appears that the comment by JasonPlutext is correct. I downloaded the file 'ECMA-376, Fourth Edition, Part 1 - Fundamentals And Markup Language Reference.zip' from the ECMA site which contains the file 'OfficeOpenXML-XMLSchema-Strict.zip' which then contains the file 'sml.xsd'.
I searched for the namespace you're looking for and found this website that appears to be an online version of the schema using the same namespace. I checked a few elements and they all appear in the sml.xsd file.
What is odd is that that none of the files in the downloaded schemas contain the schemas.openxmlformats.org namespace they all contain namespaces like this one
http://purl.oclc.org/ooxml/spreadsheetml/main
you can navigate to this URL in a browser and it references the ISO standard ISO/IEC 29500-1. I'd say they refer to the same thing but the purl version is less specific compared to the schemas.openxmlformats.org version.
If anyone else is looking for this, here is where you will find a full list of the Office Open XML schema:
https://msdn.microsoft.com/en-us/library/dd979921(v=office.12).aspx
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 6 years ago.
Improve this question
Is there a good way of doing templating (that allows me to write html -- not jade), that will support layouts and partials?
I have only been able to use ejs with express-partials npm plugin to get this behavior. However I feel the ejs site is out of date and not well supported.
I'm looking for good examples.
I want to create a main layout that would have header + footer and include a separate template for the nav for example.
Knockoutjs looks well supported, but I cannot find many examples of using it with express.
Update: I found a pretty good article here from LinkedIn's evaluation of js templates: http://engineering.linkedin.com/frontend/client-side-templating-throwdown-mustache-handlebars-dustjs-and-more
You can easily mimic this with the "include" feature in EJS. It's not quite as elegant as layouts in Express 2.x but it works for simple scenarios where all you need is a header and a footer plus you don't need to use Jade.
Basically you can create two "layout" pages (layoutTop.ejs and layoutBottom.ejs) and manually include them on every page.
mypage.ejs
include layoutTop
html for my page.ejs goes here
include layoutBottom
(Shameless plug) You can see a more detailed explanation here:
http://hectorcorrea.com/Blog/Using-layouts-with-EJS-in-Express-3.x
I have settled on using visionmedia's ejs with ejs-locals for layouts, includes, and blocks.
https://github.com/RandomEtc/ejs-locals
https://github.com/visionmedia/ejs
Try twigjs. It fits your description well.
https://github.com/fadrizul/twigjs
But ejs don't looks for me unsupported either. I think that this are even solutions.
Give handlebars a try.
You can use it with hotplates to have your templates automatically resolved.
It also supports reusing your partials client side.