199,114 Archived Topics
Remove Filter ![]() | |
Beginner here (meaning I probably did something silly): I am trying to target indexed elements that have [A], in them. Entries for 'scarcity' and 'sweet' are both shown. I am running into trouble when index item[2] is empty. I get the following message: [code=text]['scarcity', 'scarce', '[A],', 'ity', '[N|A]', '[N]'] scarcity … | |
[CODE]void Load() { book *newptr,*p,*q; char id [12]; string title; string author; int year; float price; ifstream file1; head = NULL; file1.open("books.txt"); if (file1.fail()) { cout << "Error opening file.\n"; exit(1); } while (!file1.eof()) { newptr = new book; // file1.getline(id,12); getline(file1,title); getline(file1,author); getline(file1,year); file1.getline(price); //copy values from the file … | |
I have created this code, but now I need the create new prgram that repeats the same steps three times, using loop. Clear the screen after each loop iteration. ??? [CODE] integer_count = 3 .data promptuser byte "Enter a two integers: ", 0 sumOf byte "The sum of the integers … | |
Hey all, I am trying to figure out how to enable images to be saved as an image file when i display them in php. Right now when i right click on the image, it says save image as.. but then it wont save it as anything other than the … | |
Hello all. I'm trying to figure out the javascript so that when I hit the total up order button, it will fill in the subtotal, PST, GST and give me my total in the box above the total up order button. Can some help me out? Thanks in advance. [CODE]<!DOCTYPE … | |
Hi people, need some help in closing the window after program execution has completed. I am running Turbo c++ 4.5 for windows under Win7 32. Thanks. Heres the sample code: //Read and display test customer file #include <stdio.h> #include <conio.h> #include <iostream.h> struct customer { char c_name[50]; int i_age; }; … | |
Hi, I need to extract some info from a file. This is two rows from what the file looks like: prob=0.0093;ID=RGT430;BQRS=491;BRZ=-4.263;ID2=RT914;DRT=0.00;HRun=0;HaplotypeScore=0.2794; prob=0.003;ID=RGR301;BQRS=4;BRZ=-3.261;ID2=EV913;DRT=0.00;HRun=0;HaplotypeScore=0.2654; ....etcetc until last row: prob=0.345. I want to extract prob from each row in the file and put it in a new file, but I don't know how … | |
Hello everybody, While reading C++, I have been looking into iostream header file to understand a bit more about header file organization. I am not able to understand much of the code in there. For example the header starts with #ifndef _GLIBCXX_IOSTREAM. Does this check whether _GLIBCXX_IOSTREAM has been defined … | |
hello everybody !!!!!!!!!! I have a code which i coded but in that their is an error to lock the screen in the form1 i have written [CODE] msgbox("we are about to lock your screen!!!") me.visible=false lockscreen.visible=true lockscreen.killprocess.enabled=true 'the code i had written in the timer is public sub killprocess(byval … | |
Hi Guys, I want to use the Autonumber function in my table in a specific format. The format is SP10000. And I want Access to automatically number each entry by one with each new entry eg. SP10001...SP10002...SP10003. Please let me know how I can do this as when I use … | |
Hey Guys, i'm new to the forum and I would appreciate any help. I'm writing a program where the user needs to choose 5 numbers from 56. At the same time I'm using loop screen out numbers outside of this range. As a result only the 1st number out of … | |
; multi-segment executable file template. data segment string db "THis is LuxUR in Summer." ends stack segment dw 128 dup(0) ends code segment start: ; set segment registers: mov ax, data mov ds, ax mov es, ax mov bx, offset string mov al, 0 ; lower letters in word mov … | |
How shall I write the code so i get surname first and forenamn last Set rs = db.OpenRecordset("SELECT * FROM tblData WHERE Surename & Forename LIKE '"& "'" & "& '*'") i don't know if this is right | |
Hi I am having trouble trying to connect to a local MySql db using the MySQL Connector/C++. I was able to successfully compile the bellow code but when I run it results in a Segmentation fault. I am trying to run this on a Windows XP machine using the g++ … | |
can anybody help me making this program? i've based my game from this site. [url]http://www.education.com/activity/article/Tick_tack_toe_Added/[/url] hope that someone can help me.. i've been stuck coding that for almost 6hrs but still no progress. thank you! | |
I have a CSV that i can parse no problem at 10am.. But by 5pm it does grow to over 100,000 lines that cuases the script to hang. I have to parse the CSV into an array that i can then shape. If anyone has any idea how i can … | |
I've got a university assignment and just need to know how to remove an entry from the address book and use it as a method Here's what I have so far, everything's fine apart from the removing, please make it quite simple [CODE]using System; using System.Collections.Generic; using System.Linq; using System.Text; … | |
ok so i need to ask the user for a file to use for the input, then i need to read the input a line at a time, because i am trying to take postfix expressions from the file and evaluate them then return the result in the user's choice … ![]() | |
I'm trying to make a binary calculator and I just can't find what's going wrong: [CODE]#include <stdio.h> void dec2bin(long decimal, char *binary); void dec2bin1(long decimal2, char *binary2); int binaryAddition(int,int); int main(void){ long int binarym1,binarym2,multiply=0; int digit,factor=1; long decimal; long decimal2; char binary[80]; char binary2[80]; printf("\n\n Please enter the first value … | |
Hi i need to read the last 14 Entries made into a typed file and then list the entries in a StringGrid so i can copy them to label captions later. I am a little unsure how to write the Code to loop for the last 14 Entries. the current … | |
Input a time specified as the hour(1-12), minute (0-59), and the meridian (A or P for A.M or P.M); then output that time in the form HH:MM A.M/P.M. Then enter a nonnegative number of minutes and output the time that is that number of minutes later than the original time. … | |
I have this function that seems not to be working. If I click on the send order button and the first name field is not filled, it should say first name not entered. But it's not. I put comment in the javascript where I'm tring to fix. Thanks in advance. … | |
Hello, I'm wanting to have multiple .cpp files in one project. I have three files: "Main.cpp" "Secondary.cpp" "Main.h" This is the content of Main.cpp: [CODE]#include "Main.h" #include <iostream> void Engine(); int main() { b = 10; a = 5; std::cout << a << b; Engine(); } [/CODE] This is the … | |
Hi, Am finding 1 diffculty in jtable pls help me... i want to set jtextfield value in jtable of particular column and also that jtextfield value will be dynamically changing... even i have tried the below code... [code]String mn=jTextField2.getText(); jTable3.getColumnModel().getColumn(1).setCellEditor(new DefaultCellEditor(mn));[/code] but its not working... | |
hi, my problem is that : let i m declaring a package P1 and i have defined one class as public in it.now i know that i can use it anywhere. but let if i want to make a second class as public then it can not be possible.but if … | |
Have you ever cited the Python documentation? How did you do it? I can't seem to find author names and such information. I've only ever cited books as well. I'm trying to find out who authored the 2.7.2 docs, and how to cite them properly, since I used it to … | |
Here is a technique I use for sending an email using GMail. Notice: You might need to change your email settings under [B]Forwarding and POP/IMAP[/B] inside your GMail settings (to Enable POP). Here is a test program for using the class library (shown in the snippet box): [CODE] using System; … | |
I'm getting an undeclared error in my main program at line 45. Can anyone find out what is causing it? Main [CODE]#include <iostream> #include <string> #include <fstream> #include <cstdlib> #include <vector> #include "playlist.h" using namespace std; int main (int argc, char*argv[]) { ifstream fin; int lineCounter = 1; string parsedLine[NUM_OF_FIELDS]; … | |
this is my code in which i am getting $_POST['name'] from a html form.i am using mysql_real_escape_string function that should escape characters like these [ICODE]\x00 \n \r \ ' " \x1a[/ICODE] but when i enter these special characters in the form .it is going in the database. it should be … | |
Hi, I cannot seem to figure out how to search through a created/filled dataset for a certain value which exists in column(1), returning Column(0)'s value into a textbox. My code looks like this: Dim connStringdg44 As String = "server=(local);database=Cricket;trusted_connection=yes" Dim conndg44 As New SqlConnection(connStringdg44) Dim strSQLdg44 As String = "select … | |
Hi Guys, Need help... I am developing an windows application in that one form is to send sms by connecting mobile (GSM). but no idea how to do this. Any help would be greatly appreciated. | |
Hello everyone, i'm been practice C++ for a while just a new hobby in technology. i start with mathematics with numbers and some cout, cin function in other program like excel i can enter series of number and after that we can: 1. Sum them up 2. Divide them, multiple, … ![]() | |
Hi all, I have created a custom datagridview cell type (which allows the user to either enter text or add an image). This is working as I had planned, with one exception... This new cell type, which is set as the CellTemplate, has a button to the right of the … | |
I'm trying to figure out how to do this program. A program is required to print and read a series of exam scores for students enrolled in a math class. The class average is to be computed and printed at the end of the report. Score can range form 0 … ![]() | |
Hello, i want to create something like this (watch after 30 sec, - character creation) [url]http://www.youtube.com/watch?v=8u9hmTMP3as[/url] is that possible in C#? can i use 3D Models in C#? | |
this is a part of my code and i m getting this error somewhere in this part[ICODE] Parse error: syntax error, unexpected T_ECHO[/ICODE] [CODE] $data = mysql_query("SELECT * FROM $title") or die(mysql_error()); while($info = mysql_fetch_array( $data )) { ?> <div id="username"><? php echo $info['name'] ?></div> <div id="statement"> <? php echo … | |
Hi, i need to load all buttons(200) text in my vb.net windows form at run time from my database table column. for single button its like button1.text = database value but i want For i = 1 to 200 button(i).text = database value Next i i tried this but its … | |
i want to give a filename in commandline itself and want to check whether it is a directory are not.shall i use this command if [ -f $filename ] | |
I have two product brand. For example:- Product A - Nestle Brand (Table A) Product B - Cadbury Brand (Table B) I have an order table with the attributes: -id -orderNo -foreign key reference to table A -foreign key reference to table B -quantity -createdDate The data base on the … | |
Hi there, It's been a long time since I've used delimiters in the Scanner class in Java. If I wanted to have any numbers between an expression, such as xx/xx/xxxx or an infinite amount of numbers between them with just the forward slashes as delimiters, what would the syntax be? … | |
Hi all. Im new to JS and would like to note the following case: Ive run the following test numerous times ie: [CODE]<html> <body> <script type="text/javascript"> var s = 0, o = 0; for (a=0;a<=10;a++) { var start = new Date().getTime(); var res = 0; for (b=0;b<=100000000;b++) { res = … | |
Hello everyone, I am working in the latest version of MinGW (downloaded 12/12/2011). I am attempting to compile a .rc file using Windres.exe. I use the command: windres -O coff about1.rc -o about1.res. Windres generates perhaps 100 or more warning messages saying "null characters ignored", and then it terminates with … ![]() | |
Hi, I have a combobox and a datagridview bound to a table in my database.The combobox shows the "ID"s and i want to display a complete row in the gridview based on a selected id in the combobox. | |
Guys, I'm actually almost done. Basically what I have to do is to read from file with a list of words, sort them alphabetically and write them into another file. I am almost done, but the only thing is, the assignment says that we shouldn't change the case of words, … ![]() | |
[B]I have a question, pls help, thanks very much.[/B] Try to write a C program which can analyze the input of the user in the following aspect. 1. vowels 2. consonants 3 digits 4 white spaces 5 others You must use the logic of pointer to do this analysis in … ![]() | |
Guys I don't know the output of the following loop please help me out [CODE]for ( int = 10; i > 0; i--) { system.out.println ( i*2); } [/CODE] and one more: [CODE]while( a < 20 ) { a += 3; System.out.println( a ); }[/CODE] Thanks! | |
So I am at the fork in the road. Do I use a ready made script like Drupal or WordPress, or build my own system. I have a client in need of a website to store object information (we will call it an object). All the conceivable specifications and then … | |
I got a snippet off the web of how to download a file from online in c++ console with the curl library. so I installed curl, and copied the code snippet, but it doesnt work. Can someone show me whats wrong? [code]#include <curl/curl.h> #include <cstdio> // link with libcurl. eg. … | |
Could someone please tell me why is my JScrollPane not aligning together with my JLabel of description? I want my label "Description:" to be right next to my JScrollPane which contains a JEditorPane. [CODE]import java.awt.FlowLayout; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.SplashScreen; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import … | |
Iam using data set and create table adapter then create select some data to be used in my aplication. In my app, i create data table to gain data from table adapter, but i don't know how to get some specific data, ex : item in column "a". Could you … |
The End.