199,113 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for vgd

[CODE] struct node{ int value; struct node *next; }; void rearrange(struct node *list) {struct node *p,*q; int temp; if(!list || !list->next)return p=list;q=list->next; if(q) { temp=p->value; p->value=q->value; q->value=temp; q=p?p->next:0; } } }[/CODE] list is containing the integers 1,2,3,4,5,6,7 then the output is? also what's the meaning of p=list(as per me its …

Member Avatar for Ancient Dragon
0
120
Member Avatar for ChosenOreo

Hi... At some point I would like to create an operating system. I am quite familiar with C, and I know some basic assembly. Can anyone give me ideas of applications to create to learn more about OS Design. I would buy a book, but I don't have an extraordinary …

Member Avatar for abhimanipal
0
178
Member Avatar for pcmaster

Although I am very good with html, css and a little at php,javascript and mysql, i still can't manage to get interested or start learning basic programming. To be honest, i barely know anything about c or c++ since i skipped basic programming and proceeded to learn right away php,javascript …

Member Avatar for abhimanipal
0
210
Member Avatar for ayagi

i need to update my data using stored procedure here is my code : [CODE] Try con = getconnect() con.Open() sqlcmd = con.CreateCommand sqlcmd.CommandText = "Select * from EmployeeProfile where EmployeeID = '" & txtEmpID.Text & "'" daemployee.SelectCommand = cmdemployee1 daemployee.Fill(dsemployee, "EmployeeProfile") If dsemployee.Tables(0).Rows.Count <> 0 Then txtEmpID.Text = dsemployee.Tables(0).Rows(0).Item("EmployeeID") …

Member Avatar for ayagi
0
316
Member Avatar for DaMoose75

I have a problem with this simple Win32 application I am trying to make. As you can tell by the title, the function CreateWindow() always returns 0, which indicates failure. Here is my code. [CODE] int MessageLoop() { MSG msg; ZeroMemory(&msg, sizeof(MSG)); while (GetMessage(&msg, 0, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); …

Member Avatar for DaMoose75
0
3K
Member Avatar for gman1991

[CODE]// this is the grading sorting program for part one #include <stdio.h> int main(int argc, char **argv) { FILE *fp; // file pointer, points to the file char file_name[32]; // store file name int ID[50]; int grade[50]; int a,b; // index variables int student_id, grades; // opening file by asking …

Member Avatar for abhimanipal
0
164
Member Avatar for ayathullah

Hi, I am using the twitter api to retrieve some data. I'd like store my followers latest status tweet containing that hashtag #RT and the mention of my name. The staus ID can be retrieved via $xml->status->id. In the code below I'd like to php to search for certain words …

Member Avatar for twiss
0
190
Member Avatar for fpm777

[CODE]#include<iostream.h> #include<stdio.h> #include<string.h> void remplir(FILE *f) { char c; char fichier[20]; printf("entrer les nom du fichier:"); scanf("%s",fichier); f=fopen(fichier,"w"); if(f==NULL) printf("erreur"); else while((c=getchar())!='.') { //putc(c,f); fprintf(f,"%c",c); } } int comparer(FILE *f,FILE *fp) { char l1[10],l2[10]; printf("OOO"); while((!feof(f)) && (!feof(fp))) { fgets(l1,2,f); fgets(l2,2,fp); printf("OOO"); if(strcmp(l1,l2)) { printf("%s",l1); printf("%s",l2); return 0; } } …

Member Avatar for abhimanipal
0
114
Member Avatar for vTr

Hey there, I was wondering if anyone had the time to look over my code and give me some tips or tweaks to help me get it running. The program is all about inheritance, where i have the derived class using the base class clockType (with using strings) to add …

Member Avatar for mrnutty
0
628
Member Avatar for epicbeast9022

Hello, I cannot read a file, config.cfg, in the current directory on MacOS X 10.6. I'm running a console app. Can anybody tell me what I'm doing wrong? (By the way the getline() function returns no string.) [CODE] #include <iostream> #include <fstream> #include <string> using namespace std; int main(int argc, …

Member Avatar for epicbeast9022
0
382
Member Avatar for Dante2002

I am trying to write code which will display the volume of three boxes. I have my code but am having problems getting it to compile. Any help would be greatly appreciated. Here is my code: [CODE] //Assignment Programming Using Structures and Classes // Creating and using boxes #include <iostream> …

Member Avatar for Dante2002
0
227
Member Avatar for khaled_jawaher

i have created a war file and save it in tomcat/webapps folder.this war file contains the code of the server that will read xml file and return it as table in a Jframe.i coded it in java and it is a web service where i create a war file after …

Member Avatar for khaled_jawaher
0
270
Member Avatar for jens123

Hello guys :) What a great and usefull forum m8s :) I have made a program in snake, but i have remade it, because c++ is quite new for me, but on tursday i have to do a presentation(examination) for my teacher explaining the code, i understand 80-90 % of …

