Search Results

Search found 3 results on 1 pages for 'beachhouse'.

Page 1/1 | 1 

  • Can I redefine an XML element definition?

    - by joe
    For example, I would like to include <feetFromWater> in my <house> element. But here is the catch... I would like to keep the element name <house> and I do not want to modify the original definition. FILE: baseProperty.mod <!ELEMENT house (%size;%stories;)> <!ATTLIST house %univ-atts; outputclass CDATA #IMPLIED > FILE: beachHouse.mod (This file references baseProperty.mod) <!ELEMENT beachHouse (%size;%stories;%feetFromWater)> <!ATTLIST beachHouse %univ-atts; outputclass CDATA #IMPLIED > Is there a way to do the following without renaming from <house> to <beachHouse>?

    Read the article

  • Clarification on ZVals

    - by Beachhouse
    I was reading this: http://www.dereleased.com/2011/04/27/the-importance-of-zvals-and-circular-references/ And there's an example that lost me a bit. $foo = &$bar; $bar = &$foo; $baz = 'baz'; $foo = &$baz; var_dump($foo, $bar); /* string(3) "baz" NULL */ If you’ve been following along, this should make perfect sense. $foo is created, and pointed at a ZVal location identified by $bar; when $bar is created, it points at the same place $foo was pointed. That location, of course, is null. When $foo is reassigned, the only thing that changes is to which ZVal $foo points; if we had assigned a different value to $foo first, then $bar would still retain that value. I learned to program in C. I understand that PHP is different and it uses ZVals instead of memory locations as references. But when you run this code: $foo = &$bar; $bar = &$foo; It seems to me that there would be two ZVals. In C there would be two memory locations (and the values would be of the opposite memory location). Can someone explain?

    Read the article

  • Adding dynamic business logic/business process checks to a system

    - by Jordan Reiter
    I'm wondering if there is a good extant pattern (language here is Python/Django but also interested on the more abstract level) for creating a business logic layer that can be created without coding. For example, suppose that a house rental should only be available during a specific time. A coder might create the following class: from bizlogic import rules, LogicRule from orders.models import Order class BeachHouseAvailable(LogicRule): def check(self, reservation): house = reservation.house_reserved if not (house.earliest_available < reservation.starts < house.latest_available ) raise RuleViolationWhen("Beach house is available only between %s and %s" % (house.earliest_available, house.latest_available)) return True rules.add(Order, BeachHouseAvailable, name="BeachHouse Available") This is fine, but I don't want to have to code something like this each time a new rule is needed. I'd like to create something dynamic, ideally something that can be stored in a database. The thing is, it would have to be flexible enough to encompass a wide variety of rules: avoiding duplicates/overlaps (to continue the example "You already have a reservation for this time/location") logic rules ("You can't rent a house to yourself", "This house is in a different place from your chosen destination") sanity tests ("You've set a rental price that's 10x the normal rate. Are you sure this is the right price?" Things like that. Before I recreate the wheel, I'm wondering if there are already methods out there for doing something like this.

    Read the article

1