Sponsored Content
Full Discussion: Binary Tree
Top Forums Programming Binary Tree Post 302509741 by sepoto on Thursday 31st of March 2011 03:22:39 PM
Old 03-31-2011
Binary Tree

I have just been researching this topic and I was wondering what type of application might a binary tree be used for. For instance what type of application would be a good showcase for a binary tree that I could write as an example?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Creating breadth traversal binary tree

I almost have the entire script written. however the problem is how would i assign the global variable to terminate the process from the bottom up to ensure the child terminates so the parent can. ex. I am proccess 1 I am proccess 2 etc Here is the code $ cat tree.c ... (3 Replies)
Discussion started by: slurpeyatari
3 Replies

2. Solaris

compiled binary file gives "cannot execute binary file"

Hi, I have two Solaris machines. 1. SunOS X 5.8 Generic_108528-29 sun4u sparc SUNW,Sun-Blade-1500 2. SunOS Y 5.8 Generic_108528-13 sun4u sparc SUNW,Ultra-60 I am trying to buiild a project on both these machines. The Binary output file compiled on machine 2 runs on both the machines. Where... (0 Replies)
Discussion started by: scgupta
0 Replies

3. Shell Programming and Scripting

Create a binary tree

I need to create a binary tree like structure of directories using shell script... does anyone know of any algorithm for this ? i tried doing a recursive algorithm function CreateDir { level=$1 dirname=$2 mkdir $dirname/sub1/ mkdir $dirname/sub2/ let level=level-1 ... (2 Replies)
Discussion started by: macvijay1985
2 Replies

4. UNIX for Dummies Questions & Answers

Binary Tree Creation Using fork()

Hi, I am working on a program and kind of a stuck,nt getting it done. "The program should take one command line arguments: number of hierarchy level. The hierarchy of your program should of that level and each node have two child processes." Can anyone give me the C code using fork() of this... (1 Reply)
Discussion started by: learneros
1 Replies

5. Shell Programming and Scripting

directory tree

Hi all, The following is a script for displaying directory tree. D=${1:-`pwd`} (cd $D; pwd) find $D -type d -print | sort | sed -e "s,^$D,,"\ -e "/^$/d"\ -e "s,*/\(*\)$,\:-----\1,"\ -e "s,*/,: ,g" | more exit 0 I am trying to understand the above script.But... (3 Replies)
Discussion started by: ravi raj kumar
3 Replies

6. Shell Programming and Scripting

process tree

how to draw a process tree if i know my process id and how can i identify session leaders (1 Reply)
Discussion started by: annapurna konga
1 Replies

7. Programming

Binary Search Tree Search problem

I am writing code for a binary search tree search and when I compile it i am getting strange errors such as, " /tmp/ccJ4X8Xu.o: In function `btree::btree()': project1.cpp:(.text+0x0): multiple definition of `btree::btree()' " What does that mean exactly? tree.h #ifndef TREE_H #define... (1 Reply)
Discussion started by: meredith1990
1 Replies

8. Shell Programming and Scripting

Convert binary file to csv and then back to the binary format

Hello *nix specialists, Im working for a non profit organisation in Germany to transport DSL over WLAN to people in areas without no DSL. We are using Linksys WRT 54 router with DD-WRT firmware There are at the moment over 180 router running but we have to change some settings next time. So my... (7 Replies)
Discussion started by: digidax
7 Replies

9. Programming

Binary search tree questions. Please help =)

I have some questions about certain placement of child nodes since I'm just learning BSTs and it's quite confusing even after reading some sources and doing some online insertion applets. Let's say I want to add nodes 5,7,3,4 to an empty basic BST. ... (1 Reply)
Discussion started by: Jill Ceke
1 Replies

10. Web Development

Problem in printing binary tree using php and mysql

Database Structure Root Table ID Root_ Node Level 1 A 0 2 B 1 3 C 1 Child Table ID Left_Node Right_Node Root_Node Root_ID 1 B C A 1 ... (1 Reply)
Discussion started by: Deepak Tiwari
1 Replies
dde(n)							       Tcl Bundled Packages							    dde(n)

__________________________________________________________________________________________________________________________________________________

