nested

SQL Server - Using a column alias in a subquery

I have the following query which works fine with MySQL but refuses to work with SQL server: SELECT table1.someField AS theField, COUNT(table2.someField) / (SELECT COUNT(someField) FROM table1 WHERE someField = theField), FROM table1 LEFT JOIN table2 ON table1.someField = table2.someField SQL Server doesn't seem to like the ali...

mysql select - how to retrieve a result for threaded/nested messages?

I'm creating a threaded message board and I'm trying to keep it simple. There's a message table, and then a replies table that has an 'reply_id' field that can be null to indicate a top level response, or a value that indicates a threaded response. I'm a bit confused on how to do a SELECT call on this type of table though? Reply -id...

Creating nested master pages in ASP.NET Web Application

Is it possible to create nested master pages in an ASP.NET Web Application projects as one can do in ASP.NET Website projects? I am using Visual Studio 2008 and working on an ASP.NET Web Application. While creating a master page there is no option to choose another master page which if was available would have allowed me to create neste...

SQL - Use results of a query as basis for two other queries in one statement

I'm doing a probability calculation. I have a query to calculate the total number of times an event occurs. From these events, I want to get the number of times a sub-event occurs. The query to get the total events is 25 lines long and I don't want to just copy + paste it twice. I want to do two things to this query: calculate the numb...

Nested User Controls - how to best get a reference to an ancestor control

I realize that a whole lot of code cannot fit here, but I am asking for general direction or pointer. I have .NET user controls nested six deep for an interactive gadget with (outer to inner) of : wrapper, tabs, panels, lists, rows, items. I am trying to get a reference to an ancestor control from a nested control. Specifically, I ...

Custom nested properties/methods in asp.net

I'm looking for a way to write a custom .net class that would allow for nested methods. For example... say I have a class X with a function Y that returns a list. Then I have another function that returns a sorted list... I would like to be able to do something like x.y().z() where z would accept the output of y() as its input. Basic...

Microsoft reports nested object datasource gives #Error

I am attempting to get nested objects to work in Microsoft reports. I downloaded example code from http://www.gotreportviewer.com/objectdatasources/index.html, and it runs correctly. I built the following little app based on a Windows Form and their code, and all that I ever get when I reference a nested object value is a "#Error" in th...

Using nested Master Pages

Hi. I'm very new to ASP.NET, help me please understand MasterPages conception more. I have Site.master with common header data (css, meta, etc), center form (blank) and footer (copyright info, contact us link, etc). <%@ Master Language="C#" AutoEventWireup="true" CodeFile="Site.master.cs" Inherits="_SiteMaster" %> <!DOCTYPE HTML PUBLIC...

Error using Nested insert_html partials in rails

So I have two nested partials with calls to insert_html. Basically each team has multiple players and I have an add player button and an add team button which each call a partial with the following helpers module TeamsHelper def add_team_link(name) link_to_function name do |page| page.insert_html :bottom, :teams, :parti...

Exclude nested files from source control

We're having a problem combining 'nested files' and excluding files from source control. We're using code generation to create two partial classes for each entity - MyBusinessObject.vb and MyBusinessObject.Generated.vb We'd like the "Generated" file to appear as a nested file under the manual file. So we're modifying the project file t...

Dealing with nested if then else/nested switch statements

Are there any design patterns/methods/ways to remove nested if then else conditions/switch statements? I remember coming across some methods used by the Google folks listed in a Google code blog post. Can’t seem to find it now though ...

How to add a inner mapping in a nested collection?

Given: Object nestKey; Object nestedKey; Object nestedValue; Map<T,Map<T,T>> nest; Map<T,T> nested; How is a mapping added to nested where: nest.containsKey(nestKey) == true; ? Or is there an existing library of collections that would be more effective? ...

ASP.net 2.0 Nested gridview: how to span over parent gridview columns?

Good day, I have a parent gridview with a few columns. On each row, I want to have a nested gridview. However, I have problems about displaying correctly the nested gridview. If I place the nested gridview in the first columns of the parent gridview, when I will set the visible attribute to true to the nested one, of course, all the co...

Clojure Structure Nested Within Another Structure

Is it possible to have a structure nested within a structure in Clojure? Consider the following code: (defstruct rect :height :width) (defstruct color-rect :color (struct rect)) (defn #^{:doc "Echoes the details of the rect passed to it"} echo-rect [r] (println (:color r)) (println (:height r)) (println (:width r))) (def first...

How to use REST with nested resources which are represented in XML?

My aim is to create nested resources via one REST request. The REST requests is represented via a XML document. That works fine for single resources but I could not manage it for nested ones. OK I'll give you a little example next. First create a new rails project rails forrest Next we generate the scaffolds of two resources, the tre...

What is wrong with my nested loops in Python?

How do I make nested loops in Python (version 3.0)? I am trying to get the following loops to show me the products of two numbers: def PrintProductsBelowNumber(number): number1 = 1 number2 = 1 while number1 <= number: while number2 <= number: print(number1, "*", number2, "=", number1 * number2) ...

Create nested checkboxes in asp.net 2.0

Whats is the best method to create nested checkboxlists in ASP.net? Should I be using a datagrid? Should I be using a treeview with checkboxes enabled? I have the data I need in a datatable, and would like to loop through through it to create a checkboxlist with a nested chechboxlist for each parent checkbox. Cheers! ...

Nested Datalists in ASP.net

I am using nested datalists to display hierarchical data. In the nested datalist i want to be able to bind to a property that belongs to the object that the parent datalist is bound to. does anyone know how I can achieve this ? ...

CSS Menu won't show through nested Divs in IE7

If you look at the menu for this site: http://writershore.com/ltlaw/ The menu looks great in Firefox, Chrome, etc, but in IE7 the menu drop downs don't break through the nested DIVs. Is this an overflow issue? A z-index issue? I've tried variations of both and doesn't fix the result in IE. Thanks for any ideas! ...

Nested Gridview in Repeater control

Hi I've a gridview control nested within a repeater control the repeater control is databound on pageload and in the itemdatabound event I look for the gridview control If e.Item.ItemType = ListItemType.Item Then Dim gvw As GridView = DirectCast(e.Item.Controls(3), GridView) gvw.DataSource = GetData() gvw.DataBind() End ...