phpDoc, Yii 1.x and generating packages - yii

I have a problem dealing with phpdoc
I need to generate phpdoc for big project based on Yii 1.x, the problem is it's not go with namespaces. Generating phpdoc gives me whole project located on "/" level
I need to save project's folder structure.
#package doesn't work here. Is there any option to force phpdoc in a such way?

If your code uses namespaces, you need phpDocumentor 2.x (www.phpdoc.org). The old 1.x version at PEAR (pear.php.net) does not recognize namespacing.

Related

Best practice to create .NET Web API using generated Server Stub

b) After generating the .NET C# server stub, the documentation is not very verbose about how to use it:
You need to implement the logic yourself to handle whatever work the
API needs to do. Once the implementation is ready, you can deploy the
API locally or on your server. See the README.md file in the
downloaded archive to get started.
Is there any tutorial about how to use the code? I would like to use inheritance to avoid code changes of the generated code. But the documentation talks about just ignoring some generated files. The swagger support told me to just "migrate" the changes on every change. What is possible, but I hoped to be able to leave generated files untouched. Am I wrong here, is there no parctical need for this? I would like to use the server stub in a continuous integration environment.
One option you have is to customize the templates.
Clone the swagger-codegen repository.
Assuming you are using the latest stable v2 version of the code generation tool, then master branch is fine. Otherwise checkout the tag for the tool version you are using.
In Windows Explorer, open swagger-codegen\modules\swagger-codegen\src\main\resources\ and copy the aspnetcore directory. Paste that into your customer source code repository.
When next you run the codegen tool, provide the -t argument:
java -jar swagger-codegen-cli.jar generate
-i <your Open API spec URL/file>
-l aspnetcore
-o <outputdir>
-t <relative path to your>\aspnetcore
... other args as needed
Now you can modify those templates with custom code. For example, you could have an external library with a new base controller class that provides some generic business logic. Then you could modify the controller.mustache file to reference your base class. Just one of many examples. Add your custom templates to your source control for continuous integration.
Caveats: There is a controller.mustache file directly in aspnetcore and another in aspnetcore\2.1. In studying the source code, I see that the 2.1 folder is used for any version of ASP.NET Core other than 2.0. I'm new to this tool myself and have not fully figured out how to exploit it; the utility generates source code that will not build for me out of the box. It does not generate the security classes, but it does generate code that tries to use those security classes. Thus I'm having to comment out the security code in the templates.

Why in the official Kotlin coding conventions we should omit root package in directory structure?

