Search Results

Search found 31774 results on 1271 pages for 'chris go'.

Page 167/1271 | < Previous Page | 163 164 165 166 167 168 169 170 171 172 173 174  | Next Page >

  • Scolling list with jQuery

    - by Chris
    My javascript is not up to scratch at the moment and I am stumped with this! I need to create an animated list with javascript like this one - http://www.fiveminuteargument.com/blog/scrolling-list. What I want is to take a list like so <ul> <li>Item 1</li> <li>Item 2</li> <li>Item 3</li> <li>Item 4</li> <li>Item 5</li> <li>Item 6</li> </ul> And display two at once, then display them in a loop, 2 at a time. Even pseudo code would help to get me started.

    Read the article

  • Rails Routes :requirements

    - by Chris Kilmer
    I want to set a route :requirements on an array that verifies a particular parameter is included in an array: atypes = [:culture, :personality, :communication] map.with_options(:path_prefix = ':atype', :requirements = {:atype = atypes.include?(:atype)}) do |assessment| ... end I haven't been able to find any documentation on how to accomplish this. Any help would be appreciated.

    Read the article

  • XSL - Get attribute of previous element

    - by Chris
    In the if block below I want to be also test whether @Timestamp is smaller than the previous Message's timestamp. How can I achieve this? <xsl:for-each select="Message"> <xsl:sort select="position()" data-type="number" order="descending"/> <xsl:variable name="newclass"> <xsl:if test="@Timestamp + 60 &gt; $ctimestamp">new</xsl:if> </xsl:variable> <tr><td class="debugtime"> <xsl:value-of select="@Time"/> </td><td class="{$newclass}"> <xsl:value-of select="node()"/> </td></tr> </xsl:for-each>

    Read the article

  • [MS Access 2003 SQL] Switch is causing #error, why and how can I fix it...

    - by Chris
    I have 3 fields in my table: start, end (dates) and length (number, might be blank). My Aim is to calculate an end date using start and length where end doesn't exist... I have: SELECT Switch((g.length<>0) And IsDate(g.end),DateAdd("m",g.length,g.start)) AS field FROM table g If there is no start, end or length, Access displays blank - this is fine. If there is no end, but start and length are ok, the calculated date is shown - again fine. BUT If there is no end, or length, but a start exists, access displays #Error I don't understand why, and can't fix it, please help!

    Read the article

  • How do I automatically update hundreds of images in an HTML page using jquery?

    - by Chris
    I have an HTML page where I want to refresh a lot of images every 30 seconds after the HTML page has been downloaded. I understand how to do this with Jquery and a single image, but I want to use about 200 custom urls to determine the current image to display for over 200 images. I need to find an efficient way to have jquery call the custom url associated with each image to download the url for the needed image as it changes, and then update the image in the page when it changes. Current hyperlink example to demonstrate the custom urls. <A href="/urlThatReturnsCurrentImageURL/1234/4567">link to url for image</A> Each custom url will return an image tag like this (or any other text that makes this simpler for jquery) <img src="/static/someImage.jpg"> What is the simplest way to have jquery call the custom url for each image to download the image url, image html, or some other text that jquery can use to download the right image every 30 seconds? Please keep in mind that I will have about 200 of these on a page.

    Read the article

  • Python lxml - returns null list

    - by Chris Finlayson
    I cannot figure out what is wrong with the XPATH when trying to extract a value from a webpage table. The method seems correct as I can extract the page title and other attributes, but I cannot extract the third value, it always returns an empty list? from lxml import html import requests test_url = 'SC312226' page = ('https://www.opencompany.co.uk/company/'+test_url) print 'Now searching URL: '+page data = requests.get(page) tree = html.fromstring(data.text) print tree.xpath('//title/text()') # Get page title print tree.xpath('//a/@href') # Get href attribute of all links print tree.xpath('//*[@id="financial"]/table/tbody/tr/td[1]/table/tbody/tr[2]/td[1]/div[2]/text()') Unless i'm missing something, it would appear the XPATH is correct: Chrome screenshot I checked Chrome console, appears ok! So i'm at a loss $x ('//*[@id="financial"]/table/tbody/tr/td[1]/table/tbody/tr[2]/td[1]/div[2]/text()') [ "£432,272" ]

    Read the article

  • UITableView headings shown on top of MBProgressHUD

    - by Chris Ballinger
    So I have a subclass of UITableViewController that loads some data from the internet and uses MBProgressHUD during the loading process. I use the standard MBProgressHUD initialization. HUD = [[MBProgressHUD alloc] initWithView:self.view]; [self.view addSubview:HUD]; HUD.delegate = self; HUD.labelText = @"Loading"; [HUD show:YES]; This is the result: . Is there any way to resolve this issue, or should I just abandon MBProgressHUD? Thanks!

    Read the article

  • How can I remove this query from within a loop?

    - by Chris
    I am currently designing a forum as a personal project. One of the recurring issues I've come across is database queries in loops. I've managed to avoid doing that so far by using table joins or caching of data in arrays for later use. Right now though I've come across a situation where I'm not sure how I can write the code in such a way that I can use either of those methods easily. However I'd still prefer to do at most 2 queries for this operation rather than 1 + 1 per group of forums, which so far has resulted in 5 per page. So while 5 isn't a huge number (though it will increase for each forum group I add) it's the principle that's important to me here, I do NOT want to write queries in loops What I'm doing is displaying forum index groupings (eg admin forums, user forums etc) and then each forum within that group on a single page index, it's the combination of both in one page that's causing me issue. If it had just been a single group per page, I'd use a table join and problem solved. But if I use a table join here, although I can potentially get all the data I need it'll be in one mass of results and it needs displaying properly. Here's the code (I've removed some of the html for clarity) <?php $sql= "select * from forum_groups"; //query 1 $result1 = $database->query($sql); while($group = mysql_fetch_assoc($result1)) //first loop {?> <table class="threads"> <tr> <td class="forumgroupheader"> <?php echo $group['group_name']; ?> </td> </tr> <tr> <td class="forumgroupheader2"> <?php echo $group['group_desc']; ?> </td> </tr> </table> <table> <tr> <th class="thforum"> Forum Name</th> <th class="thforum"> Forum Decsription</th> <th class="thforum"> Last Post </th> <tr> <?php $group_id = $group['id']; $sql = "SELECT forums.id, forums.forum_group_id, forums.forum_name, forums.forum_desc, forums.visible_rank, forums.locked, forums.lock_rank, forums.topics, forums.posts, forums.last_post, forums.last_post_id, users.username FROM forums LEFT JOIN users on forums.last_post_id=users.id WHERE forum_group_id='{$group_id}'"; //query 2 $result2 = $database->query($sql); while($forum = mysql_fetch_assoc($result2)) //second loop {?> So how can I either a) write the SQL in such a way as to remove the second query from inside the loop or b) combine the results in an array either way I need to be able to access the data as an when so I can format it properly for the page output, ie within the loops still.

    Read the article

  • Get drop down selection from GridView on button press

    - by Chris Stewart
    I have an ASP.NET GridView that has four columns. The first three are typical BoundField elements bound to a DataTable. The forth is a TemplateField element that I create a DropDownList in on the OnRowCreated event for the GridView. What I'm attempting to do is walk down the data source for the GridView when a button is pressed. I really just need to get the values for columns one and four of each row. The first three columns have data as expected but the forth is displaying as empty. Is this because it wasn't a part of the DataTable originally? Is there any way to get the value for each drop down as I've described it, or will I need to rework this so each drop down list is a part of the DataTable?

    Read the article

  • Why does setting document.domain require me to set it in all popups and iframes too?

    - by Chris
    I'm using a long-polling iframe solution for a chat script. Unfortunately, this requires me to set document.domain='yourdomain.com' in the iframe and main document, because the iframe is a subdomain call. The huge problem is...now all my other scripts that use popups and iframes are broken. They now require me to put document.domain in them too. It does fix it, but this is not an ideal solution at all. Is there another way around this problem?

    Read the article

  • How do I make TODO comments show up in the task list for C++ projects in Visual Studio 2010?

    - by Chris Simmons
    I'm trying to get my TODO comments to show up in the task list in Visual Studio 2010 for a C++ project, but they don't. I looked at this, but see no caveats other than the TODO comments need to be in the currently-open file. For example, creating a new Win32 console app places this: // TODO: reference additional headers your program requires here in a new file, stdafx.h. However, there's nothing in the task list. I have "Comments" chosen from the drop-down in the task list, but it's always empty. And it's not this problem; I can open the file and be looking at the TODO comment in the code editor and no task is shown. This is not a problem for C# projects as TODO comments show up as designed in those projects; this appears to be an issue specific to C++ projects. What else can I check?

    Read the article

  • Find closest number in range?

    - by Chris
    What is the best way to find the closes value in a range... for example i have an array with 0, 90, 180, 270, 360.. And a number 46... What is the best way to find 90 in the array? (in actipnscript 3)

    Read the article

  • MySql mutliple tables

    - by Chris Harrison
    I've been looking into JOIN, subqueries and other ways of doing this, but I can't work out the best way to do this is... I have a table (ps_category_product): id_product, id_category I want to perform a query on it like: SELECT id_product FROM ps_category_product WHERE id_category='$this_cat' BUT, I only want to perform this query where the ID's are returned by a query on another table (ps_product): id_product, active SELECT id_product FROM ps_product WHERE active='1' Can anyone help me with getting these two queries working together?

    Read the article

  • NoSQL vs Relational Coding Styles

    - by Chris Henry
    When building objects that make use of data stored in a RDBMS, it's normally pretty clear what you're getting back, as dictated by the tables and columns being queried. However, when dealing with NoSQL, document-based systems, it's less clear what is being retrieved. What are common methods of keeping track of structure in which data is stored?

    Read the article

  • naming a function that exhibits "set if not equal" behavior

    - by Chris Sears
    This might be an odd question, but I'm looking for a word to use in a function name. I'm normally good at coming up with succinct, meaningful function names, but this one has me stumped so I thought I'd appeal for help. The function will take some desired state as an argument and compare it to the current state. If no change is needed, the function will exit normally without doing anything. Otherwise, the function will take some action to achieve the desired state. For example, if wanted to make sure the front door was closed, i might say: my_house.<something>_front_door('closed') What word or term should use in place of the something? I'd like it to be short, readable, and minimize the astonishment factor. A couple clarifying points... I would want someone calling the function to intuitively know they didn't need to wrap the function an 'if' that checks the current state. For example, this would be bad: if my_house.front_door_is_open(): my_house.<something>_front_door('closed') Also, they should know that the function won't throw an exception if the desired state matches the current state. So this should never happen: try: my_house.<something>_front_door('closed') except DoorWasAlreadyClosedException: pass Here are some options I've considered: my_house.set_front_door('closed') my_house.setne_front_door('closed') # ne=not equal, from the setne x86 instruction my_house.ensure_front_door('closed') my_house.configure_front_door('closed') my_house.update_front_door('closed') my_house.make_front_door('closed') my_house.remediate_front_door('closed') And I'm open to other forms, but most I've thought of don't improve readability. Such as... my_house.ensure_front_door_is('closed') my_house.conditionally_update_front_door('closed') my_house.change_front_door_if_needed('closed') Thanks for any input!

    Read the article

  • Wordpress Hooks vs. includes?

    - by Chris J. Lee
    This is somewhat a subjective question. Noticed themes like thematic and carrington use hooks to display their themes. Trying to figure out which works best for a more efficient workflow. Which seems more efficient at theming? Trying to weigh in the cons and pros of hooks vs. just including static files.

    Read the article

  • Placing and removing element on array trough object

    - by Chris
    Hello, Lets assume i have 2 methods 1 that places a element on the array and one that removes it. const int Max = 10; int[] table= new int[Max]; I would like to call it up like this: s1.Place(5); // 5 0 0 0 0 0 0 0 0 0 0 s1.Place(9); // 5 9 0 0 0 0 0 0 0 0 0 s1.Remove(9); // 5 0 0 0 0 0 0 0 0 0 0 I would only like to use : using system for this. The result i get right now when i run the program is s1 = "nameofprogram" "name of class object" Normally i should get 0 0 0 0 0 0 0 0 0 0 to begin with. Any ideas how i can exactly add or remove those elements on the array? public void Place(int g) { if (top == Max) { throw new Exception("Stack overflow..."); } else { table[top] = g; top++; } .... Best Regards.

    Read the article

  • How do I test the speed of a mySQL query?

    - by Chris
    I have a select and query like below... $sql = "SELECT * FROM notifications WHERE to_id='".$userid."' AND (alert_read != '1' OR user_read != '1') ORDER BY alert_time DESC"; $result = mysql_query($sql); how do I test how long the query took to run?

    Read the article

  • LINQ Query based on user preferences

    - by Chris Phelps
    How can I do this better (so it actually works : ) I have a LINQ Query that includes an order by that is based on a user preference. The user can decide if they would like the results ordered asc or desc. If fuserclass.SortOrder = "Ascending" Then Dim mydat = (From c In dc.ITRS Order By c.Date Ascending Select c) Else Dim mydat = (From c In dc.ITRS Order By c.Date Descending Select c) End If For each mydata in mydat ***<<<error "mydat is not declared"*** I know I could put my For Each loop inside the If and Else, but that seems silly to have the same code twice. I know you know of a better way : )

    Read the article

< Previous Page | 163 164 165 166 167 168 169 170 171 172 173 174  | Next Page >