Posts by Julio Henrique • 4,352 points
190 posts
-
2
votes2
answers63
viewsA: Creating columns in Foundation
It’s simple look at this example: <!DOCTYPE html> <html> <head> <title>Foundation </title> <meta charset="utf-8"> <meta name="viewport"…
-
5
votes1
answer4423
viewsA: Laravel foreach view
An example of how to iterate an array, suppose you have the following array: array (size=3) 'clients' => array (size=4) 'Super Fish' => array (size=2) 'totalminutes' => int 49 'totalcost'…
-
4
votes2
answers2040
viewsA: How to remove the position of an array with jquery
Try to do as in this example: var arr = ['a', 'b', 'c', 'd', 'e']; //Array inicial var removeItem = 'c'; // Valor do array que será removido arr = jQuery.grep(arr, function(value) { return value !=…
-
1
votes1
answer450
viewsA: I cannot recover id value through the POST method
The problem is in your select query. change that: SELECT * FROM contas c INNER JOIN pessoa p ON(c.id_fornecedor = p.id) WHERE c.id = ".$id for that reason: SELECT c.* FROM contas c INNER JOIN pessoa…
-
2
votes1
answer1525
viewsQ: Is it possible to search a data in the database without knowing which table it is in?
I have a banco de dados very large and it is impossible to build a SELECT * FROM for each table and locate the data I need. It is a texto especifico ('with as parameter 23') I’ve searched every way…
-
1
votes2
answers172
viewsA: how do I leave my button in the marked menu?
Here’s what you look for in a functional example: var menu = document.querySelectorAll("#menu > ul > li > a"); for(var i = 0; i < menu.length; i++){ menu[i].addEventListener("click",…
-
1
votes1
answer67
viewsA: Question: Example of uploading/PHP files
To create for example a TXT file. When the user logs into the system, having a page to "send txt message to another user". (where Voce writes the text and selects the user). <?php //Criamos uma…
-
1
votes1
answer657
viewsQ: problem when changing PHP environment variable
I installed php via xampp and need to change this variable: NSL_LANG. I created a php file with this code: <?php putenv("NLS_LANG=BRAZILIAN PORTUGUESE_BRAZIL.WE8MSWIN1252") or die("Falha ao…
-
0
votes1
answer37
viewsA: Capturing a given link in an array
use for to go through his array, and use the function strpos() for($i = 0; $i < $array.length; $i++){ // valor é um item do array $findme = 'youtube.com/embed'; $pos = strpos($array[$i],…
phpanswered Julio Henrique 4,352 -
1
votes2
answers576
viewsA: Leave input to Focus after Alert
First it is interesting to validate whether the CPF or CNPJ are valid, in the code I put two javascript functions to verify this validaCPF and validaCNPJ. to focus on your input, that’s why:…
jqueryanswered Julio Henrique 4,352 -
0
votes1
answer78
viewsA: How to verify variable has values?
There are several ways to do this: Has a php function called isset() it helps us to check whether the variavel for parametro is setada, or contain some value. By Ex: if(isset($_POST['nome'])){ $nome…
-
1
votes4
answers1177
viewsA: Minimum quantity jquery
Here is a functional code with your requested example: $(function() { $('#enviar').click(function () { var desc = $('#Descricao').val(); if(desc.length <= 9){ alert('são no minimo 10…
-
0
votes1
answer29915
viewsQ: which characters cannot be used in filenames?
We know that it is common to use systems that save files, I would like to know which characters are invalid to be used as filenames? there is a function that removes all characters other than…
-
1
votes3
answers2456
viewsQ: How to organize items from an array in alphabetical order?
I’m having a hard time organizing this array of mine: $array = []; $array[ "T3497012@CHOSTBRHDDSB@EICM_BORA@BPHS@Bamz", "T3497012@BHOSTBRHDDSB@EICM_BORA@BPHS@Bamz",…
-
3
votes1
answer86
viewsQ: How to convert html text (entities) to "normal" text?
In my database are saved lines that are "read" by html, so are saved with tags and those characters that do not know the name =>  , é etc... the problem is that in my…
-
3
votes2
answers183
viewsA: I cannot create a Modal with html
In this code the problem is in the class declaration .modal:target { opacity: 1; pointer-events: auto; } .modal { width: 400px; position: relative; margin: 10% auto; padding: 15px 20px; background:…
-
2
votes1
answer70
viewsQ: How to verify if a file containing a specific word exists?
I am using PHP, and in a server folder contain files with these names: T3497012@16-01-02:21@[email protected] T3497012@16-01-02:22@[email protected]…
-
1
votes1
answer286
viewsA: Problem doing CRUD with HTML and JS
Its function had a signature space, and the edit function was not coherent, see if this meets your request: var count = 1; function Insert(name, year){ nome = name; idade = year; var tr =…
-
1
votes2
answers600
viewsA: How to store words from a text in an array
use the . split function and assign the phrase in an array function guarda_palavra(){ text = document.getElementById('texto').value; var arr = text.split(" "); alert('array com a frase escrita:…
javascriptanswered Julio Henrique 4,352 -
0
votes1
answer63
viewsA: recover a client name in a multidimensional array
If the client name is the user item in your array use it, if it would not be the name: s["Cliente1"] = array("ip"=> "ip_do_cliente", "usuario" => "usuario", "nome_do_cliente" =>…
-
1
votes2
answers126
viewsA: Keep focus on the main page
Just use the Html5 attribute target <a href="https://www.w3schools.com" target="_blank">Sem mudar o foco</a><br> <a href="https://www.w3schools.com" target="_blank">Mudar o…
-
2
votes1
answer75
viewsQ: What is the most effective way to develop an Html5 or js code?
For example when I want to do an event at the click of the button I can do it in two ways: using the onclick attribute of Html5 <button type='button' onclick='myFunction()'…
-
4
votes2
answers255
viewsA: Is it possible to use ng-model with contenteditable?
The tag contenteditable will not work directly with the ng-model of Angularjs because the rendering way updates the element in the document at each change. You must involve him with a Directive…
-
2
votes2
answers93
viewsA: Is there any way to remove all sysout from a Project?
Felipe the closest to optimizing this process is you using the find and replace function of your text editor. some editors have function to search the text sysout or System.out.println in several…
-
3
votes1
answer780
viewsA: Sending variables in Ajax to PHP
It’s easy, young man, this is your request: $('#abrirServico').click(function () { // - Requisitamos os valores dos campos... var data = $("#data").val(); var idcliente = $("#idCliente").val(); var…
-
9
votes2
answers750
viewsQ: How to improve the performance of my code with "for"?
I have the following code: for ($i=0; $i < 10; $i++) { for ($j=0; $j < 20; $j++) { for ($p=0; $p < 40; $p++) { echo $vaar[$i][$j][$p]; } } } I believe a code that contains a for inside…
-
4
votes1
answer160
viewsA: handle php date and time
Fox see if that’s what you want code for: function cal_data($date1, $date2){ $dateS1 = new \DateTime($date1); $dateS2 = new \DateTime($date2); $dateDiff = $dateS1->diff($dateS2); if…
phpanswered Julio Henrique 4,352 -
1
votes1
answer449
viewsA: Window by clicking the html button
An example of functional modal: <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <!-- Latest compiled and minified CSS --> <link…
-
3
votes3
answers6930
viewsA: Asset Help (Laravel Blade)
if you do not precede the path with a backslash If you start with a name, your browser will assume that what you want is in the current directory. You have to think of old school, where everything…
-
2
votes3
answers631
viewsA: Limit values for input text
You can assign two variables and a function that solves this: first of all lack the id attribute in your input function verificar(){ //pega o valor preenchido no inicio var data_inico =…
-
0
votes1
answer107
viewsA: Error include_once using AJAX
Thiago downloaded your system and debugged, put the class Conexao.php inside where Usuario_dao.php is, and did the following include: include 'Conexao.php'; soon after that the test Alert worked…
-
4
votes2
answers1000
viewsQ: Git log command for all commits of a specific file
You can check git log for all commits of a specific file. I committed to a foo.txt file and now it no longer shows in git history. my command: git log foo.txt I want to search the all commits…
gitasked Julio Henrique 4,352 -
3
votes3
answers2732
viewsA: Return hours and minutes apart with PHP
I replicated your code on this one website which contains the php server with the 5.1.6 and it presents a fatal error pois a classe nao está definida. and as has been said in the php documentation…
-
3
votes2
answers57
viewsA: Error in Laravel 5.0
You also need to change the file . env APP_ENV=local APP_DEBUG=true APP_KEY=zLzPMzs5W4FNNuguTmbG8M0iFqhIVnsP DB_HOST=localhost DB_DATABASE=estoque_laravel DB_USERNAME=root DB_PASSWORD=senhaacessodb…
-
3
votes2
answers37
viewsA: Keywords in Paginations
ah young to solve your problem. the page name is Prog.php for example, first you take the name of the current page: <?php echo basename( __FILE__ ) ."\n"; $path_parts = pathinfo( __FILE__ ); echo…
-
4
votes2
answers1544
viewsA: How to add a line break after a certain amount of characters?
You’re doing this the wrong way.Because you have to define this "rule" in the div. I set your problem as an example in this jsfiddle use the css property word-wrap: break-word How to apply this css…
jqueryanswered Julio Henrique 4,352 -
3
votes2
answers430
viewsA: Hover - css does not work
Example in jsfiddle. What you need to do for Hover to work. First you need to declare how you want it to be without the Hover: table { overflow: hidden; } tr{ background-color: #f0f; } td, th {…
-
4
votes2
answers1807
viewsQ: What is the use of cache = false in ajax?
What exactly does the Ajax code when I write: cache: false, in an ajax request?
-
2
votes3
answers1700
viewsA: How to take the title of an HTML page and return its value in Javascript
You have to use javascript for this: Applying the following code, for example: document.getElementById("seuelemento").value = document.title; you assign the title value to a field with id "your…
-
2
votes1
answer2087
viewsA: Add project already exists to github
I always wear this website as a reference. create a new folder, open it and run the command git init to create a new repository. create a working copy in a local repository by running the command:…
-
2
votes5
answers3285
viewsA: Remove the space between two Ivs
you can use CSS for this put in the code of the code of the style='margin-top: -20px;'. <div class="texto" style='margin-top: -30px;'> <p>Por favor, não responda este e-mail, Se deseja…
cssanswered Julio Henrique 4,352 -
2
votes0
answers128
viewsQ: How to differentiate sessions in browser guides?
In a web application implemented in Java using JSP and Servlets, if I store information in the user’s session, this information is shared from all tabs in the same browser. How to differentiate…
-
1
votes2
answers53
viewsA: Enable button when last request is executed successfully
in its function you can pass another value function calcularNotas(aluno, numero) { and make a query if that number is equal to the last number if(numero == ultimo_numero){…
-
2
votes3
answers1183
viewsA: Ajax only returns if I put an "echo" instead of "Return" in php
Well, the ajax call reads the server response and that response should be processed as some kind of readable data, like application/jsonou or text/html. To write this data, you need echo server with…
-
0
votes1
answer100
viewsA: Change border-color according to the value of a jquery variable
There’s a lot of things wrong with your code. good come on, first use of this: $(document).ready( function(){ can be replaced by this: $(function () { For it is the new and simplified form of…
-
6
votes1
answer1411
viewsA: Select with Inner June too slow
Guy you can take into account in your JOIN also the size of records of each table and do the Join according to this, for example: TDCUPANT = 900.000 registros FINAFIM = 300.000 registros…
-
14
votes3
answers2102
viewsQ: What is the difference between function and array assignment?
I have recently been coding in my projects where I need to add items in an array, so I don’t know if I should use native language functions for this, for example: array_push($meu_array, 50); or if I…
-
2
votes3
answers1161
viewsQ: How to send an object array type variable via AJAX?
I have the following object: var pessoas = []; pessoas = { nome: "julio", sobrenome: "Henrique", idade: 18, amigos : ["Pedro", "João", "Isabella"] } I send the friends array via ajax like this:…
-
2
votes1
answer65
viewsQ: How to make an ajax request for?
Why doesn’t it work? I say it shows twice my Alert and then to, being that the value of aux_count is 17. for(var i = aux_cont; i > 0; i++ ){ var eval_data = eval(obj_grafico[aux_cont].series);…
javascriptasked Julio Henrique 4,352 -
0
votes2
answers367
viewsQ: Array declaration in javascript
When I define an object like this: No error appears: However when I declare that this object is an array: Burst this error of indefinite variable:…