132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Naqib

hy friend i want a simple example of keyborad event handling . how i call the the keylistener interface method which are implemented in another class, from main method of program. Second when i press any key from keyboard then the keycode and charachter are displayed thanks

Software Development java
Member Avatar for Naqib
0
78
Member Avatar for Simplified

Hello all I'm having a few issues with a Python program in that I am performing decimal calculations on and most values come up as desired, however every so often, when there is a very small decimal, the number is represented like "6.80E-7" rather than the desired "0.000000680". Here's a …

Software Development python
Member Avatar for Simplified
0
216
Member Avatar for Jessurider

[CODE] SqlConnection cn; cn = new SqlConnection("Data Source=.\\SQLEXPRESS;AttachDbFilename=J:\\Rcar\\motion\\db_image.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True"); if (cn.State==ConnectionState.Closed) { cn.Open(); } SqlCommand cmd; string sq1; sq1 = "CREATE TABLE [B]"+TextBox1.Text+"[/B](myId INTEGER CONSTRAINT PKeyMyId PRIMARY KEY," +"myName CHAR(50), myAddress CHAR(255), myBalance FLOAT)"; cmd = new SqlCommand(sq1, cn); try { cmd.ExecuteNonQuery(); MessageBox.Show("Table Created"); } catch (SqlException sqlexception) …

Software Development open-source
Member Avatar for Jessurider
0
225
Member Avatar for kazekagerandy

i am making a hairstyle and makeup software in vb and i need to upload the picture which will be edited, to put a hairstyle and makeup on. ive no idea how i can do it.. it is a virtual makeover software and i need to produce the before and …

Software Development image vb.net
Member Avatar for dxider
0
96
Member Avatar for v_janssens

I'm running a structural analysis program in VS2010 which iterates through a loop up to 4000 times. The program keeps breaking on me around the 960th loop and gives the following error Unhandled exception at 0x0040cd1d in Structural Analysis Program.exe: 0xC000005: Access violation writing location 0x00000000. The error seems to …

Software Development c++ microsoft-access oop
Member Avatar for v_janssens
0
464
Member Avatar for liftthis

I have created 3 files: SmsInbox, SmsGetData and SmsMsg. I don't know if I set this up right. I want Phonenumber, message and time to be stored in the Jlist and when I double click it It will print out the phonenumber, message and time. How do I print it …

Software Development java java-swing
Member Avatar for Ezzaral
0
99
Member Avatar for nip

Hi all, I need to translate my xml data to a new XML file wuth XSLT. I thought I had it, but I only got first row. Need help to write the XSLT. I have XML data exported from access: (using XSLT - to get my file) - <dataroot xmlns:od="urn:schemas-microsoft-com:officedata" …

Software Development microsoft-access xml
Member Avatar for downey214
0
114
Member Avatar for Labdabeta

I have made a header file with a templated dynamic array class that I wish to convert into secure code. The problem is that since all of the code relies on the Template I cannot put it into a static library. Any ideas how I could still make the source …

Software Development c++
Member Avatar for Labdabeta
0
100
Member Avatar for manofhouse

Need help converting from hex to binary any help is very appreciated!! [CODE]#include <string> #include <iostream> class Hex { private: //constructor std::string hexNumber; int decNumber; public: Hex(std::string hNum): hexNumber(hNum) {} Hex(int dNum): decNumber(dNum) {} ~Hex(); int toInt(); std::string toBin(); std::string toHex(); }; [/CODE] it keeps saying i need to put …

Software Development c c++
Member Avatar for VernonDozier
0
417
Member Avatar for audiemurphy67

You probably hear this 1000's of times but I am getting this error. All I am trying to do is pass yardage to the topRow class but it turns to 0 by the time it gets there. Any ideas? [code] using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; …

Software Development
Member Avatar for audiemurphy67
0
109
Member Avatar for paycity

Hello java programmers, I want to draw some squares on layers using Graphics2D, course. Here is my source code with problems: [CODE]import java.awt.*; import java.util.ArrayList; import java.util.List; import javax.swing.*; public class Draw extends JPanel { private static final long serialVersionUID = 1L; private List<Cube> cubes = new ArrayList<Cube>(); public static …

Software Development java java-swing
Member Avatar for paycity
0
1K
Member Avatar for exi

I'm trying to write some code that will write certain variables to a text file and create a simple record system. So when a button is clicked the variables are calculated and written to a text file. How can I set it up so that when the button is clicked …

Software Development java
Member Avatar for exi
0
242
Member Avatar for meet123321

Hi folks , i am working on hastable nowdays and looking ways to optimize my code . Please comment on my below observations and let me know if you have any suggestions. I have an existing implementation of chained hash table (A), which uses singly link list for chaining. typedef …

Software Development c data-structure linked-list
Member Avatar for Narue
0
193
Member Avatar for Kath_Fish

Hi....now I need some helps..because I totally no idea to do that.. Now, I need to read and count the frequency for each items Eg, set of data in text file 1 2 1 3 1 4 [COLOR="red"]2 3[/COLOR] 3 4 Now, i wan to read each item and count …

Software Development
Member Avatar for Mitja Bonca
0
199
Member Avatar for cogitoergosum18

[CODE]#include <iostream> using namespace std; int main() { double firstNo;// first number is stored here double secondNo; double result;//variable for result when first and second number are operated upon char operation;// place to store the user's inputed operation // asks the user to choose the first number cout<< "Enter in …

Software Development c++
Member Avatar for pseudorandom21
0
242
Member Avatar for vivekagrawal

I have a form form1 and there is a search button for searching the doctor when i click search button then a new form opens i.e. form2 and in form2 there is a data grid view control and i want when i select any doctor and click on apply button …

Software Development
Member Avatar for Mitja Bonca
0
109
Member Avatar for leo88

hi, i wants to take the items from a listbox and then store to a dictionary list like this: Dictionary<string, double> sortList3 = new Dictionary<string, double>(); In the dictionary, the key is string and value is double. The listbox content is as below: {1 2} 4 {1 4} 6 {1 …

Software Development c#
Member Avatar for Mitja Bonca
0
180
Member Avatar for burningflower

Hello peeps, I want to test out this program but i am having problems! each time i run it - it goes " java.lang.NoSuchMethodError: main Exception in thread "main" " I know why i am having this error - coz i am missing my "public static void ....." But the …

Software Development java
Member Avatar for JamesCherrill
0
101
Member Avatar for fandango

I'm looking for the best way to make a method available to a sub class (not talking inheritance, polymorphism at all, just standalone classes!) without handing down a million pointers to each sub class. [code] Class A; // contains many instances of other classes. Class Z; // one of those …

Software Development c++
Member Avatar for Fbody
0
208
Member Avatar for I<LateNupurGuha

When [B][I]floating point division[/I][/B] operator is [I]overloaded[/I], it [U]remains nothing[/U] ; :idea:So what is the [COLOR="Green"]role and importance[/COLOR] of [U][B][I]floating point remainder operator[/I][/B][/U],:icon_rolleyes: how it [COLOR="Red"]differentiate[/COLOR] from [B]integer remainder operator[/B] ?

Software Development java
Member Avatar for mKorbel
0
48
Member Avatar for xleon

[CODE]from Tkinter import * master = Tk() def ChangeOpt1(): Options.option_clear() Options.option_add("Apple","Orange","Melon") Options.update() def ChangeOpt2(): Options.option_clear() Options.option_add("Milk","Water","Juice") Options.update() Option1=Checkbutton(text="OPTION1",indicatoron=0,command=ChangeOpt1) Option1.pack() Option2=Checkbutton(text="OPTION2",indicatoron=0,command=ChangeOpt2) Option2.pack() variable = StringVar(master) variable.set("You have to check an option") Options= OptionMenu(master, variable, "You have to check an option") Options.pack() mainloop()[/CODE] I want to do that when I clicked Option1, …

Software Development apple python tkinter
Member Avatar for xleon
0
4K
Member Avatar for kutuup

Hello, I'm working on a simple winsock2 messaging program with a client and a server. The server, which uses the same code as the client, save for some preprocessor directives, compiles fine, but the client throws up 3 unresovled external symbol errors: Error 1 error LNK2019: unresolved external symbol "public: …

Software Development c++ client-server
Member Avatar for kutuup
0
267
Member Avatar for samehere

how can i going next and previous thrugh a button??

Software Development vb.net
Member Avatar for Saikalyankumar
0
93
Member Avatar for pastagage

Hi there, I am a Delphi guy and I am a bit new to C++. I have this annoying error when I try to compile and I have no idea how to solve this: [B]error: request for member ‘GetVector’ in ‘gff’, which is of non-class type ‘TGff_File*’[/B] on line #20 …

Software Development c++ delphi
Member Avatar for pastagage
0
291
Member Avatar for Voidz

Hi DW, I'm extremely new to DaniWeb. I have been coding in C++ for about one month. I'm thinking about coding in Python too. But, I'd like to ask some newbie question's about it first. [B]I'd like to know what it's used for.[/B] [I]I think it's mostly used for web …

Software Development python
Member Avatar for e-papa
0
280
Member Avatar for exo47r28

I can't seem to plot this function with the given information. I'm not sure that my function is correct. T = Tmean + (Tpeak - Tmean)cos(w(t - tpeak)) Tmean is the mean temp. over a year Tpeak is the highest daily mean temp. tpeak is the day that the peak …

Software Development
Member Avatar for exo47r28
0
136
Member Avatar for bigwhiteegg

This question has been bothering me all day. if I'm trying to pull out all strings that are in a txt file and all start with "abcde" is there anyway to find them, and copy the strings?? assuming the txt file contains lots of text

Software Development c++
Member Avatar for bigwhiteegg
0
91
Member Avatar for eileenc87

Dear All, When i execute my queries for Edit and Save for edited subject, there is no updated in my sql database. Appreciate if anyone could lend me a hand for this issue. My queries are as below. Private ConnString As String = "server=localhost; Integrated Security=SSPI;Persist Security Info=False;database=carerpt" Public Sub …

Software Development sql vb.net
Member Avatar for Jx_Man
0
5K
Member Avatar for CorruptionInc

OK, here's my assignment: Write static methods public static double sphereVolume(double r) public static double sphereSurface(double r) public static double cylinderVolume(double r, double h) public static double cylinderSurface(double r, double h) public static double coneVolume(double r, double h) public static double coneSurface(double r, double h) that compute the volume and …

Software Development java
Member Avatar for Spiderpig085
0
659
Member Avatar for e-papa

[CODE]#this function checks if a number is a prime number, #if not it outputs the lowest factor. def isprime(n): """Determines whether a number is a Prime number, Takes a single arguement n, which is the number""" if n==1: return 'Not a Prime number, only has one distinct factor' elif n==2: …

Software Development python
Member Avatar for e-papa
0
221
Member Avatar for kesh1000

hi Q1 could anyone let me know what difference would it make to the program in terms of memory and program speed if i use arraylist or hastable or vectors Q2 which of this is better program practise declare separate vectors or arraylist for different data or use hashtable and …

Software Development java
Member Avatar for jwenting
0
159
Member Avatar for mohit girdhar

how i can implement a java chat server like facebook

Software Development java
Member Avatar for jwenting
0
95
Member Avatar for dustbunny000

I have this code: [CODE]protein="GWEIQPYVWDECYRVFYEQLNEEHKKIFKGIFDCIRDNSAPNLATLVRVTTNHFTHEQAMMDAVKFSEVLPHKKMHRDFLEKLGGLSAPVDNHIKGTDFKYKGKAKNVDYCKEWLVL" pp="LLCCCCCCCCCCCCCCCCCCHHHHHHHHHHHHHHHHHCHHHHHHHHHHHHHHCCCCHHHHHHHCLLLCCCCCHHHHHHHHHHHHHHHHHHHCCCCCCCCCCCHHHHHHHHHHHHCCL" gor="cccccccccccchhhhhhhhhhhhhhhhhhhhhhhccccccccceeeeecccccchhhhhhhhhhhcccchhhhhhhhhhhhhccccccccccccccccccccccceeceeccceec" aber="CCCCCCCCCCCCHHHHHHHCCHHHCHHHHHHHHHHCCCCHHHHHHHHHHHCCCCCCHHHHHHHCCCCCCCHCCHHHHHHHHHHCCCCCCCCCCCCCCCCCCCCCCCCCHHHHHHHCC" for i in range(len(protein)): print i+1,protein[i], pp[i], gor[i], aber[i] [/CODE] I'm trying to compare these strings. However, the output is in a vertical format. How can I print it so that the format is vertical? This would make it much easier to …

Software Development python
Member Avatar for jice
0
232
Member Avatar for Kath_Fish

Hey ...Now i want to compare the two things...I will explain my problem.. Now I got single items and their values For exmple: item: value 2 : 6 1 : 5 3 : 4 5 : 3 i want use this to swap the place for my combination for example, …

Software Development
Member Avatar for Kath_Fish
0
87
Member Avatar for pito_donje

Private Sub Command2_Click() CommonDialog1.ShowOpen Text5.Text = CommonDialog1.FileName Picture1.Picture = LoadPicture(Text5.Text) Text5.Visible = True End Sub

Software Development image pdf visual-basic
Member Avatar for pito_donje
0
141
Member Avatar for Freedom*

write a program which uses a class with the name Student, the class will have as data - name - AM - grade1 - grade2 - grade3 all the data of the class have to be private the program will ask the elements of two students, it will save them …

Software Development
Member Avatar for Freedom*
0
111
Member Avatar for suncica2222

I've made java desktop application,swing gui in netbeans and it works in netbeans but I have 2 problems: 1. I cant export working jar or class files 2. I need to run and build it from cmd line in windows xp I guess that I need to include something in …

Software Development gui java java-netbeans java-swing
Member Avatar for mKorbel
0
3K
Member Avatar for sachintha81

I have a very simple WCF program where I have a simple self-host and a client running on the same computer. There is a single method which returns a System.IO.Stream, which is actually a serialized form of a simple string. (This could be any number of data types, but for …

Software Development client-server http-protocol
0
110
Member Avatar for vivekagrawal

I have a form form1 and there is a search button for searching the doctor when i click search button then a new form opens i.e. form2 and in form2 there is a data grid view control and i want when i select any doctor and click on apply button …

Software Development
Member Avatar for vivekagrawal
0
336
Member Avatar for Arjun_Sarankulu

I am having a form through which user will enter empcode(checking whether it is present in the table) When i click On Login i am getting the following error [B]Invalid column name[/B] [B]cmd.CommandText = "select employee_code from MST_Employee where employee_code = " + emp_code; [/B] In the above select i …

Software Development
Member Avatar for Arjun_Sarankulu
0
130
Member Avatar for Andrewsc1

I am having trouble figuring out how to get my function (lines 45-57) to work. Option Strict is supposed to be on. I am getting the error "Option Strict On disallows implicit conversions from 'Decimal' to 'String'." This is an intro problem so its going to be basic. [CODE]Option Strict …

Software Development vb.net
Member Avatar for Andrewsc1
0
142
Member Avatar for ITKnight

Hi all, I want to save some form setting at registry, my friend told me that vb has a function to save it.. what it is? and how to use it? Please Help Thanks

Software Development visual-basic
Member Avatar for ITKnight
0
701
Member Avatar for ImDead

I have so much trouble in making this thing work. This is what i supposed to do: 1.build program to make histogram 2.The program should also calculate average and median. 3.The array should come from the text file. The problem is..i can build the histogram..but i have problem to get …

Software Development c
Member Avatar for abhimanipal
0
160
Member Avatar for Ancient Dragon

>>Ok, so time() function (argument being null) returns what? It returns the number of seconds since 1970, as you previously posted. It doesn't matter whether the parameter is NULL or not, it will always return the same value.

Software Development c++
Member Avatar for Ancient Dragon
0
372
Member Avatar for Lusiphur

To preface this post I'm going to say that what I'm looking to do is purely in the theorhetical stages at this moment so I don't have any code to share yet. At it's basest essence what I'm attempting to do is compare Image A with Image B to determine …

Software Development c++ image
Member Avatar for arisa12
0
718
Member Avatar for charchar88

I usually program in java but I'm going to implement this in C but the general logic psuedo code should work I would think. these numbers represent these characters: 2-abc 3-def 4-ghi 5-jkl 6-mno 7pqrs 8-tuv 9-wxyz If I were to type in a 7 digit number say 233-7687 as …

Software Development c java
Member Avatar for abhimanipal
0
209
Member Avatar for newack

Problem while running program: java.lang.NoSuchMethodError: main Exception in thread "main" My code is: [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; public class Plane extends JApplet implements ActionListener { JTextField input; JLabel prompt; JButton yesButton,noButton; int section, firstClass,economyClass; boolean seats[]; boolean questionPosed= false; public void main( String args[] ) { prompt …

Software Development java java-swing
Member Avatar for newack
0
214
Member Avatar for Shaitan00

Currently I have a windows service written in C# (running as LocalSystem) which creates a user account, needed for impersonation, by using the DirectoryEntry to add the user/password and associated UserFlags. Then it simply uses this account to perform some tasks (using impersonation) using the LogonUser() functionality - works perfectly. …

Software Development c#
Member Avatar for Shaitan00
0
182
Member Avatar for DelphiGuy

Basically I have a label which I do the following with on start up of my application: [code] with Label1 do begin Caption := 'Computer Locked'; Align := alClient; Alignment := taCenter; Top := 400; end; [/code] Now the problem I have is the alClient and taCenter work perfectly making …

Software Development pascal
Member Avatar for Wolfgan
0
403
Member Avatar for swathys

hi, i would like to check the server datetime when ever my application start. The datetime must be the same with my pc datetime....How do i do that...Is there a way.... i got a code from somewhere but it doesn't work at all...can anyone help me on this.... [CODE]Public Sub …

Software Development vb.net
Member Avatar for swathys
0
1K

The End.