Most voted questions
150,413 questions
Sort by count of
-
5
votes2
answers1451
viewsI need to know when the user uses semicolons in decimal numbers
I am developing an exercise whose result is different in scenarios that the user uses point or comma to put his decimal number, in this case I put as variable of type double…
-
5
votes1
answer400
viewsTimer break - PIC18F4550
Hello, I am a student of the Technical course in Mechatronics. My teacher passed a project to show the speed of a reduced CC motor, in RPM, in the Hyper Terminal. He said we need to use the timer…
-
5
votes1
answer137
viewsConvert SQL query to LINQ
How would this SQL query convert to LINQ: "SELECT SUM(valor_negocio) valor_negocio, " + " MONTHNAME(STR_TO_DATE(MONTH(data_inicio), '%m')) mes," + " STATUS" + " FROM negocio" + " WHERE data_inicio…
-
5
votes2
answers439
viewsJava financial math equation
How can I encode this equation in Java? 750=(1-(1+j)^(-10))/j*86…
javaasked 6 years, 12 months ago Weriky Alphazero 37 -
5
votes1
answer641
viewsCalculate integral trapezoid mode
I need to calculate integral with the trapezoid method. I believe the error may be in the for. They had tested them step by step and it worked. function integratrapezio(){ var elmbasea =…
-
5
votes1
answer1032
viewsDependency Injection in . NET Core
I am migrating a Webapi project with . NET Framework 4.6 to . NET Core. In this my project I use Unity to do Dependency Injection: var container = new UnityContainer(); DependencyResolver = new…
-
5
votes2
answers157
viewsChange view/component but not URL
I’m working on a page 404, work well, I have the following: const router = new VueRouter({ routes: [ // ... { path: '*', component: NotFound, name: '404', meta: {page_title: '404 NOT FOUND'} }, ]…
-
5
votes1
answer114
viewsConfiguration of service worker
Can you configure the code below the service worker to ignore the cache if the request from the server is 200? My service worker is picking up routes that exist and are not curly and generating…
-
5
votes1
answer146
viewsHow to view data from a serialized Java file?
I’m starting in Java and I need to make a system that registers students and saves their data in a serialized file. I can even create and save the data in the serialized file (I think rsrs) but I…
-
5
votes1
answer54
viewsLink does not send parameters and redirects to Servlet
I put on my index page where I have three links one with T-shirts, Bermuda and Pants on href I put so that when clicked on the link it was redirected to Servlet and sent the parameters according to…
-
5
votes1
answer326
viewsBring id on route
I’m doing a user management. At the moment, I’m creating the put to edit. But, I don’t know how to bring the id on the route. There is a list of users and also an insert. When the client clicks on…
-
5
votes2
answers30215
viewshow does auto increment work in mysql?
I want to know how to add a column so that it is primary key and auto-increment, but that the value is higher, example: ID :3509. and not just 1,2,3,4...etc.…
-
5
votes1
answer2036
views@Enumerated(Enumtype.STRING) Hibernate JPA
I have the following field classificacao in a table. This field is filled in elsewhere and is filled with, only, 'P' or 'N', acronyms for Positive and Negative. I then created the enum Java.…
-
5
votes2
answers238
viewsHow to find reserved word in a sentence?
I am creating a routine to search reserved words in a text (name of people). I have tested with Contains() and IndexOf(). Works well most of the time. However in some words the return does not…
-
5
votes2
answers260
viewsWhat is the difference between Cssclass="example" and class="example"
I came across the following piece of code: <asp:Label ID="lblStatus" CssClass="labelFiltro" runat="server" Text="Status:"></asp:Label> Until then I didn’t know CssClass, would like to…
-
5
votes1
answer93
viewsCheck if user is logging in from within the company
I will not go into details of the technology used, because the doubt is more on the best way to resolve this situation. I have the following scenario: Company with several subsidiaries; These…
-
5
votes2
answers454
viewsJenkins slave build with JDK not previously installed
I have a Jenkins server that orchestrates my build. Overall, it performs lighter builds, but I need the slave to build GWT projects by SSD. I have some freedom with that slave, but he is a resource…
jenkinsasked 6 years, 12 months ago Jefferson Quesado 22,370 -
5
votes1
answer53
viewsIs it possible to prevent the user screen from erasing on a page?
I believe that all operating systems have the option for the screen to erase after a certain user downtime, mainly as a way to save battery, however, it is not always desired that this happens. For…
-
5
votes2
answers1584
viewsHow to avoid infinite recursion without using the Jsonignore annotation in Springboot
I have a relationship @OneToMany amid Produto and TipoProduto where a TipoProduto may have several Produtos and a Produto may have only one TipoProduto. I’d like to list all the Produtos of a…
-
5
votes1
answer114
viewsIs it good practice to perform Imports within methods?
Is there any advantage to doing import within methods instead of performing the "traditional" import in the program header? If I import within the method, will the module only be imported when the…
pythonasked 7 years ago Bruno Camargo 519 -
5
votes1
answer803
viewsGetting information from an array within a foreach - PHP
Good afternoon. I’m developing a PHP application using Laravel, and I’m having a hard time. I have a table with the Account name, which has the code of this account, represented by the variable…
-
5
votes1
answer144
viewsExtension to improve Atom productivity
I wonder if anyone knows any tool that provides these functions in the Atom editor or Atom IDE? These functions help me in day-to-day productivity!…
-
5
votes1
answer274
viewsAutomatically identify points of influence in a regression
Whenever we make a linear regression, we need to verify that the hypotheses assumed for the model are correct. One of the best ways to do this is through diagnostic graphics. See the example below:…
-
5
votes1
answer139
views -
5
votes2
answers1339
viewsHow to convert negative decimal numbers to hexadecimal
I was able to pass an integer number to hexadecimal. The problem now being tested is that the negative numbers do not work with this formula. This is the code I have: public class PPROG_pl6_ex8 {…
-
5
votes1
answer34
viewsHow can Jquery be both function and object?
I know little about Javascript, and I was trying to understand how Jquery can be a function and an object at the same time. I wondered how it was developed so that it could be called as a function…
-
5
votes1
answer183
viewsPass arguments to the property getter
VB.NET allows you to declare parameters in the property getter Public ReadOnly Property Propriedade(param As String) As String Get Return param & "!" End Get End Property It’s a strange feature…
-
5
votes2
answers12279
viewsComplete number with zeros on the left with PHP
I have a field with a limit of 4 characters where a value will enter, I would like the remaining space to complete with zeros from left to right, for example, if the user inserts the number 4. I…
-
5
votes1
answer75
viewsWhy is :first-Child a pseudo class?
I’m giving a training in CSS, and even after reading and listening on the topic I’m still having some difficulty understanding why :first-Child is a pseudo class and not a pseudo element, like…
-
5
votes3
answers158
viewsCss3 stop after finishing rotation?
I am wearing transform: rotate(90deg) to rotate a div when I put the mouse on top. Once I remove it, it returns to its initial position. There is a way to stop it? I have my code like this .openn{…
-
5
votes1
answer590
views -
5
votes2
answers127
viewsReplaceall() does not remove "|"
I have a following string "|" and I would like to replace it with a simple "", my java code is like this: String teste = "|A|B|C"; teste.replaceAll("|",""); Exit: "|A|B|C" I would like the output to…
-
5
votes1
answer1985
viewsProblem using $_SESSION in PHP 7.1.10
I have two servers running PHP, one in version 5.4.45 and another 7.1.10. When running the files below at the same url, only the older version of PHP displays the values of the "test" session. In…
-
5
votes1
answer362
viewsWhat is the best validation strategy before data persists?
I’m used to . NET using C# and Entityframework. And there in the Entity we have the dataanotations. When I create the entity in C#, for example person, just put the datanotaations and the Entity…
-
5
votes2
answers109
viewsBest way to get text + HTML from an array
Function I am using: $(".push-description-top").each(function() { var text = $(this).text(); var carac = text.length; if (carac > 0) { var query = text.split(" ", 14); query.push('<a…
-
5
votes1
answer229
viewsCurl cookies expires vs n/a
The doubt is as follows, in the network browser console says cookies do not expire, see the image below: But when picking up (making a request of these) these cookies with curl expire:…
-
5
votes1
answer606
viewsDoubt with signaled binary sum
I’m studying operations with binary numbers flagged and I came up with a question I’d like you to clarify: by adding two numbers with 6 bits being 001111(+15) and 010110(+22) I got the result…
-
5
votes2
answers943
viewsC# - Random primes?
I have a college exercise that is to generate a random prime number, if that number is not prime it should keep generating another random until one is, but it always falls into numbers that are not…
c#asked 7 years ago Felipe Lourenço 53 -
5
votes1
answer109
viewsIdentify the name of the streets contained in a polygon
I have the following polygon below: function initialize() { var bounds = new google.maps.LatLngBounds(); var i; var polygonCoords = [ new google.maps.LatLng(-23.554548, -46.607911), new…
-
5
votes1
answer257
viewsWhat is more efficient, a complex query or treat the results?
I can do it: $sql = 'SELECT * FROM ' . 'data_companies ' . 'INNER JOIN data_companies_extra_infos ON' . 'data_companies.cod = data_companies_extra_infos.relationship'; $rs =…
-
5
votes1
answer1089
viewsHow does the for(;;)work?
It’s probably duplicated, but I didn’t find it here on Sopt, and I don’t know how to Google. How the loop works for in that syntax? for(;;) { //... }…
-
5
votes1
answer705
views"No Persistence Provider for Entitymanager" for Hibernate 5.x
Well, you have to update the version of hibernate that was already I want to implement in my project to avoid bugs of the past version, but I’m having difficulty making the persistence in the new…
-
5
votes1
answer9357
viewsRun JNLP Ubuntu
My current version of java is as follows: openjdk version "1.8.0_131" OpenJDK Runtime Environment (build 1.8.0_131-8u131-b11-2ubuntu1.16.04.3-b11) OpenJDK 64-Bit Server VM (build 25.131-b11, mixed…
-
5
votes0
answers40
viewsWhat is the purpose of using "&" in passing parameters to PHP functions?
Good staff, Following pointer logic I came across the following problem. If you run the function below using "&" the PHP memory consumption goes up, it should not be the other way around since I…
-
5
votes1
answer98
viewsA user model should have all the actions that involve it?
Whenever I research I see that in MVC we should separate well the models so that it becomes more organized and easy for a next developer to understand the system. I have basic actions like login,…
-
5
votes1
answer476
viewsUnsafe script
I am developing a website with 2 scripts. However when sending the site to the test area, the scripts do not load, as in the image below. What should I do to be automatically executed and recognized…
-
5
votes1
answer124
viewsAsync methods - return string from UDP
I am developing a code whose goal is to send a package with a string in broadcast and then read the answer (if any), however I want to create a method that just returns the string of the answer. I…
-
5
votes4
answers3300
viewsHow to make Youtube embed responsive on the site, when opening want Width appear 100%
I already have several embed on my site but do not want to go there and change 1 by 1. what I want is a code to change all Iframes, with 100% width and height adjust responsively. .conteudo{…
-
5
votes1
answer117
viewsIs it bad practice to use an "optional" variable inside an object?
When I download a photo on my system, the download process goes through a security method that returns me an object called DownloadResponse. public class DownloadResponse{ public bool IsValid{get;…
-
5
votes2
answers461
viewsDo I need to import a module several times?
I have a class file and a file for the main program, in the two files I need Pygame. I import the classes into the main program this way from classes import *. I need to import Pygame into the…