Posts by Vitor Ceolin • 464 points
35 posts
-
1
votes1
answer37
viewsQ: Cast from Object for an object created in Typescript
Problem Good afternoon! it is possible, in typescript, to give a cast of a object to a class I created? I need precisely to validate whether the fields exist or not, and if they are filled in…
-
0
votes2
answers23
viewsA: Event that doesn’t work for a particular tag without having to put id on the tags that has to have the event
If you don’t want all tr elements receive the property, it is better to make a class. Let’s say you don’t want only the footer to have this property, it would look like this: .classeHover:hover{…
-
0
votes2
answers123
viewsA: Upload c# files to API
I did it! The problem was obvious, I needed to define the size of the contentLength. I thought that if I set it to 0, it would mean that it would not have set size, but that’s not the case. Follow…
-
1
votes2
answers123
viewsQ: Upload c# files to API
Hello! I was sending files doing POST for Azure Devops (documentation) via Javascript (just to test some features): var request = new XMLHttpRequest(); request.open('POST', url, true);…
-
1
votes2
answers49
viewsA: Parameters in Java
The three points in the last parameter serve to call the method as if it had overloaded versions that accepted at the end of its argument list an arbitrary number of arguments of the parameter type.…
javaanswered Vitor Ceolin 464 -
0
votes0
answers25
viewsQ: Sending files via ajax to Webmethod
Good afternoon! I’m trying to send files via ajax for a WebMethod in c#, but I keep getting back my whole html page Javascript //Upload de arquivos $('#upload').change(function () { var fileUpload =…
-
1
votes1
answer30
viewsQ: jQuery Animate() with unwanted behavior
Good evening! I am making an application and need to use some slide effects. I used the animate jquery to get the desired result. It was even good, but while the animation occurs the height of the…
-
0
votes1
answer30
viewsA: Pop up extension Chrome cutting text
After much research I understood the problem. The bootstrap tries, in an intelligent way, to identify where it can expand. However, the Chrome extension increases or decreases in size dynamically…
-
0
votes1
answer30
viewsQ: Pop up extension Chrome cutting text
Hail! I’m doing a pop up for my Chrome extension but am finding a problem. When I click on the dropdown, the text is cut: I believe it’s because he’s going to right but Chrome does not allow…
-
0
votes0
answers19
viewsQ: JS to click a button automatically
Good morning! I have a problem that I need to make more than 1000 changes to some web pages, and I wanted to automate this. My idea was to do this via JS. I searched through the web and found the…
-
0
votes1
answer42
viewsQ: Query a column using the output from another column
Suppose I make the following select: select "nome", "quantidade", (quantidade * 2 - 5 % 3) AS numero ((quantidade * 2 - 5 % 3) * 5) AS segundo_numero from "tabela" How do I use the field numero…
sqlasked Vitor Ceolin 464 -
0
votes1
answer35
viewsQ: Use of Count() for data recurrences
I have the following appointment: SELECT "metas"."Segmento", "metas"."Perfil", "metas"."Meta", "Negócios"."Nome" FROM "metas" JOIN "Negócios" ON "Negócios"."Perfil" = "metas"."Perfil" AND…
sqlasked Vitor Ceolin 464 -
2
votes2
answers170
viewsA: Convert a string in monetary format to number and subtract 90%
You are having problems at the time of formatting (turn the string to float and then to string again to perform the operation) var a = 'R$ 320,55'; /** * Transforma a string em um float */ function…
-
0
votes1
answer24
viewsA: HOW TO MAKE CONTAINER CRUSH UL?
As commented by Fernando, put overflow:hidden in CSS resolves. Basically you say that the behavior of the text that is out of the div be hiding. See working: * { margin: 0; padding: 0; box-sizing:…
-
-1
votes1
answer45
viewsQ: Extension of Chrome to run only in subdirectory
I’m doing a Chrome extension that makes some changes to instagram’s HTML, so on manifest.json put like this: "content_scripts": [ { "matches": ["*://*.instagram.com/*"], "run_at": "document_idle",…
-
0
votes1
answer37
viewsA: match vectors using variables
The error is happening because you need to initialize the variable. You’re trying to add 2 to it, but it doesn’t exist yet, so it has no value. Remember that a variable nula is not the same as her…
pythonanswered Vitor Ceolin 464 -
0
votes0
answers30
viewsQ: What is a ternary conditional operator (?:)?
I was browsing the site looking for fonts for a reply and noticed that there is no no questions on the subject. As it is something very popular, I think it would be interesting to have an answer on…
conditionasked Vitor Ceolin 464 -
0
votes1
answer66
viewsA: How to insert an "if" into an INSERT string in the database?
You can use a ternary operator to not have to create more lines DateTime ContaRecebeDataPagto = dgOrigem.SelectedRows[0].Cells[2].Value == null ? null :…
-
1
votes2
answers54
viewsA: How I do a Ctrl+C something inside a form with a button using javascript
function copyText() { /* Encontra o texto a ser armazenado */ var copyText = document.getElementById("input_url"); /* Seleciona o texto do input */ copyText.select(); copyText.setSelectionRange(0,…
javascriptanswered Vitor Ceolin 464 -
1
votes1
answer104
viewsA: Take an attribute from another class and put as parameter in a constructor
Error because you are sending a string as a parameter instead of the object. Try: Comprador comprador1 = new Comprador("Ari", 22, enderecoresidencial);
javaanswered Vitor Ceolin 464 -
7
votes1
answer480
viewsQ: Sleepy barber problem with traffic lights
I found this code online while studying and I couldn’t understand two things: What the traffic light "seatbelt" does? Why isn’t the barber checking the waiting room after finishing a cut? (It goes…
-
0
votes1
answer456
viewsQ: Uncaught Referenceerror: method is not defined
I’m calling a method to convert my ajax request to a readable date, but I keep getting the message that the function has not been set, I don’t understand why, since it is literally the function just…
-
3
votes1
answer701
viewsQ: How to use a COUNT with condition?
I have a table quarto, wanted to return the amount of rooms you have on each floor (the room has an attribute andar), but I don’t know how to get him back from every floor SELECT andar, COUNT(*…
-
0
votes2
answers93
viewsA: PHP - doubts with date("Y-m-d")
Use strtotime: date("Y-m-d", strtotime('+1 day', strtotime($date_raw))) You can use the same logic (only with -1 day) to subtract from the due date instead of adding the current date.…
-
1
votes1
answer39
viewsA: Button to enter Records in Database
Try to manually convert the image to byte before sending it to the bank ImageConverter converter = new ImageConverter(); imagem = (byte[])converter.ConvertTo(img, typeof(byte[]));…
-
0
votes1
answer48
viewsA: How to execute a function after the contextmenu appears?
I will leave here as I solved the problem, it is a gambiarra and is probably not the ideal solution, but it works. First I took the element that was underneath this div (the div was covering this…
-
0
votes2
answers46
viewsA: Filling the Div container does not complete everything
If you want to change the background-color of the full page puts the property in your body body{ margin: 0 auto; padding: 0; background-color: #d6d6d6; }…
-
0
votes1
answer48
viewsQ: How to execute a function after the contextmenu appears?
I made a method to remove a class from my div when the contextMenu is called: minhaDiv.oncontextmenu = function () { this.classList.remove("classe"); } How can I make this class appear again soon…
-
2
votes1
answer380
viewsA: Visual Studio Code does not mark functions
Just mark the property javascript.suggest.completeFunctionCalls in their Ttings. (Click Run to see the example gif) <div style='position:relative; padding-bottom:calc(40.34% +…
-
3
votes1
answer65
viewsA: How to make the program continue where I left off after an exception happens in my Ry
Create a 10 position arrangement first instead of doing this. float pm = new float [10] Now just walk. for(int i = 0; i < pm.length; i++) { try { pm[i] =…
-
2
votes2
answers98
viewsA: how to leave the result 93.1
Just an addendum. If the goal is just to print on the canvas, String.format is ideal, but if you want to store the number in a variable, use Math.round((n1*n2*100) / (n3*n4*100)*10)/10; Remembering…
-
0
votes3
answers238
viewsA: Update label every time you click a button
This happens because, within its method, the variable num is not the same as the one you stated. think that the num within the method only the method can see. To achieve this value, you must return…
-
0
votes3
answers129
viewsA: Recursion - add numbers to an array
When N < 1 (first condition), the recursion will start to return. I mean, on the line you’re in doubt const countArray = countup(n - 1);, the method will return 0, therefore const countArray = 0.…
-
1
votes1
answer118
viewsA: How to add a column with text in gridview by code Behind?
The really ideal way would be for it not to be handled on its interface, but rather to make its SELECT own a JOIN which will also receive this value. As another option, try instead of populating the…
-
0
votes2
answers413
viewsA: How to create a View in SQL Server by unifying all columns of 3 tables?
Use (CREATE VIEW vwEstudantes AS (SELECT * FROM dbo.ESTUDANTES_2012 UNION SELECT * FROM dbo.ESTUDANTES_2015_1 UNION SELECT * FROM dbo.ESTUDANTES_2015_2)); Reference Note that having different tables…