Posts by Mauro Rocha • 114 points
16 posts
-
0
votes2
answers326
viewsA: PHP indentation in HTML
I understand you It’s frustrating to see our code all messed up:D Need indentation in HTML output? You really don’t need. Makes a difference to the execution of the code? Dude if you care about…
-
0
votes1
answer117
viewsA: How to extract a word from a string (SQL Server)
Beyond the missing comma. To get the size of the text in a column of type text you need to use the function DATALENGTH(<nome_da_coluna_tipo_texto>) That’s why it’s important you share your…
-
1
votes1
answer15
viewsA: How to "Take" the value of the COMPOSER_PROCESS_TIMEOUT variable?
I’ll leave the solution here to help in case anyone needs it I was able to get the value using the command below: COMPOSER_PROCESS_TIMEOUT_VALUE=$(composer --global config process-timeout) And then…
-
0
votes1
answer15
viewsQ: How to "Take" the value of the COMPOSER_PROCESS_TIMEOUT variable?
I’m using a script bash to define the variable COMPOSER_PROCESS_TIMEOUT, but before I change the value of it I need to know what is the value that is defined. I took a good look on the internet and…
-
0
votes1
answer118
viewsQ: Is there any way to run the bash script in windows?
I have a BASH script that is used on LINUX and I need to run it on Windows 10. Is there any way to run correctly without error? directory_exist.sh #!/bin/bash echo "Informe o nome do Diretório" read…
bashasked Mauro Rocha 114 -
-1
votes2
answers243
viewsA: How to return id of a record I just entered using Laravel?
After saving, $data->id must be the last id inserted. $data->save(); $data->id; It can also be used in your case: $sales->sales_customer_id = $customer->id; But I take very carefully…
laravelanswered Mauro Rocha 114 -
1
votes2
answers72
viewsA: Why divide the potentiometer value by 4?
This division is only to limit the value passed, see below: val = analogRead(analogPin); // lê o pino de entrada analógica analogWrite(ledPin, val / 4); analogRead returns values from 0 to 1023…
arduinoanswered Mauro Rocha 114 -
2
votes2
answers398
viewsQ: How to use GIT to list the changed files in the branch
How to view the list of all the changed files in one branch without having to inform the commit X until commit Y. I was using the following command below to list the commit’s and get the Hash of…
gitasked Mauro Rocha 114 -
0
votes2
answers398
viewsA: How to use GIT to list the changed files in the branch
To list the files without having to inform the hash use: git log feature/FI/85683 --not master --name-status --pretty=format:"%x09" To display the list without repeating the name of the files use |…
gitanswered Mauro Rocha 114 -
0
votes2
answers69
viewsA: set Enum field to null in Procedure
Here’s an example of how to use and the code I developed here. -- Criando a procedure delimiter $$ CREATE PROCEDURE `insere_enum_null`( IN `id` INT(11) UNSIGNED, IN `situacao_nova`…
-
0
votes3
answers81
viewsA: Help with code reduction in If/Else
To remove all classes of an element using Javascript only use the code below. document.querySelector('button').onclick = function() { this.className = ''; } .primeira { border-color:red; } .segunda…
-
0
votes3
answers345
viewsA: Problem with jQuery addclass and Removeclass
I looked for the simplest and easiest way to make to change the class from one to the other. I developed a code with what you said you need and put in the jsFiddle Or test the example below that is…
-
0
votes1
answer35
viewsA: Optimize querie that returns the set of records of multiple tables
When you wear one COUNT() it goes through all the records within your query. So you first have to use the LIMIT in research with WHERE and then use the COUNT(), this way you will have the count of…
-
0
votes1
answer80
viewsA: Change Scrollbar via CSS in Chrome
Take a look at this one, it’s kind of like what you want. Use a little jquery for mobile scrolling and touch features but recommend that from a glance. Nanoscroller.js…
cssanswered Mauro Rocha 114 -
0
votes1
answer45
viewsA: problem HIDE and DISPLAY Jquery element (error)!
The best and simplest solution is to use Browser Sessions to save values at runtime. So if you want to keep the person option is also possible, otherwise you switch to the blank, or 'no' or 'yes'…
-
2
votes1
answer37
viewsA: Reversing the display order with nodejs
For example db.orders.find().sort( { amount: -1 } ) using the -1 the order is decreasing "down" { "_id" : 2, "item" : { "category" : "cookies", "type" : "chocolate chip" }, "amount" : 50 } { "_id" :…
node.jsanswered Mauro Rocha 114