nested

Remove all nested blocks, whilst leaving non-nested blocks alone via python

Source: [This] is some text with [some [blocks that are nested [in a [variety] of ways]]] Resultant text: [This] is some text with I don't think you can do a regex for this, from looking at the threads at stack overflow. Is there a simple way to to do this -> or must one reach for pyparsing (or other parsing library)? ...

What is the execution sequence of Nested Master Pages ?

Are Nested Master pages difficult to maintain ? Further what is the cycle of its execution ?... it would help me a lot in testing... i read about master pages from http://jai-on-asp.blogspot.com/2009/12/master-pages-in-aspnet-35.html ...

ASP.NET: Proper implementation of nested API calls using connection pool and nested transactions

I need to know the best way to do the following. I have nested business level APIs (say level 1 & level 2). L1 needs to call L2. Both APIs use the database layer directly at their own nesting levels. Now, in the database layer, I fetch the db connection from the pool each time as follows: SqlConnection conn = new SqlConnection(conn...

Nested Scopes and Lambdas

def funct(): x = 4 action = (lambda n: x ** n) return action x = funct() print(x(2)) # prints 16 ... I don't quite understand why 2 is assigned to n automatically? ...

Nested functions in Python

def maker(n): def action(x): return x ** n return action f = maker(2) print(f) print(f(3)) print(f(4)) g = maker(3) print(g(3)) print(f(3)) # still remembers 2 ... why does the nested function remembers the first value (2) even though maker() has returned and exited by the time we call action()? ...

JQuery: Get tag content excluding nested tags

I've got some HTML like the following: <span id="A">Text I'm interested in <span id="B">Other crap I don't care about</span> </span> I'm looking to get the text content of span "A" excluding any nested tags (i.e. the content of span "B" in the above example). I'm trying to get the text content, not the HTML content. Also, in my part...

Real-world examples of nested functions

I asked previously how the nested functions work, but unfortunately I still don't quite get it. To understand it better, can someone please show some real-wold, practical usage examples of nested functions? Many thanks ...

Comparing Python nested lists

I have two nested lists, each nested list containing two strings e.g.: list 1 [('EFG', '[3,4,5]'), ('DEF', '[2,3,4]')] and list 2 [('DEF', '[2,3,4]'), ('FGH', '[4,5,6]')] I would like to compare the two lists and recover those nested lists which are identical with each other. In this case only ('DEF','[2,3,4]') would be returned. Th...

Using python's map() with multiple args?

Okay, so I've got a piece of Python code which really needs optimizing. I need to iterate over every single pixel of a small (80x60) image and extract the RGB values from it. The code in the loop itself isn't too slow, but I'm doing it using nested for loops, which I assume add quite a bit of overhead... xr = xrange(80) yr = xrange(60)...

is there better way to count for three level nested forms

I have a nested forms like: class House < ActiveRecord::Base has_many :rooms accepts_nested_attributes_for :rooms attr_accessible :rooms_attributes end class Room < ActiveRecord::Base has_one :tv accepts_nested_attributes_for :tv attr_accessible :tv_attributes end class Tv belongs_to :user attr_accessible :manufactur...

SSRS multiple data regions in one report

I'm trying to use SSRS to print a "batch" of 1-page invoices. The invoice has a "header" that lays out well in a list data region linked to dataset1. The "detail" section lays out well in a table data region linked to adataset2. Dataset 2 have a FK reference field to dataset1. I've tried using parameters to pass the values of the "...

TTScrollView with nested UIScrollView

I want to have two pages displayed: One contains an image, this should not be scrolable as the image fits the screen nicely. The second is a longer text which has to be scrolled vertically. I tried the classical approach of a big UIScrollView where I just change the offset of the x-value, yet this leaves me with the issue that the image ...

Looping thorugh nested tables in oracle and returning a list of objects to java

I have this table created as follow: CREATE TABLE FORNECPRODS ( SUPPLIER FORNEC_OBJ , PRODUCTS PRODTABLE )NESTED TABLE "PRODUCTS" STORE AS "PRODUCTSTABLE"; / create or replace type PRODTABLE as table of PROD_OBJ; create or replace TYPE PROD_OBJ AS OBJECT ( ID_PROD ...

Update attribute of an element in a nested table

I have created this type: create or replace type PRODTABLE as table of PROD_OBJ; and I use that PRODTABLE in the follow PLSQL code: FUNCTION INSERT_PRODUCTS ( a_supplier_id IN FORNECEDOR.ID_FORNECEDOR%TYPE, a_prodArray IN PRODTABLE ) RETURN NUMBER IS v_error_code NUMBER; v_error_mess...

Passing nested data from Controller to View in ASP.Net MVC (LINQ)

I'm using LINQ to SQL (SQL Server) within ASP.Net MVC. My page needs to display all Regions and all Offices within each Region (nested). Offices belong to a Suburb, which in turn, belong to a Region. I.e. Within each Region, I need to grab the Offices which exist inside Suburbs which belong to the current Region in the loop. (Pseudo cod...

Customize PL/SQL exceptions in Oracle

Frequently I found myself doing some functions to insert/delete/update in one or more tables and I've seen some expected exceptions been taken care of, like no_data_found, dupl_val_on_index, etc. For an insert like this: create or replace FUNCTION "INSERT_PRODUCTS" ( a_supplier_id IN FORNECEDOR.ID_FORNECEDOR%TYPE, a_prodA...

SWT nested composite layout problem

I am new to SWT but have plenty of experience w/ other GUI layout managers. I have run in two a weird problem when nesting a composite inside of another composite. http://www.swooby.com/swt/nestedcontrolproblem.png If I run the audiocontrol as a standalone bean it works fine. If I run it nested in another composite it starts to act fun...

Sort a nested set tree by a nearest leaf

Hello, I'm looking for a SQL example to sort a tree, ordered by nearest node, using nested set tree method or a low ressource method. The tree I want to sort : A /\ B C /\ D E /\ F G The sort result I'd like to have if I choose for example the E node : E-B-F-G-A-D-C for a "father priority" or E-F-G-B-D-A-C...

Serialization in java

When i define a java object to implement serializable interface, do the members of the object, also become serializable? Or i have to go as far along the nesting depth, to redefine every object along the path as serializable? ...

Rails Nested Attributes Association Validation Failing

I have nested attributes for a Rails model and the associations validations are failing for some reason. I am not useing accepts_nested_attributes_for, but I am doing something very similar. class Project < ActiveRecord::Base has_many :project_attributes def name project_attributes.find_by_name("name") end def name=(val) ...