Posts by Marllon Nasser • 3,845 points
113 posts
-
0
votes3
answers9794
viewsA: Show average banknote result with Javascript
First assign an id to the input so that you show the calculation result. Second change your calculation function to convert all values in the input to Float and instead of returning the value,…
-
3
votes1
answer885
viewsA: Pass id to Modal Form from Bootstrap
You have to put your HTML mount (which depends on repeat loop values while) within itself while... and when calling the modal, put a unique identifier for it, so that you don’t have multiple…
-
9
votes2
answers1019
viewsA: Convert.Tostring() and . Tostring()
There is a difference, yes... the correct thing is to use the Convert.ToString() taking into account that he has treatment for values null, as long as the .ToString() nay.. When you use .ToString()…
-
1
votes2
answers166
viewsA: How to edit this chart to work with more lines
Just add one more column to represent the data and then fill in the new information on DataTable google.charts.load('current', {packages: ['corechart', 'line']});…
-
2
votes3
answers451
viewsA: Role reuse on the same page with Jquery (beginner) Change event?
I advise assigning a id for each select... so you can identify them smoothly. //Select 1... <select id="selectTimes"> <option>Flamengo</option> <option>Vasco</option>…
-
4
votes1
answer86
viewsA: String truncate when performing append
There’s no "nothing wrong"... I ran a test using the same codebase as yours: using System; using System.Collections.Generic; using Newtonsoft.Json; namespace TesteConsole { class Program { static…
-
3
votes1
answer447
viewsA: Table Analysis with Execution Log
Question answered in stackoverflow.with, there is an oracle function that shows the previous record, the function LAG and LEAD(in English), then the idea is, for each record, take the date of the…
-
1
votes1
answer447
viewsQ: Table Analysis with Execution Log
I have a table in Oracle 11g with the following structure: CREATE TABLE USER.LOG_EXECUCAO ( ID NUMBER, DATA DATE, QTD_REGISTROS_INSERIDOS NUMBER, TEMPO_EXECUCAO VARCHAR2(50 BYTE) ) An example of…
-
4
votes1
answer67
viewsA: Static Methods X Nonstatic Methods for Data Access Layer
The truth is, it depends on how "sophisticated" you are... In general I would say that nay, is not a good practice. Using static methods in DAO, you cannot modify its behavior (in cases of overload,…
-
2
votes1
answer470
viewsA: How to calculate and display the sum of dates instantly?
I recommend using the .change on top of the drop with the amount of months. If you have the string with the initial date, you can create a Date() with this string...and from there add up the amount…
-
1
votes1
answer780
viewsA: find a form field with jquery
The problem is in find, change to .find('select') Online example EDIT: There is no error in your code... I believe it is just an error in the html of where your select of name="Finalidade"... missed…
-
2
votes1
answer562
viewsA: View SQL at Runtime
Yes, it is possible, but unlike Java and the implementation of Hibernate, has no property that you simply "arrow" and SQL is shown in LOG.... By c#, you can write/implement a browser and do whatever…
-
1
votes1
answer57
viewsA: C# com Storeprocedure
The problem is in the call of the trial... Don’t use the exec when you want to call your application’s procedures... Make only the Procedure call: var connectionString =…
-
3
votes1
answer77
viewsA: Pick up service html and display DIV on my website
Turning the comment into a response... Just use jQuery: $("#suaDiv").html("<html> seu html </html>") To submit your form via get: $.ajax({ type: "GET", data: $("#form_t").serialize(),…
-
-1
votes1
answer101
viewsA: Deletion of multi upload files
In function removeFile, take the element in question like this: var el = $('img[data-img="'+item+'"]'); To rule it out, take the closet("li"), that is, the element <li> closest to him.…
-
3
votes2
answers793
viewsQ: What HTTP methods can a Crawler not track?
A conceptual doubt (or not): Of the HTTP methods, which of them cannot be "tracked" - or interpreted - by a Crawler? POST GET PUT PATCH DELETE Someone with knowledge on the subject can answer us?…
-
4
votes1
answer1332
viewsA: How to change the date format in java script?
Create a role for this: function formatarData(data) { var d = new Date(data), mes = '' + (d.getMonth() + 1), dia = '' + d.getDate(), ano = d.getFullYear(); if (mes.length < 2) mes = '0' + mes; if…
-
3
votes1
answer1448
viewsA: Input Subtraction System With Javascript
Use the toFixed(2) <script language="javascript"> function calcular(){ var valor1 = document.getElementById("valor1").value; //pega o valor do imput do valor 1 var valor2 =…
-
2
votes2
answers12423
viewsA: Oracle Insert of multiple lines
Use the INSERT ALL: INSERT ALL INTO processo (id, status, descricao) VALUES (1, 'X01', 'lorem ipsum dolor') INTO processo (id, status, descricao) VALUES (2, 'X02', 'lorem ipsum dolor2') INTO…
-
3
votes2
answers11378
viewsA: How to check duplicated elements in array?
No, there is no function via jQuery that does this.. the closest to that reality would be the .Unic(), but only works with elements DOM. But you can develop your own method using .each and .inArray.…
-
5
votes1
answer17754
viewsA: How to position a div in front of another
z-index only works for elements with the specified position. Specify the position of the elements to function... :) .funil div { position: relative; //(position:absolute, position:relative, ou…
-
0
votes2
answers107
viewsA: Use Cookies or Session for business guide?
Possible duplicate of What’s the difference between Sessions and Cookies and Session C# how it works? Copying the brief explanation.... Cookie is a storage engine for your client-side variables. It…
phpanswered Marllon Nasser 3,845 -
0
votes2
answers332
viewsA: JSP to import all acquisitions from a directory
Unfortunately this is not yet supported by JSP.. Some solutions of contour: 1- Override the method encodeEnd() of ScriptRenderer.. (This is kind of complicated.... and also depends on the JSF…
-
3
votes1
answer1100
viewsA: how to convert a request. String parameter to integer
You need to convert to Integer. Familia.setSalariodoPai(Integer.parseInt(request.getParameter("salariodoPai"))); There are several topics explaining this, search before posting :)…
-
1
votes2
answers616
viewsA: ASP NET MVC - Download html table
You can do this using jQuery and window.open('data:application/vnd.ms-excel)... I made a Fiddle for you to test, but basically you need to export HTML from your table. Assuming your html is: <div…
-
1
votes1
answer288
viewsA: Images don’t stay inside the div
I turned the comment into a response: Place height: 200px; in the css statement #container-fim-ap, see: fiddle…
-
2
votes3
answers1667
viewsA: Function to format dates
Create a JS function: function formatarData(data) { var d = new Date(data), mes = '' + (d.getMonth() + 1), dia = '' + d.getDate(), ano = d.getFullYear(); if (mes.length < 2) mes = '0' + mes; if…
-
2
votes2
answers1160
viewsA: How to copy an html block when clicking a link/button?
Assuming the html file: <div class='dados'> <input type="text" value="" /> </div> <a href="javascript:void(0);" id="btnAdd">+</a> By clicking the button, through a…
-
4
votes2
answers5016
viewsA: Session C# how does it work?
Possibly duplicated? (This link can help you too) What’s the difference between Sessions and Cookies? When it comes to web, you can change the value of the timeout through the web.config:…
-
0
votes3
answers1124
viewsA: how to show data from a sharedPreferences in a Listactivity
Putting values: public static final String PREFS = "MinhaPreferencia"; SharedPreferences.Editor editor = getSharedPreferences(PREFS, MODE_PRIVATE).edit(); editor.putString("nomeUsuario", "Marllon…
-
1
votes1
answer94
viewsA: Jquery code does not call Method in the controller
Option 1: Change controller return: [HttpGet] public JsonResult ObterPaises() { Comandos cm = new Comandos(); string sql = "Select id, nome, sigla FROM TPais"; var dr = cm.SelectReader(sql,…
-
2
votes1
answer219
viewsA: Sort by ENUM Mysql value
According to the documentation: ENUM values are classified based on their indices, which depend on of the order in which the enumeration members were listed in the column specification. For example,…
-
4
votes2
answers4940
viewsA: What’s the difference between Sessions and Cookies
Cookie is a storage engine for your client-side variables. It is physically stored on the client’s computer by the browser. Different users on the same computer can read/use the same cookie. On that…
c#answered Marllon Nasser 3,845 -
2
votes7
answers1134
viewsA: Select a file by name in PHP
<?php $str = '20160111_ALGUMA_COISA'; echo substr($str, 0, strpos($str,"_ALGUMA_COISA")); ?> Upshot: 20160111 EDIT: Assuming the file name is formatted as follows: DATA_ALGUMA_COISA and I want…
-
5
votes2
answers13066
viewsA: Make Insert in two tables at the same time
It is not possible to do multiple inserts through a statement, but within a transaction yes: BEGIN TRANSACTION INSERT INTO Tabela1 (Coluna1, ...) VALUES (....); INSERT INTO Tabela2 VALUES (...,…
-
4
votes1
answer99
viewsA: Merge 2 different tables and display content sorting by number of views (larger to smaller) of the two joints in Mysql
select * from (select titulo, impressoes as visualizacoes from noticias union ALL select titulo, cliques as visualizacoes from cliques) result order by result.visualizacoes desc limit 0,4 Upshot:…
mysqlanswered Marllon Nasser 3,845 -
0
votes3
answers821
viewsA: Razor - Send parameters to a Bootstrap modal
The ViewBag places the information inside the HTML, serving to carry data from the Controller for View. In your case, assuming the modal so: <div id="modal60"> <div class="modal-header">…
-
2
votes1
answer728
viewsA: Update
Implement a function that uses ajax to communicate with a controller (DetalheNotaFiscalController, for example): function DetalharNotaFiscal(idNota) { $.post("/DetalheNotaFiscal/Detalhar", { id:…
-
0
votes2
answers467
viewsA: Back button - Level above or Previous page
Think about the concept of "back," which is related to a history. If the page was accessed directly, the previous page would be the "correct" behavior, but nothing prevents you from forcing your…
htmlanswered Marllon Nasser 3,845 -
1
votes4
answers119
viewsA: Data deletion via Hibernate
@Resource UserTransaction utc; @PersistenceContext(unitName = "xyz") EntityManager em; try { utx.begin(); Query q1 = em.createNativeQuery("DELETE FROM…
-
1
votes1
answer233
viewsA: Quantity limit in database query
Yes, Oracle limits that 1000 records are in the clause in. No, nhibernate cannot "manage" to divide the list into several of 1000. It does nothing "special" with the in, only passes the bank…
-
0
votes1
answer59
viewsA: Formatting PHP values
rand($min*10, $max*10)/10 That’s it? <?php echo rand(20*10,30*10)/10 ?> Output: 25.4 Edit: <?php function randomWithDecimal($min, $max, $decimal = 0) { $scale = pow(10, $decimal); return…
phpanswered Marllon Nasser 3,845 -
3
votes1
answer917
viewsA: List all data with the same id
Come on... Assuming that the column produtos be the sale product id in the table pedidos, and with id_venda defined, we solve the problem with a query only: Supposing that your column produtos has…
-
1
votes4
answers8168
viewsA: Is it possible to make an IF with javascript directly in html?
<script type="text/javascript"> var permissoesLogin = '<?php echo $loginPermissoes; ?>'; if (permissoesLogin == "admin") { //todo } else { //todo …
-
1
votes2
answers196
viewsA: How to Write Product Checkbox and Id to Mysql
The columns id_produto and id_cor_textura are of type int and you are trying to insert values of type string. Besides, you’re trying to insert "$IdProduto" instead of the variable value IdProduto.…
phpanswered Marllon Nasser 3,845 -
3
votes1
answer533
viewsA: Fluent Nhibernate with multiple tables
Supposing your table of usuario has a FK for the table endereco, you would have something like this: public class UsuarioMap : ClassMap<Usuario> { public UsuarioMap() { Id(c => c.Id); Map(c…
-
4
votes4
answers1314
viewsA: Check checkbox with ajax
Assuming you have the following checkbox: <input type="checkbox" id="checkVeiculo" value="" /> You can assign an onclick event via javascript: <input type="checkbox" id="checkVeiculo"…
-
0
votes2
answers1350
viewsA: Remove a column from gridview
Friend, why don’t you filter the column by removing it from the select? You can also make the change via front-end, by css putting style = "display: none;" in the column. Another solution via server…
-
1
votes1
answer1302
viewsA: Open external application as a child form in C#
Using the Win32 API you can "eat" other software. Basically you open this application and you put that the "father" of it is the panel that you want to work. If you do not want the "style effect" of…
-
2
votes2
answers2016
viewsA: Sending Model to Controller via Ajax
Try to pass the serialized form in the model. Assuming your form is id formxpto: function emitir () { var model = $("#formxpto").serialize(); $.ajax({ type: "POST", traditional: true, url:…