43,549 Solved Topics
Remove Filter ![]() | |
May seem like a stupid question but can an array call a function? and if so is it possible to select an array from user input, so if the array was something like Num[10] and the user would input 6, it would then select Num[5] and call the function associated … Software Development c++ | |
hey. I am trying to add a menuscreen to my game using the enumeration method. I get 4 errors: No overload for method 'UpdateMenu' takes '0' arguments (at L: 161 C: 25) No overload for method 'UpdatePlay' takes '0' arguments (at L: 166 C: 25) No overload for method 'DrawMenu' … | |
Hi all, I've got quite a simple question and after searching here and on other websites I can't seem to resolve what the "correct way" of doing this is in C++. Below is a simple piece of code illustrating what I am trying to do: [CODE] #include <iostream> class BaseClass … Software Development c++ | |
<S> --> <A><B> <A> ---> a | b <B> ---> 1 | 1 <B> It's suppose to start will a or b and 1 afterward. it doesn't matter how many 1's are after a or b. [CODE]/* <S> --> <A><B> <A> ---> a | b <B> ---> 1 | 1 … Software Development c++ | |
Hello, I've made a program that uses an array of objects, it's work well so far, upto the point that I try to increase the size of an array. So, in main the relevant code loops like this: [CODE]int main(){ /* classes used */ phoneBook *p; .... numLines = 0; … Software Development c++ | |
I'm making a project with OpenCV about tracking. But what I want is the ability to let the user import his own tracking algorithms. Is there some way that i can check in a specified folder if there are new algorithms added and how can I include them in my … Software Development c++ | |
Yes i realize this is the fibonacci sequence and i understand the math im just having trouble understanding the line in red what does it equate to in laymans terms? Thanks in advance :D [CODE] a,b=0,1 while b < 100: print b [COLOR="Red"]a,b=b,a+b[/COLOR][/CODE] Software Development python | |
How do you determine what the main hard drive is? This is what I have: [CODE]filename="savefile2.txt";[/CODE] and this is pseudocode for what I want: [CODE]filename="MainDrive:/JavaProject/savefile2.txt";[/CODE] My problem with it is, what if C: isn't the name of a person's hard drive? F:\ for instance. And also, if the folder name … Software Development hard-drive java | |
![]() | This is my computer science project,we were told to make any software we wish to make,so I thought about making a calculator,below is the code,but it doesn't seem to be functioning well,could anyone help and tell me what went wrong(I am using borland cpp 4.5 compiler,this program uses getch() to … Software Development c++ ![]() |
I don't really know how to make the code for the following question. I need a program that counts. The program will ask the user what he/she wants to count by and It will then count from 0 to 20 using what ever increment that user has chosen I want … Software Development vb.net | |
hi all!! here's the deal: i have this code [CODE] Sub SaveToTextFile() Handles Button1.Click Dim name1 As String = TextBox3.Text Dim st1 As String = TextBox1.Text Dim st2 As String = TextBox2.Text Dim br1 As String = "{" Dim br2 As String = "}" Dim desck As String = br1 … Software Development vb.net | |
anybody know how to upload or set piture into windows form using code..i want create a button like browse that can chnge background and every i relaunch application,bckground is still there..please anybody.. | |
Hello all I am using reading a config file in which there is a entry [CODE]code_list="515,522,560,000" [/CODE] while i am reading this string in my java application and using split on it and then assigning it to a string[].it is giving null pointer exception.needed code is as follows [CODE] static … Software Development java | |
The program is currently trying to pull information from three different database tables and compiling the information onto one screen, to do this i am using three different connections and a function to handle the data at each stage. The issue is as my code hits PageLoadStage of "2" and … Software Development vb.net | |
I have made a header file for SDL GUI applications. I was testing the SDLGame::Draw() function when I got a SigSegV fault. The fault occurs in different locations each time I run the program. Also sometimes instead of a SigSegV fault I get a SigTrap fault. Here is the code … | |
[CODE]import javax.swing.*; import java.sql.*; import java.awt.*; import java.awt.event.*; import java.lang.*; class Main extends JFrame { public Main(String st) { setLayout(null); setDefaultCloseOperation(javax.swing. WindowConstants.DISPOSE_ON_CLOSE); JLabel lab=new JLabel("Welcome "+st+"!! \n Click OK to Continue"); JButton OK = new JButton("OK"); OK.setMnemonic('k'); OK.addActionListener( new ActionListener() { JButton OK; public void actionPerformed(ActionEvent e) { [COLOR="Red"] Main();[/COLOR] … Software Development java java-swing | |
pls help me with auto generated alphanumeric pk say i want my customer id to be like these CUST00001 CUST00002 CUST00003 CUST00004 any help is a great help.! Blessings! Software Development vb.net | |
What i wanted to do is to limit the number of users to be registered for my system. One for User type and one for Administrator account, and if there is already a user and admin account, adding will be disabled, else, enabled. Here's the code im using. [CODE]Private Sub … Software Development visual-basic | |
Hi Everyone, In my form there is a "Validating" event on a textbox. This form also has a "Cancel" button. Is there a way to not execute the "Validating" event when the user clicks on the "Cancel" button? Please show me code to do this. Thanks. Truly, Emad Software Development vb.net | |
Hey Guys, I am working on an assignment where we are supposed to output the date in different formats for example, month, date, year or date,month year, I have implemented a method to change for the arrangement of dates, It builds successfully but has errors when it runs plus it … Software Development java | |
Hello all, just a quick question! I was wondering how can you pace lines together in python. In my case i have a file like this: [CODE]<word> <word> <number>.txt <word> <word> <number>.txt <word> <word> <word> <number>.txt <word> <word><word><word> <number>.txt <word> <word> <number>.txt <word> <number>.txt <word> <word> <number>.txt [/CODE] Does anyone … Software Development python | |
hi i have to read tif File using java file has 3 pages and take first two page of that file and create new tif file with different name can u suggest me how should i start Software Development file-system image java | |
This code randomly generates 4 lottery tickets and prints them on seperate lines. The code works, but what if I wanted this to print for 100 lottery tickets? Is there a way to write this with less lines of codes? Would using a for loop work? [CODE] import java.util.Collections; import … Software Development java | |
It's only reading every other line. It's supposed to print out: 28 80.0 22 1 2 2 3 1 3 But it's only reading: 80.0 1 2 1 [CODE]//Load button - #=daynum, $=wallet, @=inventory, &=employees, !=customers if (btn2.getText().equals("Load")){ int id=0; File file = new File("savefile1.txt"); BufferedReader reader = null; try … Software Development java | |
Hi All I am new to XSLT development and have stuck at simple but essential point. I want to remove the content which is in between two specific comment tag <!--E-->Text which need to remove<!--/E--> I do try with the given below code [CODE]<xsl:template match="comment()"> <xsl:text disable-output-escaping="yes"><</xsl:text><xsl:value-of select="."><xsl:text disable-output-escaping="yes">></xsl:text> </xsl:template> … Software Development xml | |
Hi, When we define any integer array like int a[3]={1,2,3}; then it will assign the values as a[0]=1, a[1]=2, and a[2]=3 But, when we define any character array as char a[3]={'a','b'}; then compiler here automatically consider '\0' null character to represent the end of the string So, my question here … Software Development c | |
hi im having errors with listview binding navigation specifically in last >> and first << here's my code [CODE] Dim inc As Integer Dim MaxRows As Integer Dim dr As DataRow Dim ds As DataSet Public Sub navigaterecords() txtMed_ID.Text = ListView1.Items(inc).SubItems(0).Text txtMed_name.Text = ListView1.Items(inc).SubItems(1).Text txtfname.Text = ListView1.Items(inc).SubItems(2).Text txtMname.Text = ListView1.Items(inc).SubItems(3).Text … | |
Hmmm... I'm trying to call a class and it doesn't work and i get this error /home/XXXX/Desktop/language/main.cpp|13|error: expected constructor, destructor, or type conversion before ‘.’ token| The syntax is: [CODE] print.base="print"; [/CODE] this simple method call returns an error. Am i really doing something wrong, seeing as i've already looked … Software Development c++ | |
Hi. I would like to achieve an effect similar to how strings in between the quotation marks in Visual C# are colored. I would like to italicize the text for anything between two asterisks (Including the asterisks themselves) inside a RichTextBox. For example: This is not counted [I]*This is counted*[/I] … Software Development | |
[CODE]#include <iostream> #include <cmath> #include <iomanip> using namespace std; int divides(int,int); int main () { int count = 10; //int prime = divides(count); int p = 0; // number of primes cout.setf(ios::fixed,ios::floatfield); cout << setw(6) << "NUMBER" << "\t" << setw(8) << "DIVISORS" << endl << endl; while (count<=50) { … | |
[url]http://www.boost.org/doc/libs/1_46_0/libs/smart_ptr/shared_ptr.htm#ThreadSafety[/url] This section somewhat confused me, in my code I have a matrix of shared_ptr's pointing to an entirely thread-safe class. But the shared_ptr documentation says it is only as thread-safe as the built-in C++ types. Does this mean that if I read/write to my thread-safe class using shared_ptr's at … Software Development c++ | |
Hi, is here any other issues then readability between two functions below? [CODE] void getNames(int) { .... } void getnames(int meaningfullName) { static_cast<void>(meaningfullName); ... } [/CODE] Software Development c++ | |
I've tried every way I can possibly see to try and convert the value from the numctrl to a decimal but the problem lies with the retrieved value being a float. I cant covert the float to a string first because it looses the trailing 0 in values such as … Software Development python | |
Good Afternoon, Can someone help me with this program which is an assignment for a class. I'm new to C++ its my fist course in computer science. The assignment details are: 1. The function removeAt of the class arrayListType removes an element from the list by shifting the elements of … Software Development c++ | |
I want to add a series of buttons, but I don't know what it is called, which makes it difficult to look into. In my scenario, I want a list of four buttons. Each button has an on or an off status (pressed or unpressed). The user would be able … Software Development | |
I binded data to a combobox using a dataset. [CODE] companycb.DisplayMember = "company"; companycb.ValueMember = "visitorVisitID"; companycb.DataSource = ds.Tables["tblVisitorVisit"];[/CODE] I need to remove the duplicate values from the combobox. Is there any other way instead of doing it using an SQL Distinct query? Software Development dataset | |
I have made a small example to illustrate my problem. I have overwritten the createToolTip method for a custom JComponent (eventually it will depend on where abouts the mouse is in the component as to what text to bring up) At first I thought it wasn't being called, but i … Software Development java java-swing | |
Hello, I have to finish my assignment. I have different console exercises. I can solve it. but I have to combine them so that they will execute one after another. I do not know how to do that. in my exercise, I make one program to declare class and other … Software Development | |
hello everyone,i need to make an encryption/decryption program and I'm almost finished, the problem is when i tried to add some gui an error about throwing exception keeps showing.. this is the code without the gui and it works just fine because the [B]throws Exception[/B] is in the main.. [CODE] … Software Development algorithm api encryption gui java java-swing | |
SORRY FOR THE NOOB QUESTION, but until some time ago (1 or 2 weeks) all my programs we comand-line, so I didn't have to... build them(?) But some days ago, i decided to create a program with GUI, and I used QT creator for that. Now My program is finished, … | |
Ok I have another homework problem. Essentially I am to make a text file of randomized characters ( leters bothe upper and lower case, numbers, spaces and specialized characters) and import it as a string into my program. From there I am to make all lowercase letters uppercase. I think … Software Development java | |
I have been using a [icode]Image<Node>[/icode] as the main object to store the data for my program. It is a 2D grid of Node objects. The nodes have properties like [icode]bool Visited[/icode], [icode] float Priority[/icode], etc. I often want to modify these nodes, put some of them in a vector … Software Development c++ | |
I have saved a 2D matrix in a numpy file (.npy) in python. Is there a way I can access the same from C++ and possibly read in the values in a stl vector? [URL="http://www.scipy.org/C++_Extensions_that_use_NumPy_arrays"]This [/URL] is vaguely relevant. But here you make the call from python. I want to … | |
Hello:) I can change background colour on my existing form like this: [CODE]this.BackColor = System.Drawing.Color.Green;[/CODE] or like this [CODE]ActiveForm.BackColor = System.Drawing.Color.Green;[/CODE] But I have another form called CustomerData What I want to know is how I go about using a button click event on the first form to change the … Software Development | |
hello, I'm fairly new to programming in general, and i'm having some trouble figuring out how to use a stack and queue to check to see if a word or certain order of numbers/letters form a palindrome or not. My logic is to read in the original string, push/pop characters … | |
Hi all, I have written a balanced binary search tree as part of an assignment (make a simple Spell Checker). Each node has, among other values, two height ints, leftHeight and rightHeight, to keep track of the heights of any subtrees. My problem is that after a rotation, the heights … Software Development c++ | |
Hi, Just a form where I want to put a default value for a combobox: private sub form_load() me.combobox1.defaultvalue = 3 end sub The property defaultvalue is giving an error, 'method or data member not found'. what do you think? Software Development visual-basic | |
Please i need help in leap year. My problem is, all of the month has a date of 1-31, except for feb. after i choose feb, as my month ( i'm using combo box ) , it removes the date from 29-31, and if i choose a leap year, it … Software Development vb.net | |
I have a set of code that builds a table as the user enters information. This information may be changed more than once before it is considered complete. After the user is done, I want them to click a button, and have that information entered into the SQL database where … | |
I am fairly new to python and am trying to create a table for work. At the moment I use a paper based system with 11 columns. I wanted to see if I could replicate my table in python 3.1.1 The column names are: 1. RMA number 2. Customer 3. … Software Development python |
The End.