Search Results

Search found 9 results on 1 pages for 'suzy'.

Page 1/1 | 1 

  • Python list should be empty on class instance initialisation, but it's not. Why?

    - by canavanin
    Hi everyone! I would like to create instances of a class containing a list that's empty by default; instead of later setting this list to the final full list I would like to successively add items to it. Here's a piece of sample code illustrating this: #!/usr/bin/python class test: def __init__(self, lst=[], intg=0): self.lista = lst self.integer = intg name_dict = {} counter = 0 for name in ('Anne', 'Leo', 'Suzy'): counter += 1 name_dict[name] = test() name_dict[name].integer += 1 name_dict[name].lista.append(counter) print name, name_dict[name].integer, name_dict[name].lista When I ran the above program I expected to get Anne 1 [1] Leo 1 [2] Suzy 1 [3] as I assumed lista to always be initialised to an empty list. What I got instead was this: Anne 1 [1] Leo 1 [1, 2] Suzy 1 [1, 2, 3] If I replace self.lista = lst by self.lista = [] it works fine, just like when I add the line name_dict[name].lista = [] to the for loop. Why is it that the contents of the previous objects' lists are retained, yet their values of integer aren't? I am rather new to Python, so it would be great if someone could point out to me where my thoughts/assumptions have gone astray. Thanks a lot in advance for your replies.

    Read the article

  • App Engine Authentication Error

    - by Suzy
    I have an app hosted by google app engine, and I am having trouble with authentication. When I login using my admin account and try to access the admin page or members pages, I just get a blank screen. I can login, and the members only menu shows when I login, but I just can't see any data from the members pages. I'm not really sure where I should start checking? My app is registered with my google apps account and I am using the only admin login that is there. Any suggestions would be appreciated.

    Read the article

  • SQL 2005: Select top N, group by ID with joins

    - by Suzy Fresh
    I'm having real difficulty with a query involving 3 tables. I need to get the 3 newest users per department grouped by department names. The groups should be sorted by the users.dateadded so the department with the newest activity is first. The users can exist in multiple departments so Im using a lookup table that just contains the userID and deptID. My tables are as follows. Department - depID|name Users - userID|name|dateadded DepUsers - depID|userID The output I need would be Receiving John Doe - 4/23/2010 Bill Smith - 4/22/2010 Accounting Steve Jones - 4/22/2010 John Doe - 4/21/2010 Auditing Steve Jones - 4/21/2010 Bill Smith - 4/21/2010

    Read the article

  • How do I unescape HTML entities in a string in Python 3.1?

    - by Sho Minamimoto
    I have looked all around and only found solutions for python 2.6 and earlier, NOTHING on how to do this in python 3.X. (I only have access to Win7 box.) I HAVE to be able to do this in 3.1 and preferably without external libraries. Currently, I have httplib2 installed and access to command-prompt curl (that's how I'm getting the source code for pages). Unfortunately, curl does not decode html entities, as far as I know, I couldn't find a command to decode it in the documentation. YES, I've tried to get Beautiful Soup to work, MANY TIMES without success in 3.X. If you could provide EXPLICIT instructions on how to get it to work in python 3 in MS Windows environment, I would be very grateful. So, to be clear, I need to turn strings like this: Suzy & John into a string like this: "Suzy & John".

    Read the article

  • Automatically number items in a wpf listbox

    - by evan
    I have a person class with two properties, Name an Age. I know how to use databinding to display a collection of person in a wpf list box and how to modify the listitemtemplate to customize how each person is displayed. Now I'd like to number each person on the list according to the order they appear on the list (which could change as the the items were sorted via name or age in the display). Is there a way to do that with the item template so instead of having a list like Rob - 14 John - 56 Suzy - 32 it would be 1) Rob - 14 2) John - 56 3) Suzy - 32 Basically i'd like to do something like: <ListView.ItemTemplate> <DataTemplate> <WrapPanel> **<TextBlock Text="{Binding CurrentPositionInList}" />** <TextBlock Text="{Binding Path=Name}" /> <TextBlock Text="{Binding Path=Age}" /> </WrapPanel> </DataTemplate> Thanks in advance!

    Read the article

  • Calling Customer Service Leaders

    - by Charles Knapp
    and by Suzy Meriwether The Customer Service Leader is under greater pressure today than ever before. With rapid adoption of new communication technologies and devices by customers, customer expectations are on the rise and social media provides a venue to share their experiences. To respond to these industry change drivers, Customer Service Leaders need to deliver a superior customer experience, achieve operational excellence, and transform their service organization. Oracle is hosting a series of evening seminars to discuss these drivers and how to improve efficiency within the service organization while treating every interaction as an opportunity to deliver superior customer experiences and increase revenue throughout the entire customer lifecycle. • Miami – November 7th @ Marlins Park – Call to register: 1-800-820-5592 x 10996 • Dallas – November 8th @ Cowboys Stadium – Call to register: 1-800-820-5592 x 11016 • Philadelphia – November 13th @ Rodin Museum – Call to register: 1-800-820-5592 x 11013 Be sure to mention you heard about this event from the Oracle CX Blog. I hope to see you there.

    Read the article

  • Join the Customer Experience Revolution

    - by Divya Malik
    By Suzy Meriwhether Customers want simple, consistent, and relevant experiences across all touchpoints and devices. Creating a great customer experience means delivering these qualities consistently over time across the entire customer lifecycle and enable businesses to attract more, retain more and sell more. Exceptional customer experiences create the loyalty, advocacy, and repeat business that drives success. Most successful companies would say that they try to create a good customer experience and have already invested in the systems, people, and training to develop it. So what’s missing? Why is it so much more difficult to meet customer expectations every day, in every way? How can you learn more? Join Oracle for a Live Event: Customer Experience Online Forum Participate in the Customer Experience Online Forum to hear from Bruce Temkin, a leading expert in customer experience, Anthony Lye, SVP of Oracle CRM, Marriott International, Nikon and other thought leaders to learn about the ROI of customer experience, what strategies leading brands use to win over customers, and how Oracle solutions can help you succeed in the Experience Revolution. I encourage you to register now for the half-day live event.

    Read the article

  • UPDATE query that fixes orphaned records

    - by Jed
    I have an Access database that has two tables that are related by PK/FK. Unfortunately, the database tables have allowed for duplicate/redundant records and has made the database a bit screwy. I am trying to figure out a SQL statement that will fix the problem. To better explain the problem and goal, I have created example tables to use as reference: You'll notice there are two tables, a Student table and a TestScore table where StudentID is the PK/FK. The Student table contains duplicate records for students John, Sally, Tommy, and Suzy. In other words the John's with StudentID's 1 and 5 are the same person, Sally 2 and 6 are the same person, and so on. The TestScore table relates test scores with a student. Ignoring how/why the Student table allowed duplicates, etc - The goal I'm trying to accomplish is to update the TestScore table so that it replaces the StudentID's that have been disabled with the corresponding enabled StudentID. So, all StudentID's = 1 (John) will be updated to 5; all StudentID's = 2 (Sally) will be updated to 6, and so on. Here's the resultant TestScore table that I'm shooting for (Notice there is no longer any reference to the disabled StudentID's 1-4): Can you think of a query (compatible with MS Access's JET Engine) that can accomplish this goal? Or, maybe, you can offer some tips/perspectives that will point me in the right direction. Thanks.

    Read the article

  • Something confusing about FormsOf (Sql server Full-Text searching)

    - by AspOnMyNet
    hi I'm using Sql Server 2008 1) A given <simple_term> within a <generation_term> will not match both nouns and verbs. If I understand the above text correctly, then query SELECT * FROM someTable WHERE CONTAINS ( *, ' FORMSOF ( INFLECTIONAL, park ) ' ) should search for either nouns or verbs derived from the root word “park”, but not for both? Thus out of the two rows, one containing noun parks and other verb parking, the above query should return just one of the two rows? But as it turns out, query returns both rows, so are perhaps my assumptions a bit off or is the above quote wrong?! 2) From Msdn: If freetext_string is enclosed in double quotation marks, a phrase match is instead performed; stemming and thesaurus are not performed. According to the above quote the following query shouldn’t return rows containing strings surfing ( due to query not performing stemming ), surf ( due to query performing phrase matching and not individual word matching ) and surfing with suzy’s sister ( due to query not performing stemming and due to query performing phrase matching and not word matching ), but it does. Thus, it appears that even when *freetext_string* is enclosed in double quotation marks, stemming is still preformed, while phrase matching is not: SELECT * FROM someTable WHERE FREETEXT( *, ' "surf sister" ' ) So is the above quote wrong or...? thanx

    Read the article

1