Search Results

Search found 992 results on 40 pages for 'patrick j collins'.

Page 24/40 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • What is best practice about having one-many hibernate

    - by Patrick
    Hi all, I believe this is a common scenario. Say I have a one-many mapping in hibernate Category has many Item Category: @OneToMany( cascade = {CascadeType.ALL},fetch = FetchType.LAZY) @JoinColumn(name="category_id") @Cascade( value = org.hibernate.annotations.CascadeType.DELETE_ORPHAN ) private List<Item> items; Item: @ManyToOne(targetEntity=Category.class,fetch=FetchType.EAGER) @JoinColumn(name="category_id",insertable=false,updatable=false) private Category category; All works fine. I use Category to fully control Item's life cycle. But, when I am writing code to update Category, first I get Category out from DB. Then pass it to UI. User fill in altered values for Category and pass back. Here comes the problem. Because I only pass around Category information not Item. Therefore the Item collection will be empty. When I call saveOrUpdate, it will clean out all associations. Any suggestion on what's best to address this? I think the advantage of having Category controls Item is to easily main the order of Item and not to confuse bi-directly. But what about situation that you do want to just update Category it self? Load it first and merge? Thank you.

    Read the article

  • How do I create a regular expression to match a word misspelling the original case sensitivity?

    - by Patrick Allaert
    I want to discover wrong spelling of "FooBar" in sentence: "This is a 'FooBar' example where I should match different spelling of fooBar such as: foobar, FOOBAR or even fOoBaR but not foobarS!" In this sentence, I would like to match words (in order): fooBar, foobar, FOOBAR, fOoBaR and not: FooBar (correct spelling), foobarS (not the same word) Is there an existing solution using Perl Regular Expression? This is intended to be used with grep -P Thanks

    Read the article

  • SyntaxHighlighter (javascript) problem with <del>

    - by Patrick
    Hi, I am using syntaxhighlighter (http://alexgorbatchev.com/wiki/SyntaxHighlighter) with a php source code with the ins and del tag. What I would like to do is to have syntaxhighligher ignore those html tags so that they can be parsed correctly. So I'd like to to display: test instead of the default < del test < /del Anyone has any idea?

    Read the article

  • Xcode: Display Login View in applicationDidBecomeActive

    - by Patrick
    In my app I would like to show a login screen - which will be displayed when the app starts and when the app becomes active. For reference, I am using storyboards, ARC and it is a tabbed bar application. First off, I have this method which returns the topViewController. - (UIViewController *)topViewController:(UIViewController *)rootViewController { if (rootViewController.presentedViewController == nil) { return rootViewController; } if ([rootViewController.presentedViewController isMemberOfClass:[UINavigationController class]]) { UINavigationController *navigationController = (UINavigationController *)rootViewController.presentedViewController; UIViewController *lastViewController = [[navigationController viewControllers] lastObject]; return [self topViewController:lastViewController]; } UIViewController *presentedViewController = (UIViewController *)rootViewController.presentedViewController; return [self topViewController:presentedViewController]; } And I call this method here: - (void)applicationDidBecomeActive:(UIApplication *)application { if ( ... ) { // if the user needs to login PasswordViewController *passwordView = [[PasswordViewController alloc] init]; UIViewController *myView = [self topViewController:self.window.rootViewController]; [myView presentModalViewController:passwordView animated:NO]; } } To an extent this does work - I can call a method in viewDidAppear which shows an alert view to allow the user to log in. However, this is undesirable and I would like to have a login text box and other ui elements. If I do not call my login method, nothing happens and the screen stays black, even though I have put a label and other elements on the view. Does anyone know a way to resolve this? My passcode view is embedded in a Navigation Controller, but is detached from the main storyboard.

    Read the article

  • Python ctypes argument errors

    - by Patrick Moriarty
    Hello. I wrote a test dll in C++ to make sure things work before I start using a more important dll that I need. Basically it takes two doubles and adds them, then returns the result. I've been playing around and with other test functions I've gotten returns to work, I just can't pass an argument due to errors. My code is: import ctypes import string nDLL = ctypes.WinDLL('test.dll') func = nDLL['haloshg_add'] func.restype = ctypes.c_double func.argtypes = (ctypes.c_double,ctypes.c_double) print(func(5.0,5.0)) It returns the error for the line that called "func": ValueError: Procedure probably called with too many arguments (8 bytes in excess) What am I doing wrong? Thanks.

    Read the article

  • How to query the video ram size of a ATI card on Linux?

    - by Patrick Bao
    I want to know the physical video ram size in my application. I can get the same information of Nvidia card by using "nvidia-settings -q -t VideoRam". I can use amdcccle to find this information, but it's an GUI app, so can't be used in my application. I wonder if there is a way to get this by command, function, or config file? I'm using RHEL 5.4.

    Read the article

  • Jquery and Prototype Conflict

    - by patrick
    I am having trouble running two javascript files on the same page. I used JQuery.noConflict() (http://api.jquery.com/jQuery.noConflict/) but no luck. <script src="http://www.google.com/jsapi"></script> <script> google.load("prototype", "1.6.0.3",{uncompressed:false}); google.load("scriptaculous", "1.8.1",{uncompressed:false}); </script> <script src="js/jquery.tools.min.js"></script> <script type="text/javascript"> $jQuery.noConflict(); jQuery(document).ready(function($) { $("#download_now").tooltip({ effect: 'slide'}); }); function show_text() { new Ajax.Request('./new.php', { method: 'post', parameters: { userid: $('userid').value }, onSuccess: function(r) { $('update').update(r.responseText) } }); } document.observe("dom:loaded", function() { $('loading').hide(); Ajax.Responders.register({ onCreate: function() { new Effect.Opacity('loading',{ from: 1.0, to: 0.3, duration: 0.7 }); new Effect.toggle('loading', 'appear'); }, onComplete: function() { new Effect.Opacity('loading', { from: 0.3, to: 1, duration: 0.7 }); new Effect.toggle('loading', 'appear'); } }); }); </script>

    Read the article

  • Apple script Editor, write message to the "Result" window

    - by Patrick
    I am using the Mac OS X Apple Script Editor and (while debugging) instead of writing a lot of display dialog statements, I'd like to write the results of some calculation in the window below, called "Result" (I have the German UI here, so the translation is a guess). So is there a write/print statement that I can use for putting messages in the "standard out" window? I am not asking to put the messages in a logfile on the file system, it is purely temporary.

    Read the article

  • Routing WCF Traffic Based on URI Domain Requested

    - by Ian Patrick Hughes
    Is there a way to route traffic to a target WCF service file based on the URL domain requested? Basically, I have a single WCF RESTful services project with 3 service files offering different endpoints. It's hosted on a single IIS6 site looking for multiple host header values on port 80. I want to route traffic to different services files whether the requester is asking for www.site1.com, www.site2.com, or www.site3.com. Seems like the sort of thing I would use a global.asax or HTTP Handler for, but I am not sure since this is a regular WCF Service Application. Even though I am on IIS6 for this project, I don't mind using a URL re-writer and wildcard mapping, if I have to. I have admin rights on the balanced servers where this will reside, I just want to know if there is a common/best practice before I start hacking my way around this.

    Read the article

  • links in codeigniter

    - by Patrick
    hi All, I'm experimenting with codeigniter but don't really understand how links work. for example, I have a link like this: localhost/ci/welcome/cat/7 My base url is localhost/ci, so by clicking on this link I would expect the method "cat" of controller "welcome" to be called. This method is very simple: function cat() { echo "just a test."; } Pretty basic - I would expect to see the text on screen, but I just see a 404 -page not found error. What could be the problem?

    Read the article

  • define colors as variables in CSS

    - by patrick
    Hi all, I'm working CSS file which is quite long. I know the client could ask for changes to the color scheme, and was wondering: is it possible to assign colors to variables so I can just change them to have the new color applied to all elements that use it? Please note I can't use php to dynamically change the css file.

    Read the article

  • Objects With No Behavior

    - by Patrick Donovan
    I've been teaching myself object oriented programming and I'm thinking about a situation where I have an object "Transaction", that has quite a few properties to it like account, amount, date, currency, type, etc. I never plan to mutate these data points, and calculation logic will live in other classes. My question is, is it poor Python design to instantiate thousands of objects just to hold data? I find the data far easier to work with embedded in a class rather than trying to cram it into some combination of data structures.

    Read the article

  • Android google.navigation Intent Modes?

    - by Patrick Mahoney
    I'm currently developing an application that will launch a navigation intent. I know that this isn't an official API, but it works perfectly the way I want it to. I allow the user to select driving, walking, and bus navigation to a location. The intent to launch directly into Google Maps Navigation looks like this: google.navigation:ll= + a latitude and longitude, then + &mode= then your mode of transportation. For example, to navigate using walking directions to a certain area: google.navigation:ll=blah,blah&mode=w Driving is default, or &mode=d, and biking is &mode=b, but I can't figure out bus (public transit). Has anyone done this before? Thanks! Edit: So far, I've found that mode=public gives bike directions, mode=transit gives driving, frustratingly, mode=bus also returns bike directions.

    Read the article

  • DRUPAL: replace tags with icons

    - by Patrick
    hi, is there any plugin for Drupal, replacing tags with small icons (see the picture below, the icons are actually small circles, and the different colors are automatically generated. I need to replace the tags with the circles, for each node, and the starting view. Furthermore, when the mouse move over the tags, the tag title should appear as pop-up thanks

    Read the article

  • jQuery: submit a form when the checkbox is selected

    - by Patrick
    hi, I have a form, and I want automatically to update it when I click on a checkbox. This is my current code: $('.option img').click(function() { $("#views-exposed-form-Portfolio-page-1").submit(); }); However, the selected checkbox is not stored before the form is submitted, and so the selection has not effect. thanks

    Read the article

  • Drupal: customizing Nice Menus

    - by Patrick
    hi, I need to place my drop down menus at the same position (and same width) like in this website: http://lancelmaat.nl/index.php?option=com_content&view=article&id=98&Itemid=79 Furthermore I want to change the content of some items, by placing some html (like in "Contact" item in the reference page). Is this easy to do with Nice Menus ? Thanks

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >