43,549 Solved Topics
Remove Filter ![]() | |
Two doubts: 1. Placing run() inside main() generates "illegal start of expression error"? So why can't run() be placed inside main()? 2.With the above code I am getting the output as A C D B. Why B comes last is because of join(). But what I'm unable to understand is … Software Development java | |
General rules is that: 1) A private method cannot be overridden. 2) Subclass method should be a lower access modifier than a overridden superclass method. But the output of the program is "I am Son". Why? Is it because of the rule 2 the output comes? If that's the case … Software Development java microsoft-access | |
Hey guys, I'm a starter so I had a doubt related to placement of a static variable. On line 5, for "static int d=5" compiler issues "illegal start of expression". But when I place it outside main() as Instance variable it works and prints "Hello 5". Why this thing? public … Software Development java | |
#include<iostream> #include<fstream> #include<string.h> using namespace std; int main() { //system("clear"); cout<<"\npls input the file where you want to read the data from\n"; string loc; getline(cin,loc); ifstream g; g.open (loc.c_str(),ios::in); string data; g>>data; cout<<"\n\n\n\n"; cout<<"\nthe data read from the file is\n"; cout<<endl<<data; return 0; } > even if fiole being read … | |
Hi, for a school project (exam actually), we've written a ternary trie for text-completion. We fill it with about 400.000 lines of text (13 MB in total, as UTF-8). Now, java represents characters in UTF-16 i believe. So thats 26 MB, + another 26 for saving the complete strings in … | |
Good Afternoon, I'm having problems with my program that deals with fractions. The problems are with the functions multiply and divide that are not working correctly. So far I have this code. CPP FILE: #include <iostream> #include <cmath> #include "hw4_head.h" using namespace std; int main () { int a, b, … Software Development c++ | |
I am trying to overlay a moving average over a OHLC chart but I get no results. Any ideas on what am I doing wrong ? private static OHLCDataset createPriceDataset(String filename) { //the following data is taken from http://finance.yahoo.com/ //for demo purposes... OHLCSeries s1 = new OHLCSeries(filename); try { BufferedReader … | |
I have a group of files (A.txt, AA.txt etc) in the form A.txt : A,45,56,78,98,11,23 A,98,90,33,76,30,40 AA.txt : AA,65,76,34,76,98,12 AA,12,76,33,76,33,89 How can I quickly remove the symbol column (A,AA) from all these files using Python? (I want to use python because the number of txt files is 3200) Thank you. Software Development python | |
I am in course that uses Gaddis' Starting Out With Pyton 2nd Edition. There is a problem in the course that asks use to write a program that would capitalize sentences that a user inputs. I have come up with a reasonable solution, but I have two major problems. The … Software Development python | |
Hi Everyone, Starting to write **3D images** using** JOGL **and I can't seem to find any **recent information** and help about **JOGL** and creation. I noticed that most of the terms have changed and it doesn't work. Any **recommendations** on what I could read to help update me and keep … Software Development java | |
Hi everyone. I wrote the following code: if the number entered is even ie if n=6 , the column of # should be at the 3rd column (ie 6/2) if the number is odd ie if the number is 9, then the column of # should be at the 5th … Software Development c | |
How can i open acces file using a command button in vb. What should b da reference? what should b da code? Same question for opening pdf file. help me plz. Software Development pdf visual-basic | |
Hello, Iv been trying to work through some issues on binary output recently. But im having problems understanding the conversion process in java when using two's complement. I dont understand why System.out.println(Integer.toBinaryString(-11700)); Prints out 11111111111111111101001001001100. Shoudlnt -11700 only be 15 bits long? When i calculate it by hand and invert … Software Development java | |
Hello guys, I'm trying to make a list of students grade using array. My question is, how am I going to do this? **OUTPUT:** Lea 94 Morgan 85 Jenny 92 Harold 75 I've tried a bit to program, please do check my code. public class StudentScoreArray { public static void … Software Development java | |
Hi, could some one look over my code I by myself dont get where the flaw is. It should paint 1 cube at a time but now it runs all the code through and paints all at once. package net.viped; import java.awt.Color; import java.awt.Graphics; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import javax.swing.JFrame; … Software Development java java-swing | |
I think the following code should print 26 but it's printing 62 instead. public class gjh { public static void main(String[] args) { int x = 2; x += ++x * ++x * ++x; System.out.println(x); } } So how is this possible? Software Development java | |
Hi everybody, I'm trying to do a simple login for a web site, and everything looks fine except one thing, when I enter a name and a password for a superuser I got "403 Forbidden" error. here is my login.html: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> … Software Development python | |
I have a Two Test classes that use variadic templates but I made the constructors explicit so that the compiler doesn't convert anything and leave everything as it was. One class was Array and the other was called 2DArray. When I intialize 2DArray, the compiler was converting its arguments to … Software Development c++ | |
Hi all, I've browsed the net trying to find a paradigm to describe what I'm looking for but haven't been successful. So I'll try to explain it as succinctly as I can. Right now, for my PhD research, I've set out a few applications that take input files that have … Software Development c++ file-system | |
I'm trying to test my copy con and move con as well as their assignment operators. It NEVER gets invoked :S Copy con gets invoked just fine but the assignment operators are never called and neither is the move constructor. How can I test it to make sure it works … Software Development c++ | |
I have created MFC ActiveX project in VS 2010 using C++. I have added just one function "Add" to the project by clicking the Add method option in the menu that pops when you right click _DProjectname under ProjectnameLib in solution explorer. SHORT CSampleProgramActivex01Ctrl::Add(SHORT a, SHORT b) { AFX_MANAGE_STATE(AfxGetStaticModuleState()); // … Software Development c++ | |
Hi! when I try to run this code: struct Cand{ // 0 -> not a cand // 0.5 -> preCand // 1 -> cand float status; // Row position int PosX; // Col position int PosY; /* * and many other things * */ }; int rows = 1024; int … Software Development c++ | |
I am writing a program that is suppose to read all the lines in a .ini file and then the program will configure the network connectivity. ex. ip = 128.123.156.46 then it would set the ip address to 128.123.156.46 i have tried this: while(getline(infile, TheBuffer)) { if(TheBuffer == "ip =") … Software Development c++ | |
In my applcation I have a JText field for entering a phone number. Is it possible to make it only accept numerical characters? Or should i wite a method to alert the user if they enter any other characters into it? Thanks Software Development java | |
hi i am programming for about 4 years and i want to learn how to make a operating system. for ex window, mac or unix. And i am think of storing it on a disk. I have no idea how to get started. can any one tell me the steps? … Software Development c mac-hardware mac-software operating-system unix | |
Hi All, I would like my 'quit' button to appear in the bottom right hand corner of my menu screen, but it seems that every computer in the office has a different sized screen, different size ration (some are widescreen), and different resolution. When I deploy my program, the quit … Software Development vb.net | |
Hi, I'm trying to take two text files, compare them, then output the matches into a new text file. I've read the thread started by the1last, but that's outputting differences, not matches. I just started learning about python a couple days ago, so I don't know anything about what syntax … Software Development python | |
I am trying to run an easy Android ndk app in cpp, but I get UnsatisfiedLink Error for the Generate() function. Any help would be appreciated. I am quite fluent in c++, but my java is a little bit rusty. I have been trying a lot of tips from the … Software Development android-development c java | |
I initiate OpenFileDialog from a btn and once the correct file is selected at OpenFileDialog1_FileOK * ,I want to load Form2 to do some file checking routines. Private Sub OpenFileDialog1_FileOk(sender As System.Object, e As System.ComponentModel.CancelEventArgs) Handles OpenFileDialog1.FileOk dbfFileFolder = System.IO.Path.GetDirectoryName(OpenFileDialog1.FileName) dbfFileName = System.IO.Path.GetFileName(OpenFileDialog1.FileName) dbfFileNameShort = System.IO.Path.GetFileNameWithoutExtension(OpenFileDialog1.FileName) If dbfFileName = "GNDITEM.DBF" … Software Development vb.net | |
I have a TreeMap<String, Customer> (Customer is a class I have created). Customer objects hold a HashMap<String, Repair> (Repair is a class I created). I wrote a method to find a given Repair, this is it: public void processFindRef() { if(ref.length() == 6) // ref is the string we want … | |
I have this form connected with SQL server : http://img171.imageshack.us/img171/7423/692012101827pm.png is there any way that when I enter a new company and press save icon, the combobox will update automatically ? Thanks | |
Following code is for deleting elemnt from array but it shows NullPointerException at **if(names[k].equals(user))** ... how to remove it!!! public class del_array { public static void main(String s[]) { String names[ ] = new String [10]; names[0]="admin"; names[1]="b"; names[3]="m"; String user="b"; for(int k=0;k<names.length;k++) { if(names[k].equals(user)) { String item=names[k]; for(int j=k;j<names.length-1;j++) … Software Development java | |
> "warning: 'class Debug' has pointer data members but does not override 'Debug(const Debug&)' or 'operator=(const Debug&)' [-Weffc++]" The only pointer member I see here is the HANDLE hTHread. Why should I override my constructors or add a move/copy to this class as the compiler suggests? class Debug { private: … Software Development c++ | |
I am using VB.Net 2003 (version 1.1) and I am attempting to open some forms with: Dim myform As New FormX If myform.Visible = False Then myform.Show End If Problem is, no matter what, a New instance of the form opens. How do I check if an instance of myform … Software Development vb.net | |
Good day Gentl'men! I just need a little help for date manipulation.here is the criteria.. I have **two date picker, dtfrom.value & dt2.value, and a variable called "viewtype".. ** **if viewtype="monthly"**, I want to create a listview column base on fromdate.value & todate.value..Example, if **fromdate.value="12/24/2012" and to.value="06/31/2013"**, I want to … Software Development listview visual-basic | |
First of all, just registered and this forum looks great! PROBLEM: My program which I wrote in Code::Blocks, has compiled fine and has worked fine, but when I run the outputted file called (BINDED.exe) it shows a very quick console window then closes, I think this is due to the … Software Development c++ ios open-source | |
Good Afternoon, How do you write a two nested do-while loops to display the pattern: * ** *** **** ***** ****** So far I have this code, but it just displays ****** int i=0; do{ cout<<'*'; i++; }while(i<5); cout<<endl; Software Development c++ | |
My Ubuntu version is 12.04. I'm simply trying to include GL/glu.h in my program, but I get the error: `fatal error: GL/glu.h: No such file or directory` I include it like this: `#include <GL/glu.h>` I have libgl1-mesa-glx-dbg, libgl1-mesa-dev, mesa-common-dev all installed. | |
**alue** I have a Customer class and a Repair class I have a TreeMap(customerDetails) of type <String, Customer>. Each Customer object holds a HashMap(repairs) of type<String, Repair>, the String represents the ref number of the repair. The user of my system types in a ref number, the program searches to … Software Development java | |
Hi, People... I have a question about reading xls files in python then parsing it to sqlDatabase. The thing is, that the xls file(pricelist) we as a company use are ordered and it's pretty easy to sort that out. The problem comes with xls files from other companies. (We are … Software Development python | |
I'm really confused with this! I have 2 classes, Club and Membership. In Membership I have the method, getMonth(), and in Club I have joinedMonth() which takes the parameter, 'month' - so a user enters a month and then I want it to return the Membership's which joined in that … Software Development java | |
Good day to everyone.. First Here is my code so far.. import java.io.*; public class Inventory { public static void main (String[]args)throws IOException{ BufferedReader bv = new BufferedReader (new InputStreamReader(System.in)); String x, z; boolean y = true; int a, b, c, d = 0; do { System.out.println("--------------------------------------------------------------"); System.out.println(" M I … Software Development java java-netbeans programming-construct | |
Hi, I have some images which I update like below: count++; if(count >= sizeOfArray) { count = 0; } for(u32 i=0; i<sizeOfArray; i++) { s_image[i].image->setVisible(false); s_image[i].reverse->setVisible(false); } I want to know, how do I reverse it. I mean, it is increasing the count and I want to decrease it. The … Software Development c++ | |
If a heap is like a binary search tree shouldn't it search in O(log n)? Software Development data-structure seo | |
I've been working through an excersise in a introduction to Java book by Deitel and I have a solution to a problem. The program will compile, but I get a message that says, "Exception in thread "main" java.lang.IllegalArgumentException: adding container's parent to itself" Can Someone please help me? Here is … Software Development gui java java-swing | |
currently I'm rewriting old euler solutions into classes so i can store them in a library. I wrote a program that digitizes a number so it can check to see if it a pallindrome, The base class digitize dynamically allocates memory for the size of a number and stores each … Software Development c++ motherboards-cpu-ram oop | |
How can I create a Modifiable Const vector but make it unable to be resized? Either that OR I want to return a pointer from a function but not allow the user to delete it. This is my example so far: class MemberRawArrayVector { private: vector<unsigned char> MemberRawArray; public: MemberRawArrayVector(int … Software Development c++ | |
![]() | Hi, I have made a code where I write a recipe to a file and then I can read from the file and it is output in a listbox. I need to allow the user to change the amount of people served and then the quantities change to suit the … Software Development vb.net |
hey guys i have done my codes and its working properly the only thing that's bothering me is that' when i input 52 and 'a' as my name, it wont ouput the right answer (it should be 'a' also) i hope you guys can help me thanks! public static void … Software Development java | |
This is driving me crazy. I downloaded netbeans and love it but for the last 5-6 hours i have been trying to figure out why my java programs is not showing images. When i open it with jGrasp the images and everything loads perfect. With netbeans it will not show … Software Development java java-netbeans |
The End.