OpenAI o3 vs Anthropic Claude 4 for Text Classification & Summarization Programming Computer Science by usmanmalik57 [OpenAI](https://openai.com/) and [Anthropic](https://www.anthropic.com/) are two AI giants delivering state-of-the-art large language models for various tasks. In a [previous article](https://www.daniweb.com/programming/computer-science/tutorials/542132/comparing-gpt-4o-vs-claude-3-5-sonnet-for-zero-shot-text-classification), I compared OpenAI GPT… Re: Error LNK1104 when debugging Programming Software Development by toneewa I like the challenge, but hate when errors like these occur. Check for a syntax error on line 2 in starter.h starter.h(2): warning C4067: unexpected tokens following preprocessor directive - expected a newline Hard to say without seeing code. Some cases m_hservice may require you to use the .lib file Advapi32.lib it if it isn't automatically… Re: How do I make my code jump back to a previous line? Programming by Dani Organizing code into functions is always important for readability and also to be able to reuse parts of your code as your app gets bigger. Thank you for posting your updated code to share with others :) Evaluating OpenAI GPT 4.1 for Text Summarization and Classification Tasks Programming Computer Science by 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 will… How do I make my code jump back to a previous line? Programming by trueriver I'm just coding something for fun right now and I'm stuck on looping. I'm using a while loop that only runs if my variable is 0. Right now, I set the variable to 0 but the code was after the loop. How do I fix this? import time import sys #Global Variables firstTime = True loggedIn = False incorrectLogin = … Re: How do I make my code jump back to a previous line? Programming by trueriver updated my code... everything is fixed :) i made functions import time import sys #Global Variables firstTime = True loggedIn = False incorrectLogin = True admin = False n = 0 n1 = 0 i = 0 #Create login if firstTime is True if firstTime is True: print("… Re: Differential Directory, indexing method Programming Software Development by xrjf "Just to clarify a previous mistake: the efficiency should be K × N × log₂(N), not K × log₂(N) as I initially wrote." Re: Differential Directory, indexing method Programming Software Development by xrjf For example, as Donald Knuth points out in The Art of Computer Programming, the theoretical lower bound for comparison-based sorting algorithms is K × log₂(N). I developed a very simple method that matches this performance. However, DiDi goes far beyond: its performance is proportional to K × (maximum key length), regardless of the number of … Re: Differential Directory, indexing method Programming Software Development by xrjf As an illustration, consider the theoretical lower bound for comparison-based sorting, as stated by Donald Knuth in The Art of Computer Programming: K × log₂(N). I developed a simple method that matches this limit. For example, to sort the list {2, 5, 7, 1, 4, 3, 8, 6}: Sort pairs: (2, 5) → [1] (1, 7) → [2] (3, 4) → [3] (6, 8) → [4] Merge… Re: How do I make my code jump back to a previous line? Programming by woooee if sysInfo.lower() in ["exit", "Exit", "EXIT"]: since sysinfo is now lower(), it will never be equal to "Exit" or "EXIT" Re: Question/Answering over SQL Data Using LangGraph Framework Programming Computer Science by Pelorus_1 Through its combination of natural language processing and structured query generation, LangGraph makes interfacing with databases and extracting insights over SQL data easier than ever. Re: C++ College Prank Programming Software Development by cirol Pranks can be fun, but fake viruses might cause real worry and problems. It’s best to use your skills in ways that don’t upset or confuse others. N-Tier C# Master Detail Programming Software Development by ahmed_one N-Tier C# Master Detail member I am using Visual Studio 2010, Sql server Express Edition & C#. I have develop a simple Master Detail application (mostly with the help of experts help from this forum) An Order system, and now I want to go one step further from simple application to N-Tier version. Did some search on net and came up with … Re: "\n\n" Programming Software Development by Xlphos \n means new line Start: Welcome to main menu End. Re: \n Programming Software Development by tomtetlaw In C, the '\n' character is a special type of character called a control character, these are characters that do something other then just display themselves, here is all the ones that I know: \n = newline \t = tab \a = This one rocks, it makes the computer make a beeping sound :D The difference between those follows: Say you called the … Re: \n Programming Software Development by kvprajapati It [b]discards unwanted white space[/b]. A white-space character in the control string causes scanf() to skip over one or more leading white-space characters in the input stream. [code] int main() { char ch,ch1; printf("Enter two chars : "); scanf("%c\n%c",&ch,&ch1); printf("\n%c\n%c",ch,ch1);… \n Programming Software Development by luoyangke who can tell me what the use of "\n" is? and what the difference between [CODE]scanf("%d",&j); [/CODE]and [CODE]scanf("%d\n",&j)[/CODE];? Re: \n Programming Software Development by Iam3R if i use this in a program its keep on taking the return key the program not getting terminated, whats the problem? [CODE]scanf("%d\n",&j)[/CODE] N-Queen Problem Solving C Program Programming Software Development by udinnet I made my own program for N-queen problem (A popular algorithm in Data Structures). Check this code and post your suggestions. If you have any ideas for the improvement of algorithm speed, please post here. Thanks. [CODE] #include <stdio.h> #include <stdlib.h> //N-Queen Chess problem solving Algorithm// //Note:- Uncomment The printf… N queens w/ recursion HELP C++ Programming Software Development by ChickenFox Hi I'm currently taking an introductory programming course and my final project is to write the infamous N-Queens program (find & display all possible solutions for N queens on an NxN board such that they cannot attack one another) using recursion I feel like I at least have a slight grasp of what I'm supposd to be doing, however when I run … Re: N queens w/ recursion HELP C++ Programming Software Development by VernonDozier [QUOTE=ChickenFox;617758]yea your right I meant '=='...but even with that my code is still crashing (or infinite looping I guess) I'm still not sure why the function is looping infinitely (and I'm quite clueless as to how to debug at all besides using std::cout to see whats going on...but that doens't work since the program crashes right after i… Re: N-queens problem - solution in nasm Programming Software Development by fmartins Here is the code: [code=asm] ; queens.asm ; ; The n queens problem, in nasm. ; Solves the n-queens problem by a depth-first tree search. ; Board symmetries are not considered. ; ; Output format: ; Solutions are printed as a sequence of n integers. Each integer ; gives the position of a queen in a column. For example, for n=8, ; the … n queen backtracking help... Programming Software Development by mimah1 #include <iostream> using namespace std; char chessboard[100][100] ={' '}; int n; int savingposition[100][2]={ }; //checking rows.... bool checking (int row, int column){ for(int i = 0; i< n; i++){ for(int j = 0; j < n; j++) { if((j+i== column+row|| column - row == j-i || … Re: N queens w/ recursion HELP C++ Programming Software Development by VernonDozier I am somewhat familiar with the problem, though not very familiar with the algorithm to solve it. I ran your code with some debugging output. Your function: [code] void nqueen(int board[], int col, int row) [/code] is called thousands of time with row and col equal to 1 so you are in an infinite recursive call, eventually leading to a stack … Re: N queens w/ recursion HELP C++ Programming Software Development by ChickenFox yea your right I meant '=='...but even with that my code is still crashing (or infinite looping I guess) I'm still not sure why the function is looping infinitely (and I'm quite clueless as to how to debug at all besides using std::cout to see whats going on...but that doens't work since the program crashes right after i input N) thx alot for… Re: N queens w/ recursion HELP C++ Programming Software Development by ChickenFox yay...well i came to the realization that the way i had coded it the first (base) condition should've been "if (col == n){ solution found}" now I'm just trying to fix the fact that the program finds only this first solution and juss keeps looping this one solution Re: N Queen Programming Software Development by bangonkali you can try this one: [CODE]# include<stdio.h> int v,i,j,k,l,s,a[99]; int main() { for(s=8;*a-s;v=a[j*=v]-a[i],k=i<s,j+=(v=j<s&&(!k&&!!printf(2+"\n\n%c"-(!l<<!j)," #Q"[l^v?(l^j)&1:2])&&++l||a[i]<s&&v&&v-i+j&&v+i-j))&&!(l%=s),v||(i==j?a[i+=k]=… Re: n queen backtracking help... Programming Software Development by mimah1 else if(chessboard[row][column] != 'Q' && column == n ){ row = row-1; column = savingposition[row][1]; chessboard[row][column] = '-'; // go back and put '-' in place of 'Q' if(column < n) column = … Re: n queen backtracking help... Programming Software Development by mimah1 i am trying to show the solution for the n size chess board. however the program is not backtracking at all. i am confused on where i should be fixing ...this is what i got so far else if(chessboard[row][column] != 'Q' && column == n ){ //if there is no place to put 'Q in the row' and the loop has reached at the end of the column… Re: n queen backtracking help... Programming Software Development by neithan Hi mimah1, First of all let me give you a couple advices so that your code is more readable and it makes it easier to detect mistakes: 1) The 'n' variable should be named something meaningful, like 'queens' 2) Avoid using **magic numbers**. That means that inside your functions you should not have numbers like 100 or 2 because they don't easily …