Search Results

Search found 117 results on 5 pages for 'ripper234'.

Page 5/5 | < Previous Page | 1 2 3 4 5 

  • Include multiple jars with classpathentry

    - by ripper234
    I have an eclipse's .classpath file that looks like this: <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry kind="src" path="src"/> <classpathentry kind="src" path="test"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="output" path="bin"/> <classpathentry kind="lib" path="/libraries/jee/servlet-api.jar"/> <classpathentry kind="lib" path="/libraries/junit/junit-4.6.jar"/> <classpathentry kind="lib" path="/libraries/log4j/log4j-1.2.15.jar"/> </classpath> I'd like to add a whole directory of jars to the classpath - I like eclipse (or more precisely, our ant-based build process that uses .classpath format) to know several jars that reside in a single directory, without specifying them directly. How can I do that?

    Read the article

  • Getting default value for java primitive types

    - by ripper234
    I have a java primitive type at hand: Class c = int.class; // or long.class, or boolean.class I'd like to get a 'default value' for this class - specifically the value is assigned to fields of this type if they are not initialized. E.g., '0' for a number, 'false' for a boolean. Is there a generic way to do this? I tried c.newInstance() But I'm getting an InstantiationException, and not a default instance.

    Read the article

  • Read a large result set in chunks from mysql

    - by ripper234
    I am trying to read a huge result set from mysql. Reading them in a straight-forward manner didn't work, as mysql tries to return all results together, which times out. I found the following piece of code which tells mysql to read the results back one at a time: stmt = conn.createStatement(java.sql.ResultSet.TYPE_FORWARD_ONLY, java.sql.ResultSet.CONCUR_READ_ONLY); stmt.setFetchSize(Integer.MIN_VALUE); Can I read a chunk at a time instead of one by one? I've tried setting fetch size to a different value, but it doesn't work.

    Read the article

  • How do I write a Guice Provider that doesn't explicitly create objects?

    - by ripper234
    Say I have a ClassWithManyDependencies. I want to write a Guice Provider for this class, in order to create a fresh instance of the class several times in my program (another class will depend on this Provider and use it at several points to create new instances). One way to achieve this is by having the Provider depend on all the dependencies of ClassWithManyDependencies. This is quite ugly. Is there a better way to achieve this? Note - I certainly don't want the Provider to depend on the injector. Another option I considered is having ClassWithManyDependencies and ClassWithManyDependenciesProvider extend the same base class, but it's butt ugly.

    Read the article

  • Padding between images doesn't pad

    - by ripper234
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <style type="text/css"> #action-icons { float:right; } #action-icons.img { position:relative; top:-30px; padding-right:200px; } </style> </head> <body> <h1 class="edit">Some nifty title <span id="action-icons"> <img src="foo.png" width="64" height="64" alt="" id="newsticky"/> <img src="bar.png" width="60" height="60" alt="" id="trash"/> </span> </h1> </body> </html>

    Read the article

  • How to get an inner div to fill the entire wrapper div?

    - by ripper234
    I have the following html code: <div class="outer ui-draggable" style="position: relative;"> <div class="inner">Foo bar</div> </div> With this CSS: .outer { background-color: #F7F085; margin: 5px; height: 100px; width: 150px; text-align:center; vertical-align:text-bottom; } .outer .inner { display:inline; vertical-align:middle; height: 100px; width: 150px; } I would like the inner div to fill the outer div completely - the text block should be an entire 100X150 box. The problem is that this code doesn't produce the desired effect. The outer div is indeed the correct size, but the inner div seems to only fill a small area at the top of the outer div. I also tried using height:inherit and width:inherit instead of specifying a size.

    Read the article

  • Timing issue with jQuery and $(document).ready()

    - by ripper234
    I have the following code block code when the document is ready: $(document).ready(function() { createDivs(); // creates some divs with class 'foo'; // iterate $(".foo").each(function(index) { alert(index + " - " + $(this).text()); }); } I find that the "iterate" part misses the divs I created in the createDivs() method entirely! Is there some timing issue I'm not aware of? Why doesn't jquery see the divs that were just created?

    Read the article

< Previous Page | 1 2 3 4 5