Wednesday, November 27, 2019

Rare Earth Properties

Rare Earth Properties When you look at the Periodic Table, there is a two-row block of elements located below the main body of the chart. These elements, plus lanthanum (element 57) and actinium (element 89), are known collectively as the rare earth elements or rare earth metals. Actually, they arent particularly rare, but prior to 1945, long and tedious processes were required to purify the metals from their oxides. Ion-exchange and solvent extraction processes are used today to quickly produce highly pure, low-cost rare earths, but the old name is still in use. The rare earth metals are found in group 3 of the periodic table, and the 6th (5d electronic configuration) and 7th (5f electronic configuration) periods. There are some arguments for starting the 3rd and 4th transition series with lutetium and lawrencium rather than lanthanum and actinium. There are two blocks of rare earths, the lanthanide series, and the actinide series. Lanthanum and actinium are both located in group IIIB of the table. When you look at the periodic table, notice that the atomic numbers make a jump from lanthanum (57) to hafnium (72) and from actinium (89) to rutherfordium (104). If you skip down to the bottom of the table, you can follow the atomic numbers from lanthanum to cerium and from actinium to thorium, and then back up to the main body of the table. Some chemists exclude lanthanum and actinium from the rare earths, considering the lanthanides to start following lanthanum and the actinides to start following actinium. In a way, the rare earths are special transition metals, possessing many of the properties of these elements. Common Properties of the Rare Earths These common properties apply to both the lanthanides and actinides. The rare earths are silver, silvery-white, or gray metals.The metals have a high luster but tarnish readily in air.The metals have high electrical conductivity.The rare earths share many common properties. This makes them difficult to separate or even distinguish from each other.There are very small differences in solubility and complex formation between the rare earths.The rare earth metals naturally occur together in minerals (e.g., monazite is a mixed rare earth phosphate).Rare earths are found with non-metals, usually in the 3 oxidation state. There is little tendency to vary the valence. (Europium also has a valence of 2 and cerium also a valence of 4.)

Saturday, November 23, 2019

DefaultTableModel Class in Java Stores Data for the JTable

DefaultTableModel Class in Java Stores Data for the JTable TheDefaultTableModel class is a subclass of the AbstractTableModel. As the name suggests it is the table model that is used by a JTable when no table model is specifically defined by the programmer. The DefaultTableModel stores the data for the JTable in a Vector of Vectors. Although theVector is a legacy Java collection it is still supported and there is no issue with using it unless the additional overhead caused by using a synchronized collection is a problem for your Java application. The advantage of using theDefaultTableModel over a custom AbstractTableModel is you dont have to code the methods like add, insert or delete rows and columns. They already exist to change the data held in the Vector of Vectors. This makes it a quick and easy table model to implement. Import Statement import javax.swing.table.DefaultTableModel; Constructors TheDefaultTableModel class has six constructors. Each can be used to populate of the DefaultTableModel in different ways. The first constructor takes no arguments and creates aDefaultTableModel which has no data, zero columns and zero rows: DefaultTableModel defTableModel DefaultTableModel(); The next constructor can be used to specify the number of rows and columns of aDefaultTableModel with no data: DefaultTableModel defTableModel DefaultTableModel(10, 10); There are two constructors that can be used to create aDefaultTableModel with column names and a specified number of rows (all containing null values). One uses an ​Object array to hold the column names, the other ​a Vector: String[] columnNames {Column 1,Column 2,Column 3}; DefaultTableModel defTableModel DefaultTableModel(columnNames, 10); or DefaultTableModel defTableModel DefaultTableModel(columnNames, 10); Finally there are two constructors used to populate theDefaultTableModel with row data along with column names. One used Object arrays, the other Vectors: Object[][] data {{1,1,1},{2,2,2},{3,3,3},{4,4,4}}; String[] columnNames {Column 1,Column 2,Column 3}; DefaultTableModel defTableModel DefaultTableModel(data, columnNames); or Vector rowData new Vector(); rowData.add(1); Vector data new Vector(); data.add(0, rowData); Vector columnNames new Vector(); columnNames.add(Column 1); DefaultTableModel defTableModel DefaultTableModel(data, columnNames); Useful Methods To add a row to theDefaultTableModel use the addRow method along with the row data to add: Object[] newRowData {5,5,5,5}; defTableModel.addRow(newRowData); To insert a row use theinsertRow method, specifying the row index to insert and the row data: Object[] insertRowData {2.5,2.5,2.5,2.5}; defTableModel.insertRow(2,insertRowData); To delete a row use theremoveRow method, specifying the row index to delete: defTableModel.removeRow(0); To get a value in a table cell use thegetValueAt method. For example, if the data at row 2, column 2 contains an int: int value tabModel.getValueAt(2, 2); To set a value in a table cellsetValueAt method with the value to set along with the row and column index: defTableModel.setValueAt(8888, 3, 2); Usage Tips If aJTable is created using the constructor that is passed a two-dimensional array containing the row data and an array containing the column names: Object[][] data {{1,1,1},{2,2,2},{3,3,3},{4,4,4}}; String[] columnNames {Column 1,Column 2,Column 3}; JTable exampleJTable new JTable(data, columnNames); then the following cast will not work: DefaultTableModel dft (DefaultTableModel)exampleJTable.getModel(); A runtimeClassCastException will be thrown because in this instance the DefaultTableModel is declared as an anonymous inner class in the JTable object and cannot be cast. It can only be cast to the TableModel interface. A way around this is to create your own DefaultTableModel and set it to be the model of the JTable: JTable exampleJTable new JTable(); DefaultTableModel defTableModel new DefaultTableModel(data, columnNames); exampleJTable.setModel(defTableModel); Then theDefaultTableModel defTableModel can be used to manipulate the data in the JTable. To see theDefaultTableModel in action have a look at the DefaultTableModel Example Program.

Thursday, November 21, 2019

Retail concept project Essay Example | Topics and Well Written Essays - 500 words

Retail concept project - Essay Example Value Proposition The customer is our master. Our organization will do all the best to ensure that every customer who visits our organization leaves feeling more satisfied. We aspire to give them more than they expect by providing a wide variety of things under the same roof, a service which is rare. Positioning Statements Our mission is to provide high quality and genuine products to our customers at affordable prices. Marketing Strategy In every organization, the main target is to maximize the level of sales. Marketing is one of the main strategies through which an organization can manage to win its potential customers. In this case, marketing process is very significant bearing in mind the current situation where the market is characterized by a very high level of competition. One of the marketing tools which can be feasible to an art gallery at the initial stage is advertisement. Advertisement as a method of promotion is associated with a number of advantages. To start with, adve rtisement is effective in reaching a wide range of audience (Trehan and Trehan 146).This is especially when advertising is conducted through a media which reaches a large number of people. The method will reach greater number of people compared to other methods like the sales promotion.