NAME
dde - Execute a Dynamic Data Exchange command SYNOPSIS
package require dde 1.3 dde servername ?-force? ?-handler proc? ?--? ?topic? dde execute ?-async? service topic data dde poke service topic item data dde request ?-binary? service topic item dde services service topic dde eval ?-async? topic cmd ?arg arg ...? _________________________________________________________________ DESCRIPTION
This command allows an application to send Dynamic Data Exchange (DDE) command when running under Microsoft Windows. Dynamic Data Exchange is a mechanism where applications can exchange raw data. Each DDE transaction needs a service name and a topic. Both the service name and topic are application defined; Tcl uses the service name TclEval, while the topic name is the name of the interpreter given by dde server- name. Other applications have their own service names and topics. For instance, Microsoft Excel has the service name Excel. DDE COMMANDS
The following commands are a subset of the full Dynamic Data Exchange set of commands. dde servername ?-force? ?-handler proc? ?--? ?topic? dde servername registers the interpreter as a DDE server with the service name TclEval and the topic name specified by topic. If no topic is given, dde servername returns the name of the current topic or the empty string if it is not registered as a service. If the given topic name is already in use, then a suffix of the form " #2" or " #3" is appended to the name to make it unique. The com- mand's result will be the name actually used. The -force option is used to force registration of precisely the given topic name. The -handler option specifies a Tcl procedure that will be called to process calls to the dde server. If the package has been loaded into a safe interpreter then a -handler procedure must be defined. The procedure is called with all the arguments provided by the remote call. dde execute ?-async? service topic data dde execute takes the data and sends it to the server indicated by service with the topic indicated by topic. Typically, service is the name of an application, and topic is a file to work on. The data field is given to the remote application. Typically, the application treats the data field as a script, and the script is run in the application. The -async option requests asynchronous invocation. The command returns an error message if the script did not run, unless the -async flag was used, in which case the com- mand returns immediately with no error. dde poke service topic item data dde poke passes the data to the server indicated by service using the topic and item specified. Typically, service is the name of an application. topic is application specific but can be a command to the server or the name of a file to work on. The item is also application specific and is often not used, but it must always be non-null. The data field is given to the remote application. dde request ?-binary? service topic item dde request is typically used to get the value of something; the value of a cell in Microsoft Excel or the text of a selection in Microsoft Word. service is typically the name of an application, topic is typically the name of the file, and item is application- specific. The command returns the value of item as defined in the application. Normally this is interpreted to be a string with terminating null. If -binary is specified, the result is returned as a byte array. dde services service topic dde services returns a list of service-topic pairs that currently exist on the machine. If service and topic are both empty strings ({}), then all service-topic pairs currently available on the system are returned. If service is empty and topic is not, then all services with the specified topic are returned. If service is non-empty and topic is, all topics for a given service are returned. If both are non-empty, if that service-topic pair currently exists, it is returned; otherwise, an empty string is returned. dde eval ?-async? topic cmd ?arg arg ...? dde eval evaluates a command and its arguments using the interpreter specified by topic. The DDE service must be the TclEval ser- vice. The -async option requests asynchronous invocation. The command returns an error message if the script did not run, unless the -async flag was used, in which case the command returns immediately with no error. This command can be used to replace send on Windows. DDE AND TCL
A Tcl interpreter always has a service name of TclEval. Each different interpreter of all running Tcl applications must be given a unique name specified by dde servername. Each interp is available as a DDE topic only if the dde servername command was used to set the name of the topic for each interp. So a dde services TclEval {} command will return a list of service-topic pairs, where each of the currently run- ning interps will be a topic. When Tcl processes a dde execute command, the data for the execute is run as a script in the interp named by the topic of the dde execute command. When Tcl processes a dde request command, it returns the value of the variable given in the dde command in the context of the interp named by the dde topic. Tcl reserves the variable $TCLEVAL$EXECUTE$RESULT for internal use, and dde request commands for that variable will give unpredictable results. An external application which wishes to run a script in Tcl should have that script store its result in a variable, run the dde execute command, and the run dde request to get the value of the variable. When using DDE, be careful to ensure that the event queue is flushed using either update or vwait. This happens by default when using wish unless a blocking command is called (such as exec without adding the & to place the process in the background). If for any reason the event queue is not flushed, DDE commands may hang until the event queue is flushed. This can create a deadlock situation. EXAMPLE
This asks Internet Explorer (which must already be running) to go to a particularly important website: package require dde dde execute iexplore WWW_OpenURL http://www.tcl.tk/ SEE ALSO
tk(n), winfo(n), send(n) KEYWORDS
application, dde, name, remote execution dde 1.3 dde(n)
All times are GMT -4. The time now is 09:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy