43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for gaurav_13191

I am trying to find out inorder successor of a node in a binary search tree. I read the algorithm from "Introduction to Algorithms,Cormen" and understood it. But the problem I face is that I can't find out the parent of the node when it is needed in the algorithm. …

Software Development algorithm c data-structure
Member Avatar for thekashyap
0
426
Member Avatar for swathys

hi, How do i check for time difference for eg: i have code like this [COLOR="Red"]If GetServerDateTime() < Format(Now, "MM/dd/yyyy hh:mm:ss tt") Then msgbox ("Invalid datetime") endif[/COLOR] i want to make it like if the time difference is within 2 min from the current time.... the application still can allowed …

Software Development vb.net
Member Avatar for swathys
0
352
Member Avatar for keeda

[CODE] #include<iostream> using namespace std; char* Invert(char* input,int start,int end); char* reversewords(char* current); int main(){ char inputstr[] = "London is a city"; cout << "Inverted string : " << Invert(inputstr,0,strlen(inputstr)) << endl; int start,end ,i; while(*inputstr){ if (*inputstr == ' ' || *inputstr == '\0') { Invert(inputstr,start,end); start = i+1; …

Software Development c++
Member Avatar for keeda
0
213
Member Avatar for ThrasherK

I don't understand what I am doing wrong here. I am trying to quickly write this program so that I can use it to test a flowchart diagram that I made earlier. When the output comes up on the console "Enter a course name" and I put any input in …

Software Development c++
Member Avatar for ThrasherK
0
171
Member Avatar for ispeakbinary

I am learning c++ now and have encountered a problem in trying to create single digit addition, multiplication and subtraction math questions. The numbers used in the questions are randomly generated from 1 to 9 and when I try to print the answer for the corresponding question, I get a …

Software Development c++ oop
Member Avatar for prvnkmr194
0
200
Member Avatar for rookanga

I need to make an address book that doesnt use a database. It suppose to have First name Last name Birthday Telephone number Address (street) Address (city, state, zip) Email address All information shall be stored in a structure at run time The application should read and write to a …

Software Development data-structure vb.net
Member Avatar for rookanga
0
293
Member Avatar for valestrom

So i'm making this periodic table kinda program here mainly outta boredom. But I came across a problem, when I type in the name for the element, the program just closes. Any ideas on how to get it to work properly. Here's my current code. [CODE]#include <iostream> #include <windows.h> #include …

Software Development c++
Member Avatar for valestrom
0
153
Member Avatar for sumprit

Hi, everyone i have a problem in displaying Jlabels and Icons in a single JPanel. I have used Gridlayout and tried to display the Icons and JLabels in the JPanel. But using GridLayout the JLabels and Icons get dispersed and not in proper order and also the icon get crop, …

Software Development java
Member Avatar for sumprit
0
174
Member Avatar for ITKnight

Hi all, I already save my login config at registry. Thanks to Jx_Man and Debasisdas for helping me on previous thread. My following code running nicely. [CODE]SaveSetting "AddressBook", "Login", "Username", Trim(txtUserName.Text)[/CODE] My settings currently saved on "HKEY_CURRENT_USER\Software\VB and VBA Program Settings\AddressBook\Login" How i can save it one level more deeper. …

Software Development visual-basic
Member Avatar for ITKnight
0
101
Member Avatar for Resentful

I'm currently working on one of the last parts of a project and I'm at a standstill. I am needing to remove pixels from an image that are smaller than a certain aspect. For example, if an image has a square or triangle that is smaller than 35,35 pixels, I …

Software Development vb.net
Member Avatar for Unhnd_Exception
0
279
Member Avatar for ppatryk

Hi, is it ok to use an if condition as a presence check, this is my code - [ICODE]if (textBox1 != null) { MessageBox.Show("Dont Leave Blank"); } else MessageBox.Show("Successfully added");[/ICODE] my code runs however no matter if there is text in textbox1 or if its left empty it shows "Dont …

