Search Results

Search found 1256 results on 51 pages for 'eric stanton'.

Page 40/51 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • Tomcat 6 thread safe email queue (javax.mail.*)

    - by Eric V
    Hi I have design/architecture question. I would like to send emails from one of my jsp pages. I have one particular issue that has been a little bit of a problem. there is an instance where one of the pages will need to send around 50 emails at near the same time. I would like the messages sent to a queue where a background thread will actually do the email sending. What is the appropriate way to solve this problem? If you know of a tutorial, example code or tomcat configuration is needed please let me know. Thanks,

    Read the article

  • Large Product catalog with statistics - alternatives to Sql Server?

    - by Eric P
    I am building UI for a large product catalog (millions of products). I am using Sql Server, FreeText search and ASP.NET MVC. Tables are normalized and indexed. Most queries take less then a second to return. The issue is this. Let's say user does the search by keyword. On search results page I need to display/query for: First 20 matching products (paged, sorted) Total count of matching products for paging List of stores only of matching products List of brands only of matching products List of colors only of matching products Each query takes about .5 to 1 seconds. Altogether it is like 5 seconds. I would like to get the whole page to load under 1 second. There are several approaches: Optimize queries even more. I already spent a lot of time on this one, so not sure it can be pushed further. Load products first, then load the rest of the information using AJAX. More like a workaround. Will need to revise UI. Re-organize data to be more Report friendly. Already aggregated a lot of fields. I checked out several similar sites. For ex. zappos.com. Not only they display the same information as I would like in under 1 second, but they also include statistics (number of results in each category). The following is the search for keyword "white" http://www.zappos.com/white How do sites like zappos, amazon make their results, filters and stats appear almost instantly?

    Read the article

  • How can I strip line breaks from my XML with XSLT?

    - by Eric
    I have this XSLT: <xsl:strip-space elements="*" /> <xsl:template match="math"> <img class="math"> <xsl:attribute name="src">http://latex.codecogs.com/gif.latex?<xsl:value-of select="text()" /></xsl:attribute> </img> </xsl:template> Which is being applied to this XML (notice the line break): <math>\text{average} = \alpha \times \text{data} + (1-\alpha) \times \text{average}</math> Unfortunately, the transform creates this: <img class="math" src="http://latex.codecogs.com/gif.latex?\text{average} = \alpha \times \text{data} + (1-\alpha) \times&#10;&#9;&#9;&#9;&#9;&#9;\text{average}" /> Notice the whitespace character literals. Although it works, it's awfully messy. How can I prevent this?

    Read the article

  • phrase split algorithm in PHP

    - by Eric Sim
    Not sure how to explain. Let's use an example. Say I want to split the sentence "Today is a great day." into today today is today is a today is a great today is a great day is is a is a great is a great day a a great a great day great great day day The idea is to get all the sequential combination in a sentence. I have been thinking what's the best way to do it in PHP. Any idea is welcome.

    Read the article

  • How do I use Haml in a view in my new plugin?

    - by Eric
    I'm creating a new plugin for a jruby on rails application that will eventually be turned into a gem. Inside my plugin I have controllers, helpers and views. For my views I'd like to use Haml. The problem is that I can't seem to get it to recognize that they are haml templates. Is it even possible to do this? Is there a way for a plugin to have Haml as a dependency for its view? And by that I mean, I intend for the plugin that I'm creating to have a view created by the plugin, that can be used by the application developer. for example: vendor/ plugins/ my_plugin/ lib/ app/ views/ my_plugin_demo/ index.haml.html controllers/ my_plugin_demo_controller.rb helpers/ In my plugin's init.rb, I tried: require 'my_plugin' require 'haml' #doesn't seem to make a difference :( but that didn't seem to make any difference. Has anybody had any experience with this? I can't seem to find any documentation on how to make this work. Are plugin views restricted to .erb templates?

    Read the article

  • What's the name of the storage paradigm that uses cubes subdivided into 8 smaller cubes ad infinitum?

    - by Eric
    If I have a cube divided into 8 smaller cubes, each of which may be subdivided into a further 8 cubes, ad infinitum, what is the name of my system? I know that it's a special case of a tree, where each brance contains exactly 8 other leaves/branches. I remember the name starting with "Oct", and there was a wikipedia article on it, but I honestly can't find it! Does anyone know what such a data structure is actually known as?

    Read the article

  • UIViewController maintains state after being nilled

    - by Eric
    In my app, I made a BookViewController class that displays and animates the pages of a book and a MainMenuViewController class that displays a set of books the user can read. In the latter class, when the user taps on one of the books, a function is called that should create a completely new instance of BookViewController, but for some reason the instance maintains its state (i.e. it resumes from the page the user left off). How can this be if I set it to nil? What am I missing here? (Note that I'm using ARC). MainMenuViewController.m @interface MainMenuViewController () @property (strong) BookViewController *bookViewController; @end @implementation MainMenuViewController @synthesize bookViewController; -(void)bookTapped:(UIButton *)sender{ NSString *bookTitle; if(sender == book1button) bookTitle = @"book1"; else if(sender == book2button) bookTitle = @"book2"; bookViewController = nil; bookViewController = [[BookViewController alloc] initWithBookTitle:bookTitle]; [self presentViewController:bookViewController animated:YES completion:nil]; } BookViewController.h @interface BookViewController : UIViewController -(id)initWithBookTitle:(NSString *)bookTitle; @end BookViewController.m @implementation BookViewController -(id)initWithBookTitle:(NSString *)theBookTitle{ self = [super init]; if(self){ bookTitle = [NSString stringWithFormat:@"%@", theBookTitle]; [self setModalTransitionStyle:UIModalTransitionStyleCrossDissolve]; NSLog(@"init a BookViewController with bookTitle: %@", bookTitle); } return self; } Every time a book is tapped, bookTapped: is called, and thee console always prints: 2012-08-31 16:29:51.750 AppName[25713:c07] init a BookViewController with bookTitle: book1 So if a new instance of BookViewController is being created, how come it seems to be returning the old one?

    Read the article

  • Help me understand why page sizes are a power of 2?

    - by eric
    Answer I need help with is: Recall that paging is implemented by breaking up an address into a page and offset number. It is most efficient to break the address into X page bits and Y offset bits, rather than perform arithmetic on the address to calculate the page number and offset. Because each bit position represents a power of 2, splitting an address between bits results in a page size that is a power of 2. i don't quite understand this answer, can anyone give a simpler explanation?

    Read the article

  • Save objects to a database?

    - by Eric
    So far in my .Net coding adventures I've only had a need to save information to files. So I've used XmlSerializer and DataContractSerializer to serialize attributed classes to XML files. My next project, however, requires that I save and retrieve information from a SQL server database. I'm wondering what my options are for doing this. The current version of the app, which was not created by me, uses a lot of hard coded SQL commands. But now I'm trying to avoid doing anything where I have to read or write individual fields to or from the database or objects. I especially want to avoid a lot of hard coded SQL in my code. I like how the serializer classes just figure out how to read and write XML files based on the attributes and or public properties of the class. Is there something similar for a database rather then XML?

    Read the article

  • Printing python tkinter output

    - by Eric
    I am trying to print the contents of a python tkinter canvas. I have tried using the postscript method of canvas to create a postscript file, but I get a blank page. I know this is because I have embedded widgets, and these do not get rendered by the postscript method. Before I rewrite my program to create a more printer-friendly layout, can someone suggest a way to approach this problem? All of the programming books I have ever read approach the problem of sending output to a printer with a bit of hand-waving, something along the lines of: "It's a difficult problem that depends on interacting with the operating system." I also have a hard time finding resources about this because of all the pages related to printing to the screen. I am using Python 2.6, on Ubuntu 9.04.

    Read the article

  • Adding functions to Java class libraries

    - by Eric
    I'm using a Java class library that is in many ways incomplete: there are many classes that I feel ought to have additional member functions built in. However, I am unsure of the best practice of adding these member functions. Lets call the insufficient base class A. class A { public A(/*long arbitrary arguments*/) { //... } public A(/*long even more arbitrary arguments*/) { //... } public int func() { return 1; } } Ideally, I would like to add a function to A. However, I can't do that. My choice is between: class B extends A { //Implement ALL of A's constructors here public int reallyUsefulFunction() { return func()+1; } } and class AddedFuncs { public int reallyUsefulFunction(A a) { return a.func()+1; } } The way I see it, they both have advantages and disadvantages. The first choice gives a cleaner syntax than the second, and is more logical, but has problems: Let's say I have a third class, C, within the class library. class C { public A func() { return new A(/*...*/); } } As I see it, there is no easy way of doing this: C c; int useful = c.func().reallyUsefulFunction(); as the type returned by C.func() is an A, not a B, and you can't down-cast. So what is the best way of adding a member function to a read-only library class?

    Read the article

  • Case Statements versus coded if statements

    - by Eric
    What is more efficient - handling with case statements in sql or handling the same data using if statements in code. I'm asking because my colleague has a huge query that has many case statements. I advised her to take stress off of the DB by coding the case statements. I've found that it is more efficient...but why?

    Read the article

  • What is the most efficient way to use Core Data?

    - by Eric
    I'm developing an iPad application using Core Data, and was hoping someone could clarify something about Core Data. Right now, I populate my table by making a fetch request for all of my data in viewDidLoad. I'd rather make individual fetch requests in my tableView:cellForRowAtIndexPath:. Can anyone tell me which is more efficient, and why? In other words, is it much less efficient to make lots of small requests as opposed to one big request?

    Read the article

  • How do I detect the directory a php file is in

    - by Eric
    I have a PHP file that I need it to detect it's directory it's in. In my case I want it to return C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\ I think that this is pretty straightforward but if there is something you don't understand just comment

    Read the article

  • Need one login for two different sites

    - by Eric
    I am tasked to create a web site using Django. It will be a 'sister' site to an existing Plone site. The same Apache instance will be the front end to the sites which allows me to use the same domain name. However, the owners want the users to be able to log into one and still be logged into the other one. How can this be accomplished? Thanks! :)

    Read the article

  • Why wont this simple code work all of a sudden?

    - by eric
    Why wont this print "success" when i submit the form?!?! Im pretty sure it should work. <?php if (count($_POST) > 0) { echo "success!!"; } ?> <form method="post" enctype="multipart/form-data"> <input type="file" name="userfile" /> <input type="submit" value="upload" /> </form>

    Read the article

  • Should Javascript's "for in" construct iterate the length property?

    - by Eric
    I'm making a bookmarklet, but I've encountered some wierd behaviour in IE8. The code causing the problem is this: var els = document.getElementById("my_id").getElementsByTagName("*"); for(var i in els) { alert(i+","+els[i]) } The first thing that is alerted is "length, n". This isn't the case in chrome: just in IE8. Interestingly, it seems to behave differently depending on whether the code goes in the console/address bar or the page itself. Is this standard behaviour?

    Read the article

  • CSS grammar not work under IE

    - by Eric
    The CSS Grammer as following works well under firefox but doesn't work under IE browser,Why and how to let the css only be affect on the elemnts directly under the parent element? CSS: div{font:18px} .boxdivdiv{font:12px;} -------------------------- -- HTML: level1 level2 level3 level3 level2 level3 level3

    Read the article

  • How to display the found matches of preg_match function in PHP?

    - by Eric
    I am using the following to check if links exist on file.php: $fopen = fopen('file.php', 'r'); $fread = fread($fopen, filesize('file.php')); $pattern = "/^<a href=/i"; if (preg_match($pattern, $fread)) { echo 'Match Found'; } else { echo 'Match Not Found'; } if I echo preg_match($pattern, $fread) I get a boolean value, not the found matches. I tried what was on the php.net manual and did this: preg_match($pattern, $fread, $matches); then when I echoed $matches I got "Array" message. So I tried a foreach loop and when that didn't display anything I tried $matches[0] and that too outputted nothing. So how does one go about displaying the matches found?

    Read the article

  • Why can't I pass a form field of type file to a CFFUNCTION using structure syntax?

    - by Eric Belair
    I'm trying to pass a form field of type "file" to a CFFUNCTION. The argument type is "any". Here is the syntax I am trying to use (pseudocode): <cfloop from="1" to="5" index="i"> <cfset fieldname = "attachment" & i /> <cfinvoke component="myComponent" method="attachFile"> <cfinvokeargument name="attachment" value="#FORM[fieldname]#" /> </cfinvoke> </cfloop> The loop is being done because there are five form fields named "attachment1", "attachment2", et al. This throws an exception in the function: coldfusion.tagext.io.FileTag$FormFileNotFoundException: The form field C:\ColdFusion8\...\neotmp25080.tmp did not contain a file. However, this syntax DOES work: <cfloop from="1" to="5" index="i"> <cfinvoke component="myComponent" method="attachFile"> <cfinvokeargument name="attachment" value="FORM.attachment#i#" /> </cfinvoke> </cfloop> I don't like writing code like that in the second example. It just seems like bad practice to me. So, can anyone tell me how to use structure syntax to properly pass a file type form field to a CFFUNCTION??

    Read the article

  • Dealing with whitespace in SVN?

    - by Eric the Red
    All of the SVN shops I've worked in have a strict rule - replace all tabs with spaces, to avoid whitespace conflicts and variations of tabs in different editors. Is this a very common standard? Does it really make a huge difference, and is it worth the trouble to push this standard to a group of developers new to SVN?

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >