9 I have some C code: #include "stdio.h" typedef struct num { unsigned long long x; } num; int main(int argc, char **argv) { struct num anum; anum.x = 0; __asm__("movq %%rax, %0n" : "=m" (anum.x) : "rax"(2)); printf("%llun",anum.x); } which I’m compiling and running on my (intel) Mac laptop. The output from the code […]
5 I’m rewriting strapi v3 queries to v4 (GraphQL), and with new fields ‘data’ and ‘attributes’, I have a problem going too much deep into nested objects, an example of how data looks: user { data { id attributes { company { data { id attributes { location { data { id … } } […]
0 I’m using the experimental version of graphql and apollo client together with next13 and at one point in my code I perform a mutation in a client side component to delete data and I need the query that was performed in a server side component to be re-done for the list of results to […]
11 I just read code like this: auto value = ({ auto it = container.find(key); it != container.end() ? it->second : default_value; }); What is this ({}) called? I don’t think I’ve ever seen this before. c++ Share Improve this question Follow edited yesterday Hesky Fisher asked yesterday Hesky FisherHesky Fisher 1,02777 silver badges1111 bronze […]
0 I’m trying to create a simple Byline component to use in my MDX posts that displays the site author with a href="mailto:[email protected]" and a time tag with the date the post is given in its frontmatter. I’ve tried following this Gatsby tutorial to learn how to query frontmatter through GraphQL in a component. I […]
2 The bounty expires in 20 hours. Answers to this question are eligible for a +50 reputation bounty. Tony Ngomana is looking for an answer from a reputable source. Imagine that we want to serve a web application to thousands of users. The information on the page should stay up to date even if the […]
0 I’m using dotnet 6 with GraphQL 7. I’m having some issues only in one Field. The error appears only when the app is deployed in the cluster (kubernetes), but never in local. So it seems like the Dependency Injection is not working properly, here is the code of the query: public class UserModulesProgressField : […]
6 // Fallback, anything with an operator() template <typename T> struct function_traits : public function_traits<decltype(&T::operator())> > { }; What does T::operator() mean here? This is code from pytorch. c++ function-object Share Improve this question Follow edited 14 hours ago Jan Schultke 14k44 gold badges4242 silver badges8383 bronze badges asked 18 hours ago ben19900305ben19900305 6333 bronze […]
0 I have an ItemType defined with some custom fields that are resolved with ResolveWith: public class ItemType : ObjectType<Item> { protected override void Configure(IObjectTypeDescriptor<FilterTreeItem> descriptor) { descriptor .Field(“fullName”) .Type<StringType>() .ResolveWith<Resolver>(r => r.GetFullName(default!)); // Other properties } private class Resolver { public async Task<string> GetFullName([Parent] Item? parent, CancellationToken cancellationToken = default) { return quot;{parent.FirstName} {parent.LastName}”; […]
9 I’m trying to install express-graphql but getting this error. Please, help! npm install –save express-graphql npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/graphql npm ERR! graphql@"^16.2.0" from the root project npm ERR! npm ERR! Could not […]