199,114 Archived Topics
Remove Filter ![]() | |
I've learn python and I won't say that I know it all, but I won't see anywhere except google will use python. New programming language like python and ruby, do they have space to grow? | |
The program I am writing is supposed to read in a txt file and then align the txt depending on the number of characters per line that the user has specified. Since there aren't any limitations to the length of the text it has to be represented using a dynamic … | |
This snippet defines a function to merge sorted iterables containing similar items into a single iterable. Items are supposed to be sorted in ascending order. Only one item per iterable is stored at a time. | |
Hi guyz. I know this is a simple one but Im a bit confused in doing this. Basically, I want to get the Screen Resoultion of the client machine using my JSP. I have this code in my Bean. [CODE] Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); return screenSize.getWidth(); [/CODE] Problem is it … | |
Hello guys, I need your help. Newbie here! I want to know how to get response.redirect in hyperlinkfield. Example: When I click the the link, it response to the next page and the column of my gridview appears but how can I get the labels and tables? Thanks in advance | |
question states for me to have the prog read #'s inputed from the user in the range of 0 to 50 inclusive, count how many times each # was inputed, then print all #'s imputed and how may times they were. this is what I have so far.... [code]import java.util.Scanner; … | |
[code=php] <html> <head> <title> ftp php test page</title> <?php $ftp_server = "10.209.152.220"; $ftp_user = "deepthisk"; $ftp_pass = "Hatepwd1"; // set up a connection or die $conn_id = ftp_connect($ftp_server) or die("Couldn't connect to ".$ftp_server."\n"); // try to login if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) { echo "Connected as ".$ftp_user."@".$ftp_server."\n"; } else { echo … | |
I'm doing a BankAccount class and in the constructor I need to validate if the string in which the account number is written, is all numeric. Any ideas on how I can accomplish this? Also, it must be of 4 digits...is there some method of the String class that can … | |
Hello, I am trying to return the union of two ArraySet Strings as a third; however, the compiler is complaining: found : jss2.SetADT<java.lang.String> required: jss2.ArraySet<java.lang.String> union = one.union(two); I was thinking I could pass an ArraySet<String> as the parameter but unfortunetly I am stuck here. Any suggestions on how to … | |
Hello! I'm working off of a problem in my "How To Think Like A Computer Scientist" textbook. The exercise in the book is having me work with a deck of cards. I receive two errors in my current code. The first is that every method after Class Card {...} says … | |
I need some help on what I'm working on right now I'm not asking for an answer maybe some help or a push in the right direction. Here is what I'm asked to do "Convert your program to run from an input file instead of console input." I'm suppose to … | |
The code I'm writing reads in something like this from a file: 95 34 89 100 25 100 84 62 78 98 Mary Elizabeth Smith And outputs this to the same filename with a different extension: 88.25 Mary Elizabeth Smith I wrote a test program to test the calculation methods … | |
I'm developing a program based on the Tower of Hanoi. It accepts the number of discs and returns the amount of turns it takes for those discs to complete the conundrum. All of my inputs work fine, until the input (d) is greater than 31. Is the result too large … | |
heres my question: which tend to change more frequently: interfaces or implementations? How does proper OO design take advantage of this observation? I think the answer is implementations | |
have been working on a program that should output the values of an array from lowest to highest order, my program runs but its ouputing -1.#IND which is clearly not right. Im pretty sure im messing up somewhere when i call back to my my function with selectionSort(array, N) but … | |
Hi, I am writing a code that reads input from user to create a linked list database at the same, time it write the data received in to binary file. when I run the program is supposed to prompt the user to enter the data for ten time, however the … | |
Hello. I've created a program which calculates points which belong to a specific graph, such as Archimedes spiral, Logarithmic spiral, Cardioid etc. The program generates an array with coordinates. Technically coordinates are polar, but I can convert them to cartesian by using polar() function. Question is - how do i … | |
Hi All, Im accessing a function with paticular parameters, but my response is not recognising the parameter of the count value. If I change the variable in the COUNT part of the query to a static value it works fine, but if i use the variable name it returns "undefined … | |
Hi, Is there anyone who know which complexity these functions are? I mean O(n), O(n^2), O(n^3), n log(n) or log(n) 1. --------------------------------------------- [CODE]void bogosort_array(double a[], int length) { do shuffle_array(a, length); while (! is_array_sorted(a, length)); }[/CODE] 2. --------------------------------------------- [CODE]void reverse_string(char* s) { int n = strlen(s); for (int i = … | |
Hi guys. I am hoping for a little help with this. I am pretty new to programming and just can't seem to get things right yet. Here is my code. It returns like 40 errors. Way messed up eh? [CODE]#include <iostream> #include <string> using namespace std; class Date { public: … | |
Whats wrong with this code. I can create the DAT file.Name and Grade is writing to the file perfectly. but the file contains ASCII values for RollNO and after Grade. [B]Output file:[/B] Name A ÈB [B]Program[/B]: #include<iostream.h> #include<conio.h> #include<fstream.h> #include<string.h> class stu { int rollno; char name[20]; char grade; float … | |
Hi! I would like to add a timer to JTextField. However, my timer does not run. Could you, please, tell me what is wrong in my code. Thanks! [CODE] timerTask = new MyTimerTask(); timer.schedule(timerTask, new Date(0), 5000); // 5 seconds delay ... private class MyTimerTask extends TimerTask { @Override public … | |
I'm attempting to make a Tic-Tac-Toe against the computer program, I'm pretty much done, but i can't figure out how to stop the computer from making the exact same move as the human does. Thank You. [CODE]// Include the libraries #include <iostream> #include <string> // Use standerd namespaces. using namespace … | |
I have a problem that needs fixing How do you get all open tabs shown in a KryptonListbox My fail attempt : TabpagesHtml.Items.Add(Form1.SuperKryptonNavigator.Pages.Item(0)) : :@ | |
well i have info from a DB however for some reason i can't use some variables... or use other variables within the while loop!!!! here's my code: [CODE]function SeasonPrice($roomName) { require("dbCon.php"); mysql_select_db($database); $res = mysql_query("select * from room where RoomName = '".$roomName."'"); $row = mysql_fetch_assoc($res); $Booked_month = date('F'); if($Booked_month <= … | |
I'm supposed to implement a queue using a singly linked circular linked list (it also has to be generic). It keeps saying there are incompatible types at lines 44 and 45. I've honestly been trying to work this out for hours, but I don't understand what i'm doing wrong. Any … | |
[COLOR="Red"]I have an assignment from my data structures course.We learn almost nothing about C++.But they gave that assignment,and said do it anyway.Many of my classmates have it done with money.But I wanna learn how to make this project by myself.I'm thinking about the structure for 5 days and nights.I wanna … | |
Hi everyone im a bit confused with my work and i hope you can help me. i need to get some values from a text file and enter it into a 2D array ive done this part ok with the following code however in my file i have some other … | |
I am having problems working on this project about making a baffle game. I have most of the code written already I just can't figure out how to do the shot laser part and determining where the laser exits the box. The point of the game is that there are … | |
I'm trying to search a specified range of numbers and I'm currently using regular expressions. The lines I'm searching contain numbers from 00 to 30, but I only want to find the lines containing 02 to 22. I have tried a few different things, but none of them work. this … | |
Hello i've got a problem here, i want to insert some data into my table and everything is all right for the first 3 or 4 but the last does not work [CODE]<?php // include("config.php"); // $db_connection = mysql_connect($db_host, $db_user, $db_slaptazodis); mysql_select_db($db_table, $db_connection); // if ($id == "") { // … | |
Hey guys. I'm new to SDL and C++ and I've stumbled upon a problem here. Here's the code: [CODE]#include <SDL/SDL.h> #include <SDL/SDL_ttf.h> #include <SDL/SDL_image.h> #include <string> using namespace std; const int screenheight = 1920; const int screenwidth = 1080; const int screenbpp = 32; int right,down = 0; SDL_Surface *bakgrund … | |
[code] #include <iostream> #include <cstring> #include <fstream> using namespace std; const int length = 25; void insertionSort(int numb, char* anArray[]) { char temp[length]; int pos; for(int i = 1; i < numb; i++) { strncpy(temp, anArray[i], length); pos = i; //moves "higher" letters to the right while(pos > 0 && … | |
Say i want a friend function to have access to two classes which are derived from the same base..I declare the friend function prototye in both classes, but where do i code the actual definition?? is the code below right?? (mixBreed() is the friend function).. [code=c] // Dog.h #include "Animal.h" … | |
I am writing a program that will take a sentence and find out how many of one character (like how many h's) is in the sentence. I have started what I think works and got the program to work once but after the one time I cant get it to … | |
I am generating random numbers and want to write them into a file. But its writing them in binary and I am not able to open them using a text editor. How do I write them in Ascii? Also what is the fastest method to write them into a file? … | |
Hi, Please help... I am trying to read in a file in C++ and when I use getline I am not able to read in the last line when the last line in the input file does not have a newline (\n) at the end. How do I do this? … | |
Hi, I'm new to this community and hope im in the right place :-) I have been searching everywhere for the proper method to pass input from one html form to another. I have found a bunch of javascript that is supposed to break down a query string and populate … | |
I just recently interviewed with a company for a software developer internship. I was expecting it to be a generic interview but unfortunately I was wrong. The recruiter asked me some basics questions and then gave me a logic test of 30 questions. I was completely unprepared for that. Those … | |
Hi, I am not sure if this is possible in css or it's a javaScript thing. I have a page where it has many images, If you hover over the image the details of that image appear to the top left. However when the images are over next to the … | |
<?php require('Connections/boss.php');?> <?php if (!function_exists("GetSQLValueString")) { function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue; $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue); switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case … | |
hey guys/...am stuck at one point....help me please! ! ! its a quiz progg... one ques...4 options... i have one button---NEXT QUES--- It should display the next ques--it should also take the user selected option, compare it with the correct option and show if the Answer is right or wrong … | |
i know how to get a file and all but how do u go about putting that file into the tree? my get file [CODE]void BST::loadFile() { cout << "Enter the the file location" << endl; cin >> inFileName; inFile.open(inFileName.c_str()); if (!inFile.is_open()) //test for file { cerr << "Cannot open … | |
Hello, I have created a simple frame, and in it there are 3 panels.I have a button in the bottom panel, and when pressed should display the text "You pressed the button", in the mainPanel.However this is not working.Can anyone shed some light as to what I am doing wrong … | |
Hello! (I would like to use tkinter. ) I'm going to do my program who convert roman letters to arabic numbers and vise versa. I'm going to do two buttons and a textfield where you can write in the number or letters and then choose if you want it transelate … | |
Hi, I'm a BSD Socket beginner and I would like to make a small networking program written in C. I've read many instructional articles and I haven't found a example how to send/receive a non-char - string sending everywhere. I mean, I thought about sending some various structures as "frames". … | |
Hello, Im creating a application in Microsoft access. I need to protect it with a license manager. I have built one but works from the computer. Whats i realy need is that i puplish my license database on the internet and in the application when you press active software it … | |
Basically I've finished my code for the most part and I'm having trouble figuring out how to initialize loan, mort_gage, and downpayment. Is it possible to use a pointer for each of these and call the address back to main? I'm so confused...it's just one of those little things that's … | |
[code=C++] #include <cstdlib> #include <iostream> using namespace std; class fractions { private: int numerator1, denominator1, numerator2, denominator2; public: fractions(int = 0, int = 1, int = 0, int = 1); void read_fractions (); void multiply_fractions (); void add_fractions (); double add_fractions (double); double multiply_fractions (double); }; void fractions::read_fractions () { … | |
Hi, im trying to figure out how to call a function's variable from here [CODE]def legal_moves(board): moves = [] for square in range(DINNER): if board [square] == SPACE: moves.append(square) return moves[/CODE] I want to take the variable moves and use it for main How would I do that? |
The End.