Most voted questions
150,413 questions
Sort by count of
-
5
votes4
answers5086
viewsHow to add values of a column in the table?
I have the following table below: <table class="table table-bordered table-hover" id="customFields"> <thead> <tr> </tr> <tr> <th width="20%">ID</th> <th…
-
5
votes2
answers4989
viewsWhat is a boolean?
What exactly is Boolean? Could you give practical examples? It makes a difference to write true or True?
-
5
votes2
answers519
viewsWhat are checked exceptions?
While following a discussion about programming languages, I saw people arguing about checked excpetion each with its arguments for or against. They said that such language implements and such…
-
5
votes2
answers4702
viewsDoubt about json_encode and json_decode
When and how we should use json_encode and json_decode? What are they for?
-
5
votes1
answer461
viewsRescue all nodes from an Sqlite database tree
I have a serialized tree in my database in the table arvore. Like any good tree, every node can have at most a single parent node. Your data is in this format: id | id_pai | valor…
-
5
votes3
answers6709
viewsIs it possible to have more than one Primary key in a table?
I have a gym and I’m wearing one Pk for all gym users to have their own (ID). It is possible to use other PK in the same table? For example: to prevent Número da Matricula or even the CPF/RG if…
-
5
votes1
answer3473
viewsHow to publish website made in Visual Studio?
I created a MVC site in Visual Studio 2017. I want to know how to generate the necessary files for the site to work and in which folder I should include them.
-
5
votes2
answers354
viewsWhy does max not even min return the expected value?
I need to take the highest and lowest value of a given field to be able to make a filter, only SELECT MAX or MIN does not work. As you can see in the image below, I need this amount of users Table…
-
5
votes2
answers128
viewsMake LI appear only on Mobile
I have a LI and would like it to be shown only in mobile mode: <ul style="display: block;"> <li><a href="/">Início</a></li> <li class="list-cat"></li>…
-
5
votes2
answers145
viewsLong click with Javascript
In Android there is the method OnLongClickListener in which it is possible to hold down the finger in a View and an action is fired (if the developer sets an action) if that click remains a little…
-
5
votes1
answer1457
viewsError while creating Makefile
When I am trying to use Makefile with the following content: all: teste teste: arp_discover.o arp_poisoning.o gcc -o teste arp_discover.o arp_poisoning.o arp_discover.o: arp_discover.c…
-
5
votes3
answers67
viewsHow to define the value of a variable from a function?
I want something like, a function that will be passed a variable as a parameter and a value that will be applied to it, can you do that? 'Cause the code below didn’t work: function…
-
5
votes1
answer412
viewsDeploy using GIT on my server
Hello, I use it to upload my files from the GIT site, deploying to my server automatically so I did the following: 1 - I created a GIT repository on my server outside the public_html folder 2 - then…
-
5
votes5
answers1513
viewsSkip Record within a while
I wonder how it is that I jump a log inside a while? For example, when the guy is 2 he jumps while($pessoa = mysqli_fetch_object($query)){ if($pessoa->tipo == 2){break;} //continua a exibição de…
-
5
votes1
answer188
viewsDefining a tree structure in ruby on Rails
I’m developing a system in ruby on Rails, and I’m stuck on a question. My question is this, I need to create a tree, and then create my 'no' object and I would like it to have a 'no' parent and a…
-
5
votes4
answers224
viewsCode Optimization / Image Processing
I’m doing a C-level college paper on image processing. And I need to find an alternative to optimize a particular piece of code. Here: /* Backward Rotina */ /*…
casked 7 years, 4 months ago AComerlatto 341 -
5
votes1
answer415
viewsTemporary variable performance within loop
During college a professor commented with me that declare a variable before a loop and reuse it was an economic and more interesting way to do it. For example (in Java): String str; for(Pessoa p :…
-
5
votes1
answer711
viewsCreate a patch from a commit
When executing the command git apply it is possible to create a commit with changes from a text file: git apply ~/Downloads/patch.txt How do I create this patch from a commit existing?…
-
5
votes1
answer438
viewsHow to lock cursor drive in Masked input?
I’m using the plugin jQuery Masked Input. <input name="dueDate" class="form-control input-mask-date" type="text" placeholder="Data de Vencimento" data-parsley-trigger="keyup" required=""> And…
-
5
votes2
answers844
viewsHow to separate tags from a variable in PHP array
I want to separate tags into one array in PHP, but I couldn’t find an efficient way yet. I want to turn this:…
-
5
votes2
answers183
viewsDocker Compose image container
How to connect 3 images in Docker-Compose ? i would like Elasticsearch, Kibana and panthomJS to be inserted in only 1 container, but I only got Elasticsearch with Kibana. How can I do that? Any…
-
5
votes2
answers4088
viewsGetters and Setters Methods
In my course, I’m learning getters which takes "data" and setters, inserting/modifying. I made my code like this for the pen class: <?php class Caneta { public $modelo; private $ponta; public…
-
5
votes2
answers210
viewsWhat is the automatically created "o" element between my Buttons in HTML?
I am developing a layout and when I place two Buttons on each other, is created an element "o" in my HTML, which makes the spacing between the two, I could solve creating a margin negative to the…
-
5
votes3
answers370
viewsSort phone numbers in a string
I have some phone numbers, mobile and fixed, in a database, I used the function implode()to join them together in the same string, getting that way: (11) 3333-4353 (11) 98000-2222 (11) 3027-5555…
-
5
votes1
answer437
viewsHow to work with CHAR-like Enums using C# and Entity Framework
I would like to know how to map my entity using an Enum of the type char by the Entity Framework, using Fluentapi. I have the following Enum: public enum Zona { Norte = 'N', Sul = 'S' } And my…
-
5
votes1
answer1341
viewsHow can I list all invalid emails?
I ended up finding something like this due to the lack of validation that we didn’t have. teste@cliente calteste5@calteste5 calteste6@calteste6 vava@ius Pablo Fernandes xxx eduardostubbert 123456…
-
5
votes3
answers1587
viewsRedeem input file name and assign input text
I have the following code with a <input> text type and other file type. See: <form action="#" method="post" enctype="multipart/form-data"> Name file: <input type="text" name="name"…
-
5
votes2
answers755
viewsWhat is #pragma c#
By maintaining a code of a web service I came across the following code snippet: #pragma warning disable 1591 Searching for its meaning, I did not find anything in Portuguese that was easily…
c#asked 7 years, 4 months ago LP. Gonçalves 883 -
5
votes0
answers159
viewsHow does google browser etc do this?
How can I create a url scheme similar to Chrome and other browsers etc? I want to make the . html file open in this url scheme, just like file://. Instead I want something like new://index.html. I…
google-chromeasked 7 years, 4 months ago luiz inácio 51 -
5
votes1
answer92
viewsConfigure log of errors
I’m working with PHP and I’m in the support part, but I’m not really familiar with the bug system. Is there any material I can read to help me? My biggest problem is the following, many errors are…
-
5
votes1
answer210
viewsPlot grid histograms with fixed Y-axis - R
I would like to plot two (or more) histograms in R where the Y axis prevails a global value for all histograms. I don’t want overlapping histograms, I want overlapping histograms. The more histogram…
-
5
votes1
answer951
viewsGif to load while website loads!
I am developing a website (MVC), where there is a user option to select an Excel file, and all table data is sent to the database and only then appears a warning of success or failure when recording…
-
5
votes1
answer311
viewsIndividual User Account between MVC and Webapi projects
I have a MVC project with Individual User Accounts, I use Roles for access management and everything works well. Recently I had the need to create a file manager on another server, I created a WEB…
-
5
votes2
answers170
viewsHow do web hosting systems work?
I am creating a website and I would like to host it, but I have some questions because I have heard that the hosting has monthly access limits or limits in the size of the databases. So I’d like to…
terminologyasked 7 years, 4 months ago Anderson Santos 475 -
5
votes4
answers239
viewsIgnore class name in XML serialization
I need to serialize a class for XML, for example: public class Pessoa { public string nome { get; set; } public int idade { get; set; } public Endereco endereco { get; set; } } public class Endereco…
-
5
votes2
answers4257
viewsSpring Boot x Spring MVC
Spring Boot is the same thing as Spring MVC? In practice no longer use Spring MVC (or, should not use) and only Spring Boot?
-
5
votes1
answer284
viewsDoubt with Javascript Arrow Function
In the code below, the method showName() naturally return undefined, because it will fetch a name property in the scope where the obj is inserted. My question is, in that case I would necessarily…
-
5
votes6
answers32941
viewsConvert varchar to date in SQL
You can convert dates into sweep for date. I’m having difficulties in performing searches between dates, due to this discrepancy in the database where I perform the query. When I enter my line of…
-
5
votes3
answers2844
viewsPerform a function while holding button, stop when release
How to perform a function when the user holds a button and stop executing when the user releases the button. As happens in the Whatsapp when you will record an audio...
-
5
votes1
answer574
viewsHow does the Type.Invokemember method work?
I came across this method in a code and was curious how it works because I’ve seen some applications running in C# that use this method, and when searching for the method in Google, I found no clear…
-
5
votes2
answers2991
viewsSQL for last month and last two months
Hi. I’d like a hand here. I need to get the records: Mysql bank 1) last month 2) last quarter 3) Current year SELECT id, data, lote, modelo, qtd FROM controle_diario WHERE modelo like ? The table is…
-
5
votes1
answer1118
viewsReturn Dowload Excel via MVC Controller
I have a method that generates an excel file and writes it in a directory, but then I take the path of the directory and I need to download the excel file, but nothing occurs, no error. Can anyone…
-
5
votes1
answer1242
viewsAre there differences between the terms Thread, Multithread, Async and Await?
I asked that question here at Stack Ooverflow: What is the solution for asynchronous PHP processes? I did it because I wanted that in the middle of a process execution, I wanted to have a certain…
terminology thread multithreading async asynchronousasked 7 years, 5 months ago Wallace Maxters 102,340 -
5
votes2
answers146
viewsDeclaration of `var as object field
How could I declare a variable var public so that it could take the return of the data. How would the statement of these variables without completion: var tbuscar = ?; var retorno = ?; public bool…
-
5
votes2
answers2069
viewsDoctrine: Manytomany’s Relationship with Extra Fields
I have a many to many relationship between two tables: Products and Orders. The Doctrine then generates a third table. So far quiet. But wanted to generate in this third table more fields (Qtde and…
-
5
votes1
answer1398
viewsNo-SQL database modeling
I’m developing a system that will use angular for the front-end part and firebase for the database. Firebase uses a No-Sql database and I’m having a hard time understanding how I can model it. For…
-
5
votes3
answers13703
viewsHow do I publish an Angular CLI (Angular 4) project to my server?
I’m learning Angular CLI and managed to make an application run on localhost ng serve. However, I wanted to put this application on my hosted website on Hostinger, just for testing and etc. So, I…
-
5
votes2
answers1613
viewsCan cause cycles or multiple paths to cascade. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY restrictions
I have a class that will have two FK pointing to the same table, so Entity Framework returns the error: Can cause cycles or multiple paths to cascade. Specify ON DELETE NO ACTION or ON UPDATE NO…
-
5
votes2
answers1028
viewsCreate object with internal object array
I would like to create an object "mold" (maybe a class, maybe a function), with possibly other objects inside it, and arrays. The structure I imagine is like this: postagem: { titulo: "", autor: "",…
javascriptasked 7 years, 5 months ago Daniel 3,168 -
5
votes1
answer141
viewsPerl: Find a line in a txt by matching typed words?
Good afternoon, I have a notepad with several lines typed as for example: ★ Bayonet ★ Bayonet | Autotronic (Battle-Scarred) ★ Bayonet | Blue Steel (Minimal Wear) ★ Bayonet | Case Hardened…