43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for ibn_sumal

Hello guys i've been learning java for a short while and have come upon a problem which i cannot seem to solve. I have a boolean array of 11 values, now i want to prompt the user into entering the number 1 or 2. If the user enters 1 I …

Software Development java
Member Avatar for jon.kiparsky
0
542
Member Avatar for yamini222

Hi, I have a panel which contains numerous dynamically generated datagridviews. Everything is working pretty fine, but for instance if there are three datagridviews in that panel. At least one row is selected as default in each datagridview, So what I want is to get colored only user selected row …

Software Development
Member Avatar for yamini222
0
131
Member Avatar for solarissf

Hi All, I'm trying to return my username in c#, but my Fullname... like John Smith. Right now I am only getting mt actual login to windows, does anyone know how to do this? string strUsr = WindowsIdentity.GetCurrent().Name.ToString(); MessageBox.Show(strUsr); Environoment.username also brings back login... not full name any suggestions???

Software Development
Member Avatar for solarissf
0
112
Member Avatar for superjj

Hi I'm working on a project. i'm using c++ gui windowns forms. when people press the red cross, then the program need to do something before exiting the program. can someone tell me how to make this. what event I need to use. thanks in advance

Software Development c++ gui
Member Avatar for superjj
0
134
Member Avatar for novice20

Hello, can anyone help me regarding how this can be done? I need to declare an 'array' which has 95 indices, and each entry holds 8 bits each of data. am doing this with: PORT_MAP_LEN = 764/8 bit_map_len = [0]*PORT_MAP_LEN but it is giving me list index out of range …

Software Development python
Member Avatar for novice20
0
521
Member Avatar for xanawa

i have buttons and i would liek to make shortcuts from the keyboard to press them. eg. btnAdd = CTRL+A

Software Development
Member Avatar for Momerath
0
130
Member Avatar for xanawa

Hi, I have a value in a string with a semicolene and i would like to remove that semi colene and put a dot. [B]FROM[/B] string a = 10:12; [B]TO[/B] string a = 10.12;

Software Development
Member Avatar for Mitja Bonca
0
118
Member Avatar for computerbear

Hi, I am trying to create a form application with console. I label my text box using, this.Test = "Assignment 8". There is a button saying press me. When button is pressed, the box that comes up needs to say Click me in the title area. I can't find anything …

Software Development
Member Avatar for computerbear
0
2K
Member Avatar for bhagawatshinde

Hi Everybody, I am developed an application software in that i want to use notification Icon. But it seems to doesn't work for me. can anybody help me? Here is my code [CODE]private void button29_Click(object sender, EventArgs e) { notifyIcon1.Visible = true; notifyIcon1.ShowBalloonTip(2000, "Hello", "Hi", ToolTipIcon.Info); }[/CODE] it will not …

Software Development c#
Member Avatar for bhagawatshinde
0
250
Member Avatar for abelLazm

hi... I made two class assemblies to use with my project now I want to make DLL of these class libraries so that deployment will be easy. can any one help me how to convert a class library to DLL. or com object Thanks in advance

Software Development c#
Member Avatar for abelLazm
0
303
Member Avatar for VernonDozier

I've done Hello World programs with Visual C++ Express 2010 before, but I always checked the "Empty Project" option. This time I selected a Console project and took the defaults. Program is below. [code] // HelloWorld.cpp : Defines the entry point for the console application. // using namespace std; #include …

Software Development c++ visual-studio
Member Avatar for VernonDozier
0
1K
Member Avatar for james6754

