codegen

Unable to find any GraphQL type definitions for the following pointers: src/**/*.graphql

倾然丶 夕夏残阳落幕 提交于 2021-02-18 22:33:09
问题 I am using the @graphql-codegen/cli tool to generate typescript types out of my graphql server. Here is my codegen.yml content: overwrite: true schema: "http://localhost:3001/graphql" documents: "src/**/*.graphql" generates: src/generated/graphql.tsx: plugins: - "typescript" - "typescript-operations" - "typescript-react-apollo" ./graphql.schema.json: plugins: - "introspection" Here is the package.json script I use to generate my types ( yarn schema ): "schema": "graphql-codegen --config

Generate C code with Sympy. Replace Pow(x,2) by x*x

孤人 提交于 2021-01-27 16:00:41
问题 I am generating C code with sympy the using the Common Subexpression Elimination (CSE) routine and the ccode printer. However, I would like to have powered expressions as (x*x) instead of pow(x,2). Anyway to do this? Example: import sympy as sp a= sp.MatrixSymbol('a',3,3) b=sp.Matrix(a)*sp.Matrix(a) res = sp.cse(b) lines = [] for tmp in res[0]: lines.append(sp.ccode(tmp[1], tmp[0])) for i,result in enumerate(res[1]): lines.append(sp.ccode(result,"result_%i"%i)) Will output: x0[0] = a[0]; x0[1

Gradle Swagger CodeGen DefaultGenerator CodegenConfigurator Add Lombok

耗尽温柔 提交于 2020-06-29 05:04:35
问题 I have a swagger and the following build.gradle file buildscript { ext { springBootVersion = '2.1.8.RELEASE' } repositories { maven { url "https://mavenrepo.schwab.com/nexus/content/groups/public" } maven { url "https://mavenrepo.schwab.com/nexus/content/repositories/releases/" } } dependencies { classpath("io.swagger:swagger-codegen:2.4.7") classpath "io.spring.gradle:dependency-management-plugin:1.0.8.RELEASE" classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion

Why are the “Paste JSON As Classes” and “Paste XML As Classes” commands disabled (grayed out) in Visual Studio? [closed]

老子叫甜甜 提交于 2020-04-11 10:44:11
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 2 years ago . I'm using Visual Studio 2017 15.9.0 Preview 4.0 . I'm trying to use the " Paste XML As Classes " command available under "Edit > Paste Special" but it's grayed out: I got the (incorrect) feeling that this command would allow me to pick a file that contained XML, or have some other sort of UI. The articles I None

swagger codegen is overwriting my custom code in generated files

扶醉桌前 提交于 2019-12-31 22:01:06
问题 I used the swagger codegen to generate jaxrs server side classes and also client side java classes. This is the command I used to generate the classes java -jar modules/swagger-codegen-distribution/target/swagger-codegen-distribution-2.1.2-M1.jar -i /Users/me/Workspace/swagger-codegen/samples/yaml/echo.yaml -l jaxrs -o samples/server/echo/java The server code that was generated had a place holder to write my "magic". public Response echo(@ApiParam(value = "" )@HeaderParam("headerParam")

Generate Fortran subroutine with SymPy codegen for a system of equations

こ雲淡風輕ζ 提交于 2019-12-22 04:13:08
问题 Building on a former example that I've found here, I try to find out how to generate a Fortran code that correspond to a specific form that I need to stick to. The required FORTRAN code will look like this (it is based on the FitzHugh–Nagumo model): SUBROUTINE FF(NE,U,PAR,F) ! ---------- -- ! Define the nonlinear term IMPLICIT NONE INTEGER, INTENT(IN) :: NE DOUBLE PRECISION, INTENT(IN) :: U(NE),PAR(*) DOUBLE PRECISION, INTENT(OUT) :: F(NE) DOUBLE PRECISION u,v,e,a1,a0 u=U(1) v=U(2) e=PAR(1)

One XSD, two code generation tools, two namespaces

不想你离开。 提交于 2019-12-20 07:16:44
问题 I have a XSD file, from which I want to generate C# and Java classes as well. I first set the namespace in the XSD according to my C# namespace where my classes resides. The generation (with the Microsoft tools) works fine and also the serialisation works great and I can validat them against the XSD - perfect. Now I want to create java classes with JAXB. The problem is that the classes which are going to be created have a different package structure then the one in C#. So when I set the XSD

Reflect and map typed argument shape in typescript?

[亡魂溺海] 提交于 2019-12-13 01:28:30
问题 context I am attempting to build a codegen tool. I enjoy using GraphQL, however, when I own the full stack, it seems a bit silly that my front-end calls my back-end with stringly defined gql queries. GQL is strongly typed, thus I should be able to provide strong typed queries and responses. problem I don't know how to build an interface such that I can recursively reflect and map an argument from an input type to a target type. Specifically, I want to map my query request type to a gql query

undefined reference to `rtIsNaN'

你。 提交于 2019-12-13 00:06:14
问题 I am trying my hands with Matlab coder. I wrote a simple matlab script and generated the C-code (along with the necessary headers) for the same. The matlab script looks like this : function amin_idx=findminidx(a)%#codegen amin_idx=find(a==min(a),1,'first'); In the Matlab coder, I start a new project, pre-condition a as a 10x1 vector and build the project to generate the .c and .h files. The I write a new .c file containing the main() which is as follows : #include<stdio.h> #include "rt