Posts by Felipe Fonseca • 928 points
19 posts
-
1
votes1
answer105
viewsA: Creating HTML elements with Jquery
The use of the function text() is overwriting all the append that was performed earlier. So only the append after the call to text() is maintained. To avoid this, continue using append() to free the…
-
3
votes3
answers16929
viewsA: Multiple foreign keys from the same table. Is it possible?
There is no problem in creating more than one foreign key for the same table. Why? Because relationships between tables have semantics and this may require a different link to the same table Tables…
-
5
votes4
answers4957
viewsA: Javascript code does not work
The event onsubmit does not exist in inputs. It is used in the form. Put the event on form and your code will work.…
javascriptanswered Felipe Fonseca 928 -
4
votes2
answers851
viewsA: Is it possible to limit the number of lines in a class attribute that is a list via JPQL?
It is really necessary to make the query under user? By performing the query on top of address you will be able to paginate with the methods setFirstResult(int) and setMaxResults(int) To paginate…
-
1
votes2
answers2504
viewsA: How to run a JS or jQuery function after an update, Reload in JSF and Primefaces?
To make the solution generic, put a call to the function inside the form. So, every time an update is performed on form, the function will be called again, independent of the component that updated…
-
2
votes1
answer9260
viewsA: Open modal window automatically when opening the page
Your problem is in the variable id When changing $("a[rel=modal]").click( for $(window).load( you change the value of this and therefore when carrying out the operation var id =…
jqueryanswered Felipe Fonseca 928 -
6
votes3
answers3330
viewsA: Convert a date to the name of the day of the week
PHP has facilities for this. http://php.net/manual/en/function.strftime.php Just use the desired Pattern ( in your case, %A ) that the query will return correctly. Don’t forget to put the Locale…
phpanswered Felipe Fonseca 928 -
3
votes1
answer74
viewsA: Data modeling for user-favorite tasks
Every relationship that is understood as "many for many" needs an intermediate table, like the one you explained. In this case, as a person may prefer several tasks and a task can be favoured by…
modelinganswered Felipe Fonseca 928 -
4
votes2
answers649
viewsQ: Java 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…
-
1
votes4
answers58057
viewsA: What is the purpose of @Override?
Overwriting ( overload ) methods is part of the object orientation that I will not go into detail, since the question is directed to annotation. The annotation basically serves to "warn" the…
javaanswered Felipe Fonseca 928 -
1
votes1
answer140
viewsA: Vector error(one-dimensional matrix)
C++ arrays start at 0. I believe the error is in the final loop, where you are iterating the array outside the desired range. Change your final loop to for(a=0;a<10;a++){ printf("valores de…
c++answered Felipe Fonseca 928 -
1
votes1
answer64
viewsA: How do I withdraw a notification!
It’s very simple. Just use the cancel or cancelAll of the Notifitionmanager. http://developer.android.com/reference/android/app/NotificationManager.html#Cancel(int)…
-
5
votes4
answers8116
viewsA: Why and when to use XML instead of JSON?
XML features several facilities and uses that JSON does not support. You may have search in it through Xpath, Xquery in addition to being able to validate Schema ( know if you are well formed ) and…
-
1
votes1
answer135
viewsA: Edit similar fields in codeigniter
I assume you have an establishment table and a telephone table, correct? I recommend making this so that your data are (minimally) normalized. After you have these two tables, you will be able to…
-
7
votes1
answer191
viewsA: What is the difference between Feature Detection and Feature inference
Feature Detection is to verify that the function is available to be used explicitly. Feature inference consists in checking whether a function is available and, based on this, assuming that another…
javascriptanswered Felipe Fonseca 928 -
13
votes1
answer790
viewsA: Closest vs Parents
Everything will depend on the use. The Jquery documentation itself explains the differences through a comparative table. The method closest starts the search in the element itself, while the method…
jqueryanswered Felipe Fonseca 928 -
2
votes1
answer2201
viewsA: Insert random data into a table that has foreign keys (Oracle)
It is possible to query the department table and retrieve a random row to add to the record. In that article it explains how to do this in several banks. In your case, using Oracle, the query would…
-
6
votes2
answers3023
viewsA: Query in Mysql to return scheduled records for the next 30 days
To select the date in order you must use ORDER BY in your consultation. To display a date of the next 30 days, you can use the command DATE_ADD mysql and add the 1 month interval ( or 30 days ) The…
-
2
votes1
answer164
viewsA: How to delete Mysql database news?
To submit a confirmation to the user you can use the Dialog, placing a request to the server on the positive button. To delete a comment ( news, in your case ), I believe that the best option is to…