How to track the login time and logout times of clients

hai
please give me the solution
suppose there are 5 systems connected in LAN.
how to track the login time and logout times of clients
for a given time(may be one day or 1 hour) using any programming language.
please give me the solution

When the client logs in you write the client's ID and the current time to a database. Likewise when the client logs out. Assuming of course that you have a program that knows when those events occur.

Similar Messages

  • How to Get the Login Window and/or Bypass Login Items?

    Greetings, folks!
    This is a silly question, but the old standby of “hold down the shift key” doesn’t work in 10.6.1:
    What key(s) need to be pressed to get the LogIn window and then after LogIn, to bypass LogIn Items?
    Thanks!!
    Richard Fairbanks

    Not here, on a fresh (erased) install.
    Pressed either before or after the initial gray Mac appears, the shift key does not access the LogIn screen. It is possible to bypass the account’s LogIn items by holding down the shift key after the LogIn screen has been called and successfully commenced, but how does one call the Login screen when the Mac is normally set up for automatic login?
    It used to be the shift key . . . 
    Thanks!

  • How to decrease the OLAP/DB and Frontend time of query

    Hi,
    While  I am excuiting the query, it takes time to dispaly the query output. Reason behind is it have the high OLAP/DB and Front end time.
    Can anyone help me how to decrease the OLAP/DB and Front end time.
    Regards,

    Probably Existing Aggregates are not useful .. you can edit them based on below factors
    You can also check ST03N - > BI Workload - > select Weekly/Monthly - >Choose All data tab - >dbl click on Infocube - > choose query - > check the DB time % > 30% and Aggregation ratio is > 10 % then create aggregates.
    Now goto RSRT choose query - > Execute debug mode - > check 'Display Aggr found' and choose 'Display Stats' -> now you can check records selected Vs records transferred in % .. it should be > 10 % .. That means the query is fetching records from Aggrs which will also improve query performance!
    Also check RSRT - Execute in Debug and choose display aggregates found.. If it found aggregates then the query is using/fetching data from aggr's
    Edited by: Srinivas on Sep 14, 2010 3:40 PM

  • How to track the login user session in webdynpro

    Hi all,
            I have a new requirement as Explained below
    User will login from portal with login username and password.
    I want to retive that information.
    How to keep track of that information in webdynpro
    Thanks & Regards
    Padma N

    Hi Padma,
    First you need to add the security.jar file by following the given steps
    Right Click on Project-Propertyjava Build PathLibrariesWDRuntime
    Com.sap.security_2.0.0
    public void LoginUser( )
        //@@begin LoginUser()
         String LogonID;
           try{
              // create an user object from the current user
              IWDClientUser wdUser=WDClientUser.getCurrentUser();
              IUser user=wdUser.getSAPUser();
              //LogonID=user.getUniqueName();
              wdComponentAPI.getMessageManager().reportSuccess(user.getFirstName()" "user.getLastName().toUpperCase());
              //wdComponentAPI.getMessageManager().reportSuccess(LogonID.toUpperCase());
              wdComponentAPI.getMessageManager().reportSuccess("Logon User ID : "+wdUser.getClientUserID().toUpperCase());
           }catch(Exception e){
              e.printStackTrace();
        //@@end
    Thanks
    Anup

  • How to track the corresponding CWIP and Asset after settlement in reports

    Dear gurus,
    We are trying to develop a single report which would have commitments, actual costs, Auc amounts and Final Asset postings w.r.t a project or WBS element.
    What is the table where we can find AuC amount and CWIP number for given WBS elements. Similarly where can we find the Final Asset number corresponding to the WBS element.
    Is there any way we can work around the settlement rules.. Is there any table where the settlement rules are saved??
    Pls guide..
    Thank you
    KAP

    Prafulla wrote:
    we are mentaining few envs where all the envs get refreshed from the same baseload.But due to some reasons in a particular QA env after some time of the db refresh due to some test script execution or from the application, some data are getting deleted .Is there any method to trace the time and the content of the change and send an alert automatically without using trigger, I mean is there any audit method so that we can enble and check and also send the alert.And if possible ,Can any one let me know the details how to send mail from Oracle.
    Code instrumentation?
    As for e-mail - come on! This forum is littered with questions and answers about sending e-mail from Oracle. How about using the search button?

  • How to get the login name and password

    Hi,
    I had installed the SAP NW2004s on Windows platform with MaxDB as backend.
    The master user name and password which i used for instllation was
    Username :Administrator
    password:trustno1.
    My SAPSID and DBSID is J2E
    Now i want to login into maxdb
    how should i procedd
    IF i fire the following commnd
    dbmcli -d J2E -u Administrator,trustno1
    i get the follwoing error
    C:\sapdb\programs\bin>dbmcli -d J2E-u Administrator,punadmin
    Error! Connection failed to node (local) for database J2E: ERR_USRFAIL: User aut
    horization failed
    Please help.

    Hi Manoj,
    You are trying to login into database using SAP level user:Administrator. Try login using <sid>adm/SAPService<SID> user or the database user. For more info on MAXDB adminsitration please check:
    <a href="https://websmp230.sap-ag.de/sap(bD1kZSZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=846890">MAXDB admin</a>
    Also check OSS note 143412.
    Please award points accordingly.
    Regards.
    Message was edited by:
            Ruchit Khushu

  • Tracking User login and logout times

    I need to track User Login and Logout times. Does anyone know of a easy way or program to do this?
    thanks
    b

    /Applications/Utilities->Terminal->type in this command, and hit the return key:
    last
    For more information, see http://www.osxfaq.com/tips/unix-tricks/ Week 17.

  • Report for login and logout time

    Dear All,
    Please can some one help me urgently.
    I have to find out users login and logout time over the last six months. I need to find out how many hours per user are being used.  What report do I need to run to find out ?

    Hi,
    Check the system log saved in your system.Normally the basis admin woulfd know better about this .Only they have the access and maintance for it.
    Anyways u can try out some other ways also
    Profile parameters rslg/local/file
    /usr/sap/<SID>/D20/log/SLOG<SAP-instance_number> Specifies the location of the local log on the application server.
    Alternatively try to  table - SYST
    Note:  there are many transaction codes that can be accessed only by super users .do tell me if u have one so that i can give you?

  • Sql query to find activities between Login and Logout time

    Hi ,
    I have 2 tables as shown below
    User Table
    ActivityTable
    i have  a requirement in which i need to find all the activities done for a particular user inbetween login and logout time  can anybody help me how to write sql query for this .

    Is this what you looking for?
    DECLARE @User TABLE
    userid INT,
    date DATETIME,
    type VARCHAR(50),
    sessionid SMALLINT
    DECLARE @ActivityTable TABLE
    activityid SMALLINT,
    userid SMALLINT,
    activity VARCHAR(50),
    activitystarttime DATETIME,
    activityendtime DATETIME
    INSERT INTO @User
    (userid,
    [date],
    [type],
    sessionid)
    VALUES (1,
    '2002-08-25 16:51:25.107',
    'Logon',
    111),
    (1,
    '2002-08-25 17:52:25.107',
    'LOGOFF',
    111),
    (2,
    '2007-03-08 19:25:21.170',
    'Logon',
    222),
    (2,
    '2007-03-08 21:25:21.170',
    'LOGOFF',
    222),
    (3,
    '2007-03-08 19:25:21.170',
    'Logon',
    234);
    INSERT INTO @ActivityTable
    (activityid,
    userid,
    activity,
    activitystarttime,
    activityendtime)
    VALUES (234,
    1,
    'development',
    '2002-08-25 16:53:23.101',
    '2002-08-25 16:59:23.170'),
    (789,
    2,
    'Testing',
    '2007-03-08 19:53:23.180',
    '2007-03-08 20:53:23.180'),
    (789,
    2,
    'Lunch',
    '2007-03-08 19:53:23.180',
    '2007-03-08 20:53:23.180'),
    (456,
    3,
    'Testing',
    '2007-03-08 19:53:23.180',
    '2007-03-08 20:53:23.180'),
    (781,
    1,
    'Lunch',
    '2002-08-25 17:00:23.101',
    '2002-08-25 17:30:00.170'),
    (781,
    1,
    'Lunch',
    '2002-08-25 21:00:23.101',
    '2002-08-25 22:30:00.170');
    WITH logon
    AS (SELECT date,
    userid
    FROM @User
    WHERE type = 'Logon'),
    logoff
    AS (SELECT date,
    userid
    FROM @User
    WHERE type = 'LOGOFF')
    SELECT at.*
    FROM @ActivityTable AT
    INNER JOIN logon Lo
    ON at.userid = lo.userid
    INNER JOIN logoff LF
    ON at.userid = lf.userid
    WHERE At.activityendtime < LF.date
    AND AT.activitystarttime > LO.date
    Regards,
    Vishal Patel
    Blog: http://vspatel.co.uk
    Site: http://lehrity.com

  • Calculating Login and Logout Times - need help

    Hi everyone. I have the first part of this code and can't seem to figure out the time calculation part. What it is - create a code that asks for a user name or social security number, then the person enters up to 6 login and logout times for the day. They also have the option to enter personal time or sick time (neither of which can be over 8 hours). I have all of that complete, but I can't figure out how to get the in and out times and the leave times to calculate. I have 3 pieces of code - here they are:
    Hours:
    import java.util.*;
    public class Hours
         //define states of Hours
         int regularhoursInt = 0;
         int regularminutesInt = 0;
         int overtimehoursInt = 0;
         int overtimeminutesInt = 0;          
         //set hours worked
         public void setHours(int timein, int timeout)
              int temphoursin = timein/100;
              int tempminutesin = timein - timein/100;
              int temphoursout = timeout/100;
              int tempminutesout = timeout - timeout/100;
              GregorianCalendar time1 = new GregorianCalendar(2003, 8, 1, temphoursin, tempminutesin, 0);
              GregorianCalendar time2 = new GregorianCalendar(2003, 8, 1, temphoursout, tempminutesout, 0);
              //store to date
              Date d1 = time1.getTime();
              Date d2 = time2.getTime();
              //store time to long
              long t1 = d1.getTime();
              long t2 = d2.getTime();
              //subtract and convert to seconds
              long time = (t2 - t1)/1000;
              long tempregularLong = 0;
              long tempovertimeLong = 0;
              //see if regular hours are over 8 hours (28800 seconds)
              tempregularLong = time;
              if (tempregularLong > 28800)
                   tempovertimeLong = tempregularLong - 28800;
                   tempregularLong = tempregularLong - tempovertimeLong;
              //convert to hours and minutes
              regularhoursInt = regularhoursInt + (Integer.parseInt(Long.toString(tempregularLong)) / 3600);
              regularminutesInt = regularminutesInt + (Integer.parseInt(Long.toString(tempregularLong)) / (3600 * regularhoursInt));
              overtimehoursInt = overtimehoursInt + (Integer.parseInt(Long.toString(tempovertimeLong)) / 3600);
              overtimeminutesInt = overtimeminutesInt + (Integer.parseInt(Long.toString(tempovertimeLong)) / (3600 * regularhoursInt));     }
         // get regular hours worked
         public int getRegularHours()
              return regularhoursInt;
         // get regular minutes worked
         public int getRegularMinutes()
              return regularminutesInt;
         //get overtime hours worked
         public int getOvertimeHours()
              return overtimehoursInt;
         // get overtime minutes worked
         public int getOvertimeMinutes()
              return overtimeminutesInt;
    Employee:
    public class Employee
         //define states of employee
         String nameString = "";
         String ssnString = "";
         double payrateDouble = 0;
         double hoursworkedDouble = 0;
         double overtimehoursDouble = 0;
         double sickleaveDouble = 0;
         double personalleaveDouble = 0;
         double totalpayDouble = 0;
         //set and get employee name
         public void setName(String name)
              nameString = name;
         public String getName()
              return nameString;
         //set and get employee ssn
         public void setSsn(String ssn)
              ssnString = ssn;
         public String getSsn()
              return ssnString;
         //set and get employee payrate
         public void setPayRate(double payrate)
              payrateDouble = payrate;
         public double getPayRate()
              return payrateDouble;
         //set and get employee hours worked
         public void setHoursWorked(double hoursworked)
              hoursworkedDouble = hoursworked;
         public double getHoursWorked()
              return hoursworkedDouble;
         //set and get employee overtimehours
         public void setOverTime(double overtime)
              overtimehoursDouble = overtime;
         public double getOverTime()
              return overtimehoursDouble;
         //set and get employee sick leave hours
         public void setSickLeave(double sickleave)
              sickleaveDouble = sickleave;
         public double getSickLeave()
              return sickleaveDouble;
         //set and get employee sick leave hours
         public void setPersonalLeave(double personalleave)
              personalleaveDouble = personalleave;
         public double getPersonalLeave()
              return personalleaveDouble;
         //get employees total pay
         public double getTotalPay()
              //calculate regular pay
              totalpayDouble = payrateDouble * hoursworkedDouble;
              //add in any over time pay
              totalpayDouble = totalpayDouble + payrateDouble * 1.5 * overtimehoursDouble;
              //add in any sick time pay
              totalpayDouble = totalpayDouble + payrateDouble * sickleaveDouble;
              //add in any personal leave time pay
              totalpayDouble = totalpayDouble + payrateDouble * personalleaveDouble;
              return totalpayDouble;
    Entry Screen:
    import java.awt.*;
    import java.awt.event.*;
    import java.applet.Applet;
    import javax.swing.*;
    import java.util.*;
    import java.text.*;
    //create entryscreen class as a java applet
    public class EntryScreen extends Applet implements ActionListener
         //declare all variables, labels, textfields, and buttons
    //store pay rate to variable payrateDouble
         double payrateDouble = 10.00;
         //store ssn and names to ssnString
         String[][] ssnString ={{"123121234", "234232345", "345343456", "456454567",
              "567565678", "678676789"},{"Jane Doe", "John Doe", "Sam Smith", "Tom Thumb", "Sara Jane", "Cindy Thompson"}};
         //set date format to MM/dd/yy and store in variable formatter
         SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yy");
         //store current date to variable date
         Date date = new Date();
         //using variable formatter store current date to dateString
         String dateString = formatter.format(date);
         //declare all label, Textfields and buttons use in the applet
         JLabel titleLabel;
    JLabel dateLabel;
    JTextField dateTextField;
    JLabel ssnLabel;
    JTextField ssnTextField;
    JLabel timeLabel;
    JLabel inLabel;
    JLabel outLabel;
    JTextField in1TextField;
    JTextField in2TextField;
    JTextField in3TextField;
         JTextField in4TextField;
         JTextField in5TextField;
    JTextField in6TextField;
    JTextField out1TextField;
    JTextField out2TextField;
    JTextField out3TextField;
    JTextField out4TextField;
    JTextField out5TextField;
    JTextField out6TextField;
    JLabel sickLabel;
    JTextField sickTextField;
    JTextField personalTextField;
    JLabel personalLabel;
    JButton okButton;
    JButton clearButton;
    JLabel day1Label;
    JLabel day2Label;
    JLabel day3Label;
    JLabel day4Label;
    JLabel day5Label;
    JLabel day6Label;
         //initialize the applet screen
    public void init()
              //create a custom layout object based on the EntryScreenLayout class
              EntryScreenLayout customLayout = new EntryScreenLayout();
              //set the font for the screen
    setFont(new Font("Helvetica", Font.PLAIN, 12));
    setLayout(customLayout);
         //populate the applet with the labels, textfields, and buttons
              titleLabel = new JLabel("Employee Payroll System");
    add(titleLabel);
    dateLabel = new JLabel("Date (MM/DD/YY):");
    add(dateLabel);
    dateTextField = new JTextField("");
    add(dateTextField);
              //set text in field to current date
              dateTextField.setText(dateString);
    ssnLabel = new JLabel("SSN (Numbers Only):");
    add(ssnLabel);
    ssnTextField = new JTextField("");
    add(ssnTextField);
    timeLabel = new JLabel("Hours Worked (hhmm)");
    add(timeLabel);
    inLabel = new JLabel("In:");
    add(inLabel);
    outLabel = new JLabel("Out");
    add(outLabel);
    in1TextField = new JTextField("");
    add(in1TextField);
    in2TextField = new JTextField("");
    add(in2TextField);
    in3TextField = new JTextField("");
    add(in3TextField);
    in4TextField = new JTextField("");
    add(in4TextField);
    in5TextField = new JTextField("");
    add(in5TextField);
    in6TextField = new JTextField("");
    add(in6TextField);
    out1TextField = new JTextField("");
    add(out1TextField);
    out2TextField = new JTextField("");
    add(out2TextField);
    out3TextField = new JTextField("");
    add(out3TextField);
    out4TextField = new JTextField("");
    add(out4TextField);
    out5TextField = new JTextField("");
    add(out5TextField);
    out6TextField = new JTextField("");
    add(out6TextField);
    sickLabel = new JLabel("Sick Leave Used:");
    add(sickLabel);
    sickTextField = new JTextField("");
    add(sickTextField);
    personalTextField = new JTextField("");
    add(personalTextField);
    personalLabel = new JLabel("Personal Leave Used:");
    add(personalLabel);
         okButton = new JButton("Ok");
         add(okButton);
              okButton.addActionListener(this);
         clearButton = new JButton("Clear");
         add(clearButton);
              clearButton.addActionListener(this);
         day1Label = new JLabel("Day 1:");
         add(day1Label);
         day2Label = new JLabel("Day 2:");
         add(day2Label);
    day3Label = new JLabel("Day 3:");
    add(day3Label);
    day4Label = new JLabel("Day 4:");
    add(day4Label);
    day5Label = new JLabel("Day 5:");
    add(day5Label);
    day6Label = new JLabel("Day 6:");
              add(day6Label);
              //set the size of the applet window as listed in the EntryScreenLayout class
              setSize(getPreferredSize());
         public void actionPerformed(ActionEvent e)
              //get the source object
              Object source = e.getSource();
              //perform if OK button was presses      
              if(source == okButton)
                   int[][] inouttimes = new int[1][5];
                   boolean matchBoolean = false;
                   boolean timeError = false;
                   int locationInt = 0;
                   double[] leavehours = new double[1];
                   String messageString = "";
                   //get the text from the ssnTextField and store to inputString
                   String inputString = ssnTextField.getText();
                   //check to see if inputString matches ssnString array
                   for(int i = 0; i < 6; ++i)
                        //if a match assign variables
                        if (inputString.equals(ssnString[0]))
                             matchBoolean = true;
                             locationInt = i;
                             break;
                        //if not a match
                        else
                             matchBoolean = false;
                   }//end for i
                   //if a SSN match is true than display the name, SSN, total hours, overtime hours, and total pay for hours worked.
                   if (matchBoolean == true)
                        //get the check in/out times, if blank assign a zero
                        Employee temp = new Employee();
                        temp.setName(ssnString[1][locationInt]);
                        temp.setSsn(ssnString[0][locationInt]);
                        temp.setPayRate(payrateDouble);
                        temp.setSickLeave(Double.parseDouble(sickTextField.getText()));
                        temp.setPersonalLeave(Double.parseDouble(personalTextField.getText()));
                        /*inouttimes[0][0] = Integer.parseInt(in1TextField.getText());
                        inouttimes[1][0] = Integer.parseInt(out1TextField.getText();
                        inouttimes[0][1] = Integer.parseInt(in2TextField.getText();
                        inouttimes[1][1] = Integer.parseInt(out2TextField.getText();
                        inouttimes[0][2] = Integer.parseInt(in3TextField.getText();
                        inouttimes[1][2] = Integer.parseInt(out3TextField.getText();
                        inouttimes[0][3] = Integer.parseInt(in4TextField.getText();
                        inouttimes[1][3] = out4TextField.getText();
                        inouttimes[0][4] = in5TextField.getText();
                        inouttimes[1][4] = out5TextField.getText();
                        inouttimes[0][5] = in6TextField.getText();
                        inouttimes[1][5] = out6TextField.getText();
                        for (int x = 0; x < 2; ++x)
                             for (int y = 0; y < 2; ++y)
                                  String temp = String.valueOf(inouttimes[x][y]);
                                  if (temp.equals(""))
                                       inouttimes[x][y] = 0;
                                  if (inouttimes[x][y] < 0 && inouttimes[x][y] > 2400)
                                       timeError = true;          
                                       break;
                             if (timeError = true)
                                  break;
                        messageString = temp.getName() + "\n" + temp.getSsn() + "\n" + temp.getTotalPay();
                   JOptionPane.showMessageDialog(null, messageString);
                   }//if (matchBoolean == true)
                   //if SSN match is false then display error message
                   else
                        JOptionPane.showMessageDialog(null, "There is no listing under that Social Security Number.\n" +
                             "Please verify and re-enter.");                    
              }//end if(source == okButton)
              //perform if the Clear button was pressed
              if(source == clearButton)
                   //clear all the textfields
                   dateTextField.setText("");
                   ssnTextField.setText("");
                   in1TextField.setText("");
                   out1TextField.setText("");
                   in2TextField.setText("");
                   out2TextField.setText("");
                   in3TextField.setText("");
                   out3TextField.setText("");
                   in4TextField.setText("");
                   out4TextField.setText("");
                   in5TextField.setText("");
                   out5TextField.setText("");
                   in6TextField.setText("");
                   out6TextField.setText("");
                   sickTextField.setText("");
                   personalTextField.setText("");
                   //set text in field to current date
                   dateTextField.setText(dateString);
         public static void main(String args[])
              //create new entryscreen object called applet
              EntryScreen applet = new EntryScreen();
         //create new frame for applet called window
              Frame window = new Frame("EntryScreen");
         window.addWindowListener(new WindowAdapter()
                   public void windowClosing(WindowEvent e)
                   //close the applet           
                        System.exit(0);
              //initiate the applet
              applet.init();
    window.add("Center", applet);
    window.pack();
    window.setVisible(true);
    //create entryscreenlayout custom class to position controls on applet screen
    class EntryScreenLayout implements LayoutManager {
    public EntryScreenLayout() {
    public void addLayoutComponent(String name, Component comp) {
    public void removeLayoutComponent(Component comp) {
    public Dimension preferredLayoutSize(Container parent) {
    Dimension dim = new Dimension(0, 0);
    Insets insets = parent.getInsets();
    dim.width = 360 + insets.left + insets.right;
    dim.height = 487 + insets.top + insets.bottom;
    return dim;
    public Dimension minimumLayoutSize(Container parent) {
    Dimension dim = new Dimension(0, 0);
    return dim;
    public void layoutContainer(Container parent) {
    Insets insets = parent.getInsets();
    Component c;
    c = parent.getComponent(0);
    if (c.isVisible()) {c.setBounds(insets.left+88,insets.top+8,192,24);}
    c = parent.getComponent(1);
    if (c.isVisible()) {c.setBounds(insets.left+24,insets.top+48,152,24);}
    c = parent.getComponent(2);
    if (c.isVisible()) {c.setBounds(insets.left+184,insets.top+48,152,24);}
    c = parent.getComponent(3);
    if (c.isVisible()) {c.setBounds(insets.left+24,insets.top+80,152,24);}
    c = parent.getComponent(4);
    if (c.isVisible()) {c.setBounds(insets.left+184,insets.top+80,152,24);}
    c = parent.getComponent(5);
    if (c.isVisible()) {c.setBounds(insets.left+104,insets.top+112,152,24);}
    c = parent.getComponent(6);
    if (c.isVisible()) {c.setBounds(insets.left+104,insets.top+144,72,24);}
    c = parent.getComponent(7);
    if (c.isVisible()) {c.setBounds(insets.left+184,insets.top+144,72,24);}
    c = parent.getComponent(8);
    if (c.isVisible()) {c.setBounds(insets.left+104,insets.top+176,72,24);}
    c = parent.getComponent(9);
    if (c.isVisible()) {c.setBounds(insets.left+104,insets.top+208,72,24);}
    c = parent.getComponent(10);
    if (c.isVisible()) {c.setBounds(insets.left+104,insets.top+240,72,24);}
    c = parent.getComponent(11);
    if (c.isVisible()) {c.setBounds(insets.left+104,insets.top+272,72,24);}
    c = parent.getComponent(12);
    if (c.isVisible()) {c.setBounds(insets.left+104,insets.top+304,72,24);}
    c = parent.getComponent(13);
    if (c.isVisible()) {c.setBounds(insets.left+104,insets.top+336,72,24);}
    c = parent.getComponent(14);
    if (c.isVisible()) {c.setBounds(insets.left+184,insets.top+176,72,24);}
    c = parent.getComponent(15);
    if (c.isVisible()) {c.setBounds(insets.left+184,insets.top+208,72,24);}
    c = parent.getComponent(16);
    if (c.isVisible()) {c.setBounds(insets.left+184,insets.top+240,72,24);}
    c = parent.getComponent(17);
    if (c.isVisible()) {c.setBounds(insets.left+184,insets.top+272,72,24);}
    c = parent.getComponent(18);
    if (c.isVisible()) {c.setBounds(insets.left+184,insets.top+304,72,24);}
    c = parent.getComponent(19);
    if (c.isVisible()) {c.setBounds(insets.left+184,insets.top+336,72,24);}
    c = parent.getComponent(20);
    if (c.isVisible()) {c.setBounds(insets.left+24,insets.top+368,152,24);}
    c = parent.getComponent(21);
    if (c.isVisible()) {c.setBounds(insets.left+184,insets.top+368,72,24);}
    c = parent.getComponent(22);
    if (c.isVisible()) {c.setBounds(insets.left+184,insets.top+400,72,24);}
    c = parent.getComponent(23);
    if (c.isVisible()) {c.setBounds(insets.left+24,insets.top+400,152,24);}
    c = parent.getComponent(24);
    if (c.isVisible()) {c.setBounds(insets.left+104,insets.top+440,72,24);}
    c = parent.getComponent(25);
    if (c.isVisible()) {c.setBounds(insets.left+184,insets.top+440,72,24);}
    c = parent.getComponent(26);
    if (c.isVisible()) {c.setBounds(insets.left+24,insets.top+176,72,24);}
    c = parent.getComponent(27);
    if (c.isVisible()) {c.setBounds(insets.left+24,insets.top+208,72,24);}
    c = parent.getComponent(28);
    if (c.isVisible()) {c.setBounds(insets.left+24,insets.top+240,72,24);}
    c = parent.getComponent(29);
    if (c.isVisible()) {c.setBounds(insets.left+24,insets.top+272,72,24);}
    c = parent.getComponent(30);
    if (c.isVisible()) {c.setBounds(insets.left+24,insets.top+304,72,24);}
    c = parent.getComponent(31);
    if (c.isVisible()) {c.setBounds(insets.left+24,insets.top+336,72,24);}
    I know it is a lot of code, but I am just starting and couldn't think of an easier way to do this.
    Thank you for any help - it is greatly appreciated. You can email me with any code help - [email protected].
    Steph

    My 2 cents, I dunno what it'll be worth.
    I think you should never convert anything until the final moment that you are at actually getting the int or float number of hours.
    Why are you doing all this Gregorian and conversion gymnastics throughout your calculations?
    To get the current time in milliseconds, use either
    java.util.Date d = new java.util.Date();
    or
    long d = System.currentTimeMillis();
    Use this long number for all your calculations, and only at the end convert it. To convert, you can use java.text.SimpleDateFormat, which I find very straightforward to use. I honestly think you should never convert your dates before doing any calculations, only after doing them, otherwise you'll loose precision and make errors for sure.

  • Correlate login and logout times in a table

    I have a table LOGINDATA with three columns: USERID, TYPE, and TIMESTAMP.
    USERID stores a unique integer that represents someone who uses the system.
    TYPE is either 1 or 2. 1 represents a login. 2 represents a logout.
    TIMESTAMP is a value that comes from System.currentTimeMillis. It represents the current time in milliseconds since January 1, 1970 (I believe that's the right date).
    I'm trying to create a query to link each login time with its corresponding logout time, so that my resultset has three columns:
    USERID, LOGINTIME, LOGOUTTIME.
    I assume this would involve joining the table to itself, but creating a query to find the closest login and logout times is tricky.
    What I have now is:
    select li.userid, li.logintime, lo.logouttime from
    (select userid, timestamp logintime from logindata where type = 1) li,
    (select userid, timestamp logouttime from logindata where type = 2) lo
    where li.userid=lo.userid
    and li.userid=999999 is the userid of one user.
    This will actually end up being more complicated with missing logout times, but this is a start.

    The data design makes this a very very very messy (and probably slow) query. Fundamentally, I consider designs like this to be broken because they're so hard to get relevant information out of the raw data; in some cases impossible (see comments below).
    The following query works on Oracle database (where TIMESTAMP is a reserved word, so I used EVENTTIME instead) - I tested it with a few rows of data:
    select li.userid, li.logintime, min(possible_logout) logouttime
    from (select userid || to_char(eventtime, 'yyyymmddhh24miss') session_id, userid, eventtime logintime
          from logindata where type = 1) li,
       (select li.userid || to_char(logintime, 'yyyymmddhh24miss') session_id, li.userid, logintime, logouttime possible_logout
        from (select userid, eventtime logintime from logindata where type = 1) li,
             (select userid, eventtime logouttime from logindata where type = 2) lo
        where logintime < logouttime
          and li.userid = lo.userid(+) ) pl
    where li.session_id = pl.session_id (+)
    group by li.userid, li.logintime
    order by li.logintime;Note that this will return the wrong result if for a particular user_id, you have overlapping logins, like:
    time a - login session 1
    time b - login session 2
    time c - logout session 1 or 2
    time d - logout session 2 or session 1
    there is simply no way to tell which logout goes with which login and the query will report that both sessions ended at time c, which is absolutely unacceptable if this is to be a security audit trail... The only way to deal with this is to guarantee at the application layer that no user can be logged in twice.
    Note also that it breaks by returning extra rows if a user somehow manages to log in twice or more at the same moment, whatever the granularity of your TIMESTAMP is... This is because of the join on the generated SESSION_ID; if you get 2 or more of them the same, you get a cartesian product (2 IDs, 4 rows; 5 IDs, 25 rows, etc...)
    It would obviously be a lot cleaner if you stored some sort of unique session_id in your table. Note that the session_ids used for session tracking in J2EE web servers get recycled over time and are therefore unsuitable (by themselves) as unique session ids. And if you store a session id, then you can fix your broken data model and avoid all this mess in the first place by making your table have the columns:
    USER_ID, SESSION_ID, LOGIN_TIME, LOGOUT_TIME
    Insert on login, update on logout...

  • Hi, I followed the instructions to apply for the Made For iPhone Program. After submission of the necessary documents and information, I have not heard back from Apple. How to track the application progress? Can someone help?

    Hi, I followed the instructions from Apple MFI website, to apply for the Made For iPhone Program. After submission of the necessary documents and information, I have not heard back from Apple for couple weeks. How to track the application progress? Can someone help? < Edited by Host >
    Thank you.
    Best Regards,
    Gerald

    Hi Gerald
    This is a user-to-user forum, and your message will not be received by Apple. You will need to sign into your Developer/MFI account, and contact Apple that way. This can be done here.
    P.S Please do not post your e-mail address here.
    Taylor

  • How to view the login log in window NPS after login cisco switch and without SQL server database

    how to view the login log in window NPS after login cisco switch and without SQL server database
    in summary 
    there is only log with event id 4400
    A LDAP connection with domain controller XCPAWS20.cyberport.noc for domain NOC2 is established.

    Hi adil,
    For your issue, you can create a custom security token service (STS) and then set up a trust relationship between a SharePoint 2010 farm and the custom STS.
    For more information, you can refer to the articles:
    http://forums.asp.net/t/1335229.aspx?Sharing+Authentication+Ticket+Between+ASP+NET+and+Sharepoint
    https://msdn.microsoft.com/en-us/library/office/ff955607(v=office.14).aspx
    http://www.paraesthesia.com/archive/2011/02/01/working-with-windows-identity-foundation-in-asp-net-mvc.aspx/
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to know the process chain start time and end time

    Hi Experts,
                   How to know the process chain start time  and end time .
    Thanks in advance
    Regards
    Gutti
    Edited by: guttireddy on Feb 23, 2012 11:30 PM

    Hi Reddy,
    You may find the run time of a PC using below steps.
    1. Call SE38 > /SSA/BWT > Execute  > Enter your PC , choose the date and time > Execute. Here Run-time of a PC is displayed. (or)
    2. Call RSPC1 > Enter your PC > Execute > Goto Log view > Right click on the start Variant > Displaying Messages > Note down the start time in Chain Tab. Now Right click on the last Process type of the PC > Displaying Messages > Note down the End time in Chain Tab. The Difference b/w start time and end time gives the Run-time of your PC.
    Hope this helps.
    Regards
    Sai

  • Hello, I was going to have my presentation on my macbook air. But when I putted it up on the big screen it wasn't a normal presentation. There was two pages at the time and a timer came up. How can I fix this as fast as posible? Thank's in advance.

    Hello, I was going to have my presentation on my MacBook Air. But when I putted it up on the big screen it wasn't a normal presentation. There was two pages at the time and a timer came up. How can I fix this as fast as posible? Thank's in advance.

    Your MacBook is using the big screen as the Presenter Display, and the MacBook Air display as the Show display. Tap the 'x' key to swap them during the show.
    Here is more information about using the Presenter Display.

Maybe you are looking for

  • Comparison of SAP R/3 4.7 with SAP ERP 6.0 in Basis point of view

    Hi Experts, Can we compare R/3 4.7 and ECC 6.0 in Basis point of view. Say for example Password is case sensitive in new version, DBACOCKPIT added for central maintenance of database. Like this can we list out some of the changes or differences. It w

  • I can't see RAW photos (from Nikon D3100) in iPhoto...

    Hi!! I am trying to import photos from mi Nikon D3100 to Iphoto 11, but there is a problem: I can't open the photos; the files are located in the folder of Iphoto Library, but it can´t be open by Iphoto. The extension file is.raw, but i have updated

  • PO Limit exceeded on SES & Invoice

    Hi experts, We have set up a service PO (item cat. = D) with limits only.  Service Entry Sheet is entered, and total activity exceeds PO limit.  Message SE364 appears warning users that limit is exceeded.  Message is set as warning in our system.  Af

  • SGA_MAX_SIZE limitations in Oracle 9i

    Hello everyone, I did oracle 9.2.0.4 installation on RHEL4 and created one database. I was editing init parameters depending upon our database requirements. while setting parameter SGA_MAX_SIZE=2.5GB i got an error regarding "Shared Memory Segment" a

  • Function calls in JSP / converting servlets

    I tried adding functions in the declaration section of a JSP and they were not recogized. Are functions allowed in JSPs? I'm trying to convert a servlet with multiple functions into a JSP. Is a separate jsp/bean required to do this?