Posts by humungs • 1,136 points
42 posts
-
2
votes1
answer122
viewsQ: Correct form of Scala NULL checking in Java
First of all, I want to say that I’m a total layman in Scala. I know almost nothing but the basics of language. Knowing this, let’s go to my question. I am in a project where there are libraries…
-
2
votes2
answers300
views -
5
votes4
answers869
viewsA: How to install Wordpress Multisite?
I will try to put step by step here everything you need to do to enable the Wordpress multisite. Come on. Requirements Wordpress 3.0 or higher. (recommend the latest version). Support wildcards in…
-
7
votes1
answer15493
viewsA: Laravel 5 - Remove public from URL
There are some ways to deploy an application made with Laravel. In order of recommendation, follow the options. The deployment options below are for the Laravel 5. I don’t know if they work in other…
-
1
votes1
answer106
viewsA: Build failing PHP project in Travis-CI
I contacted Travis-CI support explaining my problem. They checked my file .travis.yml and saw that there was a hidden character before the tag language: php. This made Travis-CI not detect the…
-
1
votes3
answers458
viewsA: Search database table information with PHP every 10 minutes
The ideal and highly recommended is to create a cronjob on the server by calling the PHP file that does the job. There is nothing for PHP like the Quartz library for Java. Therefore, the best way is…
-
2
votes2
answers949
viewsA: Problems with JPA - Hibernate does not persist WHOLE object
Open your entity Venda and where you mapped the Carrinho: @OneToMany(mappedBy="venda") private List<CarrinhoDeCompras> produto; Add the Cascade: @OneToMany(mappedBy="venda", cascade =…
-
1
votes1
answer106
viewsQ: Build failing PHP project in Travis-CI
I’m trying to make night builds of a PHP project on Travis-CI but I’m catching on. My builds are failing because Travis-CI says they can’t find Composer. There are more details in the log below.…
-
1
votes2
answers729
viewsA: Key Doubt in Symmetric Encryption
I’m not an expert on cryptography, but I read a lot about it and I’m very interested. Your question is a little broad and so is the subject. If we talk in cryptography there are several standards…
-
5
votes2
answers1286
views -
2
votes2
answers292
viewsQ: Leader and Java Recursion Led Logic
I have a relatively simple problem to solve, but I’m not succeeding because of a logical deficiency. My problem is this:: I have a hierarchy of leaders and leaders. For example: Lider 1 Lider 1.1…
-
1
votes1
answer117
viewsA: Best Way to Provide Sessions for DAO’s
Beyond the shadow of a doubt, use Spring. Don’t use these "utility classes" that you see around a lot in projects that go into production. You can even use these classes in tests, and some quick…
-
1
votes1
answer563
viewsA: Doubt about the LDAP + php connection
It all depends. I say this because I don’t know how your company uses LDAP. Some companies use LDAP only as a directory tree where they maintain their structure, collaborators and some attributes…
-
17
votes1
answer4185
viewsA: What is the difference between the Data Mapper and Active Record Patterns?
Both patterns deal with how you control your persistence layer in an object-oriented project on relational bases. The two standards were proposed by Martin Fowler in the book "Patterns of Enterprise…
-
1
votes1
answer138
views -
2
votes1
answer402
viewsQ: Stackoverflowerror exception occurring in @Manytomany relationship with JPA
I’m having a problem in an entity relationship @Manytomany. When I try to make a simple query in the entity that contains @Manytomany a stackoverflow occurs. My rule is simple: My…
-
1
votes1
answer624
viewsA: Unique key violated when I’m doing a delete. Why?
Problem solved. As I said, in question, it was a stupid mistake of mine. There was one more table that I should remove a relation that I did not know. But I still don’t understand why Oracle was…
-
6
votes1
answer624
viewsQ: Unique key violated when I’m doing a delete. Why?
I have a problem that seems silly but I’m skating and I can’t solve it. I have a nice application made in Java using JPA 2 with Spring, Spring Data, JSF, etc... It works great. The basis I’m using…
-
3
votes1
answer634
viewsQ: If I use "provided" libs on the application server (wildfly), do I gain performance?
imagine the following scenario. I have a Wildfly 8.0.0 application server running with settings default from "factory". On this server I run 4 simple web applications. These applications use some…
-
1
votes1
answer1702
viewsQ: Problem when trying to upload files using primefaces 4.0
I have a simple application that allows me to upload text files. To make these uploads, I’m using File Upload from Primefaces, but I’m having problems. I have tried several solutions and I can not…
-
2
votes1
answer4482
viewsA: Personalised registration form
To assemble the forms, you will need to build a plugin "at hand" (which I do not recommend to be at last), or use a plugin ready. From your description, I think the Easy Contact Forms is a good…
-
3
votes2
answers20486
viewsA: How to change the encoding of multiple files from ISO-8859-1 to UTF-8?
If you are using the Eclipse: Open Eclipse with your project; In the tab of "Project Explorer", right click and select "Properties"; In the left menu, choose "Resource" and the right, in "Text File…
-
0
votes4
answers2972
viewsA: Convert data to Timezone
Set a date pattern in String that Javascript should pass. After that, leave it to Java. A slightly more alternative (just a little) way of doing this would be using the method setTimeZone() of…
-
1
votes1
answer975
viewsQ: How to test a DAO (using Spring and JPA) out of a container?
I am developing an application with JPA 2, Spring and JSF 2 running in Wildfly 8.0.0. I have developed some previous applications following this same specification but never tested properly using…
-
2
votes2
answers1830
viewsA: Performance in Java repeat loops
Use the Iterator and the "foreach" will not cause any performance problems, since they have similar speeds while walking Collections. The same cannot be said for the for normal. The problem is in…
-
2
votes1
answer1078
viewsA: Commit transaction only if all EJB’s are successful
Here we go! This will require a little knowledge on transactions and their propagation. In addition to enabling the use of JTA in persistence.xml. Changing the persistence.xml To enable transactions…
-
4
votes3
answers860
viewsA: Extracting Numbers from a String
An alternative is to use regular expressions. Therefore, no matter how the numbers are in your String, regex will extract them for you. See below for the implementation: String numeros = "05abc474 -…
-
2
votes2
answers16347
viewsA: How to call a method when its parameter is an array?
Thus: float[] floatArray = new float[]{1.0f, 2.2f, 3.4f}; vetorFloat(floatArray); Then the method and class in static context would look like this: class main { public static void main(String[]…
-
1
votes2
answers263
viewsQ: Hibernate Warning HHH000444 using Oracle 10g with Wildfly 8.0.0 - follow-on Locking
When making some queries in a view using JPA (2.1) with hibernate, I’m having this Warning. Though it’s working and it’s only one Warning, It bothers me a little bit. WARN…
-
-1
votes2
answers263
viewsA: Hibernate Warning HHH000444 using Oracle 10g with Wildfly 8.0.0 - follow-on Locking
I don’t know if this can be considered a defect or not. But what happens is that in the dialect implemented by Hibernate for Oracle bases (org.hibernate.dialect.Oracle10gDialect), is returning true…
-
0
votes1
answer792
viewsA: How do Hibernate Search sort the result of a search?
The problem was in my entity. @Entity @Indexed @Table(name = "my_view") public class Colaborador implements Serializable { private static final long serialVersionUID = 244555315052436669L; @Id…
-
2
votes1
answer359
views -
3
votes1
answer359
views -
2
votes2
answers3301
viewsA: How to "capture" Webservice (XML) data in Java SE?
You’ll need to focus in two ways which I will describe soon. From what I understand you want to make a request to a URL and get and interpret the answer, which in this case is the XML you showed.…
-
0
votes1
answer276
viewsQ: Problem with class org.hibernate.Validator.Invalidvalue when upgrading from Hibernate 3.X to 4.X
I have a project developed using Jboss Seam 2.2.2.Final along with Hibernate 3.6. I’m trying to upgrade this project by upgrading and migrating the component versions that it uses. One of these…
-
1
votes1
answer462
viewsA: Image Servlet for JSF Project "Locking" the Application Server
I had to do it once. What I’m finding it rather strange is the Glassfish "lock" in some photos and work in others. Is that right? Anyway, it follows the code that I used to do almost the same thing…
-
2
votes1
answer792
viewsQ: How do Hibernate Search sort the result of a search?
I have a indexed search with the Hibernate Search but I can’t get Hibernate Search order the search result in the order of a given column, as for example the name column. But there is a peculiarity.…
-
5
votes2
answers11150
viewsA: How to Mount a Transaction with Commit and Rollback on Oracle?
I’m guessing you’re connected to Oracle directly and you’re not doing it through a programming language like Java or .NET. That said, we follow it. You don’t need to get stuck with procedures to…
-
0
votes1
answer561
viewsA: Jboss stops during JSF 1.2 startup after project conversion to Maven
Problem solved! My application uses some frameworks and libraries. One of these frameworks is Jboss Seam, in which the version I’m using is the 2.2.2.Final. In this version of Jboss Seam, the…
-
0
votes1
answer561
viewsQ: Jboss stops during JSF 1.2 startup after project conversion to Maven
I have a project running perfectly on Jboss AS 5.1, however that same project was not designed using Maven. This means that the dependency management process is still manual and the build is made by…
-
2
votes1
answer2032
viewsA: JSF Javadoc not located in Netbeans
You did the right thing to add Javadoc to the JDK, but no for libraries and components outside JDK , such as JSF, referenced in your question. To add Javadoc to these components in the Netbeans IDE,…
-
0
votes1
answer1072
viewsQ: How to find out who requested a particular PHP file?
I have a PHP file of a legacy system running perfectly on my server that checks this system and sends several emails with the alerts found. However, this file is executed through Cron Jobs,…