Sunday, September 28, 2014

How to Involve API With Android

Instructions

    1

    Open the Java Eclipse programming software and open your Android app project. Double-click the "main.xml" file in the "resource" directory for the app.

    2

    Locate the "manifest" tag in the XML file. Within this tag, add the following value:

    In this example, the API version used in the Android app is version 5.

    3

    Save the file and click "Run" to execute the code in the Android emulator. The emulator opens and displays your app in the designated version.



How to Set an SVN in Eclipse

Instructions

    1

    Open the Eclipse software and open the project with which you want to use SVN. Click the Software Updates menu item and select Find and Install.

    2

    Click Search for New Features to Install in the list of options and click "Next." Click New Update Site in the right panel. In the opened window, copy and paste "http://subclipse.tigris.org/update_1.0.x" into the URL text box and click "OK."

    3

    Click "Subclipse" in the details window. Click "Finish" to install and set up the system. This process takes several minutes to complete.



How to Pass the Checkbox Value Into Database Using JSP Servlet

Instructions

    1

    Open your JSP editor and the Web project. Open the page that you want to use to retrieve the checkbox value and insert the value into the database.

    2

    Create a variable and use the "getParameter" function to retrieve the checkbox value. The following code retrieves the value:

    string cbValue = req.getParameter("name");

    Replace "name" with the name of your checkbox on the JSP form.

    3

    Connect to the database server. The following code uses a MySQL database example to connect to a database server:

    Class.forName("org.gjt.mm.mysql.Driver");
    connection = DriverManager.getConnection (serverURL, "dbuser", "password");

    Replace the "serverURL," username and password with your database server information.

    4

    Insert the checkbox value into a database table. The following code inserts the checkbox value into the "subscription" database:

    String query = "insert into subscript values (?)";
    PreparedStatement ps = connection.prepareStatement(query);
    int rows = ps.executeUpdate();



How to Open Java Images in Android

Instructions

    1

    Open the Eclipse software on your desktop and open the Android app project to open all of the files in the editor.

    2

    Double-click the "main.xml" file in the "resource" directory. This file is where you place your XML images and layout. Add the following code to add an image to the app:

      android:orientation="horizontal"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:layout_weight="1">

      android:background="@null"
    android:id="@+id/myimage"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/myimage" />

    The "myimage" ID is the image you want to use from the list of Java project images.

    3

    Open the view and display the image in your app. The following code opens the "main.xml" file and displays the image:

    setContentView(R.layout.main);



How to Use Xerces in Eclipse

Instructions

    1

    Open the Eclipse software and open the Java project you want to use to parse the XML file. Double-click the .java source code file in the left panel to open the code in the editor.

    2

    Instantiate the class and open the XML file. The class loads the XML into a handler so you can edit or display the information. The following code loads the file customer.xml into the parser, but replace this file with your own:

    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    xml= db.parse("customer.xml");

    3

    Display the node list. For instance, the following code displays the employee's first and last name to the user:

    Element elements = xml.getDocumentElement();
    NodeList nodes = elements.getElementsByTagName("customer");
    System.out.println((Element)nodes.item('FirstName') + " " + (Element)nodes.item('LastName') );



How to Turn Off JSP Validation in Eclipse

Instructions

    1

    Open the Eclipse software and open your JSP project to open all of the programming files.

    2

    Click the Eclipse "Window" menu item. Click "Preferences." Click the "Web and XML" tab to view a list of options.

    3

    Remove the check mark next to the "Validate JSP Fragments" in the "JSP Files" section. Click "OK" to save the preferences.



How to Fix Lava on 317 Client

How to Fix Lava on 317 Client

Instructions

    1

    Check your code for simple errors. Make sure all of your lines of code begin with "" when necessary. Leaving out a bracket is one of the biggest causes of buggy server behavior.

    2

    Download a new 317 client. If you don't have much invested in the client you're running, it may be easier to start over with an unmodified bug-free 317 client than to try to fix the bugs in your current client.

    3

    Download a patch for your current client. There are patches available that fix the bugs commonly encountered in RuneScape clients, such as scenery not appearing where it should and lava not flowing correctly.

    4

    Install the patch according to the instructions, and re-start your server. The bugs should be fixed and the lava should work correctly.

    5

    Join a RuneScape Private Server forum. There are several available, and when new bugs come up, this is the best place to find fixes and workarounds because other people will have encountered a similar problem already.