Posts by Danilo Tiago Thai Santos • 409 points
20 posts
-
0
votes0
answers29
viewsQ: Annotation java + spring boot
I need to take an attribute of an object and modify its value via Annotation, for example: public class MeuDTO { @AlgumaAnnotation private String meuAtributo; } I created the note:…
-
3
votes2
answers88
viewsQ: Good practices for data of product characteristics that may be different for each item
I own several products and each one has its own characteristics, some have weight, some do not, some have extra fee and others do not, etc. Is it good practice to create a new table of product…
-
0
votes1
answer125
viewsQ: Container closes immediately on Docker-Compose
I set up a portable project, created a Docker-Compose below: # v3 syntax version: 3 services: # PHP (apache) blog: image: php:7.1-apache container_name: blog-apache ports: - "8000:80" volumes: -…
-
1
votes0
answers111
viewsQ: Typeahead with accentuation
I created a small application that uses typeahead to search. I have registered people with accentuated names and to find them I need to write the absolute name (with accent). I need to find a person…
-
1
votes1
answer89
viewsQ: Instantiate class within bootstrap/start.php file Laravel 4.2?
I have an app running Laravel 4.2, I have a class that takes care of IP's in a blacklist, and this one is safe on the bench. I need that when a user accesses my application the system validates if…
-
1
votes2
answers1063
viewsQ: Grab image inside Storage folder
I’m uploading images to the folder storage, app/public, inside this created a folder /banners and I’m uploading these images into this folder. How can I take these images and display in the view?…
-
0
votes1
answer612
viewsQ: Read word file in Laravel 5.3
Guys I’m having a difficulty reading a Word file in the Windows, the situation is as follows: I have a form where a person adds a word file in an input type file field. I want to take the text of…
-
0
votes1
answer977
viewsQ: Cannot find module 'reflect-Metadata'
When will I install angular 2 using: ng new angular-teste I get the error: Cannot find module 'reflect-Metadata' What can it be?…
-
0
votes2
answers73
viewsA: Bug change position of banners site Laravel
This code works only to change a banner to the first position // pega o banner que queremos alterar e seta para zero DB::table('banners')->where('ordem', '=', $posicaoAntiga)->update(['ordem'…
-
1
votes2
answers73
viewsQ: Bug change position of banners site Laravel
I’m developing a website where it has a banner modal and I want to define a field in the database of type "order", where I can define which banner appears in first, second, third ... on my admin…
-
2
votes1
answer107
viewsQ: Data sorting with php
I need to sort an array by a specific "order" field, where within that array I have banners objects with the id, order, name and img fields. I need to sort this array in order. the order banner 0…
-
4
votes3
answers684
viewsQ: Update registration with Laravel 5.2?
I have the following function : public function alterar($id) { $produto = Produto::find($id); $params = $request->all(); $produto->fill($params)->save(); return…
-
4
votes3
answers145
viewsQ: Blade default value Laravel 5.2
I have the following code <strong class="primary-font">Complemento</strong> <p>{{ $produto->complemento or 'Esta produto não tem complemento' }}</p> I need that if the…
-
4
votes1
answer624
viewsQ: Laravel 5.2 with pagination
I have the following function inside the controller public function home() { $igrejas = Igreja::paginate(3); $igrejas->setPath('igrejas'); return view('admin/igrejas/home')->with('igrejas',…
-
0
votes0
answers973
viewsQ: Jquery - RG mask
I am having problems creating a mask with Jquery, because there are rg’s that close with the 'X' type'. HTML <input name="rg" class="form-control" id="rg" pattern="^(d{3}\.d{3}\.d{3}\-d{2}"…
-
3
votes2
answers912
viewsQ: How to make sql for a field of a table that is not primary become foreign in another table?
CREATE TABLE PESSOA ( ID INTEGER UNSIGNED NOT NULL AUTO_INCREMENT, CPF VARCHAR(15) NOT NULL, RG VARCHAR(10) NOT NULL, NOME VARCHAR(128) NOT NULL, DATA_NASCIMENTO DATE, PRIMARY KEY (ID) ) CREATE…
-
1
votes2
answers775
viewsQ: Generate random numbers
I have the following problem: I need to generate a random number between 1 and 6 Assign to a array of numbers if this new number is not contained in array If contained, generate again. Do this…
-
0
votes4
answers1365
viewsQ: Find out the type of variable in ruby on Rails
I have a form in search Rails that can receive a zip code or the name of a street, so I need to know what type of variable the user is entering, if it is numbers, I do a search by zip code, if it is…
-
1
votes0
answers47
viewsQ: Zend framework 2 Cpanel
I just took a course of zend framework 2 and I have a project ready, all folders are inside the "Skeleton-application", but when I went up everything in the public folder of the following error :…
-
3
votes2
answers3439
viewsQ: Warning: array_push() expects Parameter 1 to be array, null Given in
I want to assign objects to a array with array_push, but it’s making a mistake: Warning: array_push() expects Parameter 1 to be array, null Given in My class : <?php //PREPARA UMA RODADA class…
phpasked Danilo Tiago Thai Santos 409