Posts by Filipe Ricardo • 147 points
11 posts
-
1
votes1
answer664
viewsA: What is a migrate?
The "migrate" (migration) serves for you to manage the structure of the tables of the database of your application, that is, through it it is possible to include, change and delete tables or fields…
-
0
votes2
answers250
viewsA: Align Label with Text
In addition to the Divs, this way the text is also aligned vertically with the input checkbox, it is a detail more. .linha { display: flex; flex-wrap: wrap; justify-content: space-between; } div…
cssanswered Filipe Ricardo 147 -
0
votes3
answers4426
viewsA: In practice, what is the use of C-pointers?
In C, you don’t have support for some complex data types, such as a string. There is also no way to pass a variable "by reference" to a function. That’s where you have to use pointers. In addition,…
-
2
votes3
answers189
viewsA: How to properly make this condition?
Treatment of String Another important thing is to do the handling of this string, we can never trust what the user will type, and doing this condition without accentuation with everything tiny will…
-
0
votes2
answers34
viewsA: Use start and end parameters without using the middle ones. PHP
You can pass the parameters through array, this facilitates, especially if the amount of parameters is large. public function Usuario($dados = array()) { $this->Nome = isset($dados["nome"]) ?…
-
0
votes1
answer50
viewsQ: link_to_remote on Rails 5
I’m leaving for Rails 5 and I can’t find a replacement for the link_to_remote which has been discontinued. In my old code, I have a "Register" link, which when clicked, makes a request to the…
-
1
votes2
answers36
viewsA: Send value to javascript function
When you use double quotes ", there is no need to concatenate this way, you can just put the variable, and if you need to put quotes inside the text, just use the backslash before \" to escape, the…
-
-1
votes1
answer43
viewsA: How to create a loading system on site pages
A similar post already exists in this forum, follow the link: How to get page load percentage? Basically it is not possible to do what you want, but depending on the case, two examples (not…
javascriptanswered Filipe Ricardo 147 -
2
votes2
answers153
viewsA: Error while displaying array in PHP
It’s a stdClass Object, do it like this: Suppose in your code the array is in $data // printar o campo nome dentro do loop foreach ($dados as $dado) { echo $dado->nome; } // printar o campo nome…
-
2
votes1
answer339
viewsA: What PHP function to open a page if the condition is true?
You set the value of the $search variable according to the condition you want, and the function header() redirects. <?php if ($busca == true) { header("Location: pagina_busca.php"); } ?> I…
phpanswered Filipe Ricardo 147 -
0
votes2
answers1134
viewsA: Browse HTML content and remove parts of HTML using PHP
It is possible to replace the div using the function preg_replace_callback() and leaving only the H3 tag. $new_sHTML = preg_replace_callback('/<div class=\"xy\">.*?<\/div>/sim',…
phpanswered Filipe Ricardo 147