43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for Tops

Hi... Pls, how do i do character occurrence using dictionary in python. I want to count the number of each characters in a poem like this .. A----25 G---10 etc...

Software Development python
Member Avatar for d5e5
-1
115
Member Avatar for jason.

Say I have a file of string[20] . I can easily write to this, but as soon as I try to receive the data I get incompatibility errors. So I make a string[20] variable to see if I can read into it. I cannot. It just says incompatible types. When …

Software Development delphi pascal
Member Avatar for jason.
0
125
Member Avatar for moein_soltani

Hi every body... this(attachment) is my code for implemention of Huffman code,this code must read every file and compress them, it works on many test file but if I input test.txt it give an Error... How can i solve this error ... and the next problem is if we input …

Software Development c++
Member Avatar for moein_soltani
0
2K
Member Avatar for chetanbasuray

Ok.....I have 3 forms...the first form has a table with Number,Item_Code,Item_Description and opening_balance as its attributes. The second table has purchase_number,Item_Code,Item_Description,purchase_date and quantity purchased as its attributes and the 3rd table has issue_number,item_code,number_of_issues,issue_date,issue_to_whom,name_of_person, returnable_or_non-returnable ,balance and remarks as its attributes... the item codes in the 2nd nd 3rd table may …

Software Development
Member Avatar for chetanbasuray
-3
152
Member Avatar for abhimanipal

Hello People... I found this sample code online [code=c ] int main(int argc, char* argv[]) { struct bitfield { signed int a:3; unsigned int b:13; unsigned int c:1; }; struct bitfield bit1={2,14,1}; printf("%d",sizeof(bit1)); return 1; } [/code] I compiled this code on linux with gcc compiler and the output I …

Software Development c
Member Avatar for abhimanipal
1
94
Member Avatar for free2rhyme2k

Hi there, I'm putting together a simple client and server to receive packets containing video data. Here is the part where data is read. The data packets contain typically around 1000 - 1500 bytes of data. [CODE] int getNoPackets = 0; int packetsWrittenToFile = 0; for (i=0; i<NPACK; i++) { …

Software Development c client-server file-system
Member Avatar for free2rhyme2k
0
2K
Member Avatar for CSW110

Hi, unsurprisingly this is my first post :) I want to learn C# mainly to support work in Excel and I was wondering what development tools I need. There are so many variations from MSDN to Visual Studio Standard and others. I am a competant programmer in other (some odd) …

Software Development c# visual-studio
Member Avatar for ddanbe
0
174
Member Avatar for bharatk

Hello I'm making an GUI app to open a image and zoom it. This function is used to open the image & display it: [CODE] def file_open(self): filename =askopenfilename(filetypes=imageTypes) image1 = ImageTk.PhotoImage(Image.open(filename)) self.canvas.config(height=image1.height(), width=image1.width()) self.canvas.create_image(2, 2, image=image1, anchor=NW) self.image = image1 self.img_zoom(image1) # passing image1 to img_zoom function[/CODE] The image …

Software Development gui python tkinter
Member Avatar for bharatk
0
383
Member Avatar for Coomanperson

Hi everyone, new to the DaniWeb community, i have always used it for homework help in the past, but i'm about to rip my hair out if i stare at this code for another hour. basically the project is to write a code that reads data from a file, gets …

Software Development c c# c++
Member Avatar for Coomanperson
2
173
Member Avatar for Dedodido

Hi, I'm writing a small program to simulate a projectile moving through air in a gravitational field. I have several classes for vectors, the gravitational field, and the projectile itsself. However, when constructing any of these objects in the main method, I get a "cannot find symbol" error, despite the …

Software Development java
Member Avatar for Dedodido
0
136
Member Avatar for rwbarrette

Once again, I'm stuck on a wx.python issue with regards to the floatcanvas. So... I have a script that erases and redraws an image in the canvas, based on changes made to two slider widgets (sldMFI, sldIDT). Before it redraws, I'm trying to define the current zoomed view as the …

Software Development python
Member Avatar for rwbarrette
0
346
Member Avatar for turbomen

