Posts by David Vinicius • 618 points
32 posts
-
0
votes1
answer51
viewsA: How to replace Python Len in C
You can use a trick to calculate the size. If your vector is integer, you can use the following code snippet to calculate the size. int length = (int) sizeof(array)/sizeof(int);…
canswered David Vinicius 618 -
0
votes3
answers27
viewsA: INNER JOIN between two SELECT
One approach you can use is to use the operator UNION /* Select 1 */ (SELECT AVG (UR1_Demanda) as UR1_DemandaAVG, DATEPART(dayofyear, E3TimeStamp) as id FROM MTC_CF_MM WHERE UR1_Demanda <> 0…
-
0
votes2
answers145
viewsA: Problem with table data insertion via Aravel
Eloquent should not be identifying the primary key of the table. class ConcessionariaDelete extends Model { ... protected $primaryKey = "sua chave primária" ...
-
1
votes3
answers105
viewsA: Error on average of students
A possible solution is to convert the numerical type data into string, this way you can concatenate. print(" O Aluno de matricula "+str(matricula), " Foi APROVADO com a média: "+str(media))…
-
4
votes1
answer377
viewsQ: If possible, how can I work with integer values of 1 million digits or more in python?
I am running some experiments with primes and needed to process huge integer numbers, but when trying to process a small routine there is an error in the following line: Overflowerror: int Too large…
-
3
votes1
answer5001
viewsA: Apache2 does not interpret PHP
I had the same problem, I decided to install the apache php module, in my case I use Ubuntu just install this package libapache2-mod-php5 sudo apt-get install libapache2-mod-php5…
-
0
votes2
answers42
viewsA: how to show the result of an sql in different <Section> files?
You’ll have to have a loop nestled inside another, something like: foreach($departamentos as $departamento): $produtos = SQL ///SELECT * FROM PRODUTOS WHERE idDepartamento = $departamento->id //…
-
0
votes1
answer193
viewsA: Remove all lines starting with a specific character
You can use regular expressions to solve this problem. In my regex pattern I am looking for lines that start with "/" followed by another / . Finally I deny the lines that match this pattern.…
phpanswered David Vinicius 618 -
0
votes2
answers1363
viewsQ: How to change the version of Cordova in Ionic?
I need to change the Cordova version of an Ionic project I’m testing, is that possible? If so, how can I do that? I currently have this version: But I would like to switch to version 7.0 . Which npm…
-
1
votes1
answer316
viewsA: Sum in php does not work
This is a basic example with 2 fields based on your form, try to use as an example to do with others. <form action=""> <table> <th> <div class="input-field col s12">…
-
0
votes2
answers39
viewsA: Entering register in data group - error
You reversed the parameters of mysqli_query. The right thing would be mysqli_query($con,$cadastrar)
-
1
votes1
answer374
viewsA: Fill a field by selecting another field
I’ll try to give more or less the idea of what you can do. 1 - When selecting a client in your combobox create an ajax request for another page ex: getDescontoClient.php with the id of the selected…
-
0
votes1
answer445
viewsQ: How to get the runtime of a program with shell script?
I am creating a basic script in which I would like to take the runtime of a program each time it is called in the script. #!/bin/bash for i in {1..15} do echo "Execucao $i" time ./meu_programa >…
-
1
votes1
answer780
viewsQ: Pick up keystroke event with Vuejs
How can I catch a key event with Vue? I’ve seen some examples on the site like: <input @keyup.enter="submit"> But what I would like is some kind of Systener where if the user pressed a key…
vue.js-2asked David Vinicius 618 -
1
votes2
answers1856
viewsQ: Clear VUE v-model data at once
I have an instance of Vue in which I take values from a form to send by ajax, I would like to clean the data saved by the v-models at once after sending, this is possible? new Vue({ el: '#app',…
-
0
votes1
answer506
viewsQ: change data type ntext to text, SQL Server
I need to change the data type of a field that is in "ntext" to "text". The reason is that I’m having trouble pulling this value from the database and generating a PDF with the php DOMPDF component.…
-
2
votes1
answer608
viewsA: how to send PDF by email with dompdf
I don’t think you can do this, because dompdf it renders the page to generate the PDF, and in Phpmail you need a disk file to attach. My suggestion is this:: 1 - Render the file and save to the…
-
0
votes1
answer204
viewsQ: How to do column operations where you give nicknames?
I have the following hypothetical consultation with the bank: SELECT dinheiro_na_carteira, (SELECT sum(despesas_pagas_carteira) FROM DESPESAS WHERE id = X ) as despesas FROM RECEITAS WHERE…
-
0
votes0
answers60
viewsQ: take numbers of clicks and views from a Facebook page using the Graph API
How can I get click numbers and views from a Facebook page using the Graph API? If anyone knows otherwise accepted suggestions.
-
0
votes1
answer23
viewsA: metric to bring visits per day google-Analytics
I got what I needed by adding the "ga:date" parameter in Dimensions. Example: metrics: [ { expression:'ga:users' }, ], dimensions: [ { name: "ga:date" }]…
-
0
votes1
answer23
viewsQ: metric to bring visits per day google-Analytics
Does anyone know any metric or dimension of google Analytics that given a date period, it brings number of hits for each day of that period? Example: dateRanges: [ { startDate: '23-11-2017',…
-
12
votes3
answers1595
viewsQ: Is it bad practice to put numbers as id in HTML elements? If so, why?
I have a loop printing HTML elements, for example: for($i = 0; $i < 3; $i++){ echo "<div id='$i'>$i</div>"; } Is it bad practice to put numbers as id in HTML elements? If yes why?…
-
0
votes2
answers1764
viewsQ: Progress bar plugin with steps
Does anyone know of any Javascript or CSS plugin that can generate this kind of progress bar?…
-
2
votes1
answer102
viewsQ: Arrows do not move in text field with regex
I have the following code with a regular expression inside a method Keyreleased, which allows only some characters to be typed by the user in a text field: String text = input.getText(); text =…
-
5
votes2
answers127
viewsQ: Replaceall() does not remove "|"
I have a following string "|" and I would like to replace it with a simple "", my java code is like this: String teste = "|A|B|C"; teste.replaceAll("|",""); Exit: "|A|B|C" I would like the output to…
-
0
votes2
answers215
viewsQ: Selection with various differences conditions (SQLSERVER)
I wonder if there is any way to improve this selection: SELECT * FROM table WHERE id <> 15 AND id <> 17 AND id <> 23 ... id <> N I don’t have a certain set interval and the…
-
0
votes2
answers5698
viewsQ: Select parent element with javascript (no Jquery)
I have two elements and would like to select the parent element using Javascript only, someone knows some way? <tr> <td id="filho"><td> </tr>…
-
2
votes1
answer7197
viewsA: Shortcut Find and Replace Visual Studio Code
Already found the answer just a Ctrl + H. Anyone with similar questions look at the link > shortcuts…
-
4
votes1
answer7197
viewsQ: Shortcut Find and Replace Visual Studio Code
In Visual Studio Code, when I press the keys Ctrl + F i can locate a certain string. Is there a shortcut to "find and replace" using this same program? Ex: In Atom when locating a string if I press…
-
1
votes1
answer789
viewsQ: How to hide the token generated in the url by the variable
I have this form with the method in get, but when sending the request it sends the token by the url. How can I hide the token from ur? URL: 127.0.0.1:8000/search?…
-
1
votes1
answer786
viewsQ: Ng build -Prod Angular 2 - How to publish the application
after giving Ng build -Prod it generates files for distribution, my question is the following how can I publish it on a PHP server or any other normal, because when I try to get the files generated…
-
1
votes0
answers158
viewsQ: Progress bar similar to youtube
Does anyone have any notion of how to make a progress bar similar to youtube with loading according to the time of the requested page?