132,726 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for -ordi-

[CODE]sis = file("file.sis", "r") val = file("file.val", "wt") n = int(sis.readline().strip()) la = sis.readline().strip() alist = [] for i in xrange(n): line = sis.readline().strip() alist.append(line.split()) for i in xrange(n): print map(int, alist[i][0].split(":")), map(int, alist[i][1].split(":")) [/CODE] In: [CODE] 07:34 08:55 10 20 08:25 09:00 10 20 [/CODE] Out: [CODE] 08:25 09:00 …

Software Development file-system python
Member Avatar for TrustyTony
0
140
Member Avatar for Steve Mac

Can somebody help me here? i have managed to import excel data into a datagridview but am having problems saving and updating it. It is saving alright but when it comes to updating that's when i have problems. here is my code: [code] If mysqldr.HasRows Then mysqldr.Close() newcommand = New …

Software Development vb.net
Member Avatar for Steve Mac
0
81
Member Avatar for elsiekins

Simmilar problem again using a vector of length 4 [CODE] vector <char> something; something += '1','2','3','4'; somefunction(something,4); [/CODE] some function takes in a [CODE]char* ptr, unsigned int size[/CODE] at the moment i am getting "error C2664: 'something' : cannot convert parameter 1 from 'char' to 'char *" any help would …

Software Development c++
Member Avatar for elsiekins
0
145
Member Avatar for asifakram

hi all...recently i was given a project of making a scientific calculator using microsoft visual C++....so i downloaded some codes...but there is this graphics.h file which is not supported by VC++ !!. can any one help me with the codes of a scientific calculator in VC++...without using any graphics.h file …

Software Development c++
Member Avatar for Bilal Anwar
0
274
Member Avatar for Translucentbill

I have been working on a text based adventure game as a project for school. I have become very well acquainted with functions, loops, arrays, etc. I now have to begin thinking on a senior project utilizing something we worked with this year and I love to code but I …

Software Development c++
Member Avatar for SgtMe
0
329
Member Avatar for pinkannu

Hi string copy not working with following code VidZone[Loop].pui8Source = (UINT8 **)malloc(FileCount * sizeof(UINT8 *)); for(FileIndex = 0 ; FileIndex < VidZone[Loop].ui32NoOfSourceFiles ; FileIndex++) { VidZone[Loop].pui8Source[FileIndex] = (UINT8 *)malloc(255 * sizeof(UINT8)); strncpy(VidZone[Loop].pui8Source[FileIndex] , pui8SourceString[FileIndex] , 255); } "pui8Source" is a double poiner and `pui8SourceString[FileIndex]` array of character pointers. Please let …

Software Development c
Member Avatar for pinkannu
0
120
Member Avatar for bhagawatshinde

Hi, I am developing an application in vb.net. In one form i am showing the math type equations in the web browser but the text is displayed normally but math type equation not displayed properly. In detail one form i am showing the data in the Richtextbox which contains text …

Software Development vb.net web-browser
Member Avatar for bhagawatshinde
0
388
Member Avatar for kiddie

Hello, i am having with my mastermind game. I try to display black and white pegs but it does not work. Right now i gave up on black pegs and i am trying whitepegs. [CODE]import java.io.*; import java.io.*; public class Mastermind { int a = 0; int p = 0; …

Software Development java
Member Avatar for pbl
0
653
Member Avatar for Sourabh Kosta

Hi there, Every time i am making a program in Java(Advance). I found that it can many errors in it. For example I am Giving u a program written by me //a push button with all features [code] import java.awt.*; import javax.swing.*; import javax.swing.border.*; class Mybuttons1 extends Frame { //vars …

Software Development java java-swing
Member Avatar for seanbp
0
158
Member Avatar for BuhRock

Hi everybody! I'm trying to solve a problem on excel. So it's the following. I need to create a timer where it adds 3 to the variable final each 30 seconds . . This is already done. Now it needs to create an excel sheet and write the value of …

Software Development microsoft-office
Member Avatar for kvprajapati
0
111
Member Avatar for CharliePrynn

Hey, I have this code [CODE]Public Class Form1 Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer) Private Const MOUSEEVENTF_MOVE As Integer = &H1 ' mouse move Private Const MOUSEEVENTF_LEFTDOWN As Integer = …

Software Development vb.net
0
150
Member Avatar for Python_Doofus

Hi, I am trying to create some patterns in python. I am really struggling as to be quite fair, I don't have a clue what I am doing these are the 3 patterns I am trying to create. any help would be greatly appreciated thank you this is some code …

