Search Results

Search found 10804 results on 433 pages for 'attribute keys'.

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

  • Organizing memcache keys

    - by Industrial
    Hi! Im trying to find a good way to handle memcache keys for storing, retrieving and updating data to/from the cache layer in a more civilized way. Found this pattern, which looks great, but how do I turn it into a functional part of a PHP application? The Identity Map pattern: http://martinfowler.com/eaaCatalog/identityMap.html Thanks!

    Read the article

  • Collaboration Diagrams: how to represent setting a variable's and attribute's value to a specified v

    - by devoured elysium
    Let's assume I have a class called MyClass with an attribute called MyAttribute and a method called MyMethod(). Inside that method I'd like to have a variable called MyVariable. I'd like to set the value of MyVariable to "MyVariable" and MyAttribute to "MyAttribute" inside the call to MyMethod(). How can I do this in a Collaboration Diagram? I can't find any info of this kind on the internet and the book I'm studying from (Applying UML and Patterns) is very vague in the details. Thanks

    Read the article

  • rails i18n shared keys

    - by SMiX
    Hello. How can I define shared keys in my config/locales/lang.yml ? For example I want to use f.label :date and to see translated word "date" in all forms for all models.

    Read the article

  • Beautifulsoup recursive attribute

    - by Marcos Placona
    Hi, trying to parse an XML with Beautifulsoup, but hit a brick wall when trying to use the "recursive" attribute with findall() I have a pretty odd xml format shown below: <?xml version="1.0"?> <catalog> <book id="bk101"> <author>Gambardella, Matthew</author> <title>XML Developer's Guide</title> <genre>Computer</genre> <price>44.95</price> <publish_date>2000-10-01</publish_date> <description>An in-depth look at creating applications with XML.</description> <catalog>true</catalog> </book> <book id="bk102"> <author>Ralls, Kim</author> <title>Midnight Rain</title> <genre>Fantasy</genre> <price>5.95</price> <publish_date>2000-12-16</publish_date> <description>A former architect battles corporate zombies, an evil sorceress, and her own childhood to become queen of the world.</description> <catalog>false</catalog> </book> </catalog> As you can see, the catalog tag repeats inside the book tag, which causes an error when I try to to something like: from BeautifulSoup import BeautifulStoneSoup as BSS catalog = "catalog.xml" def open_rss(): f = open(catalog, 'r') return f.read() def rss_parser(): rss_contents = open_rss() soup = BSS(rss_contents) items = soup.findAll('catalog', recursive=False) for item in items: print item.title.string rss_parser() As you will see, on my soup.findAll I've added recursive=false, which in theory would make it no recurse through the item found, but skip to the next one. This doesn't seem to work, as I always get the following error: File "catalog.py", line 17, in rss_parser print item.title.string AttributeError: 'NoneType' object has no attribute 'string' I'm sure I'm doing something stupid here, and would appreciate if someone could give me some help on how to solve this problem. Changing the HTML structure is not an option, this this code needs to perform well as it will potentially parse a large XML file. Thanks in advance, Marcos

    Read the article

  • String literals vs constants for Session[...] dictionary keys

    - by FreshCode
    Session[Constant] vs Session["String Literal"] Performance I'm retrieving user-specific data like ViewData["CartItems"] = Session["CartItems"]; with a string literal for keys on every request. Should I be using constants for this? If yes, how should I go about implementing frequently used string literals and will it significantly affect performance on a high-traffic site? Related question does not address ASP.NET MVC or Session.

    Read the article

  • Html validation error for property attribute

    - by Castor
    I am using few facebook social plugins and I am using the meta header. When validating the page, the W3C validator is throwing the error - "Error: there is no attribute "property". I am using the XHTML Transitional doctype - Pls Suggest if I have to change the doctype to something else.

    Read the article

  • How to decode JSON (varying number of elements, varying keys) using Jquery

    - by Obay
    My JSON looks like this: { "[email protected]":"Person1", "[email protected]":"Person65", "[email protected]":"Person24" } It's returned in various number of elements, and various keys. How do I traverse the data if my code is like this: $.post("includes/ajax.php", { group_id : $('#group').val() }, function(data) { //how do i traverse data here? }, "json"); Any help will be appreciated :) Thanks!

    Read the article

  • Hibernate criteria DB2 composite keys in IN clause

    - by nkr1pt
    Hibernate criteria, using DB2 dialect, generates the following sql with composite keys in the IN clause, but DB2 answers that the query is incorrect: select * from tableA where (x, y) IN ( ( 'x1', y1) ) but, DB2 throws this: SQL0104N An unexpected token "," was found following ", y) in ( ('x1'". Expected tokens may include: "+". SQLSTATE=42601

    Read the article

  • PHP Change Array Keys

    - by Ice
    Array(0= blabla 1 = blabla 2 = blblll) etc.. Is there a way to change all the numeric keys to "Name" without looping through the array (so a php function)?

    Read the article

  • Cassandra use PHP SimpleCassie get all keys

    - by chnet
    Is it possible to get all keys in a column family using SimpleCassie? I looked at SimpleCassie's google code, but do not figure out. Another issue is that I used following code to access column value. $price = $cassie-keyspace('ToyStore')-cf('Toys')-key('Transformer')-column('Price')-get(); echo $price; It always complains "object of cassandra columnorsupercolumn cannot be converted to string". Is it possible to print out the column value?

    Read the article

  • Custom keys with NERDComment plugin and remapped Leader?

    - by Paul Wicks
    I'm trying to set up the NERDComment plugin in vim, but I'm having some trouble with the keys. I'd like to set the basic toggle functionality (comment a line if it's uncommented, uncomment if it's commented) to be c. The problem is that I've remapped the Leader to be ,, which is the same key that NERD wants for all of it's hotkeys. Anyone have any idea as to how to set this up?

    Read the article

  • flex textarea text attribute but still renders as html

    - by David
    actually i got to the cause of the issue. if you feed the textarea text attribute with an tag that has a valid src url, then for some reason flex will try to render everything as html. Eg, try this: <mx:TextArea id="textArea" width="100%" height="90%" text="<img src='http://url-to-a-valid-img"/> and instead of it rendering it as raw text it will render it as an html. any idea?

    Read the article

  • Arrow keys with NSTableView

    - by dreamlax
    Is it possible to navigate an NSTableView's editable cell around the NSTableView using arrow keys and enter/tab? For example, I want to make it feel more like a spreadsheet. The users of this application are expected to edit quite a lot of cells (but not all of them), and I think it would be easier to do so if they didn't have to double-click on each cell.

    Read the article

  • phing: get last commit ID (revision) and use it as a phing attribute

    - by Jorre
    I'm trying to get the latest revision ID from my SVN project using Phing. What I'm trying to do is the following: get latest revision/commit number from svn store this revision number as an attribute (so that I can use this to append it to the archive I'm already creating using phing) I don't have a working copy on my server where phing is running, so I cannot use the Phing SvnLastRevisionTask.

    Read the article

  • How to convert attribute name to string?

    - by Acidburn2k
    Lets say we have some basic AR model. class User < ActiveRecord::Base attr_accessible :firstname, :lastname, :email end ... some_helper_method(attrib) ... def Now I would like to pass someuser.firstname to helper and I would like to get both the value and the attribute name, for example: some_helper_method(someuser.firstname) > "firstname: Joe" some_helper_method(someuser.lastname) > "lastname: Doe"

    Read the article

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