Posts by Maicon Carraro • 8,881 points
269 posts
-
1
votes1
answer100
viewsA: jLln - Make dynamic query by taking 'Select' values
You can mount the query as if it were text and then run through the function eval(). Example: function montaQuery() { var query = 'jlinq.from( array ).sort( "date" )';…
-
4
votes1
answer1206
viewsA: Why is the type=Submit button not submitting?
Your button of submit is out of the form, places inside. <div class="modal-body"> @using (Html.BeginForm("AlterarStatus", "Home", FormMethod.Post, new { enctype = "multipart/form-data" })) {…
-
0
votes2
answers15503
viewsA: Run JS when opening the page
Are you using which version of jQuery? The method on only added in version 1.7+. Make sure you are importing the correct version. <script…
-
2
votes3
answers161
viewsA: How can I make this code more functional in Javascript?
The question ends up involving more mathematics than programming itself, as I am no expert in mathematics I will try to explain in the simplest and most lay way. How to find out if a number is…
-
8
votes1
answer1046
viewsA: How to take data from a list only when there are two equal codes
In the collection Set there is a method that does just that, his name is .retainAll(). Example to use: List<Integer> list1 = new ArrayList(); list1.add(1); list1.add(2); List<Integer>…
-
3
votes3
answers664
viewsA: Problem with window.open() JS
%20 is the ASCII Encode equivalent to space, that is, a simple ' ' (ignore quotes). Probably your link has a space at the beginning, use the method .trim() to remove unwanted spaces at the beginning…
-
4
votes1
answer1943
viewsA: What is the use of window.history.replaceState?
The methods history.pushState() and history replaceState() were introduced in the HTML5 to be able to recover and modify values during user’s browsing history. Both methods work the same way, the…
-
1
votes2
answers2437
viewsA: remove the repeated values
In this part here you are adding in the array the current value and then traverse the even array searching for values repeated, that way he ALWAYS will find why you are adding BEFORE.…
-
1
votes1
answer663
viewsA: pass actionlink parameters to jquery function
You can concatenate the parameters when creating the ActionLink. @Html.ActionLink("Delete", "DeleteData", new {id = item.CD_PORTFOLIO, par = "PO"}, new { onclick = "return deleteData('" +…
-
1
votes1
answer70
viewsA: Group results of queries
Use the operator BETWEEN to make date range queries. Example: SELECT * FROM saldo WHERE DATE(data_mov_saldo) BETWEEN DATE(dataini) AND DATE(datafin) ORDER BY data_mov_saldo DESC That way you can…
-
2
votes2
answers56
viewsA: Remove messages from one caller without affecting the other
I prefer to leave for the idea of timestamp also, about your doubt of the DELETE I would do something like that: A timestamp for each user of that conversation that will be overwritten every time…
-
4
votes3
answers161
viewsA: This Javascript loop is taking down my browser. Any idea why?
Although @Guilhermenascimento mentioned his problem, the method splice makes your loop infinite, I’ll post my solution: function RunLength(str) { str = str.split(""); var strRetorno = ""; var…
-
1
votes1
answer452
viewsA: Return value from select
To recover the valroes, you take the hair fetch(PDO::FETCH_ASSOC), thus: $stmt = $pdo->prepare("SELECT username, mail, password FROM users WHERE username = :user_name OR mail = :user_name;");…
-
-1
votes1
answer22
viewsA: How to decrease the sensitivity of Iscroll5?
In the same site there is the part of advanced commands that can be seen here: http://iscrolljs.com/#Advanced-options I believe what you seek is: options.mouseWheelSpeed Modifica a velocidade do…
iscroll5answered Maicon Carraro 8,881 -
4
votes1
answer50
viewsA: Problems with **UL inline**
You have misspelled the attributes of hr. hr{ with:20px; display:inline block; vertical-align:middle; } Is wrong the with and inline block, correct is: hr{ width:20px; display:inline-block;…
-
6
votes3
answers13303
viewsA: Star voting with radio input, javascript/css
I made using pure javascript, basically created a function to go through all img with the same name and according to which star was clicked (Indice) I assign whether it will be highlights or not.…
-
1
votes2
answers183
viewsA: java.lang.Nullpointerexception
Change the constructor of your class Client to always create an instance of Bookkeeping along. public class Cliente { // seus atributos public Cliente() { this.conta = new ContaBancaria(); } //…
-
3
votes1
answer96
viewsA: Sql query return the same name with different date
This query will only return Victims that appear at least more than once and with different dates, remembering that the correct one would be you seek for the ID of the Victim and not name as it may…
-
1
votes1
answer3267
viewsA: How to place an Onclick event by calling a Javascript Function on a Link inside a GRIDVIEW on Asp.net?
If you want to call function javascript click is with the attribute OnClientClick, although my recommendation is that you add a click event to Codebehind and call there passing the attributes. If…
-
1
votes2
answers192
viewsA: File manipulation
Analyzing at the time you open the file fopen("notas", "rb+"); If you just want to adicionar text instead of creating a new you use the parameter a fopen("notas", "a"); Add to a file. Read…
-
9
votes2
answers613
viewsA: Dynamically delete multiple lines with PDO?
You can use the function str_repeat() PHP to generate a string repeating the ? for each ID present in your matrix: $ids = //... seja lá como você recupera os ids $mParams = str_repeat('?,',…
-
1
votes2
answers444
viewsA: How to create a function to clear the group of a radiobutton?
I believe you just want to clear the selection of a only question, then I created a method by passing the parameter of which question is and then concateno to search only the radio belonging to that…
-
1
votes2
answers649
viewsA: PHP and Mysql: Database does not update
There are two situations if you want to know if you executed the command or if the command affected records. In case you want to know if he changed any record is with the affected_rows.…
-
0
votes2
answers4434
viewsA: Adding numbers from a Mysql column using PHP
Apparently you’re using PDO, then follow an example: $STH_SELECT = $dbh->query("SELECT sum(coluna_pra_somar) FROM catalogo_comment WHERE cm_item = '2'"); $totalSoma =…
-
1
votes1
answer176
viewsA: Why does my Drivermanager return null Pointer?
Checks whether the .jar driver is in the directory /WEB-INF/lib. You’re making pagecontroller?=p=noticias even? It has 2 equals in this parameter, which totally mocks. Do pagecontroller?p=noticias…
-
2
votes2
answers1280
viewsA: How to redirect the user (to another page) after your choice?
Add an event change in his select of the city, then you can know what the value. <script type="text/javascript" src="http://pastebin.com/raw.php?i=Qi2BcFsP"></script> <form…
javascriptanswered Maicon Carraro 8,881 -
0
votes2
answers1183
viewsA: My layout does not render
Try switching <android.support.v7.widget.Toolbar for < Toolbar And trade app:theme="@style/Theme.MyThemeBottom"> for android:theme="@style/Theme.MyThemeBottom"> Made that of a Clean…
-
3
votes1
answer1141
viewsA: Passing values from checkbox
You’re not passing any value in his checkbox echo "<td><input type='checkbox' name='checkPerg[]'/></td><br/>"; Put something like this: echo "<td><input…
-
2
votes1
answer894
viewsA: How to counter "blocks" in Sql Server
I’ve had some problems with changing values according to the sequence, you’ll need the function LAG, it serves to return the value of the previous line. And then partitions its values. with f1 as (…
sql-serveranswered Maicon Carraro 8,881 -
2
votes1
answer263
viewsA: Preparedstatement select with like 'something%' in Java Swing
According to your other question, I still think your problem is in the like + case sensitive, so I would do something like this: Of String sql = "SELECT administrador.idadministrador,…
javaanswered Maicon Carraro 8,881 -
1
votes2
answers568
viewsA: How to remove and add a particular TD
I made an example with data via prompt, take a look and adapt as your need. Remembering Sergio’s advice on semantics. window.onload = function() { var acaoBotao = function() { var campo = this; if…
-
0
votes2
answers2023
viewsA: Pass table field as parameter in a precedent
Creates a parameter beyond the nome_tabela, getting: CREATE PROCEDURE pro_get_gastos( nome_tabela VARCHAR(20), nome_data VARCHAR(20), data_ini DATETIME, data_fin DATETIME) And in the concatenation…
-
4
votes3
answers1630
viewsA: Mount a single string with multiple strings from a Java Arraylist
Use a StringBuilder to group its values and for to iterate over the list, example: StringBuilder sb = new StringBuilder(); for (String s : fields_list) { sb.append(s); sb.append(" "); }…
-
1
votes1
answer65
viewsA: Conflicts in MS-Access
Assuming your table has an identifier and using the EXISTS, facilitates consultation: SELECT t1.* FROM suatabela t1 WHERE EXISTS ( SELECT t2.id FROM suatabela t2 WHERE t1.ID <> t2.ID AND…
-
4
votes2
answers1032
viewsA: print special characters when generating file
Instead of using FileReader, use InputStreamReader and pass the charset. Example: BufferedReader br2 = new BufferedReader( new InputStreamReader(new FileInputStream(getNomeArquivo()), "UTF8"));…
javaanswered Maicon Carraro 8,881 -
4
votes1
answer60
viewsA: Simple Doubt in Javascript
The problem is that your script is running before the page is finished loading, so run only when finished do this: window.onload = function() { if(2>1){ document.getElementById("amarelo5").src =…
javascriptanswered Maicon Carraro 8,881 -
4
votes1
answer116
viewsA: C# method for checking a string
An ordinary solution would be: String texto = "(()"; int parenteses = 0; foreach (char c in texto) { if (c.Equals('(')) { parenteses++; } else if (c.Equals(')')) { parenteses--; } if (parenteses…
c#answered Maicon Carraro 8,881 -
1
votes2
answers445
viewsA: Update Text linked to a Databinding
DataBindings has no effect as long as the control does not lose focus, if you want to force its action can do something like: this.labelPedidosHoje.DataBindings.Add("Text", pedidosIntegrados,…
-
4
votes1
answer837
viewsA: Prefixes in SQL Sentence
Just use a alias for each table, example: SELECT tabela1.campo FROM pmv.banco.dbo.tabela AS tabela1 And in the update: UPDATE tabela1 SET tabela1.campo2 = 'teste2' FROM pmv.banco.dbo.tabela tabela1…
-
2
votes1
answer626
viewsA: Increase content font written in input
Would that be it? I made it with pure HTML and JS, adapt as your need. function alteraTexto() { var tamanhoSelecionado = document.getElementById('SelectAlterarFonte').value;…
-
3
votes2
answers2492
viewsA: JOIN with two columns in the same table
You came pretty close, I believe your mistake is in the absence of a alias SELECT * from cotacao LEFT JOIN clientes cliente_origem on cliente_origem.cpf_cnpj = cotacao.origem LEFT JOIN clientes…
-
4
votes2
answers339
viewsA: Trade foreach for for
You want something like this? for (int index = 0; index < body.Joints.Count; index++) { var item = body.Joints.ElementAt(index); var jointType = item.Key; var joint = item.Value; //... }…
-
3
votes3
answers160
viewsA: Do not fill in field if it does not exist
You can use the UNION and make 2 selects, example: SELECT id, tipoA, 0 as tipoB, data FROM tabela1 UNION ALL SELECT id, 0 as tipoA, tipoB, data FROM tabela2 Sqlfiddle Demo…
-
2
votes2
answers1505
viewsA: Object of a class in another Java class
I don’t know if I understand this right, but I think you want something like this: public class Classe2 { private String nome; public Classe2(Classe1 classe1) { this.nome = classe1.getNome(); }…
-
12
votes3
answers10354
viewsQ: Insert with accents in Oracle
When I make one INSERT for example: INSERT INTO TESTE (NOME) VALUES ('INSCRIÇÃO ESTADUAL'); You’re saving it on the table this way: REGISTER THE STATE And on the screen displays "INSCRIÃÃO…
-
1
votes3
answers2951
viewsA: json_encode returns nothing
Try transforming his exit: $cidades = array(); while($row = $result->fetch()) { { $cidade = array( 'cidade' => $row['cidade'], ); array_push($cidades, $cidade); } $json =…
-
0
votes1
answer131
viewsA: Run external command in Java with syntax
I took a look at the doc and you would have to pass a list of String with the parameters and not in this way that you did, experiment: ProcessBuilder p = new ProcessBuilder(new…
-
2
votes2
answers57
viewsA: Failure in execution of setInterval
From the way placed it is calling the function directly, the correct is: setInterval(function() { changeColor("blue") }, 3000);
javascriptanswered Maicon Carraro 8,881 -
3
votes2
answers301
viewsA: Helps make a condition in php
Your if is wrong, it only checks if there is the object and not how many lines have been modified. In your case I would $sql="DELETE FROM encomenda WHERE id='$id'"; if ($stmt = mysqli_prepare($link,…
-
4
votes2
answers159
viewsA: Help make a select
Responding briefly, yes you need to add a customer identifier to your table encomenda, this identifier needs to be a coluna table cliente that will never happen again. In this situation we use…