nested

Selecting a node in the nested set model through a not-unique name

Hello, I am trying to manage the retrieval of a node in a nested set model table, not through the unique ID, but through the name (a string), and other nodes within the tree under different parents may be called the same way. As far as now I used an unique ID to get nodes inside the nested sets: SELECT node.name, node.lft, node.r...

How do I recover STDIN from a perl script that was called from a csh script?

I have a terrible nested script structure I am maintaining that takes user input from the keyboard periodically and I am trying to write a script that will automate this input. Essentially, the script structure looks like this: cmd1.csh takes 3 lines of input and then calls cmd2.csh, then exits normally cmd2.csh calls cmd3.pl twice an...

How to nest snippets in IBM Rational Developer?

Problem background: I have been set to the task of converting a bunch of old code-piece-files to snippets and have noticed that many of them contain the same piece of code, witch should then logically be put in a snippet of it's own as there whould otherwise be a lot of places to change, if (when) that piece of code changes. What I want...

Can content page use ContentPlaceHolderID of master parent of its master page (nested master pages)

I have a 3 level nested master pages and a content page. parent1 is the top parent, parent2 is parent of parent3 and parent3 is the parent of the content page. I get an error 'Cannot find ContentPlaceHolder xxx...' where xxx is a ContentPlaceholder. It resides in parent2 and content page is trying to fill it. Can content pages only u...

Binding property inside nested class in Silverlight

Is it possible to bind property of the nested class in Silverlight? I have code that looks like this: public class A { public class B { public String Prop1 { get; set; } } } I want to assign a key for class B in xaml but I don't know how to do it. I tried something like this, <controls:ChildWindow.Resources> <loc...

Should I use nested subroutines in Perl?

I have 5 Perl files that are verification scripts for 5 different states of my environment. Each of them has at least a couple of subroutines. Till now, the number of states was limited to 5 and these worked fine. But now, I have like 20 more states of the environment and hence 20 more Perl scripts according to the current design. I wa...

Nested Set Filtering

Hi, I'm using nested set model for my menu tree, and I'm trying to get nodes with some filtering. I have several root nodes. Example: Menu1(on) \-Submenu1(on) \-Submenu2(on) Menu2(off) \-Submenu3(on) \-Submenu4(on) \-Submenu5(on) Menu3(on) I want to return all nodes "on" but not the ones that have parents "off". The query, f...

MYSQL DB- How to transform NESTED SETS to XML?

Hi, I'd need a MySQL query to transform my nested sets structure into XML. (no PHP) The Problem is how to close all tags correct. My method of resolution: 1) Find leaves 2) Make a "TAG"-string (group_concat) and make it shorter with level This is running: A[01,16] B[02,03] C[...

Custom reverse of a list in Prolog

Hello, I am trying to write a predicate that given the following list in Prolog: [[1,a,b],[2,c,d],[[3,e,f],[4,g,h],[5,i,j]],[6,k,l]] will produce the following list: [[6,k,l],[[5,i,j],[4,g,h],[3,e,f]],[2,c,d],[1,a,b]] As you can see I would like to preserve the order of the elements at the lowest level, to produce elements in the ...

How do you initialize a static templated container?

Hi, I'm trying to figure out the correct way of initializing a static container variable whose template value is a private inner class. Here's a toy example #include <vector> using namespace std; template <class myType> class Foo { private: class Bar { int x; }; static vector<Bar*> bars; }; template <class myT...

jquery: mouseout applies to nested elements

ul with links nested in a div layer. mouse pointer goes over .title, ul is shown. the problem: mouseout() applies to nested elements mouseout() is for the div <div> <a class="title">Section A</a> <ul> <li><a href=''>link 1</a></li> <li><a href=''>link 2</a></li> <li><a href=''>link 3</a></li> ...

Rowspan or nested? Create a table itextsharp

I've been searching about how to merge two cells and I've found two answers Rowspan and Nested. I can't make my table with those two functions because I don't know how to merge cells at the begining and at the end. I've been trying many ways but this is driving me crazy. The table I want to make has 9 columns and 3 rows. So, I want the ...

Need help speeding up this jQuery process

Hi, I've created the following process. Basically it loops through a gigantic unordered list with multiple level nested lists and creates a 2 level nested unordered list. It works well but is very slow in IE7. FireFox and Safari have no big problems with it. Not very good at jQuery I was wondering if I could speed up this by using bette...

Associating users with nested models in rails

I just added users to my app using Authlogic and CanCan. I just have a quick question about best practices for associating users to my other models. I have 3 models that are nested within each other with one-to-many associations like this: SENTENCE > WORD > LETTER So a sentence has many words, and a word has many letters. I am just ...

How do I insert a new record into a nested child GridView in ASP.NET & VB?

I have a 2 tiered nested GridView in ASP.NET and I'm trying to insert a new record into the child GridView. I am able to Add/Remove/Edit records in the parent table but the child table is connected to my SQL database through the code-behind, so I am unable to use the SqlDataSource control like with the parent table. I have searched aro...

Rails - Saving Nested Arrays

I was able to create nested arrays in my view to post to my 'create' action. But I'm not sure how to save the nested array. Here's the basic create action where it gets all individual params bunched in mass-assigned params: def create @post = Post.new(params[:mass_assigned]) respond_to do |format| if @post.save format.htm...

PHP / Mongo: how do you update nested data?

I've been playing around with Mongo for about a week now and I still can't work out how to modify nested arrays in Mongo with php. So here is a sample document... array ( '_id' => new MongoId("4cb30f560107ae9813000000"), 'email' => '[email protected]', 'firstname' => 'Maurice', 'lastname' => 'Campobasso', 'password' =...

Rails - Iterating through nested arrays

Hi I'm very new to rails and need some help on iterating through nested arrays. I'm trying to figure out how to do mass-inserts for each values that is different between the make, model and color of cars. The params that are pass are: "make" => ["Honda", "Honda"], "model" => ["Civic", "Accord"], "color" => [{"Black", "White", "Red"}, {...

Nested form in rails 2.3 which updates one model but creates the other

So I have 2 models, listings, and houses. Houses can be made independently, while all listings must be associated with a house (this a an apartment-finding site). I am trying to build a form for a new listing which has a column alongside of houses already in the database. If the user sees their house, they click it, and the form auto-fil...

Referencing a typedef as its struct counterpart.

Ok guys, we all know there are all lot of typedef/struct questions out there, but I feel this one is a bit of a mind bender. I'm simulating the neighbor interactions of a crystal lattice using strictly C. I have a struct called "ball_struct" which I typedef'ed as just "ball". The struct contains a pointer to a list of ball_structs (sin...