Most voted questions
150,413 questions
Sort by count of
-
3
votes1
answer89
viewsHow to delete all Mongodb Collections in Laravel
A good practice in TDD is to keep the database clean between tests. For this, Laravel uses the Trait RefreshDatabase. However, this still doesn’t work for the Mongodb database. My idea is to delete…
-
3
votes2
answers165
viewsVariable appears as undeclared when trying to use it in the "while" loop
When trying to create a program that converts Celsius into Fahrenheit to get practical and I come across the following error message: Erro "sair " undeclared (first use in this function) My…
-
3
votes0
answers52
viewsAWS Lambda Layer Failed to create via AWS Cloudformation
I’m trying to create a AWS Lambda Layer in the AWS Cloudformation, but the following error happens: Layer Conversion failed: Some Directories do not have execute Permissions; (Service:…
awsasked 5 years, 3 months ago Arthur Menezes 2,210 -
3
votes1
answer160
viewsFormat a number with a certain number of decimals
How do I make the user choose the number of decimals of a number? EX: from math import pi x = int(input('número de casas decimais de pi: ')) I want to be able to print on the screen pi formatted…
pythonasked 5 years, 3 months ago rafael gonçalves filho 31 -
3
votes1
answer53
viewsWhy can I assign an instance of a class to a variable whose type is the interface?
Exactly what you mean when I create an object in memory, but I associate it with variable a1 interface-type (AreaCalculavel)? I’m a little confused, see below the example. package exercicio0101;…
-
3
votes1
answer208
viewsHow to Shuffle Characters from a String in Delphi
Would it have any function to shuffle in Delphi to shuffle a string. String Ex := 'wooden house'; Return ex := 'medr ci saedaaa';…
-
3
votes1
answer762
viewsImplement Thread in Python
Following the theory of this question and answer I understood that I can run more than one program, right? I have a database with more than 3,000 users to check, this check works as follows, it…
-
3
votes1
answer85
viewsIs there a loop loop behind the code of a CTE?
I’m racking my brain to understand how such a simple command can generate values from 1 to 100. Is there a loop behind a CTE? For in the code below there is a loop WHERE and not a WHILE. WITH…
-
3
votes0
answers153
viewsMatch of the contours
I created the program below, to make the correction of tests. https://gist.github.com/andreemidio/d2cdf3d301fd8df1677e9a315ff845f0 I was able to outline, identify the fillers, I need to match the…
-
3
votes2
answers218
viewsDestructor in C++
In solving some issues in C++, I came across the code: class MinhaClasse{ private: int a; public: MinhaClasse(int b){ a = b; ImprimeA(); }; ~MinhaClasse(){ IncrementaA(); ImprimeA(); }; void…
c++asked 5 years, 3 months ago Luiz Augusto 2,482 -
3
votes1
answer71
viewsError in Webscraping process Youtube videos on R - NA' does not exist in Current Working directory
I am developing an academic work in which I should analyze the text of 25 selected videos on various Youtube channels. My advisor gave me a script about how he is developing this, so that I work on…
-
3
votes3
answers964
viewsCalculate change and display available notes with Javascript
I have a class activity to do, where I must receive from the user the amount of the purchase and the amount paid, and then display the change. So far ok, only it also asks to display in a textarea…
-
3
votes1
answer1084
viewsReturn value of Promise
I have the following code: const retorno_valores = [] result.forEach( value => { var reader = getReader(conn, 10) retorno_valores.push({reader}) }); const getReader= async (conn, cdReader)=>{…
-
3
votes1
answer88
viewsIs there any SVN for database?
I have the following environment, an online database (Mysql) for production and several others (copies for each developer) used for local testing. Is there any program as well as SVN that performs…
-
3
votes2
answers113
viewsKeep gif for a while after removing the mouse
Good morning, my problem is this: I have a gif of a Bulbasaur and I want that when I pass the mouse on top of it the gif change to another, but when I finish the animation of 2°; gif I want it to…
-
3
votes1
answer80
viewsInteger variable that controls the loop
I’m asking the fifth question of this exercise: Question 5: Given a list of ints, Return True if first and last number of a list is same The code is down. In it, while the user type an integer other…
pythonasked 5 years, 3 months ago roger roger 124 -
3
votes1
answer93
viewsUnixtimestamp for Date Javascript
I am receiving a JSON in which the date is being returned in this way: /Date(1563568740000+0200)/ I believe it is Unixtimestamp, but I can not convert it to format Date javascript. I’ve tried to do…
-
3
votes2
answers119
viewsCalendar showing the difference between two dates
I want to make a difference calculator between dates. One that can make a difference in days, hours, etc. Example: Initial - 07/17/2019 for Final - 07/29/2020. How long (in days) is the starting…
-
3
votes3
answers607
viewsDeclaring a string in C
When setting the size of a string and not using all the space in the reserved memory, after the 0 the rest will be released? char nome[40] = "carlos"; In the above example I declare a string with…
-
3
votes1
answer83
viewsCounting amount of results of a Split()
I have a string that looks like this: Yeah, No, Maybe And I have a code that I need to put these string results separately into a <option> of a <select>. I intend to do this through a…
-
3
votes2
answers94
viewsHow to erase the symbols of a CPF in an input?
I’m creating a website that asks for the name and the person’s number the CPF has to be in format xxx.xxx.xxx-xx. And by pressing the button he registers the person (The data is only displayed on…
javascriptasked 5 years, 4 months ago Leandro Nascimento 81 -
3
votes1
answer410
viewsIs it possible to list the name of the Assets in a Flutter app?
I need to know which ones Assets I uploaded it to an flutter, to reflect and make a decision. I know I can list which ones Assets that I wish to climb into the app through the pubspec.yaml: ...…
flutterasked 5 years, 4 months ago Jefferson Quesado 22,370 -
3
votes1
answer247
viewsConvert SQL to LINQ
How do I convert the SQL below to LINQ? SELECT `clientes`.`Nome`, `clientes`.`Cpf`, `clientes`.`email`, `clientes`.`Id` as clienteId, `cartoes`.`Id` as CartaoId,…
-
3
votes2
answers83
viewsFit li:Dropdown Menu
I got a CSS code from Dropdown Menu and I’m adapting it. So far it has worked but has a problem for now. When you mouse one of the main links, a dropdown menu appears below, with the red color and a…
-
3
votes1
answer403
viewsftplib and pyftpdlib communication
I have a server (Fedora 29) at home running (as root) an ftp done in python with the ports 5000-5003 and 40000-50000 open, the machine is in DMZ import logging import sys from pyftpdlib.handlers…
-
3
votes1
answer88
viewsCan you store a throw in a variable?
I have the following code snippet: try { throw new BadRequestHttpException("Error in Register of your Company"); } catch (BadRequestHttpException $e) { throw $e } I want to know if it is possible…
-
3
votes1
answer2470
viewsWhat is the difference between PWA and TWA (Trusted Web Activities)?
I happened to be watching the Chrome novelty, and I saw a post Using Trusted Web Activities, it says: Trusted Web Activities are a new way to Integrate your web-app content such as your PWA with…
-
3
votes0
answers531
viewsDOMPDF open Bootstrap content lying down and recognize CSS
I am using DOMPDF with the content with Bootstrap. For this, I did so: <?php ... use Dompdf\Dompdf; use Dompdf\Options; require_once("dompdf/autoload.inc.php"); $options = new Options();…
-
3
votes1
answer64
viewsTime to send data
I’m developing a small meteorological station to apply on a farmland, which is to have a temperature sensor, a rain sensor and a humidity sensor to be uncooked later because I don’t have it yet.…
-
3
votes1
answer76
viewsFile upload does not send
I’m trying to upload the file, but it doesn’t send to the folder. Shows the entire file sending process, receives in the database the new file name, but the file does not arrive in the server…
-
3
votes1
answer296
viewsComponents in Spain
I read the documentation of Vue.JS and did not understand exactly... The above example (and some others in the future) uses Template strings to make templates of more than one line more readable. So…
-
3
votes2
answers52
viewsCreate new columns of data in a data frame
I would like to create 2 new columns in my "Minimum" and "Maximum" date frame, where the value of these columns depends on the "Total area groups" column, where for example, when "Total area…
rasked 5 years, 4 months ago Ingled M Cardoso 159 -
3
votes1
answer82
viewsHow to pick variable that is in method and put in date ? Vue
I’m taking driver data in the api and seeing how many there are such categories (this is in the method). Right after I want to put this information on the chart (datasets) but I’m not getting it.…
-
3
votes3
answers216
viewsAs a search for any term removing spaces, traces and points with LIKE
I’m having a hard time changing a search that I have today by searching a code that has, for example this mask A 901.325.0744 the search is correct because the code is registered in this way and the…
-
3
votes1
answer55
viewsHow to cover using Mock and C#?
I need to cover for the method example below: public int GetQtdCart() { int qtCart = 0; using (var db = new SfrEntities()) { qtCarteira = db.Set<Contract>().Select(x =>…
-
3
votes1
answer148
viewsGet a result that appears in 1st position if you have a value specified in SQL
I need to create a query that follows some rules and they are: gsm repeat sending be different status who is with ANOMALY and appears as the first result (over the others) I’ll give you an example…
-
3
votes1
answer273
viewsHow to assign a character to a string position?
I’m having some difficulty assigning a character to a certain position of string. I researched a lot before asking here and found nothing. Criticism is always welcome. This function is a part of a…
-
3
votes1
answer669
viewsHow to place two Carousel, one next to the other with bootstrap
I’m working with a responsive website with Bootstrap. I have an idea to put two carousel, side by side, but I’m not getting, nor with float: left. I would post my code here but I’m a little ashamed…
-
3
votes3
answers529
viewsProduct between scalar and array
I have a vector: a = [0.4850045, 0.45512111] and a vector of an element: b = [-0.03116616] I’m trying to multiply the vector content b, that is to say, b[0], by vector a, but instead of getting :…
-
3
votes1
answer214
viewsChecking crashed tables in Mysql with PHP
Here in the company there is a structure with at least 20 servers, each server has at least 20 databases, and each database must have between 40 to 50 tables. For such a structure, rotate the…
-
3
votes1
answer123
viewshow to generate an index.js for each build - Webpack
I am working on a nuxt/Vue.js project and applying the Atomic design methodology, so I will have many components, in different folders, example: ├── components │ ├── quarks │ │ └── ... │ ├── bosons…
-
3
votes2
answers560
viewsHow to improve the performance of the Linq query?
I have the consultation below var f = (from l in fpcList join fpp in FPP on new { l.fpId, l.etId } equals new { fpp.fpId, fpp.etId } join fpcp in FPCP on fpp.fppId equals fpcp.fppId select new {…
-
3
votes2
answers333
viewsOpen page in modal form
I’m doing a crud and would like to open another page in modal form, but do not know how to do this, I even found on a site explaining how to do with javascript but when clicking the button nothing…
-
3
votes1
answer82
viewsMake if in an HTML tag to add or not attribute "checked"
I’m developing with the .Net Core Razor and I’m setting a string in my GET and I need that, according to what this string (in the case of "true" or "false"), checkbox whether or not marked. To…
-
3
votes1
answer113
viewsCount letters 'a' from a file, using egrep and wc
I’m doing a directed study on operating systems, and I’ve stalled on that question: 4) Using the egrep programme in conjunction with the programme wc, tell how many letters "a" there are in the…
-
3
votes0
answers264
viewsRemove HTML tags with regexp in query
I am trying to query Mysql 5.7 using regexp to ignore HTML tags, so far I have the following query: SELECT * FROM question WHERE question.enunciation REGEXP '[^<|</]center[^\>]' = true…
-
3
votes1
answer168
viewsAccess token storages (JWT token)
I am facing the need to store the access token of a user who logged in through a method with Oauth2, this JWT token will be used for my frontend application, written in React, make calls to an API…
-
3
votes2
answers91
viewsForeach preg_match_all
I need to mount an array with all the data coming from another array using preg_match_all,I’m using the following code. $results = array(…
-
3
votes2
answers1046
viewsWhat is the difference between KTS and KT extensions?
I am studying Kotlin and opened a Spring Boot project out of curiosity. I came across two files of different extensions, contento code Kotlin: .kts and .kt. What is the difference between these two…
-
3
votes1
answer61
viewsDo vectors and structures always have continuous addresses?
Why vectors and structures are continuous in memory? I believe that it is not just coincidence. #include <stdio.h> int main(void){ char s[10]; for (int i=0; i<10; i++) printf("%d=%p.\n", i,…