Most voted questions
150,413 questions
Sort by count of
-
5
votes1
answer593
viewsHow does seed influence the generation of random numbers?
The doubt is very simple, I would like to know how the class System.Random generates random pseudorandomness numbers from a seed, which I find odd. I know they are not totally random, and so I have…
-
5
votes1
answer1298
viewsHow to get the name of the current function?
Good evening. I wonder if there’s any way to get the name of the function being used, like this: public function nome_funcao(){ $nome_funcao = $this -> "nome_funcao"; } I don’t know if I was…
phpasked 7 years, 6 months ago Andrei Coelho 6,196 -
5
votes1
answer1210
viewsTest effective internet connection
I have an app where I do a connection test before consulting a webservice, just to display a message to user who has no internet connection. I use a method this way: public static boolean…
-
5
votes1
answer743
viewsWhat is namespace really for?
I would like to understand the great need and usefulness of namespaces in MVC architecture. In what circumstances the use of namespaces becomes indispensable? Give an example of a specific case if…
-
5
votes1
answer3970
viewsWhat are built-in functions? And what is your difference from reserved words?
A little while ago I started to study the Python language and in the middle of studies a question arose. What are functions built-in? And what is your difference of reserved words? I was confused by…
pythonasked 7 years, 6 months ago Cleber Lima 145 -
5
votes2
answers1163
viewsSecurity Application Angular
I have questions about safety, I will exemplify : In my front, in my controller have that method: $scope.getAllpessoaGrid = function (strPesquisa, tipopessoa) { $scope.progressbar.start();…
-
5
votes5
answers721
viewsElement with different end size than width and height definition in CSS?
Code: div { width: 300px; height: 100px; border: 1px solid red; padding: 50px; } <div> Contéudo da div. </div> I would like to understand why while inspecting the div that’s in the code…
-
5
votes1
answer2013
viewsHow to use runOnUiThread()
I’m studying the use of Threads, aSynkTasks and Handlers and came across this method, runOnUiThread() How does this method become a repetitive process to the point of replacing Handler? How this…
-
5
votes1
answer1366
viewsHow to create webservice using PHP and REST?
I have been researching a lot about webservices lately and would like your help to know how I can build a webservice using REST and PHP. I chose PHP because I am more familiar with the language, and…
-
5
votes1
answer762
viewsWhat is a Shim?
When asking about "what is a Polyfill?", bumped between comments and searches with the term Shim. What would be a Shim? What is the relation of the term Shim with the term polyfill? Shim is directly…
-
5
votes2
answers1238
viewsWhat’s the difference between using password_default and password_bcrypt?
Searching on hash, I noticed that the second function parameter password_hash, has two options, PASSWORD_DEFAULT and PASSWORD_BCRYPT, Exactly which of the two I should give preference to use? It’s…
-
5
votes2
answers1281
viewsHow to import . dat file to R
I downloaded a file . dat which is basically an array with data. However, it seems to me that the only way to work with him is by doing the following command (I’m using the R and I don’t have much…
-
5
votes1
answer386
viewsHelp with 16bit Hexadecimal RGB colors
So I’m creating an editor of a PS2 football game in C#. And the game’s "color system" is RGB, and by then it was all going very well, because I was coming across "normal" Hex codes in the game like…
-
5
votes2
answers17620
viewsHow to remove semicolon character with excel
I am trying to use an excel formula to remove the semicolon, but even with the correct formula line I am not able to solve. What I got now is this: =SUBSTITUIR(SUBSTITUIR(K2;".";"");",00";"") I’m…
excelasked 7 years, 7 months ago adventistapr 5,498 -
5
votes1
answer772
viewsConverting Textview value to double
Good afternoon, on my project I’m having the following problem. In it you have an Activity in which products are added. To add a product you need to fill the fields Name, Quantity and Unit Value.…
-
5
votes1
answer214
viewsWhat is the difference between Preference and Sharedpreference?
Seeing some forms of data persistence on Android, I realized that has two interfaces very similar PreferenceChangeListener and SharedPreferenceChangeListener, which can be extended in the classes…
-
5
votes1
answer142
viewsWhat is the difference between the new JOIN operator and the previous ones?
I was looking at some examples of SQL in Oracle, and I noticed that it is possible to do only JOIN. Example SELECT T1.*, T2.desc FROM table1 T1 JOIN table2 T2 ON T2.id = T1.id_table2 Question What…
-
5
votes2
answers1407
viewsHow to Transform Time String to an Entire?
Example, I get a String with the "16:20" time of day. The day is 1440 minutes long. How to know what interval from zero to 1440 is this time? In an integer value(integer).
-
5
votes2
answers439
viewsEntity Framework | Double property that allows null
My property allows values double and values null. In the SQL Server Database it is set to decimal(18, 2). But when seventh some value (ex: 5.00), makes the mistake below. Error: The 'Rating'…
-
5
votes1
answer701
viewsGenerate random characters securely
Hello, I’m new to javascript and am using the following function to shuffle characters from a string in a password generator that I’m trying to develop: function shuffle(string) { "use strict"; var…
-
5
votes3
answers202
viewsHow to assign NA as value?
I have the following line of code: enem$TP_COR_RACA <- factor(enem$TP_COR_RACA, levels = 0:5, labels = c("Nao", "Branca", "Preta", "Parda", "Amarela", "Indígena")) I want to replace the value…
rasked 7 years, 7 months ago André Oliveira 376 -
5
votes2
answers15150
viewsError login facebook
When I try to log in facebook through my application, gives the error: Blocked URL: Redirect failed because the Url used is not in the release list in the client’s Oauth settings application. Check…
-
5
votes0
answers56
viewsJavascript: why does Eval("023") return 19?
I know that the function should not be used indiscriminately, because it has several security implications, conforms can be seen here: Eval is either good or bad? But I was making a simple…
-
5
votes1
answer596
viewsPersonalize message by the hour
I wanted to personalize the greeting message depending on the time. Ex: Hora menor que 12h. "Bom dia" Hora menor que 18h. "Boa tarde" I did with if and else but wanted a better method. //Pegando a…
-
5
votes2
answers1728
viewsHow to receive a string and switch to check in C?
I have to develop an algorithm that gets the name of a place, for example, "School", and based on this, do a check of the string in the switch, and if it is "School", then it sends a message to the…
-
5
votes2
answers582
viewsHow to minify project in Angularjs?
When I do the minification at the angle everything stops working
-
5
votes2
answers3112
viewsIs there a URL in Nodejs?
Good is the following I needed some function that served me as "Curl", to use in nodejs. Is there any Function, which does the Curl equivalent in php? Thank you.
-
5
votes1
answer459
viewsError Connecting Postgresql to Entity Framework
I am trying to connect the EF in Postgresql. You are presenting the following message: An unhandled Exception of type 'System.Configuration.Configurationerrorsexception' occurred in…
-
5
votes2
answers1839
viewsColumn chart stacked in R
I have a database where variables assume integer values from 1 to 5. Follow an example base with variables X1, X2 and X3: base<- rbind( c(5,3,3),c(4,3,2),c(4,5,4),c(1,5,1),c(1,2,1),c(3,4,2),…
rasked 7 years, 7 months ago Henrique Pizarro 659 -
5
votes1
answer684
viewsNodejs running at Gate 80 with Apache
Well, it’s like this, whenever I want to use socket.io I have to use some port, so whenever I want to have access to the web page that works with the socket.io I have to go to : wwwwww.meusite.com:.…
-
5
votes1
answer433
viewsHow to select multiple columns using the table prefix only once?
In relational model condition, I have to specify the prefix of the table, I’m sure? Example: SELECT c.nome, c.idade, a.nome, a.idade FROM... What I wanted to know is if you can’t do something like…
-
5
votes5
answers29639
viewsHow to convert an int number to string in python?
I need to do an exercise where I input an integer variable of 3 digits and the python has to show it reversed, but up to where I know an integer variable n can do this, but a string can. What can I…
-
5
votes1
answer109
viewsHave the functional features of Java 8 made any Pattern design obsolete?
It is said that functional programming makes certain design patterns (thinking of the Gof) unnecessary. There’s even a presentation showing it somewhere (I’m not looking now because I’m on cell…
-
5
votes2
answers4615
viewsSQL LIKE is Case Sensitive(Case Sensitive)?
By having this doubt, I did not find quick results in Portuguese that offer answer(most of the results are in Stackoverflow in English). It would be interesting to have an objective answer here in…
-
5
votes1
answer248
viewsWhat is managed code?
In a conversation with a co-worker about what language was used to develop Windows, he said that many parts should still be developed in C and C++, as it was necessary to run unmanaged code. Other…
-
5
votes2
answers4543
viewsHandle spreadsheet with userform loaded (excel vba)?
When we’re with a userform loaded, it is possible alter/navigate in the spreadsheets of excel?
-
5
votes1
answer288
viewsStart and Take down bank in flask test
I’m doing an api test, which I pass a json it validates me if it came back all ok: my base class: # -*- coding: utf-8 -*- # base.py import os import unittest from app import initialize from mock…
-
5
votes2
answers396
viewsconsume REST service with totalcross
I would like to know how to consume a REST service using totalcross. I made an example following what is in the documentation, I am using Httpstream. String url = enderecoWS + servico; HttpStream hs…
-
5
votes1
answer178
viewsWhat is an Appdomain?
I read about it on the Microsoft website. It would be interesting to have a succinct answer here in Portuguese with a summary of what is? There’s something important that’s not in the documentation?…
-
5
votes3
answers2116
viewsHow to rewrite a URL?
Hi, I want to rewrite a URL and I know it needs to be by .htaccess. I have this URL: www.nomedomeusite.com/visualizar?id=8 My page visualizar.php at the very beginning of body take this one id and…
htaccessasked 7 years, 7 months ago Nicolas S. 427 -
5
votes3
answers1598
viewsHibernate vs Eclipselink
Both persistence frameworks implement JPA. 1 - There is a difference between the two? 2 - Which is the best in performance? 3 - As the two implement the same specification, after developing a…
-
5
votes2
answers5899
viewsfile read . XLSX in R
What is the problem and/or difference between reading a file in .txt and .xlsx in the R? Reading in .xlsx can have more problems than in .txt during an analysis ? A friend asked me to do everything…
rasked 7 years, 7 months ago Herlon Nadolny 63 -
5
votes2
answers3090
viewsFunction that returns the smallest prime number in Python
I was writing a Python code that received a number and returned the first prime number smaller than or equal to that number. I created a function called maior_primo, which does the following:…
-
5
votes1
answer1031
viewsNodejs deploy in production
What are the best practices for doing the deploy in producing of a Node.JS application? I would like to know how the deploy in production of API’s Node.JS. My application is today dockerized and…
-
5
votes1
answer1258
viewscompare and add in sequence with sql server
through a table I intend to add the fields of col3 verifying if the value of col2 is equal to the following, doing a group by sequential. col1 col2 col3 ind seq1 5 ind seq1 3 ind seq1 7 ind seq1 4…
-
5
votes2
answers1889
viewsScript to select only a checkbox?
I have the following code with a menu like Menu Accordion: function marca() {} body {font-family: Trebuchet MS;margin: 0px;} nav {width: 100%;} p {font-size: 14px;text-align: justify;} .item label…
-
5
votes1
answer2694
viewsHow to detect collision between two squares/rectangles
Who provide an answer that explains all the necessary nuances for this in javascript will earn the points.
-
5
votes2
answers972
viewsRegular expression with specific ending bring 3 first characters
I am trying to make a regular expression on Oracle with the following requirement: End with a specific letter if you have this letter in the middle not searching. Return the first 3 digits of the…
-
5
votes0
answers1238
viewsError: Trust Anchor for Certification path not found
I have an app Android, using the library Retrofit to manipulate requests, while trying to make any request in a android 5.0 or less, I receive the following log: I/call:…
-
5
votes1
answer215
viewsComparison of value within data frame
Hello, I have a database, with about 50000 remarks, as follows, only figurative values: nome<-c("joão","pedro", "joãoo") identificador<-c(123456,124578,123456) valor<-c(2145,350,23)…