Most voted questions
150,413 questions
Sort by count of
-
4
votes1
answer211
viewsHow to detect the mouse, in Lua?
I recently managed to solve a problem related to the control of screen coordinates in a terminal (thanks to the answer found here in Sopt). Now I need to detect the movements and clicks of a…
-
4
votes1
answer321
viewsHow to prevent a user from storing mp3 files, thus preventing them from being able to distribute them?
First of all, it is good to mention that my doubt arises following another question that I put here in stackoverflow in pt and that can be read in: Web Hosting or Streaming Hosting? I am developing…
-
4
votes1
answer1537
viewsDifficulties writing a user friendly (global) web config url
I asked that same question in the English version but I was unsuccessful! I have an application that will be translated into three languages en/en/es. Until then I’ll use Globalresources, I have no…
-
4
votes3
answers269
viewsHow to reduce the capture of groups in a regular expression?
I have the following expression: /((segunda|terça|quarta|quinta|sexta|sábado|domingo)+(((-feira)?)+(.)+\(([0-9].*)\))?)/im That brings me: Show Trueque performs on Saturday at the CDL theater…
-
4
votes4
answers313
viewsChanging a random string of characters using Stringbuilder
I have the following variables:: String mascara = "12****3*59**100*"; String numero = "12345768" There is a way to replace the asterisks of my variable mask by the values of my variable number?…
-
4
votes2
answers649
viewsJava alternative to code-Climate
I wonder if anyone knows any tool/service for Java for the service code-Climate The service provides an analysis of the code under various aspects of good practice, potential security risks and many…
-
4
votes1
answer328
viewsIs it possible to set Android Camera resolution?
I am developing an Android application, and would like to know if it would have how to make my application when calling the camera pass the resolution values of Photo, ex: 1024 X 1024?…
-
4
votes1
answer1157
viewsALTER TABLE causes auto_increment resequencing, Resulting in Duplicate entry '1' for key 'PRIMARY'
I’m trying to put id as primary key but gives this error: ALTER TABLE causes auto_increment resequencing, Resulting in Duplicate entry '1' for key 'PRIMARY'
mysqlasked 10 years, 3 months ago feliphe felix 629 -
4
votes2
answers706
viewsHow to control Javascript file type without capturing extension?
Example: <input type="file" name="meu arquivo"> I know there is a method to capture the name of the described extension, but my goal is to prevent the client to change the file extension, for…
javascriptasked 10 years, 3 months ago Rogers Corrêa 2,596 -
4
votes2
answers492
viewsMount Datatables with Repeater
I’m riding a DataTables jQuery with Peater ASP.NET C#. What am I doing wrong? I’ve been using the code. <body> <form id="form1" runat="server"> <div> <asp:Repeater…
-
4
votes1
answer611
viewsDataannotation validating property with Javascript plugin. ASP.NET MVC
I need to validate a field of my model that has a text editor in Javascript. So far so good, because the problem only occurs in the registration that I do not receive in the parameter of the Action…
-
4
votes4
answers29756
viewsHow to change dates from the American format y/m/d to d/m/y?
I bought some systems but all come with date fields in English, and also in American standard: year/month/day. How do I convert to day/month/year format?
-
4
votes2
answers1134
viewsIs there a performance gain when using View’s in SQL?
As View's are virtual tables resulting from consultations SQL, as in the example: CREATE VIEW view_name AS SELECT column_name(s) FROM table_name WHERE condition From this, we can update or delete a…
-
4
votes2
answers7318
viewsshow a div depending on the selected select
I have a select, and depending on the choice of that same select, a form will be shown to insert a contact. I have to bear in mind that the first option of select already has the form to be shown by…
-
4
votes1
answer359
views -
4
votes1
answer1040
viewsImage recognition within a larger image
I would like to do a part of my application, where the user would upload an image full of drawings inside, he would then select an area of the image and I would search the entire image uppada,…
-
4
votes2
answers1637
viewsQuery SQL with 2 subselects for query lambda (or Linq)
select fieldA from TableA where fieldA = 459249 and fieldB in ( select FieldC from TableB where FieldD in ( select cte.FieldE from TableC cte where key= 'ABDC123' ) ) I managed to get to the point…
-
4
votes1
answer1746
viewsProgress and Time Bar
I would like to know what is the best function in C# that returns with the remaining time when the progress bar reaches the end. I tried this: int restante = Math.Min(progressBar1.Maximum,…
-
4
votes1
answer229
viewsHow to apply a function to multiple objects? (Pure Javascript)
For example, I have a div within a variable obj obj = document.getElementById("objeto"); ..I want a function to be applied to it that way window.onload = function(){ window.onclick = function (){…
-
4
votes2
answers1316
viewsHow to Inhibit Display of Information on the Eclipse Console using Hibernate
I would like some help. I am developing a system using jpa-Ibernate, jsf and primefaces. Whenever I run the application the following appears on the console: 0 [http-8080-2] INFO…
-
4
votes2
answers1249
views"Break" or "Return false"?
Within a function there is a repeating structure, as to the processing economy, which is the best? Javascript function minhaFuncao(boom){ for(i = boom; i > 10; i--){ if(i < 0){ break; } } } or…
javascriptasked 10 years, 4 months ago ptkato 2,383 -
4
votes1
answer520
viewsHow to access an element (or its values) generated dynamically?
I know it’s possible to use the on() and delegate the selector, so it accesses the dynamic element from a static element, but if it cannot use the on(), what to do? For example, inside any function…
-
4
votes4
answers15159
viewsC language - Prime numbers in vectors
I am solving exercises, in C language, on vectors. The exercise is as follows: Make a program that loads an array of 10 integers, show only the primes and their respective positions. Okay I solved…
-
4
votes1
answer365
viewsWhat is the benefit and in what cases use closures in PHP?
Ex.: Why use a closure for this function: We could do the same thing without a closure, but why use this class? public function getTotal($tax) { $total = 0.00; $callback = function ($quantity,…
-
4
votes2
answers1258
viewsWord filter
How can I make a Javascript word filter? For example, I have a div and within that div do not want there to be certain words that are inside an array: var badWords = ['teste', 'teste1', 'oteste2'];…
javascriptasked 10 years, 4 months ago waghcwb 1,915 -
4
votes1
answer306
viewsObject-relational mapping (JPA + Hibernate) using XML
For a specific reason, I need to do object-relational mapping (JPA) of my entities with XML. [Unfortunately,] I cannot use annotations to do this. It turns out that in certain properties, I need to…
-
4
votes1
answer523
viewsUsing hexadecimal as ID in the database
Through the navigation bar, we realize that Google uses hexadecimal values to identify records: The print above was taken from Gmail, but the same occurs for other services like Google Drive. What…
-
4
votes1
answer256
viewsHow to allow just one instance of a program made in Python?
Assuming I created a program in Python and it is working perfectly, how do I allow just one instance of the program at a time? I Googled and found a person saying to have solved the issue using…
-
4
votes2
answers157
viewsYou can distribute program with GPL License along with GPL
I believe this is part of our scope (penultimate item). My question is this:: If I create a program (Graphical Interface) that communicates (dynamically) with a GPL program, I could distribute the…
-
4
votes0
answers55
viewsHow to test virtual name-based Servers/SNI on a local machine?
I am migrating from Apache pro Nginx, and from a certificate "wildcard" (wildcard Certificate - a single certificate for several domains) for SNI. I would like to test the new configuration locally…
-
4
votes1
answer148
viewsReflection Emit, what’s the point?
Passing a code to MVC, I saw there was a Label label= new Label(); that was underlined with red, when clicking to see the suggestions, I saw the following: using System.Web.Ui.WebControls using…
-
4
votes2
answers2474
viewsGet values from within a function that is within another function
I am developing a small Javascript application that makes use of Web SQL. I want to create a function that returns the value of a variable in the VARIABLES table, as well as its observation. It…
-
4
votes3
answers474
viewsMap java.time properties with Hibernate and/or JPA
Is there any way to map properties like java.time.LocalDate and/or java.time.Instant through JPA and/or Hibernate?
-
4
votes1
answer92
viewsUse of meta Keywords
Searchers continue to use the meta tag as relevant? There are several articles on the internet saying no,others that yes,.
-
4
votes1
answer1320
viewsHow to Create a New Account (Domain) via SSH?
A while ago I asked a question - already solved - regarding how to do an automatic update remotely using PHP (See here) Now I would like to create via SSH a new account on the server in order to…
-
4
votes2
answers1073
viewsConcatenate table name loop sql server
I’m trying to fill a table of mine with a loop in sql server follows the code: declare @i int set @i =1 while @i < 5 begin INSERT INTO TABELA VALUES('teste') set @i = @i + 1 end I would like to…
-
4
votes1
answer308
viewsAdd inputs in report with more than one table!
I’m generating a report and it has several tables. In jQuery I have to add 2 inputs from each table, the problem is that it only adds up the one from the first table. I tried to use the next(), but…
-
4
votes1
answer27672
viewsIs it possible to replace my car alarm control with an app?
I’m starting a personal vehicle automation project. At first I will use the native features of my Smartphone, not to need to implement any circuit in the car a priori. I got a Galaxy S4, and a car…
-
4
votes1
answer55032
viewsWhat is the difference and advantages of Opengl and Directx and when to use?
I have entered some sites and some speak well of Opengl for being cross-platform, others advocating the use of directx due to being microsoft and say it is easier to use, others talk to instead of…
-
4
votes2
answers375
viewsJoin of SQL tables
I have a small problem when doing a Join between two tables in SQL, I wonder if you can help me. Are 2 tables GTM_ITEM_CLASSIFICATION and ITEM_REFNUM, both reference the table ITEM, but using…
-
4
votes0
answers178
viewsProblem with Ubuntu window focus setting when using Java
I was making a program in which a circle is drawn on the screen and it is walking around the screen, using the classes JFrame to create the window, a thread to control the circle I insert on the…
-
4
votes1
answer241
viewsHelper for writing Htmlhelpers
I’m trying to write a Htmlhelper and seeing some basic examples I found one with the class TagBuilder that already helping: namespace MyNamespace { public static class MyHeleprs { public static…
-
4
votes2
answers731
viewsChange Context according to application
I need to point out in the web part what context the system will use. My project is divided as follows: After its completion I had to "replicate" it, but using another bank. The tables are equal…
-
4
votes2
answers642
viewsUploads of files via ajax
How can I do several uploads, IE, I have a screen with several input of the kind file, how do I pass this via Ajax to my server? I’ve tried with Xmlhttprequest, but it didn’t work, it would if you…
-
4
votes6
answers1555
viewsHow to do the following query without using INNER JOIN?
I have table A with the following fields: ID | ID_PAIS_ENVIO | ID_PAIS_RECIBO 1 | 23 | 47 //... I have table B with the following fields: ID | NOME_PAIS 23 | Brasil 47 | Portugal //... I need a…
-
4
votes3
answers1352
viewsHow to transform a date into a string format without signals in Datetime?
Examples: string data = "08072013"; string hora = "1515"; Is there a specific method for this type of format? I tried to use Convert.ToDateTime(), DateTime.Parse, etc. and all returned me an…
-
4
votes2
answers1819
viewsLogin using Entity with password encrypted as varbinary
I did the user password encryption and in the Password field of my table I went from Varchar to Varbinary, in the web part of my system it is all right only that in the windows part I am using the…
-
4
votes1
answer351
viewsImport phonegap/Cordova file in eclipse
At the time I will import file I created from phonegap/Cordova in eclipse does not appear anything. file>new>project ae i selecionei Android Project from Existing Code, I look for the folder…
-
4
votes3
answers271
viewsHow to allow only one instance of a certain class?
If we execute the code below, a window will be created with a button inside, that every clicked will open another window (Window2)... How do I not allow a second instance of Window2? I want to do…
-
4
votes1
answer2652
viewsEclipse Dark in windows
Eclipse Luna was released, and with a new theme available "Dark", always liked darker themes, because of a photosensitivity. In linux the Dark theme is perfect because the scrollbars, the handle of…