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
2
votes
1 answer

GitHub changelog links to commits

Some projects have a CHANGELOG.md file where each version links to the range of commits that were made for that version. For example, this one. It looks like these links are automatically generated somehow, because the markdown only contains [1.0.0]…
jqno
  • 15,133
  • 7
  • 57
  • 84
2
votes
0 answers

Resharper Create Property for multiple properties

Resharper Code Generation offers to write property names which at-the-time-of-writing do not exist in the respective class. If I select the context action menu "Create property..." I can easily generate the code for it. Question: How can I generate…
thomasgalliker
  • 1,279
  • 13
  • 19
2
votes
2 answers

Generate file and replace strings in template file in the generated files

I have a JSON file: { "header": { "uuid": "c578592a-a751-4993-9060-53f488597e59", "timestamp": 1522938800, "productionDateTime": "2018-04-05T14:33:20.000+00:00", "producers": { "operator": null, …
ltqbx
  • 33
  • 6
2
votes
3 answers

auto generate code to print each field of struct in c++

I have a structure as below, Similarly there could multiple structures with multiple fields. struct A { int a; int b; char * c; float d }; Now if I want to print each field of the above struct I need to manually type, cout << A.a <<…
Arun Pal
  • 687
  • 7
  • 28
2
votes
0 answers

Parent's AutoGenerated Id is a Foreign key to child entities that have to be cascaded

I have a Parent Entity which has its Id autogenerated. It has a list of child entities whose composite key uses the Parent Entites autogenerated id as a foreign key. Parent Entity @Entity @Table(name = "parent_table") public class Parent…
2
votes
1 answer

How are ids autogenerated in spring data couchbase?

I want to create autogeneration of IDs to my documents in spring data couchbase. Spring docs has steps for this: https://docs.spring.io/spring-data/couchbase/docs/current/reference/html/#couchbase.autokeygeneration Here is my code: @Document public…
User1230321
  • 1,435
  • 4
  • 23
  • 39
2
votes
0 answers

Android - Room autoGenerate not found

I am trying to make an id as primary key and set it to autoGenerate. Somehow, when I compile my code I get this error: "autoGenerate not found" Here is my code: @Entity public class Preference { @PrimaryKey(autoGenerate = true) private…
rezastallone
  • 111
  • 1
  • 6
2
votes
1 answer

Generating separate files for partial classes in C#

I'm working on a project that uses MSLinqToSQLGenerator to generate partial classes that reflect the database. It generates a single file (Database.designer.cs) with a number of partial classes that reflect tables and stored procedures and…
ShockKhay
  • 75
  • 9
2
votes
2 answers

How to make IntelliJ IDEA recognize build-time generated sources?

I made a small zip example to illustrate the issue. I have in the project the Animal class from AutoValue example and a maven pom file to do the code generation and compilation. See below. Running mvn clean install works great and generates and…
AlikElzin-kilaka
  • 34,335
  • 35
  • 194
  • 277
2
votes
2 answers

Auto-Generated captions not supported in YouTube iFrame API

The YouTube iFrame API's captions functionality does not work for auto-generated captions. Is there a plan to address this flaw or is there another way to enable auto-generated captions within the iFrame API?
2
votes
1 answer

How to paste custom code when I create a method automatically in IntelliJ IDEA?

In the IntelliJ IDEA I can create automatically a method. I write the name of the method and if it doesn't exist, the IDE prompts to create it. I want IDEA to paste the code //TODO: write method ${nameOfMethod} in the body, when it creates a new…
Ponomarenko Oleh
  • 732
  • 2
  • 12
  • 25
2
votes
0 answers

Reverse aggregate data into a possible dataset of observations

Is it possible to generate a binary dataset of observations where the proportions of the resulting dataset correspond to known aggregate information? For example, I have 3 binary features a, b, c and I know that in total there should be 4…
clurhur
  • 81
  • 6
2
votes
1 answer

generate c++ include header guards in atom?

I'm looking for an atom package that generates C++ include guards in .h/.hpp header files. The package should do something like taking an existing C++ header file and surround its contents with appropriate #ifndef #define #endif lines. If the plugin…
Kalsan
  • 822
  • 1
  • 8
  • 19
2
votes
2 answers

Make list of functions with lapply

Is there any way to make the following list of functions using lapply? Below, I make a list named "long" the long way. I would like to simplify the code using lapply (or a for loop) but neither seems to work. Thank you. #This works as…
user1491868
  • 596
  • 4
  • 15
  • 42
2
votes
1 answer

Verilog: Is there a way to make a generalized adder (variable width/number of inputs)?

I am trying to write some verilog code that I would like to be reusable for an application that has a lot of addition with a varying number of inputs. Say I have a module: module parameterizable_adder #( parameter WIDTH = 16, parameter…