depth

Listing the content of a tar file or a directory only down to some level

I wonder how to list the content of a tar file only down to some level? I understand tar tvf mytar.tar will list all files, but sometimes I would like to only see directories down to some level. Similarly, for the command ls, how do I control the level of subdirectories that will be displayed? By default, it will only show the direct ...

python multithread "maximum recursion depth exceed"

I use Python multithread to realize Quicksort. Quicksort is implement in a function. It is a recursive function. Each thread calls Quicksort to sort the array it has. Each thread has its own array that stores the numbers needs to be sorted. If the array size is smaller (<10,000). It runs ok. However, if the array size is larger, it shows...

Calculating depth and descendants of tree

Can you guys help me with the algorithm to do these things? I have preorder, inorder, and postorder implemented, and I am given the hint to traverse the tree with one of these orders. I am using dotty to label (or "visit") the nodes. Depth is the number of edges from the root to the bottom leaf, so everytime I move, I add +1 to the dept...

mysql to get depth of record, count parent and ancestor records

Hey All, Say I have a post table containing the fields post_id and parent_post_id. I want to return every record in the post table with a count of the "depth" of the post. By depth, I mean, how many parent and ancestor records exist. Take this data for example... post_id parent_post_id ------- -------------- 1 null 2 ...

OpenGLES iPhone Depth Blending problem

Hi, I am trying to make an OpenGLES 2.0 cube application. The idea was to have a texture (with an alpha 75%) applied to all 6 faces of the cube. This would mean that even if I rotate the cube i would be able to see all 6 faces at any given frame. Now I have enabled depth test(my app needs this!!) and blending. The Depth func is LEQUAL a...

ActionScript Measuring 3D Depth

i'm having a difficult time understanding how to control the z property of display objects in a 3D space. i know how depth works, but what i don't understand is how i can get the maximum depth, or the number at which the display object just disappears into the background. i assume depth is based on the stage's width and height, and tha...

Git: Get the HEAD of a repository with the .git directory

Possible Duplicate: How to do a git export (like svn export) I'm looking for a single command that effectively does the following: git clone git://github.com/rails/rails.git --depth=1 rm -rf rails/.git Is there a command that does this? ...

Determine bits per pixel in a bitmap

What's the easiest way to tell the number of bits per pixel in a bitmap, e.g. a Windows .bmp file? ...

python import depth

I've noticed that importing a module will import its functions and methods, and the functions and methods of those as well. Is there a set rule for how many levels down python will import when you import an upper-level module? edit sorry, I think I've been misunderstood by the answers so far responding about multiple imports of some d...

How to find sum of node's value for given depth IF the tree is NOT complete?

I've asked very similar question before and should have mentioned more detailed. Last time was "how to find sum of node's value for given depth in binary tree" in PHP. sum(Node, Level) = if (Level == 0) return Node.value; else return f(Node.left, Level-1) + f(Node.right, Level-1). So now I tried to write this in Ja...

Handling depth with Flex 4

I have a code in Flex 4 like this <!-- START >>> middle part: items --> <mx:Canvas id="itemContainer" width="100%" height="100%"> <!-- START >>> Items Display on the page --> <mx:Repeater id="richTextReapeater" dataProvider="{_model.current_day.richTextNotes}"> <components:RichText...

Finding the product of a variable number of Ruby arrays

I'm looking to find all combinations of single items from a variable number of arrays. How do I do this in Ruby? Given two arrays, I can use Array.product like this: groups = [] groups[0] = ["hello", "goodbye"] groups[1] = ["world", "everyone"] combinations = groups[0].product(groups[1]) puts combinations.inspect # [["hello", "world...

DirectX depth buffering not working

Hey, For some strange reason my depth buffer is not working, i.e. the triangles drawn later always overlap, regardless of their position. I have these presenter parameters D3DPRESENT_PARAMETERS d3dpp; ZeroMemory(&d3dpp, sizeof(d3dpp)); d3dpp.Windowed = TRUE; d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD; d3dpp.hDeviceWindow = mWindow; d3...

iterative closest point library

is there any c++/c open source implementation? i got two point clouds and would like to match them.. any ideas? ...

Restrict the depth of nested elements in XSD

Is it possible with XML schema to restrict the depth of child elements nested in a parent? The context here is I collect alarms from a management system and I want to provide a XML document which allows the end user define some rules in order to filter the alarms into folders in the UI. I want to restrict the depth of nested folders to ...

UIImageViews Depth issue

Hi, I have a strange issues with layering of the UIImageViews in my game. I have many UIImageViews which get added into the game while user is playing the game. But while game is in progress I need to modify the layering of the UIImageview in order to sort out depth issue. I have tried using insert subview method to change the layerin...

Does .Net / C#'s speed degrade with increased field depth?

Is there any execution speed difference between the following two lines of code? I cannot tell from looking at the IL: int x = MainObject.Field1; int x = MainObject.Public.Fields.Field1; I know from Delphi (native code), there is no difference. ...

Android Opengl 2d Intersection between two graphic objects

Hi, I'm new to opengl and android and couldn't find an answer in the forums so here I am... I need to be able to 'draw' only the intersection of two triangles. I tried to use stencil test but it doesn't work in the android emulator. Then I tried to use depth test and it works but only for a fraction of a second, then the screen goes bl...