Image Analysis Using OpenAI GPT-4o Model Programming Computer Science by usmanmalik57 …an image. ``` base64_image = encode_image64(image_path) def predict_sentiment(query): response = client.chat.completions.create( model= "… = encode_image64(image_path1) base64_image2 = encode_image64(image_path2) def predict_sentiment(query): response = client.chat.completions.create( model= "gpt… Re: Database wrapper for Codeigniter 3 Programming Web Development by pyeri … a couple of helper functions which make the task of query building easier: ``` function build_insert_query($table, $values) { $fields = []; $padding = []; $value_array = []; foreach… Google is promoting reddit in an arrogant way Programming Web Development by jkon … only in the outer match of the embeddings of my query, even so ... there it is. I understand that Google NEEDS… Re: Google is promoting reddit in an arrogant way Programming Web Development by jkon … see reddit in my search results I could make me query state that , but of course I would have to mention… Re: VB60, Run-time error 3709 solution Programming Software Development by Reverend Jim Are you trying to execute the query before opening the connection? I'm just guessing because you didn't post any code. Strictly speaking you didn't post a question either. Re: Database wrapper for Codeigniter 3 Programming Web Development by Dani Wow, this is old. I just stumbled upon it and it’s so crazy looking back at old code you wrote once upon a time. Especially since we are still working off the same framework so it’s just interesting to see how much it’s morphed and evolved over the years. Re: Database wrapper for Codeigniter 3 Programming Web Development by Dani I started with CI3 probably like a decade ago, and that’s what I’m continuing to use, albeit with a bunch of security updates and so forth. It’s not worth it to me to upgrade to CI4 right now since that would pretty much be a complete rewrite of the entire app for not much upside. Do you have any experience with CI4? Re: Database wrapper for Codeigniter 3 Programming Web Development by pyeri I have never bothered to check CI4 as CI3 fulfilled all my web development needs. It required some modifications when PHP 8 came (PHP 8 didn't allow dynamic properties which are used in CI3). But otherwise, it works fine for most small to medium sized projects. One of the best things about CI3 is that it works out of the box with minimum initial … Re: Google is promoting reddit in an arrogant way Programming Web Development by Dani For sure. Years ago, Google *hated* forums. We lost all of our traffic and membership and post activity quickly followed. Nowadays, Google *loves* forums. However, our traffic has yet to return, although I've been hearing through SEO communities that some other forums have regained their traffic. Here's an article on one of the more popular … Re: Google is promoting reddit in an arrogant way Programming Web Development by Reverend Jim How does Daniweb fare in search engines like Duckduckgo and Bing? Re: Google is promoting reddit in an arrogant way Programming Web Development by Dani Bing tends to not target a very technical audience, and/or people are not asking technical questions on Bing that would land them on DaniWeb. That's always been the case. Duckduckgo simply doesn't have a large enough share of the market to make any impact. I think, last I understood, they had a 2% share of the overall search market? Also, … Re: Google is promoting reddit in an arrogant way Programming Web Development by Admin907 t's understandable to be frustrated by Reddit posts dominating Google search results, especially if you dislike the platform's format and community style. Google prioritizes Reddit because it values user-generated content, but this can make search results feel repetitive and less relevant. Ideally, Google should diversify its top results to provide… Re: Google is promoting reddit in an arrogant way Programming Web Development by Salem Or you just learn how to use the tools. If you want only reddit, then type this into your search: `c programming language site:reddit.com` If you want everything but reddit, then type this into your search: `c programming language -site:reddit.com` Re: How to query database using variable and get all results not just one row Programming Web Development by Mikekelvin … (variable_name). Here's how you can modify your query to achieve this: // Assuming $currentUser holds the… identifier of the current user // Query database to retrieve records associated with the current user …currentUser holds the correct value before executing the query to ensure accurate filtering of records. If there… Re: How to query database using variable and get all results not just one row Programming Web Development by Chris_103 … fetch(). Here's how you can modify your code: ```php // Query database to retrieve records associated with the user $sql = "… all rows that match the criteria specified in the SQL query and store them in the `$records` variable as an array… Using Natural Language to Query SQL Databases with Python LangChain Module Programming Computer Science by usmanmalik57 …openai-tools", verbose=True) response = agent_executor.invoke(query) return response ``` ## Generating Response from PostgreSQL Database …most number of orders" response = get_db_response(sqlite3_uri, query) ``` **Output:** ![image4.png](https://static.daniweb.com… Re: How to query database using variable and get all results not just one row Programming Web Development by Biiim logically, it would be because `WHERE variable_name = :variable_name` matches 1 row in your table maybe try a `var_dump(str_replace(':variable_name',"'some_value'",$sql));var_dump($records);`? run the sql on whichever way you use to access your DB directly I don't use PDO so i'm not too familiar on how it returns results, either … Re: Using Natural Language to Query SQL Databases with Python LangChain Module Programming Computer Science by aishamushtaq very helpful Paris Olympics Ticket Information Chatbot with Memory Using LangChain Programming Computer Science by usmanmalik57 …Eiffel Tower Stadium in Paris. ``` Let's pass another query. ``` query = "And what is the category of this …Information Chatbot. Enter your query") print("=======================================================================") query = "" while query != "bye": query = input("\033[… Paris Olympics Chatbot- Get Ticket Information Using Chat-GPT and LangChain Programming Computer Science by usmanmalik57 …context information contains the answer to our query. We will create a `create_stuff_documents_chain` chain…lowest ticket price for tennis games?" generate_response(query) ``` **Output:** ``` The lowest ticket price…lowest ticket price for tennis games?" generate_response(query) ``` **Output:** ``` The category for … Question Answering with YouTube Videos Using RAG in LangChain Programming Computer Science by usmanmalik57 …follow-up questions. ``` chat_history = [] def generate_response_with_memory(query): result = retrieval_chain.invoke({ "chat_history": … your query") print("=======================================================================") query = "" while query != "bye": query = input… Retrieval Augmented Generation with Hugging Face Models in LangChain Programming Computer Science by usmanmalik57 …'s reply. ``` def generate_response(query): response = retrieval_chain.invoke({"input": query}) return response["answer"] query = "What are the… three points where Republicans and Democrats agree?" result = generate_response(query) print(result.split("<end>")[1]) ``` **… Claude 3 Opus Vs. Google Gemini Vs. GPT-4 for Zero-Shot Text Classification Programming Computer Science by usmanmalik57 … an Object of the `GenerativeModel` class and pass the input query to the `model.generate_content()` method. In the following script, we… Re: Improve HAVING BY performance Programming Databases by toneewa … auto start_time0 = std::chrono::high_resolution_clock::now(); // SQL query stmt->execute("SELECT * FROM Products"); sql…auto start_time2 = std::chrono::high_resolution_clock::now(); // Third query with HAVING stmt->execute("SELECT ProductName, … Re: Improve HAVING BY performance Programming Databases by toneewa ….0627212 seconds 5: WHERE Query execution time: 0.0002878 seconds HAVING Query execution time: 0.0002313 seconds HAVING Query execution time: 0.0002674… Re: Improve HAVING BY performance Programming Databases by toneewa …43 49.39 49.98 49.22 49.57 HAVING Query execution time: 0.245288 seconds Diode 24.1361 Capacitor …Transistor 24.0247 Resistor 24.1304 Inductor 24.1018 HAVING Query execution time: 0.436416 seconds Diode 24.1361 Capacitor 24… Re: Improve HAVING BY performance Programming Databases by Reverend Jim …performance. > >Optimize the Query: Ensure that your query is optimized and written in a way…your database statistics are up-to-date. The query optimizer relies on statistics to generate efficient execution… plans. Outdated statistics can lead to suboptimal query performance, including queries involving the HAVING clause. &… Re: Improve HAVING BY performance Programming Databases by Biiim … mean't that the HAVING statement is like dumping your query result into a temp table and then running another… query on it after > As far as what I was … they can get very bad when they stop the whole query making use of one of the main indexes, you can… Re: Improve HAVING BY performance Programming Databases by Biiim … variables to better handle the queries you want to run, Query cache for instance will cache the most common queries so… get dropped to save time and memory usage, the PHP query uses a specific ID so the rows are cut down… after a couple of years this starts slowing down the query immensely `AND tbl.create_time > NOW() - INTERVAL 2 WEEK` (with… Re: Improve HAVING BY performance Programming Databases by Biiim … HAVING clause runs on the returned result set of your query, which as you say has no indexes on it as… that subquery loses its indexes, you need to solve the query so it joins the table directly like `LEFT JOIN tbl2…