Most voted questions
150,413 questions
Sort by count of
-
7
votes2
answers477
viewsAlternative to Scanner for Data Entry
In java, when we’re learning to capture data input, usually by text mode, we’re told to use the class Scanner. Is there any alternative to Scanner to capture data input by text mode? If so, how does…
-
7
votes1
answer604
viewsDifferences between listeners and Adapters in swing
When programming java graphical interfaces using swing, we always come across both types, mainly to assign and create events from button actions or other components. Though I’ve been messing around…
-
7
votes2
answers998
viewsIs there any way to change a commit message?
I work with git in all projects of the company where I work. Unfortunately, some programmers end up posting some kind of message, in a hurry, in a commit. This makes things difficult, because…
gitasked 8 years, 8 months ago Wallace Maxters 102,340 -
7
votes1
answer14471
viewsRemove PHP from Ubuntu 14
I used the following commands to remove PHP from Ubuntu: sudo apt-get purge php5 php5-cli libapache2-mod-php5 php5-mysql phpmyadmin sudo rm -rf /etc/php5 But when executing the command php -v at the…
-
7
votes1
answer144
viewsShare types between API and client application
I am developing a REST API using ASP.NET Webapi 2 and, as I come from the old SOAP standard, I’m used to type sharing between the API and the client. That is, when referencing my service in the…
-
7
votes2
answers327
views -
7
votes3
answers1566
viewsConvert World/Excel to PDF
Does anyone know of an open source api for converting world and excel documents to pdf? I am currently using windows Interop however it only works if I install the office on the server. I need to…
-
7
votes2
answers16310
viewsHow to find an address by latitude and longitude
How do I get the full address of a geolocation, ex: Lat. 37.386196601958 Lon. -121.964346639 (Street tal, Neighborhood tal, cep: tal)
-
7
votes2
answers222
viewsUpdate model partially with Webapi2
I am starting to develop a REST API using ASP.NET Webapi2. In my controller, I’m using the method PATCH to apply partial changes to a model. I have a method that is this way [HttpPatch]…
-
7
votes1
answer234
viewsMy CSS file is very large and it is difficult to maintain readability
My CSS File is close to 10,000 lines. It’s getting too complicated to maintain this file. in its Development version the file "weighs" 170kb and in its minified version, "only" 128kb Some points to…
-
7
votes3
answers454
viewsWhy was the parameterized class attribute <T> not instantiated?
I have this class that implements the IDAO interface package DAO; import java.util.ArrayList; public class BdApp<T> implements IDAO<T> { ArrayList<T> lst = new…
-
7
votes4
answers2128
viewsHow to create a custom context menu?
When right-clicking on certain areas of the page appears the Popup browser default: I’d like to show my own Popups customized! It is possible to intercept the click and open a different menu? Note:…
-
7
votes1
answer183
viewsHow to move an enlarged image with finger in Imageview?
Based in that answer to the question when zooming in, how to move the image with your finger to see the other part of the image.…
-
7
votes1
answer6022
viewsHow to crop a gallery image or photo taken by the camera, save and upload to an imageView
I would like to know how to cut an image from the gallery or photo taken by the camera, save and upload to a imageView, to be able to do that for the gallery option of intent, but for the camera…
-
7
votes4
answers1750
viewsHow to create a list of dates of the year in php, skipping the weekends?
I need to create a list of dates in PHP, where I will list all dates, from the first day of the year, until the last. However, in this list, dates referring to the weekend (Saturday and Sunday) must…
-
7
votes2
answers4076
viewsSimple example of how to generate an XML file on Oracle
One would have a simple example of a PLSQL Procedure (or documentation location) to generate an XML file based on a Schema (xsd), the data would be generated from an SQL query. In reality archives…
-
7
votes2
answers238
viewsDoubt with recursiveness
I took a table test but the results will never come 0 because I subtract 1 of n but then adds the result with n. The result of this question was 36 and I don’t understand why. public class…
-
7
votes1
answer85
viewsMechanisms for form validation
What are the pros and cons of validating forms with these features: HTML5? Javascript? Jquery? HTML5 + Javascript/Jquery? There is something to consider beyond these items?…
-
7
votes2
answers813
viewsHow to prevent the page from opening outside an iframe?
Cannot open link in iframe if (self != top) { top.location.replace(window.location.href) } I need something in javascript that is contrary to this. I want my URL to work only within an iframe…
-
7
votes1
answer310
viewsMany Update to Many Entity Framework c#
Good morning, I am having difficulty updating a record with entityframework, I will inform the whole structure below. In short, I have a register of artists, where these artists are related to…
-
7
votes3
answers4285
viewsUse of colon character ":" in Python
In Python there is the character colon :, therefore, what I understand of this character is that it is used in functions def soma(x,y):, conditional commands if soma > 100: and for classes class…
-
7
votes3
answers1081
viewsSort chained list with O(n*log(n) method)
I need to sort a chained list (own implementation, without using Java API) with a sorting method that has O(n*log(n) complexity. Researching methods that satisfy the condition found the quicksort,…
-
7
votes1
answer1464
viewsSimple permutation algorithm
I’m trying to create a simple permutation algorithm where you pass any number for example 123 and it should return the largest number without repeating. I tried something like this more when I pass…
-
7
votes1
answer3570
viewsWhat is the purpose of using inline functions in the C language?
I would like to know what is the purpose of functions inline in the language C? Is there any difference in performance or other characteristics that should be taken into account in comparison to…
-
7
votes1
answer950
viewsVector within vector. What does it do in this context?
Forty students were asked the level of quality of food in the student canteen, on a scale from 0 to 10. ( 1 meaning horrific and 10 meaning excellent). Put the 40 responses into an entire array and…
-
7
votes1
answer892
viewsSort a search result with filter
I have a search on the site and I can opt for several filters and it already works by returning and paging correctly. Example: /empresas?estado=2&tipo=3&page=2 The problem is when I click…
laravelasked 8 years, 9 months ago Eduardo Cruz 81 -
7
votes2
answers2252
viewsSelecting a value from a Listview row/column populated by LINQ to SQL
Through the double click event I need to pull a value from a row/column in a Listvview populated by LINQ to SQL. For example, when the user needs to select a value from a row/column of this…
-
7
votes2
answers8390
viewsWhere is the constructor of the class in Python?
Definition of Wikipedia. The builder is a method which is generally responsible for allocating the necessary resources to the operation of the object beyond the initial definition of the variables…
-
7
votes2
answers2040
viewsHow to store the value of the indexes of this JSON in variable?
I have a function in php that returns it to me. [{"id":81,"username":"usuarioteste23"}] How can I save in a variable this ID and in another variable this Username? Thank you.…
-
7
votes1
answer1916
viewsHow does Firemonkey(Delphi) compile for Android?
I did some research but did not get good results, the project folder looks like a common Delphi or C project++! VCL - Delphi FMX - Firemonkey Observe: With the exception of the folder Android, where…
-
7
votes2
answers1573
viewsShow real-time loop result
I’m using a loop to send emails from an array. Every time the loop runs the function sleep(4); is executed. The problem is that php output only happens at the end, ie the lines echo…
-
7
votes2
answers3006
viewsHow to capture the first letter of a String name and if the letter is 'C' save the name in an array?
I have an algorithm that reads a name of someone and if the name starts with the letter "C" should capture the name and save in the vector. I’ve tried it anyway but I can’t do it. public static void…
-
7
votes1
answer443
viewsHow do I send 200 emails (not a newsletter) without running the risk of going to spam list?
Every month we send 200/300 handwritten emails with variable text to the month’s customers (not a newsletter). Via PHP I can make the text dynamic, and send automatically, but the problem is sending…
-
7
votes1
answer272
viewsHow to know the arguments contained in '...' in a function in R?
In R can be used '...' so that the function receives an undetermined number of arguments. How to know which arguments were used in the function? Example, if I wanted to print the arguments used.…
-
7
votes1
answer1358
viewsHow to activate the modal through the option in a select?
Example: When I select the "Volvo" option, the modal appears... <label>Recinto</label> <select class="form-control" data-toggle="modal" data-target="#cria-recinto"> <option…
-
7
votes2
answers2249
viewsWhat is the purpose of the pseudo-elements "::before" and "::after"?
I find many codes that use these pseudo-elements and I "fly" when I see them. The few tutorials I found on the Internet did not explain clearly and I was left with more doubts. After all, what is…
-
7
votes1
answer1438
viewsGenerate header when exporting data to excel
I did an export routine for the excel, using StreamWriter, but it causes me a problem. I can’t get the name of the columns that come in select. To make the header, I had to put it in the hand. This…
-
7
votes1
answer2234
viewsManipulating an open window from the parent window with Javascript
I’m thinking of using the native resource window.open() to create a small web system that is similar to desktop systems (made with windows Forms). My problem is in relation to communication and…
-
7
votes1
answer3041
viewsCheck if an application is installed on the device
I need help to check if an application is installed on the user’s device. Situation 1: I need to perform a search on the user’s mobile and check if there are any installed applications. If you find…
androidasked 8 years, 9 months ago dnsfirmino 401 -
7
votes1
answer751
viewsIs it possible to add Origin in the Header of a redirect according to the HTTP protocol?
I am implementing an application where I need to perform a redirect from one server to another and am encountering problems. While performing a redirect, receive the following error message:…
-
7
votes1
answer6278
viewsHow to filter the file format by input type file?
When it is sent I do a validation checking if the chosen file is the format I need so: function validaExtensao(id) { var result = true; var extensoes = new Array('xls'); // Arquivos permitidos var…
-
7
votes2
answers1833
viewsError: Object of type 'float' has on Len
I was thrashing simple operations on the Python interpreter, and the following command made me curious: >>> b = 3.12; len(b) With the following error: Traceback (Most recent call last):…
-
7
votes1
answer2296
viewsRounding as a result of multiplication
I have this scenario: - multiply by 2 values which will be rounded to 2 boxes for the table to be inserted. Follow the example: CREATE TABLE #TMP ( A DECIMAL(23,6), B DECIMAL(28,2) ) INSERT INTO…
-
7
votes3
answers108
viewsHow can I restructure information contained in a list object into two columns?
Considering a list x composed of nvectors. To illustrate the problem I thought it had 3 elements, as follows: >x $`2751006` [1] 106.2 75.4 65.4 87.4 76.8 196.4 74.2 $`2751007` [1] 73.9 110.1…
-
7
votes1
answer118
viewsHow to use the first-Child selector for a specific class
Hello, I have several Ivs and some of them have a 'test' class, I would like the first-Hild selector to highlight only the first DIV that has the 'test' class, but it only works if the 'test' class…
-
7
votes2
answers2360
viewsFill Jcombobox with an object
I would like a help to fill one JComboBox with a class. In this class, return two parameters: Id and Desc. Category class I need to show in combo: private int Id_categoria; private String…
-
7
votes2
answers2411
viewsCount how many pixels of a color the image has
I am working on a solution for tattoo studios. I would like to know how it would be possible to determine how many pixels a certain color exists in the image inserted in pictureBox1. In this image,…
-
7
votes3
answers6440
viewsHow to check if an item is contained in an array?
What am I doing wrong in this if? if (angular.uppercase(nome[id]) in ['A', 'E','I', 'O', 'U']) { .... } If I only do so it works. But I will have to repeat to others. if (angular.uppercase(nome[id])…
-
7
votes5
answers675
viewsWhy does Netbeans warn you not to access global variables directly?
Netbeans suggests that we do not access the global variables of PHP type $_SERVER[''] directly, what is the suggestion in this case? It’s usually done this way: <?php $ip =…
-
7
votes3
answers25438
viewsHow to run programs written in Python in windows by hiding terminal feedback
I have the following situation: I have a program written in python that works with Gtk + Webkit + flask. To run such program I must enter from CMD and type "python.py file" and it starts my GUI…