In the official Kotlin coding conventions (https://kotlinlang.org/docs/reference/coding-conventions.html) they recommend to us to omit root package in directory structure. It is not comfortable, when you create a new file in your kotlin source folder and then edit the package name, because it did not generated automatically.
From a Reddit comment:
I guess you're supposed to use the package prefix
in the project structure, but sadly that feature is only available in IDEA and not Android Studio.
I agree it's weird that it's not documented more explicitly, I've only found https://www.jetbrains.com/help/idea/creating-and-managing-modules.html. You may want to consider raising the issue on http://discuss.kotlinlang.org/.
Looks like support for packagePrefix was added to idea-ext gradle plugin in version 0.5 : https://github.com/JetBrains/gradle-idea-ext-plugin/wiki/DSL-spec-v.-0.5#package-prefix-requires-idea-20191
I think this rule is inherited from Java code style where using of default package is a bad practice.
You can check this topic to obtain more information about default package in Java.

I can not find for the source code repository for poi-ooxml-schemas

Alright, this is a little bit wierd. I've checkout apache-poi version 3.9 source code from
http://archive.apache.org/dist/poi/release/src/
But I can not find the source code for poi-xml-schemas. I have been googling but to no avail. Where is the code repository for these project? Is it a separate project from the poi source code or it is from some other project used as a library, but where is the code repository?
This is covered in the Apache POI FAQ (#14), from which I quote:
14. I can't seem to find the source for the OOXML CT.. classes, where do they come from?
The OOXML support in Apache POI is built on top of the file format XML Schemas, as compiled into Java using XMLBeans. Currently, the compilation is done with XMLBeans 2.3, for maximum compatibility with installations. (You can use the resulting classes on the XMLBeans 2.3 runtime, or any later version of XMLBeans. If you are currently using XMLBeans 2.2 or earlier, you will unfortunately have to upgrade, but this isn't common any more).
All of the org.openxmlformats.schemas.spreadsheetml.x2006 CT... classes are auto-generated by XMLBeans. The resulting generated Java goes in the ooxml-schemas-src jar, and the compiled version into the ooxml-schemas jar.
The full ooxml-schemas jar is distributed with Apache POI, along with the cut-down poi-ooxml-schemas jar containing just the common parts. The source jar isn't normally distributed with POI. It is, however, available from Maven Central - ask your favourite Maven mirror for the ooxml-schemas-src jar. Alternately, if you download the POI source distribution (or checkout from SVN) and build, Ant will automatically download the specification XML Schema, and compile it for you to generate the source and binary ooxml-schemas jars.
https://repo1.maven.org/maven2/org/apache/poi/ooxml-schemas/1.0/
has the ooxml schema ----- CTArray jar files.

Where is ChainedFilter class in Lucene .NET 3.0.3?

It was in Lucene.Net.Analyzers.dll in version 2.9.4. But i can't find this class in version 3.0.3.
Mindas: here is my comment since I cannot add a normal comment: how to access this ChainedFilter class? I have downloaded the package but there is no namespace like Lucene.Net.Contrib, or no other namespace which allows me to reach the ChainedFilter class. This seems silly but I am stuck!
UPDATE: There is a bug in the binaries from Nuget as well as zip files uploaded on apache site for Lucene.net. I downloaded the source and noticed that the ChainedFilter.cs class is present in the Apache-Lucene.Net-3.0.3-RC2.src\src\contrib\Analyzers\Filters folder, but this folder is surprisingly not a part of the Contrib.Analyzers project. That is why it was missing from the generated binaries.
Rephrasing this answer, you can either build it yourself or use Nuget to get the binaries.
http://nuget.org/packages/Lucene.Net.Contrib/
ChainedFilter should be under contrib/misc.
It looks like it is in org.apache.lucene.misc.ChainedFilter in Lucene 3.x.

HTTparty in Rhodes

I am using Rhodes to develop android application.
I have installed HTTpary gem in Rhodes. Now when I am writing the statement "require 'httparty' " at top of the application it gives me error like "No such file to load".
What should I do to solve this problem?
From the documentation, scroll down to the section beginning "Adding Ruby Extension Libraries to Your Rhodes Application". It details 3 ways you can include external libraries into your application, summarized below.
Add ruby extension to an individual application
Add ruby library to an individual application
Add ruby library to the Rhodes framework to be built for all applications
The base Rhodes framework only contains things deemed generic enough to be included - so the built application package size can be kept low. Anything not in the base framework can be included in the application through the aforementioned methods.
This is just a guess since w/ Rhodes environment; but if this were a normal ruby script you would need to have require 'rubygems' first (assuming your used rubygems...).
The Motorola documentation is horrendous; allow me to help if I can. Firstly, examine the constant $LOAD_PATHS from your Ruby code to see the entire list of paths that Rhodes searches. Any .rb file in this path is automatically made available to require.
Then you have to decide whether to add this library to the entire Rhodes framework or just your app; personally I opt for one app at a time, because that way it reduces the chances of incompatibilities, and your apps are still provided all the libraries in rhodes-*version/lib/framework
If you want to add a library to your app, the docs suggest plopping it into the directory app/lib, but keep in mind that only this exact path is searched, so if you don't have a .rb file of the same name as your require statement directly under this path, it won't be detected automatically. I mention this because the common structure is a single file with the library name placed directly in lib, and the actual library contents inside a folder of the same name.
Example: the mime-types library is made up of: lib/mime-types.rb and lib/mime/, which are named differently and can lead to exactly this kind of confusion when including in Ruby.