Posts by osmarcf • 337 points
12 posts
-
3
votes1
answer450
viewsA: How to send multiple folders using SSH (SCP)
By setting the SCP, you need to specify the source path (OK) and the destination path (NOT OK). See man page scp scp ... [user@]host1:]file1 ... [user@]host2:]file2 The other parameters you…
-
1
votes1
answer468
viewsA: What does it mean to say that an expression is short-circuited?
Short circuit evaluation is something implemented by compilers/interpreters to save resources and speed up condition assessment. In a compound conditional test, whether the first condition can…
-
2
votes2
answers4924
viewsA: How do I use HTML or CSS in Android Studio?
To use CSS in an Android application, you must have your entire application within a Webview, that is, you cannot make the XML defined components of an Activity take the style of a CSS. The style…
-
2
votes4
answers2433
viewsA: Count the number of times a character appears in a string
In shell script (bash) one of the alternatives may be: echo "/1/2/3/4" | grep -o '/' | wc -l For your case: v_dir_relatorio=`echo "$CAMINHO" | grep -o '/' | wc -l` I found other valid answers on:…
-
0
votes2
answers420
viewsA: Store New Value by Updating Old Value
In your code, you make no mention of the table releases, ie you are not registering the releases that will result in the balance of the table accounts. In addition to updating the balance in the…
-
0
votes1
answer137
viewsA: Analog to Arduino digital value conversion
Trying to clarify some concepts about the first if: When talking about digital, one has in mind only the values 0 and 1 logical, ie: booleans false and true. Therefore, a digital reading has a value…
-
2
votes1
answer275
viewsA: Mysql query with last 30 day results showing totals per day
By grouping by data_abertura (which must be a Datetime), it compares the full value of Datetime (day, month, year, hour, minute, second, era, Timezone, etc). In this case the most interesting is to…
-
0
votes1
answer848
viewsA: increase Curl response speed?
Some more options of timeout before the curl_exec: curl_setopt($this -> curl, CURLOPT_CONNECTTIMEOUT, 1); // espera 1 segundo para conectar curl_setopt($this -> curl, CURLOPT_TIMEOUT, 10); //…
-
1
votes1
answer111
viewsA: Sum values in vector and return the value in true condition
To solve the problem of the value of each letter, one must change the arrays [3, 2, 1], [2, 3, 1] and [1, 2, 3] for [4, 2, 0], [2, 4, 0] and [0, 2, 4] (respectively and in the 3 questions). The…
-
2
votes1
answer111
viewsA: What better way to resolve the slowness of reporting?
The 3 queries are practically repeated (one to pick up the conformers, one handle the non-conforming and one handle the total). Count() is an operation that by default costs the bank because it has…
-
1
votes1
answer270
viewsA: Problem with select UNION ALL mysql
I recommend updating the editor. This syntax is valid and you said it works if you run it in Phpmyadmin. I also suggest trying to run directly through the Mysql client. It may be that the editor you…
-
0
votes3
answers121
viewsA: Associate input values to the nearest plan with jquery
Just scan the list item by item and as soon as "pass", the valid value is the last. For what you mentioned in the example, the input range is only a value. (But input range implies that it will be a…