nested

Finding Big-O with multiple nested loops?

int num = n/4; for (int i = 1; i <= num; i++) { for (int j = 1; j <= n; j++) { for (int k = 1; k <= n; k++) { int count = 1; } } } According to the books I have read, this code should be O((n^3)/4). But apparently its not. to find the Big-O for nested loops are you supposed to multiply the bounds? So...

MOSS - Nested Master Page Problem

I have created a child master which references a parent master. I have deployed this as a feature and stapled the feature to many site definitions. When I turn on the feature, both my parent and child masters are rendering correctly - everything is as it should be. However, when I open up SharePoint designer and customize child.master...

C# - Reflection using Generics: Problem with Nested collections of ILists

Hi Everyone, I would like to be able to print object properties, and I've hit a snag when I hit nested collections of the iLists. foreach (PropertyInformation p in properties) { //Ensure IList type, then perform recursive call if (p.PropertyType.IsGenericType) { ...

SQL - Nested select statement ?

I have 2 tables, ticket and ticket_custom. Here are how the tables are set up. I have a web interface where I can change the state (value in the table ticket_custom) The web interface adds a new entry instead of updating the original entry. ticket name value 1 state Ready for Final Verification 2 state Ready for Final Verificatio...

nmake - simple question about escaping

Hi I'd like to make below nmake code to produce check.mak file with the following contents: $(A) instead I get the following error: "NMAKE : fatal error U1040: internal error : macro expansion" Any suggestions? My nmake version is 9.00.30729.01 (VC 2008). OPTION = A FILE = check.mak all : @echo "$$($(OPTION))" > $(FILE) ...

nmake - simulating eval function

I'd like to get value of variable named $(MYVAR)_SOME_SUFFIX in the b.mak makefile. Instead I get "b.mak(2) : fatal error U1001: syntax error : illegal character '$' in macro" # ---- a.mak ---- all : set MYVAR=SOME_PREFIX nmake -f b.mak #--- END --- # ---- b.mak ---- all: @echo $($(MYVAR)_SOME_SUFFIX) #--- END --- ...

Nested classes and recursion

Say i have these two classes public class Container { public string name { get; set; } public Inner Inner { get; set; } } public class Inner { public string text { get; set; } public Inner2 Innert2 { get; set; } } public class Inner2 {} How would i go, given an instance of ...

Update Query from a Lookup Query

I have a spreadsheet that I am converting to an Access DB. I have a column of typed out customer names that I want to replace with the appropriate customer number from our accounting system. I have created a table with the customer info, and a query that shows what ID needs to be inserted into the source data. What I'm looking for is:...

assigning ViewData to nested masterpages

Is there a good way to assign ViewData to nested master pages? For example, in my top level masterpage I might have info on the logged in user. I also have a nested masterpage that is displayed when the user is on any departmental page. I want that data available ONLY on departmental pages. So this is how it looks: Top Level Master Pag...

Can I use XAML to set a nested property (property of the value of a property) of a control ?

I've got a WPF Control that exposes one of it's children (from it's ControlTemplate) through a read-only property. At the moment it's just a CLR property, but I don't think that makes any difference. I want to be able to set one of the properties on the child control from the XAML where I'm instantiating the main control. (Actually, I w...

Nested sets, php array and transformation

Hi, I need to transform my nested sets structure (mysql) into json for this spacetree 1) http://blog.thejit.org/wp-content/jit-1.0a/examples/spacetree.html I found this function to create an array from nested sets: 2) http://semlabs.co.uk/journal/converting-nested-set-model-data-in-to-multi-dimensional-arrays-in-php I can also convert...

Nested generic collections: How to implement reference from item to container?

Hi! While implementing a design using nested generic collections, I stumbled across those limitations apparently caused by C#'s invariant Generics: Cannot convert from 'Collection<subtype of T> to 'Collection<T>' That means, the following will not work, apparently due to the invariance of Generics: class Outer<TInner, TInnerItem> wh...

Rails nested resources

I'm trying to get my head around nested associations in Rails using ActiveResource. My example is as follows: What I have is an airport with many runways. My show action in airports controller contains: @airport = Airport.find(params[:id]) When I call http://localhost/airports/2.xml I get that piece of XML: <airport> <code>DUS</...

How to access controls inside a nested master page? why does it behave differently from content pages?

Is there a difference between these two scenarios: (1) Accessing a property on a master page from a regular child (2) Accessing a property on a master page from a nested master page I tried to access a textbox in the master page from a content page like this: TextBox a; a = (TextBox)Master.FindControl("ayyash"); // Master is declared...

Nesting pages in the 'Manage Pages' view of Movable Type

On the 'Manage Pages' screen in the admin area of Movable Type, is it possible to nest pages, or to achieve any kind of page hierarchy? Essentially I need to mirror the site structure. I would also like to order pages, not by published date, but by a meaningful order - ie the order I need them to display on the website. ...

.Net MVC Passing Nested Data from Controller to View

I am creating a .NET MVC application and I have a view in which I want to display the following: Category followed by a list of items for the current Category [possibly] followed by a list of sub items for the current item I could create a custom ViewModel class that sends 3 separate IEnumerable lists (categories, items, and sub item...

How do I create nested categories in a Database?

I am making a videos website where categories will be nested: e.g. Programming-> C Language - > MIT Videos -> Video 1 Programming -> C Language -> Stanford Video - > Video 1 Programming -> Python -> Video 1 These categories and sub-categories will be created by users on the fly. I will need to show them as people create them ...

nested dictionary to nested repeater asp.net c#

Hi, I'm making an asp.page that will display hierarchical information about company assets. To grab the data I used a lambda expression: FASAssetInfoDataContext fasInfo = new FASAssetInfoDataContext(); var data = from g in fasInfo.Asset_Informations where g.Department.Substring(0, 3) == p ...

Nested functions are not allowed but why nested function prototypes are allowed? [C++]

I was reading the linked question which leads me to ask this question. Consider the following code int main() { string SomeString(); } All says, compiler takes this as a function prototype and not as a string object. Now consider the following code. int main() { string Some() { return ""; } } Compiler said...

accepts_nested_attributes_for child association validation failing

Hi all, I'm using accepts_nested_attributes_for in one of my Rails models, and I want to save the children after creating the parent. The form works perfectly, but the validation is failing. For simplicity's sake imagine the following: class Project < ActiveRecord::Base has_many :tasks accepts_nested_attributes_for :tasks end clas...