64,152 Solved Topics
Remove Filter ![]() | |
so i need some help, have random int that decide which values in my Boolean array are true. All th [CODE] System.out.println ("pick a number 1-9"); int guess; for ( int i = 0; i < 9; ++i ){ guess = console.nextInt(); if (x[i] = true) { System.out.println("CORRECT!!"); }else if … | |
Hi, I have a problem here. I have a project running on localhost. Whenever I made some changes on a .aspx file, the changes can be seen immediately when I access my localhost. But when I made changes in aspx.vb file, the localhost still showing old info. * I have … | |
As a prerequisite, here is the code for my two classes, Station and SubwaySystem: [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Assignment7 { class Station { //attributes private string stName; private int stID; private Station next; private Station previous; //properties public string StName { get { return this.stName; … | |
Hi, I keep getting the error Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx) when i try to make a guid. [CODE] string entryNum = Convert.toString(entryNo); Guid key = new Guid(entryNum); [/CODE] | |
I want to get only y and n from user to enter when user try to enter another it get the input again until user enter "y" or "n" i use this logic but its not working [CODE] do { cout<<"\n\n Enter Number: "; number=getche(); cout<<"\n Want to enter another:(y/n)"; … | |
Let's say I have form1 and form2. Form1 and Form2 are open. You click a button on Form2 and it adds 1 to a variable called myNumber on Form1. Now the problem is I can't use the new keyword and create a new instance of Form1, because Form1 declares myNumber … | |
Dear Dudes! =) If anybody has a complete list of php methods separate in a file, please share it with me! I really need a txt file containing all of the PHP methods. It goes for my diploma work also... =) Ex: [CODE] for(){} //new line if(){} //new line switch(){} … | |
I have figured out how to populate the comboboxes for an app I'm making from a database this is not the actual code but is basically the way I'm populating them [code] for i = 0 to maxrows - 1 cbobox.items.add(dataset.tables("datatablename").Rows(i).Item(x)) next i [/code] I need either to be able … | |
I am having trouble adding the ability to order an integer array in both ascending and descending order. I have implemented the functions myself and am having trouble figuring out how to order them in reverse order. I am passing in a boolean variable to test which direction the array … | |
I had my code working properly, but once I added my last array, it goes through the compile and then errors out....and I'm not quite sure why.... [code] #include <iostream> #include <fstream> #include <cstdlib> #include <cmath> using namespace std; int main() { double num[100], sum, count, newnum[100]; int j,i; ifstream … | |
Hi all im after a piece of code that allows the user to enter a fraction e.g 1/4 and have the code split that fraction into 2 seperate variables, e.g variable 1 containing the '1' variable 2 cantaining the '4' How would i achive this? My objective is to make … | |
I am trying to read a file into an array and set the min and max values. At this point in my program, I am trying to just read it into an array and then display that array. I still have more to do in the program, but I am … | |
Ok so this is my code below in my member function definition .cpp file. The problem is when I execute the program it will not let me fill the answer for the first question so for example the output is: Please enter the name of the receiver: Please enter the … | |
hi i have got a simple table in my database like this: [B]from[/B]|[B]to[/B] bangalore | delhi chennai | mumbai i am using two drop down list to display this data. here is my code: [CODE]<select name="From"> <?php while($row = mysql_fetch_row($result)) { ?> <option value="<?php echo $row[0];?>"><?php echo $row[0];?></option> <?php }?> … ![]() | |
[code=java] import java.io.*; import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.text.*; import java.util.*; public class Transfer extends JFrame implements ActionListener { //Declare output stream DataOutputStream output; //Construct a panel for the fields and buttons JPanel fieldPanel = new JPanel(); JPanel buttonPanel = new JPanel(); //Construct labels and text boxes JLabel … | |
So for example, I have an array like that: [CODE=C#]char[] pattern = "GCAGAGAG".ToCharArray();[/CODE] And what I would like to do is to extract out distinct values and its corresponding indexes(smallest one) from right to left where first letters does not count. example: reversed array: [COLOR="Green"]GAGAGACG[/COLOR] Distinct values are: [COLOR="Red"]A, C, … | |
hello! i've just tried out lists in c++, but they're giving me some kind of problem. it has something to do with iterators but i'm pretty sure i'm using them the right way. anyway, here is the code: [CODE] #include <list> #include <iostream> int main(int argc, char* argv[]) { std::list<int* … | |
[CODE] HKEY hkey; DWORD nSubKeys = 0; TCHAR name[MAX_PATH]; DWORD size = sizeof(name); FILETIME filetime; if(RegOpenKeyEx(HKEY_CURRENT_USER , "Software" , 0 , KEY_QUERY_VALUE , &hkey) == ERROR_SUCCESS) { if(RegQueryInfoKey(hkey , 0 , 0 , 0 , &nSubKeys , 0 , 0 , 0 , 0 , 0 , 0 , &filetime) … | |
Hello Python forums, I started working with Python recently and picked up a book. The book stated discussing using the ctypes module in python which is slick because it's exactly what I need to be learning. I started trying to test my knowledge by implementing a simple, singly linked list … | |
Hello all I hope someone could help me, i have a small application that I wrote for a friend, but I need it to start up every 24 hours or so. It basically like a reminder application but i need it to start up at a predefined time. I have … | |
I am trying to display the results of a query in the form of a table. this it the PHP that i am using below. The problem is that the headings of the table repeats. I really don't want that... I am also trying to get a border around the … | |
This method invocation txt.match(/\[.*\]/g) works exactly as intended - it returns an array of matches [anytext1],[anytext2],[anytext3] I don't need the brackets, so out of curiosity I tried this tweak txt.match(/\[.*(?=\])/g) which - somewhat to my surprise I must admit - does exactly what I was hoping it would do and … | |
Hi,All, I am try to develop a project where the back en database is MS access, front end is vb6 and connectivity establish by odbc. the database content multiple table. Frost table [COLOR="Green"]student[/COLOR] contain [COLOR="green"]roll, name[/COLOR] second table [COLOR="green"]marks[/COLOR] contain [COLOR="green"]roll, math, English[/COLOR] there is four text box namely txtRoll, … | |
Hello, I am trying to make a calculator that does multiplication, division, addition and subtraction. My problem is that when I have the two numbers that have decimals it goes wonky. Anyway, that program runs like this: 1. User enters equation 2. Unwanted characters get thrown out 3. If operation … | |
Hello world, I’m trying something very simple but can’t get the result. I have table from I’m selecting a value which exist, then I want to display the value on the other page, but can’t get the result. Here is the code. The first page is active.php where goes the … | |
hi, i have a website where i provicde a link. On clicking the link a controller action method is called to generate a zip file after creation of zip file is done, i show the link to download the zip file by replacing the link to create a zip with … | |
Hello, i want to know the best practice to 1. read an XML file and store it in SQL data base and 2. modify the data base whenever the XML file modified, i created a table on data base on SQL server with columns has the same names like XML … | |
How to use while loop to loop a set of radio button groups? I have several questions that retrieve from database and each question has five different ratings named 1, 2, 3, 4 and 5. I create radio button group for the rating and using while to loop them. I … | |
Anyone know what I'm doing wrong here? I'm trying to get this code to work so that if a directory exists.. the mkdir() function is bypassed (so i dont get an error) but it seems that no matter what I throw in my is_dir() function it always hops down to … | |
guyz, I want to know on how to convert small letter to capital letters. I want to convert every letter automatically once I press the keyboard. Hope you help me this guyz.. Im going to wait for your replies.. | |
I'm having trouble writing code to save binary trees that are created by my program. I'm trying to save the tree to a file by trying to use preOrder traversal and writing the data that way. But so far nothing gets written to the text file. I'm supposed to write … | |
I have two for loops that I would like to convert into while loops instead. This is the entire code of the program. This program simply asks a questions and determines whether the input is a yes or no based on the first character of the line. [CODE]#include <stdio.h> #include … | |
Can anyone help me - The screen never pauses or stays put (after the end while) for the last 3 lines of code to display and the line right above the end while -totalinterestpd is not being written to the outfile I'm stumped. [CODE]while (MonthlyPayment <= LoanAmt) { MonthlyInterest = … | |
Hey guys! I have a program I am writing that I have gotten stuck on. It compiles fine but when I run it I get several error messages. Illegal format Conversion Exception is one of the error messages. I am stuck and I don't see where the error is. Any … | |
trying to use the code from an online book to learn OpenGL. i'm using Dev-C++, because i can't find a good way to get GLUT into VS 2008 PRO without muckin about in C:\windows\system32 which i try to stay away from. (any suggestions appreciated) so this is the code: [CODE=C++] … | |
I am creating a program that password protects software. The way I plan to protect it is to check if the program is running, and if it is, open up a window asking for a password. If it is wrong, close the protected software. I have this piece of code … | |
I have a problem, if someone can help great!! Every time the form is submitted to delete the stabletitle it says successful even when the title entered is not in the database, if its not in the database it should say unsucessful, can someone see what is wrong with my … ![]() | |
i want to delete a element from the array i use this logic but it is not working [CODE]#include<iostream.h> #include<conio.h> main() { int arr[5]; //10 element int array int key; // key to edit int length=5; //length of array clrscr(); for(int i=0; i<length ; i++) { cin>>arr[i]; } cout<<"Enter item … | |
Hello! I have more or less zero knowledge about coding in PHP. The most I've done is includes, to help me maintaining my sites more efficiently. I hope I will not offend anyone with this question. Anyhow, towards my issue. I have one table containing several fields, with information such … | |
From the java generics tutorial: "[CODE]List<String>[] lsa = new List<String>[10]; // not really allowed String s = lsa[1].get(0); // run-time error - ClassCastException[/CODE] If arrays of parameterized type were allowed, the example above would compile without any unchecked warnings, and yet fail at run-time." I have problem understanding why would … | |
Hi, I'm a newbie............ Sorry, if I violate any norms. Is it possible to copy any audio file or image file using C language? I think it is possible. If anyone knows it please guide me. If you know the code, that 'll be helpful. | |
Hello, I am having problems with some text string errors in my code. Any help would be appreciated. Here is a snippet of my code. [CODE]clear all value = input(['Please enter a positive real numerical ' ... 'measurement of volume:']); initial = input(['Please select a starting measurement unit' ... 'from … | |
Can Java read it's own source code? Possibly by using reflection.. or something. I would like to dynamically display the code to each method inside of my interface. Any idea how that could be acheived? Thank you. | |
Is it possible to limit a certain variable to only certain type? For example, i have a class named AccurateStr. How can I make sure that the variable "as" is an instance of AccurateStr? Similarly, how can I make sure a variable is a positive int, str etc without the … | |
Hi all, I am creating a checkbox dynamically on page load. [code] using (SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["SimplifyNew"].ToString())) { SqlCommand cmd = new SqlCommand("usp_selectModifiedResults", conn); cmd.CommandType = CommandType.StoredProcedure; conn.Open(); SqlDataReader reader1 = cmd.ExecuteReader(); while( reader1.Read()) { System.Web.UI.HtmlControls.HtmlGenericControl DivCheck = new System.Web.UI.HtmlControls.HtmlGenericControl("DIV"); DivCheck.Style.Add("float","left"); CheckBox cb = new CheckBox(); DivCheck.Controls.Add(cb); bradbandPanelTarget.Controls.Add(DivCheck); cb.ID … | |
Hi, in this code i am trying to call the function "issueTicket" from class "ticket", in the the function "reserveCabin" in another class called "cruise". Also, i think it is the same problem, i am trying to call function "calTicket" from class "booking", in the function "issueTicket" from class "ticket". … | |
Alright, I do little experience with programming with HTML/PHP The thing I need is an script that will log the visiting persons IP address AND his country of origin in any way; so the admin (me) can see it and confirm he/she has done whatever I want him to do. … | |
Hi im writing a program using arrays but im not sure what to do. I think i have the first three methods done correctly but i cant figure out how to do the rest. Im also supposed to write an application file but im not sure how to with arrays. … | |
Hello all, I normally lurk around and solve most of my issues by reading other threads. I have run into an issue and I am trying to figure out what I am missing. I am rather new at this so thanks for any advice. What I am attempting to due … | |
How would I, if it's even possible, create an array to read/store the input values from a input text file? Here is what I was thinking, but I want to pretend as if I don't know the amount of values in the file. Input File Has: 21.22, 13.23, 43.12, 123.54, … |
The End.