Posts by zwitterion • 2,876 points
171 posts
-
2
votes2
answers833
viewsA: Show use of Processor
First check where the wmic executable is. Go to windows cmd and write where wmic. In my case I received this reply: C:\Windows\System32\wbem\WMIC.exe Then replace your path, if different from mine,…
-
2
votes3
answers5277
viewsA: What does "Dim" mean in Basic?
Translated into Portuguese would be an instruction, imperative action of the verb dimensionar. It would be something like: dimensione, DIM.
-
1
votes1
answer153
viewsQ: Magento with Ubuntu 16.04 + Nginx+Mariadb+php7. Does not load the page
I have the following environment: Ubuntu16.04 + Nginx + Mariadb + Php7. I downloaded Magento through Composer: composer create-project magento/community-edition magento2 -s dev --prefer-dist Then I…
-
3
votes0
answers418
viewsQ: What database structure should I use for a process (business Rules) that is dynamic?
When we are developing software we always come across this question: "Is software forged by processes or are processes forged by Sofwtare? Or both?" Case Study - I work at a company where business…
-
3
votes0
answers189
viewsQ: How to clone a git repository (BARE) from a Windows7 folder to UBUNTU16.04?
My host system is Windows7 and I have a guest system in virtualbox, Ubuntu 16.04. I shared a folder on Win7 (sf_AA_SHARE_FOLDER) into linux and into it I have another folder called CHM_FINAL_BARE…
-
0
votes1
answer235
viewsQ: How to access a project route (URL) written in Laravel from another project (URL) that does not use Laravel?
Let’s say I have myApp1.com and myApp2.com, and that only the second project is written in Laravel. My question is: Taking into account that myApp2.com has login authentication, it would be possible…
-
0
votes1
answer4306
viewsQ: Laravel 5 - Tokenmismatchexception in Verifycsrftoken.php line 67. How to solve this without using the FORM class?
I have a php/Html project and I’m passing it to Laravel. Which means a lot of stuff I won’t create from scratch and I want to make the most of what’s already written. At the moment I am working with…
-
0
votes1
answer166
viewsQ: Laravel 5 - database table for array with predefined index
Is there any way to retrieve the results of a query in the database and transfer it to a Array with one of the table fields being index of Array? You could achieve this result in two steps. After…
-
1
votes1
answer727
viewsQ: What is the memory limit of php 7?
I read somewhere (and now I’m not finding where) that in php version 7 there is no memory lilmite. That is, the memory that can be allocated would be the machine’s RAM. Does it proceed? Has anyone…
-
1
votes1
answer1965
viewsA: Netbeans is identifying as bugs aguns files from Laravel. How to resolve this?
I found the answer. I will post in photos to be well explained. Check the unresolved problem message and the red color of the project name: Right click and choose "Resolver Problemas do Projeto": It…
-
0
votes1
answer1965
viewsQ: Netbeans is identifying as bugs aguns files from Laravel. How to resolve this?
I just installed a version of Laravel 5 and opened the project in Netbeans IDE 8.1. I am running with PHP7. As you can see in the photo, there are several errors in different folders. Even the…
-
2
votes1
answer1056
viewsA: Is it possible to access multiple databases in the same project of Laravel 5?
I found the solution. I will post here, in case of interest to the staff. Open the file .env and delete the lines below: DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=br_bancodd…
-
1
votes1
answer1056
viewsQ: Is it possible to access multiple databases in the same project of Laravel 5?
The scenario is this: I have a website that can be accessed by 5 different countries -> br.meusite.com, us.meusite.com, fr.meusite.com, ... . All Urls direct to the same folder within the server…
-
1
votes1
answer766
viewsA: How to configure the host file to direct to the server of a "virtual box" virtual machine?
I made it, and it was simpler than I thought. I’ll share the steps in case anyone needs: Set the virtual machine network card to "bridge" Open the virtual machine and check the ip. or you can choose…
-
0
votes3
answers1080
viewsA: One process at a time PHP
A while ago I had to interact php with a pipeline written in bash with many steps and that called many python and R functions sequentially. So I thought of the whole process as sub-processes where…
-
-1
votes2
answers7222
viewsQ: How to pass a variable to Blade?
I have the following scenario: Some types of user may have access to the site, say USERTYP1, USERTYP2 or USERTYP3. My application menu changes according to user type. I have a master template…
-
1
votes1
answer766
viewsQ: How to configure the host file to direct to the server of a "virtual box" virtual machine?
I have a virtual machine windows 7 using virtual box. Inside this machine I have a study project. Inside this machine I access this project through the url "lara/", configured in Routes. I would…
-
0
votes2
answers4889
viewsQ: Laravel - How to recover the values of a form and redirect using the Route class?
I am studying Laravel and at the moment I am trying to understand how to send values of forms to be recovered and then redirect to a specific page. I’m still starting with Laravel and I don’t even…
-
4
votes1
answer9659
viewsQ: 502 Bad Gateway - Linux, php7, Nginx. How to resolve this error?
I am having a 502 error that represents some configuration on the server, when I try to open a site using linux, Nginx and php7. Researching some other POSTS, link about the same error I see that…
-
2
votes1
answer91
viewsQ: Installing Mysql on linux programmatically. How to set the password?
I am creating a sh file to start a Linux programming environment to automate this boot process. I usually only run the following command lines and during the Mysql installation process I have to…
-
2
votes1
answer5339
viewsQ: PHP - How to configure . env from Laravel to access different databases and different languages?
I am working on a system (portal) that offers service to 19 countries. For each country there is a database and each country with its language dictionary (even countries with the same language, have…
-
3
votes1
answer567
viewsQ: Composer with XDEBUG - PHP
I have XDEBUG installed in my PHP. In this scenario, when doing a Composer installation I get an error message about Runtime performance, according to the photo below: My question is, what is the…
-
0
votes0
answers5155
viewsQ: How to create a link to view files on the server?
I have a folder called userFiles at my root. When the admin opens the screen it sees a list containing the user name and a column with the link to view the file that that user previously uploaded.…
-
1
votes1
answer658
viewsA: Datepicker Do not select certain dates
Try to recycle that code. I hope it helps: //Validar datas: //Quando abre o datapicker seleciona a menor data para ser o dia de hoje now(). var now = new Date(), minDateJS =…
-
0
votes1
answer71
viewsA: Can I create a new session with the tag form?
I don’t quite understand your ultimate goal, but regarding $_SESSION, there is only one for each SESSION. What happens is that you can destroy it unset ($_SESSION) and reboot again with other…
phpanswered zwitterion 2,876 -
1
votes2
answers1706
viewsA: How to exchange the checkbox value with jquery
Use $(this) to make things easier and exchange id for classes as a selector. $(".chkcl").change(function(){ var atual = $(this).val(); alert(atual); var troca = 2; $(this).val(troca); // quando eu…
-
2
votes1
answer1004
viewsA: REGEX - extract some text in a string
If the goal is just to select this piece you could go straight to the point: /o cara da pamonha bateu com o carro/ Or you can use this pattern: /o cara(.*)no carro/ See the example. UPDATE So if you…
-
0
votes1
answer575
viewsA: Calculate percentage in dynamic field
"will be 3 inputs with the same ID" I don’t know how your code is, but just to show you that you can recover everything from the other side of php - even with elements of the same id. I suggest you…
-
2
votes5
answers1956
viewsA: Difference between JSON and String data
" ... I want to know the best way to carry this data: ..." It was not very clear to me if your question is to send something to the server or if it is to get back from the server ("Sending Ajax to…
-
0
votes5
answers1479
viewsA: Input javascript text only
"I want it to be possible to type only from 'A to Z' minute"... If you only want lowercase characters and nothing else, it would be better to use REGEX with javascript. Try this solution: //HTML…
javascriptanswered zwitterion 2,876 -
1
votes3
answers1864
viewsA: Check if a date is earlier than another date
"make a check before sending to the bank that does not allow the first date to be greater than the second" You can do it two different ways: Back end - php Front end - javascript I usually use…
-
3
votes2
answers265
viewsA: What is the procedure for debugging a "runstack", Javascript or Php via the Aptana browser or IDE?
For javascript use the Chrome debugger. Just press F12 and he will appear. Go on the option console and make your debauchery. For PHP it’s not that simple but it’s easy. First of all I wanted to…
-
0
votes2
answers1919
viewsA: Google Maps with multiple markers coming from the database
Here’s another solution using Google maps and Bootstrap + PHP + Mysql. Adapt to your code: <!DOCTYPE html> <html lang="en"><head><meta http-equiv="Content-Type"…
-
1
votes2
answers4580
viewsQ: PHP - How to compare a date that comes from the Mysql database to the current day?
I have a column in the database which is in format DATE (Y-m-d). In php code I recover this string and have to compare with the current date and this is the condition I am using:…
-
8
votes1
answer1481
viewsQ: What are "generated columns" in Mysql and what would your applications be?
I downloaded the new version of Mysql Workbench and when I was creating a table I noticed a new property of the field that is called Generated Column. On the Mysql website it says that this is a new…
-
1
votes2
answers8428
viewsA: Pass id of a table data to modal?
The logic is simple, recover the registration ID and pass to your modal using set Attributes - attr() of jquery. Here in this example I weighed the id value for the modal class attribute. To save…
-
2
votes1
answer1187
viewsQ: How to insert HTML elements into a Tooltip Bootsrap?
I have a code that generates a tooltip with a small message and makes disappear after 2.5s. var msg ="Oops! Essa é uma mensagem pequena"; $('#addItInfo').attr('data-original-title',msg);…
-
4
votes2
answers4608
viewsQ: SQL - How to select or delete a column with value equal to null in a query select
I have a table in a Mysql comic that has 5 fields. This would be a model query: select * from myTable where campo1= 4 and campo2=1 and campo3 =7. However field 3 may have null value and I would need…
-
0
votes1
answer116
viewsA: Regex - price validation for Mysql decimal(12,2)
Okay, here’s the pattern sought. I’ll buy it for whoever’s interested. ^(?!\.$)\d{0,10}(?:\.(?:\d\d?)?)?$ https://regex101.com/r/yX1kF6/4 And here is the full function to validate this type of…
regexanswered zwitterion 2,876 -
0
votes1
answer116
viewsQ: Regex - price validation for Mysql decimal(12,2)
I have a passion where there’s a field price which will be completed by the user. The goal is to accept some entries and block others (validation). The value will be stored in a Mysql database, in a…
regexasked zwitterion 2,876 -
22
votes4
answers2243
viewsA: How do I implement wind in a trajectory equation?
It depends on the direction (or position) of the point that generates the wind. See in this example.I made a circle with uniform rectilinear motion and a wind source in a central region of the…
-
2
votes1
answer759
viewsA: Linux - Error installing Guest Additions from Virtual Box on Ubuntu 16.04 LTS on Windows 7
Although it seems to be an off-topic question, the answer may be useful because even in super user, we did not find it. Just run that line of code: sudo apt-get install virtualbox-guest-dkms //Yes…
-
-1
votes1
answer759
viewsQ: Linux - Error installing Guest Additions from Virtual Box on Ubuntu 16.04 LTS on Windows 7
I just installed the new version of Ubuntu - 16.04 LTS in a virtual machine - Virtual Box. My operating system is Windows 7, 64bits, Lenovo. I tried to install Guest Additions through the Menu…
-
5
votes4
answers2166
viewsA: How to know the number of lines a large file has in php?
The two methods ( fgets() and file()) use loop to read the file (which is inevitable). Either implicitly or explicitly there will be a loop going through all lines of the file. But you just want to…
-
0
votes2
answers718
viewsA: How to open a file using php?
Use this: $myfile = fopen("meu_arquivo.txt", "r") or die("Impossivel abrir o arquivo!"); // Mostra no browser cada linha do arquivo while(!feof($myfile)) { echo fgets($myfile) . "<br>"; }…
-
0
votes2
answers412
viewsA: graphic with data from a REST service
It is very simple, after you recover your data in a JSON, you can send it to javascript D3. It can be using AJAX or not. Here the library link D3. Note, on D3 the codes are already ready, just copy…
-
3
votes2
answers17826
viewsA: How to select in date format?
Try it like this: First make a select to check whether the format is date or datetime. Then use your parameters this way - //Use o seu formato de data SELECT * FROM NOME_TABELA WHERE DATA_FISCAL…
-
0
votes2
answers212
viewsA: Help with json and adodb in PHP
I suggest you go through two independent trials. So you’ll know where the mistake is. Create your array, regardless of how you connect to the database. Turn your array into JSON. After making your…
-
1
votes2
answers568
viewsA: Tooltip CSS Transition
If you don’t want to start from scratch, I suggest you use the Boostrap CSS. You just need to add this CSS to your page: .tooltip { position: absolute; z-index: 1070; display: block; font-family:…
-
0
votes2
answers795
viewsA: Listing in PHP by clicking button and showing more results that don’t keep CSS?
Are you using Bootstrap? Review how you are organizing your objects. This is the way in documentation: <div class="row"> <div class="xxx-xx-#">Conteúdo da sua divisão 1</div>…