199,114 Archived Topics
Remove Filter ![]() | |
Hey guys! I have limited experience with Visual Studio and have a question about Querying an Access database. I have created a Visual Studio application that displays and modifies an access database. I have use datagridview and detailed view to insert data and view data in the Access database. I … | |
[CODE]int numdigits(int num){ int len = 0; while(num >= 10){ num = num/10; len++; } return len; } [/CODE] This algorithm is used to count the number of digits but I can't understand it. Someone explain it to me please :D Thanks ![]() | |
I am working on the tic tac toe problem and i need help with the AI part i got it to work for 1v1 but it needs to be 1vAI I was thinking that easiest was to to program something like "when player clicks this squaure, AI will click anything" … | |
For a program I'm writing, I'm trying to get rid of doubles in my string (which is a concatenation of a keyword and the alphabet). My code was compiling fine until I added the code about concatenating the substrings before and after the character I'm trying to get rid of. … | |
hi guys, sorry to disturb but I'm looking for the instructor's manual to 'C by a modern approach' written by KN king. | |
I have an assignment where I have to write a program to prompt the user for a file name and location (it is a text file), once the user has entered that, a menu pops up and gives the user 4 options and asks which one they would like to … | |
is there a warior i can do the following: lets say i have [CODE]string userChoice;[/CODE] assume i have a Warrior class with move function in it is it possible to define : [CODE]#define WARRIOR "Warrior"[/CODE] and than use [CODE]userChoice=WARRIOR;[/CODE] and call the function [CODE]userChoice.move()[/CODE]? [CODE]void play(char gameWorld[][BOARD_SIZE]) { Warrior War(1,1); … | |
Hello everyone I am trying to code an address book in C#, the program should be a console application and should stores names address etc in a string. The menu should loop and continue wish I have done using a do loop, at the moment I am stuck on the … | |
Hey Guys I am writing a application in PHP. One feature is that the admin can create a question for a test in the application. I want to use the users input to create an xml file and save the xml file in mysql database for later use. This is … | |
Hi Guys, I am making a board game, where there is a 3x3 grid and the user enters a row and column and it should put an x in that spot on the grid and ask for the user for another location, until they enter 0 to quit. Here is … | |
Good Morning All, I am doing a membership site for a client and would like to use SSl, but know absolutely nothing about it... My primary concern is whether there are any specific programming differences required in my scripts to accommodate the https as opposed to http? I use about … | |
Can you guys run this program, I'm having issues running it. [ICODE]import java.io.*; import java.util.*; //class definition public class NumberAdder { //The main function public static void main(String args[]) { //This declares a file to open. File outFile = new File("numbers.dat"); int sumEven = 0; int sumOdd = 0; //File … | |
Hi everyone :) Title says it all... I'm trying to bind events to a wx.GenericDirCtrl. I've visited more than 20 web sites but i haven't found how to do it. I've tried different manners but it doesn't work as i expect it to. In some case my control is seen … | |
So here I am, having a difficult time figuring out what's the problem, first of here's the code: [COLOR="red"]Preke.H[/COLOR] [CODE]#include <string> #include <sstream> #include <iomanip> using namespace std; class Preke { private: string pav; // prekÄ—s pavadinimas int atdata; // atvežimo į parduotuvÄ™ data int pardata; // pardavimo data int … | |
I am confused about composition in java. I am able to write code using inheritance...but have no idea how to turn it into composition...from what my textbook said the two are quite similar has a is a relationship and all. I ultimately would like to write the cylinder code using … | |
Hi guys, I am implementing a singly linked list. The thing is whenever my str_temp goes above 12-15 elements, i get this error malloc: *** error for object 0x1099008b8: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug … | |
Hi guys, I have been given a task in my C++ course to develop an application that will ask the names of the students and store the entered values into a string type array. Considering each student has participated in four exams, the program should ask the points received and … | |
![]() | Hello people, I created an innter class like this [CODE] public class OuterClass{ int attribute=0; class InnerClass { public void method1(){ attribute++; } public void method2(){ System.out.println(attribute); } }[/CODE] My problem is when I call method2() in a correct way, it displays 0 and not 1 as I wanted. Can … |
Can Anyone advise me on the problem with the namespace in this code im getting an error. [CODE]//Main. #include "Weapon.h" #include "Room.h" #include <iostream> #include <fstream> using namespace std; int main() { ifstream myfile; string line; myfile.open("BronzeSword.txt"); if (myfile.is_open()) { while ( myfile.good() ) { getline (myfile,line); cout << line … | |
How would I hide keystokes when I use the keyboard? When you use scanf fgets and gets, they show they print the keys to the screen.. I want to hide them. | |
i used to create sub procedures in vb6 under tools/ add procedure. Same is not available in vb2008. how can i create sub procedure in form. for eg. Private Sub CmdDisabl() Cmd_New.Enabled = False Cmd_Amend.Enabled = False End sub if i type above code in form i get error statement … | |
Hi i am new to php/ajax. I have a drop down list.if i select 1st option,it displays one upload file option. if select 2nd option,it display 3 upload box if select 3 option ,it dispaly 6 upload box. I did this using ajax & displaying it in a div. What … | |
product_preview.php [CODE] // EDIT / DELETE MODE $kategori = isset($_POST['kategori']) ? $_POST['kategori'] : ''; if(!empty($_POST['id']) && !empty($_POST['mode'])){ if(!$_POST['mode'] == 'edit'){ $output = mysql_query("SELECT * FROM kategori WHERE id=".$_POST['id']) or die(mysql_error()); $data = mysql_fetch_array($output); $kategori = $data['nama_kategori']; echo $kategori; } elseif(!$_POST['mode'] == 'delete'){ $output = mysql_query("DELETE * FROM produk WHERE id=".$_POST['id']) … | |
How do I name the dll's according to my wish when I publish the website. It just names the dll's into some gibberish name. it creates so many dll's and in the properties of the project there is no dll naming column for websites. is it only for web applications … | |
Hello Everyone, I'm quiet new to PHP, and I'm making a news portal practicing the language. I have an index page where the news are posted in an order-> [url]www.fundis.hu/index.php[/url] I have a results page, where is a search engine -> [url]www.fundis.hu/results.php[/url] In the index page I used dynamic links … | |
Hey i was wondering if someone could have a look at this and help me figure out why the output is repeating it's self and how I would fix it. I have spent several hours trying to fix this. Thanks in advance. [CODE]/* Author : * Date :02/10/10 * Title: … | |
Your task is to write a program that checks html files, (web pages) to determine whether the embedded XHTML tags are balanced. Balanced tags are necessary for the file to be a valid XHTML file as explained above. The first phase takes care of reading the file and finding all … | |
Hi guys i'm trying to just do a simple email/password validation on two text boxes. This code runs but when i type in a correct email address it throws an error "Object reference not set to an instance of an object." on [CODE]AdAcc.InsertCommand.Connection = OleAcc;[/CODE] I'm thinking i may need … | |
Hi, first of all: the answer to my question is NOT atof()! I have a char-array that may contain something like "1.2345". I want to convert the contained values to float/doubles but unfortunately atof() depends on the current locale. So whenever a user executes the application on a system where … | |
Hello, I'm trying to read in words from a text file that look like: The World Fell Over etc.. But it doesn't seem to be working.. I've written some code however it will only show the first word OR loads of question marks.. [code] string dictionary() { string words[500]; ifstream … | |
Hi I want to remove the first <LI> item and last three <LI> item from <UL> list. How to write code in JQuery. I need the below list [CODE] <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> <li>5</li> <li>6</li> <li>7</li> </ul> [/CODE] as below result [CODE] <ul> <li>1</li> <li>5</li> <li>6</li> <li>7</li> </ul> [/CODE] … ![]() | |
Hi All, I am trying to understand shift operator which is used in my project. What I came to know from google is that Bit shifting allows for compact storage of similar data as a single integral value. But how does that work. and what is the advantage. Can you … | |
So my code will compile and I do get output but it does not look the way its suppose to. I'm also not certain I am doing the virtual functions properly Expected Output Telephone Number : NPA-NXX-Line Customer: CustomerName Number of Working Lines: NumWorkingTNs Current Output derived class WorkTelephoneNumber constructor … | |
[code] struct S { double operator()(char, int&); }; int main() { boost::result_of<S(char, int&)>::type f = 3.14; // f has type double } [/code] OS : win7 compiler :gcc mingw4.6.2 error message : error: no class template named 'result' in 'struct S'| error: expected ';' before 'f'| error: 'type' is not … | |
[CODE] private int [] minValues; private int count = 0; String[] tempString ; tempString = line.split("-"); System.out.println(tempString[0]); [/CODE] but when i try to add the store into array's code, [CODE] private int [] minValues; String[] tempString ; tempString = line.split("-"); minValues[count] = tempString[0]; <-- it say incompatible types System.out.println(tempString[0]); count++; … | |
I need to create a simple http client to a web server and my code is the following: [CODE]#include <stdio.h> #include <string.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <errno.h> #include <arpa/inet.h> struct sockaddr_in wserver, cl; struct hostent *rem; int fd, newfd, len, l; int main(int argc, char … | |
I store date in product_edit.php form, here is part of the script: product_edit.php [CODE] if (isset($_POST['save'])){ $tgl_masuk = date("y-m-j"); if (empty($_POST['id'])){ $result = mysql_query("INSERT INTO produk(nama_produk, harga, deskripsi, tgl_masuk, gambar) VALUES('".$nama."','".$harga."','".$deskripsi."','".$tgl_masuk."','".$gambar."')"); } else{ $result = mysql_query("UPDATE produk SET nama_produk='".$nama_produk."', harga='".$harga."', deskripsi='".$deskripsi."', gambar='".$gambar."' WHERE id=".$_POST['id']); $result = mysql_query($sqlstr) or die(mysql_error()); //Jika … | |
Hi friends i am having n number check box, if i checked one check box it has to select all the similar values of the check box and the other check box should be disable. can any one help me to solve the issue i am having a java script … | |
Hi there. I'm having some problem in aligning my captcha image on a form. Here's the SS: [URL="http://imageshack.us/photo/my-images/33/captchab.jpg"]http://imageshack.us/photo/my-images/33/captchab.jpg[/URL] And here's my login code: [CODE] <html> <title>Log In</title> <style> .singleBorder{ border:1px #d6d6d6 solid; background-color:#f6f6f6; } .singleBorder td{ font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; font-weight:bold; color:#333333; } .singleBorder input,select{ border:1px #aaaacc solid; font-family:tahoma; … | |
I would like to write a program which asks the user for a number and prints off the tree, For example 7. Program prints something like that then. If user put 3 tree will start from 3. I think you should get the idea. [CODE] "Enter a number: 7" 1 … | |
I'm working on a project and want to open the window to the position the same as last time the window was closed, and open the window the same size as last time was closed also. The rough script is as below: When user open the window and resize it, … | |
hi i have a query which should work however it returns nothing. i have at least 2 entries where completed = No and the date of the task is today. the code is: [CODE]SELECT count(TaskID) AS DueToday, DATE_FORMAT(`TaskDueDate`,'%d.%m.%Y') AS XLABEL FROM tasks WHERE 'XLABEL' = CURDATE( ) AND Completed = … | |
please anybody tell me the difference between javascript and jsp. | |
Hi, I am getting this error at runtime: object reference not set to an instance of object my question is that am i using stringbuilder array correctly here. Because I am new in C#. and i think its the problem with my stringbuilder array. Below is the code: [CODE]using System; … | |
Here my code [CODE] public static String modele; public static String supplier; public static int height = 180; public static final String[] COLORS = { "RED", "BLUE", "GOLD", "ORANGE", "PURPLE", "PINK", "NONE" }; public static String description; public static boolean withSnow = false; public static boolean sale = false; public … | |
Eclipse-JavaScript IDE has embedded all JavaScript Libraries like jQuery, MooTools, etc so applies code completion, to what ever is implemented, along with plain JavaScript? ![]() | |
I need some assistance in my program: I suppose to select an array size: array_size = 20 array dword array_size dup(?) And, create a new procedure that prompts the user for the number of integers to be processed, and pass the same value to the promptForIntegers procedure. How many integers … | |
Ok, first let me explain what I try to do. I have a menu with some items containing a submenu. The submenu's should open when a parent is clicked and contains submenu's, and when traveling to another page (from the item clicked, for example a parent of submenu item), the … | |
Hey im a real noob at c++ and im trying to understand creating rooms setting a default and using a .txt file for room details. but i dont understand it. Im looking at some code from my lecturer and i dont understand were the wiz0-2.save comes from can some tell … |
The End.