Search Results

Search found 93 results on 4 pages for 'celine beck'.

Page 3/4 | < Previous Page | 1 2 3 4  | Next Page >

  • testing .mobile mime format with capybara / rspec

    - by Chris Beck
    For detecting and responding to mobile user agents, I'm using Mime::Type.register_alias "text/html", :mobile and the approach I'm wondering what is the best approach to test with capybara. This article suggests setting up an iphone driver with Capybara.register_driver :iphone do |app| http://blog.plataformatec.com.br/2011/03/configuring-user-agents-with-capybara-selenium-webdriver/ but I'd like a more flexible approach where the mime type is set via the url extension localhost/index.mobile and where I can do this visit user_path( format: :mobile) Rails understands the extension and sets the format in the params hash, but how do I get the url helper methods to add that to all urls as a file extension?

    Read the article

  • Removing DOM event handlers in long-running browser session

    - by Chris Beck
    I have a browser interface with a ul#contacts list on the left and div#contact property panel (email, phone) on the right. Click a contact in the list and my app makes an XHR request to get the contact property HTML fragment and update div#contact.innerHTML. Each contact fragment has an "Edit Contact" link. With JS, I progressively upgrade that link with an event listener that performs an XHR request to replace the static property panel with an in-place edit form. This can happen many times during a single browser session. How should I clean up my "Edit Contact" event listener? Do I need to remove it manually before the form overwrites the property panel? Or is the event listener cleaned up automatically when the contents of div#contact (and the node that I'm listening on) is overwritten? FWIW, I still consider IE6 to be part of my target market.

    Read the article

  • Can't compile grails Tomcat plugin

    - by Jeff Beck
    I'm using Netbeans to build a Grails app, while I have used this fine before on this new computer I can not get even the basic project to compile and run. I am getting errors around compiling the Tomcat plugin. If I uninstall the plugin it and use Jetty instead it will compile but the project isn't set up for Jetty and is missing files. Below is the error I'm getting I'm thinking it is some issue with my classpath but I just don't know where to start any help would be much appreciated. java.lang.NoClassDefFoundError: org/apache/catalina/startup/Tomcat$ExistingStandardWrapper

    Read the article

  • How to pass array via ExternalInterface.call in Actionscript 2.0

    - by Beck
    ExternalInterface.call("create_platform",var1,var2,var3...); I need: ExternalInterface.call("create_platform",mycars); Tried like that: mycars = new Array(); mycars["fast"] = "peugoet 306"; mycars["sporty"] = "citreon saxo"; mycars["old"] = "ford fiesta"; ExternalInterface.call("create_platform",mycars); Javascript shows empty array; Thanks.

    Read the article

  • How to output image via php from another domain

    - by Beck
    Image tag inside email message: <img src="http://www.mydomain.com/image.php?lastest=1"> Part of image.php script: case 'image/gif': header('Content-type: image/gif');$img=@imagecreatefromgif($image['src']);if($img) {imagegif($img);imagedestroy($img);} break; But how i can do the same with this image? http://www.anotherdomain.com/image.gif Thanks.

    Read the article

  • Progressive enhancement of anchor tags to avoid onclick="return false;"

    - by Chris Beck
    Unobtrusive JS suggests that we don't have any onclick attributes in our HTML templates. <a href="/controller/foo/1">View Foo 1</a> A most basic progressive enhancement is to convert an that anchor tag to use XHR to retrieve a DOM fragment. So, I write JS to add an event listener for a."click" then make an XHR to a.href. Alas, the browser still wants to navigate to "/controller/foo". So, I write JS to dynamically inject a.onclick = "return false;". Still unobtrusive (I guess), but now I'm paying the the cost of an extra event handler. To avoid the cost of 2 event listeners, I could shove my function call into the onclick attribute <a href="/controller/foo/1" onclick="myXHRFcn(); return false;"> But that's grodo for all sorts of reasons. To make it more interesting, I might have 100 anchor tags that I want to enhance. A better pattern is a single listener on a parent node that relies on event bubbling. That's cool, but how do I short circuit the browser from navigating to the URL without this on every anchor node? onclick="return false;" Manipulating the href is not an option. It must stay intact so the context menu options to copy or open in new page work as expected.

    Read the article

  • Calculating percent of votes inside mysql statement.

    - by Beck
    UPDATE polls_options SET `votes`=`votes`+1, `percent`=ROUND((`votes`+1) / (SELECT voters FROM polls WHERE poll_id=? LIMIT 1) * 100,1) WHERE option_id=? AND poll_id=? Don't have table data yet, to test it properly. :) And by the way, in what type % integers should be stored in database? Thanks for the help!

    Read the article

  • How to move iframe along the DOM without losing it's content?

    - by Beck
    Is it possible? I have tried to move it, but iframe contents dissapear. Tried to get contents of iframe and place them in the new place but all handlers ofc dissapear. Tried to do the same, but with new jQuery 1.4.2 feature, that clones all events along with it. But it doesn't work :) So I have decided to ask here for help. How to move the damn iframe to another place in the document without losing it's contents? ^_^ Thanks Added: txtad_iframe = ad_container.find('iframe'); its_contents = txtad_iframe.contents(); its_body = its_contents.find("div:first").clone(true).insertAfter(cthis.find('#photos')); new_ad.append(its_body); Here i'm trying to copy contents to new ad container. But it doesn't work. Context banner doesn't react on click event. I have tried to move ad_container to container, but iframe body content dissapears.

    Read the article

  • C++ string array from ifstream

    - by David Beck
    I have a program that I need to read in an array of strings from a file. The array must be C type strings (char * or char[]). Using the following code, I get a bad access error: for (i = 0; i < MAX_WORDS && !inputFile.eof(); i++) { inputFile >> words[i]; } words is declared as: char *words[MAX_WORDS];

    Read the article

  • Javascript looping only through defined properties of array. How?

    - by Beck
    For example if i'm keeping array of references via id like that: if(typeof channel_boards[misc.channel_id] == 'undefined') { channel_boards[misc.channel_id] = $('<div class="channel" channel_id="'+misc.channel_id+'"></div>').appendTo('#board'); } And then i'm looping through array to find required reference. I'm looping through undefined properties as well. Is it possible to loop only through defined properties? for(i=0;i<channel_boards.length;i++) { if(channel_boards[i] != undefined) { if(channel_boards[i].attr('channel_id') != visible) {channel_boards[i].addClass('hidden_board');} else {channel_boards[i].removeClass('hidden_board');} } } Maybe i should change the way i'm storing references? Via object for example, but how i'll be able to find proper reference via id number.

    Read the article

  • Is this SQL is valid?

    - by Beck
    UPDATE polls_options SET `votes`=`votes`+1, `percent`=ROUND((`votes`+1) / (SELECT voters FROM polls WHERE poll_id=? LIMIT 1) * 100,1) WHERE option_id=? AND poll_id=? Don't have table data yet, to test it properly. :) And by the way, in what type % integers should be stored in database? Thanks for the help!

    Read the article

  • Mysql question about UPDATE

    - by Beck
    UPDATE counter_reports SET `counter`=`counter`+1,`date`=? WHERE report_id IN( (SELECT report_id FROM counter_reports WHERE report_name="emails_sent" AND `year`=1 ORDER BY report_id DESC LIMIT 1), (SELECT report_id FROM counter_reports WHERE report_name="emails_sent" AND `month`=1 ORDER BY report_id DESC LIMIT 1), (SELECT report_id FROM counter_reports WHERE report_name="emails_sent" AND `week`=1 ORDER BY report_id DESC LIMIT 1), (SELECT report_id FROM counter_reports WHERE report_name="emails_sent" AND `day`=1 ORDER BY report_id DESC LIMIT 1) ) Is there any alternative for such sql? I need to update(increment by 1) last counter reports for day,week,month and year. If I'm adding manually, sql works fine, but with subqueries it fails to launch. Thanks. :)

    Read the article

  • Grails views for subclasses

    - by Jeff Beck
    I have a domain object called page that only has a title, I then have subclasses what are StaticPage that also has a textblock and PicturePage that contains a url. I have a site object that has many pages, I am looking for a way in the view for the site to call the a different template for each subclass. I can easily iterate through the pages but I would like to call each subclasses own view.

    Read the article

  • Python read files in directory and concatenate

    - by JJ Beck
    I want to write a Python script that searches all folders in the current directory, looks for all .txt files, and creates a file that is a concatenation of all those files (in any order) in the current directory. If folders have subfolders, it should not search those subfolders. An example is main_folder folder_1 sub_folder file1.txt file2.txt folder_2 file3.txt The script is placed inside main_folder. It should create a file that is a concatenation of file2.txt and file3.txt (in any order) inside main_folder. My question is: How can I tell Python to traverse through the folders, look for .txt files, without going into the subfolders?

    Read the article

  • Register to Attend the AutoVue 20.2 Webcast on April 3, 2012

    - by Pam Petropoulos
    Want to learn more about the latest AutoVue 20.2 release?               Discover what this latest major release of AutoVue can do for you. Join Celine Beck, AutoVue Product Management and Strategy Manager, during this live webcast to discover how the new release can transform your business processes and extend the value of your visualization investment. Hear how customers and partners are improving their workflows and creating differentiated offerings thanks to AutoVue enterprise visualization.   Date: Tuesday, April 3, 2012                                                                                                                                                            Time: 11:00 a.m. EST   Click here to register for this event.   For complete details about the new release, also check out the What’s New in AutoVue 20.2 Datasheet, available here.

    Read the article

  • BDD IS Different to TDD

    - by Liam McLennan
    One of this morning’s sessions at Alt.NET 2010 discussed BDD. Charlie Pool expressed the opinion, which I have heard many times, that BDD is just a description of TDD done properly. For me, the core principles of BDD are: expressing behaviour in terms that show the value to the system actors Expressing behaviours / scenarios in a format that clearly separates the context, the action and the observations. If we go back to Kent Beck’s TDD book neither of these elements are mentioned as being core to TDD. BDD is an evolution of TDD. It is a specialisation of TDD, but it is not the same as TDD. Discussing BDD, and building specialised tools for BDD, is valuable even though the difference between BDD and TDD is subtle. Further, the existence of BDD does not mean that TDD is obsolete or invalidated.

    Read the article

< Previous Page | 1 2 3 4  | Next Page >