Software Development python
Member Avatar for woooee
0
130
Member Avatar for xxunknown321

i'm trying to come up with an add method for a generic class i created. generally the object i create will be arrays, of type integer double or string. i dont know how to go about making the add method to have stuff added to the array... heres my code …

Software Development java
Member Avatar for ProgrammerAl
0
369
Member Avatar for nore

Hello all, i want to know some textbox case. I want to make my textbox (example textbox1) only can be written by numeral, if there was non numeral input, textbox1 not allow or just being ignored. Thanks for attention or help :)

Software Development vb.net
Member Avatar for nore
0
350
Member Avatar for FutureWebDev

When testing the output of a variable of type double, with [B]expected results = 48.66573405[/B], I am getting an [B]actual result = 48.6657[/B]. Why is the expected result being rounded when the whole idea of using type double is to increase the precision of your calculations? Thanks FWD

Software Development c++
Member Avatar for FutureWebDev
0
188
Member Avatar for jcax

Hi all, I'm trying to create two classes which each of them contain a vector of object of the other class. Below is roughly the idea of what I'm trying to do but it seems that it cannot work as it will end up into infinite recursion or something. What …

Software Development c++
Member Avatar for jcax
0
132
Member Avatar for rgutierrez1014

Hi everyone, So I have a binary tree class, Stree, that holds names of cities and pointers to other cities. Running the program and typing "insert Memphis Atlanta" inserts a node with Memphis, and inserts a node with Atlanta as Memphis's left child. Typing "insert Memphis Tampa" inserts a node …

Software Development c++
Member Avatar for gerard4143
0
191
Member Avatar for vedro-compota

Do I understand that by using the following code [CODE] a = getchar(); b = getchar();[/CODE] , after pressing "1" and "Enter" keys ( Enter - to continue programs work), we can derive the following variables - [CODE]a = '1'; b= '\n';[/CODE] thanks in advance))

Software Development c
Member Avatar for vedro-compota
0
98
Member Avatar for vadalaz

I'm supposed to define a function that removes all nodes with a specified value from a linked list. I have to use this structure: [CODE=c] typedef struct LIST { int Object; struct LIST *Next; } LIST; [/CODE] and here is the function I wrote [CODE=c]void LDeleteElem(LIST **List, int Elem) { …

Software Development c linked-list
Member Avatar for vadalaz
0
113
Member Avatar for Random_Integer

I know you can, [CODE]frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);[/CODE] but is there a way to get it to execute a method and then exit? example.. [CODE]frame.setDefaultCloseOperation(saveData, JFrame.EXIT_ON_CLOSE);[/CODE] just a guess? thanks all

Software Development java
Member Avatar for Random_Integer
0
123
Member Avatar for Akill10

