Posts by Maicon Carraro • 8,881 points
269 posts
-
1
votes1
answer197
viewsA: How to remove popup when opening product details?
I never worked with Magento, but analyzing his code to simply do a "trick" with CSS. .item a.product-image { display: block; /* adicionei esse */ z-index: 1; /* adicionei esse */ position: relative;…
magentoanswered Maicon Carraro 8,881 -
5
votes4
answers844
viewsA: How to create properties dynamically in C#?
Basically this is the Anonymous Type. Example: var umaOutraList = new List<String>(); umaOutraList.Add("1"); umaOutraList.Add("2"); var novaLista = umaOutraList.Select(x => new { Nome = x…
-
1
votes1
answer1188
viewsA: Sort Gridview ASC
The ordination of GridView has enough problems, one solution that can work is this one: Add the sort event on GridView <asp:GridView ... OnSorting="gridView1_Sorting" AllowSorting="true"> And…
-
2
votes1
answer1561
viewsA: Select except values (SQL / Oracle)
You can simply add this condition to your WHERE WHERE a.rp_package_value NOT LIKE '8995%' '8995%' - Search for everything that starts with 8995... LIKE - Search for a similar string NOT - Denies the…
-
0
votes3
answers62
viewsA: Error giving a select in two tables
Would that be? select se.* from solicitacaoemprestimo se left join emprestados e on e.solicitacaoemprestimo_socio_codigo = se.codemprestimo where e.codemprestados is null AND se.socio_codigo = '41'…
mysqlanswered Maicon Carraro 8,881 -
2
votes1
answer495
viewsA: Return values from two columns of different tables
I got it done here, see if it’s what you need SELECT PROFESSOR.NOME, ALUNO.NOME FROM ( SELECT @rownum_p:=@rownum_p+1 AS ROW_NUM, PROFESSORES.NOME FROM PROFESSORES, (SELECT @rownum_p:=0) r )…
mysqlanswered Maicon Carraro 8,881 -
3
votes1
answer870
viewsA: Jquery How to Monitor Exchange of Values?
The event change is only called when the field loses focus and has its value changed. More information here. When you change the value per command, it has the modified value, but has no loss of…
-
4
votes1
answer486
viewsA: How to get Json by Ajax in . html?
Use the getJson: $.getJSON( "http://horariofacil.azurewebsites.net/Mobile/ObterCursos", function(data) { var items = []; // each é pra iterar uma lista de dados $.each( data, function( key, val ) {…
-
1
votes1
answer160
viewsA: How can I select this Datatable?
To dataTable has attributes precisely to this situation that are the selection="#{topsisBean.projetoSelecionado}" and rowSelectListener="#{topsisBean.onRowSelect}" And in your Managedbean private…
-
1
votes1
answer52
viewsA: Syntax error in csh script
The right thing would be: if ( $?QINST_VERBOSE ) then set expert_mode = 1 else set expert_mode = 0 fi if ( $?QINST_DEBUG ) then set debug = 1 else set debug = 0 fi…
bashanswered Maicon Carraro 8,881 -
1
votes3
answers121
viewsA: Link to edit another window open
If the tab is on the same domain you can access the parent page that opened through the window.opener. If it’s different domains, it will prohibit you from accessing document in most browsers.…
-
1
votes2
answers105
viewsA: Force every instance to have 2 attributes
Just create a single builder in class Manager with the 2 parameters, this way it will not be possible to instantiate Manager without parameters. Example: Funcionario.java public class Funcionario {…
javaanswered Maicon Carraro 8,881 -
1
votes1
answer5821
viewsA: Generate sequential number in java
Creates a class that will hold the value static and that will always return you the value with increment, example: Geradormatricula.java public class GeradorMatricula { private static int ID = 1;…
javaanswered Maicon Carraro 8,881 -
3
votes2
answers2473
viewsA: How to pass arguments when running a program through Netbeans?
To run your Netbeans file passing arguments you will need to install this plugin Run With Arguments. Example (after installed): - public static void main(String[] argv) {…
-
1
votes2
answers1976
viewsA: How to pass a variable in a Javascript function by the onclick Razor?
I figured out the mistake, you’re going through 7 parameters in the String.Format and only 6 values at the end You have to change onclick = String.Format("envia_pessoa({0}, '{1}', '{2}', '{3}',…
-
1
votes1
answer490
viewsA: How do I make it when the music starts to rotate an image?
Using library extension rotate jquery var angulo = 1; var rodar = function() { setInterval(function() { $("#pic").rotate(angulo); }, 100); }; <script…
-
1
votes1
answer336
viewsA: @Html.Dropdownlist returns null value
This problem happens because MVC cannot turn the selected value back into the desired model, you can simply create an auxiliary field in your model Conteudo. //[Required(ErrorMessage = "Escolha uma…
-
1
votes1
answer684
viewsA: Old tcp server client game
That mistake of Address already in use: Jvm_bind means you already have some application running on that port, you need to delete this application or change its port from 5000 to another higher…
-
1
votes1
answer500
viewsA: View does not render on Asp.net MVC
UPDATE Substitute <div class="btn-group"> <div class="col-md-offset-2 col-md-10"> <a href="@Url.Action("Inscricao", "Curso")"> <input type="submit" value="Inscrição"…
-
2
votes1
answer66
viewsA: Inherit text from element
The only difference is I put the label after the li because there is no way to use a selector for previous elements, but you can easily play up with CSS. Important: All elements must be at the same…
-
1
votes2
answers871
viewsA: How to check if the user has typed a special character in Edittext?
Similar to William’s answer, but filtering only for letters or numbers. InputFilter filter = new InputFilter() { public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int…
-
0
votes1
answer251
viewsA: helps in capturing multiple strings and storing them in an array
String names = "<td><input type=\"radio\" name=\"pergunta23g\" value=\"SIM\"/> Qual? <input type=\"text\" name=\"pergunta23gQual\" class=\"dados\"> Onde<input type=\"text\"…
javaanswered Maicon Carraro 8,881 -
0
votes3
answers275
viewsA: can’t access already instantiated class data
That mistake Cannot redeclare class means you are declaring the class more than once, check if in your 2 includes you are not defining the class OP_Config more than once.…
-
4
votes2
answers1431
viewsA: Make a program in c# that runs online
For the development of the page communicating with the database being offline/online you will use some programming language that in your case would be C# or Java. In the case of Html is just a…
-
4
votes2
answers271
viewsA: How to render a String that is in this format yyyy-mm-dd HH:mm:ss.fff presentable
If you are going to treat only after you received from the bank need to do it here: DateFormat dfBanco = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); DateFormat dfJava = new…
-
0
votes2
answers4187
viewsA: Error while deleting FK
Complementing the response of ctgPi you could create a boolean field to inform if the request has already been rented. For example: ALTER TABLE solicitacaoemprestimo ADD alugado BOOLEAN And in your…
mysqlanswered Maicon Carraro 8,881 -
1
votes1
answer55
viewsA: Connection between 3 tables to rescue information, sql
One remark, you’re not saving the response time so you have no way of knowing who the last one was. Try this: SELECT ht.title, upost.username, (SELECT ureply.username FROM topics_answers ta INNER…
-
2
votes1
answer99
viewsA: "div loading" Servlet
I made an adaptation of that reply with your code. I added an Event onclick on your button that will display the loading and the div loading is just below the input. After you receive the file just…
-
3
votes2
answers917
viewsA: Print word file by c#
Have you tried it here? Microsoft.Office.Interop.Word.Application application = new Microsoft.Office.Interop.Word.Application(); string caminhoContrato ="C:\\arquvio.doc"; Document document =…
-
0
votes2
answers926
viewsA: Saving Base64 Image with ADODB.Stream
Ever tried to trade Server.CreateObject("MSXML2.DomDocument") Set nodeB64 = tmpDoc.CreateElement("b64") for Server.CreateObject("Msxml2.DOMDocument.3.0") Set nodeB64 = tmpDoc.CreateElement("base64")…
-
1
votes2
answers509
viewsA: Field validation problem
You are not validating the values fields because they are not actually null, they are zeroed. If you want to validate them use the annotation @Min. @NotNull @Min(1) // só aceita long @Column(name =…
-
1
votes2
answers945
viewsA: Why can’t I update the framework?
The SDK to run is installed on the computer and can be seen on the screen of Desinstalar ou alterar programas, has no direct relationship with this feature screen. Besides, if you’re just going to…
-
2
votes3
answers558
viewsA: Error while passing Sqlparameter
Missing pass the information of commandType within the method retornaQuery comando.CommandType = query.CommandType;
-
2
votes7
answers3042
viewsA: Hide input value
Your javascript has 2 errors, fixing is like this: <script> $(document).ready(function (){ $('.pesquisa-class').click(function(){if(this.value == this.defaultValue) {this.value = '';}});…
-
0
votes3
answers14922
viewsA: Consume webservice dynamically
Depending on the webservice technology you can make the requests only using Jquery passing normal values or even with JSON. Example of Webservice calling passing the values by JSON: $.ajax({ type:…
-
8
votes3
answers31700
viewsA: Exactly how Javascript works
You can use the return for 2 types of situations. 1. Return a value. 2. Stop the execution flow of the current function. 1. The usage situation is when you need to validate, calculate or modulate…
javascriptanswered Maicon Carraro 8,881 -
7
votes3
answers3055
viewsA: Web service in javascript
function ChamaMetodoDoWebService() { try { $.ajax({ type: "POST", url: "http://webserviceURL.asmx/nomeDoMetodo", data: "{'parametro: valor'}", // somente se o método exigir parâmetros se não é so…
-
2
votes1
answer2060
viewsA: OCI-22053: overflow error - C#
I researched here about this error and in most cases the problem was because of some column that was NUMBER(N,D) an error in converting these values may happen to be other fields also that exceeded…
-
1
votes2
answers7683
viewsA: How to upload images to a folder using ASP Classic?
You can use the class clsUpload. After you give her a include, you can just do so: ASP: Dim objUpload Dim strArquivo, strCaminho Set objUpload = New clsUpload strArquivo=…
-
3
votes4
answers3081
viewsA: Limit number of characters per line
I created here an algorithm in the Keypress of the textbox, it limits the amount of characters in each line and forces the user to type enter to change the line: private void…
-
1
votes3
answers2054
viewsA: Protect the connection string in a . NET Winforms application?
The correct thing would be for you not to have this connection to cliente -> banco and yes cliente -> webService (com autenticação) -> banco. As much as you try to do some kind of…
-
0
votes2
answers111
viewsA: Send data to Database
You’re trying to insert NULL in a column that is NOT NULL, if you really want to assign NULL to this column the way is to change the column to allow NULL. ALTER TABLE equipamentos MODIFY…
-
4
votes5
answers2480
viewsA: Check if day exists in month
I don’t know if it’s the best way, but the way I do it is: try { var test = Convert.ToDateTime("31/02/2014"); } catch (FormatException) { // Não existe a data }…
-
1
votes2
answers183
viewsA: Make two items in a Listview change position
João Neto this does not work? Object aux = lista.get(posicao-1); lista.remove(posicao-1); lista.add(posicao, aux);
-
1
votes1
answer1273
viewsA: How to update button form or event automatically?
Try this on: Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click ' Aqui seu codigo do botao End Sub Private Sub _PAINEL_VENDAS_Load(sender As…
-
2
votes4
answers1443
viewsA: SQL query that meets a parameter that is a set
I don’t know how your columns are, but I tried to deduce that the keys are ID_TABELA. The disease has at least one symptom: SELECT CO.ID_CONSULTA, SI.ID_SINTOMA, DO.ID_DOENCA FROM CONSULTA CO INNER…
-
4
votes5
answers21638
viewsA: Currency formatting to save to database as DECIMAL
I haven’t tested the code, but you’ve tried removing the point before? str_replace(',','.', str_replace('.','', $_POST['txtSalario']))
-
14
votes2
answers11900
viewsA: How to make a JOIN between two tables of two different databases?
Try to use Federated Tables, you create a replica of the 'pointing' table for the remote bank. Example: CREATE TABLE federated_tabela ( codigo INT(20) NOT NULL AUTO_INCREMENT, nome VARCHAR(32) NOT…
-
5
votes6
answers8117
viewsA: How to remove a "href" from a <a> tag with Jquery/Javascript?
Using pure javascript: document.getElementById('id').removeAttribute('href');
-
1
votes4
answers7116
viewsA: How to hide the time of a "Datetime?" field in the user interface?
Try using String Format, example .ToString("dd/MM/yyyy"), in the case: @Html.ActionLink(item.DataInicial.Value.ToString("dd/MM/yyyy"), "Index", new { apuracaoSelecionada = item.ApuracaoIcmsID })…