Search Results

Search found 2474 results on 99 pages for 'patrick scott'.

Page 66/99 | < Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >

  • Crash when checking BOF property of pessimistic locked ADO recordset

    - by Patrick
    Bit of an odd one for you: I've got two connections to a database, on one I've opened a _RecordsetPtr with a pessimistic lock. I can no longer send an UPDATE command on the other connection. I can send a SELECT command on the second connection and data is returned. If I use a read only lock then there are no problems however when I use a pessimistic lock on the second connection as well I can check the State == adStateOpen but the program hangs when I test the BOF property! If I don't test the BOF property and try to call moveNext on the second connection the software hangs If I do neither of these I am able to access the data via the second connection but trying to access the data from the first connection causes the software to hang. Any one seen anything similar as I'm a bit stuck? EDIT : it wasn't hanging, someone had put a 30 minute timeout on the connection and I wasn't waiting that long while testing...

    Read the article

  • before_filter not inheriting from parent controller correctly?

    - by Scott
    Sorry if this may be a stupid question but I'm unable get my filters to inherit the way the Rails 3 documentation is saying it should. Specifically I have an Admin controller that was generated via: rails generate controller admin I added only a single action to the admin controller, the before filter & the private filter method class AdminController < ApplicationController before_filter require_admin_creds def index end private def require_admin_creds unless current_user && current_user.admin? flash[:error] = ... redirect_to .... end end end I next then created my nested resources under the admin section with: rails generate scaffold admin/model While my admin index is indeed getting the filter, the admin/model index (or any other actions) are not. What is happening under the hood here that I must have excluded? Thanks in advance.

    Read the article

  • How can I write an extension method that converts a System.Drawing.Bitmap to a byte array?

    - by Patrick Szalapski
    How can I write an extension method that converts a System.Drawing.Bitmap to a byte array? Why not: <Extension()> _ Public Function ToByteArray(ByVal image As System.Drawing.Bitmap) As Byte() Using ms = New MemoryStream() image.Save(ms, image.RawFormat) Return ms.ToArray() End Using End Function Yet when I use that, I get "System.Runtime.InteropServices.ExternalException: A generic error occurred in GDI+." What am I doing wrong?

    Read the article

  • Context.Items.Add on an XML return type?

    - by Scott Schluer
    So I have the following code contained within an HttpModule in an application I've been asked to support: app.Context.Response.ContentType = "text/xml"; app.Context.Items.Add("IpixRoomId", ipixRoomId); app.Context.Items.Add("IpixId", ipixId); app.Context.Response.Cache.SetCacheability(HttpCacheability.NoCache); app.Context.RewritePath(rewriteUrl, true); What's the purpose of adding data to Context.Items when the content type is XML? EDIT: For clarification, I'm calling up this URL: http://website.com/virtualtour/1971/6284/panorama2flash.swf I assume the SWF file (I know very little about Flash) makes another call to http://website.com/virtualtour/config.xml. The code I pasted above only executes on calls to config.xml. So since it's only the SWF file and config.xml being requested from the server, I'm a little confused. Can the .SWF file have access to HttpContext.Current.Items? Other than the HttpModule, there is no .NET involved in the code, it's a straight request to the SWF file which triggers a call to config.xml but it seems that those Context.Items contain the data needed to make the SWF file display the right virtual tour. I'm just missing where that link happens. It can't happen in the XML, so maybe in Flash?

    Read the article

  • Drupal: empty CCK Text Area are shown with tag <br />

    - by Patrick
    hi, I'm using several CCK Text Area in my content page. The fields are optional, but if I don't fill them, I see them on the page anyway, and the content is .. i.e. FieldName: <br /> I would like to make them disappear instead.. I found out the problem is that CCKEditor add a even if I've never typed in that window. How can I disable this ? thanks

    Read the article

  • Is there a way to customise messages produced by statements in MS SQL Query Analyzer?

    - by Scott Leis
    If I run a simple query in SQL Query Analyzer, like: SELECT * FROM TableName the Messages pane always produces a message like: (30 row(s) affected) If I run a stored procedure with many statements, the messages are useless because there's no indication of what each one relates to. So firstly: Is there a way to customise the default messages on a per-query basis? E.g. I'd like a specific query to produce a message like: TableName query produced [numRowsAffected] results. replacing [numRowsAffected] with the number that would have appeared in the default message. Secondly, is there a way to suppress the default messages on a per-query basis? E.g. I have a local variable of type TABLE, used in several statements. I don't want any message to appear for statements where I'm just deleting data from that variable before re-using it. I'm seeking solutions that work in SQL Server 8.0.

    Read the article

  • DataTemplate / ContentTemplate - exchange controls

    - by Scott Olson
    How can i solve the following (simplified) problem? M-V-VM context. I want to show text at the UI. In case the user has the rights to change the text, i want to use a textbox to manipulate the text. In case the user has no rights, i want to use a label to only show the text. My main problem: how to exchange textbox and label and bind Text resp. Content to the same property in viewmodel. Thanks for your answers Toni

    Read the article

  • Allow a new line anywhere in the regex?

    - by Scott Chamberlain
    I am having a find a replace in a bunch of RTF documents, The basic pattern I need is \{(?:\\\*)?\\field\\fldlock\{\\\*\\fldinst ?MERGEFIELD ?((?:\\.*?)?[\w\[\]]+?)(?:\\.*?)?\}(?:\{\\fldrslt\})?\} However I then found out there could potentialy be a newline before each slash, so it turned in to this. \{(?:\s*\\\*)?\s*\\field\s*\\fldlock\s*\{\s*\\\*\s*\\fldinst\s*MERGEFIELD\s*((?:\\.*?)?[\w\[\]]+?(?:\s*\\.*?)?)?\s*\}(?:\s*\{\s*\\fldrslt\s*\})?\s*\} But then I hit this it fails fees totaling $\protect {\field\fldlock{\*\fldinst MERGEFIELD ENTEROUTSTANDINGVETERINARYF EES}}\plain\f0\fs24\prot Is there way have to have it match a new line anywhere in the search too without adding (?:\r?\n)? everywhere? EDIT To clear up confusion on the new lines. I need to keep the newlines in the document, I only want to remove the newlines if they are inside my match, so in the final example I posted it should replace fees totaling $\protect {\field\fldlock{\*\fldinst MERGEFIELD ENTEROUTSTANDINGVETERINARYF EES}}\plain\f0\fs24\prot with fees totaling $\protect ENTEROUTSTANDINGVETERINARYFEES\plain\f0\fs24\prot

    Read the article

  • Sequencing ajax requests

    - by Scott Evernden
    I find I sometimes need to iterate some collection and make an ajax call for each element. I want each call to return before moving to the next element so that I don't blast the server with requests - which often leads to other issues. And I don't want to set async to false and freeze the browser. Usually this involves setting up some kind of iterator context that i step thru upon each success callback. I think there must be a cleaner simpler way? Does anyone have a clever design pattern for how to neatly work thru a collection making ajax calls for each item?

    Read the article

  • Drupal, installation to new web server... problems with Views exposed filter

    - by Patrick
    hi, I've moved my drupal installation to a new website (without clean urls support). I'm using a View to display the content of my website with exposed filter (tags multi-selection) When I click on one of the tags something strange happen on the new website.. Even if I select only 1 tag, I get urls like this: http://.../drupal/?tid[]=67&tid[]=66&view_name=Portfolio&view_display_id=page_1&view_args=&view_path=portfolio&view_base_path=portfolio&view_dom_id=1&pager_element=0 instead of the normal url: http://www.sanstitre.ch/drupal/portfolio?tid[0]=67 could you give me some tip ? thanks

    Read the article

  • Rails: Generic form actions, cancel link losing `:back` on validation failure

    - by Patrick Connor
    I am trying to create a generic set of Submit, Cancel, and Destroy actions for forms. At this point, it appears that everything is working, except that I lose :back functionality then a form reloads due to validation errors. Is there a way to catch the fact that validation has failed, and in that case, keep the request.env['HTTP_REFERER'] or :back value the same without having to edit every controller? = simple_form_for @announcement do |f| = f.error_notification = f.input :message = f.input :starts_at = f.input :ends_at #submit = f.button :submit = "or " = link_to("cancel", url_for(:back)) .right - if !f.object.new_record? - resource = (f.object.class.name).downcase = link_to "destroy", url_for(:action => 'destroy'), :confirm => "Are you sure that you want to delete this #{resource}?", :method => :delete .clear .non_input #post_back_msg #indicator.inline = image_tag "indicator.gif" .inline = "Please wait..." .non_input

    Read the article

  • Creating a custom categories widget

    - by Scott B
    The code below is an attempt to take the WP_Widget_Categories class and use it as the basis for a custom categories widget based on the default categories widget. I'm getting no output however and the widget is not showing up in the "Available Widgets" listing. What am I doing wrong? <?php /* Plugin Name: My Categories Widget Version: 1.0 */ class MY_Widget_Categories extends WP_Widget { function MY_Widget_Categories() { $widget_ops = array( 'classname' => 'widget_categories', 'description' => __( "A list or dropdown of categories" ) ); $this->WP_Widget('categories', __('Categories'), $widget_ops); } function widget( $args, $instance ) { extract( $args ); $title = apply_filters('widget_title', empty( $instance['title'] ) ? __( 'Categories' ) : $instance['title']); $c = $instance['count'] ? '1' : '0'; $h = $instance['hierarchical'] ? '1' : '0'; $d = $instance['dropdown'] ? '1' : '0'; echo $before_widget; if ( $title ) echo $before_title . $title . $after_title; $cat_args = array('orderby' => 'name', 'show_count' => $c, 'hierarchical' => $h); if ( $d ) { $cat_args['show_option_none'] = __('Select Category'); wp_dropdown_categories(apply_filters('widget_categories_dropdown_args', $cat_args)); ?> <script type='text/javascript'> /* <![CDATA[ */ var dropdown = document.getElementById("cat"); function onCatChange() { if ( dropdown.options[dropdown.selectedIndex].value > 0 ) { location.href = "<?php echo get_option('home'); ?>/?cat="+dropdown.options[dropdown.selectedIndex].value; } } dropdown.onchange = onCatChange; /* ]]> */ </script> <?php } else { ?> <ul> <?php $cat_args['title_li'] = ''; wp_list_categories(apply_filters('widget_categories_args', $cat_args)); ?> </ul> <?php } echo $after_widget; } function update( $new_instance, $old_instance ) { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['count'] = $new_instance['count'] ? 1 : 0; $instance['hierarchical'] = $new_instance['hierarchical'] ? 1 : 0; $instance['dropdown'] = $new_instance['dropdown'] ? 1 : 0; return $instance; } function form( $instance ) { //Defaults $instance = wp_parse_args( (array) $instance, array( 'title' => '') ); $title = esc_attr( $instance['title'] ); $count = isset($instance['count']) ? (bool) $instance['count'] :false; $hierarchical = isset( $instance['hierarchical'] ) ? (bool) $instance['hierarchical'] : false; $dropdown = isset( $instance['dropdown'] ) ? (bool) $instance['dropdown'] : false; ?> <p><label for="<?php echo $this->get_field_id('title'); ?>"><?php _e( 'Title:' ); ?></label> <input class="widefat" id="<?php echo $this->get_field_id('title'); ?>" name="<?php echo $this->get_field_name('title'); ?>" type="text" value="<?php echo $title; ?>" /></p> <p><input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('dropdown'); ?>" name="<?php echo $this->get_field_name('dropdown'); ?>"<?php checked( $dropdown ); ?> /> <label for="<?php echo $this->get_field_id('dropdown'); ?>"><?php _e( 'Show as dropdown' ); ?></label><br /> <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('count'); ?>" name="<?php echo $this->get_field_name('count'); ?>"<?php checked( $count ); ?> /> <label for="<?php echo $this->get_field_id('count'); ?>"><?php _e( 'Show post counts' ); ?></label><br /> <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('hierarchical'); ?>" name="<?php echo $this->get_field_name('hierarchical'); ?>"<?php checked( $hierarchical ); ?> /> <label for="<?php echo $this->get_field_id('hierarchical'); ?>"><?php _e( 'Show hierarchy' ); ?></label></p> <?php } } function my_categories_init() { register_sidebar_widget(__('My Categories Widget'), 'MY_Widget_Categories'); } add_action("plugins_loaded", "my_categories_init"); ?>

    Read the article

  • jQuery equivalent of PHP's file_exists()?

    - by Scott B
    In the code snippet below, from my jQuery setup, I need to check if the image file actually exists and if not, I'd like to substitute a default image. Currently if the file does not exist, I just get a broken image placeholder... $('#myTheme').change ( function() { var myImage = $('#myTheme :selected').text(); $('.selectedImage img').attr('src','../wp-content/themes/myTheme/styles/'+myImage+'/screenshot.jpg'); //if screenshot.jpg does not exist, use "../../default.jpg" instead } );

    Read the article

  • Does a persons' first programming language affect their programming style and if so, how? [closed]

    - by Scott Walsh
    I was speaking to an experienced lecturer recently who told me he could usually tell which programming language a student had learnt to program in by looking at their coding style (more specifically, when programming in other languages to the one which they were most comfortable with). He said that there have been multiple times when he's witnessed students attempted to write C# in Prolog. So I began to wonder, what specific traits do people gain from their first (or favourite) language which are carried over into their overall programming style, and more interestingly what good or bad habits do you think people would benefit from or should be wary of when learning specific language?

    Read the article

  • FLEX: sequence of puppets... 3 requirements

    - by Patrick
    hi, I'm implementing this sequence of puppets in flex: http://dl.dropbox.com/u/72686/itemsSequence.png I want to show the caption when the mouse rolls over the puppet I want the user being able to click on the buttons of the caption (so the caption doesn't have to disappear when I move the mouse out from the user over the caption). I don't want the puppet component to become bigger when the caption is added (it becomes visible), because the puppets have to stay nearby each other, I cannot resize the objects. So.. I need some guidelines to do it. More precisely: 1) Should I add the components in MXML or pure actionscript ? 2) If I use MXML, should I add also the caption to the flex model, and make it invisible and then change the value with actionscript ? What's the common way to implement it ? thanks

    Read the article

  • Webview blank but content is there

    - by Scott Dugas
    I am having trouble displaying a webview. I have a webview inside a custom view. I load this custom view as a subview of the window, and then have an object controller linking a text field to the content of the web view. Once a page is loaded, it loads all the content, but it is visually white. You can click on links. If you go to a Youtube video you can listen to it, but it still displays nothing.

    Read the article

  • Adding fields to Django form dynamically (and cleanly)

    - by scott
    Hey guys, I know this question has been brought up numerous times, but I'm not quite getting the full implementation. As you can see below, I've got a form that I can dynamically tell how many rows to create. How can I create an "Add Row" link that tells the view how many rows to create? I would really like to do it without augmenting the url... # views.py def myView(request): if request.method == "POST": form = MyForm(request.POST, num_rows=1) if form.is_valid(): return render_to_response('myform_result.html', context_instance=RequestContext(request)) else: form = MyForm(num_rows=1) return render_to_response('myform.html', {'form':form}, context_instance=RequestContext(request)) # forms.py class MyForm(forms.Form): def __init__(self, *args, **kwargs): num_rows = kwargs.pop('num_rows',1) super(MyForm, self).__init__(*args, **kwargs) for row in range(0, num_rows): field = forms.CharField(label="Row") self.fields[str(row)] = field # myform.html http://example.com/myform <form action="." method="POST" accept-charset="utf-8"> <ul> {% for field in form %} <li style="margin-top:.25em"> <span class="normal">{{ field.label }}</span> {{ field }} <span class="formError">{{ field.errors }}</span> </li> {% endfor %} </ul> <input type="submit" value="Save"> </form> <a href="ADD_ANOTHER_ROW?">+ Add Row</a>

    Read the article

  • How to Sort a TreeList in Sitecore 6 in the Source

    - by Scott
    My team uses Sitecore 6 as content management system and then .Net to interface with Sitecore API. In many of our templates we make use of a Treelist. When adding a new item to the selected items Treelist it automatically puts the item at the bottom of the list. In some lists they get very large. In most cases end users would like to see these lists sorted descending by a Date field that is part of the templates that can be added as selected to the Treelist. Programmatically on the .Net side its very easy to handle this using Linq OrderByDescending and all displays great in the site to visitors. What I am trying to figure out is how to get it to display the same in Sitecore Content Editor. I've not found anything from Google search other than there seems to be a SortBy you can specify in the source but I tried this and can't get it to have any effect. Has anyone dealt with this before? Again, main goal is to sort items in a Treelist in the Sitecore Content Editor itself. Thanks for any input anyone has.

    Read the article

  • HTML: should I add meta information to the forwarding php page ?

    - by Patrick
    hi, I've to correct the google search title and summary for a website having the following code as home page: <?php header("Location:/mil/index.php"); ?> It forwards the user to another page. I know this is not good, but I was wondering how to quickly fix it. If I add etc... to this page, is enough ? Is google grabbing the information from this page ? Or is it grabbing from the website pages and bypassing this page ? thanks

    Read the article

  • Java: empty ArrayLists in a foor loop

    - by Patrick
    hi, I'm reusing the same ArrayList in a for loop, and I use for loop results = new ArrayList<Integer>(); experts = new ArrayList<Integer>(); output = new ArrayList<String>(); .... to create new ones. I guess this is wrong, because I'm allocating new memory. Is this correct ? If yes, how can I empty them ? Added: another example I'm creating new variables each time I call this method. Is this good practice ? I mean to create new precision, relevantFound.. etc ? Or should I declare them in my class, outside the method to not allocate more and more memory ? public static void computeMAP(ArrayList results, ArrayList experts) { //compute MAP double precision = 0; int relevantFound = 0; double sumprecision = 0; thanks

    Read the article

< Previous Page | 62 63 64 65 66 67 68 69 70 71 72 73  | Next Page >