Anybody know of a method to convert a timestamp to a Nanosec equivalent?

Does anybody know of a method to convert a timestamp object to a nanosecond equivalent since 1970?
Thanks

By a timestamp object you mean an instance of the class java.sql.Timestamp, right? Then the following will give you the nanoseconds:
long nanos = stamp.getTime()*1000000 + stamp.getNanos();

Similar Messages

  • Anybody know a good program to convert files to MP4?

    I'd prefer a free one, but if it isn't out there, then not I gues.
    Asus   Windows XP  

    go to imtoo.com, and download the imTOO MPEG to iPod Converter
    or try videora, at videora.com

  • I am on holiday and have wifi in my room but I can't use iMessage. Does anybody know why it's not working?, I am on holiday and have wifi in my room but I can't use iMessage. Does anybody know why it's not working?

    I am on holiday and have wifi in my room but I can't use iMessage on my iPad does anybody know why????

    Hi,
    "But it didn't work it's just turning them to black gray scale colors not what i was thinking about."
    If you want it to be colored, you'll need to create a color-palette for the 8bppIndexed bitmaps. The keyword for this process is "Color-Quantization".
    The whole yellow-green pie you get is from the wrong format. If you convert the 32bpp bitmaps to 24 bpp bitmaps, you loose the alpha channel ("transparency"). You can manually set one color to "transparent" with the mMakeTransparent-method
    of the Bitmap class, or simply use gif-images (they are 8bpp with a transparent "key"-color)
    Regards,
      Thorsten

  • Does anybody know how to change the title of your podcast on iTunes and the description of it?

    I was working on my feed site and when the podcast popped up on iTunes I realized that I put the wrong info and title on it. Anybody know?

    You change the title and descriptions by entering the changed versions in wherever you originally entered the items in whatever system you are using to create your feed, then re-publish the feed; it will take the iTunes Store a couple of days or so to catch up.
    However, if the method you are using to create your feed is one of those which uses the title of the podcast as part of the URL, and this changes if you change the title, then if you change the URL as a result the iTunes Store will lose contact with it and fail to update in future: so be careful about this.

  • Anybody know how to get the clock working properly!

    :x The stupid dumb blankety blank clock won't stabilize. Every time I reboot it changes.  A petty little problem, but I bet somebody knows how to fix it.
        In rc.conf I have hardwareclock set to "localtime" and timezone set to EST. In kde if I open Adjust Date & Time it's set to utc? Should I change rc.conf to UTC?? I just tried to adjust the clock and it would'nt
    adjust at all. Anybody know how to fix this? -- Thanks  - Larry
    I changed timezone to America/NewYork, instead of EST, they're both listed in usr/share/zoneinfo, and then left the fields in the Adjust Date & Time blank. It seems to be working, but what is the correct method?

    I have come to love htpd from freshmeat. Instead of accessing a timeserver it uses any old website. My clock is 3 seconds out on boot and it adjusts for that immediately then it checks every 12 hours. That may not suit everybody and those people would probably choose adjtime which calculates a slew rate and then brings your clock into synch with whatever atomic timeserver you nominate. However htpd is simple and it works. I use my ISP port 80.

  • Does anybody know if and when there will be a plug in for raw files from the Nikon D810? I have lightroom 4

    I am considering buying a Nikon D810 but I do not want to be waiting for ages for a plug in for it's RAW files on my Lightroom 4. Does anybody know if and when there will be a plug in? I presume the 8.5 plug in will not cover the cameras Raw file.

    There is no plug-in for Lightroom 4 that would ever give you support for the new camera. Lightroom does not use Camera Raw. Camera Raw is a plug-in for Photoshop and Photoshop Elements. If you want support for your camera in Lightroom you will need to upgrade to Lightroom 5, and then wait for the 5.6 update which should be available within next few weeks (unless Lightroom 6 is introduced). In the meantime you can use the DNG converter (version 8.6 RC) to create DNG copies of your raw images that you would be able to open in Lightroom 4.

  • How can i know in which method i am?

    I would like to know ( for debugging reasons ) in which Method the execution code is!
    Like the printStackTrace() which indicates:
    - package
    - class
    - method
    - line
    at mypackage.myclass.mymethod4(MyClass.java:40)
    at mypackage.myclass.mymethod3(MyClass.java:30)
    at mypackage.myclass.mymethod2(MyClass.java:20)
    at mypackage.myclass.mymethod1(MyClass.java:10)
    at java.lang.Thread.run(Thread.java:484)
    Does anybody knows how to do this?
    Bye
    Emiliano

    This will return the calling class.method() of a class.
    public static String getCallingClassMethod() {
         try {
              Exception e = new Exception();
              // make a buffer to store the stack trace       
              java.io.ByteArrayOutputStream buffer = new java.io.ByteArrayOutputStream();
              java.io.PrintStream stackInfo = new java.io.PrintStream(buffer);
              e.printStackTrace(stackInfo);
              // create the tokenizer to get each line       
              java.util.StringTokenizer stackInfoParser =
                   new java.util.StringTokenizer(buffer.toString(), "\n");
              int n = 4;
              // *nix system only need 4 tokens windows has 2 extra
              if (System.getProperty("os.name").startsWith("Windows"))
                   n = 6;
              // loop through all the crap that comes before our calling method
              for (int i = 1; i < n ; i++){
                   stackInfoParser.nextToken();
              // get our calling class.method
              String returnString = stackInfoParser.nextToken().trim();
              // get rid of the garbage
              returnString = returnString.substring(returnString.indexOf(" ") + 1,
                   returnString.indexOf("("));
              return returnString;
         } catch (Exception e) {
         return "";
    }

  • I am testing a Sony a7r, shooting RAW.  I can't seem to import the files (which are .awr) into my Lightroom 4. Anybody know what options I have?  Thanks!

    I am testing a Sony a7r, shooting RAW.  I can't seem to import the files (which are .awr) into my Lightroom 4. Anybody know what options I have?  Thanks!

    Support was added by Adobe for this camera model in LR 5.3 and ACR 8.3. see the link below.
    Camera Raw plug-in | Supported cameras
    You can download the latest trial version of LR 5 the current version is 5.7.1 and use tor 30 days.
    The other option is to download the latest Adobe DNG Converter (version 8.7.1) for free and convert the Sony .arw files to dng format and they will work fine with LR 4.
    Make sure you retain the original copies of the .arw files.  

  • Do anybody know how to read file...

    Hello,
    I have a problem with reading config file. Do anybody know how to read config file from the same dir as class.
    Now the situation is like:
    filePath I hardcoded like:
    fileName = "C:\\apache-tomcat-5.5.17\\webapps\\ROOT\\WEB-INF\\classes\\config.sales";
    Is it possibility to read config file wich is used by java classes (in prj) from the same dir as classes are?
    Thanks in advance.

    If the file is in the class path you should be able to access it using the Class.getResourceAsStream method. It is the same concept as loading a properties file:
    http://www.javaworld.com/javaqa/2003-08/01-qa-0808-property_p.html

  • There used to be a extension for Safari called "close all tabs". It is no longer on the extension list. Does anybody know why it was removed?

    There used to be a extension for Safari called "close all tabs". It is no longer on the extension list. Does anybody know why it was removed?

    Mr. Davis answer is essentially what that extension did.  I thank Mr. Davis for this answer as I was not aware of this method.  I only brought this up becasue in Lion there is a nasty habit of Safari opening all previous tabs that where not closed when shuting down the computer.  This can cause a long delay in opening Safari becasue of all the tabs opening up.  The "close all tabs" exstension stopped all this opening process.  I have to assume that Apple replaced the extension with the process that Mr. Davis describes, however, the extension was a lot faster. By the way, I have this extension still and I still use it. I just wanted to pass it on to some other users, but guess I will have to give up on that idea.

  • Is there any native method for converting String value to Hungarian notat..

    Hello. there.
    This might be very simple question. but I'm just curious about this.
    I am wondering if Java API offer the any native method for converting uppercased string value to lowercase which obey the Hungarian notation.
    What I'm going to do is using Reflection for excuting RFC function on SAP. I was found it is very similar to JDBC Programming.
    Please refer to blow codes.
    //mTable
    JCoTable mTable = function.getTableParameterList().getTable(rtnTblNm);
        for (int i = 0; i < mTable.getNumRows(); i++) {
         mTable.setRow(i);
         HashMap tmpData = new HashMap ();
              for (int j=0; j < mTable.getNumColumns(); j++) {
                     // I want to set key String [userNo] instead of  [USER_NO] here.
              tmpData.put(mTable.getMetaData().getName(j).toLowerCase(), mTable.getString(j));
              result.add(tmpData);
    } Basically, The idea was from ibatis framework [com.ibatis.common.beans.classInfo] dropcase();
    Any idea would be very helpful for me. Thank you.
    Edited by: hosung.seo on Aug 30, 2009 10:42 PM
    Edited by: hosung.seo on Aug 30, 2009 10:50 PM

    ejp wrote:
    Hungarian notation is a representation of logical/arithmetic expressions in postfix form. Not what you're talking about.
    So your title is very confusing to the people here who know what it means, which is probably all of them, because people read threads based on their title.From now on, I will pay more attention when I post an question.
    If the titile as " +Is there any native method for converting String value to camelcase?"+ would be easier to what i'm pointing at.
    As I mentioned in above sorce code, converting [USER_NO] to [userNo] isn't relevant Hungarian notation. yes, it was ambiguous. Agree! :)
    But some answer wasn't fit to converting case or recognizing "underscore" delimiter. I was expecting toCamelCase() such as blew. Thanks.
        public static String toCamelCase(String name) {
            String lowerName = name.toLowerCase();
            String[] pieces = lowerName.split("_");
            if (pieces.length == 1) {
                return lowerName;
            StringBuffer result = new StringBuffer(pieces[0]);
            for (int i = 1; i < pieces.length; i++) {
                result.append(Character.toUpperCase(pieces.charAt(0)));
    result.append(pieces[i].substring(1));
    return result.toString();

  • I am having problems importing some CDs into iTunes on a laptop with Windows 8. Most CDs import without problem. The ones I can't import can be imported into iTunes with Windows 7. Does anybody know why this problem is occurring?

    I am having problems importing some CDs into iTunes on a laptop with Windows 8. Most CDs import without problem. The ones I can't import can be imported into iTunes with Windows 7. Does anybody know why this problem is occurring?

    First-off, this seems to be a general problem with 10.4 (across all the operating systems of which I am aware).  Unfortunately, I cannot provide a permanent solution but, if you need a quick fix, this will (hopefully) work for you.
    For some inexplicable reason, iTunes no longer recognises standard Windows paths.  For example:
    Y:\Music\Buddy Holly\Buddy Holly - Rave On.mp3
    The end result is that it will import a playlist with no content. 
    It will, however, recognise the equivalent Apple paths which look like this:
    file://localhost/Y:/Buddy Holly/Buddy Holly - Rave On.mp3
    It is possible to convert your existing playlists using a few basic replace commands in something like Notepad.  In my case, I made some code changes in my music manager and now generate two sets of playslists (one standard and one to accommodate iTunes).
    Forgive me foir stating the obvious but please remember to make sure that the disk / path containing your music is accessible when doing the import otherwise you will probably get a blank result.  Note that you can do a bulk import by selecting all the (revised) playlists and dragging them onto the iTunes sidebar.
    I am sorry that this is not a "clean" solution but it will work if you are in a bind.  The only alternative of which I am aware is to wait for Apple to fix the problem.

  • I have produced DVD using iMovie, now want to download this back to iMovie, will not read DVD, have been told a piece of software available - any chance anybody knows what?

    have produced DVD using iMovie, now want to download this back to iMovie, will not read DVD, have been told a piece of software available - any chance anybody knows what?

    Handbrake is not ideal for this.
    You need to convert the VOB files in the TS-Folder of the DVD back to DV which iMovie is designed to handle. For that you need mpegStreamclip:
    http://www.squared5.com/svideo/mpeg-streamclip-mac.html
    which is free, but you must also have the  Apple mpeg2 plugin :
    http://www.apple.com/quicktime/mpeg2/
    (unless you are running Lion in which case see below))
    which is a mere $20.
    Another possibility is to use DVDxDV:
    http://www.dvdxdv.com/NewFolderLookSite/Products/DVDxDV.overview.htm
    which costs $25.
    For the benefit of others who may read this thread:
    Obviously the foregoing only applies to DVDs you have made yourself, or other home-made DVDs that have been given to you. It will NOT work on copy-protected commercial DVDs, which in any case would be illegal.
    If you are running Lion:
    From the MPEG Streamclip homepage
    The installer of the MPEG-2 Playback Component may refuse to install the component in Lion. Apple states the component is unnecessary in Lion, however MPEG Streamclip still needs it.
    To install the component in Lion, please download MPEG Streamclip 1.9.3b7 beta above; inside the disk image you will find the Utility MPEG2 Component Lion: use it to install the MPEG-2 Playback Component in Lion. The original installer's disk image (QuickTimeMPEG2.dmg) is required.
    The current versions of MPEG Streamclip cannot take advantage of the built-in MPEG-2 functionality of Lion. For MPEG-2 files you still need to install the QuickTime MPEG-2 Playback Component, which is not preinstalled in Lion. You don't have to install QuickTime 7.

  • Anybody know what is prefsrbs1.plist?

    Drive genius says "The preference file at '/Users/gds/Library/Preferences/prefsrbs1.plist' may be corrupted. Corrupted files can cause application crashes and should be moved to the Trash."
    I go to that location and can't find the file to delete it. Anybody know what it is? Or how to find it? Tried Spotlight and manual search in the location described. Nothing!

    How to maintain a Mac
    1. Make redundant backups, keeping at least one off site at all times. One backup is not enough. Don’t back up your backups; make them independent of each other. Don’t rely completely on any single backup method, such as Time Machine. If you get an indication that a backup has failed, don't ignore it.
    2. Keep your software up to date. In the Software Update preference pane, you can configure automatic notifications of updates to OS X and other Mac App Store products. Some third-party applications from other sources have a similar feature, if you don’t mind letting them phone home. Otherwise you have to check yourself on a regular basis. This is especially important for complex software that modifies the operating system, such as device drivers. Before installing any Apple update, you must check that all such modifications that you use are compatible.
    3. Don't install crapware, such as “themes,” "haxies," “add-ons,” “toolbars,” “enhancers," “optimizers,” “accelerators,” "boosters," “extenders,” “cleaners,” "doctors," "tune-ups," “defragmenters,” “firewalls,” "barriers," “guardians,” “defenders,” “protectors,” most “plugins,” commercial "virus scanners,” "disk tools," or "utilities." With very few exceptions, this stuff is useless, or worse than useless.
    The more actively promoted the product, the more likely it is to be garbage. The most extreme example is the “MacKeeper” scam.
    As a rule, the only software you should install is that which directly enables you to do the things you use a computer for — such as creating, communicating, and playing — and does not modify the way other software works. Use your computer; don't fuss with it.
    Never install any third-party software unless you know how to uninstall it. Otherwise you may create problems that are very hard to solve.
    The free anti-malware application ClamXav is not crap, and although it’s not routinely needed, it may be useful in some environments, such as a mixed Mac-Windows enterprise network.
    4. Beware of trojans. A trojan is malicious software (“malware”) that the user is duped into installing voluntarily. Such attacks were rare on the Mac platform until sometime in 2011, but are now increasingly common, and increasingly dangerous.
    There is some built-in protection against downloading malware, but you can’t rely on it — the attackers are always at least one day ahead of the defense. You can’t rely on third-party protection either. What you can rely on is common-sense awareness — not paranoia, which only makes you more vulnerable.
    Never install software from an untrustworthy or unknown source. If in doubt, do some research. Any website that prompts you to install a “codec” or “plugin” that comes from the same site, or an unknown site, is untrustworthy. Software with a corporate brand, such as Adobe Flash Player, must be acquired directly from the developer. No intermediary is acceptable, and don’t trust links unless you know how to parse them. Any file that is automatically downloaded from a web page without your having requested it should go straight into the Trash. A website that claims you have a “virus,” or that anything else is wrong with your computer, is rogue.
    In OS X 10.7.5 or later, downloaded applications and Installer packages that have not been digitally signed by a developer registered with Apple are blocked from loading by default. The block can be overridden, but think carefully before you do so.
    Because of recurring security issues in Java, it’s best to disable it in your web browsers, if it’s installed. Few websites have Java content nowadays, so you won’t be missing much. This action is mandatory if you’re running any version of OS X older than 10.6.8 with the latest Java update. Note: Java has nothing to do with JavaScript, despite the similar names. Don't install Java unless you're sure you need it. Most people don't.
    5. Don't fill up your boot volume. A common mistake is adding more and more large files to your home folder until you start to get warnings that you're out of space, which may be followed in short order by a boot failure. This is more prone to happen on the newer Macs that come with an internal SSD instead of the traditional hard drive. The drive can be very nearly full before you become aware of the problem. While it's not true that you should or must keep any particular percentage of space free, you should monitor your storage consumption and make sure you're not in immediate danger of using it up. According to Apple documentation, you need at least 9 GB of free space on the startup volume for normal operation.
    If storage space is running low, use a tool such as the free application OmniDiskSweeper to explore your volume and find out what's taking up the most space. Move rarely-used large files to secondary storage.
    6. Relax, don’t do it. Besides the above, no routine maintenance is necessary or beneficial for the vast majority of users; specifically not “cleaning caches,” “zapping the PRAM,” "resetting the SMC," “rebuilding the directory,” "defragmenting the drive," “running periodic scripts,” “dumping logs,” "deleting temp files," “scanning for viruses,” "purging memory," "checking for bad blocks," "testing the hardware," or “repairing permissions.” Such measures are either completely pointless or are useful only for solving problems, not for prevention.
    The very height of futility is running an expensive third-party application called “Disk Warrior” when nothing is wrong, or even when something is wrong and you have backups, which you must have. Disk Warrior is a data-salvage tool, not a maintenance tool, and you will never need it if your backups are adequate. Don’t waste money on it or anything like it.

  • Anybody have luck getting .TIVO files converted to .MP4?

    Anybody have luck getting .TIVO files converted to .MP4?
    Spent the weekend trying but was unable to get a good conversion.
    Anybody have knowledge on this (for Windows PC)?
    Videora doesn't work (unless you know some tweak I have to do)

    Sorry that info is quite out dated... While yes I can get the MPG-2 file out with the direct dump, the res Tivo uses it modified and still requires their codec to decode. While I have converters that say they can convert .TIVO files and they do, they all end up with the compresses image because of how Tivo altered the encoding. Hence me coming here asking about NEW info with todays software.

Maybe you are looking for

  • What cables do I need to connect MacBook Pro to the TV VGA port

    Nov 6, 2014 7:01 PM Hi, The HDMI port on my Maxent tv is not working.  I am hoping to connect my MacBook Pro to the TV via the VGA port on the TV to watch Netflix and movies.  What cables do I need that will connect to a VGA port on a TV from my MacB

  • Multiple from e-mailaddresses /  one account / iphone configuration utility

    I trie to configure my e-mail account on my iphone. This works fine, when there is one e-mailaddress per account. But when I want to configure it to have multiple from-e-mailaddresses aka aliases I can choose to sent my mail from, there I stuck. What

  • Best practice to install Bi-Java

    Hi, We are in the process of designing the system landscape for our client. We have installed NW04s usage type EP on one server. Now we need to decide on where to install the BI-Java usage type. So: 1. Is adding BI-Java on the existing EP usage type

  • RATE limit RATE limit RATE limit RATE limit

    Dear, I have tried using RADIUS server to apply rate-limit to my ADSL coustomers using : rate-limit output access-group 101 1024000 6000 512000 conform-action transmit exceed-action drop i applied this at raduis server at my output interface but i do

  • Remove 0 Value in Calculated Field

    I copied the below question for another post here as it asks the question perfectly. "I set up an invoice form to calculate totals from quantity x unit price. Every line has this formula, however the users may not have a priced item on every line of