Posts by Julio Henrique • 4,352 points
190 posts
-
1
votes1
answer40
viewsA: Linked datepicker with Jquery
There are many other ways to do this, for example: using html and jQuery $( document ).ready(function() { $("#dtaInicio, #dtaFinal").change(function(){ var inicio =…
-
3
votes1
answer885
viewsQ: How to change the state of complex objects in React?
have the following object: obj = { title: "obj1", tab: [{ title: "titulo da tab 1", card: [{ title: "card1", url: "url", image: "image" }, { title: "card2", url: "url", image: "image" }] }, { title:…
-
1
votes1
answer1016
viewsA: Doubt on how to shrink/Collapse one menu by clicking the other
guy it’s easy you create a variavel empty in reading document. See this ex I used a table to exemplify your menu: $( document ).ready(function() { last_clicked = ""; $("tr").click(function(){ var id…
-
0
votes3
answers149
viewsA: Click on Dynamically generated ID
The problem is because you don’t have a button in your code: $("span").html("<div id='BtnRemove'>Remover</div>"); the right way would be so: $("span").html("<div…
-
0
votes1
answer201
viewsA: How to customize print in browser
Next my friend, once I had to do it too, it’s quite boring rsr but it worked. maybe not the best way to do it but this code helps you. *{ margin:0; padding:0; } .conteudo_page{ position:absolute;…
-
0
votes1
answer314
viewsA: Ajax requests with php
Below a code accessing an api via ajax and filling the values of a select, in the comments I explained better each part of the code. //esta função do ajax é lida no carregamento da pagina $(function…
-
1
votes1
answer159
viewsQ: how to define right-axis spacing highcharts?
i have this chart on highcharts: $.getJSON('https://cdn.rawgit.com/highcharts/highcharts/057b672172ccc6c08fe7dbb27fc17ebca3f5b770/samples/data/usdeur.json', function (data) { var startDate = new…
-
2
votes1
answer96
viewsQ: Creating a CLI tool with NODEJS
I am learning how to create a tool CLI (Command-Line Interface Applications) and carried out the following steps: I created a folder and inside it in the terminal npm init--yes with that I generated…
-
0
votes1
answer595
viewsA: Select with Json
guy has an error in his logical operation. try to change that: $.each(dados, function(i, item){ output += '<option value="'+item.marc_id+'""'+item.marc_id == marcaid ?…
-
3
votes2
answers80
viewsQ: how to make a substring in an int in PHP
I have the following code: $chk_selectes = $_REQUEST['chk_selectes']; it receives via REQUEST a variable with this value: 000 or 001 or 011 or 111. I need to check each of these elements so I used:…
-
1
votes2
answers454
viewsQ: How to select the checked input?
I have this code: <input type="radio" name="rankeamento_por" id="rankeamento_por2" value="PROC_MEM_KB" checked> MEMORIA <input type="radio" name="rankeamento_por" id="rankeamento_por"…
-
3
votes1
answer99
viewsQ: How to force Highcharts to show all points?
I use the API highcharts to generate graphs from information collected in a database, the problem is that when it comes to many points in your series, it HIDES and GENERATES an Average in periods..…
-
2
votes2
answers204
viewsQ: How to select text between spaces - REGEX?
I have a string like this from Names: var names = ' GEO X GEO3 X GEO4 X'; and I need to split using regex to separate in the arrays only texts that are between spaces and that are not X tried so:…
-
2
votes2
answers1701
viewsQ: Left Join with + equivalent in POSTGRES
In the oracle I can give a left Join with using (+) ex: select from tabela1 A,tabela2 B where A.id = B.id(+); In the above example was made a LEFT JOIN because I want to return all the data from…
-
2
votes0
answers184
viewsQ: How to use Data array in Highcharts?
I did this simulation (jsfiddle also): $(function() { $.ajax({ url: "https://www.json-generator.com/api/json/get/cqueInyKdK?indent=2", type: 'POST' }).done(function(makeTheDO) {…
-
1
votes2
answers82
viewsA: Related news on the site
You can create a div invisible to be opened when clickar in read more.. function myFunction(){ document.getElementById('divNoticia').style.display = 'block'; } Homem é pego fazer pergunta no site…
-
1
votes1
answer54
viewsQ: How to delete a TAB and its Div and check if it is the last item?
Follow the code of my attempt: $(function() { //for que inicie o tabs e depois de um refresh em todos os tabs existentes. for (var i = 0; i <= 9; i++) { for (var j = 0; j <= 9; j++) { for (var…
-
1
votes1
answer98
viewsQ: Print single element on all printing pages
I’m developing a system WEB and at the time of printing the screen I need to put at the end of each page a imagem, this is possible? So far I have the following code: .hide{ display: none; }…
-
0
votes2
answers5452
viewsA: What does the <aside> tag do in HTML?
What is the element ? The HTML element represents a section of a page that consists of content that is tangentially related to the content of its surroundings, which could be considered separate…
-
4
votes2
answers360
viewsA: How to sync git between two machines?
you need to make a clone on your machine: git clone url for example: go to the folder you want to dump the project and run the command: git clone https://github.com/juliohds/ProjetoIhelp.git if you…
gitanswered Julio Henrique 4,352 -
0
votes1
answer1119
viewsA: Convert numeric value to javascript string
Javascript does not have a native function to perform this process. However, you can use this function to return an extended number: //+ Carlos R. L. Rodrigues //@…
-
0
votes2
answers304
viewsA: Why does the PHP script not run if opened by the pc, but runs if opened in localhost?
The PHP is a language back-end* that runs on the server usually the APACHE*, the browser has no power to interpret this type of language. What is apache? The Server HTTP Number One on the Internet,…
-
1
votes2
answers99
viewsQ: Handler for undefined index in array
Dear experienced developers and codar art learners. I believe it is common in some system you have to check the next item of a array. For example in this case I am checking if the next one is the…
-
3
votes2
answers6870
viewsA: Fatal error: Call to Undefined Function oci_connect()
I had this problem recently and the solution was this: You lower the xamp or wamp 32 or 64 bits this will have to be your version of instant client oracle after installing them with any version of…
-
0
votes3
answers2595
viewsA: Disable a select option by clicking a button
A new answer with the activate button, since he asked me in the comments. function disable_select(){ var id = $('#produtos').children(":selected").attr("id"); $("#"+id).prop('disabled',true); }…
-
2
votes3
answers2595
viewsA: Disable a select option by clicking a button
Simple as that little fella: function disable_select(){ $("#produtos").prop('disabled',true); } <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>…
-
2
votes3
answers381
viewsA: How to select the year in PLSQL?
Thus helps? select * from tfuncionario where anoAdmissao <= '2000/01/01' and anoAdmissao >= '1999/01/01'; where '1999/01/01' the beginning of a date and '2000/01/01' the end.…
-
1
votes3
answers127
viewsA: Select dates less than a given year
plain as that: select * from tfuncionario where anoAdmissao < to_char('2000/01/01', 'yyyy/mm/dd'); using to_char to format a mask. where '2000/01/01' corresponds to the given period of the…
-
2
votes1
answer3488
viewsA: How to chart with Google Charts and PHP
With this query I can assemble the chart the way I need? Google’s pizza chart gets this date format to be generated: [ ['Task', 'Hours per Day'], ['Entradas', 500], ['Saidas', 1100] ] i.e., an array…
-
3
votes1
answer278
viewsQ: Decode vs Case Query
We have two ways to work with condition within consultations in Oracle SQL, are they the Case and the Decode, the two have the same function. Allow dynamically and practice how to get a return from…
-
3
votes0
answers47
viewsQ: Strange expressions in PHP
Someone explains why this: <?php $world = _("World"); $str = <<<EOF <p>Hello</p> <p>$world</p> EOF; echo $str; ?> generates this: Hello World error-free? what…
-
1
votes1
answer37
viewsA: PHP regular expression - Text of a website
you should put as an array like this: ($prices[1][0];) $content = "<span id='i_valorCausa'>hduehuedheudheu<span>"; preg_match_all("/<span id='i_valorCausa'>(.*)<span>/",…
-
1
votes2
answers559
viewsA: Upload csv file with ajax, json, php and Mysql
The problem is that you are comparing a string with a number, so it will never be the same. change that if (response.codigo == "1") { for that reason if (response.codigo == 1){ since the return is a…
-
1
votes1
answer452
viewsA: PHP error - Try_catch
probably forgot a dot and comma: here is an example of Exceptions <?php function inverse($x) { if (!$x) { throw new Exception('Divisão por zero.'); } return 1/$x; } try { echo inverse(5) . "\n";…
-
0
votes3
answers47
viewsA: Getting text from an element
First have an error in your code, one should close the H1 tag so: </h1> var perfilSistema = document.getElementById("psistema"); var text = perfilSistema.innerHTML; alert(text); if (text ==…
javascriptanswered Julio Henrique 4,352 -
1
votes1
answer33
viewsA: Help basename + url [PHP]
The problem is because you are "adding up" and not "concatenating". change this: $this->videourl = "url" + $videoName; therefore: $this->videourl = "url" . $videoName; the old code sum…
phpanswered Julio Henrique 4,352 -
3
votes1
answer462
viewsA: pass variable javascript to php and write to database
use ajax for this: <script src="https://code.jquery.com/jquery-1.10.2.js"></script> <script> setInterval("localizarUsuario()", 3000); function localizarUsuario(){ if…
-
1
votes1
answer218
viewsA: Script to search prices on various websites
Diego your question is too wide, but to give you a basis. How To Do This? basically there are several classes ready PHP that facilitate and much this process, look on the internet for web scraping,…
phpanswered Julio Henrique 4,352 -
1
votes1
answer248
viewsA: Why aren’t you pulling the id GET variable?
the problem is that Voce is writing: if (isset($GET['id']) && !empty($GET['id'])){ when it’s actually if (isset($_GET['id']) && !empty($_GET['id'])){ Because that? good if you…
-
0
votes1
answer49
viewsA: Show label data in radio instead of text
Well come on, just change this code of yours: echo "<label>Estado</label>"; echo "<input id='' type='text' value='".$row['Estado']."'"; therefore: echo…
-
1
votes1
answer41
viewsA: Use Rand and randomly assign to all columns
In order for the names not to be repeated simply put the end of the query before the order: GROUP BY B.NomeColaborador the issue of other duplicated information, I believe it is by the use of left…
-
2
votes1
answer740
viewsA: Get city name using redirect geolocation
Following what our friend Valdeirpsr spoke, just create a variavel with the cities and their links, and check after the success of the requisition ajax routes = {"Los Angeles":…
-
1
votes1
answer2691
viewsA: How to make a page quiz using javascript?
Man this is something very open, but I’ll give you some ideas for you to have a basis. Using javascript only You can use a global variable called pontos And with the already assembled interface you…
-
1
votes1
answer89
viewsA: Recover field without include/require
The variable $_POST['nomefiltrar']) is empty as nothing was sent via post to the page registra_pessoa.php. What would be the solution As your form sends a Submit to the same page you can use this…
-
1
votes2
answers107
viewsA: function to display more items in a <ul>
As stated in the comment. You can insert your elements in a array. And so when loading the page show only the 4 and a link that shows more (in case all). take the example: //esse array irá conter…
-
3
votes5
answers3338
viewsA: How do I get a div to start hiding?
function mostra_oculta(){ var x = document.getElementById("myDIV"); if (x.style.display === "none") { x.style.display = "block"; } else { x.style.display = "none"; } } <div id='myDIV'…
-
2
votes1
answer76
viewsQ: How to center rotated text on a div?
Hello beloved community! I’m rotating a p inside a div, but I can’t center it, I’m having enough difficulty in css, already tried to define a width: and height: for p, I left as auto, but it doesn’t…
-
2
votes1
answer72
viewsQ: Problems at the time of a div, how to define 'automatic' height?
take the example in this fiddle I want the height of the blue div to be according to the height that the table on your right is. no fiddle is well explanatory, any doubt I shoot in the comment, I…
-
1
votes1
answer336
viewsQ: word-wrap: break-word; not working vertically
see a functional example in this jsfiddle the text: "text should be broken" it is not breaking and respecting the space of td. Thank you.…
-
1
votes1
answer33
viewsA: How to Make a Rule in Javascript According to DIV
You could use getBoundingClientRect() to get a collision box and use a little math to test whether the 2 ClientRects are colliding. Demonstration: in the codepen. You can drag the green div to see.…