Search Results

Search found 1183 results on 48 pages for 'robert schneider'.

Page 39/48 | < Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >

  • Python Beautiful Soup .content Property

    - by Robert Birch
    What does BeautifulSoup's .content do? I am working through crummy.com's tutorial and I don't really understand what .content does. I have looked at the forums and I have not seen any answers. Looking at the code below.... from BeautifulSoup import BeautifulSoup import re doc = ['<html><head><title>Page title</title></head>', '<body><p id="firstpara" align="center">This is paragraph <b>one</b>.', '<p id="secondpara" align="blah">This is paragraph <b>two</b>.', '</html>'] soup = BeautifulSoup(''.join(doc)) print soup.contents[0].contents[0].contents[0].contents[0].name I would expect the last line of the code to print out 'body' instead of... File "pe_ratio.py", line 29, in <module> print soup.contents[0].contents[0].contents[0].contents[0].name File "C:\Python27\lib\BeautifulSoup.py", line 473, in __getattr__ raise AttributeError, "'%s' object has no attribute '%s'" % (self.__class__.__name__, attr) AttributeError: 'NavigableString' object has no attribute 'name' Is .content only concerned with html, head and title? If, so why is that? Thanks for the help in advance.

    Read the article

  • Sharepoint 2010 web application development suitability evaluation/assessment

    - by Robert Koritnik
    I would like to know what kind of applications are suitable to be developed on top of Sharepoint 2010 and which should not be built on to of it. So when to embrace/avoid Sharepoint 2010 as a development platform for new web applications. Addendum Would you as a sharepoint development specialist choose it as a platform for your next enterprise application with these characteristics: processor intensive lots of various screens for entering and managing data many complex business processes no need to change the UI (ie. reposition parts) ERP integration etc. I'm an Asp.net MVC (former web forms) developer and would like to know if usual multi-page semi complex web applications (intra/extra-net) should be built on top of Sharepoint 2010 and why (if yes or if no).

    Read the article

  • An RMIPRoxyFactoryBean factory in Spring?

    - by Robert Munteanu
    I'm currently using a Spring RmiProxyFactoryBean to access remote services. Since requirements have changed, I need to specify at runtime a different host - there can be many of them - , but the remoteServiceInterface and the non-host components of the remoteServiceUrl remain the same. Conceptually speaking, I'd see a bean definition similar to: <bean class="org.springframework.remoting.rmi.RmiProxyFactoryBeanFactory"> <property name="serviceInterface" value="xxx"/> <property name="serviceUrl" value="rmi://#{HOST}:1099/ServiceUrl"/> </bean> which exposes a Object getServiceFor(String hostName); Is there such a service available with Spring? Alternatively, do you see another way of doing this? Please note that the host list will not be known at compile or startup time, so I can't generate it in the xml file.

    Read the article

  • upload multiple images, display thumbnails, manipulate image

    - by robert
    hy, i need a little help here i want to be able to upload multiple images after i upload all i want to display thumbnails, when i click on a thumb i want to be able to rotate the image (rotate the original image not only the thumb) All uploaded images i want to be in one php array, in the order they have been uploaded. Or if i can to change the order of the images, i know is possible with jQuery! how i can code this?? i started but i can't get this done! here is my project so far: http://www.mediafire.com/?3uzzgx5onzn any help is welcome! Thanks!

    Read the article

  • Disable Products in different Magento Store Views

    - by Robert
    I have a Magento Multi-Store installation (not multi-site) and some products are available in more than one store. However, these products that are available in, let's say storeA and storeB, have related products, BUT, the related products are not available in both stores. The problem is this, Product1, which has Product2, Product3, and Product4 as related products, appears in storeA. No Problem. Product1 is also available in storeB, but NOT Product2-3-4. However, those products, though not shown in the general catalog of storeB, are visible as related products to Product1 in storeB. If I use the drop down to manage products in storeB, and I remove the related products in Product1, it removes the related products from Product1 in storeA, where they should be available. I cannot change the status attribute to storeview in Manage Attributes, because the only choices are Global or Website, not Store View. I can change the skin to show UPSELL products instead, and set up different UPSELL products, but that limits my stores to only two. Any ideas?

    Read the article

  • How can I construct this file tree based on what files the user is allowed to view?

    - by robert
    I have an array of files that looks like this: Array ( [0] => Array ( [type] => folder [path] => RootFolder ) [1] => Array ( [type] => file [path] => RootFolder\error.log ) [2] => Array ( [type] => folder [path] => RootFolder\test ) [3] => Array ( [type] => file [path] => RootFolder\test\asd.txt ) [4] => Array ( [type] => folder [path] => RootFolder\test\sd ) [5] => Array ( [type] => file [path] => RootFolder\test\sd\testing.txt ) ) I parse this array and create a tree like view based on the depth of the files ('/' count). It looks like this: RootFolder - error.log - test - asd.txt - sd - testing.txt What I have now is an array of filepaths the user is allowed to view. I need to take this array into account when constructing the above tree. That array looks like this: Array ( [0] => Array ( [filePath] => RootFolder\test\sd ) [1] => Array ( [filePath] => RootFolder\error.log ) ) It would be easy to do a if in_array($path, $allowed) but that won't give me the tree. Just a list of files... Another part I'm stumped on is this requirement: If the user has access to view the folder test, they then have access to all children of that folder. My idea was to simply parse the filepaths. For example, I'd confirm that RootFolder\test\sd was a directory and then create a tree based on the '/' count. Like I was doing earlier. Then, since this is a directory, I'd pull out all files within this directory and show them to the user. However, I'm having trouble converting this to working code... Any ideas?

    Read the article

  • Exploding a range of dates with LINQ

    - by Robert Gowland
    If I have a pair of dates, and I want to generate a list of all the dates between them (inclusive), I can do something like: System.DateTime s = new System.DateTime(2010, 06, 05); System.DateTime e = new System.DateTime(2010, 06, 09); var list = Enumerable.Range(0, (e - s).Days) .Select(value => s.AddDays(value)); What I'm stuck on is that I've got a list of pairs of dates that I want to explode into a list of all the dates between them. Example: {2010-05-06, 2010-05-09}, {2010-05-12, 2010-05-15} should result in {2010-05-06, 2010-05-07, 2010-05-08, 2010-05-09, 2010-05-12, 2010-05-13, 2010-05-14, 2010-05-15} Note the pairs of dates are guaranteed not to overlap each other.

    Read the article

  • returning a Void object

    - by Robert
    What is the correct way to return a Void type, when it isn't a primitive? Eg. I currently use null as below. interface B<E>{ E method(); } class A implements B<Void>{ public Void method(){ // do something return null; } }

    Read the article

  • A question on getting number of nodes in a Binary Tree

    - by Robert
    Dear all, I have written up two functions (pseudo code) for calculation the number of nodes and the tree height of a Binary Tree,given the root of the tree. Most importantly,the Binary Tree is represented as the First chiled/next sibling format. so struct TreeNode { Object element; TreeNode *firstChild; TreeNode *nextSibling; } Calculate the # of nodes: public int countNode(TreeNode root) { int count=0; while(root!=null) { root= root.firstChild; count++; } return count; } public int countHeight(TreeNode root) { int height=0; while(root!=null) { root= root.nextSibling; height++; } return height; } This is one of the problem I saw on an algorithm book,and my solution above seems to have some problems,also I didn't quite get the points of using this First Child/right sibling representation of Binary Tree,could you guys give me some idea and feedback,please? Cheers!

    Read the article

  • Simple MultiThread Safe Log Class

    - by Robert
    What is the best approach to creating a simple multithread safe logging class? Is something like this sufficient? public class Logging { public Logging() { } public void WriteToLog(string message) { object locker = new object(); lock(locker) { StreamWriter SW; SW=File.AppendText("Data\\Log.txt"); SW.WriteLine(message); SW.Close(); } } }

    Read the article

  • Testing for a closed socket

    - by Robert S. Barnes
    I'm trying to test for a closed socket that has been gracefully closed by the peer without incurring the latency hit of a double send to induce a SIGPIPE. One of the assumptions here is that the socket if closed was gracefully closed by the peer immediately after it's last write / send. Actual errors like a premature close are dealt with else where in the code. If the socket is still open, there will be 0 or more bytes data which I don't actually want to pull out of the socket buffer yet. I was thinking that I could call int ret = recv(sockfd, buf, 1, MSG_DONTWAIT | MSG_PEEK); to determine if the socket is still connected. If it's connected but there's no data in the buffer I'll get a return of -1 with errno == EAGAIN and return the sockfd for reuse. If it's been gracefully closed by the peer I'll get ret == 0 and open a new connection. I've tested this and it seems to work. However, I suspect there is a small window between when I recv the last bit of my data and when the peer FIN arrives in which I could get a false-positive EAGAIN from my test recv. Is this going to bite me, or is there a better way of doing this?

    Read the article

  • ORACLE:- 'SELECT ORDER BY ASC' but 'USA' always first.

    - by Robert
    I have to write a drop down query for countries. But USA should always be first. The rest of the countries are in alphabetical order I tried the following query SELECT countries_id ,countries_name FROM get_countries WHERE countries_id = 138 UNION SELECT countries_id ,countries_name FROM get_countries WHERE countries_id != 138 ORDER BY 2 ASC

    Read the article

  • [Perl] Use a Module / Object which is defined in the same file

    - by Robert S. Barnes
    I need to define some modules and use them all in the same file. No, I can't change the requirement. I would like to do something like the following: { package FooObj; sub new { ... } sub add_data { ... } } { package BarObj; use FooObj; sub new { ... # BarObj "has a" FooObj my $self = ( myFoo => FooObj->new() ); ... } sub some_method { ... } } my $bar = BarObj->new(); However, this results in the message: Can't locate FooObj.pm in @INC ... BEGIN failed... How do I get this to work?

    Read the article

  • Create Registry Value In Local Machine Using C#

    - by Robert
    I'm trying to save an install path to the registry so my windows service will know where my other application was installed. I'm using visual studio's deployment to create a registry value in HKEY_CURRENT_USER, but my windows service which runs under LocalMachine doesn't have access to that. I then made the installer create a registry value in HKEY_LOCAL_MACHINE, but when I view the registry after the install it appears it never made the value. Any ideas?

    Read the article

  • Objective C memory management question with NSArray

    - by Robert
    I am loading an array with floats like this: NSArray *arr= [NSArray arrayWithObjects: [NSNumber numberWithFloat:1.9], [NSNumber numberWithFloat:1.7], [NSNumber numberWithFloat:1.6], [NSNumber numberWithFloat:1.9],nil]; Now I know this is the correct way of doing it, however I am confused by the retail counts. Each Object is created by the [NSNumber numberWithFloat:] method. This gives the object a retain count of 1 dosnt it? - otherwise the object would be reclaimed The arrayWithObjects: method sends a retain message to each object. This means each object has a retain cont of 2. When the array is de-allocated each object is released leaving them with a retain count of 1. What have I missed?

    Read the article

  • Echo-ing Only Available Database Result

    - by Robert Hanson
    I have this Associative Array : $Fields = array("row0"=>"Yahoo ID", "row1"=>"MSN ID", "row2"=> "Gtalk ID"); on the other side, I have this SQL query : SELECT YahooID, MSNID, GTalkID From UserTable WHERE Username = '$Username' LIMIT 1; the result maybe vary, because some users only have Yahoo ID and some have others. for example if I have this result : $row[0] = NONE //means YahooID = NONE $row[1] = [email protected] $row[2] = [email protected] then how to have this as an output (echo) : MSN ID = [email protected] Gtalk ID = [email protected] since Yahoo ID is not exist, then the result will be MSN and Gtalk only. 'MSN ID' and 'Gtalk ID' is variable from Associative Array, while '[email protected]' and '[email protected]' from SQL result. thanks!

    Read the article

  • C# - Listing class properties like Immediate window

    - by Robert
    Hi, I store a few classes in session. I want to be able to see the values of my class properties in trace viewer. By default I only the Type name MyNamespace.MyClass. I was wondering if I overwrite the .ToString() method and use reflection to loop over all the properties and construct a string like that ... it would do the trick but just wanted to see if there is anything already out there (specially since Immediate Window has this capability) which does the same ... i.e. list the class property values in trace instead of just the Name of the class. Thanks!

    Read the article

  • Should I use more than one CSS sheet?

    - by Robert
    I am updating a website to add some mobile friendly pages. At the moment we have one big css page with everything in. My idea is to put all the mobile specific css into a separate file and then link both sheets. The mobile css will overide anything in the default css (bigger buttons etc). Im quite new to css, what is the best practice?

    Read the article

  • Python script web service timeout

    - by Robert
    We have had a Python script running for many months now that simply scans through a directory of files, and posts each file to our web site via a web service call. The web site is also written in Python. For no apparent reason, this morning this script started throwing the following error: urllib2.URLError: <urlopen error (10060, 'Operation timed out')> The site itself is up and running just fine. There are no indications of any errors. The developer that was working on this site is no longer with us, and we do not have a strong Python developer on staff as we are moving away from that. Before I do an all nighter and rewrite this thing in C#, I wanted to see if anyone had any experience dealing with this issue. I do know that the script is connecting to a secure site (HTTPS), so I am not sure if something has come up with that, and I honestly dont know where to look to determine that. As I said before, the site itself isn't showing any signs of error, including SSL. Any thoughts?

    Read the article

  • Copy existing XML, duplicate element and modify

    - by Robert
    Hi, I have a tricky XSL problem at the moment. I need to copy the existing XML, copy a certain element (plus its child elements) and modify the value of two child-elements. The modifications are: divide value of the 'value' element by 110 and edit the value of the 'type' element from 'normal' to 'discount'. This is currently what I have: Current XML: <dataset> <data> <prices> <price> <value>50.00</value> <type>normal</type> </price> </prices> </data> </dataset> Expected result <dataset> <data> <prices> <price> <value>50.00</value> <type>normal</type> </price> <price> <value>45.00</value> <type>discount</type> </price> </prices> </data> </dataset> Any takers? I've gotten as far as copying the desired 'price' element using copy-of, but I'm stuck as to how to modify it next.

    Read the article

  • How do I hide an HTML element before the page loads

    - by Robert
    I have some JQuery code that shows or hides a div. $("div#extraControls").show(); // OR .hide() I initially want the div to be not visible so I used: $(document).ready(function() { $("div#extraControls").hide(); }); However, on the browser, the content loads visible for a second before disappearing, which is not what I want. How do I set the hide the element before the page loads whilst keeping the ability to show hide it dynamically with a script?

    Read the article

< Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >