132,726 Archived Topics
Remove Filter ![]() | |
![]() | Hi, I'm trying to create a program where I can monitor when a server running a Tomcat Application Server goes down. I will need to check an IP & PORT every 5 minutes for example and get back a boolean on whether it is up or not. I've tried googling … Software Development java ![]() |
[B]Given an array of elements. An element is called as a leader if it is greater than all the elements to the right of it. Print all the leaders in O(n)?[/B] The following is my approach.Can anyone tell me how to improve the code and also the current time complexity? … Software Development c | |
I am trying to run this program but it is giving "unable to open socket" eror. i am running this program on a server via putty which is hosted in my univerity server with wireless network. the code is : [code=c]#include <pthread.h> #include <netinet/ip.h> #include <netinet/tcp.h> #include <stdlib.h> #include <sys/socket.h> … Software Development c data-structure | |
Hi all, I am a newb, got a simple question, anyone can give any idea about it will be great,thanks in advance. a=2 b=3 def functionA(a,b): c=a+b return c def functionB(c) answer=c+1 return c but this code doesnt work....what I want is just assign functionA as one of the argument … Software Development python | |
I'm having a little trouble with a piece of code im trying to write. I have created a deck of cards and then shuffled them however now I am trying to covert my deck (which is simply a list containing the numbers between 1 and 52) into the form "AS", … Software Development python | |
[CODE] // writing to access database byte[] buff = null; FileStream fs = new FileStream(fileName, FileMode.Open, FileAccess.Read); BinaryReader br = new BinaryReader(fs); long numBytes = fs.Length; buff = br.ReadBytes((int)numBytes); mycon.Open(); OleDbCommand cmd = new OleDbCommand("INSERT INTO song VALUES('1','" + buff + "')", mycon); cmd.ExecuteNonQuery(); // reading from access database OleDbCommand … Software Development | |
How do I add Textbox1.Text to a textfile? Software Development vb.net | |
I need to complete a simple program that takes an input file with the following information: Johnson 85 83 77 91 76 Aniston 80 90 95 93 48 Cooper 78 81 11 90 73 Gupta 92 83 30 69 87 Blair 23 45 96 38 59 Clark 60 85 45 … Software Development c++ | |
I need to read files from a folder(Directory will always be the same) There will at most be 4 files in the dir, but it could be anything from 0-4 files. They will always have the same name. i.e. In the dir "Folder" there will be(Could be any combination of … Software Development java | |
I though it'll be interesting to look at threads and queues, so I've written 2 scripts, one will break a file up and encrypt each chunk in a thread, the other will do it sequentially. I'm still very new to python and don't really know why the treading script takes … | |
Hello All... I have a requirement to create a chat forum.. I cannot use php or other related stuff. I'm not provided with database even.. My idea is that I can use java applet to create a chat window... What ever post which when given, it will be saved in … Software Development java java-swing | |
guys.i need to start a research based IT project for my final year project.but the thing is still i dont have an idea for a such project.so can some 1 help me by giving a good project idea Software Development | |
I have been searching around for how to sort by a set column DESC in the code but everything seems to reference the datagrid sorting a database or something along those lines. If I manually built my datagrid record (Rows.Add), how can I sort the records by the first column … Software Development | |
Hello This is like my 4th week using Python and I'm still not familiar with it so I might need some help from you guys. I gotta write a little Connect 4 game in Python, I just got started and boom - I'm stuck! I tried to create a board … Software Development python | |
I have know programming for 5 years. but not get any process yet. I want to ask what you do when you get a project and meet some problem? normally we must get the idea, pseudocode, get the flow of program. now i get the flow of program, idea. but … Software Development | |
Hi. i am trying to learn c# I have newly installed Visual studio dot net 2005. i typed the following program but not getting ouptut i did file->new->file->visual c# i tried the following code [code] // Namespace Declaration using System; // Program start class class InteractiveWelcome { // Main begins … Software Development c# visual-studio | |
I'm trying to open a txt file using command line arguments in Visual C++. I know you need argc and argv[] in the main. What would be an example you would type into the text field on project>properties>debugging>command arguments? How would you display the text on screen? After reading the … Software Development c++ | |
[November] 13. Greetings and salutations! I am currently experiencing some trouble with some novice coding, and some assistance would be greatly appreciated. My goal is to access the static data member and static function of friend class Counter without actually creating a Counter object. I am under the impression that … Software Development c++ | |
Guys how can I set up my environment so that I can write, compile and run my java console applications. Please If u can take me from the baics help me out.. Software Development java | |
hey people, I am looking for a tool which can parse english like test and generate output as test cases..please take this into consideration and help me with your suggestion... thanking you, meenakshi. Software Development java | |
Hi everyone, I'm having problems on my current project. The project consists of optimizing a given function using either the Hill Climber or Genetic Algorithm. The functions I'm going to be optimizing are the Schwefel, Rosenbrock, and Griewangk problems defined here [URL="http://www.cs.cmu.edu/afs/cs/project/jair/pub/volume24/ortizboyer05a-html/node6.html"]http://www.cs.cmu.edu/afs/cs/project/jair/pub/volume24/ortizboyer05a-html/node6.html[/URL] My code for each of the three function … | |
Hello, Is it possible to insert the data from dbgrid component into an SQL SERVER database table. The data that is in the grid is imported from Excel worksheet. It may look silly but I need to insert that data into a table. Any help is appreciated, thank you | |
Ok so i have to write code to construct matrices and vectors then compute some linear algebra problems like the dot product and so on. so I have written the code to construct the matrix and the vectors and so the functions, it works and does class operations however what … Software Development c++ | |
I have nearly all of the code figured out, but the instructions make getting the output and variables to match up. If anyone can assist in seeing what the instructor intends for us to do, I would greatly appreciate it. This is a multi-class program where an abstract class implements … Software Development java user-interface | |
i need the user to input a todolist type thing it uses strings to save the items. what i need to know is how to have the user input a string with the getline function any help would be much appreciated Software Development c++ | |
Hey guys I have a couple of questions. I am trying to build a program that will prompt for the user to enter the size of an array. I've searched the web and several C++ books for guidance on this but have not been able to find anything of significant … | |
I have the following python code to access a MySQL database: [CODE] #!usr/bin/python # server_version.py - retrieve and display database server version import MySQLdb con = MySQLdb.connect (host = "localhost", user = "username", passwd = "password", db = "test") cursor = conn.cursor () cursor.execute ("SELECT VERSION()") row = cursor.fetchone () … | |
I need to get the icon from a drive and put it in a picbox. For example i have an icon on my usb/flash drive and i want to get the icon and put it in a picbox same for my c drive and DVD drive Software Development flash visual-basic | |
Hello, I need help reversing elements in a queue using Recursion. My problem is that when I print out the reverse, it does not show the numbers on the screen. However my program compiles and runs. My question is...How come the numbers in reverse are not showing? Thanks for anyone … | |
Hey all! I am trying to write a program that allows for: 1.) The user to enter the SIZE of an array. 2.) Prints random element numbers. 3.) Saves the random element numbers printed in the array. 4.) Bubble sorts and then prints the randomly printed numbers. Here is what … Software Development c++ | |
I cant figure out why this message is popping up. This is a program that is calculates if it is a leap year. [CODE]#include <iostream> using namespace std; int main() { double year, mod4, mod100, mod400; bool leapYear; cout << "Enter a year from 1582 on.\n"; cin >> year; /* … Software Development c++ | |
Hi,im having trouble with fstreams at the moment,here is my code [CODE]// read contents of file using fstream // using the ->get() function. // Ascii files only. #include <iostream> #include <fstream> using namespace std; main(){ fstream* file = new fstream( "myfile.txt", fstream::in); char aSingleCharacter; //this will read a single char … Software Development c++ | |
i don't know what i'm doing wrong in this program. i'm supposed to write a program that would encrypt and decrypts four-digit integers.it should encrypt it as follow: replace each digit by the remainder after the sum of that digit plus 7 is divided by 10. then swap the first … Software Development c++ | |
hi! i have created a form which contains two combo boxes. the first one can be used to select the location and the second to filter the floors belong to the selected location. i need to know the coding needed to filter the floors which only belongs to the selected … Software Development visual-basic | |
Hi, I have a VB.Net system that connect to SQL Server through ODBC. When I try to raiseerror from an IF...ELSE statement, it does not triggered the exception handling. I have done some raise error testing at my side. Below is my finding: 1. RaiseError did not triggered exception: [code] … Software Development vb.net | |
Hey there, I'm wondering if it is possible to read a PHP file (on the web) through C++? For example, I have a system that allows people to enter some information online (stored in a database) I then want that to be displayed through a console application. Is this thing … Software Development c++ | |
This is a [B]toupper[/B] and [B]tolower[/B] implementation for whole c-strings, without making use of the existing [B]toupper[/B] and [B]tolower[/B] functions for characters :) [U] example:[/U] [CODE=C]char s[]="Hello, beautiful world!"; stoupper(s); // s now contains: `HELLO, BEAUTIFUL WORLD!´ stolower(s); // s now contains: `hello, beautiful world!´[/CODE] Software Development c | |
I am trying to do a string out of this line: Hello "Hello" Hello However this does not work and I beleive it has to do with "Hello". [code] String^ str = "Hello "Hello" Hello"; [/code] Software Development c++ | |
I'm trying to add a memory function, that when you hit the 'M' button, it stores whats in the display into a variable, and when you hit the 'R' button, it retrieves the variable value and displays it and can be used for calculations. Here's my code: [CODE]import javax.swing.*; import … Software Development gui java java-swing | |
If a constructor calls another class with another constructor and both constructors have methods that access the same class, which would be first? First constructor in a method separate from the class [CODE]{ Entry entry(" ", " ", " ", time.Hours(), time.Minutes()); return !(list.IsPresent(entry)); } [/CODE] Second constructor that it's … Software Development c++ | |
Hiya, im new to this site but it seems like a very useful comunity :) Im new to java programming as well and i have to write a class file to deal with calculating the maximum, minimum, average(mean), population variance and sample variance from an array which is entered by … Software Development java | |
Hi to all, ------------- Here there is array of ten position and array contain ten integers . I want to put the array of ten integers randomly on the array of ten position ... Here is my code : ---------------------- [CODE]import java.util.Random; public class TestArray { public static void main(String[] … Software Development java | |
My windows Application has a menu which opens an OpenFileDialog. When the button OK is pressed, I want to place the main form background and show a new Form (with two radiobuttons, one button). From the New Form I must take information (which radiobutton was checked) and pass this information … Software Development vb.net | |
the header file: [code] #include<stdio.h> struct IntArray { int schedule[30000]; int nSize; }; struct IntArray getSchedule(int browsingTime[], int noOfPersons, int timeSlot); [/code] the implementation file: [code] #include"leastremainingtime.h" void sort(int *a,int n) { int i=0,j=0,temp=0; for(i=0; i<n;i++) { for(j=0;j<n-1;j++) { if(a[j] > a[j+1]) { temp=a[j]; a[j]=a[j+1]; a[j+1]=temp; } } } } … Software Development c | |
I have, with the vast assistance of Bazzy on cplusplus as well as a few other programmers, made the code to input a file into a vector. Even after looking over the tutorials on algorithms, I still can't figure out how to sort the data. It's due in [U]4 hours … | |
Hello all, i am looking for a little help but PLEASE do not solve the problem for me, i need to learn the stuff. Below are a list of problems i am having, followed by my code and then the output i currently have my problems: 1) the style in … Software Development c++ | |
Hie guys Iam looking for a java console application that accepts a string of 80 characters from a user and determine the number of words in the string taking care that there may be more than one spaces between words. The program should check that there is more than one … Software Development java | |
Hello, I have a problem :icon_confused: which is: [CODE]public void caseUpper() { QTextCursor cursor(textCursor()); String selTxt(cursor.selectedText()); if(selTxt.isEmpty()) { return; } String txt = selTxt.toUpperCase(); insertPlainText(txt); } public void caseLower() { QTextCursor cursor(textCursor()); String selTxt(cursor.selectedText()); if(selTxt.isEmpty()) { return; } String txt = selTxt.toLowerCase(); insertPlainText(txt); }[/CODE] I think the problem is that … Software Development java | |
Hello I am using Delphi 3. I have 30 edit fields named e0, e1, e2, ..., e29. The thing is, that I want to put something into these edit fields, to be specific: I want to put variable a[0] into e0, a[1] into e1 and so on. i could of … Software Development delphi ide open-source pascal | |
I need to write a program that reads a text file that contains groups of integers that start with the word "next". For each group, the program computes and writes out the sum of the integers in that group and the average. thare may be any number of groups. here … Software Development java |
The End.