Most voted questions
150,413 questions
Sort by count of
-
3
votes2
answers259
viewsSend e-mail with various attachments
I am sending e-mail through the INDY, the email is being sent and the attachment is going, but as it appears in the code below, I do a go through all the attachments, and it only sends the last,…
-
3
votes1
answer438
viewsHow to validate a numerical expression with a regular expression?
I need within my application in PHP7 to validate a numerical expression with a regular expression, the case is that I almost succeeded but I ran into a problem. Non-significant zeros within the…
-
3
votes1
answer316
viewsHow to schedule several tasks in spring boot dynamically?
I have a spring boot application and the same has several Jobs that will run from time to time and this time interval has to be recovered in the database. In the Scheduledconfig class we have data…
-
3
votes4
answers120
viewsSimplification of the jQuery code
Hi, I’m starting programming in jQuery. I’ve moved a little but I don’t know that much. I am making a simple code for checking blank fields in inputs from a login screen. This is the code:…
-
3
votes2
answers335
viewsRemove cmd/dos window when calling Python App
I made a script in Python that has an interface, but when I run it, the Python interpreter window appears together. How to remove this CMD window that opens together with the application? Follow the…
-
3
votes1
answer567
viewsParameterize functions to receive functions
What are the advantages of parameterizing Dart functions? void main() { metodoSemFuncao(); metodoComFuncao(funcao); } void metodoSemFuncao(){ funcao(); } void metodoComFuncao(Function func){ func();…
-
3
votes2
answers65
viewsHow to convert a txt to csv in perl?
Hello, Little Boy. I am new to perl. I need to convert a txt file to csv. Follow the code I’ve managed so far. #!/usr/bin/perl my $filename = "interfaces.txt"; open(fh, $filename) or die "não…
-
3
votes3
answers182
viewsAccess modifiers in PHP
Does it make sense that I create a class, define three functions, two public and one private, and make the private function be accessed through the public method? Example: class Pessoa { private…
-
3
votes1
answer285
viewsOpacity of images C#
Good morning, I came across a problem in my application Windows Form C#, I’m trying to apply an image with low opacity() background to my panel1, but the image when inserted gets 100% opacity,…
-
3
votes2
answers312
viewsDecimal places in Javascript
I’m new to programming, I ran a division account and I wanted to reduce the decimals. Follow my code below! document.write("A média de gerações que se passaram é: " + (2019/28)); Obs: Result…
javascriptasked 5 years, 6 months ago William Peterson 31 -
3
votes2
answers3004
viewsHow to open a local server using Node?
I want to open a local server to test my project on Reactjs, but I want to see it both locally on my machine and on another computer. I have to open some door? Edit: Both using the same network.…
-
3
votes4
answers231
viewsHow many times should I use the Strong element to highlight a word as important?
I’m studying HTML got the following question: <h2>Elemento <strong>div</strong></h2> O elemento <strong>div</strong> também define uma sessão genérica de uma…
-
3
votes2
answers186
viewsHow to take an image input and display it in the background-image?
I have an input field that should receive an image, when receiving it I should add it as background-image from a div. I used Filereader to get the Base64 from the image. It works fine, but CSS…
-
3
votes2
answers79
viewsCreating routers for multiple databases in Django
I am developing a Django application where I need several Databases, one for each user of the system. For this I set the Databases like this: DATABASES = { 'default': {}, 'primary': { 'NAME':…
-
3
votes2
answers1055
viewsElaboration of cipher in python
Hey, guys, I’m new here and in the programming world, so any criticism is welcome. I have a problem with this cesar cipher I’ve been trying to do. They could point out possible errors, and ways to…
-
3
votes2
answers172
viewsIs it worth 'shuffle' ID that will be passed via URL?
We were talking about database security. Came the question: worth encrypting Ids coming from the database to the frontend? E.g.: I click on a client from a list where the link goes…
-
3
votes1
answer176
viewsAPI with JWT authentication
Hello, I am building an API for studies and I am implementing JWT in the authentication of it. All the contents I found refer to Asp.Net Core, as I do for validate tokens in the. Net Framework? I…
-
3
votes1
answer355
viewsRun Html5 inside Webview android
I have a page in Html5, where I would like to open it in Webview android, but it seems that Webview does not interpret javascript. There is a better Webview? See my code: Mainactivity package…
android html5 android-studio android-layout android-activityasked 5 years, 6 months ago Tiago 2,377 -
3
votes1
answer148
viewsPHP date function is returning the day in place of the month
I need to format the date received from a $_POST as follows: date('Y-m-d', strtotime($_POST['data'])); ///O POST está enviando 10/05/2019 << Dia/Mês/Ano. But the return of that function was…
-
3
votes2
answers194
viewsRemove text within a comment tag with PHP?
My client usually does copy/Paste of news providers that contain HTML comments. That is, HTML does not hurt and when inserting they do not appear in the text editor but I use the PHP mailer that…
phpasked 5 years, 6 months ago I_like_trains 1,430 -
3
votes3
answers75
viewsDefinition of "arrows" in PHP
I don’t know if I got it very well in the official php documentation (https://www.php.net/manual/en/language.types.array.php), so I came here to ask a question. I’m giving a general review, finally…
-
3
votes1
answer1488
viewsFunction Returns [Object Promise]
function that takes the data from a url: const getDadosAsync = () => new Promise((resolve, reject) => { let url = 'http://' + host + '/dados'; xhttp.onreadystatechange = () => { if…
javascriptasked 5 years, 6 months ago Vitor Pereira 117 -
3
votes1
answer1038
viewsHow to insert this "burger" menu into my already made retractable menu
I’m having trouble inserting an animated hamburger side menu on my already ready site. I have the base of a site with a fixed header and a retractable menu that opens laterally, and the icon to open…
-
3
votes1
answer79
viewsDoubt about how to register
Good afternoon guys, good I’m new here, so I apologize for anything! My question is: I have an equipment table, a software table and an associative equipment-software. The ratio was (Equipment) 1 N…
-
3
votes2
answers233
viewsHow do I chart the production function of Cobb-Douglas in the R?
I would like to draw up the graph for the Cobb-Douglas production function in the R,: P(L, K) = 1,01L 0,75 k 0,25 Where L and K vary between 0 and 300.
-
3
votes2
answers124
viewsUnit tests for Pipe tap() in Angular
I would like to test tap() inside my Pipe to cover this code snippet, just missing it so that I reach 100% test coverage. fromEvent(this.input.nativeElement, 'keyup') .pipe( debounceTime(150),…
-
3
votes1
answer330
viewsIs it possible to delete a repository on Github using Git codes?
I have a repository on Github that’s public and it has 33 commits, but I no longer have access to Github’s email and password (so I can’t delete the repository from Github), but I still have access…
-
3
votes2
answers338
viewsProblem with React and Redux
Hi... I’m studying React and now Redux. I’m trying to make a simple example: Where I have an input and button, I want to enter a value in the input and when clicking the button take the value and…
-
3
votes1
answer84
viewsQuickly access exact element instance within List java
I have a list that will be filled with many points (x, y, z) - about 3000. Each point is unique within the list (no repeated points). At some point my program needs to recover the instance of a…
-
3
votes1
answer554
viewsWhat does the f = Fernet(key) code represent when using the cryptography.Fernet library?
The program consists of encrypting a message with a key and then decrypting. from cryptography.fernet import Fernet key = Fernet.generate_key() f = Fernet(key) token = f.encrypt(b"my deep dark…
-
3
votes1
answer71
viewsRead something after a C#keyword
I have the following situation, I have a document(txt) that has some things 'filled' type: Nome:"João"; Idade:"20"; Estado:"SC"; The result I wanted is that the variables had only what is written…
-
3
votes1
answer141
viewsParent form superimposing child form C#
I’m developing a Windows Forms application in Visual Studio and I’m having a hard time. I put the parent form to Ismdicontainer and instead of adding Toolbox, I made a form only with buttons, it…
-
3
votes1
answer269
viewsUpdate-database -script in EF Core
In EF6 I could run the "update-database -script" command from Migrations to see the script that would run in the database. How do I get this in EF Core?
-
3
votes1
answer248
viewsRecord Email and Phone Array in Database with Entity
I need to save an html array of telefones and Emails, in the database, but I’m not sure how to receive such data. Phone and email number can be 0 ou N, as in the image below, one can add as many…
c# asp.net-mvc-5 asp.net-core entity-framework-core .net-coreasked 5 years, 6 months ago Matheus 616 -
3
votes2
answers88
viewsGood practices for data of product characteristics that may be different for each item
I own several products and each one has its own characteristics, some have weight, some do not, some have extra fee and others do not, etc. Is it good practice to create a new table of product…
modeling software-engineering software-architecture dddasked 5 years, 6 months ago Danilo Tiago Thai Santos 409 -
3
votes1
answer116
viewsHow to transform an array recursively?
I have the following array: let exemplo = [{ alarm: { title: "Pai", id: "1" }, children: [], parent: "", }, { alarm: { title: "Filho", id: "2", }, parent: "Pai", children: [], }, { alarm: { title:…
-
3
votes6
answers674
viewsAngular 6: Selected does not work with [(ngModel)] and (ngSubmit)="onsubmit()
I receive the Customer class in my form import { NgSelectOption } from '@angular/forms'; export class Cliente { nome: string = ''; carros: any [] = [ { id: 1, modelo: 'Gol',selected:false }, { id:…
-
3
votes1
answer1739
viewsError using scanner.close()
I’m trying to run this code in Java, using Eclipse. The same runs once normal. When trying to repeat the operation (choosing option 1) gives error as shown below. If I remove the scanner.close(); it…
-
3
votes1
answer141
viewsWhat is the difference between Strategy Pattern and Specification Pattern
I’m implementing a app CLI in C# of old game and wanted to know which is the best Pattern to use to make the "AI" that would be the player vs computer in the case. I’ve been looking at some Patterns…
-
3
votes2
answers226
viewsError in program c# with vectors
I’m having a problem on line 18 of this code that says:"There was an untreated "System.Indexoutofrangeexception" exception in Consoleapp19.exe The index was outside the matrix boundaries. How to…
c#asked 5 years, 6 months ago user147903 31 -
3
votes0
answers64
viewsDatabase for Resumes
Good afternoon, I’m doing my TCC project for a HR system, only I have a question while storing resumes. In which there will be a form where the user registers his information, and if you want to add…
-
3
votes1
answer90
viewsposition Fixed only horizontal
I’m having a question, I was wondering if it’s possible to leave my div with position: fixed only horizontally and vertically... It’s possible to do that? .body{ height: 1500px; width: 1500px;…
cssasked 5 years, 6 months ago OtavioCapel 1,513 -
3
votes2
answers2455
viewsBuild error: "Resource Leak" when using Scanner
I’m solving a question from Deitel’s book question 3.17, but I have a problem in the main class (I’m doing it for Eclipse, in the Linux environment). The code is like this: public class…
-
3
votes2
answers299
viewsError calling PROCEDURE in SQL Fiddle
When making a call PROCEDURE in SQL Fiddle, the following error is displayed: DDL and DML statements are not allowed in the query panel for Mysql; only SELECT statements are allowed. Put DDL and DML…
-
3
votes1
answer825
viewsBug in VS Code output terminal characters
In my output terminal the accented letters and the "Ç" are replaced by interrogation, someone knows how to fix it? Example: Compila��o com �xito. 0 Aviso(s) 0 Erro(s)…
-
3
votes2
answers476
viewsTranslating copy command from CMD to Powershell Copy-Item
I’m trying to translate a command from cmd to the powershell but I’m not getting it. I get multiple.txt files during the month, put them all in the same folder, some have specific terms in the name…
-
3
votes1
answer108
viewsAuthentication Spring Security
PROBLEM How do I have spring security redirect to my project’s custom page? import org.springframework.context.annotation.Bean; import…
-
3
votes3
answers84
viewsPrevent link from opening while clicking and holding to drag in Google Chrome
How to prevent a link from opening while holding and dragging your mouse in Google Chrome? The script below is to perform scroll action while clicking and dragging, but when it comes to links, when…
javascriptasked 5 years, 6 months ago Mark 169 -
3
votes1
answer2430
viewsError Response from daemon: failed driver External Connectivity on endpoint
Someone’s been through this mistake? I’m trying to run the postgres via Docker but prints an error. sudo docker start database Error response from daemon failed programming external connectivity on…
-
3
votes3
answers1314
viewsHow to handle different date formats?
I have an application that at a certain time I recover the obtained date from the system, save it in a table in the database (Sqlite) and then recover it. The problem is that in determinator devices…