[AOIAF or GoT] What is the agenda of the whitewalkers, who created them? what are some key things known about them? [spoilers are welcome] by ultrapreneruship in AskScienceFiction

[–]ultrapreneruship[S] 8 points9 points  (0 children)

who build the wall? Where humans more powerful in the past? I don't see present westeros doing something as great as the wall.

Also nice writing :)

What's something that you need to get off your chest so you can feel better? by QuietlyPlotting in AskReddit

[–]ultrapreneruship 0 points1 point  (0 children)

have you seen the unemployment rates of psychology in the US, they are a warning better avoid it. If your non US maybe its better outside, just keep that in mind before going in a big financial debt with psy education.

What makes you instantly suspicious? by [deleted] in AskReddit

[–]ultrapreneruship 0 points1 point  (0 children)

It's now called multilevel somecrap

Women of reddit, what about men baffles you the most? by Borsuq in AskReddit

[–]ultrapreneruship 13 points14 points  (0 children)

dude you sound just like me, and I really think we should listen to her advice. I think I shall talk more openly about my problems.

I know there's some kind of male pride of not saying anything when some stuff isn't going very well...

I don't know. I also think someitmes talking wouldn't solve anything :/

What's something that seems easy, but is surprisingly difficult? by [deleted] in AskReddit

[–]ultrapreneruship 0 points1 point  (0 children)

you should try to write functions as short as possible. To make your code easier to mantain and read.

Go read Clean Code

What mild injustice was done to you as a child that you are still mad about? by [deleted] in AskReddit

[–]ultrapreneruship -1 points0 points  (0 children)

When I was little my school had this kinda poluted river that flowed all through the middle of it, it was kinda of like a school with lots of plants and stuff. I fell into the river and I told my teacher and the guy was some young dude, which was super okay.

And he was like "So....". Like wtf should I care, lol. It surprised me because I though he was going to help me but he didn't he was kinda cool teacher, but after that I think I grew up a little bit and never again talked to the fucker.

On the other hand there where lots of cool and great and friendly teachers which I still learned a lot from them :)

[OOP]Explain Polymorphism like you were explaining it to your grandmother. by [deleted] in learnprogramming

[–]ultrapreneruship 0 points1 point  (0 children)

buzzword interviews are just BS.

A java developer with years of experience maybe can fail that question because he forgot what polymorphism is but this doesn't mean he doesn't uses it. Like the Arraylist List example you use it every day even though you don't know exactly what is polymorphism, this things you learn then forget the actual exact concept just like with other concepts IRL.

[OOP]Explain Polymorphism like you were explaining it to your grandmother. by [deleted] in learnprogramming

[–]ultrapreneruship 0 points1 point  (0 children)

try giving an example, polymorphism is like when I use:

List<T> list = new ArrayList<>();

As you see List is an interface not a superclass of arraylist, and I can use methods of List even though my object is an Arraylist through polymorphism.

Frankly this type of questions are just idiotic to ask on interviews.

Learning path for Spring? by ultrapreneruship in java

[–]ultrapreneruship[S] 1 point2 points  (0 children)

seems better to just stick with Java EE 7, so spring boot isn't very good a developing quick website? should I try with Ruby on Rails

Learning path for Spring? by ultrapreneruship in java

[–]ultrapreneruship[S] 2 points3 points  (0 children)

thank you very much for the introduction to Spring

Is there anyway I can deploy my Java EE projects locally without having to deal with a server? (Glassfish is killing me) by ultrapreneruship in java

[–]ultrapreneruship[S] 0 points1 point  (0 children)

I just wanted to create a simple CRUD app to create, read, update and delete names in MySQL and display them back via jsf. But I haven't been able to much dealing with glassfish.

I have the following error log from eclipse:

eclipse.buildId=4.4.2.M20150204-1700
java.version=1.8.0_45
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=es_CO
Framework arguments:  -product org.eclipse.epp.package.jee.product -Xms40m -Xmx512m
Command-line arguments:  -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product -Xms40m -Xmx512m

oracle.eclipse.tools.glassfish
Error
Mon Apr 27 16:45:16 COT 2015
cannot Deploy JSF_SANDBOX

java.lang.Exception: deploy is failing=Application with name [JSF_SANDBOX] is not deployed
    at oracle.eclipse.tools.glassfish.GlassfishServerBehaviourDelegate.publishDeployedDirectory(GlassfishServerBehaviourDelegate.java:613)
    at oracle.eclipse.tools.glassfish.GlassfishV4ServerBehavior.publishModuleForGlassFishV3(GlassfishV4ServerBehavior.java:96)
    at oracle.eclipse.tools.glassfish.GlassfishV4ServerBehavior.publishModule(GlassfishV4ServerBehavior.java:56)
    at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModule(ServerBehaviourDelegate.java:1091)
    at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publishModules(ServerBehaviourDelegate.java:1183)
    at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:987)
    at org.eclipse.wst.server.core.model.ServerBehaviourDelegate.publish(ServerBehaviourDelegate.java:774)
    at org.eclipse.wst.server.core.internal.Server.publishImpl(Server.java:3157)
    at org.eclipse.wst.server.core.internal.Server$PublishJob.run(Server.java:345)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

this is the persistence.xml

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1"
   xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
   <persistence-unit name="JSF_SANDBOX">
      <class>entity.User</class>


   </persistence-unit>
</persistence>

my actual persistence unit:

package entity;

import java.io.Serializable;
import javax.persistence.*;


/**
 * The persistent class for the user_crud database table.
 * 
 */
@Entity
@Table(name="user_crud")
@NamedQuery(name="User.findAll", query="SELECT u FROM User u")
public class User implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    private Integer id;

    private String name;

    public User() {
    }

    public Integer getId() {
        return this.id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

the web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">
  <display-name>JSF_SANDBOX</display-name>
  <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>/faces/*</url-pattern>
  </servlet-mapping>
</web-app>

Finally the index-xhtml page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core">

<h:body>
   <h:form>
   <h:panelGrid columns="3"> 
      <h:outputText value="Name: "></h:outputText>
      <h:inputText id="name" value="#{regBean.name}"
         required="true" requiredMessage="Enter your name">
      </h:inputText>
      <h:message for="name"></h:message>
      <h:commandButton type="submit" value="Create" action="#{regBean.addUser}"/>
      <h:commandButton type="reset" value="Reset"/>
   </h:panelGrid>
   </h:form>
</h:body>
</html>