Daily Archives

Articles indexed Friday June 18 2010

Page 11/76 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • php simplexmlelement - I can access most properties (except the one with a dash?)

    - by Matthew Steiner
    So I run some code like this: $quote = simplexml_load_string($xml); $quote = $quote->Stock; echo 'Name: '; echo $quote->Name; echo '<br>'; echo 'Sybmol: '; echo $quote->Symbol; echo '<br>'; echo 'Last Price: '; echo $quote->Last; echo '<br>'; echo 'Earnings To Price Ratio: '; echo $quote->P-E; echo '<br>'; I know that the second to last line ($quote-P-E) is incorrect - I don't think you can use dashes like that. But for some reason I can't figure out how to access that property. The weird thing is that's how it's written if I var_dump($quote) (It's towards the end): object(SimpleXMLElement)#17 (16) { ["Symbol"]=> string(4) "AAPL" ["Last"]=> string(6) "271.87" ["Date"]=> string(9) "6/17/2010" ["Time"]=> string(6) "3:59pm" ["Change"]=> string(5) "+4.62" ["Open"]=> string(6) "270.72" ["High"]=> string(6) "272.90" ["Low"]=> string(6) "269.50" ["Volume"]=> string(8) "31195032" ["MktCap"]=> string(6) "247.4B" ["PreviousClose"]=> string(6) "267.25" ["PercentageChange"]=> string(6) "+1.73%" ["AnnRange"]=> string(15) "132.88 - 272.90" ["Earns"]=> string(6) "11.796" ["P-E"]=> string(5) "22.66" ["Name"]=> string(10) "Apple Inc." } How should I be accessing this attribute/property?

    Read the article

  • Can I assign a maven dependency to a specific repo?

    - by mds
    So I have several large projects that use up to 8 different external repos, all specified in settings.xml rather than in poms. A lot of our internal dependencies are snapshots, so this obviously causes a lot of checking for updates across several external repos, when they are all in our internal repo. So my question is, is there a way to setup a profile/filter or anything similar where I can ensure that an update will only be checked for in a specific repo(s)? This is all in the spirit of better/quicker builds. Thanks!

    Read the article

  • Apache LimitExcept not behaving as expected

    - by Farseeker
    I have the following directive in my Apache httpd.conf: <LimitExcept OPTIONS PROPFIND REPORT> deny from all </LimitExcept> OPTIONS and PROPFIND work as expected, but REPORT returns 400: Bad Request. Removing the LimitExcept alltogether and everything works as expected. Any ideas on why this might be? (This is the implementation of my question here).

    Read the article

  • CakePHP: Ajax view problem (nothing in the view showing)

    - by Adim
    I created a function in my controller called addToPlaylist($songName). I wanted to add these song names to an array and then a session variable using an Ajax call. The first time i did this i got an error saying i do not have a template file to display in the chosen div ("add_to_playlist.ctp was missing"). I created this file and everything seemed to be working correctly. Basically I went to bed woke up and it is broken (it is possible I changed something before I went to bed). The problem now is that it does not show anything when i click the ajax link. when i click on the ajax link it seems to call the function but nothing displays in the view (except debug info) even when i delete the view (add_to_playlist.ctp) i get no errors, I just see debug info now.

    Read the article

  • Javascript to handle manipulating url anchor for bookmarking

    - by ajma
    Hello, I'd like to use the anchor part of the url (after the #) so that my page can have ajax/dhtml but still be able to have bookmarks work properly. I'm wondering is someone can help me get started on writing some javascript code for this. I'm using jQuery, but if the solution's a generic one, that's fine too. For my page, I could have settings like: "a" could be a number from 10-50 "b" is a 0 or 1 "c" is a 0 or 1 etc... I'd like some tips on writing optimized javascript code which could both parse and set something like #a=23&b=0&c=1 Also, I'd like to keep my url as short as possible, so if the default of "a" was 23, in the example above, the a=23 would be omitted. Is there a library that does all this stuff already?

    Read the article

  • appcfg.py: error: no such option: --dump on google-app-engine

    - by zjm1126
    i follow this article :http://code.google.com/intl/en/appengine/docs/python/tools/uploadingdata.html and want to download all data from my app , but when i use the next code,it show error: D:\zjm_demo\app>appcfg.py --dump --app_id=zjm1126 --url=http://zjm1126.appspot.c om/remote_api --filename=a.csv Usage: appcfg.py [options] <action> appcfg.py: error: no such option: --dump why ? thanks

    Read the article

  • how to resolve/normalize URLs in GWT/Javascript?

    - by Limbic System
    Given two URLs, how can I resolve one of them against the other? I'm trying to emulate Java's URI.resolve(), which does not exist in GWT's emulation library. I've had to implement this manually, which, as you might expect has been very error-prone. Is there a GWT or Javascript library for resolving or normalizing URLs?

    Read the article

  • Why should I use "Web 2.0"-style URLs?

    - by hydrapheetz
    In short, why use something like http://stackoverflow.com/badges/6/supporter instead of something "simpler" (and subjectively, at that) like http://stackoverflow.com/badges/6/. Even on my own site I've just been using /post/6/ to reference posts (by IDs, even though I still store a slug.) Instead of /post/6/small-rant-on-urls, and in some cases, they can get even more absurd, much more so than is really necessary.

    Read the article

  • Zend Framework Routing: .html extension

    - by smack0007
    I know I've seen this done before but I can't find the information anywhere. I need to be able to route with .html extensions in the Zend Framework. I.E. /controller/action.html should route to the appropriate controller / action. We have an idea to throw away the .html extension with our .htaccess file but I think changing the route config would be the better solution. Any advice is welcome.

    Read the article

  • Regex to match all valid links

    - by Unkwntech
    In regards to this: http://stackoverflow.uservoice.com/pages/general/suggestions/103227-parser-does-not-match-all-valid-urls is this regex adequate or will it need to be refined, if it needs to be refined how so? \b(?P<link>(?:.*?://)[\w\-\_\.\@\:\/\?\#\=]*)\b

    Read the article

  • Can you suggest good ways of generating URLS for viewing tagged content

    - by rikh
    For example, here on stack overflow the URL http://stackoverflow.com/questions/tagged/javascript+php will give you all questions tagged with javascript and php. The system I have allows tags with spaces in them, so the approach used here would not be a good fit for me. What character would you use to separate the tags, so the URLs are still human readable, google readable and web browser compatible. My gut feeling was to use commas. eg http://example.com/tagged/first+tag,second+tag Any feedback or suggestions would be welcome.

    Read the article

  • Question on dynamic URL parsing

    - by jerebear
    I see many, many sites that have URLs for individual pages such as http://www.mysite.com/articles/this-is-article-1 http://www.mysite.com/galleries/575 And they don't redirect, they don't run slowly... I know how to parse URL's, that's easy enough. But in my mind, that seems slow and cumbersome on a dynamic site. As well, if the pages are all staticly built (hende the custom URL) then that means all components of the page are static as well... (which would be bad) I'd love to hear some ideas about how this is typically accomplished.

    Read the article

  • Python filter/remove URLs from a list

    - by Eef
    Hi. I have a text file of URLs, about 14000. Below is a couple of examples: http://www.domainname.com/pagename?CONTENT_ITEM_ID=100&param2=123 http://www.domainname.com/images?IMAGE_ID=10 http://www.domainname.com/pagename?CONTENT_ITEM_ID=101&param2=123 http://www.domainname.com/images?IMAGE_ID=11 http://www.domainname.com/pagename?CONTENT_ITEM_ID=102&param2=123 I have loaded the text file into a Python list and I am trying to get all the URLs with CONTENT_ITEM_ID separated off into a list of their own. What would be the best way to do this in Python? Cheers

    Read the article

  • Sorting list of URLs by length in Jython

    - by Eef
    Hi, I am writing a Jython script to sort a list of URLs. I have a list that looks like this: http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/|,1 http://www.domain.com/folder1/folder2/folder3/|,1 http://www.domain.com/folder1/|,1 http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/folder2/folder3/|,1 The pipe and the comma separates the path from the amount of files that are under that path. Is it possible some how use Jython to order the URLs by length, so it would end up look like the below list: http://www.domain.com/folder1/|,1 http://www.domain.com/folder1/|,1 http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/folder2/|,1 http://www.domain.com/folder1/folder2/folder3/|,1 http://www.domain.com/folder1/folder2/folder3/|,1 Hope you guys get what I mean, any help would be appreciated. Cheers

    Read the article

  • Make the JavaScript Test Pass

    Add code on the commented line: var f = function () { var value = // ??? return f.sum = (f.sum || 0) + value;} ... to make the following QUnit test pass: test("Running sum", function () { equals(f(3), 3); equals(f(3), 6); equals(f(4), 10); jQuery([1, 2, 3]).each(f); equals(f(0), 16); }); Possible Answer It's a goofy scenario, but one possible solution uses a technique you'll see frequently inside today's JavaScript libraries. First, we'll need to use the implicit arguments parameter inside...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • Microsoft Unveils 'Windows Embedded Handheld' Efforts

    Microsoft today described an operating system branding and restructuring effort aimed at the enterprise mobile devices market....Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • SQLAuthority News Interview with SQL Server MVP Madhivanan A Real ProblemSolver

    Madhivanan (SQL Server MVP) is a real community hero. He is known for his two skills – 1) Help Community and 2) Help Community. I have met him many times and every time I feel if anybody in online world needs help Madhinvanan does his best to reach them out and solve problem. His name [...]...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • WHM Checking server status so frequently?

    - by Webnet
    Why do I have so many whm-server-status elements on this Apache status screen for WHM. 0-1 28256 0/4/808 _ 0.20 5 26 0.0 0.19 6.62 72.95.166.85 diablo-source.gamer-source.com GET /lib/ajax/keep-alive.php?_dc=1276829050557 HTTP/1.1 1-1 28259 0/5/934 _ 0.00 4 188 0.0 0.06 6.67 127.0.0.1 server.gospire.com GET /whm-server-status/ HTTP/1.0 2-1 - 0/0/940 . 0.18 55 0 0.0 0.00 6.61 127.0.0.1 server.gospire.com OPTIONS * HTTP/1.0 3-1 - 0/0/914 . 0.49 28 0 0.0 0.00 8.46 127.0.0.1 server.gospire.com OPTIONS * HTTP/1.0 4-1 - 0/0/837 . 0.00 62 0 0.0 0.00 7.49 127.0.0.1 server.gospire.com OPTIONS * HTTP/1.0 5-1 27580 0/15/849 _ 6.36 7 188 0.0 0.69 6.89 127.0.0.1 server.gospire.com GET /whm-server-status/ HTTP/1.0 6-1 - 0/0/829 . 0.00 58 0 0.0 0.00 4.20 127.0.0.1 server.gospire.com OPTIONS * HTTP/1.0 7-1 - 0/0/878 . 0.03 47 0 0.0 0.00 4.62 127.0.0.1 server.gospire.com OPTIONS * HTTP/1.0 8-1 26737 0/19/759 W 7.55 93 0 0.0 0.93 8.24 76.76.103.50 gamer-source.com GET /development-blog/?p=101&cpage=108 HTTP/1.0 9-1 - 0/0/847 . 0.36 61 0 0.0 0.00 7.90 127.0.0.1 server.gospire.com OPTIONS * HTTP/1.0 10-1 28233 0/8/705 _ 0.17 6 201 0.0 0.06 6.18 127.0.0.1 server.gospire.com GET /whm-server-status/ HTTP/1.0 11-1 - 0/0/754 . 0.00 48 0 0.0 0.00 6.50 127.0.0.1 server.gospire.com OPTIONS * HTTP/1.0 12-1 28235 0/6/670 W 0.11 25 0 0.0 0.04 3.15 76.76.103.50 gamer-source.com GET /development-blog/?p=104&cpage=1 HTTP/1.0 13-1 - 0/0/611 . 0.00 60 0 0.0 0.00 4.76 127.0.0.1 server.gospire.com OPTIONS * HTTP/1.0 14-1 - 0/0/713 . 0.00 59 0 0.0 0.00 5.70 127.0.0.1 server.gospire.com OPTIONS * HTTP/1.0 15-1 - 0/0/696 . 0.00 57 0 0.0 0.00 4.85 127.0.0.1 server.gospire.com OPTIONS * HTTP/1.0 16-1 - 0/0/695 . 0.50 73 0 0.0 0.00 4.43 127.0.0.1 server.gospire.com OPTIONS * HTTP/1.0 17-1 - 0/0/547 . 0.17 56 0 0.0 0.00 4.89 127.0.0.1 server.gospire.com OPTIONS * HTTP/1.0 18-1 - 0/0/472 . 0.00 80 0 0.0 0.00 2.05 127.0.0.1 server.gospire.com OPTIONS * HTTP/1.0 19-1 27588 0/7/423 _ 6.59 1 184 0.0 0.69 2.79 127.0.0.1 server.gospire.com GET /whm-server-status/ HTTP/1.0 20-1 27589 0/6/420 _ 6.54 3 184 0.0 0.71 3.62 127.0.0.1 server.gospire.com GET /whm-server-status/ HTTP/1.0 21-1 28242 0/10/374 _ 0.44 6 819 0.0 0.05 1.81 67.195.114.23 gamer-source.com GET /development-blog/?p=120 HTTP/1.0 22-1 - 0/0/359 . 0.00 79 0 0.0 0.00 3.45 127.0.0.1 server.gospire.com OPTIONS * HTTP/1.0 23-1 - 0/0/326 . 0.16 163 0 0.0 0.00 2.64 127.0.0.1 server.gospire.com OPTIONS * HTTP/1.0 24-1 - 0/0/430 . 0.40 74 0 0.0 0.00 3.30 127.0.0.1 server.gospire.com OPTIONS * HTTP/1.0 25-1 27624 0/23/276 W 0.78 0 0 0.0 0.16 1.08 127.0.0.1 server.gospire.com GET /whm-server-status/ HTTP/1.0

    Read the article

  • has any tools easy to download or uploaed data from gae ..

    - by zjm1126
    i find this: http://aralbalkan.com/1784 but it is : Gaebar is an easy-to-use, standalone Django application that you can plug in to your existing Google App Engine Django or app-engine-patch-based Django applications on Google App Engine to give them datastore backup and restore functionality. my app is not based on django,so did you know any tools esay to do this . thanks

    Read the article

  • CSS precedence order? My lecture slides are correct or not?

    - by Michael Mao
    Hi all: I've noticed that there are a couple of similar questions and answers at SO already, but let me clarify my specific question here first: I've got lecture slides which states like this: To be frank, I haven't heard of this rule of css precedence myself, and I googled to find something with similar topic but not quite like that : here To have a test myself, I've made a test page on my own server here After running it on FireFox 3.6.3, I am sure it does not show the way as it should be, according to the statement in lecture slides: imported stylesheet ? am I doing it wrong? I cannot see its effect using FireBug it says that embedded stylesheet has a higher precedence over linked/imported stylesheets, however, it doesn't work, if I put the linked/imported tag AFTER that. inline style vs html attributes ? I've got an image where I firstly set its inline style to control the width and height, then use direct html attributes width/height to try modifying that, but failed... Below is the source code : <html> <head> <style type="text/css"> #target { border : 2px solid green; color : green; } </style> <link rel="stylesheet" href="./linked.css" type="text/css" media="screen" /> </head> <body> <div id="target">A targeted div tag on page.</div> <img src="cat.jpg" alt="" style="width : 102px; height : 110px;" width="204px" height="220px" /> </body> </html> Can any experienced CSS guys help me figure out if the slide is correct or not? Frankly speaking, I am puzzled myself, as I can clearly see some other "incorrect" statements here and there amongst the slides, such as JavaScript is on client-side (how about server-side JavaScript?) and "Embedded styles are in the head section of a web page "(what the heck? I am not allowed to put it inside the body tag?) Sorry about this silly question, the exam is on TOMORROW, and I now see a lot of things to think about :)

    Read the article

  • Get HTML element informations in .NET

    - by martin.malek
    Hi, I'm just thinking if there is any way how to get information about element in HTML in my .NET application. The input is HTML page and path to CSS files etc. I want to take e.g. H1 tag and found what will be the CSS for it. Is there any code or can I use IE and try to take this information from it automatically inside of my application?

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >