nested

Are nested 'if' statements permitted in vxml?

Are nested 'if' statements permitted? ex: <if cond="1 == 1"> <if cond="2 == 2"> One is in fact equal to one and Two is in fact equal to two <else/> One is in fact equal to one but Two is never not equal to two </if> <else/> One is never not equal to one </if> I realize I could rewrite this condition with an '&&' st...

Passing around command line $args in powershell , from function to function

Hi, This is a nasty issue I am facing. Wont be surprised if it has a simple solution, just that its eluding me. I have 2 batch files which I have to convert to powershell scripts. file1.bat --------- echo %1 echo %2 echo %3 file2.bat %* file2.bat -------- echo %1 echo %2 echo %3 On command line, I invoke this as C:> file1.bat ...

SQL Common Table Expression and an nested select

Group, I am looking for a suggestion to speed up my query. I am using a CTE to organize my data. I am pulling customer records based on account numbers, customertype and length they have been a customer. In the second part of the CTE I say COUNT(AcctNumber) AS Total and then I also want to do an additional nested select that will giv...

Recursively creating an indexbar (UL, LI based)

I'm using awesome_nested_set for my central website structure. I want to be able to build a UL/LI based indexbar off of the nested set but also want it to take advantage of the low database intensiveness of nested set. When I was using acts_as_tree I had a recursive function that built the indexbar. It just called itself if it encountere...

jQuery hover event with nested elements

Hi there, I've currently got your basic, run-of-the-mill menu tree as follows: <ul id="nav"> <li> <a href="#">home</a> <div class="controls">Some controls go here</div> <ul> <li> <a href="#">item 1</a> <div class="controls">Some controls go here</div> </li> <li> <a href="#">item 2</a> <div class="controls">Some co...

jQuery UI Sort disable issue

I have a nested sortable list: <ul class="testSortable"> <li class="ui-state-default" rel="1">What Can I Say? <ul class="testSortable" rel="1"> <li class="ui-state-default" rel="4">Total Divisions <ul class="testSortable" rel="4"></ul> </li> </ul> </li> </ul> I'm trying to mak...

How to handle nested datacontext in the BL?

public class TestBL { public static void AddFolder(string folderName) { using (var ts = new TransactionScope()) { using (var dc = new TestDataContext()) { var folder = new Folder { FolderName = folderName }; dc.Folders.InsertOnSubmit(folder); ...

mass change link in html website

I took over an old HTML based site with all hard coded links, no frames etc. Theres who knows how many pages that have a link to abc.html (<--example). I've been asked to go through the pages and change the abc.html link to 123.html (<--another example). I could download the entire site from via FTP then use find and replace to go...

How to inherit abstract protected nested class in a derived class

I haven't actually done this yet, and maybe I don't need to, but it made sense to me. I have a baseclass, say BaseClass, where I have several derived classes, say Derived1,Derived2,Derived3. I have several operations that apply only to one particular function, namely generating a PDF. My idea was take all of those methods (some are abstr...

Why does my jQuery selector select all anchors inside the list element?

Been struggling with this simple selector problem a couple of hours now and must be missing something obvious. I have a <ul> in which some <li>s have nested <ul>s. Each <li> contains a link and when this is clicked I want to execute a function (rather than navigate), but importantly, this should only happen for the links contained in the...

ASP.Net ListView and event handling.

I have an .ascx which contains a listview. Let's call it the parent. Within its ItemTemplate I reference a second .ascx which is basically another listview, let's call it the child. On the parent, the child control is wrapped in a placeholder tag. I use this place holder tag to show and hide the child. Psuedo code: The child...

jquery callback and nesting problem

Hey guys, I'am really confused and don't know how to get on, probably you can help me :) I'e made an html-page with an menu which loads external content into an div(all done with jquery and ajax-load). If i want to add a second function nothing happens and i'am not sure about the nesting, wheather it's right or not. Here are two func...

How to Store "Nested groups of checkboxes" ?

Hi I have a form (form1) which should gather information from user and save them into DB. In form1, I have 4 different groups: Group1: Operational Costs(Material, Salary, Maintenance) Group2: Selling Costs(Advertisement, Transport, Operational Costs) Group3: Financial Costs (Benefit, Penalty) Every option like Material, Salary, Mainte...

preg match for nested tags

I would like to catch all "dev" tags and their respective content, through php preg_match_all() but can't get the nested ones. data: <dev>aaa</dev> <dev>bbb</dev> <dev> ccc <dev>ddd</dev> </dev> my expression so far: |<dev>(.*)</dev>|Uis thanks, for your help, b. ...

How to split a multidimensional array in PHP?

How can I take a multi-dimensional array like the below, and split it into multiple separate arrays? Additional challenge: Although I know there are two pairs in the example below (pageviews, visits), how can you do it assuming that you don't know the number of pairs in the array? For example, I may want to add "time on page" or "pages v...

Rails: How to modify tests for a nested resource?

While learning Rails I've created an application with a Domains controller nested below a Customers controller. I'm using Rails 2.3.4 and it's been a learning experience. I managed to get the below routing set up: customer_domains GET /customers/:customer_id/domains(.:format) {:controller=>"domains", :action=>"index"} ...

PHP regex matching recursively

Hi I'm trying to match a certain set of tags in a template file. I however want the tags to be able to be nested in itself. My regex is the following: (with /s) <!-- START (.*?) -->(.*?)<!-- END \\1 --> Tag example: <!-- START yList --> y:{yList:NUM} | <!-- START xList --> x:{xList:NUM} <!-- END xList --> <!-- CARET x...

Asp.net MVC Binding an object with properties which are collections of objects which also have child collection properties

Hi, I'm trying to retreive data from a massive form using Asp.net MVC. Its top object L1 contains properties which are Collections of other types L2. However the Type L2 contains some properties which collections of type L3, and so on. There are probably 5 levels of nested collections. I've seen the approach of binding to Lists in Asp....

Rails Complex Form Validations ?

I have a complex form for my Work model. It accepts nested attributes for Credits, Images and Videos. (it is a modified version of Eloy Duran's complex form example) I want to validate presence of at least one Credit I want to validate presence of at least one Image or one Video When I do (in work.rb): validates_presence_of :credits...

jquery: nested tags and hover() not working in IE

hello folks! i have a construction like this: <div id="container"> <span> <span></span> </span> <span> <span></span> </span> </div> i need to catch the mouseout event of the container, so i made jquery do this: $("#container").hover('',function(){ alert("Out"); }); In Firefox / Opera, it only fires the mouseout-function...