Posts by danilo • 536 points
28 posts
-
1
votes1
answer70
viewsA: How to show certain amounts of lines?
You can use ROW_NUMBER() and partition based on the year and request the sum of value to get the result. select X.ano, X.descricao, X.valor from (select ano, descricao, valor, row_number() over (…
-
0
votes2
answers267
viewsA: Add values for same-day array
You have an array with 3 arrays inside. You can use array_keys to return all keys in $k and so only popular an array $sums with all the keys. Then just use one foreach running on each item $k and…
-
4
votes2
answers76
viewsQ: clone, copy, changeable object on getter for security
In many articles and books it is cited that for security the correct is always deliver via getter a copy of mutable attributes. It can be a clone or a new instance containing the same values as your…
-
0
votes2
answers131
viewsA: Change link name with jQuery
There are some ways to do this. If you have control of link generation, then you can do it using a span: <a href="checkout-review" class="btn btn-primary"…
-
1
votes2
answers471
viewsA: Spring boot: Unable to find or load main class
The problem is in the Trajesapplication class. You need to move it to the folder with costumes system Note that this package no longer exists: with.system.trajes.trates, your Trajesapplication file…
-
1
votes1
answer3841
viewsA: Authentication with Spring Boot, Security, Using Bank Html Page, User and Password
I did an implementation of Spring Boot with Security simple only for this, with access to User and Password via Html, database Postgres however, it can be any other sql. With a table: user With the…
-
1
votes1
answer70
viewsQ: Passing parameters using primitives or an object containing the fields?
When creating the signature of a method, what would be the best design option for passing parameters? Is there any good practice that addresses the signing of methods? What would be better? For each…
-
1
votes2
answers143
viewsQ: Is there an advantage in languages that package (.dll, .class, .exe) for scripting languages (.php, .py, .js)?
There is some advantage in using languages like Java, . NET, C, C++ which generate a product in which it becomes more difficult to change? For example, if I get a .class, or a .jar, there would be…
-
4
votes1
answer134
viewsQ: Nomenclature of tables with company name and system acronym
Is there any good reason to put the company name at the beginning of the table name? In almost every company I’ve gone through, it’s an adopted convention that you have to put the name of the…
-
6
votes3
answers15296
viewsA: What is Yield for?
Complementing Maniero’s response, some features of the Yield: Yield Python is used whenever you need to define a generator function of something. You can’t use it Yield out of a Generator Function.…
-
0
votes1
answer27
viewsA: horizontal scrolling bash window (turn off line wrapping)
--- Editing --- I got a better option yet, with the command most it does not come installed in Ubuntu 18. to install: sudo apt-get install most -y then just use it with: docker ps -a | most His…
-
0
votes1
answer27
viewsQ: horizontal scrolling bash window (turn off line wrapping)
I’ve searched all the forums, and in Bing/google until tired, I didn’t find anything, probably by manezice, is it possible to put a horizontal scroll bar in window bash? I saw in some places that…
-
0
votes7
answers49407
viewsA: How to install PIP in Windows 10?
To install Pip via a proxy. Follow the following instructions. Access: https://bootstrap.pypa.io/get-pip.py Save the file get-Pip.py in a folder and go to the file directory in your CMD and type: if…
-
0
votes2
answers126
viewsA: Disfigured Netbeans
This is Netbeans user setup. Do the following: go to your user’s folder with the following command: cd $HOME And search the Netbeans configuration folder or file: ls-a Close Netbeans, rename or copy…
-
1
votes2
answers1875
viewsA: imagecreatefrompng() function does not exist - Undefined Function error
With the help of lazyFox and bfavaretto I found the problem: I took a look at my info.php that I created and put in the root folder: <?php phpinfo(); ?> And I consulted through the GD library…
-
1
votes2
answers1875
viewsQ: imagecreatefrompng() function does not exist - Undefined Function error
I am trying to save a png image, and when I run the error script: Fatal error: Uncaught Error: Call to undefined function imagecreatefrompng() But from what I’ve seen, this function is native to…
-
0
votes3
answers51
viewsA: Redirecting in Javascript
Take out the Return. If it’s an external link, you need to add http://or https:// Changing window.location.href does not redirect to the new page…
-
0
votes1
answer109
viewsA: Cakephp 3.6 sending deprecated message (Accessing data as a Property will be Removed in 4.0.0.)
I sounded a lot, but I found the answer. Is in https://api.cakephp.org/3.4/class-Cake.Http.ServerRequest.html#_withData withData( string $name , mixed $value ) So stay like this:…
-
0
votes1
answer109
viewsQ: Cakephp 3.6 sending deprecated message (Accessing data as a Property will be Removed in 4.0.0.)
I have some code in Php using Cakephp 3.6 that keeps sending the following alert: Deprecated (16384): Accessing `data` as a property will be removed in 4.0.0. Use request->getData() instead. -…
-
0
votes2
answers24
viewsA: Show the three best rated vehicles from a table
For the consultation return only the 3 vehicles best evaluated: select * from classificacoes order by estrelas desc limit 3 Using Join between tables, it would be like this: select * from…
-
1
votes3
answers528
viewsA: How to deactivate CTRL+C in batch?
Another option would be a script like the below, adapt it to your needs: This batch file cannot be canceled by Ctrl-C, and if it is canceled by Ctrl-Break, the cmd.exe window will be closed. @echo…
-
0
votes3
answers528
viewsA: How to deactivate CTRL+C in batch?
In windows 10 it is possible to change the properties, first open the prompt in Administrator mode, then right click on the title of the prompt and go to properties and disable the option for Ctrl:…
-
3
votes3
answers3285
viewsA: What does -> mean in PHP?
Although it was asked only from the arrow operator, I think who has the doubt about this operator, will also have at least about these other two operators, as I had at the beginning: arrow operator…
-
0
votes1
answer205
viewsA: Error when adding FK
There are some errors in the 2 commands: In command of line 86: alter table tb_consulta add constraint fk_tb_consulta_tb_tratamento foreign key (idtrat) references tb_paciente(cod_tratamento); In…
-
12
votes1
answer35768
viewsA: What is the difference between conceptual, logical and physical modeling?
Conceptual Modeling The goal here is to create a model in a graphic form, this being called Entity and Relationship Diagram (ERI), which will identify all entities and relationships in a global way.…
-
3
votes1
answer272
viewsQ: Writing PHP code without special characters
There is a way to print special characters in PHP using ascii code only? For example, in javascript, we can use u00e1 in the middle of the text. In Java, we can use u2202 for example. What about…
-
1
votes1
answer475
viewsA: Error javax.naming.Noinitialcontextexception - console application
I found the problem, by the way, the problems: Ideal is that projects for Wildfly are with Maven to facilitate. So I converted them to Maven. Second, the property file must necessarily have the…
-
2
votes1
answer475
viewsQ: Error javax.naming.Noinitialcontextexception - console application
I’m trying to make a simple EJB, followed some tutorials, analyzed the Wildfly sample code, and yet, I’m facing an error. Could someone help me? The mistake:…