Posts by Darlei Fernando Zillmer • 3,867 points
153 posts
-
0
votes1
answer290
viewsA: Insert variable in href in php with mysql
Try something simpler, got a little confused this mixture of js html and php. See the excerpt, I adapted only the question stated in the statement, but of course can and will adapt... <a…
-
0
votes1
answer431
viewsA: Pipes for checkbox Contact Form 7
I solved the problem by defining inputs directly in the module configuration, I contacted the creator of the module who seemed to have neglected the question, including whether there are several…
-
1
votes1
answer949
viewsA: pagination with ajax in the Laravel
A practical example that I found some time ago and saved because I knew it could be useful, sorry not to pass the code already with its variables, I answered here in the run :( but I believe you…
-
0
votes2
answers172
viewsA: What is the difference between $('#id') and Document.querySelector('#id')?
Does not work for the simple reason of the return of each function: document.querySelector('#record'); // retorna um [object HTMLButtonElement] $('#record2'); // retorna um [object Object] To work…
-
1
votes1
answer431
viewsQ: Pipes for checkbox Contact Form 7
I need to adapt a checkbox plugin Contact Form 7 wordpress with Pipes, what I’m doing: Man shortcode on the form: [checkbox checkbox-579 "10 cm" "15 cm" "20 cm" "30 cm"] And I must result: ...…
-
5
votes1
answer146
viewsA: Script only number
You have reached the maximum value supported by the type int at the bank, try trading for a guy bigint (If you really want to keep that kind of value, I would put a sweep) See the limits of…
-
1
votes1
answer132
viewsA: Chosen does not work with Lockable
Are the js inclusion links in the header working? If so, try to change js. Try this way: $(document).on('show.bs.modal', '.myModal', function () { $('#meu_select').chosen('destroy').chosen(…
-
6
votes1
answer198
viewsQ: How do sessions work at HTTP level?
I came across this question recently and didn’t find much about it in web. I’m used to working (and reading) on Session in PHP, but I never stopped to think what they’d be like HTTP, someone would…
-
0
votes1
answer104
viewsA: Laravel - Restful API
Somehow Laravel isn’t finding his Jobscontroller, execute composer dump-autoload Then check the vendor/Composer/autoload_classmap.php file, your Jobscontroller should be there, otherwise Poser will…
-
6
votes2
answers724
viewsQ: mysqli_real_escape_string Prevent SQL Injection?
According to the documentation, the function: Escapes special characters in a string of characters for use in an instruction SQL, taking into account the current character set of the connection. So:…
-
1
votes3
answers146
viewsA: Laravel 5.5: same field in multiple rows on Seeds
If the Generous have a model could use the standard methods of create/save, they set this field automatically. Just like the updated_at. Tried to put it in a variable and then just pass it to the…
-
2
votes1
answer419
viewsQ: What is the best type of file compression to optimize server response?
Recently I have been researching ways to improve the server performance, decreasing its load and consequently increasing its speed. I found several types of compression and benchmarks comparing the…
-
2
votes1
answer590
viewsA: file_get_contents is generating the error: "Too Many open files"
This may be a limitation on the server the code is running on. The entire operating system only allows a certain number of / identifiers / sockets opened. This limit is usually lower when the server…
-
4
votes3
answers1677
viewsA: How to disable Submit from a form by "Enter" - c# MVC
Without javascript I find it hard to get, you’ll need a script Client Side to check the click. With jQuery can do the following: $(document).ready(function() { $('form#exemplo').bind("keypress",…
-
0
votes3
answers533
viewsA: Update button using jQuery
Taking into account that you have a form and want to send it without updating the page you should think about some details. For default, when the submit is given, your form is sent to the action…
-
1
votes1
answer192
viewsA: PHP Qrcode how to make it bigger
In the documentation there seems to be something about setting the zoom size of pixels. I imagine that will solve your problem. include('../lib/full/qrlib.php'); include('config.php'); // how to…
-
0
votes1
answer1113
viewsA: Working with the return result of an ajax request with jquery
Function in the first line is spelled wrong. Forgot the last parentheses and point and comma to close the .ready(). In addition, it is likely that your num is not receiving the result, because I…
-
1
votes2
answers158
viewsA: How to block the double click on a video?
Try: $("body").on('dblclick', function(){ return false; }); If it is a iframe can use: <iframe allowfullscreen="0" src="https://www.youtube.com/embed/@(item.VideoUrl)"></iframe>…
-
1
votes1
answer848
viewsA: Open print preview window by javascript
Use the method print of the object window. window.print() If you want to link to the click of a button would look like this: <input type="button" name="imprimir" value="Imprimir"…
-
0
votes3
answers2819
viewsA: Ways to call image in wordpress
Check the image path, access the logo link directly in the browser and see if the image opens or not. See the permissions of the folder where the image is, usually used 644, but in case of testing…
-
3
votes4
answers554
viewsA: Correct CSS Div > li > span
Selector son A son selector targets an immediate child of an element. The child selector consists of one or more single selectors separated by a higher sign ">". The parent element is to the left…
cssanswered Darlei Fernando Zillmer 3,867 -
1
votes3
answers1300
viewsA: GET via jQuery on a different server, problem with CORS
You are making a requisition AJAX for a domain other than your page is enabled. Therefore, the browser is blocking this as it usually allows a request from the same source for security reasons. You…
-
1
votes1
answer41
viewsA: Doubt in news system
First check if the excerpt: <?=substr($noticia['noticia'],0 , 60)?><a href="noticia-visualizada.php?id=<?=$noticia['id']?>">Ver mais...</a> Is linking correctly with the news…
-
1
votes1
answer84
viewsA: Table comparison
The first thing you need to keep in mind is the link (reference) between the two tables to know which bet references which match, so we will have: Table tb_jogos where the administrator registers…
-
0
votes2
answers1610
viewsA: Automatically update timestamp on update
From what I’ve seen in previous comments and responses I only see one way I haven’t tried to do (or didn’t think it was the best one). Pass the value on INSERT and us UPDATES INSERT INTO…
mysqlanswered Darlei Fernando Zillmer 3,867 -
3
votes2
answers4704
viewsA: Complete decimal places ",00" Javascript
Converting numbers to currency without framework It is possible to convert Number to String currency native, using only function toLocaleString(). Behold: (10.9).toLocaleString(); // "10,90"…
-
1
votes2
answers227
viewsA: Problem to load image in specific hosting
Surely it must be problem in the link path, or the image does not exist on the server (try to access it directly by link of the image in the browser). A solution and tip for your project: I believe…
-
2
votes1
answer416
viewsA: Protecting a route used by a single domain
CSRF protection: If you’re worried about someone reading the content, there are two "distinct": Get your /json.json on the client’s side, via Javascript/Ajax. Get your /json.json on the…
-
2
votes5
answers3132
viewsA: What is the difference between comparison operators on Oracle?
These "not equal" operators must be equivalent, but there is a note from Scott Canaan that suggests, in Oracle 10.2, they can produce different execution plans and therefore different execution…
-
7
votes4
answers865
viewsA: Split a 16-digit number in PHP
Will it always be 16 digits?? You can solve it in a very simple way $str = "9999999999999999"; $num1 = substr($str, 0, 4); $num2 = substr($str, 4, 4); $num3 = substr($str, 8, 4); $num4 =…
phpanswered Darlei Fernando Zillmer 3,867 -
0
votes4
answers7452
viewsA: Formatting date with Laravel
Try David Santos' solution, it should work, but an alternative if not certain, would be to make the change in hand, is a gambit but it works: public function index(){ $feriados= Feriado::all();…
-
1
votes1
answer545
viewsA: How to fix validation messages?
You can create custom error messages for each type of error within your store, example: public function store(Request $request){ $dados = $request->except('_token'); $dados['Status'] = 1;…
-
0
votes2
answers287
viewsA: Registration for minors -Php - Javascript
Just check the difference between the date of birth that the user tried to register and the current date: $dataBR = "03/07/1994"; $dataConvert = date("Y-m-d", strtotime($dataBR)); $dateStart = new…
-
1
votes1
answer1447
viewsA: PHP with sockets
Simple TCP/IP server This example shows a simple exchange of server information. Change the address and port variables for the set of your configuration and execution. You must then connect the…
-
5
votes3
answers3280
viewsA: How can I make an Rand() that always generates only 4 random numbers?
Can do only by passing the arguments in the function, it is simpler: $presenca = rand( int $min , int $max ); $presenca = rand( 1000, 9999 ); See more in the documentation:…
phpanswered Darlei Fernando Zillmer 3,867 -
1
votes4
answers351
viewsA: Meta Author does not embed on the site
I found in the documentation, you’ve tried? Activate Facebook Author Tags For the Facebook Author Tags feature to work, you need to enter the user profile page of your Wordpress installation and…
facebookanswered Darlei Fernando Zillmer 3,867 -
0
votes1
answer421
viewsA: Shortcut home button to upload the site?
Using Jquery //scroll normal $('html,body').scrollTop(0); //scroll suave $('html, body').animate({scrollTop:0}, 'slow'); //slow, medium, fast Using Javascript var scrollTop = function() {…
-
0
votes4
answers1339
viewsA: Send PHP command via Ajax?
You can send parameters (via data:{parametro1:"limpar", parametro2:"xxx"}) for the data to be processed in different ways in the request link. There are several ways to serialize this…
-
1
votes1
answer207
viewsA: Format data before saving to the database
Try to use: $imc->peso = number_format($request->peso, 2, '.'); $imc->altura = number_format($request->altura, 2, '.'); Another option of gambiarra: $num = 100.4; $num = str_replace('.',…
-
3
votes2
answers127
viewsA: Replaceall() does not remove "|"
The first parameter of replaceAll is a regular expression, not a string constant. If you’ve studied regular expressions properly, you’ll know that "|" is a regular expression that matches any…
-
0
votes1
answer44
viewsA: File . htaccess settings
The option you seek is this: Options -Indexes Can you direct us .htaccess (if this override is enabled in the Apache). Example of configuration with Directory, instead of .htaccess: <Directory…
htaccessanswered Darlei Fernando Zillmer 3,867 -
6
votes1
answer1583
viewsA: How to create a Cron job?
The simplest way to do that is: Define what cron will do, what it will handle, whether in the database or in server files. Create/test scripts with routines and functions that do the manipulations…
-
1
votes1
answer2006
viewsA: How to get all users currently logged in to Laravel 5.4
This is a very basic way, but I hope it will be effective. Step 1 Open the file config/session.php and change the driver to the database (database). Step 2 We need to create the session table, so…
-
4
votes1
answer1297
viewsA: How to work with data validation in Laravel
For a better understanding of the differences in the method validate and of Form Request Validation I will tell you a little bit of each, according to what the official documentation quotes, at the…
-
4
votes2
answers8273
viewsA: What is Encryption ($) for before a Function in Javascript?
It is usually related to jQuery. Otherwise they are only names for variables. Javascript: The variable name can start with letters, dollar sign($) and underline(_). No numbers or other symbols are…
javascriptanswered Darlei Fernando Zillmer 3,867 -
1
votes5
answers16658
viewsA: input only numbers with jquery
I want to prevent the user from typing anything other than numbers Use yourself input of the kind number of HTML The <input type="number"> defines a numeric input field . You can also set…
-
7
votes2
answers4636
viewsA: What is the csrf_token present in the Laravel layout file for?
This is more specifically aimed at forms of the type AJAX. It’s basically taking the token and include it in the headers for when you submit a request via AJAX. The Laravel automatically generates a…
-
0
votes2
answers3901
viewsA: Currency Mask with jquery
There is a plugin jQuery that might help, it’s called jquery-maskmoney, follows the link: http://plentz.github.io/jquery-maskmoney/…
-
0
votes3
answers93
viewsA: Q: Choose two select and display result
Starting with the form, which you should already have, I’ll just give you an example of how to get the data from selects with jQuery, remembering that in the example I will use an event of submit of…
-
1
votes2
answers3102
viewsA: Customizing Send File Contact Form 7 wordpress button
You can solve this problem in two steps. Create the CSS of inputs A simple technique that uses HTML and CSS is to point out the attribute for of a label to the input file selection (which will be…