Posts by Joao Paulo • 11,760 points
262 posts
-
0
votes1
answer309
viewsQ: How to create Detachedcriteria criteria for a field from a Join table?
First time I move with this and I’m having trouble fitting the query properly. Here’s my code done the wrong way, so you’re not obeying the conditions: public IList<Ficha> ObterFichas() {…
-
7
votes3
answers11852
viewsQ: How to separate a String according to a separator in C#?
I have a string in this format: string valores = "Numero1#Numero2#Numero3#Numero4#"; How do I tell it in an array of integers to get it: int Numero[1] = Numero1; int Numero[2] = Numero2; int…
-
1
votes1
answer433
viewsA: How to do Trigger('change') in a select input?
The mistake was that: $("#selExercicio").trigger("change"); was being called before: $("#selExercicio").change(function () { debugger; alert('Mudou'); }); Inverti and it worked.…
-
2
votes1
answer433
viewsQ: How to do Trigger('change') in a select input?
I would like to simulate a change event in my input, but I’m not getting it to work. As soon as the page loads I select a different value in my input that way: $("#selExercicio option:contains('" +…
-
15
votes2
answers17329
viewsQ: What does "!" (exclamation) mean before a code snippet?
There are many basic things I do not know, for example how to read exactly this exclamation the way it is placed in the following section: if…
-
0
votes1
answer1279
viewsA: How to use FOR for INSERT within a function in ORACLE?
I managed to make the loop: FOR i IN 1..vQtdLancamentos LOOP INSERT INTO TB_CR_PERIODO (COD_CR_PERIODO, COD_CESTA_ROTINA, NUM_PERIODO_LANCAMENTO) VALUES (SEQ_COD_TB_CR_PERIODO.nextval, vCodCR, i);…
-
2
votes1
answer1279
viewsQ: How to use FOR for INSERT within a function in ORACLE?
I have the following function: FUNCTION PERSISTIR_CR( p_AnoExercicio TB_CONFIGURACAO_EXERCICIO.NUM_EXERCICIO%TYPE ,p_CodCR TB_CESTA_ROTINA.COD_CESTA_ROTINA%TYPE ,p_CodUG TB_CESTA_ROTINA.COD_UG%TYPE…
-
8
votes5
answers35057
viewsQ: How to define the border color of a table without CSS?
Is there any way? I don’t want CSS either external or internal, only pure html. Follow my code. <table widths="30;60" cellpadding="1.5" border="1"> <tr> <td> <p…
htmlasked Joao Paulo 11,760 -
3
votes2
answers985
viewsQ: How to export an HTML/C#(Razor) page to PDF?
I have some simple tables and need to export them to PDF. I found the library itextsharp, but in the compressed file there are many folders and files and do not know how to add the reference in my…
-
7
votes2
answers1564
viewsQ: CSS/jQuery selector for a table column
Is there a CSS or jQuery selector that takes a column from a table (each td column)? Or, if there isn’t a simple selector that can do it, you can do it with a little code in jQuery/Javascript?…
-
0
votes2
answers11150
viewsQ: How to Mount a Transaction with Commit and Rollback on Oracle?
I’m trying to mount a transaction on Oracle, but I don’t know how to perform a Rollback in case there’s an error in one of the querys. I searched some websites, but I couldn’t find anything clear…
-
4
votes1
answer934
viewsQ: Error: Registering ? instead of special character only using browser
I am having a problem at the time of saving the data in my ORACLE database. When using my application to fill in the fields and register a string, the special characters as accents for example are…
-
0
votes3
answers1694
viewsA: Script is not working in IE
IE doesn’t really let you understand selection through option. ie understands the $(":Selected") selector, which may be useful in some cases, but not in this specific case.
-
6
votes2
answers234
viewsQ: How to perform an action before 'mousedown' in javascript/jquery?
My intention after all is to turn a 'mousedown' into a "Ctrl + mousedown". But I can only activate Ctrl after mousedown is processed. Example: $(document).ready(function(){ $('#CC…
-
8
votes3
answers1694
viewsQ: Script is not working in IE
I’m using this script in Chrome and it works normally. But in IE 8 or 9 it doesn’t work. I put a Debugger and an Alert to debug, but it doesn’t even enter the function. $(document).on("mousedown",…
-
2
votes1
answer928
viewsQ: How to check if my one-column record (FK) is present in other tables?
I want to delete a record, but sometimes the oracle complains: SQL error: ORA-02292: Integrity Constraint (SGR20_HOMOLOG.TB_CONFIGURACAO_EXERCICIO_T436) violated - Child record found 02292. 00000 -…
-
0
votes4
answers1101
viewsA: How to check with javascript/jquery which object(s) is(is) triggering a scroll bar on the page?
I am posting here my test code and would like help to improve it. Can edit. $(document).ready(function(){ debugger; var docWidth = toInt($("html").css('width')); var docHeight =…
-
4
votes4
answers1101
viewsQ: How to check with javascript/jquery which object(s) is(is) triggering a scroll bar on the page?
I would like to build a verification script, because it is often difficult to find why the page is scrolling, especially when we use some responsive framework that has a lot of css code and a lot of…
-
8
votes3
answers7891
viewsQ: How to create a click event that is only called when clicking outside a div?
I need you to click off a div (is a registration screen), the same if close. What selector should I use so that clicking anywhere outside the div that div closes? $(????).on("click", function(){…
-
9
votes2
answers991
viewsQ: How to select element in the lowest hierarchical level?
I need to select the ul parent of the element li that is being clicked. But as a li is inside the other javascript understands that I am clicking on li and in all li parents. <ul…
-
0
votes4
answers601
viewsA: Internal navigation with Jquery
Try to force the page to go to div like this: $("#header-reserva a").click(function() { $("#header-reserva-iframe").css('display', 'inherit'); window.location.hash = '#header-reserva-iframe'; });…
-
13
votes3
answers2226
viewsQ: Performance: string "concatenated" or all in the same line?
I have a loop with thousands of results that renders a table. The string is mounted through Stringbuilder in this way (sample snippet): ScriptTbody.AppendLine("</select>");…
-
5
votes1
answer298
viewsQ: Problem setting CSS within style
I am facing a problem. I want to put all my CSS inside the Style tag as it shows my code below: <style> input[data-column="1"] { display: none; } input[data-column="2"] { display: none; }…
-
6
votes2
answers2903
viewsA: How to customize scrollbar in Chrome?
I searched and found a solution. I found that it is possible to customize the bar with these CSS properties: Defining properties: Scroll bar in general: ::-webkit-scrollbar{width:15px; } Of the…
-
3
votes2
answers2903
viewsQ: How to customize scrollbar in Chrome?
I have a select Multiple combo that can not take up much vertical space, so the ideal would be to be able to scroll down with that traditional arrow to navigate from 1 to 1 item down. Have some way…
-
9
votes2
answers33949
viewsQ: How to catch the current year on ORACLE?
I need to get the annual year on ORACLE, but I only know how to get the current date, so: SELECT SYSDATE FROM DUAL You can manipulate it to get only the Year?
-
10
votes3
answers4291
viewsQ: What is the best way to select an option by the text and not by the value in jQuery?
I have a select and would like to select a value according to the text of another field that the user clicked. For example. By clicking a "p" tag with the "April" text I want to select the "April"…
-
5
votes12
answers208289
viewsA: How to format date in Javascript?
I used Paulo Roberto’s answer as a basis (I had not yet implemented from scratch in the months with a digit) and I did so: var data = new Date(); var dia = data.getDate(); if (dia< 10) { dia =…
-
78
votes12
answers208289
viewsQ: How to format date in Javascript?
I want to play the current date on one input, but in the "Brazilian" dd/mm/yyyy. My code: var data = new Date(); dataFormatada = ????? $("#Data").val(dataFormatada);…
-
5
votes2
answers5722
viewsQ: How does it work to adapt to different resolutions on Android?
In html for example, objects can (sometimes without any special code) adapt to the size of the window, for example by placing two images of fixed size, if you shrink the window one goes to the…
-
1
votes3
answers1154
viewsA: How to verify if there is a specific value (string) in a list in C#?
I managed to solve my problem: @foreach (var cc in Model.DdlCentroCusto) { if (listaCentrosDeCustoEquipe.Where(x => x.CodCentroCusto.ToString() == cc.Value).Count() > 0) { <option…
-
4
votes3
answers1154
viewsQ: How to verify if there is a specific value (string) in a list in C#?
I am trying to mount a select Multiple input and leave marked the options that are already present in a certain list. I’m a beginner in C# so the logic of what I need would be more or less this:…
-
-3
votes1
answer554
viewsQ: What is required to create an authentication system (login/password/session) in PHP? What important points should I be concerned about?
I want to create a website with my own authentication system, without using anything ready. I would like to know what the stages are for the creation of such a system, in order. If there is a…
-
5
votes2
answers1856
viewsQ: How to select/deselect an input select Multiple at each mouse click? (without Ctrl)
I’m trying to make a script to select several options of a <select multiple> every mouse click. So far so good, I got and follows the code: var numSelected = 0; var valSelectedArray = [];…
-
0
votes5
answers508
viewsA: Query error with WHERE AND COUNT on Oracle. "SQL command not properly ended"
I managed to come up with a solution to my problem: INSERT INTO TB_CLASSIFICACAO_UG (COD_CLASSIFICACAO_UG, TXT_DESCRICAO, IND_ATIVO) VALUES (SEQ_COD_TB_CLASSIFICACAO_UG.nextval, (SELECT '" +…
-
2
votes5
answers508
viewsQ: Query error with WHERE AND COUNT on Oracle. "SQL command not properly ended"
I have the following query: INSERT INTO TB_CLASSIFICACAO_UG (COD_CLASSIFICACAO_UG, TXT_DESCRICAO, IND_ATIVO) VALUES (SEQ_COD_TB_CLASSIFICACAO_UG.nextval, 'TESTANDO', 1) WHERE (SELECT…
-
16
votes6
answers14835
viewsQ: Android app development: what are the tools and language to start a project?
I would like to venture into creating apps for Android. At first I would make one just for own use. What tools would I need to build my development environment? My application would use database,…
-
6
votes7
answers2949
viewsQ: How to use multiple SQL commands (in the case delete on ORACLE) in one line only on C#?
I made a command because of Foreign Keys, only to plug hole, but it is not working for an invalid character error, I believe it is the ";". I know I’m doing this the wrong way, so I accept…
-
25
votes3
answers9448
viewsQ: Javascript use of Eval(): what are the pros and cons?
Recently I met this function and I was surprised by its power, it was of great use to me, but after using it I heard comments that it was not safe. I would like to know in situation this use can…
-
1
votes5
answers1657
viewsA: How to add class to the next element when clicking the button?
See if you understand the logic. $(document).ready(function(){ var anterior = $('.btnAnterior'); var proximo = $('.btnProximo'); var itemLista = $('.lista li:first-child'); var qtdItens = $('.lista…
javascriptanswered Joao Paulo 11,760 -
89
votes6
answers9431
viewsQ: When should var be used in Javascript?
I’m always in doubt in the projects I put var before giving a value to a variable or not because both work (I think). Can anyone explain why they use it or not? What convention or good practice to…
javascriptasked Joao Paulo 11,760 -
7
votes2
answers638
viewsQ: How to do an action after three dynamic elements are filled with jQuery/javascript?
I have three select that are created after the user clicks on a button, ie are dynamic: <select id="cbExercicio"><option value="0"></option></select> <select…
-
7
votes1
answer792
viewsQ: How to export an HTML/C#(Razor) page that contains SVG elements to PDF?
I am currently working with Highcharts, a javascript library that generates graphics. It has an export component, but only exports the chart itself, still need to assemble the PDF layout. For the…
-
3
votes1
answer2022
viewsA: How to pass values of an Ajax request to Google Chart?
I was able to find the problem and solve the same. Follows correct code: Prior to the request ajax initialize the object json and call the load google: var resp: []; google.load("visualization",…
-
6
votes1
answer2022
viewsQ: How to pass values of an Ajax request to Google Chart?
I started messing with Google Chart today, and I can make the chart by putting the values in hand outside the requisicao ajax. Only that my application needs this data coming from a database and I’m…
-
31
votes5
answers14927
viewsQ: How to not allow a character to be typed in the textbox, with Javascript/jQuery?
I have a Textbox: <input type="text" name="indice" class="number"> I wanted that when a person typed a comma in this Textbox it would be blocked and not appear in the Textbox. How to do it the…
-
23
votes2
answers28027
viewsQ: Is there any way to enable full screen browser with Javascript?
I note that the main browsers are in full screen mode when pressing the F11 key, this is a functionality of the browser itself or it is possible to activate it through some Javascript code? If you…
javascriptasked Joao Paulo 11,760 -
5
votes3
answers2236
viewsQ: Is there any way to make a standard browser tooltip appear without putting the text in the title tag and without tooltip plug-in?
I am asking this because the application is almost ready and used a plug-in that uses the tag title. This plugin causes clicking on the element to open a popup (in this case a confirmation box),…
-
1
votes3
answers8451
viewsA: Problem with uploading large files in PHP
Going to the support of my hosting provider found that my server is shared and so it had blocks to upload larger files. It wasn’t my configuration’s problem.
-
6
votes4
answers3358
viewsQ: How to create an element and after a few defined seconds remove it?
I need to create a label warning like this: <p id="lblAviso">Salvo com sucesso</p> And remove it after 3 seconds. How to do this with jquery? Needs some plugin?…