magnet:?xt=urn:btih:

CSS

Simple CSS full-screen scaleable image

With this line of HTML and CSS you can set up a fullscreen image on your website, keeping the proportions, without using JS. It´s supported by all major browsers, even IE7.

The HTML is as follows:


<div class="background"></div>

The CSS is as follows:


div.background { width:100%; height:100%; background-image:url(images/image.jpg); BACKGROUND-SIZE:COVER; }

Left and Right


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	
	
	
	<style type="text/css">
	   
	   * { margin: 0; padding: 0; }
	   p { padding: 10px; }
	   #left { position: absolute; left: 0; top: 0; width: 50%; }
	   #right { position: absolute; right: 0; top: 0; width: 50%; }
	
	</style>
</head>

<body>

    <div id="left">
        <p>Left Half</p>
        <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
        <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
    </div>

    <div id="right">
        <p>Right Half</p>
        <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
        <p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo. Quisque sit amet est et sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus lacus enim ac dui. Donec non enim in turpis pulvinar facilisis. Ut felis. Praesent dapibus, neque id cursus faucibus, tortor neque egestas augue, eu vulputate magna eros eu erat. Aliquam erat volutpat. Nam dui mi, tincidunt quis, accumsan porttitor, facilisis luctus, metus</p>
    </div>

</body>

</html>

CSS webfonts working example

{spic}
Testing.
 
Testing..
 
Testing...
{/spic}


In this example the fonts (Regular-Bold.eot etc) are all in the same working directory as the HTML file.

Java

Hello World Java


public class HelloWorld 
{
    public static void main(String[] args) 
    {
        System.out.print("Hello World");
    }

}

Tic-Tac-Toe Winning Move Algorithm


public boolean checkWin()
{
    // check all rows for a straight flush
    for ( int i = 0 ; i < ROWS ; i++ )
    {
        if ( board[i][0] == board[i][1] && board[i][0] != EMPTY_SPACE)
        {
            if ( board[i][1] == board[i][2])
            {
                System.out.println("Horizontal Winner");
                return true;
            }
        }
    }
 
    // check all columns for a straight flush
    for ( int i = 0 ; i < COLUMNS ; i++ )
    {
        if ( board[0][i] == board[1][i] && board[0][i] != EMPTY_SPACE)
        {
            if ( board[1][i] == board[2][i])
            {
                System.out.println("Vertical Winner");
                return true;
            }
        }
    }
 
    // check special cases (botched code)
    if ( board[0][0] == board[1][1] && board[1][1]
                     == board[2][2] && board[2][2] != EMPTY_SPACE )
    {
        System.out.println("Diagonal Winner");
        return true;
    }
        if ( board[0][2] == board[1][1] && board[1][1]
                         == board[2][0] && board[2][2] != EMPTY_SPACE )
        {
            System.out.println("Diagonal Winner");
            return true;
        }
    return false;
}

Swing Fullscreen Mode


/*
 * Copyright (c) 1995 - 2008 Sun Microsystems, Inc.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Sun Microsystems nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
/*
  test @(#)DisplayModeTest.java	1.4 01/07/17
  @bug 4189326
  @summary Tests changing display mode
  @author martak@eng: area=FullScreen
  @ignore This test enters full-screen mode, if available, and should not
  be run as an applet or as part of the test harness.
*/
 
/**
 * This test generates a table of all available display modes, enters
 * full-screen mode, if available, and allows you to change the display mode.
 * The application should look fine under each enumerated display mode.
 * On UNIX, only a single display mode should be available, and on Microsoft
 * Windows, display modes should depend on direct draw availability and the
 * type of graphics card.
 */
 
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
 
class DisplayModeModel extends DefaultTableModel {
    private DisplayMode[] modes;
 
    public DisplayModeModel(DisplayMode[] modes) {
        this.modes = modes;
    }
 
    public DisplayMode getDisplayMode(int r) {
        return modes[r];
    }
 
    public String getColumnName(int c) {
        return DisplayModeTest.COLUMN_NAMES[c];
    }
 
    public int getColumnCount() {
        return DisplayModeTest.COLUMN_WIDTHS.length;
    }
 
    public boolean isCellEditable(int r, int c) {
        return false;
    }
 
    public int getRowCount() {
        if (modes == null) {
            return 0;
        }
        return modes.length;
    }
 
