Search Results

Search found 7702 results on 309 pages for 'nested includes'.

Page 9/309 | < Previous Page | 5 6 7 8 9 10 11 12 13 14 15 16  | Next Page >

  • ORACLE Fusion Middleware Summer Camps in Lisbon: Includes Advanced ADF Training by Oracle Product Management

    - by Frank Nimphius
    From July 9th - JUly 13th 2012, Frank Nimphius and Grant Ronald from the JDeveloper and ADF Product Management team present an 4 1/2 day advanced ADF Training Lisbon for the EMEA Oracle SOA Community. The training runs in parallel to an advanced WebCenter training giving you a chance to network with your peers during breaks and lunch. See below announcement by the ORACLE EMEA SOA Community for details:For Specialized partners who are working on following projects & opportunities, we (Oracle) offer these advanced summer camps:    ADF 11g     WebCenter Portal     SOA Suite 11g     ADF for BPM Suite 11     WebCenter Sites 11g All training sessions will be from HQ product management and our PTS team. The sessions will take place in July in Lisbon Portugal and Munich Germany. . Participation is limited to two people per company and bootcamp. Registration is handled by first come first serve, please pay attention to the skill requirements, the pre-requisitions and the follow up! We will not accept people onto the training who do not match the criteria!Lisbon: Monday, July 9th 11:00AM - Friday July 13th 16:00 PM (Lisbon time) ADF 11g advanced training by Grant Ronald and Frank Nimphius WebCenter Portal advanced training by Stefan Krantz and Angelo Santagata Cost: Free of charge, cancelation or no-show fee 2.000€Bootcamps are limited to 20 persons first come first serveFor details and registration please visit Lisbon registration page

    Read the article

  • How to show an "or includes" relationship - UML Use case diagram

    - by TheNewBlack
    I haven't come across this issue before and can't find it in my Schaum's Outline UML book and was wondering if someone here could help. I'm making a use case diagram for e-commerce, and in it I want to describe that in order to add a book to your shopping basket, you have to either search products (using the websites search engine) or browse products (using navigation). But the thing is that it can be either one, and not both. Is there a way to show that adding a product to the basket needs to include either this or that? Because otherwise it would look like it needs to include both. Or should I join the two use cases (search products and browse products) into one?

    Read the article

  • please help me understand libraries/includes

    - by fiftyeight
    I'm trying to understand how libraries work. for example I downloaded a tarball and extracted it. Now I do "./configure", it searches in pre-defined directories from what I understand for certain library files. What does it do then? it creates a makefile, and the makefile contains the paths to these libraries? than I do "make", it complies the source code and hard-codes the locations of the libraries? am I correct? I do not really understand if libraries are files with pre-defined paths or the OS somehow gives access to the libraries through system calls. another example, I complied something on my computer than moved it to a remote server, the executable needs mysql libraries to work, the server has mysql but for some reason when execute the file it tells me "can't find libmysqlclient.so.16". is there a solution for this? is there a way to know where is tries to locate this file or give it another path? I can't compile it on the server since it has no compiler and I don't have root access to install packages last question is if in the sequence "./configure","make","make install" the "make install" command is the only one that actually puts files outside the directory in which these files reside? if for example the software will be installed in /usr/local/ is the "make install" command the only one that will require "sudo" before it? let me see if I got it correctly: "./configure" creates the Makefile according to the location of various files on your system. "make" compiles the source code according to this makefile. and "make install" moves the files to their appropriate location. I know this has been very long I thank anyone who had the patience to read my question :)

    Read the article

  • Need a bounding box for CCSprite that includes all children/subchildren

    - by prototypical
    I have a CCSprite that has CCSprite children, and those CCSprite children have CCSprite children. The contentSize property doesn't seem to include all children/subchildren, and seems to only work for the base node. I could write a recursive method to traverse a CCSprite for all children/subchildren and calculate a proper boundingbox, but am curious as to if I am missing something and it's possible to get that information without doing so. I'l be a little surprised if such a method doesn't exist, but I can't seem to find it.

    Read the article

  • Fiction that includes BASIC programs [closed]

    - by Clinton Blackmore
    Back in what must've been the mid-80s, when every microcomputer included BASIC and Choose Your Own Adventure Books were really popular, there were some novels that had BASIC programs listed in the text, for you to type in and further enjoy. For example, as I recall, in one of these books, the adventurers were infiltrating an undersea base (and eventually wiped the bad guy's data storage [I do believe it was a hard drive, even though they were uncommon then]). One of the programs involved a game were you piloted a submarine and had to avoid or shoot sharks. The code was in BASIC; minor changes (such as 'CLS' - 'HOME') had to be made for your specific computer, and it used good old 40-column text-mode to display the action. IIRC, the plot never depended upon the programs. My question is, does anyone else recall these sorts of books? Do you know any titles that I could look for, or of any online? I am toying with the idea of writing a story like this (no, not in BASIC!), and would really like to see how it was done, back in the day.

    Read the article

  • Rails nested attributes with a join model, where one of the models being joined is a new record

    - by gzuki
    I'm trying to build a grid, in rails, for entering data. It has rows and columns, and rows and columns are joined by cells. In my view, I need for the grid to be able to handle having 'new' rows and columns on the edge, so that if you type in them and then submit, they are automatically generated, and their shared cells are connected to them correctly. I want to be able to do this without JS. Rails nested attributes fail to handle being mapped to both a new record and a new column, they can only do one or the other. The reason is that they are a nested specifically in one of the two models, and whichever one they aren't nested in will have no id (since it doesn't exist yet), and when pushed through accepts_nested_attributes_for on the top level Grid model, they will only be bound to the new object created for whatever they were nested in. How can I handle this? Do I have to override rails handling of nested attributes? My models look like this, btw: class Grid < ActiveRecord::Base has_many :rows has_many :columns has_many :cells, :through => :rows accepts_nested_attributes_for :rows, :allow_destroy => true, :reject_if => lambda {|a| a[:description].blank? } accepts_nested_attributes_for :columns, :allow_destroy => true, :reject_if => lambda {|a| a[:description].blank? } end class Column < ActiveRecord::Base belongs_to :grid has_many :cells, :dependent => :destroy has_many :rows, :through => :grid end class Row < ActiveRecord::Base belongs_to :grid has_many :cells, :dependent => :destroy has_many :columns, :through => :grid accepts_nested_attributes_for :cells end class Cell < ActiveRecord::Base belongs_to :row belongs_to :column has_one :grid, :through => :row end

    Read the article

  • How can I identify an element from a list within another list

    - by Alex
    I have been trying to make a block of code that finds the index of the largest bid for each item. Then I was going to use the index as a way to identify the person who paid that much moneys name. However no matter what i try I can't link the person and what they have gained from the auction together. Here is the code I have been writing: It has to be able to work with any information inputted def sealedBids(): n = int(input('\nHow many people are in the group? ')) z = 0 g = [] s = [] b = [] f = [] w = []#goes by number of items q = [] while z < n: b.append([]) z = z + 1 z = 0 while z < n: g.append(input('Enter a bidders name: ')) z = z + 1 z = 0 i = int(input('How many items are being bid on?')) while z < i: s.append(input('Enter the name of an item: ')) w.append(z) z = z + 1 z = 0 for j in range(n):#specifies which persons bids your taking for k in range(i):#specifies which item is being bid on b[j].append(int(input('How much money has {0} bid on the {1}? '.format(g[j], s[k])))) print(' ') for j in range(n):#calculates fair share f.append(sum(b[j])/n) for j in range(i):#identifies which quantity of money was the largest for each item for k in range(n): if w[j] < b[k][j]: w[j] = b[k][j] q.append(k) any advice is much appreciated.

    Read the article

  • How do you convert a parent-child (adjacency) table to a nested set using PHP and MySQL?

    - by mrbinky3000
    I've spent the last few hours trying to find the solution to this question online. I've found plenty of examples on how to convert from nested set to adjacency... but few that go the other way around. The examples I have found either don't work or use MySQL procedures. Unfortunately, I can't use procedures for this project. I need a pure PHP solution. I have a table that uses the adjacency model below: id parent_id category 1 0 ROOT_NODE 2 1 Books 3 1 CD's 4 1 Magazines 5 2 Books/Hardcover 6 2 Books/Large Format 7 4 Magazines/Vintage And I would like to convert it to a Nested Set table below: id left right category 1 1 14 Root Node 2 2 7 Books 3 3 4 Books/Hardcover 4 5 6 Books/Large Format 5 8 9 CD's 6 10 13 Magazines 7 11 12 Magazines/Vintage Here is an image of what I need: I have a function, based on the pseudo code from this forum post (http://www.sitepoint.com/forums/showthread.php?t=320444) but it doesn't work. I get multiple rows that have the same value for left. This should not happen. <?php /** -- -- Table structure for table `adjacent_table` -- CREATE TABLE IF NOT EXISTS `adjacent_table` ( `id` int(11) NOT NULL AUTO_INCREMENT, `father_id` int(11) DEFAULT NULL, `category` varchar(128) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; -- -- Dumping data for table `adjacent_table` -- INSERT INTO `adjacent_table` (`id`, `father_id`, `category`) VALUES (1, 0, 'ROOT'), (2, 1, 'Books'), (3, 1, 'CD''s'), (4, 1, 'Magazines'), (5, 2, 'Hard Cover'), (6, 2, 'Large Format'), (7, 4, 'Vintage'); -- -- Table structure for table `nested_table` -- CREATE TABLE IF NOT EXISTS `nested_table` ( `id` int(11) NOT NULL AUTO_INCREMENT, `lft` int(11) DEFAULT NULL, `rgt` int(11) DEFAULT NULL, `category` varchar(128) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; */ mysql_connect('localhost','USER','PASSWORD') or die(mysql_error()); mysql_select_db('DATABASE') or die(mysql_error()); adjacent_to_nested(0); /** * adjacent_to_nested * * Reads a "adjacent model" table and converts it to a "Nested Set" table. * @param integer $i_id Should be the id of the "root node" in the adjacent table; * @param integer $i_left Should only be used on recursive calls. Holds the current value for lft */ function adjacent_to_nested($i_id, $i_left = 0) { // the right value of this node is the left value + 1 $i_right = $i_left + 1; // get all children of this node $a_children = get_source_children($i_id); foreach ($a_children as $a) { // recursive execution of this function for each child of this node // $i_right is the current right value, which is incremented by the // import_from_dc_link_category method $i_right = adjacent_to_nested($a['id'], $i_right); // insert stuff into the our new "Nested Sets" table $s_query = " INSERT INTO `nested_table` (`id`, `lft`, `rgt`, `category`) VALUES( NULL, '".$i_left."', '".$i_right."', '".mysql_real_escape_string($a['category'])."' ) "; if (!mysql_query($s_query)) { echo "<pre>$s_query</pre>\n"; throw new Exception(mysql_error()); } echo "<p>$s_query</p>\n"; // get the newly created row id $i_new_nested_id = mysql_insert_id(); } return $i_right + 1; } /** * get_source_children * * Examines the "adjacent" table and finds all the immediate children of a node * @param integer $i_id The unique id for a node in the adjacent_table table * @return array Returns an array of results or an empty array if no results. */ function get_source_children($i_id) { $a_return = array(); $s_query = "SELECT * FROM `adjacent_table` WHERE `father_id` = '".$i_id."'"; if (!$i_result = mysql_query($s_query)) { echo "<pre>$s_query</pre>\n"; throw new Exception(mysql_error()); } if (mysql_num_rows($i_result) > 0) { while($a = mysql_fetch_assoc($i_result)) { $a_return[] = $a; } } return $a_return; } ?> This is the output of the above script. INSERT INTO nested_table (id, lft, rgt, category) VALUES( NULL, '2', '5', 'Hard Cover' ) INSERT INTO nested_table (id, lft, rgt, category) VALUES( NULL, '2', '7', 'Large Format' ) INSERT INTO nested_table (id, lft, rgt, category) VALUES( NULL, '1', '8', 'Books' ) INSERT INTO nested_table (id, lft, rgt, category) VALUES( NULL, '1', '10', 'CD\'s' ) INSERT INTO nested_table (id, lft, rgt, category) VALUES( NULL, '10', '13', 'Vintage' ) INSERT INTO nested_table (id, lft, rgt, category) VALUES( NULL, '1', '14', 'Magazines' ) INSERT INTO nested_table (id, lft, rgt, category) VALUES( NULL, '0', '15', 'ROOT' ) As you can see, there are multiple rows sharing the lft value of "1" same goes for "2" In a nested-set, the values for left and right must be unique. Here is an example of how to manually number the left and right ID's in a nested set: UPDATE - PROBLEM SOLVED First off, I had mistakenly believed that the source table (the one in adjacent-lists format) needed to be altered to include a source node. This is not the case. Secondly, I found a cached page on BING (of all places) with a class that does the trick. I've altered it for PHP5 and converted the original author's mysql related bits to basic PHP. He was using some DB class. You can convert them to your own database abstraction class later if you want. Obviously, if your "source table" has other columns that you want to move to the nested set table, you will have to adjust the write method in the class below. Hopefully this will save someone else from the same problems in the future. <?php /** -- -- Table structure for table `adjacent_table` -- DROP TABLE IF EXISTS `adjacent_table`; CREATE TABLE IF NOT EXISTS `adjacent_table` ( `id` int(11) NOT NULL AUTO_INCREMENT, `father_id` int(11) DEFAULT NULL, `category` varchar(128) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ; -- -- Dumping data for table `adjacent_table` -- INSERT INTO `adjacent_table` (`id`, `father_id`, `category`) VALUES (1, 0, 'Books'), (2, 0, 'CD''s'), (3, 0, 'Magazines'), (4, 1, 'Hard Cover'), (5, 1, 'Large Format'), (6, 3, 'Vintage'); -- -- Table structure for table `nested_table` -- DROP TABLE IF EXISTS `nested_table`; CREATE TABLE IF NOT EXISTS `nested_table` ( `lft` int(11) NOT NULL DEFAULT '0', `rgt` int(11) DEFAULT NULL, `id` int(11) DEFAULT NULL, `category` varchar(128) DEFAULT NULL, PRIMARY KEY (`lft`), UNIQUE KEY `id` (`id`), UNIQUE KEY `rgt` (`rgt`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; */ /** * @class tree_transformer * @author Paul Houle, Matthew Toledo * @created 2008-11-04 * @url http://gen5.info/q/2008/11/04/nested-sets-php-verb-objects-and-noun-objects/ */ class tree_transformer { private $i_count; private $a_link; public function __construct($a_link) { if(!is_array($a_link)) throw new Exception("First parameter should be an array. Instead, it was type '".gettype($a_link)."'"); $this->i_count = 1; $this->a_link= $a_link; } public function traverse($i_id) { $i_lft = $this->i_count; $this->i_count++; $a_kid = $this->get_children($i_id); if ($a_kid) { foreach($a_kid as $a_child) { $this->traverse($a_child); } } $i_rgt=$this->i_count; $this->i_count++; $this->write($i_lft,$i_rgt,$i_id); } private function get_children($i_id) { return $this->a_link[$i_id]; } private function write($i_lft,$i_rgt,$i_id) { // fetch the source column $s_query = "SELECT * FROM `adjacent_table` WHERE `id` = '".$i_id."'"; if (!$i_result = mysql_query($s_query)) { echo "<pre>$s_query</pre>\n"; throw new Exception(mysql_error()); } $a_source = array(); if (mysql_num_rows($i_result)) { $a_source = mysql_fetch_assoc($i_result); } // root node? label it unless already labeled in source table if (1 == $i_lft && empty($a_source['category'])) { $a_source['category'] = 'ROOT'; } // insert into the new nested tree table // use mysql_real_escape_string because one value "CD's" has a single ' $s_query = " INSERT INTO `nested_table` (`id`,`lft`,`rgt`,`category`) VALUES ( '".$i_id."', '".$i_lft."', '".$i_rgt."', '".mysql_real_escape_string($a_source['category'])."' ) "; if (!$i_result = mysql_query($s_query)) { echo "<pre>$s_query</pre>\n"; throw new Exception(mysql_error()); } else { // success: provide feedback echo "<p>$s_query</p>\n"; } } } mysql_connect('localhost','USER','PASSWORD') or die(mysql_error()); mysql_select_db('DATABASE') or die(mysql_error()); // build a complete copy of the adjacency table in ram $s_query = "SELECT `id`,`father_id` FROM `adjacent_table`"; $i_result = mysql_query($s_query); $a_rows = array(); while ($a_rows[] = mysql_fetch_assoc($i_result)); $a_link = array(); foreach($a_rows as $a_row) { $i_father_id = $a_row['father_id']; $i_child_id = $a_row['id']; if (!array_key_exists($i_father_id,$a_link)) { $a_link[$i_father_id]=array(); } $a_link[$i_father_id][]=$i_child_id; } $o_tree_transformer = new tree_transformer($a_link); $o_tree_transformer->traverse(0); ?>

    Read the article

  • maven-jar-plugin includes vs excludes

    - by Chris Williams
    I've got an existing pom file that includes a maven-jar-plugin section. It runs for the test-jar goal and is currently excluding a few directories: <excludes> <exclude>...</exclude> <exclude>...</exclude> <exclude>somedir/**</exclude> </excludes> I need to include a file in the somedir directory but leave out the rest of the files in the somedir directory. I've read that includes have precedence over excludes so I added something like the following (there was no includes section before): <includes> <include>somedir/somefile.xml</include> </includes> This ends up creating a jar file for test with only a few files in it (just the stuff in META-INF). The file that I included is not in the jar either. What I'd expect is a jar that is identical to the jar that was created before my includes change with the one additional file. What am I missing here?

    Read the article

  • Are nested classes under-rated?

    - by Aaron Anodide
    I'm not trying to say I know something everyone else doesn't but I've been solving more and more designs with the use of nested classes, so I'm curious to get a feeling for the acceptablilty of using this seemingly rarely used design mechanism. This leads me to the question: am I going down an inherintly bad path for reasons I'll discover when they come back to bite me, or are nested classes maybe something that are underrated? Here are two examples I just used them for: https://gist.github.com/3975581 - the first helped me keep tightly releated heirarchical things together, the second let me give access to protected members to workers...

    Read the article

  • YAML front matter for Jekyll and nested lists

    - by motleydev
    I have a set of nested yaml lists with something like the following: title: the example image: link.jpg products: - top-level: Product One arbitrary: Value nested-products: - nested: Associated Product sub-arbitrary: Associated Value - top-level: Product Two arbitrary: Value - top-level: Product Three arbitrary: Value I can loop through the products with no problem using for item in page.products and I can use a logic operator to determine if nested products exist - what I CAN'T do is loop through multiple nested-products per iteration of top-level I have tried using for subitem in item and other options - but I can't get it to work - any ideas?

    Read the article

  • unwanted space before and after nested html table using Internet Explorer 8

    - by John
    I have an html table nested in an html table cell. I want the nested table to use the full size of the cell it is nested in. When I use firefox or google chrome I get the result I want but when I use Internet Explorer 8 (even if I use td style="height="100%") the height of the nested cell depends on it's content. As a result I get whitespace before and after my nested table.

    Read the article

  • Organizing PHP includes in your development environment

    - by Andrew Heath
    I'm auditing my site design based on the excellent Essential PHP Security by Chris Shiflett. One of the recommendations I'd like to adopt is moving all possible files out of webroot, this includes includes. Doing so on my shared host is simple enough, but I'm wondering how people handle this on their development testbeds? Currently I've got an XAMPP installation configured so that localhost/mysite/ matches up with D:\mysite\ in which includes are stored at D:\mysite\includes\ In order to keep include paths accurate, I'm guess I need to replicate the server's path on my local disk? Something like D:\mysite\public_html\ Is there a better way?

    Read the article

  • javancss includes problem

    - by senzacionale
    <javancss srcdir="C:\Projekti\KIS\Model\src" generateReport="true" includes="**/*.java" outputfile="docs/javancss_metrics.xml" format="xml" /> if i use includes="*/.java" then no metrics are calculated. If i delete includes then works. Any idea why?

    Read the article

  • Can regular expressions be used to match nested patterns?

    - by Richard Dorman
    Is it possible to write a regular expression that matches a nested pattern that occurs an unknown number of times. For example, can a regular expression match an opening and closing brace when there are an unknown number of open closing braces nested within the outer braces. For example: public MyMethod() { if (test) { // More { } } // More { } } // End Should match: { if (test) { // More { } } // More { } }

    Read the article

  • Apache2 Enabling Includes module causes svn access to quit working

    - by Matthew Talbert
    I have dav_svn installed to provide http access to my svn repos. The url is directly under root, eg mywebsite.com/svn/individual-repo. This setup has been working great for some time. Now, I need SSI (server-side includes) for a project, so I enabled this module with a2enmod include. Now, tortoisesvn can't access the repo; it always returns a 301 permanent redirect. Some playing with it reveals I can access it in a browser if I'm sure to include the trailing / but it still doesn't work in TortoiseSVN. I've looked at all of the faq's for this problem with TortoiseSVN and apache, and none of them seem to apply to my problem. Anyone have any insight into this problem? I'm running Ubuntu 9.10 with Apache 2.2.12. The only change I've made to my configuration is to enable the includes mod. Here's my dav_svn conf: <Location /svn> DAV svn SVNParentPath /home/matthew/svn AuthType Basic AuthName "Subversion repository" AuthUserFile /etc/subversion/passwd Require valid-user </Location> and here's the relevant part of my virtual host conf: <Location /svn> SetHandler None Order allow,deny Allow from all </Location> Edit: OK, I've discovered that the real conflict is between the include module and basic authentication. That is, if I disable the include module, browse to the subversion repo, enter my user/pass for the basic authentication, I can browse it just fine. It even continues to work after I re-enable the include module. However, if I browse with another browser where I'm not already authenticated, then it no longer works.

    Read the article

  • How to number nested ordered lists.

    - by Wes
    Is there any way through CSS to style nested ordered lists to display sub numbers? The idea is similar to using heading levels. However what I'd really like to see is the following. Note each of these subsections has text not just a title. This isn't a real example just some organisational stuff. Now I know I can use <h1>-<h6> but nested lists would be much clearer and allow for different indentation styling. Also it would be symentically correct. Note I don't think that <h1>-<h6> are correct in many ways as the name doesn't apply to the whole section. 1 Introduction. 1.1 Scope Blah Blah Blah Blah Blah Blah 1.2 Purpose Blah Blah Blah Blah Blah Blah 2 Cars Blah Blah Blah Blah Blah Blah 2.1 engines sub Blah Blah Blah sub Blah Blah Blah 2.2 Wheels ... ... 2.10.21 hub caps sub-sub Blah Blah Blah sub-sub Blah Blah Blah 2.10.21.1 hub cap paint sub-sub-sub Blah Blah Blah sub-sub-sub Blah Blah Blah 3 Planes 3.1 Commercial Airlines. ... ... 212 Glossary

    Read the article

  • Can someone describe the nested set model from a C#/LINQ perspective?

    - by Chad
    I know the nested set model doesn't pertain to the C# language or LINQ directly... it's what I'm using to develop my web app. For hierarchical data (categories with sub-categories in my case), I'm currently using something similar to the Adjacency List model. At the moment, I've only got 2 levels of categories, but I'd like to take it further and allow for n levels of categories using the nested set model. I'm not quite clear on how to use it in a C# context. Here's the article I'm reading on the nested set model. Though this article cleared up my confusion some, I still have a big ?? in my head: - Is inserting, updating or deleting categories tedious? It looks like the left and right numbers would require re-numbering... what would the LINQ queries look like for the following scenarios? Delete a child node (re-number all node's left/right values) Delete a parent node (what do you do with the orphans?) Move a child node to a different parent node (renumber again) If my understanding is correct, at all times the child node's left/right values will always be between the parent node's left/right values, am I correct? Seems easy enough, if only the categories were static... most likely I need to spend more time to get my head around the concept. Any help is greatly appreciated!

    Read the article

  • Should nested attributes be automatically deleted when I delete the parent record?

    - by brad
    I'm playing around with nested forms in attributes and have a model Invoice that has_many invoice_phone_numbers. I have the following line in my invoice.rb model file accepts_nested_attributes_for :invoice_phone_numbers, :allow_destroy => true, :reject_if => proc { |attrs| attrs.all? { |k, v| v.blank? } } This does what it should and I can delete invoice_phone_numbers from the form by selecting their 'delete' checkbox. But when I delete an Invoice, I have noticed that the nested invoice_phone_numbers are not also deleted. This causes problems as rails seems to reuse id numbers in the Invoice model (Should it? Does this depend on the database? I'm using SQLite3) so phone numbers from previous invoices turn up in new invoices after they have been created. Anyway, my question is should the nested attributes be deleted when I delete the parent attribute? Is there a way to make this happen automatically as part of the nesting process or do I need to deal with this in my invoice model? If so, what is the best way to do this? I would try to go about this with a before_destroy callback but want to know if this is the best way to do this. Anyway, thanks.

    Read the article

  • PHP Nested classes work... sort of?

    - by SeanJA
    So, if you try to do a nested class like this: //nestedtest.php class nestedTest{ function test(){ class E extends Exception{} throw new E; } } You will get an error Fatal error: Class declarations may not be nested in [...] but if you have a class in a separate file like so: //nestedtest2.php class nestedTest2{ function test(){ include('e.php'); throw new E; } } //e.php class E Extends Exception{} So, why does the second hacky way of doing it work, but the non-hacky way of doing it does not work?

    Read the article

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