Posts by Leandro Kojima • 429 points
25 posts
-
1
votes1
answer31
viewsQ: How to restrict minutes in a time interval using Mysql
I have a table that contains day, month, year, hour, minute and second. I need to return only the time between 8 and 11 o'clock, but do not want me to return from the 11 o'clock forward Example:…
mysqlasked Leandro Kojima 429 -
0
votes3
answers653
viewsA: When to use if or Else If?
To illustrate with something compared to your daily life, imagine the situation: You are in the market, and want to buy only one chocolate, waltz dream or black diamond. But you do not know which…
-
-1
votes1
answer113
viewsA: Converting Indo-Arabic numbers to Java Roman numbers
I usually use these contents a lot to separate the units, tens, hundreds, etc. int inteiro = 1239; int unidade = inteiro % 1000 % 100 % 10; int dezena = inteiro % 1000 % 100 / 10; int centena =…
javaanswered Leandro Kojima 429 -
0
votes1
answer80
viewsA: Help with War game in Java
Place all Countries in a String vector, after generating a random number, you take the index of the vector as if it were the number you set for each Country.. For example: your result gave 3; then:…
javaanswered Leandro Kojima 429 -
0
votes4
answers47
viewsA: Help with responsiveness and alignment
Add float:left; in your class .actionBox. That should solve your problem
-
0
votes1
answer80
viewsA: Error renaming txt file in JAVA
You can create a temporary folder 'tmpLog' and put the log.txt on it temporarily and after checking the date and the first line, you can use the File.move(); to a permanent folder.…
javaanswered Leandro Kojima 429 -
1
votes2
answers72
viewsQ: How to include dates even if there is no data
I need to make an appointment at the bank where I count how many vehicles passed in a date range. The code I’m using is this: select date(data), count(if(axlNumber = 2, 1, null)) as eixos2,…
-
1
votes0
answers15
viewsQ: Can I get which "Serie" is selected in a caption of a primefaces chart?
I’m trying to get which caption item is selected on a primeface line chart. I’ve tried something like plot.series.isSelected, the maximum I could take are the maximum and minimum values of the x and…
-
0
votes1
answer41
viewsA: The caption of a Chart Primefaces does not appear when I download the image
Solved. Just put it in the css of the panelGrid that wraps the chart: text-align: left;
-
0
votes1
answer41
viewsQ: The caption of a Chart Primefaces does not appear when I download the image
When the chart is loaded, the caption loads along, but when I download the image the caption does not appear.. Button to download: <p:commandLink onclick="return downloadImage();" style="margin:…
-
3
votes2
answers273
viewsA: Apprentice of C (Factorization in C)
Knowing that factorization is the multiplication of a number by all its positive numbers smaller than it. For example: Factorial of 5 = 5 x 4 x 3 x 2 x 1 = > 120 So: At each iteration in the…
canswered Leandro Kojima 429 -
2
votes2
answers36
viewsA: How do I update a page at a set time?
I was able to solve the problem using setInterval, instead of setTimeout. Stayed like this: <script> $(document).ready(function () { window.setInterval(function () { var data = new Date(); var…
-
1
votes2
answers36
viewsQ: How do I update a page at a set time?
I need to update a page every 15min, but with a set time (HH:00 | HH:15 | HH:30 | HH:45). I tried to do that... <script> $(document).ready(function () { // Handler for .ready() called.…
-
3
votes1
answer1428
viewsQ: How to quote a variable for Mysql query
I’m doing a trial, I need to put a variable varchar in the query, but it doesn’t go with the simple quotes, I tried to concatenate like this or something but it’s no use: set @comando :=…
-
3
votes2
answers426
viewsQ: SQL command in String Mysql
I am making a precedent that saves a select in a varchar variable. Now I need to run this sql command, how do I do that? I am using Mysql. Procedure: delimiter $$ create procedure eixos_caminhao (in…
-
1
votes1
answer57
viewsQ: Can I get an image of any directory on my PC to put on my HTML page?
Can I get an image from any directory on my pc, or can I just grab images from the project directory? I am using JSF: h:graphicImage url="C:\teste\rcvp\18\04\20\16\372_180420160013_0000000_1.jpg"…
-
1
votes4
answers126
viewsA: Can I put a WHERE for each column?
We managed to solve! Follow the SQL code: SELECT DATE(DATE) AS DATA, (SELECT COUNT(*) FROM TB_VBV T WHERE DATE(T.DATE) = DATE(T1.DATE) AND GROSS > 12600 ) as QUANTIDADE_PESADOS, (SELECT COUNT(*)…
-
-1
votes4
answers126
viewsQ: Can I put a WHERE for each column?
I’m willing to put a condition for each column in my SELECT, this is possible? SELECT count(id_casa) as casaAzul, count(id_casa) as casaAmarela FROM tb_casa Where: Where column 1: Where cor_casa =…
-
2
votes3
answers367
viewsA: Returning(Null) when displaying a String variable
You have to declare char as a vector: char[numero] nome;
-
1
votes3
answers3023
viewsA: Compilation and execution error difference
That’s right. Build error: when an invalid or wrong syntax character is found in the code. Execution error: After the code is compiled, when running the project, one finds some sql Exception,…
-
0
votes1
answer121
viewsA: How to change the caption of a Primefaces line chart?
I got it, I just added the code: this.cfg.legend = { how : false, show : true, border : 'none', location : 'n', fontSize: '150%', renderer : $.jqplot.EnhancedLegendRenderer }…
-
0
votes1
answer121
viewsQ: How to change the caption of a Primefaces line chart?
I’m looking to change the font size and the square of the caption of a Primefaces chart via Javascript. My code: <script type="text/javascript"> function alterarGrafico() {…
-
-2
votes1
answer1263
viewsQ: How to update a div every x seconds?
Follow a part of the html code, I need to update this div (#line1) every x seconds without using php. It can be with jquery, ajax, js or all together. I don’t want to just change a div ("altered…
-
3
votes2
answers16608
viewsQ: What is the difference between MER (Relationship Entity Model) and DER (Relationship Entity Diagram)?
What is the difference between an MER diagram and an ERI diagram, with examples.
-
2
votes1
answer486
viewsQ: Convert Byte to Normal Text c#
I need to read a byte (Buffer), and convert it to Common Text, that is, I need to convert to letters and/or numbers of the ASCII table. I am using this function to convert to ASCII Note: when I put:…
c#asked Leandro Kojima 429