Search Results

Search found 339 results on 14 pages for 'keith larson'.

Page 9/14 | < Previous Page | 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Regular expression to match empty HTML tags that may contain embedded JSTL?

    - by Keith Bentrup
    I'm trying to construct a regular expression to look for empty html tags that may have embedded JSTL. I'm using Perl for my matching. So far I can match any empty html tag that does not contain JSTL with the following? /<\w+\b(?!:)[^<]*?>\s*<\/\w+/si The \b(?!:) will avoid matching an opening JTSL tag but that doesn't address the whether JSTL may be within the HTML tag itself (which is allowable). I only want to know if this HTML tag has no children (only whitespace or empty). So I'm looking for a pattern that would match both the following: <div id="my-id"> </div> <div class="<c:out var="${my.property}" />"></div> Currently the first div matches. The second does not. Is it doable? I tried several variations using lookahead assertions, and I'm starting to think it's not. However, I can't say for certain or articulate why it's not. Edit: I'm not writing something to interpret the code, and I'm not interested in using a parser. I'm writing a script to point out potential issues/oversights. And at this point, I'm curious, too, to see if there is something clever with lookaheads or lookbehinds that I may be missing. If it bothers you that I'm trying to "solve" a problem this way, don't think of it as looking for a solution. To me it's more of a challenge now, and an opportunity to learn more about regular expressions. Also, if it helps, you can assume that the html is xhtml strict.

    Read the article

  • Getting PDT code completion to recognise runtime return types from base class?

    - by Keith Humm
    Hi guys, I've got an abstract base class: abstract class BaseClass { /** * @return CLASSNAME */ public function fluent() { // do stuff return $this; } } Generally, i would put BaseClass where CLASSNAME is and all would be fine, PDT would pick up the phpdoc return type and happily autocomplete. Until, that is, I subclass BaseClass and add additional methods, and code compete on an instance of the derived class. PDT will only recognise the methods from BaseClass and not those from the derived class. What I need is something like @return self or @return this. Does PDT have such functionality? Or is there an alternate trick without having to declare these methods in every derived class?

    Read the article

  • Complex Selectors with jQuery Delegate

    - by Keith Rousseau
    Is there a restriction on the complexity of selectors that can be used with delegate in jQuery 1.4.2? This works for me: $('.activeTabsList').delegate('.activeTabsListItem', 'click', function() { alert('here'); }); This does not work: $('.activeTabsList').delegate('.activeTabsListItem:not(.selected)', 'click', function() { alert('here'); }); As you can probably assume, there is only 1 item at a time that has the selected class. When I click the other tabs, my delegate handler is still not fired.

    Read the article

  • 3D Screensaver interfering with WPF application (Windows XP)

    - by Andrew Keith
    I have a fairly large application that uses WPF for its user interface. I recently found an unusual defect regarding 3D screensavers. The 3D screensavers 3D FlowerBox,3D Flying Objects,3D Pipes,3D Text causes 1 of my WPF windows to disappear when the screensaver activates. Other screensavers are fine. My application only encounters this problem on Windows XP. I have some experience with DirectX. When a 3D screensavers activates, the d3d device context will be switched to exclusive mode. I reckon that WPF has trouble restoring the device context when the device switches back to cooperative mode (hence why its only affecting windows XP) Has anyone seen such a scenario occur before ? Is there a remedy for the problem ? Windows XP SP3, DirectX 9.0c, .NET 3.5

    Read the article

  • Spring MVC 3.0: Avoiding explicit JAXBElement<> wrapper in method arg

    - by Keith Myers
    I have the following method and want to avoid having to explicitly show the JAXBElement< syntax. Is there some sort of annotation that would allow the method to appear to accept raw MessageResponse objects but in actuality work the same as shown below? I'm not sure how clear that was so I'll say this: I'm looking for some syntactic sugar :) @ServiceActivator public void handleMessageResponse(JAXBElement<MessageResponse> jaxbResponse) { MessageResponse response = jaxbResponse.getValue(); MessageStatus status = messageStatusDao.getByStoreIdAndMessageId(response.getStoreId(), response.getMessageId()); status.setStatusTimestamp(response.getDate()); status.setStatus("Complete"); }

    Read the article

  • How do I get the number of objects per day using django?

    - by Keith
    I have a django model with a DateTimeField. class Point(models.Model): somedata = models.CharField(max_length=256) time = models.DateTimeField() I want to get a count of the number of these objects for each day. I can do this with the following SQL query, but don't know how to do it through django. SELECT DATE(`time`), Count(*) FROM `app_point` GROUP BY DATE(`time`) Being able to restrict the results to a date range would also be good.

    Read the article

  • ASP.NET 1.0 site error after upgrade to VS.NET 2010

    - by Keith
    Help. I installed VS.NET 2010 and now my existing ASP.NET MVC application won't run. I checked that the 1.0 version of System.Web.Mvc is still referenced but when I browse my application, I get an error like this: "Compiler Error Message: CS1579: foreach statement cannot operate on variables of type 'object' because 'object' does not contain a public definition for 'GetEnumerator'". My partial view has this declaration: <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<List<ProductModel" %> //various import statements <div <% foreach (var category in Model.Categories) { % <span<%= category.Name %</span <span<%= category.Market%</span <% } % </div For what it's worth, the source view shows ViewUserControl in red and gives a tool tip reading "Cannot resolve symbol 'ViewUserControl'". My working code didn't change, the only delta is that I upgraded to VS.NET 2010 (which includes MVC 2.0); I'm sure something is not referenced correctly but I cannot figure out what's going on.

    Read the article

  • Script or automate feature class creation in ESRI/ArcSDE

    - by Keith G
    I'm looking for info on how to write SQL scripts to automate the creation of a versioned feature class in ArcSDE I want to be able to automate the process itself as well as put the scripts under version control. Can anyone point me to a resource that explains how to do this? Is this even possible? It seems like there are lots of interrelationships between tables and data when a feature class is added. P.S. It doesn't have to be pure SQL, but it should be some kind of scripting so we can save to version control and run outside of ESRI desktop tools.

    Read the article

  • Nhibernate 3.0 and FluentNHibernate

    - by Keith Nicholas
    is anyone building the truck NHibernate and FluentNhibernate together? How's it working? are you using it for production systems? How is the Linq support? Is it nearly ready for release? Is there a nice and concise way to keep up to date with what is going on in the world of NHibernate? (ie, without having to read lots of blogs, and mailing lists )

    Read the article

  • HTTP caching confusion

    - by Keith
    I'm not sure whether this is a server issue, or whether I'm failing to understand how HTTP caching really works. I have an ASP MVC application running on IIS7. There's a lot of static content as part of the site including lots of CSS, Javascript and image files. For these files I want the browser to cache them for at least a day - our .css, .js, .gif and .png files rarely change. My web.config goes like this: <system.webServer> <staticContent> <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="1.00:00:00" /> </staticContent> </system.webServer> The problem I'm getting is that the browser (tested Chrome, IE8 and FX) doesn't seem to be caching the files as I'd expect. I've got the default settings (check for newer pages automatically in IE). On first visit the content downloads as expected HTTP/1.1 200 OK Cache-Control: max-age=86400 Content-Type: image/gif Last-Modified: Fri, 07 Aug 2009 09:55:15 GMT Accept-Ranges: bytes ETag: "3efeb2294517ca1:0" Server: Microsoft-IIS/7.0 X-Powered-By: ASP.NET Date: Mon, 07 Jun 2010 14:29:16 GMT Content-Length: 918 <content> I think that the Cache-Control: max-age=86400 should tell the browser not to request the page again for a day. Ok, so now the page is reloaded and the browser requests the image again. This time it gets an empty response with these headers: HTTP/1.1 304 Not Modified Cache-Control: max-age=86400 Last-Modified: Fri, 07 Aug 2009 09:55:15 GMT Accept-Ranges: bytes ETag: "3efeb2294517ca1:0" Server: Microsoft-IIS/7.0 X-Powered-By: ASP.NET Date: Mon, 07 Jun 2010 14:30:32 GMT So it looks like the browser has sent the ETag back (as a unique id for the resource), and the server's come back with a 304 Not Modified - telling the browser that it can use the previously downloaded file. It seems to me that would be correct for many caching situations, but here I don't want the extra round trip. I don't care if the image gets out of date when the file on the server changes. There are a lot of these files (even with sprite-maps and the like) and many of our clients have very slow networks. Each round trip to ping for that 304 status is taking about a 10th to a 5th of a second. Many also have IE6 which only has 2 HTTP connections at a time. The net result is that our application appears to be very slow for these clients with every page taking an extra couple of seconds to check that the static content hasn't changed. What response header am I missing that would cause the browser to aggressively cache the files? How would I set this in a .Net web.config for IIS7? Am I misunderstanding how HTTP caching works in the first place?

    Read the article

  • Must .aspx files have a page directive?

    - by Keith Bloom
    Around 90% of the pages for our websites have no .Net code embedded in them yet are published as .aspx files. I want these to render as fast as possible so I'm removing as much as I can. Does the .Net page directive have an impact on performance? I am thinking about two factors; the page speed for each GET and what happens when the file changes. The CMS system re-creates each page daily and I'm wondering if this triggers the ASP.Net compilation process.

    Read the article

  • How do I tell if an action is a lambda expression?

    - by Keith
    I am using the EventAgregator pattern to subscribe and publish events. If a user subscribes to the event using a lambda expression, they must use a strong reference, not a weak reference, otherwise the expression can be garbage collected before the publish will execute. I wanted to add a simple check in the DelegateReference so that if a programmer passes in a lambda expression and is using a weak reference, that I throw an argument exception. This is to help "police" the code. Example: eventAggregator.GetEvent<RuleScheduler.JobExecutedEvent>().Subscribe ( e => resetEvent.Set(), ThreadOption.PublisherThread, false, // filter event, only interested in the job that this object started e => e.Value1.JobDetail.Name == jobName ); public DelegateReference(Delegate @delegate, bool keepReferenceAlive) { if (@delegate == null) throw new ArgumentNullException("delegate"); if (keepReferenceAlive) { this._delegate = @delegate; } else { //TODO: throw exception if target is a lambda expression _weakReference = new WeakReference(@delegate.Target); _method = @delegate.Method; _delegateType = @delegate.GetType(); } } any ideas? I thought I could check for @delegate.Method.IsStatic but I don't believe that works... (is every lambda expression a static?)

    Read the article

  • window.setInterval from inside an object

    - by Keith Rousseau
    I'm currently having an issue where I have a javascript object that is trying to use setInterval to call a private function inside of itself. However, it can't find the object when I try to call it. I have a feeling that it's because window.setInterval is trying to call into the object from outside but doesn't have a reference to the object. FWIW - I can't get it to work with the function being public either. The basic requirement is that I may need to have multiple instances of this object to track multiple uploads that are occurring at once. If you have a better design than the current one or can get the current one working then I'm all ears. The following code is meant to continuously ping a web service to get the status of my file upload: var FileUploader = function(uploadKey) { var intervalId; var UpdateProgress = function() { $.get('someWebService', {}, function(json) { alert('success'); }); }; return { BeginTrackProgress: function() { intervalId = window.setInterval('UpdateProgress()', 1500); }, EndTrackProgress: function() { clearInterval(intervalId); } }; }; This is how it is being called: var fileUploader = new FileUploader('myFileKey'); fileUploader.BeginTrackProgress();

    Read the article

  • Left/Right/Inner joins using C# and LINQ

    - by Keith Barrows
    I am trying to figure out how to do a series of queries to get the updates, deletes and inserts segregated into their own calls. I have 2 tables, one in each of 2 databases. One is a Read Only feeds database and the other is the T-SQL R/W Production source. There are a few key columns in common between the two. What I am doing to setup is this: List<model.AutoWithImage> feedProductList = _dbFeed.AutoWithImage.Where(a => a.ClientID == ClientID).ToList(); List<model.vwCompanyDetails> companyDetailList = _dbRiv.vwCompanyDetails.Where(a => a.ClientID == ClientID).ToList(); foreach (model.vwCompanyDetails companyDetail in companyDetailList) { List<model.Product> productList = _dbRiv.Product.Include("Company").Where(a => a.Company.CompanyId == companyDetail.CompanyId).ToList(); } Now that I have a (source) list of products from the feed, and an existing (target) list of products from my prod DB I'd like to do 3 things: Find all SKUs in the feed that are not in the target Find all SKUs that are in both, that are active feed products and update the target Find all SKUs that are in both, that are inactive and soft delete from the target What are the best practices for doing this without running a double loop? Would prefer a LINQ 4 Objects solution as I already have my objects. EDIT: BTW, I will need to transfer info from feed rows to target rows in the first 2 instances, just set a flag in the last instance. TIA

    Read the article

  • ASP.Net: Finding the cause of OutOfMemoryExpcetions

    - by Keith Bloom
    I trying to track down the cause of an OutOfMemory for a website. This site has ~12,000 .aspx pages and the last time it crashed I captured a memory dump using adplus. After some investigation I found a lot of heap fragmentation, there are around 100MB of Free blocks which can't be assigned. Digging deeper one of the Large Object Heaps is fragmented and the causes seems to be String interning as described [here][1] Could this be caused by the number of pages in the site? As they are all compiled they sit in memory and by looking at the dump they are interned and PINNED which I think means they stick around for a while. I would find this odd as there are many sites with more pages, but dynamic compilation could account for the growth in memory. What other methods are there for finding the cause of the memory leak? I have tried to capture a dump using adplus in hang mode but this fails and the IIS worker process get recycled. [1]: • http://stackoverflow.com/questions/686950/large-object-heap-fragmentation

    Read the article

  • C# - Cannot implicitly convert type List<Product> to List<IProduct>

    - by Keith Barrows
    I have a project with all my Interface definitions: RivWorks.Interfaces I have a project where I define concrete implmentations: RivWorks.DTO I've done this hundreds of times before but for some reason I am getting this error now: Cannot implicitly convert type 'System.Collections.Generic.List<RivWorks.DTO.Product>' to 'System.Collections.Generic.List<RivWorks.Interfaces.DataContracts.IProduct>' Interface definition (shortened): namespace RivWorks.Interfaces.DataContracts { public interface IProduct { [XmlElement] [DataMember(Name = "ID", Order = 0)] Guid ProductID { get; set; } [XmlElement] [DataMember(Name = "altID", Order = 1)] long alternateProductID { get; set; } [XmlElement] [DataMember(Name = "CompanyId", Order = 2)] Guid CompanyId { get; set; } ... } } Concrete class definition (shortened): namespace RivWorks.DTO { [DataContract(Name = "Product", Namespace = "http://rivworks.com/DataContracts/2009/01/15")] public class Product : IProduct { #region Constructors public Product() { } public Product(Guid ProductID) { Initialize(ProductID); } public Product(string SKU, Guid CompanyID) { using (RivEntities _dbRiv = new RivWorksStore(stores.RivConnString).NegotiationEntities()) { model.Product rivProduct = _dbRiv.Product.Where(a => a.SKU == SKU && a.Company.CompanyId == CompanyID).FirstOrDefault(); if (rivProduct != null) Initialize(rivProduct.ProductId); } } #endregion #region Private Methods private void Initialize(Guid ProductID) { using (RivEntities _dbRiv = new RivWorksStore(stores.RivConnString).NegotiationEntities()) { var localProduct = _dbRiv.Product.Include("Company").Where(a => a.ProductId == ProductID).FirstOrDefault(); if (localProduct != null) { var companyDetails = _dbRiv.vwCompanyDetails.Where(a => a.CompanyId == localProduct.Company.CompanyId).FirstOrDefault(); if (companyDetails != null) { if (localProduct.alternateProductID != null && localProduct.alternateProductID > 0) { using (FeedsEntities _dbFeed = new FeedStoreReadOnly(stores.FeedConnString).ReadOnlyEntities()) { var feedProduct = _dbFeed.AutoWithImage.Where(a => a.ClientID == companyDetails.ClientID && a.AutoID == localProduct.alternateProductID).FirstOrDefault(); if (companyDetails.useZeroGspPath.Value || feedProduct.GuaranteedSalePrice > 0) // kab: 2010.04.07 - new rules... PopulateProduct(feedProduct, localProduct, companyDetails); } } else { if (companyDetails.useZeroGspPath.Value || localProduct.LowestPrice > 0) // kab: 2010.04.07 - new rules... PopulateProduct(localProduct, companyDetails); } } } } } private void PopulateProduct(RivWorks.Model.Entities.Product product, RivWorks.Model.Entities.vwCompanyDetails RivCompany) { this.ProductID = product.ProductId; if (product.alternateProductID != null) this.alternateProductID = product.alternateProductID.Value; this.BackgroundColor = product.BackgroundColor; ... } private void PopulateProduct(RivWorks.Model.Entities.AutoWithImage feedProduct, RivWorks.Model.Entities.Product rivProduct, RivWorks.Model.Entities.vwCompanyDetails RivCompany) { this.alternateProductID = feedProduct.AutoID; this.BackgroundColor = Helpers.Product.GetCorrectValue(RivCompany.defaultBackgroundColor, rivProduct.BackgroundColor); ... } #endregion #region IProduct Members public Guid ProductID { get; set; } public long alternateProductID { get; set; } public Guid CompanyId { get; set; } ... #endregion } } In another class I have: using dto = RivWorks.DTO; using contracts = RivWorks.Interfaces.DataContracts; ... public static List<contracts.IProduct> Get(Guid companyID) { List<contracts.IProduct> myList = new List<dto.Product>(); ... Any ideas why this might be happening? (And I am sure it is something trivially simple!)

    Read the article

  • TFS2010 - How can you change the "State" for a Task?

    - by Keith Barrows
    We are using Tasks to track individual development items and the "out of the box" configuration gives us only 2 states - Active and Closed. We would like to change it to: Assigned In Development In Test Ready for Production Closed (In Production) Any ideas on how to accomplish this? We've been through everything in the Admin site. I fine changing it in the DB if necessary but am not sure what should be changed - or if it is even in the DB. TIA

    Read the article

  • Using PLINQ to calculate and update values within the enclosure does not work

    - by Keith
    I recently needed to do a running total on a report. Where for each group, I order the rows and then calculate the running total based on the previous rows within the group. Aha! I thought, a perfect use case for PLINQ! However, when I wrote up the code, I got some strange behavior. The values I was modifying showed as being modified when stepping through the debugger, but when they were accessed they were always zero. Sample Code: class Item { public int PortfolioID; public int TAAccountID; public DateTime TradeDate; public decimal Shares; public decimal RunningTotal; } List<Item> itemList = new List<Item> { new Item { PortfolioID = 1, TAAccountID = 1, TradeDate = new DateTime(2010, 5, 1), Shares = 5.335m, }, new Item { PortfolioID = 1, TAAccountID = 1, TradeDate = new DateTime(2010, 5, 2), Shares = -2.335m, }, new Item { PortfolioID = 2, TAAccountID = 1, TradeDate = new DateTime(2010, 5, 1), Shares = 7.335m, }, new Item { PortfolioID = 2, TAAccountID = 1, TradeDate = new DateTime(2010, 5, 2), Shares = -3.335m, }, }; var found = (from i in itemList where i.TAAccountID == 1 select new Item { TAAccountID = i.TAAccountID, PortfolioID = i.PortfolioID, Shares = i.Shares, TradeDate = i.TradeDate, RunningTotal = 0 }); found.AsParallel().ForAll(x => { var prevItems = found.Where(i => i.PortfolioID == x.PortfolioID && i.TAAccountID == x.TAAccountID && i.TradeDate <= x.TradeDate); x.RunningTotal = prevItems.Sum(s => s.Shares); }); foreach (Item i in found) { Console.WriteLine("Running total: {0}", i.RunningTotal); } Console.ReadLine(); If I change the select for found to be .ToArray(), then it works fine and I get calculated reuslts. Any ideas what I am doing wrong?

    Read the article

  • How to visually represent file size

    - by Keith Williams
    This will be a bit subjective, I'm afraid, but I'd value the advice of the Collective. Our web application lists documents that users can download; standard file navigator stuff: Type Name Created Size ----------------------------------- PDF Doc 1 01/04/2010 15 KB PDF Doc 2 01/04/2010 15 MB Currently we list the file size as text, but I'd like to improve this by having some way of showing visually whether the file is tiny, normal or huge. The reason for this is so that users can scan the list quickly and spot files that are likely to take a long time downloading. My options currently are: Bigger font sizes for bigger files (drawback: the layout can become untidy) Icons (like a wi-fi signal strength indicator; drawback: harder to scan) Keep all sizes in KB so the number of zeroes indicates size (drawback: users have to calculate the "friendly" size in their heads) I know this is quite a minor thing, but I'd appreciate anyone's thoughts on the matter!

    Read the article

  • How do you update the server name in source indexed symbol file?

    - by Keith Hill
    With the Debugging Tools for Windows you can run SSIndex.cmd against your symbol files and it will embed the command to retrieve each source code file from the TF server. We have a bunch of indexed files and recently our IT migrated our TFS 2008 installation to TFS 2010 and in the process changed the server name. Question is, how can I update all these symbol files to point to the new server? I thought SSindex used an alternate data stream named 'srcsrv' but SysInternals' streams.exe shows nothing on these symbol files even though srctool.exe shows the data.

    Read the article

< Previous Page | 5 6 7 8 9 10 11 12 13 14  | Next Page >