132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for feoperro

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
Member Avatar for feoperro
0
118
Member Avatar for want_to_code

[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
Member Avatar for thines01
0
121
Member Avatar for henabibi

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
Member Avatar for Nick Evan
0
182
Member Avatar for XLL

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
Member Avatar for jlm699
0
82
Member Avatar for Garee

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
Member Avatar for vegaseat
0
346
Member Avatar for coollife

[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
Member Avatar for DdoubleD
0
246
Member Avatar for nevets04
Member Avatar for hjdaniel.sun
0
217
Member Avatar for PDB1982

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++
Member Avatar for pecet
0
136
Member Avatar for P00dle

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
Member Avatar for peter_budo
0
115
Member Avatar for zyrus001

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 …

Software Development python queue
Member Avatar for Gribouillis
0
266
Member Avatar for rigidboss

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
Member Avatar for rigidboss
0
113
Member Avatar for chathuD

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
Member Avatar for Geekitygeek
0
249
Member Avatar for redbrad0

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
Member Avatar for Geekitygeek
0
68
Member Avatar for sentinel123

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
Member Avatar for sentinel123
0
2K
Member Avatar for tgsoon2002

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
Member Avatar for Geekitygeek
0
93
Member Avatar for abhay1234

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
Member Avatar for abhay1234
0
130
Member Avatar for T-Dogg3030

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++
Member Avatar for Nick Evan
0
17K
Member Avatar for William Byrd II

[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++
Member Avatar for dkalita
0
135
Member Avatar for ttchiwandire

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
Member Avatar for jbennet
0
101
Member Avatar for meenakshi chorg

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
Member Avatar for P00dle
0
67
Member Avatar for bpt0004

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 …

Software Development algorithm c++
Member Avatar for StuXYZ
0
1K
Member Avatar for azapovjednik

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

Software Development pascal sql
Member Avatar for cao
0
2K
Member Avatar for Freezeskier

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++
Member Avatar for Freezeskier
0
127
Member Avatar for Ryujin89

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
Member Avatar for Ryujin89
0
13K
Member Avatar for fopah

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++
Member Avatar for arshaad
0
168
Member Avatar for EngneerNitemare

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 …

Software Development algorithm c++
Member Avatar for mrnutty
0
20K
Member Avatar for rbushlow

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 () …

Software Development mysql python
Member Avatar for rajasekhar1242
0
182
Member Avatar for drabsch

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
Member Avatar for drabsch
0
115
Member Avatar for NinjaLink

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 …

Software Development c++ queue
Member Avatar for NinjaLink
0
804
Member Avatar for EngneerNitemare

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++
Member Avatar for mrnutty
0
170
Member Avatar for fragtech

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++
Member Avatar for fragtech
0
719
Member Avatar for StaticX

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++
Member Avatar for Ancient Dragon
0
121
Member Avatar for kele1

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++
Member Avatar for kele1
0
147
Member Avatar for hanzi_ru

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
Member Avatar for dzul73
0
307
Member Avatar for lara_

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
Member Avatar for lara_
0
183
Member Avatar for Phil++

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++
Member Avatar for Phil++
0
78
Member Avatar for tux4life

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
Member Avatar for William Hemsworth
0
3K
Member Avatar for Lukezzz

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++
Member Avatar for thines01
0
66
Member Avatar for DrDeadite

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
Member Avatar for DrDeadite
0
122
Member Avatar for Trekker182

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++
Member Avatar for Trekker182
0
111
Member Avatar for matt547

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
Member Avatar for brownjohn
0
173
Member Avatar for beshoyatef

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
Member Avatar for beshoyatef
0
106
Member Avatar for nouvaki

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
Member Avatar for TomW
0
96
Member Avatar for want_to_code

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
Member Avatar for want_to_code
0
116
Member Avatar for Ryujin89

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 …

Software Development c++ ios
0
79
Member Avatar for GSEninja

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++
Member Avatar for mrnutty
0
117
Member Avatar for ttchiwandire

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
Member Avatar for thines01
0
87
Member Avatar for kjiu

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
0
80
Member Avatar for laki4546

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
Member Avatar for laki4546
0
989
Member Avatar for the_Famous

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
Member Avatar for KirkPatrick
0
103

The End.