Search Results

Search found 10 results on 1 pages for 'sudhir gudhe'.

Page 1/1 | 1 

  • Hibernate Que related to database i want select query generic without using property name

    - by Sudhir Gudhe
    Hi My que is i tried to get the data from data base using String SQL_QUERY ="from dat_personal_info "; Query query = session.createQuery(SQL_QUERY); for( it=query.iterate();it.hasNext();) { Object[] rowObject =(Object[]) it.next(); } but error occurs Hibernate: select dat_person0_.row_id as col_0_0_ from dat_personal_info dat_per son0_ java.lang.ClassCastException: bn.com.server.database.maptables.dat_personal_info $$EnhancerByCGLIB$$e1ffd36e cannot be cast to [Ljava.lang.Object; pls any who ans pls reply Thanks & Regards Sudhir gudhe

    Read the article

  • Google collections GWT jar

    - by Sudhir Jonathan
    Has anyone had any luck rolling a custom GWT jar for Google Collections / Guava? I've tried uncommenting the relevant ant tasks and running them, but I just get empty folders in the JAR. Can't seem to get the include rules right :-/

    Read the article

  • Speeding up templates in GAE-Py by aggregating RPC calls

    - by Sudhir Jonathan
    Here's my problem: class City(Model): name = StringProperty() class Author(Model): name = StringProperty() city = ReferenceProperty(City) class Post(Model): author = ReferenceProperty(Author) content = StringProperty() The code isn't important... its this django template: {% for post in posts %} <div>{{post.content}}</div> <div>by {{post.author.name}} from {{post.author.city.name}}</div> {% endfor %} Now lets say I get the first 100 posts using Post.all().fetch(limit=100), and pass this list to the template - what happens? It makes 200 more datastore gets - 100 to get each author, 100 to get each author's city. This is perfectly understandable, actually, since the post only has a reference to the author, and the author only has a reference to the city. The __get__ accessor on the post.author and author.city objects transparently do a get and pull the data back (See this question). Some ways around this are Use Post.author.get_value_for_datastore(post) to collect the author keys (see the link above), and then do a batch get to get them all - the trouble here is that we need to re-construct a template data object... something which needs extra code and maintenance for each model and handler. Write an accessor, say cached_author, that checks memcache for the author first and returns that - the problem here is that post.cached_author is going to be called 100 times, which could probably mean 100 memcache calls. Hold a static key to object map (and refresh it maybe once in five minutes) if the data doesn't have to be very up to date. The cached_author accessor can then just refer to this map. All these ideas need extra code and maintenance, and they're not very transparent. What if we could do @prefetch def render_template(path, data) template.render(path, data) Turns out we can... hooks and Guido's instrumentation module both prove it. If the @prefetch method wraps a template render by capturing which keys are requested we can (atleast to one level of depth) capture which keys are being requested, return mock objects, and do a batch get on them. This could be repeated for all depth levels, till no new keys are being requested. The final render could intercept the gets and return the objects from a map. This would change a total of 200 gets into 3, transparently and without any extra code. Not to mention greatly cut down the need for memcache and help in situations where memcache can't be used. Trouble is I don't know how to do it (yet). Before I start trying, has anyone else done this? Or does anyone want to help? Or do you see a massive flaw in the plan?

    Read the article

  • Add Events to Yahoo using curl

    - by Sudhir
    I've tried using curl to add new events to yahoo, succeeded in logging in and getting the calendar add events page, but when i try to post events using curl, it redirects me to login page. Please suggest what can i do...? Thanks in advance

    Read the article

  • Creating objects makes the VM faster?

    - by Sudhir Jonathan
    Look at this piece of code: MessageParser parser = new MessageParser(); for (int i = 0; i < 10000; i++) { parser.parse(plainMessage, user); } For some reason, it runs SLOWER (by about 100ms) than for (int i = 0; i < 10000; i++) { MessageParser parser = new MessageParser(); parser.parse(plainMessage, user); } Any ideas why? The tests were repeated a lot of times, so it wasn't just random. How could creating an object 10000 times be faster than creating it once?

    Read the article

  • Cannot redeclare config() error in cakePHP

    - by Sudhir
    Hi, I am getting the error Fatal error: Cannot redeclare config() (previously declared in.../basics.php:58, in live server. It works fine in my local server but when i uploaded the site to live server, i got the fatal error. I checked if the config() was declared multiple times but it's only declared once in basics.php file. The naming conventions are also followed, as it is working fine in local server. It only displays such error in live site. Please suggest solution for this. Help on this will be much appreciated.

    Read the article

  • Spring MVC managing multiple views with single controller

    - by Sudhir
    I am trying to implement order management module. There are different order types (approximately about 15). Each order has a seperate view. But the actions performed on UI are same irrespective of order type. Below is the structure of my DTO abstract class Order abstract class SecurityOrder extends Order abstract class TermDepositOrder extends Order ..... ..... ..... I am trying to implement a single controller capable of managing all views. Something similar to the one below: @Controller public class OrderController<F extends Order> { public F validate(F order) { } public F insert(F order) { } } I am not sure how spring mvc would be able to map request parameters properly to the order instance as it doesn't know which order instance to populate. Is it possible to achieve this with single controller or should I go with a controller for each order type and duplicate same code across all controllers?

    Read the article

1