132,726 Archived Topics
Remove Filter ![]() | |
Hi! I would like to make a JFrame that will play a role of a toolbar. It can be dragged and dropped within a specified area. So, I don't know how to specify the area for dragging and dropping. Could anybody help me? Thanks! Software Development java | |
Hey guys, sorry if this is a silly question but I have a piece of code which contains something like this: [CODE] private: void button1_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) private: void button2_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) private: void button3_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ ) private: void button4_Click( Object^ … Software Development c++ | |
Write a function called nRandomNumbers( ) to perform the following tasks: 1. Generate N random integers between -250 and 250 (inclusive) and save them in a file called number.txt, (Use the function srand()). 2. Print all the generated integers. 3. Compute and return the average of all the negative integers, … Software Development c++ | |
How can I read a random line from text file. After I get the word I need to count the letters. [CODE]bool word(char *Filename){ ifstream file; file.open(Filename); //add code. return true; }[/CODE] Software Development c++ | |
Hey guys I was hoping someone could help me here. I had to make a Tetris game using eclipse for my intro to Java programming class. I got it all done, but i would like to play the game without having to run it through eclipse. For example if i … Software Development java | |
Hi, I am coding an application that requires the privileges of the logged in user. I have checked the application to run with administrator privileges and upon executing it asks me if I want to run this application with admin privileges. Despite granting access when my code executes it doesn’t … Software Development c++ | |
im new to shell scripting i want a simle script to configure the ip adress and add a default gw this is what i got so far [CODE] #!/bin/bash ifconfig eth0 "ipadress" route add default gw "gw adress" [/CODE] it does not recognise route ? can anyone help? Software Development shell-scripting | |
Hi all, I am new Phython user and started using Python 2.7 just a couple days ago. I have written this code which is working, But when user put in correct code loop is not breaking ?? just wondering if it could be improved and what book would you recommend … Software Development python | |
Hi all trying get small program work. I want my program to search for a word within a text file then out put the word with the rest of the fileds with the sentence. so say i input 4 word/numbers from 4 different text boxes. the ouput to the text … Software Development regex | |
I'm looking for a starting point on this. Can someone point me in the right direction? I want to allow a user to create a new class object that will just store data. My class is data and my type is "flight" so: [code=java] Data flight1 = new Data("A string", … Software Development java | |
Hello, I'm new with perl, I've been able to read and write from file #1 to file #2. file #1 currently is about 60meg of text... what I would like to do is to read up to 2 char from a constant position and then use that data in a … Software Development perl | |
Hello all, I need a little help with Dictionary statement. My question is it possible to display just one thing for a Dictionary ? I know that Dictionary use Keys and Values so if I have this code. How would I display let say the Dog from Dictionary without printing … Software Development python | |
I've been working on a side project of Tic Tac Toe, it works fine, but I'd like to change the winner function to be dynamic and work for any size board. For example, say I want a 4x3 or a 10x10 board how could I make the one function work … Software Development c++ | |
my default in my switch case statement doesn't seem to work, so if i type in a non integer, it will exit, and follow case 0. there are no signs of the default working.. how to solve, i've tried alot! :( bool isFinished = false; while(!isFinished) { ....... .... .... … Software Development c++ | |
i = 1 while i < 10000 and i > 0 and 1 : print " still going ..." i = 2 * i Hi i am new to Python and completley useless at it. Can somebody please explain to me why this code prints "Still going" 14 times. I … Software Development python | |
Hi all. I need to code an offline crawler that acts like a web crawler on a set of given html pages. I know how to read the a=href tag and output those links to the screen. My plan is to modify my code to add more functionality. Instead of … | |
How do you draw a star in Python, I am really confused over it now This is the program I have so far import helper *helper checks if input is valid or not import ecs10graphics07 as gr * ecs10graphics07 is almost the same as the program Tkinter import math starPoints … | |
Basics are: Another area of my program takes in strokes and then uses the recogniser to interpret those strokes into a recognise result. The result of this conversion is saved and is accessible. This is the string part of my question. On another screen I have a panel which takes … Software Development file-system pdf | |
Hello! (Spelled polymorphism wrong in title, I know... it's late!) Now, I understand the concepts of both just fine, but implementing them is where I really run into trouble; this is especially when I'm given a specific problem to solve by using them (i.e. my current assignment). Okay so here's … Software Development c++ data-protection | |
I am designing a Tetris game and am having trouble adding in the array for the bucket, I have it commented out in the code below (the nested for loop) but it seems to drag the game so I know there is something wrong with the for loop. When I … | |
Hi All, I have a sub and trap the error with: ------------------------------------------ private sub mySub(mydoc as string) On error goto goto handlemyerror kill app.path & "\" & mydoc handlemyerror: msgbox "I cannot kill it" end sub ------------------------------------------ mydoc is word document with 2-3 pages length. It works fine to avoid … Software Development visual-basic | |
Hi, I have 2 text box, Text1 is to display the week no and Text2 is to display start date of the week. Do anyone know what function I should use in VB6? Thanks, Annie Software Development visual-basic | |
I was wondering if there is a global matching flag, considering there is a global replacement flag (/g) I'm using this workaround to make multiple matches in a string [CODE] while(!$stop_var) { if($source =~ /(PATTERN)/i) { push(@matches, $1); $source = $'; } else { $stop_var =1; } } [/CODE] is … | |
Hi i need a good vector video tutorial please give the link in the discription Software Development c++ | |
Quick question From main thread [CODE]double[] ascore; int i; imax=high.highestScore(ascore[],i); [/CODE] From method highestScore [CODE] public class highestScore { // This method checks which number is higher. public static double highestScore(double[] score,int arraySize) { int index; double maxScore=0; for (index=0; index<arraySize; index++) { if (maxScore < score [index]) maxScore= score[index]; … Software Development java | |
[CODE]#include <stdio.h> #include <string.h> #include <stdlib.h> int getNumWords(char *name) { int i,numofwords=0; for(i=0;i<strlen(name);i++) { while (name[i]==' ') { i++; //pernaei ta kena osa k an einai. akoma k an einai stin arxi k sto telos } if (((i==0)&&(name[i]!=' '))||(i>=1)&&((name[i-1]==' ')&&(name[i]!=' ')&&(name[i]!='\0'))) { //i 1i sun8iki einai gt an to i … Software Development c | |
i trying to to open a text-file in read mode and passing that file pointer to a function which will extract the text from that file pointer .... but every time i build and run the program i get the segmentation fault error at the start of the "loadtoFile" definition … Software Development c file-system | |
I can't get this to generate random shapes, etc. Basically what I need to do is randomly generate similar lists consisting of: combinations of 'square', 'triangle', 'circle' and 'left'. And random numbers from 1 to 10 for physical dimensions and 10 to 90 for angles Have the program use 'split' … Software Development python | |
I'm fairly new to java, but I'm sure I've done this before and now it's not working right. What am I forgetting here? LeftPanel class [CODE]Inventory inventory; JTextField txtMoney = new JFormattedTextField([COLOR="Red"]inventory.getInvWallet()[/COLOR]);[/CODE] Inventory class [CODE] public class Inventory { public int invId = 0; public int invPrice = 0; public … Software Development java | |
i dont have any experince of software making...i know c ,c++ and web designing lanuguages....how should i start it..to do what i have asked...i have to decide a project | |
I am at the end of my quarter and have two programs to write and need help. I dont even know where to begin. I have decided to change my major to something else, but I dont want to fail this class and hurt my GPA. I have a programming … Software Development java | |
can someone help me with why this code is not inserting into the database [CODE] Dim MyConnection As SqlConnection Dim sqlstring As String = "INSERT INTO Workers (FName, LName, FullName) VALUES ('" & Me.txtName.Text & "', '" & Me.txtSurname.Text & "', '" & Me.txtFullName.Text & "')" 'Dim data_base As String … Software Development open-source sql vb.net | |
I am working on exporting some data to a DataGrid (with no luck). So far I have: [CODE] Private Sub SaveDoc() Dim MyConn As System.Data.OleDb.OleDbConnection Dim DtSet As System.Data.DataSet Dim MyCommand As System.Data.OleDb.OleDbDataAdapter Try MyConn = New System.Data.OleDb.OleDbConnection("provider=Microsoft.Jet.OLEDB.4.0; Data Source='c:\book2.xls'; Extended Properties=Excel 8.0;") MyCommand = New System.Data.OleDb.OleDbDataAdapter("select * from [Sheet]", … | |
I keep getting this error on my else. Anyone have any ideas? I don't quit understand this error as the the if works just fine, and it is same thing. it just sends it to a different array. [code] catch ( NoSuchElementException e ) //Error { System.err.println( "Invalid input62" ); … Software Development java | |
This is a request for some 'best practices' comments from experienced OOP practitioners. I have been in IT from the days of punched cards and have had considerable experience with legacy languages like 370 ASM, SAS, and REXX. For fun, I've taken a college class in C++ and am now … Software Development c++ web-design | |
A simple physics graph... [code=python]import pylab a_time = range(0,141,10) a_R = [3.0,2.8,2.56,2.36,2.2,2.0,1.86,1.7,1.6,1.43,1.3,1.2,1.1,1.06,0.96] for i in range(0,15): pylab.plot(a_time[i],a_R[i], 'x') pylab.errorbar(a_time[i], a_R[i], 0.5, 0.05) pylab.show() [/code] I'm guessing the [icode]pylab.plot[/icode] line isn't needed, but even with this there is nothing connecting the plots together. I'm pretty sure there wasn't anything extra needed … | |
If I write 1 letter, I get the error message once. If I write 3 letters, I get the error message three times...... How can I fix this :S? [CODE] #include <iostream> #include <stdio.h> #include <math.h> #include <cmath> #include <stdlib.h> using namespace std; int main() { //vars char user_numberr; //int … | |
Helew! I just wana know if someone might have an idea of how I can go about doing this: So attached I have a little example I whiped up. Say you have 3 buttons, button1, button2, button3. What I wana do, is when you click [B]button1[/B], it will magicly turn … | |
here is the code ....plz help [code] IplImage *cur_frame = NULL; IplImage* background=NULL; IplImage*temp1=NULL; //IplImage*difference=NULL; cur_frame=cvCreateImage(cvSize(640,480),IPL_DEPTH_8U,1); background=cvCreateImage(cvSize(640,480),IPL_DEPTH_32F,1); temp1=cvCreateImage(cvSize(640,480),IPL_DEPTH_32F,1); cur_frame=cvLoadImage("C:\\Documents and Settings\\samia\\My Documents\\My Pictures\\frame.jpg",CV_LOAD_IMAGE_COLOR); background=cvLoadImage("C:\\Documents and Settings\\samia\\My Documents\\My Pictures\\background.jpg", CV_LOAD_IMAGE_COLOR); cvRunningAvg(cur_frame,background,0.005,NULL); cvConvertScale(background,cur_frame,1,0); cvNamedWindow("back",CV_WINDOW_AUTOSIZE); cvShowImage("back",background);[/code] Software Development c++ | |
Hi Experts :) I am battling with some small logical error and I need some help.. I want to enable access levels in my windows form application. I have a database with a column named 'UserType'. In this column I have data from 1 to 5. This represents the access … Software Development c# open-source | |
[CODE]// 1. Find the frequencies of individual letters in a sample // text file. // 2. Display this information both numerically and graphically. // a) In A..Z sequence // b) In decreasing frequency sequence // Programming concepts and C++ Language elements used // a) vector of structs, b) sorting #include … Software Development c++ file-stream | |
Hi everyone... I am developing this student management system which has one form that saves student data( including student image). Now w.r.t saving student image I want that the user should insert image from the folder where he has saved student images. On the save button the image path of … Software Development mssql | |
why the following things cannot be : 1.why i cannot extend the non static variable from static method or something ? 2.why i cannot use a variable directly in the class as : [ICODE] class abc{ int i=4; } class xyz extends abc{ int j=7; i=9; /*this should be valid … Software Development java | |
Hello there, I'm trying to generate a open office text document with tables generated from a database with the lpod library. I'd like to set the width of the tables columns but i can't manage it. Here is my test code so far : [code] import lpod.document import lpod.table doc … Software Development python | |
I have developed a python code that is comprised of several functions, I want the output from the last function to be an input in the first function and the program should stop when a certain criterion is met! for example: [CODE] [[COLOR="Red"]def[/COLOR] f1(something1): Block of statements [COLOR="Red"] return[/COLOR] something … Software Development python | |
i saw the operator <> first time, tell me in detail the use of this ? Software Development java | |
[B]Hi, I am beginner in Python and I'm looking for a method to write to a file by using Index. This is my program:[/B] ************************************************************** infile = open("land1.txt","r") outfile = open('out.txt', 'w') text = infile.read() infile.close() search = "<CgPoint" found=text.find(search) while found > -1: print search, "found at location", found … Software Development file-system python xml | |
I don't know how to call this method to another program. [CODE]public class ForLoopTest { public static void main ( String [] args) { int product = 1; for ( int i = 1; i <= 10; i++ ) { product *= i; } System.out.printf(" %d ", product); } }[/CODE] Software Development java |
The End.