Bunker -4 Newbie Poster

A straightforward solution to printing multiple integers is to use a loop. For example, in Python, you could use a "for" loop to iterate through a list of integers and print each one. This method is simple and effective.

trueframe 15 Newbie Poster

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.

Chris_103 -10 Newbie Poster

It seems like you're experiencing issues with PHP-based email functionality, where submissions are not triggering emails to be sent. Let's dive into the code snippet you provided and see if we can identify any potential issues or improvements.

Dani commented: And ... ? -8
david.tigner 45 Newbie Poster

This one is becoming more perplexing. After adding in the PHPMailer coding, page would crash (e.g. blank white screen, HTML file that would display the screen doesn't even start at all, e.g. error in the 1st running PHP file). Adding the semi-colon at end of line 18 (in previously discussed code) did not work and funny thing is, the original coding did not have the ; there and while no emails of submitted info were being sent at least the screen display HTML file (2nd running file after the PHP) was. So I started adding the new code bit by bit to the original PHP file to see where it would crash. First I added:
require 'PHPMailer/PHPMailer/src/Exception.php'; require 'PHPMailer/PHPMailer/src/PHPMailer.php'; require 'PHPMailer/PHPMailer/src/SMTP.php';
The program did not crash.
Then I added:

$mail = new PHPMailer(TRUE);
/* Open the try/catch block. */
try {
    /* Set the mail sender. */

  $mail->CharSet = "UTF-8";
  $mail->Encoding = 'base64';
  $mail->isSMTP();
  $mail->Host       = 'smtp.ionos.com';                     //Set the SMTP server to send through
  $mail->SMTPAuth   = true;
  $mail->SMTPSecure = 'tls';
  $mail->Username   = 'kaosfrenzy@aol.com';                     //SMTP username
  $mail->Password   = '(password)';                               //SMTP password
  $mail->Port       = 465;                                    //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`

    // $mail->DKIM_domain = 'example.com';
    // $mail->DKIM_private = 'test.key';
    // $mail->DKIM_selector = '_default';
    // $mail->DKIM_passphrase = '';
    // $mail->DKIM_identity = $mail->From;
    // //Suppress listing signed header fields in signature, defaults to true for debugging purpose
    // $mail->DKIM_copyHeaderFields = false;
    //Optionally you can add extra headers for signing to meet special requirements
    //$mail->DKIM_extraHeaders = ['List-Unsubscribe', …
usmanmalik57 0 Light Poster

In my previous articles, I explained how to develop customized chatbots using Retrieval Augmented Generation (RAG) approach in LangChain. However, I used proprietary models such as OpenAI, which can be expensive when you try to scale.

In this article, I will show you how to use the open-source and free-of-cost models from Hugging Face to develop chatbot applications in LangChain. By the end of this tutorial, you will be able to import any Hugging Face Large Language Model (LLM) and embedding model in LangChain and develop your customized chatbot applications.

Importing and Installing Required Libraries

First, install and import the libraries and modules you will need to run codes in this tutorial.

The codes in this tutorial are run on Google Colab, where some of the libraries are preinstalled. You can install the rest of the libraries via the following pip command.


!pip install -q -U transformers==4.38.0
!pip install -q -U sentence-transformers
!pip install -q -U faiss-cpu
!pip install -q -U bitsandbytes==0.42.0
!pip install -q -U accelerate==0.27.1
!pip install -q -U huggingface_hub
!pip install -q -U langchain
!pip install -q -U pypdf

The script below imports the required libraries in your application.


from transformers import AutoModelForCausalLM, AutoTokenizer, logging, pipeline
from langchain_community.llms.huggingface_pipeline import HuggingFacePipeline
from langchain.embeddings import HuggingFaceEmbeddings
from langchain_community.document_loaders import PyPDFLoader
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain_core.prompts import PromptTemplate
from langchain.vectorstores import FAISS
from langchain.chains.combine_documents import create_stuff_documents_chain
from langchain.chains import create_retrieval_chain
from langchain_core.prompts import ChatPromptTemplate
from sentence_transformers import SentenceTransformer
from transformers import BitsAndBytesConfig …
khan zain -4 Newbie Poster

"I'm attempting to embed an image in my HTML page, but it's not showing up. I've checked the file path, and it seems correct. Below is the code I'm using. Any insights on why the image isn't displaying as expected?""

<!DOCTYPE html>
<html lang=""en"">
<head>
    <meta charset=""UTF-8"">
    <meta name=""viewport"" content=""width=device-width, initial-scale=1.0"">
    <title>Image Woes</title>
</head>
<body>



<h1>My Webpage</h1>

<img src=""images/my-image.jpg"" alt=""My Image"">



</body>
</html>"
Salem commented: spam -4
khan zain -4 Newbie Poster

"I'm working on a navigation menu for my HTML page, but it's not behaving as expected. The links aren't aligning properly, and the styling seems a bit wonky. I've included the code below. Can anyone help me figure out what's causing this navigation headache?

This my Code

<!DOCTYPE html>




<html lang=""en"">




<head>


<meta charset=""UTF-8"">
<meta name=""viewport"" content=""width=device-width, initial-scale=1.0"">
<title>Navigation Woes</title>
<link rel=""stylesheet"" href=""styles.css"">


</head>




<body>



<nav>
    <ul>
        <li><a href=""#"">Home</a></li>
        <li><a href=""#"">About</a></li>
        <li><a href=""#"">Services</a></li>
        <li><a href=""#"">Contact</a></li>
    </ul>
</nav>



</body>




</html>

The aim is to have a simple navigation menu, but it's not looking quite right. The links aren't aligning properly, and the styling feels off."

Michael_80 0 Newbie Poster

In Unity 3D, utilizing the Starter Assets package, I am trying to swap the mesh on the Starter Asset character that I duplicated in the scene. I unpacked a prefab so that I could utilize the mesh filter of the new prefab that I imported. I realized that there are several meshes on the (prefab/game object) that I unpacked and wanted to know how to layer them onto the skinned mesh renderer of the starter asset character? The new prefab contains multiple mesh overlays,(i believe the original is in underpants as Man_Body Mesh) and are they layered individually onto the game object?

I have attempted to add a mesh filter (Man_BodyMesh) and used the root which was different on the Man-BodyMesh from the Starter Asset Mesh…….basically my object upon play looked like the vertices were jumbled resulting in The Thing from John Carpenter? Iknow the Armature on the Unity Asset has a skeleton, weighted and has a root. I was hoping to copy and paste until I was proven wrong.

SCBWV 71 Junior Poster

I don't understand a few things. There are option buttons and there are check boxes. So I don't know what you mean by "option button checkbox." I also don't know what you mean by "record." Do you mean print? Read values from a file?

I would suggest instead of checking for "1" that you use "If chkExtra(0).Value = vbChecked", which is a VB constant and probably compiles more efficiently.

rproffitt commented: From memory that's a valid example. Let's hope arcon engages and supplies a minimum viable example rather "code is broken." +17
arcon 51 Light Poster

thanks for everything

arcon 51 Light Poster

because it still works and there are many people who use it, thank you

arcon 51 Light Poster

because it still works and there are many people who use it, thank you

rproffitt 2,580 "Nothing to see here." Moderator

I noted the issues with your post and the problems with what is a dead system. While I do have one last VB6 dev laptop in storage I only pull it out for paid work. And at 250USD a hour the only company that pays is very careful about their requests.

You ignored how such problems are presented. ZIP file? Too dangerous today. You could have posted the code snippet along with what lines you think the problem is at.

Finally there's the issue of how you wrote up the problem description and more so the lack of a document detailing the expected software operation. AKA the spec.

Sure, go ahead and claim I didn't supply the solution when you didn't supply the problem properly.

Reverend Jim 4,780 Hi, I'm Jim, one of DaniWeb's moderators. Moderator Featured Poster

Yes. People continue to ask about VB6. They shouldn't. And you likely won't see anyone answering questions about, for example, COBOL or QuickBASIC, except in a historical context. The only VB6 question that should be asked is "why are you still using it?"

arcon 51 Light Poster

Sorry but you have not given a solution to the issue, because I see that here in this forum people continue to ask about vb6.0

rproffitt commented: You didn't supply the code in the clear. ZIP file? I won't open it and then the problems noted above. +17
rproffitt 2,580 "Nothing to see here." Moderator
  1. With so few having VB6 now, you need to move to a current release. Help will be hard to find.
  2. I can't load up your project. Few others can so by not posting the relevant code in the clear with your assessment, you see the issue?
  3. VB6, while I coded very large projects long ago, "It's Dead Jim." That is, you're on a deserted island.
  4. VB6 let us set breakpoints, examine variables and more. I continue to find old and new developers that don't know how to use the system.
arcon 51 Light Poster

I think I can record but I can't read with the option button checkbox
I don't know if I do the recording procedure correctly

polles 0 Newbie Poster

i would choose JavaScript

kishanrg 0 Newbie Poster

When it comes to developing a Ludo game, the choice of programming language largely depends on your familiarity with the language and the platforms you intend to target. However, some commonly used languages for game development, including Ludo games, are C++, C#, Java, JavaScript, and Python.

Ultimately, the "best" programming language for Ludo game development depends on your specific requirements, target platforms, and your proficiency with the language. It's also worth considering the availability of game engines and frameworks that support your chosen language.

kishanrg 0 Newbie Poster

Developing a game can vary greatly in terms of time depending on several factors such as the complexity of the game, the size of the development team, and the resources available. However, on average, it can take anywhere from six months to several years to develop a game from start to finish.

Simple mobile games with basic mechanics might take a few months to develop, while larger-scale projects with advanced graphics, complex gameplay mechanics, and multiplayer features can take several years to complete. Additionally, factors like debugging, testing, and polishing can extend the development timeline.

Fergus_1 0 Newbie Poster

ok so i have a page with a gridview on it and it displays rows from sql table. i have also a link assigned to each row:

<asp:GridView ID="GridViewMatters" runat="server" AutoGenerateColumns="False" OnRowDataBound="GridViewMatters_RowDataBound">
    <Columns>
        <asp:BoundField DataField="client_ref" HeaderText="Client Reference" />
        <asp:BoundField DataField="our_ref" HeaderText="Our Reference" />
        <asp:BoundField DataField="client_name" HeaderText="First Name" />
        <asp:BoundField DataField="section_name" HeaderText="Second Name" />
        <asp:BoundField DataField="curr_status" HeaderText="Status" />
        <asp:TemplateField HeaderText="">
            <ItemTemplate>
                <asp:HyperLink ID="lnkDetails" runat="server" Text="View" NavigateUrl='<%# Eval("our_ref", "MD_Overall.aspx?id={0}") %>' />
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>

this works fine and the url that gets displayed is good. But i would like to send the our_ref attribute to the page itself aswell as the url and use it make further queries.

Thanks

G

Digital_39 0 Newbie Poster

Hi, Its helpful for me. I got my answer.

jprog1000 0 Newbie Poster

Great reply, vortex! Agree with all your points.

vortex_1 0 Newbie Poster

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 opportunity to explore concepts related to conservation of momentum and energy, as the new ball's initial velocity and direction could be determined based on the properties of the colliding balls.

However, it's important to consider how this feature would affect the overall behavior and realism of the simulation. In a real-world scenario, the creation of a new ball upon collision is not a natural occurrence, and implementing this feature could potentially detract from the educational or realistic aspects of the simulation.

If the primary goal of the bouncing balls simulation is to accurately model and demonstrate the physics of ball collisions, then adding a feature where a new ball is created upon collision may not be appropriate. However, if the simulation is intended to be more of a game or interactive experience where realism is not the primary concern, then this feature could be a fun and engaging addition.

In conclusion, the decision to implement a feature where a new ball is created when two balls collide in a bouncing balls simulation should be based on the intended purpose and audience of the simulation mod manager. While it can add an element of complexity …

jprog1000 0 Newbie Poster

Got it. Thank you so much!

usmanmalik57 0 Light Poster

In previous articles, I explained how to use natural language to interact with PDF documents and SQL databases, using the Python LangChain module and OpenAI API.

In this article, you will learn how to use LangChain and OpenAI API to create a question-answering application that allows you to retrieve information from YouTube videos. So, let's begin without ado.

Importing and Installing Required Libraries

Before diving into the code, let's set up our environment with the necessary libraries.

We will use the Langchain module to access the vector databases and execute queries on large language models to retrieve information about YouTube videos. We will also employ the YouTube Transcript API for fetching video transcripts, the Pytube library for downloading YouTube videos, and the FAISS vector index for efficient similarity search in large datasets.

The following script installs these modules and libraries.


!pip install -qU langchain
!pip install -qU langchain-community
!pip install -qU langchain-openai
!pip install -qU youtube-transcript-api
!pip install -qU pytube
!pip install -qU faiss-cpu

The script below imports the required libraries into our Python application.


from langchain_community.document_loaders import YoutubeLoader
from langchain_openai import ChatOpenAI
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.output_parsers import StrOutputParser
from langchain.text_splitter import RecursiveCharacterTextSplitter
from langchain_openai import OpenAIEmbeddings
from langchain_community.vectorstores import FAISS
from langchain.chains.combine_documents import create_stuff_documents_chain
from langchain.chains import create_retrieval_chain
from langchain_core.documents import Document
from langchain.chains import create_history_aware_retriever
from langchain_core.prompts import MessagesPlaceholder
from langchain_core.messages import HumanMessage, AIMessage
import os
Creating Text Documents from YouTube Videos

The first step involves converting …

evangelistapps 0 evangelistapps

Choosing an excellent mobile app development company requires thorough research and consideration of various factors. Start by assessing their portfolio, client testimonials, and industry reputation. Look for companies with experience in your industry and a track record of successful projects. Consider their expertise in different platforms and technologies, as well as their ability to understand your project requirements and provide innovative solutions. Additionally, evaluate their communication and project management practices to ensure smooth collaboration throughout the development process. By carefully weighing these factors, you can select an awesome mobile app development company that aligns with your needs and goals.

Dani 4,084 The Queen of DaniWeb Administrator Featured Poster Premium Member

You can use a website like Built With if you want to quickly see what frameworks a website that is already in their system is using.

However, to figure it out for yourself, it's just a matter of looking at the HTML source code for a webpage and seeing if you can find javascript tags, etc. that are used by the framework. For example, you can see that we use jQuery and Bootstrap here at DaniWeb.

That being said, this is only going to tell you what's being used on the front end. It takes some hacker-level sleuthing to figure out what backend technologies a website is using, if they aren't announcing them.

Chris_103 -10 Newbie Poster

To retrieve all records associated with the current user, you can use the fetchAll() method instead of fetch(). Here's how you can modify your code:

// Query database to retrieve records associated with the user
$sql = "SELECT * FROM table_name WHERE variable_name = :variable_name";
$stmt = $conn->prepare($sql);
$stmt->bindParam(':variable_name', $variable_name, PDO::PARAM_STR);
$stmt->execute();
$records = $stmt->fetchAll(PDO::FETCH_ASSOC);

This will fetch all rows that match the criteria specified in the SQL query and store them in the $records variable as an array of associative arrays.

Biiim commented: looks like an AI answer, he did use the fetchAll command but got 1 result -2
rproffitt 2,580 "Nothing to see here." Moderator