199,114 Archived Topics
Remove Filter ![]() | |
Hello All, I have two tables. One for messages and one for comments. For each entry in messages table there will be multiple records in comments table. Now I want to select the top 5 messages and top 10 comments for each message. My table structure is Messages ---------- MID … | |
[code] #include<stdio.h> #include<conio.h> void main(void) { int a1,a2,a3,a4,a5; clrscr(); scanf("%d%d%d%d%d",&a1,&a2,&a3,&a4,&a5); printf("%d%d%d%d%d",a5,a4,a3,a2,a1); getch(); } [/code] | |
hello people, I am checking the string pool and its basic operation i.e. how it works [CODE] public class Test { public static void main(String[] args) { String s1 = new String("abc"); String s2 = "abc"; String s3 = s2; System.out.println("Hash Table: "); System.out.println(s1.hashCode()+ " "+ s2.hashCode()+" "+s3.hashCode()); System.out.println("== Check: … | |
The Program is Addition of Large Integers.. Although This program is working But I want to know where i went wrong or what should i need to do to make it better.. [CODE] # include <stdio.h> # include <stdlib.h> # include <ctype.h> # include <string.h> typedef struct poly { int … | |
I am trying to get a random number without repeating. [CODE]int r,number; srand(time(NULL)); number=10; r=rand() % number+1;[/CODE] | |
Hi everyone, I'm writing a program for a teacher and friend of mine. It's a simple math-aid prog aimed at children up to 10yo. I was thinking that it would not only be a good idea that a child couldn't shut down the program without a password (obviously), but how … | |
Hello, I have an assignment for a multi thread bubble sort written in Java. It may not sound very hard but we only had 4 hours of introduction and never wrote a single line in Java before getting this. But this isn't the point :P. I have problems with what … | |
I have finished a project of mine in c# 2008. but now i need to redo it again to c# 2005 to create an installer(setup and deployment) but i realized that there's no .count method in c# 2005. Please show me the proper conversion of the code below(error is : … | |
quick basic printing program he wrote to print some graphs and data reports and it is a long program. We just need the data files saved to file in the same format that it prints in.It was set-up to print to a Epson LQ-570+ matrix printer. Can anyone help with … | |
I am trying to carry out a synchronisation of two databases one on the server and the other on a local machine so that even when they are not connected on the networkthe local database can carry on accepting data but when the network is back on the local database … | |
Write a c program that inputs the names of the 5 students and their marks in 5 course units. the program must calculate the average for each student. If the average of the students's marks is less than 50, then your program should print against the student the string"Sorry try … | |
Hello again, codegurus. I need to ask your assistance in converting string to datetype, from 'dd/mm/yyyy' to 'yyyy-mm-dd'. The user could key in either the 'dd/mm/yyyy' format or 'yyyy-mm-dd' format in a textbox. the system would check for both format and convert both to the 'yyyy-mm-dd' date format, to be … | |
I would like to have two dropdown list search for my posting in my blog. Example: First dropdown list : Select Cuisine Second dropdown list : Select Location Then Search button. I can't figure out the javescripts. Please help. Thank you so much! | |
Hi everyone... this is my first post... so I would be quite descriptive I am working on a Web App which is a Helpdesk Solution and is based on PHP and interacts with MySQL, MSSQL, Oracle, Postgres SQL... we also support Linux based and Windows based installation... There is quite … | |
Hello, I am getting very strange behavior on an STL set::insert() . [CODE] ... //Rebuild the P_set P_set.clear();//destroy old P set (shallow only) assert( P_set.empty() ); for(int i = 0 ; i < N ; i++){ cout<<"addr="<< &(C_array[i])<<endl; pair<set<C*>::iterator,bool> p = P_set.insert( &(C_array[i]) ); assert( p.second && "FAILED TO INSERT" … | |
[CODE] Imports System.Data.SqlClient Imports System.Data.SqlClient.SqlDataReader Imports System.Data.SqlClient.SqlConnection Public Class Order Inherits System.Windows.Forms.Form Dim myConnection As New SqlConnection Dim myCommand As New SqlCommand Dim ds As New DataSet Dim cmdtext As Integer Dim action As String Dim view As DataView Dim dr As SqlDataReader Sub fill() Dim adp As New SqlDataAdapter … | |
I am developing an application which downloads pdf files, then water marks and then print. Downloading part is completed using internet controls and water marking also done using itextsharp dll. With the following code I am able to set the printer also. [CODE]Public Function SetPrinter(ByVal prtName As String) As Boolean … | |
I wish to design a timetable for a school department. The timetable will have rooms (various), times (various), lecturers and subjects. There must not be a clash in rooms whereby a room cannot be booked at the same time as it is already booked. Can anyone help? Many thanks in … | |
Hey! We all learn file processing [ATTACH]18526[/ATTACH] I don't understand what is the difference between "for writing" and "for update". Could you please explain that? Thx so much! | |
Hi, I have a doubt that why string is immutable in c#/java? why not that case with primitive types such as int,float etc..? can you please let me know what the reason behind this design? Thanks, Pradeep | |
Hi this is pdf : [url]http://www.cs.umd.edu/~elman/460.10/final/final.pdf[/url] I have question with problem 1 I solved problem 1 but i am not sure if my answers are right.:( can you check?? plz!! my answers for a) i said, if applying the composite simpson rule on a uniform mesh subdividing [a,b] into intervals … | |
Hi, I have created a tsk scheduler using c++. i have also created a trigger for it. But when I am trying to save the trigger by calling pIPersistFile->Save(NULL, TRUE) method it is throwing an error. The error is: unable to establish existance of the account specified task scheduler How … | |
i keep getting an error when i try to pass the array through function. Help? #include <iostream> #include <fstream> #include <string> #include <iomanip> using namespace std; void input(double carSpeed[6][7]); int main (void) { double carSpeed[6][7]; input(carSpeed[][]); return 0; } void input(double carSpeed[][7]) { ifstream FileName; FileName.open("noise.txt"); for(int x=0; x<6; x++) … | |
this is my java code that i'm experimenting with right now. trying to learn graphics. [CODE]import java.applet.*; import java.awt.*; public class game extends Applet { Image dbz; public void init() { Font newFont = new Font("TimesRoman", Font.BOLD + Font.ITALIC, 50); setFont(newFont); dbz = getImage(getCodeBase(), "dbz.jpeg"); } public void paint(Graphics g) … | |
[COLOR="Red"]I'm calling sortprint but how can I Implement it? I also want to implement a the sort function. [/COLOR] [COLOR="Green"] I highlighted some of the things in red.[/COLOR] [CODE]#include <iostream> #include <vector> using namespace std; void sortPrint( const vector<int>& v); int main() { vector<int> v; vector<int>::iterator iter; int num; cout … | |
Hi, I am trying to make a brick breaker game, but I am stuck. i need help moving the panel, and getting the ball to bounce off of bricks upon collision and erase the bricks. Also I wanted to create two lists, one that contains coordinates, the second would be … | |
1) Is this right? In java.awt there is a class named Point which represents a point in 2-D space. It has methods getX() and getY(). Below is the definition of a Points class which has a Point[] array as an instance variable. You are to write a method getMaxX() that … | |
I had this in another board but after takin a second look I think this is where it belongs, in any case. ------- How can I preceed the ticker with ND News: using hex color #FF0000 ? Everything I have tried, as far as placing the text goes doesnt work, … | |
Hi i have wrote a guessing game program but i am get an error when i play it i can get to 99 guesses then i get array out of bound exception error i think my problem is in the fill array method but i could be wrong. could some … | |
I am having some trouble verifying the given data for 'user' against what is already in the users.txt file. An example of a line in the text file is... ('Ralph', '1a1dc91c907325c69271ddf0c944bc72') Where 'Ralph' is what I want to compare against the users input for 'user'. Here is my code so … | |
I will arrange my output in well-alligned columns, but I don't think I should use 3D char arrays since my teacher just wants us to stick with what we've learned so far. Check out my code. I'm happy about it, but I just can't get the alignment right. [CODE]//File: lab9.cpp … | |
Hi, i am trying to accumulate a total to be stored in my 'targetTotal' variable of type int which is then to be sent to my msaccess db into a field called 'targetTotal' of type LongInteger, the trouble i am having now is that after adding my totals given the … | |
Hello friends, I'm looking for an short example to read a text file and get lines splitting in 3 vectors. I don't know how I'll do this ... E.G: 100 NAME1 30 150 NAME2 40 200 NAME3 50 -> vectorId[0] = 100 vectorName[0] = NAME1 vectorAge[0] = 30 Can you … | |
Hi everyone....I just need some help...I m beginner in C++ Language. I have to submit a small project. In that project I have to make any small software, application or game. Please help me what should I do??? | |
Can someone check my code to find out what the PHP code error is on line 1 please, also, for some reason, after changing and editing the file, all the information is clumped together, but not when I c/p it, why is this also? Thanks. <?php/** Enable W3 Total Cache … | |
Hi. my code works perfectly in Chrome but in IE when i go between pages my session is lost. does anybody know why? | |
[B][COLOR="Red"]Hi all, I am dyslexic person and find it very hard to read and write without assistance, I was wondering if there are any good Videos or computer based book that teach Pyton 3.1.3 for begginers that could be recommended. The reason for this is that I can see the … | |
I am working on this linked queue class program and it runs without any compiler errors but there is a break point in my dequeue function. It is pointing towards: "item = qFront-> info;" line 83 in the dequeue function and I am not sure how to fix this error. … | |
Hi! I would like to make a JFrame that will play a role of a toolbar. It can be dragged and dropped within a specified area. So, I don't know how to specify the area for dragging and dropping. Could anybody help me? Thanks! | |
Hey guys, sorry if this is a silly question but I have a piece of code which contains something like this: [CODE] private: void button1_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) private: void button2_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) private: void button3_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) private: void button4_Click( Object^ … | |
Write a function called nRandomNumbers( ) to perform the following tasks: 1. Generate N random integers between -250 and 250 (inclusive) and save them in a file called number.txt, (Use the function srand()). 2. Print all the generated integers. 3. Compute and return the average of all the negative integers, … | |
How can I read a random line from text file. After I get the word I need to count the letters. [CODE]bool word(char *Filename){ ifstream file; file.open(Filename); //add code. return true; }[/CODE] | |
Hey guys I was hoping someone could help me here. I had to make a Tetris game using eclipse for my intro to Java programming class. I got it all done, but i would like to play the game without having to run it through eclipse. For example if i … | |
Hi, I am coding an application that requires the privileges of the logged in user. I have checked the application to run with administrator privileges and upon executing it asks me if I want to run this application with admin privileges. Despite granting access when my code executes it doesn’t … | |
im new to shell scripting i want a simle script to configure the ip adress and add a default gw this is what i got so far [CODE] #!/bin/bash ifconfig eth0 "ipadress" route add default gw "gw adress" [/CODE] it does not recognise route ? can anyone help? | |
Hi all, I am new Phython user and started using Python 2.7 just a couple days ago. I have written this code which is working, But when user put in correct code loop is not breaking ?? just wondering if it could be improved and what book would you recommend … | |
Hi all trying get small program work. I want my program to search for a word within a text file then out put the word with the rest of the fileds with the sentence. so say i input 4 word/numbers from 4 different text boxes. the ouput to the text … | |
I'm looking for a starting point on this. Can someone point me in the right direction? I want to allow a user to create a new class object that will just store data. My class is data and my type is "flight" so: [code=java] Data flight1 = new Data("A string", … | |
Hello, I'm new with perl, I've been able to read and write from file #1 to file #2. file #1 currently is about 60meg of text... what I would like to do is to read up to 2 char from a constant position and then use that data in a … | |
Hello all, I need a little help with Dictionary statement. My question is it possible to display just one thing for a Dictionary ? I know that Dictionary use Keys and Values so if I have this code. How would I display let say the Dog from Dictionary without printing … |
The End.