199,114 Archived Topics
Remove Filter ![]() | |
I'm trying to create a boggle game. I have it so it will setup the board and accept user input. What I am trying to do now is get rid of the "[" braces "]" and the commas to give it a cleaner look and to hopefully make it easier … | |
Hi, I have to write a function in Visual Basic within Microsoft that takes customer type and number of books purchased as inputs and returns the discount that should be given. Calculate the total sum after deducting discount that is to be paid and that the interface shows the total … | |
Please can anyone tell me the best way to write a php login script that will encrypt the user password when an account is created and decrypt it when the user try to login. It is a localhost system so not really concern about hackers. Thanks | |
Ok we have been creating this calendar in our intro to programming class for about a week or so, and right now I am stuck on getting the start day of each month. I was thinking it should be total days (days in month + total days from 1800 - … | |
public class Average { private double [] Score; int index; public Average(double [] s) { Score = new double[s.length]; for(index=0; index<s.length; index++) { if(Score[index]>100 && Score[index]<0) Score[index]=s[index]; } } public double getAverage() { double total=0.0; double average = 0.0; for(double value: Score) total+=value; average= Score.length/total; return average; } } the … | |
Can someone please tell me why "int can not be dereferenced" here. contents += cart[i].toString() + "\n [CODE]// ********************************************************************** // ShoppingCart.java // // Represents a shopping cart as an array of items // ********************************************************************** import java.text.NumberFormat; public class ShoppingCart { private int itemCount; // total number of items in the … | |
Hi Every Body I have a samll piece of code written in php my problem is code is not deleting record from my database. Please see the code below which is calling [COLOR="Red"]deleteadministratorexe.php [/COLOR]- which is actually deleting the record. Files are attached here - [CODE] <?php require_once('security.php'); require_once('connection.php'); ?> … | |
i created a VB-6 program using reference "DAO 3.51 object library" on XP OS....works ok on my system...but does not work on my friends system...gives error - "Runtime-error 429 : active x component cant create object" friend's system is Windows XP with Office 2007 installed... Pl help to resolve this... … | |
Hi , I read that c is not a block structured language. means it does not allow defining functions inside other functions. but this code is not generating any error not even warnings, though we nest the functions. whats the story. [CODE] #include<stdio.h> int main() { int num; num = … | |
Hello, I am a student in a VB2008 class. I am using this code to copy data in a textbox to a text file. I have several forms to copy data from. Can this be done or do I need to do each form seperately?[CODE]Dim FILE_NAME As String = "C:\test2.text" … | |
I can't get any of my attempts to validate the radio button to work. If either of the buttons is clicked it works. But, if no button is clicked an the submit button is click by itself I get an error on my action page. I'm out of ideas and … | |
I am creating a message box in VB8 for an error. I created the message box and everything works. The message box returns a value of 0 which is the default one. Where does it return 0 to. Or do you have to tell it where to return it. | |
Hi i have written a program to check the precision of float and double values. i read that the precision of float is 6 digits and double is 10. but it is showing only 6 for both. do we need to make any arrangement for the system to print the … | |
Hey Guys, I have a text file that has numbers in it. And I need the program I am working on to search it as an array. How do I do that? | |
I'm having difficulties thinking through the logic of my natural mergesort program. I think I have the split working correctly, but my merge doesn't seem to be working at all, and the pseudocode in my book and what I've found so far on the web is fuzzy. This is a … | |
I am having this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''3'' at line 1 The $get1 value is 3. I tried enough but to no avail. I don't see any … | |
Hello guys, I've got a question related to my data structures class. I have file in which data is unordered. Say: hello apple blue phone number I have to search a string using Binary Search. But since we cannot apply Binary Search to unordered list, we should make an ordered … | |
![]() | I am trying to make a code, where the points are not working. The points always give an odd number. Can you try it, if you can see a problem, I would love help. [CODE]#include <iostream> #define cls system("cls") #define pause system("pause") #include <string> using namespace std; class games { … ![]() |
Ok I was working on this yesterday, and I couldn't get it. I have a php file called search.php and a file called searchResults.php, if a user wants to search for an employeeName/EmployeeID/team/department/manager (in a DB) specifically they will use the search.php page and then click submit and show the … | |
But now can't finish it.. I can't figure out how to make the board display after every turn. Can anyone help? #include <iostream> using namespace std; void showBoard (char t[3][3]); int main () { char player; char t[3][3] = {{'1', '2', '3'}, {'4', '5', '6'}, {'7', '8', '9'}}; int place … | |
[code]/****************************************************/ /* File: Binomial Numbers.cpp */ /* */ /* Created by: Regine R Calinda */ /* Date: November 9, 2009 */ /* */ /* Program to compute binomial coefficients */ /* */ /* Inputs: (keyboard) */ /* Two positive integers (n & k) */ /* */ /* Output: */ /* … | |
[code]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.SqlClient; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace CarsRUS { public partial class Cars : Form { private SqlConnection conn; private SqlDataAdapter daAddresses; private DataSet dsAddresses; private DataGrid dgAddresses; private const string tableName = "CarRUS"; public class Customer { … | |
Hello, I am trying to use the CImg library to put images into C++, can someone help? I don't know how to use this program... PLZ HELP | |
I have a small problem with string. How can I make the output str to be every single string i.e: string str="You are a good writer"; to be: str1="you"; str2=“are"; str3="a"; str4="good"; str5="writer"; //---------my_test_code,but not working yet. #include <iostream> #include <string> using namespace std; int main () { string str; … | |
I need to remove all lines that contain spaces in a file. I know very little bash. Any help would be greatly appreciated. | |
Hey, I am currently following a code skeleton to implement the missing code for some function. Below is only some part of the implementation I've done so far. Yes it is not much yet... I got stuck for the implementation of the [B]list_add()[/B] function. What I want to do there … | |
Alright so I want to write a program that will compute trig functions (sin, cos, tan, arcsin, etc.). Basically I'm ignoring the included math library in python and hard coding it myself. My issue is that I'm fairly new to programming and not sure how to go about coding a … | |
I understand the basic principle of recursion, but I'm having trouble implementing it in practice. I understand this first case perfectly fine. It works because n is constantly getting closer to 0. [CODE]def faculty(n): # Base case if n == 0: return 1 # Recursive call else: return n * … | |
Okay, so I'm having a little trouble. Let's say I run "scriptA.py" and it has a GUI (Tkinter) and it is running in its mainloop. I want to create a "scriptB.py" that can end "scriptA.py"; would there be a way to do this regardless of the OS it is on … | |
I am a first time poster and couldnt find a relevant category to post in so chose this as most are viewing.My wife has a company that currently uses an old sage product as a database. It runs in dos and will only run in windows using an emulator, but … | |
I am writing a fairly simple web site monitoring app. It uses a timer to call a class that requests a web page and measures the response. Problem is that the third time the class is called the app hangs. looking at the locals box I see that the properties … | |
I have a seg fault I can't seem to be rid of. Basically I'm building an AVL tree and I'm stuck on the insert method. gdb says it is occuring on the line with: while( temp != NULL && temp->key != k ){ Would someone please help? Thank you in … | |
Hey, I need to create some pseudo code for a class and I dunno if I've done it right or not. Any help? [code] Begin class Employee Initialise empty constructor Employee Initialise constructor Employee with parameters Define prototype for method getID(as integer) Define prototype for method getFirstName(as char array) Define … | |
I have 2 main if statements inside this for loop (lines 7 and 56). I'm trying to get so that if after all the iterations are complete, i.e. j = 51 the first and second if statements are not satisfied, then it will print out an error message. I have … | |
I did an application, published and installed it. In my User`s Start Menu there is created a new folder with y shortcut to my application.exe inside. What`s bothering me is the name if this folder. It has a name, that I don`t know how and where to change it. I … | |
i have a file a.txt which contains "ysm.set.ac4-qa.sds.audit add yinst setting yti. YTI_ HOST_OVERRIDE =qa-sav-midas-002.ysm.ac4.yahoo.com" I have variable STR which is dynamically assigned the value "HOST_OVERRIDE=qa-sav-midas-002.ysm.ac4.yahoo.com" I need to grep $STR on the file a.txt as `grep "$STR" a.txt ` But because of the spaces before =, the line is … | |
[CODE]import java.util.Scanner; public class MathTutor { Scanner input = new Scanner(System.in); int numQuestions; int choice; int numCorrect; public MathTutor (){ numQuestions = choice = numCorrect = 0; } public int getNumQuestions(){ { System.out.print("How many questions? "); numQuestions = input.nextInt(); if (numQuestions < 1) { System.out.println("Invalid - must ask at least … | |
Ok. I've been working on a pacman game using C++, and OGRE. Things have been going good, but I have run across a problem with the collision detection of pacman hitting the walls. Before I explaing, here is some of the source code. PacpersonObj Class Header [CODE] // PacPersonObj.h // … | |
Hello! I have another issue that i cant solve. How do i search after a string in a text file and remove it when it get a match? | |
if i have [ if statement ] in my php code than with jquery it is not working...........!! e.g if i have --------------------------- [CODE]<?php if(myquery){ }else{ do jquery here } ?>[/CODE] ------------------------------ but jquery in else area is gone disable how can i fix that.........!! | |
i have to write a program in c++ that reads numbers(weight of an item) from a file until now i got it:) and then place this items in boxes.the goal is to use as less boxes as possible.Each box can weight no more than 10. place each new item in … | |
'Learning CPP' programmer here. So, bear with me. First off : [B]STRCAT : [/B] [url]http://www.cplusplus.com/reference/clibrary/cstring/strcat/[/url] When clearly the definition says : [CODE]char * strcat ( char * destination, const char * source );[/CODE] Why'd they use char str[80] in the example??? What types can be used? | |
i have a problem : Write the definition of a function, isReverse , whose first two parameters are arrays of integers of equal size, and whose third parameter is an integer indicating the size of each array. The function returns true if and only if one array is the reverse … | |
If I have two dates like this, I wonder how it will be possible to count how many of these days that are: Monday,Tuesday,Wednesday,Thursday,Friday The dates are for example: 11/01/2009 11/18/2009 | |
Hi, I first convert the image on the server application in bytes: [code] //server public void sendImage(File file) throws IOException { ByteArrayOutputStream baos=new ByteArrayOutputStream(1000); BufferedImage img=ImageIO.read(new File(file.getAbsolutePath())); ImageIO.write(img, "jpg", baos); baos.flush(); os.write(baos.toByteArray());// this is a "new DataOutputStream(clientSocket.getOutputStream());" System.out.println("Done! Length is:"+baos.toByteArray().length); baos.close(); } [/code] Then my application freezes when trying to … | |
Hi, When I want to run a program in eclipse, I get "Binary not found" error . I have MinGW in c: root and I have added C:/mingw/bin to environment path . | |
Here is the program: int i,n; double v_in[20+1],v_out[20+1]; cout << "\ninput n ? "; cin >> n; for(i=1;i<=n;i++) { cout << "input v_in[" << i << "] ? "; cin >> v_in[i]; } // reverse v_in and store the result in v_out for(i=1;i<=n;i++) { v_out[i] = v_in[n-i+1]; } cout << … | |
May I know how to fix the frame in my system so that they will not shift their position? When I open my system in other computer or when I zoom it, the frames in my system will move. May I know how to fix it? I use <table>, <div> … ![]() | |
Hi, I ask you for a problem I can't resolve. I'm developing a form application in C# and I need to access a web application (IIS) within the intranet and not to insert crediantials manually (I keep them in code). I tried using both Win32NativeMethods.LogonUser and advapi32.dll's Logon User methods, … |
The End.