Most voted questions
150,413 questions
Sort by count of
-
7
votes2
answers3321
viewsConvert Character Frame Data Column to Numeric
When trying to convert the text values of a column data.frame, created using Stringasfactor = FALSE, in numerical terms, I obtained an abnormal result by coercion: > str(ccredito$Restaurantes)…
-
7
votes2
answers3695
viewsUsing string interpolation C# 6
With C# 6 and interpolation usage is better than concatenating string with data. As in the example. Instead of: var d = "19"; string.Format("{0} anos", d); looks much better $"{d} anos"; But using…
-
7
votes2
answers216
viewsMenu Centralized
I’m having many difficulties to align the text from my menu to the center, I’m now starting to learn how to develop websites. Screenshot: The code is like this: <center> <h1>Meu…
-
7
votes1
answer83
viewsHow to use contents of an array to mount the name of a file to be saved?
I’ve tried to use colnames(), names() and nothing works. My data is something like that (however, I have 38,000 names and 38,000 columns): nomes <- c("nome105", "outro.nome_26", "qualquerCoisa")…
-
7
votes1
answer488
viewsXamarin.Forms Portable or Xamarin.Forms Shared
What is the difference between a Xamarin.Forms Portable or Xamarin.Forms Shared project?
-
7
votes1
answer265
viewsHow to make ASP.NET MVC skins
How would make skins in MVC? where the client(user) could choose the skin (would change CSS, html, images, etc)? OBS¹: The Skin would be for all pages and each customer can have only 1 single skin.…
-
7
votes2
answers2809
viewsWhat is Copyright really?
I use the MIT license and it has this format as an example in https://opensource.org/licenses/MIT: The MIT License (MIT) Copyright (c) <year> <copyright holders> Permission is ... I also…
-
7
votes2
answers6247
viewsHow to get the current date/time, independent of the device?
Well, I know that when you create an object like Date: new Date(), the time and date of the device is returned, so if I arrive at settings and change these values, then the time returned will be…
-
7
votes3
answers22504
viewsHow to change the name of a column
I have a date.frame, I changed the data class of the date column and later I separated the other three column through the Separate command, whose names became %Y, %m and %d, I would like to change…
rasked 8 years, 5 months ago Fabiane Pereira 113 -
7
votes1
answer885
viewsWhat is the difference between readfile and file_get_contents?
In PHP, there are numerous ways to read the contents of a file. There are the functions fopen, file, file_get_contents, readfile, and even a class called SplFileObject. file reads line by line and…
phpasked 8 years, 5 months ago Wallace Maxters 102,340 -
7
votes3
answers617
viewsCreate temporary lock on the app
In the app I’m developing there is a usage policy, and if this policy is scammed I want to suspend the use of the app for 30 mins, how can I do this?
androidasked 8 years, 5 months ago Mateus Carvalho 1,494 -
7
votes1
answer1284
viewsCin vs scanf, which is faster?
In competitive programming it is common for several programmers to use scanf() and printf() in C++ code instead of using cin and cout. And I’ve even seen problems that result in a Time Limit…
-
7
votes1
answer776
viewsMysql very slow sorting for results with many records
I have two tables, the first is used to group the data of the second with some information about the set, in order to facilitate the pagination of the contents. Table 1: - id INT(11) NOT NULL…
-
7
votes1
answer2978
viewsPagination with large amount of data
Thinking about performance, what is the best way to paginate a large amount of data? I’m currently wearing a List<Produtos>, keeping around 500 products in it, and using subList(min,max),…
-
7
votes2
answers87
viewsSomatoria accumulating columns in a Matrix in R
I have the following situation : In a numeric type Matrix : Temp <- matrix(runif(25, 10, 100),nrow=5,ncol=5) V1 V2 V3 V4 V5 11 34 45 54 55 16 21 45 75 61 88 49 85 21 22 12 13 12 11 10 69 45 75 78…
-
7
votes2
answers4969
viewsAndroid: read JSON data
I have a url that gives me the data in this format: {"to": "DKK", "rate": 7.4417, "from": "EUR"} I’m trying to read them this way: JSONObject obj = new JSONObject(); JSONObject obj2 =…
-
7
votes1
answer391
viewsIn R, correct typing errors followed by a database processing
This problem is quite complex and needs two stages. The first stage consists of correcting typing errors in a database (perhaps a probabilistic solution). The second stage is to tidy up this…
-
7
votes1
answer2359
viewsDifference in the application of Dijkstra and Prim algorithms
What is the basic difference in the field of application of Dijsktra and Prim algorithms? What problems does one solve that the other cannot solve? Having, for example, the following situation: it…
-
7
votes1
answer3054
viewsBower - What is, what is its utility and how to use it?
In project files and mostly front-end frameworks I’ve seen much, much even the file Bower.json and I believe he’s a file like composer.json, package.json, Gruntfile.js, README.md, so I’d like to…
-
7
votes1
answer188
viewsSecurity, what threats besides an SQL Injection do I have to worry about a search field?
I’m getting deeper into web programming (with php) and I have this doubt, I’ve seen some similar things in some places, but going straight to the point I wanted to tell me what are the main security…
php web-application security-guard quest sql-injectionasked 8 years, 6 months ago Rafael Nobrega 194 -
7
votes1
answer5232
viewsWhat do the terms MDI and SDI mean regarding the software interface?
What do the terms mean MDI (Multiple Document Interface) and SDI (Single Document Interfaces) regarding the software interface? I read about it, but I’m still confused about the terms, perhaps for…
-
7
votes1
answer1859
viewsDifference between a blocking language and a non-blocking language
In practice, what is the difference between a blocking language and a non-blocking language? What differences can we see in both front-end and back-end? Using an example, let’s imagine an endpoint…
-
7
votes3
answers161
viewsAre objects similar to arrays?
Objects are arrays in Javasscript? I have difficulty understanding how this is possible: var obj = { title: 'some value' } console.log(obj['title']); // some value In my conception the use of square…
-
7
votes3
answers965
viewsHow to put a title in the angular-Chart caption
On my line chart I wanted that when you hover over the chart line when the caption appears, and that it had a title. This is only possible by filling the array of Abels, but appears below the graph,…
-
7
votes2
answers736
viewsWhat is the advantage of using Junit to test methods in a class?
I created an application that is basically a class that tests if the methods of another class are returning the expected values. My teacher asked me to remake this class as a Junit test case. I did…
-
7
votes2
answers318
viewsSeparate values from each array
Good morning, everybody, all right? I have the code that prints the different values found in 2 arrays and these values are saved in the different variable ($different) I need to know how to print…
-
7
votes0
answers163
viewsRecalculate route with Google Maps API
I’m making a tracking app. I wanted to send an alert in the Google Maps Javascript API when the user changes the route or the route is recalculated. I would like to know how to calculate the route…
-
7
votes3
answers1360
viewsFaster way to access properties in a C#list
I have a project that works with a large volume of data, and I need to optimize it to bring results of some calculations in a considerably small time. I know that I have several aspects to take into…
-
7
votes1
answer150
viewsWhat are the rules for building an HTML email?
I’m about to build an HTML email, but I see there are differences for a common website page. I want the HTML email to have css and appear both on desktop access and tablet and mobile, and should…
-
7
votes1
answer3632
viewsHow to know which jquery version was loaded
The code below shows me perfectly if the jQuery was or was not loaded: if (jQuery) { $('div#home_login').attr('style', 'background: green'); } else { $('div#home_login').attr('style', 'background:…
-
7
votes1
answer566
viewsDynamic Memory Allocation X vector
I was studying this subject in C, and in most of the places I look for, one of the examples of using this resource is when you’re going to create a vector whose size you don’t know. Example: int…
-
7
votes4
answers19788
viewsHow do I update with a Join?
Hello, I’m new to the forum and I need some help with SGBD Postgresql. My doubt 'and the following, in the following code used in DBMS Mysql the execution happens perfectly, by'em in Postgresql…
-
7
votes2
answers1185
viewsWhich pattern to use: HTML5 or XHTML5?
Why should we not mix the two and which of the patterns is most useful today?
-
7
votes1
answer140
viewsIs it correct to omit the "true" value of the Boolean attributes inserted in the HTML elements?
When we insert attributes Boolean in the elements (tag) <html> we do not need to inform the value true, its mere presence already confirms, by default, that this attribute is active. Example:…
-
7
votes1
answer457
viewsHow to create a Custom Attribute?
For some time I’ve been trying to understand the concept of custom attribute of C#. I think it kind of looks like the system of decorators from Python. But I’m not getting it very well. I read in a…
-
7
votes3
answers212
viewsWhat Does This CSS Code Do ?
This is looking at some snippets of code on the Internet for a deeper learning of CSS, and I saw this code contained in a menu and I would like to know its functionality. .nav:before, .nav:after {…
-
7
votes4
answers1015
viewsProblem with pennies when using the Biginteger type
I’m having a problem adding up pennies. Informo 1200, returns 1.200,00 instead of 12,00. Code: formatar_data(1200); private int formatar_data(int inteiro){ BigInteger valor = new…
-
7
votes2
answers692
viewsWhat is the purpose of the super command when used in the parameter declaration of a method?
In Java the command super has the function of calling the superclass constructor. However, in the method declaration forEach() class ArrayList it is used in a different way than usual, see the…
-
7
votes2
answers1148
viewsHow to get all selected values in a Datagridview?
I’m trying to get all the selected values in one DataGridView and add to a IList<Object> but shows an exception. How to do this ? I’m trying like this. IList<Modulo> lista =…
c#asked 8 years, 7 months ago FernandoPaiva 1,562 -
7
votes1
answer94
viewsUpdate to 2K records <Clients> how to do a single update instead of 2k separately
I have a Customer Model and need to do an update on EnviadoEmailCobranca para 0 I’m doing like this: var clientes = db.Clientes.Where(w => w.Status == 4); foreach (var item in clientes) {…
-
7
votes2
answers611
viewsSuggestion Migration System and modeling of individuals and legal entities in system with Entity Framework
Well, here’s the thing. I have a database that has the purpose of making a company’s ledger, basically this bank has a table CaixaCorrido with the columns Id, PessoaNome, DataHora, Descricao, Valor,…
-
7
votes4
answers2291
viewsHow to do a search inside this vector of objects?
How would I search for a record within my object? The program is a schedule of contacts, and I wanted him to do the search by the name I type in a Jpane and return the contact data searched. Here is…
-
7
votes2
answers2701
viewsWhich is more secure: Session or cookie?
Thinking about security guard, what is the best option to keep the user logged in an ASP.NET MVC application, the cookie or the Session?
-
7
votes2
answers515
viewsAre Ltenatives for complex conditions in a lambda expression?
With lambda expressions it is possible to filter elements from a collection of objects, creating a data stream according to the criterion passed in the expression for the method filter(), This…
-
7
votes2
answers1242
viewsHow to multiply an "X" character as many times as you want?
Is there a method that multiplies an "X" character as many times as I want? example: I have the character "P" P x 5 = "PPPPP" Is there any ready method in . Net?…
-
7
votes1
answer521
viewsWhat are the advantages of using directives and macros?
Directives and macros influence program performance?
-
7
votes1
answer2836
viewsDifferences about WCF, Webservice and Webapi with Asp.net?
I will create a service to make my company’s data available to a client. But I am evaluating the creation of the services and I came across this technical doubt. I know there are differences between…
-
7
votes3
answers1072
viewsWhat is and what is the function of . (dot) in POO?
A long time ago a teacher defined and explained the function of . in POO (Java class). With time I ended up forgetting, but I found it quite interesting, often we think is just a "point", however,…
-
7
votes1
answer1729
viewsWhat are the modules?
Whenever I read about Java 9, I see assertions that the big change in the next version of Java will be native module support through Jigsaw Project. Then comes the criticism of adopting a new…
-
7
votes5
answers7569
viewsHow to delete COOKIES in PHP?
How can I delete COOKIES in PHP? I know that for sessions you have the session_destroy() but for Cookies how do I?