Search Results

Search found 3484 results on 140 pages for 'chris dubois'.

Page 96/140 | < Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >

  • jquery hover propagation

    - by Chris
    I'm using this on an hover image : $('.img-style').hover (function(e) { var prixPlus = $(this).closest('a').attr('data-prix'); prixPlus = parseFloat(prixPlus); var prixNew = prix + prixPlus; $('#chgePrix').html(prixNew.toFixed(2)); $('#txtapart').fadeTo('fast', 0.1); }, function(e) { $('#chgePrix').html(prix.toFixed(2)); $('#txtapart').fadeTo('fast', 1); }); But if I pass quickly the mouse 2 or more times over the image, $('#txtapart') fade in and out 2 or more times ! How can I stop the fade propagation ? Thanks for your help...

    Read the article

  • Why does Flash Builder 4 use Flash Player instead of a browser to run apps?

    - by Chris R
    I've got an old flex builder 3 project that I imported into Flash Builder 4, and I want this project to run its web applications in my web browser. However, the apps persistently run in the Flash Player instead. This is causing no end of problems because of the flash player bug documented at https://bugs.adobe.com/jira/browse/FP-209. How can I make a project's apps run in the browser instead of the player?

    Read the article

  • Rails routes and model woes

    - by Chris Maness
    I'm a little new to rails sorry if this seems basic Alright so here's the deal I'm creating an application that will have many users and all the users have many songs. However when I try to create a song I get the following error:No action responded to 1. Actions: create and new and my browser is at the url: http://0.0.0.0:3000/users/1/songs which is not the correct route it should have redirected to songs/create Here is my controller code: class SongsController < ApplicationController def index @user = current_user @songs = @user.songs end def new @user = current_user @song = @user.songs.build end def create @user = current_user @song = @user.songs.build(params[:song]) if @song.save redirect_to user_song_url(@user, @song) else render :action => "new" end end end If anyone can help I would greatly appreciate it.

    Read the article

  • Speed of NSScanner vs NSXMLParser?

    - by Chris
    I have an iPhone App that reads in an XML file, then pulls out the necessary data by looping through an NSScanner. The XML is not particularly long. I am wondering if it would be worth the work to implement NSXMLParser in place of using NSScanner, if I will see any real improvement in speed?

    Read the article

  • Why are my connections not closed even if I explicitly dispose of the DataContext?

    - by Chris Simpson
    I encapsulate my linq to sql calls in a repository class which is instantiated in the constructor of my overloaded controller. The constructor of my repository class creates the data context so that for the life of the page load, only one data context is used. In my destructor of the repository class I explicitly call the dispose of the DataContext though I do not believe this is necessary. Using performance monitor, if I watch my User Connections count and repeatedly load a page, the number increases once per page load. Connections do not get closed or reused (for about 20 minutes). I tried putting Pooling=false in my config to see if this had any effect but it did not. In any case with pooling I wouldn't expect a new connection for every load, I would expect it to reuse connections. I've tried putting a break point in the destructor to make sure the dispose is being hit and sure enough it is. So what's happening? Some code to illustrate what I said above: The controller: public class MyController : Controller { protected MyRepository rep; public MyController () { rep = new MyRepository(); } } The repository: public class MyRepository { protected MyDataContext dc; public MyRepository() { dc = getDC(); } ~MyRepository() { if (dc != null) { //if (dc.Connection.State != System.Data.ConnectionState.Closed) //{ // dc.Connection.Close(); //} dc.Dispose(); } } // etc } Note: I add a number of hints and context information to the DC for auditing purposes. This is essentially why I want one connection per page load

    Read the article

  • jquery cycle plugin using RSS feed images?

    - by Chris
    This could well be a terribly ignorant question, if so please forgive me: I'm using jquery cycle plugin to create an image rotator of recently posted images. Im using drupal 6.x and created an RSS feed of the recent images using the views module. I have no idea how to connect the two. Any suggestions? I have a feeling an RSS feed might not be the best way to go about this, but it's all I could come up with. Thanks for the help.

    Read the article

  • Finding matches between multiple JavaScript Arrays

    - by Chris Barr
    I have multiple arrays with string values and I want to compare them and only keep the matching results that are identical between ALL of them. Given this example code: var arr1 = ['apple', 'orange', 'banana', 'pear', 'fish', 'pancake', 'taco', 'pizza']; var arr2 = ['taco', 'fish', 'apple', 'pizza']; var arr3 = ['banana', 'pizza', 'fish', 'apple']; I would like to to produce the following array that contains matches from all given arrays: ['apple', 'fish', 'pizza'] I know I can combine all the arrays with var newArr = arr1.concat(arr2, arr3); but that just give me an array with everything, plus the duplicates. Can this be done easily without needing the overhead of libraries such as underscore.js? (Great, and now i'm hungry too!) EDIT I suppose I should mention that there could be an unknown amount of arrays, I was just using 3 as an example.

    Read the article

  • asp.net web app - writing data to access or error logs?

    - by chris
    I'm looking for a quick way to log some data - I seem to remember a way to write to the access log, similar to System.Out.Println() but I can't seem to remember how to do it. I can't attach a debugger, nor can I add additional information to the web app via Response.Write(). Is there a simple way - a single statement with no configuration changes would be ideal - to write to either the error or access logs?

    Read the article

  • Should my internal API classes be all in one package?

    - by Chris
    I'm hard at work packaging up an API for public consumption. As such I'm trying to limit the methods that are exposed to only those that I wish to be public and supportable. Underneath this of course there are a multitude of limited access methods. The trouble is that I have a lot of internal code that needs to access these restricted methods without making those methods public. This creates two issues: I can't create interfaces to communicate between classes as this would make these my internal methods public. I can't access protected or default methods unless I put the majority of my internal classes in the same package. So, I have around 70 or 80 internal classes in cleanly segregated packages BUT with overly permissive access modifiers. Would you say that a single package is the lesser of two evils or is there a better way to be able to mask my internal methods whilst keeping more granular packages? I'd be interested to find out the best practice here. I'm already aware of This

    Read the article

  • Dynamically burn Feedburner feeds?

    - by Chris
    We have a Drupal website with a seperate RSS feed for every blogger on the site. There will be an indeterminate number of new users signing up and blogging in the future. Drupal automatically generates an RSS feed for each new blog. Is there a way to automatically burn each feed as well? We'd like to avoid manually adding a new feed to Feedburner every time a new user starts their blog.

    Read the article

  • Cakephp Search Plugin: DateTime Range

    - by Chris
    I am trying to search a model by dates using the CakePHP Search plugin The idea is: The user enters a date of a flight and the engine returns all flights within +- one day of that. My form: <?php echo $form->create('Flight', array( 'url' => array_merge(array('action' => 'find'), $this->params['pass']) )); echo $form->input('departure', array('div' => false, 'dateFormat' => 'DMY','timeFormat' => 'NONE')); echo $form->submit(__('Search', true), array('div' => false)); echo $form->end(); ?> My flight model: public $filterArgs = array( array('name' => 'departure', 'type' => 'expression', 'method' => 'makeRangeCondition', 'field' => 'ABS((TO_Days(Flight.departure))-( TO_Days(?))) < 2') ); The controller: public $presetVars = array( array('field' => 'departure', 'type' => 'expression') ); public function find() { $this->Prg->commonProcess(); $this->paginate['conditions'] = $this->Flight->parseCriteria($this->passedArgs); $this->set('flights', $this->paginate()); } When I try to search, the values for departure are packed in an array; Array ([departure] => Array ) And the filterArgs(...) function doesn't seem to understand this. What is the correct way to do this?

    Read the article

  • MySQL Sub-query.. Doesn't provide proper information after 3 entries into table.

    - by Chris Keefer
    After I get 3 rows in my forum_threads table this no longer does it's job; to organize a list of active forum threads and put the most recently responded-to thread at the top of the list, followed by second most recent posted-to thread, followed by third, fourth, etc. Like I said, the query works wonders up until there is a fourth row added to forum_threads. SELECT forum_threads.*, forum_posts.thread_id FROM forum_threads INNER JOIN (SELECT MAX(id) AS id, thread_id as thread_id FROM forum_posts group by thread_id order by id DESC) forum_posts ON forum_threads.id = forum_posts.thread_id

    Read the article

  • Why does C's "fopen" take a "const char *" as its second argument?

    - by Chris Cooper
    It has always struck me as strange that the C function "fopen" takes a "const char *" as the second argument. I would think it would be easier to both read your code and implement the library's code if there were bit masks defined in stdio.h, like "IO_READ" and such, so you could do things like: FILE* myFile = fopen("file.txt", IO_READ & IO_WRITE); Is there a programmatic reason for the way it actually is, or is it just historic? (i.e. "That's just the way it is.")

    Read the article

  • Does a PHP library exist to work with PRC/.mobi files?

    - by Chris Clarke
    I'm writing a WordPress plugin to create an eBook from a selected category in most major eBook formats. I would like to support MobiPocket since that's the format used by the Kindle but I'm not sure how to go about it. From what I've read .mobi files are actually Palm Resource Databases (PRC) but I haven't been able to find a PHP class to work with these. I thought about using exec along with KindleGen but that would be undesirable as it would complicate initial setup. I've also thought about hosting a web service somewhere and using XML-RPC to accomplish this but that also complicates things. My question is: is there a PHP class/library (PHP-only preferred) that can work with PRC or even better, a class that specialises in creating MobiPocket ebooks? (needs to be open source since I'm releasing under the GPL) I've tried searching but haven't been able to find anything.

    Read the article

  • asp.net Background Threads Exception Handling

    - by Chris
    In my 3.5 .net web application I have a background thread that does a lot of work (the application is similar to mint.com in that it does a lot of account aggregation on background threads). I do extensive exception handling within the thread performing the aggregation but there's always the chance an unhandled exception will be thrown and my entire application will die. I've read some articles about this topic but they all seem fairly outdated and none of them implement a standard approach. Is there a standard approach to this nowadays? Is there any nicer way to handle this in ASP.NET 4.0?

    Read the article

  • Equivalent of Backticks in Python

    - by Chris Bunch
    What is the equivalent of the backticks found in Ruby and Perl in Python? That is, in Ruby I can do this: foo = `cat /tmp/baz` What does the equivalent statement look like in Python? I've tried os.system("cat /tmp/baz") but that puts the result to standard out and returns to me the error code of that operation.

    Read the article

  • list or container O(1)-ish insertion/deletion performance, with array semantics

    - by Chris Kaminski
    I'm looking for a collection that offers list semantics, but also allows array semantics. Say I have a list with the following items: apple orange carrot pear then my container array would: container[0] == apple container[1] == orangle container[2] == carrot Then say I delete the orange element: container[0] == apple container[1] == carrot I don't particularly care if sort order is maintained, I'd just like the array values to function as accelerators to the list items, and I want to collapse gaps in the array without having to do an explicit resizing.

    Read the article

  • NHibernate correct way to reattach cached entity to different session

    - by Chris Marisic
    I'm using NHibernate to query a list of objects from my database. After I get the list of objects over them I iterate over the list of objects and apply a distance approximation algorithm to find the nearest object. I consider this function of getting the list of objects and apply the algorithm over them to be a heavy operation so I cache the object which I find from the algorithm in HttpRuntime.Cache. After this point whenever I'm given the supplied input again I can just directly pull the object from Cache instead of having to hit the database and traverse the list. My object is a complex object that has collections attached to it, inside the query where I return the full list of objects I don't bring back any of the sub collections eagerly so when I read my cached object I need lazy loading to work correctly to be able to display the object fully. Originally I tried using this to re-associate my cached object back to a new session _session.Lock(obj, LockMode.None); However when accessing the page concurrently from another instance I get the error Illegal attempt to associate a collection with two open sessions I then tried something different with _session.Merge(obj); However watching the output of this in NHProf shows that it is deleting and re-associating my object's contained collections with my object, which is not what I want although it seems to work fine. What is the correct way to do this? Neither of these seem to be right.

    Read the article

  • ASP.Net forms authentication - multiple providers

    - by Chris Klepeis
    I have an ASP.Net 4.0 application, and within it is a folder called "Forum", setup as a sub application in IIS 7. This forum package implements a custom provider for .net membership. The forum is running in .net 3.5. I'd like to setup the main site so that when users login, it logs them into both my site and the forum site. Both the main site and the forum have separate .Net membership tables. How can I specify which provider to use with formsauthentication? right now I have FormsAuthentication.SetAuthCookie(...); this, however, just uses my default provider and does nothing with the provider for the forum I tried setting the forum app and my web app to have the same cookie name, as well as setting the machinekey on each: <machineKey validationKey="AutoGenerate" validation="SHA1" /> no dice. I googled and didnt really come up with any example of how to use multiple providers like I want to. I updated my web.config to have both provideers but this is useless if I cannot specify in my code which one to use.

    Read the article

  • Preventing HTML character entities in locale files from getting munged by Rails3 xss protection

    - by Chris S
    We're building an app, our first using Rails 3, and we're having to build I18n in from the outset. Being perfectionists, we want real typography to be used in our views: dashes, curled quotes, ellipses et al. This means in our locales/xx.yml files we have two choices: Use real UTF-8 characters inline. Should work, but hard to type, and scares me due to the amount of software which still does naughty things to unicode. Use HTML character entities (&#8217; &#8212; etc). Easier to type, and probably more compatible with misbehaving software. I'd rather take the second option, however the auto-escaping in Rails 3 makes this problematic, as the ampersands in the YAML get auto-converted into character entities themselves, resulting in 'visible' &8217;s in the browser. Obviously this can be worked around by using raw on strings, i.e.: raw t('views.signup.organisation_details') But we're not happy going down the route of globally raw-ing every time we t something as it leaves us open to making an error and producing an XSS hole. We could selectively raw strings which we know contain character entities, but this would be hard to scale, and just feels wrong - besides, a string which contains an entity in one language may not in another. Any suggestions on a clever rails-y way to fix this? Or are we doomed to crap typography, xss holes, hours of wasted effort or all thre?

    Read the article

  • Is it against best practice to throw Exception on most JUnit tests?

    - by Chris Knight
    Almost all of my JUnit tests are written with the following signature: public void testSomething() throws Exception My reasoning is that I can focus on what I'm testing rather than exception handling which JUnit appears to give me for free. But am I missing anything by doing this? Is it against best practice? Would I gain anything by explicitly catching specific exceptions in my test and then fail()'ing on them?

    Read the article

  • Posting Documentation onto a Joomla Site

    - by Chris Spicer
    I would like to create some documentation and post it onto my Joomla website. This documentation would be something along the lines of the MSDN documentation: i.e. each page would follow a basic template. Intuitively I feel I have two ways of achieving this: 1) Creating each page of documentation as a separate article, and then linking them up. 2) Creating some kind of template and filling the information from a database. The second option being preferable in the long run. Unforunately I have no idea how to achieve what I'm looking for. I hoped that there would be a component out there that woud help me, but Googling for 'Joomla Documentation' just brings up the documentation for Joomla itself. Has anyone out there put documentation on their site, and how did they achieve it?

    Read the article

< Previous Page | 92 93 94 95 96 97 98 99 100 101 102 103  | Next Page >