Posts by Matheus E. Mordorst • 865 points
34 posts
-
0
votes2
answers41
viewsA: How to check form values before sending it Javascript / jQuery
Reginald, you can add in your Form declaration the following code onsubmit="return validaFormulario()" being as follows: <form id="formCadastroProdutos" method="POST"…
-
-1
votes1
answer332
viewsA: Fatal Error - Allowed Memory - PHP
Run by CLI(Command line interface) really requires more memory than by the browser and passes the allocated pattern, so you should run the code with a -d or -define and change the memory limit ->…
-
0
votes2
answers45
viewsA: Content of the array is not being printed, but reference to the object
You are printing on the screen only the reference of newArray with System.out.println(newArray) because it is printing it and not its items, for such you must use a toString method, as in the answer…
-
0
votes1
answer30
viewsQ: Indexing BD records
I recently circled a EXPLAIN ANALYZE in my database which is fairly large, about 800mil records in some tables, and I noticed that the indexing methods adopted were not the best. I always let the…
-
15
votes2
answers390
viewsA: What is deep learning?
Deep learning is associated with artificial intelligence and mainly allied to neural networks, the goal of a neural network is to learn and recognize patterns, for this it makes use of several…
-
0
votes2
answers1037
viewsA: Move only part of a text to another column
You can do a VBA function for Excel: Function StripNumber(stdText As String) Dim str As String, i As Integer 'strips the number from a longer text string stdText = Trim(stdText) For i = 1 To…
-
5
votes2
answers4919
viewsA: How to change the color of the Statusbar?
Just edit your file styles.xml <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"> <item name="colorPrimaryDark">@color/suaCor</item> </style> depending on…
-
2
votes4
answers1660
viewsA: Function js to run at a given time
This function here works perfectly for this, just switch to the desired times and use the function reload() to refresh the page. var now = new Date(); var millisTill10 = new Date(now.getFullYear(),…
-
-1
votes1
answer268
viewsA: How to increase the number of decimals after the comma?
Just increase the Bigdecimal Scale, as below, for example by going from a double to an Scale 12. double d = ... BigDecimal db = new BigDecimal(d).setScale(12, BigDecimal.ROUND_HALF_UP);…
-
6
votes2
answers836
viewsA: What code should be used to focus a Textbox?
You need some other focusable control to change the Focus, you can set to a label, for example: private void key_pressed(object sender, KeyPressed e) { this.ActiveControl = label1; } or for a NULL…
-
1
votes1
answer699
viewsA: What are function-oriented metrics?
Is a software metric: Software metrics make it possible to perform one of the most fundamental activities of the project management process: planning. From this, we can identify the amount of…
-
1
votes2
answers249
viewsA: Leave autocomplete search in bold
You can do the following: Take the part already typed and leave in bold with document.write("<p>Bold: " + txt.bold() + "</p>"); and complete the rest with the part coming from auto…
-
10
votes3
answers25651
viewsA: What is the equivalent of the grep command in Windows?
I believe you’re looking for findstrat cmd Example: C:> dir /B | findstr /R /C:"[mp]" In Powershell is the sls: PS C:> New-Alias sls Select-String…
-
6
votes3
answers1515
viewsA: Is there any nomenclature for variables defined by underline/underscore?
Snakecase or Underscorecase are the terms used for the case you use "_". Snake case is very old and comes from the beginning of C, but received this name recently. Here has a good understanding of…
-
0
votes4
answers596
viewsA: Progressive counting using for
Lucas, If the program runs on the console it follows a running pattern and prints everything you send, not enabling a clear, but there is a gambiarra. The "solution" is to use the console.clear(),…
-
1
votes2
answers1479
viewsA: Add factors from a data frame?
Luiz, for a Data Frame you can use the ColSums() to get the values in the tables. colSums(coluna[,-1]) or sum(dataFrame$Coluna) and removing NA values sum(dataFrame$Coluna,na.rm=TRUE) the [-1]…
ranswered Matheus E. Mordorst 865 -
-2
votes4
answers11999
viewsA: Take the lowest value and the highest value of an array with Javascript?
You can use the Math.Max() and the Math.Min() to pick up the values, as it is something relatively simple I’ll just point out the links and let you study =] This one too…
-
-1
votes2
answers35
viewsA: How to not preload page with self loading
The best solutions to your problem are the jScroll and the Lazyload, both work similarly and load when the browser is scrolled down and "passes" through the component. Example jScroll: HTML: <div…
-
0
votes2
answers456
viewsA: Change the name of the pdf file to hash and then manage to undo the name to read again
This is impossible using Hash, since that is the purpose of it, to be Oneway, when the code is generated it does not return. To solve your problem I suggest using Base64. in C#: To meet: public…
-
0
votes3
answers126
viewsA: Doubt in CRUD, I’m having trouble reading the keyboard data
Alternatively, you can use console(). readline(); import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Principal { public static void…
javaanswered Matheus E. Mordorst 865 -
3
votes2
answers2803
viewsA: File storage, database or disk?
Normally it is not a good idea to store large binary files in the database, it is better to keep the reference of their location given the overhead, access speed, number of accesses, file size and…
-
0
votes2
answers77
viewsA: How to pause and start audio when switching tab in browser?
That code should help you, it is quite simple to understand and just replace a video player by audio, but anyway: When leaving the tab the code is called: if (currentTab == '') { //Find current tab:…
-
0
votes1
answer734
viewsA: Calling a dll in Java
Aderbal, Javascript is a language of Frontend and does not interact with DLL s, the DLL’s can be accessed by the server Backend, process the information and some way pass to Frontend the desired.…
-
0
votes1
answer96
viewsA: How to generate a filter to remove outliers from a time series in Matlab?
There are different techniques for different purposes, but in general the removal of Outliers are identified and removed from a vector in the following form: X = 1:100; X = X'; noise = randn(100,1);…
-
1
votes1
answer43
viewsA: API Google maps
Igor, a good search on the part of Developers on google can help you a lot, they have several examples and very good documentation, for your purpose have this example here Follows: <!DOCTYPE…
-
2
votes2
answers229
viewsA: If I can do everything with structural programming, why did you create object-oriented?
Each type of programming paradigm serves a purpose, but as you said, structural can make the functions of an Object-Oriented, but when it comes solely and exclusively to Objects, the POO languages…
-
0
votes1
answer99
viewsA: JAAS Authentication and Security with Multi Module
Italo, this depends on how your application is configured, but in general ways a cookie with session user is saved and checked from time to time to ensure login before the time the session expires.…
-
3
votes2
answers658
viewsA: How to optimize Firebird 3?
There are some generic and basic rules for best database performance, here you can check them out specifically from 37 onwards to the Firebird. Soon: Use pool connections if small and fast Use the…
-
-1
votes1
answer908
viewsA: Convert image size before saving to BD
To work with images in PHP is easier to use external resources, I suggest using GD or of Imagemagick, in GD it is quite easy to do this: function resize_image($file, $w, $h, $crop=FALSE) {…
-
1
votes2
answers519
viewsA: What are checked exceptions?
Checked exceptions are exceptions that are identified by language and are amenable to treatment, in turn are the opposite of Unchecked exceptions, but what are Checked? They are exceptions that are…
-
1
votes2
answers475
viewsA: Create menu of options
Marlon, I have already developed something similar, but for legal reasons I can not show the code, however I used the Slimmenu, is a very easy-to-use Jquery plugin, including demos in Git. Another…
-
2
votes2
answers811
viewsA: What is memory segmentation?
Let’s go in parts: The problem with this code is that the V variable is initialized as NULL(pointing nowhere), then in the sequence is assigned the value 3 to it, which makes no sense, because the…
-
0
votes2
answers713
viewsA: Why is the screen size in the browser different from the real one?
William, surely your problem is caused by pixel ratio, it changes the view of pixels depending on the device, here’s a great tip for you:…
-
6
votes2
answers97
viewsA: Best practice for deleted data
As general guidelines of good storage practices, it is always interesting to store the records when "erased" and create a flag for them making the deletion statement, however some questions must be…
databaseanswered Matheus E. Mordorst 865