Most voted questions
150,413 questions
Sort by count of
-
4
votes1
answer112
viewsProgram enters infinite loop
My goal with the code was to put together a game that asked the person what number the computer would be "thinking" (from 1 to 100), and as the person said a number from 1 to 100, the computer said…
-
4
votes0
answers61
viewsError using Facebook login repeatedly
I’m using the Facebook API to log data into the database. As soon as I open and browser works well, but when I try to register more than once this error appears: After closing the browser goes back…
-
4
votes1
answer671
viewsI want to check if the string contains only letters?
#include<stdio.h> #include<stdlib.h> #include<ctype.h> #include<string.h> #define tam 50 main(){ struct cadastro{ char nome[tam]; }; struct cadastro dados; printf("Nome:");…
-
4
votes1
answer426
viewsHow to make more than one panel transparent?
Implementing the answer of this issue, i managed to make a panel transparent. However, in order to organize the way I want, I wanted to use more JPanels, with different layout managers. But when I…
-
4
votes1
answer730
viewshow to place histogram values on top of bar
I’m using the Histogram command from the Lattice library on R. I would like to know how I can put the value on top of the bars, value I speak is the histogram count. Ex:…
-
4
votes1
answer126
viewsWhy am I getting access to this pointer even after I’m free?
I have this program and theoretically it was not to lose the address of new after giving the free making the same inaccessible ? #include <stdio.h> #include <stdlib.h> typedef struct{…
-
4
votes3
answers797
viewsHow to remove "whitespace-only text Node" that appear in HTML from the DOM
It seems that the HTML by default puts a damn"whitespace-only text node" among the elements of inline level with this I gain a "margin" between the elements that I cannot remove from the DOM I know…
-
4
votes4
answers2605
viewsBreakpoint in visual studio does not load at debug
I have a solution with 3 projects, one of them being Ex.utils and Ex.Api. Where the . dll of the utils project is referenced in Ex.Api in 'References'. Both compiled in the same version of . NET.…
-
4
votes1
answer97
viewsHow much each function "costs" to the server
My question is about function is_dir to find out if there is a directory. How much does it cost for the application to use this function? How to measure the use of this or another function in PHP?…
-
4
votes2
answers6011
viewsWhat is the meaning and form of volume use in Dockerfile?
In a Dockerfile file what is the meaning of the instruction: VOLUME /arquivos I imagine it creates a volume, but how it’s used and what its real meaning is?
-
4
votes1
answer1052
viewsBank Draft Algorithm in C using recursion
I am having doubts about a bank withdrawal algorithm in C. First of all it is better to pass the statement: Atms in banks are a great invention, but sometimes we need change and the machine delivers…
-
4
votes1
answer578
viewsPlacing a website inside another as light box checkout
I am a web developer and I came across a problem where I need to display a registration form within another page. The customer does not want his user to be directed to our page, I tried to instruct…
javascriptasked 6 years, 7 months ago Caio Michel dos Santos 75 -
4
votes2
answers679
viewsMaintain item order in JSON
Have to maintain the order of the items that came in JSON of a API? This is like this coming from API: {"6":"Abadia","218":"Abel Reis","44":"Alexandre Campos - Jardim","13":"Alfredo Freire…
-
4
votes3
answers4047
viewsA: How to count and sum the amount of a certain "factor" in the observations (lines) of a data.frame?
Dear, would like to get the amount of "yes" (factor) on each line of a data.frame, as follows. Would anyone know what arguments I would have to use to do this with "mutate"? I tried several ways and…
-
4
votes5
answers1602
viewsChange return /Date(1386295200000)/ to date format
I have a return from json that comes so from SqlServer: /Date(1386295200000)/ How to convert to date format dd/mm/yyyy?
-
4
votes3
answers655
viewsController Base Dependency Injection
Well I’m learning to work with the dependency injection now and I’d like to apply it to my project. But I came across the following difficulty, I have a controller base where it is inherited by…
-
4
votes4
answers40794
viewsConvert date from DD/MM/YYYY to YYYY-MM-DD in Javascript
I’m wearing a datepicker, using the library moment.js. Calendar displays date in local format, pt-br, as well as the value returned. I want to take this string and format in English format…
javascriptasked 6 years, 7 months ago Leandro RR 776 -
4
votes1
answer524
viewsPdf reading via R
I need to convert the PDF data below into a data frame: http://www2.alerj.rj.gov.br/leideacesso/verArquivo.asp?idArquivo=635 Doing a search for found the How to Read PDF Data in R. I had some…
-
4
votes2
answers192
viewsWhy is there no String.Toint() method?
String in C# is an object, right? From what I saw to string is a class, different from int and other primitive types that are simple types, (I’ve seen on another site too, that they are all objects…
-
4
votes1
answer2182
viewsThe call thread cannot access this object because it belongs to a different thread
Follows the code: private async void button_1_Click(object sender, RoutedEventArgs e) { var listenPort = 11000; var listener = new TcpSocketListener(); listener.ConnectionReceived += async (senders,…
-
4
votes1
answer592
viewsHow to take values according to another value?
I want to add the value (and show in any cell) of the Cx cell when Dx equals 1 and add the Cy values when Dy is 2. For example: In the photo, when the value of cell Dx is 1, I want the value of Cx…
-
4
votes3
answers3627
viewsFormat a string for phone format
I have the following string "49988070405" and I want to format it for "(49) 98807-0405". I tried the code: Convert.ToUInt64("49988070405").ToString(@"\(00\)\ 00000\-0000"); But to no avail…
c#asked 6 years, 7 months ago Matheus Saraiva 2,157 -
4
votes1
answer79
viewsBasic HTTP authentication
I have a question about basic authentication. The problem is that I have a webservice with slim framework and would like only my application to access the routes I created without user or password.…
androidasked 6 years, 7 months ago Stênio Barroso de Moraes 312 -
4
votes3
answers87
viewsPut date in American format with substring
How to put the string 22012018 What is a date in American format to save in the database? The code below returns me the value: 2018-22-01 I mean, YEAR-DAY-MONTH The right one would be YEAR-MONTH-DAY…
c#asked 6 years, 7 months ago Igor Carreiro 1,917 -
4
votes2
answers897
viewsSeparate equal values in an array
Well I have the following array: $produtos2[] = array( "cod" => (int) 768, "nome" => "LOGITECH M535", "GRUPO" => "MOUSE" ); $produtos2[] = array( "cod" => (int) 2334, "nome" =>…
-
4
votes2
answers636
viewsI calculate Java water consumption using Eclipse IDE
I’m having a hard time writing this exercise in the Java Language, using the Eclipse IDE: The director of a state school in the city of São Paulo is terrified by the absurd consumption of water that…
-
4
votes1
answer799
viewsRead JSON with Delphi 6
I have a JSON file, but I would like to read it using Delphi 6. It would be possible? Follow an example from JSON { "size":1, "response":[ { "id_cliente":21, "nome":"DESENTUPIDORA ME",…
-
4
votes1
answer1556
viewsDifference between Transaction.Commit and Transaction.Commitretaining
Using Firedac technology, I want to know exactly the difference between Commit and CommitRetaining. I read in the official documentation of Firedac that Commitretaining keeps the transaction open.…
-
4
votes1
answer4066
viewsjwt authentication with vuejs
I’m a little confused with the authentication using jwt token, I have an application in vuejs + Vue-router, I don’t want to use vuex until I learn to do it without it (I don’t like to use what I…
-
4
votes3
answers221
viewsList<> Best practice, start with fixed capacity or start without limit?
I have a scenario where I will receive a list, or an array, or any other type of data from the database where I can know the size of my list before creating it, what is the advantage between the…
-
4
votes3
answers9287
viewsConvert string to Date (dd-mm-yyyy)
I have a string = "01/04/2012" and need to convert to date(dd-mm-yyyy) in javascript pure. Follow what I’ve done: var vencimento = localStorage.getItem('dados2'); //Busca a variável que contém a…
javascriptasked 6 years, 7 months ago guilhermedjc 169 -
4
votes3
answers328
viewsFormat integer value in "000" format
In vb6 used the following line of code that allowed formatting the value "1" to "001" Format$(Nivel, "000") In C# I am using the following with similar nomenclature. string.Format("000", 1); However…
c#asked 6 years, 7 months ago Daniel Fernandes 235 -
4
votes3
answers11182
viewsAppend javascript
I have a modal that opens when I click on a link, in this modal I will type an email that when I click on add email, will add the email text in a <ul> <li> below the input. I already…
-
4
votes1
answer196
viewsVB6 always executes the 2nd function even though the 1st is False
The if in VB6 always executes the 2nd function even validating that the 1st is False, C# does not execute the second function in case the first one is already false. How can I get the vb6 to perform…
-
4
votes1
answer687
viewsWhat are the most common C++14 compilers on Linux?
What are the most common free compilers on Linux to compile C++14? " Most common" in the sense of most used and available in several distributions. I am using CENTOS and need to compile code that…
-
4
votes1
answer176
viewsProject error when upgrading Visual Studio 2017 to version 15.6.0
After upgrading the Visual Studio version to the update 15.6.0 all my projects (C#) have shown these errors: The "ResolveAssemblyReference" task could not be initialized with its input parameters…
visual-studio-2017asked 6 years, 7 months ago Randrade 21,612 -
4
votes1
answer802
viewsSearch for words MEMO!
I have a MEMO COMPONENT and within it there are several sentences on each line. I need to search for words of this MEMO, example: "POLKA". So far so good. The problem is, after he finds the word, I…
-
4
votes3
answers1929
viewsOperations with dates (delete file with date in name and earlier than 6 months) without using Forfiles
It’s been a long time since I’ve dealt with VBS, so I thought I’d just do it on the command line I need to delete files earlier than 6 months from the current date, as the files I am managing have…
-
4
votes2
answers419
viewsWhat is the "module" value for in the type property of the HTML <script> element
I recently saw a code that includes a file Javascript was set the attribute type with the value module as in the example below: <script type="module" src="arquivo.js"></script> I would…
-
4
votes1
answer2689
viewsHow to access the local host from a Docker container?
I’m starting now with Docker and I’m lost in a small detail, I mounted an Ubuntu image with Apache, PHP 7 and the extension connection with SQL Server. How do I access the SQL Server server if it is…
-
4
votes1
answer360
viewsServer DDOS attack
Hello, I have a server that is suffering DOS attack, I used the command: watch -n1 'attackers' in SSH to see the attacks. Basically it has an IP that makes some 380 connections, and makes the server…
-
4
votes2
answers1662
viewsHow to convert to Base64 in C#?
I am using Webforms. There is a certain part of this application where I send, through Ajax, a string Base64, which is the code of an image. I’m used to using PHP and use the functions base64_encode…
-
4
votes3
answers3856
viewsReturn month name as select
I need to return the name of the month with the command select, I know with command Select extract('Month',data) He returns me the number of the month in question, there is a way to bring the number…
postgresqlasked 6 years, 8 months ago R.Santos 2,251 -
4
votes2
answers629
viewsFirebase Cloud Messaging does not send sound in notification
I have two applications, when such action happens in one of the two applications, it sends a notification via FCM, for the other application, when it comes to notification , only makes the…
-
4
votes2
answers459
viewsHow does Hoisting work on ES6?
For example, using var, by calling the function below in this way: function funcao(){ console.log(foo); var foo = "mensagem"; } funcao(); Will return undefined because of the Hoisting, that moves…
-
4
votes2
answers477
viewsWhy is the variable not modified?
I have the following code below: #!/usr/bin/python3 # VARIÁVEIS variavel = 0 def valores(): if ( variavel == 0): variavel = 100 elif (variavel == 1): variavel = 200 elif (variavel == 2): variavel =…
-
4
votes1
answer154
viewsWhat does this command mean in git " "?
I don’t like using commands without knowing the meaning, so would someone tell me what this command means in git: ^ ?
-
4
votes1
answer893
viewsSum of the regression square of R models
The models presented are different in only one additional coefficient (f), which multiplies the independent variable (x), allowing the calculation of the increase of the sum of the square of the…
-
4
votes3
answers973
viewsWebsocket - c# . NET
I found almost nothing about Websockets + . NET on google, I would like to know how this server is made using the . NET in the future the idea is to create an application and hardware (Arduino) that…
-
4
votes3
answers1162
viewscreate objects dynamically
I’m having a problem in college in software engineering which is the following: I have the following scheme when making the payment of a shopping cart I must know if it is BOLETO or…