Posts by user4919 • 535 points
12 posts
-
3
votes1
answer220
viewsQ: Competition problem in java web application
Good evening, everyone, See the following code: Controller @WebServlet("/testConcurrency") public class TestConcurrency extends HttpServlet { private static final long serialVersionUID =…
-
1
votes1
answer2650
viewsQ: Update with Inner query by selecting the same table
I have the following query: UPDATE cp_feedback_trabalho as a SET a.visivel = 1 WHERE a.dhEnvio IS NOT NULL AND EXISTS ( SELECT b.id FROM cp_feedback_trabalho as b WHERE b.id_pessoa_que_enviou =…
-
3
votes1
answer276
viewsQ: Add and Remove percentage proportionally
Doubt is in mathematics, a calculation that will be used in a program. Let’s assume I have 3 items with different percentages: Item 1 - 10% Item 2 - 40% Item 3 - 50% I want to remove for example 10%…
-
4
votes1
answer235
views -
5
votes1
answer822
viewsQ: Query slows down with ORDER BY
I have a problem, I have a query and when I use the ORDER BY she gets too slow. Note: I created an Index for the premium field and another for the score Follow the full query: SELECT p.id AS…
-
2
votes3
answers1661
viewsQ: Identify Urls and create links
If I have a text, for example: Visit www.stackoverflow.com to get your questions answered. How do I identify the URL and link to it: Acesse o <a…
-
2
votes2
answers293
viewsQ: Sort by date in Mysql
I have a table with two fields: dh_premium_expires and score. dh_premium_expires - the date/time the user premium will expire. score - score of the user within the game. On my site I have a list…
-
3
votes1
answer79
viewsQ: How to perform an action when replying to an email
In some systems I see a very interesting feature, such as: I get a message on facebook and he sends me an email with the message, and I can reply to the message by simply replying to the email. How…
-
0
votes1
answer879
viewsQ: Add and remove percentage
On a certain screen I take a value and add 10% on top of that value. 100,00 + 10% = 110,00 I save the final amount (110.00). I’m having difficulty in picking up the final amount (110.00) and taking…
-
4
votes2
answers6870
viewsQ: Jboss - "Unable to get Managed Connection for java:/Appds"
The following exceptions are occurring in my application: 10:52:34,506 ERROR [br.com.app.dao.NotificacaoDAO] (http--0.0.0.0-8080-77) java.sql.SQLException: javax.resource.ResourceException:…
-
9
votes3
answers2825
viewsQ: Check whether a date and time (timestamp) represents the current day
I have a table with the following field: dh_send (TIMESTAMP) and I want to mount a query to get all records of this table in which the dh_send is equal to the current date (TODAY). I thought as…
-
4
votes5
answers620
viewsQ: How to select records that have a relationship with all values in a list?
I have the following sql: SELECT DISTINCT cp_pessoa.id, cp_pessoa.nome FROM cp_pessoa LEFT JOIN cp_habilidade_freelancer ON (cp_habilidade_freelancer.id_freelancer = cp_pessoa.id) LEFT JOIN…