    public Object getValueAt(int rowIndex, int colIndex) {
        DisplayMode dm = modes[rowIndex];
        switch (colIndex) {
            case DisplayModeTest.INDEX_WIDTH :
                return Integer.toString(dm.getWidth());
            case DisplayModeTest.INDEX_HEIGHT :
                return Integer.toString(dm.getHeight());
            case DisplayModeTest.INDEX_BITDEPTH : {
                int bitDepth = dm.getBitDepth();
                String ret;
                if (bitDepth == DisplayMode.BIT_DEPTH_MULTI) {
                    ret = "Multi";
                } else {
                    ret = Integer.toString(bitDepth);
                }
                return ret;
            }
            case DisplayModeTest.INDEX_REFRESHRATE : {
                int refreshRate = dm.getRefreshRate();
                String ret;
                if (refreshRate == DisplayMode.REFRESH_RATE_UNKNOWN) {
                    ret = "Unknown";
                } else {
                    ret = Integer.toString(refreshRate);
                }
                return ret;
            }
        }
        throw new ArrayIndexOutOfBoundsException("Invalid column value");
    }
 
}

{/chilicode} {chilicode java content}

 /*
 * Copyright (c) 1995 - 2008 Sun Microsystems, Inc.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *   - Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *
 *   - Redistributions in binary form must reproduce the above copyright
 *     notice, this list of conditions and the following disclaimer in the
 *     documentation and/or other materials provided with the distribution.
 *
 *   - Neither the name of Sun Microsystems nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
/*
  test @(#)DisplayModeTest.java	1.4 01/07/17
  @bug 4189326
  @summary Tests changing display mode
  @author martak@eng: area=FullScreen
  @ignore This test enters full-screen mode, if available, and should not
  be run as an applet or as part of the test harness.
*/
 
/**
 * This test generates a table of all available display modes, enters
 * full-screen mode, if available, and allows you to change the display mode.
 * The application should look fine under each enumerated display mode.
 * On UNIX, only a single display mode should be available, and on Microsoft
 * Windows, display modes should depend on direct draw availability and the
 * type of graphics card.
 */
 
 
import java.awt.BorderLayout;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.DisplayMode;
import java.awt.FlowLayout;
import java.awt.GraphicsDevice;
import java.awt.GraphicsEnvironment;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
 
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.TableColumn;
 
