Search Results

Search found 11 results on 1 pages for 'geln'.

Page 1/1 | 1 

  • jquery xml select

    - by Geln
    hi, How to select items whose sub-tag key's text starts with '001'? <root> <item> <key>001001</key> <text>thanks</text> </item> <item> <key>001002</key> <text>very</text> </item> <item> <key>002001</key> <text>much</text> </item> </root> $(xml).find("item>[filter string]").each(function() { alert(this); });

    Read the article

  • Start oracle dequeue on startup

    - by Geln
    Hi, I got the following error of Oracle, ORA-25226: dequeue failed, queue string.string is not enabled for dequeue And the following is the Cause and Action for it from the official document: Cause: The queue has not been enabled for dequeue. Action: Enable the queue using START_QUEUE. But this error occurs every time when restart the database, is there any configuration to set to start the dequeue on database startup? thanks!

    Read the article

  • auto expand div height

    - by Geln
    <html><head><title>Test</title> <style> .main{width:600px;border:1px solid red; } .main .left{background:lightblue; width:100px;clear:both; float:left;} .main .right{margin-left:100px;background:lightyellow; } </style> </head><body> <div class="main"> <div class="left"> title </div> <div class="right"> <div id="item">item</div> <div id="item">item</div> <div id="item">item</div> <div id="item">item</div> <div id="item">item</div> <div id="item">item</div> <div id="item">item</div> </div> </div> </body></html> How to change the CSS to make the page display like the dialog shows? PS,I think it's a way that to make the "left" div's height auto expand when the height of the "right" div or parent div expand, but I don't know how.

    Read the article

  • Hibernate can't load Custom SQL collection

    - by Geln Yang
    Hi, There is a table Item like, code,name 01,parent1 02,parent2 0101,child11 0102,child12 0201,child21 0202,child22 Create a java object and hbm xml to map the table.The Item.parent is a Item whose code is equal to the first two characters of its code : class Item{ String code; String name; Item parent; List<Item> children; .... setter/getter.... } <hibernate-mapping> <class name="Item" table="Item"> <id name="code" length="4" type="string"> <generator class="assigned" /> </id> <property name="name" column="name" length="50" not-null="true" /> <many-to-one name="parent" class="Item" not-found="ignore"> <formula> <![CDATA[ (select i.code,r.name from Item i where (case length(code) when 4 then i.code=SUBSTRING(code,1,2) else false end)) ]]> </formula> </many-to-one> <bag name="children"></bag> </class> </hibernate-mapping> I try to use formula to define the many-to-one relationship,but it doesn't work!Is there something wrong?Or is there other method? Thanks! ps,I use mysql database. add 2010/05/23 Pascal's answer is right,but the "false" value must be replaced with other expression,like "1=2".Because the "false" value would be considered to be a column of the table. select i.code from Item i where ( case length(code) when 4 then i.code=SUBSTRING(code,1,2) else 1=2 end) And I have another question about the children "bag" mapping.There isn't formula configuration option for "bag",but we can use "loader" to load a sql-query.I configure the "bag" as following.But it get a list whose size is 0.What's wrong with it? <class> ... ... <bag name="children"> <key /> <one-to-many class="Item"></one-to-many> <loader query-ref="getChildren"></loader> </bag> </class> <sql-query name="getChildren"> <load-collection alias="r" role="Item.children" /> <![CDATA[(select {r.*} from Item r join Item o where o.code=:code and ( case length(o.code) when 2 then (length(r.code)=4 and SUBSTRING(r.code,1,2)=o.code) else 1=2 end ))]]> </sql-query>

    Read the article

  • Java multi Generic collection parameters complie error

    - by Geln Yang
    Hi, So strange!Please have a look the code first: public class A { } public class B extends A { } public class C extends A { } public class TestMain { public <T extends A> void test(T a, T b) { } public <T extends A> void test(List<T> a, List<T> b) { } public static void main(String[] args) { new TestMain().test(new B(), new C()); new TestMain().test(new ArrayList<B>(), new ArrayList<C>()); } } The statement "new TestMain().test(new ArrayList(), new ArrayList())" get a "Bound mismatch" compile error, while "new TestMain().test(new B(), new C())" is compiled ok. Bound mismatch: The generic method test(T, T) of type TestMain is not applicable for the arguments (ArrayList, ArrayList). The inferred type ArrayList is not a valid substitute for the bounded parameter It seems the type of the second generic List parameter is limited by the Type of the first.Is it a feature or a bug of the compile program? ps, jdk:1.6,IDE:Eclipse 3.5.1

    Read the article

  • DTD definition error

    - by Geln Yang
    Hi, It will get a error to define a dtd as follow: <!ELEMENT line (property*)> <!ATTLIST line showType (1|?|+|*) "1" > The error: The name token is required in the enumerated type list for the "showType" attribute declaration. It seems the value can't be special characters,such as "?","+","*". To change the characters to Latin-1 characters, like "& #42;"(add a blank before '#') , get the same error. How to resolve this problem? Thanks!

    Read the article

  • Hibernate collection mapping challenge

    - by Geln Yang
    Hi, There is a table Item like, code,name 01,parent1 02,parent2 0101,child11 0102,child12 0201,child21 0202,child22 Create a java object and hbm xml to map the table.The Item.parent is a Item whose code is equal to the first two character of its code : class Item{ string code; string name; Item parent; List<Item> children; .... setter/getter.... } <hibernate-mapping> <class name="Item" table="Item"> <id name="code" length="4" type="string"> <generator class="assigned" /> </id> <property name="name" column="name" length="50" not-null="true" /> <!--====================================== --> <many-to-one name="parent" class="Item" not-found="ignore"></many-to-one> <bag name="children"></bag> <!--====================================== --> </class> </hibernate-mapping> How to definition the mapping relationship? Thanks!

    Read the article

  • Hibernate collection mapping Problem

    - by Geln Yang
    Hi, There is a table Item like, code,name 01,parent1 02,parent2 0101,child11 0102,child12 0201,child21 0202,child22 Create a java object and hbm xml to map the table.The Item.parent is a Item whose code is equal to the first two characters of its code : class Item{ String code; String name; Item parent; List<Item> children; .... setter/getter.... } <hibernate-mapping> <class name="Item" table="Item"> <id name="code" length="4" type="string"> <generator class="assigned" /> </id> <property name="name" column="name" length="50" not-null="true" /> <many-to-one name="parent" class="Item" not-found="ignore"> <formula> <![CDATA[ (select i.code,r.name from Item i where (case length(code) when 4 then i.code=SUBSTRING(code,1,2) else false end)) ]]> </formula> </many-to-one> <bag name="children"></bag> </class> </hibernate-mapping> I try to use formula to define the many-to-one relationship,but it doesn't work!Is there something wrong?Or is there other method? Thanks! ps,I use mysql database.

    Read the article

  • Hibernate mapping Problem

    - by Geln Yang
    Hi, There is a table Item like, code,name 01,parent1 02,parent2 0101,child11 0102,child12 0201,child21 0202,child22 Create a java object and hbm xml to map the table.The Item.parent is a Item whose code is equal to the first two characters of its code : class Item{ String code; String name; Item parent; List<Item> children; .... setter/getter.... } <hibernate-mapping> <class name="Item" table="Item"> <id name="code" length="4" type="string"> <generator class="assigned" /> </id> <property name="name" column="name" length="50" not-null="true" /> <many-to-one name="parent" class="Item" not-found="ignore"> <formula> <![CDATA[ (select i.code,r.name from Item i where (case length(code) when 4 then i.code=SUBSTRING(code,1,2) else false end)) ]]> </formula> </many-to-one> <bag name="children"></bag> </class> </hibernate-mapping> I try to use formula to define the many-to-one relationship,but it doesn't work!Is there something wrong?Or is there other method? Thanks! ps,I use mysql database.

    Read the article

  • auto div height

    - by Geln
    <html><head><title>Test</title> <style> .main{width:600px;border:1px solid red; } .main .left{background:lightblue; width:100px;clear:both; float:left;} .main .right{margin-left:100px;background:lightyellow; } </style> </head><body> <div class="main"> <div class="left"> title </div> <div class="right"> <div id="item">item</div> <div id="item">item</div> <div id="item">item</div> <div id="item">item</div> <div id="item">item</div> <div id="item">item</div> <div id="item">item</div> </div> </div> </body></html> How to change the CSS to make the page display like the dialog shows? PS,I think it's a way that to make the "left" div's height auto expend when the height of the "right" div or parent div expend, but I don't know how.

    Read the article

1