You might have a better idea if you look at the Java Primitive Data Types and what data they are able to hold.

https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html

Ok. You need to think about this logically.

You must first read the users input.
Then split the string of numbers into individul digits - which are then stored in some sort of collection.
You then need to iterate through the collection and print out each element.

We don't get the grades for writing the code for you! But use those instructions as a guide for your research and learning.

I know this is going to sound basic, but add some breakpoints into areas where the operations are being performed. Then debug the code and add watches to the data variables.

By watching each variable, you will be able to narrow down where the problem is, and then post a more concise and directed query.

At the moment, you have posted too much code for people to engage.

The editor was just an example. For instance I may have written a program that I want to call without using the entire pathname and insteaad just want to call it 'move' or 'john'. What I am asking is how do I get linux to understand that 'John' means execute a program at location x.

Thank you

Hey,

Basically I want to be able to type something like 'editor &' and have an editor of my choice open. Similar to if you type 'emacs &' emacs opens. I was wondering where this information is kept and how to edit it for the desired results.

Thank you

The blueprints aren't instantiated because a blueprint is a design for a building not the building itself.

Just in case this analogy has gone too far;

Java attempts to mimic the real world using objects e.g. Cars

A class is a description of a car. Is defines everything about it.
When you 'instantiate' (create) this Car object, you use the class to determine what the car looks like, how it behaves etc.

Inheritance is used when you have a group of things that share some common attributes e.g. wheels, doors, engine etc.

Quick note, these values do not have to be the same for every car, they simply have to be present. SO a car can have 4 wheels or 6 wheels, as long as it has wheels

The key to inheritance is there are lots of cars, but there are also different TYPES of car e.g. sports car, 4x4, pickup. Each of these cars has certain attributes that other cars don't have e.g. a 4x4 may have heavy duty tyres.

Inheritance allows us to treat every Car as a Car whilst still maintaining the different types of Car.

Simplest way to explain is: A Parent class has a series of common attributes and methods found in every Child class. Each Child class has access to these attributes and methods, but also has some custom methods of its own that no-one else knows about.

Hope this helps

Just to add to the discussion, I believe it is possible to speed up your pc using a USB and ReadyBoost. I have very little knowledge about this however so it may not be possible. Have a go though, right click on your USB in 'My Computer' and select Properties. Go to the ReadyBoost tab and follow the instructions and see if this helps at all.

If not then you will need to try something else I'm afraid.

I agree with JamesCherrill, the best way to further your knowledge is to think of a project. Then, go and create it. First try will be shit (pardon my french), but as you continue to develop applications, you pick up the different techniques required.

One thing I would say is try not to get bogged down in various technologies such as XML, it's a very basic technology. In terms of complexity, Java is far more complex than XML and things like C++ are more complex than Java.

If you do want to know about XML, use w3Schools, it's a great free resource. Also for learning how to incorporate it to Java, have a look at the Java Documentation.

Also on a side note, don't listen to stultuske, his attitude is unproductive. People lime JamesCherrill are far better as their goal is to guide you through to process of learning, rather than making themselves feel big.

Hope this advice helps, if you need anything don't hesitate to contact me.

I am currently creating a MySQL back-end database system and have come across a problem. Whilst building my ERD, I have noticed that one table requires 3 Foreign Keys. Is this acceptable database design?

Thanks for all your help

Read this an figured I should add something. DO NOT FOLLOW DEEPMODI's advice!!! Microsoft never take kindly to people downloading their software from anyone except themselves. People have tried and failed repeatedly. So as a reminder, Microsoft Website Only!

The last thing you want is to be in a legal battle with Microsoft, they have immense power and they often win.

Hope you take this advice.

ddanbe commented: ndeed! +15
Ancient Dragon commented: great advice :) +14

I think I know what you mean. I believe you are asking about the different elements that form an expression. I think for this I shall just list them for you.

  • This - Dimension Variable
  • That - Object
  • TheOther - Function
  • Something - Parameter

