Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
b_tree
- Page 1
Handling Real-Time DOM Sync in SSR React App with Dynamic Nested Routes
Programming
Web Development
2 Weeks Ago
by Neil_brown001
I'm building an SSR React app (Next.js) with dynamic nested routes where components at multiple levels depend on both initial server-side data and real-time client-side updates via WebSockets. The challenge arises when synchronizing DOM state post-hydration—especially when the component tree changes due to route-based code-splitting, and some child…
Re: Which is the best email marketing tool you ever used?
Digital Media
Digital Marketing
4 Weeks Ago
by Shady33
Some of the most popular are: Mailchimp,ConvertKit,SendGrid,ActiveCampaign,HubSpot,AWeber,GetResponse,MailerLite,Moosend and Benchmark Email. I am currently mostly use mailchimp. Best fo beginners and small to medium-sized businesses, user-friendly interface, automation, A/B testing, and detailed analytics.
send checkbox to email using phpmailer
Programming
Web Development
2 Months Ago
by ianhaneybs
I need some help with getting checkbox values sent to email using phpmailer I have not done it before so unsure how to do it, the current code I have is below $postData = $_POST; $oneway = $_POST['oneway']; $return = $_POST['return']; $htmlContent = '<h2>Contact Form Details</h2> &…
Re: send checkbox to email using phpmailer
Programming
Web Development
2 Months Ago
by Dani
I would begin by making sure that you sanitize input passed in via $_POST. This ensures that someone doesn't pass in something like `$POST['oneway'] = '</p>Foo!<strong>Blah</strong>` and completely screw up your HTML, or, worse yet, inject Javascript into your HTML. <p><b>One Way:</b> ' . …
Implementing a Dynamic Filter Option in a Web Application
Programming
Software Development
1 Month Ago
by YashSmith
If you want to add a dynamic filtering option in your web application, here’s a simple and effective solution using React. This filter allows users to search by keyword, set minimum and maximum values, and filter by category. import React, { useState } from "react"; const DataFilter = ({ data }) => { const […
Multiple MySQL connections + transactions
Programming
Databases
1 Month Ago
by Dani
I ran into a bit of a snag in my code, and I'm trying to make heads or tails as to whether this will work. From within my PHP script, can I write to a database using a MySQL connection in the middle of a transaction with a different connection? e.g. // Open Connection 1 and connect to Database A // Start transaction with …
Re: Multiple MySQL connections + transactions
Programming
Databases
1 Month Ago
by Reverend Jim
As far as I know you can connect to more than one database at a time but you require a separate connection object for each one. Since queries go through the connection object you can't run a query on more than one db at a time. It seems to me that transactions are also connection based so you would have to manually roll back a transaction on A if …
Re: Top industries that use automation
Programming
Software Development
2 Months Ago
by Reverend Jim
As someone who actually programmed the computers that controlled our provincial generation, transmisssion, and distribution grid for 29 years I disagree with the classification of that software as automation in the sense of this discussion. While we did have some packages that were advisory (water flow optimization and generation efficiency for two…
Re: Best way to find a segment of code that matches a given input segment?
Programming
Software Development
1 Month Ago
by Dani
I'll echo rproffitt in that *anything* is feasible with the right tools, skillset, money, and time. However, I think the question you really mean to be asking is how feasible this is for *you*? I will start off by saying that, as long as you're only thinking of very simplistic complexity, I think the existing LLMs out there are capable of …
Re: Are SaaS & Cloud Computing Interchangeable Terms?
Community Center
1 Month Ago
by peol
Cloud computing and SaaS (Software as a Service) are not interchangeable terms. Cloud computing includes IaaS, PaaS, and SaaS services that provide computing resources over the Internet. Essentially, SaaS is a subset of cloud computing where users access software applications online without managing infrastructure.
Re: ‘Advanced AI should be treated similar to Weapons of Mass Destruction’
Community Center
2 Months Ago
by rproffitt
UPDATE: Feb 4, 2025 — Google on Tuesday updated its ethical guidelines around artificial intelligence, removing commitments not to apply the technology to weapons or surveillance.
Re: Multiple MySQL connections + transactions
Programming
Databases
1 Month Ago
by Dani
A slightly related question: Is it okay to use PHP's `mysqli::select_db()` function to switch databases in the middle of a transaction? This is what got me into trouble in the first place, when I started a transaction, performed some writes, switched databases, and then wrote to that second database, and then switched back, and performed some …
Re: Multiple MySQL connections + transactions
Programming
Databases
1 Month Ago
by Salem
https://www.php.net/manual/en/mysqli.select-db.php I think the key word in all of this is "default". You can probably do what you want, but you have to refer to each DB by it's own handle. Using `select_db` is fine, if you only have one DB and you want to be lazy about referring to it. So you make it the default DB. But as …
Re: Multiple MySQL connections + transactions
Programming
Databases
1 Month Ago
by Dani
I am already using multiple MySQL connections throughout the project, as well as select_db() in some other places. My question specifically revolved around if anyone can explain why select_db() implicitly committed the transaction, and then when done again to return back to the initial database, it did a rollback instead of commit.
Re: Multiple MySQL connections + transactions
Programming
Databases
1 Month Ago
by Reverend Jim
In that case I can't suggest anything. I've never had to update multiple databases for any of the systems I set up.
Re: Multiple MySQL connections + transactions
Programming
Databases
1 Month Ago
by toneewa
You're not suppose to switch databases with a connection mid-transaction. It's by design to rollback because it considers it a change to the session context. XA Transactions can be done if you use the InnoDB storage engine. Create separate PDO connections for each database. I wonder what kind of results you get with autocommit, serializable …
Re: Multiple MySQL connections + transactions
Programming
Databases
1 Month Ago
by Dani
> If the databases are on the same server and use InnoDB, you can use fully qualified table names, and write to multiple databases on a single connection. That's what I ultimately started doing instead! Thank you so much for a definitive answer to my question.
Re: B-tree overlaid with Adjacency List?
Programming
Computer Science
12 Years Ago
by Rashakil Fol
> B-tree: a breadth-first memory layout to store the nodes, their associated data, and the data associated to the edges of the tree (the details of this implementation are not so relevant). This component exposes a standard tree interface (set of functions like add-child, get-parent, etc.). > BST logic: an implementation of a binary search …
b tree
Programming
Software Development
14 Years Ago
by geekme
Hello need help in traversing a b tree from down node to utmost parent node and how can you code for a leaf element, as it has an adjacent node as well apart from no child. REgards
Re: B-tree overlaid with Adjacency List?
Programming
Computer Science
12 Years Ago
by mike_2000_17
Thank you very much for the detailed answer! That's really helpful! Very much appreciated! Let me layout a few terms that I'll use here to describe my setup: *B-tree*: a breadth-first memory layout to store the nodes, their associated data, and the data associated to the edges of the tree (the details of this implementation are not so relevant). …
Re: B-tree overlaid with Adjacency List?
Programming
Computer Science
12 Years Ago
by mike_2000_17
> It is quite important that you explain what this actually is. Ok, let me answer your questions. > The ostensible BST is not even a binary tree. So how can you possibly call it a BST, then? By "not necessarily binary", I really should have said "d-ary". In other words, it's a d-ary search tree. If d = 2, then it is …
Re: B-tree overlaid with Adjacency List?
Programming
Computer Science
12 Years Ago
by Rashakil Fol
Generally speaking, having different linking structures overlaid on the same information is a very normal thing. A common example is when you want a one-to-one bidirectional dictionary, where you can lookup values by key or keys by value. The appropriate solution is situational. If you have, for example, things concurrently iterating through a …
Re: B-tree overlaid with Adjacency List?
Programming
Computer Science
12 Years Ago
by Rashakil Fol
I think there was a bit of confusion because your use of the term B-tree is not the standard use of the term, combined with your mentions of BST. In particular, one does not take a BST structure and then wrap it inside a B-tree. A B-tree is a structure that replaces a BST, for example every leaf node is of the same depth. The B-tree structure I …
Re: B-tree overlaid with Adjacency List?
Programming
Computer Science
12 Years Ago
by mike_2000_17
> The point is that small lists should be flattened, large ones will need to use another contiguous chunk of the heap. I beg to differ. The point is not so much about size, but about the uniformity of the sizes. If you have a tree like a binary search tree, then the number of out-going edges is not only predictable but fixed (except for leafs).…
Kind of confused of how you find the order of B-tree given bytes of block, key..
Programming
Computer Science
15 Years Ago
by lotrsimp12345
[B][COLOR="Red"]a multilevel index using a B-tree is to be made for a file with 600,000 records. A block contains 1500 bytes, a key is 10 bytes, a pointer is 5 bytes and a data record is 100 bytes. [/COLOR][/B] [B]a)What is the order of the tree?(assume tree node=a disk block)[/B] 600000recordsX100 bytes gives me total file size. …
B-tree overlaid with Adjacency List?
Programming
Computer Science
12 Years Ago
by mike_2000_17
I am currently working on kind of multi-graph structure. The thing is that two graphs are needed for my application which span the same vertices but with two distinct set of edges (i.e., a multi-graph). The first graph is a binary search tree, while the second graph must be general (directed / undirected, or bidirectional, possibly with cycles, etc…
Re: B-tree overlaid with Adjacency List?
Programming
Computer Science
12 Years Ago
by Rashakil Fol
> Yeah, I thought about inlining the adj-lists in the nodes. It is a good idea, and would probably be beneficial w.r.t. memory access patterns. The problem is that it requires a limited fan-out (or branch-factor) on the graph, and I'm not sure I can easily deal with that in my graph algorithm (and I would have to run empirical tests to gather …
Re: B-tree overlaid with Adjacency List?
Programming
Computer Science
12 Years Ago
by mike_2000_17
I'm really sorry about all the confusion about the terms. I just realized, after my previous post, that the B-tree term also refers to this specific type of search tree. In the literature I have been reading, they used B-tree as a short for "Breadth-first layout (or tree)". As for BST, I thought it was a general term (umbrella term) for …
B tree of order N
Programming
Software Development
14 Years Ago
by .:Pudge:.
Alright so I have to create a B-tree of order 'n', where the user puts in a desired 'n'. I borrowed and modified code of a B-tree of order 5, but I can't get it to work and it crashes. I also need it to display the contents of the tree in FIFO order. What do I need to change in order to get it to work? Suggestions? [CODE] #include <…
Re: B-tree overlaid with Adjacency List?
Programming
Computer Science
12 Years Ago
by Rashakil Fol
I'm going to reply in several separate posts because it's hard to organize everything in one, and the points are basically unrelated. > What you seem to be describing is a cache-aware B-tree implementation, with some bit-trickery. The purpose of that is not to be cache aware (since cache lines are neither 32k nor 1GB), it's to make pointer …
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC