Please help me with my code (has conversion from string to int)
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class Test3 extends MIDlet implements CommandListener
{ Form mForm;
Command mCommandQuit;
Command mCommandItem;
TextField input,prime1,prime2,prime3,output;
Display mDisplay;
int i,j=0,k1,k2,p,q,b;
//int [] current=new int [1000];
String mstring,a="";
String [] temp=new String [1000];
public void startApp()
{System.out.println("startApp");
mForm=new Form("RSA Encryption");
mCommandQuit=new Command("QUIT",Command.EXIT,0);
mCommandItem=new Command("ENCRYPT",Command.ITEM,0);
mForm.append("Enter text:\n");
input=new TextField(null,"",100, TextField.ANY);
mForm.append(input);
mForm.append("Enter first prime number(p):\n");
prime1=new TextField(null,"",100, TextField.ANY);
mForm.append(prime1);
mForm.append("Enter second prime number(q):\n");
prime2=new TextField(null,"",100, TextField.ANY);
mForm.append(prime2);
mForm.append("Enter d:\n");
prime3=new TextField(null,"",100, TextField.ANY);
mForm.append(prime3);
mForm.addCommand(mCommandQuit);
mForm.addCommand(mCommandItem);
mDisplay=Display.getDisplay(this);
mDisplay.setCurrent(mForm);
mForm.setCommandListener(this);
public void pauseApp()
{System.out.println("pauseApp");
public void destroyApp(boolean unconditional)
{System.out.println("destroyApp");
public void commandAction(Command c, Displayable d)
{System.out.println("commandAction");
if(c==mCommandQuit)
notifyDestroyed();
else if(c==mCommandItem)
{p = Integer.parseInt(prime1.getString());
q = Integer.parseInt(prime2.getString());
b = Integer.parseInt(prime3.getString());
//breaking up of big string into ints
mstring=input.getString();
temp[0]="";
for(i=1;i<mstring.length();i++)
{if (mstring.charAt(i) == ' ')
{j++;
temp[j]="";
else
{temp[j]=temp[j]+mstring.charAt(i);
mForm.append("\n\nThe array is:\n");
for(i=0;i<temp.length && temp!=null;i++)
{k1=Integer.parseInt(temp[i]); ***********************
k2=k1;
for(j=1;j<b;j++)
{k1=k1*k2;
k1=k1 %(p*q);
k2=k1 %(p*q);
a=a+new Character((char)k2).toString();
output=new TextField(null,a,100, TextField.ANY);
mForm.append(output);
}hi
this code basically takes an input of string like " 179 84 48 48 155 " (with spaces)
then it creates smaller strings in an array like "179","84","48","48","155" without the spaces
then it creates int values 179,84,48,48,155 and finally after some math functions it prints the corresponding letters.
the problem is that it is not printing the letter because of some exceptions-->java.lang.NumberFormatException .it comes in the line where i have put stars
could anybody please help me print the letters
thanks for all ur help guys, but me and my team member solved it on our own. here is the new code:
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
public class Test3 extends MIDlet implements CommandListener
{ Form mForm;
Command mCommandQuit;
Command mCommandItem;
TextField input,prime1,prime2,prime3,output;
Display mDisplay;
int i,j=0,l,k1,k2,p,q,n,b;
String mstring,a = "";
String [] temp=new String [1000];
public void startApp()
{System.out.println("startApp");
mForm=new Form("RSA Encryption");
mCommandQuit=new Command("QUIT",Command.EXIT,0);
mCommandItem=new Command("DECRYPT",Command.ITEM,0);
mForm.append("Enter text:\n");
input=new TextField(null,"",100, TextField.ANY);
mForm.append(input);
mForm.append("Enter first prime number(p):\n");
prime1=new TextField(null,"",100, TextField.NUMERIC);
mForm.append(prime1);
mForm.append("Enter second prime number(q):\n");
prime2=new TextField(null,"",100, TextField.NUMERIC);
mForm.append(prime2);
mForm.append("Enter d:\n");
prime3=new TextField(null,"",100, TextField.NUMERIC);
mForm.append(prime3);
mForm.addCommand(mCommandQuit);
mForm.addCommand(mCommandItem);
mDisplay=Display.getDisplay(this);
mDisplay.setCurrent(mForm);
mForm.setCommandListener(this);
public void pauseApp()
{System.out.println("pauseApp");
public void destroyApp(boolean unconditional)
{System.out.println("destroyApp");
public void commandAction(Command c, Displayable d)
{System.out.println("commandAction");
if(c==mCommandQuit)
notifyDestroyed();
else if(c==mCommandItem)
{p = Integer.parseInt(prime1.getString());
q = Integer.parseInt(prime2.getString());
b = Integer.parseInt(prime3.getString());
n=p*q;
//breaking up of big string into ints
mstring=input.getString();
temp[0]="";
for(i=1;i<mstring.length();i++)
{if (mstring.charAt(i) == ' ')
{j++;
temp[j]="";
else
{temp[j]=temp[j]+mstring.charAt(i);
l=j;
mForm.append("\n\nThe result is:\n");
for(i=0;i<l;i++)
{k1=Integer.valueOf(temp).intValue();
k2=k1;
for(j=1;j<b;j++)
{k2=k2*k1;
k2=k2 %n;
k1=k2 %n;
a=a+new Character((char)k1).toString();
output=new TextField(null,a,100, TextField.ANY);
mForm.append(output);
Similar Messages
-
Hi Gurus,
Please help me with the code.
Algorithm: This is for master data extraction. I need to append some records to I_T_DATA before the loop on I_T_DATA begins.
ZTAB is a custom defined table with key KEY. STAB is standard table with key KEY.
1. Create an internal table I_T_STAB similar to STAB.
2. Loop at I_T_DATA
Read record from ZTAB where KEY = I_T_DATA-KEY and { field1 <> I_T_DATA-field1 or field2 <> I_T_DATA-field2 <> field3 <> I_T_DATA-field3}
If success
Delete record from I_T_DATA.
Else
Continue loop.
Copy all records of STAB to I_T_STAB.
3. Delete records in I_T_STAB where I_T_STAB-KEY = ZTAB-KEY.
Now
4. Delete all records in I_T_DATA where I_T_DATA-KEY = I_T_STAB-KEY.
Now,
5. Append all the remaining records from step 3 in I_T_STAB to I_T_DATA.
Please help me with the code upto this part.
Now the actual code in exit starts.
Loop at I_T_DATA
Thanks,
Regards,
aarthi
[email protected]You might get a quick answer if you were to post in the ABAP forum.
Moderator, please move to ABAP forum. Thanks.
Regards,
Rich Heilman -
class Vehicles
public String name="<unnamed>";
Vehicles Ferrari1=new Vehicles();
Vehicles Honda1=new Vehicles();
Vehicles Toyota1=new Vehicles();
Ferrari.nameFor="Ferrari";
Honda.nameFor="Honda";
Toyota.nameFor="Toyota";
public void main(String[]args)
System.out.println("Hello Folks!");
System.out.println(Ferrari.name);
System.out.println(Honda.name);
System.out.println(Toyota.name);
System.out.println("Bye Now!");
It always says i am missing an indentifier in line 6-8 when i complie. Please help somebody!!!class Vehicles
public String name = "unnamed";
Vehicles Ferrari=new Vehicles();
public void main(String[]args)
System.out.println("Hello Folks!");
Vehicles Ferrari=new Vehicles();
System.out.println(Ferrari.name);
System.out.println("Bye Now!"); -
Please help me with the code!!
Dear All, I am going to simulate a TCP via UDP , and I have been asked for creating some specific methods , also additional helper methods are allowed but I can't avoid implementing any of the functions described below.
I have bold the functions which are ambiguous to me.
[click here to see the detail assignment explanation|http://www.net.t-labs.tu-berlin.de/teaching/ws0809/PD_labcourse/PDF/u5en.pdf|click here to see the detail assignment explanation]
If you see anything wrong please post , thanks.
• rdt connect()
This function sets all the parameters required for connecting to a server. Moreover, it opens a
UDP socket.
• rdt listen()
This function is the server-side counterpart of rdt connect(). It opens a UDP socket for
incoming connections and sets all the required parameters.
• rdt send()
This function takes an arbirary amount of data as input and writes it into a send buffer. It
does not send anything to the network.
• rdt recv()
This function returns the whole receive buffer. It does not really read data from the network,
but only from the receive buffer.
• rdt select()
This function does the whole work of moving data over the network. It behaves similar to the
system call select(), i.e. it blocks until there is some data in the receive buffer. The received
data can be subsequently read with rdt recv(). A flow diagram of the functionality of this
function follows:
– send all()
This function sends all the data in the send buffer over the network to the receiver. If
more than 500 bytes are present in the send buffer, more packets must be sent. The MSS
(Maximum Segment Size) of an RDT packet is 534 bytes.
*– select()*
This is the well-known system call that waits until the receive buffer contains data.
[ I don't know what to do with the buffer , and how to make it empty]
– recv from()
This is the well-known system all recv from() that reads data from the network.
*– statemachine send()*
This is a function that processes a newly received packet. In RDT 1.0 nothing is done here,
becuase the sender does not expect any ACK packets from the receiver.
– statemachine recv()
This function processes incoming packets. In RDT 1.0 the header is removed and the
payload copied to the receive buffer.
– Payload
rdt select() returns at this point if there’s any data in the receive buffer. If not, it starts
from the beginning.
[ where the data should be returned?]
This is my code:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.Socket;
import java.net.SocketException;
public class Ex5 {
DatagramSocket socket , client_socket;
DatagramPacket rcv_pkt;
DatagramPacket send_pkt;
byte[] sendData;
byte[] receivedData;
InetAddress ipaddr;
int client_port;
public void rdt_connect(String host , int client_port) throws IOException{
this.client_port = client_port;
client_socket = new DatagramSocket();
ipaddr = InetAddress.getByName(host);
public void rdt_listen(int port) throws SocketException{
//byte[] buffer = new byte[1024];
socket = new DatagramSocket(port);
//DatagramPacket packet = new DatagramPacket(buffer, buffer.length );
public DatagramPacket rdt_send() throws IOException{
sendData = new byte[534];
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String inString = in.readLine();
sendData = inString.getBytes();
DatagramPacket send_packet = new DatagramPacket(sendData,sendData.length, ipaddr,client_port );
return send_packet;
public DatagramPacket rdt_recv(byte[] receivedData) throws IOException{
//byte[] receivedData = new byte[1024];
DatagramPacket received_packet = new DatagramPacket(receivedData, receivedData.length );
//socket.receive(received_packet);
return received_packet;
public byte[] rdt_select() throws IOException{
rcv_pkt = new DatagramPacket(receivedData,receivedData.length);
while(!receivedData.equals(null)){
return receivedData;
send_all();
return null;
public void send_all() throws IOException{
rcv_pkt = this.rdt_send();
client_socket.send(rcv_pkt);
public DatagramPacket select(){
DatagramPacket local_rcv_pkt = null;
while(receivedData != null){
//local_rcv_pkt = rcv_pkt;
return local_rcv_pkt;
public void recv_from() throws IOException{
rcv_pkt = select();
socket.receive(rcv_pkt);
public void statemachine_send(){
public void statemachine_recv() throws IOException{
String data = new String(rcv_pkt.getData());
receivedData = data.getBytes();
rcv_pkt = this.rdt_recv(receivedData);
}public class Ex5 {
DatagramSocket socket , client_socket;Surely you're not expected to implement the client and the server in the same class?
while(!receivedData.equals(null)){
return receivedData;
}This is just nonsense.
public DatagramPacket select(){See java.nio.channels.Selector.
while(receivedData != null){
//local_rcv_pkt = rcv_pkt;
}More nonsense.
I suggest if you don't understand the assignment you advise those who gave it to you, and/or review whatever supporting information you were supplied or have been taught. -
Please help, urgently Error 1 occurred at Scan From String (arg 1).
I am communicating with the AT Trainer 5000 via serial port to USB converter.
I installed all drivers of converter successfully and it is shown in MAX as com port. I also installed VISA software.
I am using labview 2013 version.
When I connect the hardware to PC via usb to serial converter, try to run the program for seeing of real time graphs, I am receiving this error Error 1 occurred at Scan From String (arg 1) whereas there is no waveform shown in waveform chart.
Also read buffer didn't show an incoming data at read buffer.
Other details for this error is
Possible reason(s):
LabVIEW: An input parameter is invalid. For example if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
Also pics of error is:
Program is also attached. Please checked the also.
Expert please help me how to get rid of this error.
Attachments:
Project.vi 23 KBduplicate post http://forums.ni.com/t5/Instrument-Control-GPIB-Serial/Error-1-occurred-at-Scan-From-String-arg-1/td...
-
i need alittle help i have this GUI that i created and i am trying to hook it up to a database in MS ACCESS and i am have so many problems trying to get my second table called billings to pull and show up in my GUI please take a look at my code and tell me what is wrong with it.
now on my GUI its supposed to allow you to choose a company in the list box and after choosing a company, this allows you to get all the company's information like address and state and zip code and another list box is populated called consultants and you can choose a consultant and gethis or her billing information , like their hours billed from that company and their total hours billed
please look at my code and tell me what is wrong, especially with the part about pulling information from the database.
import java.sql.*;
import java.awt.*;
import java.awt.event.*;
public class Project extends Frame implements ItemListener, ActionListener
//Declare database variables
Connection conconsultants;
Statement cmdconsultants;
ResultSet rsconsultants;
boolean blnSuccessfulOpen = false;
//Declare components
Choice lstNames = new Choice();
TextField txtConsultant_Lname = new TextField(10);
TextField txtConsultant_Fname = new TextField(10);
TextField txtTitle = new TextField(9);
TextField txtHours_Billed = new TextField(14);
Button btnAdd = new Button("Add");
Button btnEdit = new Button("Save");
Button btnCancel = new Button("Cancel");
Button btnDelete = new Button("Delete");
Label lblMessage = new Label(" ");
public static void main(String args[])
//Declare an instance of this application
Project thisApp = new Project();
thisApp.createInterface();
public void createInterface()
//Load the database and set up the frame
loadDatabase();
if (blnSuccessfulOpen)
//Set up frame
setTitle("Update Test Database");
addWindowListener(new WindowAdapter()
public void windowClosing(WindowEvent event)
stop();
System.exit(0);
setLayout(new BorderLayout());
//Set up top panel
Panel pnlTop = new Panel(new GridLayout(2, 2, 10, 10));
pnlTop.add(new Label("Last Name"));
lstNames.insert("Select a Name to Display", 0);
lstNames.addItemListener(this);
pnlTop.add(lstNames);
pnlTop.add(new Label(" "));
add(pnlTop, "North");
//Set up center panel
Panel pnlMiddle = new Panel(new GridLayout(5, 2, 10, 10));
pnlMiddle.getInsets();
pnlMiddle.add(new Label("Consultant_Lname"));
pnlMiddle.add(txtConsultant_Lname);
pnlMiddle.add(new Label("Consultant_Fname"));
pnlMiddle.add(txtConsultant_Fname);
pnlMiddle.add(new Label("Title"));
pnlMiddle.add(txtTitle);
pnlMiddle.add(new Label("Hours_Billed"));
pnlMiddle.add(txtHours_Billed);
setTextToNotEditable();
Panel pnlLeftButtons = new Panel(new GridLayout(0, 2, 10, 10));
Panel pnlRightButtons = new Panel(new GridLayout(0, 2, 10, 10));
pnlLeftButtons.add(btnAdd);
btnAdd.addActionListener(this);
pnlLeftButtons.add(btnEdit);
btnEdit.addActionListener(this);
pnlRightButtons.add(btnDelete);
btnDelete.addActionListener(this);
pnlRightButtons.add(btnCancel);
btnCancel.addActionListener(this);
btnCancel.setEnabled(false);
pnlMiddle.add(pnlLeftButtons);
pnlMiddle.add(pnlRightButtons);
add(pnlMiddle, "Center");
//Set up bottom panel
add(lblMessage, "South");
lblMessage.setForeground(Color.red);
//Display the frame
setSize(400, 300);
setVisible(true);
else
stop(); //Close any open connection
System.exit(-1); //Exit with error status
public Insets insets()
//Set frame insets
return new Insets(40, 15, 15, 15);
public void loadDatabase()
try
//Load the Sun drivers
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
catch (ClassNotFoundException err)
try
//Load the Microsoft drivers
Class.forName("com.ms.jdbc.odbc.JdbcOdbcDriver");
catch (ClassNotFoundException error)
System.err.println("Drivers did not load properly");
try
//Connect to the database
conconsultants = DriverManager.getConnection("jdbc:odbc:Test");
//Create a ResultSet
cmdconsultants = conconsultants.createStatement();
rsconsultants = cmdconsultants.executeQuery(
"Select * from consultants; ");
loadNames(rsconsultants);
blnSuccessfulOpen = true;
catch(SQLException error)
System.err.println("Error: " + error.toString());
public void loadNames(ResultSet rsconsultants)
//Fill last name list box
try
while(rsconsultants.next())
lstNames.add(rsconsultants.getString("Consultant_Lname"));
catch (SQLException error)
System.err.println("Error in Display Record." + "Error: " + error.toString());
public void itemStateChanged(ItemEvent event)
//Retrieve and display the selected record
String strConsultant_Lname = lstNames.getSelectedItem();
lblMessage.setText(""); //Delete instructions
try
rsconsultants = cmdconsultants.executeQuery(
"SELECT c.Consultant_ID"+
"c.Consultant_Lname"+
"c.Consultant_Fname"+
"c.Title"+
"l.Client_ID"+
"l.Client_Name"+
"l.Address"+
"l.City"+
"l.State"+
"l.Zip"+
"b.Hours_Billed"+
"b.Billing_Rate"+
"b.Client_ID"+
"b.Consultant_ID"+
"FROM Consultants c, Clients l, Billing b"+
"WHERE c.Consultant_ID = b.Consultant_ID"+
"l.Client_ID = b.Client_ID"+
"GROUP BY c.Consultant_ID");
//"SELECT * FROM Consultants INNER JOIN Billing ON Consultants.Consultant_ID = Billing.Consultant_ID");
//FROM Consultants INNER JOIN Billing ON Consultants.Consultant_ID = Billing.Consultant_ID;");
//"Select * from consultants where [Consultant_Lname] = '" + strConsultant_Lname + "';");
txtConsultant_Lname.setText(strConsultant_Lname);
displayRecord(rsconsultants);
setTextToEditable();
catch(SQLException error)
lblMessage.setText("Error in result set. " + "Error: " + error.toString());
public void displayRecord(ResultSet rsconsultants)
//Display the current record
try
if(rsconsultants.next())
txtConsultant_Fname.setText(rsconsultants.getString("Consultant_Fname"));
txtTitle.setText(rsconsultants.getString("Title"));
txtHours_Billed.setText(rsconsultants.getString("Hours_Billed"));
lblMessage.setText("");
else
lblMessage.setText("Record not found");
clearTextFields();
catch (SQLException error)
lblMessage.setText("Error: " + error.toString());
public void actionPerformed(ActionEvent event)
//Test the command buttons
Object objSource = event.getSource();
if(objSource == btnAdd && event.getActionCommand () == "Add")
Add();
else if (objSource == btnAdd)
Save();
else if(objSource == btnEdit)
Edit();
else if(objSource == btnDelete)
Delete();
else if(objSource == btnCancel)
Cancel();
public void setTextToNotEditable()
//Lock the text fields
txtConsultant_Lname.setEditable(false);
txtConsultant_Fname.setEditable(false);
txtTitle.setEditable(false);
txtHours_Billed.setEditable(false);
public void setTextToEditable()
//Unlock the text fields
txtConsultant_Lname.setEditable(true);
txtConsultant_Fname.setEditable(true);
txtTitle.setEditable(true);
txtHours_Billed.setEditable(true);
public void clearTextFields()
//Clear the text fields
txtConsultant_Lname.setText("");
txtConsultant_Fname.setText("");
txtTitle.setText("");
txtHours_Billed.setText("");
public void Add()
//Add a new record
lblMessage.setText(" "); //Clear previous message
setTextToEditable(); //Unlock the text fields
clearTextFields(); //Clear text field contents
txtConsultant_Lname.requestFocus ();
//Set up the OK and Cancel buttons
btnAdd.setLabel("OK");
btnCancel.setEnabled(true);
//Disable the Delete and Edit buttons
btnDelete.setEnabled(false);
btnEdit.setEnabled(false);
public void Save()
//Save the new record
// Activated when the Add button has an "OK" label
if (txtConsultant_Lname.getText().length ()== 0 || txtTitle.getText().length() == 0)
lblMessage.setText("The Consultant's Last Name or Title is blank");
else
try
cmdconsultants.executeUpdate("Insert Into consultants "
+ "([Consultant_Lname], [Consultant_Fname], Title, [Hours_Billed]) "
+ "Values('"
+ txtConsultant_Lname.getText() + "', '"
+ txtConsultant_Fname.getText() + "', '"
+ txtTitle.getText() + "', '"
+ txtHours_Billed.getText() + "')");
//Add to name list
lstNames.add(txtConsultant_Lname.getText());
//Reset buttons
Cancel();
catch(SQLException error)
lblMessage.setText("Error: " + error.toString());
public void Delete()
//Delete the current record
int intIndex = lstNames.getSelectedIndex();
String strConsultant_Lname = lstNames.getSelectedItem();
if(intIndex == 0) //Make sure a record is selected
//Position 0 holds a text message
lblMessage.setText("Please select the record to be deleted");
else
//Delete the record from the database
try
cmdconsultants.executeUpdate(
"Delete from consultants where [Consultant_Lname] = '" + strConsultant_Lname + "';");
clearTextFields(); //Delete from screen
lstNames.remove(intIndex); //Delete from list
lblMessage.setText("Record deleted"); //Display message
catch(SQLException error)
lblMessage.setText("Error during Delete."
+ "Error: " + error.toString());
public void Cancel()
//Enable the Delete and Edit buttons
btnDelete.setEnabled(true);
btnEdit.setEnabled(true);
//Disable the Cancel button
btnCancel.setEnabled(false);
//Change caption of button
btnAdd.setLabel("Add");
//Clear the text fields and status bar
clearTextFields();
lblMessage.setText("");
public void Edit()
//Save the modified record
int intIndex = lstNames.getSelectedIndex();
if(intIndex == 0) //Make sure a record is selected
//Position 0 holds a text message
lblMessage.setText("Please select the record to change");
else
String strConsultant_Lname = lstNames.getSelectedItem();
try
cmdconsultants.executeUpdate("Update consultants "
+ "Set [Consultant_Lname] = '" + txtConsultant_Lname.getText() + "', "
+ "[Consultant_Fname] = '" + txtConsultant_Fname.getText() + "', "
+ "Title = '" + txtTitle.getText() + "', "
+ "[Hours_Billed] = '" + txtHours_Billed.getText() + "' "
+ "Where [Consultant_Lname] = '" + strConsultant_Lname + "';");
if (!strConsultant_Lname.equals(txtConsultant_Lname.getText()))
//Last name changed; change the list
lstNames.remove(intIndex); //Remove the old entry
lstNames.add(txtConsultant_Lname.getText()); //Add the new entry
catch(SQLException error)
lblMessage.setText("Error during Edit. " + "Error: " + error.toString());
public void stop()
//Terminate the connection
try
if (conconsultants != null)
conconsultants.close();
catch(SQLException error)
lblMessage.setText("Unable to disconnect");I don't think that your DB URL is correct
-
hi to all experts ,
my requirement is print a barcode..The first part is an alv with two editable fields when user checks the checkbox and changes the second coloumn that no of prints are to be printed ....everything is fine but the problem is if suppose first 3 checkboxes are checked and qty to print is 3 for each .So the total no of prints should be 9 which im able to see in the print preview ......but the problem is when after seeing the print preview when we are back to the alv screen and uncheck one checkbox so now the pages should be 6 but it is still 9 what could be the problem here is my code since i cannot post full im sending in parts.......any help will greatly apprieciated ..........................thanks
TYPE-POOLS: slis.
*TYPES DECLARATIONS
TYPES:BEGIN OF ty_output,
cbox(1) TYPE c,"selection checkbox
menge1 TYPE char16,"QUANTITY TO PRINT
mblnr TYPE mkpf-mblnr,"MATERIAL DOCUMENT NUMBER
bwart TYPE mseg-bwart,"MOVEMENT TYPE
btext TYPE t156t-btext,"MOVEMENT TYPE DESCRIPTION
matnr TYPE mseg-matnr,"MATERIAL NUMBER
maktx TYPE makt-maktx,"MATERIAL DESCRIPTION
menge2 TYPE mseg-menge,"QUANTITY
meins TYPE mseg-meins,"BASE UNIT OF MEASUREMENT
werks TYPE mseg-werks,"PLANT
lgort TYPE mseg-lgort,"STORAGE LOCATION
ebeln TYPE mseg-ebeln,"PO DOCUMENT NUMBER
lifnr TYPE mseg-lifnr,"VENDOR
bldat TYPE mkpf-bldat,"DOCUMENT DATE
budat TYPE mkpf-budat,"POSTING DATE
usnam TYPE mkpf-usnam,"USER ID
xblnr TYPE mkpf-xblnr,"MATERIAL SLIP
END OF ty_output.
TYPES : BEGIN OF ty_data,
menge TYPE mseg-menge,"QUANTITY
mblnr TYPE mkpf-mblnr,"MATERIAL DOCUMENT NUMBER
bwart TYPE mseg-bwart,"MOVEMENT TYPE
matnr TYPE mseg-matnr,"MATERIAL NUMBER
meins TYPE mseg-meins,"BASE UNIT OF MEASUREMENT
werks TYPE mseg-werks,"PLANT
lgort TYPE mseg-lgort,"STORAGE LOCATION
ebeln TYPE mseg-ebeln,"PO DOCUMENT NUMBER
lifnr TYPE mseg-lifnr,"VENDOR
bldat TYPE mkpf-bldat,"DOCUMENT DATE
budat TYPE mkpf-budat,"POSTING DATE
usnam TYPE mkpf-usnam,"USER ID
xblnr TYPE mkpf-xblnr,"MATERIAL SLIP
END OF ty_data.
TYPES: BEGIN OF ty_btext,
btext TYPE t156t-btext,
bwart TYPE t156-bwart,
END OF ty_btext.
TYPES : BEGIN OF ty_maktx,
maktx TYPE makt-maktx,
matnr TYPE makt-matnr,
END OF ty_maktx.
TYPES: BEGIN OF ty_mard,
matnr TYPE mard-matnr,
lgpbe TYPE mard-lgpbe,
END OF ty_mard.
*INTERNAL TABLES
DATA: it_output TYPE STANDARD TABLE OF ty_output,
it_data TYPE STANDARD TABLE OF ty_data,
it_btext TYPE STANDARD TABLE OF ty_btext,
it_maktx TYPE STANDARD TABLE OF ty_maktx,
it_fieldcat TYPE STANDARD TABLE OF slis_fieldcat_alv,
it_events TYPE STANDARD TABLE OF slis_alv_event,
it_header TYPE slis_t_listheader,
it_smart TYPE STANDARD TABLE OF zmm_im_001_struc,
it_mard TYPE STANDARD TABLE OF ty_mard.
*WORK AREAS
DATA: wa_output TYPE ty_output,
wa_data TYPE ty_data,
wa_btext TYPE ty_btext,
wa_maktx TYPE ty_maktx,
wa_fieldcat TYPE slis_fieldcat_alv,
wa_events TYPE slis_alv_event,
wa_header TYPE slis_listheader,
wa_smart LIKE LINE OF it_smart,
wa_layout TYPE slis_layout_alv,
wa_mard TYPE ty_mard.
*FLAGS AND CONSTANTS
DATA: fl_sel TYPE flag.
DATA: fl_del TYPE flag,
gv_count TYPE i.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
SELECT-OPTIONS:
so_mblnr FOR mkpf-mblnr,
so_bwart FOR mseg-bwart,"MOVEMENT TYPE
so_bldat FOR mkpf-bldat,"DOCUMENT DATE
so_budat FOR mkpf-budat,"POSTING DATE
so_matnr FOR mseg-matnr,"MATERIAL ID
so_meins FOR mseg-meins,"BASE UNIT OF MEASUREMENT
so_werks FOR mseg-werks,"PLANT
so_lgort FOR mseg-lgort,"STORAGE LOCATION
so_lifnr FOR mseg-lifnr,"VENDOR
so_xblnr FOR mkpf-xblnr,"MATERIAL SLIP
so_ebeln FOR mseg-ebeln,"PURCHASE DOC
so_usnam FOR mkpf-usnam.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2
WITH FRAME TITLE text-002.
PARAMETERS : 1x3 RADIOBUTTON GROUP
grp1 DEFAULT 'X',
2x4 RADIOBUTTON GROUP
grp1.
SELECTION-SCREEN END OF BLOCK b2.
*SELECTION-SCREEN BEGIN OF LINE.
*SELECTION-SCREEN COMMENT 1(82) text-007.
*SELECTION-SCREEN COMMENT 89(4) text-008. " First part of your comment
*SELECTION-SCREEN END OF LINE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_mblnr-low.
*GETTING F4 HELP FOR THE
>FIELD MBLNR( MATERIAL DOCUMENT NUMBER)
PERFORM get_f4val .
AT SELECTION-SCREEN ON VALUE-REQUEST FOR so_mblnr-high.
GETTING F4 HELP FOR THE
FIELD MBLNR( MATERIAL DOCUMENT NUMBER)
PERFORM get_f4val .
AT SELECTION-SCREEN.
PERFORM valid_bwart.
PERFORM valid_selscreen.
if no records are found displaying an error message
IF sy-dbcnt EQ 0.
MESSAGE e003(zmimr012).
ENDIF.
START-OF-SELECTION.
PERFORM get_data.
PERFORM populate_data.
PERFORM get_fcat.
PERFORM get_events.
PERFORM populate_events.
PERFORM get_layout.
PERFORM display_alv.
Refresh : it_output,
it_data,
it_smart.
*& Form GET_DATA
FORM get_data .
SELECT b~menge
a~mblnr
b~bwart
b~matnr
b~meins
b~werks
b~lgort
b~ebeln
b~lifnr
a~bldat
a~budat
a~usnam
a~xblnr
INTO CORRESPONDING
FIELDS OF TABLE it_data
FROM mkpf AS a
INNER JOIN mseg AS b ON
amblnr = bmblnr
AND amjahr = bmjahr
WHERE a~mblnr IN so_mblnr
AND b~bwart IN so_bwart
AND b~bwart IN ('101', '105')
AND a~bldat IN so_bldat
AND a~budat IN so_budat
AND b~matnr IN so_matnr
AND b~matnr NE space
AND b~werks IN so_werks
AND b~lgort IN so_lgort
AND b~ebeln IN so_ebeln
AND b~lifnr IN so_lifnr
AND a~xblnr IN so_xblnr
AND a~usnam IN so_usnam.
SELECT btext
bwart
FROM t156t
INTO TABLE it_btext
FOR ALL ENTRIES IN it_data
WHERE spras EQ 'EN'
AND bwart = it_data-bwart
AND sobkz = ''
AND kzbew = 'B'
AND kzzug = ''
AND kzvbr = ''.
SELECT maktx
matnr
FROM makt INTO
TABLE it_maktx
FOR ALL ENTRIES IN it_data
WHERE matnr EQ it_data-matnr
AND spras EQ 'E'.
SELECT matnr
lgpbe
FROM mard INTO
TABLE it_mard
FOR ALL ENTRIES IN it_data
WHERE matnr EQ it_data-matnr
AND werks EQ it_data-werks
AND lgort EQ it_data-lgort.
ENDIF.
ENDFORM. " GET_DATA
*& Form GET_F4VAL
FORM get_f4val .
TYPES : BEGIN OF ly_mblnr,
mblnr TYPE mkpf-mblnr,
END OF ly_mblnr.
DATA: lc_mblnr TYPE dfies-fieldname
VALUE 'MBLNR',
lc_s_mblnr TYPE help_info-dynprofld
VALUE 'SO_MBLNR-LOW',
lc_dynnr
TYPE sy-dynnr VALUE '1000',
lc_repid TYPE sy-repid.
DATA: lt_mblnr TYPE STANDARD
TABLE OF ly_mblnr,
lv_mblnr TYPE ly_mblnr,
lt_return TYPE STANDARD TABLE OF
ddshretval WITH HEADER LINE.
CLEAR:lt_mblnr[],lv_mblnr,lt_return[],lt_return.
SELECT mblnr FROM mkpf
INTO TABLE lt_mblnr.
SORT lt_mblnr.
DELETE ADJACENT DUPLICATES FROM lt_mblnr.
lc_repid = sy-repid.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = lc_mblnr
value_org = 'S'
dynpprog = lc_repid
dynpnr = lc_dynnr
dynprofield = lc_s_mblnr
TABLES
value_tab = lt_mblnr
return_tab = lt_return
EXCEPTIONS
parameter_error = 1
no_values_found = 2
OTHERS = 3.
IF sy-subrc <> 0.
ELSE.
lc_mblnr = lt_return-fieldval.
ENDIF.
ENDFORM. " GET_F4VAL
Edited by: mozam khan on Feb 28, 2009 4:39 AM*& Form PF_STATUS
FORM pf_status_set USING
ex_tab TYPE slis_t_extab .
SET PF-STATUS 'ZMIMR012_GUI' EXCLUDING ex_tab.
ENDFORM. " PF_STATUS
*& Form user_command
text
FORM user_command USING r_ucomm TYPE sy-ucomm
rs_selfield TYPE slis_selfield .
DATA: p_ref1 TYPE REF TO cl_gui_alv_grid.
CASE r_ucomm .
WHEN 'EXEC' .
CLEAR p_ref1.
IF p_ref1 IS INITIAL.
CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
IMPORTING
e_grid = p_ref1.
ENDIF.
IF p_ref1 IS NOT INITIAL.
CALL METHOD p_ref1->check_changed_data.
ENDIF.
LOOP AT it_output INTO wa_output WHERE cbox EQ 'X'.
READ TABLE it_mard INTO wa_mard WITH KEY matnr = wa_output-matnr.
IF sy-subrc EQ 0.
wa_smart-lgpbe = wa_mard-lgpbe.
ENDIF.
wa_smart-matnr = wa_output-matnr.
wa_smart-maktx = wa_output-maktx.
wa_smart-meins = wa_output-meins.
wa_smart-bldat = wa_output-bldat.
wa_smart-no_cop = wa_output-menge1.
APPEND wa_smart TO it_smart.
CLEAR: wa_smart,wa_output.
ENDLOOP.
CALL METHOD p_ref1->REFRESH_TABLE_DISPLAY.
CHECK fl_del NE 'X'.
IF 1x3 = 'X'.
PERFORM print_smartform1x3.
ELSE.
PERFORM print_smartform2x4.
ENDIF.
WHEN 'SEL_ALL'.
fl_sel = 'X'." setting up the flag for all selection.
PERFORM sel_rec.
rs_selfield-refresh = 'X'.
WHEN 'DES_ALL'.
fl_del = 'X'.
PERFORM del_sel.
rs_selfield-refresh = 'X'.
ENDCASE.
ENDFORM. " user_command
" top_of_page
*& Form display_alv
FORM display_alv .
DATA: l_repid TYPE sy-repid.
l_repid = sy-repid.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
i_callback_program = l_repid
i_callback_pf_status_set = 'PF-STATUS_SET'
i_callback_user_command = 'USER_COMMAND'
I_CALLBACK_TOP_OF_PAGE = 'top_of_page'
i_callback_html_top_of_page = 'HTML_TOP_OF_PAGE'
I_CALLBACK_HTML_END_OF_LIST = ' '
I_STRUCTURE_NAME =
I_BACKGROUND_ID = ' '
I_GRID_TITLE =
I_GRID_SETTINGS =
is_layout = wa_layout
it_fieldcat = it_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
IT_SORT =
IT_FILTER =
IS_SEL_HIDE =
I_DEFAULT = 'X'
I_SAVE = ' '
IS_VARIANT =
it_events = it_events
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
I_HTML_HEIGHT_TOP = 0
I_HTML_HEIGHT_END = 0
IT_ALV_GRAPHICS =
IT_HYPERLINK =
IT_ADD_FIELDCAT =
IT_EXCEPT_QINFO =
IR_SALV_FULLSCREEN_ADAPTER =
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = it_output
EXCEPTIONS
program_error = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " display_alv
*& Form get_layout
FORM get_layout .
wa_layout-box_fieldname = 'CBOX' .
wa_layout-box_tabname = 'IT_OUTPUT'.
wa_layout-colwidth_optimize = 'X'.
ENDFORM. " get_layout
" print_smartform_1x3
*& Form valid_bwart
text
--> p1 text
<-- p2 text
FORM valid_bwart .
TYPES:BEGIN OF ly_bwart,
bwart TYPE mseg-bwart,
END OF ly_bwart.
DATA:it_bwart TYPE TABLE OF ly_bwart WITH HEADER LINE.
IF so_bwart[] IS NOT INITIAL.
SELECT bwart FROM mseg INTO TABLE it_bwart
FOR ALL ENTRIES IN so_bwart[]
WHERE bwart <= so_bwart-high AND bwart => so_bwart-low.
LOOP AT it_bwart.
IF it_bwart-bwart NE '101' OR it_bwart-bwart NE '105' .
CONTINUE.
ENDIF.
ENDLOOP.
ENDIF.
ENDFORM. " valid_bwart
*& Form print_smartform2x4
text
-->P_WA_SMART text
-->P_IT_SMART text
FORM print_smartform1x3.
DATA : fm_name TYPE rs38l_fnam,
control_parameters TYPE ssfctrlop,
wa_job_output_info TYPE ssfcrescl,
ssfcompin TYPE ssfcompin,
ssfcompop TYPE ssfcompop.
ssfcompin-dialog = 'X'.
CALL FUNCTION 'SSF_OPEN'
EXPORTING
ARCHIVE_PARAMETERS =
USER_SETTINGS = 'X'
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJ =
OUTPUT_OPTIONS =
control_parameters = control_parameters
IMPORTING
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZMM_IM_001'
variant = ' '
direct_call = ' '
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
control_parameters-no_open = 'X'.
control_parameters-no_close = 'X'.
LOOP AT it_smart INTO wa_smart.
IF wa_smart-no_cop IS NOT INITIAL.
MOVE wa_smart-no_cop TO gv_count.
ENDIF.
DO gv_count TIMES.
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = control_parameters
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
output_options = ssfcompop
USER_SETTINGS = 'X'
wa_display = wa_smart
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDDO.
CLEAR gv_count.
CLEAR : wa_smart.
ENDLOOP.
CALL FUNCTION 'SSF_CLOSE'
IMPORTING
job_output_info = wa_job_output_info
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " print_smartform2x4
*& Form print_smartform2x4
text
--> p1 text
<-- p2 text
FORM print_smartform2x4 .
DATA : fm_name TYPE rs38l_fnam,
control_parameters TYPE ssfctrlop,
wa_job_output_info TYPE ssfcrescl,
ssfcompin TYPE ssfcompin,
ssfcompop TYPE ssfcompop.
ssfcompin-dialog = 'X'.
CALL FUNCTION 'SSF_OPEN'
EXPORTING
ARCHIVE_PARAMETERS =
USER_SETTINGS = 'X'
MAIL_SENDER =
MAIL_RECIPIENT =
MAIL_APPL_OBJ =
OUTPUT_OPTIONS =
control_parameters = control_parameters
IMPORTING
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
EXPORTING
formname = 'ZMM_IM_002'
variant = ' '
direct_call = ' '
IMPORTING
fm_name = fm_name
EXCEPTIONS
no_form = 1
no_function_module = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
control_parameters-no_open = 'X'.
control_parameters-no_close = 'X'.
LOOP AT it_smart INTO wa_smart.
IF wa_smart-no_cop IS NOT INITIAL.
MOVE wa_smart-no_cop TO gv_count.
ENDIF.
DO gv_count TIMES.
CALL FUNCTION fm_name
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
control_parameters = control_parameters
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS = ssfcompop
USER_SETTINGS = 'X'
wa_display = wa_smart
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDDO.
CLEAR: gv_count.
ENDLOOP.
CALL FUNCTION 'SSF_CLOSE'
IMPORTING
job_output_info = wa_job_output_info
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
OTHERS = 4.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " print_smartform2x4
*& Form valid_selscreen
text
--> p1 text
<-- p2 text
FORM valid_selscreen .
SELECT b~menge
a~mblnr
b~bwart
b~matnr
b~meins
b~werks
b~lgort
b~ebeln
b~lifnr
a~bldat
a~budat
a~usnam
a~xblnr
INTO CORRESPONDING
FIELDS OF TABLE it_data
FROM mkpf AS a
INNER JOIN mseg AS b ON
amblnr = bmblnr
AND amjahr = bmjahr
WHERE a~mblnr IN so_mblnr
AND b~bwart IN so_bwart
AND b~bwart IN ('101', '105')
AND a~bldat IN so_bldat
AND a~budat IN so_budat
AND b~matnr IN so_matnr
AND b~matnr NE space
AND b~werks IN so_werks
AND b~lgort IN so_lgort
AND b~ebeln IN so_ebeln
AND b~lifnr IN so_lifnr
AND a~xblnr IN so_xblnr
AND a~usnam IN so_usnam.
ENDFORM. " valid_selscreen
*& Form sel_rec
text
--> p1 text
<-- p2 text
FORM sel_rec .
DATA: lv_tabix TYPE sy-tabix.
LOOP AT it_output INTO wa_output.
lv_tabix = sy-tabix.
wa_output-cbox = 'X'.
MODIFY it_output FROM wa_output TRANSPORTING cbox.
CLEAR: wa_output.
ENDLOOP.
ENDFORM. " sel_rec -
PLEASE HELP ME WITH THIS CODE I NEED A NAV BAR ASAP!!!!
The code is below I just want a simple navigation bar that when I click on biography it takes me to the biography page and so on...I even tried the "href" nothing works I try it in live view and it doesnt work I try it out of live view and it still doesnt work Im using DW CS5 This page was made using a DW template but I changed it around to fit my liking
<!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" />
<title>WebIntersect &Bull;Find ElizabethVictoria</title>
<style type="text/css">
<!--
body {
background: #000;
margin: 0;
padding: 0;
color: #FCCFDD;
background-color: #000;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 100%;
line-height: 1.4;
/* ~~ Element/tag selectors ~~ */
ul, ol, dl { /* Due to variations between browsers, it's best practices to zero padding and margin on lists. For consistency, you can either specify the amounts you want here, or on the list items (LI, DT, DD) they contain. Remember that what you do here will cascade to the .nav list unless you write a more specific selector. */
padding: 0;
margin: 0;
h1, h2, h3, h4, h5, h6, p {
margin-top: 0; /* removing the top margin gets around an issue where margins can escape from their containing div. The remaining bottom margin will hold it away from any elements that follow. */
padding-right: 15px;
padding-left: 15px; /* adding the padding to the sides of the elements within the divs, instead of the divs themselves, gets rid of any box model math. A nested div with side padding can also be used as an alternate method. */
color: #FCCFDD;
font-weight: bold;
text-align: center;
a img { /* this selector removes the default blue border displayed in some browsers around an image when it is surrounded by a link */
border: none;
color: #000;
/* ~~ Styling for your site's links must remain in this order - including the group of selectors that create the hover effect. ~~ */
a:link {
color:#808080;
text-decoration: underline; /* unless you style your links to look extremely unique, it's best to provide underlines for quick visual identification */
a:visited {
color: #FCCFDD;
text-decoration: underline;
a:hover, a:active, a:focus { /* this group of selectors will give a keyboard navigator the same hover experience as the person using a mouse. */
text-decoration: none;
color: #FCCFDD;
/* ~~ this container surrounds all other divs giving them their percentage-based width ~~ */
.container {
width: 80%;
max-width: 1260px;/* a max-width may be desirable to keep this layout from getting too wide on a large monitor. This keeps line length more readable. IE6 does not respect this declaration. */
min-width: 780px;/* a min-width may be desirable to keep this layout from getting too narrow. This keeps line length more readable in the side columns. IE6 does not respect this declaration. */
background: #000;
margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout. It is not needed if you set the .container's width to 100%. */
/* ~~ the header is not given a width. It will extend the full width of your layout. It contains an image placeholder that should be replaced with your own linked logo ~~ */
.header {
background: #000;
color: #FCCFDD;
.sidebar1 {
float: left;
width: 20%;
padding-bottom: 10px;
background-color: #000;
background-image: url(images/Untitled-6.gif);
background-repeat: no-repeat;
.content {
padding: 10px 0;
width: 60%;
float: left;
.sidebar2 {
float: left;
width: 20%;
padding: 10px 0;
background-color: #000;
background-image: url(images/Untitled-6.gif);
/* ~~ This grouped selector gives the lists in the .content area space ~~ */
.content ul, .content ol {
padding: 0 15px 15px 40px; /* this padding mirrors the right padding in the headings and paragraph rule above. Padding was placed on the bottom for space between other elements on the lists and on the left to create the indention. These may be adjusted as you wish. */
/* ~~ The navigation list styles (can be removed if you choose to use a premade flyout menu like Spry) ~~ */
ul.nav {
list-style: none; /* this removes the list marker */
border-top: 1px solid #666; /* this creates the top border for the links - all others are placed using a bottom border on the LI */
margin-bottom: 15px; /* this creates the space between the navigation on the content below */
ul.nav li {
border-bottom: 1px solid #666; /* this creates the button separation */
ul.nav a, ul.nav a:visited { /* grouping these selectors makes sure that your links retain their button look even after being visited */
padding: 5px 5px 5px 15px;
display: block; /* this gives the link block properties causing it to fill the whole LI containing it. This causes the entire area to react to a mouse click. */
text-decoration: none;
background: #8090AB;
color: #000;
ul.nav a:hover, ul.nav a:active, ul.nav a:focus { /* this changes the background and text color for both mouse and keyboard navigators */
background: #6F7D94;
color: #FFF;Where is your html code? or better yet a link to your site in question.
-
Please help me with this code. Newbie here!
Hi all,
Below is a sample from the project that I am doing now. Would someone be so kind as to tell me how come the internal frame doesn't appear and the compiler keeps returning an error pointing to "setContentPane(mainDeskTop);"?
Thanks in advance.
package myprojects.xmlquery;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class XMLQuery extends Frame {
public XMLQuery() {
super("XMLQuery"); //Don't know what is this statement for?
addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
dispose();
System.exit(0);
JDesktopPane mainDeskTop;
mainDeskTop = new JDesktopPane(); //a specialized layered pane
JInternalFrame frame = new JInternalFrame("test",true,true,true,true);
frame.setSize(100,100);
frame.setLocation(0,0);
frame.setVisible(true); //set frame visible
mainDeskTop.add(frame);
try {
frame.setSelected(true);
} catch (java.beans.PropertyVetoException e) {}
setContentPane(mainDeskTop);
public static void main(String args[]) {
System.out.println("Starting XMLQuery...");
XMLQuery mainFrame = new XMLQuery();
mainFrame.setSize(400, 400);
mainFrame.setTitle("XMLQuery");
mainFrame.setVisible(true);Extend JFrame instead of Frame.
Denis -
Conversion from String to int..NumberFormatException??
Hey all
I am trying to read in a file that has nothing but numbers listed one per line. I am using the bufferedReader class and reading in by line. When I check to see if the one 'string' is the same as another, it says they are the same, when really they are different. I then thought to convert the numbers to integers after reading them in, but it gives me a number format exception. My process is simple:
1) line = in.readLine();
2) int variable = Integer.valueOf(line).intValue();
This gives me the damn exception. The numbers are three digits, e.g. 333, etc. Does anybody know how I can avert this problem or achieve the result I am looking for another way? All I want is to know what numbers are listed in their, without going through by hand checking. Thankshi...try this..
1.Use filereader instead of bufferedreader..OKAY
2. OR USE...
String str = br.readLine();
use... int sanjeev = Integer.parseInt(str);
3 OR...and helloooo one thing more...how u r checking that these 2 strings r same..
get CLEAR IDEA about equals method and "==".. -
import java.io.*;
import java.util.*;
import java.lang.*;
public static void main(String[] args) throws Exception{
int Ze=0;
String Temp = "512";
Ze = parseInt(Temp);
I got an error saying --->>
cannot resolve symbol
symbol : method parseInt(java.lang.String)
I tried using ...Integer(Temp)
and it gives me a similar error message.
where Did i went wrong???http://java.sun.com/j2se/1.5.0/docs/api/index.html
Bookmark that page. It's the index to the documentation of every class in Java 1.5.0. If you've got a different JDK, look on the download page and find the Documentation. Look for the API documentation in that.
Go look up the Byte class and see. The API documentation tells every available method for every available class in the java.*, javax.*, and org.* packages. Better start getting used to using it now rather than later. -
i brought a iTunes card and the the code on the back is not there it has faded away can u please help me with this problem
Hi Daniel ...
Try here > iTunes Store: Invalid, inactive, or illegible codes -
Please help me with this indicator on my screen...it has reduced voice quality
Please help me with the rectangular symbol on the top next to the speaker symbol. It seems that I have turned on some option by mistake and everytime I make or receive a call, this symbol comes up. It wasn't the case earlier.
Because of this my voice call quality has dropped significantly. Please help soon.
Thanks,
itsmits
Solved!
Go to Solution.Sure, it's been answered here in the forums many many times.
That is the call Audio Boost indicator.
To change it, press your green dial key > Menu key > Enhanced Audio Boost.
1. If any post helps you please click the below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!
3. Install free BlackBerry Protect today for backups of contacts and data.
4. Guide to Unlocking your BlackBerry & Unlock Codes
Join our BBM Channels (Beta)
BlackBerry Support Forums Channel
PIN: C0001B7B4 Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA Display/Scan Bar Code -
Please help me with the step by step instructions on how to install a Windows server 2008 on a computer that has Windows 8 installed on it without formatting windows 8.Please email the steps , Thanks
Please help me with the step by step instructions on how to install a Windows server 2008 on a computer that has Windows 8 installed on it without formatting windows 8.Please email the steps , Thanks
Assuming your rig can support virtual machines, you can use Hyper-V and run another OS there.
Better practice however is to use a dedicated machine and use remote desktop to the server.
Corsair Carbide 300R with window
Corsair TX850V2 70A@12V
Asus M5A99FX PRO R2.0 CFX/SLI
AMD Phenom II 965 C3 Black Edition @ 4.0 GHz
G.SKILL RipjawsX DDR3-2133 8 GB
EVGA GTX 6600 Ti FTW Signature 2(Gk104 Kepler)
Asus PA238QR IPS LED HDMI DP 1080p
ST2000DM001 & Windows 8.1 Enterprise x64
Microsoft Wireless Desktop 2000
Wacom Bamboo CHT470M
Place your rig specifics into your signature like I have, makes it 100x easier to understand!
Hardcore Games Legendary is the Only Way to Play! -
Hi therde I was wondering if you could please help me with my Iphone 4s as it has frozen so i am unable to swipe to either power off or perform any function at all.
RESET DEVICE
Hold down the Sleep/Wake button and the home button together until the apple logo appears (ignore the ON/OFF slider) then let both buttons go and wait for device to restart (no data will be lost).
Maybe you are looking for
-
Is there any way to fix this...
One of the programs I run (GarageBand) usually has an incredibly long load time because of all the plug-ins I use in my songs. The load times can take over 4 minutes sometimes. The problem is I like to multitask and when GB is loading a song, you can
-
How to send a https request using jsf
hi Can anybody tell a sample how to send a https request using JSF ... thanks
-
TS2972 Apple TV doesnt see my mac's home sharing even though it's turned ON
I did a recent apple tv update and ever since then, it doesnt recognize my library anymore. EVERYTHING on my apple tv works fine, BUT it's not connected to my library though the HOME SHARING. I've made sure it's turned on within my macbook pro and th
-
as i was updating my ipad 2, it told me that it failed to restore, and then it wint come up under devices on itunes, the ipad also wont work, what can i do ?
-
I posted this on the lockup/freeze forum and got absolutely no response so I am hoping I might get a little advice on this forum. Got the following error... FailureID M4W4GF-55G5S1-XD003G-60T003 ProductID WQ850UA#ABA Short DST Failed ...and cant ge