It is probably going to be beneficial to have a read online about each of these to fully understand them. This is key to programming so make sure you understand it!

Hope this helps

Another useful resource is the Kolling and Barnes book which is used in many Java courses. It uses it's own development environment which is designed for teaching java to beginners and the book will take you to an average level of Java programming. If you are interested, the book is linked here. It may seem expensive but it's a worthwhile investment.

Hope this helps

I believe that you are in my CS class at Hertfordshire judging by this post. Your answer is clearly laid out in the practical 9 pdf on the hompages site. Look under heading "UselessHTTPServer05".

You said your new to Java. If thats the case then I would definately recommend not starting out with such an ambitious project.

Just to kind of echo what JamesCherrill has said, it is impossible to access a machine without an IP address. The entire point of an IP is address is to provide a reference to a machine across a network. It is literally impossible to find a machine without it's ip.

Have a read around how networks work before attempting this if I were you

It would be interesting to see more of a following for the Hardware/Software area of the forum. Obviously it would increase the knowledge base that would become available to the users of Daniweb.

I think the reason there has been a demise, is the movement in education away from Hardware especially. Whilst most people have access to a computer of some kind, very few understand how it works and even less care.

There are however, changes occuring that may change this. For instance, here in England, the government is starting to introduce Computer Science topics into Secondary Education (ages 11-18). This is a great improvement, as it enables so many more people to engage with computer science, a subject which has been restricted to University level courses.

What you've done is great, you have literally missed one tiny detail.

The replace method in String returns a new String object. Currently you are calling the method but not putting the result anywhere. So when you return the variable 'string', you return what you gave it.

Try using string = string.replace(ch,'1'); instead. This means you are then assigning the result of replacing the capital letters to your string variable.

Good Work. Well done

In future, if you get stuck, have a look at the java Documentation online. Google something like 'Java String doc' and it will come up. It's really useful

aslam.junaid786 commented: It is working sir, Thank you so much and yeah I'll keep that in mind. +0

Google displays results based on two main qualities.

First is, it looks at what pages link to your page, it examines the importance of all these sites. It then looks at all the sites that link to those sites and examines the importance of those sites. Bigger, more influencial sites have a higher importance which instantly raises the importance of your site.

Another thing it looks at is the occurance of keywords and their proximity within your page. So if the query is "Hello World" and your site contains "Hello" and position 1 and "World at position 387, you will have a low rank for the query. However, if you have "Hello" and position 1 and "World" at position 2, then you have a high rank as the words fit the query very well.

There are also other things to consider such as when the document was last modified as new content is better for users than a page that has been left dormant for the last 8 years.

On the whole I'd say that you need to think about when you want your page to turn up by listing the queries that you want to return your page, then make sure that the content on your page includes the keywords.

Posting on many sites will not get your rank up, especially if they are things like blogs and forums as this isn't reliable influencial sources. You need relevant, big sites to find your site and provide links to it ...

That is truely amazing. Not that he can write code, because realistically, anyone can do that given the time and resources...but that someone was willing to give him a chance, that's inspirational.

Thank you for sharing this

I think the biggest barrier to overcome here is that you are not fully understanding the role of an Object in programming. I wrote a small article on my new blog a few days ago about this. It's shameless I know, but have a little look, it may help.

If that doesn't help then go and buy the Objects First with BlueJ book. It's written by the professors who created BlueJ. It's a really good guide from basics all the way up to moderately complex code. Worth the money!!

Hope this advice helps

AhmadHasanSahi, This information is widely available on the internet as these are very common sort operations. I suggest you take a litle bit of time to research rather than asking for others to write your code for you.

This is a free help forum, not a development centre. There are many people on the internet who would happily write your code for a fee, but this is not one of those places.

Please take this into consideration in future.