Dear ALL, Hi. Long time no see. How are you? I have come back to Programming class already. Could you tell me how can I start to VCL Forms Application if I use Delphi6? Cheers, turbomen

Software Development pascal
Member Avatar for finalist
0
587
Member Avatar for MGIndia

hi !!! I am making a window application in which I want tree view in left panel .For each nodes (the nodes here are outlook messages stored in a vault,) click I want the corresponding outlook message to be displayed in right panel . The outlook message in the right …

Software Development
Member Avatar for kvprajapati
0
175
Member Avatar for Mueni

Hey everyone. i am stuck with some work kindly help A.S.A.P!! Its for Java. Thanx!! 1. Write an application that reads an integer and determines and prints whether it is odd or even. Hint use the remainder operator 2. Write an application that reads two integers, determines whether the first …

Software Development java
Member Avatar for javaAddict
-2
210
Member Avatar for Yodamadashi

Hello, I have been working on a very simple Python Game so far (Not using pygame atm) and I ran into a problem that is very simple but I just do not know what to use to get it to work. Basically what I have right now is that the …

Software Development python
Member Avatar for sharmine
-1
719
Member Avatar for new_2_java

Hi all, In my program I need to create 2 log files, success and error. But I need to create either one of them, depending on the out come of the program execution. In other words, if program fails for any reason, I need to create the error log file …

Software Development java
Member Avatar for kvprajapati
0
1K
Member Avatar for kgkamaraj

HI, Can any one know how to convert byte array into char array. For example : byte buf[]=teststr.getBytes(); Note: buf is byte array. I need to convert this into char array.

Software Development java
Member Avatar for kgkamaraj
0
219
Member Avatar for yila

i have a problem with a program which gets a matrix[3][3] (with values 1-20.) i want to print the index of cells whose surrounding cells all have lower values. in a matrix 0 0 0 0 1 0 0 0 0 it supposed to print only [1][1]. can someone look …

Software Development c
Member Avatar for WaltP
0
179
Member Avatar for letlet_pogs

Hello, I am still a newbie in python. I am trying to slice a string, but I don't know how. [code] def start(): exp = "1+2"; string1 = exp.split("+"); print exp; print "Operator 1 is : " , op1; print "Operator 2 is : " , op2; [/code] I want …

Software Development python
Member Avatar for letlet_pogs
0
127
Member Avatar for dre-logics

I Use visual Basic 8.0 and Mysql 5.0 I have one Table1: Table1: RecordID , Integer = primary key auto_increment NOT NULL Articlenr , Integer Articlename, Char(20) Table1: has nine records: RecordID, Articlenr ,Articlename 1 , 1100, Hamer Big Red 2 , 1110, Hamer Big Blue 3 , 1120, Hamer …

Software Development vb.net visual-basic
Member Avatar for dre-logics
0
117
Member Avatar for jralexander137

So I have to create a method that creates a custom arrow object and then returns it. No drawing is to be done in the method, it will be drawn once it's returned. I think I'm utilizing GeneralPath the correct way and then casting it to a shape properly but …

Software Development java
0
76
Member Avatar for vvashishta

hi all... how can i use TestChanged event of a text box in vb.net... do i need to use any javascript or some other scripting language for same? thanks

Software Development vb.net
0
83
Member Avatar for hwlibra083

Does anyone know how to do this: I need to read data from a .txt file into a multidimensional array that is dynamically allocated from memory. How would one do that? Thanks to whoever can help me!

Software Development c
Member Avatar for hwlibra083
0
1K
Member Avatar for Linux777

Hi, I would like to get the following script to work. The script should search for file that are bigger then 200 and that have been created or modified today! The problem is the comparator == does not work! when i compare the ( $6 == $dat ) i don't …

Software Development shell-scripting
Member Avatar for Linux777
0
97
Member Avatar for comsci2