public class DisplayModeTest extends JFrame implements ActionListener,
    ListSelectionListener {
 
    private boolean waiting = false;
    private GraphicsDevice device;
    private DisplayMode originalDM;
    private JButton exit = new JButton("Exit");
    private JButton changeDM = new JButton("Set Display");
    private JLabel currentDM = new JLabel();
    private JTable dmList = new JTable();
    private JScrollPane dmPane = new JScrollPane(dmList);
    private boolean isFullScreen = false;
 
    public static final int INDEX_WIDTH = 0;
    public static final int INDEX_HEIGHT = 1;
    public static final int INDEX_BITDEPTH = 2;
    public static final int INDEX_REFRESHRATE = 3;
 
    public static final int[] COLUMN_WIDTHS = new int[] {
        100, 100, 100, 100
    };
    public static final String[] COLUMN_NAMES = new String[] {
        "Width", "Height", "Bit Depth", "Refresh Rate"
    };
 
    public DisplayModeTest(GraphicsDevice device) {
        super(device.getDefaultConfiguration());
        this.device = device;
        setTitle("Display Mode Test");
        originalDM = device.getDisplayMode();
        setDMLabel(originalDM);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        // Make sure a DM is always selected in the list
        exit.addActionListener(this);
        changeDM.addActionListener(this);
        changeDM.setEnabled(device.isDisplayChangeSupported());
    }
 
    public void actionPerformed(ActionEvent ev) {
        Object source = ev.getSource();
        if (source == exit) {
            device.setDisplayMode(originalDM);
            System.exit(0);
        } else { // if (source == changeDM)
            int index = dmList.getSelectionModel().getAnchorSelectionIndex();
            if (index >= 0) {
                DisplayModeModel model = (DisplayModeModel)dmList.getModel();
                DisplayMode dm = model.getDisplayMode(index);
                device.setDisplayMode(dm);
                setDMLabel(dm);
                setSize(new Dimension(dm.getWidth(), dm.getHeight()));
                validate();
            }
        }
    }
 
    public void valueChanged(ListSelectionEvent ev) {
        changeDM.setEnabled(device.isDisplayChangeSupported());
    }
 
    private void initComponents(Container c) {
        setContentPane(c);
        c.setLayout(new BorderLayout());
        // Current DM
        JPanel currentPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
        c.add(currentPanel, BorderLayout.NORTH);
        JLabel current = new JLabel("Current Display Mode : ");
        currentPanel.add(current);
        currentPanel.add(currentDM);
        // Display Modes
        JPanel modesPanel = new JPanel(new GridLayout(1, 2));
        c.add(modesPanel, BorderLayout.CENTER);
        // List of display modes
        for (int i = 0; i < COLUMN_WIDTHS.length; i++) {
            TableColumn col = new TableColumn(i, COLUMN_WIDTHS[i]);
            col.setIdentifier(COLUMN_NAMES[i]);
            col.setHeaderValue(COLUMN_NAMES[i]);
            dmList.addColumn(col);
        }
        dmList.getSelectionModel().setSelectionMode(
            ListSelectionModel.SINGLE_SELECTION);
        dmList.getSelectionModel().addListSelectionListener(this);
        modesPanel.add(dmPane);
        // Controls
        JPanel controlsPanelA = new JPanel(new BorderLayout());
        modesPanel.add(controlsPanelA);
        JPanel controlsPanelB = new JPanel(new GridLayout(2, 1));
        controlsPanelA.add(controlsPanelB, BorderLayout.NORTH);
        // Exit
        JPanel exitPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
        controlsPanelB.add(exitPanel);
        exitPanel.add(exit);
        // Change DM
        JPanel changeDMPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
        controlsPanelB.add(changeDMPanel);
        changeDMPanel.add(changeDM);
        controlsPanelA.add(new JPanel(), BorderLayout.CENTER);
    }
 
    public void setVisible(boolean isVis) {
        super.setVisible(isVis);
        if (isVis) {
            dmList.setModel(new DisplayModeModel(device.getDisplayModes()));
        }
    }
 
    public void setDMLabel(DisplayMode newMode) {
        int bitDepth = newMode.getBitDepth();
        int refreshRate = newMode.getRefreshRate();
        String bd, rr;
        if (bitDepth == DisplayMode.BIT_DEPTH_MULTI) {
            bd = "Multi";
        } else {
            bd = Integer.toString(bitDepth);
        }
        if (refreshRate == DisplayMode.REFRESH_RATE_UNKNOWN) {
            rr = "Unknown";
        } else {
            rr = Integer.toString(refreshRate);
        }
        currentDM.setText(
            COLUMN_NAMES[INDEX_WIDTH] + ": " + newMode.getWidth() + " "
            + COLUMN_NAMES[INDEX_HEIGHT] + ": " + newMode.getHeight() + " "
            + COLUMN_NAMES[INDEX_BITDEPTH] + ": " + bd + " "
            + COLUMN_NAMES[INDEX_REFRESHRATE] + ": " + rr
            );
    }
 
    public void begin() {
        isFullScreen = device.isFullScreenSupported();
        setUndecorated(isFullScreen);
        setResizable(!isFullScreen);
        if (isFullScreen) {
            // Full-screen mode
            device.setFullScreenWindow(this);
            validate();
        } else {
            // Windowed mode
            pack();
            setVisible(true);
        }
    }
 
    public static void main(String[] args) {
        GraphicsEnvironment env = GraphicsEnvironment.
            getLocalGraphicsEnvironment();
        GraphicsDevice[] devices = env.getScreenDevices();
        // REMIND : Multi-monitor full-screen mode not yet supported
        for (int i = 0; i < 1 /* devices.length */; i++) {
            DisplayModeTest test = new DisplayModeTest(devices[i]);
            test.initComponents(test.getContentPane());
            test.begin();
        }
    }
}

Simple Exception




public class SimpleException
{

    public static void main ( String [] args )
    {
        String m = ""; // expect content
        System.out.println(m);
       
        try
        {
            m = reverse(m);
        } catch (IndexOutOfBoundsException e) {
           
            System.out.println("String was not valid.");
            e.printStackTrace();
           
        }
        finally
        {
            System.out.println("main method finished");
        }
       
    }
       
    static String reverse(String input) throws IndexOutOfBoundsException
    {
       
        if (input.length() == 0)
        {
            throw new IndexOutOfBoundsException();
        }
       
        String s = "";
       
        for ( int i =input.length()-1 ; i >= 0 ; --i )
        {
            s += input.charAt(i);
        }
       
        return s;
    }

}









