Search Results

Search found 2460 results on 99 pages for 'dave carpeneto'.

Page 87/99 | < Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >

  • Multiple Jquery Cycle Slideshows with their own Navs

    - by daveredfern
    Hello, I am using the Jquery cycle plugin (http://malsup.com/jquery/cycle/) on a blog listing page. There are multiple slideshows which work fine but I'd like each on the have their own previous and next. Because these are blog posts it is difficult to sign unique IDs or classes. I currently have:- $('.article .gallery').cycle({ next: '.viewmore .left', prev: '.viewmore .right', timeout:0 }); I have tried the following but doesn't work. It gives you a better idea of what I am looking for:- $('.article .gallery').cycle({ next: $(this).next('.viewmore .left'), prev: $(this).next('.viewmore .right'), timeout:0 }); Can anyone help me? Thanks in advance. Dave.

    Read the article

  • How to clear a bean field with Stripes.

    - by Davoink
    In a JSP I have the following field: <stripes:text name="email"/> This field is in my action bean(snippet): public class CreateClaim implements ActionBean { private String email; public void setEmail(String email) { this.email = email; } public String getEmail() { return email; } public Resolution alc(){ email = "poodle"; return new ForwardResolution("aForward.jsp"); } } In the alc() methos I am setting email to be null. But when the pages renders the value of the email field is exactly as it was entered originally. Is there a way of clearing this field once and event has triggered? Cheers Dave

    Read the article

  • problem with if statement used to determine function return

    - by Patrick
    Im using an if statement to determine what to return in a function, but it seems to be not working the way i want it to. function DoThis($dogs, $cats){ // do something with dogs, pet them perhaps. $reg = $dogs[0]; $nate = $dogs[1]; if($cats = "dave"){return $reg;} if($cats = "tom"){return $nate;} } $cats is a string (if that helps), and when entered it doesn't yield any return. If i manually set a return, that works, but the above doesnt for some reason.

    Read the article

  • Grails Testing hickups

    - by egervari
    I have two testing questions. Both are probably easily answered. The first is that I wrote this unit test in Grails: void testCount() { mockDomain(UserAccount) new UserAccount(firstName: "Ken").save() new UserAccount(firstName: "Bob").save() new UserAccount(firstName: "Dave").save() assertEquals(3, UserAccount.count()) } For some reason, I get 0 returned back. Did I forget to do something? The second question is for those who use IDEA. What should I be running - IDEA's junit tests, or grails targets? I have two options. Also, why does IDEA say that my tests pass and it provides a green light even though the test above actually fails? This will really drive me nuts if I have to check the test reports in html every time I run my tests..... Help?

    Read the article

  • I have VS2010RC and VS2008 installed - how can I run MVC 2 with both tools?

    - by DaveN59
    Hey all - I just downloaded the release version of MVC 2, pretty excited about that! Problem is, I can now create a MVC project in VS2010 but I don't seem to be able to do so in VS2008. We are using VS2010 RC for our main project. We need to use VS2008 for a new project so we can use the Connector/NET for MySQL, and I would love to be able to use MVC for this project. Does anybody know if this is possible? What am I missing, if anything? Thanks, Dave

    Read the article

  • How to find the mime type of a file in python?

    - by Daren Thomas
    Let's say you want to save a bunch of files somewhere, for instance in BLOBs. Let's say you want to dish these files out via a web page and have the client automatically open the correct application/viewer. Assumption: The browser figures out which application/viewer to use by the mime-type (content-type?) header in the HTTP response. Based on that assumption, in addition to the bytes of the file, you also want to save the MIME type. How would you find the MIME type of a file? I'm currently on a Mac, but this should also work on Windows. Does the browser add this information when posting the file to the web page? Is there a neat python library for finding this information? A WebService or (even better) a downloadable database? Edit: Thank you, Dave Webb.

    Read the article

  • jQuery disable a link

    - by davebowker
    Hey, Anyone know how to disable a link in jquery WITHOUT using return false;? Specifically, what I'm trying to do is disable the link of an item, performing a click on it using jquery which triggers some stuff, then re-enabling that link so that if it's clicked again it works as default. Thanks. Dave UPDATE Here's the code. What it needs to do after the .expanded class has been applied is to re-enable the disabled link. $('ul li').click(function(e) { e.preventDefault(); $('ul').addClass('expanded'); $('ul.expanded').fadeIn(300); //return false; });`

    Read the article

  • Will JavaScript evaluate a property's value if it's not part of an assignment statement?

    - by Bungle
    I've come across a fairly obscure problem having to do with measuring a document's height before the styling has been applied by the browser. More information here: http://sonspring.com/journal/jquery-iframe-sizing http://ajaxian.com/archives/safari-3-onload-firing-and-bad-timing In Dave Hyatt's comment from June 27, he advises simply checking the document.body.offsetLeft property to force Safari to do a reflow. Can I simply use the following statement: document.body.offsetLeft; or do I need to assign it to a variable, e.g.: var force_layout = document.body.offsetLeft; in order for browsers to calculate that value? I think this comes down to a more fundamental question - that is, without being part of an assignment statement, will JavaScript still evaluate a property's value? Does this depend on whether a particular browser's JavaScript engine optimizes the code?

    Read the article

  • Why isn't this javascript code working?

    - by DarkLightA
    http://jsfiddle.net/LU3pE/ I want the function to make the arguments into a single string and return it. What have I done incorrectly? function cooncc(divider, lastdiv){ var returner; for (var i = 0; i < (arguments.length - 2); i++) { returner += arguments[i+2] + divider; } returner -= divider; returner += lastdiv + arguments[arguments.length - 1]; return divider; } var output = cooncc(", ", ", and ", "Andy", "Becky", "Caitlin", "Dave", "Erica", "Fergus", "Gaby"); document.body.innerHTML = "<h1>" + output + ".</h1>";

    Read the article

  • URL Encoding - Illegal Character Replacement

    - by ThePower
    Hi, I am doing some url redirections in a project that I am currently working on. I am new to web development and was wondering what the best practise was to remove any illegal path characters, such as ' ? etc. I'm hoping I don't have to resort to manually replacing each character with their encoded urls. I have tried UrlEncode and HTMLEncode, but UrlEncode doesn't cater for the ? and HTMLEncode doesn't cater for ' E.G. If I was to use the following: Dim name As String = "Dave's gone, why?" Dim url As String = String.Format("~/books/{0}/{1}/default.aspx", bookID, name) Response.Redirect(url) I've tried wrapping url like this: Dim encodedUrl As String = Server.UrlEncode(url) And Dim encodedUrl As String = Server.HTMLEncode(url) Thanks in advance. P.S. Happy Christmas

    Read the article

  • Load remote csv into CHCSVParser

    - by Matt
    Hey guys. I'm using Dave DeLong's CHCSVParser to parse a csv. I can parse the csv locally, but I cannot get it load a remote csv file. I have been staring at my MacBook way too long today and the answer is right in front of me. Here's my code: NSString *urlStr = [[NSString alloc] initWithFormat:@"http://www.somewhere.com/LunchSpecials.csv"]; NSURL *lunchFileURL = [NSURL URLWithString:urlStr]; NSStringEncoding encoding = 0; CHCSVParser *p = [[CHCSVParser alloc] initWithContentsOfCSVFile:[lunchFileURL path] usedEncoding:&encoding error:nil]; [p setParserDelegate:self]; [p parse]; [p release]; Thanks for any help that someone can give me.

    Read the article

  • How to Create a Generic Method and Create Instance of The Type

    - by DaveDev
    Hi Guys I want to create a helper method that I can imagine has a signature similar to this: public static MyHtmlTag GenerateTag<T>(this HtmlHelper htmlHelper, object obj) { // how do I create an instance of MyAnchor? // this returns MyAnchor, which has a MyHtmlTag base } When I invoke the method, I want to specify a type of MyHtmlTag, such as MyAnchor, e.g.: <%= Html.GenerateTag<MyAnchor>(obj) %> or <%= Html.GenerateTag<MySpan>(obj) %> Can someone show me how to create this method? Also, what's involved in creating an instance of the type I specified? Activator.CreateInstance()? Thanks Dave

    Read the article

  • Ad/Banner Management/Rotation for Ruby on Rails?

    - by David N. Welton
    Hi, I have a niche site that I'd like to sell banners for directly, rather than going through adsense. I need a system to manage the whole process: displaying ads and an administrative interface to manage them. It doesn't have to be anything terribly fancy, although open source is greatly preferred so that I can grow the system as needs be. Since the site itself is in Rails, I would prefer something for that environment. Googling turns up bunches of them in PHP, but the results are a bit polluted and I didn't have any luck finding one that was done in/for Rails. If I don't find one, I suppose I'll see what I can do to hack together something and release it myself under an open license. Another possibility is this: http://www.google.com/admanager - anyone have anything to say about it? Is it right for someone just selling a few ads for a not-so-big site? Thanks, Dave

    Read the article

  • How To Get Type Info Without Using Generics?

    - by DaveDev
    Hi Guys I have an object obj that is passed into a helper method. public static MyTagGenerateTag<T>(this HtmlHelper htmlHelper, T obj /*, ... */) { Type t = typeof(T); foreach (PropertyInfo prop in t.GetProperties()) { object propValue = prop.GetValue(obj, null); string stringValue = propValue.ToString(); dictionary.Add(prop.Name, stringValue); } // implement GenerateTag } I've been told this is not a correct use of generics. Can somebody tell me if I can achieve the same result without specifying a generic type? If so, how? I would probably change the signature so it'd be like: public static MyTag GenerateTag(this HtmlHelper htmlHelper, object obj /*, ... */) { Type t = typeof(obj); // implement GenerateTag } but Type t = typeof(obj); is impossible. Any suggestions? Thanks Dave

    Read the article

  • Stripes link event triggering validation that is incorrect.

    - by Davoink
    I have stripes:link tag in a jsp with an event attribute: <stripes:link href="${actionBean.context.currentStage.stripesForwardAction}" addSourcePage="true" event="showTab2Link"> This triggers the validation to trigger on nested properties: @ValidateNestedProperties({ @Validate(field="county", required=true, minlength=2, maxlength=2, mask="\\d\\d"), @Validate(field="parish", required=true, minlength=3, maxlength=3, mask="\\d\\d\\d"), @Validate(field="holding", required=true, minlength=4, maxlength=4, mask="\\d\\d\\d\\d") }) However this would been fine if the actual values it is validation are not present, but they are present within the html and when debugging the bean. Why would the stripes:link trigger this? If I change it to an stripes:submit then it is fine. thanks, Dave

    Read the article

  • Get all Select Elements in a Form by referencing $(this) instead of $("form select")

    - by DaveDev
    Hi Guys I'm currently getting all the Select elements that exist in a form with the following: $("form").submit(function(event) { // gather data var data = GetSelectData($("form select")); // do submit $.post($(this).attr("action"), data, ..etc) }); Instead of passing in $("form select"), is there a way I can say something like $(this).children('select') // this doesn't work, btw to get all the select elements that exist within the context of the form the submit event is executing for? This will allow me to reduce my code to the following, moving all the functionality into a common function: $("form").submit(function(event) { GatherDataAndSubmit($(this)); }); function GatherDataAndSubmit(obj) { var data = GetSelectData(obj.children('select')); $.post(obj.attr("action"), data, ..etc) } Thanks Dave

    Read the article

  • eclipse: how to debug a Java program as a .jar file?

    - by Jason S
    I use ant for creating .jar files in Eclipse. Works great. I have a .jar file I am working on that expects the code to be in a .jar file (it looks for .properties files in the same directory as the .jar file) -- the standard Eclipse "Run" and "Debug" menus execute the main() method of a specified Java class... but they do it from the directory containing the compiled class files, not a jar file. Is there a way to change this behavior so Eclipse runs code from the appropriate .jar file instead? (My workaround right now is to run the .jar file externally, with it suspended waiting for a debugger, per Dave Ray's answer to one of my other questions.)

    Read the article

  • Ownership regarding to returned Quartz objects

    - by huggie
    I have recently asked about autoreleasing a returned quartz object: http://stackoverflow.com/questions/2819548/autorelease-for-cgmutablepathref Dave DeLong answered my question that there is no autorelease for quartz (or any NS foundation objects) and I should use the Create Rule. However the naming convention on the document says, The Core Foundation naming conventions, in particular use of the word “create”, only apply to C functions that return Core Foundation objects. Naming conventions for Objective-C methods are governed by the Cocoa conventions, irrespective of whether the method returns a Core Foundation or Cocoa object. By this account since my function is a message in an objective C object it doesn't seem proper to name it createSomething. I still want to return this object. What's the best way to approach this? Should I use the Get Rule and then have the caller explicitly retain it? But this is not within Cocoa convention. What's the proper way to handle this?

    Read the article

  • Installed Android on Mac, cannot find SDK

    - by David Matuszek
    Using Mac OS X 10.6.2, Eclipse SDK 3.5.2. I installed the Android plugin, following the instructions at: http://developer.android.com/sdk/eclipse-adt.html In the next section (step #3) it says: For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory. I cannot find such a directory. When I try some other directory, it says the directory has no 'tools' folder, so I've searched for a 'tools' folder, but none of those found (of 15 or 20) appear to be Android. Where is this directory??? --Dave [email protected]

    Read the article

  • Overloading Controller Actions

    - by DaveDev
    Hi Guys I was a bit surprised a few minutes ago when I tried to overload an Action in one of my Controllers I had public ActionResult Get() { return PartialView(/*return all things*/); } I added public ActionResult Get(int id) { return PartialView(/*return 1 thing*/); } .... and all of a sudden neither were working I fixed the issue by making 'id' nullable and getting rid of the other two methods public ActionResult Get(int? id) { if (id.HasValue) return PartialView(/*return 1 thing*/); else return PartialView(/*return everything*/); } and it worked, but my code just got a little bit ugly! Any comments or suggestions? Do I have to live with this blemish on my Controllers? Thanks Dave

    Read the article

  • how do I send stuff to method using the JQuery Ajax method

    - by nisardotnet
    $.ajax({ type: "POST", url: "WebService.asmx/AddVisitor", data: "{'fname':'dave', 'lname':'ward'}", contentType: "application/json; charset=utf-8", dataType: "json" }); I have an Asp.Net WebMethod that takes a firstName, lastName.....as a parameter, how do I send that stuff to that method using the JQuery Ajax method. if i hardcode the above it works without any problem but if i pass dynamic it fails var firstName = $("[id$='txtFirstName']"); var lastName = $("[id$='txtLastName']"); //data: "{'firstName':'Chris','lastName':'Brandsma'}"<br> data: "{'firstname':'" + escape(firstName.val()) + "','lastName':'" + escape(lastName.val()) + "'}", my WebMethod looks like this [WebMethod] public bool AddVisitor(string firstName, string lastName) { return true; } what wrong here? i have tried with eval and escape none of that works. Thanks for any help.

    Read the article

  • How do I list all tables in all databases in SQL Server in a single result set?

    - by msorens
    I am looking for T-SQL code to list all tables in all databases in SQL Server (at least in SS2005 and SS2008; would be nice to also apply to SS2000). The catch, however, is that I would like a single result set. This precludes the otherwise excellent answer from Pinal Dave: sp_msforeachdb 'select "?" AS db, * from [?].sys.tables' The above stored proc generates one result set per database, which is fine if you are in an IDE like SSMS that can display multiple result sets. However, I want a single result set because I want a query that is essentially a "find" tool: if I add a clause like WHERE tablename like '%accounts' then it would tell me where to find my BillAccounts, ClientAccounts, and VendorAccounts tables regardless of which database they reside in.

    Read the article

  • Looking for Info on a Javascript Testing framework

    - by DaveDev
    Hi Can somebody fill me in on JavaScript Testing Frameworks? I'm working on a project now and as the JS (Mostly jQuery) libraries grow, it's getting more and more difficult to introduce change or refactor, because I have no way of guaranteeing the accuracy of the code without manually testing everything. I don't really know anything about JavaScript Testing Frameworks, or how they integrate/operate in a .Net project, so I thought I'd ask here. What would a good testing framework be for .Net? What does a JavaScript test look like? (e.g. with NUnit, I have [TestFixture] classes & [Test] methods in a ProjectTests assembly) How do I run a javascript test? What are the conceptual differences between testing JS & testing C#? Is there anything else that would be worth knowing? Thanks Dave

    Read the article

  • How does the Amazon Recommendation feature work?

    - by Rachel
    What technology goes in behind the screens of Amazon recommendation technology? I believe that Amazon recommendation is currently the best in the market, but how do they provide us with such relevant recommendations? Recently, we have been involved with similar recommendation kind of project, but would surely like to know about the in and outs of the Amazon recommendation technology from a technical standpoint. Any inputs would be highly appreciated. Update: This patent explains how personalized recommendations are done but it is not very technical, and so it would be really nice if some insights could be provided. From the comments of Dave, Affinity Analysis forms the basis for such kind of Recommendation Engines. Also here are some good reads on the Topic Demystifying Market Basket Analysis Market Basket Analysis Affinity Analysis Suggested Reading: Data Mining: Concepts and Technique

    Read the article

  • Do you have to create a View Controller to move between views?

    - by Frames84
    I want a single startup view with a button and a welcome screen. When the button is pressed I then want to navigate to a second view which contains a table view and toolbar. I've tried creating a ViewController but my button is shown on all views. I just want a single view, then when it's pressed i go to the next view and the 'real' app starts. Can someone please try and explain the best architecture to do this? (like in chapter 6 of beginning iPhone 3 Development by Dave Mark and Jeff LaMarche ) Thanks

    Read the article

< Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >