Safari Java Date Implementation

Dear, I'm having this very strange problem at work today concerning dates. It seems that any dates beyond the 28th of February 2034 are being miscalculated and this happens only in Safari. It seems that starting from this date, the system calculates the date minus 1. I have absolutely no clue why this is or how this is possible. Is there something different after the 28th of February 2034? Maybe it has something to do with a leap year or am I doing something wrong in my javascript code? Any advice would be highly appreciated. I'll leave a code example below illustrating this problem. Pay attention to date 4 and 5, these one will produce 11th of October instead of 12th of October.
<script type="text/javascript">
function TestDates() {
var date1 = '10/12/2010';
var date2 = '10/12/2020';
var date3 = '10/12/2030';
var date4 = '10/12/2040';
var date5 = '10/12/2050';
alert(date1);
alert(date2);
alert(date3);
alert(date4);
alert(date5);
var dat1 = new Date(date1);
var dat2 = new Date(date2);
var dat3 = new Date(date3);
var dat4 = new Date(date4);
var dat5 = new Date(date5);
alert(dat1);
alert(dat2);
alert(dat3);
alert(dat4);
alert(dat5);
</script>
<form><input type="button" value="Click here">
</form>
Message was edited by: dekeyser.tom

I assume you meant Javascript and not Java here, but I am having the same problem too.
I have found a workaround. Bascially you  just need to specify the time explicitly as well as the date. In your case, just append a " 00:00" (note the space) to your date strings in your constructor calls and the bug is avoided.
Haven't tried it in Safari for Windows, but I can attest that the same bug occurs in the Mac version as well, so I hope my workaround will work in windows too.

Similar Messages

  • How to do sorting/filtering on custom java data source implementation

    Hi,
    I have an entity driven view object whose data should be retrieved and populated using custom java data source implementation. I've done the same as said in document. I understand that Query mode should be the default one (i.e. database tables) and createRowFromResultSet will be called as many times as it needs based on the no. of data retrieved from service, provided we should write the logic for hasNextForCollection(). Implementation sample code is given below.
    protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams) {      
    Iterator datumItr = retrieveDataFromService(qc, params);
    setUserDataForCollection(qc, datumItr);
    hasNextForCollection(qc);
    super.executeQueryForCollection(qc, params, noUserParams);
    protected boolean hasNextForCollection(Object qc) {
    Iterator datumItr = (Iterator) getUserDataForCollection(qc);
    if (datumItr != null && datumItr.hasNext()){
    return true;
    setCallService(false);
    setFetchCompleteForCollection(qc, true);
    return false;
    protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet resultSet) {
    Iterator datumItr = (Iterator) getUserDataForCollection(qc);
    Object datumObj = datumItr.next();
    ViewRowImpl r = createNewRowForCollection(qc);
    return r;
    Everything is working fine include table sorting/filtering. Then i noticed that everytime when user perform sorting/filtering, executeQueryForCollection is called, which in turn calls my service. It is a performance issue. I want to avoid. So i did some modification in the implementation in such a way that, service call will happen only if the callService flag is set to true, followed by executeQuery(). Code is given below.
    private boolean callService = false;
    public void setCallService(boolean callService){
    this.callService = callService;
    public boolean isCallService(){
    return callService;
    protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams){
    if (callService)
    Iterator datumItr = retrieveDataFromService(qc, params);
    setUserDataForCollection(qc, datumItr);
    hasNextForCollection(qc);
    super.executeQueryForCollection(qc, params, noUserParams);
    Issue i have:
    When user attempts to use table sort/filter, since i skipped the service call and set null as userDataCollection, createRowFromResultSet is not called and data which i retrieved and populated to view object is totally got vanished!!. I've already retrived data and created row from result set. Why it should get vanished? Don't know why.
    Tried solution:
    I came to know that query mode should be set to Scan_Entity_Cache for filtering and Scan_View_Rows for sorting. I din't disturb the implementation (i.e. skipping service call) but overrided the executeQuery and did like the following code.
    @Override
    public void executeQuery(){
    setQueryMode(callService ? ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES : ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
    super.executeQuery();
    By doing this, i could able to do table filtering but when i try to use table sorting or programmatic sorting, sorting is not at all applied.
    I changed the code like beolw*
    @Override
    public void executeQuery(){
    setQueryMode(callService ? ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES : ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
    super.executeQuery();
    Now sorting is working fine but filtering is not working in an expected way because Scan_View_rows will do further filtering of view rows.
    Question:
    I don't know how to achieve both filtering and sorting as well as skipping of service call too.
    Can anyone help on this?? Thanks in advance.
    Raguraman

    Hi,
    I have an entity driven view object whose data should be retrieved and populated using custom java data source implementation. I've done the same as said in document. I understand that Query mode should be the default one (i.e. database tables) and createRowFromResultSet will be called as many times as it needs based on the no. of data retrieved from service, provided we should write the logic for hasNextForCollection(). Implementation sample code is given below.
    protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams) {
      Iterator datumItr = retrieveDataFromService(qc, params);
      setUserDataForCollection(qc, datumItr);
      hasNextForCollection(qc);
      super.executeQueryForCollection(qc, params, noUserParams);
    protected boolean hasNextForCollection(Object qc) {
      Iterator datumItr = (Iterator) getUserDataForCollection(qc);
      if (datumItr != null && datumItr.hasNext()){
        return true;
      setFetchCompleteForCollection(qc, true);
      return false;
    protected ViewRowImpl createRowFromResultSet(Object qc, ResultSet resultSet) {
      Iterator datumItr = (Iterator) getUserDataForCollection(qc);
      Object datumObj = datumItr.next();
      ViewRowImpl r = createNewRowForCollection(qc);
      return r;
    }Everything is working fine include table sorting/filtering. Then i noticed that everytime when user perform sorting/filtering, executeQueryForCollection is called, which in turn calls my service. It is a performance issue. I want to avoid. So i did some modification in the implementation in such a way that, service call will happen only if the callService flag is set to true, followed by executeQuery(). Code is given below.
    private boolean callService = false;
    public void setCallService(boolean callService){
      this.callService = callService;
    public boolean isCallService(){
      return callService;
    protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams){
      if (callService) {
        Iterator datumItr = retrieveDataFromService(qc, params);
        setUserDataForCollection(qc, datumItr);
      hasNextForCollection(qc);
      super.executeQueryForCollection(qc, params, noUserParams);
    }Issue i have:
    When user attempts to use table sort/filter, since i skipped the service call and storing of userDataCollection, createRowFromResultSet is not called and data which i retrieved and populated to view object is totally got vanished!!. I've already retrived data and created row from result set. Why it should get vanished? Don't know why.
    Tried solution:
    I came to know that query mode should be set to Scan_Entity_Cache for filtering and Scan_View_Rows for sorting. I din't disturb the implementation (i.e. skipping service call) but overrided the executeQuery and did like the following code.
    @Override
    public void executeQuery(){
      setQueryMode(callService ? ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES : ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS);
      super.executeQuery();
    }By doing this, i could able to do table filtering but when i try to use table sorting or programmatic sorting, sorting is not at all getting applied.
    I changed the code like below one (i.e. changed to ViewObject.QUERY_MODE_SCAN_VIEW_ROWS instead of ViewObject.QUERY_MODE_SCAN_ENTITY_ROWS)
    @Override
    public void executeQuery(){
      setQueryMode(callService ? ViewObject.QUERY_MODE_SCAN_DATABASE_TABLES : ViewObject.QUERY_MODE_SCAN_VIEW_ROWS);
      super.executeQuery();
    }Now sorting is working fine but filtering is not working in an expected way because Scan_View_rows will do further filtering of view rows.
    If i OR'ed the Query Mode as given below, i am getting duplicate rows. (vewObject.QUERY_MODE_SCAN_ENTITY_ROWS | ViewObject.QUERY_MODE_SCAN_VIEW_ROWS) Question:
    I don't know how to achieve both filtering and sorting as well as skipping of service call too.
    Can anyone help on this?? Thanks in advance.
    Raguraman
    Edited by: Raguraman on Apr 12, 2011 6:53 AM

  • Simple java date related question

    Hi Friends,
    I have written this custom date class that compares two dates. The user can enter any number of days,and it should calculate the next date,is that possible???
    public class Date implements Comparable {
         private int month, day, year;
         public Date(int m, int d, int y) {
              month = m;
              day = d;
              year = y;
         public int compareTo(Object o) {
              Date a = this;
              Date b = (Date) o;
              if (a.year < b.year) return -1;
              if (a.year > b.year) return 1;
              if (a.month < b.month) return -1;
              if (a.month > b.month) return 1;
              if (a.day < b.day) return -1;
              if (a.day > b.day) return 1;
              return 0;
         public String toString() {
              return month + "/" + day + "/" + year;
         public static void main(String[] args) {
              Date d1 = new Date(21, 03, 2007);
              int days = Integer.parseInt(args[0]);
              System.out.println("New date is:"); // Need to print new date
    Expected output:
    java Date 30
    New date is: 04/20/2007If this is not possible with this class,how can we do this, any ideas.
    Your help would be appreciated.
    Thanks

    Hi,
    Try this code out:
    import java.text.DateFormat;
    import java.util.*;
    import javax.swing.JOptionPane;
    public class SimpleDate {
         private int month, day, year;
         public SimpleDate() {
              Date date = new Date();
             String myString = DateFormat.getDateInstance().format(date);
             StringTokenizer tokens = new StringTokenizer(myString, "/");
             day = Integer.parseInt(tokens.nextToken());
             month = Integer.parseInt(tokens.nextToken());
             year = Integer.parseInt(tokens.nextToken());
         public SimpleDate(String stdate) {
              try {
                   StringTokenizer tokens = new StringTokenizer(stdate, "/");
                   day = Integer.parseInt(tokens.nextToken());
                   month = Integer.parseInt(tokens.nextToken());
                   year = Integer.parseInt(tokens.nextToken());
              catch(Exception e) {
                   Date date = new Date();
                  String myString = DateFormat.getDateInstance().format(date);
                  StringTokenizer tokens = new StringTokenizer(myString, "/");
                  day = Integer.parseInt(tokens.nextToken());
                  month = Integer.parseInt(tokens.nextToken());
                  year = Integer.parseInt(tokens.nextToken());
                   JOptionPane.showMessageDialog(null, "Invalid String,\nDate set to current", "Invalid String", JOptionPane.ERROR_MESSAGE);
         public SimpleDate(int d, int m, int y) {
              month = m;
              day = d;
              year = y;
         public int compareTo(Object o) {
              SimpleDate a = this;
              SimpleDate b = (SimpleDate) o;
              if (a.year < b.year) return -1;
              if (a.year > b.year) return 1;
              if (a.month < b.month) return -1;
              if (a.month > b.month) return 1;
              if (a.day < b.day) return -1;
              if (a.day > b.day) return 1;
              return 0;
         private int getNumOfDaysInMonth() {
              boolean leap = false;
              int days = 30;
              if (year % 4 == 0) leap = true;
              if ((month == 1) | (month == 3) | (month == 5) | (month == 7) |
                        (month == 8) | (month == 10) | (month == 12)) {
                   days = 31;
              if ((month == 4) | (month == 6) | (month == 9) | (month == 11)) {
                   days = 30;
              if (month == 2) {
                   if (leap) {
                        days = 29;
                   else days = 28;
              return days;
         public void addDays(int nums) {
              while (nums > getNumOfDaysInMonth()) {
                   nums = nums - getNumOfDaysInMonth();
                   addMonths(1);
              day = day + nums;
              while (day > getNumOfDaysInMonth()) {
                   day = day - getNumOfDaysInMonth();
                   addMonths(1);
         public void addMonths(int nums) {
              while (nums > 12) {
                   nums = nums - 12;
                   addYears(1);
              month = month + nums;
              while (month > 12) {
                   month = month - 12;
                   addYears(1);
         public void addYears(int nums) {
              year = year + 1;
         public int getDay() {
              return day;
         public int getMonth() {
              return month;
         public int getYear() {
              return year;
         public String toString() {
              return day + "/" + month + "/" + year;
    }I have swapped the day and month around from mm/dd/yyyy to dd/mm/yyyy
    but otherwise its still the same basic code

  • External SOAP client Accessing Webservice using built in Java Data type

    We have built a webservice and deployed it on WLS. We accessed this from a swing
    client it works fine.The webservice methods uses non-built in JAVA data types
    as parameters.These are Value Objects and the JAVA Serializer and Deserializer
    classes are generated using Ant task itself.The client coding uses Value objects
    given by the Client_jar (generated using <Clientgen> ant task) to pass to the
    webservice. We dont want to go by this way.Is there anyway were in we can pass
    parameters to the method which expects non-built in java datatypes?
    Why i am asking this is, i want to know how an external client (.Net client )
    will be able to exceute my webservice (i.e., passing the required Object which
    the method is expecting)?

    Hi Anish,
    Well first off, your web service doesn't send or receive "objects". It only sends
    and recieves XML, which is in turn converted to/from Java objects at invocation
    time. Second, a .NET (or Perl, or Python, or C++) client will be able to call
    your web service, because the wsdl.exe tool (for .NET) will generate "programming
    language specific" objects from the <types><schema> elements, in the WSDL of your
    web service :-) The wsdl.exe tool will create C# objects from the WSDL, that will
    convert XML to/from C# when your web service is called. That's the beauty of XML
    schema - it's a "universal typing system", so it's not tied to a particular programming
    language. The only issue is whether or not the web services platform vendor's
    XML Schema/WSDL processor, can successfully process the WSDL. Some vendors have
    more complete implementations of the WSDL and XML Schema specs than others, so
    expect varying success here. The one in WLS 7.0 is pretty good, so you shouldn't
    have too many problems consuming WSDL generated by .NET tools (or any other tool
    for that matter).
    Regards,
    Mike Wooten
    "Anish" <[email protected]> wrote:
    >
    We have built a webservice and deployed it on WLS. We accessed this from
    a swing
    client it works fine.The webservice methods uses non-built in JAVA data
    types
    as parameters.These are Value Objects and the JAVA Serializer and Deserializer
    classes are generated using Ant task itself.The client coding uses Value
    objects
    given by the Client_jar (generated using <Clientgen> ant task) to pass
    to the
    webservice. We dont want to go by this way.Is there anyway were in we
    can pass
    parameters to the method which expects non-built in java datatypes?
    Why i am asking this is, i want to know how an external client (.Net
    client )
    will be able to exceute my webservice (i.e., passing the required Object
    which
    the method is expecting)?

  • How to execute Custom java data source LOV view object from a common mthd?

    Hi,
    My application contains Custom java data source implemented LOVs. I want to have a util method which gets the view accessor name, find the view accessor and execute it. But i couldn't find any API to get the view accessors by passing the name.
    Can anyone help me iin how best view accessors can be accessed in common but no by creating ViewRowImpl class (By every developer) and by accessing the RowSet getters?
    Thanks in advance.

    I am sorrry, let me tell my requirement clearly.
    My application is not data base driven. Data transaction happens using tuxedo server.
    We have entity driven VOs as well as programmatic VOs. Both are custom java data source implemented. Entity driven VOs will participate in transactions whereas programmatic VOs are used as List view object to show List of values.
    Custom java datasource implementation in BaseService Viewobject Impl class looks like
            private boolean callService = false;
        private List serviceCallInputParams = null;
        public BaseServiceViewObjectImpl()
            super();
         * Overridden for custom java data source support.
        protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams)
            List dataFromService = null;
            if(callService)
                callService = retrieveDataFromService(serviceCallInputParams);
            setUserDataForCollection(qc, dataFromService != null? dataFromService.iterator(): null);   
            super.executeQueryForCollection(qc, params, noUserParams);
         * Overridden for custom java data source support.
        protected boolean hasNextForCollection(Object qc)
            Iterator<BaseDatum> datumItr = (Iterator<BaseDatum>) getUserDataForCollection(qc);
            if (datumItr != null && datumItr.hasNext())
                return true;
            callService = false;
            serviceCallInputParams = null;
            setFetchCompleteForCollection(qc, true);
            return false;
        }Individual screen developer, who want to load data to VO, will do something like the below code in their VO impl class
        public void fetch()
            BaseServiceViewObjectImpl vo = this;
            vo.setCallService(true);
            vo.setServiceCallInputParams(new ArrayList());
            vo.executeQuery();
        }As these custom java data source implemented LOV VOs comes across the screens, i want to have a util method at Base VOImpl class, that gets the view accessor name, finds the LOV VO instance, retrieves data for that. I want to do something like
         * Wrapper method available at Base Service ViewObject impl class
        public void fetchLOVData(String viewAccessorName, List serviewInputParams)
            // find the LOV View object instance
            BaseServiceViewObjectImpl lovViewObject  = (BaseServiceViewObjectImpl) findViewAccessor(viewAccessorName);
            // Get data for LOV view object from service
            lovViewObject.setCallService(true);
            lovViewObject.setServiceCallInputParams(serviewInputParams);
            lovViewObject.executeQuery();
    Question:
    1. Is it achievable?
    1. Is there any API available at View Object Impl class level, that gets the view accessor name and returns the exact LOV view object instance? If not, how can i achieve it?

  • Issue with "firstRecord" Business Component method of JAVA Data bean API.

    Hi,
    Following is my use-case scenario:
    I have to add or associate child MVG business component (CUT_Address)
    with the parent business component (Account) using JAVA Data bean API.
    My requirement is: first to check whether child business component(i.e. CUT_address) exists. If it exists then associate it with parent business component (Account)
    otherwise create new CUT_address and associate it with account.
    Code (using JAVA Data bean APIs) Goes as follows:
    SiebelBusObject sBusObj = connBean.getBusObject("Account");
    parentBusComp = sBusObj.getBusComp("Account");
    SiebelBusComp parentBusComp;
    SiebelBusComp childBusComp;
    // retrieve required account.. Please assume Account1 exists
    parentBusComp.activateField("Name");
    parentBusComp.clearToQuery();
    parentBusComp.setSearchSpec("Name", "Account1");
    sBusComp.executeQuery2(true, true);
    sBusComp.firstRecord();
    Counter = 0;
    while (counter < Number_Of_Child_Records_To_Insert)
    childBusComp = parentBusComp.getMVGBusComp("City");
    associatedChildBusComp = childBusComp.getAssocBusComp();
    childBusComp.activateField("City");
    childBusComp.clearToQuery();
    childBusComp.setSearchSpec("City", Vector_of_city[counter]);
    sBusComp.executeQuery2(true, true);
    if( sBusComp.firstRecord() )
    // Child already exist and do processing accordingly
    else
    // Child does not exist and do processing accordingly
    childBusComp.release();
    childBusComp = null;
    associatedChildBusComp.release();
    associatedChildBusComp=null;
    Now the issue with this code is: For the first iteration, SbusComp.firstRecord returns 0 if records does not exist. However from the second iteration, SbusComp.firstRecord returns 1 even if there is no record matching the search specification.
    Any input towards the issue is highly appreciable.
    Thanks,
    Rohit.

    Setting the view mode to "AllView" helped.
    Thanks for the lead!
    In the end, I also had to invoke the business component method SetAdminMode with "true" as the argument so that I could also modify the records from my script.

  • Wie kann ich beim Ipad 4 im Safari Java aktivieren?

    Wie kann ich beim Ipad 4 im Safari Java aktivieren?

    You can't. The iPad does not natively support Java. You can try VirtualChrome, the only third-party app/service I know of that says it supports Java. In essence it takes control of a virtual OS on the company's servers, something you can do yourself if you have a desktop computer that can run Java.
    Regards.

  • From Time column in Excel to Java Date ?

    Hi there!
    After I have read range data from Excel to a Java Object[][]
    array/table, one of my excel time columns becomes "floats"
    numbers when I try to access them in Java, like this:
    from 15:00:00 in Excel to 0.625 in my Java program
    How can I avoid this OR transform/parse this 0.625 number
    back again to time/Date 15:00:00 inside Java ? hmmm
    Is there any setup of jCom that can controll this somehow ?
    I have been able to transform:
    from 11.15.01 in Excel, becomes "Thu Nov 15 00:00:00 CET 2001"
    with the jCom bridge ...
    When I have this "string" on this format, it's easy
    to get a Java Date of this with SimpleDateFormat.
    ... but not with this time of mine :-)
    Any clues where to look or a solution for this ?
    -- Thank you !
    -- Erlend

    Excel stores times as decimal fractions (representing portions of a day)
    There is no Time data type in VB so is probably represented by a Single
    object.
    This object is then converting to a java.lang.float on the Java side.
    0.625 can be parsed by multiplying by (24*60*60) to get the number
    of seconds after midnight.
    A list of supported COM data types and their java equivalents
    can be found in chapter 7 of the jCOMReference pdf file.
    damon
    "Erlend Bjorge" <[email protected]> wrote in message
    news:3be2983e$[email protected]..
    >
    Hi there!
    After I have read range data from Excel to a Java Object[][]
    array/table, one of my excel time columns becomes "floats"
    numbers when I try to access them in Java, like this:
    from 15:00:00 in Excel to 0.625 in my Java program
    How can I avoid this OR transform/parse this 0.625 number
    back again to time/Date 15:00:00 inside Java ? hmmm
    Is there any setup of jCom that can controll this somehow ?
    I have been able to transform:
    from 11.15.01 in Excel, becomes "Thu Nov 15 00:00:00 CET 2001"
    with the jCom bridge ...
    When I have this "string" on this format, it's easy
    to get a Java Date of this with SimpleDateFormat.
    ... but not with this time of mine :-)
    Any clues where to look or a solution for this ?
    -- Thank you !
    -- Erlend

  • Java dates from 0-11 or 1-12

    Hello
    In java Date, the months ranges from 0-11 . first january is thus 1/0/2003 (in dd/mm/yyyy form). But in almost all databases , month values are counted as 1-12 . That is first january becomes 1/1/2003 . Obviously we have to show the users month values from 1-12 and not from 0-11. This obviuosly places some overhead when doing calculations and display. Sometimes there are situations where we have to get the date from database using getString() function, but that will vary with the result of Resultset.getDate() . Any way to overcome such limitations? and why java has such dates?

    I kind of agree. When I first started, I felt that I shouldn't ever rely upon an assumption about the value of a constant field (i.e. Calendar.JANUARY, etc).
    But since I did need to have a user-intuitive interface (both in guis and because we deal regularly with processing today's or yesterday's version of a file named like yyyyMMdd.input), I always provided a class that was a day-only object who did its behind-the-scenes work with Calendar by using switch statements to choose the correct Calendar month constants (rather than by adding or subtracting one).
    But (a) that got old quick because of either the same cumbersome code repeated everywhere or having to have many otherwise simple standalone programs depend on a central utility class to do this, and (b) the Calendar class documentation states that the value of the month is zero-based, so the horror of assuming constant values is not so bad.
    So now I have slightly less cumbersome code (adding or subtracting one) repeated everywhere...

  • Question about java thread implementation

    Hi All,
    I am comparing the performance of the Dining philosopher's problem
    implemented in Java, Ada, C/Pthread, and the experimental language I
    have been working on.
    The algorithm is very simple: let a butler to restrict entry to the
    eating table, so that deadlock is prevented.
    It turns out that the java code is the winner and it is 2 times faster than C!
    The comparison result really surprised me, and raised a big
    question mark : why java runs so fast? I did not use high-level synchronization
    constructs like Semaphores, atomic variables, etc.
    I vaguely recall that Java thread is actually implemented by the underlying
    system thread library(so on linux, the default would be NPTL, on windows NT threads,
    and on Mac OSX it would be Cthread?). Can no longer remember where I read that.
    Does anyone here have some notions about the Java thread
    implementations(where is this formally explained)? or Does anyone know where
    I can possibly find relevant literature or the answer?
    thanks a lot.
    cheers,
    Tony

    Peter__Lawrey wrote:
    google has lots of information on java threaded.
    One thing java does is support biased locking. i.e. the thread which last locked an object can lock that object again faster.
    This may explain the difference. [http://www.google.co.uk/search?q=java+usebiasedlocking]
    Note: you can turn this option off and other locking options to see if a feature is giving you the performance advantage.
    Personally I have found that real world multi-threaded applications are easier to write in Java, esp. when you have a team of developers. For this reason, alot of C/C++ libraries are single threaded, even when there would be a performance advantage in being multi-threaded (because its just too hard in reality to make it thread safe and faster because of it)I didn't know that, very interesting :-)

  • Customized java date function in heart of JDK

    hi
    how can i force JDK to return Persian or Arabic date instead of christian era?
    i have an application in java platform. i couldn't change code of program, because source is closed and is not reachable. i want to know how can i use a wrapper for date function in java? if it is possible how can i replace java date functionality with my desired date function?
    thanks for any help

    Thanks for your help.
    however i looking for one thing, similar a function wrapper that can substitute original method.
    I don't know where the application use date function and how calls it. so i think that it is possible to change behavior of java itself.

  • Do all open tabs in safari use data on iPhone 5

    I am wondering if pages that are open in the background of safari use data on the iPhone 5 iOS 7.1.1?

    Only when you switch to that tap and it updates, unless one of those tabs is streaming.

  • Problem with updating oracle DB with java date thru resultset.updateDate()

    URGENT Please
    I am facing problem in updating oracle database with java date through resultset.updateDate() method. Can anybody help me please
    following code is saving wrong date value (dec 4, 2006 instead of java date jul 4, 2007) in database:
    ResultSet rs = stmt.executeQuery("SELECT myDate FROM myTable");
    rs.first();
    SimpleDateFormat sqlFormat = new SimpleDateFormat("yyyy-mm-dd");
    java.util.Date myDate = new Date();
    rs.updateDate("myDate", java.sql.Date.valueOf(sqlFormat.format(myDate)));
    rs.updateRow();

    I believe you should use yyyy-MM-dd instead of yyyy-mm-dd. I think MM stands for month while mm stands for minute as per
    http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
    (If this works, after spending so much of your time trying to solve it, don't hit yourself in the head too hard. I find running out of the room laughing hysterically feels better).
    Here is a more standard(?) way of updating:
    String sqlStatement=
    "update myTable set myDate=? where personID=?"
    PreparedStatement p1= connection.prepareStatement(sqlStatement);
    p1.setDate(1,new java.sqlDate());
    p1.setInt(2, personID);
    p1.executeUpdate();

  • Java data types are tightly coupled or loosely coupled ?

    java data types are tightly coupled or loosely coupled ?

    Is this another interview question? If so, the answer you should have given is, "You, sir, have been smoking too much crack."

  • Connect to java data srvice

    hi,
    how to connect to java data/services ?
    I  had this error :
    Invalid root. The WEB-INF/flex folder must contain either flex-config.xml or services-config.xml.
    my project java is in : D:\SVN\VAZII\trunk\VaziiAdminService
    my project flex tha must use the service is in : D:\SVN\ICOSNET_WALLET\trunk\ConfortPayAdmin
    My server tomcat is in : C:\apache-tomcat-7.0.32
    what i must write in this input dialog box ?
    Root Folder, Root URl, and Context root
    thanks

    is there someone that knows flash builder here ?

Maybe you are looking for

  • Well here we go again another month same problem

    Im really annoyed about this now it is every month since march the same problem. Had the issue at begin of sept got engineer to come out 16th sept to fix the issue he tested everything in the house and there was no problems. He went to the exchange a

  • Operate with Closed Lid

    I want to be able to close the lid and still listen to music without connecting it to an external display. Someone please help! I'm switching from a PC so bear with me. I have a MacBook Pro.

  • Permissions problems and how to remove bad *.kext extensions

    I'm having major problems after installing 10.7.3 combo. My permissions have changed and I can't boot from my internal drive. I've repaired permissions with disk utility and Disk Warrior, reset disk permissions in all drives and they won't boot prope

  • Regarding the Title Bar

    I recently got Premiere pro cs4. I was wondering if there is anyway, be it by other 3rd party software, to hide the title bar in Premiere. I wish to do this because i have a program called Objectbar installed. Which acts as a second title bar for any

  • Tweakers-page wrong info on haswell E processors?

    Hi, Tweakers-page says the 5820 haswell E cannot handle two GPU due to limited pcie Lanes. Other sources say otherwise. I'm wondering if I truly need a better cpu  than the 5820 to run ddr4 ram,  3 ssd drives,  3 hdd drives, 2 970 gtx cards. The next