Object Reference Return Values

There are six legal ways to return values in Java. The most interesting of which is a method which has an object reference return type, which can return any object type that can implicitly cast to the declared type.

public Animal getAnimal() {
    return new Dog(); // Assuming the Dog class extends the Animal class
}


 public interface Bouncable  {}


 public class Ball implements Bouncable { }


 public class TestBouncable {
    //method with an interface return type
    public Bouncable () {
         return new Ball(); // returns interface implementer
    }
}

IGB Javascript Functions

IGB Javascript Functions

From EVEDev
Jump to: navigation, search

Contents

Function list

Always available functions

Function Arguments Description Example
CCPEVE.openEveMail none Opens the EVE mail window. Same behaviour as when a user clicks the EVE mail icon on the left bar.
CCPEVE.openEveMail(); // Show mail window 
CCPEVE.showInfo integer typeID [, integer itemID] Opens the info window for the specified type. The first argument must be a typeID that is listed in the invTypes table of the static data dump.

The second parameter is used to specifiy a single entity of the given type. It can be a

  • corporationID
  • allianceID
  • factionID
  • characterID (including NPC characters like agents)
  • a celestial ID like regionID or solarSystemID
CCPEVE.showInfo(2, 109299958); // Corporation
CCPEVE.showInfo(16159, 434243723); // Alliance
CCPEVE.showInfo(30, 500002); // Faction
CCPEVE.showInfo(1377, 3008416); // Character, agent
CCPEVE.showInfo(1377, 1736529287); // Character, player
CCPEVE.showInfo(3, 10000001); // Region
CCPEVE.showInfo(4, 20000002); // Constellation
CCPEVE.showInfo(5, 30000001); // Solar system
CCPEVE.showInfo(6); // Sun type
CCPEVE.showInfo(13); // Planet type
CCPEVE.showInfo(32444); // Inventory item
CCPEVE.showRouteTo integer destination [ , integer origin] Shows the route to the given destination on the map from current position or (if given) from origin. Both destination and origin must be solarSystemIDs

Bug: Often the map does not load.

CCPEVE.showRouteTo(30000001); // Route to Tanoo
CCPEVE.showRouteTo(30000001, 30003276); // Route from FD-MLJ to Tanoo
CCPEVE.showMap [integer solarSystemID] Opens the map view. If a solarSystemID is given, the map is centered on this system.

Bug: Often the map does not load.

CCPEVE.showMap(); // Open the map
CCPEVE.showMap(30000001); // Center map on Tanoo
CCPEVE.showPreview integer typeID Show the preview window of the given type. Only inventory types that can be deployed in space, thus have a model, can be used.
CCPEVE.showPreview(597); // Ship
CCPEVE.showPreview(2486); // Drone
CCPEVE.showFitting string shipDNA Show the fitting window for the given ship and it's components. See section about Ship DNA for information about its structure.

Important: The fitting is not validated, you can pass a fitting were a rookie ship has a dooms day device.

 // Punisher with a Salvager
CCPEVE.showFitting('597:25861;1:6673;3:439;1:4025;1:1183;1:1998;1:1236;1:11269;1::');
 // Punisher with a Capital Shield Transporter I
CCPEVE.showFitting('597:3616;1:6673;3:439;1:4025;1:1183;1:1998;1:1236;1:11269;1::');
CCPEVE.showContract integer stationID, integer contractID Show the info window about the given contract. First parameter must be the stationID of the station were the contract was issued.

The contractID can currently only be found in the WalletJournal of a character or corporation.

CCPEVE.showContract(60012607, 10);
CCPEVE.showMarketDetails integer typeID Open the market window (if not already open) and show the list of buy and sell orders for the given item
CCPEVE.showMarketDetails(20); // Show market orders of kernite
CCPEVE.requestTrust string url Open the request trust dialog, to confirm trust for the given URL. Has no effect if this URL is already trusted, or ignored.

See the section about trust below for details.

CCPEVE.requestTrust('http://wiki.eve-id.net'); // Request trust for this wiki

Functions that require trust

See the section about trust below for details.

