Posts by Victor M. • 597 points
48 posts
-
6
votes2
answers120
viewsQ: Approximation mysql filter
I came across some cases where users reported me not in the database, certain clients, I noticed that it is common to abbreviate the middle names or the absence of them, for example: Name: João…
-
1
votes1
answer41
viewsQ: Problem in array ordering with numerical values in VUE?
I have the code below that I am using to sort an array, in field with the format String is working normally, as I must to sort numeric field? list_cob_frequencia() { var campo = 'nome_campo'; var…
-
1
votes1
answer48
viewsQ: Pass field for array sorting in VUE
I am trying to pass the name of the field where I want the array to be ordered, when I put the name directly works, passing the name through the variable no, I commented the lines the way it is not…
-
2
votes3
answers480
viewsQ: Pick the date range separately by weeks of the current month
I need to take the day that starts and ends each week of the current month: 1 - 2019-10-01 to 2019-10-04 2 - 2019-10-07 to 2019-10-11 $today_date = date("Y-m-d"); $currentWeek =…
-
1
votes1
answer24
viewsQ: MYSQL grouped query
I have a table where the fields are: cod_patient cod_pathology leading a patient may have more than one pathology, but one must be defined as principal, need to filter which patients have no items…
-
1
votes1
answer335
viewsQ: Filter array value in VUE
I have the following array, which is a menu, I entered a search field at the beginning and would like that filtered case to show only items that contain certain text. <script> this.vue = new…
-
1
votes1
answer127
viewsQ: Grab the width of an image in VUE/JS
this code below when selecting an image generates a preview, i can for example grab the image type, but I can’t get the width, there is some way to get the width and height of the file? <input…
-
0
votes1
answer140
viewsQ: Calling VUE function through another Iframe
I made a form where an action is executed in iframe, i need somehow, this file I’m opening in iframe call my function in VUE, I’m posting my code below. new Vue({ el:"#app", data : { teste : '', },…
-
1
votes2
answers522
viewsQ: Doubt preg_match PHP
I need to make a preg_match to check whether a string meets the following conditions: Start with a letter: a-z; Contain only letters, number and characters ,, ., - and _; Current code:…
-
0
votes2
answers26
viewsA: How to organize DB information printed on the page
You can do it like this: if(isset($_GET['acao']) && $_GET['acao'] == 'excluir'){ $deletar = mysqli_query($conn,"delete from contas where email like '" . $_GET['email'] . "'"); } $html =…
-
0
votes1
answer185
viewsQ: Turn multidimensional array into one-dimensional VUE
People I need to transform a multidimensional array into a one-dimensional array, because I need to recover an array only with the "Cod" fields of this array, tended as below without success. new…
javascriptasked Victor M. 597 -
1
votes3
answers1300
viewsQ: How to remove item from an array by filtering by value?
I have a certain array: acoes_selecionadas: ['nome1', 'nome2']; I’m using that function, but splice works based on element ID, need to find a way to remove by value. seta_vender: function() {…
-
-1
votes1
answer27
viewsQ: Change the value of a VUE array by filtering by another parameter
I have the following array in VUE: acoes : [ { name: 'Quero Vender', id:'quero-vender', active: false }, { name: 'Quero Comprar', id:'quero-comprar', active: true }, ] , I am passing the array id…
javascriptasked Victor M. 597 -
6
votes2
answers438
viewsQ: Conditional VUE array count
I need to find out how many records of the array below has the active field as true, how can I do? [ { "name": "Quero Vender", "active": false }, { "name": "Quero Comprar","active": false } ]…
javascriptasked Victor M. 597 -
0
votes1
answer143
viewsQ: VUE Moment.js does not update the date in real time
I am starting the use of the Moments library of VUE.JS, I have a message area on my site and I need the date to be shown as: "Posted 5 minutes ago", I was able to show the date with the code below,…
-
0
votes1
answer238
viewsQ: Mysql Re-using subquery result
in mysql there is a way where I can re-use the result of a subquery within the main query? select (select resultado from tabela limit 1) as resultado_subquery, (resultado_subquery * outra_coluna) as…
-
0
votes1
answer86
viewsQ: VUE: With recovering an array variable filtering by value
Good afternoon, I need to recover the variable name of this object array, when I filter by id, when I type for example the id 1, return "Solid" full_category_list: [ { id: 1, name: 'Sólido', parent…
-
1
votes1
answer423
viewsQ: VUE v-for value filter
I have the following object array below. I need to list in a v-for only records where the variable parent be equal to 4, and I’m not getting it. Code: this.full_category_list = [ { id: 1, name:…
-
0
votes1
answer26
viewsA: pull registry and filter from mysql pro php
what I noticed is that it is passing in the index of the array, and it is starting with 9, the array starts with index 0, in which case it would also be simpler to use a foreach. for ($sala=0;…
-
0
votes1
answer397
viewsQ: Pass array via post in Vue.js
I need to pass one array via POST, I tried it this way: const params = new URLSearchParams(); params.append('pagamentos', this.variavel_array); axios.post('grava_pedido_pdv.php', params); The…
-
0
votes1
answer53
viewsQ: Return function value executed by Keyup in the VUE source field
How do I get the return value of this function into the field where you are running Keyup? <input type="text" v-model="valor_calc_dinheiro"…
-
1
votes1
answer580
viewsQ: Do v-for only with number
It is possible to make a v-for using only a total number? Example: I would pass a variable with value 10, it would loop from 1 to 10, like the JS example below: for(var i = 1; i <= num_parcelas;…
-
0
votes1
answer26
viewsA: How to recover my Adm access in Wordpress?
What error does it return? you can enable WP_DEBUG in the wp-config.php file to view the error, also check the file . htaccess
-
-1
votes2
answers52
viewsA: SQL Join
Your question is a bit confused, post as the structure of the two tables. and which fields you want to show. the structure of the Inner Join would be something like this: select * from funcionarios…
-
1
votes1
answer669
viewsA: Customize Woocommerce Registration!
You can use this code in the funcions of your Theme or plugin, you can add the fields you need: add_action( 'woocommerce_edit_account_form', 'add_marketplace_fields_to_edit_account_form',1,1);…
-
2
votes2
answers724
viewsQ: Position the zip code field at the Woocommerce checkout
I need to position the zip code field before the address because I will load the address using the post office api, I can position the other fields, but the "billing_postcode" does not obey the…
-
0
votes4
answers916
viewsA: Take the selected data in a v-select Multiple
I don’t know if this is the best way, but I was able to solve this problem by transforming the element into a simple array: new Vue({ el:"#app", data : { criterios : '', criterios_list:…
-
0
votes4
answers916
viewsQ: Take the selected data in a v-select Multiple
I am needing to return in a v-select Multiple only the values selected in an array, I am trying for some time without success, it returns the full object and as I am using in a form I have been…
-
2
votes1
answer509
viewsQ: Transform Vue array into Json
I’m trying to pass on a textarea an array of Vue.js, and would like to turn it into json, what would be the best way to do that? new Vue({ el:"#app", data : { nome_da_variavel_array: '[{variavel :…
-
0
votes1
answer14
viewsQ: How to call a plugin action by cronjobs
I am needing to run a hook that I developed within a plugin in 3 hours intervals, I wish I could call this command in an external file so add in the server cron.
-
1
votes1
answer609
viewsQ: Select rows from a table with arrow keys
I am trying to develop a code to be able to navigate between the lines of an html table using the navigation arrows. what would be the best way? I need the selected line to stay with a different…
-
3
votes1
answer749
viewsQ: Regular expression that accepts letters, numbers and underline
How do I make the ER below accept letters, numbers and underline, and continue not allowing the other characters? preg_match('/[^a-z\d]/', $_POST['login'])
-
1
votes1
answer133
viewsQ: How to pass variable to PHP file in Shell Script
how can I pass a variable to a php file in a shell script, I’m trying to do this way below, without success. php -f complete.php?login=$1
-
0
votes0
answers41
viewsQ: Linux Copy file giving replace in content
how could it be done for me to copy a php file via shell script, but replace the contents of a variable? Example: cat config-sample.php > config.php <?php…
-
0
votes2
answers230
viewsA: Using MKDIR via shell script
After several attempts I discovered that the problem was due to I created the script in windows, because it puts a line breaking character different from the one accepted in linux.
-
-1
votes2
answers230
viewsQ: Using MKDIR via shell script
I am trying to create a directory via shell script, using the command: mkdir -m755 "/var/www/app.dominio.com/html/$1" where the folder name is passed by parameter, you are getting a question mark…
-
0
votes1
answer414
viewsQ: Mysql commands in Shell Script
I am trying to make a routine to deploy an application, and I came across a problem in shell script, the mysql commands I can’t run inside it, but at the prompt work, which should be done? mysql -u…
-
1
votes1
answer359
viewsQ: Add PHP Extensions to Docker Compose
what would be the best way to add PHP extensions such as the GD library and more directly into Docker-Compose.yml? My file is as below: nginx: image: tutum/nginx ports: - "80:80" links: - phpfpm…
-
0
votes2
answers273
viewsA: Error Calculation in Javascript
The way it worked for what I needed was this: function numberFormatPrecision(number, format) { var number = number.toFixed(3); return number.substring(0, number.length - 1); }…
-
0
votes2
answers273
viewsQ: Error Calculation in Javascript
in a calculation done in Java I am having the following problem, I have tried to solve several ways without success, I need to do a simple mathematical operation and in javascript gives a difference…
-
0
votes1
answer175
viewsQ: How can I call a php file inside a wordpress plugin
How can I create a file within a wordpress plugin to receive parameters passed via front post? the file would need to use the wp_db function.
-
0
votes1
answer105
viewsQ: Mysql Left Outer Join show only first result
I need to make this sales chart Join with the Nfe table, however the NFE table may have more than one result which causes change in total sales, how can I change this Join so that only take the last…
-
0
votes0
answers53
viewsQ: Passing VUE Websockets variables
When I pass a variable this way in Vue, how do I recover it in PHP file? self.ws = new WebSocket('ws://localhost:9000?variavel=22'); $_GET ?
-
2
votes1
answer577
viewsQ: Query mysql with subquery Join
I need to create a query that I can filter the sales that have issued notes, in my structure there are 2 tables: the sales table and the table nfe. Both are related by the field cod_venda. How can I…
-
2
votes0
answers20
viewsQ: Prevent grouping of PHP Sessions
I have a PHP system that uses Sessions to store items, I recently noticed that when the user simultaneously opens 2 tabs of the browser upon completing the request the system groups or understands…
-
1
votes0
answers347
viewsQ: MYSQL - Detect sequential break with conditional
Hello I need help to make a query or process to detect gaps in a numerical field, I have a table of tax notes, which has a field num_nfe, it must follow a sequence, there can be no gaps in the…
-
0
votes0
answers68
viewsQ: Very slow recording after adding Trigger in MYSQL Insertion
When I insert this Rigger into my database it is taking a slow time, getting to give this message: Errormessage: Lock Wait timeout exceeded; Try restarting transaction My Trigger is as below, the…
-
1
votes0
answers49
viewsQ: Mysql Procedure query error
Because only the stmt2 doesn’t work? DELIMITER $$ CREATE PROCEDURE abc_produtos_total_geral( OUT v_total_geral decimal(14,2), IN v_dt_inicial date, IN v_dt_final date, IN v_table_name varchar(40),…