Most voted questions
150,413 questions
Sort by count of
-
4
votes3
answers614
viewsHow to create a custom list using data from four tables?
I have the following class: Nota { int id; int idFornecedor; int idProduto; int idClasse; } and I have the respective classes for the previous class ids: Fornecedor { int id; string descricao; }…
-
4
votes7
answers15010
viewsPrint "n" natural odd numbers
I’m solving an exercise that asks me to enter a value for example: 5 and print the first 5 natural odd numbers in the case: entree: Enter the value of n: 5 1 3 5 7 9 The code I wrote works but it…
-
4
votes2
answers690
viewsReturn xml to preview browser Asp.net mvc
I have the following situation, I need to provide an XML file to be viewable in the browser, without the user needing to download the file, I do this by saving the file in a directory and then I…
-
4
votes1
answer601
viewsMysql function to return text according to numeric index
I have a table called tb_usuarios with the columns id_usuario nome email telefone tipo_de_acesso I would like to create a function in Mysql, where when using echo $row['tipo_de_acesso'], already…
mysqlasked 7 years, 6 months ago Sr. André Baill 6,946 -
4
votes1
answer76
viewsCreate new database from random values with loop or other method
I have three dataframes with different number of lines and I would like to create a new dataframe with 100 random values from these dataframes and based on three criteria: A - Column a and b will…
-
4
votes1
answer405
viewsTesting Factory Hibernate
Is giving null Exception on line HibernateUtil.getFactory().openSession(); in the main method. Follow how are the configuration and test files: <?xml version='1.0' encoding='utf-8'?>…
-
4
votes2
answers3746
viewsHow to make a vertically zebrad table (switch column colors)?
I know how to make a table horizontally zebrad, ie, each row with alternating colors (the famous color yes and color no). I wanted to know now how I could by css switch the colors of the columns:…
-
4
votes3
answers88
viewsMerge array as PHP
I have it: $categoria_1[0] = array( 'code' => 'ALI000001', 'name' => 'Alimento > Arroz ); $categoria_2[0] = array( 'code' => 'ALI000002', 'name' => 'Alimento > Massas ); And I need…
-
4
votes2
answers2086
viewsHow to capture all exceptions in Python?
How to capture any and all Python exceptions? Are there any keywords for this? Like in Java you just make one try { } catch(Exception ex) { }
-
4
votes1
answer1936
viewsHow to create a scrolling menu?
As is done this fixed menu at the top of the page that when the user scrolls down the screen when arriving at a particular page location the menu decreases getting compact. And by turning the screen…
-
4
votes1
answer438
viewsPython remover() list index out of range
def gera_huffman(simbolosOriginal, probabilidadesOriginal): # gera_huffman(['a', 'b','c', 'd'], [5, 2, 1, 2]) simbolos = simbolosOriginal probabilidades = probabilidadesOriginal lista = [] while…
-
4
votes0
answers182
viewsChrome and Opera do not respect cache
Chrome and Opera (same engine as the first) does not respect headers Cache-control and Expires, I mean if it’s a link or interaction within the page works normally, this appears ahead: But if the…
-
4
votes1
answer14830
viewsError 503 Backend fetch failed
Sometimes I get this error when I am developing some application in wordpress, someone knows tell me the reason???…
-
4
votes2
answers3654
viewsHow to obtain the CPF/CNPJ number of a digital certificate type e-CPF/e-CNPJ on A1 and A3 models?
I am developing an alternative method to login via certificate, without needing java or a specific language, only http and php to process backend information (but that could be manipulated by any…
-
4
votes3
answers2168
viewsValidate name field - Jquery
I would like to know how to validate a name field, to accept: Letters (Upper and Lower Case) Numbers Spaces Maximum 30 characters There can be no double space There cannot be space at the beginning…
-
4
votes1
answer648
viewsHow to change a comma, by a point, to a decimal number inside a string
Here’s what I was trying to do: String: ajskjnsjs, eeiisois, 10,98 oismsnsjh; In this case I wanted to change only the comma of the number by a dot getting the rest of the string the same. I was…
-
4
votes1
answer360
viewsHow to check if the application shortcut exists on the Desktop, if there is no create
I am using Delphi XE7, wanted to know how to check if my application already contains a shortcut on the Desktop, if in case there is no create a shortcut. From what I researched, I would have to…
delphiasked 7 years, 7 months ago Jefferson Rudolf 1,139 -
4
votes1
answer7602
viewsHow to Know which version of Ionic is being used in my project
I am working on an Ionic project at my company, but I do not know which version it was made, and who did not work in the company anymore, how do I find out in which version it was created?
ionicasked 7 years, 7 months ago Estevoliveira 109 -
4
votes1
answer335
viewsGoogle Chart’s Line with While
Good afternoon, I have the following appointment: SELECT DATE(o.data_fechamento) AS Data, u.nome AS Pessoa, COUNT(*) AS Total FROM ocorrencias AS o LEFT JOIN sistemas AS a ON a.sis_id = o.sistema…
-
4
votes4
answers874
viewsManipulating JS odds when using Math.Random()?
When using this function Math.floor((Math.random() * 10) + 1) I get a random number from 1 to 10. We assume that each number has a 10% chance so we have a 50% chance for Odd or Even, but if I wanted…
-
4
votes2
answers751
viewsError reading file: Error in scan line 6 Did not have 63 Elements
I’m a beginner in R and I can’t read the file I’m working with. tab1<-read.table("savedrecs.txt", header=T, sep="\t") Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,…
rasked 7 years, 7 months ago Giovanni Laranjo 41 -
4
votes3
answers1279
viewsIs there any way to make a div son, float while rolling the scroll of the father div?
I have a div primary, and within this, another div(secondary). I’m trying to position the div secondary in div so that it makes a floating DIV (popup style) that overlaps with other elements. But…
-
4
votes1
answer219
viewsWhat is an inert element?
I asked a question about tabindex here on the site and ended up bumping into the term inert elements. I realized it’s something that’s in specification of w3c, and on top of that there is a Polyfill…
html5asked 7 years, 7 months ago Wallace Maxters 102,340 -
4
votes4
answers100
viewsfunction_exists fatal error
Hello, I need help to solve this problem. I have the following code snippet (put the line number to facilitate): **186** if ( function_exists( self::$function_val() ) === TRUE ){ **187**…
-
4
votes1
answer297
viewsSelect by group
Good morning guys, I would like to know how to do the following SELECT in mysql: Having the following table, I need to select the last 3 purchases of each Name: From now on, thank you…
-
4
votes1
answer890
viewsIs there a binary tree in . NET?
I don’t know if it’s hidden somewhere and I haven’t seen a binary tree structure on . NET. I searched the documentation of all Collection, including the sublevels and nothing. Don’t have it? Why…
-
4
votes1
answer564
viewshow to hide subfolders from url through . htacess
Hello! how to change a url through htacess. wanted this url: http://localhost/site/product/view/Mi00OTI/golbolaver remain so: http://localhost/site/view/Mi00OTI/golbolaver…
-
4
votes1
answer763
viewsHow to perform operations with really large numbers in C/C++?
How to perform sum operations with really large numbers? Numbers that can reach 50 or 1000 digits. Is it necessary to install a library? How to install this library in Ubuntu? You can post some…
-
4
votes1
answer155
viewsHow to check duplicate files?
How can I check if two files are equal, even if the name is different in a js application?
-
4
votes1
answer1617
viewsHow to show content captured by camera in full screen in Opencv?
Would you like to know how to show the content captured via webcam (by the Pture video) in a window that occupies the entire screen? Only appears in a small window. You have to change something in…
-
4
votes2
answers755
viewsWhere to store API connection credentials on Android
I wanted to know a suitable place to save the connection with the api (link, user and password), initially I was thinking of saving in an xml, but I believe that any user will have access to this…
-
4
votes1
answer29
viewsHow to use scrollbar bottom when opening modal?
In the code: .modal-body { max-height: calc(100vh - 210px); overflow-y: auto; } <link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"/> <link…
-
4
votes1
answer195
viewsRegex for python float validation
r"[+-]? d*.? d+" This regex is accepting numbers with more than one point Ex: 12.23.43 and was not to accept...
-
4
votes1
answer2187
viewsconsultation of mobile operators
I started a query to know which mobile operator is pulling from a site. But I can only do it once. I would like help so that I could paste a list and it was sending requests and printing the…
-
4
votes0
answers83
viewsHow to insert references to use the Scriptengine class?
On the basis of the question Compile string as code includes in my project the class ScriptEngine, however, it is not being found in the references: using Microsoft.CodeAnalysis.Scripting; using…
-
4
votes1
answer264
viewsWhat is the difference between Lexical Scope and Dynamic Scope in Javascript?
What’s the difference between Lexical Scope and Dynamic Scope? What are the advantages of using each of them? When they should be used?…
javascriptasked 7 years, 7 months ago Velasco 953 -
4
votes1
answer59
viewsAre there advantages to using little endianess?
Today the main architectures use little endianess. Is there a clear advantage to its use? Should I worry when programming? In what situation?
-
4
votes1
answer419
viewsData persistence levels in android applications
I’m studying persistence for android, however I’m having difficulty understanding the levels of persistence they make in applications. I saw that there are 5 types: onSavedIntanceState…
-
4
votes1
answer65
viewsEntity Framework - Object exclusion with relationship
I have a question to understand the behavior of Entity. Because when I pass null Entity should not "clean up" the relationship in the bank? My Model: public partial class Ocorrencia { [Key] public…
-
4
votes1
answer2537
viewsWhat is the difference between pointer to vector and pointer to variable?
int A; int* pA = 1; int Vect[2] = {1,2}; int* pVect; pA = &A; *pA = 2; pVect = Vect; pVect[0] = 10; In the case I have a pointer to a variable and then to an array, and I want to change its…
-
4
votes1
answer1892
viewsHow to call one function inside another in Java for Android?
Every letter the user types in EditText, invokes the function TextWatcher that leads to a Text-to-speech. So if it writes 'c', the app returns a line saying 'c'. if it then enters 'a', returns 'a'.…
-
4
votes1
answer560
viewsFlashing buttons with Thread
I’m having a problem trying to make the buttons blink. Using the Thread.sleep(), by clicking the button, Thread.sleep() ignores what comes before it, executes the sleep and performs only what comes…
-
4
votes3
answers6724
viewsHow to use Ellipsis css3?
I’m trying and I’m doing the same explains at w3schools but it’s not working. .box { width: 250px; text-overflow: ellipsis; border: 1px solid #000000; } <div class="box"> Lorem ipsum dolor sit…
-
4
votes1
answer520
viewsDiagram of responsive hexagons
I found a code that assembles a set of hexagons (like a beehive) in a way that is responsive. I’ve made some adaptations to suit my purpose as a result, which is not exactly a grid. I simply added a…
-
4
votes1
answer376
viewsWhat is Multi-version Concurrency Control in Postgresql?
What is Multi-version Concurrency Control (MVCC) in Postgresql and how it works?
-
4
votes1
answer4966
viewsGOTO equivalent in Java
Well guys I’d like to know how to do a drop in java? or some way to get back to a certain point in the code, people say that it is dangerous to use this kind of command in java... why?
javaasked 7 years, 7 months ago Jefter Rocha 411 -
4
votes1
answer150
viewsAre models in the MVC structure for database operations only?
I learned that "Whenever you think about data manipulation, think about model. It is responsible for reading and writing data, and also for its validations." Later another person told me that models…
-
4
votes6
answers42162
viewsRemoving duplicate elements in a python list
I have to do a function and I’m not being able to develop the logic. Here’s the thing: Write the remove_repeated function that takes as a parameter a list of integer numbers, checks whether such a…
-
4
votes1
answer2685
viewsHow to color the legend according to the chart in R
Hello guys I have a chart on R and would like to make the caption equal to the chart. follows below the command used and the graphic image. control = c(100,100,100,100,100) dez = c(100,90,0,0,0)…
-
4
votes1
answer1187
viewsWhat is marshalling and how does it work?
I’ve been working with a device that I sent to my software some information, but this information came in the type IntPtr, to read them, I had to use the class Marshal of . NET. What is marshalling…