Search Results

Search found 7702 results on 309 pages for 'nested includes'.

Page 12/309 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • Alternative to nesting for loops in Python

    - by davenz
    I've read that one of the key beliefs of Python is that flat nested. However, if I have several variables counting up, what is the alternative to multiple for loops? My code is for counting grid sums and goes as follows: def horizontal(): for x in range(20): for y in range(17): temp = grid[x][y: y + 4] sum = 1 for n in temp: sum += int(n) return sum This seems to me like it is too heavily nested. Firstly, what is considered to many nested loops in Python ( I have certainly seen 2 nested loops before). Secondly, if this is too heavily nested, what is an alternative way to write this code?

    Read the article

  • (?p=home) includes pages not working

    - by Gully
    I have setup a new server and copyed my website on to it and the follow dont work (?p=home) includes pages. On the other webhost it was on it worked fine am think in that it is a php.ini config file need editing can anyone help me?

    Read the article

  • C++ includes with and without .h

    - by wyatt
    I've never noticed it making any difference whether or not I include the .h at the end of an include, so I've always ignored the meaning, but I've just noticed in a particular program of mine, I get the error "memcpy was not declared in this scope" if I include "string", but not if I include "string.h". First of all, I was wondering the specific cause of this, but also generally the difference between the two. At the same time, if someone could explain the difference between includes in angular brackets and those in quotation marks, It'd be much appreciated.

    Read the article

  • Access variables between nested JSP tags

    - by user308053
    I would like to exchange information between two nested JSP tagx artifacts. To give an example: list.jspx <myNs:table data="${myTableData}"> <myNs:column property="firstName" label="First Name"/> <myNs:column property="lastName" label="Last Name"/> </myNs:table> Now, the table.tagx is supposed to display the data columns as defined in the nested column tags. The question is how do I get access to the values of the property and label attributes of the nested column tags from the table tag. I tried jsp:directive.variable but that seems only to work to exchange information between a jsp and a tag, but not between nested tags. Note, I would like to avoid using java backing objects for both the table and the column tags at all. I would also like to know how I can access an attribute defined by a parent tag (in this example I would like to access the contents of the data attribute in table.tagx from column.tagx). So it boils down to how can I access variables between nested JSP tags which are purely implemented through the tag definitions themselves (no Java TagHandler implementation desired)?

    Read the article

  • telerik nested grid issue

    - by Jeff
    1.Here I am having a grid within a parent grid and there is a link button within the nested grid. 2.For the link button I need to use the item command event of the nested grid or I can use the item command of parent grid as well. 3.The issue is when I click on the link button within nested grid then item command event doesn’t get fired for the nestedgrid.But in case of parent grid its working fine. 4.I have tried handlers and item created event also to use handlers in code behind or in aspx.But nothing helped in getting me item command event hit for the nested grid. 5.Previously in case of repeaters there was one item command which was handling all the grids. I have tried different item command event for child and parent but it also didn’t work.

    Read the article

  • Nested SELECT clause in SQL Compact 3.5

    - by Sasha
    In this post "select with nested select" I read that SQL Compact 3.5 (SP1) support nested SELECT clause. But my request not work: t1 - table 1 t2 - table 2 c1, c2 = columns select t1.c1, t1.c2, (select count(t2.c1) from t2 where t2.id = t1.id) as count_t from t1 Does SQL Compact 3.5 SP1 support nested SELECT clause in this case? Update: SQL Compact 3.5 SP1 work with this type of nested request: SELECT ... from ... where .. IN (SELECT ...) SELECT ... from (SELECT ...)

    Read the article

  • python: how to convert list of lists into a single nested list

    - by Bhuski
    I have a python list of lists as shown below: mylist=[ [['orphan1', ['some value1']]], [['parent1', ['child1', ['child', ['some value2']]]]], [['parent1', ['child2', ['child', ['some value3']]]]] ] I need to convert the above list to some thing like this: result=[ ['orphan1', ['some value1']], ['parent1', ['child1', ['child', ['some value2']]], ['child2', ['child', ['some value3']]]] ] Kindly help me approach this problem. I have given only simple list. In actual scenario here, in my list, even grand parents/grand childs are there. How much ever deep the input nested list is, I need to convert it to a single nested list, with common list elements (parents and grand parents) appearing only once. (but the next to innermost list element('child' in above example) should appear as many times it occurs in the input list. I have been trying to do this last two days, but did not end up with working solution :(. I need to use the output in django template filter: unordered_list so that the resultant nested list appears as a nested unordered list in my html page ..

    Read the article

  • Forms bound to updateable ADO recordsets are not updateable when the source includes a JOIN

    - by Art
    I'm developing an application in Access 2007. It uses an .accdb front end connecting to an SQL Server 2005 backend. I use forms that are bound to ADO recordsets at runtime. For the sake of efficiency, the recordsets usually contain only one record, and are queried out on the server: Public Sub SetUpFormRecordset(cn As ADODB.Connection, rstIn As ADODB.Recordset, rstSource As String) Dim cmd As ADODB.Command Dim I As Long Set cmd = New ADODB.Command cn.Errors.Clear ' Recordsets based on command object Execute method are Read Only! With cmd Set .ActiveConnection = cn .CommandType = adCmdText .CommandText = rstSource End With With rstIn .CursorType = adOpenKeyset .LockType = adLockPessimistic 'Check the locktype after opening; optimistic locking is worthless on a bound End With ' form, and ADO might open optimistically without firing an error! rstIn.Open cmd, , adOpenKeyset, adLockPessimistic 'This should run the query on the server and return an updatable recordset With cn If .Errors.Count <> 0 Then For Each errADO In .Errors Call HandleADOErrors(.Errors(I)) I = I + 1 Next errADO End If End With End Sub rstSource (the string containg the TSQL on which the recordset is based) is assembled by the calling routine, in this case from the Open event of the form being bound: Private Sub Form_Open(Cancel As Integer) Dim rst As ADODB.Recordset Dim strSource As String, DefaultSource as String Dim lngID As Long lngID = Forms!MyParent.CurrentID strSource = "SELECT TOP (100) PERCENT dbo.Customers.CustomerID, dbo.Customers.LegacyID, dbo.Customers.Active, dbo.Customers.TypeID, dbo.Customers.Category, " & _ "dbo.Customers.Source, dbo.Customers.CustomerName, dbo.Customers.CustAddrID, dbo.Customers.Email, dbo.Customers.TaxExempt, dbo.Customers.SalesTaxCode, " & _ "dbo.Customers.SalesTax2Code, dbo.Customers.CreditLimit, dbo.Customers.CreationDate, dbo.Customers.FirstOrder, dbo.Customers.LastOrder, " & _ "dbo.Customers.nOrders, dbo.Customers.Concurrency, dbo.Customers.LegacyLN, dbo.Addresses.AddrType, dbo.Addresses.AddrLine1, dbo.Addresses.AddrLine2, " & _ "dbo.Addresses.City, dbo.Addresses.State, dbo.Addresses.Country, dbo.Addresses.PostalCode, dbo.Addresses.PhoneLandline, dbo.Addresses.Concurrency " & _ "FROM dbo.Customers INNER JOIN " & _ "dbo.Addresses ON dbo.Customers.CustAddrID = dbo.Addresses.AddrID " strSource = strSource & "WHERE dbo.Customers.CustomerID= " & lngID With Me 'Default is Set up for editing one record If Not Nz(.RecordSource, vbNullString) = vbNullString Then If .Dirty Then .Dirty = False 'Save any changes on the form .RecordSource = vbNullString End If If rst Is Nothing Then 'Might not be first time through DefaultSource = .RecordSource Else rst.Close Set rst = Nothing End If End With Set rst = New ADODB.Recordset Call setupformrecordset(dbconn, rst, strSource) 'dbconn is a global variable With Me Set .Recordset = rst End With End Sub The recordset that is returned from setupformrecordset is fully updateable, and its .Supports property shows this. It can be edited and updated in code. The entire form, however, is read only, even though it's .AllowEdits and .AllowAdditions properties are both true. Even the fields from the right hand side (the 'many' side) cannot be edited. Removing the INNER JOIN clause from the TSQL (restricting strSource to one table) makes the form fully editable. I've verified that the TSQL includes priimary key fields from both tables, and each table includes a timestamp field for concurrency. I tried changing the .CursorType and .CursorLocation properties of the recordset to no avail. What am I doing wrong?

    Read the article

  • How to simulate postback in nested usercontrols?

    - by jaloplo
    Hi all, I'm doing an asp.net application with one page. In this page, I have one usercontrol defined. This usercontrol has a menu (three buttons) and 3 usercontrols defined too. Depending on the clicked button one of the three usercontrols turn to visible true or false. In these three usercontrols I have a button and a message, and I want to show the message "It's NOT postback" when the button of the menu is clicked, and when the button of the usercontrol is clicked the message will be "YES, it's postback!!!". The question is that using property "IsPostBack" of the usercontrol or the page the message will never be "It's NOT postback" because of the clicked button of the menu to show the nested usercontrol. This is the structure of the page: page parent usercontrol menu nested usercontrol 1 message button nested usercontrol 2 nested usercontrol 3 I know it can be done using ViewState but, there is a way to simulate IsPostBack property or know when is the true usercontrol postback? Thanks.

    Read the article

  • File paths with XSLT includes

    - by Andrew Parisi
    Hi again everyone. I'm working on a website with a large number of pages, and each one has this in it: <xsl:include href="team-menu.xsl" /> This xsl file is stored in the root directory. Essentially including my "team menu" on each page. My problem is when I include this on nested pages, e.g. "/teammembers/smith.xsl", the links in the menu are broken because they refer to pages that aren't in the same directory as the page i'm viewing. This is probably really easy, but I just don't know how to fix it. Is there a way to tell the XSL the root directory and/or set some sort of global directory? Thanks for your help!

    Read the article

  • nested updatepanels

    - by Elenor
    When I put nested updatepanels in outer updatepanel, then in code, it shows that outer panel is around the code of all nested panels while design mode shows outer updatepanel is drawn like one row on top of page and nested updatepanels are drawn below that outside of outer updatepanel. Is this normal behavior or there is some problem in my implementation?

    Read the article

  • Disable nested sorting in dojo enhancedGrid

    - by JJ
    I'm currently trying to disable the nested sorting, as it does not pass the parameters for the nested sort to the store url (only the first sorted column gets passed over). I tried to set "nestedSorting: false" in the grid setup (programmatically), but the sorting is still being showed in the grid headers. Isn't it possible to disable the nested sort?

    Read the article

  • Best way to implement nested loops in a view in asp.net mvc 2

    - by Junior Ewing
    Hi, Trying to implement some nested loops that are spitting out good old nested html table data. So the question is; What is the best way to loop through lists and nested lists in order to produce easily maintainable code. It can get quite narly quite fast when working with multiple nested tables or lists. Should I make use of a HTML helper, or make something with the ViewModel to simplify this? A requirement is if there are no children at a node there should be an empty row on that spot with some links for creation and into other parts of the system.

    Read the article

  • gem2rpm includes all dependencies instead of including only runtime dependencies

    - by prunio
    Version 0.6.0 of gem2rpm includes all (development and runtime) dependencies for a given Gem. Example: Rack Gem (http://rubygems.org/gems/rack) Version 1.1.0 has no runtime dependencies, but six development dependencies. Console output of gem2rpm --dependencies rack-1.0.1.gem is: rubygem(test-spec) = 0 rubygem(camping) = 0 rubygem(fcgi) = 0 rubygem(memcache-client) = 0 rubygem(mongrel) = 0 rubygem(ruby-openid) = 2.0.0 rubygem(thin) = 0` How can I specify to only include runtime dependencies? I have also opened a ticket on rubyforge.org, but there isn't a lot of activity on that tracker. Thank you for any hints.

    Read the article

  • Building iPhone static library for armv6 and armv7 that includes another static library

    - by Martijn Thé
    Hi, I have an Xcode project that has a "master" static library target, that includes/links to a bunch of other static libraries from other Xcode projects. When building the master library target for "Optimized (armv6 armv7)", an error occurs in the last phase, during the CreateUniversalBinary step. For each .o file of the libraries that is included by the master library, the following error is reported (for example, the FBConnectGlobal.o file): warning for architecture: armv6 same member name (FBConnectGlobal.o) in output file used for input files: /Developer_Beta/Builds/MTToolbox/MTToolbox.build/Debug-iphoneos/MTToolbox.build/Objects-normal/armv6/libMTToolbox.a(FBConnectGlobal.o) and: /Developer_Beta/Builds/MTToolbox/MTToolbox.build/Debug-iphoneos/MTToolbox.build/Objects-normal/armv7/libMTToolbox.a(FBConnectGlobal.o) due to use of basename, truncation and blank padding In the end, Xcode tells that the build has succeeded. However, when using the final static library in an application project, it won't build because it finds duplicate symbols in one part of build (armv6) and misses symbols in the other part of the build (armv7). Any ideas how to fix this? M

    Read the article

  • Seam page navigation with includes

    - by Marc
    Hello, I'm using seam page navigation rules. and did not experience any problem with adding rules which redirect from one page to another. But since I designed my page views using those redirection simply don't happen anymore for those pages. Tried to define the rule to the view that gets included, then to the view that includes the others (which to me was making more sense) but none work. Is there anything special about page navigation in seam using included view-id ? I'm using jsf, xhtml as my page views. Thanks

    Read the article

  • Hierarchies on Steroids #2: A Replacement for Nested Sets Calculations

    In this sequel to his first "Hierarchies on Steroids" article, SQL Server MVP Jeff Moden shows us how to build a pre-aggregated table that will answer most of the questions that you could ask of a typical hierarchy. Any bets on whether Santa is packin’ a Tally Table in his bag or not? 12 essential tools for database professionalsThe SQL Developer Bundle contains 12 tools designed with the SQL Server developer and DBA in mind. Try it now.

    Read the article

  • Nested languages code smell

    - by l0b0
    Many projects combine languages, for example on the web with the ubiquitous SQL + server-side language + markup du jour + JavaScript + CSS mix (often in a single function). Bash and other shell code is mixed with Perl and Python on the server side, evaled and sometimes even passed through sed before execution. Many languages support runtime execution of arbitrary code strings, and in some it seems to be fairly common practice. In addition to advice about security and separation of concerns, what other issues are there with this type of programming, what can be done to minimize it, and is it ever defensible (except in the "PHB on the shoulder" situation)?

    Read the article

  • Nested Entities and calculation on leaf entity property - SQL or NoSQL approach

    - by Chandu
    I am working on a hobby project called Menu/Recipe Management. This is how my entities and their relations look like. A Nutrient has properties Code and Value An Ingredient has a collection of Nutrients A Recipe has a Collection of Ingredients and occasionally can have a collection of other recipes A Meal has a Collection of Recipes and Ingredients A Menu has a Collection of Meals The relations can be depicted as In one of the pages, for a selected menu I need to display the effective nutrients information calculated based on its constituents (Meals, Recipes, Ingredients and the corresponding nutrients). As of now am using SQL Server to store the data and I am navigating the chain from my C# code, starting from each meal of the menu and then aggregating the nutrient values. I think this is not an efficient way as this calculation is being done every time the page is requested and the constituents change occasionally. I was thinking about a having a background service that maintains a table called MenuNutrients ({MenuId, NutrientId, Value}) and will populate/update this table with the effective nutrients when any of the component (Meal, Recipe, Ingredient) changes. I feel that a GraphDB would be a good fit for this requirement, but my exposure to NoSQL is limited. I want to know what are the alternative solutions/approaches to this requirement of displaying the nutrients of a given menu. Hope my description of the scenario is clear.

    Read the article

  • IIS 6 nested virtual directory redirection

    - by threedaysatsea
    We're running IIS 6 on a WinServer2k3 box and we're having some trouble with the following problem: E-mails were sent out to users asking them to go to the following URL: alias.contoso.com/directory2/view.aspx?queryparam1=no&queryparam2=blue However, the URLS are actually supposed to be: server.contoso.com/directory2/view.aspx?queryparam1=no&queryparam2=blue It's too late to recall all of the e-mails, and we'd like to redirect traffic to make this as seamless as possible for our users. The real problem here is that the server (server.contoso.com) is hosting the alias (alias.contoso.com) as a redirect thusly, and the existing redirect we need to keep functional: Default Web Site (server.contoso.com) --Directory1 --Directory2 --Directory3 Redirection to Directory3 (alias.contoso.com) --Essentially alias.contoso.com will take the user to server.contoso.com/Directory3 Is there any way to host a separate redirect inside of the existing redirect? We need to keep alias.contoso.com taking the user to server.contoso.com/Directory3 but also make alias.contoso.com/directory2/view.aspx?queryparam1=no&queryparam2=blue point to server.contoso.com/directory2/view.aspx?queryparam1=no&queryparam2=blue Any tips? Is this even possible?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >