43,549 Solved Topics
Remove Filter ![]() | |
hi, i am new to c have to write a program to check the shape. I think the error is somewhere at shape= square. I know i can use printf statements but i want it in this format. Can someone help me please? [code] #include <stdio.h> int main (void) { … Software Development c | |
[QUOTE]Hi I need help to center a label with a form. I have tried with the following code but was unsuccessful. [/QUOTE] [CODE]Me.Width = 135 Me.Height = 38 Dim w As Integer = Me.Width / 2 Dim h As Integer = Me.Height / 2 Dim lblw As Integer = Me.lblnumber.Width … Software Development vb.net | |
So I am programming a heap sort and i am gettin pretty close to where i need to be, but I am having trouble in one of my functions when it heapifies my array. here is the code. [code] #include<iostream> using namespace std; class Heapsort { private: int *array; int … Software Development c++ | |
Hello! I have one main form (parent) which contains others child forms. The first child form is a login form, that after correct autentication opens another child form. Depending on the user (operator or supervisor) some items of menustrip in form Parent should be available or not. The supervisor will … Software Development | |
I am having trouble with the following script: [code] .386 .model flat, stdcall option casemap:none include \masm32\include\windows.inc include \masm32\include\kernel32.inc include \masm32\include\user32.inc includelib \masm32\lib\kernel32.lib includelib \masm32\lib\user32.lib ;adding all my libs .data nsv db "APPDATA", 0 ;i want to use this in getenv(); fnsv db 260 dUP(0) ; char fnsv[260]; ffn db … Software Development assembly | |
![]() | Hello, I'm having trouble making a little parser for the eix program (a gentoo portage search tool) I need to delete (or not write) the last lines of the output (overlays and total packages), they will start always like '[n]' where n is the number of the overlay and the … Software Development file-system python ![]() |
for example if i wanted to add a list to another list, like: a = [a,b,c] b = [1,2,3] my code: [code] def add(a, b): a = a.append(b) [/code] it would output ['a', 'b', 'c', [1, 2, 3]] what do i have to change to make it output ['a', 'b', … Software Development python | |
Hi, I'm having exception on this line, when some of the textboxes do not have value in [code] if (Convert.ToInt32(LeaveDay.Text) + Convert.ToInt32(SickDay.Text) + Convert.ToInt32(WorkDay.Text) > limitDay) [/code] appreciate any help thanks snky Software Development | |
Hello every1 I was making this program of a phone directory to store contacts and all their information in C. I made use of structure and then copied the data of the structure to a file. the structure is [code] struct phdata { char name[20],add[20]; int phno; }ph[20]; [/code] the … Software Development c++ data-structure file-system | |
I am trying to implement the Kuwahara Filter in C#. I think my code is right, but I am not getting an exact output. Can someone help me with where I am going wrong? [CODE] unsafe { try { Bitmap b1 = (Bitmap)pictureBox1.Image.Clone(); Bitmap b2 = new Bitmap(b1.Width, b1.Height); BitmapData … Software Development | |
[CODE] //////////////////////// /////counter.h file///// //////////////////////// #ifndef _COUNTER_H #define _COUNTER_H class Counter{ private: int counter; int limit; static int nCounters; public: Counter(int arg, int arg); void increment(); void decrement(); int getValue(); static int getNCounters(); }; #include "counter.cpp" #endif ////////////////////////// /////counter.cpp file///// ////////////////////////// #include <string> #include "counter.h" Counter::Counter(int a, int b){ counter=a; … Software Development c++ | |
HI!, i'm using VB.NET 2005. I want to use OleDbConnection in my .net application but it is not showing in the 'Data' section of the 'toolbox'. is there any way to import it to the toolbox. NOTE: (Also OleDbDataAdapter, SqlConnection,SqlDataAdapter, etc are missing in toolbox) Waiting for reply newbee Vivekanand Software Development vb.net | |
hi friends ... i want help regarding file management in windows. what i want to do is , Keep track of all files and folders created or deleted during a period of time. for example , during 5 to 6 pm somebudy else is using my computer. so at that … Software Development file-system queue | |
Hello all, I did this program below, it is meant to get a student name then 5 of his/her grades sums them up in a void function and calculate the average but outputs the average from the main the problem is that the loop goes on and prints the prompt … Software Development c++ | |
[code] public void init() { // Assign values to the rectanagle coordinates. // Add the MouseListener to your applet } public void paint(Graphics g) { // Rectangle's color g.setColor(Color.green); g.fillRect(rect1xco,rect1yco,rect1width,rect1height); g.setColor(Color.red); // When the user clicks this will show the coordinates of the click // at the place of the … Software Development java | |
My question: What is the output of the code corresponding to the following pseudocode? [code=text] Set y = 0 For (i = 0; i<=6; i=i+3) For (j = 0; j<=15; j=j+5) Set y = y + 1; End For (j) End For (i) Output y [/code] This is what I … Software Development c++ | |
// I am new to C++ and can not seem to get the falling man to output to the screen. Any help would be greatly appreciated. [code] #include <iostream> #include <windows.h> using namespace std; void DrawBar(char guess); int main() { char solution[8]; //holds solution char blank[8]; //holds "*"'s for unsolved … | |
I am working on some homework right now and the program has to return two specified values depending on the key value the user enters. I only had to write the bottom portion of the program as the top portion was given to me as a shell. It runs but … Software Development c++ | |
I am writing a simple program that is supposed to take a user input and convert it to char and for each char it should change it to the designated change. I'm using switch statements to do this. Ex. blue b = bravo l = llama u = union e … Software Development java | |
Hi I have a text file which has the following: 'username=sonia\n', 'password=password' I want to split sonia and place it in a variable called username. I was able to accomplish the following but could not remove the new line characters. text = 'username=sonia\n', 'password=password' text[0].split('=')[1] This returns 'sonia\n' So now … Software Development python | |
Hi! im startin programmin in vb.net. in the program im doin now, im workin with a global variable 'public library as new biblioteca' that has should be a list of books that user wants to load. thing is that when i try to delete a book, i have to check … Software Development vb.net | |
Hello again, I'm having trouble with a program that I have to write involving classes and arrays. Essentially i have to create a class Theater, which I am not sure how to do. The theater has 15 rows with 30 seats per row, and each row is assigned a price … Software Development c++ | |
this is a simple example of a problem I have been having with differing programs, i am using linux ubuntu 9.10 and codeblocks 8.02 . this is the code [code] #include <iostream> using namespace std; int main() { int hiya; cout<<"hello world \n"; cin.get(); cout<<"enter a number \n"; cin>>hiya; cout<<"you … | |
Hi, i would like that when pressing the key example "M" to call some code. Same as Ctrl+Alt+Delete and TaskManager but in my case i have process in background which maybe can be used for this? Software Development | |
![]() | This is a split from another thread. I'm trying to think of a good way to simulate action other than just a hit/miss list. I want more complicated results andalso so that the character doesn't always die... Hmmm... okay. So I think I would do it like this: my_str = … Software Development python |
Hey, getting a new error in my code... Its almost done, cant figure out what is wrong with this. ERROR: non-static method isPrime(int) cannot be referenced from a static context [CODE] import java.util.Scanner; public class primenumbertest { public boolean isPrime(int x){ int divisor = 1; do{ divisor += 1; } … Software Development java | |
Greetings all! I'm facing a problem that's been throwing me for a loop for a while now. I'm implementing an old VB application that someone else wrote a long time ago onto a VM. I've gotten past a few different issues/errors just to get new ones (that's the name of … Software Development visual-basic | |
Hello guys and gals of the DaniWeb community, this time I need help in how to save text to a file in the text editing application I created. Well, I tried using the code below but it didn't do the work: [CODE]If (RichTextBox1.Text Is Nothing) Then MessageBox.Show("No text to save!") … Software Development vb.net | |
I have a script for renaming files, but can not seem to iron out the bugs. I am trying to rename a list of files: File1.File1 File2.File2 etc I need them to be renamed to: File1 File2 etc This is the code so far: [code] import os import sys import … Software Development python | |
The program runs perfectly, however I am having an issue adding a discounted price. Another thing I noticed when I run the program is that the switch statement doesn't calculate the discounts at all. [CODE]// DiscountPrices.java - This program calculates total cost for discounted items. // Input: Interactive. // Output: … Software Development java java-swing | |
Hi, i need some help, i need to delete some data in DBF file, and i have this code... but when i execute it .. nothing happends? Dim connectionString As String connectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=D:\Documents and Settings\dmarinkovic\Desktop\Data1\FP550_EO022450;Extended Properties=dBase IV" Dim dBaseConnection As New System.Data.OleDb.OleDbConnection(connectionString) Dim cmmd As … Software Development open-source visual-basic | |
[CODE] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.Collections; namespace CoinsExercise12StephenBarDev { public partial class FrmStephensCoinage : Form { Array ValueOfCoins = Array.CreateInstance(typeof(String), 101); double CoinInput; public FrmStephensCoinage() { InitializeComponent(); ValueOfCoins.SetValue("0.00", 0); ValueOfCoins.SetValue("0.01",1); ValueOfCoins.SetValue("0.02",2); ValueOfCoins.SetValue("0.03",3); ValueOfCoins.SetValue("0.04", 4); ValueOfCoins.SetValue("0.05", 5); ValueOfCoins.SetValue("0.06", 6); ValueOfCoins.SetValue("0.07", … Software Development c# | |
Hello There seems to be different methods to create a text file in C#. I am getting a byte array from USB device. I need to store this as text file which is to be read, updated, and saved for future usage. The data comes in different packets not in … Software Development asp.net | |
[code] class MyList(list): def __new__(cls, *p, **k): if not '_the_instance' in cls.__dict__: cls._the_instance = list.__new__(cls) return cls._the_instance def append(self, name): if name not in self: list.append(self, name) def extend(self, names): for name in names: if name in self: continue list.append(self, name) def remove(self, name): if name in self: list.remove(self, name) … Software Development python | |
I'm working on a n-tier solution with VB.Net 2008. In this solution I have 3 projects started (the UI, BLL and DAL). I have the BLL referenced in the UI and the DAL referenced in the BLL. What I cannot do is use a User class in the BLL in … Software Development vb.net | |
I'm making a project in Visual studio 2008. The details of the project are: - It is a MFC Application - The application type is Dialog based with Use HTML Dialog enabled - The project style is MFC standard and... - The use of the MFC is in a shared … Software Development c++ html-css visual-studio | |
My ultimate goal is to fill an array with user inputted positive and negative numbers. This script I wrote is very limited, but it should give you an idea of what I am trying to do. Basically, I ask how many numbers and then reserve 3 spaces for each number … Software Development shell-scripting | |
I am trying to delete any line of text that contains "$npname" and the word "in." The script works if $npname is only one word, but if it is more than one work I get "error: unterminated address regex" How can I fix this? [CODE]sed '/'$npname'.*in/d' parts.txt > parts.tmp[/CODE] Software Development regex shell-scripting | |
Hi all, I'm new to working with C++ (I'm more a C programmer) and I have a question: I have a container class for a templated type T, which could be any scalar type, although the most commonly used ones are unsigned char and float. I have a function that … Software Development c++ | |
So everything in my program works except for the main itself. The program is supposed to take in a file provided through standard input and print out the descending order of words followed by the frequency that they occur. I can do this individually line for line but am having … Software Development c | |
Hi, In my code I'm getting a weird error. It's caused by this piece of code: [CODE]response = SQLCommand.ExecuteNonQuery();[/CODE] The error: There is missing a ; at the end of the SQL-instruction. My eyes may be bad, but I clearly see a ; at the end of this piece of … Software Development | |
Hi, I am trying to make a program that allows one to see a database (MS Access) and add items to the database. The database works perfectly (update and suchs) but the adding won't, sadly enough. The error I get is (translated as i'm using a Dutch version): Syntaxisfault in … Software Development | |
Im trying to access a variable in a list that is 3 places earlier in the list. For example list_1[dogs, cats, pigs, hamsters, kids]. If Im trying to access the word cats based on the position of kids how would I do that? I know list_1[4] returns kids and I … Software Development python | |
I am having a slight problem implementing this code. What I need to do is take a list of 16 unsigned characters and permute the bits according to IPTable. 0 in IPTable refers to bit 0, 1 refers to bit 1, etc. Here is my code which isn't working. [code=c] … Software Development c | |
Hi All, I am getting the message "input string was not in a correct format" about the line " numline[i] = Convert.ToDouble(num);" The program is supposed to read a csv and convert the fifth line of the file to an double array. The line to be read in looks like … Software Development | |
hi, i am making an program in VB6 with access database....m inserting dates in the database at random....and want a listbox to be populated with first 3 dates starting after a particular date.... eg. input - 6 jan, 3 dec, 15 feb, 12 march, 10 dec, 7 june, 5 may … Software Development visual-basic | |
So this is a matching game, flip over two cards, if they match they stay up if not they flip over again. I have the matching system and coordinate system working. My problem is that when i use my array of zeros to "hide" the numbers, all that is ever … Software Development c++ | |
i know that a select statement is the best way to go around retrieving records from a database. the problem im facing is selecting a record then assigning a certain field from that record to a variable eg x..... so in simple english, it has to be something like....select clientnumber … Software Development visual-basic | |
Hello, I've started with python (3) recently. Initialy only for scripting. Now I'm trying the object oriented bit. I'm getting the following error message [CODE] <Atom.Atom object at 0x7f0b09597fd0> Traceback (most recent call last): File "./Main.py", line 7, in <module> print (t.getAtomName()) File "/home/jorge/Documentos/projetos/mestrado/códigos/cartesian_zmatrix/Atom.py", line 22, in getAtomName return atomName … Software Development python |
The End.