I love James Cherrill's idea of using a html file to output. Then the file could be opened ina browser to display the formatting. Never even thought of that. Thank you!!

ok so your going to need a loop surrounding your statements so that 3 items can be selected

private String[] mainArray = new String[10];
private String[] threeStrings = new String[3];

public void getThreeRandomStrings()
{
    Random rand = new Random();

    for(int i = 0; i < 3; i++)
    {
        threeStrings[i] = mainArray[rand.nextInt(10)];
    }
}

This example does not take into consideration the fact that the Random object may produce the same integer twice which would lead to a String in mainArray being selected twice in a single allocation. This wouldn't cause an error, however it may mess with any further operations you wish to execute.

Hope this was helpful

If not you can DM me for further assistance or reply to this thread.

Good Luck

Ok, Imagine an actual physical book.

This is what you are trying to describe in your class. Whenever we program in Object Oriented Programming 'OOP', we try to Describe and Model real world Objects.

So let's start,

All books have an Author, a Title, Pages, Reference Numbers and Identity Numbers.

These are the properties of a Book, we put these in the fields of the class. The Fields are the variables placed at the top of the class e.g private int pages

Next we have Methods. These are ways of manipulating the Book object.

There are two types of Methods, Accessors and Mutators. Accessors GET information and therefire have a Return statement. Mutators change/mutate the data.

The idea behind OOP is to be able to write the description of something once and implement it many times. So we have written a Book class, and now we can use it to make 1000 books or more if we please.

Hopefully this has clued you up more on the aim of a Class.

There are things here that you cannot do, e.g. add a Book to a Book, you need to have another class that maintains a Collection of Books (e.g a Library)

I think this is all the information I can give due to the nature of the forum where I cannot help you first hand. If you still have problems with coding, I'd recommend getting the 'Objects First with Java' book written by Kolling and Barnes. These are the people ...

Ms.toumi, thsi forum is not designed for people to do your work for you. If you need help, then show us something you have already done, little bits of code that you have started to develop towards your solution.

Do not just ask for help and give a description of your problem. You cannot learn without trying and failing to do things.

There are so many people who are willing to help, but you need to make some effort yourself.

Show us what you have and we will help.

Ok so I'm writing a program that outputs text to a file.

Currently, I am writing it to a .TXT file for ease and convenience. Ideally, I would like to output some of the information so that it is formatted with Italics. I'm thinking that using a RTF file would be simplest but i'm not entirely sure as I have never bothered with this problem.

Any help of guidance would be appriciated. Also if suggesting a file type, do you know of any useful Websites that have tutorials or guides to outputting formatted text using java.

Thank you in advance

There is no need for the If statement to be there.

When you iterator through your Collection, you either find the desired item, or you don't. These are your only 2 outcomes.

  1. Item Found - Return the Item object, method stop executing when a value is returned

  2. Item not Found - While loop finishes, Code after is Executed. Regardless of the if statement, the return value is always null. So if the method does not find the desired item, it always returns null.

Because of this, there is no need to check if the item is null as the outcome will always be the same.

Hope this helps

ghosh22, What vjproduction is saying, is that the problem that you have posted is long and complex, and you haven't actually made a start yourself. This forum is designed for smaller, more specific problems. You have posted a specification for a project and are expecting experienced web designers to do the heavy lifting.

VJ's post gives you good areas to look at so that you are able to make a start. Then once you reach a sticking point with a piece of code, use this forum to get advice..

Hope this was helpful

Cheaper than books, try this website. It's free and has a lot of good starting points.

If your looking for inspiration and to see some cool design ideas/code, visit css-tricks. It's run by a guy called Chris Coyier and he usually posts some pretty interesting guides about web programming.

If your looking for a book specifically however, John Duckett's HTML & CSS book is a good starting point

Hope this helps

I don't think there is a built in function of Eclipse that offers this, however they may be a plugin floating around out there. I'd have a look for that