Most voted questions
150,413 questions
Sort by count of
-
8
votes1
answer5375
viewsHow to declare a password (password) input?
I wonder if there is a way to mask the input of characters in the input() python. Ex: Senha = 1234 Entrada = int(input("Digite sua senha: ")) In the entry above I wanted to change the letters…
-
8
votes1
answer469
viewsHow to calculate the median when the data is in Chunks?
Suppose my data is divided into 2 vectors: x <- c(100, 400, 120) y <- c(500, 112) I could calculate the median by joining the two vectors and then using the function median. median(c(x,y)) [1]…
-
8
votes2
answers156
viewsHow to Ensure Writing File on a Single Disk Block?
Performing several searches in a few days I found nothing that guarantees that my file will be written in a single block of the disk (I know that block is only a metaphor for sectors of the disk…
-
8
votes1
answer102
viewsWhat to do if the end user doesn’t want to collaborate?
After reading a lot about agile methodologies and Domain-driven design, I was convinced that it is of vital importance for the development of software that the domain specialist (who is often the…
software-architecture software-engineering project-management requirementsasked 7 years, 10 months ago SomeDeveloper 18,074 -
8
votes1
answer407
viewsReplace anchor by form button with calculation by javascript
I have the following code: function calc(){ var form = document.getElementById("form"); var a = +form.a.value; var b = +form.b.value; var result = (a+b); form.result.value = result; } <form…
-
8
votes2
answers1863
viewsHow to decrease compilation time?
I have a Solution with 20 projects, and most have a dependency relationship with each other. The build time takes a lot (6-8 minutes - may seem small, but it does a lot of damage when testing), even…
-
8
votes2
answers5548
viewsHow to get current directory name in PHP
I Googled and here on Sopt, but I did not find any site, or question here that would answer this question. Example: I’m on the page index.php who is in /5/index.php, then only the 5. How to print…
phpasked 7 years, 10 months ago Alexandre Lopes 2,769 -
8
votes1
answer713
viewsHow to put the scrollbar inside the body?
I stylized the scrollbar of my site for Webkit, and I put the background of the track as Transparent, but I would like Thumb to overlap with the body content, simulating a position effect Absolute,…
-
8
votes3
answers156
viewsDifference in behavior between for and for.. in
I have the following code that works exactly as expected (which is to go through the array, showing ONLY each element, in this case "Miguel" and "Celeste"): var runners = ['Miguel', 'Celeste'];…
-
8
votes2
answers9843
viewsExport to excel via javascript, put name in file
Guys I use the very simple routine below to export to excel, it works cool, but I would like to give a name to the file when exporting, but I didn’t want to use plugins or huge functions just add a…
-
8
votes1
answer290
viewsProgressidialog in C#
I’m trying to create a form similar to Progressdialog on android, in C#.. The idea would be that this would happen: //criar o controle na thread principal frmWaitingProgress fl = new…
-
8
votes2
answers1281
viewsGood practices in declaring variables in a for
I’ve been making use of Resharper lately and I’ve enjoyed the experience of using it, but something’s been puzzling me. At times he suggests that certain variables be declared within some scopes, as…
-
8
votes3
answers20664
viewsHow to get user IP via Javascript?
I have three commands that together return the user’s IP. I wanted to turn them into a single command with the command return. Kind of: return userip; How do I do it? Follow the code: <html>…
-
8
votes1
answer809
viewsSimple Injector + Uow + DDD + Multiple Contexts + Entity Framework
I need to know how to apply Ioc to two contexts. The scenario is as follows: I have a Layer called Core (allocates classes that I can reuse in other layers), where I put the interface of Idbcontext,…
-
8
votes1
answer377
viewsTo automatically fill fields when saving object in database
I have a system, in ASP.NET MVC which implements a form of audit, that when a user enters or updates an object into the database, some information is saved to an audit table automatically. The…
-
8
votes3
answers1381
viewsWhat is the difference between Data Annotations and Fluent API?
What is the difference between Data Annotations and Fluent API? Is there a restriction between one or the other? Improve performance or are just two ways to do the same thing?
-
8
votes1
answer2886
viewsHow to represent the MVC classes in UML?
How to represent the classes of the mvc model at UML? A colleague told me that he only puts Control in his modeling. Is that correct? Another question would be whether I need to put the connection…
-
8
votes1
answer67
views -
8
votes3
answers918
viewsParallelism and Simultaneity
Reading a few things on the subject, I realized they are not the same thing, so I would like to find out: What’s the difference between Parallelism and Simultaneity in proceedings?…
-
8
votes1
answer716
viewsIn Ruby on Rails is the business rule on the model?
In Java the business rule is in controller, but I heard a speaker saying that in Ruby on Rails the business rule is on model. Someone confirms that to me?
-
8
votes1
answer3889
viewsjava.lang.Unsupportedclassversionerror: Unsupported major.minor version 52.0 when running JAR
I have a project in Netbeans and I have to pass it to test for other users. I am running it on Ubuntu 14 and running the following command to run . jar: java -jar "TesteTableYasc.jar" However, when…
javaasked 7 years, 11 months ago Renan Alboy 119 -
8
votes1
answer705
viewsWhat is WRAP and UNWRAP?
Studying a bit of tuples I could not understand WRAP and UNWRAP because the explanation was not very concise. So what is WRAP and UNWRAP?
-
8
votes1
answer7625
viewsDifference between Triggers and Stored Procedures
What are the differences between Triggers and Stored Procedures?
-
8
votes3
answers761
viewsAbort AJAX request
I have a question. I need to cancel an AJAX request on the client side and the server side. On the client side I use the abort() var requisicao = $.ajax({ url : 'xyz.php' }); if(requisicao…
-
8
votes1
answer790
viewsXAML without previewer or designer - Visual Studio
I’m using Visual Studio 2015 Community with Xamarin, and I realized that when editing XAML in designer mode (Shift + F7) I can’t see the preview of it, because another window opens with the same…
-
8
votes1
answer245
viewsHow should the data of a route be stored?
I’m developing an application where a point route will be started A at the B and wish to save the coordinates to display the route later. How should this data be saved? Monitor any changes in GPS…
mobileasked 7 years, 11 months ago Marcelo de Andrade 7,261 -
8
votes1
answer1990
viewsJava - Send Email Securely via Gmail API
I’m using a API e-mail Mail.jar of this tutorial for sending e-mail via Java, but I realized I have to, activate the permission for less secure apps. There is another way to send email Java, without…
-
8
votes2
answers169
viewsDoubt in the statement between Arrow expression and function expression of an event
I have the following code snippet: self.addEventListener('push', event => {"code here"}); My question is... this writing format is equal to: self.addEventListener('push', function(event) {"code…
-
8
votes2
answers2458
viewsWhat is the purpose of Transactionscope blocks?
I have a code with several blocks TransactionScope and I didn’t quite understand its purpose. ModeloColDataContext dm = DataContextFactory.GetContext(usuario); { if (documento > 0) { using…
c# .net terminology software-engineering transactionsasked 7 years, 12 months ago Marco Souza 12,304 -
8
votes1
answer146
viewsHow do you create a "hidden" menu?
I have a Toolbar, and I want to make a settings bar on it. However, in order not to take up space, I would like it to be possible to hide/minimize it, something similar to teamviewer’s chat. My…
-
8
votes1
answer3930
viewsBest solution for three types of users
I’m starting to frameworks MVC with Laravel 5.3 I have 3 very different types of users, OperadoresDoSistema, AnunciantesDoPortal and ClientesCompradores, who can view the ad. Each one has his…
-
8
votes4
answers9085
viewsNOT operator in python
In java we have the operator not, we can use it like this: if (!metodo()) { //código } I’m just meeting python now, and I’m having a little trouble: I have a function that adds names to a list: def…
-
8
votes3
answers2879
viewsHow to know how many Sundays have php mysql months
Let’s say the year is: 2016 I need to know how many Sundays have the months of the year and save and result in php variable. Reason: I need to pass a condition,: if ($dom_mes == 4 ) { //CONDIÇÃO A }…
-
8
votes2
answers2782
viewsIs there a difference between assigning value using '<-' or '=' in R?
In practical terms there seems to be no difference, but underneath the cloth as language processes there is some difference?
-
8
votes3
answers10321
viewsselect from date in postgresql database
As I make a select in the postgresql database for it returns the data from a specific date, for example I have a field of type timestamp with name data_interview, I want it brings me the data…
-
8
votes3
answers6551
viewsHow to check if a value is date
How can I check if a post is of the type date? There was a situation where I have a form that contains a date field: <form action="" method="post"> <input type="date" name="data">…
-
8
votes1
answer93
viewsDoes Java misjudge memory usage values or is there something wrong with the algorithm?
I was studying GC and the doubt arose when I ran it below: public class Garbage { public static long carregarMemoria() { List<Integer> list = new ArrayList<>(); for (int i = 0; i <…
-
8
votes2
answers559
viewsHow to show the smallest age between 3 ages with Javascript?
How can I show the youngest age of 3 ages in javascript? <html> <head> <title> </title> <script type="text/javascript"> var idade1, idade2, idade3 ; idade1 =…
javascriptasked 8 years ago Leonardo Oliveira 111 -
8
votes3
answers1005
viewsForeach by reference or by value?
Is there a difference in performance and safety between using foreach by reference or by value? I always use the first option(when necessary) by finding the code less confusing to read. Reference:…
-
8
votes2
answers1783
viewsUsing variable with the sed command
I have the following occurrence: DirUpload=/var/log find $DirUpload | sed 's/$DirUpload//g' The question is, how to use variable along with sed?
-
8
votes1
answer257
viewsMakefiles, include function
I’m trying to analyze the makefile below. But I don’t understand how the bottom fits with the rest. %.d: %.cpp <TAB> g++ $< -MM -MT '$*.o $*.d ' -MD $(CPPFLAGS) creates a file .d containing…
-
8
votes3
answers182
viewsConvert date type 2016-10-04 15:51:16 to, 04-10-2016 15:51:16 to SQL or PHP how to do?
I’m doing a job to show the date and time of insertion in the script in the database, I have to show the date in the dd-mm-yyyyyy format and then the time, can I do it by the script’s SELECT or by…
-
8
votes2
answers2062
viewsWhat is the difference between angular.extend and angular.merge?
At the angle, to extend an object, I usually use `angular.exted var obj = {nome: "wallace"} angular.extend(obj, {idade: 26}) Upshot: Object {nome: "wallace", idade: 26} However, I realized that by…
angularjsasked 8 years ago Wallace Maxters 102,340 -
8
votes2
answers4529
viewsWhat is the concept of Stubs and Drivers in integration tests?
What is the concept of driver and stubs in integration tests, what is the difference between them? In what situations should be used?
-
8
votes3
answers1883
viewsHow to Create and read ". conf" files in C, for linux environment?
I’m studying C in linux environment. I have a problem in how to create a configuration file for my program to know what to do when running. Question Does anyone know how to store and read variables…
-
8
votes2
answers6589
viewsWhat is the file . env in Laravel 5?
What’s the file for .env? In the app.php has env => env('APP_ENV','production'). What would that be Production? What other string can go there? And the var APP_ENV? What does it mean?…
-
8
votes3
answers939
viewsWhat is the difference between Directoryiterator and Filesystemiterator?
In PHP, there is the class Directoryiterator. The Directoryiterator class provides a simple interface for viewing the Contents of filesystem Directories. There is also Filesystemiterator, that the…
-
8
votes2
answers291
views -
8
votes2
answers88
viewsSql Server 2014 Null Value
I am beginner in Sql server, I am in doubt regarding the following code: declare @var nvarchar(50) = null declare @bool bit if (@var = null) set @bool = 1 else set @bool = 0 print @bool The variable…
-
8
votes1
answer305
viewsImpact of the Garbage Collector
The project here of the company is done in Windows Forms and we do not manage memory very well, because it is a legacy system that has several years running. Currently we are facing problems with…