Member Avatar for jens123
0
231
Member Avatar for Thisisnotanid

Hi all, I was experimenting with techniques of generating random numbers and eventually decided on the following. I realize there's a big discussion in computing circles about "randomness" and as such am not trying to make any claims here. What do you think? Thoughts, comments, suggestions, discussion of underlying theories, …

Member Avatar for Schol-R-LEA
0
333
Member Avatar for LogicallyInsane

So after pretty much giving up on programming (I think I should say that I kinda forgot about it actually) and not checking Daniweb, I decided after a few months of doing other things I'd come back to Daniweb and start trying to program once again. After skimming through "Learn …

Member Avatar for LogicallyInsane
0
86
Member Avatar for Devil night

#include <iostream> using namespace std; int main() { int BSR; int HighBSR=0 , LowBSR=0 , NormalBSR=0; int patients=0,sum =0; int count=0; cin>>patients; while(patients != -1)}{{ {if ( BSR ==120 )//HighBSR+=patients; } { else if ( BSR>70 && BSR<120 )//NormalBSR+=patients; else ( BSR<=70 )//LowBSR+=patients;} ; count++; cin>>patients;}} cout<<"The Number Of All …

Member Avatar for pseudorandom21
0
189
Member Avatar for b0tz

[CODE] String ip = "www.google.ro"; String pingResult = ""; String pingCmd = "ping " + ip + " -c 4"; String s; try { Process p = Runtime.getRuntime().exec(pingCmd); BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream())); BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getErrorStream())); // read the output from the command System.out.println("Rezultat ping:\n"); for …

Member Avatar for b0tz
0
224
Member Avatar for Xtremer360

