Search Results

Search found 2458 results on 99 pages for 'rafael spring'.

Page 95/99 | < Previous Page | 91 92 93 94 95 96 97 98 99  | Next Page >

  • Flex vs GWT again

    - by CK Lee
    Hi all, I am working on a customized web ontology editor (something like http://webprotege.stanford.edu/ which is built by GWT). My backend will be Java+Spring+Hibernate and domain models are in Java. My frontend will be something like WebProtege which requires extensive RPC call. It is quite clear that I should use GWT as I can refer to the open source code. However, due to company policy, I shall consider Flex as well. I understand Flex can remotely invoke Java backend methods via BlazeDS using AMF (Is there a Flex equivalent of GWT-RPC?). I have read discussion on GWT vs Flex vs ?. If I can make full decision sure I will go with GWT. GWT strengths like support right to left characters, support iPhone/iPad, smaller size, support JSON out of the box, support printing are not important considerations for my project. Besides GWT supports Java generic, enum; domain objects can be shared with both GWT client and server; coding are more seamlessly... anyone can suggest other strong reasons that I should only go with GWT? FYI, I have plenty of Java experience but both GWT and Flex are new to me. Thanks.

    Read the article

  • Logging in "Java Library Code" libs for Android applications

    - by K. Claszen
    I follow the advice to implement Android device (not application!) independent library code for my Android Apps in a seperate "Java Library Code" project. This makes testing easier for me as I can use the standard maven project layout, Spring test support and Continuous Build systems the way I am used to. I do not want to mix this inside my Android App project although this might be possible. I now wonder how to implement logging in this library. As this library will be used on the Android device I would like to go with android.util.Log. I added the followind dependency to my project to get the missing Android packages/classes and dependencies: <dependency> <groupId>com.google.android</groupId> <artifactId>android</artifactId> <version>2.2.1</version> <scope>provided</scope> </dependency> But this library just contains stub method (similar to the android.jar inside the android-sdk), thus using android.util.Log results in java.lang.RuntimeException: Stub! when running my unit tests. How do I implement logging which works on the Android device but does not fail outside (I do not expect it to work, but it must not fail)? Thanks for any advice Klaus For now I am going with the workaround to catch the exception outside android but hope there is a better solution. try { Log.d("me", "hello"); } catch (RuntimeException re) { // ignore failure outside android }

    Read the article

  • Managing libraries and imports in a programming language

    - by sub
    I've created an interpreter for a stupid programming language in C++ and the whole core structure is finished (Tokenizer, Parser, Interpreter including Symbol tables, core functions, etc.). Now I have a problem with creating and managing the function libraries for this interpreter (I'll explain what I mean with that later) So currently my core function handler is horrible: // Simplified version myLangResult SystemFunction( name, argc, argv ) { if ( name == "print" ) { if( argc < 1 ) { Error('blah'); } cout << argv[ 0 ]; } else if ( name == "input" ) { if( argc < 1 ) { Error('blah'); } string res; getline( cin, res ); SetVariable( argv[ 0 ], res ); } else if ( name == "exit ) { exit( 0 ); } And now think of each else if being 10 times more complicated and there being 25 more system functions. Unmaintainable, feels horrible, is horrible. So I thought: How to create some sort of libraries that contain all the functions and if they are imported initialize themselves and add their functions to the symbol table of the running interpreter. However this is the point where I don't really know how to go on. What I wanted to achieve is that there is e.g.: an (extern?) string library for my language, e.g.: string, and it is imported from within a program in that language, example: import string myString = "abcde" print string.at( myString, 2 ) # output: c My problems: How to separate the function libs from the core interpreter and load them? How to get all their functions into a list and add it to the symbol table when needed? What I was thinking to do: At the start of the interpreter, as all libraries are compiled with it, every single function calls something like RegisterFunction( string namespace, myLangResult (*functionPtr) ); which adds itself to a list. When import X is then called from within the language, the list built with RegisterFunction is then added to the symbol table. Disadvantages that spring to mind: All libraries are directly in the interpreter core, size grows and it will definitely slow it down.

    Read the article

  • Web-Application development startup advice

    - by rpr
    Dear programmers of StackOverflow, recently me and two of my friends from college started a software company. We are developing web-applications using GWT-Spring-Hibernate and other helper frameworks. In a couple of months, we managed to set up a stable back-end and produced some demo programs for CRM solutions. Our area of interest is CRM where we can combine the flexibility of our back-end with the slick looking GWT based GUIs. Unfortunately we live in a third world country (well, kind of two and a half :) and no one here gives our work enough credit, or really cares about the advantages of web-apps. We are stuck at the moment because our current clients do not want to pay that much money for just "putting their local app on the web". Since we can not find satisfying work here, we have decided to work online/international. I was wondering if you guys know a good freelance kind of sites where we can throw ourselves into the market.. Also a question from frustration, to those who are in the field or knowledgeable/interested about web based CRM, how much would you ask/pay for lets say a web app which will keep track of all the patients of a multi-branch clinic also allowing the patients to access to view their own records? Including tiered authorization, logging etc.. Many thanks in advance for your responses!

    Read the article

  • Inversion of control domain objects construction problem

    - by Andrey
    Hello! As I understand IoC-container is helpful in creation of application-level objects like services and factories. But domain-level objects should be created manually. Spring's manual tells us: "Typically one does not configure fine-grained domain objects in the container, because it is usually the responsibility of DAOs and business logic to create/load domain objects." Well. But what if my domain "fine-grained" object depends on some application-level object. For example I have an UserViewer(User user, UserConstants constants) class. There user is domain object which cannot be injected, but UserViewer also needs UserConstants which is high-level object injected by IoC-container. I want to inject UserConstants from the IoC-container, but I also need a transient runtime parameter User here. What is wrong with the design? Thanks in advance! UPDATE It seems I was not precise enough with my question. What I really need is an example how to do this: create instance of class UserViewer(User user, UserService service), where user is passed as the parameter and service is injected from IoC. If I inject UserViewer viewer then how do I pass user to it? If I create UserViewer viewer manually then how do I pass service to it?

    Read the article

  • Maven + SSDM Build and Runtime Environment Automation

    - by Randy
    Preface: My Company, like most, has several run-time environments and several release versions which themselves are composed of different versions of various jars. For example, let us consider release versions 1.1, 1.2, and 1.3 of Software X, which may be deployed to a developer computer, testing, or production. Software-x-1.1 is itself composed of jarA-0.9.1 and jarB-0.7.5, but software-x-1.3 is composed of jarA-1.7.31 and jarB-0.8.1. Currently we use Spring's PropertyPlaceholderConfigurer to configure run-time variables (such as database credentials), however, properties also change with release versions. We also use Maven 2 POM version 4 to specify which versions of our code need to be used. We place the version numbers of our jars as properties within profiles (dev,test,prod) inside of the parent pom and then reference those version numbers in all project poms. As of right now, we have no way to specify which project versions pertain to a given release other than the most current one. Moreover, we deploy our run-time configurations to the SSDM pickup which then configures and creates the services defined by the built versions of our software. -- Questions: Is there any procedure/tool we can use to build our product by merely providing the run-time environment and version number? IE "build 1.1 dev"? Is there anyway we can store the required jar versions for each release build? We are currently versioning all files, including the parent pom, but merely versioning the parent pom does not record which release version is pertinent to that parent pom. What else can we do to further automate the process of builds? For example, if we could manage run-time configurations within the parent pom that would be a step in the right direction, but that seems like a violation of scope. Any tool outside of our framework is inconceivable at this point, but not in the far future. Summary: How can we automate our build process to the fullest extent without being error prone?

    Read the article

  • World Economic Crisis. IT prospects

    - by Andrew Florko
    There was alike question in 2008, 2 years passed. Please, share your expectations about IT market and employment in the next year or two (or so far you can predict). IMHO Russia (my native country) fully met Crisis in spring, 2008. Stock markets shrank 3(!) times during half a year. Many developers were fired those days but I suppose just because business was shocked and freezed some projects. Developers expected +20% salary growth per year in 2004-2007 (Developer salary in Moscow was about 2-3K$ in early 2008). Then there was 30% (very subjective) salary cut-off in 2008 and salaries were frozen till 2009. Now things are slowly coming back to 2008. Looking in the future I expect pessimistic scenario and another crash. Our economic depends more and more on oil & gas every year. IT that serves industry will be shrinked because we can't compete to China in real production. Due to high currency board (rubble is strong compared to dollar) we can't rely on offshore programming. Our officials are concerned on innovative economic breakthrough but it's an ordinary budget money assignemtn in practice. I don't believe in innovations either because who require innovations if you have debts and tomorrow is vapor?

    Read the article

  • Why is there so much XML in Java these days?

    - by BD at Rivenhill
    This is really more of a philosophy/design issue. I did some work in Java back in the middle 90's and again in the early 2000's and now I'm coming back to it after spending a lot of time in C/C++ and it seems like there was an explosion of XML dependency while I was gone. Major build system tools like ant and maven depend on XML for their configuration, but I'm actually more concerned with all the frameworks, such as Spring, Hibernate, etc. My experience is that powerful supporting libraries like these are where a developer can really get leverage for building programs with lots of features without writing a lot of code, but it really seems like I'm getting one language for the price of two here. I write a bunch of Java classes, but then I also write a bunch of XML files to glue them together. The things that get done in the XML are things that I can see reasonable ways of doing in straight code without the middleman, and they don't really seem to be treated exactly like configuration files: they change rarely and they end up getting committed to source code control like the Java code itself, but they are distributed with the resulting application and need to be unpacked and installed in the classpath in order to get the application to work. I'm working with server applications that are not web-based, so maybe the domain is a bit different from what most people are doing, but I just can't help feeling that I must be doing something wrong here. Can someone point me to a good source of information for why these design choices were made and what problems they are meant to solve so that I can analyze my own experiences in this context?

    Read the article

  • Fastest way to learn Flex and Java EE?

    - by LostWebNewbie
    Ok so me and my 2 friends have to make a webapp and well we think it's a good opportunity to learn JEE and Flex. The thing is we have very little knowledge about them and we have only 3 months to do it (it doesn't have to be super complicated). So my question is: what, in your opinion, would be the fastest way to learn them both? I guess we need to know some JSP, Serlvets, JPA (??), Flex, maybe JavaScript+CSS? Anything else like EJB? Should we also learn Spring (or Struts)? Obviously reading books would be a good idea, but I bet we won't make the deadline if we try to read all the books... @Edit: I know the basics of JSP/Servlets (read Head First JSP&Servlets) but I made only 1 project so far (a semi-decent hangman with JSP/Serlvets and JPA for persistance) that's about it. Flex - I'm just starting, I know really the basics of mxml and as3. As for why: 1) because we need to do a project for the uni and well I was thinking bout becoming a web dev (yup - jee+flex) after graduation, this is the perfect opportunity to learn them.

    Read the article

  • MVC for a desktop application, connection a view/controller pair with another one

    - by lcf
    Hello. I've had mostly experience with "server-side" mvc frameworks very popular in different languages like ASP.NET MVC or Zend Framework for php, Spring for Java etc. Some of them are also possible to use for desktop applications development but I never tried that. I fully understand that design patterns should not limit implementation, they should generally provide ideas and common rules that can be differently implemented. Now I'm playing with one of those mvc frameworks for usual Desktop Applications development (it does not have many tutorials or a decent quickstart) and I have some questions regarding to the mvc paradigm. Here is one of them: What are common ways to link different views / controllers? If I click a button, special controller for that button dispatches the event that is generated, does something with the model, changes view state. But what if I need to interact with another view? Like, when I click on a button, it changes a model, but also I need to open another window or change state of another window (hiding a button on another window let's say...), without changing actually the model. What are common ways here to address this? Should my first controller generate an event for the second controller (or second view)? Or should the second controller be handling events from first view? Some links or examples for any languages/frameworks would be really helpful, thanks!

    Read the article

  • Hibernate JPA Caching Problem, Please help!

    - by Sameer Malhotra
    Ok, Here is my problem. I have a table named Master_Info_tbl. Its a lookup table: Here is the code for the table: @Entity @Table(name="MASTER_INFO_T") public class CodeValue implements java.io.Serializable { private static final long serialVersionUID = -3732397626260983394L; private Integer objectid; private String codetype; private String code; private String shortdesc; private String longdesc; private Integer dptid; private Integer sequen; private Timestamp begindate; private Timestamp enddate; private String username; private Timestamp rowlastchange; //getter Setter methods I have a service layer which calls the method       service.findbycodeType("Code1");   same way this table is queried for the other code types as well e.g. code2, code3 and so on till code10 which gets the result set from the same table and is shown into the drop down of the jsp pages since these drop downs are in 90% of the pages I am thinking to cache them globally. Any idea how to achieve this? FYI: I am using JPA and Hibernate with Struts2 and Spring. The database being used is DB2 UDB8.2 Please help!

    Read the article

  • CXF code first service, WSDL generation; soap:address changes?

    - by jcalvert
    I have a simple Java interface/implementation I am exposing via CXF. I have a jaxws element in my Spring configuration file like this: <jaxws:endpoint id="managementServiceJaxws" implementor="#managementService" address="/jaxws/ManagementService" > </jaxws:endpoint> It generates the WSDL from my annotated interface and exposes the service. Then when I hit http://myhostname/cxf/jaxws/ManagementService?wsdl I get a lovely WSDL. At the bottom in the wsdl:service element, I'll see <soap:address location="http://myhostname/cxf/jaxws/ManagementService"/> However, some time a day or so later, with no application restart, hitting that same url produces: This causes a number of problems, but what I really want is to fix it. Right now, there's a particular client to the webservice that sets the endpoint to localhost; because it runs on the same machine. Is it possible the wsdl is getting regenerated and cached and then exposing the 'localhost' version? In part I don't know the exact mechanism by which one goes from a ?wsdl request in CXF to the response. It seems almost certain that it's retrieving some cached version, given that it's supposed to be determining the address by asking the servletcontainer (Jetty). For reference I know a stopgap solution is using the hostname on the client and making sure an alias in place so that it goes over the loopback. EDIT: For reference, I confirmed that if I bring my application up and first hit it over localhost, then querying for the wsdl via the hostname shows the address as localhost. Conversely, first hitting it over the hostname causes localhost requests to show the hostname. So obviously something is getting cached here.

    Read the article

  • best web database solution for scala for a high traffic site?

    - by egervari
    I am in charge of a rebuilding a website that gets about 250,000 visitors a day. We'd like to use Scala, but it does not work very well with Spring (in some minor cases) and Hibernate (there is a major and very annoying mismatch here if you want to use scala collections, which we do). The application itself is going to have about 40-50 tables. Other than Hibernate, is there an ORM that works awesome with Scala and is as performant and reliable as Hibernate? Does it also have the same capabilities, or are we going to run into leaky-abstractions if we don't use Hibernate? It would be a big risk for us to go with a framework that is newer and doesn't seem to have a lot of industry backing... and at the same time, Hibernate is a real pain to program against when using Scala. 1) The Java Collection <- Scala Collection is absolutely painful. There is a lot more boilerplate and crap to write. 2) The IDE doesn't import JavaConversions and java interfaces automatically... so we this needs to be done manually. Optimizing Imports in IDEA is going to destroy all the manual work. 3) There is also a performance cost to converting back and forth all the time in your domain objects and your dao classes. 4) Not to mention there needs to be a lot of casting, which produces code ugly as sin. I actually would love to write my own orm that is 100% tailored to scala, but obviously this is really outside of the scope of our project for now. So what is the best approach?

    Read the article

  • ActionScript 3.0 Color Output Error?

    - by TheDarkIn1978
    I'm employing color in a current AS3 project, and have come across what appears to be an error in the Flash Player (version 10). it might also be an error with Apple's DigitalColor Meter (version 3.7.2), which is what i'm using to sample the displayed colors on Mac OS X Snow Leopard (version 10.6.3). //Primary, secondary, and tertiary colors of the RGB color wheel var red:Number = 0xFF0000; var orange:Number = 0xFF7D00; var yellow:Number = 0xFFFF00; var chartreuse:Number = 0x7DFF00; var green:Number = 0x00FF00; var spring:Number = 0x00FF7D; var cyan:Number = 0x00FFFF; var azure:Number = 0x007DFF; //reads 0x0077FF var blue:Number = 0x0000FF; var violet:Number = 0x7D00FF; var magenta:Number = 0xFF00FF; //reads 0xFF00F8 var rose:Number = 0xFF007D; //reads 0xFF0077 all of these colors display normally except for 3: Azure, Magenta and Rose. they are coded with the appropriate number, but when i use the color meter to sample the displayed colors, those 3 return inaccurate results. anyone have any insight about this issue? what is causing the error, the Flash runtime or the color sampler? if it's the Flash player, could this problem be much deeper? *sampling this image will return inaccurate results due to .jpg compression. it's simply for illustration

    Read the article

  • Best ways to construct Dynamic Search Conditions for Sql

    - by CoolBeans
    I have always wondered what's the best way to achieve this task. In most web based applications you have to provide search options on many different criteria. Based on what criteria is chosen behind the scene you modify your SQL. Generally, this is how I tend to go about it:- Have a base SQL template. In the base template have conditions like this WHERE [#PRE_COND1] AND [#PRE_COND2] .. so on and so forth. So an example SQL might look something like SELECT NAME,AGE FROM PERSONS [,#TABLE2] [,#TABLE3] WHERE [#PRE_COND1] AND [#PRE_COND2] ORDER BY [#ORD_COND1] AND [#ORD_COND2] etc. During run time after figuring out the all the search criteria user has entered, I replace the [#PRE_COND1]s and [#ORD_COND1]s with the appropriate SQLs and then execute the query. I personally do not like this brute force method. However, I never came across a better approach either. How do you accomplish such tasks generally given you are either using native JDBC or Spring JDBC? It is almost like I need a C MACRO like functionality in Java to do this.

    Read the article

  • Proper structure for dependency injection (using Guice)

    - by David B.
    I would like some suggestions and feedback on the best way to structure dependency injection for a system with the structure described below. I'm using Guice and thus would prefer solutions centered around it's annotation-based declarations, not XML-heavy Spring-style configuration. Consider a set of similar objects, Ball, Box, and Tube, each dependent on a Logger, supplied via the constructor. (This might not be important, but all four classes happen to be singletons --- of the application, not Gang-of-Four, variety.) A ToyChest class is responsible for creating and managing the three shape objects. ToyChest itself is not dependent on Logger, aside from creating the shape objects which are. The ToyChest class is instantiated as an application singleton in a Main class. I'm confused about the best way to construct the shapes in ToyChest. I either (1) need access to a Guice Injector instance already attached to a Module binding Logger to an implementation or (2) need to create a new Injector attached to the right Module. (1) is accomplished by adding an @Inject Injector injectorfield to ToyChest, but this feels weird because ToyChest doesn't actually have any direct dependencies --- only those of the children it instantiates. For (2), I'm not sure how to pass in the appropriate Module. Am I on the right track? Is there a better way to structure this? The answers to this question mention passing in a Provider instead of using the Injector directly, but I'm not sure how that is supposed to work. EDIT: Perhaps a more simple question is: when using Guice, where is the proper place to construct the shapes objects? ToyChest will do some configuration with them, but I suppose they could be constructed elsewhere. ToyChest (as the container managing them), and not Main, just seems to me like the appropriate place to construct them.

    Read the article

  • Java Generics error when implementing Hibernate message interpolator

    - by Jayaprakash
    Framework: Spring, Hibernate. O/S: Windows I am trying to implement hibernate's Custom message interpolator following the direction of this Link. When implementing the below class, it gives an error "Cannot make a static reference to the non-static type Locale". public class ClientLocaleThreadLocal<Locale> { private static ThreadLocal tLocal = new ThreadLocal(); public static void set(Locale locale) { tLocal.set(locale); } public static Locale get() { return tLocal.get(); } public static void remove() { tLocal.remove(); } } As I do not know generics enough, not sure how is being used by TimeFilter class below and the purpose of definition in the above class. public class TimerFilter implements Filter { public void destroy() { } public void doFilter(ServletRequest req, ServletResponse res, FilterChain filterChain) throws IOException, ServletException { try { ClientLocaleThreadLocal.set(req.getLocale()); filterChain.doFilter(req, res); }finally { ClientLocaleThreadLocal.remove(); } } public void init(FilterConfig arg0) throws ServletException { } } Will doing the following be okay? Change static method/field in ClientLocaleThreadLocal to non-static method/fields In TimeFilter, set locale by instantiating new object as below. new ClientLocaleThreadLocal().set(req.getLocale()) Thanks for your help in advance

    Read the article

  • hibernate annotation bi-directional mapping

    - by smithystar
    I'm building a web application using Spring framework and Hibernate with annotation and get stuck with a simple mapping between two entities. I'm trying to create a many-to-many relationship between User and Course. I followed one of the Hibernate tutorials and my implementation is as follows: User class: @Entity @Table(name="USER") public class User { private Long id; private String email; private String password; private Set<Course> courses = new HashSet<Course>(0); @Id @GeneratedValue @Column(name="USER_ID") public Long getId() { return id; } public void setId(Long id) { this.id = id; } @Column(name="USER_EMAIL") public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } @Column(name="USER_PASSWORD") public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @ManyToMany(cascade = CascadeType.ALL) @JoinTable(name = "USER_COURSE", joinColumns = { @JoinColumn(name = "USER_ID") }, inverseJoinColumns = { @JoinColumn(name = "COURSE_ID") }) public Set<Course> getCourses() { return courses; } public void setCourses(Set<Course> courses) { this.courses = courses; } } Course class: @Entity @Table(name="COURSE") public class Course { private Long id; private String name; @Id @GeneratedValue @Column(name="COURSE_ID") public Long getId() { return id; } public void setId(Long id) { this.id = id; } @Column(name="NAME") public String getName() { return name; } public void setName(String name) { this.name = name; } } The problem is that this implementation only allows me to go one way user.getCourses() What do I need to change, so I can go in both directions? user.getCourses() course.getUsers() Any help would be appreciated.

    Read the article

  • UTF-8 support in java application

    - by jacekn
    I'm having trouble with UTF-8. common.jsp <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> typical.jsp <%@ include file="common.jsp" %> Page Head <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> Form <form id="screenObject" accept-charset="UTF-8" action="/SiteAdmin/articleHeaderEdit?articleId=15" method="post"> I enter non latin1 characters into a text field and click Save. Validator complains about another field and stops the submission. This never gets to the database, so database ability to handle UTF-8 is not in this picture. The page redisplays with appropriate error but the text that had been entered is all messed up. All non latin1 characters are converted to some gibberish. I'm using Spring 3 MVC, in case that matters... Attempts Adding this to my view resolver didn't help: <property name="contentType" value="text/html;charset=UTF-8" />

    Read the article

  • How to read pair in freemarker

    - by Lukasz Rys
    Ok i'm having little trouble with reading pair. So I'm creating my pair private Pair<Integer, Integer> count(somethink) { int c1 = 2; int c2 = 4; return new Pair<Integer, Integer>(c1, c2); } And 'sending' it to ftl via java mv.addObject("counted", count(somethink)); I won't write everythink how it sends because I dont think it really matters with my issue. So i'm recieving it in "ftl". Then i was trying to 'read' it <#list counted?keys as key> <a href="#offerOrderTab"><@spring.message "someMsg"/>(${key}/${counted[key]})</a> </#list> After then i'm getting error Expecting a string, date or number here, Expression x is instead a freemarker.ext.beans.SimpleMethodModel As i suppose you dont iterate pairs (or I'm wrong?) i know its pair that contains only one key and one value but still i have to do send it that way and I thought its goin be to similar to iterating through map, in java i would use pair.first() and pair.second() but it doesn't work in ftl (ye i know it shouldnt work). I also tried to cast it to String by using ?string but it didnt work too

    Read the article

  • What does "Select Distinct Null As xxxxx" mean?

    - by Soylent Green
    Background: I am mapping Sybase stored procedure return values to java objects using Spring. For example I map a Sybase datatype of varchar as a String type in Java, and a Sybase datatype of int as an int type in Java, etc. I have come across the following code in one of the stored procedures: SELECT DISTINCT A.Col1 AS val1, A.Col2 AS val2, NULL AS someVal, A.col3 AS val3, ... A.col9 AS val9 FROM #SomeTable A ORDER BY Col2, Col3 I have 2 related questions: What does Null mean in this scenario? I am confused as to what is happening here. I am able to determine the data type of Col1, Col2, etc. of course by looking at the table definition of Table A defined earlier in the stored procedure. Thus I know what datatype I can define in my Java object for val1, val2, etc.. But what about "someVal"? What datatype mapping am I supposed to perform for this Null value? I am fairly inexperienced in SQL. Perhaps the answer is much simpler than I realize.

    Read the article

  • How to enforce jsf to create new instance of bean instead of throwing NullPointerException?

    - by Roman
    I'm almost sure that I do something wrong and thus the question's title is a bit incorrect. I have a form with several fields for creating a new User-objects (fields like login, password, birthday etc). And I have 2 buttons - Cancel and Create. I didn't finish Create yet :) , but when I press Cancel I see NullPointerException. Here is simplified code: <f:view> <h:form> <h:panelGroup layout="block"> <h:inputText id="add_login" value="#{userSupport.user.login}"/> <h:inputSecret id="add_password" value="#{userSupport.user.password}"/> <h:inputText id="add_name" value="#{userSupport.user.name}"/> <h:inputText id="add_surname" value="#{userSupport.user.surname}"/> <h:commandButton value="Cancel" action="cancel"/> </h:panelGroup> </h:form> </f:view> UserSupport class has field user with getter and setter and some other methods. It's a Spring bean with Session scope. When I press cancel, I see NPE because jsf tries to save values from inputs in user-object, but user-object is null. What is the correct way of doing this?

    Read the article

  • check if foler exists in the root jquery

    - by Dimal Chandrasiri
    I'm trying to load an image to a div background using the following file structure in the root. WebContent -- | zharaimages -- | [ItemID] -- | Image.jpg This is done by jQuery and the file structure is inside the root. The ItemID folder is dynamic and I have to check whether the path exists using jQuery and if the path is not valid, I should go to a default path to fetch the default image. How can I check the path is valid using jQuery. I'm hoping to this can be done without an ajax call. Can any one help me on a tutorial or an API I can use for this! UPDATE The files are on the server. The concept I have is that I have 100s of item elements & I want to load an image for each item element. The images are saved in the server ( a local host ) and the folder hierarchy is divided using the item ID as shown. What I want to do is check whether the image file exists before appending it to the background of the item element div. Is this possible. This is a web application developed using spring.

    Read the article

  • Remove/squash entries in a vertical hash

    - by Forkrul Assail
    I have a grid that represents an X, Y matrix, stored as a hash here. Some points on the X Y matrix may have values (as type string), and some may not. A typical grid could look like this: {[9, 5]=>"Alaina", [10, 3]=>"Courtney", [11, 1]=>"Gladys", [8, 7]=>"Alford", [14, 11]=>"Lesley", [17, 2]=>"Lawson", [0, 5]=>"Katrine", [2, 1]=>"Tyra", [3, 3]=>"Fredy", [1, 7]=>"Magnus", [6, 9]=>"Nels", [7, 11]=>"Kylie", [11, 0]=>"Kellen", [10, 2]=>"Johan", [14, 10]=>"Justice", [0, 4]=>"Barton", [2, 0]=>"Charley", [3, 2]=>"Magnolia", [1, 6]=>"Maximo", [7, 10]=>"Olga", [19, 5]=>"Isadore", [16, 3]=>"Delfina", [17, 1]=>"Noe", [20, 11]=>"Francis", [10, 5]=>"Creola", [9, 3]=>"Bulah", [8, 1]=>"Lempi", [11, 7]=>"Raquel", [13, 11]=>"Jace", [1, 5]=>"Garth", [3, 1]=>"Ernest", [2, 3]=>"Malcolm", [0, 7]=>"Alejandrin", [7, 9]=>"Marina", [6, 11]=>"Otilia", [16, 2]=>"Hailey", [20, 10]=>"Brandt", [8, 0]=>"Madeline", [9, 2]=>"Leanne", [13, 10]=>"Jenifer", [1, 4]=>"Humberto", [3, 0]=>"Nicholaus", [2, 2]=>"Nadia", [0, 6]=>"Abigail", [6, 10]=>"Zola", [20, 5]=>"Clementina", [23, 3]=>"Alvah", [19, 11]=>"Wallace", [11, 5]=>"Tracey", [8, 3]=>"Hulda", [9, 1]=>"Jedidiah", [10, 7]=>"Annetta", [12, 11]=>"Nicole", [2, 5]=>"Alison", [0, 1]=>"Wilma", [1, 3]=>"Shana", [3, 7]=>"Judd", [4, 9]=>"Lucio", [5, 11]=>"Hardy", [19, 10]=>"Immanuel", [9, 0]=>"Uriel", [8, 2]=>"Milton", [12, 10]=>"Elody", [5, 10]=>"Alexanne", [1, 2]=>"Lauretta", [0, 0]=>"Louvenia", [2, 4]=>"Adelia", [21, 5]=>"Erling", [18, 11]=>"Corene", [22, 3]=>"Haskell", [11, 11]=>"Leta", [10, 9]=>"Terrence", [14, 1]=>"Giuseppe", [15, 3]=>"Silas", [12, 5]=>"Johnnie", [4, 11]=>"Aurelie", [5, 9]=>"Meggie", [2, 7]=>"Phoebe", [0, 3]=>"Sister", [1, 1]=>"Violet", [3, 5]=>"Lilian", [18, 10]=>"Eusebio", [11, 10]=>"Emma", [15, 2]=>"Theodore", [14, 0]=>"Cassidy", [4, 10]=>"Edmund", [2, 6]=>"Claire", [0, 2]=>"Madisen", [1, 0]=>"Kasey", [3, 4]=>"Elijah", [17, 11]=>"Susana", [20, 1]=>"Nicklaus", [21, 3]=>"Kelsie", [10, 11]=>"Garnett", [11, 9]=>"Emanuel", [15, 1]=>"Louvenia", [14, 3]=>"Otho", [13, 5]=>"Vincenza", [3, 11]=>"Tate", [2, 9]=>"Beau", [5, 7]=>"Jason", [6, 1]=>"Jayde", [7, 3]=>"Lamont", [4, 5]=>"Curt", [17, 10]=>"Mack", [21, 2]=>"Lilyan", [10, 10]=>"Ruthe", [14, 2]=>"Georgianna", [4, 4]=>"Nyasia", [6, 0]=>"Sadie", [16, 11]=>"Emil", [21, 1]=>"Melba", [20, 3]=>"Delia", [3, 10]=>"Rosalee", [2, 8]=>"Myrtle", [7, 2]=>"Rigoberto", [14, 5]=>"Jedidiah", [13, 3]=>"Flavie", [12, 1]=>"Evie", [8, 9]=>"Olaf", [9, 11]=>"Stan", [20, 2]=>"Judge", [5, 5]=>"Cassie", [7, 1]=>"Gracie", [6, 3]=>"Armando", [4, 7]=>"Delia", [3, 9]=>"Marley", [16, 10]=>"Robyn", [2, 11]=>"Richie", [12, 0]=>"Gilberto", [13, 2]=>"Dedrick", [9, 10]=>"Liam", [5, 4]=>"Jabari", [7, 0]=>"Enola", [6, 2]=>"Lela", [3, 8]=>"Jade", [2, 10]=>"Johnson", [15, 5]=>"Willow", [12, 3]=>"Fredrick", [13, 1]=>"Beau", [9, 9]=>"Carlie", [8, 11]=>"Daisha", [6, 5]=>"Declan", [4, 1]=>"Carolina", [5, 3]=>"Cruz", [7, 7]=>"Jaime", [0, 9]=>"Anthony", [1, 11]=>"Esta", [13, 0]=>"Shaina", [12, 2]=>"Alec", [8, 10]=>"Lora", [6, 4]=>"Emely", [4, 0]=>"Rodger", [5, 2]=>"Cedrick", [0, 8]=>"Collin", [1, 10]=>"Armani", [16, 5]=>"Brooks", [19, 3]=>"Eleanora", [18, 1]=>"Alva", [7, 5]=>"Melissa", [5, 1]=>"Tabitha", [4, 3]=>"Aniya", [6, 7]=>"Marc", [1, 9]=>"Marjorie", [0, 11]=>"Arvilla", [19, 2]=>"Adela", [7, 4]=>"Zakary", [5, 0]=>"Emely", [4, 2]=>"Alison", [1, 8]=>"Lorenz", [0, 10]=>"Lisandro", [17, 5]=>"Aylin", [18, 3]=>"Giles", [19, 1]=>"Kyleigh", [8, 5]=>"Mary", [11, 3]=>"Claire", [10, 1]=>"Avis", [9, 7]=>"Manuela", [15, 11]=>"Chesley", [18, 2]=>"Kristopher", [24, 3]=>"Zola", [8, 4]=>"Pietro", [10, 0]=>"Delores", [11, 2]=>"Timmy", [15, 10]=>"Khalil", [18, 5]=>"Trudie", [17, 3]=>"Rafael", [16, 1]=>"Anthony"} What I need to do though, is basically remove all the empty entries. Let's say [17,3] = Raphael does not have an element in front of if (let's say - no [16,3] exists) then [17,3] should become [16,3] etc. So basically all empty items will be popped off the vertical (row) structure of the hash. Are there functions I should have a look at or is there an easy squash-like method that would just remove blanks and adjust and move other items? Thanks in advance for your help.

    Read the article

  • BlueScreens on my ThinkPad with Windows 7 64 Bit and a SSD (CRITICAL_OBJECT_TERMINATION, ntoskernel.exe)

    - by pvorb
    I'm getting BlueScreens about every five days for more than three months. Here's an example: A problem has been detected and Windows has been shut down to prevent damage to your computer. The problem seems to be caused by the following file: ntoskrnl.exe CRITICAL_OBJECT_TERMINATION If this is the first time you've seen this stop error screen, restart your computer. If this screen appears again, follow these steps: Check to make sure any new hardware or software is properly installed. If this is a new installation, ask your hardware or software manufacturer for any Windows updates you might need. If problems continue, disable or remove any newly installed hardware or software. Disable BIOS memory options such as caching or shadowing. If you need to use safe mode to remove or disable components, restart your computer, press F8 to select Advanced Startup Options, and then select Safe Mode. Technical Information: *** STOP: 0x000000f4 (0x0000000000000003, 0xfffffa80065f2b30, 0xfffffa80065f2e10, 0xfffff80002f9bf40) *** ntoskrnl.exe - Address 0xfffff80002c98d00 base at 0xfffff80002c19000 DateStamp 0x4d9fdd5b It's has always been the same BlueScreen message showing CRITICAL_OBJECT_TERMINATION, 0x000000f4, and ntoskrnl.exe. Of course the addresses change. My computer is a ThinkPad T400 (about 2 years old) with a SSD in it. I'm also running Windows 7 Professional 64 bit. When I bought my computer, it had a 250GByte SeaGate HDD in it, which I replaced by a 500GByte HDD by Western Digital. Last september I bought a Corsair F120 SSD and replaced the HDD by this SSD. Then I bought a LEICKE HDD adapter for the UltraBay II where I plugged in my 500GByte HDD. This configuration ran about half a year without any errors. After re-installing Windows this spring, I am getting regular BlueScreens. Sometimes my system runs for about 2 weeks without a BSOD, sometimes I get several BlueScreens a day. The only thing that I noticed is, that I'm always running Google Chrome when it happens. Is there anyone who has made his/her own bad experiences whith some of my components or is there anybody who can tell me if it would be helpful to send my notebook to Lenovo? Thank you very much for your help on my issue! Regards, Paul

    Read the article

< Previous Page | 91 92 93 94 95 96 97 98 99  | Next Page >