Most voted questions
150,413 questions
Sort by count of
-
4
votes1
answer85
viewsAs by caption in a point created in an image
I have a code that draws dots on an image based on my select options. Each point is related to a select and therefore I would like to know how to put a legend with the name of each select in the…
-
4
votes1
answer306
viewsSend two triangles to a Vertex Shader. Opengl, C++, GLSL
I am learning in college graphic processing with Opengl at C++. We are using the GLFW and GLEW libraries. My program consists of creating two triangles in different parts of the window. I created an…
-
4
votes2
answers112
viewsHow to make a NOT IN mysql with 2 tables
I have 3 tables Person, class, Notes, table person has: +------+--------------+-----------+ | id | Nome | turma | +------+--------------+-----------+ | 1 | Aluno 01 | 1 | | 2 | Aluno 02 | 2 | In the…
-
4
votes2
answers110
viewsIs it wrong to have a class with only methods?
Is it wrong to have a class with only methods? Or would it be better to use namespaces to hold office?
-
4
votes1
answer1123
viewsRedirect URL on IIS 7.5
When publishing to the server (iis 7.5) the application: Eu tenho isso => http://meuip:8086 Mas preciso disso => http://meuip:8086/portal when or if created the iis directory with the name…
-
4
votes1
answer1732
viewsHow to put an iframe on fullscreen (full screen)?
I made this little player to be used inside a iframe. But I need to give you the option to put it in full screen (as most video players I know do), but I have no idea how to do that. I’ll leave the…
-
4
votes4
answers174
viewsComments weigh the code in C#?
I use the C# language with Unity Engine and, as several programmers have access to the code, we usually comment a lot so that everyone can understand what is there. I saw in other responses…
-
4
votes2
answers99
viewsSave the same file at the same time in different threads
In my software I have a thread that every second updates the X file. This same file can also be updated through a user action that will be in another thread (may be at any time). My question is:…
-
4
votes2
answers5448
viewsIs it possible to mirror an image horizontally (flip) with Canvas?
I know it’s possible to mirror horizontally <img> with CSS, but wanted to know if it is possible to mirror an image horizontally inside a canvas. With CSS, I would do like this: #img-flip{…
-
4
votes1
answer166
viewsproblem with listing items of this object
I’m having a problem getting the data received from the payment order from pagseguro. I’m doing the consultation he’s bringing me the results but I can’t get what’s inside the paymentOrders for the…
-
4
votes2
answers299
viewsData Modeling: Integrity x Performance
In the company that I work for, there’s a data architecture that I’ve never seen before, and I’d like to know if this is common, or if it’s a new market trend. Just to mention the bank is Oracle.…
-
4
votes1
answer579
viewscreation of gif in r
I’m trying to create a Plot GIF below: x<-NULL y<-NULL for(i in 1:500){ y[i]<-sum(rnorm(i))/i x[i]<-i plot(y~x, type="l") abline(y=0) Sys.sleep(0.25) }…
-
4
votes1
answer524
viewsHibernate is not creating or updating BD tables
I have the classes Beans.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"…
-
4
votes3
answers288
viewsSearch for tuple in an array
I have the following vectors: a = [('FI', 'SE'), ('SE', 'DK'), ('DK', 'DE'), ('DE', 'PL'), ('PL', 'BY')] b = [['NL', 'DK', 0], ['NL', 'DE', 0], ['NL', 'BE', 0], ['FI', 'SE', 0.054]] I need to go…
-
4
votes3
answers551
viewsif and Else with almost equal blocks
In Python, suppose I have a function: def func(x): if x%2 == 0: j = x/2 print(j) else: j = x print(j) Don’t mind the logic of the code, it’s just a simple example. The if and Else blocks are almost…
-
4
votes1
answer13010
viewsHow to adjust the Mysql Time Zone?
I took an old project from github, and the project was a JSF application that was using the old mysql artifact as you can see below; <dependency> <groupId>mysql</groupId>…
-
4
votes1
answer496
viewsArray in PHP using () or []?
I always use the parentheses to define an array in PHP, such as: $array = array('a','b','c'); But once in a while I see some codes here using brackets, like: $array = ['a', 'b', 'c']; However, if I…
-
4
votes1
answer194
viewsWhere Mysql search by full word
I have a database and would like to know how I do to search for the data by typing the full result using Where Example: ID NOME CODIGOS 1 | Joao | 9714,51,100 2 | Maria | 50,9714,88100 Ai wanted to…
-
4
votes1
answer153
viewsSearch localStorage Json object list for your key name
I know that the browser localStorage stores data in the key-value format, and that I can recover the Json objects saved there through the key. Now what I need to do is retrieve all the records whose…
-
4
votes1
answer106
viewsData Manipulation
I wonder if it is possible, after converting the date and bringing only the time, to manipulate this result to return the closed time. The example below details better. CONVERT(VARCHAR(19),…
-
4
votes3
answers47
viewsHow to view a given value in a table
I’m new to the Sql language, and I wanted to show you the names of all the people who are from the RS region, how could I do that ? create database uri default character set utf8 default collate…
sqlasked 6 years, 6 months ago rafael marques 939 -
4
votes3
answers121
viewsList value of checkbox items
How do I make list the checkbox values when the user select and when you are unselected the value does not appear in the list? <select class="form-control" id="list-lugar"> <option…
-
4
votes2
answers229
viewsSQL Maximum value of another table
I am doing a project of the course and I stopped at the last step and I would like a little help from you.. The project is an SQL database with "leasing" (contract for "rental" of cars.) The tables…
-
4
votes1
answer966
viewsAlign Ivs vertically to center (Middle)
I have the following code: @charset "utf-8"; /* CSS Document */ img { border: 0; max-width: 100%; } div.cabecalho { position:relative; width:100%; height:200px; border:.1px solid #000000; }…
-
4
votes1
answer4728
viewsHow to transform source code into digital hash summary?
For registration of a software, it is requested: Perform the transformation of the technical documentation (source code) into digital hash summary; the INPI documentation also states: [...]The hash…
-
4
votes2
answers948
viewsHow to get random results in SQL with different Dbms?
Based on this existing question on Soen and wanting to bring interesting and useful content to Sopt I ask this question: How to get random results in SQL with different Dbms? I’m leaving an answer…
-
4
votes1
answer219
viewsQuery Return - Generic Entity Framework Repository
I have a generic repository and I realized that it is taking too long to return a query with the selection of some columns of my database, the Query() method is as follows: public IList<T>…
-
4
votes1
answer225
viewsStrength of typing in Lua language
Lua has dynamic typing, but after all, is it strongly typed or weakly typed? Every source I consult has a different information, which left me in doubt.
-
4
votes1
answer111
viewsHow to put a border / Stroke in an <image> in an SVG?
I need to add one stroke around a <image> within a <svg>. But nothing happens when you add the value to that tag. See below what happens: when I use on <image> does not work, but…
-
4
votes1
answer211
viewsAjax locks the computer
Analyze the code below function update(){ $.ajax({ url : 'http://localhost/sistema', type : 'get', dataType : 'json', success : function( data ){ console.log('Mostrar dados: '+.data.dado); } }) }…
-
4
votes2
answers1920
viewsHow to modify commits that were not pushed
I need to edit a commit message and add another file. I haven’t pushed the commit yet, there’s a way to fix it?
-
4
votes1
answer120
viewsWhat do these arguments mean in the "git-checkout" command?
I have the following command in Git to recover a file: git checkout (hash-commit)^ --(caminho-arquivo) In this command what the ^ and --?…
gitasked 6 years, 6 months ago Lucas Lima 773 -
4
votes2
answers1611
viewsWord count using dictionary
I need to count the occurrences of words in a text using as reference a list of predetermined words. I turned the text into a list of string, the words are in a set (set) palavras_procuradas =…
-
4
votes2
answers4592
viewsHow do you turn a comma number into an R?
I have a csv file, saved via Excel (using ";" as column separator). When I import it into the R the numbers that are in the 0.00 format are as factor and comma. Ex: "123,45" When making the…
-
4
votes3
answers437
viewsPostgresql 8 - Replace the first occurrence of a character in a string
I have a field in a table in a Postgresql 8 database whose values are strings and have hyphens in some irregular positions. I would like to replace the first occurrence of the hyphen in the string…
postgresqlasked 6 years, 6 months ago Eduardo 43 -
4
votes1
answer555
viewsIs there a way to create a valid certificate for Apache localhost?
Look at my local development I have made use of https://localhost, created the certificate by apache openssl, works beauty. As it is not a certificate that is in an external source the browser says…
-
4
votes1
answer332
viewsWhat is the difference between Charset : DOS850 x ISO8859_1 x WIN1252?
What’s the difference between these Character Sets: DOS850 x ISO8859_1 x WIN1252 because I see it at the time of creating a database and do not understand right what their differences? I know it’s…
-
4
votes1
answer242
viewsWhat is the difference between Xmldocument and Xelement?
I’d like to know the difference between Xmldocument and Xelement.
-
4
votes4
answers6745
viewsHow to implement a recursive MDC calculation algorithm in Python?
Non-recurring version is below: def mdc(a,b): while b !=0: resto = a % b a = b b = resto return a print(mdc(50,2)) A recursive attempt would be: def mdc(a, b): if b == 0: return a resto = a % b a =…
-
4
votes1
answer169
viewsWhat’s the difference between a Windows compiler and Linux executable
When compiling a simple program for Linux, the compiler generates an executable that only works on Linux, but when compiling the same code with a compiler for Windows it generates an executable that…
-
4
votes2
answers501
viewsWhen to dynamically allocate memory?
In C++ you can easily declare an object or variable like this: tipo_da_variável nome_da_variável; This type of statement is the easiest to use, but you can also use the new to dynamically allocate…
-
4
votes1
answer112
viewsjQuery cutting words with space
I have a screen where the lines are loaded according to the data of the database and for this I have a PHP+jQuery and related to the creation of the same. What happens is that the array that sends…
-
4
votes3
answers1038
viewsTurn m:s into seconds
How to turn a value into seconds? For example: 01:32, in case it would be 92 seconds. I would like to do this in php, I already searched the net but I can not find anything.
phpasked 6 years, 6 months ago Paulo Sérgio Filho 122 -
4
votes2
answers861
viewsWhat is the difference between :Nth-Child and :Nth-of-type?
Most of the time I use the :Nth-of-type but I didn’t understand exactly the difference between the two, someone can explain?
-
4
votes2
answers888
viewsHow to get the row and column indexes of a list List<List<int>>?
I have a list that simulates a matrix (or two-dimensional array) that is structured as follows: List<List<int>> matriz = new List<List<int>>(); Whereas this matriz is…
-
4
votes1
answer2800
viewsMacro to automatically search images and play in excel
Good afternoon, I have a spreadsheet, where I need to automatically include images. I wonder if there is any way to elaborate a macro, where you join the Reference and color (reference & color)…
-
4
votes1
answer326
viewsHow to prove the amount of leaves of this tree by induction?
If each non-leaf node of a binary tree always has two offspring as I can prove by induction that the number of leaves will always be the number of nodes not leaf plus one ? I did it this way, but I…
asked 6 years, 6 months ago Matheus 187 -
4
votes2
answers6239
viewsProblem turning input text into uppercase letters
I have a input and I want it to allow real-time capital letters only. This code apparently works perfectly. $("#texto").on("input", function(){ $(this).val($(this).val().toUpperCase()); }); But I…
-
4
votes2
answers171
viewsIdentify cases with multiple conditions in multiple columns in R
I have a dataframe with 20 students and I need to identify the students who attended stage 43 for two years or more. aluno <- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,…
-
4
votes1
answer197
views