132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Synapomorphy

First off this is a homework question, please don't do my homework for me as nice as that would be... I have to make a program that can search a library for an author or title from a file and output all the matching lines. I am very close but …

Software Development c++ file-system
Member Avatar for WaltP
0
85
Member Avatar for brylle

In DataGridView, how can i input data then add row

Software Development vb.net
Member Avatar for brylle
0
296
Member Avatar for sellemaster

Hey, I'm trying to create a simple Yatzy game in C++ (I'm new to programming) anyway here is my code: void gameMechanics(int& numberOfPlayers) //NumberOfPlayers are not used in this function at this point. { int diceResult = 0; int fiveDices[4]; string throwDices; cout << "Throw dices?(y/n): "; getline(cin, throwDices); if(throwDices …

Software Development c++
Member Avatar for sellemaster
0
161
Member Avatar for ramadan10

i have just started learning c++ and i like to know after writing a c++ code how do u process it to become a software so that you can intsall it in another computer and use it

Software Development c++
Member Avatar for ramadan10
0
198
Member Avatar for gwolf1

Can someone help me complete my code? I am having trouble with it and I need some input. //#include "bigint.h" #include <stdio.h> #include <stdlib.h> #include <assert.h> #include <string.h> /* Create and implement a bigint data structure that can represent integers whose size is limited only by the memory capacity of …

Software Development c data-structure
Member Avatar for gwolf1
0
349
Member Avatar for dinohead

Hello I need to do it in ansi c Can't seem to get it to work at the moment. unsigned char *s scanf("%x", &s); I then want to do if statements based on the amount of characters contained in the variable s. Whats the easiest way to get this? An …

Software Development c
Member Avatar for rithish
0
137
Member Avatar for WolfShield

Hello everyone, I am working my way through the Forger's Win32 tutorial and am on the "Creating a Simple Application" part currently. I am using C++ (instead of C in the tutorial) and the WinGW compiler. When I compile the below code I get this error: main.cpp: In function 'LRESULT …

Software Development c++ gui ide windows-api
Member Avatar for ravenous
0
584
Member Avatar for rahul.ch

A question that I came across: Q: Can you pass a double to a method when it's argument is a float? A: No. Regardless of the double value, a double-sized variable is too big to fit in a float, so it can't be implicitly cast. Doubt: Shouldn't narrowing happen implicitly?

Software Development java
Member Avatar for JamesCherrill
0
208
Member Avatar for Steve97

Program PRG3; Var { Declaring Varaibles } FileIn:text; FileOut:text; SECTION_NUMBER:string[5]; STUDENT_ID:string[9]; LAST_NAME:string[20]; FIRST_NAME:string[10]; RAW_SCORE:real; STUDENT_COUNT:integer; AVERAGE_SCORE:integer; AVERAGE_GRADE:integer; Percent:real; more_rec:boolean; {end of file flag} Computed_grade:integer; Grade:real; procedure read_record; begin if not Eof(fileIn) then readln(SECTION_NUMBER,STUDENT_ID,LAST_NAME,FIRST_NAME,RAW_SCORE) else more_rec := False end; {read record} procedure print_header; begin writeln(fileout,Space(14),'COMPUTE GRADE'); writeln(fileout,space(17),'SECTION','SECTION_NUMBER'); writeln(fileout); writeln(fileout,space(9),'LAST_NAME',space(11),'FIRST_NAME',' RAW_SCORE',' COMPUTED_GRADE'); …

Software Development pascal
Member Avatar for pritaeas
0
194
Member Avatar for Reverend Jim

This is a short bit of code that shows how to implement sorting on columns in a details-mode ListView. Suggestions for improvement are always welcome. One possible improvement would be to modify the column headers to indicate which column is being sorted and in which direction.

Software Development listview vb.net
0
2K
Member Avatar for 111100/11000

#include <iostream> #include <string> #include <cmath> using namespace std; //global varibals: char entered_characters[9999]; int direction_of_rotor1; int direction_of_rotor2; char alphabet_of_rotor1[26]; char alphabet_of_rotor2[26]; char rotor1_backward(char Letter); char rotor1_forward(char Letter); char rotor2_backward(char Letter2); char rotor2_forward(char Letter2); char print(char print_char); int main() { cout << "This is enigma machine:" << endl; cout << "*NOTE:This …