[CODE] Imports HR.EZTwainLibrary Imports System.Runtime.InteropServices Public Class frmNewScan Private Sub btnSource_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSource.Click If EZTwain.IsAvailable Then 'if TWain services are available EZTwain.SelectTwainsource(Me.Handle) 'select Twain source Exit Sub Else MsgBox("Twain not avaialble.", MsgBoxStyle.Critical) End If End Sub Private Sub btnAcquire_Click(ByVal sender As System.Object, ByVal …

Software Development vb.net
Member Avatar for comsci2
0
2K
Member Avatar for gedas

hey guys, i am trying to create a simple menu using canvas for example [CODE] class Name extends Canvas{ MenuItem menuitem; public Name(){ JPanel panel = (JPanel) container.getContentPane(); panel.setPreferredSize(new Dimension(800,620)); panel.setLayout(null); setBounds(0,0,900,600); panel.add(this); setLocation( 0, 20 ); MenuBar menuBar = new MenuBar( ); Menu menuFarm = new Menu( "About" ); …

Software Development java
Member Avatar for Ezzaral
0
101
Member Avatar for kalehl

I am not sure how to accomplish this, but I am trying to take dates from two fields and using the current date show the progress percentage in a different field. So, if past date is Jan 1st, the current date is "x", the future date is Jan 11th. How …

Software Development vb.net
Member Avatar for kalehl
0
361
Member Avatar for ilyaz

I need to develop a piece of code in an old legacy Visual C++ 6.0 system. I am invoking a stand-alone executable via a system call. This exe is supposed to create a file if processing goes OK or not create one if it fails. The name of the file …

Software Development c++ file-system
Member Avatar for ilyaz
0
202
Member Avatar for txwooley

So I have figured out how to receive output from an application using [CODE]process = subprocess.Popen("my_app", shell = True, stdout = subprocess.PIPE, stderr = subprocess.PIPE) info = process.communicate() [/CODE] But how do I SEND info TO an app? I have an application that asks for a yes(y) or no(n) confirmation …

Software Development python
Member Avatar for txwooley
0
84
Member Avatar for knshn

Hi, I want to take a command with its options as input and execute it with one of the exec() functions. My approach is to take input first and put it in an array by dividing with string tokenizer. Then I call execvp() which takes the array including the command …

Software Development c
Member Avatar for knshn
0
397
Member Avatar for Siren88

Hi, I'm trying to create a program that reads in a line of text. For some reasons, when I try to run the program, "Your input has ---- non-blank characters." comes up under every words. I want it to just come up once at the end. Any help will be …

Software Development java
Member Avatar for donaldw
0
77
Member Avatar for Ana_Developer

Hi, I need to have a grid view that will select only few columns from two tables in the database and show them. I have my own data layer implemented, i.e. I have functions that are pulling all the tuples for a satisfied condition and returning them back to me. …

Software Development
0
79
Member Avatar for cassie_sanford

I am writing a program that computes the tax and tip on a restaurant bill for a patron with a $44.50 meal charge. The tax is 6.75 of the meal cost. The tip is 15 percent of the total after adding the tax. I have to dislay the meal cost, …

Software Development c++
Member Avatar for Fbody
0
413
Member Avatar for scottlafoy

Hello, My problem is, I am trying to format a number into a certian format. The number is 100072305608500 (this is the exact copy from what was passed in) the format it should be in is 100/07-23-056-08W5/00 I am using [CODE]return (string.Format("{##0/00-00-000-00W0/##}}", Convert.ToInt64(wellLocation)));[/CODE] where the # are optional digits. I …

Software Development
Member Avatar for DanielGreen
0
131
Member Avatar for chixm8_49

Hello again. :) I am comparing two nodes (some of my other methods need this method). I am having a problem with this method because it returns false even though both nodes have the same content. What are the problems of this code? Any suggestions? This is the critical part …

Software Development java
Member Avatar for chixm8_49
0
2K
Member Avatar for bobsta

I am trying to render multiple scenes in different window. I am confident that the data is correctly read in from the .txt file and used to initialise the Beam and Segment objects (each Beam object comprises >=1 Segment) However when I attempt to render the scenes the program tries …

Software Development c++ opengl suse
0
81
Member Avatar for qariella

This is what I'm gonna do and I know I havnt got far, but have been searching on google for 5 hours and dont have the solution yet, Your little sister / brother asks you to help her/him with the multiplication, and you decide to write a java application that …

Software Development java
Member Avatar for qariella
0
162
Member Avatar for hosamath

Hi Friends... I use Delphi 2010 application.. To do some calculation I load array of numbers into string grid but some times i have to make some of the rows inactive and do the calculations..Can any body help me out with a code to disable selected rows and do my …

Software Development delphi pascal
Member Avatar for finalist
0
2K
Member Avatar for emilio

hi i created a new OutlookAddIn project. the project adds a custom toolbar button to outlook. when run the project in debug mode, i see the custom button and everything works. i want to install the poject in another computer, i added a new SetupProject to the solution and targeted …

Software Development
Member Avatar for emilio
0
157
Member Avatar for rena0514

Hey i have a program thats due sunday and my teacher doesn't really teach that well....so i'm kinda confused and need help. problem: read a file of positive intergers and then print each lin and then print each number in the line (i've done this part) this is where i …

Software Development java
Member Avatar for jwenting
0
148
Member Avatar for moein_soltani

Hi guys.. In the huffman algorithm I have made an output file contain 0 and 1.. how can I say to compiler that these 1 and zero are bit no Byte. and how can i make the real Huffman output that its size is lesser than the initial file, What …

Software Development algorithm c++
Member Avatar for moein_soltani
0
104
Member Avatar for sleepybug

hey, i was writing this program for complex number calc and when i run it ,it never returns me the right values.. so can u plz make necessary changes where i m wrong.. YEAH AND ONE IMP THING TO TELL U I M BEGINNING WITH POINTERS AND I LITERALLY SUCK …

Software Development c++
Member Avatar for jonsca
0
204
Member Avatar for caribedude

I've been trying to make a synthesis game for my Organic Chemistry class, but when I try to draw some buttons on the screen I get a segmentation fault. I am using some functions for loading taken from Tim Jones's tutorial. I have built a Button class that has the …

Software Development c++
Member Avatar for caribedude
0
246
Member Avatar for kvass

Hey everyone~! I am pretty new to threading but I'm trying to figure it out by playing around with its possibilities. I wrote a program where 2 threads are supposed to "race" to count to 10 and then the first one there says "I win!" and the second says "I …

Software Development java
Member Avatar for kvprajapati
0
117
Member Avatar for ZER09

i have a problem in my code when i go to the method add i successfully go there but i cant go back to the main method someone who can help about this. sorry for my bad english. here is the code: [CODE] package project; import java.util.*; import java.lang.String; /** …

Software Development java
Member Avatar for ZER09
0
127
Member Avatar for learningpython

Hi I have several directories .. ex uselib is one directory with a file usoc.py and def pars has to be called in the file runner.py. I tried to see the existing ways and implement and obviously confused. So please someone let me know the logic behind calling and having …

Software Development python
Member Avatar for learningpython
0
117
Member Avatar for kvass

Hey everyone~! I have been studying for the AP Computer Science exam, and I have a question where I think Barron's is wrong, so if someone could confirm whether I am correct or not please let me know! The following code snippets are given: [CODE=Java] public interface Player { /* …

Software Development java
Member Avatar for kvass
1
89
Member Avatar for MrYrm

Hi, i have a program that runs a loop during that loop if the user types lets say "status" i want a status report if the user didn't give any input no status report should be displayed i played around with getline getchar etc but those wait for user input …

Software Development c++
Member Avatar for MrYrm
0
173
Member Avatar for techno_weenie

I need to parse a file line by line and check if the line is in a valid BNF format and print it out if it is. Below is my BNF grammar: <line> ::= <program names><spaces><uids><spaces><dest IPs><spaces><ports> <spaces> ::= <blank character> | <blank character><spaces> <blank character> ::= ' ' | …

Software Development c
Member Avatar for IsharaComix
0
133
Member Avatar for mikeandike

Hi, I would like to terminate a do until ....loop when future value is greater than 1000 without using a Exit or Continue statement. Any suggestions? Thanks [CODE] Do Until inti > intMonths decFutureValue = (decFutureValue + decMonthlyInvestment) * (1 + decMonthlyInterestRate) If decFutureValue > 1000 Then End if inti …

Software Development vb.net
Member Avatar for mikeandike
0
115

The End.