Posts by Roque Santos • 456 points
11 posts
-
2
votes2
answers593
viewsA: Aligning a checkbox component vertically in the center of Row
A quick way to do it would be to add a label with empty content after the div <div class="col-md-3">, so it would fill the space above and its checkbox would be in the same proportion of the…
-
1
votes2
answers3999
viewsA: How to define the SET CLIENT_ENCODING = UTF8 permanently?
You can add the command SET client_encoding = 'UTF8'; to the archive ~/.psqlrc (or %APPDATA%\postgresql\psqlrc.conf on Windows) For more details, see manual:…
-
2
votes1
answer82
viewsA: Relationship 1x1(or not)
You can use the following code to map the unidirectional relationship: modelBuilder.Entity<ItemPedidoDTO>().HasRequired(i => i.produto).WithMany(); Hasrequired configures the relationship…
-
1
votes1
answer411
viewsA: Enable jQuery Validate (plugin) with the ajax response
The jQuery Validate plugin has a feature called remote method, where it executes a request to check the validity of the element. In your case, it would look more or less like this to perform…
-
0
votes3
answers48
viewsA: how to take the initial and final schedules and store in two variables with javascript?
You can use the String.prototype.split() var hora1 = '9h - 22h' var hora2 = '12h - 21h' var hora1array = hora1.split('-') var hora2array = hora2.split('-') var1 = hora1array[0] var2 = hora1array[1]…
-
0
votes2
answers603
viewsA: enable and disable Ubmit according to input field validity
The expression $(document).ready(function() { ... is executed when the page finishes loading, so you only need to declare that snippet once. For your code to work, try to do it this way. //faz o…
-
1
votes1
answer5444
viewsA: How to map entities with composite keys in JPA?
In your example you noted the relationship as follows: @ManyToOne(fetch = FetchType.EAGER) @JoinColumns(value = { @JoinColumn(name = "ID_CLIENTE", referencedColumnName = "ID_CLIENTE", updatable =…
-
1
votes1
answer330
viewsA: Heritage Java web Inheritance
Rafael, I copied the code and made the following changes for the generation of tabels to work: RELEASE @Entity @Inheritance(strategy = InheritanceType.JOINED) @DiscriminatorColumn(NAME="TIPO",…
-
1
votes1
answer673
viewsA: Trouble creating entity with Hibernate/JPA
To solve the problem described below: Encountered a deprecated javax.persistence.spi.PersistenceProvider [org.hibernate.ejb.HibernatePersistence]; use…
-
10
votes1
answer18212
viewsA: What are the types of Scade in JPA?
There are six types of Scades (Cascadetype) in the specification of JPA. It’s them: ALL = Performs all cascade operations DETACH = Performs detach cascading operation MERGE = Perform the cascade…
-
6
votes1
answer94
viewsA: How to pass an algorithm as parameter in java?
Yes, you can create an interface by defining a "Sort" method for example, and each algorithm will implement this interface and define its way of sorting in this "Sort" method that you defined in the…