|
by: t_pet422 |
last post by:
Hi,
I've been scouring the net and reading the PostgreSQL docs for a while
now trying to learn how to create a recursive function in PL/pgSQL
that will return a whole subtree given a starting node. I wanted to
share my summary results here. Maybe this will help someone and save
them from doing a bunch of research (like I had to do :). For the
record, this is the first thing I've ever written in PL/pgSQL,
although I do have significant...
|
by: Jerry Khoo |
last post by:
Thanks for the answer, and by the way, i would like to know that in
C++,
how u create a tree using a recursive envronment. It seems that most
people used struct to create a node than, using recursive function to
build it up, but than is there any way around i could built a tree
using iterative method like for .. loop?
|
by: Henry Jordon |
last post by:
I have everything pretty much done but I need to fix something in my
coding. I want to be able to enter strings such as "love", "hate",
"the", etc. but am unable to figure how to do this. I have put my .cpp
and my .h code below. Please help and thank you very much.
// include files
#ifndef BINTREE_H
#define BINTREE_H
#include <iostream>
#include <iomanip>
|
by: pillepop2003 |
last post by:
Hey!
Can anyone give me a hint, how this problem is best implemented:
I have a table of users (see below), where every user has one
"superior user" (= parent node), this should be a fully unambigous
tree structure. The root node can have whatever value you prefer, I
suppose NULL would be good for a start. What I want to do is finding
the way from an arbitrary node in the tree.
Example:
|
by: hornedw |
last post by:
I have been working on a ecommerce website for myself. What I needed
some assistance on was when i was trying to display the
categories/subcategories for the different products.
I decided to use the modified preorder tree transversal algorithm. What
I wanted was on the first page is to display the catogories as follows
Books (35)
Electronics(23)
The number inside the parenthesis being the number of products in that
|
|
by: Steve Edwards |
last post by:
Hi,
I have a class which contains a single ptr to another instance which is
considered its parent, and an array of ptrs to its children
class Nodes{
....
Nodes *mSuper;
|
by: lwwhite |
last post by:
I'm not sure if this discussion is a better fit for the Access or XML forum and I don't want to double-post, so I'm starting in Access because you've been so helpful to me here.
I am preparing a presentation comparing using a relational database vs. a native XML database within a content management system to manage XML-based documentation. The point I am trying to make is how difficult it can be to reconstruct the XML hierarchy/tree once the...
|
by: aemado |
last post by:
I am writing a program that will evaluate expressions using binary trees. Most of the code has been provided, I just have to write the code for the class functions as listed in the header file. However, I am really new to recursion and trees...and this program uses public functions and private helper functions, which I am completely lost in. Here is the header file:
struct CTNode
{
NodeType type;
int operand;
CTNode *left, *right;
};
|
by: Bill Cunningham |
last post by:
pgs 140-1 of kandr2 talk about recursion. I tried typing in the code
char by char and couldn't find the bugs so I just read the code and a new
concept to me jumped out. Maybe this is what it means by recursion.
struct tnode *addtree (struct tnode *, char *);
is declared on p 140. But I noticed this on p 141.
struct tnode *addtree (struct tnode *p, char *w);
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|