Posts by wmarquardt • 601 points
30 posts
-
2
votes1
answer1303
viewsA: What is a git diff, how to do it, and what is it for?
The syntax for the diff between branches is: $ git diff origin/[branch1]..origin/[branch2] The diff won’t resolve the divergence, it’ll just show the difference between them. To solve it you can…
-
1
votes2
answers35
viewsA: Get duplicate values from Vector
Use the function array_diff_key instead of array_diff for this case. print_r(array_diff_key($cdCursos, array_unique($cdCursos)));
-
2
votes3
answers35
viewsA: Ajax not sending request
Probably your code is breaking even before executing the Ajax request. Parecce that is unable to find the value property of the "var EspecieArquivo =…
-
0
votes2
answers192
viewsA: Avascript function does not work when used ng-include Angularjs
In all templates (main, template and modal) the controller notasFiscaisProdutorLiquidacaoController is added. For angular, every time you add a controller in ng-controller a new instance is created.…
-
0
votes1
answer583
viewsA: Import CSV into Django database
To work with CSV files I recommend using pyexcel, is quite flexible, besides allowing the use of other formats such as xls and xlsx. To import the file you must use the method get_sheet (that…
-
1
votes1
answer131
viewsA: How to create a Mysql Trigger with more than one cursor
Try to reset the done before opening the second cursor SET done=0;.
-
1
votes1
answer347
viewsA: Reset variable
Where you have the prints, switch to: print("Primeiro ponto variavel preenchida ") alunos = tuple(select) print(alunos) if len(alunos) <= 0: When you use tuple(select)), you run select twice. For…
-
1
votes1
answer90
viewsA: Problem with Context Menu
You can try this way: onclick='javascript:location.href="http://www.google.com"' But since you are using Jquery, you can do the following: <div class='context_menu_pai' id='menu1'> <div…
-
0
votes1
answer35
viewsA: Form added to page
The Method load() of Jquery is asynchronous. What happens is that when you make the call it probably hasn’t generated the elements yet. You can avoid this by using the callback of the method. Ex:…
-
0
votes1
answer50
viewsA: Ajax receiving array that shouldn’t
Probably the $stmt->fetch(PDO::FETCH_ASSOC); returns an empty array when the record does not exist. Try changing the following line: if (is_array($resposta1)): To if (is_array($resposta1)…
-
1
votes2
answers210
viewsA: JS seeking return JSON PHP
Add the JSON header at the top of the page where Json will be displayed: header('Content-Type: application/json');
-
1
votes1
answer451
viewsQ: Sort result of a JOIN query based on the number of records in one of the tables
Assuming I have two tables in my database (pedidos and pedidos_itens) how I can obtain data from requests ordered by orders containing more items? I’ve tried to make a Right Join, but I don’t know…
-
1
votes1
answer54
viewsA: break automatic line with database data
Try doing it through CSS, using @media for resolutions below 860px: @media screen and (max-width: 860px) { .suaClasse{ word-break: break-all; } }…
-
1
votes1
answer238
viewsA: Hide form fields that will be required
Try to use the removeAttr() to remove (if you use required of Html5), and uses the .prop() to add again. Ex: Html: <input id="cpf" name="cpf" class="form-control" type="text" required/> JS:…
-
1
votes1
answer3922
viewsA: Error: Cannot read Property 'style' of null
If your ID is numeric, add some letter as well. Change the variable assignment nomeSensor for: nomeSensor = "sensor_" + nomesSensores[i]; source:…
-
0
votes1
answer94
viewsA: file upload with json return error
Set a header for your return. function add_fcei(){ //define um cabeçalho header('Content-Type: application/json'); $response = $this->model_projeto->add_fcei(); echo json_encode($response); }…
-
1
votes1
answer251
viewsA: Customizing CSRF Protection error messages in Codeigniter
CSRF protection is in class CI_Security, that is instantiated before the helpers and libs. You can try extending the operation of the class. Maybe this will help you:…
-
0
votes2
answers245
viewsA: Inserting data in PHP
Looks like you’re using codeigniter, so to get the id inserted you can use $this->db->insert_id This way you can add in the Clinics table and then grab the inserted id to add in the users.…
-
1
votes2
answers53
viewsA: How to select a specific contact form to format in CSS
Add a class directly into your form’s shortcode: [contact-form-7 id="4831" title="Contato Rápido" html_class="form_rapido"] And change your CSS: form.form_rapido { position: absolute; width: 250px;…
-
2
votes1
answer556
viewsA: Get XML values with PHP
Change your foreach to: foreach ($xml->estado->bairro->local as $listar) { echo $listar->aparecer; }
phpanswered wmarquardt 601 -
0
votes2
answers635
viewsA: Anchor for Bootstrap tabs
To change the tab via JS you can use the following command: $('#id_tab').tab('show'); If you want to display the hash in the URL when changing tabs you can add the following function in your JS…
-
1
votes2
answers537
viewsA: Problems with JSON on the server
Try to change: url: "<?php echo site_url('/StockController/searchPeople')?>", for: url: "<?php echo base_url('StockController/searchPeople')?>", If it does not work post the searchPeople…
-
1
votes1
answer344
viewsA: Why is @import not working properly?
The @import needs to be on the first line of the file. But it can also be some problem with the folder permissions css.
-
2
votes1
answer329
viewsA: locate php.ini in Cpanel
It depends on your stay. Some accommodations allow you to add one PHP.INI at the root of your website’s directory, only with the directives you want to change. Another tip is, as you use…
codeigniteranswered wmarquardt 601 -
5
votes1
answer23359
viewsA: Validate email in Javascript
You can validate using this function: function IsEmail(email){ var exclude=/[^@-.w]|^[[email protected]]|[._-]{2}|[@.]{2}|(@)[^@]*1/; var check=/@[w-]+./; var checkend=/.[a-zA-Z]{2,3}$/;…
javascriptanswered wmarquardt 601 -
0
votes4
answers4688
viewsA: Codeigniter 3.0 giving 404 not found
Codeigniter 3 requires controller files to be capitalized. In your briefcase controllers, rename the file login.php for Login.php.
-
1
votes1
answer435
viewsQ: How to create settings via json in codeigniter
How to use a json configuration file, so that the values of the file parameters become $config['var'] style configuration variables in codeigniter?
-
1
votes1
answer435
viewsA: How to create settings via json in codeigniter
First it is necessary to create a json file, in this case I left with the name 'config.json' and put in the root of my project. file structure: { "conf": { "empresa": "Nome da empresa",…
-
2
votes2
answers1029
viewsQ: Schedule page loading through CRON
I have a page in PHP that checks the news feed of some blogs and records the records in the database. For this to happen, it is only necessary to load the address ex: "www.site.com/pagina.php", I…
-
1
votes1
answer71
viewsA: Undefined variable error: aloggedin in and Undefined index: Submit in
No value set for variable. Instead of checking the value, you can see if it was set using: if(isset($refid)){ $qqq = mysql_query("UPDATE members SET totalrefs=totalrefs + '1' WHERE…
phpanswered wmarquardt 601