GetDuration().getSeconds() returning incorrect time

The method I am calling creates a Player object with a specified file, gets the duration using getDuration(), then it gets the seconds using getSeconds(), and then toTime() takes the seconds and converts it into mm:ss. The problem is the time returned isn't the correct duration of the song. For example, I am getting 3:27 returned when the song is actually 2:17.
I am calling this: toTime(getPlayer (file).getDuration().getSeconds()){code}
{code:java}private String toTime(double seconds) {
        Calendar calendar = Calendar.getInstance();
        calendar.clear();
        calendar.add(Calendar.MILLISECOND, (int)(seconds * 1000));
        SimpleDateFormat format = new SimpleDateFormat("mm:ss");
        return format.format(calendar.getTime());
    private Player getPlayer(File file) {
        Player player = null;
        try {
            player = Manager.createRealizedPlayer(new URL("file:///" + file.toString()));
            return player;
        } catch (MalformedURLException ex) {
            ex.printStackTrace();
        } catch (CannotRealizeException ex) {
            ex.printStackTrace();
        } catch (NoPlayerException ex) {
            ex.printStackTrace();
        } catch (IOException ex) {
            ex.printStackTrace();
        return null;
    }{code}
Any idea why I'm not getting the correct duration?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

>
Is there any other way to get an accurate duration?>How important did you say this was to you?
I note that you have not added any dukes
to this thread, as I advised. Dukes can be
added to a thread at any time.
In the hope that you can take my rather not
subtle hints, I did some digging around and
discovered the following...
OK - there is some bad news, more bad news,
and a possible (vague) glimmer of hope.
First, the bad news..
1) <http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4533590>
This 'In progress, bug' from November 2001
relating to jumping forward through a VBR MP3
does not bode well, nor the fact that..
2) JMStudio will also show incorrect times
for VBR MP3's (OK - hardly surprising).
OTOH, the 'vague glimmer of hope' comes from
an idea I just had, which is to implement a
pass-through codec..
<http://java.sun.com/products/java-media/jmf/2.1.1/apidocs/javax/media/Codec.html>
..that accepts the MP3 frames, caches them and
converts the result to something that is not
VBR, so an accurate time can be calculated. I
am not entirely sure I have understood the JDocs
though, and even if it is possible, the codec
is going to need to cache a large amount of data
(the entire tune).
If you can get this working, I suspect you will
be the first to crack this problem.
Having said all that, if this is a student
project, I would recommend ignoring VBR MP3s
& supplying the app. complete with a few
(polite cough) 'example' media files that
do not include any VBR MP3s.
OTOH, if you try the codec approach and manage
to make it work, I would recommend including
only VBR MP3s, and heavily stressing to the
assessor that the 'envelope* was pushed, and
indeed broken' with this application.
* 'envelope' in the sense of a barrier or
obstacle.