Function Arguments Description Example
CCPEVE.setDestination integer solarSystemID Set the autopilots destination to the given solarSystem
CCPEVE.setDestination(30000001); // Set destination to Tanoo
CCPEVE.addWaypoint integer solarSystemID Add a waypoint to the autopilots route
CCPEVE.addWaypoint(30000001); // Add Tanoo to the current route
CCPEVE.joinChannel string channelName Join the given channel, asks if the channel should be created if it does not exist.

Not case sensitive

CCPEVE.joinChannel('freelancer'); // Join the "Freelancer" channel
CCPEVE.joinMailingList string channelName Join the given mailing list, succeeds silently. If the mailinglist does not exist, an error is shown

Not case sensitive

CCPEVE.joinMailingList('SomeList'); // Join the "SomeList" mailing list
CCPEVE.createContract integer type of contract [, integer stationID [, string itemIDs]] Open the contract wizard, with the given type already selected. Type can be
  • 1 = Trade contract
  • 2 = Auction contract
  • 3 = Courier contract

If stationID is given, this station is selected, otherwise the current or last station is selected itemIDs are a string of comma separated itemIDs that can be found in the Asset List. If no items are given, they must be selected in the wizard.

CCPEVE.createContract(1); // Create a trade contract
CCPEVE.createContract(1, 60000004); // Create a trade contract in Muvolailen X - Moon 3 - CBD Corporation Storage
CCPEVE.createContract(1, 60000004, '1,2,3,4'); // Create a trade contract with items already selected
 
CCPEVE.sellItem integer stationID, string itemID Open the wizard for creating new sell order. itemID can be found in the Asset List
CCPEVE.sellItem(60000004, '1234'); // Sell item 1234 in  Muvolailen X - Moon 3 - CBD Corporation Storage


CCPEVE.buyType integer typeID Open the wizard for buy orders for the given type.
CCPEVE.buyType(20); // Buy kernite
CCPEVE.findInContracts integer typeID Open the contract search and searches for contracts with the given type
CCPEVE.findInContracts(20); // Find contracts with kernite
CCPEVE.addToMarketQuickBar integer typeID Add the given type to the quick access bar of the market window. Succeeds and fails silently.
CCPEVE.addToMarketQuickBar(20); // Add kernite to the market quick bar
CCPEVE.showContents integer locationID, string(number) itemID Show contents of the given item at given location. locationID is typically a station. itemID is a 64-bit number, thus should be passed as string. itemID can refer to a container or a ship.
CCPEVE.showContents(60000004, '12345'); // Show contents of given item
CCPEVE.addContact integer characterID Open the window to add a given character to the address book. If it is already there, the edit contact window is shown.
CCPEVE.addContact(1736529287); // Add or edit the character in(to) the contact list.
CCPEVE.addCorpContact integer characterID Same as addContact, but for corporation contacts.
CCPEVE.addCorpContact(1736529287); // Add or edit the character in(to) the contact list.
CCPEVE.removeContact integer characterID Removes the given character from contact list. If called, a confirmation dialog shows up. This dialog can be disabled via a tick at "remember my decision and do not ask me again". If that is active, it succeeds silently.
CCPEVE.removeContact(1736529287); // Remove the character from) the contact list.
CCPEVE.removeCorpContact integer characterID Same as removeContact, but for corporation contacts. If a users permissions are not high enough, a javascript exception is thrown.
CCPEVE.removeCorpContact(1736529287); // Remove the character from the contact list.
CCPEVE.block integer characterID Blocks a given character. If called, a confirmation dialog shows up. This dialog cannot be disabled by a user.
CCPEVE.block(1736529287); // Block the character
CCPEVE.inviteToFleet integer characterID Invite a character to a fleet, or form a new fleet user is not in one. If called, a confirmation dialog shows up. This dialog cannot be disabled by a user.
CCPEVE.inviteToFleet(1736529287); // Invite the character
CCPEVE.startConversation integer characterID Invite the character to a private conversation. If called, a confirmation dialog shows up. This dialog cannot be disabled by a user.
CCPEVE.startConversation(1736529287); // Invite the character
CCPEVE.addBounty integer characterID Opens the add bounty wizard of the bounty offics window, with the given character selected.
CCPEVE.addBounty(1736529287); // Add bounty to character
CCPEVE.showContracts integer corporationID Open the search contracts window and shows all contracts of the given corporation
CCPEVE.showContracts(109299958); // Show contracts of corporation
CCPEVE.showOnMap [integer regionID|constellationID|solarSystemID] Opens the map and center it on the given celestial object. The ID can be
  • regionID
  • constellationID
  • solarSystemID

