43,549 Solved Topics
Remove Filter ![]() | |
Hey guys I need a little bit of help. I am writing a program that generates 100 random numbers and then stores then in an arrays (2, even and odd numbers) I need a little help with passing the array into the function and generating random numbers. What am I … Software Development java | |
I am writing Python on my mac, and am trying to pipe the output from the Terminal to python.. I think this is achieved with os.popen? Software Development python | |
If I have a class variable being passed to a function, is there a way that I can get the class that the variable is from? [CODE]class someclass: def __init__(self): self.somevariable='somevalue' def somefunction(self): print('gotta get here') def someotherfunction(somevariable): somevariable.needparentclasshere.somefunction() myclass=someclass() someotherfunction(myclass.somevariable)#this needs to print 'gotta get here'[/CODE] Software Development python | |
Ok so I'm trying to get images to resize which I could do with Image.PhotoImage but now I'm using RGBA .png files so I have to use ImageTk.PhotoImage and I can't figure out how to resize them anymore any help on this kind of thing? I'm using python,tkinter | |
This program separates palindromes from non-palindromes in a text file. After separating them into separate two dimensional arrays, I have to sort them in ascending order by string length. The last part is to output both the palindromes and non-palindromes in centered, triangle format. I've gone through this program multiple … Software Development c | |
Hello, I'm having trouble running the CalcOpticalFlowPyrLK in Python. When I try doing the calculations for the Lucas Kanade code it will not compute the error I get is the following:[ICODE] File "****", line 63, in callback (currFeatures, status, track_error) = cv.CalcOpticalFlowPyrLK(old_image, new_image, old_pyramid, new_pyramid, old_features, (3,3), 1, (cv.CV_TERMCRIT_ITER, 10, … Software Development python | |
I am experiencing unexpected performance degradation when using vectors with classes. I have a csv_File class that reads in a csv file and stores the contents in a 2D vector. There's a member function that allows access, e.g. [CODE] csv_File file("file.csv"); file.access(2,2);[/CODE] To access the 2,2 element. Then, I have … Software Development c++ motherboards-cpu-ram oop | |
[code] import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import javax.swing.DefaultCellEditor; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.table.DefaultTableModel; public class main implements ItemListener { String[] a = {"one","two","three"}; String[] b = {"4","5","6"}; String[] c = {"7","8","9"}; String[] d = {"10","11","12"}; String[] e = {"13","14","15"}; JComboBox a1 = new JComboBox(a); JComboBox b1 … Software Development java java-swing | |
Hello all, I'm trying to modify some code but I'm having some difficulty - probably because I don't really understand the function in the first place. Its one my supervisor found online that seemed to work fine for the purposes of our test code. However; after some poking around its … Software Development c++ | |
Hello :) well... i need to do a simple thing (i guess) but it seems that this is not so simple due to all the complicating examples on the web... ok. i jast wanna to create a copy of an object! but i want the copy to be seperate from … Software Development | |
Im trying to make a calculator and I thought of using the ScriptEngine class to evaluate expressions. So I designed the following code: CalculatorFrame.java : [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.lang.Math; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; public class CalculatorFrame extends JFrame { public CalculatorFrame() { setTitle("My Scientific Calculator"); … Software Development gui java java-swing | |
anybody know to create a program that count the characters(including spaces)??? Software Development c++ | |
I have a working code that exports the datagrid into XLS. However, the datagrid results does not show on my aspx (html) page. It only shows on the page when I comment out the part that exports it to xls. I am not sure whether it should show by default … | |
when i click on a column on which editor is attached , the getselectedrow return -1 ...... I have also tried list selection listener but nothinhg work properly.... i dont think it need code.... Please help..... Software Development java | |
can any one help me in solving a question posted by friend..... i tried to google but i didnt find the accurate answer for my question.. i wish to 'print 1 to n' without using loops and recursion help me please.. thanks in advance Software Development c | |
Hi The error I stated in the title appears when I try to run the following code in Eclipse. I have created the Table which is named as "Emp" in Microsoft SQL Server. I can't find the error I have done here, and I googled but nothing helped me.. Plz … | |
Hey guys, i've been trying to clone pokemon in java but i've come across a very weird problem. [CODE]java.lang.VerifyError: (class: attribute/base/health/AbstractBaseHealth, method: <init> signature: ()V) Constructor must call super() or this() at actor.pokemon.AbstractPokemon.<init>(AbstractPokemon.java:44) at actor.pokemon.charmander.AbstractCharmander.<init>(AbstractCharmander.java:16) at actor.pokemon.charmander.ConcreteCharmander.<init>(ConcreteCharmander.java:11) at main.Main.<clinit>(Main.java:17) Could not find the main class: main.Main. Program will exit. Exception … Software Development java | |
Greetings I'm running in circes trying to accomplish something very simple. I have a csv file with multiple lines resembling: 0002345, 24, 5, 0.24 I need this format in my output file: '0002345', 24, 5 0.24 The first entry is a census meshblock code and the leading zeros are relevant … Software Development python | |
Hi there, I'am asked for a HW write a code: * read some data of unknown number of students with their grades of 4 courses from a file * calculate the gpa, honor/warning status, and course average for each course, * write them into an output file (for testing I … Software Development c++ | |
Hi programmers!) I'm developing a custom component and I can't understand - how to make a property which can show a window with options like "font" property for button, for example ? please tell how to do this from where i can find it out. big thanks in advance)) Software Development | |
Dear all, Can any one tell me how can i take bakup on Every minute and hourly and complete whole day backup using VB.NET i.e i want to know the coding example Thanks in advance | |
I'm trying to convert html to plain text (remove all html tags) I don't want to use regex so I tried the module HTML::Parser and tried the parse() function but i got this error [CODE]Undefined subroutine &main::start called at getwords.pl line 27. [/CODE] and as a matter of fact I … | |
I have windows xp operating system at my home with python 2.5 and same operating system with python 2.4 at my computer lab. While working in python IDLE suddenly this error message --socket error:connection refused-- pops up and then python IDLE does not work at all.To make it work again … Software Development operating-system python | |
So it's this program which isn't behaving as it should. these are the classes I'm haing problems with: [code]#ifndef _CMENU_H_ #define _CMENU_H_ #include "Vec2.h" #include "Background.h" #include "Sprite.h" #include "BackBuffer.h" class Button { public: enum ButtonState { NORMAL, //when cursor is not near the button ANIMATED //mouseover event }; Button(const … | |
Hello. I need to reproduce this pattern using one main for loop and one nested for loop. I cannot seem to figure out the right way to do this. I came close, but not close enough. 0 10 210 3210 43210 543210 6543210 76543210 876543210 9876543210 [code]for (int x = … Software Development java | |
Hey guys, I want my form to hide instead to close by clicking on the red X button. Because when it's closed the form is deleted. I searched a lot to find a good solution, but nothing works. Many people wrote that following code: [CODE]private void Form1_OnClosing(object sender, FormClosingEventArgs e) … Software Development gui | |
Hi friends, I have a map containing an int as key and a struct as second value, read from file. I need to update the second column with value obtained by the last value (bigger one) + 1. A kind of sequential code ... I tried to use the max_element … Software Development c++ | |
Hi! im getting this error. I dont know why. PLZ can anyone help me. this is my code [CODE] public void getLastMemID() { String concString = "Data Source=BJ-PC\\SQLEXPRESS;Initial Catalog=new;Integrated Security=SSPI"; // int ID=0; try { CN = new SqlConnection(concString); CN.Open(); SqlCommand com = new SqlCommand("SELECT MAX(ImageId) FROM ImagesStore", CN); SqlDataReader … Software Development open-source | |
hi all) Does anybody know a good example to add a smart tag to custom component? Software Development | |
Hello, Could someone help me with this question that I need to complete within 4 days? I have a problem with the insert statment on the code below. This code is working fine by inserting the ststement, but the problem is that the DATE is not being inserted into the … | |
I am currently going through a c++ book trying to do the problems at the end of the chapters. They dont provide solutions so im kind of stuck. My problem is: Write a program that uses a loop to display the characters for each ASCII code 32 through 127. Display … Software Development c++ | |
Hi is it possible to use static variables with servlet. I want to access static variable from servlet but it gives null value. Why?? Software Development java | |
Getting errors stating that 'Assignment3.Converter' does not contain a definition for 'breakdown'...cannot get this to work...I know there is a problem with the breakdown and dollarAmount, but I can't seem to figure out the solution. [code] using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace Assignment3 { class Converter { … Software Development c# | |
I'm creating a game with XNA, and having issues with Vector2 arrays. The code below will loop through each square on the grid for the game 40x40pixels. The first for loop getting the X coordinate and the second getting the Y coordinate. I'm getting the proper width and height (if … Software Development | |
Hi everyone, I have a std::map of structures . I'm reading the data from a file named "auxIdSorted.txt" and I need to do a while() using the variable auxID. The idea is read the map many times until all values of auxID become different of zero (while(auxID == 0). I … Software Development c++ data-structure | |
I want combo box in jtable visible from start not when i click the cell... any idea? Software Development java | |
Hello everyone! Am trying to retrieve data from sql server based on two columns. Its a web application being developed using VS2010 (vb.net) but i keep getting the error: incorrect syntax near '=' Here's my code below: [CODE]Sub GetBasicMidwives() ' Set the SelectCommand properties... With objDataAdapter .SelectCommand = New SqlCommand() … | |
Hello, I'm attempting to write a function that accepts a vector "list" and it's "size" as arguments and using an iterator, step through the list to find the one with the highest value. For instance, here is the non-iterator function: [code] int winnerIndex(vector<int> list, int size) { int votes = … Software Development c++ | |
Hi there, I am very, very new to programming and need to work out how to determine if a number entered by a user is a prime number. I have coded this but it does not work. :'( Any assistance would be greatly appreciated! I also get the following error … Software Development java | |
Hi, I assigned the name of the file to string vector. I mean when I print the vector, it seems like cout<< files[0]; It prints file.txt and I want to open the file by using vector. I tried ifstream file ("files[0]"); and ifstream file (files[0]); but they did not work. … Software Development c++ file-system | |
[CODE] sqlCmd = new SqlCommand(); sqlCmd.Connection = sqlCon; sqlCmd.CommandText = "update trainn set Adultno=Adultno-1 where ID=@pram1 and adult=@pram2 and Adultno>0"; sqlCmd.Parameters.AddWithValue("@pram1", textBox3.Text); sqlCmd.ExecuteNonQuery(); sqlCon.Close();[/CODE] The code is working properly when there is an update,but when it comes to more than one I don't know what to do? The following code … | |
Im reading Core Java (Cay Horstmann) V I And I came across this program......... [CODE]import javax.swing.*; import java.awt.event.*; import java.awt.*; class MyFrame extends JFrame { private ButtonPanel buttonPanel; public MyFrame() { setSize(300,200); setLocation(570,350); setTitle("Button Test"); buttonPanel=new ButtonPanel(); add(buttonPanel); } private class ButtonPanel extends JPanel { public void paintComponent(Graphics g) { … Software Development java java-swing | |
How to get the difference of the month from the date specified. Example: [code=vb] date1.value="5/1/2010" date2.vale ="5/31/2011" [/code] it should give a result of 12. thank you for helping.! Software Development visual-basic | |
Hi everybody, i am a new to C# and,it's a school application to develop a Rent a Car project, and from you guys need to give me one idea how to start, hope somebody of you dealed with such a project, just need idea please.... Software Development | |
Hi all, I am working on an application in which a call is made to a DLL. From that dll a dialog has to be displayed. While doing so I was not able to see the dialog. Dialog is not getting displayed. When i checked the code in debug that … | |
Hi, I am a new in stored procedure and I now do the following function: [CODE] ALTER PROCEDURE dbo.ViewFaultyTbl @id int AS SET NOCOUNT ON; DECLARE @indicator int SELECT @indicator=Indicator FROM FautyScanTbl if @indicator=0 BEGIN SELECT * FROM FautyScanTbl WHERE ID=@id END ELSE BEGIN END [/CODE] Indicator is a column … Software Development sql | |
The Program has been started but I am having issues finishing the public class in the header and finishing the functions inside the main file. [B]Header File:[/B] [CODE]#ifndef POLYNOMIAL_H #define POLYNOMIAL_H #include <iostream> /** This class implements a polynomial of the form c0 + c1 x + c2 x^2 + … Software Development c++ | |
Hi everyone I have a question about vb.net I have a textbox textbox: 145|145 145|859 146|745 and so on .... I want to make my program do this: if I execute the button it must do this: it must take each line of the textbox apart. then split that line … Software Development vb.net | |
Hello again, So, I'm trying to work out a problem where there are 6 symbols in a string (A, B, 0, 1, [, ]). The brackets always have to face each other in the string but they can be nested. There are some rules, most of which I have down, … Software Development python | |
I was reading some code that encouraged the use of vectors but my IDE is saying that it is an obsolete Collection. I need to use Vector because it can does not need to be a set size. and I would like to have a Vector of Vectors. Is there … |
The End.