Software Development
Member Avatar for gusano79
0
246
Member Avatar for Taimoor Rana

Hello, I'm having trouble displaying an output from my code. It suppose to act like a stopwatch where seconds increment and then minutes and then hours but for some reason its not working and I cannot figure out why... :-( hope some some can guide me. Thanks [CODE]/* * To …

Software Development java java-swing
Member Avatar for Taimoor Rana
0
1K
Member Avatar for penguino138

I need help position a bunch of things. Mostly the text bar. Here's my code: [CODE] package swingHW2; import java.util.Scanner; import javax.swing.*; import java.awt.*; public class swingHW2 { /** * @param args */ public static void main(String[] args) { // TODO Auto-generated method stub // The Layout FlowLayout lout = …

Software Development flash gui java java-swing
Member Avatar for penguino138
0
185
Member Avatar for Aepexx

Here is the output that I should be receiving: [CODE] Please enter the name on the check (First Last): John Doe Please enter the amount for the check (as a float): 123.45 --------------------------- Pay to : John Doe $123.45 one hundred twenty three dollars and 45 cents[/CODE] Now, what I …

Software Development java
Member Avatar for Aepexx
0
180
Member Avatar for leo88

How to get minimum value? [code] ArrayList arrKey = new ArrayList(); double v; double min; foreach (string subKey in sortList4.Keys) { foreach(string mee in arrKey) { sortList5.Add(mee,1); if(sortList3.ContainsKey(mee)) { sortList3.TryGetValue(mee, out v); if(v>min) { //what should do at here? } }}} [/code]

Software Development
Member Avatar for leo88
0
146
Member Avatar for smandape

Hello experts, I am trying to extract the abstract from the following XML code that appears as follow; [CODE] <abstract> <p> In eukaryotes, glutathione S-transferases (GSTs) participate in the detoxification of reactive electrophillic compounds by catalysing their conjugation to glutathione. GST is found as a domain in S-crystallins from squid, …

Software Development xml
Member Avatar for iceandrews
0
113
Member Avatar for MrHardRock

Hey everyone the program I am writing has to find the mode, max, and median from an array. I think I have everything except there is one error I cannot figure out, thanks in advance. [CODE] import TerminalIO.KeyboardReader; public class med { public static int MAX(int[] a) { int MAX …

Software Development java
Member Avatar for MrHardRock
0
104
Member Avatar for globusak

I have a problem that i need to solve, and dont know how to do it. I have two arrays of 80 numbers (array[1..80] of integer) and i want to multiply them, saving the result in another array. I am beginner in pascal, learning it at school, so i have …

Software Development pascal
Member Avatar for Wolfgan
0
704
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 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 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 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 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 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 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 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 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 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 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 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 Simran Kaur

Hello Friends, How to find Lines of Code in VS 2010? Regards, Simran Kaur

Software Development vb.net
Member Avatar for dxider
0
634
Member Avatar for burntout

A company pays its salespeople on a commission basis. The salespeople receive $200 per week, plus 9% of their gross sales for that week. For example, a salesperson who grosses $5000 in sales in a week receives $200 plus 9% of $5000, or a total of $650. Develop a console …

Software Development vb.net
0
169
Member Avatar for ITKnight

Hi all, How i can split a string that include spaces by "&" ? I already used split function but there are problem with spaces. thanks.

Software Development visual-basic
Member Avatar for ITKnight
0
211
Member Avatar for goldeneagle217

I am writing a program that requires toggling between 2 forms. I thought I could use the Hide and Show methods but I need a way for the forms to know about each other so they can Hide themselves and Show the other form. Initially, form1 instantiates form2

Software Development
Member Avatar for goldeneagle217
0
123
Member Avatar for jmcorpse

Can someone help me figure out what I am doing wrong here. I think I may be running my head into this way to many times to see what is wrong with it. The error code is posted below. [CODE] import java.util.Scanner; public class userName { /** * @param args …

Software Development java
Member Avatar for jmcorpse
0
319
Member Avatar for Despairy

hey i have a problem with a code that i cant figure out what it is im "fresh meat" in assembly so might be a few things what i tried to do is 1) open rnd.txt(65kb) file as read/write ( dump.exe it and you get hex numbers on dos) 2) …

Software Development assembly
0
72
Member Avatar for Ssnowlin

I have a reg text box and just want to add the save command, I managed to figure out how to do open but save is giving me problems. I am fairly new at VB.net been coding less then a week so I need all the help you can give …

Software Development file-system vb.net
Member Avatar for Ssnowlin
0
114
Member Avatar for efronefron

I dont have any idea what the problem is. But what I know is it stopped at fgets(temp, 256, stdin); when I run the program, it runs this line and then just stopped because of a segmentation fault. The silly printfs are just for me checking where it stopped exactly. …

Software Development c linked-list
Member Avatar for efronefron
0
129
Member Avatar for FrancisLazo

Hey there guys I need your help as I do not fully understand the program source code below. This program will multiply two numbers without using the multiplication sign (*). I am confused with the highlighted part, the for loop part. Here it is: [CODE]#include <iostream> #include <string> using namespace …

Software Development c++
Member Avatar for FrancisLazo
0
157
Member Avatar for alonewolf23

[CODE]//Created by //Ticket Reservation System of 5 first class and 5 economy tickets import java.util.Scanner; public class Planeticket { public static void main(String args[]) { boolean EconArray[] = new boolean[5]; // boolean array with 5 elements boolean FirstArray[] = new boolean[5]; Scanner input = new Scanner(System.in); int value; for(int i …

Software Development java
Member Avatar for alonewolf23
0
1K
Member Avatar for shack99

Hey everyone, I've got a problem. Say I've got two xml files, a student file and a class file. The class file displays all the students in a class; eg- [CODE] <Class> <Student> a </Student> <Student> b </Student> <Student> c </Student> </Class> [/CODE] And the student file stores the details …

Software Development file-system xml
Member Avatar for ddanbe
0
113
Member Avatar for leo88

hi,I work using window form C#, my problem is as below: output += myArray1[prune]; string ipt = null; while ((ipt=re.ReadLine()) != null) { string ListSplitLineByLine1 = ""; String[] SplitItemLineByLine2 = (ipt).Split(new string[] { "\n\r\t", " " }, StringSplitOptions.None); foreach (string lineByLine1 in SplitItemLineByLine2) { ListSplitLineByLine1 += "\r\n" + lineByLine1; } …

Software Development
Member Avatar for Mitja Bonca
0
2K
Member Avatar for woody0114

Having trouble stopping my do,while loop. It asks the right questions, and I thought I had the right qualifier, while blah>0, do such and such, but it continues in the loop and keeps asking the questions Here's what i've got: cout<<"Now let's subtract the door and window area."<<"How many doors …

Software Development c++
Member Avatar for woody0114
0
96
Member Avatar for tokenjoker187

I am having trouble making a Windows Form Application. I want to proceed to a second form while closing the first (Going from Main menu to Level 1) but I cant seem to figure out why after the 2nd form loads, both forms close out. Here is the code I …

Software Development microsoft
Member Avatar for vivekagrawal
0
104
Member Avatar for chester1908

Hey all.I got a question about the use of action listeners.Actually its more about actionEvents.Anyway,my question is: Supposing i have a frame with four buttons,say "A","B","C","D". I want each time i press a different button something different to appear on TextField.I know i can make 4 different button subclasses,each with …

Software Development java
Member Avatar for chester1908
0
416
Member Avatar for GlenRogers

Hi, I'm new to Java and programming. I have an assignment I'm trying to do and I'm pretty stumped on this question. I have a TreeMap where the keys are Strings (of musical artists) and the values are Lists (of artist name, album title, album genre and album year). I …

Software Development java
Member Avatar for JamesCherrill
0
588

The End.