Anyone let me know what is going on here? Think it is something to do with the scope. [CODE] double answer; if (sender is System.Windows.Forms.Button) { try { answer = Convert.ToDouble(answerBox.Text);//if cannot convert } catch (Exception ex) { MessageBox.Show("Enter a valid number" + ex.Message(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } } …

Software Development
Member Avatar for TheJohnSpecko
0
90
Member Avatar for tikoti

Hi all, I have been doing for fun this problem in projecteuler.net. The problem is as follows: +++++++++++++++++++++++++++++++++++++++++ Peter has nine four-sided (pyramidal) dice, each with faces numbered 1, 2, 3, 4. Colin has six six-sided (cubic) dice, each with faces numbered 1, 2, 3, 4, 5, 6. Peter and …

Software Development mathematics python
Member Avatar for TrustyTony
0
519
Member Avatar for Suzie999

I am trying to compare a string literal with a string downloaded from a webpage. Here is my code. [CODE]using System; using System.Collections.Generic; using System.Text; namespace testsource { class Program { static void Main(string[] args) { string source = getPageSource(@"http://www.mywebsite.co.uk/index.php"); string fromsource = source; Console.WriteLine(fromsource); //Displays Text Here in console …

Software Development
Member Avatar for Suzie999
0
103
Member Avatar for TheBadger

Compare the two and just return how many match, don't need to know which ones matched Having a bit of brain freeze on this right now, any got any ideas?

Software Development
Member Avatar for Mitja Bonca
0
119
Member Avatar for gruffy321

[CODE] Private Sub Combo1_Change() With Me.Combo2.Enabled = False Select Case Me.Combo1 Case "bob" Me.Combo2.Enabled = True Case "carol" Me.Combo2.Enabled = True Case "jeff" Me.Combo2.Enabled = False Case "freeda" Me.Combo2.Enabled = false Else: Combo2.Enabled = False End Select End Sub[/CODE] Hi all , this code seems to be wrong as i …

Software Development visual-basic
Member Avatar for gruffy321
0
130
Member Avatar for mklein

Dear all I am totally new to visual C#. Whilst I can sort of manage console apps, I easily get lost when it comes to coding forms. I am currently making an "app launcher" which reads a text file line by line. Each line is a path to a useful …

Software Development app-store
Member Avatar for mklein
1
126
Member Avatar for Saith

First, my program works. I'm posting my code for my own personal benefit with the help of your guidance to know of any better way of handling this code. I was considering the use of [CODE] while(cin >> grabname) [/CODE] to possibly continue grabbing from the input stream until '\n' …

Software Development c++
Member Avatar for vijayan121
0
307
Member Avatar for marrkee

hello, i wrote a little program, but There are some problems. Can anyone help me? here is the code: [CODE]#include <iostream> #include <math.h> #include <fstream> using namespace std; bool tikrinimas(const char *filename) { ifstream failas(filename); return failas; } int main () { tikrinimas("example.txt"); bool failas; if (failas==true) {cout << "good";} …

Software Development c++
Member Avatar for Narue
0
105
Member Avatar for solarissf

Good Morning All, Let me start by saying I am completely new to programming in c#, however I do have some VBA experience. That being said I have hopefully a simple thing I am stuck on. On a windows form I have a textbox that I have set READONLY = …

Software Development
Member Avatar for jbisono
0
295
Member Avatar for CrankyMero

Hello everyone, So im been looking around and i havent been able to find info of this problem that i have, so this is the main thing I have this datagridview of an inventory, and i added an extra column(unbound) to the dgv, so what i want to be able …

Software Development vb.net
Member Avatar for CrankyMero
0
1K
Member Avatar for Mr.BunyRabit

Hey there =) i have 2 tables with a relationship between them. a Primary key in the one table, and a secondary key referencing the primary key, in the second table. Now usually when i want to display data in my db i INNERJOIN the two tables, so i can …

Software Development mysql
Member Avatar for BitBlt
0
206
Member Avatar for solarissf

Hello All, I've been scouring the internet for code on sending email through lotus notes and this is what I found: [CODE] static void SendNotesErrorMail( string err, string file) { //Pass in file name string filename = file; //Pass in error message from TryCatch string errMessage = err; //Create new …

Software Development email session
0
87
Member Avatar for jimmymack

[CODE]// student.cpp - Script 9.7 #include <iostream> #include <string> // Declare the Person class. class Person { public: Person(std::string theName); void introduce(); protected: std::string name; }; // Declare the Teacher class. // Teacher inherits Person. class Teacher: public Person { public: Teacher(std::string theClass); void teach(); void introduce(); protected: std::string clazz; …

Software Development c++
Member Avatar for jimmymack
0
159
Member Avatar for aaronmk2

I commented by the last line. I am trying to print out the string in reverse. [CODE] #include <iostream> using namespace std; void add(string n); int main() { string B ="ABCDEF"; add(B); } void add(string n) { if(n.length() <= 1) { cout<<n[0]<<endl; return; } else { cout<<n[n.length()-1]; add(n[n.length()-1]); //this lines …

Software Development c++
Member Avatar for Euphan
0
81
Member Avatar for jinglylime

Hi guys, Im trying to write a program that find the biggest rectangle by its area. I've tried and it doesnt seem to compile. Can you help me please, thanks. [CODE] public class Rectangle { private int width; private int height; public Rectangle(int width, int height) { this.width = width; …

Software Development java java-swing
Member Avatar for jinglylime
0
112
Member Avatar for munitjsr2

When reading books I was thinking that data hiding was to hide the data from the user so somebody who is using a C++ executable is an user and data hiding is implemented to hide the hide the data from the user( somebody who is using the exe file produced …

Software Development c++
Member Avatar for Clinton Portis
0
162
Member Avatar for chad33

[CODE]import java.io.FileReader; import java.util.Scanner; public class diverScores { public static void main(String[] args) { Scanner kb = new Scanner(System.in); double [] score = new double [8]; double totalScore = 0.00; Scanner fileScanner=null; try{ fileScanner= new Scanner(new FileReader("divingdata.txt")); }catch(Exception e) { System.out.println("Input file not found"); System.exit(1); } while(fileScanner.hasNext()) { String fileLine …

Software Development java
Member Avatar for JamesCherrill
0
249
Member Avatar for Shansal

Hi, I have a list of lists such as : [[foo,1],[baz,1],[foo,0],[bar,3],[foo,1],[bar,2],[baz,2]]. I want to get all the different items in the inner lists and find the total number of them. I mean the result should be like : [[foo,2],[bar,5],[baz,3]]. How can I do this task? Thanks in advance.

Software Development python
Member Avatar for TrustyTony
0
175
Member Avatar for Jaymz

So I have a task to write the algorithm for eratosthenes' sieve. The code works fine apart from the fact that it just won't print the newline when i need it. It just ignores the syscall for printing. I tried googling but couldn't find anything similar to my problem. The …

Software Development algorithm assembly
Member Avatar for Jaymz
0
2K
Member Avatar for missc

what is the best regex to validate email. i would like to validate it to be a valid email not ex : [email]abcd@efgh.ijk[/email]

Software Development email regex
Member Avatar for missc
0
125
Member Avatar for kas04

The Predator‐Prey game is a simple board game where bugs (predators) and ants (preys) move freely across the board. The following is a description of the game rules: -Predators and preys move on a 2‐dimensional closed grid -Predators and preys are not allowed to move outside the grid -The game …

Software Development c++
0
120
Member Avatar for weblover

Hello everyone i have a text file that contains something like this. [CODE] 1 AC AT RR cOO 2 EE cFF HGB cEVY 3 WDU RWS cTY NBE [/CODE] but it contains a lot of rows and that's an example of the data what i want to do is to …

Software Development shell-scripting
Member Avatar for weblover
0
139
Member Avatar for abelLazm

hi... I am using sorted dictionary to add nodes in a hierarchy but i have to show multi-parent multi-child relation but sorted dictionary doesn't allow duplicate entries :( is there any way if yes please suggest I will be honored Thanks in advance

Software Development programming-construct
Member Avatar for abelLazm
0
161
Member Avatar for ghost_from_sa

Hey guys I've been asked to create an array of objects on the heap for my assignment but I cant seem to find any examples that explain it well enough on the web. So what I got is: [CODE]//Heabder File class Wheel{ public: Wheel() : pressure(32) { ptrSize = new …

Software Development c++ oop programming-construct
Member Avatar for ghost_from_sa
0
191
Member Avatar for munitjsr2

[code] #include <iostream> #include <vector> #include <algorithm> using namespace std; class A { public : void getData(); void putData(); bool operator==(const A &) const; private : int x; char name[90]; }; vector< A > v; void A :: getData() { cout << "id = "; cin >> x; cout << …

Software Development algorithm c++
Member Avatar for mike_2000_17
0
2K
Member Avatar for lianpiau

The problem is Red color there. when add record into table. I want have same LoadingNo but different RecNo. But I'm using this only can add record until 2 only. Expert please help me!! [CODE]private string CalculateNewRecordNumber(string record) { string[] data = record.Split('/'); DateTime currentDate = DateTime.Today; int recordYear = …

Software Development dataset
Member Avatar for lianpiau
0
206
Member Avatar for ceyesuma

When I parse this date: [code] SimpleDateFormat sdf = new SimpleDateFormat(); Date utilDate=sdf.parse(txtFieldArray[i].getText());//12/31/1955 java.sql.Date sqlDate=new java.sql.Date(utilDate.getTime()); instructorBean.setStartDate(sqlDate); [/code] error [code] May 9, 2011 7:10:43 PM view.forms.profileForms.InstructorProfileForm actionPerformed SEVERE: null java.text.ParseException: Unparseable date: "12/28/1955" at java.text.DateFormat.parse(DateFormat.java:337) [/code] Can someone show me some code on a date that can be parsed?

Software Development java
Member Avatar for ceyesuma
0
456
Member Avatar for jimmymack

[CODE]// rational.cpp - Script 9.5 #include <iostream> #include <string> // Declare the class. class Rational { public: // Constructor: Rational(int num, int denom); // The overloaded methods that implement // arithmetic functions: Rational operator+(Rational rhs); Rational operator-(Rational rhs); Rational operator*(Rational rhs); Rational operator/(Rational rhs); void print(); private: // normalize() will …

Software Development algorithm c++
Member Avatar for jimmymack
0
155
Member Avatar for jimmymack

So I have a book on C but have Dev-C++ IDE and was wondering if I could learn C from that book whilst using the Dev-C++ IDE? Many thanks in advance!!

Software Development c++ ide
Member Avatar for TrustyTony
0
537
Member Avatar for tundra010

Hello! I have just started learning assembly language, and I have decided to use the NASM assembler. I made a small program, included below, that is supposed to take a number, add 5, and print out the final result. The program correctly prints the prompt, and takes a value, but …

Software Development assembly daniweb-bug
Member Avatar for tundra010
0
244
Member Avatar for gingerfish

i know how to add many things into arraylist at once, like: [CODE] String [] things = {"eggs ", "pie ", "lasers ", "hat "}; List<String> list1 = new ArrayList<String>(); for (String x: things) list1.add(x); [/CODE] but is there a way to add things into arraylist iteratively one by one?

Software Development java
Member Avatar for JamesCherrill
0
169
Member Avatar for gingerfish

hey guys, when do we use "long"? and what is it anyway? like: [B] public [COLOR="Red"]long[/COLOR] someStuff([COLOR="Red"]long[/COLOR] n) { ..... ..... } [/B] thanks :)

Software Development java
Member Avatar for gingerfish
0
151
Member Avatar for stereomatching

compiler : g++ of gcc4.5.2(minGW) os : windows xp sp3(32bits) [code] template<typename T, template<typename> class CONT = AccumulationTraits > class Accum { public : static typename CONT<T>::AccT accum(T const *beg, T const *end) { typename CONT<T>::AccT total = CONT<T>::zero(); while(beg != end) { total += *beg; ++beg; } return total; …

Software Development c++ legal
Member Avatar for stereomatching
0
149
Member Avatar for l1nuxuser

hello everybody. i bulding now a software with a data-base i am using MFC lib. i need help how to add, edit & use data base in vc++ tks biny.

Software Development c c# c++
Member Avatar for Ancient Dragon
0
204
Member Avatar for missc
Member Avatar for TheJohnSpecko
0
87
Member Avatar for Morten Brendefu

Dear knowledgeable ones A new problem have arisen. I have now an SQL database file with about 100 tables in it. I would like to automatically go through all of these tables and check if the column "Owner" exist. If this field does not exist, then it should be created …

Software Development delphi pascal sql
Member Avatar for Morten Brendefu
0
170
Member Avatar for \007

I have been reading a textbook on Java-- I am a C/C++ programmer so my view of addresses and pointers are based on what I know from those languages. I am trying to make sense of something the textbook said about object addresses. The textbook basically said when one object …

Software Development java
Member Avatar for \007
0
122
Member Avatar for computerbear

Here I am again for my weekly Sunday night help. Sigh. How can I pass my error message into my exception? Thanks. Let me know if you need to see more of the code. [CODE] /* Create an error message that is passed to the Exception class constructor for the …

Software Development
Member Avatar for C#Jaap
0
134
Member Avatar for jmurph333

I am creating a game that requires me to change the background color of a panel, wait 1 second, then change it back. The code I tried was: [CODE] button1.BackColor = Color.Blue; System.Threading.Thread.Sleep(1000); button1.BackColor = Color.DimGray; //Dim Gray is the original color [/CODE] When I use this code it never …

Software Development
Member Avatar for jmurph333
0
131

The End.