Posts by Eduardo H. M. Garcia • 443 points
18 posts
-
0
votes1
answer318
viewsA: Typeerror: Len() of unsized Object how to resolve
Probably "x" is not a string. Try to convert it, like this: len(str(TestV))
python-3.xanswered Eduardo H. M. Garcia 443 -
3
votes1
answer111
viewsQ: REGEX - How to capture blocks of CASE WHEN ... END
Good morning, you guys. I’m trying to make a regex to capture blocks of CASE WHEN ... END. So that string: iduser + CaSe WhEn ("end") = 0 THEN 'CASE WHEN' ELSE ' END ' END + sum(iduser ) + CASE WHEN…
-
0
votes2
answers1013
viewsA: Generate random numbers in java, store in a vector and sort them
You are not using the "time" variable. So it can be ejected. For Sort, you can make your own Bublle Sort algorithm or use Arrays.Sort() - this one doesn’t use Bubble Sort. Bubble algorithm (if you…
-
1
votes1
answer159
viewsA: What is the explanation for the following question
The answer is the letter A. What the question is to iterate the array. int[] testData = {1, 2, 3}; for(int i : testData){ System.out.println(i); } It’s the same as doing: int[] testData = {1, 2, 3};…
-
4
votes1
answer4925
viewsQ: TO_DATE(SYSDATE, 'YYYY-MM-DD') works sometimes
I have the following problem: I use the JDBC to connect with Oracle. And I call rs.getTimestamp(index) to pick up a date field. When I run the function TO_DATE(SYSDATE, 'YYYY-MM-DD') the…
-
3
votes2
answers1971
viewsQ: How to capture string between square brackets
I need to capture strings between brackets within a string. I found a solution that doesn’t solve my problem completely: \\[(.*?)\\] Use like this: Matcher mat =…
-
0
votes1
answer875
viewsA: Null Service Instance with @Autowired
I did a lot of research and I was able to find the solution and the reason for the problem. The reason: It is not possible to instantiate manually Beans as this is totally out in the concept of Ioc.…
-
1
votes3
answers492
viewsA: Using an operator on a switch case
You can do it: #include <stdio.h> char op1; int main() { scanf("%c", &op1); switch(op1) { case '+': puts("ola"); } } Double quotes mean String, single quotes mean Character, so just put…
-
1
votes3
answers83
viewsA: Date Doubt in SQL
I answered the question in the comments. Just to leave the definitive answer, put here. When selecting to see if it worked, the date is returned as 0000-00-00. I understand that the format is…
-
0
votes1
answer875
viewsQ: Null Service Instance with @Autowired
Hello, everyone. I am making a Springboot REST webservice application with JAVA. I need a method to run from time to time. For this, I am using Quartz (org.Quartz). The class method is executed in…
-
2
votes1
answer569
viewsA: Search content according to filling two Combobox
How to take the status id and city id and query using these two information to bring content to the same home screen? It is possible to do this with AJAX. Here come the steps: First combobox the…
-
3
votes2
answers1020
viewsA: How does the pagination with PHP + AJAX occur?
In this example, AJAX actually displays the 6 in 6 records, but all of them are loaded. If there were a thousand records, for example, it would be a problem. A simple alternative is to prepare a php…
-
2
votes1
answer69
viewsA: Value x PHP input
Do a check with if/Else and echo with the ascii character code: echo Chr($cod_character). Ex: echo Chr(77); // This code displays an "M". In the table you have this line :…
-
0
votes1
answer206
viewsA: While inside of While
You should not use the fetch_assoc() > "while ($row = $lojas->fetch_assoc()). To search all records, use the mysql_fetch_array(): while($row = mysql_fetch_array($lojas)) { ... } The…
phpanswered Eduardo H. M. Garcia 443 -
1
votes1
answer476
viewsA: AJAX appear Divs according to database ID (MYSQL)
This is happening because ajax is storing the cache, so it is normal to always return the same data. Disable cache on request > cache: false Stay like this: function pegaDados() { var idUltimo =…
-
0
votes1
answer366
viewsA: Fill a Select Multiple and Update Table
The fastest way to do that is: Show all exams in checkboxes; Loop in the same way you’re looping now (only with checkboxes), but check each loop iteration to see if the ID is present in the table…
-
2
votes1
answer1760
viewsA: How to load the information inside the modal (bootstrap 3.3.6)?
I went through the same problem a few months ago. To solve the case, I did it this way. I made a new page . php only for modal content. <?php include('config.php'); // Arquivo de acesso ao banco…
-
2
votes1
answer776
viewsA: How to keep the url fixed?
As @Jhonatan Simões said, you can use Javascript for this. You must place a div, which will be the whole body of the main page and use the jQuery load. Google has a multitude of examples, but to…