132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for Tellalca

I want to write and read a Student struct to/from a file. The program works weird . Sometimes reads 52 elements, sometimes 1 element. I couuld not see what the problem is. Help please. [CODE]int main() { FILE *deneme = openBinaryFile("C:\\text\\text.txt"); Student me = {"Mert","Akcakaya",200611004, 0}; Student you = {"Default", …

Software Development c file-system
Member Avatar for mg120
0
204
Member Avatar for king_koder

Hi, How do I find the frequency of each item in a list in Python? For example if there are five 'apple', two 'banana', and so on in the list, how do I write a program so that it displays the item as well as the number of times it …

Software Development apple python
Member Avatar for woooee
0
180
Member Avatar for DishevldPeasant

I am trying to write a program that will take a text file and parse the words into a linke dlist that will be then printed to the screen with a user defined number of characters per line and I am running into some runtime issues with opening and procesing …

Software Development c data-structure linked-list
Member Avatar for Ancient Dragon
0
145
Member Avatar for Lord_Migit

Hey folks, i have a problem with a vector im attempting to program. There are no compile errors but during run time i get an error saying: "Debug Assertion Failed! Program:...filepath\GA.exe File:...include\vector Line: 779 Expression: vector subscript out of range" etc... I have tried stepping throught the program to no …

Software Development c++ motherboards-cpu-ram
Member Avatar for Fbody
0
679
Member Avatar for jessekoegler

Hello all, I am having a problem with a c++ assignment. The basic problem is that I have two functions -- one to compute the mean and and one to compute the variance of a subarray from a main array -- arraym.I keep getting an extra parameter in call error …

Software Development c++
Member Avatar for daviddoria
0
830
Member Avatar for sharifyboy7

For my program I am supposed to implement an encryption and decryption algorithm. You will read the input from a file, “plaintext.txt” The file will contain plaintext strings that are all lowercase, and be of the format: 3 hello world 2 how are you Each line contains an integer as …

Software Development algorithm c c# c++ encryption
Member Avatar for sharifyboy7
0
256
Member Avatar for nayefc

Hello, I created a linked list and implemented a deep copy function. However, the copied list skips the head node in the source list for some reason. So assume source list contains the following data in their respective nodes: 1 3 6 7 10 312 The copied linked list will …

Software Development c c# c++ linked-list
Member Avatar for nayefc
0
3K
Member Avatar for triumphost

SKIP to LINE 117 [CODE] #include <iostream> #include <windows.h> #include <fstream.h> #include <stdio.h> #include <stdlib.h> using namespace std; char n , p , m , L , F , E; int v , x , y , O , z , q , R; int main() { SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), 14); cout<<"This …

Member Avatar for WilliamW1979
0
191
Member Avatar for MoZo1

[CODE=JAVA] setFoo(getFoo() + 1); ... private int foo; public synchronized int getFoo() { return foo; } public synchronized void setFoo(int f) { foo = f; } [/CODE] Easy code for a race condition. Easy solution: [CODE=JAVA] synchronize(o){ o.setFoo(o.getFoo() + 1); } ... private int foo; public synchronized int getFoo() { …

Software Development java
Member Avatar for MoZo1
0
200
Member Avatar for koolman123

Well, please excuse my noobiness, and my little skill with C++, but give me a break, I'm young. Not for homework, just for the sake of being able to do it,I was trying to make a code for the Pythagorean theorem, and here is the start of the code (of …

Software Development c++
Member Avatar for Fbody
0
223
Member Avatar for Zviri

Hi, I have a following problem. I have a number in string, for example "123456" and I'd like to convert it to int. This would not be a problem if I knew that the input number will always fit into an 32 bit integer. So if it won't I should …

Software Development c++
Member Avatar for Nick Evan
0
345
Member Avatar for jackocurly0074

Hi guys, Have been doing some wxPython programming and haven't had any major issues until I wanted to display images! Basically I take readings from an external device (simple input device) and set the image in a panel based on this reading. However it seems that the picture does not …

Software Development file-stream gui image python user-interface
Member Avatar for cghtkh
0
136
Member Avatar for NewOrder

i want to make my java project with Jmonkey, is it easier than using eclipse alone?

Software Development java
Member Avatar for NewOrder
0
94
Member Avatar for phfilly

Hey just wondering if someone could help me please with the following: board.h [CODE]public: Piece* Player1Pieces; Piece* Player2Pieces;[/CODE] (a section showing the initialization of the arrays) board.C: [CODE]Player1Pieces = new Piece[18]; Player2Pieces = new Piece[18]; char arrX[9] = {'a','b','c','d','e','f','g','h','i'}; for (int FootCount = 0; FootCount < 9; ++FootCount) { --->> …

Software Development c++
Member Avatar for Fbody
0
276
Member Avatar for meazza

hello fellow programmers. I am having an anoying problem with a Contact book i am making. As the title of this thread suggests i am getting that error but only when i call for a specific function in the program called void search(). All the other functions in the class …

Software Development c++
Member Avatar for meazza
0
292
Member Avatar for frogboy77

Hi, new to this so go easy. I'm trying to store a function i wrote in a file and call it with a header file rather than copy and paste as ive been doing but i keep getting error messages from the compiler. Can anyone point out what i'm doing …

Software Development c++
Member Avatar for frogboy77
0
140
Member Avatar for Pushpasheela

I want to create payslip in java [CODE]public Vector createData() { Vector result = new Vector(); Vector rec = new Vector(); Object[] value = new Object[] {"Employee Name",ename.getSelectedItem().toString()}; rec.add(value); value = new Object[] {"Mary-Kate Olsen", "Ashley Olsen"}; rec.add(value); result.add(rec); rec = new Vector(); value = new Object[] {"Charlie Read", "Craig …

Software Development java
Member Avatar for Taywin
0
132
Member Avatar for Jsplinter

If I'm creating a new char[] to read in a text file: [code]char* pbuffer; pbuffer = new char[length]; [/code] what is the maximum size length can be? Would a std::string be better? pbuffer will only be allocated one time in scope no matter what, and length is not known until …

Software Development c++
Member Avatar for Jsplinter
0
157
Member Avatar for christos312

Hello to all, I have a question, I want to make something like puzzle pieces connecting together in a sequence and when all are in the right place the game will end. [img]http://img94.imageshack.us/img94/1557/36927129.png[/img] I want to use this image. The problem is that the space that the next piece must …

Software Development c# puzzle
Member Avatar for christos312
0
146
Member Avatar for chathuD

Need to retrieve a data row that having minimum sum of 4 [B][COLOR="Red"]red [/COLOR][/B]squared values. i Have done a SP ,but seems to be it was wrong. [CODE]select * select * from SMST as p where p.Source=@Source AND p.Destination=@Destination OR p.Destination2=@Destination AND [Count]=(Select MIN(sourceRoadCount+middleroadcount+destinationroadcount+x1destinationroad2count as [Count]) from SMST ) [/CODE] …

Software Development
Member Avatar for Momerath
0
121
Member Avatar for aishittero

[B][COLOR="Red"]guys help me if these code is correct [/COLOR][/B] [CODE=java]import javax.swing.*; import java.awt.event.*; public class SampleCalc extends JFrame implements ActionListener{ JTextField txtNum1 = new JTextField(); JTextField txtNum2 = new JTextField(); JButton btnAdd = new JButton("+"); JButton btnSub = new JButton("-"); JButton btnMul = new JButton("*"); JButton btnDiv = new JButton("/"); …

Software Development java java-swing
Member Avatar for Taywin
0
84
Member Avatar for roseannes

hey everybody! I want to create a program that counts the number of each word in a sentence given by the user. but I dont know how it is. pls help me...

Software Development java
Member Avatar for roseannes
0
78
Member Avatar for groberts1980

I have a DataGridView control that is bound to a DataTable, and I am using the DataTable to add rows to the DataGridView. I am not using a database in any way, but need to add data to the DataTable/DataGridView using code alone. I need to replace certain columns with …

Software Development vb.net
Member Avatar for groberts1980
0
212
Member Avatar for xterradaniel

Just a heads up, I posted this same question on Dream in code over 2 hours ago and nobody has answered. The link is [URL="http://www.dreamincode.net/forums/topic/197275-checking-for-multiple-keys-pressed/page__p__1153044__fromsearch__1&#entry1153044"]http://www.dreamincode.net/forums/topic/197275-checking-for-multiple-keys-pressed/page__p__1153044__fromsearch__1&#entry1153044[/URL] I have been trying to figure out how to increment or decrement a value if two keys are pressed at the same time (ctrl+, ctrl-). …

Software Development java java-swing
Member Avatar for Taywin
0
161
Member Avatar for daniel-brown

Hi there, I'm new to this whole site and I was hoping to get some help from anyone with this question please. The question was given to us on a worksheet (and no it is not for an exam) however I have been unable to get into contact with my …

Software Development
Member Avatar for jbisono
0
91
Member Avatar for florisvd

Hello, I'm trying to work with I2C and I have the following code: [code] #include <stdio.h> #include <avr/io.h> #include <util/delay.h> #include <compat/twi.h> #define I2C_START #define MAX_TRIES #define I2C_DATA #define I2C_STOP #define i2c_writebyte unsigned char i2c_transmit(unsigned char type) { while (!(TWCR & (1 << TWINT))); return (TWSR & 0xF8); } { …

Software Development c
Member Avatar for florisvd
0
2K
Member Avatar for LianaN

Hello! I would like to be able to change the sequence of rows in the JTable by clicking on arrows, which will be placed on the right side of the JTable. Please, see an attached file to understand the idea. Well, could someone please give me some advices on how …

Software Development java
Member Avatar for LianaN
0
112
Member Avatar for Oblivious21

Hi guys first off i want to say i really enjoy this forum i just signed up but i have referenced it before. so i have a question i need help with. here is the task at hand [QUOTE]A file called [URL="http://www.cs.oswego.edu/~odendahl/coursework/csc212/201009/assignments/03/tables.txt"]tables.txt[/URL] contains ranges that describe multiplication tables. Each line …

Software Development java
Member Avatar for Oblivious21
0
631
Member Avatar for jmcorpse

Hello, I have this probelm posted below. I pretty much have it figured out and it is still in rough draft form. I know it could be optimized better but, I'm not quite sure how to get it to look better. Although, the main reason I am looking for help …

Software Development c++
Member Avatar for Fbody
0
103
Member Avatar for The Hisel

I have a machine that waits for short/long periods of time, and some data that I am writing to the server is being ignored during the transfer. If the machine waits for more than 10 minutes, roughly, I noticed 2 global variables aren't getting reported. The delimiters before and after …

Software Development c++
Member Avatar for The Hisel
0
101
Member Avatar for sundip

Hi All Can anyone tell me about some good tool to auto indent the code c++/objective-c/c with some customization features.

Software Development c++ objective-c
Member Avatar for sundip
0
71
Member Avatar for procomp65

Hi I am battling for days now to send and receive the correct characters to hardware from my code. It works fine in tera term. I have to send ASCII 4 " alt 004" in tera Term to poll the datalogger to return the data stream saved in memory. The …

Software Development
Member Avatar for kvprajapati
0
4K
Member Avatar for Naresh Vaidya

hi i have a problem, in crystal report in VB.net how can i set the paper size A8? plz, guide me.

Software Development vb.net
Member Avatar for Naresh Vaidya
0
92
Member Avatar for krusnik08

codes pls. the format should be like this. DATE: TEXTBOX1 = month/date/year TIME: TEXTBOX2 = time DAY: TEXTBOX3 = day today pls help me. needed ASAP.

Software Development vb.net
Member Avatar for Naresh Vaidya
0
117
Member Avatar for Ulukay

Ive got a big problem. I need to read data from the serial port Ive used serialport from the toolbox , but dont know how to use it. I used to do it on a Amiga like this open serial("serial.device".0.2400.0) rem(open port) repeat GW.w=readserial(0) if gw>29 and gw<128 gewicht$=gewicht$+chr$(gw) rem(at …

Software Development vb.net
Member Avatar for albay
0
276
Member Avatar for johnt68

Greetings;) I have a conversion program with a combo box miles to kilometres kilometres to miles .... type of thing. I have two labels and two text boxes From: Says what converting from typed in To: Outputs the conversion What I want to happen is the label From to match …

Software Development c
0
66
Member Avatar for ecloney

I am new to vb.net and am using visual studio 2008. I am sending data back and forth using the serialport module. I am wondering if there is a way to send a hex byte, rather than having the module ALWAYS convert everything to ASCII. This is extremely obnoxious, and …

Software Development vb.net visual-studio
Member Avatar for albay
0
144
Member Avatar for AirGear

I heard that in order to sell a software created using VB, we must buy a license from Microsoft. Is there anyone know where I can buy it? Or maybe someone can tell me how much it costs? Thanks in advance.

Software Development vb.net
Member Avatar for AirGear
0
179
Member Avatar for rebellion346

Hey guys, so my assignment is making a program that takes 2 measure objects and multiplies them together and displays them in square feet. What I'm trying to do is convert the feet into inches for both of the measure objects, then multiply the added inches together. Then I'm trying …

Software Development c++
Member Avatar for Nick Evan
0
147
Member Avatar for Mattisc

Hi, I have managed to create a connection via SQL Compact server to a local SDF database. I am able to query the data and retrieve the information. The only problem is trying to delete a record. When I run the code no error's are produced but the record is …

Software Development open-source sql
Member Avatar for kvprajapati
0
820
Member Avatar for onus

Hi, I am reading and understanding code from a book. I am copy pasting the exact code which I have. Following program is for client.c [code=c] #include<sys/types.h> #include<sys/socket.h> #include <stdio.h> #include <sys/un.h> #include <unistd.h>> #include <stdlib.h> int main() { int sockfd; int len; struct sockaddr_un address; int result; char ch …

Software Development c client-server
Member Avatar for onus
0
153
Member Avatar for Ramon78

Hi all, In my C# application I have a SQL database with a table called Customers. In this table I have several columns like Name, Street, ZipCode and City. I already managed to get data in and out the database with the use of datasets, tableadaptors and bindingsources and get …

Software Development sql
Member Avatar for jas@yahoo.co.in
0
1K
Member Avatar for lady_lily

hello anyone, hope you could help me, im working for my project a mini system in title Test Banking system, definitely its an examination system that might use at our guidance office for students to do their entrance examination. Im just beginner and doesnt have idea on how do i …

Software Development visual-basic
Member Avatar for AndreRet
0
283
Member Avatar for LianaN

Hi! I have a question regarding the SQL Select and "try...catch". The problem is that my SQL Select statement could sometimes return empty sets. For this reason I'm using "try...catch" statement. However, it doesn't work - the error message is generated for the empty set. So, how could I solve …

Software Development java sql
Member Avatar for LianaN
0
632
Member Avatar for jdiddy

hi i am creating an applet where you click on the button and it adds an image and text to a list, which then will be displayed in a JOptionPane but the Image will not display but the text does. code is as followed; Add the items [code] String additem …

Software Development image java
Member Avatar for jdiddy
0
538
Member Avatar for oceanside013

hey guys, my code requires a toString method and an equals method. My question is, did i do them correctly? im a bit confused on this topic, Any help, im greatful for, and the toString and equals methods are at the bottom, Thank you so much. [CODE]import java.util.*; class Scores …

Software Development java
Member Avatar for JamesCherrill
0
166
Member Avatar for jgehlot09

I want to generate 1billion random integer with no duplication, I dont know how do I allocate memory for such a huge amount of data.

Software Development c
Member Avatar for Adak
0
114
Member Avatar for suganzeni

Hi all Hi to move a label box from left to right and right to left with the help of timers. Also how to change the fore color of the label (RAndom colcors )with the help of timers Thanks in advance

Software Development vb.net
Member Avatar for mzoner
0
1K
Member Avatar for watery87

Hi guys, i just written a simple program which requires some date verification. However im facing some trouble with the input Problem 1: if the input has more than 8 chars, garbage characters gets printed Problem 2: if input contains invalid values(like negative), error gets printed Problem 3: if input …

Software Development c++
Member Avatar for watery87
0
122
Member Avatar for jakefrog

Hello. I need my tag like this: [code] <?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <EnviarArquivo xmlns="http:(CLIENT LINK)"> <Sistema>1</Sistema> <Chave>1</Chave> <Solicitacao>1</Solicitacao> <OK>TRUE</OK> <Observacao></Observacao> <Arquivo>1</Arquivo> </EnviarArquivo> </soap:Body> </soap:Envelope> [/code] my when the server get my request its going like this: [code] <?xml version="1.0" encoding="utf-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body …

Software Development client-server delphi pascal xml
Member Avatar for DUAN20041
0
378

The End.