Most voted questions
150,413 questions
Sort by count of
-
4
votes3
answers667
viewsDoes the PHP method have line limits?
The size of the method is 22 lines. (20 Allowed) Netbeans gives me this "warning," so why? It’s a PHP rule? What’s best: A great method with all the code he needs. Split this code into smaller…
-
4
votes1
answer1765
viewsCan I have more than one builder per class?
The question is simple personal: I can have more than one constructor in the same class? At first, I will need to define the variable plugin in my object, then I will use the constructor that…
-
4
votes2
answers836
viewsWhat code should be used to focus a Textbox?
What code should be used to focus a Textbox? I am creating a system, where I need that when the client keystrokes ESC, the focus of the textbox is lost. How do I do?
-
4
votes2
answers1335
views$_GET gets ID or name value?
The $_GET, or even the $_POST, take values from the ID of the input or of name? <form action="#" method="get" name="meuForm"> <input id="nome" name="nome" type="text" value="Teste">…
-
4
votes2
answers1415
viewsAlgorithm to capitalize the first letter of each word
I need to do this exercise to create algorithm in Javascript: "Create an algorithm to format names leaving the first letters uppercase, example Oliveira Baptist Law => Rodrigo Baptista De…
javascriptasked 7 years, 4 months ago Christopher Lima 43 -
4
votes1
answer359
viewsOverwritten txt file in C
My doubt is very basic: How do I stop, whenever I write something in a file (txt), always start recording after the information that was already written there? I mean, how do I not overwrite the…
-
4
votes1
answer10235
viewsWrite file . txt Node.js
I need to generate a txt file with some information and save it to C: How can I do this using Node.js?
-
4
votes1
answer727
viewsError closing serial port in c#
I am new in C#. I made a program, which keeps continuously reading the data from the serial port and showing in a textbox. Until then, everything works well. The problem occurs when I try to close…
-
4
votes3
answers2714
viewsFailure to log in to an IIS application when trying to connect to Sqlserver
When I run an application of the type website in visual studio, database connections work normally. But when trying to run IIS 7 to perform some tests, I get the following message: Unable to open…
-
4
votes2
answers4935
viewsRemove Visual Studio Code Side Panel
You can remove the side panel of Visual Studio Code?…
visual-studio-codeasked 7 years, 4 months ago Guilherme Kuhnen 95 -
4
votes1
answer853
viewsHow to find the function name of a DLL?
I’ve used the DLL Export, Dependency Walker, dumpbin, PE Explorer and the result for several Dlls I need to use is always the same with two functions: CLRRP and GETRP.... parameter-less. I know the…
-
4
votes1
answer229
viewsCheck the number of copies that have been printed
Hello, I have a table that when printed generates a record in a txt telling the user who printed, on which machine, on which printer, which document was and when. But I would also like to register…
-
4
votes2
answers1350
viewsAdd seconds to time - Excel
I have a column with the following values: 945 224 554 487 That would be the seconds I need to add to another column with time, minutes and seconds 12:09:37 23:54:45 10:40:44 11:20:10 I’m doing it…
excelasked 7 years, 4 months ago Gabriel Bernardone 563 -
4
votes1
answer244
viewsSet MIME-type of a file on Android
I need to dynamically figure out what the MIME-type of a file is. Initially, I only need to identify videos, but I intend to use this to identify HTML pages, photos, PDF etc.
-
4
votes1
answer66
viewsProblems with Nullpointerexception
I am making a Java application using primefaces 5.1 and was working correctly the part of deleting students in version 2.1 before upgrading to version 5.1. I am trying to delete a student, but this…
-
4
votes1
answer1266
viewsWeb Scraping Selenium + Python on JS-generated website = difficulty mapping elements
Good afternoon. I am developing a script that: accesses a system; within the environment, you will find certain information; generates a kind of report; creates a spreadsheet with the data. My…
-
4
votes1
answer2932
viewsCalculate covariance matrix in R
Given a matrix whose elements are values of a given attribute in n positions in space. How to calculate the covariance matrix (nxn) of the values of this attribute at the given positions?
-
4
votes1
answer195
viewsTrying to upload JPG via Javascript and Ajax
I created the following form below on a client’s website, so that you can change a user’s photo: <form id="formulario" method="post" enctype="multipart/form-data"> <div…
-
4
votes2
answers269
viewsUnderstand error message
I’m not getting this error message. Someone understands and can help me? Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.Arrays.copyOf(Arrays.java:3210) at…
-
4
votes2
answers742
viewsWhat is Python’s native support for database manipulation?
I found things about a module called mysqldb, but I couldn’t find documentation available on Docs.python.org Please disregard responding with frameworks such as Django.…
-
4
votes2
answers986
viewsWhat is the purpose of setTag and getTag methods in View?
In the TextView declared this way below, is used the 1 as definition the attribute android:tag. Look at: <TextView android:id="@+id/tvJonSnow" android:layout_width="wrap_content"…
-
4
votes3
answers205
viewsHow to get mime from a file through Python?
How can I get Mimetype from a file through Python? I’m not just talking about getting through the extension, but also reading the file metadata. How can I do that? Note: I tried to use the…
-
4
votes2
answers81
viewsFunction that returns an array of strings that are in all arrays
Talk people, all good? My doubt is simple, but the solution may not be so simple. The truth is that I am doing a job in JS and soon I will need to solve a problem that will make me spend a few hours…
-
4
votes1
answer699
viewsWhy use Drivermanager for connection to bank?
I am connecting to the Sqlite database with the following code: public SQLiteConnection conn() throws SQLException{ String path = System.getProperty("user.dir"); try { return new…
-
4
votes1
answer3134
viewsHow to call another PHP page inside a PHP page
Galley, I have a PHP page and now I need to call another PHP page passing the parameters I collected from my BD. How can I do that? I’ve tried that, but it wasn’t! $qry_str = "id=".$id_mensagem; $ch…
-
4
votes2
answers2348
viewsHow to make a user in SQL Server 2008 view only a VIEW?
I made a View to send to a customer, but I can’t pass the login and password to the general access. This way I created a user (cliente_view) and I would like this to view only the created View…
-
4
votes1
answer884
viewsHow to fill out form from the combobox, with database information?
I used the code like this: <html lang="pt-pt"> <head> </head> <body> <?php $servername = "localhost"; $username = "isabelso_isabel"; $password = "password"; $dbname =…
-
4
votes2
answers13018
viewsUsing Bootstrap for Multiselect Dropdown with Checkbox
I found on this site: (http://www.webslesson.info/2017/05/bootstrap-multi-select-dropdown-with-checkboxes-using-jquery-in-php.html) a code that he uses Bootstrap to help create a multiselectable…
-
4
votes2
answers158
viewsPlay a chart in R
I made graph 1 below in R, from the code: library(truncreg) set.seed(1) x <- sort(rnorm(50)+3) y <- 3 + 1*x + rnorm(50,0,0.3) compl <- data.frame(x,y) y[y>6.5] <- 6.5 sample <-…
-
4
votes3
answers1847
viewsJquery: calculate the number of banknotes of the cashout value (deliver as few as possible)
I’m solving an exercise that I’m having doubts about, it refers to a bank system, in which when I present the withdrawal value, I should receive the least possible number of notes for the indicated…
-
4
votes1
answer1305
viewsCan I get the list index inside for-each in java?
When we created the for traditional we do this way: for(int i = 0; i<strs.lenght; i++){ Log.wtf(TAG, "Jon Snow is "+strs[i]); } Now I have this foreach: for(String str: strs){ Log.wtf(TAG, "Jon…
-
4
votes2
answers1072
viewsHow to make the business logo icon appear in outlook message box
I have an email trigger code using Zend. $mailTransport = new Zend_Mail_Transport_Smtp($this->smtp_host, $config); $mail = new Zend_Mail('UTF-8'); $mail->setFrom($from['email'],…
-
4
votes2
answers681
viewsSOA x Microservices
I’m used to working with the concept of Service Oriented Architecture - SOA, I have been reading about the subject and came across the concept of Microservices Oriented Architecture, what would be…
-
4
votes3
answers1298
viewsPerform table insertion with foreign key
include_once 'acesso_bd/conexao_bd.php'; class PropriedadeDAO { function inserirPropriedadeBD($propriedade) { $nome = $propriedade->getNome(); $endereco = $propriedade->getEndereco();…
-
4
votes1
answer681
viewsHow to check if a file is an image?
I am working on an application using ASP.NET MVC and Angularjs and need to ensure that the file upload will only be image files, even if someone sends an extension of another type of ". jpg" for…
-
4
votes1
answer56
viewsContent with code points (Entity) or Unicode characters
On the website w3schools has the reference of all characters - specials, symbols, alphanumerics. I did not understand the purpose of having this representation of characters. In the example below…
-
4
votes1
answer802
viewsHow to center map in the middle of polygon?
I have a polygon formed, at first, with 3 edges, basically created using 3 locations: Maiami, Puerto Rico and Bermuda. I took the example in the documentation that shows how to create a simple…
-
4
votes4
answers20854
viewsHow to order vector in descending order?
How do I place a vector in descending order? public static void vetor() { int[] vet = { 7, 4, 10, 8, 2, 5 }; Arrays.sort(vet); //Comando para colocar em ordem decrescente. for (int i = 0; i <…
-
4
votes1
answer219
viewsReplace space by comma and pipe interchangeably
I have a certain string below, as you can see, are coordinates separated only by a space. See: -23.5209 -46.46466 -23.52008 -46.465952 -23.519253 -46.467239 -23.518808 -46.466901 -23.518738…
-
4
votes3
answers2636
views"Find and replace" with regular expressions in MS Word 2016
I have a list with the result of candidates for an open competition I want to sort by note. However, before making the ranking need to remove the registration number of each competitor, which…
-
4
votes1
answer79
viewsA list of a guy can’t pass as a list of his 'higher' type?
There are some entities in the application that I am developing that need to be sorted by a predefined routine. Thinking about it was created contract class, called ElementoOrdenavel and all…
-
4
votes3
answers5803
viewsDraw numbers without repeating in javascript
I need to draw 16 numbers and store them in an array, but there can be no repeat numbers. Follow the code. var numero = []; function numero_aleatorio () { for(i=0;i<16;i++) {…
javascriptasked 7 years, 4 months ago Diego Soares 403 -
4
votes2
answers1548
viewsHow does Asynctask actually work?
Still, sometimes I get a little confused by the AsyncTask. See an example below: private class MyAsyncTask extends AsyncTask<String, Void, String> { @Override protected String…
-
4
votes2
answers1771
viewsJavascript clock with NTP or server time
I have the code below, which displays a clock on a page, which serves to record factory intervals. It works perfectly, with the code below: function moveRelogio(){ momentoAtual = new Date(); hora =…
javascriptasked 7 years, 4 months ago Diego 4,520 -
4
votes2
answers243
viewsHow to style the <p> tag differently?
But I can’t style it to look like the image below. How do I do it? It will be another tag? I tried so: p.acessorapido{ float: left; width: 100%; height: 38px; max-width: 885px; margin-top: 20px;…
-
4
votes1
answer160
viewsHow to improve log file visualization?
I am trying to analyze some logs files generated on Linux and have noticed that it is very boring to understand where a line is starting/ending. I wonder if there is some kind of command or tools…
-
4
votes2
answers287
viewsHow to add methods to a native class?
How to add functions in a native C#class, in my case I tried to do in System.Math only as a test: public class Math { public static double test(double a) { return a; } } And call it that:…
-
4
votes3
answers6393
viewsHow do I make icone font awesome change the color to indicate the current page?
I use awesome font as a menu. The initial color of the icon is yellow. How do I make the icon stay white when it’s on the current page? I’ve tried using css but unsuccessfully. <div…
-
4
votes2
answers35
viewsJquery ignoring houses on the right
I set the function below, for validation of values in two fields, one automatic (comes from the bank) and the other typed by the user. What happens is that, apparently, it ignores the houses to the…
-
4
votes1
answer107
viewsCondition to check null variables does not work
I’m developing a page ASP (Classic) and on that page I have this: <%if(textocontrato) = "NULL" Then%> <td >Texto Contrato</td> <td ><input type="text" name="textocontrato"…