Software Development c++
Member Avatar for WaltP
0
217
Member Avatar for sokolov

I am new to python but have experience with Java. I am creating a bouncing ball program which throuhg a for loop creates a large sum of bouncing balls. I appreciate any help! Thank you import time from random import randint x0 = 10.0 y0 = 10.0 ball_diameter = 15 …

Software Development python tkinter
Member Avatar for TrustyTony
0
1K
Member Avatar for achilleus1234

I currently found a piece of code on a website but i can't get it to work it always reports fail. Pls help. Private Function FindImage(Image1 As Bitmap, Image2 As Bitmap) As Point For y = 0 To Image1.Height - Image2.Height - 1 For x = 0 To Image1.Width - …

Software Development image vb.net visual-basic
Member Avatar for Reverend Jim
0
324
Member Avatar for Dylxy

I am looking for good C# .NET 4.0 database tutorials. I want to learn working with a database in C#, i already know SQL from another language PHP. Thnx

Software Development c c# c++
Member Avatar for king03
0
244
Member Avatar for alaa sam

Hi everyone well currently I am working on a simple malloc and free implementation but I am facing some problems . I get a segmentation fault this is my output inserting node 0 0xc87000 inserting node 1 0xc87014 inserting node 2 0xc87028 inserting node 3 0xc8703c inserting node 4 0xc87050 …

Software Development c linked-list
Member Avatar for alaa sam
0
213
Member Avatar for Gé48

Hello I am new here as well as with vb2008xpress and I have a question. I have a datagridview with 12 columns and 30 rows I want to use as a scoreboard for a game (no need to input or save data). Columns are for the players and rows for …

Software Development vb.net
Member Avatar for arcjamesneo
0
268
Member Avatar for chotep

class Nines { public static void main(String[] arguments) { for (int dex = 1; dex <= 200; dex++) { int multiple = 9 * dex; System.out.print(multiple + " "); } } }

Software Development java
Member Avatar for chotep
0
171
Member Avatar for triumphost

