- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 0
- Posts with Upvotes
- 0
- Upvoting Members
- 0
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
Re:
hello Folks, I would really appreciate if I could get some help on this. I have an Integer lets say number = 12345 I want to get a string out which is 12,345 so basically puts a commas after every three digits... the number of digits in the number can … | |
Code works, however i'm having problems with reverse string- i cant figure out how to index the elements. for cycle returns errors, what else could i use? The end goal would be to compare string line with string reverse. If adequate elements match its a palindrome. [code=c++] #include <iostream> #include … | |
|
Re:
Here's the pattern: [CODE]******* ***** *** * ** *** ***** ********[/CODE] Here's the code I used to get only the first part(the up-side down triangle): [CODE] class hourglass { static void pattern() { for(int j=1;j<=4;j++) { for(int i=1;i<=j;i++) { System.out.print(" "); } for(int i=7;i>j;i--) { System.out.print("*"); } System.out.println(); } } … |
Re:
Well I was just wondering what should be the first step of making a project(school or professional). Ohkay we've conceived it all. But i just make a garbage of ideas. How to make them bit neat n clear. What shud be the steps, a developer should take before going for … | |
I have a class Banner that extends JFrame implements ActionListener and is responsible for thread handling via actionPerfmored. "launch banner", "pause banner" works. "resume banner" seems to be dead alltogether [code=java] import java.awt.*; import javax.swing.*; public class BannerP extends JPanel implements Runnable { int width, height, xPos=10; boolean stopT; public … | |
its supposed to zip folder content recursively, which it does until it encounters a folder with both an empty folder and a non-empty. or so i think. i used the following structure to zip: [URL="http://img291.imageshack.us/img291/6120/84976017.jpg"]http://img291.imageshack.us/img291/6120/84976017.jpg[/URL] if untitled folder is removed it works. any tips would be much appreciated. [code=java] import … | |
Re:
how to get the correct difference and product of dis?! [code] import java.io.*; public class exer05{ public static void main(String args[])throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int num = 0; int number = 0; int diff = 0,pro = 0,sum=0; System.out.print("Enter number of times:"); number = Integer.parseInt(br.readLine()); for(int … | |
as far as i understand in order to sort a multidimensional array you have to make you own class that implements Comparator. the string which is to be sorted has the following structure: [0][0] filename1 [0][1]filesize1 [0][2]lastmodified1 [1][0] filename2 [1][1]filesize2 [1][2]lastmodified2 ... i want to be able to compare by … | |
Re:
Hi all, I want to read the data from the browser what i opened in my browser using java.if can any one knows pls help me.... Thanks all in advanced.... Regards, sreeram | |
theres a login form that can be used by 3 types of people with different permsissions. on login the user in question is proccesed by a servlet and is redirected to a myaccount page, that depending on his permisions has 1-3 additonal href's; those too, should be generated dynamically; so … | |
if using tomcat with eclipse plugin everything works fine through the eclipses built-in browser. is it suffice to say if i copied the eclipses project to tomcats webapps it should work as well? heres how my eclipse project looks like: [URL="http://i40.tinypic.com/315e713.jpg"]http://i40.tinypic.com/315e713.jpg[/URL] invoking html is in WebContent\ WelcomeServlet.html proccesing .class in … | |
not directly java yet, however would need some insights if what im doing so far is correct: [img]http://imgkk.com/i/LYge7gtV.jpg[/img] short overview: once an actor has attempted to login he is quering the database to get his permision level determined and is redirected to either user, engineer or manager account-like page that … | |
Re:
i need to extract the number part from the string which looks like "(7 r 8digits).txt". i need to store this found string in some variable, but i am confused wih the groups twhether o get the string as group() or group(1). Pattern p = Pattern.compile("\b[0-9]{7,8}\b"); Matcher matcher = p.matcher("num"); … | |
Re:
Hello, everyone! I will graduate in this month, and I have contracted with a software development company as a Java Programmer. I am, however, wondering how could I become an excellent Java programmer! I need some suggestions on: how to improve my development skills? what kind of book or journal … | |
need some guidance on how to make JTable look something like this: [img]http://imgkk.com/i/pQTxSCQf.jpg[/img] so far on searching i'v found nothing concrete and what i have found is scrambled between multiple .java and hundreds of lines. not readable to me. what/where should i look into that would provide me a skeleton-like … | |
Class A has a MouseMotionListener which updates cursorLocation every time its called; Class B extends A. the idea is to make B's lastSelected update once cursorLocation is updated and println the new coords. i thought paintComponent could be used for that but im sure theres something obvious im missing: [code="java"]import … | |
Re:
Hi! Thank you for checking out this thread. I've been programming PHP since 2001 and I want to tell you that I just love the PHP community. There are so many people who have helped me out over the years and two weeks ago I decided that I really want … | |
Re:
Working on a current project with these parameters and am not sure where to start. I am new to all of this and could use some input. Use JAVA to build a sales commission application. In this application, the user enters a number in the SALES JoptionPane textbox. When the … | |
[code="java"] import java.awt.BorderLayout; import java.awt.Graphics; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.awt.event.MouseMotionListener; import javax.swing.*; public class SketchPad { public static void main(String[] args) { SketchPad sketchpad = new SketchPad(); sketchpad.gui(); } public void gui() { JFrame mainF = new JFrame(); JMenuBar menuBar = new JMenuBar(); JMenu fileMenu = new JMenu("file"); mainF.setJMenuBar(menuBar); … | |
its supposed to draw an oval on MouseClicked: [code="java"] import java.awt.event.*; import javax.swing.*; import java.awt.*; public class PaintPad extends JPanel implements MouseListener { private int mouseX, mouseY; public static void main(String args[]) { PaintPad pad = new PaintPad(); pad.setGui(); } public void setGui() { JFrame frame = new JFrame(); JPanel … | |
I have 2 websites: website A which is blank and is categorized; website B which doesn't have categories but has information; I want php to go to website B, get all the new information that has been added since last visit, and then update websites A database; now i know … | |
Re:
i hav a problem m new to php nd i started with writin my first page but whenever i start my browser i see the complete code and nt the output i need i wrote [code=php]<html> <title>my php page</title> <body> <?php echo "hello there!"; ?> </body> </html>[/code] the output is … | |
hello gents, i have two pages: page1.php takes user input, page2.php should process it and then return page1 either error or success messages. there seem to be an error(s) i cant figure out: when you fill the form with correct data you get: [code]Warning: Invalid argument supplied for foreach() in … | |
Re:
This isn't a specific question regarding a certain program or anything, so if this is in the wrong forum, feel free to move it. :confused: I was just curious how long everyone here has been programming, and how long with C++? The reason I'm asking is I'm curious as to … | |
hey again, code below works but it tends to give some info which shouldn't be there: (for example a - 0 where 'a' is a letter and 0 is the times the letter was repeated) [code=cplusplus] #include <iostream> #include <stack> #include <fstream> using namespace std; int main() { fstream fin1("E:\\iras.txt", … | |
works, allows entering a user selected amount of strings, however when i try to display, it displays only the last string, not the whole 'database', whatever you'd call it :) the main question is what is wrong and also, is there any way to not to ask a user to … | |
the code is supposed to take 1-10 char word and copy the word into another array. it somewhat does that but some mysteries are included [code=c++] #include <iostream> using namespace std; int main() { char word[10]; cin>> word; char *Arr; int index=0; for (int i=0; i<10; i++) if (word[i] >= … | |
I'm trying to make so it would check if letter i and i+1 are alike. If so it'd drop "denied" else "accepted". i dont understand what I did wrong though: [code=c++] #include <iostream> using namespace std; int main() { char pass[5]; bool correct=false; cout<< "pass: "; cin>> pass; for (int … | |
[code=c++] #include <iostream> using namespace std; class client { private: int choice; int age; int height; int weight; char *name; public: void menu(); void setStats(); void task(); }; //======================================================== void client::menu() { cout<< "MENU \n"; cout<< "1. enter data \n"; cout<< "2. view data \n"; cout<< "3. quit \n"; int … | |
[code=c+] #include <iostream> #include <string> using namespace std; int main() { string a; cout<< "enter string" <<endl; cin>> a; string b; //======================================================== for (int j=a.size(); j>0; j--) { for (int i=0; i<a.size(); i++) { b[j]=a[i]; } } cout<< b <<endl; return 0; } [/code] i want the first character on … |