Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
static_cast
- Page 1
'AI Is Expected to Transform the Role of Controllers & Analysts '
Community Center
10 Hours Ago
by Johannes C.
**AI will automize many routine tasks in accounting and the role of financial controllers and analysts will change, but not be replaced – say Manoj Kumar Vandanapu and Sandeep Kumar.** ![agi-talks-02.jpg](https://static.daniweb.com/attachments/4/b1fce5f78b7456fea7043a6d095ca2f0.jpg) In the latest AGI Talks, two renowned finance experts share …
Retrieval Augmented Generation with Hugging Face Models in LangChain
Programming
Computer Science
5 Days Ago
by usmanmalik57
In my [previous articles](https://www.daniweb.com/programming/computer-science/tutorials/541732/paris-olympics-ticket-information-chatbot-with-memory-using-langchain), I explained how to develop customized chatbots using Retrieval Augmented Generation (RAG) approach in [LangChain](https://www.langchain.com/). However, I used proprietary models such…
Re: how to create a simple elevator simulation?
Programming
Software Development
2 Days Ago
by trueframe
To make a basic elevator simulation, first, identify the floors and the elevator's capacity. Then, use loops and conditionals in programming to mimic its movement. Include buttons for users to call the elevator and select floors. Test thoroughly for accuracy.
Re: Using Natural Language to Query SQL Databases with Python LangChain Module
Programming
Computer Science
1 Day Ago
by aishamushtaq
very helpful
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by toneewa
Some minor syntax fixes. Some things to consider are the collision and distance of drawing the next ball. A ball inside a ball's radius will cause numerous collisions. Even the starting ball locations can be already causing collisions. I added a collision counter display. Increased the maximum balls to make to 50. The timer delay can also impact …
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by toneewa
I cleaned up the code some more. Removed some things that were not being used. I ran into a couple problems which caused the freeze you mentioned. It was memory heap space and array allocating. E.g., if x or y becomes negative, and also infinite recursion. I added a x/y coordinate display for a ball, and tinkered with the placement of the …
Using Natural Language to Query SQL Databases with Python LangChain Module
Programming
Computer Science
2 Weeks Ago
by usmanmalik57
The advent of large language models (LLM) has replaced complex scripts with natural language for automating various tasks. You can now use LLM to interact with your databases using natural language, which makes life easier for people who do not have sufficient SQL knowledge. In this article, you will learn how to retrieve information from SQL …
Slaying Unicorns: How Europe Sabotages Its Own Economic Future
Community Center
4 Weeks Ago
by Johannes C.
**With the decline of industry and post-colonial exploitation, Europe should aim to become a global leader in the tech and service industry. But as the EU increasingly complicates the process for startups to thrive, the economic outlook appears bleak.** If you've missed recent AI news, **[Claude Opus now outperforms GPT-4 in most areas](https://…
'Prepare for the Earliest Possible AGI Deployment Scenario'
Community Center
2 Weeks Ago
by Johannes C.
**Despite the uncertain timeline for Artificial General Intelligence (AGI) becoming a reality, we need to assure responsible and ethical development today – says Jen Rosiere Reynolds.** ![header-agi-talks1.png](https://static.daniweb.com/attachments/4/5595ff2ec36fde155011d21ea73dcd78.png) As part of our new **AGI Talks**, experts from …
Question Answering with YouTube Videos Using RAG in LangChain
Programming
Computer Science
1 Week Ago
by usmanmalik57
In previous articles, I explained how to use natural language to interact with [PDF documents](https://www.daniweb.com/programming/computer-science/tutorials/541732/paris-olympics-ticket-information-chatbot-with-memory-using-langchain) and [SQL databases](https://www.daniweb.com/programming/computer-science/tutorials/541771/using-natural-language-…
'30% of Activities Performed by Humans Could Be Automated with AI'
Community Center
1 Week Ago
by Johannes C.
**Alexander De Ridder, AI visionary and CTO of SmythOS, discusses the transformative power of specialized AI systems and the future of human-AI collaboration.** ![header-agi-talks-adr.jpg](https://static.daniweb.com/attachments/4/cf1ab716c18354710010dabb4e9e2a9a.jpg) In the newest interview of our AGI Talks series, **Alexander De Ridder** …
Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by jprog1000
Hello, I have a program which creates multiple balls and bounces them off when they collide. This works fine. import java.awt.Rectangle; public class Ball{ private int x = 0; private int y = 0; private int radius; private int panelwidth = 500; private int panelheight = 500…
How to Optimize RecyclerView performance by implementing the ViewHolder
Programming
Mobile Development
2 Weeks Ago
by Mikekelvin
When working with RecyclerView, always utilize the ViewHolder pattern to improve performance by minimizing the number of findViewById() calls. public class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder> { public static class ViewHolder extends RecyclerView.ViewHolder { TextView textView…
Re: Mariadb10.11.6 Glarea single failed node startup stuck failure
Programming
Databases
2 Weeks Ago
by toneewa
I wonder how these IP addresses are issued. Static, dynamic, or is DHCP on? It reminds me of the time a network printer that stopped working, after the power went out. Other devices connected to the network after it's setup. Then, after rebooting, it got a different IP, but the host still thought it was on the old one. I've seen the same thing when…
Re: Video is not the main content of the page
Digital Media
Digital Marketing
Search Engine Strategies
1 Week Ago
by Dani
You have the itemtype set to a VideoObject but, as you point out, only sometimes is there actually an .mp4 file. The rest of the time, it's a static image such as a png, jpg, or jpeg. Google probably doesn't trust your meta tags since they are inaccurate half the time.
Re: Determine if email address is used by scammer
Digital Media
Digital Marketing
Search Engine Strategies
1 Week Ago
by Puterwiz82
Thank you. It seems based on the email on Friday, they got mad I reposted it to spam. The same supposed police department has contacted previously. I attached the recent emails. ![IMG_3185.jpeg](https://static.daniweb.com/attachments/4/7b55edb5f07accf5e085c8309e4055be.jpeg)
Re: Things I hate about TV shows
Community Center
Geeks' Lounge
4 Weeks Ago
by Dani
Currently the thing I hate most about TV shows is how much time elapses between seasons. I feel like I've been waiting for season 2 of Severance on AppleTV for *forever*! (It's been over 2 years already since season 1 debuted.) Speaking of that, is there ever going to be a second season for Squid Game? I can't imagine that Netflix wouldn’t invest …
Re: Things I hate about TV shows
Community Center
Geeks' Lounge
4 Weeks Ago
by Reverend Jim
Fer sher. You pretty much have to watch the previous season again before you start the next one. I'm still waiting for season 2 of The Old Man (Jeff Bridges, John Lithgow). At my age sometimes I lose the thread if two weeks goes by between episodes. Sometimes I'll wait until the end of a season before I watch any of it. I especially hate it when a …
Re: Things I hate about TV shows
Community Center
Geeks' Lounge
4 Weeks Ago
by pritaeas
> is there ever going to be a second season for Squid Game Yes, already announced, available soon.
Re: Things I hate about TV shows
Community Center
Geeks' Lounge
4 Weeks Ago
by Dani
That's my point, though. Gone are the days when a show would break for a summer and the next season would start up again in the fall.
Re: Things I hate about TV shows
Community Center
Geeks' Lounge
4 Weeks Ago
by Reverend Jim
>Gone are the days That's pretty much the case for everything. I remember when TV sucked all through summer vacation and I couldn't wait for the end of September for the new seasons to start. Of course it was bittersweet because September also meant back to school. I'll mention a few more things that may have been mentioned before but I …
Re: Things I hate about TV shows
Community Center
Geeks' Lounge
4 Weeks Ago
by KomalBhatt
You know, there are few things more frustrating than getting interested in a TV show only to find it falling short of expectations. From the overly predictable plotlines to the underdeveloped characters, there's a huge list. But what really get irritated by is when the dialogue feels forced, like the writers are trying too hard to be clever or …
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by jprog1000
Thank you so much for your reply and additions! It is certainly working as I wanted. I will read through the code you have added and ask you any questions I might have. I hope you don't mind. Regards
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by Dani
I’ll mark this question solved :)
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by Dani
… oh, sorry, missed the bit about you still needing clarifications. Feel feee to ask :) I’ll now unmark this topic as solved. /facepalm
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by jprog1000
Hello, Thank you again so much! All your additions are clear, but it seems like whenever two balls collide, more than one ball is added to the arraylist and painted. Any way to have just one ball added to the panel for every collision? Have some kind of a toggle flag in paintcomponent? Regards
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by toneewa
Yes, this is true. Overlapping ball spawns can do that causing a chain reaction. Something like that could be done. How you handle the spawning of the new ball is what I played with a bit before. You will see better collision detection changing to: g.fillOval(ball.getX(), ball.getY(), 1 * ball.getRadius(), 1 * ball.getRadius());
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week Ago
by jprog1000
Got it. Thank you so much!
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week Ago
by vortex_1
In my opinion, implementing a feature in a bouncing balls simulation where a new ball is created when two balls collide can add an interesting and dynamic element to the simulation. This feature can introduce a sense of complexity and unpredictability, making the simulation more engaging and challenging for users. It could also provide an …
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week Ago
by jprog1000
Great reply, vortex! Agree with all your points.
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
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
© 2024 DaniWeb® LLC