Posts by Ricardo Pontual • 21,129 points
751 posts
-
2
votes1
answer260
viewsA: How to know if a div does not have the Hidden class with jQuery
You can use the hasClass() for that reason: if ($("#divcamponiver").hasClass("hidden")) :hidden This used in the selector is searching for the pseudo-class Hidden and not a class called Hidden. A…
-
0
votes1
answer38
viewsA: Placing disc or Circle or square markers does not work
See the code you put in the comment: <table> <tr> <td style="white-space: nowrap;"> <ul type="square"> <li> @mainItem.ShoppingCartMessage </li> </ul>…
-
1
votes2
answers115
viewsA: Insert an option in select in a particular Window
You can use the eq(n) to select the index number, and then before() or after() to insert the new element before or after respectively. Take this example: $("#btn").click(function() {…
-
2
votes1
answer279
viewsA: INSERT with clause SELECT WHERE NOT EXISTS
In his select is missing the from. Since you are generating data that is not in a table, you can use the FROM DUAL SELECT 'CB15-1901', '102030', 'A' FROM DUAL WHERE NOT EXISTS ( SELECT 1 FROM…
-
1
votes2
answers1018
viewsA: Api Climatempo C#
Looking at the documentation in http://apiadvisor.climatempo.com.br/doc/index.html, it is possible to see that your class does not have properties with the same name returned in json. The basic…
-
1
votes1
answer43
viewsA: JS or Jquery pass two array’s, input text and input check when checked
Let’s go by parts, the selector can be made like this: $(this).prev("input:text[name='optionsObsGrupo[]']") used the this to use the checkbox as reference; prev to get the nearest element before…
-
1
votes2
answers264
viewsA: SQL syntax error when updating a record in C#
The SQL command is wrong when we use UPDATE, SET appears only once, and the fields and values you are changing are separated by a comma. string comando = "UPDATE cliente SET nome = '" + dto.Nome +…
-
1
votes1
answer16
viewsA: Login data is visible on the browser console
The purpose of Developer Tools is to record everything that happens to the page, requests and posts including, so the information that they have trafficked is there, it acts as a Sniffer, but the…
phpanswered Ricardo Pontual 21,129 -
1
votes1
answer52
viewsA: Why do some links not inform the domain or protocol?
As the name says it is relative (in relation to something) Imagine that a website’s folders have the following structure: / (aqui a raiz do projeto) css/ estilos.css imagens/ logo.png icones/…
-
1
votes1
answer296
viewsA: Select all textbox text
Just add the elements that will have the events treated (handled) by separating by commas: Private Sub nct_focus(sender As Object, e As EventArgs) Handles text1.GotFocus, text2.GotFocus,…
vb.netanswered Ricardo Pontual 21,129 -
9
votes1
answer752
viewsA: Why doesn’t CORS block Postman and derivatives?
Because CORS is a security implementation in browser engines, and as such validates requests cross-Domain. Other tools like the POSTMAN are not running in the context of browsing and therefore, if…
-
2
votes2
answers1436
viewsA: Take variable value in another method
You need the variable visibility to be wide for both methods. In this case, you need to declare in the class scope: class NomeDaSuaClasse { // aqui a variável será visível para todos os métodos da…
-
0
votes1
answer158
viewsA: Javascript function is not replacing window.location.pathname
Depends on the browser you are using, there is compatibility problem, see table here: pathname At the time of that reply, Edge and Opera are not compatible. Also, the pathname contains the "/" bar,…
-
0
votes3
answers89
viewsA: How to reference only the first occurrences of an A tag using jQuery?
First we need to find the "b" tag element that has the "Genre" content": $("b:contains('Genre:')") Then, the next 3 elements of the "a" tag. For this we use nextAll, to get the next elements on the…
jqueryanswered Ricardo Pontual 21,129 -
1
votes1
answer59
viewsA: Web api c# - Get current path in controller
The object Request has that information: var route = Request.Path.Value; Remembering that it is the relative path, without the protocol ( http, etc.)…
-
3
votes4
answers1357
viewsA: associate a checkbox to a script function
Could add the event change to checkbox, and validate each time your state changes: var checkbox = $("#Testeverde input[type='checkbox']"); checkbox.change(function(event) { var checkbox =…
-
2
votes2
answers700
viewsA: How to know how many positions an array has in Java?
This line in your code that makes the split, already have all the elements separated, so just use the property length to obtain the quantity: String[] dadosCSV = linha.split(VIRGULA); Int quantidade…
-
0
votes3
answers871
viewsA: Use more than one language in the same project?
Yes it is possible to use more than one language in some software, the most important question is whether they need to interact with each other. For example, extracted data needs to be displayed in…
-
1
votes1
answer34
viewsA: I do not understand and do not know where to find this information
If you want this level of detail, you better see the source code: module js. And here the documentation in English: Node require But simply put, if you just give the name of the module as in your…
-
1
votes1
answer440
viewsA: Add child element before other
You can use the method insertAdjacentElement: const filho = document.createElement('li') const text = document.createTextNode('Filho 0') filho.appendChild(text)…
-
1
votes1
answer73
viewsA: Reduce the number of arrays
But if you have different tracks need to store the separate values, but it is possible to reduce the number of arrays and simplify a little like this: var faixas = { }; for(var i = 0; i <…
-
1
votes4
answers746
viewsA: Limit number of lines Textareafor
Here an example. Basically the line break scape character is the \n, then just count how many line breaks there are. Of course if you break the lines because of the size of the textarea will not…
-
2
votes1
answer136
viewsA: Sort string and ASC number
You can use it like this: SELECT * FROM valor_atributo ORDER BY valor * 1, valor ASC See here working: Sqlfiddle It was based on this question, where I had a solution to an almost identical problem:…
-
0
votes3
answers38
viewsA: How to instantiate Webheadercollection using object initializers?
You won’t be able to do it that way, because there is no property public in class WebHeaderCollection to display the list of values in order to be instantiated like this. View documentation:…
c#answered Ricardo Pontual 21,129 -
2
votes2
answers44
viewsA: Changing positions of an integer
You can use the convert: select CONVERT(datetime, convert(varchar(10), 20190327)); To convert the date to number you can do so: select CAST(CONVERT(varchar(8),getdate(),112) as int) That is, it…
-
4
votes1
answer64
viewsA: I have a headache about the event "abort" or "onabort" for what it serves?
Abort is the event that occurs when a resource (here can be understood as an image, video or audio resource) has been interrupted: Abort Event To address this event, the Handler used is the onload,…
javascriptanswered Ricardo Pontual 21,129 -
2
votes1
answer953
viewsA: What’s the difference between using type="text/javascript" or not?
Until HTML4 was needed, now with HTML5 no more, stayed is optional, even to maintain compatibility: https://www.w3.org/TR/html5/scripting-1.html#attr-script-type The type attribute gives the…
-
2
votes3
answers3120
viewsA: Javascript: get the value of a textarea (not working)
Here it worked perfectly.... if you click the button will appear "something", if you change the value and click again, appears what you typed, see if there is any other error in your code.…
-
1
votes2
answers119
viewsA: call include inside js
Is giving error in Function tabClicked, making that "content" is not defined, and is not even, see well the body of Function: function tabClicked(e) { var contentId = e.target.dataset.tabFor;…
javascriptanswered Ricardo Pontual 21,129 -
0
votes3
answers204
viewsA: Update app.config or web.config via code
You can create a specific configuration file for this purpose, without writing to Web.config or App.config. Suppose you create the "import.config" file with this structure: <?xml version="1.0"…
c#answered Ricardo Pontual 21,129 -
1
votes2
answers746
viewsA: Compare value of two fields with jquery
The problem is that your comparison is being made as if the value is a "string". In this case "85939" is less than "8594", because the beginning "8594" is greater than "8593" and then comes "9". To…
-
2
votes1
answer81
viewsA: Join in SQL with two tables - users and cells
As @anonimo commented, just add a new join for the same table, but using the "supervisor_id": SELECT cells.Cell_ID, UserLeader.name AS Leader, UserSuper.name AS Supervisor FROM cells INNER JOIN…
-
4
votes2
answers70
viewsA: Input receives no value when clicking the Button
Your problem is that you need to read the value of the field by clicking the button and not before, see the example below: var button = document.querySelector("button"); button.onclick =…
javascriptanswered Ricardo Pontual 21,129 -
0
votes1
answer32
viewsA: populating div with $.ajax, Error
As the result of the call Ajax is already a html, then you need to do the append that html directly in the element select, thus: $("#idRede").append(result); By adding in div, does not make options…
jqueryanswered Ricardo Pontual 21,129 -
2
votes2
answers68
viewsA: Flexbox width being exceeded
You are expecting the div "block 2" to be the same size in your Parent, the div "page". Turns out when using the display: fixed, the size of the element in question behaves in relation to the…
-
2
votes2
answers112
viewsA: SQL: Compare between 2 columns and return only 1
You can use the function COALESCE, either returns the first value of a list that is not null: SELECT nome, COALESCE(cpf, cnpj) AS documento Another option would be using CASE WHEN to solve this:…
-
1
votes1
answer4074
viewsA: Uncaught Typeerror: Cannot read Property 'toLowerCase' of Undefined
Are you checking first if the $(this).data("pesquisar") is returning some value and not undefined? In your table do not see and attribute "date-search" set, will give error. Try to use the…
-
0
votes2
answers68
viewsA: Turn the value into String for Integer
Your code is almost right, but let’s think about what we should do: Remove the "R$"; Remove the "."; Replace the comma with "."; Convert to whole; In that order, it would look like this: var…
javascriptanswered Ricardo Pontual 21,129 -
0
votes1
answer31
viewsA: Demo only works on Jsfiddle
Missing add the references of jquery, which are made automatically on Jsfiddle when you select what you will use jquery. Only include in HEAD the links: https://code.jquery.com/jquery-3.3.1.min.js…
-
1
votes1
answer420
viewsA: JOIN 3 tables (LEFT JOIN)
Just include a new join and add the table "DIARIO": SELECT s.S_CODIGO AS CODIGO, s.S_STATUS AS STATUS, e.E_INFO AS INFORMACAO, d.D_DATA_INSERT AS DATA_CADASTRO FROM SERVICO s LEFT JOIN ENTREGA e ON…
-
4
votes1
answer28
viewsA: Configure database creation in another folder
Yes, you can stop the service and change the path in the configuration file of mysql. If it is Windows, the file is my.ini, and is in the application data folder, usually in "C: Programdata Mysql".…
mysqlanswered Ricardo Pontual 21,129 -
3
votes1
answer35
viewsA: I am unable to change the contents of my button
Use the property textContent for that reason: function altera(argument) { document.getElementById('novo').textContent ="atualizou"; } <button id="novo" onclick="altera()">Isso e um…
-
1
votes1
answer746
viewsA: Traverse color gradient according to value
Let’s take as values range, 0 to 100 degrees Celsius. 100 degrees is the hottest, so it should appear red, RGB (255,0,0) Degree is the coldest, should appear blue, RGB (0.0.255) So we calculated a…
-
0
votes2
answers59
viewsA: SELECT Cursor using top1
You could use a max(cod_pedido) or min(cod_pedido) to bring only one value. It would be something like that: SELECT dt_pedido, cod_cli, max(cod_pedido) as cod_pedido, max(valor) as valor FROM…
-
0
votes2
answers538
viewsA: Countdown js
You need to create a variable to contain your timer, so that by clicking a button you can stop using clearInterval. Take this example: var count = new Number(); var count = 21; // variável para o…
javascriptanswered Ricardo Pontual 21,129 -
2
votes1
answer8509
viewsA: How to decrease the file size . zip generated by Dotnetzip?
Although it is already debated in the comments, just to formalize, the compression of files .jpeg and .jpg (Joint Photographic Experts Group) doesn’t have much effect because this format is already…
c#answered Ricardo Pontual 21,129 -
1
votes2
answers3529
viewsA: How to make the text adapt to the size of the div?
First, I suggest reading about W3’s css measurement unit: CSS: in, px, ct, cm, etc You can use a unit of measure that is proportional to the size. For this you can use the unit vw or viewport width,…
-
2
votes1
answer287
viewsA: What exactly is the UTL_HTTP (ORACLE) SET_PROXY Proxy
Like the package utl_http is used to access data through the Internet, if you are accessing the Internet through a proxy, in a company for example where this is quite common, the commands of the…
-
7
votes1
answer48
viewsA: Entitiy framework for JAVA?
What you seek is a ORM, Object-Relational Mapping, so are called these frameworks to map and facilitate access to bank entities through class models. Here’s a great question with great answers…
-
1
votes1
answer30
viewsA: I’m trying to write a JS code to test the value of "Very Good" to "Bad " in IQA(Air Quality Index)
Your code has some problems: The first one who is not reading the correct input values (from the idea that the ids are correct) is that it was missing .value in the document.getElementById.…