URGENT HELP WITH DATES

Hi, I need to compare two dates, so I can get the difference betweem them in hours.

Try this.. This does it in days but I think you will get the idea..
import java.io.*;
import java.util.*;
import java.text.*;
public class Ex1805
     public static void main(String[] args)
          SimpleDateFormat sdf = new SimpleDateFormat("d/M/y");
          BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
          String inputDate;
          Date first = new Date(), second = new Date();
          final long MSInDay = 1000 * 60 * 60 * 24;
          boolean valid;
// input first date
          valid = false;
          while(!valid)
               try
               System.out.print("Enter first date: ");
               inputDate = br.readLine();
               first = sdf.parse(inputDate);
               valid = true;
               catch(ParseException e)
                    System.out.println("Invalid     date. Please enter again.");
               catch(IOException e)
                    System.out.println("IO Error");
// input second date
          valid = false;
          while(!valid)
               try
               System.out.print("Enter second date: ");
               inputDate = br.readLine();
               second = sdf.parse(inputDate);
               valid = true;
               catch(ParseException e)
                    System.out.println("Invalid     date. Please enter again.");
               catch(IOException e)
                    System.out.println("IO Error");
//     calculate difference in days
          long milliseconds = second.getTime() - first.getTime();
          double doubleDays = (double)milliseconds / MSInDay;
          int days = (int)(doubleDays + 0.5);
          System.out.println("Number of days: " + days);

Similar Messages

  • Urgent Help with Date and then email in ASP

    Hii,
    USING ASP AND ACCESS
    I am implementing a classified section for my website and I
    am displaying
    everything successfully.
    When the user posts the classified he selects how many days
    he wants his
    POST like 10 days, 20 days or 30 days and i can successfully
    show the posts
    So if the user posts on says 1st of July 2006 and selects 10
    days for his
    post to be showed on my website
    THEN
    8th July 2006 an email shud go to him saying if he wants to
    keep his POST
    for another 10 days, 20 days or 30 days with 3 links
    and IF YES the 1st july 2006 date must be changed to
    Date of Post + Number of days selected initially + Number of
    days selected.
    I am using two columsn in the DB for this date thing one is
    the strPostDate
    and strAddDate
    So basically the number of days selected for the post to be
    shown on the
    website keeps adding up each time the user clicks on the link
    for 10 days,
    20 days or 30 days with 3 links
    please help need it badly :-)

    I have to disagree with my colleages above - this isn't that
    hard at all. I have done it a number of times successfully. It does
    depend on a "trick", but who cares as long as it works.
    Basically, the "trick" says that your site will receive a
    visit once in a while! It better, or why have the site!
    In ASP, use the global.asa file. In the "Session start"
    section of global.asa, which is fired off every time a new comer
    arrives, you have an opportunity to:
    1. check if it's ok to check who needs an email (in other
    words, you don't want to be checking EVERY time someone comines on
    board every last listing on your site. So what i would do is allow
    it to do the full check once daily, say after midnight.
    2. If its ok to check who needs an email, do so, and send the
    emails out.
    3. After sending out emails, fix it so you will not be
    resending uptil teh next time window. You could also set "flags"
    for any lister where you sent an email 1st round email has been
    sent.
    The above is one way.
    Sometimes i do the very same thing, but i simply tie the
    checking routine into the home page.
    Both schemes work as long as you have a single visitor once
    in a while. if you never had a visitor to teh site, not even one,
    then the emails would never be sent. But as i said if you go days
    without a visit, better start looking for a new vocation!
    www.brunswickdowntown.com is a site i did that has a
    sign-up-to-stay informed email system, its been running for a year
    just fine, all automatically, using the method of #1 (but for
    asp.net, same difference!)
    Rick

  • Is there a Java utility class to help with data management in a desktop UI?

    Is there a Java utility class to help with data management in a desktop UI?
    I am writing a UI to configure a network device that will be connected to the serial port of the computer while it is being configured. There is no web server or database for my application. The UI has a large number of fields (50+) spread across 16 tabs. I will write the UI in Java FX. It should run inside the browser when launched, and issue commands to the network device through the serial port. A UI has several input fields spread across tabs and one single Submit button. If a field is edited, and the submit button clicked, it issues a command and sends the new datum to the device, retrieves current value and any errors. so if input field has bad data, it is indicated for example, the field has a red border.
    Is there a standard design pattern or Java utility class to accomplish the frequently encountered, 'generic' parts of this scenario? lazy loading, submitting only what fields changed, displaying what fields have errors etc. (I dont want to reinvent the wheel if it is already there). Otherwise I can write such a class and share it back here if it is useful.
    someone recommended JGoodies Bindings for Swing - will this work well and in FX?

    Many thanks for the reply.
    In the servlet create an Arraylist and in th efor
    loop put the insances of the csqabean in this
    ArrayList. Exit the for loop and then add the
    ArrayList as an attribute to the session.I am making the use of Vector and did the same thing as u mentioned.I am using scriplets...
    >
    In the jsp retrieve the array list from the session
    and in a for loop step through the ArrayList
    retrieving each CourseSectionQABean and displaying.
    You can do this in a scriptlet but should also check
    out the jstl tags.I am able to remove this problem.Thanks again for the suggestion.
    AS

  • Need Help with data type conversion

    Hello People,
    I am new to java, i need some help with data type conversion:
    I have variable(string) storing IP Address
    IPAddr="10.10.103.10"
    I have to call a library function which passes IP Address and does something and returns me a value.
    The problem I have is that external function call in this library excepts IP Address in form of a byte array.
    Here is the syntax for the function I am calling through my program
    int createDevice (byte[] ipAddress).
    now my problem is I don't know how to convert the string  IPAddr variable into a byte[] ipAddress to pass it through method.

    Class InetAddress has a method
    byte[]      getAddress() You can create an instance using the static method getByName() providing the IP address string as argument.

  • Need Help with Dates

    I am printing a calendar and certain events will be helds on certain dates.
    One can edit the event if it has not passed the date. Events in the past can be viewed but not edited.
    When I query the database the date must be formatted dd-MMM-yy
    I am able to get today's date by doing this:
    java.util.Date today = new java.util.Date();
    String formatString = "dd-MMM-yy";
    SimpleDateFormat sdf = new SimpleDateFormat(formatString);
    String today_str = sdf.format(today);
    My code for printing the calendar: I left out some of the table formatting in the JSP page.
    GregorianCalendar d = new GregorianCalendar();
    int today = d.get(Calendar.DAY_OF_MONTH);
    int month = d.get(Calendar.MONTH);
    d.set(Calendar.DAY_OF_MONTH,1);
    int weekday = d.get(Calendar.DAY_OF_WEEK);
    for(int i = Calendar.SUNDAY; i < weekday; i++)
    out.print("<td> </td>");
    do {
    int day = d.get(Calendar.DAY_OF_MONTH);
    out.print("<td>" + day + "</td>");
    String formatString = "dd-MMM-yy";
    SimpleDateFormat sdf = new SimpleDateFormat(formatString);
    //if(event exists on this day
    // Get results
    // print link for viewing
    // if (after today) print link for edit
    if(weekday == Calendar.SATURDAY)
    out.println("</tr><tr valign=top>");
    d.add(Calendar.DAY_OF_MONTH,1);
    weekday = d.get(Calendar.DAY_OF_WEEK);
    } while(d.get(Calendar.MONTH) == month);
    if(weekday != Calendar.SUNDAY)
    System.out.println();
    The part I need help on is this:
    //if(event exists on this day
    // Get results
    // print link for viewing
    // if (after today) print link for edit
    I'm looping through each day of the month to print the days. I have the month, day, year as integers. How can I create a date object out of that and compare it to today's date to test if it's before or after today???
    All the function in the Date class that I think would do this have been deprecated.

    Need Help with Dates
    Here is some information about dates:
    There are many edible palm fruits, and one of the most widespread and favored of these is the data (Phoenix dactylifera). Dates were cultivated in ancient land from Mesopotamia to prehistoric Egypt, possibly as early as 6000 B.C. Then--as now--dates were a staple for the natives of those dry regions. Much later, Arabs spread dates around northern Africa, and dates were introduced into California by the Spaniards in 1765, around Mission San Ignacio.
    The date prefers dry, hot climates, because date fruits are injured at temperatures of 20 degrees F, and the damp climate of the California coast was not favorable for fruit production. In the mid-1800s, the date industry developed in California's hot interior valleys and in Arizona. Now the date industry in the United States is localized mostly in the Coachella Valley, where the sandy soils permit the plants to be deeply irrigated. Today the new varieties, mostly introduced in this century, produce about 40 million pounds of dates per annum, or over 60% of the dates consumed in this country. The rest are imported mainly from Persia. According to one survey, about one million people are engaged entirely in date palm cultivation worldwide.
    Hope that helps.

  • Help with date validation on input boxes.

    I need some help with date validation on input boxes.
    What I�m trying to create is a form where a user inputs dates and then the rest of the form calculates the other dates for them.
    i.e. � A user inputs 2 dates (A & B) and then a 3rd date which is 11 weeks before date B is calculated automatically.
    Is this possible and if so how do I do it ???
    Thanks

    Hi,
    to get third date try this:
    java.util.Date bDate = ...;
    Calendar yourCalendar = new GregorianCalendar();
    yourCalendar.setTime(bDate);
    yourCalendar.roll(Calendar.WEEK_OF_YEAR, -11);
    java.util.Date cDate = yourCalendar.getTime();Regards
    Ldinka

  • Urgent help with simple BPEL process for reading data from database

    Hello there,
    I need help with BPEL project.
    i have created a table Employee in Database.
    I did create application, BPEL project and connection to the database properly using Database Adapter.
    I need to read the records from the database and convert into xml fomat and it should to go approval for BPM worklist.
    Can someone please describe me step by step what i need to do.
    Thx,
    Dps

    I have created a table in Database with data like Empno,name,salary,comments.
    I created Database Connection in jsp page and connecting to BPEL process.
    It initiates the process and it goes automatically for approval.
    Please refer the code once which i created.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@page import="java.util.Map" %>
    <%@page import="com.oracle.bpel.client.Locator" %>
    <%@page import="com.oracle.bpel.client.NormalizedMessage" %>
    <%@page import="com.oracle.bpel.client.delivery.IDeliveryService" %>
    <%@page import="javax.naming.Context" %>
    <%@page import="java.util.Hashtable" %>
    <%@page import="java.util.HashMap" %>
    <%@ page import="java.sql.*"%>
    <%@ page import= "jspprj.DBCon"%>
    <html>
    <head>
    <title>Invoke CreditRatingService</title>
    </head>
    <body>
    <%
    DBCon dbcon=new DBCon();
    Connection conn=dbcon.createConnection();
    Statement st=null;
    PreparedStatement pstmt=null;
    Hashtable env= new Hashtable();
    ResultSet rs = null;
    Map payload =null;
    try
    env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
    env.put(Context.PROVIDER_URL, "opmn:ormi://localhost:port:home/orabpel");//bpel server
    env.put("java.naming.security.principal", "username");
    env.put("java.naming.security.credentials", "password");//bpel console
    Locator locator = new Locator("default","password",env);
    IDeliveryService deliveryService =
    (IDeliveryService)locator.lookupService(IDeliveryService.SERVICE_NAME );
    // construct the normalized message and send to Oracle BPEL Process Manager
    NormalizedMessage nm = new NormalizedMessage();
    java.util.HashMap map = new HashMap();
    st=conn.createStatement();
    out.println("connected");
    String query1="Select * from EMPLOYEE";
    rs=st.executeQuery(query1);
    /*reading Data From Database and converting into XML format
    so that no need of going to BPEL console and entering the details.
    while (rs.next()){
    String xml1 = "<AsynchBPELProcess1ProcessRequest xmlns='http://xmlns.oracle.com/AsynchBPELProcess1'>"+
    "<Empno>"+rs.getString(1)+"</Empno>"+
    "<EmpName>"+rs.getString(2)+"</EmpName>"+
    "<Salary>"+rs.getString(3)+"</Salary>"+
    "<Comments>"+rs.getString(4)+"</Comments>"+
    "</AsynchBPELProcess1ProcessRequest>";
    out.println(xml1);
    nm.addPart("payload", xml1 );
    // EmployeeApprovalProcess is the BPEL process in which human task is implemented
    deliveryService.post("EmployeeApprovalProcess", "initiate", nm);
    // payload = res.getPayload();
    out.println( "BPELProcess CreditRatingService executed!<br>" );
    // out.println( "Credit Rating is " + payload.get("payload") );
    //Incase there is an exception while invoking the first server invoke the second server i.e lsgpas13.
    catch(Exception ee) {
    //("BPEL Server lsgpas14 invoking error.\n"+ee.toString());
    %>
    </body>
    </html>
    Its working fine.And i want it for Bulk approvals.please help me step by step procedure if any other way to implement this.

  • Need urgent help with HSDIO hardware timing

    Hi everyone,
    I need urgent help regarding HSDIO hardware timing. I've been working in a project which generating serial ramp using HSDIO pxie device. 
    I'm using clock rate 40MHz and generating 14 bit of boolean for each step of ramp. And I have to generate simply 256 steps ramp.
    Which means, 256 (steps) x 14 (boolean array) x 25 ns (period of 1 boolean value) = 89,6 ns.
    What I'm doing right now is with using index of FOR loop as my input data (converting the index into 14bit boolean), then write into pxie device in every iteration,
    which means, my data is getting into output in every 1ms time, right? (I'm using windows)
    And I want to be able to generate faster than that. 
    How can I prewrite my 256 steps ramp, then write them all at once into pxie device. I'm really stuck here.
    In the picture can you see how I do the write into device in every iteration of FOR Loop.
    Regards,
    Yan.

    hi, thanks for responding.
    with using example of dynamic generation with script, I can manage to generate the ramp with controllable delay (generate the whole waveform, including delay with script command, then write to the card).
    But I still have 1 question, I can test the output of the generation using oscilloscope and cant see the start delay (I'm writing delay at the start, before generating the ramp). My signal generated at 0 sec.
    How can I check this start delay? is there any good example delivered with Labview to check this generation? Somehow I cant use the "dynamic generation and acquisition" example to see my generation (cant figure out how to capture the generated signal).
    regards,
    Yan.

  • Urgent Help with Image Gallery

    Hi,
    I really need help with an image gallery i have created. Cannot think of a resolution
    So....I have a dynamic image gallery that pulls the pics into a movie clip and adds them to the container (slider)
    The issue i am having is that when i click on this i am essentially clicking on all the items collectively and i would like to be able to click on each image seperately...
    Please see code below
    var xml:XML;
    var images:Array = new Array();
    var totalImages:Number;
    var nbDisplayed:Number = 1;
    var imagesLoaded:int = 0;
    var slideTo:Number = 0;
    var imageWidth = 150;
    var titles:Array = new Array();
    var container_mc:MovieClip = new MovieClip();
    slider_mc.addChild(container_mc);
    container_mc.mask = slider_mc.mask_mc;
    function loadXML(file:String):void{
    var xmlLoader:URLLoader = new URLLoader();
    xmlLoader.load(new URLRequest(file));
    xmlLoader.addEventListener(Event.COMPLETE, parseXML);
    function parseXML(e:Event):void{
    xml = new XML(e.target.data);
    totalImages = xml.children().length();
    loadImages();
    function loadImages():void{
    for(var i:int = 0; i<totalImages; i++){
      var loader:Loader = new Loader();
      loader.load(new URLRequest("images/"+String(xml.children()[i].@brand)));
      images.push(loader);
    //      loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,onProgress);
         loader.contentLoaderInfo.addEventListener(Event.COMPLETE,onComplete);
    function onComplete(e:Event):void{
    imagesLoaded++;
    if(imagesLoaded == totalImages){
      createImages();
    function createImages():void{
    for(var i:int = 0; i < images.length; i++){
      var bm:Bitmap = new Bitmap();
      bm = Bitmap(images[i].content);
      bm.smoothing = true;
      bm.x = i*170;
      container_mc.addChild(bm);
          var caption:textfile=new textfile();
          caption.x=i*170; // fix text positions (x,y) here
       caption.y=96;
          caption.tf.text=(xml.children()[i].@brandname)   
          container_mc.addChild(caption);

    yes, sorry i do wish to click on individual images but dont know how to code that
    as i mentioned i have 6 images that load into an array and then into a container and i think that maybe the problem is that i have the listener on the container so when i click on any image it gives the same results.
    what i would like is have code thats says
    if i click on image 1 then do this
    if i click on image 2 then do something different
    etc
    hope that makes sense
    thanks for you help!

  • Urgent help with simple BPEL process

    Hello there,
    I need help with BPEL project.
    I'm new in JDeveloper&BPEL and i'd like to create process that we'll after sending employee ID return personal details of that employee.
    I did create application, BPEL project and connection to the database properly but somehow i can't deal input and output variable.
    Can someone please describe me step by step what i need to do, how to set up variable etc
    Thx,
    DI

    Me again. This time i hope i'll get some help :(
    Solution to my problem is change to the data-sources.xml and oc4j-ra.xml.
    Since i have database on same machine with BPEL PM Server that uses Olite DB when i tried to make changes i found in tutorials, here on forum and rest of internet
    BPEL PM Server just freeze, didn't start at all.
    Here are data-sources.xml, oc4j-ra.xml and DBAdapter wsdl file. Plz can someone make changes to those files i'll appreciate that.
    HOME\bpel\system\appserver\oc4j\j2ee\home\application-deployments\default\DbAdapter
    oc4j-ra.xml
    <?xml version="1.0"?>
    <oc4j-connector-factories xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.oracle.com/technology/oracleas/schema/oc4j-connector-factories-10_0.xsd" schema-major-version="10" schema-minor-version="0" >
         <imported-shared-libraries>
              <import-shared-library name="oracle.bpel.common"/>
              <import-shared-library name="oc4j.internal"/>
              <import-shared-library name="oracle.xml"/>
              <import-shared-library name="oracle.sqlj"/>
              <import-shared-library name="oracle.toplink"/>
              <import-shared-library name="oracle.jdbc"/>
         </imported-shared-libraries>
         <connector-factory location="eis/DB/DBConn_XE" connector-name="Database Adapter">
              <config-property name="xADataSourceName" value="jdbc/DBConn_XEDataSource"/>
              <config-property name="dataSourceName" value="loc/DBConn_XEDataSource"/>
              <config-property name="platformClassName" value="oracle.toplink.platform.database.Oracle9Platform"/>
              <config-property name="usesNativeSequencing" value="true"/>
              <config-property name="sequencePreallocationSize" value="50"/>
              <config-property name="defaultNChar" value="false"/>
              <config-property name="usesBatchWriting" value="true"/>
              <connection-pooling use="none">
              </connection-pooling>
              <security-config use="none">
              </security-config>
         </connector-factory>
         <connector-factory location="eis/DB/BPELSamples" connector-name="Database Adapter">
              <config-property name="xADataSourceName" value="jdbc/BPELSamplesDataSource"/>
              <config-property name="dataSourceName" value=""/>
              <config-property name="platformClassName" value="oracle.toplink.platform.database.Oracle9Platform"/>
              <config-property name="usesNativeSequencing" value="true"/>
              <config-property name="sequencePreallocationSize" value="50"/>
              <config-property name="defaultNChar" value="false"/>
              <config-property name="usesBatchWriting" value="false"/>
              <connection-pooling use="none">
              </connection-pooling>
              <security-config use="none">
              </security-config>
         </connector-factory>
    </oc4j-connector-factories>
    HOME \bpel\system\appserver\oc4j\j2ee\home\config
    data-sources.xml
    <?xml version="1.0" standalone='yes'?>
    <!DOCTYPE data-sources PUBLIC "Orion data-sources" "http://xmlns.oracle.com/ias/dtds/data-sources-9_04.dtd">
    <data-sources>
    <!-- Connection pool for oracle database -->
    <!--
    <connection-pool name="BPELPM_CONNECTION_POOL">
    <connection-factory factory-class="oracle.jdbc.OracleDriver"
    url="jdbc:oracle:thin:[username]/[password]@[hostname]:[port]:[sid]" />
    </connection-pool>
    -->
    <!-- Connection pool for oracle lite -->
    <connection-pool name="BPELPM_CONNECTION_POOL">
    <connection-factory factory-class="oracle.lite.poljdbc.POLJDBCDriver"
    user="system"
    password="manager"
    url="jdbc:[email protected]:1531:orabpel" />
    </connection-pool>
    <managed-data-source name="BPELServerDataSource"
    connection-pool-name="BPELPM_CONNECTION_POOL"
    jndi-name="jdbc/BPELServerDataSource" tx-level="global"/>
    <managed-data-source name="BPELServerDataSourceWorkflow"
    connection-pool-name="BPELPM_CONNECTION_POOL"
    jndi-name="jdbc/BPELServerDataSourceWorkflow" tx-level="local"/>
    <managed-data-source name="BPELSamplesDataSource"
    connection-pool-name="BPELPM_CONNECTION_POOL"
    jndi-name="jdbc/BPELSamplesDataSource" />
    </data-sources>
    DBAdapter wsdl file
    GetData_WS.wsdl
    <?xml version="1.0" encoding="UTF-8"?>
    <definitions
    name="GetData_WS"
    targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/GetData_WS/"
    xmlns:tns="http://xmlns.oracle.com/pcbpel/adapter/db/GetData_WS/"
    xmlns:plt="http://schemas.xmlsoap.org/ws/2003/05/partner-link/"
    xmlns:jca="http://xmlns.oracle.com/pcbpel/wsdl/jca/"
    xmlns:pc="http://xmlns.oracle.com/pcbpel/"
    xmlns:top="http://xmlns.oracle.com/pcbpel/adapter/db/top/GetDataWS"
    xmlns:hdr="http://xmlns.oracle.com/pcbpel/adapter/db/"
    xmlns="http://schemas.xmlsoap.org/wsdl/">
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/" location="DBAdapterOutboundHeader.wsdl"/>
    <types>
    <schema xmlns="http://www.w3.org/2001/XMLSchema">
    <import namespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/GetDataWS"
    schemaLocation="GetDataWS_table.xsd"/>
    </schema>
    </types>
    <message name="EmpDetailsViewCollection_msg">
    <part name="EmpDetailsViewCollection" element="top:EmpDetailsViewCollection"/>
    </message>
    <message name="GetData_WSSelect_EMP_ID_inparameters">
    <part name="GetData_WSSelect_EMP_ID_inparameters" element="top:GetData_WSSelect_EMP_IDInputParameters"/>
    </message>
    <portType name="GetData_WS_ptt">
    <operation name="GetData_WSSelect_EMP_ID">
    <input message="tns:GetData_WSSelect_EMP_ID_inparameters"/>
    <output message="tns:EmpDetailsViewCollection_msg"/>
    </operation>
    </portType>
    <binding name="GetData_WS_binding" type="tns:GetData_WS_ptt">
    <jca:binding />
    <operation name="GetData_WSSelect_EMP_ID">
    <jca:operation
    InteractionSpec="oracle.tip.adapter.db.DBReadInteractionSpec"
    DescriptorName="GetDataWS.EmpDetailsView"
    QueryName="GetData_WSSelect"
    ReturnSingleResultSet="false"
    MappingsMetaDataURL="GetDataWS_toplink_mappings.xml" />
    <input>
    <jca:header message="hdr:OutboundHeader_msg" part="outboundHeader"/>
    </input>
    </operation>
    </binding>
    <!-- Your runtime connection is declared in
    J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml
    These 'mcf' properties here are from your design time connection and
    save you from having to edit that file and restart the application server
    if eis/DB/DBConn_XE is missing.
    These 'mcf' properties are safe to remove.
    -->
    <service name="GetData_WS">
    <port name="GetData_WS_pt" binding="tns:GetData_WS_binding">
    <jca:address location="eis/DB/DBConn_XE"
    UIConnectionName="DBConn_XE"
         ManagedConnectionFactory="oracle.tip.adapter.db.DBManagedConnectionFactory"
         mcf.DriverClassName="oracle.jdbc.OracleDriver"
    mcf.PlatformClassName="oracle.toplink.platform.database.oracle.OraclePlatform"
    mcf.ConnectionString="jdbc:oracle:thin:@localhost:1521:xe"
    mcf.UserName="hr"
    mcf.Password="62C32F70E98297522AD97E15439FAC0E"
    />
    </port>
    </service>
    <plt:partnerLinkType name="GetData_WS_plt" >
    <plt:role name="GetData_WS_role" >
    <plt:portType name="tns:GetData_WS_ptt" />
    </plt:role>
    </plt:partnerLinkType>
    </definitions>
    Thx,
    DI

  • Urgent help with Pages 5.0 needed

    Hi guys,
    I need urgent help! I deleted Pages 5.0 (as I HATED it) but now can't open a very important document. Can someone please tell me how to reinstall it??
    Thanks
    Kellie

    Downloading again is not as easy as that. you must find the app in the "Purchased" section of the
    app store and I think you then must hold down the option key to reinstall it.
    BTW, I only worked with one document as a trial for Pages 5 and then imported it to Word and saved it. I then deleted Pages 5 (I can't believe anyone who works with software would think that piece of worthless junk would sufice for anyone who uses a word processor professionally), reopened the Word document and saved it in Pages 09.
    I hope this helps

  • Urgent Help with a my Cheap Greek Hotel!

    Thanks for your help with the pseudocode. I have got many errors with this program in the funtions. The code is below. Is there someone who can help me get my head around them?
    import Date;
    import Money;
    public class Hotel {
        private Room[] rooms = new Room[12];
        public Hotel() {
             for(int i = 0; i<rooms.length; i++){
                 rooms[i] = new Room(i+1,20);
        public static void main (String[]args)
         // public void bookIn(String guest, Date today)
         public void bookIn(String guest, Date today, int roomNumber)
            if (roomNumber < 1 || roomNumber > rooms.length){
                throw new Exception("Room numbers must be within 1-" + rooms.length);
            if (rooms[roomNumber-1].getRoomHolder() !=null){
                throw new Exception("Room " + roomNumber + " not available.");
            rooms[roomNumber-1].setRoomHolder(guest);
            rooms[roomNumber-1].setBookedIn(today);
         // fn to put a guest in ata a specified date
         public void bookOut (Date checkedIn, Date checkedOut)
            //In the date class you can probably check the Calendar class to find
            //out the syntax for subtracting dates
            int nightsStayed = checkedOut - checkedIn;
            //Now I'd have an array of Guest
            //objects, where the room number = the position in the
            //array.  When a guest checks in, you can set whatever
            //info. you need (check in date, guest name, etc.) and
              //set it back to null when a guest checks out.
              new Room[12][roomNumber] = null;
              //calculate the fee
            double price = getFee(nightsStayed);
            System.out.println("You owe: "+price);
         // public double bookOut(Date currentdate)
        }//end method
        public double bookOut (Date currentdate)
        // fn to empty the room and may be calculate & return the value of the bill
        public double getFee(int nightsStayed)
            double fee = (nightlyFee*nightsStayed);
            return fee;
            //end method
            //end class
    }The errors in this program are listed below`
    T:\Year 1\Programming Workshop\Assignment2\Assignment2\Hotel.java:31: cannot resolve symbol
    symbol  : method setRoomHolder  (java.lang.String)
    location: class Room
            rooms[RoomNumber-1].setRoomHolder(guest);
                 ^
    T:\Year 1\Programming Workshop\Assignment2\Assignment2\Hotel.java:32: cannot resolve symbol
    symbol  : method setBookedIn  (Date)
    location: class Room
            rooms[RoomNumber-1].setBookedIn(today);
                 ^
    T:\Year 1\Programming Workshop\Assignment2\Assignment2\Hotel.java:40: operator - cannot be applied to Date,Date
            int nightsStayed = checkedOut - checkedIn;
                                          ^
    T:\Year 1\Programming Workshop\Assignment2\Assignment2\Hotel.java:46: cannot resolve symbol
    symbol  : variable RoomNumber 
    location: class Hotel
              new Room[12][RoomNumber] = null;
                                 ^
    T:\Year 1\Programming Workshop\Assignment2\Assignment2\Hotel.java:46: unexpected type
    required: variable
    found   : value
              new Room[12][RoomNumber] = null;
                    ^
    T:\Year 1\Programming Workshop\Assignment2\Assignment2\Hotel.java:59: cannot resolve symbol
    symbol  : variable nightlyFee 
    location: class Hotel
            double fee = (nightlyFee*nightsStayed);
                          ^
    T:\Year 1\Programming Workshop\Assignment2\Assignment2\Room.java:36: cannot return a value from method whose result type is void
            return bookedIn;
                   ^
    7 errors
    *** Compiler reported errorsIs there anyone who can transfer my pseudocode into language specific java? I really need some help. Thanks.

    Thanks for your Help regarding methods. You managed to help me correct two errors. Which means i know have six. Thanks ever so much. The method setRoom Holder has been recognised aswell as the method setBookedIn.
    What did you mean by "I cannot use minus operators on dates?" Is there any other way that I can code this function so that it is acceptable?
    int nightsStayed = bookedOut - bookedIn;
    Can you help me code these last four functions please? Then my program will have no errors. I have to get rid of six.
    // public void bookIn(String guest, Date today)
         public void bookIn(String guest, Date today, int RoomNumber)
            if (RoomNumber < 1 || RoomNumber > rooms.length){
                throw new Exception("Room numbers must be within 1-" + rooms.length);
            if (rooms[RoomNumber-1].getRoomHolder() !=null){
                throw new Exception("Room " + RoomNumber + " not available.");
            rooms[RoomNumber-1].setRoomHolder(guest);
            rooms[RoomNumber-1].setBookedIn(today);
         // fn to put a guest in ata a specified date
         public void bookOut (Date bookedIn, Date bookedOut)
            //In the date class you can probably check the Calendar class to find
            //out the syntax for subtracting dates
            int nightsStayed = bookedOut - bookedIn;
            //Now I'd have an array of Guest
            //objects, where the room number = the position in the
            //array.  When a guest checks in, you can set whatever
            //info. you need (check in date, guest name, etc.) and
              //set it back to null when a guest checks out.
              new Room[12][RoomNumber] = null;
              //calculate the fee
            double price = getFee(nightsStayed);
            DerbyIO.getString("You owe: "+price);
         // public double bookOut(Date currentdate)
        }//end method
        public double bookOut (Date currentdate)
        // fn to empty the room and may be calculate & return the value of the bill
        public double getFee(int nightsStayed)
            double fee = (nightlyFee*nightsStayed);
            return fee;
            //end method
            //end class
    }

  • Urgent Help with Planning Book

    Hello Gurus,
    Need your help with a very urgent issue. I cannot see my key figure values in my planning book(Interactive Planning). I could sucessfully generate my CVC, then initialised my planning area. Then when I go the interactive planning I can see all my characteristics -Ex Material master( has all values), Prod type has values, etc. Iam in DEV system and have to move the whole config to QA now. I have to validate that the config works in QA. Its works ok in the sandbox but I cannot figureout why I can not see the values for key figs that Iam loading from a Flat File. Please help!!!!!!

    Hello Suresh,
    I have one more question for you. Let me tell you my scenario. I have the client giving me a rough forecast for the future. I have to do stat forecast based on the history and check that against the initial forecast given by them. But, the problem I realised now is that when I go to my planning books I can see the values for 2008 in mothly buckets since I have 0calmonth. But the client gave me another file with forecast for 2008 in monthly buckets and for 2009 and 2010 in quarter buckets. So, i have a planning buck profile defined to meet that but, how do I upload the file with both 0calmonth and 0calquarter in a single file. Please let me know!! Urgent task.
    Thanks again,
    Chinna.

  • Urgent Help with network access to FileOutputStream

    URGENT HELP NEEDED GUYS...I am stuck on this past 2 days. I tried several alternatives but to vain.
    I am trying to access a Folder on a user's computer which is lying in a different Domain.
    For accessing this folder, I have the following information with me.
    Domain name, PC name, folder name, windows username, windows password.
    Note: This username and password will give me rights to read + write to that folder.
    How to use these information to open a fileoutputstream ? Does the java.io package allow programs to pass a username, password , domainname, pcname and then the folder and filename to create/read/write files..
    Pls. suggest code examples. Sometime back I posted this query but didnt get an answer to my satisfaction. I have tried at my end but unsuccessful yet. Help would be appreciated.
    I am trying this on a Windows File System and Network domain
    THIS IS V. URGENT
    Thanks,

    Hi HJK,
    I am referring to the last reply of yours.
    " Hi, there are three approaches I can think of offhand:
    1) make sure the user-context under which you run the java app has the right to access the remote drive.
    2) Do the network connection in a batch or c program and call that at the start of your java app with Runtime#exec.
    3) Write some c/c++ code to open the connection and integrate that via JNI.
    Let me know what (other) solution you came up with in the end!
    Regarding the 1st.
    I am supposed to write a remote installation utility actually. There are around 200 PC(s) in a network on which I need to copy these java class files. My problem statement is such that at runtime I only have username, passwords, domain access. I am not supposed to map any drives. Its supposed to be done dynamically. No manual intervention required. :(
    How do I do the network connection in a batch mode ? Let me know that?
    If 2nd option can be done, probably I can think of action-3 at the moment I am quite blurr :(

  • Need urgent help with database startup

    dear all,
    i am using oracle 10g on windower server 32 bit.
    i try to startup my database today, and it give me error, and it is my production database,
    i need very urgent help from you.(i have no rman backup , and the data is not so necessory, since it is for student practice.)
    SQL> startup open
    ORACLE instance started.
    Total System Global Area  524288000 bytes
    Fixed Size                   790180 bytes
    Variable Size             250343772 bytes
    Database Buffers          272629760 bytes
    Redo Buffers                 524288 bytes
    Database mounted.
    ORA-01110: data file 34: 'G:\ORACLE\DATAFILES_ACADEMY\ACADEMY'
    ORA-01115: IO error reading block from file 34 (block # 1)
    ORA-27070: async read/write failed
    OSD-04016: Error queuing an asynchronous I/O request.
    O/S-Error: (OS 23) Data error (cyclic redundancy check).regards.

    Maahjoor wrote:
    Hi dears,
    i need further assistance from your side, i have restarted the server, but the same problem.
    as there a way to drop and re-create a system tablespace? since the file 34 belong to system tablesapce.
    regardsNo.
    So just create a new database. That will take all of ten minutes. And tell your students to create new tablespaces. That will take them two minutes.

Maybe you are looking for

  • Will 20D battery charger work with new "BP511A 2200 mAH batery?

    Is my charger not working?  Can I use 2200 mAh batteries with EOS 20D camera?  If it wlll work, where should I get a new charger?

  • Regarding ALE steps

    could plz tell me the             process of ALE steps with description

  • 16 bit to 12 bit image

    I have Labview 8.51 full developmental version and it does NOT have IMAQ arraytoimage.vi! Anyway I have a camera that captures 12 bit images but the card that supports the camera only outputs 16 bit. So I am getting 16 bit tiff files and I am trying

  • Bootable ISO images not visible in PCD when doing Migration Task

    We are looking to move from CUCM 8.6 to CUCM 10.0 using Prime Collaboration Deployment. We have the full 10.0 media for CUCM and IMP. We created an ISO image of each and uploaded them to the /fresh_install directory on the PCD server. When creating a

  • Disabling AD

    I want to convert my server from active director to just a file server, but all of the AD options are grayed out. Can I disable this option without starting over?