CCPs [Game Browser Demo] page lists corporationID as a possible parameter, but this does not seem to work

CCPEVE.showOnMap(); // Just open the map
CCPEVE.showOnMap(10000001); // Center map on region Derelik
CCPEVE.showOnMap(20000002); // Center map on constellation Anares
CCPEVE.showOnMap(30000001);// Center map on system Tanoo
 
CCPEVE.editMember integer characterID Open the corporation info window about the given character

Users with sufficient rights get the edit view Fails silently for characters not in the corporation

CCPEVE.showContracts(109299958); // Edit / show infos about the character
CCPEVE.awardDecoration integer characterID Opens the wizard with the given user selected.
CCPEVE.awardDecoration(109299958); // Award the character
CCPEVE.sendMail integer characterID|corporationID|allianceID, string subject, string body Open the new mail window with the given subject and body to the given receipients already filled out. Receipient can be
  • A character
  • A users own corporation
  • A users own alliance if the user has the communication officer right

Only one receipient is allowed, sending a mail to several is not possible. Subject and body are mandatory as well and must not be empty. A single space character is allowed though.

CCPEVE.sendMail(109299958, 'Happy birthday', 'Congrats'); // Send a mail to the user
CCPEVE.sendMail(109299958, ' ', ' '); // Send the mail with "empty" subject and body
 
CCPEVE.bookmark integer celestialID Open the add bookmark window, with the position of the given object and its name prefilled. The ID can be any object that is inside a solar system, like
  • Suns
  • Planets
  • Moons
  • Belts
  • Stations
CCPEVE.bookmark(40455687); // Moon
CCPEVE.bookmark(40455686); // Planet
CCPEVE.bookmark(40000001); // Star / Sun
CCPEVE.bookmark(60014863); // Station
CCPEVE.showSovereignty unknown This function is available in IGB but does not have any effect. See the section about issues for more information none
CCPEVE.clearAllWaypoints none Remove all waypoints from the autopilot, including its destination.
CCPEVE.clearAllWaypoints(); // Remove all previously set waypoints or the destination

Further information

Consider

  • Most functions fail silently when an error occurs. The logserver (if running) will contain information about it, but - unlike in other browser - no exception is thrown.
  • The EVE client is a 32-bit program, so the IGB cannot handle integers that are outside the clients scope. If 64-bit numbers must be passed, make sure to pass them as strings.
  • Most functions do not differ between string numbers and integer numbers.

Ship DNA

Description

Ship DNA is a string of typeIDs and quantity values to describe a ship and a fitting. Using the CCPEVE.showFitting() function, this fitting can be displayed in-game. Layout:

<shipTypeId> ':' [<typeId> ';' <quantity> ':']* ':'

Ships, modules and charges/drones are defined by their typeID, which can be found in the invTypes table of the static data export. Any item, except the ship hull, must always have a quantity value (a number preceeded by a literal semicolon), and separated by a literal colon from the next item:

typeId;quantity:

The order of items in DNA doesn't matter, as long as they are listed after the hull. The game client will strip any bogus entries in ship DNA, and attempt to make as much sense out of it, as possible. Space in the DNA string are allowed, though strongly discouraged for compatibility reasons. It is important to keep in mind, that fittings are not validated, eg.: it is possible to show a rookie ship with modules that can only be fitted on capital ships, or a fitting with amount of modules, that exceed the available module or turret/launcher slots.

Examples

Show an unfit Rifter

CCPEVE.showFitting('587::');

Rifter with 2x 150mm Autocannon and 1x 200mm Autocannon

CCPEVE.showFitting('587:485;2:486;1::');

Rifter with two Small Trimark Armor Pump I rigs

CCPEVE.showFitting('587:30987;2::');

Rifter with three cannons and two Small Trimark Armor Pump I rigs

CCPEVE.showFitting('587:30987;2:485;2:486;1::');

Rifter with Capital Shield Transporter I and Oblivion doomsday device

CCPEVE.showFitting('587:3616;1:24552;1::');

Trust

Description

All functions in the section Functions that require trust will fail silently, unless the user trusts the site. Trust can be requested using the

CCPEVE.requestTrust();

function. This function opens a window were the user has to confirm or decline the request for trust. Once confirmed, a green tick in the lower right corner of the IGB is displayed and the functions work. As a parameter a fully qualified domain name must be given. This can be an URL, a domain only and can contain wildcards. If only a domain is given, IGB automatically adds a wildcard to grant trust to all pages on this domain.

