Posts by Ricardo • 14,521 points
350 posts
-
2
votes1
answer110
viewsQ: Model comments
I’m creating a comment structure similar to Mercadolivre, how do I make the modeling contemplate and ensure that: NOTE: I’m calling comments question and answer since this is basically how the Free…
-
2
votes1
answer400
viewsQ: Mysql Backup Restore does not insert all Tables
I have a database MySql, where I performed a backup of all data from a given database (all data within a file has actually been saved .sql) but when I was reset using this file was not inserted all…
-
1
votes3
answers3438
viewsA: How to receive a pdf file via ajax?
Arrange as follows: Create your AJAX function by receiving as parameter a function to be executed within the Success: function someAjax(functionToExecute){ $.ajax({ type: 'post', url:…
-
2
votes1
answer70
views -
2
votes1
answer75
viewsQ: Plugin cakephp-file-Storage 3.0 does not run and does not display Error
Following the installation tutorial of cakephp-file-Storage 3.0 plugin (which aims to give you the possibility to upload and store files in virtually any type of backend storage) but did not succeed…
-
2
votes1
answer75
viewsA: Plugin cakephp-file-Storage 3.0 does not run and does not display Error
First we have to configure the plugin with the specific configuration in the case Local Storage: In the archive bootstrap.php C: xampp htdocs [Projectfolder] config bootstrap.php…
-
3
votes1
answer92
viewsA: Make div appear to only a few users of the site
If it is for example based on a user being logged in could be done this way: I divide my page into small php files (with pure HTML elements) and check if the user is logged in if yes the page will…
-
3
votes2
answers1206
viewsA: What does the "?:" operator mean in PHP?
That’s a ternary operator with the clause aimed at the result true emptiness. Hence: how $a is phony enters the second suit that checks whether $b is true or false and is phony enters the clause…
-
0
votes3
answers16761
viewsA: Change the contents of the div without refreshing the page
You can achieve this effect using a plugin slider, in case I’m using the bxslider It is necessary to add certain libraries first: <!-- jQuery library (served from Google) --> <script…
-
2
votes1
answer70
viewsQ: Resolve Undefined namespace Mailer Cakephp 3.0.3
I’m trying to create a Email Reusable provided by Cakephp 3 but still following the documentation but I have the following error: use Cake\Mailer\Mailer; Error: Undefined namespace Mailer Referenced…
-
0
votes1
answer179
viewsA: Access method using Dash (-) in Cakephp URL 3
I managed to get the CakePHP 3 use the Default behavior of dashed routes by changing the method parameter fallbacks for 'DashedRoute' by default the routes comes with…
-
1
votes1
answer266
viewsQ: Return records from a table whose key is referenced in another Cakephp 3
I’m using the ORM native of Cakephp 3 to retrieve the product table records (through the ID) along with the records that references it with the following method: public function view($id) {…
-
0
votes1
answer227
viewsA: Edit formatting parameters passed by Cakephp URL 3
I used the lib jQuery so that the form is submitted it suppress its default behavior, create the new url and do the redial: $("#search-form").submit(function(event){ event.preventDefault(); //…
-
1
votes1
answer227
viewsQ: Edit formatting parameters passed by Cakephp URL 3
I have a unique field form, a input type="text", when the form is submitted to URL is as follows: http://localhost:8765/products/search?search=notebook I would like it to be as follows when…
-
4
votes2
answers1091
viewsA: Put spacing effect at paragraph start
How did I resolve this issue: I used the pseudo element :first-letter being as follows: CSS: p:first-letter { margin-left: 3em; } HTML: <p> TOS TOS TOS TOS TOS TOS TOS TOS TOS TOS TOS TOS TOS…
-
6
votes2
answers1091
viewsQ: Put spacing effect at paragraph start
Setting: I have a page of Terms of Service and responsibilities. Because it is very verbose, there are about 15 paragraphs. To generate the initial spacing of each paragraph I am using a conjunct…
-
2
votes1
answer179
viewsQ: Access method using Dash (-) in Cakephp URL 3
I have a signature method: public function mostPopular() I’m trying to access it via URL as follows: products/most-popular but I am being directed to a Error page: The action Most-popular is not…
-
2
votes1
answer80
viewsQ: PHP build-in class does not work in Cakephp 3.0
I’m trying to use a class Built-in of PHP inside Cakephp but a: Error: Class 'App Controller Component Datetime' not found Where it’s being used: public function listNewBanners($newBannersQuantity)…
-
1
votes1
answer42
viewsQ: Delete WHERE clause if passed Zero or Cakephp 3.0
I’m working with the CakePHP 3.0 and created a query for his ORM, this query is working perfectly but now I need that if a certain parameter is 0 or nothingness is passed to the class method where…
-
2
votes2
answers460
viewsA: Display HTML text in Twitter-Bootstrap popover
Alternatively the insertion of html: true in the object passed to popover it is possible to insert an attribute data-html="true" directly in the tag there will be the popover. <input…
-
3
votes2
answers460
viewsQ: Display HTML text in Twitter-Bootstrap popover
I created a Popover provided by Twitter-Bootstrap in this Popover a message is displayed formatted with tags HTML, but when I open the page the text that should be format in HTML is formatted as…
-
1
votes1
answer53
viewsQ: Selecting subcategory by category
Having the following tables in the category and subcategory bank: CREATE TABLE categories ( id INT AUTO_INCREMENT PRIMARY KEY, category_name VARCHAR(255) NOT NULL, created DATETIME, modified…
-
3
votes1
answer3367
views -
2
votes1
answer222
viewsQ: Where Appropriate to Allocate Javascript and CSS Libraries in Cakephp 3
What is the appropriate location to allocate libraries and plugins Javascript and CSS in Cakephp 3, as there has been a major change in the directory structure from this release to earlier. All…
-
4
votes1
answer668
viewsA: How does mega.nz work?
The mega.conz. uses the filesystem API (Starting from google Chrome 23, but not restricted only to Chrome) which basically writes in a restricted section on your local filesystem Appdata Local…
-
2
votes1
answer79
viewsA: What exactly is the "u" modifier for?
This modifier /u is for Unicode support. For example if you want to make a regex with words in Japanese it is necessary to use it. preg_match('/[\x{2460}-\x{2468}]/u', $str); Where \x{hex} - is a…
-
4
votes1
answer397
viewsQ: How to make a website homepage using Cakephp 3.0
How should a website homepage be done using the Cakephp 3.0 (3.0.3) Framework? This page has dynamic content. What this page consists of: It is a display page of major products and product…
-
2
votes0
answers95
viewsQ: How to insert async and Defer attributes without the value with Cakephp 3?
I’m using the PHP Cakephp Framework 3.0.3 and would like to know how to insert the keywords Defer and async script tags and omit values: How script insertion is done with the framework: <?=…
-
22
votes2
answers3477
viewsQ: Applying licenses to Github
I have applications on Github (public repository) and would like to know if it is possible to license repositories, and if there is any software license that: Ensure that I am the author of the…
-
0
votes2
answers69
viewsA: Phpmailer - Sending emails is possible?
The method Send() class returns a Boolean that will be false if the message is not sent for any reason. <?php require("class.phpmailer.php"); $mail = new PHPMailer(); $mail->IsSMTP();…
-
2
votes1
answer56
viewsA: Convention for attributes that preserve types
Standard rules for database normalization exist: First Normal Form (or 1FN) requires all column values in a table to be atomic (example: a number is an atom, while a list or set is not).…
-
3
votes3
answers81788
viewsQ: Open link in new tab without using target="_Blank" embedded in HTML
Setting I am optimizing a page where is displayed about 200 Images (very small does not need paging) partners, these images are wrapped in a tag <a> and all partner websites open in new tab…
-
5
votes3
answers81788
viewsA: Open link in new tab without using target="_Blank" embedded in HTML
The way I found it was to use a library function jQuery .click() so that when the image was clicked the value was set _blank the property target. HTML code for testing <html> <head>…
-
3
votes2
answers1445
viewsA: Check if select field has changed
Try it like this: $('#select').change(function(){ alterado = true; }); What I did: I had a function jQuery which will spy on a particular element specified by id, as soon as the function within the…
-
3
votes2
answers3951
viewsA: What is the difference between mouseleave and mouseout?
Suppose we have the following HTML (where each div has mouseout events, mouseleave attached): <div id="outerBox">OuterBox <div id="innerBox">InnerBox </div> </div> Mouseout:…
-
26
votes2
answers5412
viewsQ: What is Lazy Loading and Eager Loading?
What is Lazy Loading and Eager Loading? I saw these terms in a documentation, but I did not understand it very well, so my doubt is what these terms mean and I would like, if possible, to restrict…
-
3
votes1
answer395
viewsA: Go through 4x4 matrix with for, I don’t understand
In the 1st iteration of first for the value of the variable i is 1. As soon as you enter this for enters in a second for (that is within the first) the value of its variable j is also 1 logo will be…
-
0
votes3
answers697
viewsA: How to box up when logged in
Explaining: I divided my page into small php files (with pure HTML elements) and check if the user is logged in if yes the page will be composed with a logout button if not with login and…
-
12
votes1
answer16066
viewsA: Why do some domains use www2 and www3 in the prefix?
The hostnames www2, www3 e www4 are mirrors of the original server, the main objective of this technique is to reduce the server load, perform a load balancing or to maintain the online service when…
-
2
votes2
answers50
viewsA: I’m unable to accommodate three images online
Test with this css: .produtos-conteudo-ponta{ float:left } It makes all class elements .produtos-conteudo-ponta float to the left, so the Bloquinhos stood side by side. As stated above the effect…
-
3
votes2
answers129
viewsA: Define css with php according to the browser
It is possible to check the user agent this way: <?php $useragent = $_SERVER['HTTP_USER_AGENT']; if (preg_match('|MSIE ([0-9].[0-9]{1,2})|',$useragent,$matched)) { $browser_version=$matched[1];…
-
1
votes2
answers956
viewsA: Value Radio Button does not pass via php Post
Clear the information coming from the form: $faturamento_tipo_post = trim(strip_tags($_POST['faturamento_tipo'])); Sometimes white spaces and or html tags may come. Trim: removes whitespace both…
-
4
votes3
answers224
viewsA: Use of using versus full name
There is no standard but, generally, we use the direct reference because if there were System.Console.WriteLine and Output.Console.WriteLine and use using / import would not know which console to…
-
0
votes2
answers158
viewsA: Views with php transition with the controller
This is not good practice to mix the controller (system logic) with the view (visual part of the program that interacts with the user), to avoid the problems caused by this mixture and gain more…
-
4
votes1
answer1453
viewsA: How to extract content from a PHP page?
You can use the get_http_response_code to check if the page is online and then file_get_contents to download the page. if(get_http_response_code('http://sefaz.com') != "200"){ echo "erro"; }else{…
-
5
votes2
answers1094
viewsA: What does content:" f0ed" mean?
You are selecting the class element fa-cloud-download, with the pseudo-elemento :before is telling the browser that I want to do something at the beginning of this element, the property content is…
-
1
votes3
answers18470
viewsA: Is there any way to close a browser tab with javascript?
Javascript function for closing: If you want the user to confirm the exit of the page: function close_window() { if (confirm("Fechar Janela?")) { close(); } } If not: function close_window() {…
-
4
votes2
answers4997
viewsA: What are the differences between __autoload and spl_autoload_register?
__autoload is generally considered obsolete. It only allows a single auto loader. Generally, you should only use __autoload if you are using a version of PHP without support for…
-
6
votes2
answers1570
viewsA: What is this __php_incomplete_class?
Usually when trying to store objects in the session, in files or transmit them through sockets, the object can be referenced as being of the class __PHP_Incomplete_Class, this happens because the…
-
8
votes1
answer9335
viewsA: How to create html links that are directed to specific points on the page itself?
Try it this way: <a href="#ponto1">Link</a> The #ponto1 is a id of a page element as soon as the link is clicked you will be redirected to the point where you have the id. Thus: <div…