Questions tagged [auto-generate]

The automation of the creation of classes, files, documentation, or anything else for which manual creation is costly.

See also

654 questions
128
votes
10 answers

Any reason to write the "private" keyword in C#?

As far as I know, private is the default everywhere in C# (meaning that if I don't write public, protected, internal, etc. it will be private by default). (Please correct me if I am wrong.) So, what's the reason to write that keyword, or why does it…
Camilo Martin
  • 37,236
  • 20
  • 111
  • 154
114
votes
8 answers

Auto generate function documentation in Visual Studio

I was wondering if there is a way (hopefully keyboard shortcut) to create auto generate function headers in visual studio. Example: Private Function Foo(ByVal param1 As String, ByVal param2 As Integer) And it would automagically become something…
Ryan M
  • 1,721
  • 2
  • 15
  • 22
72
votes
9 answers

Intellij generate javadoc for methods and classes

Is it possible to set up Intellij to generate javadoc for methods and classes, automatically, with @author and @since date? I had this feature in Eclipse. I know that the files have templates and also I can manually semi-automatically add javadoc to…
KarolDepka
  • 8,318
  • 10
  • 45
  • 58
46
votes
10 answers

Getting auto-generated key from row insertion in spring 3 / PostgreSQL 8.4.9

I would like to retrieve the auto-generated id from a row insertion, but I get a NullPointerException Here is the code : long result = 0; final String SQL = "INSERT INTO compte (prenom, nom, datenaissance, numtelephone) " …
Jerec TheSith
  • 1,932
  • 4
  • 32
  • 41
29
votes
7 answers

How configure Intellij Idea javadoc templates?

I have some method: public int getSomeField() I want to generate javadoc like this: /** * Gets {someField} * * @return value of {someField} */ Where {someField} is placeholder for field name. It is possible to create this templates for Intellij…
Cherry
  • 31,309
  • 66
  • 224
  • 364
28
votes
2 answers

RESTful web service auto-generate WADL

I have created a RESTful web service in C# and have deployed it to IIS. When I access the service HeadOffice.svc, I have the option to view the WSDL (HeadOffice.svc?wsdl). What I would like to do is have the option of viewing the WADL (e.g.…
David Poxon
  • 2,435
  • 4
  • 23
  • 44
24
votes
2 answers

Does Rails need database-level constraints?

I have the same problem as in the following post. So I am wondering, why doesn't Rails support generating foreign keys by default? Isn't it necessary? Or are we supposed to do it manually?
jojo
  • 13,583
  • 35
  • 90
  • 123
21
votes
3 answers

Auto-generate an interface implementation in C#?

I know this is quite lazy but, is there any way on Visual C# 2010 Express to auto-generate an interface implementation? (I don't mean at runtime but at design time, like a code snippet). Perhaps with a third party utility?
Juan
  • 15,274
  • 23
  • 105
  • 187
19
votes
6 answers

How to generate a secure activation string in php?

After user subscribe email to my website. My website will generate an email confirmation and send to them. In the email content, i need to include activation key, something like: www.domain.com/activate.php?key=$generatedKey How do you generate the…
show_lol
19
votes
3 answers

How to make partial method async

I have a generated code with partial method { ... partial void InterceptOperationCall(IOperationContext context); ... async Task SomeMethod() { InterceptOperationCall(cntx); await LongOperation(cntx); …
gabba
  • 2,815
  • 2
  • 27
  • 48
17
votes
1 answer

Android Status Bar transparent when using AppTheme.NoActionBar

When I apply the auto-generated AppTheme.NoActionBar to my activity via android:theme like so: AndroidManifest.xml:
SupaHam
  • 1,125
  • 2
  • 12
  • 20
17
votes
2 answers

Set the value of column when upgrading table with alembic

I am using PostgreSQL and Alembic for migration. When I added new column to my User table Alembic generated migration with the following script: revision = '4824acf75bf3' down_revision = '2f0fbdd56de1' from alembic import op import sqlalchemy as…
Max
  • 2,425
  • 6
  • 35
  • 54
16
votes
4 answers

Does anyone use Swagger Codegen or OpenAPI Generator SDKs in Production?

Swagger Code Generator can generate SDKs in many languages (listed below from the Github project page). Does anyone use any of Swagger's auto-generated SDKs in production, both as alpha/beta and as GA, and if so, what organizations and for what…
Grokify
  • 15,092
  • 6
  • 60
  • 81
15
votes
2 answers

How can I generate the database from .edmx file in Entity Framework?

I have had to suddenly switch to working on Code First Entity Framework 4.1. I started off not knowing anything about this framework but in the last 8 hrs I am now much more comfortable having read blogs and articles. This blog in particular is one…
Red Swan
  • 15,157
  • 43
  • 156
  • 238
14
votes
2 answers

Generating TypeScript declarations for re-exported JS functions in a Node.js module

I am trying to emit declarations for types and functions annotated with JSDoc. Those are useful for TypeScript users and generating them from JSDoc means less overhead on our SDK developers. TypeScript users should get one module called Apify and…
1
2 3
43 44