Examples

 
 CCPEVE.requestTrust('http://wiki.eve-id.net/IGB_Javascript_Functions'); // Request trust for this page only
 CCPEVE.requestTrust('http://wiki.eve-id.net'); // Request trust for all pages on the wiki
 CCPEVE.requestTrust('http://wiki.eve-id.net/*'); // Request trust for all pages on the wiki
 CCPEVE.requestTrust('http://*.eve-id.net'); // Request trust for all pages on all subdomains of eve-id.net 
 

Issues

  • All methods that open the map, sometimes fail at the last step. All windows are minimized, the map panel is shown, but the map itself is not loaded. A repeated call to the same function does not change anything. If the map is already open, they work as expected.
  • IGB contains a CCPEVE.showSovereignty method, that does not seem to be implemented. No action is shown in the client and the logserver shows an uncaught exception.

Ascii Codes


ASCII

Hex

Symbol

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F

NUL
SOH
STX
ETX
EOT
ENQ
ACK
BEL
BS
TAB
LF
VT
FF
CR
SO
SI


ASCII

Hex

Symbol

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
1F

DLE
DC1
DC2
DC3
DC4
NAK
SYN
ETB
CAN
EM
SUB
ESC
FS
GS
RS
US


ASCII

Hex

Symbol

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

20
21
22
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F

(space)
!
"
#
$
%
&
'
(
)
*
+
,
-
.
/


ASCII

Hex

Symbol

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

30
31
32
33
34
35
36
37
38
39
3A
3B
3C
3D
3E
3F

0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?


ASCII

Hex

Symbol

64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

40
41
42
43
44
45
46
47
48
49
4A
4B
4C
4D
4E
4F

@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O


ASCII

Hex

Symbol

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95

50
51
52
53
54
55
56
57
58
59
5A
5B
5C
5D
5E
5F

P
Q
R
S
T
U
V
W
X
Y
Z
[
\
]
^
_


ASCII

Hex

Symbol

96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111

60
61
62
63
64
65
66
67
68
69
6A
6B
6C
6D
6E
6F

