64,152 Solved Topics
Remove Filter ![]() | |
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] :" << … | |
#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 + … | |
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 … | |
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 … | |
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 … | |
hi, i am new to php can u please tell me how ti insert data into table for user name and password?? | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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? | |
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 … | |
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 … | |
![]() | 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] … ![]() |
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 … | |
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] … | |
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:-"; … | |
[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, … | |
i need to design a python program that will calculate these two things. can someone help me out here? | |
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 … | |
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 … | |
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 … | |
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. … | |
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}}; … | |
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 … | |
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 … | |
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 … | |
![]() | 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 … ![]() |
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 … | |
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 … | |
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++ | |
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] | |
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 … | |
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 … | |
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 … | |
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? | |
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 | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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: … | |
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 … | |
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 | |
[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 << … | |
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 … | |
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" … ![]() |
The End.