Posts by Felipe Paetzold • 4,527 points
126 posts
-
1
votes1
answer994
viewsQ: How to create component hierarchy with React Native?
I want to create components with Textinput, the default being my mask-free Input component, and the kids will have a mask or some other treatment. I currently have the default input that contains…
-
1
votes1
answer176
viewsQ: Is there any way to make a component listen to a React Native function?
I need to make a bind to a function that returns me if an item is marked or not, however the function that returns me this is only executed once, there is a way to bind to that function? <List…
-
3
votes2
answers3399
viewsA: Create an algorithm to identify days of weeks in c++
A simple solution using the switch int main() { int dia; printf("Entre com um numero: "); scanf("%d", &dia); system("cls"); switch(dia) { case 1: printf("Segunda"); break; case 2:…
c++answered Felipe Paetzold 4,527 -
2
votes2
answers2424
viewsA: Trying to get Property of non-object?
In your relationship with the other model put the attribute that makes the link (foreign key) as the second parameter, it can be this since the eloquent need to know which parameter to use in the…
-
7
votes3
answers6007
viewsQ: How to Customize Password Recovery Email (Laravel 5.4)
As I can customize the Laravel 5.4 password recovery email, I need to change the language but can’t find the place to edit.
-
3
votes1
answer438
viewsQ: How to sort by two parameters with Laravel 5.4?
I am making a decreasing order to list winners, but it is based by note. My search is as follows: public function getHistorico($id_avaliacao) { return $this->where('avaliacao_id', $id_avaliacao)…
-
1
votes1
answer599
viewsQ: How to check if an array has an attribute?
I’m using Laravel 5.4 in an application, and a validator method receives a array. That one array can have the attributes: [ 'nome' => $request->nome, 'ddd' => $request->ddd, 'fone' =>…
-
1
votes1
answer873
viewsA: Eloquent: relationships between blog tables
Come on, the Eloquent has a way to list all data from other tables related to a particular model. Using the method hasMany();, that you can put on the model, follow this practical example: Model:…
-
1
votes3
answers145
viewsA: Error in simple search in Laravel
Try to do the following: public function index() { $clientes = new Cliente(); return view('clientes.index', [ "clientes" => $clientes->all() ]); }…
-
3
votes1
answer881
viewsA: Problem installing OCI8 in a Vagrant vm
Basically I followed a tutorial (in English), I will pass it to the answer and link to the end of the answer: Installing the Oracle Instant Client first step: Download the Oracle Instant Client and…
-
3
votes3
answers937
viewsA: How to add a div or <p> inside a table
You can use two paragraphs inside your <td> .tab_dados { width: 100%; border-collapse: collapse; text-align: center; } .tab_dados a { color: #484848; text-decoration: none; } .tab_dados th {…
-
1
votes1
answer172
viewsA: Application made with Xamarin does not run Javascript
I decided, I put the following property: webView.Settings.DomStorageEnabled = true;
-
1
votes1
answer172
viewsQ: Application made with Xamarin does not run Javascript
I developed a small app with Webview in Xamarin, it correctly loads the page, but is not running Javascript, I’ve already enabled the Javascript with webView.Settings.JavaScriptEnabled = true; but…
-
1
votes0
answers194
viewsQ: Webview component in Ionic?
Is there any component or plugin of Ionic that resembles the WebView of Android? Need to load a web page into the app.
-
2
votes1
answer881
viewsQ: Problem installing OCI8 in a Vagrant vm
I created a VM with the Laravel Homestead I need to install the IOC8 in it: I turn the remote sudo pecl install oci8 as you report here But I get that mistake: ERROR: `/tmp/Pear/temp/oci8/configure…
-
5
votes4
answers342
viewsA: Laravel 5.3 - Model that can be created by multiple Controllers
Create this method within one Controller of Duplicata: public function criaDuplicata($request) { $duplicata = new Duplicata() $duplicata->create($request); return $duplicata; } public function…
-
1
votes1
answer73
viewsA: Have I enabled a PHP extension and a Warning appears?
I decided, I had to reinstall the Oracle Client, I downloaded a version with Thread Safe of PHP and the following DLL.…
-
1
votes1
answer73
viewsQ: Have I enabled a PHP extension and a Warning appears?
I enabled the extension php_oci8_11g.dll but I get the following warning. PHP Warning: PHP Startup: Unable to load Dynamic library 'C: php ext php_oci8_11g.dll' - %1. I’ve reinstalled the PHP…
-
7
votes1
answer7683
viewsA: Bootstrap modal does not open
You didn’t make the imports correctly. <html> <head> <!-- Importando o css do bootstrap --> <link rel="stylesheet"…
-
5
votes1
answer720
viewsA: Focus on the first enabled form field
With jQuery $('form:first *:input[disabled != disabled], [type != hidden] :first').focus(); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>…
-
1
votes2
answers251
viewsA: Problem with logout in system Aravel 5.3
This happens because you are using a table that is not standard Laravel 5.3, follows the migration creation for the table. If you want to create the table from scratch. public function up() {…
-
1
votes2
answers4144
viewsA: How to create a secure login system connected to the database in Laravel 5.3?
Your question is quite wide, but from what I understand you want to use a table of yours to authenticate. So come on. Go to the file app/config/auth.php and change lines: 'model' => 'App\User',…
-
1
votes4
answers398
viewsA: Use of self-reference
In your example there is no difference, are referring to the same attribute. public static class Aluno{ private String nome; public String getNome(){ return nome; } Aluno(){ this.nome="abc"; } } Now…
javaanswered Felipe Paetzold 4,527 -
4
votes2
answers402
viewsQ: How to make a span display the value of a range as you move it with your mouse?
The function is working, but I want to update the value in <span> as I move the mouse. Someone can help? function mostrarPorcentagem(novoValor) {…
-
9
votes1
answer167
viewsQ: Is it wrong to use stab wounds in the Laravel view to present elements to the master user?
I wonder if it is problematic to do this kind of validation in the views of Laravel. Example: Only a master user can delete certain record, so I present the delete button only if the user is master…
-
4
votes1
answer4352
viewsQ: How to access the public Storage directory in Laravel 5.3?
I need to access images saved in the directory /storage/app/public in views, but I can’t, I have a 404. Here’s what I’m doing: <div class="row"> <img src="../storage/app/public/3.jpg">…
-
4
votes1
answer82
viewsA: Place text pictures etc... in horizontal order
According to the documentation: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link…
-
3
votes2
answers610
viewsA: How to pass several variables to a View in Laravel?
That’s exactly how it is: return view('textos.index', [ 'texto1' => $texto1, 'texto2' => $texto2, 'texto3' => $texto3 ]); And in the view you access it this way: <div>…
-
0
votes3
answers1854
viewsA: Spring Boot Error Message
Check whether your Models has the Annotation @Entity, if they do not have them they cannot be mapped by JPA. You may also have problems connecting to the bank. Check to see if the name of the bank…
spring-bootanswered Felipe Paetzold 4,527 -
2
votes0
answers118
viewsQ: Error with fullcalendar Javascript
I’m trying to import the fullcalendar in a project, I’m using the Gulp to automate imports. However, when I set out to import fullcalendar I come across this error on the console:…
-
3
votes1
answer75
viewsQ: Is there an online service that requests at a given url?
I need a requisition made GET in a url every 5 minutes. Is there any free service that does this?
-
6
votes3
answers3964
viewsQ: What is Threadpool all about?
I’m studying Threads in Java, and came across the following code: ExecutorService threadPool = Executors.newFixedThreadPool(10); for (int i = 0; i < 10; i++) threadPool.submit(new…
-
28
votes2
answers1906
viewsQ: What is the View in the MVC standard?
I started in 2016 to wear pattern MVC, the concept of Model and Controller I fully understand, but the question of View intrigue me. What is the View on a model MVC? I know that’s what the customer…
-
4
votes1
answer1609
viewsQ: Run an Laravel Schedule every minute?
I’m using the Laravel 5.3 and would like to perform a task every minute, within the task I will put some checks, the question is to make it run every minute. I did the following in the Kernel App:…
-
5
votes5
answers7439
viewsA: Exercise with odd pairs in C
There are errors, the & is not used for printing. One more condition to validate before zero so that it does not enter as a pair. Code #include <stdio.h> int main(){ int num,qpar=0,qimp=0;…
canswered Felipe Paetzold 4,527 -
11
votes2
answers4778
viewsQ: How to load default image if src="" does not find?
Is there any way to upload a standard image, using only HTML, case the first src="" can’t find the file? <img src="ola_mundo.png" alt="Olá Mundo"> // Existe algum atributo para isso?…
-
4
votes1
answer122
viewsQ: Do a Hasmany per date with Laravel 5.3?
Is there any way to make a HasMany bringing records by date? public function despesas() { return $this->hasMany(Despesa::class); //registros apenas desse mês } I tried to use the following, but…
-
1
votes3
answers1420
viewsQ: How to get only the month of a date with Laravel 5.3?
I need to take just the month of a date that comes by a $request. But I don’t know how to do it: if ($request->parcelas > 1) { $mes = $request->data_vencimento = date('m'); for($i = 0; $i…
-
0
votes1
answer25
viewsA: How to define the required operating system in the Composer?
Researching found nothing to limit installation on machines with SO’s incompatible. But I find it strange a package that only serves in one ONLY since the PHP is an interpreted and not compiled…
commiserateanswered Felipe Paetzold 4,527 -
2
votes1
answer250
viewsA: Restricted access to authenticated user data - Laravel 5.3
You can access the authenticated user in the server part. Auth::user()->oAtributoQueDeseja or assign it to a temporary user: $user = Auth::user(); Remembering that you need to import this Facade…
-
5
votes1
answer811
viewsA: Authentication with Spring Security
Using JWT. Manager: public class CustomAuthenticationManager implements AuthenticationManager { @Autowired private UserRepository repository; @Override public Authentication…
-
0
votes2
answers228
viewsA: Create bi-directional relationship without using DTO?
Basically I removed the list of Answer from within Question, and created a method in Controller that returns to me the Answers from the Question. Answer: @Entity public class Answer extends…
-
0
votes1
answer122
viewsA: Is there an API to collect indicators in Redmine?
I found in the Wiki redmine. It is necessary to use a token to authenticate, being a API Rest.…
-
1
votes2
answers72
viewsA: Is it possible to upload an image and rename it only with Java Script?
I’ve been doing some research, and actually just using JavaScript it is impossible to upload files, for security reasons it is only possible to upload files on the client side, ie we cannot rename,…
-
0
votes2
answers430
viewsA: Cut bidirectional relationship looping
Well, I left the question kind of forgotten, but what I did to solve it was: Basically I removed the list of Answer from within Question, and created a method in Controller that returns to me the…
-
6
votes2
answers2941
viewsQ: Is it possible to change the browser zoom with code?
Is there any way to change the browser zoom with JavaScript? When loading the script would like to change the browser zoom to 100%, can be using any framework (Angular, jQuery). I’d really…
-
3
votes1
answer1205
viewsQ: How to leave a fixed div accompanying the scroll?
I’m using AngularJs and Angular Material and I need to make a div stay fixed but I have no idea how to do, my structure is as follows: <div class="page"> <md-toolbar layout="row">…
-
1
votes3
answers357
viewsA: Data bank without foreign key in Laravel
In the concept of Relational Database, foreign keys are necessary for the relationship between the tables, if Produtodoesn’t have a categoria_id, it can mean that the relationship can be too much…
-
6
votes1
answer476
viewsQ: Convert Image to Base64 with Ionicframework
Is there any library that can convert images to base64 with the Ionic Framework? I tried to use the angular-Base64-upload, worked with the angular, but in the Ionic did not succeed. If anyone knows…
-
1
votes2
answers315
viewsA: Problem in a foreach
I solved the problem, some users are without company, so the company method that has a belongs_to with user sometimes returns empty, so does not come the properties of empresa. I solved with the…