nested-lists

PHP recursive function, to create site navigation as nested list, but without unnecessary menu items.

I really dig the idea of using a recursice function to build my site menus but I am having a problem and have been banging my head for ages now. I need my menu function to return a nested list but I dont want non-active irelevent elements of the tree to be displayed. Details. I have a MySql database with a table called menu_items that s...

structure with linked-list memory dump

Hi, is there any standard approach which I've missed at school to dump C structure with nested linked lists on disk in reasonable way? What I don't want to do is: use protocol-buffers or any other like serializators, don't want to create JSON, XML or other I've few ideas: allocate accurate memory amount (or extend existing one) and...

rails process for saving order of awesome_nested_set using jquery & nestedsortables

Hi All, I have a categories model made with the fantastic awesome_nested set. I have successfully generated the drag and drop tree and successfully generated the complete hash of this tree using SERIALIZELIST plugin and sent it to the "array" method that I have added to my categories controller. (using jquery and nestedsortables) The ha...

jQuery sortable list question

I have a list structured like below: <ul class='binder'> <li value='7'>Welcome <ul class='section'> <li value='7'>Introduction <ul class='subsection'> <li value='4'>About Us <ul class='node'> <li value='11'>2</span> <ul class='element'> <li value = '8' class='paragraph'>Test Paragraph</li></ul> <li value='10' id='node_10'>1 <ul ...

TinyMCE: Nested lists if tab key is pressed

if you create an unordered list in tinymce and hit the tab key the code created looks like this: <ul> <li><span style="white-space: pre;"> </span>list item 1</li> </ul> however, if you click on the indent button in the editor's toolbar (instead of the tab key), the following code is created: <ul> <li>list item 1 <ul> <li>list item 1....

Problem requiring lists

The current issue im facing is comes from the following scenario. I have a script that runs a commandline program to find all files of a certain extension within an specific folder, lets call these files File A. Another section of the script runs a grep command through each file for filenames within File A. What would be the best method ...

Triple-nested List<> in C#

I asked a question not too long ago about multi-dimensional and jagged arrays in C#. Well, I was trying the List class instead and was running into a bit of a jam. What happens is only a few of the values in wtflist actually make it to the end of Main(). How can I make sure all of the data gets in (and stays in) wtflist? Edit: Here ...

List Comprehension in Nested Lists

Hi all, I have a list like [["foo", ["a", "b", "c"]], ["bar", ["a", "b", "f"]]] and I'm wanting to split it out so I can get a count of the total number of As, Bs, etc. but I'm new to Python and having a bit of a time of it. I'm using [lx for lx in [li[1] for li in fieldlist if li[1]]] to try and get a list with all of the items in th...

Stack overflow in Prolog

I am trying to write Prolog code to determine whether the bound variable X is in the scope of the bound variable Y in a list. Lists may be nested and X is in the scope of Y if X and Y are members of the same list or if X is a member of a list that is a member of a list that is a member of a list...(nested indefinitely) that is in the sam...

HTML table with writable cells?

Hello, I've been trying to build a simple GAE app and to be able to manipulate the position of the text on the screen. I asked the same question on several forums; so far with no solution. I apologize if my question has not been clear. Now I thought of achieving the same functionality with a grid, like a spreadsheet. Do you know how I...

print lists in a file in a special format in python

Hi, I have a large list of lists like: X = [['a','b','c','d','e','f'],['c','f','r'],['r','h','l','m'],['v'],['g','j']] each inner list is a sentence and the members of these lists are actually the word of this sentences.I want to write this list in a file such that each sentence(inner list) is in a separate line in the file, and each ...