Search Results

Search found 1555 results on 63 pages for 'scott'.

Page 36/63 | < Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >

  • What's special about mouse capture and middle mouse button in WPF?

    - by Scott Bilas
    When I call CaptureMouse() in response to a MouseDown from the middle mouse button, it will capture and then release the mouse. Huh? I've tried using Preview events, setting Handled=true, doesn't make a difference. Am I not understanding mouse capture in WPF? Here's some minimal sample code that reproduces the problem. // TestListBox.cs using System.Diagnostics; using System.Windows.Controls; namespace Local { public class TestListBox : ListBox { public TestListBox() { MouseDown += (_, e) => { Debug.WriteLine("+MouseDown"); Debug.WriteLine(" Capture: " + CaptureMouse()); Debug.WriteLine("-MouseDown"); }; MouseUp += (_, e) => { Debug.WriteLine("+MouseUp"); ReleaseMouseCapture(); Debug.WriteLine("-MouseUp"); }; GotMouseCapture += (_, e) => Debug.WriteLine("GotMouseCapture"); LostMouseCapture += (_, e) => Debug.WriteLine("LostMouseCapture"); } } } Generating a default WPF app that has this for its main window will use the test class: <Window x:Class="Local.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Local" Title="MainWindow" Height="350" Width="525"> <local:TestListBox> <ListBoxItem>1</ListBoxItem> <ListBoxItem>2</ListBoxItem> <ListBoxItem>3</ListBoxItem> <ListBoxItem>4</ListBoxItem> </local:TestListBox> </Window> Upon clicking the middle button down, I get this output: +MouseDown GotMouseCapture LostMouseCapture Capture: True -MouseDown So I'm calling CaptureMouse, which in turn grabs and then releases capture, yet returns true that capture was successfully acquired. What's going on here? Is it possible that this is something with my Logitech mouse driver doing something goofy, trying to initiate 'ultrascroll' or something?

    Read the article

  • Client to access and edit a MySQL database remotely

    - by Scott
    Hey guys, So I have been given the host, username, and login information for a MySQL Database. I need a client that I can use to log in to the Database remotely and create/update tables and edit all the data. I found the MySQL Administrator client provided by them, but it seems you can do everything BUT edit the actual data with it. Is there anything like this? Would I be able to use SQL Server Express (or something similar), to connect to a remote server online and do all of this?

    Read the article

  • Formatting the output of a custom tool so I can double click an error in Visual Studio and the file opens

    - by Ben Scott
    I've written a command line tool that preprocesses a number of files then compiles them using CodeDom. The tool writes a copyright notice and some progress text to the standard output, then writes any errors from the compilation step using the following format: foreach (var err in results.Errors) { // err is CompilerError var filename = "Path\To\input_file.xprt"; Console.WriteLine(string.Format( "{0} ({1},{2}): {3}{4} ({5})", filename, err.Line, err.Column, err.IsWarning ? "" : "ERROR: ", err.ErrorText, err.ErrorNumber)); } It then writes the number of errors, like "14 errors". This is an example of how the error appears in the console: Path\To\input_file.xrpt (73,28): ERROR: An object reference is required for the non-static field, method, or property 'Some.Object.get' (CS0120) When I run this as a custom tool in VS2008 (by calling it in the post-build event command line of one of my project's assemblies), the errors appear nicely formatted in the Error List, with the correct text in each column. When I roll over the filename the fully qualified path pops up. The line and column are different to the source file because of the preprocessing which is fine. The only thing that stands out is that the Project given in the list is the one that has the post-build event. The problem is that when I double click an error, nothing happens. I would have expected the file to open in the editor. I'm vaugely aware of the Microsoft.VisualStudio.Shell.Interop namespace but I think it should be possible just by writing to the standard output.

    Read the article

  • My UL child label elements disappear in IE on accordion menu opening

    - by Scott B
    I've got an app that's working pretty flawlessly in Chrome and FF, however, when I view it in IE, all is well until I click on a header element to activate it (jQuery accordion). What happens then is that I see a brief flash where the content is there, then suddenly the entire left column disappears. This column is generated by a floated label element with a class of ".left" as seen below... <ul class="menu collapsible"> <li class='expand sectionTitle'><a href='#'>General Settings</a> <ul class='acitem'> <li class="section"> <label class="left">This item if floated left with a defined width of 190px via css. This is the item that's disappearing after a brief display</label> <input class="input" value="input element here" /> <label class="description">This element has a margin-left:212px; set via css in order to be positioned to the right of the label element as if in an adjacent table cell. When I add a max-width property to this element, it disappears in IE too!</label> </li> </ul> </li> </ul> As you can see from the comments in the code above (for the two label elements) the description label disappears once I set a max-width on it. It shows up fine otherwise.

    Read the article

  • Finding Windows printer driver name using API

    - by Scott Bussinger
    I can't seem to find an API call that returns the driver name for a Windows printer. Note that I'm not talking about the friendly name of the printer in the printer folder, I'm talking about the name of actual driver being used as shown on the "Advanced" tab when you look at the printer properties: I'm trying to detect when I'm printing to the "Generic / Text Only" driver regardless of what name the user chooses for the printer. It doesn't seem like this should be hard, but I can't find it in the DEVMODE structure or anyplace else I've thought to look for it. Thanks for the help!

    Read the article

  • How do I effectively store a connection string in machine.config only?

    - by Scott Bedwell
    We are moving to an environment with multiple engines of MS SQL running on the same server (a test engine and a production engine). We also have separate test and production web servers, and would like for our asp.net applications to "magically" use the test database engine on the test web server and the production database engine on the production web servers. We would like to store the connection strings in machine.config rather than in web.config, but when we put it in machine.config, visual studio's IDE (particularly with datasets) does not recognize that the machine.config contains the connection. Does anyone know of a solution for displaying these machine.config connection strings in visual studio, or of a different solution that would accommodate for this? Thanks.

    Read the article

  • Custom add_action('save_post') causes html markup to disappear!

    - by Scott B
    I've added a custom "save_post" action to my theme (code is below). However, when I place images or video code in the post, its stripped away. The only way I can get it to stay is to comment out the add_action line. What do I need to do in order to keep all the post info intact? add_action('save_post', 'custom_add_save'); function custom_add_save($postID){ if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) { return $postID; } else { // called after a post or page is saved if($parent_id = wp_is_post_revision($postID)) { $postID = $parent_id; } if ($_POST['my_customHeader']) { update_custom_meta($postID, $_POST['my_customHeader'], 'my_customHeader'); } else { update_custom_meta($postID, '', 'my_customHeader'); } if ($_POST['my_customTitle']) { update_custom_meta($postID, $_POST['my_customTitle'], 'my_customTitle'); } else { update_custom_meta($postID, '', 'my_customTitle'); } } } function update_custom_meta($postID, $newvalue, $field_name) { // To create new meta if(!get_post_meta($postID, $field_name)){ add_post_meta($postID, $field_name, $newvalue); }else{ // or to update existing meta update_post_meta($postID, $field_name, $newvalue); } }

    Read the article

  • FOSS version of SQLCompare or something similar?

    - by Scott
    Actually, free is good enough, it doesn't have to be open source :) I'm currently using the Schema Compare utility of VS2008, but it doesn't have a command line interface and has some other weaknesses as well. I'm wondering what free tools others are using to provide command line schema comparisons/synchronizations? Thanks.

    Read the article

  • Passing in extra parameters in a URL

    - by Scott Atkinson
    I have the below column on my table what gets binded on pageload, the parameters in there work fine but i need to add an additional parameter which is the fullname which is the next column along but im having trouble figuring our the syntax, here is my ASP <asp:TemplateField HeaderText="ID"> <ItemTemplate> <asp:HyperLink ID="hyperLeadID" runat="server" NavigateUrl='<%#Eval("ID","/documents/Q-Sheet.aspx?LeadID={0}&isHappyCallReferral=yes&isHappyName={1}") %>' Text='<%#Eval("ID")%>'></asp:HyperLink> </ItemTemplate> </asp:TemplateField> <asp:TemplateField HeaderText="Referral Name"> <ItemTemplate> <asp:Label ID="lblRefName" CssClass="gvItem" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.Name") %>'></asp:Label> </ItemTemplate> </asp:TemplateField> As you can see at the end of ID column i have added isHappyName={1} which i assumed it would select the next column along as it starts at 0 but it keeps throwing an error which is "Index (zero based) must be greater than or equal to zero and less than the size of the argument list." Can someone help me to pass the usersname through the URL Thanks

    Read the article

  • PHP with SQL Injection

    - by Scott S
    For our first assignment in a System Security class, we have to hack into the professors "cheaply organized" sql database. I know the only user is "admin" and the select statement generated in the php is: select user_id from user where user_username = 'admin' AND user_password = md5('noob') I am having a number of problems attempting to bypass the password part of this statement as the professor has some javascript embedded in the page to sanitize the username and password of any non-alphanumeric values. This can be bypassed by turning off javascript :P but any values sent still get cleaned by the operating system (some build of Debian 32-bit). I've seen the code for the login request and it does not escape any characters. How do I bypass the operating systems escape sequences?

    Read the article

  • WCF and a developer key like Google map API. What exactly am I looking for?

    - by Scott
    I want to allow access to a WCF service to only those requests that contain a developer key. This is similiar to how the Google Maps API works. Register for a developer key and include that key in your requests. Anyone can get a key. How you get a key is undecided but is being discussed. For now, we'll email you a key. The service is up and running so I will be adding this on. I just need to know what I'm looking for so I can figure out what I need to do. Makes sense, right?!?! What is this scheme called? What should I search for? Any suggested links / books / whitepapers?

    Read the article

  • Using the pluralize method in a rake task

    - by Scott S.
    I know this seems silly, but I would like to call some of Rails' Text Helpers in a rake task I am setting up. (Thinks like the pluralize and cycle method: http://api.rubyonrails.org/classes/ActionView/Helpers/TextHelper.html) How would you go about making these available in a rake task, or is it not easily possible?

    Read the article

  • DataGridView validating old value insted of new value.

    - by Scott Chamberlain
    I have a DataGridView that is bound to a DataTable, it has a column that is a double and the values need to be between 0 and 1. Here is my code private void dgvImpRDP_InfinityRDPLogin_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) { if (e.ColumnIndex == dtxtPercentageOfUsersAllowed.Index) { double percentage; if(dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].Value.GetType() == typeof(double)) percentage = (double)dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].Value; else if (!double.TryParse(dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].Value.ToString(), out percentage)) { e.Cancel = true; dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].ErrorText = "The value must be between 0 and 1"; return; } if (percentage < 0 || percentage > 1) { e.Cancel = true; dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].ErrorText = "The value must be between 0 and 1"; } } } However my issue when dgvImpRDP_InfinityRDPLogin_CellValidating fires dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].Value will contain the old value before the edit, not the new value. For example lets say the old value was .1 and I enter 3. The above code runs when you exit the cell and dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].Value will be .1 for that run, the code validates and writes 3 the data to the DataTable. I click on it a second time, try to leave, and this time it behaves like it should, it raises the error icon for the cell and prevents me from leaving. I try to enter the correct value (say .7) but the the Value will still be 3 and there is now no way out of the cell because it is locked due to the error and my validation code will never push the new value. Any recommendations would be greatly appreciated. EDIT -- New version of the code based off of Stuart's suggestion and mimicking the style the MSDN article uses. Still behaves the same. private void dgvImpRDP_InfinityRDPLogin_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) { if (e.ColumnIndex == dtxtPercentageOfUsersAllowed.Index) { dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].ErrorText = String.Empty; double percentage; if (!double.TryParse(dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].FormattedValue.ToString(), out percentage) || percentage < 0 || percentage > 1) { e.Cancel = true; dgvImpRDP_InfinityRDPLogin[e.ColumnIndex, e.RowIndex].ErrorText = "The value must be between 0 and 1"; return; } } }

    Read the article

  • jQuery IE7 on-the-fly images

    - by Scott Evernden
    The simplified version of the problem I am seeing in IE7 can be demonstated using FireBug Lite. On a page loaded with jQuery, I open FireBug Lite (via bookmarket) and I enter the following: image = $('<img src="http://example.com/boofar.jpg" border="12" width="95" height="95" title="Booya">')[0]; and the result echoed is: <img title="Booya" contentEditable="inherit" start="fileopen" loop="1" src="http://example.com/boofar.jpg" border="12"> Where are the width and height attributes? Furthermore, image.width; and image.attributes.width.value; return 0 and "0". Seen this with both jQuery 1.2.6 as well as 1.4.2. It does the right thing in IE8 and FF. Any ideas where those attributes went? Very annoying....

    Read the article

  • WordPress issues with htaccess causing 500 server error

    - by Scott B
    I have a few customers of my custom wordpress theme that are reporting that their sites have went down over the past few weeks due to a 500 internal server error. In each case, it appears that the htaccess file has been to blame. In one case, the user's hosting company found a "_pvt/service.pwd" line in there that was apparently causing the problem. In another instance, the hosting company indicated that a chron job appeared to be causing the issue and sent the user the following as evidence... root@cherry [/home/login/public_html]# stat .htaccess File: `.htaccess.orig' Size: 587 Blocks: 8 IO Block: 4096 regular file Device: 811h/2065d Inode: 590021607 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 2234/login) Gid: ( 2231/login) Access: 2010-03-07 16:42:01.000000000 -0600 Modify: 2010-03-26 09:15:15.000000000 -0500 Change: 2010-03-26 09:45:05.000000000 -0500 In yet another instance, the user reported this as the cause... The permissions on my .index file somehow got changed to 777 instead of 644 I'm just seeking to help these users understand what's going on, the likely cause and how to prevent it. I also want to eliminate my theme as a potential contributing factor. I have two areas in which I want to submit here to make sure that they are not likely to cause such an issue. They are my permalink rewrite code as well as my upgrade script (which sets 755 on the destination folder (my theme folder). Here's the permalink rewrite code... if (file_exists(ABSPATH.'/wp-admin/includes/taxonomy.php')) { require_once(ABSPATH.'/wp-admin/includes/taxonomy.php'); if(get_option('permalink_structure') !== "/%postname%/" || get_option('mycustomtheme_permalinks') !=="/%postname%/") { $mycustomtheme_permalinks = get_option('mycustomtheme_permalinks'); require_once(ABSPATH . '/wp-admin/includes/misc.php'); require_once(ABSPATH . '/wp-admin/includes/file.php'); global $wp_rewrite; $wp_rewrite->set_permalink_structure($mycustomtheme_permalinks); $wp_rewrite->flush_rules(); } if(!get_cat_ID('topMenu')){wp_create_category('topMenu');} if(!get_cat_ID('hidden')){wp_create_category('hidden');} if(!get_cat_ID('noads')){wp_create_category('noads');} } if (!is_dir(ABSPATH.'wp-content/uploads')) { mkdir(ABSPATH.'wp-content/uploads'); } And here is the relevant lines from my uploader script... // permission settings for newly created folders $chmod = 0755; // Ensures that the correct file was chosen $accepted_types = array('application/zip', 'application/x-zip-compressed', 'multipart/x-zip', 'application/s-compressed'); foreach($accepted_types as $mime_type) { if($mime_type == $type) { $okay = true; break; } } //Safari and Chrome don't register zip mime types. Something better could be used here. $okay = strtolower($name[1]) == 'zip' ? true: false; if(!$okay) { die("This upgrader requires a zip file. Please make sure your file is a valid zip file with a .zip extension"); } //mkdir($target); $saved_file_location = $target . $filename; if(move_uploaded_file($source, $saved_file_location)) { openZip($saved_file_location); } else { die("There was a problem. Sorry!"); }

    Read the article

  • How to set logging level for JDBCDriverLogging

    - by Scott
    I am trying to change the logging level to stop showing millions of this: <May 26, 2010 10:26:02 AM EDT> <Debug> <JDBCDriverLogging> <000000> <2336: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | |> I have tried adding this to my java line: -Djava.util.logging.config.file=/foo/bar/logging.properties With this as my logging.properties file: handlers = java.util.logging.ConsoleHandler .level = OFF java.util.logging.ConsoleHandler.level = INFO No luck. I have tried this: Logger logger = Logger.getLogger("com.microsoft.sqlserver.jdbc"); Handler handler = new ConsoleHandler(); handler.setLevel(Level.INFO); logger.addHandler(handler); logger.setLevel(Level.INFO); logger.setUseParentHandlers(false); No luck. I have searched around and all ideas center around one of these two options, so I must be doing something else wrong I am using jtds-1.2.2.jar. Thanks for any suggestions.

    Read the article

  • GhostScript PDF Merging (Losing Editable Fields)

    - by Scott
    I'm using GhostScript to merge to PDFs into one PDF. One of the PDFs has textbox fields (editable fields) that I created in Adobe Acrobat Pro 9. When I merge these two PDFs with GhostScript I lose the textbox fields. Is there any way to merge these files (using GS or some other free linux software) that keeps the textbox fields intact?

    Read the article

  • Django - User account with multiple identities

    - by Scott Willman
    Synopsis: Each User account has a UserProfile to hold extended info like phone numbers, addresses, etc. Then, a User account can have multiple Identities. There are multiple types of identities that hold different types of information. The structure would be like so: User |<-FK- UserProfile | |<-FK- IdentityType1 |<-FK- IdentityType1 |<-FK- IdentityType2 |<-FK- IdentityType3 (current) |<-FK- IdentityType3 |<-FK- IdentityType3 The User account can be connected to n number of Identities of different types but can only use one Identity at a time. Seemingly, the Django way would be to collect all of the connected identities (user.IdentityType1_set.select_related()) into a QuerySet and then check each one for some kind of 'current' field. Question: Can anyone think of a better way to select the 'current' marked Identity than doing three DB queries (one for each IdentityType)?

    Read the article

  • Using combo boxes with a binding source and multiple tables

    - by Scott Chamberlain
    I have two data tables in a data set for example lets say Servers: | Server | Ip | Users: | Username | Password | ServerToConnectTo | and there is a foreign key on users that points to servers. How do I make a combo box that list all of the servers. Then how do I make the selected server in that combo box be saved in the data set in the ServerToConnect to column.

    Read the article

  • Wordpress > Exclude specific categories from categories listing

    - by Scott B
    I have created some functional categories that I use to show/hide markup elements. However, when I go to list the legit categories, these show up too, which I would expect. I want to list the legitimate categories and omit others. I need to know how you would do it under two circumstances.... 1) Each category that I want to exclude is preceded by an underscore character in its name. 2) Each category that I want to exclude is NOT preceeded by a special character and I will just provide an ID to the script that handles the exclusion listing.

    Read the article

  • WordPress > microsites use main site's menu (same domain, multiple subdirectories, multiple WP insta

    - by Scott B
    I have a main site at site.com and several subdirectory "microsites" at site1.site.com, site2.site.com, etc. These are all on the same server. Each site is set up in its own folder under public_html and each with its own separate wordpress install. I'd like for each microsite to share the same top level menu (the page's menu) with the main site. I'm sure there are several approaches and I'd like to ask you for a few ideas. As an aside, I'd also like to ask if the new WordPress 3.0 beta would make this simpler to do (since it combines wordpress MU into the main wordpress core)

    Read the article

  • WPF layout calls MeasureOverride repeatedly in increments of 2?

    - by Scott Whitlock
    I've run into a case where I have a custom Panel (inherits from Panel) and I'm using it as an ItemsPanel in a ListView. When I resize the container that it's in, if I resize it smaller, my panel's MeasureOverride function gets called once, but if I resize it larger (let's say from 100 to 300), it calls MeasureOverride and ArrangeOverride for every value between 100 and 300, in increments of 2 (so 102, 104, etc.). The weird thing is that the container resizes right away (its size gets to 300 immediately). It doesn't seem to matter what I return from MeasureOverride - it just does this. I wish I could make it happen in a really small application and post it here, but I haven't been able to reproduce it like that yet. I can reproduce it all day in my app though. Does anyone know what could cause this?

    Read the article

  • C++ Operator Ambiguity

    - by Scott
    Forgive me, for I am fairly new to C++, but I am having some trouble regarding operator ambiguity. I think it is compiler-specific, for the code compiled on my desktop. However, it fails to compile on my laptop. I think I know what's going wrong, but I don't see an elegant way around it. Please let me know if I am making an obvious mistake. Anyhow, here's what I'm trying to do: I have made my own vector class called Vector4 which looks something like this: class Vector4 { private: GLfloat vector[4]; ... } Then I have these operators, which are causing the problem: operator GLfloat* () { return vector; } operator const GLfloat* () const { return vector; } GLfloat& operator [] (const size_t i) { return vector[i]; } const GLfloat& operator [] (const size_t i) const { return vector[i]; } I have the conversion operator so that I can pass an instance of my Vector4 class to glVertex3fv, and I have subscripting for obvious reasons. However, calls that involve subscripting the Vector4 become ambiguous to the compiler: enum {x, y, z, w} Vector4 v(1.0, 2.0, 3.0, 4.0); glTranslatef(v[x], v[y], v[z]); Here are the candidates: candidate 1: const GLfloat& Vector4:: operator[](size_t) const candidate 2: operator[](const GLfloat*, int) <built-in> Why would it try to convert my Vector4 to a GLfloat* first when the subscript operator is already defined on Vector4? Is there a simple way around this that doesn't involve typecasting? Am I just making a silly mistake? Thanks for any help in advance.

    Read the article

< Previous Page | 32 33 34 35 36 37 38 39 40 41 42 43  | Next Page >