Search Results

Search found 97 results on 4 pages for 'davedev'.

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

  • Create an event to recognise when text on a page changes?

    - by DaveDev
    There's a page that I'm trying to trigger a jQuery event for when a certain span's value changes to 1. There's a countdown timer on the page. When the timer reaches 1, I'd like to trigger a click event. The difficulty I'm having is getting a script that i'm running via Jash to know when the timer changes to 1. The value of the timer can read with: $('#tCounter_474754 .bid_time_highlight').text(); But how can I get jQuery to trigger the click when this timer reaches 1?

    Read the article

  • Can SiteB Restrict Access Only to Users Authenticated on Site A? How?

    - by DaveDev
    I have recently been asked to estimate a piece of work which will provide functionality for authenticated users to access our site. The thing is, the user has to authenticate on a different site & domain to the one we are hosting. The user authenticates on SiteA.com and they are provided with a link to our site, SiteB. Only users who have authenticated on SiteA are allowed to access SiteB.com. I don't yet know what authentication system SiteA is using, but I thought I'd ask the community for some initial thoughts. Is this even possible? What do I need to consider? Thanks

    Read the article

  • Why is my CSS overriding the CSS in the Wrapper?

    - by DaveDev
    I'm trying to figure out why the text in the left navigation panel on the following page is shrinking & underlining when you mouseover in Firefox. http://fundcentre.newireland.ie/ Everything on the left & top is part of a wrapper that we inject our content into. Our content is everything from "FUND CENTRE" down. Can someone suggest something I could do to sort this issue out? Thanks.

    Read the article

  • What's the difference between PlaceHolder and <div />?

    - by DaveDev
    In an ASP.NET project I have the following HTML: <asp:PlaceHolder ID="plcTitle" runat="server"></asp:PlaceHolder> <div id="divStrapline" runat="server" /> which are populated with this code: if (this.TitlePanel != null) { plcTitle.Controls.Add(this.TitlePanel); } if (this.Strapline != null) { divStrapline.Controls.Add(this.Strapline); } Are they both the same thing? Is either better than the other? Why?

    Read the article

  • How to modify CSS when requirements change?

    - by DaveDev
    Suppose I'm given the requiremnt to geneate a few pages that have tables on them. The original requirement is for all tables to be 500px. I'd write my CSS as follows: table { width: 500px; } That will apply accross the board for all tables. Now, what if they change the requirment so that some tables are 600px. What's the best way to modify the CSS? Should I give the tables classes so table.SizeOne { width: 500px; } table.SizeTwo { width: 600px; } Or is there a better way for me to deal with changes like this?

    Read the article

  • How Can I Get a List<int> From Linq to XML that Produces List<List<int>>?

    - by DaveDev
    I have an XML snippet as follows: <PerformancePanel> <LegalText> <Line id="300" /> <Line id="304" /> <Line id="278" /> </LegalText> </PerformancePanel> I'm using the following code to get an object: var performancePanels = new { Panels = (from panel in doc.Elements("PerformancePanel") select new { LegalTextIds = (from legalText in panel.Elements("LegalText").Elements("Line") select new List<int>() { (int)legalText.Attribute("id") }).ToList() }).ToList() }; The type of LegalTextIds is List<List<int>>. How can I get this as a List<int>?

    Read the article

  • How can I observe the style on an element during mouse-over?

    - by DaveDev
    We supply micro-site content to a client. They supply us with a HTML wrapper and we inject our content into it. I'm trying to debug an issue where our style sheet appears to be interfering with the style in their wrapper. Normally I'd use firebug or IE Developer Toolbar to select the element and I can see which styles are being applied, which are being overridden and where they are coming from. But this particular problem only exists when I hover the mouse over a link. Specifically, the link shrinks a little bit. Is there anything that I can use to see what the browser is doing with the styles when I hover the mouse over the link?

    Read the article

  • How to efficiently get highest & lowest values from a List<double?>, and then modify them?

    - by DaveDev
    I have to get the sum of a list of doubles. If the sum is 100, I have to decrement from the highest number until it's = 100. If the sum is < 100, I have to increment the lowest number until it's = 100. I can do this by looping though the list, assigning the values to placeholder variables and testing which is higher or lower but I'm wondering if any gurus out there could suggest a super cool & efficient way to do this? The code below basically outlines what I'm trying to achieve: var splitValues = new List<double?>(); splitValues.Add(Math.Round(assetSplit.EquityTypeSplit() ?? 0)); splitValues.Add(Math.Round(assetSplit.PropertyTypeSplit() ?? 0)); splitValues.Add(Math.Round(assetSplit.FixedInterestTypeSplit() ?? 0)); splitValues.Add(Math.Round(assetSplit.CashTypeSplit() ?? 0)); var listSum = splitValues.Sum(split => split.Value); if (listSum != 100) { if (listSum > 100) { // how to get highest value and decrement by 1 until listSum == 100 // then reassign back into the splitValues list? var highest = // ?? } else { // how to get lowest where value is > 0, and increment by 1 until listSum == 100 // then reassign back into the splitValues list? var lowest = // ?? } } update: the list has to remain in the same order as the items are added.

    Read the article

  • How to go about finding ad-hoc development work on the web?

    - by DaveDev
    I'm wondering if its possible to find supplementary development work on line? I have some time available to me in the evenings and I thought it might be good to use it productively. It'd be great if there was a site that I could apply to do some ad-hoc coding for anyone who needs it. Something like 'I need a class that does XY & Z', and I could do that. Is there anything like this out there? Can somebody supply me with some info? Thanks

    Read the article

  • How to extract List<int> from Dictionary<int, string>?

    - by DaveDev
    I have a method that takes a List<int>, which is a list of IDs. The source of my data is a Dictionary<int, string> where the integers are what I want a list of. Is there a better way to get this than the following code? var list = new List<int>(); foreach (var kvp in myDictionary) { list.Add(pair.Key); } ExecuteMyMethod(list);

    Read the article

  • Cookies NULL On Some ASP.NET Pages (even though it IS there!)

    - by DaveDev
    Hi folks I'm working on an ASP.NET application and I'm having difficulty in understanding why a cookie appears to be null. On one page (results.aspx) I create a cookie, adding entries every time the user clicks a checkbox. When the user clicks a button, they're taken to another page (graph.aspx) where the contents of that cookie is read. The problem is that the cookie doesn't seem to exist on graph.aspx. The following code returns null: Request.Cookies["MyCookie"]; The weird thing is this is only an issue on our staging server. This app is deployed to a production server and it's fine. It also works perfectly locally. I've put debug code on both pages: StringBuilder sb = new StringBuilder(); foreach (string cookie in Request.Cookies.AllKeys) { sb.Append(cookie.ToString() + "<br />"); } this.divDebugOutput.InnerHtml = sb.ToString(); On results.aspx (where there are no problems), I can see the cookies are: MyCookie __utma __utmb __utmz _csoot _csuid ASP.NET_SessionId __utmc On graph.aspx, you can see there is no 'MyCookie' __utma __utmb __utmz _csoot _csuid ASP.NET_SessionId __utmc With that said, if I take a look with my FireCookie, I can see that the same cookie does in fact exist on BOTH pages! WTF?!?!?!?! (ok, rant over :-) ) Has anyone seen something like this before? Why would ASP.NET claim that a cookie is null on one page, and not null on another?

    Read the article

  • How to get a List ordered by the List it's filtered by?

    - by DaveDev
    I have a method as follows. It returns a list of MyTypes which appear to be ordered by myType.Id ascending by default. public List<MyType> GetMyTypes(List<int> ids) { return (from myType in db.MyTypes where ids.Contains(myType.Id) select new MyType { MyValue = myType.MyValue }).ToList(); } So if ids contains 302 300 301 the List returned contains items in ascending order. What do I need to do to return List<MyType> in the order of ids? Thanks edit: I've tried orderby ids.IndexOf(myType.Id) but it throws the exception Method 'Int32 IndexOf(Int32)' has no supported translation to SQL.

    Read the article

  • When to Use Properties & When to Use Methods?

    - by DaveDev
    Hi Guys I was looking at the following line of code foreach (PropertyInfo prop in t.GetProperties()) and I noticed that tprovides a method to return the type's properties instead of a property like t.Properties This makes me wonder why sometimes people use properties to make a type's data avilable and other times there's a method provided? Is there some logic behind the decision? Thanks Dave

    Read the article

  • Generate page dynamically & insert body into another page - is this realistic?

    - by DaveDev
    I have the requirement to create a page which contains a graph at the top, and for each item in the graph there's a fact sheet below. I already produce the fact sheets as stand-alone pages. Now, rather than recreating the fact sheet to include in the page I have to create, I'd like to use the work that already exists. Is it realistic that I dynamically generate each fact sheet as needed, strip out the body and insert that into the new page? If so, does anyone have any pointers or suggestions? Thanks

    Read the article

  • How to trigger an event ONLY if both dropdowns are selected?

    - by DaveDev
    I have a dropdown select list on my page of class="TypeFilter". I have a jQuery event that fires when a value in that list is selected. $(".TypeFilter").change(function() { // Extract value from TypeFilter and update page accordingly )); I now have to add another list to the page, and I want to implement functionality which will prevent the .change(function() from running unless both are selected. In both lists the first option in the list is some text instructing the user to select one of the items, so I was thinking of just writing some logic to test that both lists have a selected index greater than 0. I think this is a touch unclean though, especially considering that other pages that have a TypeFilter use the same logic. Is there any nifty functionality in jQuery that can do this?

    Read the article

  • ViewContext.Writer() doesn't exist in ASP.NET MVC 1.0?

    - by DaveDev
    I have the following code in an ASP.NET MVC 2 application. internal TextWriter _writer; // some stuff _writer = _viewContext.Writer; _writer.Write(_tag.ToString(TagRenderMode.EndTag)); I tried to move it to MVC 1 and now it doesn't build any more. I'm getting this error: 'System.Web.Mvc.ViewContext' does not contain a definition for 'Writer' Can someone point out how I can resolve this?

    Read the article

  • Should I Teach My Son Programming? What approaches should I take? [closed]

    - by DaveDev
    I was wondering if it's a good idea to teach object oriented programming to my son? I was never really good at math as a kid, but I think since I've started programming it's given me a greater ability to understand math by being better able to visualise relationships between abstract models. I thought it might give him a better advantage in learning & applying logical & mathematical concepts throughout his life if he was able to take advantage of the tools available to programmers. what would be the best programming fields, techniques and/or concepts? What approach should I take? what concepts should I avoid? what fields of mathematics would he find this benfits him most? He's only 2 now so it wouldn't be for another few years before I do this, (and even at that, only from a very high level point of view). I thought I'd put it to the programming community and see what you guys thought? Possible Duplicate: What are some recommended programming resources for pre-teens?

    Read the article

  • Help With Generics? How to Define Generic Method?

    - by DaveDev
    Is it possible to create a generic method with a definition similar to: public static string GenerateWidget<TypeOfHtmlGen, WidgetType>(this HtmlHelper htmlHelper , object modelData) // TypeOfHtmlGenerator is a type that creates custom Html tags. // GenerateWidget creates custom Html tags which contains Html representing the Widget. I can use this method to create any kind of widget contained within any kind of Html tag. Thanks

    Read the article

< Previous Page | 1 2 3 4