Most voted questions
150,413 questions
Sort by count of
-
5
votes1
answer303
viewsPass object to Webservice
I’m starting the development using Webservice + Windows Form and I did some silly methods passing parameters, however, I came up with the idea of passing an object as parameter where the Web Service…
-
5
votes1
answer709
viewsWhy is strcpy() insecure?
I’m reading about secure programming, and I read that function strcpy(), of the C language, is an example of insecure. I also read that there is a secure version of this function, which would be the…
-
5
votes2
answers1731
viewsConceptual model
I was looking at the conceptual model diagrams, I saw some that contain the attributes and entities like this: And others who only have the Entity: Which model is correct? or are both? Is it…
-
5
votes1
answer350
viewsHow to make a process wait for 'brothers'
Hello. I need to create a process tree, until the moment what I was able to do was create a side of the tree, kill everything and then create the other side. But I need to raise the whole tree first…
-
5
votes1
answer10433
viewsWhat is the difference between Sorted() and . Sort()?
Why the function sorted() is considered more direct than the method .sort() used in lists with tuples?
-
5
votes1
answer267
viewsGit Pull removing files
I have the following problem: I’m performing one git pull and by bringing from the server something, the commit is automatically removing files. Example : removing Projeto/arquivoX removing…
gitasked 8 years, 6 months ago Matheus Domingos 161 -
5
votes2
answers1742
viewsProcessing time of functions
How I check the processing time of the subfunctions of a function in order to optimize it? I read about it in R help and in:…
-
5
votes1
answer6802
viewsHow do I resolve merge conflicts with git?
I had a merge conflict problem in git. This problem happened when two people were making the same modifications to the same file. The first person committed and I went to do another commit after it.…
gitasked 8 years, 6 months ago Jéssica Dias 161 -
5
votes2
answers6061
viewsQuery specified Join fetching, but the Owner of the fetched Association was not present in the select list
I have a scenario with the following entities:Treinamento, Curso and Aulas. A Treinamento has a relationship ManyToOne for Curso. And Aula has a relationship ManyToOne for a Curso. I want to perform…
-
5
votes1
answer92
viewsWhat is the equivalent of the PHP array_map in C#?
In PHP, can create a new array based on a array already existing, using the function array_map. With it, I can define a callback that is responsible for the definitions of each value that will be…
c#asked 8 years, 6 months ago Wallace Maxters 102,340 -
5
votes3
answers1037
viewsWhere dynamic Linq to SQL
I need to build a clause where with the field and dynamic value, for example, in pure SQL would be: WHERE :CAMPO = :VALOR However, searching the research I could not find anything specific, I’m…
-
5
votes1
answer423
viewsRedirect jsp page using Springframework
Hello! I have the following problem in redirecting the index.jsp page to the.jsp login page, in Tomcat it only appears that this page was not found, ERROR 404. If anyone can help, I’m using and…
-
5
votes1
answer4900
viewsWhen to use the http Patch method?
I did some research on the method PATCH, and saw that it makes partial modifications, but did not understand in practice when to use it and what is its difference to the PUT. I am looking for a…
-
5
votes3
answers1837
viewsGet back deleted files in Git
Friends, good afternoon. I removed some files inside the server, but I need them again, I have them in the git repository. How do I redownload the repository files?
-
5
votes1
answer3648
viewsHow to insert Access-Control-Allow-Origin in the header
Dear Friends, I am making an ajax request by JQuery.Ajax(), to consume a WS SOAP, the envelope is OK but when I make the call I get in the browser "No 'Access-Control-Allow-Origin' header is present…
-
5
votes1
answer167
viewsTemplated Method - Is it possible to implement with composition rather than inheritance?
To create a Thread we can both extend the class Thread and overwrite the method run(), how to have a class that implements the interface Runnable, implement the method run() and pass the reference…
-
5
votes2
answers989
viewsProblems comparing dates with Calendar
I am developing a system for hotel and reservation I need the date of entry is greater than or equal to that of the reservation, and the exit is greater than that of the entrance. I made these…
-
5
votes2
answers801
viewsKeep table records synchronized between two different databases
We are performing a system migration, where some restructurings will be done in the current bank in a new bank. Basically I will have two banks BancoVelho and BancoNovo, having to keep both of them…
asp.net-mvc asp.net sql-server entity-frameworkasked 8 years, 6 months ago Pablo Tondolo de Vargas 5,444 -
5
votes3
answers538
viewsAverage only in typed fields
Hello, I’m programming a system where you average some fields. The point is that not always all values will be informed and the average should calculate the fields in which there are values, that…
-
5
votes2
answers912
viewsGood practices for PHP MVC
I am deepening on the use of MVC using PHP, and after seeing some lessons and articles on the Internet I had some doubts about its use, since I found classes that present the same case differently.…
-
5
votes1
answer5689
viewsDifference between hours greater than 24 hours excel
How to calculate difference between hours in Excel when it exceeds 24 hours? Example: A1 = 05/01/2016 11:40:53 B2 = 06/01/2016 12:29:53 B2-A1 = 24h:49min But he returns 00:49…
-
5
votes2
answers380
viewsAlgorithmic complexity of map
Could you tell me the algorithmic complexity of this code, in particular, what the complexity of the function map numero = map(lambda x: x[0], lista) map(lambda x: (numero.count(x)),…
-
5
votes0
answers93
viewsWhat is the difference between the keyword Let and var in Javascript?
I was studying about Redux, and I realized that in the code there were many variables being declared preceded by Let, instead of var. I was in doubt, what is the difference between the two…
javascriptasked 8 years, 6 months ago LF Ziron 2,185 -
5
votes1
answer186
viewsASP NET MVC standard
I am learning ASP.NET MVC and would like to learn about design patterns, I have a lot of doubt on how to assemble my Solution. I would like to know the default names for Solution, folders, layers,…
asp.net-mvcasked 8 years, 6 months ago Mauricio Ferraz 2,074 -
5
votes1
answer95
viewsDo static methods equate to functions?
In OOP we have static methods (do not depend on any instance variable). Citing examples: class Somar { public static function soma($a,$b){ return $a+$b; } } echo Somar::soma(20,30); The equivalent…
-
5
votes1
answer3359
viewsError; Connection has not been closed. Current connection status opens Sqlserver 2016
I am creating an application in visual Studio in C#, and when connecting to sqlserver in Server Explore, everything was correct in connection test. This is my connection string: return "Data…
-
5
votes2
answers4322
viewsHow to make decision structure to change color in a bat?
Hello, I would like to know how to make a decision in the following situation: I have a cmd window with a constant ping, I wanted the script to analyze when the ping is normal the letters of cmd are…
-
5
votes1
answer718
viewsHow to destroy a Session in java?
To invalidate a session, my teacher passed the following code: HttpSession session = request.getSession(false); if (session!=null){ session.invalidate(); } But after the logout, when I click Back in…
-
5
votes3
answers10165
viewsRemove non-numeric characters from a string
Example: I have the following string "M1245D454" and I need to just leave the numbers on it. M and D are examples, I want to remove any non-numeric character. There is some function in C# or VB.NET…
-
5
votes1
answer11573
viewsWhat is the difference between normal dump-autoload and optimized dump-autoload in Composer?
In the Poser it is possible to automatically generate autoload using the command composer dump-autoload. But it is also possible to generate an "optimized autoload" through the command composer…
commiserateasked 8 years, 6 months ago Wallace Maxters 102,340 -
5
votes1
answer1028
viewsDifference between new project command and create-project command
What is the difference between commands laravel new nome-projeto and composer create-project laravel/laravel nome-projeto --prefer-dist? In both cases the result is the same but in the case of via…
-
5
votes2
answers3711
viewsHow to store Credit Card data securely?
Currently I use third party services to handle online transactions via credit card, they store the card data themselves and make the charge. I am wanting to store the customer’s credit card data in…
-
5
votes4
answers181
viewsUnidentified error in Jquery
This error occurred in a script of mine, but in my script there is no such line break that the error is showing. The description of the error is exactly this: Uncaught Syntax Error: Unexpected Token…
-
5
votes2
answers194
viewsWindows Universal Apps C++ vs C#
What’s the difference between C# and C++ to develop universal apps? I saw that in the templates of Visual Studio 2015 for C++ there is a group Cross Plataform with app templates for android and Ios.…
-
5
votes1
answer70
viewsProperty access modifier C#
I noticed that it is possible to sign a property access mode as private: public string Codigo { get; private set; } Or just ignore it: public string Codigo { get; } Is there any difference or…
-
5
votes2
answers937
viewsHow to remove CSS and Javascript blocking files in Blogger, such as Widgets.js?
I’m trying to optimize the loading speed of my Blogger site by removing unnecessary CSS files that I don’t use, nor do I intend to do in the future. For example: <link type="text/css"…
-
5
votes2
answers10981
viewsConcatenate char variable text in printf
I need to concatenate the name of the person (variable) with a text. Following the logic, it would look like this #include <stdio.h> int main (void){ char nome[6]; printf("Ola! Insira seu…
-
5
votes2
answers612
viewsAccess items from a stack using for
I’m trying to access a forward position in the pile to make a comparison, but it’s not working and I couldn’t understand this for. Code for ( String UmToken : PilhaTokens) {…
-
5
votes1
answer118
viewsFilter using calculated value does not work in Django
I have a model in Django with fields largura and comprimento, and would like to filter it by area: class Projeto(models.Model): largura = models.DecimalField(decimal_places=0, max_digits=4,…
-
5
votes1
answer609
viewsLoading multiple images through Javascript
I’m trying to load an image through Javascript but it didn’t work. HTML looks like this: <img src="img/bola.jpg/>, but in Javascript I don’t know. The code below is to show loading multiple…
-
5
votes1
answer566
viewsCreate inputs for images dynamically and move to Servlet without redirecting the page?
I would like to create a button that brings up a input for sending images. This button can be used multiple times. When the user(a) click the Submit, these images should be sent to the server…
-
5
votes1
answer1790
viewsImport Excel to Sql Server C#
I need to import a file excel for a table SQL. However, I need to pick up the lines and go between them because it won’t be all the information I will get from excel. I have exactly what I need but…
-
5
votes2
answers4277
viewsapplicationx-www-form-urlencoded with Httpwebrequest
I’m making a system to authenticate the Token (derived from the credit card) next to Cielo. This token has special characters like + Cielo receives the data via XML. I made the following code to…
-
5
votes1
answer540
viewsUpload multiple photos with subtitles
I’m having a relationship problem between the caption and the photo while uploading. I’m uploading multiple photos and each photo has a caption. The code goes something like this html <!-- form…
-
5
votes2
answers191
viewsReload script whenever the event happens
Hi. I was looking and I couldn’t find anything related around here, so I’m coming to ask. I’m working with the one plugin 'http://tympanus.net/codrops/2014/10/30/resizing-cropping-images-canvas/',…
-
5
votes2
answers84
viewsWhy does the new instance of Actionlistener receive a parenthesis and a ;(semicolon) at the end?
I’ve never seen this kind of code structure in the instance, what does it do? The class ActionListener To instantiate it, you have to put it like this: ActionListener trataEventos = new…
-
5
votes2
answers502
viewsTime Series autocorrelation
Consider the stochastic process AR (1). Generate a sequence of 500 random variables and assume c = 3 and Phi = {0.5, 0.95, 1}. Make autocorrelations from 1st to 3rd order (CR). How to generate these…
-
5
votes1
answer144
viewsHow to manage a project with several variations?
How you manage the development of an application that is replicated to multiple customers? My setting: An application web and 2 apps (1 for iOS and 1 for Android). For each client the base (master)…
-
5
votes2
answers207
viewsProcedure "complex"
Hello. I’m learning procedures and I have a question: DELIMITER $$ CREATE PROCEDURE `atualiza_telefone` (IN telefone INT) BEGIN IF (telefone IS NULL) THEN SELECT * FROM cliente; ELSE UPDATE cliente…
sqlasked 8 years, 7 months ago Mateus Binatti 401 -
5
votes1
answer1818
viewsHow to make a placeholder in a Textbox?
How can I simulate a placeholder using WPF? Something like the input HTML where you click in the field it adds the text and when you change it returns the text? Remembering that it is in WPF,…