I currently use this to serialize data, write it to shared memory so that another program can reconstruct it and use it: template<typename T> void Serialize(unsigned char* &Destination, const T &Source) { CopyMemory(Destination, &Source, sizeof(T)); //Destination += sizeof(T); //Not sure if to add this or not. } template<typename T> void …

Software Development c++
Member Avatar for triumphost
0
106
Member Avatar for yeeitsneo

soooo. i saw a working code for a hindu arabic - roman numeral converter. the thing is. i need to fully understand the code. so i need someone who could explain the code clearly to me. line by line as for me to fully understand the program. newbie here. you …

Software Development visual-basic
Member Avatar for yeeitsneo
0
500
Member Avatar for hughesadam_87

Hi, I have an object subclass that I am using with a cusom __repr__() method. class NewClass(object): def __repr__(self): return ', '.join('%s=%s'%(k, v) for (k,v) in self.__dict__.items()) This works fine (leaving out some more details about my program): test=NewClass(a=1,b=2) print test a=1, b=2 But what I really want for reasons …

Software Development python
Member Avatar for hughesadam_87
0
184
Member Avatar for Frensi

I'm learning about Classes and this thing is driving me crazy. Whenever I run this, it will use the __del__ object even though I never used del droid1, del droid2, or del droid3. Can someone please help? class Robots: '''Represents a robot, with a name.''' #A class variable, counting the …

Software Development python
Member Avatar for Gribouillis
0
311
Member Avatar for jingxian.fs

/** @file Graph.h */ #ifndef GRAPH_FLIGHTFINDER #define GRAPH_FLIGHTFINDER #include <iostream> #include <fstream> #include <sstream> using namespace std; //graph implementation class FlightGraph { //A Node class to create pointer for graph implementation class Node { public : string name; double cost; Node * next; // constructor Node() { name=" "; next=NULL; …

Software Development c++
Member Avatar for Ancient Dragon
0
567
Member Avatar for BBMoretti

i have a listview and a combobox. i need to display all my column headers from the listview as items on my combobox. also i need to "sort" the data of my listview according to the selected item on my combobox. ex: my listview contains the column headers, "name", "address", …

Software Development listview vb.net
Member Avatar for Reverend Jim
0
164
Member Avatar for im abcd

So I have coded this program on formula method . #include <iostream> #include <cstdlib> #include <cmath> using namespace std; int main() { int a , b , c ; cout << " Enter the values of a , b , c " << endl; cin >> a ; cin >> …

Software Development c++
Member Avatar for im abcd
0
424
Member Avatar for wilddrummer

Hi all, thanks in advance for the help. I have placed an "X" on the first JButton and what I need it to do is this... Once the user has clicked the button with the "X" it needs to disappear and reappear on a different button. This process needs to …

Software Development java java-swing
Member Avatar for NormR1
0
235
Member Avatar for dawsonrose

Hello, I've a file which contains names and grades of students, and I'd like to write a program which can sort their grades (like midterm 1,midterm 2) according to user choice. I wrote as far as the choice part and opening the file, yet I don't know how to make …

Software Development c data-structure file-system
Member Avatar for WaltP
0
788
Member Avatar for jere.saw

Which of the following statements will display "Problem!" if bit 2 of flags is a '0'?

Software Development c++
Member Avatar for WaltP
0
53
Member Avatar for kathir100

Hi budy can you explain anyone which i have writen in the article title

Software Development java
Member Avatar for JamesCherrill
0
256
Member Avatar for thechampp

Hello everyone, I have task "Write a program that calculates N!/K! for given N and K (1<N<K)." I want to ask is this the right solution ? using System; class NandKFactorials { public static double fact(double x) { double result = 1; for (int i = 1; i <= x; …

Software Development
Member Avatar for sepp2k
0
98
Member Avatar for glao

I am trying to implement periodic boundary conditions for 2d lattice. I did: int boundary2d(int xpos,int ypos,int stepx,int stepy){ int x=4,y=4; //grid size int **matrix; //the grid matrix int i=stepx+xpos; int j=stepy+ypos; if (i<0) { do { i+=Nx; }while (i>Nx-1); } if (i>Nx-1) { do{ i-=Nx; }while(i>Nx-1); } if (j<0) …

Software Development c++
Member Avatar for glao
0
1K
Member Avatar for powerdink

Hello, Please help. Below is my assignment and the code I've got so far. I'm still getting errors on overloading the member function on the printDay and prevDay. Design and implement a class dayType that implements the day of the week in a program. The class dayType should store the …

Software Development c++
Member Avatar for Brandon5122
0
6K
Member Avatar for majimboo04

how to code this.. in 200 to 1 i need to decrease by 3 and displaying odd or even numbers.. can you help me.. ty :)

Software Development c++
Member Avatar for ravenous
0
88
Member Avatar for hazem.hisham93

hiii guys i am in the second year from computer science i take c# languge programming but the proplem i donot know how i need to be good programmer and how i start in this and what i take so plz i need help from u guys to tell me …

Software Development
Member Avatar for M.Waqas Aslam
0
82
Member Avatar for blackarchan

I have a problem i wrote a code and copyed some code but now my sprite dosent move anymore....and i dont know why # Import a library functions called 'pygame' import pygame from pygame.locals import * # Initialize the game engine pygame.init() # Define some colors black = (0, 0, …

Software Development python
0
149
Member Avatar for HibaPro

Rows cannot be programmatically added to the DataGridView's rows collection when the control is data-bound. this is an error msg appear when i need to add a new row to datagridview, how i can add new one ??? DataGridView1.Rows.Add()

Software Development vb.net
Member Avatar for M.Waqas Aslam
0
196
Member Avatar for johncornelius23

whenever I try to run it I have a compile error in connecting my database this is my code Dim con As Adodb.Recordset Dim conn1 As Adodb.Connection Private Sub mygdb() Set con = New Adodb.Connection con.CursorLocation = adUseClient con.Open "PROVIDER = Microsoft.Jet.OLEDB.4.0;Data Source =" & App.Path & "\enrolment.mdb;" End Sub

Software Development open-source vb.net visual-basic
Member Avatar for QVeen72
0
211
Member Avatar for Carpetfizz

Hello! I'm relatively new to C++ and I'm learning about classes and objects. I've learned most of what I know from YouTube tutorials and some books. Well, in almost all of those, they mentioned that it was poor programming practice to make all your data members public, inside of a …

Software Development c++
Member Avatar for Carpetfizz
0
315
Member Avatar for piero.costa

Hi guys, I'm learning C and I still don't have some concepts very clear in my mind. I have to create a program that get the values from ARGV[] and puts into a vector: the program would work like that: ./program file1 file2 file3 My idea was to do something …

Software Development c
Member Avatar for Ancient Dragon
0
4K
Member Avatar for dirkleonschut

Hello People. I would like to ask you're assistance with a little problem I am having. When I execute this code: string sql2 = "INSERT INTO worlds (worlds_ID,worlds_active,worlds_name,worlds_x,worlds_y) VALUES ('', '1', 'Test', '250', '250');"; MySqlCommand cmd = new MySqlCommand(sql2, OpenCon()); addtolog("server", "World Created"); it does not make the new row …

Software Development mysql
Member Avatar for dirkleonschut
0
195
Member Avatar for tensity

Hello, I am trying to read text from a simple text file. The text file contains a list of emails and zipcodes, formated as follows: email@site.com;zipcode where zipcode is 5 integers. I am having an issue with the getline function, my error is "no instance of overloaded function". Could someone …

Software Development c++
Member Avatar for tensity
0
217
Member Avatar for system_Broken

I want enter number digits into textbox and textbox will automaticaly convert this digits itno currncy like this if i want enter 120 , i want textbox convert it 1,20 how to make code for it ?

Software Development
Member Avatar for codevigilante
0
266
Member Avatar for sharath27

In my project I've 8 edit boxes and i need to set each box with different font. But my code is setting all the boxes single font.. So how can i modify it?? void CTrail3Dlg::OnBnClickedButton1() { UpdateData(TRUE); CFontDialog dlg; // get font for current dialog, just to fill in LOGFONT …

Software Development c++ visual-studio
Member Avatar for Ancient Dragon
0
261
Member Avatar for Rasool Ahmed

Hi guys, I am developing a software and I want to make it in good appearance!!!! As you see most of programs have a beautiful skins, I want too!! I have google it in days and I found a dll file called "DevComponents.DotNetBar2.dll" ( may you have heard about it) …

Software Development c# microsoft-office vb.net
Member Avatar for Rasool Ahmed
0
344
Member Avatar for Graphix

Hello everyone, I stumbled upon a video about the monty hall problem, which I found very well explained, and a lot of comments below the video that were against the conclusion that it **is better to switch**. To clarify, I wrote this small program that simulates the game and allows …

Software Development c
Member Avatar for WaltP
0
651
Member Avatar for satnav_8

I'm trying to write a script that will search a page for mp3 files, and download the first one. All is fine, but when I'm finding the links the first two are not mp3 files. At the moment I'm doing: for link in page.findAll('a')[:3]: f.write(link.get('href')) This finds the first 3 …

Software Development python
Member Avatar for satnav_8
0
136
Member Avatar for Andrei15193

Hello, I have a question that can be deducted from the title. When to use C++ inline functions and when not? Should I declare my constructors/destructors as inline? Should I declare functions that have at least a loop as inline? People say that declaring *small* functions as inline is a …

Software Development c++
Member Avatar for Andrei15193
0
198
Member Avatar for love_you_4rever

Hi, I'm writing a code to print weekday (ie: mon, tue, wed, thurs, fri, sat, sun) when user enter day/month/year. However, I do not know why this code doesn't work right. I didn't get any error. It actually works, but it just printed "Monday" for whatever date I putted in. …

Software Development c++
Member Avatar for rubberman
0
469
Member Avatar for Twist43

Hi I have always been a windows user but a few months ago switch to Ubuntu Linux. I have started learning Python and want to find out from experienced developers what the best way is to setup a development environment on a Ubuntu machine. I am running Ubuntu 12.04 which …

Software Development machine-learning python ubuntu
Member Avatar for Twist43
0
186
Member Avatar for smitty68503

I have been struggling with this for awhile now. lol I have no code to post because I haven't even started it. I can do the insert statement just fine from vb.net code to a sql database. That's fairly easy. However to do an update statement from a combobox to …

Software Development vb.net
Member Avatar for Reverend Jim
0
1K
Member Avatar for hughesadam_87

This post is a followup to an older dicsussion [on recordmanaging](http://www.daniweb.com/software-development/python/code/429753/custom-named-tuples-for-record-storage). I am writing this to share with colleagues, so it may be a bit fluffy and not straight to the point. I apologize to all the experts. Good programs always start by managing data in a flexible and robust …

Software Development daniweb-feedback python storage
0
576

The End.