Search Results

Search found 3244 results on 130 pages for 'david fraser'.

Page 76/130 | < Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >

  • c#-excel interop - create chart on workbook as opposed to in a sheet

    - by david.barkhuizen
    Using c# MS Excel interop library, I would like to programmatically create a new chart on the workbook, as opposed to on an a sheet. The code below allows me to create a chart on an existing _Worksheet (sheet). using using Microsoft.Office.Interop.Excel; _Worksheet sheet; (assume this is a reference to a valid _Worksheet object) ChartObjects charts = (ChartObjects)sheet.ChartObjects(Type.Missing); ChartObject chartObject = (ChartObject)charts.Add(10, 80, 300, 250); Chart chart = chartObject.Chart; chart.ChartType = XlChartType.xlXYScatter; Does anyone know how to rather go about creating a chart on the workbook (i.e. where the chart is the sheet).

    Read the article

  • Can I use a property placeholder with Spring EL?

    - by David Easley
    Before upgrading to Spring 3 I had this in my applicationContext.xml file: <bean class="com.northgateis.pole.ws.PolePayloadValidatingInterceptor"> <property name="validateRequest" value="${validateRequest}" /> <property name="validateResponse" value="${validateResponse}" /> </bean> where ${validateRequest) and ${validateRequest) refer to properties that may or may not be defined in my properties file. In Spring 2, if these proeprties were not present in the properties file the setters on the bean were not called and so the defaults hard-coded in PolePayloadValidatingInterceptor were used. After upgrading to Spring 3, it seems the behaviour is different: If the properties are not present in the properties file I get the following exception: SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'annotationMapping' defined in class path resource [com/northgateis/pole/ws/applicationContext-ws.xml]: Could not resolve placeholder 'validateRequest' at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:272) at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:640) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:615) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:405) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272) I tried dabbling with Spring EL but the following doesn't seem to work: <bean class="com.northgateis.pole.ws.PolePayloadValidatingInterceptor"> <property name="validateRequest" value="${validateRequest?:true}" /> <property name="validateResponse" value="${validateResponse?:false}" /> </bean> The value after the Elvis operator is always used, even when the properties are defined in the proeprties file. Interesting that the syntax is accepted. Any suggestions?

    Read the article

  • How can I equalize the heights of text input fields?

    - by David
    What is the best way to equalize the height of my <select..> elements and my <input type="text"..> elements? It's proving difficult because of differences in box-sizing models. Google Chrome's user agent stylesheet has this: select { -webkit-box-sizing: border-box; } ..whereas other text input fields use the content box model. Why the difference? Should I perhaps make all of my text-based input fields use the border-box model? BTW, I'm using standards-compliant mode (by using <!DOCTYPE html>).

    Read the article

  • Use API or SQL to detect new Support Tickets?

    - by David Powers
    I currently work for a company that uses Kayako for their support system. They sell an extra program called Insta Alert that plays a sound when a new ticket is submitted. I use WHMCS for my own company, and would like to develop something to work with it that does the same thing. Here is the WHMCS API... http://wiki.whmcs.com/API:Functions I am wondering if it would make more sense from a remote C++ application to use the API or just check the MySQL database for new tickets? This is not really something im overly familiar with (I usually make mods) but it doesn't seem overly difficult. I just want some assistance in choosing the best approach.

    Read the article

  • iphone calls both if and else at the same time?

    - by David Schiefer
    Hi, I need to determine what file type a file is and then perform a certain action for it. this seems to work fine for some types, however all media types such as videos and sound files get mixed up. I determine the file type by doing this: BOOL matchedMP3 = ([[rowValue pathExtension] isEqualToString:@"mp3"]); if (matchedMP3 == YES) { NSLog(@"Matched MP3"); } I do this for various file types and just define an "else" for all the others. Here's the problem though. The iPhone calls them both. Here's what the log reveals: 2010-05-11 18:51:12.421 Test [5113:207] Matched MP3 2010-05-11 18:51:12.449 Test [5113:207] Matched ELSE I've never seen anything like this before. This is my "matchedMP3" function: BOOL matchedMP3 = ([[rowValue pathExtension] isEqualToString:@"mp3"]); if (matchedMP3 == YES) { NSLog(@"Matched MP3"); NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSFileManager *manager = [NSFileManager defaultManager]; self.directoryContent = [manager directoryContentsAtPath:documentsDirectory]; NSString *errorMessage = [documentsDirectory stringByAppendingString:@"/"]; NSString *urlAddress = [errorMessage stringByAppendingString:rowValue]; MPMoviePlayerController *moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:urlAddress]]; moviePlayer.movieControlMode = MPMovieControlModeDefault; moviePlayer.backgroundColor = [UIColor blackColor]; [moviePlayer play]; } and here's the else statement: else { NSLog(@"Matched ELSE"); [[NSUserDefaults standardUserDefaults] setObject:rowValue forKey:@"rowValue"]; NSString*rowValue = [[NSUserDefaults standardUserDefaults] objectForKey:@"rowValue"]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSFileManager *manager = [NSFileManager defaultManager]; self.directoryContent = [manager directoryContentsAtPath:documentsDirectory]; NSString *errorMessage = [documentsDirectory stringByAppendingString:@"/"]; NSString *urlAddress = [errorMessage stringByAppendingString:rowValue]; webViewHeader.prompt = rowValue; [documentViewer setDelegate:self]; NSString *encodedString = [urlAddress stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; //Create a URL object. NSURL *url = [NSURL URLWithString:encodedString]; //URL Requst Object NSURLRequest *requestObj = [NSURLRequest requestWithURL:url]; //Load the request in the UIWebView. [documentViewer loadRequest:requestObj]; [navigationController pushViewController:webView animated:YES]; } I can't see a reason why it wouldn't work. What happens is that both the webview and the MediaPlayer toggle their own player, so they overlap and play their sound/video a few secs apart from each other. Any help would be appreciated & thank for you taking the time to read through my code.

    Read the article

  • How can I sort an NSTableColumn of NSStrings ignoring "The " and "A "?

    - by David Barry
    I've got a simple Core Data application that I'm working on to display my movie collection. I'm using an NSTableView, with it's columns bound to attributes of my Core Data store through an NSArrayController object. At this point the columns sort fine(for numeric values) when the column headers are clicked on. The issue I'm having is with the String sorting, they sort, however it's done in standard string fashion, with Uppercase letters preceding lowercase(i.e. Z before a). In addition to getting the case sorting to work properly, I would like to be able to ignore a prefix of "The " or "A " when sorting the strings. What is the best way to go about this in Objective-C/Cocoa?

    Read the article

  • JQuery $.getJSON appends a question mark to the request URL

    - by David Neale
    I have the folliwng JSON request code on an ASP.NET MVC web application: var userID = 'id=' + $('#namesList').val(); $.getJSON('/Person/GetPerson/', userID, function(data) { $('#collar').text(data.collarNumber); $('#name').text(data.Name); $('#email').text(data.EmailAddress); }); This creates a request such as: http://localhost:48610/Person/GetPerson/?id=6. Why is there a question mark in there? I get the server error The parameters dictionary contains a null entry for parameter 'id' of non-nullable type 'System.Int32'.... If I make the request manually without the question mark it works fine.

    Read the article

  • Entity Framework use of indexes and foreign keys

    - by David
    I want to be able to search a table quite quickly using the Entity Framework, say if I have a Contacts table, a JobsToDo table and a matrix table linking the two tables e.g Contacts_JobsToDo_Mtx and I specify two foreign keys in the Contacts_JobsToDo_Mtx table, if I wanted to search this Mtx table, do I need to specify an index on the two foreign keys? Or by the fact that they are two foreign keys are they considered indexed on them anyway? Will the Entity Framework be able to search through the Mtx table quickly without having to specfiy an index on both keys? Thanks!

    Read the article

  • VS2010 express beta2 - no add reference dialog, no open file/project dialogs

    - by David
    Just installed VS2010 express for Windows Phone last night. Install went smoothly. It creates a project, compiles, and deploys the app to the emulator. Here's the problem: When I try to "Add Reference" through the Project menu, I do not get the Add Reference dialog box. Same thing if I right click References in the solution explorer and click Add Reference. That's not all. "File...Open" and "File...Open Project" also fail to throw up an open file dialog box. When attempting any of these actions, the IDE quickly loses and regains focus. Even pressing a keyboard shortcut (Ctrl+O) causes the IDE to quickly lose and regain focus, but no open file dialog box appears. This is what I have tried, not particularly in this order: 1. Turned off UAC 2. Monitored file and registry access using Process Monitor during a File...Open operation. File activity showed mostly "SUCCESS" with a few "FAST IO DISALLOWED" and a few "INVALID DEVICE REQUEST" results. Registry activity showed mostly "SUCCESS" with some "NAME NOT FOUND" and a few "BUFFER OVERFLOW" results. 3. Created a new, clean Windows account to run the IDE from 4. Forced a test project to add a reference to "System.Xml.Linq" by editing the ".csproj" project file. Project failed to load in the IDE. I don't have these problems at all on 2 other Windows 7 computers with VS2010 C# express beta 2 installed. One machine is 32bit and the other 64bit, both Home Premium edition. My system: Windows 7 Home Premium, 64bit Other Visual Studio products installed: VS2008 C# express, VS2008 C++ express One other thing to note: Several months ago I installed the non-phone distribution of VS2010 C# express beta 2, and I had the same exact problems. Back then I chalked it up to being beta and went back to VS2008 C# express, where I do not have these issues.

    Read the article

  • VBA Excel macro: use Range to act on a different worksheet

    - by David Oneill
    I am very much a beginner when it comes to VBA programming. I have a Macro that hides or shows columns based on the value in one cell: Sub HideColumnsMacro() Range("b8:o8").EntireColumn.Hidden = False v1 = Range("b2").Value + 1 If v1 < 12 Then With Range("b8") Range(.Offset(0,v1), .Offset(0, 12)).EntireColumn.Hidden = True End With End If End Sub I want to be able to get this same functionality when I change a cell on a different sheet. Is there a way I can tell this Macro to act on this sheet, when it is run from a different one?

    Read the article

  • Applying the Hibernate filter attribute to a Bag with a many-to-many relationship

    - by David P
    Consider the following Hibernate mapping file: <hibernate-mapping ...> <class name="ContentPackage" table="contentPackages"> <id name="Id" column="id" type="int"><generator class="native" /></id> ... <bag name="Clips" table="contentAudVidLinks"> <key column="fk_contentPackageId"></key> <many-to-many class="Clip" column="fk_AudVidId"></many-to-many> <filter name="effectiveDate" condition=":asOfDate BETWEEN startDate and endDate" /> </bag> </class> </hibernate-mapping> When I run the following command: _session.EnableFilter("effectiveDate").SetParameter("asOfDate", DateTime.Today); IList<ContentPackage> items = _session.CreateCriteria(typeof(ContentPackage)) .Add(Restrictions.Eq("Id", id)) .List<ContentPackage>(); The resulting SQL has the WHERE clause on the intermediate mapping table (contentAudVidLinks), rather than the "Clips" table even though I have added the filter attribute to the Bag of Clips. What am I doing wrong?

    Read the article

  • flex textarea text attribute but still renders as html

    - by David
    actually i got to the cause of the issue. if you feed the textarea text attribute with an tag that has a valid src url, then for some reason flex will try to render everything as html. Eg, try this: <mx:TextArea id="textArea" width="100%" height="90%" text="<img src='http://url-to-a-valid-img"/> and instead of it rendering it as raw text it will render it as an html. any idea?

    Read the article

  • how to build a 3statetree in flex

    - by david Lnn
    hi all I want build a 3statetree with checkbox,I had got the resource from cookbook,but I don't know how to use it with json, and how can i click one node then send the request to server and expand the subnode after receive the json data from server. thank you,thank you.

    Read the article

  • TSQL to insert an ascending value

    - by David Neale
    I am running some SQL that identifies records which need to be marked for deletion and to insert a value into those records. This value must be changed to render the record useless and each record must be changed to a unique value because of a database constraint. UPDATE Users SET Username = 'Deleted' + (ISNULL( Cast(SELECT RIGHT(MAX(Username),1) FROM Users WHERE Username LIKE 'Deleted%') AS INT) ,0) + 1 FROM Users a LEFT OUTER JOIN #ADUSERS b ON a.Username = 'AVSOMPOL\' + b.sAMAccountName WHERE (b.sAMAccountName is NULL AND a.Username LIKE 'AVSOMPOL%') OR b.userAccountControl = 514 This is the important bit: SET Username = 'Deleted' + (ISNULL( Cast(SELECT RIGHT(MAX(Username),1) FROM Users WHERE Username LIKE 'Deleted%') AS INT) ,0) + 1 What I've tried to do is have deleted records have their Username field set to 'Deletedxxx'. The ISNULL is needed because there may be no records matching the SELECT RIGHT(MAX(Username),1) FROM Users WHERE Username LIKE 'Deleted%' statement and this will return NULL. I get a syntax error when trying to parse this (Msg 156, Level 15, State 1, Line 2 Incorrect syntax near the keyword 'SELECT'. Msg 102, Level 15, State 1, Line 2 Incorrect syntax near ')'. I'm sure there must be a better way to go about this, any ideas?

    Read the article

  • Strict doctype - form and input element

    - by David
    Does anyone know the reasoning behind the strict doctype not allowing input elements to be direct descendents of a form element. I find it annoying that i have to wrap a submit button which is a block level element inside another block level element say a fieldset or a div. However, I cannot find an answer anywhere as to why this actually is.

    Read the article

  • How to scrap the first paragraphe from a wikipedia page?

    - by David
    Hi, Let's say i want to grab the first paragraphe in This wikipedia Page How to get the principal text between the title and CONTENTS box using XPath or DOM & PHP or something similar? Is there any php library for that? i don't want to use the api because it's a bit complex. Note: i just need that to add a widget under my pages that displays related infos from wikipedia. Thanks

    Read the article

  • Throwing Exception in CTOR and Smart Pointers

    - by David Relihan
    Is it OK to have the following code in my constructor to load an XML document into a member variable - throwing to caller if there are any problems: MSXML2::IXMLDOMDocumentPtr m_docPtr; //member Configuration() { try { HRESULT hr = m_docPtr.CreateInstance(__uuidof(MSXML2::DOMDocument40)); if ( SUCCEEDED(hr)) { m_docPtr->loadXML(CreateXML()); } else { //throw exception to caller } } catch(...) { //throw exception to caller } } Based on Scott Myers RAII implementations in More Effective C++ I believe I am alright in just allowing exceptions to be thrown from CTOR as I am using a smart pointer(IXMLDOMDocumentPtr). Let me know what you think....

    Read the article

  • rails routes for permalink with namespaced class

    - by David
    this one in my routes works perfectly: map.connect ':permalink', :controller = 'pages', :action = 'show' for this class: class PagesController < BackendController and on /xxx/pages it is shown like this: <%= link_to "#{item.link_name}", {:controller = :pages, :action = :show, :permalink = item.permalink} % which will generate a link like "how-to-create-permalinks". but i decided to move the PagesController into a subdirectory so the class is now written like so: class Backend::PagesController < BackendController But how does the route look like now? And how do i display it on the template so it links using the permalink? Thanks!

    Read the article

  • How can I avoid properties being reset at design-time in tightly bound user controls?

    - by David Anderson
    I have UserControl 'A' with a label, and this property: /// <summary> /// Gets or Sets the text of the control /// </summary> [ Browsable(true), EditorBrowsable(EditorBrowsableState.Always), Category("Appearance") ] public override string Text { get { return uxLabel.Text; } set { uxLabel.Text = value; } } I then have UserControl 'B' which has UserControl 'A' on it, and I set the Text Property to "My Example Label" in the designer. Then, I have my MainForm, which has UserControl 'B' on it. Each time I do a build or run, the Text property of UserControl 'A' is reset to its default value. I suppose this is because since I am doing a rebuild, it rebuilds both UserControl 'A' and 'B', thus causing the problem. How can I go about a better approach to design pattern to avoid this type of behavior when working with tightly bound controls and forms in a application?

    Read the article

  • Running Stored Procedure with parameters resulting from query

    - by David in Dakota
    It's not hard to find developers who think cursors are gauche but I am wondering how to solve the following problem without one: Let's say I have a proc called uspStudentDelete that takes as a parameter @StudentID. uspStudentDelete applies a bunch of cascading soft delete logic, marking a flag on tables like "classes", "grades", and so on as inactive. uspStudentDelete is well vetted and has worked for some time. What would be the best way to run uspStudentDelete on the results of a query (e.g. select studentid from students where ... ) in *TSQL*?

    Read the article

  • Re-indexing table; update with from

    - by David Thorisson
    The query says it all, I can't find out the right syntax without without using a for..next UPDATE Webtree SET Webtree.Sorting=w2.Sorting FROM ( SELECT BranchID, CASE WHEN @Index>=ROW_NUMBER() OVER(ORDER BY Sorting ASC) THEN ROW_NUMBER() OVER(ORDER BY Sorting ASC) ELSE ROW_NUMBER() OVER(ORDER BY Sorting ASC)+1 END AS Sorting FROM Webtree w2 WHERE w2.ParentID=@ParentID ) WHERE Webtree.BranchID=w2.BranchID

    Read the article

  • General many-to-many relationship problem ( Postgresql )

    - by David
    Hi, i have two tables: CREATE TABLE "public"."auctions" ( "id" VARCHAR(255) NOT NULL, "auction_value_key" VARCHAR(255) NOT NULL, "ctime" TIMESTAMP WITHOUT TIME ZONE NOT NULL, "mtime" TIMESTAMP WITHOUT TIME ZONE NOT NULL, CONSTRAINT "pk_XXXX2" PRIMARY KEY("id"), ); and CREATE TABLE "public"."auction_values" ( "id" NUMERIC DEFAULT nextval('default_seq'::regclass) NOT NULL, "fk_auction_value_key" VARCHAR(255) NOT NULL, "key" VARCHAR(255) NOT NULL, "value" TEXT, "ctime" TIMESTAMP WITHOUT TIME ZONE NOT NULL, "mtime" TIMESTAMP WITHOUT TIME ZONE NOT NULL, CONSTRAINT "pk_XXXX1" PRIMARY KEY("id"), ); if i want to create a many-to-many relationship on the auction_value_key like this: ALTER TABLE "public"."auction_values" ADD CONSTRAINT "auction_values_fk" FOREIGN KEY ("fk_auction_value_key") REFERENCES "public"."auctions"("auction_value_key") ON DELETE NO ACTION ON UPDATE NO ACTION NOT DEFERRABLE; i get this SQL error: ERROR: there is no unique constraint matching given keys for referenced table "auctions" Question: As you might see, i want "auction_values" to be be "reused" by different auctions without duplicating them for every auction... So i don't want a key relation on the "id" field in the auctions table... Am i thinking wrong here or what is the deal? ;) Thanks

    Read the article

< Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >