Posts by Allan Ramos • 2,488 points
67 posts
-
0
votes1
answer84
viewsA: Commitizen: Is it possible to override the "git commit" command?
I ended up finding the documentation of the tool and found that there are two ways, being them: Changing the Git hook Open the file .git/hooks/prepare-commit-msg and put the code down: #!/bin/bash…
-
0
votes1
answer84
viewsQ: Commitizen: Is it possible to override the "git commit" command?
Context I wish I could use the command git commit and be executed the cz. What happens I install the Commitzen Executed git commit Opens the common Git interface to create the commit message What I…
-
0
votes3
answers116
viewsA: How to return the value of a file outside its scope
It would look something like: const suaFuncao = async () => { const response = await axios.get("url_sua_api"); const { data } = response.data return data; }…
-
0
votes2
answers186
viewsA: preventDefault() does not work
Let’s go to a code I made: <div id="root"></div> const App = () => { function stopForm (event) { console.log('Chamou o stopForm'); event.preventDefault(); console.log('Acabou o…
-
1
votes2
answers708
viewsA: How can I catch error 401 when making a post using Reactjs Xios on a login screen?
I’ll post an example code but with the same idea of the code you made: Consider the function apiPost as the code below: const requestQueDaraSucesso = () => (…
-
2
votes1
answer4203
viewsQ: Laravel Validation Unique
I have a registration form, and in it there is information for popular two tables: User(User); Shipper(Sender). I created the Request Laravel to isolate the controller form validation rule. Cloquei…
-
7
votes1
answer128
viewsQ: How to integrate Jest and Flow
I know some people use the Jest together with the Flow, even more for being from Facebook, I’m with a project React, and I’m trying to do this integration, but Jest does not recognize the typing…
-
1
votes2
answers492
viewsA: I can’t access my Laravel 5 project from Vagrant and Nginx
After searching hard, he got the answer. This is a "problem" of Vagrant, which ends up being the owner of all folders, thus modifying some permissions. What’s right for running PHP is that www-data…
-
0
votes2
answers492
viewsQ: I can’t access my Laravel 5 project from Vagrant and Nginx
I’m creating a development environment using the Vagrant with the following dependencies: PHP7; Postgresql 9.3; Nginx 1.9; Git. The problem is that when accessing the url http://advodocs.local.com/…
-
0
votes3
answers83
viewsA: Why has the context changed?
Now I understand, and I’ll explain what happened with a new case. var Model = function() { this.teste = 1; this.firstFunction = function (url) { this.secondFunction(); this.thirdFunction(); }…
javascriptanswered Allan Ramos 2,488 -
3
votes3
answers83
viewsQ: Why has the context changed?
I’m doing my Javascript studies, and I’m doing some pretty simple to consume an API, but I got an error. Before I comment on it, I’ll show you my code: View js. var model = new Model(); var response…
javascriptasked Allan Ramos 2,488 -
1
votes6
answers4503
viewsA: If null, Nan, false and Undefined in Javascript
Explanation As reported in the video of Rodrigo Branas (here), Javascript identifies as false some cases, being they: 0; Nan; ""(empty string); false; null; Undefined. That is, if I just wanted to…
javascriptanswered Allan Ramos 2,488 -
10
votes6
answers4503
viewsQ: If null, Nan, false and Undefined in Javascript
I want to know how to make one if to verify any of these possible states.
javascriptasked Allan Ramos 2,488 -
3
votes2
answers3180
viewsQ: What’s the difference and when to use Flexbox or CSS Grid?
First we had the Flexbox as a new solution for building and responsive layouts. More precisely on the part of grids. Now there is little time the CSS Grid. My question is: What is the difference…
-
-2
votes2
answers164
viewsQ: Create dynamic form with tags
Before you read the description below, know that I’m looking for a direction, not for you to code for me. Library references that might help me, some technique I need to know. What I need to do To…
-
1
votes0
answers264
viewsQ: Intellij JSF - Page opens in white
What I did I created a project Maven and added the module of JSF, however, even with the library downloaded. What’s going on When I run my project using the Tomcat, the page olamundo.xhtml comes…
-
0
votes1
answer151
viewsA: Gulp Task - Compile Stylus for CSS
The resolution was super simple. I forgot to stick to one detail: how are declared variables in Stylus. Like I did $myVar : #fff How do $myVar = #fff or myVar = #fff…
-
3
votes1
answer151
viewsQ: Gulp Task - Compile Stylus for CSS
After a lot of fighting, I started making the page of my portfolio. I took the opportunity to use a few things I was learning, among them the Gulp and Stylus. For the construction of CSS I am using…
-
1
votes1
answer1932
viewsQ: Error 502: Bad Gateway - How to resolve
What’s going on Starting yesterday morning, in a certain part of the site, in the user register to be more exact, many times when trying to perform it, Nginx returns the message of 502 - Bad…
-
0
votes0
answers34
viewsQ: Jekyll: How to import and use Javascript fonts
Good morning guys ! How do I import an Assets/fonts folder into my project, and then import it into CSS? The point is to import the CSS, and yes how to do this import using Jekyll, so when I…
jekyllasked Allan Ramos 2,488 -
0
votes0
answers636
viewsQ: Database Modeling - Self Relationship
My Case I have a table empresa, this table has fields known as cnpj, razão social and login. This same company may register another in its catalogue of companies. The company registered by it will…
-
2
votes1
answer86
viewsQ: Session in Forms
What I did I have a view that calls a template with a form. In a given case, I need to save some data in the session scope and send it to another url - which will call another view and another…
-
4
votes2
answers195
viewsA: Clear Input When Choosing Another Option
The reply from @Emirmarques is correct. I just added the part of Mask again in my code. Because even cleaning, when you click on the field it comes back with the previous value. With this definition…
-
5
votes2
answers195
viewsQ: Clear Input When Choosing Another Option
What I wish to do The guy has in the form the option of registering natural or legal person. I want that when he clicks on the radio of the individual, he cleans the legal person input, and vice…
-
2
votes2
answers1231
viewsQ: Change variable value in Ajax
The Problem I have the variable flagExistenciaArquivo, and I need it updated if the file exists or not. I call the function verificaExistenciaArquivo within another function, setting as parameter a…
-
0
votes1
answer5034
viewsQ: Check if file exists using Javascript or jQuery
How can I check using Javascript or jQuery that a file exists ? OBS: I opened the question and already answered.
-
1
votes1
answer5034
viewsA: Check if file exists using Javascript or jQuery
Below are the means I found. Javascript function verificaUrl(url) { var http = new XMLHttpRequest(); http.open('HEAD', url, false); http.send(); return http.status != 404; } jQuery $.ajax({…
-
3
votes3
answers2951
viewsQ: json_encode returns nothing
What am I doing I’m pulling data through PHP with a list of cities to create a chart with Javascript, and I realized that it was not returning the data, so I downloaded the file that takes the data…
-
1
votes1
answer253
viewsQ: PDO - Class Not Found
What’s going on I created a static method to return the connection so I can use it on DAO, but in doing so it gives Class Not Found PDO. Other Projects The first thing a lot of people will think is,…
-
5
votes1
answer980
viewsQ: Update fields with Javascript
The problem I’m making a requisition Ajax to return some data from a table. He arrives and enters this function to start the foreach of the information, but two of them are getting "lost" on the…
-
4
votes2
answers9312
viewsA: Include PHP Menu
The problem is that it is interpreting the HTML tags as part of the PHP syntax, since you have put everything inside the <?php ?>. To show an HTML content in PHP you have 2 alternatives, they…
-
1
votes1
answer2309
viewsQ: Laravel - The requested URL was not found on this server
What I did I made a form that registers the data in the database. Locally it worked perfectly. Problem It simply says it is not finding the URL. It is strange, because the error below says that the…
-
8
votes1
answer15493
viewsQ: Laravel 5 - Remove public from URL
I developed a form and need to "throw it" in production server. I have no server access (Linux, Slackware). I access my application from the url…
-
1
votes1
answer1862
viewsA: Laravel - Blank canvas
I don’t have direct access to the server, but I’ve been briefed on the procedure required for operation. When accessing the webserver files, Apache uses its own login, this login was not included in…
-
1
votes1
answer1862
viewsQ: Laravel - Blank canvas
What I need I want to check if a blank Laravel project is working properly on the development server, IE, I just want to see if at least it loads the view, and then I’ll do some tests. What I did I…
-
0
votes2
answers599
viewsA: Laravel - FPDF error: Undefined font
First: the method of getPath was being called but the define was not getting the full path of the folder. His dirname was not working, so I switched to app_path().'/Libraries/FPDF/font/', and at the…
-
65
votes1
answer29599
viewsA: What is MVC (Model, View, Controller)?
MVC is nothing more than a standard software architecture, separating your applying in 3 layers. To layer of user interaction(view), the layer of data manipulation (model) and the layer of…
mvcanswered Allan Ramos 2,488 -
46
votes1
answer29599
viewsQ: What is MVC (Model, View, Controller)?
After all, how does this architecture pattern work by following the model, view and controller layers ?
mvcasked Allan Ramos 2,488 -
8
votes1
answer660
viewsQ: Difference between Library and Helper
What differentiates the helper of a library? For example: let’s say I have a class for URL manipulation. I call it and it completes the URL with the site path. That would be a helper?…
-
1
votes2
answers599
viewsQ: Laravel - FPDF error: Undefined font
What am I doing I’m rewriting a small barcode generation system using Laravel. What went wrong I’m instantiating the classes normally, but when I use the method…
-
0
votes2
answers57
viewsA: Use @import in Less by passing variable as parameter
Yes, it is possible. First of all, I think it would be nice if you put a default value for this parameter. An example of this application: .margin(@top: 4px; @left: 4px; @bottom: 4px; @right: 4px;)…
lessanswered Allan Ramos 2,488 -
0
votes2
answers1208
viewsQ: Import library to Laravel 5
What I need I need to import the modified FPDF library to the project. What I did Code is below, but I created a folder "Libraries" inside "App" and put the library there (with the name FPDF.php),…
-
4
votes1
answer541
viewsQ: Using ajax serialize in Laravel
What I need When the user clicks on the submit button the ajax will call a method of a class to check if the typed text already exists and in a table. It returns the result, if it is false it lets…
-
1
votes2
answers238
viewsA: Form construction
The old Laravel HTML project is now maintained by the group Laravel Collective. I updated some items, starting with Composer.json. "require": { "laravelcollective/html": "~5.0" } After executing…
-
3
votes2
answers238
viewsQ: Form construction
After several months without using Laravel, I now return with this version 5. It may sound silly, but I’m having trouble creating a simple form. Apparently Illumiante/html is not coming by default…
-
5
votes3
answers141
viewsQ: Photo on the web with Windows 8.1 tablet
What I need I want to make a page where the user can click a button, take a picture with the camera of tablet, view it and click on button to save it. What I’ve already tried I have tried to use the…
-
2
votes1
answer6053
viewsQ: Creating Points in Google Maps with PHP Data
What I need I need that through PHP I receive locations and can mark them as points in Google Maps. What I did I created a part in Ajax to call the PHP script that does the query and returns the…
-
8
votes1
answer5235
viewsQ: When to use input type="button" or input type="Submit"
I have a simple question facing the semantic part. The button I can modify your actions using the Javascript. When I should wear it or trade it for submit ? <input type="button"> e <input…
htmlasked Allan Ramos 2,488 -
1
votes1
answer254
viewsA: Stop Form Action with Ajax
I switched the submit for button, thus being able to better control the action of sending the form. This was done just change the event for when click the button. <input type="button"…
-
1
votes1
answer254
viewsQ: Stop Form Action with Ajax
What I desire I add fields dynamically stating how many lines I want to add. I wish that as soon as the user clicks to submit the form, I do a check using Ajax to see if any of the informed data…