Search Results

Search found 4 results on 1 pages for 'jtb'.

Page 1/1 | 1 

  • Link between CCK field and view

    - by JTB
    I want to use a view to select nodes in a content type field. This view must receive an argument that is another field of the content type. Can someone explain me how to pass the argument from the field to the view? Excuse my poor english

    Read the article

  • Byte to Integer in c#

    - by jtb
    I am reading a row from a SQL Server table. One of the columns is of type tinyint. I want to get the value into an int or int32 variable. rdr.GetByte(j) (byte) rdr.GetValue(j) ...seems to be the only way to retrieve the value. But I can't figure out how to get the result into an int var.

    Read the article

  • How to filter rows in JTable based on boolean valued columns?

    - by vinny
    Im trying to filter rows based on a column say c1 that contains boolean values. I want to show only rows that have 'true' in c1. I looked up the examples in http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#sorting. The example uses a regex filter. Is there any way I can use boolean values to filter rows? Following is the code Im using (borrowed from the example) private void filter(boolean show) { RowFilter<TableModel, Object> filter = null; TableModel model = jTb.getModel(); boolean value = (Boolean) model.getValueAt(0,1); //If current expression doesn't parse, don't update. try { // I need to used 'value' to filter instead of filterText. filter =RowFilter.regexFilter(filterText, 0); } catch (java.util.regex.PatternSyntaxException e) { return; } sorter.setRowFilter(filter); } thank you.

    Read the article

  • Why is javac 1.5 running so slowly compared with the Eclipse compiler?

    - by Simon Nickerson
    I have a Java Maven project with about 800 source files (some generated by javacc/JTB) which is taking a good 25 minutes to compile with javac. When I changed my pom.xml over to use the Eclipse compiler, it takes about 30 seconds to compile. Any suggestions as to why javac (1.5) is running so slowly? (I don't want to switch over to the Eclipse compiler permanently, as the plugin for Maven seems more than a little buggy.) I have a test case which easily reproduces the problem. The following code generates a number of source files in the default package. If you try to compile ImplementingClass.java with javac, it will seem to pause for an inordinately long time. import java.io.File; import java.io.FileNotFoundException; import java.io.PrintStream; public class CodeGenerator { private final static String PATH = System.getProperty("java.io.tmpdir"); private final static int NUM_TYPES = 1000; public static void main(String[] args) throws FileNotFoundException { PrintStream interfacePs = new PrintStream(PATH + File.separator + "Interface.java"); PrintStream abstractClassPs = new PrintStream(PATH + File.separator + "AbstractClass.java"); PrintStream implementingClassPs = new PrintStream(PATH + File.separator + "ImplementingClass.java"); interfacePs.println("public interface Interface<T> {"); abstractClassPs.println("public abstract class AbstractClass<T> implements Interface<T> {"); implementingClassPs.println("public class ImplementingClass extends AbstractClass<Object> {"); for (int i=0; i<NUM_TYPES; i++) { String nodeName = "Node" + i; PrintStream nodePs = new PrintStream(PATH + File.separator + nodeName + ".java"); nodePs.printf("public class %s { }\n", nodeName); nodePs.close(); interfacePs.printf("void visit(%s node, T obj);%n", nodeName); abstractClassPs.printf("public void visit(%s node, T obj) { System.out.println(obj.toString()); }%n", nodeName); } interfacePs.println("}"); abstractClassPs.println("}"); implementingClassPs.println("}"); interfacePs.close(); abstractClassPs.close(); implementingClassPs.close(); } }

    Read the article

1