Search Results

Search found 377 results on 16 pages for 'bryan hare'.

Page 11/16 | < Previous Page | 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • Windows Screensaver Multi Monitor Problem

    - by Bryan
    I have a simple screensaver that I've written, which has been deployed to all of our company's client PCs. As most of our PCs have dual monitors, I took care to ensure that the screensaver ran on both displays. This works fine, however on some systems, where the primary screen has been swapped (to the left monitor), the screensaver only works on the left (primary) screen. The offending code is below. Can anyone see anything I've done wrong, or a better way of handling this? For info, the context of "this", is the screensaver form itself. // Make form full screen and on top of all other forms int minY = 0; int maxY = 0; int maxX = 0; int minX = 0; foreach (Screen screen in Screen.AllScreens) { // Find the bounds of all screens attached to the system if (screen.Bounds.Left < minX) minX = screen.Bounds.Left; if (screen.Bounds.Width > maxX) maxX = screen.Bounds.Width; if (screen.Bounds.Bottom < minY) minY = screen.Bounds.Bottom; if (screen.Bounds.Height > maxY) maxY = screen.Bounds.Height; } // Set the location and size of the form, so that it // fills the bounds of all screens attached to the system Location = new Point(minX, minY); Height = maxY - minY; Width = maxX - minX; Cursor.Hide(); TopMost = true;

    Read the article

  • C program that prints out another C program in Japanese

    - by Bryan Bueter
    There was a C program written for a contest that was formatted in ASCII art as a Japanese character. When compiled and ran it printed out another program formatted in a different Japanese character, then another, then finally it printed out the first again. I was looking for the code to that and could not find it on the internet. I dont remember what contest nor what the name of the program was. Thanks.

    Read the article

  • XSLT Sort Alphabetically & Numerically Problem

    - by Bryan
    I have a group of strings ie g:lines = '9,1,306,LUCY,G,89' I need the output to be: 1,9,89,306,G,LUCY This is my current code: <xsl:for-each select="$all_alerts[g:problem!='normal_service'][g:service='bus']"> <xsl:sort select="g:line"/> <xsl:sort select="number(g:line)" data-type="number"/> <xsl:value-of select="normalize-space(g:line)" /><xsl:text/> <xsl:if test="position()!=last()"><xsl:text>,&#160;</xsl:text></xsl:if> </xsl:for-each> I can get it to only display '1, 12, 306, 38, 9, G, LUCY' because the 2nd sort isn't being picked up. Anyone able help me out?

    Read the article

  • How do I create drop lines while dragging a menu item on a WinForm?

    - by Bryan
    I want to mimic the functionality of Google Chrome/FireFox for example, when rearranging your bookmarks, when you are dragging the menu item, it creates a black line at the proposed drop point, like this: I've already implemented the Drag/Drop functionality to rearrange the menu, but I would like to add these separator lines as an additional feature. Is there a way to do this within the .NET Framework (3.5) or shall I have to resort to Win32 api calls? Just wanted to ask before I went down that path.

    Read the article

  • Visual Studio 2008 adding incorrect working folders to TFS Workspace

    - by Bryan Rowe
    I am using Visual Studio 2008 with TFS. I have one workspace set up with one working folder. I map the root source control folder $/ to C:\TFS and get all code. When working on any project under the root, Visual Studio will randomly add incorrectly mapped working folders to my workspace. For example, it might map $/WebProject/ to C:\TFS\WebProject\DataAccess -- where the real files exist at C:\TFS\WebProject. Once it incorrectly adds these working folders, I can no longer open the solution. I am forced to remove the working folders that Visual Studio added and get latest from TFS. Has anyone experienced this? Is there something I can do to avoid running into this?

    Read the article

  • Storing high precision latitude/longitude numbers in iOS Core Data

    - by Bryan
    I'm trying to store Latitude/Longitudes in core data. These end up being anywhere from 6-20 digit precision. And for whatever reason, i had them as floats in Core Data, its rounding them and not giving me the exact values back. I tried "decimal" type, with no luck either. Are NSStrings my only other option? EDIT NSManagedObject: @interface Event : NSManagedObject { } @property (nonatomic, retain) NSDecimalNumber * dec; @property (nonatomic, retain) NSDate * timeStamp; @property (nonatomic, retain) NSNumber * flo; @property (nonatomic, retain) NSNumber * doub; Here's the code for a sample number that I store into core data: NSNumber *n = [NSDecimalNumber decimalNumberWithString:@"-97.12345678901234567890123456789"]; Code to access it again: NSNumber *n = [managedObject valueForKey:@"dec"]; NSNumber *f = [managedObject valueForKey:@"flo"]; NSNumber *d = [managedObject valueForKey:@"doub"]; Printed values: Printing description of n: -97.1234567890124 Printing description of f: <CFNumber 0x603f250 [0xfef3e0]>{value = -97.12345678901235146441, type = kCFNumberFloat64Type} Printing description of d: <CFNumber 0x6040310 [0xfef3e0]>{value = -97.12345678901235146441, type = kCFNumberFloat64Type}

    Read the article

  • Add dynamic URL (or button) to each node in Drupal

    - by Bryan Folds
    I've used CCK to create a 'Travel Offer' content-type which basically just lists the details for a travel package. My question is how to have a button or link on each node (when the user views it) that will link to a url that includes the title of the current node (eg: example.com/requestQuote/Title_Of_This_Node). I haven't implemented my system yet so I am free to change the content-type to include a button field or something like that...

    Read the article

  • How do I create lines while dragging a menu item on a WinForm? C#

    - by Bryan
    I want to mimic the functionality of Google Chrome/FireFox for example, when rearranging your bookmarks, when you are dragging the menu item, it creates a line at the proposed drop point. I've already implemented the Drag/Drop functionality to rearrange the menu, but I would like to add these separator lines as an additional feature. Is there a way to do this within the .NET Framework (3.5) or shall I have to resort to Win32 api calls? Just wanted to ask before I went down that path.

    Read the article

  • Drupal: Two-way communication between unregistered customer and admin

    - by Bryan Folds
    I need to setup a system where customers can choose to Request a Quote for a specific holiday package, where they will enter their personal details as well as their holiday requirements (number of rooms, etc.) and will then allow them to view a page which will have a threaded conversation between them and the admin (so the admin can reply to their quote request on the website). The problem is that most customers won't be registered when they want to request a quote, so I was thinking that the Request a Quote page could silently register the customer as a user (using their personal details) on the same page where it asks for their holiday requirements. The other option I can think of would be to not register them and just email them a unique URL where they can view their quote request and reply to the admin. Could you point me in the right direction on how to do either of those?

    Read the article

  • Interface in a dynamic language?

    - by Bryan
    Interface (or an abstract class with all the methods abstract) is a powerful weapon in a static language. It allows different derived types to be used in a uniformed way. However, in a dynamic language, all objects can be used in a uniformed way as long as they define certain methods. Does interface exist in dynamic languages? It seems unnecessary to me.

    Read the article

  • How can I use the paid version of my app as a "key" to the free version?

    - by Bryan Denny
    Let's say for example that I have some Android app that does X. The free version has ads or basic features. I want to have a paid version that removes the ads and adds extra features. How can I use the paid app as a "license key" to unlock the features in the free app? So the user would install the free app, then install the paid app to get the extra features, but they would still run the free app (which would now be unlocked). What's the best approach to doing this?

    Read the article

  • How to detect which Windows account is running a .net application?

    - by Bryan
    Hi, I'm writing a sharepoint web part. It writes logs into a file (by using StreamWriter). However, logs are written only for users whose accounts are administrators on the server hosting the web part. I want to detect which account (probably not by using SPUser) is executing web part's code, so that I can have logs generated for less privileged users. Is that possible? Thanks

    Read the article

  • SQL query through an intermediate table

    - by Bryan
    Given the following tables: Recipes | id | name | 1 | 'chocolate cream pie' | 2 | 'banana cream pie' | 3 | 'chocolate banana surprise' Ingredients | id | name | 1 | 'banana' | 2 | 'cream' | 3 | 'chocolate' RecipeIngredients | recipe_id | ingredient_id | 1 | 2 | 1 | 3 | 2 | 1 | 2 | 2 | 3 | 1 | 3 | 3 How do I construct a SQL query to find recipes where ingredients.name = 'chocolate' and ingredients.name = 'cream'?

    Read the article

  • How to capture SQL with parameters substituted in? (.NET, SqlCommand)

    - by Bryan
    Hello, If there an easy way to get a completed SQL statement back after parameter substitution? I.e., I want to keep a logfile of all the SQL this program runs. Or if I want to do this, will I just want to get rid of Parameters, and do the whole query the old school way, in one big string? Simple Example: I want to capture the output: SELECT subcatId FROM EnrollmentSubCategory WHERE catid = 1 .. from this code: Dim subCatSQL As String = "SELECT subcatId FROM EnrollmentSubCategory WHERE catid = @catId" Dim connectionString As String = "X" Dim conn As New SqlConnection(connectionString) If conn.State = ConnectionState.Closed Then conn.Open() End If Dim cmd As New SqlCommand(subCatSQL, conn) With cmd .Parameters.Add(New SqlParameter("@catId", SqlDbType.Int, 1)) End With Console.WriteLine("Before: " + cmd.CommandText) cmd.Prepare() Console.WriteLine("After: " + cmd.CommandText) I had assumed Prepare() would do the substitutions, but apparently not. Thoughts? Advice? Thanks in advance.

    Read the article

  • Problem comparing French character Î

    - by Bryan
    When comparing "Île" and "Ile", C# does not consider these to be to be the same. string.Equals("Île", "Ile", StringComparison.InvariantCultureIgnoreCase) For all other accented characters I have come across the comparison works fine. Is there another comparison function I should use?

    Read the article

  • How can I Export a Table in Access using VBA into a specific sheet in an Excel spreadsheet?

    - by Bryan
    I have a some tables, we will call them Table1,Table2.... and I need them to be Exported into specific spreadsheets in a macro enabled Excel File (.xlsm) that already exists. So I would need to put Table1 into Sheet2, Table2 into Sheet3... and so on. I had been doing this manually by going to the export menu in Access but it is getting monotonous so I would like to automate the process. The Excel file will already have code in each spreadsheet which would need to still be intact.

    Read the article

  • Passing parameters to eventListener function

    - by bryan sammon
    I have this function check(e) that I'd like to be able to pass parameters from test() when I add it to the eventListener. Is this possible? Like say to get the mainlink variable to pass through the parameters. Is this even good to do? I put the javascript below, I also have it on jsbin: http://jsbin.com/ujahe3/9/edit function test() { if (!document.getElementById('myid')) { var mainlink = document.getElementById('mainlink'); var newElem = document.createElement('span'); mainlink.appendChild(newElem); var linkElemAttrib = document.createAttribute('id'); linkElemAttrib.value = "myid"; newElem.setAttributeNode(linkElemAttrib); var linkElem = document.createElement('a'); newElem.appendChild(linkElem); var linkElemAttrib = document.createAttribute('href'); linkElemAttrib.value = "jsbin.com"; linkElem.setAttributeNode(linkElemAttrib); var linkElemText = document.createTextNode('new click me'); linkElem.appendChild(linkElemText); if (document.addEventListener) { document.addEventListener('click', check/*(WOULD LIKE TO PASS PARAMETERS HERE)*/, false); }; }; }; function check(e) { if (document.getElementById('myid')) { if (document.getElementById('myid').parentNode === document.getElementById('mainlink')) { var target = (e && e.target) || (event && event.srcElement); var obj = document.getElementById('mainlink'); if (target!= obj) { obj.removeChild(obj.lastChild); }; }; }; };

    Read the article

  • Do Ruby/Rails state machines exist that execute event transitions when a state change occurs?

    - by Bryan
    Hello All, Hopefully this isn't a silly question and I'm just not overlooking something in Ruby/Rails state machines (AASM, Transitions, AlterEgo, etc). From what I can tell, these state machine implementations operate on the preface that an event will get fired and the appropriate transition for that event will be triggered based on the old and new state. However, they don't seem to work the other way; say a user wants to change state from 'created' to 'assigned' and have the correct transition occur (rather than firing the event that causes the current state to be transitioned to the new state). Essentially, I want the user to be able to select a new state from a select box of available states and have the appropriate transition, guards, success callbacks, etc executed. Does anyone know if the existing state machine implementations support this?

    Read the article

  • On saving an new active record, in what order are the associated objects saved?

    - by Bryan
    In rails, when saving an active_record object, its associated objects will be saved as well. But has_one and has_many association have different order in saving objects. I have three simplified models: class Team < ActiveRecord::Base has_many :players has_one :coach end class Player < ActiveRecord::Base belongs_to :team validates_presence_of :team_id end class Coach < ActiveRecord::Base belongs_to :team validates_presence_of :team_id end I expected that when team.save is called, team should be saved before its associated coach and players. I use the following code to test these models: t = Team.new team.coach = Coach.new team.save! team.save! returns true. But in another test: t = Team.new team.players << Player.new team.save! team.save! gives the following error: > ActiveRecord::RecordInvalid: > Validation failed: Players is invalid I figured out that team.save! saves objects in the following order: 1) players, 2) team, and 3) coach. This is why I got the error: When a player is saved, team doesn't yet have a id, so validates_presence_of :team_id fails in player. Can someone explain to me why objects are saved in this order? This seems not logical to me.

    Read the article

  • Timespan in C# converting to int? Somehow?

    - by Bryan
    I'm trying to use the Timespan class to create a start time and a stop time, get the difference and ultimately dividing and multiplying the result against another number. The problem is getting into something I can work with. Any suggestions?

    Read the article

  • Problem with SQL syntax (probably simple)

    - by Bryan Folds
    I'm doing some custom database work for a module for Drupal and I get the following SQL error when trying to create my table: user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT NULL, rooms INT DEFAULT NULL, adults INT DEFAULT NULL, children' at line 14 query: CREATE TABLE dr_enquiry ( eId INT unsigned NOT NULL auto_increment, eKey VARCHAR(16) NOT NULL, dateSent INT NOT NULL DEFAULT 0, status VARCHAR(30) NOT NULL DEFAULT 'Unanswered', custName VARCHAR(50) NOT NULL, custEmail VARCHAR(200) NOT NULL, custPhone VARCHAR(25) NOT NULL, custCountry VARCHAR(40) NOT NULL, custIP VARCHAR(11) DEFAULT NULL, offerName VARCHAR(100) NOT NULL, offerURL VARCHAR(200) NOT NULL, arrival DATETIME DEFAULT NULL, departure DEFAULT NULL, rooms INT DEFAULT NULL, adults INT DEFAULT NULL, children INT DEFAULT NULL, childAges VARCHAR(32) DEFAULT NULL, toddlers INT DEFAULT NULL, toddlerAges VARCHAR(32) DEFAULT NULL, catering VARCHAR(255) DEFAULT NULL, comments VARCHAR(255) DEFAULT NULL, agent VARCHAR(100) DEFAULT NULL, voucher VARCHAR(100) DEFAULT NULL, PRIMARY KEY (eId) ) /*!40100 DEFAULT CHARACTER SET UTF8 */ in /home/travelco/public_html/includes/database.inc on line 550.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16  | Next Page >