Similar Messages

  • Why fn:current-date()/fn:current-time() return incorrect time in OSB 11gR1?

    +system: Oracle Service Bus Version: [Oracle Service Bus Server Side Dependencies 11.1 Fri Mar 19 01:02:35 EDT 2010 ], Oracle Weblogic Server Version: [WebLogic Server 10.3.3.0 Fri Apr 9 00:05:28 PDT 2010 1321401 ] on my local machine (localhost), windows xp professional sp2, firefox 3.0.1.+
    in a SOAP 1.1 proxy, i have the following expression in an "Assign" action:
    <soap-env:Header>
            <wsse:Security>
                 <wsu:Timestamp wsu:Id='{fn:concat("Foo-",fn-bea:uuid())}'>
                      <wsu:Created>{fn:concat(fn-bea:date-to-string-with-format("yyyy-MM-dd",fn:current-date() ),"T",fn-bea:time-to-string-with-format("HH:mm:ss", fn:current-time()), "Z")}</wsu:Created>
                      <wsu:Expires>{fn:concat(fn-bea:date-to-string-with-format("yyyy-MM-dd",fn:current-date() ),"T",fn-bea:time-to-string-with-format("HH:mm:ss", fn:current-time() + xdt:dayTimeDuration("PT15M") ), "Z")}</wsu:Expires>
                 </wsu:Timestamp>
                 <wsse:BinarySecurityToken ValueType='Bar' EncodingType='wsse:Base64Binary' wsu:Id='{fn:concat("FUBAR-",fn-bea:uuid())}'>{if(empty($token//TOKEN/text())) then "123" else $token//TOKEN/text()}</wsse:BinarySecurityToken>
            </wsse:Security>
    </soap-env:Header>i expect that expression to create a SOAP header with the creation time as the current time at which the header is constructed; and then the expiration 15 minutes after the creation time.
    i ran it through osb's "XQuery Expression Testing console" at 13:37 (GMT) on monday oct 18. this is what was output:
    <soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
         <sec:Security xmlns:sec="http://schemas.xmlsoap.org/ws/2002/xx/secext">
              <oas:Timestamp oas:Id="Foo-1164f4d1-5cfa-44b4-99b0-e15d3ec29f94" xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                   <oas:Created>2010-10-17T12:37:12Z</oas:Created>
                   <oas:Expires>2010-10-17T12:52:12Z</oas:Expires>
              </oas:Timestamp>
              <sec:BinarySecurityToken ValueType="Bar" EncodingType="wsse:Base64Binary" oas:Id="FUBAR-639e7e1e-0b1d-47ef-9c98-cf3beb327e3c" xmlns:oas="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
         lorem ipsum dolor sit...
         </sec:BinarySecurityToken>
         </sec:Security>
    </soapenv:Header>the date is 1 day behind (sunday, oct 17)! and the time is one hour behind!
    my workstation's clock is set correctly. it's set to "Automatically adjust clock for daylight saving changes". I'm in the GMT timezone. the osb/wls stdout console window and logs all show the correct date and time.
    if i run the "current-date()" and "current-time()" functions through XML Spy 2001's XPath engine, it outputs the correct date and time.
    what gives? anybody know what's wrong?
    i've come across a few other similar threads. i've found the MLR #16 patch referred to in some of those posts. but unless i'm mistaken, it looks like that particular patch is for OSB 10.1.x.x.x; and i'm using 11.1. so i would have thought that 11.1 would have that patch anyway. no?
    i'm completely stumped!
    thanks in advance for your time and help.

    turns out that wrapping current-date in "fn:adjust-date-to-timezone()" is Zone related date time conversion problem with fn-bea:dateTime-to-string...
    there's also an "adjust-time-to-timezone()" and an "adjust-dateTime-to-timezone()". who knew?
    if anybody else has any other solutions, i'm all ears.

  • Mail delivery problems and incorrect time stamps

    I'm running Server 10.4.9 and along with hosting two webpages I am hosting email for one of the domains. Whenever a message is received by an account hosted by my server, the time listed for receiving the email is incorrect. It varies from 1 to 4 hours fast or slow depending on the source of the email. It happens with both incoming and outgoing mail. If a message is sent from one account to another on my server, the time stamp is correct.
    In addition to the incorrect time, I have noticed messages directed to one account being delivered to another. For example, in my own mailbox I recieve messages that were intented to go to another user mailbox on my server. I don't know if that is related to the same problem or if it is a spam issue but I figure any bit of information will be helpful.
    And finally, I do not believe all mail is reaching the intended mailbox. I have junkmail and notjunkmail accounts enabled for spam and if I redirect 10 emails usually only 5 at the most will make it. I get no return errors when redirecting (ex: undeliverable)
    I have checked the obvious time and date panels in OS X including the server admin and everything matches. The timezone is also correct. I type date into the terminal and that comes up correct as well. This isn't my first time configuring a server.... I've hosted mail servers with 10.2 and 10.3 in the past with no problems but this is my first time using 10.4. I'm pretty comfortable navigating through the server, but I have limited experience in terminal. (Just for FYI) Usually with enough time I can figure almost anything out, but I've run out of ideas here. Any help would be greatly appreciated. Thanks...

    I'm running Server 10.4.9 and along with hosting two
    webpages I am hosting email for one of the domains.
    Whenever a message is received by an account hosted
    by my server, the time listed for receiving the
    email is incorrect. It varies from 1 to 4 hours
    fast or slow depending on the source of the email.
    Where are you looking at the timestamp? On the message headers? Are you taking into account any timezone corrections on same headers? E.g. following message sent from Apple HQ to UK...
    Received: from uk2mxserver3-10.uk2.net ... Sun, 15 Apr 2007 10:24:34 +0100 (BST)
    Received: from bz3.apple.com ... Sun, 15 Apr 2007 10:24:31 +0100
    Received: from acutil03.apple.com ... Sun, 15 Apr 2007 02:24:22 -0700 (PDT)
    Otherwise you will need to post examples.
    In addition to the incorrect time, I have noticed
    messages directed to one account being delivered to
    another. For example, in my own mailbox I recieve
    messages that were intented to go to another user
    mailbox on my server. I don't know if that is
    related to the same problem or if it is a spam issue
    but I figure any bit of information will be helpful.
    And finally, I do not believe all mail is reaching
    the intended mailbox. I have junkmail and
    notjunkmail accounts enabled for spam and if I
    redirect 10 emails usually only 5 at the most will
    make it. I get no return errors when redirecting
    (ex: undeliverable)
    What does the mail.log show for these messages? You should be able to track them moving through the system.
    -david

  • S4 Chooses incorrect time zone when set to automatic

    My S4, and my son's, are choosing the incorrect time zone when the phones are set to choose automatically.
    The phones were working and my son noticed his was off earlier in the week and mine seems to have developed the same issue sometime last evening.
    They are both choosing Central Time and should be choosing Mountain Time.
    Location services are enabled on both (GPS & Verizon as well as Google Wi-Fi)
    I've launched my phone in Safe Mode and the issue still occurs
    On my son's we chose to set time zone manually which works, but it reset itself to automatic later and returned to being incorrect.
    Thanks for any help.

    On my phone I believe it was the day I posted here (April 14th) on his a couple days prior to that.
    Both had 'fixed' themselves until his changed back a couple days ago
    No new apps, latest update applied to both phones (after his was already showing incorrect time).
    Also of note, 3 other S4's in the household that do not have the issue(...yet?)
    As mine is currently working I don't suppose there's a need for me to run in safe mode, but I will pass the instructions on to him

  • Jabber Voicemail Incorrect Time Stamp

    I just noticed the the time stamp on my voicemails in Jabber v9.0.1 Build 12296 have the incorrect time stamp. They are all one hour behind. I confirmed that this does not happen in any of the following:
    Jabber v9.0.5
    CUPC v8.6
    Jabber for Mac v8.6.1
    Is this happening to anyone else?

    did you get this sorted out?  Im having the same problem with Jabber v9.1.5, CUC 9.1.2 and cucm 9.1.2.  Both cuc and cucm use the same NTP time source.  Time looks fine on the handsets and from the cli..

  • Ad hoc Risk Analysis report is returning incorrect Risk Level for some Risks

    We are running GRC AC 10.0 with SP 16.  After application of Support Pack 16, some of our ad hoc risk analysis reports are returning incorrect risk levels.  For example:  Risk F024 Open closed periods and inappropriately post currency or tax entries is set as High.  When the Ad hoc report is run, the risk F024 will show on a user with a level of Medium.  We have generated our ruleset and have followed the normal procedures used to implement the support pack.  Any ideas what is causing this issue?  I have exhausted my knowledge and search attempts.
    Any help is appreciated.
    Sara B.

    Hi Kevin
    Many thanks for your post, we did run a full BRA but no luck unfortunately. Some Risks still reporting as Medium when they should be Critical or High. Oddly it is reporting correctly against some risks just not for all!
    Cheers
    Hussain

  • "The movie contains an incorrect time value" error - saving a trimmed video

    I am attempting to trim a video shot on my Samsung CL65. The video was shot in High Quality HD 1280 x 720. I open the video in QuickTime and then use the Trim command to remove the last part of the video and then close it to Save it. When I save it I get the following error: "The document SAM_0306.MP4 could not be saved as "SAM_0306". The movie contains an incorrect time value." I think this has to do with an encoding error in the original file or in the trimmed file but I have no idea how to get around it.
    Any ideas?

    This info probably won't help with your problem, but it's information for others who get this error.
    It's probably the software that made the MP4. ffmpegX, for example, and the mencoder program inside it, do this with every H264 encoding when the video is longer than 1 hour. Time codes are correct up to 1 hour, then the seconds value gets wacky (3600 is added to it). Quicktime won't save a movie with a time code like 1:20:3623.120 (although it will correctly display 1:20:23 in the player).
    Apple used to offer quicktime scripts that would allow you to see what the time code in a stream really looked like. Applescript appears to have officially and quietly gone missing, though, and those scripts are no longer available online as far as I can tell. There were some really handy other scripts that would allow you to view all sorts of movie properties and manipulate tracks (great for syncing poorly synced sound, for example), but time code problems like the above would invariably mean the movie couldn't be saved.

  • Why does getdate() function return same time value for multiple select statements executed sequentially

    When I run the following code
    set nocount on
    declare @i table(id int identity(1,1) primary key, sDate datetime)
    while((select count(*) from @i)<10000)
    begin
    insert into @i(sDate) select getdate()
    end
    select top 5 sDate, count(id) selectCalls
    from @i
    group by sDate
    order by count(id) desc
    I get the following results. 
    sDate                   selectCalls
    2014-07-30 14:50:27.510 406
    2014-07-30 14:50:27.527 274
    2014-07-30 14:50:27.540 219
    2014-07-30 14:50:27.557 195
    2014-07-30 14:50:27.573 170
    As you can see the select getdate() function returned same time up to the milisecon 406 time for the first date value.  This started happening when we moved our applications to a faster server with four processors.  Is this correct or am I
    going crazy?
    Please let me know
    Bilal

    Observe that adding 2 ms is accurate only with datetime2.  As noted above, datetime does not have ms resolution:
    set nocount on
    declare @d datetime, @i int, @d2 datetime2
    select @d = getdate(), @i = 0, @d2 = sysdatetime()
    while(@i<10)
    begin
    select @d2, @d, current_timestamp, getdate(), sysdatetime()
    select @d = dateadd(ms,2,@d), @i = @i+1, @d2=dateadd(ms,2,@d2)
    end
    2014-08-09 08:36:11.1700395 2014-08-09 08:36:11.170 2014-08-09 08:36:11.170 2014-08-09 08:36:11.170 2014-08-09 08:36:11.1700395
    2014-08-09 08:36:11.1720395 2014-08-09 08:36:11.173 2014-08-09 08:36:11.170 2014-08-09 08:36:11.170 2014-08-09 08:36:11.1700395
    2014-08-09 08:36:11.1740395 2014-08-09 08:36:11.177 2014-08-09 08:36:11.170 2014-08-09 08:36:11.170 2014-08-09 08:36:11.1700395
    2014-08-09 08:36:11.1760395 2014-08-09 08:36:11.180 2014-08-09 08:36:11.170 2014-08-09 08:36:11.170 2014-08-09 08:36:11.1700395
    2014-08-09 08:36:11.1780395 2014-08-09 08:36:11.183 2014-08-09 08:36:11.170 2014-08-09 08:36:11.170 2014-08-09 08:36:11.1700395
    2014-08-09 08:36:11.1800395 2014-08-09 08:36:11.187 2014-08-09 08:36:11.170 2014-08-09 08:36:11.170 2014-08-09 08:36:11.1700395
    DATE/TIME functions:
    http://www.sqlusa.com/bestpractices/datetimeconversion/
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Incorrect time slices for 0UCCONTRACT (note 713358)

    Hello everybody,
    I have the same problem as mentioned in note 713358:
    Time slices of contracts were closed in IS-U. NO new time slice wasopened to this end (with the end date December 31, 9999). After the data is loaded, a time slice of the contract with the end date December 31, 9999 remains in BW, and receives the attributes of the contract before it is completed.
    I can't delete all the master data for the contracts, because they are already in use in another ODS objects.
    Is it possible to delete only historical data (table QUCCONTRACT)?
    I tried to do another initial upload (0UCCONTRACTH_ATTR) over the existing master data, but it didn't help, incorrect time slices remain the same.
    Is is possible to fix historical data without deleting all the master data?
    Any help would be greatly appreciated.

    I wrote a direct update statement to QUCCONRACT that deleted all attributes and then I started a new upload.

  • Widget world clock shows incorrect time

    widget world clock shows incorrect time.. how can i fix this?

    There are two possibilities: (1) your computer's time is wrong. Open System Preferences, select the Date & Time tab, and either set the time manually or select a time server. If you choose the time server click on the Time Zone tab and choose your correct time zone. (2) click on the i on the World Clock widget and select a city near you (that's in the same time zone as yours.)

  • A Verizon cellphone tower in my area is feeding multiple Verizon Customers / Devices with the incorrect time (one hour behind) when we are in range of this tower

    A Verizon cellphone tower in my area is feeding multiple Verizon Customers / Devices with the incorrect time (one hour behind) when we are in range of this tower (in this specific area).   Our phones show the correct time in other areas.   Is there a way to fix or report this?

    The zip code that this is occurring in is: 87102
    Specifically when I am at
    1001 Woodward Pl NE
    Albuquerque, NM 87102
    Upon further investigation, it is happening to anyone with a Verizon handset, regardless of specific device.  I have a Samsung Galaxy Note 3, and my co-worker has a Motorola Droid Turbo and we are both having the issue.  Anyone on a different carrier (T-Mobile, AT&T) is fine, and is not experiencing this issue.
    It actually looks like the cell tower is feeding us the correct time, but its like it forgot daylight savings happened.  So it is feeding us the incorrect time zone/day light savings information.
    When I goto Settings -> Date and Time on my Android device,  I have both "Automatic date and time" and "Automatic time zone" checked.
    the "Automatic timezone" it is pulling from the Verizon cell tower is "Mountain -7".   It is correct that we are in the "Mountain" timezone, but we are currently "Mountain -6" (also known as day light savings).   So the Cell Tower things it MST when it should be MST DST
    When I uncheck "Automatic time zone" and select my own, suddenly it lets me select "Mountain -6" and doesn't even give me the option of "Mountain -7".
    So in conclusion, some cell tower in the area of zip code 87102 forgot that daylight savings ever happened, and is telling cellphones they are in the "Mountain -7" timezone, instead of the correct current timezone of "Mountain -6 DST"
    Edit: Oh, sorry, and to answer your question, it began happening about 3 weeks ago.  We started noticing around March 25th, maybe a little after that.

  • OracleDataAdapter returning incorrect schema information

    Hi everyone. I have a very reproducible case where the DataTable schema created by the OracleDataAdapter is incorrect. It is driving me crazy :-).
    ====================
    OracleConnection cnn = new OracleConnection("User ID=XXX;Password=XXX;Data Source=XXX");
    cnn.Open();
    string strQuery = "CREATE TABLE FOO (a INT, b INT)";
    OracleCommand cmdExec = new OracleCommand(strQuery, cnn);
    cmdExec.ExecuteNonQuery();
    OracleCommand cmdQuery = new OracleCommand("SELECT * FROM FOO", cnn);
    OracleDataAdapter adp = new OracleDataAdapter(cmdQuery);
    DataTable dtb = new DataTable();
    adp.Fill(dtb);
    Console.WriteLine("FOO has {0} columns.", dtb.Columns.Count);
    for (int i = 0; i < dtb.Columns.Count; i++)
    Console.WriteLine("{0}th column's name is {1}.", i, dtb.Columns[ i ].ColumnName);
    cmdExec.CommandText = "DROP TABLE FOO";
    cmdExec.ExecuteNonQuery();
    cmdExec.CommandText = "CREATE TABLE FOO (c INT, d INT, e INT)";
    cmdExec.ExecuteNonQuery();
    dtb = new DataTable();
    adp.Fill(dtb);
    Console.WriteLine("FOO has {0} columns.", dtb.Columns.Count);
    for (int i = 0; i < dtb.Columns.Count; i++)
    Console.WriteLine("{0}th column's name is {1}.", i, dtb.Columns[ i ].ColumnName);
    cnn.Close();
    Console.ReadLine();
    =============================
    The console output is:
    FOO has 2 columns.
    0th column's name is A
    1th column's name is B
    FOO has 2 columns.
    0th column's name is A
    1th column's name is B
    But it should be:
    FOO has 3 columns.
    0th column's name is C
    1th column's name is D
    2th column's name is E
    for the second iteration.
    What should I do?
    -- Matt

    I agree with the earlier comment stating '...that the caching is happening inside of the ODP layer rather than a lower layer such as OCI. It looks like the caching is occurring in the m_metaData member of the OracleCommand...'.
    It looks like all of the caching is indeed taking place in ODP. However there is in fact two levels of cache taking place in your particular example - at the OracleCommand level but also deep inside ODP.Net there is a static MetaData class which has a private member m_pooler that maintains a metadata cache on a per connection basis. Basically even if the OracleCommand object entry m_metaData is reset values still appear inside the internal pool and so there need to be removed too - this cache is indexed initially through a hash of the connection details and then statement text. This is why even a new OracleCommand object but with same statement text on same connection also returns incorrect information.
    Within the OracleReader implementations various calls are made to MetaData.Pooler.Get.. calls to retrieve cached information.
    I came across a similar problem (not identical) because we are using the 'alter session set current schema...' command and this causes some problems.
    Basically it appears a base assumption has been made that the definition of object will not change at runtime (which you can understand) but in my case it is possible that 'select * from emp' say could be execute from the same connection but relate to different objects because name resolution has been adjust using the 'alter session...' command which is a big problem.
    I have written some helper routines which enable the internal caches to be 'managed' although it uses some nasty reflection to accomplish this (using private members directly!). It work successfully in my case and I have done a quick change to your example code (added a single call) and it now works, i.e.
    cmdExec.CommandText = "CREATE TABLE FOO (c INT, d INT, e INT)";
    cmdExec.ExecuteNonQuery();
    OracleMetaDataRemover.Remove(cmdQuery, true);
    dtb = new DataTable();
    adp.Fill(dtb);
    If you use the Remove method above and change true to false you will still receive the problem because although the Command has been cleared the details still remain centrally.
    The code which accessed above I include below as is (coded for Oracle 10.1.0.3.01 ODP - it may work on other releases but note this could break in future). Ideally methods are required within ODP to allow cleardown/control of this.
    using System;
    using System.Reflection;
    using System.Collections;
    using Oracle.DataAccess.Client;
    namespace Oracle.DBUtilities
         /// <summary>
         /// Summary description for OracleMetaDataPoolerCleaner.
         /// </summary>
         public class OracleMetaDataPoolerCleaner
              private static string OracleAssemblyShortName = "Oracle.DataAccess";
              private static string OracleMDType = "Oracle.DataAccess.Client.MetaData";
              private static string OraclePoolerType = "Oracle.DataAccess.Client.Pooler";
              // Fast access pointer to internal hash of information
              private Hashtable PooledItems = null;
              private static OracleMetaDataPoolerCleaner _oracleMetaDataPoolerCleanerInstance = null;
              static readonly object _syncRoot = new object();
              private OracleMetaDataPoolerCleaner()
                   Assembly OracleDataAccess = null;
                   // Get hold of the Oracle Data Access assembly
                   Assembly[] LoadedAssemblyList = AppDomain.CurrentDomain.GetAssemblies();
                   for(int i=0; i<LoadedAssemblyList.Length && OracleDataAccess == null; i++)
                        Assembly LoadedAssembly = LoadedAssemblyList;
                        string[] AssemblyNameDetails = LoadedAssembly.FullName.Split(',');
                        if (AssemblyNameDetails[0] == OracleMetaDataPoolerCleaner.OracleAssemblyShortName)
                             OracleDataAccess = LoadedAssembly;
                   // Make sure located details
                   if (OracleDataAccess != null)
                        // Get access to the MetaData cache details
                        Type OracleMetaData = OracleDataAccess.GetType(OracleMetaDataPoolerCleaner.OracleMDType);
                        if (OracleMetaData != null)
                             // Retrieve static pool item
                             FieldInfo f_Pooler = OracleMetaData.GetField("m_pooler", BindingFlags.NonPublic|BindingFlags.Instance|BindingFlags.Static);
                             if (f_Pooler != null)
                                  // As we cannot get direct access to the object type assume it is OK
                                  object pa = f_Pooler.GetValue(null);
                                  if (pa != null)
                                       Type OraclePooler = OracleDataAccess.GetType(OracleMetaDataPoolerCleaner.OraclePoolerType);
                                       if (OraclePooler != null)
                                            FieldInfo f_Pools = OraclePooler.GetField("Pools", BindingFlags.NonPublic|BindingFlags.Instance|BindingFlags.Static);
                                            PooledItems = f_Pools.GetValue(pa) as Hashtable;
                                            if (PooledItems == null)
                                                 throw new InvalidOperationException("Unable to initialise metadata cache access...");
              public static OracleMetaDataPoolerCleaner Instance()
                   // Make single copy of this item ready for use
                   if (_oracleMetaDataPoolerCleanerInstance == null)
                        // Thread safe locking and initialisation - 'double-checked lock'
                        lock(_syncRoot)
                             if (_oracleMetaDataPoolerCleanerInstance == null)
                                  _oracleMetaDataPoolerCleanerInstance = new OracleMetaDataPoolerCleaner();
                   return _oracleMetaDataPoolerCleanerInstance;
              /// <summary>
              /// Using reflection the process determines the command text
              /// contents of the specified OracleCommand
              /// Note this could simply have been delegated through to the
              /// OracleConnection version using OCommand.Connection
              /// </summary>
              /// <param name="OCommand">OracleCommand object containing command to be retrieved</param>
              /// <returns>Command string located</returns>
              public static string CommandText(OracleCommand OCommand)
                   string OracleCommandCommandText = null;
                   // Using reflection get direct access to the 'private' member details..
                   Type TypeOracleCommand = OCommand.GetType();
                   FieldInfo FieldInfoCommandText = TypeOracleCommand.GetField("m_commandText", BindingFlags.NonPublic|BindingFlags.Instance);
                   if (FieldInfoCommandText != null)
                        OracleCommandCommandText = FieldInfoCommandText.GetValue(OCommand).ToString();
                   return OracleCommandCommandText;
              /// <summary>
              /// Using reflection the process determines the command text
              /// contents of the specified OracleCommand
              /// </summary>
              /// <param name="OReader">OracleDataReader object containing command to be retrieved</param>
              /// <returns>CommandString located</returns>
              public static string CommandText(OracleDataReader OReader)
                   string OracleDataReaderCommandText = null;
                   // Using reflection get direct access to the 'private' member details..
                   Type TypeOracleDataReader = OReader.GetType();
                   FieldInfo FieldInfoCommandText = TypeOracleDataReader.GetField("m_commandText", BindingFlags.NonPublic|BindingFlags.Instance);
                   if (FieldInfoCommandText != null)
                        OracleDataReaderCommandText = FieldInfoCommandText.GetValue(OReader).ToString();
                   return OracleDataReaderCommandText;
              /// <summary>
              /// Using reflection the process determines the hashvalue
              /// specified OracleConnection
              /// </summary>
              /// <param name="OConnection">OracleConnection for which the HashCode is to be retrieved</param>
              /// <returns>HashValue located or -1</returns>
              public static int ConnectionStringHashValue(OracleConnection OConnection)
                   int HashValue = -1;
                   // Using the Oracle Connection retrieve the hashvalue associated
                   // with this connection
                   if (OConnection != null)
                        Type TypeOracleConnection = OConnection.GetType();
                        FieldInfo f_ConStrHashCode = TypeOracleConnection.GetField("m_conStrHashCode", BindingFlags.NonPublic|BindingFlags.Instance);
                        if (f_ConStrHashCode != null)
                             HashValue = Int32.Parse(f_ConStrHashCode.GetValue(OConnection).ToString());
                   return HashValue;
              /// <summary>
              /// Using reflection the process determines the hashvalue
              /// specified OracleDataReader
              /// </summary>
              /// <param name="OReader">OracleDataReader for which the associated connection HashValue is to be located</param>
              /// <returns>HashValue located or -1</returns>
              public static int ConnectionStringHashValue(OracleDataReader OReader)
                   int HashValue = -1;
                   // Using reflection get direct access to the 'private' member details..
                   Type TypeOracleDataReader = OReader.GetType();
                   FieldInfo f_OraConnection = TypeOracleDataReader.GetField("m_connection", BindingFlags.NonPublic|BindingFlags.Instance);
                   // Ensure have access to a connection and retrieve has information
                   if (f_OraConnection != null)
                        OracleConnection ConnectionValue = f_OraConnection.GetValue(OReader) as OracleConnection;
                        HashValue = OracleMetaDataPoolerCleaner.ConnectionStringHashValue(ConnectionValue);
                   // Return the hashvalue information located
                   return HashValue;
              /// <summary>
              /// Using reflection the process determines the hashvalue
              /// specified OracleCommand
              /// Note this could simply have been delegated through to the
              /// OracleConnection version using OCommand.Connection
              /// </summary>
              /// <param name="OCommand">OracleCommand for which the associated connection HashValue is to be located</param>
              /// <returns>HashValue located or -1</returns>
              public static int ConnectionStringHashValue(OracleCommand OCommand)
                   int HashValue = -1;
                   // Using reflection get direct access to the 'private' member details..
                   Type TypeOracleCommand = OCommand.GetType();
                   FieldInfo f_OraConnection = TypeOracleCommand.GetField("m_connection", BindingFlags.NonPublic|BindingFlags.Instance);
                   // Ensure have access to a connection and retrieve has information
                   if (f_OraConnection != null)
                        OracleConnection ConnectionValue = f_OraConnection.GetValue(OCommand) as OracleConnection;
                        HashValue = OracleMetaDataPoolerCleaner.ConnectionStringHashValue(ConnectionValue);
                   // Return the hashvalue information located
                   return HashValue;
              /// <summary>
              /// Using the supplied OracleDataReader internal calls are made
              /// to determine the ConnectionHash and CommandText details which will
              /// then be used to remove the item
              /// </summary>
              /// <param name="OReader">OracleDataReader to be probed to obtain information</param>
              /// <returns>Indicates whether the item was actually removed from the cache or not</returns>
              public bool Remove(OracleDataReader OReader)
                   bool Removed = false;
                   // Lookup the ConnectionStringHashDetails
                   int HashValue = OracleMetaDataPoolerCleaner.ConnectionStringHashValue(OReader);
                   if (HashValue != -1)
                        // Lookup the command text and remove details
                        string CommandText = OracleMetaDataPoolerCleaner.CommandText(OReader);
                        // Attempt to remove from the cache
                        Removed = this.Remove(HashValue, CommandText);
                   return Removed;
              /// <summary>
              /// Using the supplied OracleCommand internal calls are made
              /// to delegate the call to the OracleConnection version
              /// </summary>
              /// <param name="OCommand">OracleCommand to be probed to obtain information</param>
              /// <returns>Indicates whether the item was actually removed from the cache or not</returns>
              public bool Remove(OracleCommand OCommand)
                   // Call into internal other routine
                   return this.Remove(OCommand.Connection, OCommand.CommandText);
              /// <summary>
              /// Using the supplied OracleConnection internal calls are made
              /// to determine the ConnectionHash and it uses CommandText details
              /// to remove the item
              /// </summary>
              /// <param name="OConnection">OracleConnection from which the cache object should be removed</param>
              /// <param name="CommandText">CommandText to be removed</param>
              /// <returns>Indicates whether the item was actually removed from the cache or not</returns>
              public bool Remove(OracleConnection OConnection, string CommandText)
                   bool Removed = false;
                   // Lookup the ConnectionStringHashDetails
                   int HashValue = OracleMetaDataPoolerCleaner.ConnectionStringHashValue(OConnection);
                   if (HashValue != -1)
                        // Attempt to remove from the cache
                        Removed = this.Remove(HashValue, CommandText);
                   return Removed;
              /// <summary>
              /// Routine actually removes the items from the cache if it exists
              /// </summary>
              /// <param name="ConnectionHashValue">ConnectionHash which is used to key into the Pooled items</param>
              /// <param name="CommandText">CommandText to be removed</param>
              /// <returns>Indicates whether the item was actually removed from the cache or not</returns>
              private bool Remove(int ConnectionHashValue, string CommandText)
                   bool Removed = true;
                   // Retrieve Pooled items for particular hash value
                   Hashtable PoolContents = PooledItems[ConnectionHashValue] as Hashtable;
                   // Remove item if it is contained
                   if (PoolContents.ContainsKey(CommandText))
                        PoolContents.Remove(CommandText);
                        Removed = true;
                   return Removed;
         /// <summary>
         /// Summary description for OracleMetaDataRemover.
         /// </summary>
         public class OracleMetaDataRemover
              private OracleMetaDataRemover()
              /// <summary>
              /// Routine which Removes MetaData associated with OracleCommand object
              /// </summary>
              /// <param name="OCommand">OracleCommand to have associated MetaData removed</param>
              /// <returns>Indicates whether the MetaData associated with the OracleCommand was reset</returns>
              public static bool Remove(OracleCommand OCommand)
                   bool Removed = false;
                   // Retrieve current MetaData values from OCommand
                   Type OracleCommandMetaData = OCommand.GetType();
                   FieldInfo f_metaData = OracleCommandMetaData.GetField("m_metaData", BindingFlags.NonPublic|BindingFlags.Instance);
                   if (f_metaData != null)
                        f_metaData.SetValue(OCommand, null);
                        Removed = true;
                   // Indicate Removed from OCommand object
                   return Removed;
              /// <summary>
              /// Routine which Removes MetaData associated with OracleCommand object
              /// and allows for the removal of information from the internal cache
              /// </summary>
              /// <param name="OCommand">OracleCommand to have associated MetaData removed</param>
              /// <param name="RemoveFromMetaDataPool">Whether item should be removed from the internal metadata pool too</param></param>
              /// <returns>Indicates whether the MetaData associated with the OracleCommand was reset</returns>
              public static bool Remove(OracleCommand OCommand, bool RemoveFromMetaDataPool)
                   bool Removed = false;
                   // Remove details from Command
                   Removed = Remove(OCommand);
                   if (Removed && RemoveFromMetaDataPool)
                        // Remove information form internal cache
                        Removed = OracleMetaDataPoolerCleaner.Instance().Remove(OCommand);
                   // Indicated Removed from OCommand and Internal MetaData collection
                   return Removed;

  • Can I change incorrect time and date with

    Hello,
    I used my digital camera in a different time zone and forgot to set it accordingly. Now a bunch of photos have the incorrect time and date. Can I use Photoshop CS4 (11.0.2) to change this? I only found instructions on the Internet for Elements, which I do not have.
    Windows Live Photogallery was only mildly successful. In the Windows 7 Explorer the date is shown correctly, but when I go to open the file in Adobe Photoshop, the old, incorrect date is shown. That's why I hoped that I could change this for good with Photoshop.
    Thanks in advance!
    Aiiyana

    There are several dates in the metadata.  THe date shot is set by the camera and I know that you can not change that in Bridge.  There are programs out there on the web that will do it.

  • Logviewer 1.14 showing incorrect times, and other issues.

    Couple of issues with running LogViewer, wondering if anyone can help.
    First, and seems to be the most frustrating, is that the LogViewer screen is showing incorrect times for the events. I am in Mountain Time zone in the US, which is GMT-7. When looking at the log from a web browser, my router is displaying the correct time. The text file that LogViewer saves on the local computer shows the same correct time. The LogViewer screen, however, shows a time 7 hours into the future. IE, if I type out the log from a DOS window, the last event will say something like "Mar 28 1:15:05 2008", but that same event number will be listed on the logviewer screen as "Mar 28 8:15:05" Any ideas on what may be wrong and how to correct it?
    Second, all events seem to be grouped exactly 3 minutes apart. I realize this is probably an effect of the router sending the information every three minutes. Anyone know of a way of changing that period?
    Hm, just noticed a third, but very minor issue. The text file written has the wrong day of week on it. It's listing Mar 28 2008 as a Wednesday...
    Thanks in advance for any advice.
    OK, the tech info. I am running LogViewer 1.14 on a Windows XP machine, contacting an WRT55AG with firmware 1.20. The connection is through a Cat 5 cable, not through the wireless.

    Couple of issues with running LogViewer, wondering if anyone can help.
    First, and seems to be the most frustrating, is that the LogViewer screen is showing incorrect times for the events. I am in Mountain Time zone in the US, which is GMT-7. When looking at the log from a web browser, my router is displaying the correct time. The text file that LogViewer saves on the local computer shows the same correct time. The LogViewer screen, however, shows a time 7 hours into the future. IE, if I type out the log from a DOS window, the last event will say something like "Mar 28 1:15:05 2008", but that same event number will be listed on the logviewer screen as "Mar 28 8:15:05" Any ideas on what may be wrong and how to correct it?
    Second, all events seem to be grouped exactly 3 minutes apart. I realize this is probably an effect of the router sending the information every three minutes. Anyone know of a way of changing that period?
    Hm, just noticed a third, but very minor issue. The text file written has the wrong day of week on it. It's listing Mar 28 2008 as a Wednesday...
    Thanks in advance for any advice.
    OK, the tech info. I am running LogViewer 1.14 on a Windows XP machine, contacting an WRT55AG with firmware 1.20. The connection is through a Cat 5 cable, not through the wireless.

  • Always return GMT Time Zone in Bundle Image Deployment

    I have application that need to get window PC time zone, when use Bundle Image Deployment (include runtime jre), it always return GMT time zone no matter which time zone I set on my PC. After I replace runtime/jre in the image folder with complete jre, then it returns time zone correctly. Is it a bug in bundle deployment?
    javafx.runtime.version: 2.2.7-b01
    jdk1.7.0_17
    window 8 64bit
    Thanks.
    Eric

    I am experiencing similar type of issue.  I subscribed to a Calendar which has scheduled meeting from my time zone and different time zone.  When I subscribe in OS X, it shows flawlessly on local time. But when I do it in IOS 7,  it shows MST as-is in EST time zone and no matter we play around all the time zone setting in General tab or Mail/Calendar tab.  It's not helping.
    Appears to be a bug in IOS 7.  It needs to be reported to Apple.

Maybe you are looking for

  • Really let down by the customer service today.....

    Hey Best Buy, I called the 1888 number but I'm not sure if it will get to corporate or not.  And like others on this board I've read that a lot of corporate members patrol around these boards so I wanted to let everyone know my story here.  Me and th

  • Could not able to show a scalar value in Page Header/Group Header of the re

    Hi, I could not able to show a scalar value in Page Header/Group Header of the report which is returned from Sub-report. But I am able to display it in both Group Footer and Page Footer. I used shared variable in formula filed of both main and sub re

  • MSI X99S Xpower AC Cycles on and Off

    My rig has been stable for the past month (please refer to footer for components) and today it started to just cycle on and off in approximately 5 -10 second intervals.  I downloaded and updated my bios 30 days ago, and it has been very stable.  I al

  • E4200 Drops connection

    Hey guys I'm having a bit of trouble with my e4200,  It keeps on "dropping" connection, and by dropping I mean it constantly around 3-5 minutes the internet stops working with all my computers, it's connected by wifi with 2 PC's, and 1 PC is wired wi

  • Oracle Text indexation problem

    Hello all, we recently migrate one of our database from oracle 10.2.0.2 to an Oracle 10.2.0.4, and since then, Oracle Text indexer engine is unable to work properly. Indexing datas systematically result in the following error : DRG-50857: oracle erro