64,152 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for AutoC

I have a code snippet that strangely works one way on a fedora 6 machine and another way on a fedora 8 machine. [code] void Form1::SendToApp() { vector<int> isciistream; vector<int> fontstream; cout<<"Entering Form1::SendToApp()"<<endl; isciistream=wwnd->OnOK(); isciistream.push_back(32); char str[255]=""; cout<<"Size of IsciiStream:"<<isciistream.size()<<endl; for (int i=0;i<(int)isciistream.size();i++) { sprintf(str,"%s%c",str,isciistream[i]); cout << "isciistream[i] :" << …

Member Avatar for AutoC
0
157
Member Avatar for anthology

#After user inputs the year they were born I want to break it down using fadic addition like below# birth_year = int(raw_input('Please enter the year you were born')) #User inputs 1953 birth_year = 1953 #What I want is to do this using Fadic addition: birth_number1 = 1 + 9 + …

Member Avatar for anthology
1
260
Member Avatar for Rombosia

hi guys, if I have a form with, say, a picturebox in it. The picturebox is loaded with an image, and I need to copy just a section of it, say at rectangular points, X, Y, L and W to the clipboard, or to another picturebox. Is it possible in …

Member Avatar for Rombosia
0
1K
Member Avatar for kanaku

I'm using a blog hosted at wordpress and for really long posts, I'm trying to add a "cut-the-crap" link to something else in the page. Now for plain html, I know you can do it with this: [code] <p>Blah blah blah, this is going to be a long post so …

Member Avatar for sciamannikoo
0
158
Member Avatar for eapln

i am trying to move to the dest_dir from Current Working Directory using the following script. my intension is instead of using cd dest_dir, i have to use the script to do the job. when ever i tried with the follwing script, iam again in my Current working directoy... #!/usr/bin/bash …

Member Avatar for eapln
0
113
Member Avatar for rush1

hi, i am new to php can u please tell me how ti insert data into table for user name and password??

Member Avatar for rush1
0
90
Member Avatar for ypdev

Hi, I am trying to validate RadioButtonList (ASP.NET) using the following js function but for some reason it does not working properly. I can't get the ID of the control as I would be.. Can you help please? [CODE] <asp:RadioButtonList ID="T_selector" runat="server"> <asp:ListItem Value="1">Team1</asp:ListItem> <asp:ListItem Value="2">Team2</asp:ListItem> </asp:RadioButtonList> [/CODE] [CODE] <script …

Member Avatar for ypdev
-1
254
Member Avatar for lovely_aly

Hi there. As I said, I'm a newbie to programming and writing code. I'm at home working on a lab project but keep getting a compilation error and I don't know how to fix it. Any help would be greatly appreciated. Here's my code: public void add(int i) { int …

Member Avatar for lovely_aly
0
90
Member Avatar for Jake12

Sorry for the weird title, not sure how to describe it in one sentence. What I am trying to do is build a script that will read through an array of words and compare another word to the list to find where it would be placed alphabetically; between which two …

Member Avatar for Jake12
0
98
Member Avatar for Passiongamer25

I have a problem with my program and it has to do with my finding average function. The program goes like this: The program will grade a series of exams and then print a grade report for students in a course. Input: An instructor has a class of students each …

Member Avatar for Passiongamer25
0
180
Member Avatar for user1701

Ok so Ive been working with PHP for a while now but now trying to go beyond the basics, Im building an admin panel for example for a database of cars, and Im intending for the user to be able to scroll down a table of entries populated by the …

Member Avatar for user1701
0
99
Member Avatar for marcosjp

Hello there! I need to open PDF files from a C program. So, initially I have this solution: [code=c] ShellExecute(GetDesktopWindow(), "open", "c:\somefolder\myFile.pdf", NULL, NULL, SW_SHOWNORMAL); [/code] However, this code has its limitations: 1. It works, but a shell window comes up and closes when opening the PDF file. Is there …

Member Avatar for marcosjp
0
165
Member Avatar for VBNick

I have seen functions defined these two ways: function(type *variablename) function(type variablename&) I commonly use the first one to pass on pointers to my structs, but is the second one the same as the first?

Member Avatar for VBNick
0
311
Member Avatar for BestJewSinceJC

I have to write a program that mimics a digital clock w/ seconds, minutes, and hours. I'm sure I can get the displays working on my own and everything. My concern: what is the most efficient way to check the time? Should I just do Thread.sleep for 1 second then …

Member Avatar for Ezzaral
0
124
Member Avatar for wheatontrue

Dear all, I am trying to parse a lot of text. for small amounts of text, the WHILE loop I use to find all spaces in the text works well: markerlist=[] counter=0 while len(markerlist)<text.count(marker): [INDENT]markerlist.append(text.find(marker,counter) counter=text.find(marker,counter)+1[/INDENT] This iterative process is very, very slow when working with a few megabites of …

Member Avatar for wheatontrue
0
143
Member Avatar for leegeorg07

i have made a simple music player that will randomly choose a song from the list (music) how can i expand this to a whole directory of music without having to make a list with them all in heres the code: [code] import webbrowser, random music = [#music was here] …

Member Avatar for leegeorg07
0
701
Member Avatar for Stefano Mtangoo

Im learning ++ by myself and have decided to follow this tutorial and very interesting [url]http://www.cprogramming.com/tutorial/lesson4.html[/url] However as you can see the int mult ( int x, int y ); is defined twice: at the top and the bottom. Whay it is that. Also I have found many programs uses …

Member Avatar for Stefano Mtangoo
0
150
Member Avatar for serkan sendur

when i try the code below : [CODE]#include <iostream> using namespace std; int a = 3; int b = 4; int c = 5; int * pA = &a; int * pB = &b; int * pC = &c; int * abc[] = {pA,pB,pC}; int main() { cout << abc[*pA] …

Member Avatar for BevoX
0
72
Member Avatar for Nikhar

Hi...this is the code that I wrote to find a particular string from a 2-d array of characters. It prints F(for found) and N(for Not found). When I execute this program, it prints N only. [code]#include<iostream.h> #include<conio.h> char SearchString(char[5][10],char[10]); void main() { clrscr(); char str1[5][10],str2[10]; int i; cout<<"\nEnter 5 objects:-"; …

Member Avatar for Nikhar
0
136
Member Avatar for mcnally

[code] // gettingEvenNumbers.cpp // Purpose of this functions is to read in the numbers 1 - 20 // and print out only the even numbers using a loop of some kind. #include <iostream> #include <string> int main() { // Numbers being used. int x[] = {1, 2, 3, 4, 5, …

Member Avatar for mcnally
0
98
Member Avatar for abczxy124
Member Avatar for Stefano Mtangoo
0
140
Member Avatar for kischi

Hi I have made a website where it is possible to see the days program on one page, it updates itself so it is only for that day. But now I wan't to be able to insert a picture that changes position according to what time it is. For example …

Member Avatar for Ramy Mahrous
0
192
Member Avatar for tuttie

I am working on a programm that requires one to write a program that outputs your first and last intials in block letters. The block letters should be made up of small letters that match your block letter. If PS is the block letter then p should be made up …

Member Avatar for tuttie
0
965
Member Avatar for yssirhc

well the title pretty much says it all. I'm trying to grab an html hidden form input value for use in a delphi function. I don't know delphi very well at all, so I was trying to follow the format of the other code in the program that did this …

Member Avatar for LizR
0
122
Member Avatar for mauro21pl

Hi to all I have a quick question. I am going to fill an array with some inpuit of type char using member function cin.getline. After I fill an array ,I would like to do "for" loop so I need to know what is curently the size of an array. …

Member Avatar for Narue
0
140
Member Avatar for serkan sendur

hi, in the code below : [CODE]#include <iostream> using namespace std; struct deneme { int a; void (* myFunction)(int a); }; void function1(int a) { cout << a << endl; } void function2(int a) { cout << a + a << endl; } int main() { deneme myDeneme[] = {{1,function1},{2,function2}}; …

Member Avatar for serkan sendur
0
104
Member Avatar for SagarVaze

I need to get a pointer to a particular member variable of a structure Here's what i have done [code] typedef struct { int var1; other variables ... } structname; ---some other code here--- structname* structptr; int* intptr; intptr=(int*)&(structptr->var1) [/code] but this isn't working. What's the correct way to do …

Member Avatar for Aia
0
2K
Member Avatar for lerkei

Pls. tell me what's wrong with this code, I really need a big help..... tnx in advance... [code] Imports System.Data.OleDb Module Module1 Public admin As Boolean 'Use to identify if current user is Administrator End Module Public Class LoginForm1 Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles …

Member Avatar for Comatose
0
121
Member Avatar for kerek2

hi Alls, I really need your help regarding this method, Actually i need to create one search box using textbox and the result will display on listbox. I have textbox1 as inputbox, button1 as search button , listbox1 to display the value , Database1.mdb as my database. Can u guide …

Member Avatar for Comatose
0
205
Member Avatar for leegeorg07

hi again im doing the spell checker program in the projects for the beginner thing and i have this code: [ICODE] dict = open("DictionaryE.txt", "r").readlines() test = "Hello my nmae is george" correct = [] for line in test: if line in dict: correct.append(line) print line print correct [/ICODE] but …

Member Avatar for leegeorg07
0
389
Member Avatar for acardiac

Hi all of you people out there! Can anyone please help me on this problem....? I want solutions manuals for different books that i have just for study purposes(not commercial strictly) Can anyone please tell me where i might be able to find the required solutions manual(s)....for free.! :-) I …

Member Avatar for acardiac
0
2K
Member Avatar for rlaknar

Hi I am trying to connect a database through Java. I have written a program and it throws exceptions.I am not so strong in java and database connections and I am a newbie. Please anyone help me as soon as possible as its urgent!!! [B]Here is my program:[/B] [code] import …

Member Avatar for rlaknar
0
184
Member Avatar for krnekhelesh

I am making this program which checks if your floppy drive is ready or not. And so it has to check for say 20 seconds. And for this I want the program to run in the background. How do I do this? I am using Borland C++ and Turbo C++

Member Avatar for EZO
0
1K
Member Avatar for Stefano Mtangoo

Whenever I have lists or tuple lists I have something like u' (check sample result). What does this do? [CODE=python](u'03/02/2009', u'Billing for gas', 100.0, 210.0, 200.0) (u'15/04/2009', u'paying fees for OUT', 0.0, 10405.0, 0.0) (u'03/02/2009', u'Billing for gas', 100.0, 210.0, 200.0)[/CODE]

Member Avatar for Stefano Mtangoo
0
133
Member Avatar for karthi_selva

hi, i am new to .net i need to refer the external file to my C# object ie i wrote the one program like class program { public string getname(string name) { return name; } } the next program class test { like that } in the second program i …

Member Avatar for metalla_nz
0
143
Member Avatar for ntredame

I need to read the last name and five grades for 10 students from a file and calculate the average of the grades and display that information in a file. I am pretty sure I know how to tackle this, but I have no clue how to separate the name …

Member Avatar for ntredame
0
103
Member Avatar for CoolAtt

Hi. am using fgets() to read lines from a text file. the file is being updated after a few seconds. i want to read and process the last appended line at the end of the file. i tried the following: [code=c] while(true){ //infinite loop if(fgets(line,size,fp)!=NULL) process line. } [/code] plz …

Member Avatar for CoolAtt
0
722
Member Avatar for CPPRULZ

When a parameter in a function definition (for say class distance) is abc(distance a) and in the main you call this function and pass distance b, what is the relationship thereafter between distance a and b? Do there adresses become equal-if so what implications does that have in the program?

Member Avatar for CPPRULZ
0
119
Member Avatar for serkan sendur

in C# if you add @ before your string literals the escape sequences are not processed, so : you can use : [CODE] @"c:\Docs\Source\a.txt" // rather than "c:\\Docs\\Source\\a.txt"[/CODE] is there any c++ equivalent of doing that? Thanks

Member Avatar for cikara21
0
162
Member Avatar for CrimsonTider

Hey guys, I'm new to the forum and pretty new to C++. I think I'm just about finished with this project, but I've run into a couple problems. Here's my assignment: "Write class Lib and modify class Book such that this [URL="(http://cs.ua.edu/124/Spring2009/Projects/main.cpp)"]main[/URL] works as implied. For each class create .h …

Member Avatar for CrimsonTider
0
243
Member Avatar for christiangirl

Hey, So I got this program all working except some of the output is weird pictures instead of letters. The first time it outputs it works fine, but after that it only partly works. Here's the code: [code] #include "queue.cpp" #include <iostream> #include <fstream> #include <iomanip> /******************************************* * class Priority …

Member Avatar for christiangirl
0
156
Member Avatar for arseniew

Hello, Im trying to make jLabel component start default system browser and go to the specified page. I've tried to do this by adding listener to the jLabel and this part works fine, i have the problem with starting up the browser. I have only found system specific ways to …

Member Avatar for arseniew
0
102
Member Avatar for neighbordave

My assignment is as follows. Create a class called PursePile that can hold any number of Purse objects. The class should have the following methods: public void add(Purse p) //adds a purse to the pile public Purse findAPursesWith(String coinName) //searches the pile until a purse with the given coin is …

Member Avatar for Ezzaral
0
233
Member Avatar for christiangirl

Hello, I have to make this program that has two queue's. It takes input from a file, and each line in the file has a number and character. If the number is a one, the character is stored in the highQueue. If it is a 2-5 it is stored in …

Member Avatar for Lerner
0
122
Member Avatar for Stefano Mtangoo

I'm trying to grasp SQLite to do some stuffs I want it to do, but it is sometimes too hash to me :) So what i'm I wrong with this code?? [CODE=python] #!/usr/bin/ # SQLite command to be used with the applications import sqlite3 as sqlite import os class SqliteCommands: …

Member Avatar for Stefano Mtangoo
0
128
Member Avatar for TheKebab

Hi there! I'm working on this app that will allow you to encrypt or decrypt simple lines or entire txt files. It's no "real" encryption since it's easy to crack the output lines, but it's a fun project. So far I'm just done with the first option, and the funtions …

Member Avatar for TheKebab
0
165
Member Avatar for kerek2

Hi Guys, I'm really need help for this item, the situation is i got textbox1 as a input , button1 as searchbutton abd textbox2 to display the item that been enter in textbox1. All the table from .mdb Can guide me plz

Member Avatar for Teme64
0
238
Member Avatar for xtremerocker

[CODE=cplusplus] #include <iostream> #include <sstream> #include <string> #include <fstream> using namespace std; int main(void) { for(int COUNT = 0; COUNT <= 1000; COUNT++) { if(COUNT > 1000) { break; } if(COUNT <= 1000) { std::string TO_STRING; std::stringstream OUTPUT; OUTPUT << COUNT; TO_STRING = OUTPUT.str(); ofstream myfile; FILE.open ("data.txt"); FILE << …

Member Avatar for xtremerocker
0
123
Member Avatar for neoangin

Quick one about API: There is advice in MS Visual Studio 2008 Documentation: "To enable the user to draw filled shapes, include the following popup menu in your application. POPUP "Filled &Shapes" { MENUITEM "&Ellipse", IDM_ELLIPSE MENUITEM "&Rectangle", IDM_RECTANGLE MENUITEM "R&oundRect", IDM_ROUNDRECT } " Hm... where? In WinMain or between …

Member Avatar for Freaky_Chris
0
88
Member Avatar for serkan sendur

Hi guys, i want to achieve the same thing below in C++ and C, is it doable? Dont get me wrong, i dont want to create a web application, i just want to get an index number of enum by specifying a string value. [CODE]//Default.aspx : <%@ Page Language="C#" AutoEventWireup="true" …

Member Avatar for jencas
0
1K

The End.