`
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o


ASCII

Hex

Symbol

112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127

70
71
72
73
74
75
76
77
78
79
7A
7B
7C
7D
7E
7F

p
q
r
s
t
u
v
w
x
y
z
{
|
}
~


256 Decimal, Hexadecimal, Octal, and Binary Conversions


Dec

Hex

Oct

Bin

0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F

000
001
002
003
004
005
006
007
010
011
012
013
014
015
016
017

00000000
00000001
00000010
00000011
00000100
00000101
00000110
00000111
00001000
00001001
00001010
00001011
00001100
00001101
00001110
00001111


Dec

Hex

Oct

Bin

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

10
11
12
13
14
15
16
17
18
19
1A
1B
1C
1D
1E
1F

020
021
022
023
024
025
026
027
030
031
032
033
034
035
036
037

00010000
00010001
00010010
00010011
00010100
00010101
00010110
00010111
00011000
00011001
00011010
00011011
00011100
00011101
00011110
00011111


Dec

Hex

Oct

Bin

32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47

20
21
22
23
24
25
26
27
28
29
2A
2B
2C
2D
2E
2F

040
041
042
043
044
045
046
047
050
051
052
053
054
055
056
057

00100000
00100001
00100010
00100011
00100100
00100101
00100110
00100111
00101000
00101001
00101010
00101011
00101100
00101101
00101110
00101111


Dec

Hex

Oct

Bin

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63

30
31
32
33
34
35
36
37
38
39
3A
3B
3C
3D
3E
3F

060
061
062
063
064
065
066
067
070
071
072
073
074
075
076
077

00110000
00110001
00110010
00110011
00110100
00110101
00110110
00110111
00111000
00111001
00111010
00111011
00111100
00111101
00111110
00111111


Dec

Hex

Oct

Bin

64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79

40
41
42
43
44
45
46
47
48
49
4A
4B
4C
4D
4E
4F

100
101
102
103
104
105
106
107
110
111
112
113
114
115
116
117

01000000
01000001
01000010
01000011
01000100
01000101
01000110
01000111
01001000
01001001
01001010
01001011
01001100
01001101
01001110
01001111


Dec

Hex

Oct

Bin

80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95

50
51
52
53
54
55
56
57
58
59
5A
5B
5C
5D
5E
5F

120
121
122
123
124
125
126
127
130
131
132
133
134
135
136
137

01010000
01010001
01010010
01010011
01010100
01010101
01010110
01010111
01011000
01011001
01011010
01011011
01011100
01011101
01011110
01011111


Dec

Hex

Oct

Bin

96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111

60
61
62
63
64
65
66
67
68
69
6A
6B
6C
6D
6E
6F

140
141
142
143
144
145
146
147
150
151
152
153
154
155
156
157

01100000
01100001
01100010
01100011
01100100
01100101
01100110
01100111
01101000
01101001
01101010
01101011
01101100
01101101
01101110
01101111


Dec

Hex

Oct

Bin

112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127

70
71
72
73
74
75
76
77
78
79
7A
7B
7C
7D
7E
7F

160
161
162
163
164
165
166
167
170
171
172
173
174
175
176
177

01110000
01110001
01110010
01110011
01110100
01110101
01110110
01110111
01111000
01111001
01111010
01111011
01111100
01111101
01111110
01111111


Dec

Hex

Oct

Bin

128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143

80
81
82
83
84
85
86
87
88
89
8A
8B
8C
8D
8E
8F

200
201
202
203
204
205
206
207
210
211
212
213
214
215
216
217

10000000
10000001
10000010
10000011
10000100
10000101
10000110
10000111
10001000
10001001
10001010
10001011
10001100
10001101
10001110
10001111


Dec

Hex

Oct

Bin

144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159

90
91
92
93
94
95
96
97
98
99
9A
9B
9C
9D
9E
9F

220
221
222
223
224
225
226
227
230
231
232
233
234
235
236
237

10010000
10010001
10010010
10010011
10010100
10010101
10010110
10010111
10011000
10011001
10011010
10011011
10011100
10011101
10011110
10011111


Dec

Hex

Oct

Bin

160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175

A0
A1
A2
A3
A4
A5
A6
A7
A8
A9
AA
AB
AC
AD
AE
AF

240
241
242
243
244
245
246
247
250
251
252
253
254
255
256
257

10100000
10100001
10100010
10100011
10100100
10100101
10100110
10100111
10101000
10101001
10101010
10101011
10101100
10101101
10101110
10101111


Dec

Hex

Oct

Bin

176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191

B0
B1
B2
B3
B4
B5
B6
B7
B8
B9
BA
BB
BC
BD
BE
BF

260
261
262
263
264
265
266
267
270
271
272
273
274
275
276
277

10110000
10110001
10110010
10110011
10110100
10110101
10110110
10110111
10111000
10111001
10111010
10111011
10111100
10111101
10111110
10111111


Dec

Hex

Oct

Bin

192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207

C0
C1
C2
C3
C4
C5
C6
C7
C8
C9
CA
CB
CC
CD
CE
CF

300
301
302
303
304
305
306
307
310
311
312
313
314
315
316
317

11000000
11000001
11000010
11000011
11000100
11000101
11000110
11000111
11001000
11001001
11001010
11001011
11001100
11001101
11001110
11001111


Dec

Hex

Oct

Bin

208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223

D0
D1
D2
D3
D4
D5
D6
D7
D8
D9
DA
DB
DC
DD
DE
DF

320
321
322
323
324
325
326
327
330
331
332
333
334
335
336
337

11010000
11010001
11010010
11010011
11010100
11010101
11010110
11010111
11011000
11011001
11011010
11011011
11011100
11011101
11011110
11011111


Dec

Hex

Oct

Bin

224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239

E0
E1
E2
E3
E4
E5
E6
E7
E8
E9
EA
EB
EC
ED
EE
EF

340
341
342
343
344
345
346
347
350
351
352
353
354
355
356
357

11100000
11100001
11100010
11100011
11100100
11100101
11100110
11100111
11101000
11101001
11101010
11101011
11101100
11101101
11101110
11101111


Dec

Hex

Oct

Bin

240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255

F0
F1
F2
F3
F4
F5
F6
F7
F8
F9
FA
FB
FC
FD
FE
FF

360
361
362
363
364
365
366
367
370
371
372
373
374
375
376
377

11110000
11110001
11110010
11110011
11110100
11110101
11110110
11110111
11111000
11111001
11111010
11111011
11111100
11111101
11111110
11111111