Hi, I am pretty sure there is a more effective way of achieving this. Would love for some input from you guys. Basically, I have a class called GamePanel and it contains this: [CODE] SpaceShip spaceship = new SpaceShip("Galatar"); public void paintComponent(Graphics g) { Graphics2D g2d = (Graphics2D) g; g2d.drawImage(bgI,0,0,null); …

Software Development image java
Member Avatar for Akill10
0
178
Member Avatar for aria12

ok, below is the code that i have tried and still not working; #include <stdio.h> int main () { char Name; int Age; int Date_Of_Birth; float Place_Of_Birth; float Email_Address; printf ("Name:"); scanf ("%c",&Name); printf ("Age:\n"); scanf ("%d",&Age); printf ("Date Of Birth:\n"); scanf ("%d",&Date_Of_Birth); printf ("Place Of Birth:\n"); scanf ("%s",&Place_Of_Birth); printf …

Software Development c c# c++
Member Avatar for gerard4143
0
116
Member Avatar for MarounMaroun

Salam, lets say I have declared: [code=c]int* array=new int[SIZE];[/code] (I used this array as if it was a 2D array - lets say that I'll consider these dimensions: row, column). and I want to pass this array to a function that will fill the array row by row. (The function …

Software Development c++
Member Avatar for abdelhakeem
0
144
Member Avatar for endro

Hey all, I need some help on this program cause I'm stumped. Everytime I compile this program is gives me an error of either "cannot find symbol" or "int cannot be dereferenced". I'm still playing around with the code but I might have to put the other class in a …

Software Development java
Member Avatar for endro
0
137
Member Avatar for muraj

/*1st - What I want to do is have the user input 2 numbers. Program should determine which is lowest and highest, then spit it out. Then I’m trying to have the user input a 3rd number that is equal to or in between the lowest number and highest number. …

Software Development java
Member Avatar for Akill10
0
140
Member Avatar for rhn94

I've been writing a pig latin translation program for a week in class now and i've gotten so far but now i don't know what to do. i need to check if the word has a vowel as the first letter then only add ay in the end if it …

Software Development c c# c++
Member Avatar for rhn94
0
739
Member Avatar for FutureWebDev

The program below is executing fine but when I enter the last of 10 numbers and the final output(shows the average of the 10 numbers) is displayed, I get the following error message: Run-Time Check Failure #2 - Stack around the variable 'numbers' was corrupted. If someone could explain what …

Software Development c++
Member Avatar for FutureWebDev
0
197
Member Avatar for localp

I am using VS2008, OS win vista. i am in the process of coding an application that would tab automatically (this is just an example, not the code i am intending to do). So basically, what i expect is to write a C++ code that could press the 'tab' button …

Software Development c++
Member Avatar for Fbody
0
11K
Member Avatar for vinitmittal2008

I am using CODEBLOCKS and I am creating a program that performs basic operations like add, delete and insert on Doubly LinkList , My Program is working fine on older Turboc compilers. But when i run it on codeblock its causing problem when i try to delete a node. [CODE] …

Software Development c
Member Avatar for vinitmittal2008
0
223
Member Avatar for mqtgirl

I need to open a webbrowser using python watch the email and password populate in the form, programmatically submit the form and keep the cookies while navigating through the web site. Any help would be greatly appreciated.

Software Development python
Member Avatar for woooee
0
155
Member Avatar for amari ♥

i'm new to array. we were given this exercises to be solved: but i have question about [I][COLOR="Green"]letters of ten elements[/COLOR][/I], [I]array integer which is called [COLOR="green"]totals[/COLOR][/I], [I]contents of the character array called [COLOR="green"]words[/COLOR][/I], arrays elements and a lot of stuff that seems to be going with it. thank you. …

Software Development c
Member Avatar for Trentacle
0
127
Member Avatar for jcb0806

Using VbScript:: I have a list of several different prices and I'm trying to figure out how to round these 5 decimals adding zeros if necessary. For example: I want 2.84 3.1 4.896 to look like 2.84000 3.10000 4.89600 Can somebody please help me? Thanks!

Software Development vb.net vbscript
Member Avatar for jcb0806
0
212
Member Avatar for MarounMaroun

[code=c] #include <cstdlib> #include <iostream> static void fillArray(int **array); int main() { //allocating a 2D array int **array; array=new int*[10]; for(int i=0;i<10;i++) *(array+i)=new int[5]; //sending this array to a function fillArray(array); for(int i=0;i<10;i++) for(int j=0;j++;j<5) std::cout<<array[i][j]; for(int x=0;x<10;x++) delete[] array[x]; delete[] array; return 0; } static void fillArray(int **array) { …

Software Development c++
Member Avatar for alexchen
0
84
Member Avatar for alexchen
Member Avatar for alexchen
0
214
Member Avatar for bob24bob

So i've been working on this code that i got online and it is a chat server code. This is the code- [CODE]# import needed modules: from socket import * # get sockets, for well, sockets import string # string functions import time # for sleep(1) function # define global …

Software Development python
Member Avatar for bob24bob
0
806
Member Avatar for anilopo

A - an interface. B,C,D - implement A. in an other class, say X, i have an array of A, that will hold some B, C, D. i have a method that get (int i, A a) and put the a in the i place of the array. ->>>> how …

Software Development java
Member Avatar for anilopo
0
82
Member Avatar for alexchen

Error 1 error C2440: '=' : cannot convert from 'const char [2]' to 'char' [CODE]bool word(char *Filename){ int r,number,length; ifstream file; file.open(Filename); file>>number; srand ( (unsigned)time ( NULL ) ); r=rand() % number+1; string input,word; for(int i=0; i<r; i++) getline(file,input); length=input.length(); for(int l=0;l<length;l++)word[l]="_"; cout<<input<<endl<<word<<endl;; return true; }[/CODE]

Software Development c++
Member Avatar for arkoenig
0
83
Member Avatar for Random_Integer

I'm doing a practice project to save golf statistics. It will display different data using tables. I wanted to run it through a jar file. But when I exit, obviously all of the data in my arrayList is gone. Any ways to save the arraylist? thanks a lot, -10100

Software Development java
Member Avatar for ajst
0
121
Member Avatar for krosty4782

Hi! I want to join 2 strings, but it has been impossible. I have this: [code] i = socket.Receive(buffer); recibido = System.Text.Encoding.UTF8.GetString(buffer)[/code] Buffer contains: "C:" I want to add the "\\" to the string so i have tried to do: recibido = recibido + "\\". But no way, when y …

Software Development
Member Avatar for krosty4782
0
325
Member Avatar for Anuradha Mandal

what is worng with this code [CODE]#include<iostream> #include <graphics.h> #include <stdlib.h> #include <stdio.h> //#include <conio> int main(void) { /* request auto detection */ int gdriver = DETECT, gmode, errorcode; int midx, midy; int radius = 100; /* initialize graphics and local variables */ initgraph(&gdriver, &gmode, "C:\\Dev-c++\\include\\graphics.h"); /* read result of …

Software Development c++
Member Avatar for Anuradha Mandal
0
1K
Member Avatar for abelingaw

Using Borland C++ 3.0 Here's my code: [CODE] #include<iostream.h> #include<conio.h> int main() { int m,d; int i=0; clrscr(); cout<<"\nEnter Birthday month: "; cin>>m; cout<<"\nEnter Birthday day: "; cin>>d; cout<<"\n"; { if(m==3 && d>=21) cout<<"ARIES!"; else if (m==4 && d<=20) cout<<"ARIES!"; else if(m==4 && d>=21) cout<<"TAURUS!"; else if(m==5 && d<=21) cout<<"TAURUS!"; …

Software Development c++
Member Avatar for abelingaw
0
604
Member Avatar for NMAZ

[B][U]Hi, this is kind of silly request, can anyone help me with these three C++ progs[/U]:[/B] [B]I - Predefined number of operation Calculator[/B]: [U]e.g[/U]. 5 + 12 - 3 10 / 3 - 5 /12 The program should ask for the following 1- number of operations 2- the equation for …

Software Development c c# c++
Member Avatar for NMAZ
0
234
Member Avatar for MylesDBaker

Hello All, I am trying to solve maximum flow, and I am experiencing some problems formatting the output. Here is some pseudocode I am trying to implement. c [u, v] is capacity from u to v, f [u, v] is the flow, cf [u, v] is the residual capacity. for …

Software Development c++
Member Avatar for daviddoria
0
233
Member Avatar for ravindasenarath

hello, I'm a newbie to opencv. I'm doing a project using c++ and I use opencv for image processing. So for that I need to capture two video streams at the same time. before doing processing part I try to display both videos from cameras on two windows. But it …

Software Development c++ webcam
Member Avatar for daviddoria
0
151
Member Avatar for Nandomo

Ok I have a little problem.I have a pointer in the struct which I don't know how to use as or move the information into an array on the bottom function. Need an explanation. Anyone please help... [CODE] // This is the minimum functionality for this exercise // Notice that …

Software Development c++
Member Avatar for Fbody
0
217
Member Avatar for HoneyBadger

Guys I am trying to add an image to the window I created, but I get an error message when I run my code: [CODE]import wx class my_window(wx.Frame): app=wx.PySimpleApp() def __init__(self, parent, id): window = wx.Frame.__init__(self,parent,id,'Window', size=(600,400)) window.SetIcon(wx.Icon('porcupine.ico', wx.BITMAP_TYPE_ICO)) if __name__ == "__main__": frame=my_window(parent=None,id=-1) frame.Center() frame.Show() app.MainLoop()[/CODE] The message I …

Software Development image python
Member Avatar for richieking
0
2K
Member Avatar for WildBamaBoy

I'm working on a scientific/algebraic calculator and I have put all of the code that will deal with any of the math in a separate class. However I cannot access any of the controls on the form from this class. I need to write the answer into the box on …

Software Development
Member Avatar for darkagn
0
140
Member Avatar for sneha Butala

I want to create a project on Genetic Algorithm using java for the msc final year..so how i can start to create a project..

Software Development algorithm java
Member Avatar for masijade
0
281
Member Avatar for Phil++

Hello there, I'm working on a project and for this I'm using classes, in my main I'm using an array of objects. When I compile it, it works fine, but when I try to enter values, it displays this message: "Exception in thread "main" java.lang.NullPointerException at main.main(main.java:25)" Here is my …

Software Development java
Member Avatar for masijade
0
89
Member Avatar for ukshir

hi, I have a windows forms application with one exe and several dlls(Class libraries) in a single solution. The application uses common data that is used across all the dlls. I would like to load the data when the application is starting up and use the loaded data at various …

Software Development vb.net
Member Avatar for GuruJin
0
175

The End.