Posts by user94991 • 249 points
18 posts
-
-3
votes1
answer155
viewsQ: How to force typescript to interpret a parameter as a namespace instead of a class when they have the same name - gRPC
I am implementing a small crud using gRPC and typescript, my problem is: The self-generated stubs create a class and a "type" for each parameter in the protofile. For example, the Userid parameter…
-
1
votes1
answer428
viewsQ: Typescript error when rendering a component that returns array in React
I’m creating an React app with Typescript that searches the Github API. I’m having trouble passing one array as props to another component. The logic would be: User has Repos (array of Github…
-
1
votes0
answers559
viewsQ: How to use "import" properly in a Node.js application with typescript
Good afternoon. I am writing a Rest API using node.js and typescript, but I’m having trouble using the import in some parts of the programme. for example in my server.ts I have: const connectDB =…
-
0
votes1
answer207
viewsQ: Infinite recursion in a bidirectional Manytomany model in Hibernate
I’m trying to create a bi-directional Manytomany relationship in Java, I can already insert into the database smoothly, but when I try to bring data from these tables I fall into an infinite…
-
-1
votes1
answer31
viewsQ: How to popular only a part of the object with a query in Hibernate
Related to that question I asked earlier about Hibernate I am building a Restful API, and making a Join with 2 tables. However I would like to bring only some attributes from my Join table. Today my…
-
2
votes1
answer1199
viewsQ: How to Map One to Many Correctly in Hibernate
Good afternoon, I am creating a very simple Restful API that implements an online course system, where I have only 2 tables "Courses" and "Teachers" (And I am trying to learn Latin in the process):…
-
1
votes1
answer554
viewsQ: How to create a field that references a sub-array of a Collection in Mongoose?
Imagining the following structure(Merely illustrative example): Collection: Schools [ { "_id":"abc123", "nomeEscola":"escola1", "turmas":{ "_id":"ccc333", "nomeTurma":"Turma1" } }, { "_id":"abc122",…
-
2
votes1
answer73
viewsQ: Is it possible to use libraries within the structure of the java project?
My question is the following, can I by relative way link my . JSP to a library within the project directory? Or only in the server directory: Webapps, etc? At the moment, when I want to show an…
-
4
votes2
answers95
viewsQ: What is the best way to define access to the methods of a class I want to use for unit testing?
I have a class Runnable, that does a lot of things in my system. When I created it, I didn’t want to instantiate its methods out of her scope. That’s why I wrote the methods like protected. Now, I’m…
-
0
votes2
answers960
viewsA: How to make a Scheduledexecutorservice launch a new task while the previous one has not yet finished?
The solution proposed by @Carlos Heuberger really worked: Main thread package backgroundProcesses; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.TimerTask; public…
-
5
votes2
answers960
viewsQ: How to make a Scheduledexecutorservice launch a new task while the previous one has not yet finished?
I am implementing a Scheduler to run some threads on my system at x time intervals. The big problem is that if thread 1 has not yet finished running, 2 does not start, even though its time has come.…
-
1
votes2
answers132
viewsA: Do I really need to start from a main to run a Schedule in java?
I arrived at the solution using a webListener: @WebListener public class ScheduleBases implements ServletContextListener { @Override public void contextInitialized(ServletContextEvent arg0) {…
-
1
votes2
answers132
viewsQ: Do I really need to start from a main to run a Schedule in java?
I am developing a web application, and now I have reached a point where I will have a process running in parallel in my application(in background) every day at a time x. To test the process, I made…
-
2
votes0
answers356
viewsQ: What are the advantages of using a Snowflake model, Star, under a relational model for B.I?
Hello, Nowadays, I see many B.I tools on the market advertising that their tools are "plug'n play", connect with relational bases, excels and "instantly generate B.I systems". This gave me some…
-
1
votes1
answer216
viewsQ: How to concatenate a javascript object to a post form?
I have an object JSON that I built at runtime, I need it sent to my servlet, along with the other form fields, via post, how do I do this? I searched a lot but nothing worked. function createJSON()…
-
0
votes1
answer588
views -
0
votes1
answer118
viewsQ: Servlet is responding but ajax does not reflect the answer
Good morning, I have a simple form in which I do Ubmit via ajax, then my Servlet takes this result and gives an answer, from the answer ajax will do something. I can see the answer in the browser,…
-
0
votes2
answers800
viewsQ: Problem when mapping Servlet in web xml
I’m getting error 500 when trying to map Servlet, I don’t know what can be, I think it’s the class Servlet is wrong. Servlet public class addContatoServlet3 extends HttpServlet { protected void…