64,152 Solved Topics
Remove Filter ![]() | |
![]() | I'm trying to process a text file saved in the directory below where the PHP script is running. First, it lists all of the files in the directory, skipping over . and .. Finally, it attempts to get a file handle for each file one at a time and then … ![]() |
Hello, I was just looking up the threads and I must say I saw a lot of codes with "std::string", "std::cout", etc... I just wanna ask, wouldn't it be better if you just wrote "using namespace std" instead ? I am doing it all the time, but if it's wrong … | |
Hello all, I got involved with a Joomla CSS project, but I know very little about the properties of CSS. I have found out the hard way, that it works by it's own rules which may or may not necessarily be a subset of the HTML tag that I am … | |
I am using memcpy()function.. memcpy(&_bpb, bBootSector, 512); where _bpb is the variable of structure, bBootSector is byte array the whole progran works fine but at the exit it generates the following error: "[B]Run-Time Check Failure #2 - Stack around the variable '_bpb' was corrupted[/B]." Can any one please guide me … | |
Hi everybody, I want to declare a class having an object of another class as its member data. but I recevie compiler error: "No appropriate default constrctor available" my code samlpe is as follows: [code] class bigInt { bigInt(unsigned); bigInt(const bigInt &); unsigned *value } class RSA { RSA(unsigned); bigInt … | |
[code=php]<? //inbox.php $data = mysql_query("SELECT * FROM mailbox WHERE `index` <= $index_end and `index` > $index_start") or die(mysql_error()); $info = mysql_fetch_array( $data ); if($info['read'] == 0) { echo "<span class=\"tableStyle\">"; $tabColor = "tableStyleNew"; } else { $tabColor = "tableStyleOld"; } //print table start echo "<table class=\"$tabColor\" bordercolor=\"#FFFFFF\" border=\"1\" cellpadding=\"0\" cellspacing=\"1\" … | |
Hi I'm trying to use a vector to store function pointers, but when implemented in a class there method ceases to work. Class header: [CODE]std::vector<void (*)()> fns[/CODE] Class .cpp file: [CODE] fns.push_back(Search); fns.push_back(Print);[/CODE] Search() and Print() are (public) members of a class named Movie. This code is currently placed in … | |
![]() | hi my brother has created a program called 'guess my number' (see it here: [url]http://www.naughtyottselprograms.tk/[/url]) and i know the coding that i need but i dont know if there is a module that includes numbers does anyone know the name for that module if it exists? |
Hello Please help me with the following: i am trying to open a file with a specific application using java. I am working on a desktop application. The following code using java.awt.Desktop works for known extension types,but when trying to open a file with an unknown extension it throws an … | |
Hello again. I am currently using a base class for a certain type of object, which looks like this: [CODE=C++]#include <vector> template <class T> class CObject { public: inline virtual ~CObject () { } virtual std::vector<T> *Output (std::vector<int> *Input) = 0; };[/CODE] The problem, that arises from this contraption is, … | |
How do you check if a button was clicked in Visual Basic .NET ? | |
Is there way to tell if a radio button is checked by not using the value at all?? And by not using any javascript either.. Here is what Im using: [code] <input type="radio" name="item_id" value="1" /> <input type="radio" name="item_id" value="1" /> [/code] Now I need the name and value to … | |
Hello Got a problem which has had me scratching my head for an age now, and has defeated both my Computing Teacher & my ultra techie friend. The following code is working perfectly till the last cell of the table it produces: [code]set rs=conn.execute("SELECT Predictions.[Match ID], Users.Username, Predictions.Week, Predictions.HPred, Predictions.APred, … | |
Hi I have been trying to do one of the projects in the projects for beginners section that asks you to get your computer to log off after a certain amount of time has passed without any mouse or keyboard movement. I am not yet up to that bit, in … | |
can anyone there help me about my problem in displaying a record of names,gender,annual salary and age..the inputs are the first name,lastname,gender,birthday and monthly income...i just have a hard time implementing it coz i have to use a string to deal with the name..how will i make it???just a hint.... | |
[CODE=LANGUAGE]#include<iostream> using namespace std; class Nibble { private: union { int number : 4; }; public: Nibble(int=0); friend ostream& operator<<(ostream&,const Nibble&); friend istream& operator>>(istream&,Nibble&); }; inline Nibble::Nibble(int n) : number(n) { cout << "constructor.." << endl;} ostream& operator<<(ostream& nout,const Nibble& n) { return nout << n.number; } istream& operator>>(istream& nin,Nibble& … | |
Is there a way to save in a text based game through the MSDOS window? I want to be able to save the variables that store the mana, health, ect of a player. | |
Im just curious as to how one would approach adding up a column that is dynamically built from the database.. Each loop passes a price and I can't figure out how to collect each price to get the total price.. | |
I recently wrote a cpp file that I'm questioning. I'm unsure of whether the approach I took is correct or if it will cause damage to the heap. The goal of the project is to be able to do "clean-up" on dynamically allocated memory by storing the created object in … | |
Hello, I'm newer to programming and trying to do something that has me stumped. I need to read files from a directory on a server and compare those file names to a field in a database. When I find the file names that are the same, grab a different field … | |
Hi, I have a gizmo attached on serial port and need to detect changes of controls signals DSR, DTR etc. no data, just changes (edge). I do it with MSCOMM.ocx and it works, but only when is CPU on idle and windows messages are delivered on time. When is load … | |
I'm trying to create my own pattern (or something similar to a pattern I guess) where objects that are anonymously instantiated can still be referenced, but I'm getting weird memory results. It seems as if the free memory is decreasing when it should be increasing-- [code=java] import java.util.ArrayList; public class … | |
I have a table which counts messages sent to a particular department. the important structure is basically ID Department Message DateSent I want to be able to retrieve a resultset where that looks like this: Department MessageCount something like a SELECT COUNT(ID) Where Department=XXX but collect each individual department count … | |
All I need to know is how a good way to make sure integers between 1 and 52 wont be draw twice over in a for statement... I was thinking something like [code] srand (time(NULL)); int *drawn; //The card to be drawn int notdraw[52]; // All the cards that have … | |
When I enter Unicode data as values for TextCtrl, I get the following errors: [code] UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 5: charac ter maps to <undefined> [/code] I am trying enter Burmese text (U+1000 to U+10FF). | |
Hi guys, I tried rewriting my C-ish C++ function to true C++, but I'm failing so far: The first function (working) [code=cpp]const visualPart * entity::getVisualPart(unsigned int wantLOD){ for(unsigned int i = 0; i < visualEntity.size(); i++){ if(visualEntity[i]->LOD == wantLOD){ return visualEntity[i]; } } return NULL; }[/code] And the second (not … | |
Hello, A complete Python newbie needs help. :-) I have a simple script that updates the 'note' field in a MySQL database table based on the record's id: [CODE]id=raw_input("Record id: ") update=raw_input("Note: ") cursor.execute ("UPDATE notes SET note='"+update+"' WHERE id='"+id+"'""") print "\nRecord has been updated."[/CODE] The problem with this solution … | |
Alright ran into a bit of a problem on the item count in my index... let me give you the layout I'm working with. I've got my index page with the header logo and navigation bar. This is followed by an Iframe. When I click the navigation buttons it changes … | |
Hi guys, its me again.. I was wondering if anyone could tell me how to test a character if it is within the ASCII range, like say in the following pseudocode: [CODE] ifstream in; in.open("file.xxx", ios::binary); if(!in) { cerr << "file.xxx could not be opened. \n"; } while (!in.eof()) { … | |
My sports blog start page is very slow and I have tried to speed it up but everything I try stays the same. I know nothing about bandwidth or MYSQL or site mapping so I don't know if any of these would help. There is a lot of java script … | |
Hi; The below page validates the user. if the groupid of the user is null into the database,it forward the user to accessdenied.jsp page. The below code works fine without closing [B]rs[/B] If i had tried to close rs.close(); [B]it show the compile error: rs might not have been initialised[/B]. … | |
hi all; i have a code that would send in two person, after submmited the form, only one person recieve the email here is my code; [code=php] <?php $name = $_POST['name']; $sender = $_POST['e-mail']; $phone = $_POST['phone']; $subject = $_POST['subject']; $message = $_POST['message']; $email = $_POST['email']; $sendTo = $email; $return_to … | |
I am here making my video game wondering how to make an image appear when someone clicks in a certain area. If I need an image to pop up when some one clicks anywhere within a large rectangle of space how would I go about doing that? Thanks! | |
Hi I have a program i was writing to solidify my knowledge of files and how to handle them. I seem to have hit a snag though. What the program does is create files based on a user inputted date and allows them to add content to the files (kind … | |
Hi ppl, I've written a simple program with strings. this just recives the name and last name of a person, and then print it. i had a few problems with this: at first, it didnt let me define a variable as "string", it gave this error: [code=cplusplus] C2679: binary '>>': … | |
Hello people, Alright, my problem is something like this. I've declared a nested struct within a class template, and i want one of the member functions of the class to return an object of type struct. Somehow, i seem to be unable to do this defining the member function outside … | |
i just starter to learn jsp and i have few questions. 1) in my jsp project i have jsp page and java classes that defined as jsp beans. my jsp page contains submit button. is there a way to define that each time i press the button the program will … | |
Hello progers There is a big question in my mind I know that now PHP is popular but JSP is also known . . . so can you answer which language will be popular in future | |
Hi guys, I'm having a little problem setting a string value to another string.. I have the class: [CODE] class FILENAME { public: string GetFullPath() const; void SetFullPath(string& fname); private: string fullpath; }; [/CODE] The declaration for the SetFullPath Method is: [CODE] void FILENAME::SetFullPath(string& fname) { fullpath = fname; } … | |
Hi, I want to send authenticated mail in php. i know smtp and phpmail classes. Is there anyone to help me? I have followed scripts on net but, i couldn't send an email. Anyone with working solution? Thanks | |
Hi, I can't send authenticated email from phpmailer. Code and error are shown below. If SMTPAuth is false then mail goes only to my mail. Everyting under C:\wamp\www\phpMailer. I didn't do any changes in "class.phpmailer.php" file. Thanks Error: "Mailer Error: SMTP Error: Could not connect to SMTP host." Code: [code] … | |
![]() | hi again sorry i havent been only lately but i have this problem with some code for a digital phonebook. the code is this:[ICODE]p = float(raw_input("do you want to add a new person? (1 = yes, 0 = no)")) v = float(raw_input ("do you want to see the phonebook now? … ![]() |
I'm sorry for my ignorance, but I'm fairly new to PHP, so let me explain what I'm trying to do. I'm using a CSV file as my data source, which isn't a problem, I can read/write fine. I'm using this code to create a table from the CSV file: [code] … | |
I am trying to create a simple C program that uses HandBrake (video converter). The only way to run this program is to have one of the (in my opinion) crappy GUIs or to type out all of the arguments in the command line. My program is simpler than the … | |
i have searched the web for awhile on this... i wrote a script that will format certain words as the user types [INDENT](ex. when the user types MTrak the text is replaced with <b>MTrak</b>)[/INDENT] i need to know how to view the formatting in a text box, not the tags. … | |
I just started teaching myself c with a book called practical c programming, and i can't figure out one of the exercises. I'm supposed to write a function that scans a character array for the character - and replace it with _. I tried doing it, but i don't think … | |
I have to create database of student having different subjects and marks in respective subjects. Now many students will many subjects so there is many to many relationship. My database design: Table 1: Student table (PK)Stud_id, Stud_name Table 2: Subject table (FK)Stud_id, Sub_id, Sub_name, Marks. Table 3: Stud_Sub table Stud_id, … | |
Im making a password form and i need to make it so when the user clicks off the form, the form automaticlly comes back up again, ive searched for code snipetts alover the internet but carnt seem to find any code to do with that, any help? | |
Hi all, Where am I going wrong here? I'm getting a syntax error... [QUOTE]Database ERROR1: 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 '' at line 1[/QUOTE] [code=php] <?php require_once('Connections/connect.php'); # this is … | |
[code=python] data = re.sub(u"\u102F*\u102D", u"\u102D\\2\u102F", data) data = re.sub(u"\u1031*\u103B", u"\u103B\\2\u1031", data) data = re.sub(u"\u1001*\u102C", u"\u1001\\2\u102B", data) data = re.sub(u"\u1002*\u102C", u"\u1001\\2\u102B", data) data = re.sub(u"\u1004*\u102C", u"\u1001\\2\u102B", data) data = re.sub(u"\u1007*\u102C", u"\u1001\\2\u102B", data) data = re.sub(u"\u1012*\u102C", u"\u1001\\2\u102B", data) data = re.sub(u"\u1013*\u102C", u"\u1001\\2\u102B", data) data = re.sub(u"\u1014*\u102C", u"\u1001\\2\u102B", data) data = re.sub(u"\u1015*\u102C", u"\u1001\\2\u102B", … |
The End.