Most voted questions
150,413 questions
Sort by count of
-
5
votes1
answer647
viewsConnecting Go with Mongodb using Docker
I am creating a microservice in Go, using Mongodb as a database and using the library mgo. Using Mongodb in a Docker container locally and running the application on my machine, everything works…
-
5
votes3
answers1291
viewsOptimize HTML video 5
I’m developing a website. In each header this site will have a video, it would be the same video for all headers. I used the tag video of HTML5 even stayed and so: <div class="video-institutional…
-
5
votes2
answers3969
viewsHow to remove all Classes from an element using jQuery?
Instead of removing all classes individually using remove class: $("#div").removeClass('classe') For every class an element may have, there is some function that can be called and remove all classes…
-
5
votes1
answer1755
viewsHow to import multiple excel tabs at the same time?
I am trying to reproduce the code below, but without success. What should I put in the argument path? Is it the same in all of them? Any clearer examples so I can understand? Any tips on how to…
-
5
votes1
answer247
viewsWhat is Atomic web design?
Superficially I found very interesting this approach, but before going deeper I would like to know exactly what it is about, too, if it is possible to use it in short scale projects, or even in a…
css pattern-design software-engineering methodology uiasked 6 years, 10 months ago Felipe Duarte 6,284 -
5
votes3
answers11852
viewsShow a number in 2 decimal places
How do I calculate a input (integer value) and a variable in (real) currency in javascript? The result is being 6.7 and not 6.70 (I have tried many examples here of the forum, but nothing yet).…
javascriptasked 6 years, 10 months ago Hugo Nascimento 106 -
5
votes1
answer330
viewsShuffle playing cards
I need to make a kind of "Mini-pife", but I’m not able to create the method to shuffle the cards, someone can help me? public class Baralho { public Carta[] Cartas { get; private set; } public…
-
5
votes1
answer908
viewsWhat is and how does an RTA work?
I recently read some questions about RTA and noticed there are not many explanations about it. Looking a little deeper into this subject I came across some conceptual questions, nothing about…
-
5
votes3
answers130
viewsHow do I call the next field of a table with Javascript or Jquery?
I tried to create an empty table so that when the user clicks in the middle of the field <td> appears a <input type="text" /> to type. Follows the code: $(function () {…
-
5
votes2
answers287
viewsMysql query - Cross Tables count
I have the following tables: Each tuple of the table Pageviews (main) contains a single page view. If by chance the same person in the same session (Sessions) view the same page (Pages), a new tuple…
-
5
votes3
answers436
viewsHow to order the query in the same order as an array used in Wherein?
I would like Laravel to return me a list of products where the ID belongs to this array: [12,5,1,8,16], but sort by id as per array order!* What I have so far: $produtos = Produto::whereIn('id',…
-
5
votes2
answers111
viewsChange pennies of values
I wish I could change the pennies of li by input of MudarCentavos. But not setando Id us li and get treated Idfor Id, because this list will be dynamic, so can come more than 3 values. Note: 2…
javascriptasked 6 years, 10 months ago Jackson 853 -
5
votes2
answers899
viewsRenaming the levels of a factor based on a data frame
Suppose I have the date frame iris, present in the memory of R: head(iris) Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1 3.5 1.4 0.2 setosa 2 4.9 3.0 1.4 0.2 setosa 3 4.7 3.2 1.3…
-
5
votes1
answer525
viewsWhat is the difference between INNER JOIN and INTERSECT?
What is the difference between INNER JOIN and INTERSECT? Someone can also illustrate?
sqlasked 6 years, 11 months ago user75204 -
5
votes1
answer484
viewsIs PHP considered open source?
Is PHP considered open source? If so, are there repositories such as Chromium where we can see their "guts" and/or collaborate on their development? If not, does it owe some right to the languages…
-
5
votes1
answer199
viewsConvert uint16_t to int
I’m doing a project where a distance detector stores the distance in a variable uint16_t, and I need to turn it into int to make comparisons, but I can find nowhere how to do it. How to do?…
-
5
votes2
answers377
viewsGIT: 2-verse project on different clients and main branch
I have a question regarding the organization of GIT. I have 1 project that will be divided into 2 verses for different clients, I would like to maintain a main branch and that the general changes…
-
5
votes1
answer2819
viewsUsing Switch Case for Ranges
My teacher passed an exercise in which we should use the cases of a switch to treat intervals, he strictly said that we should use the switch and we cannot use if and neither while/do. I’ve tried…
-
5
votes1
answer6199
viewsHow to use Objects.filter in Django?
Good afternoon, I have a model here in my Django Subject, and I want to list it in html, but every subject has as a foreign key the model id category, how I make a variable to receive Objects.filter…
-
5
votes1
answer861
viewsHow to run DOS command in JAVA with Administrator privilege?
Hello, I have a program where I need to every run of it, go on the server, pick date and time, and change on the local PC. I am running the following command line: Runtime.getRuntime().exec('DATE…
-
5
votes1
answer80
viewsWhy is the Codeview plugin not highlighting colors?
I’m using the plugin Froala in a textarea, in this way: <textarea name="fDescription" class="form-control" rows="4"></textarea> And then activating the plugin with jQuery:…
-
5
votes1
answer853
viewsHow to add an external source in an SVG?
I have a logo that I made in SVG, on file .svgexternal, which uses has a text with the name of the company, whose source is Open Sans Light. On my machine works normally due to the fact that I have…
-
5
votes1
answer72
viewsHow to kill, remove or not initialize the SQL Server master database?
I woke up in the morning and gave a "Run" on top of the bank "cotacao", bank that I am working at the moment. Then came the login screen and when I logei the bank that received the tables was the…
sql-serverasked 6 years, 11 months ago pnet 14,727 -
5
votes3
answers2185
viewsHow to create and remove div s with inputs dynamically with jquery
I need to create and remove dynamically div´s for a form I have, already made using table, but now I was asked div´s. I tried to make an adaptation but I couldn’t, what I need is to create a button…
jqueryasked 6 years, 11 months ago adventistapr 5,498 -
5
votes1
answer446
views -
5
votes2
answers156
viewsExecution of programs in pararelo WITHOUT use of Threads
They ask me to develop a Java program, to run programs (ls, firefox) in parallel that are contained in a file. For now I have the following code: File file = new File()`; List<String> lista =…
-
5
votes1
answer577
viewsHow to compile Less or Sass automatically?
Guys, I have a question about Less/Sass. Nowadays I only work with Sublime Text to develop my sites, and I use Sass or Less for the styles and use Koala to compile them. But I wonder if there is any…
-
5
votes1
answer87
viewsWhy does "int('1111', 2)" return "15" in Python?
Why from this exit? Code: a = int('1111', 2) print(a) Exit: 15
pythonasked 6 years, 11 months ago Lucas Braga 99 -
5
votes2
answers141
viewsImg in header changing at each page load
I am starting a new HTML5 project and would like to put a background img in the header, in vdd I want to put 4 images and I want them to change in each refresh on the page, I don’t want a slider, I…
-
5
votes2
answers1104
viewsProblem with group by
I have the following query: SELECT funcionario.*, emprego.data_admissao, emprego.data_saida, emprego.data_dispensa FROM funcionario,emprego,empresa WHERE empresa.id = emprego.id_empresa AND…
-
5
votes1
answer111
viewsWhy is the latest prediction of the time series with the neuralnet package so far out of line with the rest of the predictions?
I set up a neural net to forecast seasonal precipitation from the observed series. When I validate with observed data, the results are good. But in the series predicted by the model, the latest…
rasked 6 years, 11 months ago Rodrigo Junior 115 -
5
votes2
answers279
viewsConverting string to long int
I have an activity to do in which the teacher asks that the names of the numbers in the integers be converted (long int). I wonder if in Java there is any function that does this... I searched in…
-
5
votes1
answer3432
viewsIs there any risk in using "SET FOREIGN_KEY_CHECKS = 0"?
According to what I read somewhere, the FOREIGN_KEY_CHECKS: ... specifies whether or not to check foreign key restrictions for Innodb tables. I mean, if the guy wants to disable the foreign key…
-
5
votes2
answers2142
viewsLogic to validate free schedules on schedule
good night! I’m stuck for a few days in the following situation, I’m not able to parameterize or create an expression that validates interval between dates, which works like this: that is, if you…
-
5
votes2
answers648
viewsHyperfactor in C by recursion
I’m trying to make a program with a recursive function to return a hyperfactor of a number in C, but the only value the function returns is 1. Where I’m missing? #include <math.h> #include…
-
5
votes1
answer612
viewsWhat tools to optimize a C#code?
Code optimizer tools aim at, for example: - Removal of dead code: removes any dead class, attribute, or method code that is not referenced and used in the project. - Rewrite and reduce functions:…
-
5
votes3
answers9397
viewsHow to pass arguments by reference in Python?
When I studied Pascal remember that my teacher explained that to pass an argument by reference it was necessary to put var in front of the variable, in the function/procedure parameters. Example:…
-
5
votes2
answers487
viewsString Sweep in Search of Substrings Ignoring Accent and Case and For Each Match Perform an Action
I need to search in a string a specific substring and for each occurrence found, I must execute an action to replace what was written by the version in bold, as it appears in the list, ignoring…
-
5
votes2
answers636
viewsRequest of type Options
My question is, whenever I make a request before it is actually sent a Options request, I wonder what it’s for exactly. What impact can I have by removing this request both on performance(internet)…
-
5
votes2
answers1259
viewsWhat are the function of each string prefix in Python?
In Python, we often see strings with a prefix, such as below, where the prefix is used r: r"""OS routines for NT or Posix depending on what system we're on. This exports: - all functions from posix…
-
5
votes2
answers290
viewsHow to debug Nodejs code?
In my initial studies in web development with NODEJS I have the following question: a tool to debug NODEJS codes in a Web system ?
-
5
votes2
answers340
viewsHow to create an array whose indices are characters from an informed string?
I wanted to create a vector in java in which each input of the vector was a character of a string that I informed public static void main(String[] args) { String[] words = {"java"};…
-
5
votes1
answer147
viewsError doing UPDATE when setting varbinary variable as`null`
Follows code: var file = Request.Files; var list = new List<byte[]>(); for (int i = 0; i < 4; i++) { if (file.Count > i) { list.Add(ConvertTo.Bytes(file[i])); continue; } list.Add(null);…
-
5
votes2
answers2189
viewsEdit Currency Delphi Firemonkey
I need to format an Edit in the format 0,00 in Firemonkey, using preferably the event ChangeTracking. I tried to use the following procedure that did not resolve. procedure FormatadorMoeda(pEdit:…
-
5
votes1
answer106
viewsI don’t understand the order to execute a code
public class Rope { static String result = ""; {result += "c";} static {result += "u";} {result += "r";} public static void main(String[] args) { System.out.print(Rope.result + " ");…
-
5
votes2
answers260
viewsHow to save changeable parameters in the system?
I have an ASP.NET MVC project and I use web.config to save some parameters that will be used by the system, but should not be changed by any user. Now I have to implement some other parameters that…
-
5
votes3
answers1309
viewsI want to change a string in 3 positions
I would like to walk 3 positions with a letter of a string, for example, make the letter A turn D, I tried the second command: texto[c] = texto[c] + 3 But it still doesn’t work, what would be the…
-
5
votes2
answers1573
viewsWhat is the advantage of a 1:1 relationship?
I have a database (Mysql), and in a table I’m having about 80 columns. I am thinking of separating this information into other tables, and maintaining a 1:1 relationship. But this can impact a…
-
5
votes5
answers47771
viewsCentralize a table (HTML)
I made a table in mine HTML, but I couldn’t center it in the middle of the screen. She’s vertical and I’ve tried putting the text-align:center but it didn’t help. td, th { padding: .7em; margin: 0;…
-
5
votes2
answers5974
viewsHow to use ALIASES in Oracle correctly?
I’m trying to select several columns from a single table, and to facilitate the process of viewing the data and making it easier to separate the columns, I decided to use aliases. But the problem is…