ObSys 56 Junior Poster

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.

ObSys 56 Junior Poster

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.

ObSys 56 Junior Poster

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.

Ancient Dragon commented: great advice :) +14
ddanbe commented: ndeed! +15
ObSys 56 Junior Poster

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

ObSys 56 Junior Poster

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

ObSys 56 Junior Poster

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
ObSys 56 Junior Poster

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 …

ObSys 56 Junior Poster

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.

ObSys 56 Junior Poster

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 …

ObSys 56 Junior Poster

It depends on the nature of the website. However you can work out most of the requirements within 5 minutes.

  1. How much space does your page take up on your computer?
    ::Thats the start of your storage requirements

  2. How many people will be visiting the page?
    ::Increased traffic means faster connection/server. general rule: more people = higher spec

  3. Is there a database? (e.g. signup/login, blog, dynamic Content)
    ::If there is a database which is having regular updates, the website will need more storage(eventually).

So there you have it, 3 steps to working out the server you need.

I'd recommend using ww.1and1.co.uk. This is where I host my website www.ob-sys.co.uk

I have found the interface very useful and simple to use. The hosting is also very cheap which is a bonus.

Good Luck with your site.

ObSys 56 Junior Poster

The one that Microsoft usually recomments is MalwareBytes Anti-Malware as can be found here

BigPaw commented: My favourite too. :-) +5
ObSys 56 Junior Poster

If you want it to convey across all browsers then it may be worth having a look at Javascript, notably the jQuery "Fade" function. You can find the information on it HERE. Hope this helps in some way.

<M/> commented: Good idea +8
ObSys 56 Junior Poster

The way I have been taught is to include a constructor method which initates any variables when the object is invoked:

package allin1;

import javax.swing.*;
import java.awt.event.*;
import java.awt.*;

public class Allin1 {
    JFrame frame;
    JPanel panel;
    JButton b1;

    /**
     * This is our constructor
     * This method is executed as the object is invoked
     * In here we can include all our declarations
     */
    public Allin1(){
        frame = new JFrame("Title");
        panel = new JPanel();
        b1 = new JButton("Exit");

        panel.add(b1);
    }

    public static void main(String[] args) {
        new Allin1();
    }
}

Hope this helps. If anything needs explaining then just send me a PM

ObSys 56 Junior Poster

I'd say if you have a good knowledge of Java already it's probably best to just use that. Another option is obviously C++ which if you know Java and C, you will most likely pick up very easily. I don't know if there's a language out there thats better for AI. There may well be something similar to OpenGL but for AI...

ObSys 56 Junior Poster

Ok so first we need to create a 2 dimensional array. To paint the grid, we just need to create a simple loop that loops through each item in the array. As far as referencing the grid goes, the easiest way is to create a switch for grid(x,y) and find the value of each cell.

    int grid[][] = new int[32][32]; //this creates our 32*32 grid

    public void paintComponent(Graphics g){

        grid[2][2]=1; //this is how values are assigned to each cell
        grid[2][3]=2;

        //here we create 2 loops x and y to go through each item in the grid array

        for(int x=0;x<32;x++){

            for(int y=0; y<10; y++){

                //Switch to determine Cell value
                //and therefore cell colour
                switch (grid[x][y]){

                    //default
                    case(0):
                        g.setColor(Color.GREEN);
                        break;

                        //Water
                    case(1):
                        g.setColor(Color.BLUE);
                        break;

                        //dirt
                        case(2):
                            g.setColor(Color.DARK_GRAY);
                            break;

                } 

                //draw the filled rectangle in specified color
                g.fillRect(x*32,y*32,32,32);

                //draw borders
                g.setColor(Color.BLACK);
                g.drawRect(x*32,y*32,32,32);


            }
        }
        repaint();
    }
ObSys 56 Junior Poster
    I'd recommend using an array to create a grid on the screen. Then you can assign each cell a value. This value determines which bitmap is displayed in the cell.

    e.g. If we assign the value 1 to door.jpg and then say
                (3,2) = 1 
         The system then paints the door.jpg image in the cell (3,2).

    Hope this Helps
ObSys 56 Junior Poster

If you invoke a JFrame object in the start of your code you may be able to refer to the identifier later on.

JFrame newFrame = new JFrame();
newFrame.setSize(x,y);
newFrame.setDefaulCloseOperation(JFrame.EXIT_ON_CLOSE);
newFrame.setTitle("My Frame");
etc etc....

//Later on go back the the newFrame identifier
newFrame.setTitle("Company name");

Just an idea.

ObSys 56 Junior Poster

Reverend Jim, I was not refering to your comment. I was talking about deceptikon, I am sorry, I should have made that more clear.

As for deceptikon, the way you write responses comes across rude and arrogant. I personally have no problem with you but the fact that you were so blunt with someone who is obviously new to IT annoys me as everyone has to start somewhere. So stop getting your knickers in a twist.

AndreRet commented: Well said +12
ObSys 56 Junior Poster

Try this

    Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
        'KeyDown switch

        Select Case e.KeyCode

            Case Keys.Enter

                'Is the textbox not null
                If TextBox1.Text <> Nothing Then

                    'EXECUTE INSTRUCTIONS

                End If

        End Select

    End Sub

If there's anything you want clarified just post a reply.

Khav commented: From Khav ..ty for help +2
ObSys 56 Junior Poster

try this

public sub ListFiles()

'DIR for folder
'add each file to ListBox control

For each file as string in IO.directory.getfiles(Folder Path)
	Listbox.items.Add(file)
next

End Sub