64,152 Solved Topics
Remove Filter ![]() | |
Hi, I'm trying to add new information, with several if loops, to a new file with append.() but I'm not sure that this works. The new file will also include some data from the f_file, that is why the if loops are there. [CODE]f=open('filename', 'r') new=open('filename', 'w') for data in … | |
I have a problem to Modify the Coin class to have it implement the Comparable interface. The following code is not working correctly and I don't know why. [code] public class Coin implements Comparable<Object> { private double value; private String name; public Coin(double aValue, String aName) { value = aValue; … | |
I am looking for a tool that will accept an address from the user and return a 9 digit zipcode as well as validate the address or suggest an address, like on fexed or ups website. Its got to work with vb.net and asp.net Is there a tool like this … | |
I want to make a class that takes a String and checks if that String is found in a .txt File. If it is found, I want to store the words following that String in a String array. Here is what I have until now: [CODE]import java.io.File; import java.util.Scanner; public … | |
I want to parse command line arguments. Say someone gives me ./progname param2 [-price=50] [-size=10] [-weight=16] [-height=7] Square bracketed items are optional. Either none or exactly two of -price, -size, -weight, and -height can be specified. If none of them are specified, it should be taking default values for price … | |
When I run my program following is my program: public class JasperReportsDemoApp { String reportSource = "c://report1.jrxml"; String reportDest = "c://HelloReportWorld.html"; public JasperReportsDemoApp() { Map<String, Object> params = new HashMap<String, Object>(); params.put("reportTitle", "Hello Report World"); // params.put("author", "Craig Conover"); // params.put("startDate", (new java.util.Date()).toString()); // params.put("reportTitle", "Hello Report World"); // params.put("author", … | |
Hi all, very new to PHP (ie. only 2 days old!) so please be gentle! I have a form with text fields and a file upload, and the php script I have is working wonders in regards to uploading the file and emailing the form data along with a link … | |
hey...i need to ask ..how to put two field in one column? let say, i have one field call Quantity for weight. Now i need to put the quantity unit which is store in other field call unit. how i concat two field in one column....? | |
hello all how to create JTextArea with border look like standard jTextField 's border ? thankyou denny | |
Hello !! I have a form and some controls as dropdown and textboxes.. The situation is that when the form loads, i want the value in textbox to be incremented, everytime it loads.. This is something i tried.. I get the value '1' everytime !! It shows no sign of … | |
I have finally written this code, but the prob with this is that when it is prompting for password it doesnt send any password to the ftp machine, we have to do it manually, but after typing it manually, it take the password line as command and shows that that … | |
Hi all, I know " String ".trim is used to remove the blank spaces but when i use the following string compare its shows some strange result [CODE]if(" String ".trim() == "String") System.out.println("Equal"); else System.out.println("Not Equal"); [/CODE] It produces the result of not equal. How it produces the result like … | |
i have 2 form. form 1 have combobox and second form textbox...how to load data form textbox into combobox..if i type hitachi in text box, automatictly "hitachi" will save in dropdownlist combobox...anyone..please help me... | |
#include <iostream> #include <windows.h> #include "g.h" typedef unsigned long (*AsmFunc)(AS_INBUF *, AS_OUTBUF *, T_REG_INF *, T_MPCNT *, ICE_ID *); int main() { AsmFunc _AsmFunc; HINSTANCE hInstLibrary = LoadLibrary((LPCWSTR)L"C:\Documents and Settings\karthikdatt\Desktop"); if (hInstLibrary) { _AsmFunc = (AsmFunc)GetProcAddress(hInstLibrary, "Assembler"); if (_AsmFunc) { std::cout << "ASSEMBLER FUNCTION" << _AsmFunc(ptr1,ptr2,ptr3,ptr4,ptr5) << std::endl; } } … | |
I am developing a Vis C++ 2010 Express Windows Forms application which handles some time/date scheduling, based on user input. So, to test the application, I ran my PC's date forward a couple of weeks. Edited a glitch in the mean time... Then, set the date back to current. Now, … | |
Hi I have written the below code for ftp transfer. can u please help me how to trap whether it is successful or not. [code]ftp -n `awk '$1 ~ /db_server_IP/ { print $3 }' $CONFIG_FILE` <<END quote USER `awk '$1 ~ /db_user/ { print $3 }' $CONFIG_FILE` quote PASS `awk … | |
Hey everyone! I am fairly new to the php world but I am a quick learner when shown the right thing. I have a membership area sort of set up on my localhost in Easy PHP, and there is this Fatal Error that reads: "Fatal error: Cannot redeclare makeRandomPassword() (previously … | |
Help in my Visual Basic Program...just got stuck I'm creating a Multiplayer LAN game in VB 2008 here is what I wanted to do I created a textbox named txtbuttons.text. If I inputed a value, for example 23856 in the textbox.The Values will be distributed in different textboxes. example Value … | |
Hey, I was wondering if anyone could show me a little javascript. I've never used it before and am unfamiliar with how to reference outside API's. What I'm trying to do is read a string in from a website/Web API. So..: HTML with javascript document: [code] <script type="text/javascript"> var wantedString … | |
What my problem is I don't know how do I set it up so that when the entire word has been guessed I can stop the game and tell the user they won or lost. I tried adding in another if statement after maxTries--; where it says if (maxTries == … | |
Hi guys, I'm new to Java and was wondering if you could help with one little problem with my code. [CODE]System.out.print("Enter title: "); String title = keyboard.next(); if (title.equals("Mrs") || title.equals("Miss") || title.equals("Mr") || title.equals("Ms")) { title = title; } else { System.out.println("Enter a valid title"); }[/CODE] If the title … | |
I know this is quite simple for you to code but for me as a beginner I need some examples or guides. I have a text file which has this content: [CODE]random line random line random line random line random line random line random line random27061-1-0256487952random words random words random … | |
Hi. I'm trying to create a function which connects to a database, and then displays rows in it. I'm trying to use a function to connect, but it's not working. Here's my first code: [CODE]<?php define("SERVER", "mysql.example.com"); define("USERNAME", "username"); define("PASSWORD", "********"); define("DATABASE", "db"); function displayFunction() { $dbc = @mysqli_connect(SERVER, USERNAME, … | |
Hi I was wondering if anyone could help me figure out why every time I try to run this code it keeps bringing up an error of "cannot nest procedures". I need to use the PROTO and PROC directives in this program for my HW assignment. I'm also trying to … | |
hello all I fill datagridview Row[0].Cells[0] with the following command dgv1.Rows[0].Cells[(0].Value="-1"; //------------------- how to give color so that the content "-1" in datagridview has red in color (forecolor) thank you denny | |
I need to read in a list from a text file, put that list in a list, read in the amount of credits the students earned as an int, and than add 16 credits to the list. Here is my code so far: [CODE]myList2 = [] myList = [] myFile … | |
I used a multi dimensional array: [CODE]int grid[3][3];[/CODE] then I assigned all the variables in the array to the number 2 like this:[CODE] grid[0][0] = 2; grid[0][1] = 2; grid[0][2] = 2; grid[1][0] = 2; grid[1][1] = 2; grid[1][2] = 2; grid[2][0] = 2; grid[2][1] = 2; grid[2][2] = 2;[/CODE] … | |
I'm trying to make my rectangles appear on screen, but it appears blank when I run the program. [CODE]#include <GL/glut.h> #include <stdlib.h> #include <math.h> using namespace std; struct GLPoint { GLint x; GLint y; }; void init(void) { glClearColor (1.0, 1.0, 1.0, 0.0); glShadeModel (GL_SMOOTH); } void display(void) { int … | |
My program is compiling fine but my issue is with the output. The grades are not correct and the counters are not working either. If anyone can help that would be great. [CODE]//stud.cxx #include "stud.h" studType::studType(int idVal, float exam1Val, float exam2Val, float exam3Val) //********************************************* { id = idVal; exam1 = … | |
This is a question from some book. When u run it u would get base address of the arguments provided that is, if u write in CMD "myprog one two three" then the address would be like 65521 n 65525 n 65529 Means equal byte consumption by all the arguments. … | |
Hey, So I am a very experienced PHP programmer and completely new to python, I was wondering if someone could assist me with this program I am trying to make, The idea is simple The program has 10 different fortune quotes, the user needs to be able to tell the … | |
Hi Pal, I have issues with inserting date into my database. Though i declare the datatype as datetime in my SQL server database I will sincerely appreciate someones assistance in helping me fix the error. the error message is " [B]Conversion failed when converting datetime from character string[/B] " here … | |
I am trying to delete the array element that matches with the user input. So I am trying to shift all the cells after the deleted one to the left 1 spot. I know it's still in the loop of the if statement(line 11 and 31) but I can't figure … | |
Hi.... I am a beginner of Android programming.I am now writing the Android applications with Eclipse IDE.But I have a problem that is where the error list is shown in Eclipse when the errors or exceptions occur in my programs. For Example, when we write J2ME programs, we can see … | |
I need some help my code repeats the add new employee and is not asking for index. What I was supposed to do. Write a function name hireOne whose parameters are the array of structs, and the size of the list; the function should prompt the user to input a … | |
I have code for a browse button and I wanted to know how to write the code to output a sucess message if it saves correctly. Also how to output the file path to a textbox... here is the code I have so far... [CODE] protected void Browse_Click(object sender, EventArgs … | |
Hello Everybody !!! I have a problem about TreeView and ListView. I have a form to manage student. When I add, the data appear on ListView and TreeView at the same time and the same data. Everything works perfectly. But one proble about Delete button. I choose the line from … | |
So I'm trying to create a program that will take values from one array and multiply them with the values in the second array and then allocate the answer into a third array, then returning that array as a result [code]import java.util.Arrays; public class ArrayCreator { public static void main( … | |
![]() | The message is not showing. Please help me. Thanks [CODE]<?php /* logout.php */ require('obj.php'); session_destroy(); $_SESSION['msg']='You have successfully logged out. Thank you for the visit.'; header('Location: '.$kPathUrl->adminUrl.'/login.php'); exit; ?>[/CODE] |
Just start a new Windows Forms Application and change the Form1 constructor to this code(which was copied from MSDN) [CODE=csharp] public Form1() { InitializeComponent(); // Create the calendar. MonthCalendar monthCalendar2 = new System.Windows.Forms.MonthCalendar(); // Set the calendar location. monthCalendar2.Location = new System.Drawing.Point(50, 50); // Change the color. monthCalendar2.BackColor = System.Drawing.SystemColors.Info; … | |
Card shuffling and dealing create a program to shuffle and deal a deck of cards,the program should consist of a clas card a class deck of cards and a driver program To deal a card, the driver just prints it out. The dealCard function does not print anything. this is … | |
Good day all, I'm trying to create a template class just for learning purposes. And i keep coming up with two errors... Here's the script: HEADER FILE "lottoclass.h" [CODE] #ifndef LOTTOCLASS_H_INCLUDED #define LOTTOCLASS_H_INCLUDED using namespace std; template<typename T> class Lottery { public: Lottery(); ~Lottery(); T Resize(T* array, int i); void … | |
Hello everyone, I have a question about the getline() function. I want to read from a text file and add each sentence to a string array, separating them by the full-stop. The getline() function format for input from a text file is different from the one that takes keyboard input. … | |
What does xrange do in python?? And how do I implement a similar function in Python3?? | |
Hi , I am trying to save the output of "help('tkinter')" in a text file. But i get error. I want to know if there is a Way to get the output of help file redirected to a file , or save in a variable. By the way , the … | |
i am getting output as XYZ... ABC... This is \t\t\033[40m\033[32mUP\033[0m instead of XYZ... ABC... This is UP i am trying to diplay "UP" in green colour. below is the code: #!/bin/bash var=` /export/home/GT/AM/bin/xacct test -i | grep OK | wc -l` if [[ var -eq 2 ]]; then echo "This … | |
How come unittest.TestCase doesn't exist for me? [CODE] Traceback (most recent call last): File "D:\My Projects\TAGEngine\TAGEngine\trunk\unittest.py", line 1, in <module> import unittest File "D:\My Projects\TAGEngine\TAGEngine\trunk\unittest.py", line 4, in <module> class CheckStructureAcceptance(unittest.TestCase): AttributeError: 'module' object has no attribute 'TestCase' [/CODE] | |
Hey guys, I've looked around the forum and seen a few answers that looked like it should have solved the problem - but didn't. I'm trying to create a function that will check the database and compare it with the value of my label. (Basically a Version Checker) If it … | |
Hi ya, Iam using firebird v 2.5 database with vb.net .i just want a help regarding how to create a new user in fb database programmatic ally in vb.net . thank you. | |
Hello guys, just wondering why my program crashes when I try to delete a struct from my array. I'm trying to code so that the user searches for a student via a student ID, then opt to delete the searched student's record. I thought I got it right and the … |
The End.