This is just to get some thoughts and opinions on how to handle my database. Okay so say I have a table for scheduled wrestling events that looks like this: [B]id[/B] : (auto- increment, primary key) [B]event_name_id:[/B] (id of the event name from the event_names table) [B]event_label:[/B] (label of the …

Member Avatar for smantscheff
0
172
Member Avatar for gladtoplay5

I have just finished my tic tac toe game but wanted to make it look nicer so i added some colors at the winning scene... [CODE] cout << "congratulations player 1!" << endl; cout << "[W][I][N]" << endl; cout << "[W][I][N]" << endl; // checking if the game has been …

Member Avatar for iamthwee
0
208
Member Avatar for warlord902

I am developing a project which is going to use this database table, but I am not getting the complete normalized form of this table. I am not practically strong with normalization so every time I try to make it I end up in no where. The table is attached …

Member Avatar for smantscheff
0
179
Member Avatar for Spyzker

Parse error: syntax error, unexpected T_CASE in /home/redlimbc/public_html/M2H/article.php on line 757 [CODE]<?php break; case "yorumonay": $id = $_GET['id']; $yorum_adsoyad = str_replace("'", "'", $_POST['yazan']); $yorum_email = str_replace("'", "'", $_POST['mail']); $yorum_yorum = str_replace("'", "'", $_POST['yorum']); $tarih = date("d.m.Y"); if(($yorum_adsoyad == "") or ($yorum_email == "") or ($yorum_yorum == "")){ echo '<script type="text/javascript">alert("Bo? …

Member Avatar for diafol
0
124
Member Avatar for ARaza110

I am using the Comm API, i have made a small desktop app for sending sms. I cannot send sms one after the other since it gives "Port In Use Exception". I have closed the Input and output streams as well as the serial port but still it gives "Port …

Member Avatar for ARaza110
0
168
Member Avatar for Jollyyy100

Hi, im currently designing a form on dreamweaver and it allows a client to enter their Name, Email and Comments. At the same time i want this data to store in my mysql database which i created. The php code that i used is shown below, but the problem is …

Member Avatar for diafol
0
155
Member Avatar for anilopo

is there a way to do a backwards loop in matlab? i tried: [CODE]for j = end; -1; 1[/CODE] - but it's not going, it stays in "end"...

Member Avatar for anilopo
0
60
Member Avatar for jrosh

When I try to enter data in to PIM with J2me, It gives an InvalidIDException. What is it? and how can I resolve it.

Member Avatar for jrosh
0
47
Member Avatar for NuGG

Im new to php and have been struggling with this for some time, but I expect its something simple. Basically I have some code below which I want to use to display an events board. -Info for each event comes from a separate xml file for each event. -XML files …

Member Avatar for NuGG
0
218
Member Avatar for smandape

Hello Experts, you have been of great help to me when it comes to XSLT. Here is another problem I have while I try to extract the data from RDF/XML files. I don't know how to do that as there are terms like dcterms defined in the XML file. They …

Member Avatar for smandape
0
354
Member Avatar for element432

Im trying to do a exercise in one of my books and it wants me to use a function to get the factorial of a number entered by the user. Ive tried several different ways and they either get me numbers that make no sense or say if I entered …

Member Avatar for element432
0
128
Member Avatar for wazakiller

there is an error somewhere in my code, but i cant work it out. could one of you give it a quiq look? <html> <head> <script language="JavaScript"> function bereken() { j = parseInt(fx.s.value) p = parseInt(fx.j.value) s = parseInt(fx.p.value) while (j > 0 ) { j = j-1 r = …

Member Avatar for wazakiller
0
101
Member Avatar for syeda amna

hi please help me to develop code for JTextField exception handling. i have 10 JTextFields out of which 2 are necessary to fill. if the user left them blank then error message will appear. [CODE]try{ text1=a.getText(); text2=b.getText(); while(a!= null && b!=null);} catch(Exception e){ System.out.println("Please write some text" +e.getMessage());} [/CODE] this …

Member Avatar for Buffalo101
0
2K
Member Avatar for autorunman22

im a newbie and im learning java just week ago. I wonder how i cant make the ball bounce in one axis only (the X axis) im not good in logic:( and i want that logic to be in one event. [code]if(x<0){ ++x;//go right }else if(x>500) {--x;//go left } [/code] …

Member Avatar for autorunman22
0
164
Member Avatar for Naveed_786

I am using oracle 9i database with VB.NET when i am trying to insert record in my PR_REC table it gives me error "ORA-01722 Invalid number" here is my insert statement and the structure of the table [CODE]com = New OleDbCommand("INSERT INTO PR_REC(pr_no,item1,price1,qty1,item2,price2,qty2,item3,price3,qty3,item4,price4,qty4,item5,price5,qty5,item6,price6,qty6,item7,price7,qty7,item8,price8,qty8,item9,price9,qty9,item10,price10,qty10,Pur_reason,pr_date,Status) VALUES ('" & Me.txtprno.Text.Trim & "','" & …

Member Avatar for Naveed_786
0
415
Member Avatar for AhmedGhazey

hello, i ask for help if you can : i have to write algorithm detect all cycles in undirected graph , I don't know , can any one help. Thanks .

Member Avatar for AhmedGhazey
0
839
Member Avatar for niranga

Hi All, Is it possible to bind an array or a Vector with a event listener? For an example if we add an element to the Vector or remove from the Vector, can I use an event listener to track the changes? Thanks a lot in advance. Cheers..!!

Member Avatar for niranga
0
998
Member Avatar for xxgrplayer

Hello guys, i am a very beginner php developer (i know only the basics) and i am trying to create a website about betting which will retrieve info from mySql databases. the problem is that i have stored some variables (which are written in greek) in databases and then when …

Member Avatar for xxgrplayer
0
2K
Member Avatar for mindbend

So I'm busy with a small website I'm able to login at the website with the help of sessions that all goes well. But I'd like to expand the website a bit more, it's a sport website where people can add players, add teams, and add matches, and those are …

Member Avatar for mindbend
0
459
Member Avatar for Kligham

Hi, I have been searching on google to find a way to get a bitmap of a hidden window. I thought I found it, but when tried it, it is only giving me a good image (not a black one), when my window is in front/active, when hidden it give …

Member Avatar for RicardoCleves
0
4K
Member Avatar for galhajaj

Hello, i have a little dificulties in the area of object-oriented programming i guess... i am making a chess-like game i created the classes "board" and "square" (the square inherit from picturebox) now - in the constructor of the board i create 8X8 squares inside it all the program is …

Member Avatar for galhajaj
0
217
Member Avatar for destroyerx15

hi i want to update or insert to my exit db that have patient id and staff_id i make lke this for my form : [CODE]<table class="table"> <form action="cheekbox.php" method="post"> <tr> <th class="th">ORDER_DESC </th> </tr> <tr> <td class="td"><input type="checkbox" name="checkbox[]" value="CSF"/> CSF </td> </tr> <tr> <td class="td"><input type="checkbox" name="checkbox[]" value="LFT"/> …

Member Avatar for destroyerx15
0
110
Member Avatar for pseudorandom21

Sooo... Every DLL injection result I've read so far only uses a pre-made DLL, loads it into another process and says "darn I'm good." They do absolutely NOTHING useful and a couple of them are rip-offs of one another only using a different programming language. Google has failed me! Once …

Member Avatar for pseudorandom21
0
188
Member Avatar for xsltnewbie

I have the following xml source file : [code=xml]<root> <child1></child1> <child2></child2> </root>[/code] I would like to convert it to [code=xml]<MYOWNTAG1> <CURRENTDATE>CurrentDate</CURRENTDATE> <CURRENTTIME>CurrentTime</CURRENTTIME> </MYOWNTAG1> <MYOWNTAG2> <XML> <root> <child1></child1> <child2></child2> </root> <XML> </MYOWNTAG2>[/code] Any help would is appreciated.

Member Avatar for xml_looser
0
135
Member Avatar for chunalt787

I just finished with my first year of Computer Science in college and over the break I wanted to learn how to do output from a computer using a C++ program to control different I/O hardware. I was thinking I would start somewhere simple with something such as turning on …

Member Avatar for Ancient Dragon
0
1K
Member Avatar for belper

Hello, Could anyone help me with next problem: Visitors come to a website through a Clickbank affiliatelink http: //nick.vendor.hop.clickbank.net But they will land on different websites based on an URL parameter, for example http: //nick.vendor.hop.clickbank.net?x=prod1 they’ll go to www.websiteA.com http: //nick.vendor.hop.clickbank.net?x=prod2 they’ll go to www.websiteB.com http: //nick.vendor.hop.clickbank.net?x=prod3 they’ll go to …

Member Avatar for belper
0
867
Member Avatar for pecet

I've been trying to solve SQL exercises from [url]http://www.sql-ex.ru/[/url] for some time. You can find database description below: Short database description "Computer firm": The database scheme consists of four tables: Product(maker, model, type) PC(code, model, speed, ram, hd, cd, price) Laptop(code, model, speed, ram, hd, screen, price) Printer(code, model, color, …

Member Avatar for pecet
0
389
Member Avatar for kadhaipaneer

Hi I am trying to make arrays inside a structure.. the structure looks like, [code=c++] struct mystruct{ int val; int num; string state[]; mystruct *next[]; }; [/code] The next pointer array works fine but state array gives segmentation fault. I have an array of this structure . mystruct Graph [];

Member Avatar for vijayan121
0
142
Member Avatar for winecoding

I am learning Java, and found a code segment as follows. [CODE]public static void displayClusters(final Collection<Cluster> clusters) { displayClusters(clusters, Integer.MAX_VALUE); } public static void displayClusters(final Collection<Cluster> clusters, int maxNumberOfDocumentsToShow) { displayClusters(clusters, maxNumberOfDocumentsToShow, ClusterDetailsFormatter.INSTANCE); } public static void displayClusters(final Collection<Cluster> clusters, int maxNumberOfDocumentsToShow, ClusterDetailsFormatter clusterDetailsFormatter) { System.out.println("\n\nCreated " + clusters.size() + …

Member Avatar for JamesCherrill
0
148
Member Avatar for kadhaipaneer

I have a problem passing an array containing pointers. Here's the function.. [code=c++] void jointtree(Parent *clique[], int nodes); [/code] I am calling it the following way.. [code=c++] jointtree(clique, nodes); [/code] where clique is. [code=c++] Parent *clique[nodes]; [/code]

Member Avatar for L0s3r
0
154
Member Avatar for computerbear

ARRGGG, I had a program going along swimmingly until I tried to change the name for form1 to something more meaningful. Now It is all messed up and I am getting the dreaded resx error. Is there any hope in salvaging this? Please don't tell me I have to start …

Member Avatar for computerbear
0
104
Member Avatar for ManicCW
Member Avatar for uv4u
0
173
Member Avatar for shona_5

i have to find distance between two projects and i have taken three attributes for this purpose which are size, project mode and a constant value.i have written code in matlab 7.but it gives error.plz see the folowing code and help me. t = 17; a =0; b=0; %size effort …

Member Avatar for TrustyTony
0
141

The End.