nested

How to Match The Inner Possible Result With Regular Expressions

I have a regular expression to match anything between { and } in my string. "/{.*}/" Couldn't be simpler. The problem arises when I have a single line with multiple matches. So if I have a line like this: this is my {string}, it doesn't {work} correctly The regex will match {string}, it doesn't {work} rather than ...

How to access nested elements in struts2 with foreach tag ?

Hello there. I have the following problem in Struts 2. Let's assume i have a class like this class User { private String name; private String address; public String getName() { return name;} public String getAddress() { return address;} } and a list of users available on ValueStack named : users and a...

MySQL conditonal query inside where clause

I'm not sure if I'm missing something really obvious, but I keep getting a syntax error on this query. Even if I AM missing something obvious, I'd like to know if there is a smarter way of getting what I'm after. Basically, the query asks for any rows tied to a user with a start_date between Monday and Friday. That works great. But then...

How to programatically get the nested components from a Struts2 tag?

How can i get all the nested tag elements from a struts2 tag? for instance text and checkbox tags from form tag?: <s:form> <s:text .../> <s:checkbox .../ <s:form> I know that form is a tag defined in strust-tags.tld and it extends the org.apache.struts2.views.jsp.ui.FormTag, but how does it goes behind the scene to get the nested t...

Silverlight: Nested containers and Binding

The Scenario Bit: On one of the controls within my Silverlight application I have embedded a custom user control. Within this embedded control is another custom user control that contains a datagrid. I would like to use binding to populate the datagrid. Easy enough I just sepcificy a collection that is in the DataContext of the parent c...

impossible IE7 Z-Index, nested element bug!

http://ec4u.dev.creative-ctrl.com/product/wallys-natural-100-beeswax-ear-candles-12pk Check it. cannot get .menu ul to render for the life of me!! strange enough, it renders in ie6, ie8, safari, and ff, but not ie7! I've tried everything. Any ideas? (I'm pretty close to xhtml strict validation too). ...

How Can I Nest Custom XAML Elements?

<Window x:Class="WpfApplication1.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:WpfApplication1" Title="Window1"> <Grid> <local:ElementType x:Name="FirstElementName"> <local:ElementType x:N...

combinations: avoiding multiple nested foreach

When you need to check/have combinations of array elements, how can you avoid nesting foreach? Example code: $as = array($optionA1, $optionA2) $bs = array($optionB1, $optionB2) $cs = array($optionC1, $optionC2) foreach ($as as $a) { foreach ($bs as $b) { foreach ($cs as $c) { $result = $this->method($a, $b, $c); ...

How do I do nested transactions in NHibernate?

Can I do nested transactions in NHibernate, and how do I implement them? I'm using SQL Server 2008, so support is definitely in the DBMS. I find that if I try something like this: using (var outerTX = UnitOfWork.Current.BeginTransaction()) { using (var nestedTX = UnitOfWork.Current.BeginTransaction()) { ... do stuff ...

Problem with cakePhp and nested ajax form in firefox 3.5

Hi, Is it possible to have a nested ajax form in cakephp and firefox ? i.e. $ajax->form(form1...) table row $ajax->form(childForm_rowId) $form->end(childForm_rowId) endrow end table $form->end I found this works in IE7, but not in Firefox 3.5.1 Firefox will omit the childForm declaration, so the child ...

Should I avoid nested if statements in Perl?

Hi, I'm doing some Perl and seeing my nested "if" statements is driving me mad. I managed to reduce some of them with guard blocks in another section, but I'm stuck here. Do you think I may leave the code as is, or is there a "proper" way to refactor the following ? (I also admit being relatively new to Perl) This is actually a subro...

Turning nested JSON into an HTML nested list with Javascript...

Hi Everyone, I'm fairly new to using JSON (as opposed to XML) and am currently working purely with Javascript to digest, parse and display my returned JSON data. I'm using the JSON2.js library and am getting back some valid JSON data representing a fairly simple nested list: { "node":{ "class":"folder", "title":"Test Framewo...

BizTalk mapping, nested collections of elements, help needed

Hi I have a schema that contains the details for an order. Within the schema, I have a collection of line items containing details of each item within the order. Schema is similar to the following structure. Order SaleItems SaleItem OrderID Price Quantity etc. I have a requ...

wpf binding a combobox to an enum nested in a class

I have been going crazy with binding a combobox to an enum typed property of a class, where the enum itself is declared in that same class. I am trying to follow the answer provided here (wpf combobox binding to enum what i did wrong?) Specifically I am using the suggested MarkupExtension code and the matching xaml code. My working c...

Nested JPanel resizing problem.

I have two JPanels (let's call these Panel1 and Panel2). These panels are of the same width, but varying heights. I want to put these JPanels into one big JPanel (lets call it Panel0), and stack them on top of each other (I decided to set Panel0's layout as GridLayout(0,1)). The problem, is that both nested panels (panels 1 and 2) end...

Classes nested in functions and attribute lookup

Hi all! The following works Ok, i.e. it doesn't give any errors: def foo(arg): class Nested(object): x = arg foo('hello') But the following throws an exception: def foo(arg): class Nested(object): arg = arg # note that names are the same foo('hello') Traceback: Traceback (most recent call last): File "...

Load only once the tables when you update their views in VS2005

I'm using two tables from a MySQL db (let's call them db1, db2) and I have to display different views for them that are linked with each other with nested relations (using VS2005 + ADO.NET Connector). What I have been doing till now was adding new table adapters for each different view, many of which contain a lot of IF statement and gen...

Nested Silverlight Datagrid - Row Details works great, but I want a button!

I'm using a silverlight 3 datagrid, and within it, I'm nesting related records in another control by using the rowdetails (visibilitymode = visiblewhenselected). I really like how this works, but I'd much rather have the grid display the row details when a "+" button is pressed, much as a tree will expand when you click a node. I tried...

Nested arrays in Objective-C ( NSMutableArray )

Hi, I'm trying to build a nested array: First, I make a "PlayerItems" array which will contain 10 arrays, each containing item objects, corresponding to the inventories of each player in the game. On the indicated line, I get the following error: error: void valued not ignored as it ought to be What is the void value here? If I use...

How would I do a nested sort in MATLAB?

I am looking to do a nested sort with a matrix in MATLAB. Say my matrix looks like this: [b a; b c; a c; a a] I would like to first sort by the first column and maintain that sort, then sort by the second column. The result would be: [a a; a c; b a; b c] How would it be done? ...