199,112 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for retchedmonkey

Hello im working on a C program that counts the number of tabs, blanks and newlines. Here is my code: [CODE] #include <stdio.h> #define MAXLENGTH 500 /* This program accepts a string as input. * It should then count blanks, tabs and newlines. * It should print out the number …

Member Avatar for xavier666
3
432
Member Avatar for apegram

[CODE] int[][] jaggedArray = (from line in File.ReadAllLines(fileName).Skip(1) select (from item in line.Split('\t').Skip(1) select int.Parse(item)).ToArray()).ToArray(); [/CODE] This is a crazy example. It was sparked by what is probably a homework thread on another forum here, but it is basically reading in a tab-delimitted text file, stripping out the first row …

Member Avatar for ddanbe
3
700
Member Avatar for kevindougans

For anyone still using the old "mysql_fetch_assoc" here is something I've just discovered today after about 9 years of PHP'ing and thought I should sahre because I've not seen many open source projects use it (maybe for another reason I'm not yet aware of)... (note: both provide the exact same …

Member Avatar for pbcomput
3
207
Member Avatar for sircuncid

Can someone help em out with this: Im suppose to do this: [URL="http://www.ise.ufl.edu/cgs2421/cpp/files/projects/pro2.pdf"]http://www.ise.ufl.edu/cgs2421/cpp/files/projects/pro2.pdf[/URL] I gotta use loops to solve the horner algorythm This is whta i have but is not working [CODE]#include <iostream> using namespace std; int main (void) {// VARIABLE DECLARATIONS: double choice; // EXECUTABLE CODE: cout << "CGS …

Member Avatar for jonsca
3
169
Member Avatar for lllllIllIlllI

Regex is one of the more complicated modules that you can use in python. Once you have learnt it though you can use it many different programming languages, so its a useful tool for using with strings. So first to use regex you must import it [code] import re [/code] …

Member Avatar for bunkus
3
2K
Member Avatar for sarah_laz

I have been asked to program a spellchecker in C for an assignment. I am quite new to C and programming in general, so I have decided to start by writing a program that does the following: [LIST] [*]Reads words into an array from a dictionary text file. [*]Reads words …

Member Avatar for sarah_laz
3
1K
Member Avatar for Dave Sinkula

Several methods of reversing the bits of a byte are presented here. [i]Note that not all of the methods are portable.[/i]

Member Avatar for Dave Sinkula
3
770
Member Avatar for Geekitygeek

How to Handle Events Event handlers make up a large portion of Windows Form Coding. There have been a lot of questions on the C# forum of late that stemmed from people creating Event Handlers incorrectly. First lets look at how an event and its event handler works: Each event …

Member Avatar for Nick Evan
3
947
Member Avatar for xavier666

[B]This is just a linked list program for those who need help understanding the fundamentals. Put comments if you find some bugs. The program is about maintaining a student database (their roll number and their age) I've used Turbo C++ 4.5 as the compiler[/B] :icon_cool:

Member Avatar for xavier666
3
210
Member Avatar for pavanbr143

[B]This is The function i have written to get waiting times of processes some one please help me to solve this[/B] [code] class NonPreemptive { public: int* getWaitingTime(int* process, int* arrivalTime, int* burstTime, int nProcess) { int ct[5],temp,j; int* wt = (int*)malloc(sizeof(int)* 5); wt[0]=0,j=0; for(int i=process[j++];i<=nProcess;i++) { if((arrivalTime[0]==0)&&(arrivalTime[j]<arrivalTime[j+1])&&(0<burstTime[j]<10)) { ct[i]=arrivalTime[i]+burstTime[i]+wt[i]; …

Member Avatar for StuXYZ
3
412
Member Avatar for fivec

Hello friends and gurus, this is my first post here. i have few basic C questions. is sizeof an opearator(i actually studied it as a operator but then not so serious about the things) 1.why is it called as an opeartor? 2.sizeof is compile time operator. what does that mean …

Member Avatar for Tom Gunn
3
160
Member Avatar for harshita

[B]hello,[/B] [B]i need help regarding final year project.i am computer science student.allready recruited to T C S.can u please guide me regarding this.:idea: i need some idea on what i should start.i want my final year project to be best:D .[/B]

Member Avatar for Didipya
3
529
Member Avatar for sudhansugupta
Member Avatar for briane010
3
166
Member Avatar for peter_budo

I would like to know if people would be interested in participating building similar starting thread like we have in Java section [URL="http://www.daniweb.com/forums/thread99132.html"]Starting "Java" [Java tutorials / resources / faq][/URL], but targeting Java web development. This thread would hold resources (where to get the things, configurations, basic usage and any …

Member Avatar for peter_budo
3
88
Member Avatar for ehsantl

Hello folks I'm trying to do my assignment and I'm really stuck in! I have to classes..Customer and Pensioner (Customer = Super class and Pensioner = Subclass) The Pensioner has a PensionNo extra than Customer class. I have to make a array of Customer class (for 10) and put Customer …

Member Avatar for rbv
3
299
Member Avatar for vegaseat

An example of a range generator that handles floating point numbers, appropriately called frange(). The function range() or the generator xrange() can only be used for integers. Note that xrange() now is range() in Python3.

3
734
Member Avatar for Tom Gunn

This is an example of how to turn numbers into words. 1473 would get translated to "one thousand four hundred seventy three", for example. The class has a simple interface and can handle any value representable by unsigned int. The implementation recursively processes groups of 3 digits using table lookups …

Member Avatar for William Hemsworth
3
512
Member Avatar for vegaseat

Here is an example how to write a program to convert between units of distance, area, volume, weight, pressure, and energy. The wxPython GUI toolkit's wx.NoteBook() widget is used to make good use of the limited frame/window space available.

3
184
Member Avatar for vegaseat

A variation of the previous bouncing ball code. This time the upper left corner of the image rectangle simply follows the position of each mouse click. Use an image you have, in my case I used a small red ball in a black background. A simple code to experiment with.

3
3K
Member Avatar for vegaseat

Just a little mathematical exercise in geography, namely the use of longitude and latitiude coordinates to calculate the distance between two given cities. You can obtain the coordinates for just about any earthly city from [URL="http://www.ASTRO.COM"]WWW.ASTRO.COM[/URL]. The coordinates are in a format like 35n13 (35 degrees, 13 minutes north). The …

3
2K
Member Avatar for vegaseat

Boo is new, well at least relatively new. If you are familiar with Python and C#, you can feel right at home. Most of Boo is written in C# by a Python devotee. Boo has static typing, but also mimics dynamic typing by inference. This way you are not in …

Member Avatar for vegaseat
3
445
Member Avatar for vegaseat

The set is an unordered collection of unique hashable elements. All the elements/items in a set are treated as keys. There are several functions that compare two sets. Right now, I will just give you a taste ...

3
334
Member Avatar for vegaseat

Nothing new, but something for the neophyte to ponder. Some of the functions (algorithms) used by STL containers can be applied to a normal array to do inane things like copying, displaying, finding max/min, reversing, replacing, searching, shuffling, sorting, summation. This can really simplify your code.

Member Avatar for vegaseat
3
360
Member Avatar for lost_scotsman

Hello all, I have what at first glance seems like a very simple problem but I have been getting bogged down with it for the last few days now and would appreciate some help. I have a series of text files to read in, and wish to convert them to …

Member Avatar for lost_scotsman
3
982
Member Avatar for Ragoune

Hi, To get straight to the point: I'm new at C++. I have quite some programming experience, mainly in GML [Game Maker Language], PHP and Visual Basic. I use GML frequently, almost everyday. But it's problem is, it does not have a lot of functions. But you can use a …

Member Avatar for Ragoune
3
192
Member Avatar for meabed

[I]<<snip>> [/I] Original article can be found here: [url]http://www.cs.cmu.edu/~gilpin/c++/performance.html[/url]

Member Avatar for Lisa1110
3
1K
Member Avatar for MDGM

Hey, Im just wondering how i can get something like this to work: [CODE] $tablename = $_POST['tablename']; mysql_query(CREATE TABLE `databasename`.`$tablename` (`name` VARCHAR( 200 ) NOT NULL)) [/CODE] At the moment its coming up with an error because I am using a variable for the table name instead of inputting it …

Member Avatar for MDGM
3
3K
Member Avatar for tlee

Hi all, Could anyone help me about returning the array from a function? I believe that it is a syntax error (compile time error) to return an array from a function, but one book mentions briefly that using pointer will solve the issue. However, my current knowledge does not allow …

Member Avatar for Ancient Dragon
3
2K
Member Avatar for vio_1960

Let me declare from the start my "innocence" in C++. :cheesy: I did some "C" progs but I ran over a C++ code which I am supposed to modify. Modifications are not hard, but it is hard to get a compilation. :sad: I don't know what compiler had been originally …

Member Avatar for Ashok_beginner
3
693
Member Avatar for PM312

I have a candlestick chart with long list (data point) on X-Axis which becomes congested when loaded. How to show datapoint with sufficient space . Is there any container with horizontal scroll bar to display chart just like data is displayed in DataGrid view without reducing column width. ![Chartcandlestick.png](https://static.daniweb.com/attachments/2/22662a22f31d649405949f9df4915ed6.png)

Member Avatar for kinvieb
2
27
Member Avatar for Jameswood32
Member Avatar for Temporal
2
72
Member Avatar for FarrisFahad

I want to post Pins using Pinterest API. I have tried to generate code using ChatGPT but it returns an error. Here is my code so far ... <?php $clientId = "xxx"; // Replace with your App ID $clientSecret = "xxx"; // Replace with your App Secret $redirectUri = "xxx"; …

Member Avatar for geekinformatic
2
61
Member Avatar for Chris Hüneke

Never published this before, so this is a DaniWeb.com Exclusive :) If your WP-Site has a lot of K-Links, you should consider using this script. It definetly works. For now... ## **Negative SEO** through spamming Backlinks can be a huge problem for the visibility of a webpage. ## You can …

Member Avatar for Dani
2
984
Member Avatar for Tzanko

Hi all, My team and I is making an open-source library for running AI models on the phone. We are planning to create a very simple SDK which will allow you to download a model and use it on your phone. We plan to release an initial version in a …

Member Avatar for jonathannweyer
2
440
Member Avatar for KamalDeepPareek

How can lazy loading improve web portal performance by reducing initial load times and optimizing resource usage? What are the best techniques to implement lazy loading in images, components, and data fetching using JavaScript frameworks like React, Vue, and Angular? How does lazy loading impact SEO and user experience?

Member Avatar for gediminas.bukauskas.7
2
566
Member Avatar for usmanmalik57

On April 14, 2025, OpenAI released [GPT-4.1](https://openai.com/index/gpt-4-1/) — a model touted as the new state-of-the-art, outperforming GPT-4o on all major benchmarks. As always, I like to evaluate new LLMs on simple tasks like text classification and summarization to see how they compare with current leading models. In this article, I …

2
85
Member Avatar for usmanmalik57

This tutorial demonstrates how to build an AI agent that queries SQLite databases using natural language. You will see how to leverage the [LangGraph framework](https://www.langchain.com/langgraph) and the [OpenAI GPT-4o](https://openai.com/index/gpt-4/) model to retrieve natural language answers from an SQLite database, given a natural language query. So, let's begin without ado. ## …

Member Avatar for Pelorus_1
2
693
Member Avatar for Dani

What's the most challenging bug you've ever encountered in your programming career, and how did you eventually solve it? I’ll start. The only one I can recall from the recent past is not realizing that you can’t use a MySQL transaction from within a persistent connection. Here’s [when I learned …

Programming career daniweb-bug
Member Avatar for Salem
2
83
Member Avatar for Ray brad

My name is Ray Brad. I am a learner in Salesforce development and administration, and I also have knowledge of Java concepts. If anyone has questions related to these topics, feel free to comment, and I will do my best to answer them.

Member Avatar for Dani
2
93
Member Avatar for riahc3

Hello Havent been here in a while but might as well give it a shot. I have several Apache Tomcat instances running on a Windows Server on different ports. They are all HTTP. The idea would be to (on the same server) install a IIS and use it a content …

Member Avatar for blud
2
48
Member Avatar for complete

How do I establish an open connection to an open web browser in C#? In a Microsoft C# program using a Visual Studio Code I am using the following namespaces: using OpenQA.Selenium; using OpenQA.Selenium.Chrome; using OpenQA.Selenium.Support.UI; After I get a string variable, "url", assigned with a URL of a website …

Member Avatar for xivlauncher
2
155
Member Avatar for usmanmalik57

In my previous article, I explained how to fine-tune [OpenAI GPT-4o model for natural language processing tasks](https://www.daniweb.com/programming/computer-science/tutorials/542333/how-to-fine-tune-the-openai-gpt-4o-model-the-wait-is-finally-over). In OpenAI DevDay, held on October 1, 2024, OpenAI announced that users can now fine-tune OpenAI vision and multimodal models such as GPT-4o and GPT-4o mini. The best part is that fine-tuning vision …

Member Avatar for RKE2
2
308
Member Avatar for CrystalKanger

good day - I am wondering if anyone can explain to me how to allow the user to change the name of the tabs in a tab control via a textbox? For example, at runtime the user will be able to change the title of the tab ("TabPage1") to "Baking" …

Member Avatar for pathofbuilding
2
56
Member Avatar for mateopg

Hello everyone, I’m working on a project to develop an educational software aimed at teaching programming logic to beginners. The app will focus on short questions and mini-games to make learning engaging and interactive. It’s targeted at university students in their first semesters and will primarily use Java as the …

Member Avatar for PabloRef
2
90
Member Avatar for Bdill7

i am using bluej and this code compiles but doesnt save the input and unique file extension to the same document. I am new so this may seem elementary but any help would be appreciated. thank you // File with a timestamp in the filename import java.io.IOException; import java.nio.file.Files; import …

Programming file-system java
Member Avatar for hostingspell
2
81
Member Avatar for Reverend Jim

First I want to say that my only interest in the technical details of web development are from an end user perspective. I usually go to [this site](https://www.theweathernetwork.com/ca) to get my weather forecasts. Their current display format is to present the forecasts horizontally but it will likely be changing soon …

Member Avatar for quackyfist
2
234
Member Avatar for AsifJavaid_1

Hi All, I am Asif. I want to develop a mobile application in Android and iOS using Google AR spatial api. After running the sample applications in Google Code Labs, we are getting an error, VPS is not available in your region. Yes we know it is available mostly in …

Member Avatar for graceweb
2
82
Member Avatar for usmanmalik57

In a previous article, I explained [how to extract tabular data from PDF image documents using Multimodal Google Gemini Pro](https://www.daniweb.com/programming/computer-science/tutorials/541449/pdf-image-table-extractor-web-app-with-google-gemini-pro-and-streamlit#post2296083). However, there are a couple of disadvantages with Google Gemini Pro. First, Google Gemini Pro is not free, and second, it needs complex prompt engineering to retrieve table, columns, and …

Member Avatar for mansha99
2
2K
Member Avatar for usmanmalik57

On November 20, 2024, OpenAI updated its GPT-4o model, claiming it is more creative and accurate on several benchmarks. In this article, I compare the GPT-4o November update with the previous version (August update) for text summarization and classification tasks. By the end of this article, you will see whether …

2
209
Member Avatar for usmanmalik57

In my previous article, I presented a [comparison of GPT-4o and Claude 3.5 Sonnet for multi-label text classification](https://www.daniweb.com/programming/computer-science/tutorials/542629/openai-gpt-4o-vs-claude-3-5-sonnet-for-multi-label-text-classification). The accuracies achieved by both models were relatively low. Fine-tuning is one solution to overcome the low performance of large-language models. With fine-tuning, you can incorporate custom domain knowledge into an LLM's …

2
245

The End.