Have you ever needed dynamically evaluated Java?

It seems every day or so someone asks how to evaluate/execute a piece of Java contained in a String, or evaluate a mathematical expression in a String. I've never needed this, so I'm curious - other than for academic purposes, who has ever needed to do this, and why?

I am sure I have never needed to do that. A language commonly used where I work is IDL (Interactive Data Language, not Interface Definition Language). Since IDL is interpreted, executing or evaluating an expression in a string is easy. Because of this, a lot of the files used to describe our data products had little chunks of IDL code in them. We are in the process of replacing the IDL system with a Java system, so we had to support parsing IDL expressions in Java. The users of our system are mostly scientists and for them it is much easier to put "sqrt(3.0)/2.0" in a configuration file than it is to use "0.866025". Plus, sqrt(3.0)/2.0 is somewhat self-documenting so they would probably whine and cry and complain (as they often do) if we tell them they have to calculate out all the values they use in the configuration files.
Outside of a mathematical context, I have never needed to be able to parse expressions, and I have never needed to be able to parse Java expressions specifically. We are supporting javascript code in our gui interface specification files (XML) to allow for custom event code, but we use rhino for that (GO RHINO!).

Similar Messages

  • I was warned and I went straight to the site and they were gone.  I didnt was any time. Either way, there should be a way to either store or restore such items. Have you ever lost pictures that were so important to you that you couldnt sleep or eat for...

    I was warned and I went straight to the site and they were gone.  I didnt was any time. Either way, there should be a way to either store or restore such items. Have you ever lost pictures that were so important to you that you couldnt sleep or eat for some time. I have and it wasnt fun. I'm glad that you were able to get yours unlike some of us.

    I am still wondering why iTunes tries to confuse me every time I try to make changes in my preferences, telling me that I "don't have enough permissions", although I am the administrator.
    That's clearly a fault. Whether it's an iTunes problem or a Windows problem I can't say at this time. If you search the Using iTunes for Windows forum for "permissions", you should find threads that can help you sort out this problem.
    Then, changes to the format are not obvious, and I get no notice that I am burning music files as data.
    If you click on a playlist and look at the lower-right of the iTunes window, it says right there what format it will use to burn the playlist.

  • Hi,have you ever met such problem- one side of the display a bit lower than another,it is new, what should i do ?

    Hi,have you ever met such problem- one side of the display a bit lower than another,it is new, what should i do ?

    Call Apple Support

  • Windows.old Folders ... Have You Ever Had A Use For Them?

    That you know of. What if the old OS has a virus in it?
    As I've said earlier - nuke it just to be safe.

    Has anyone ever needed the Windows.old folders created when an OS is re-loaded or a different OS is loaded on a machine containing an existing OS?
    Deleting them can free up Gigs of space and I do it when I have had to re-load an OS or have upgraded an existing OS.
    Now, for a secondary question.  I have a machine that has this Windows.old folder that I cannot delete.  I have tried while logging into the machine as the Domain Admin and again as the machine local Admin. Each time I am being told I don't have the sufficient permissions to delete the folder.  I have never had this issue happen before.  The Windows.old folder is on a Windows Server 2012 R2 machine.  Any suggestions as to why this is happening?
    This topic first appeared in the Spiceworks Community

  • Change u201CDefault for baseline dateu201D programming. Have you ever do it?

    Hello colleagues,
    I want to pay to my vendors with the u201CBase line dateu201D equal to the entry date of the treated document.
    For this reason I set several payment-terms with u201CDefault for baseline dateu201D = u201CEntry dateu201D.
    This ran perfectly in FI transactions (fb01, fb05, ...), but the result was wrong with MIRO. I posted a Note to SAP and I was replied with the typical u201CThis is the standard behavior and you would need consulting service for your need.u201D
    Then I decided to change the u201CDefault for baseline dateu201D to u201CNo defaultu201D in these payment-terms, in order to set the value I want with programming. But I have a lot of problems because apparently there isnu2019t a unique point to change in order to get the desired behavior. There are a lot, and in each t-code the called function is different. Have you faced up to a similar case? How did you solve it?
    Thanks in advance.

    We had to program enhacemnet points.

  • Have you ever had video, but no audio in FCP?

    I had a friend digitize footage(as uncompressed 8bit) for me on his mac at work. When I import the clips into FCP there is video, but no audio. Audio does indeed exist because you can here it if the clips are opened in Quicktime. Any ideas on getting the audio to play?
    Thank You Very Much!!!

    Welcome to the forum!
    What codec is the clip? If its a muxed MPEG clip, you'll need to demux/convert it to an editable format prior to importing into your FCP project.
    To find out what codec was used to make the clip, open it in QT and hit Command j, then click on 'Video Track' to see the specs.
    -DH

  • Have you ever been ripped off buy a seller and not get your money back?

    Have you been ripped off by an ebay seller?

    I have been ripped off on an wedding gown. Never got any response from customer service. The seller wanted the gown back but it would have cost more money then what I spent. The dress was a joke..a piece of material with tulle attached. I still havent been reimbursed

  • Have you ever noticed ...

    ... that inexperienced programmers always assume that every operation takes the same amount of time? For example, calling a method and executing a SQL query (and yes, this is a new topic to avoid hurt feelings in another thread)
    In a similar vein: http://steve-yegge.blogspot.com/2008/02/portrait-of-n00b.html
    Although, I'd be interested in Stevie's comments on the article in another 10 years ... imo, he still doesn't seem to understand refactoring.

    cotton.m wrote:
    What I have mainly noticed is that programming and specifically OO programming is a lesson in humility. There is no solution you can write that is so elegant that six months or a year etc later you come back to it and don't think "Well why did I do that? That was kind of dumb". Well maybe not "no solution" but many of them anyway.One needs what they call "beginner's mind" in Zen. Noobs who do poorly in these forums are often defensive and their posts degrade quickly to insults and attacks. For example they may become obsessed with nano-efficiency, demanding to know which is better:
    for(int i=0; i<ub; ++i) //versus
    for(int i=0; i<ub; i++)and won't listen to reason. Or they'll because defensive and refuse to change their code, even when it doesn't even compile, because the problem is "obviously" a bug in Java. They need "beginner's mind", but they are already starting off close-minded.

  • Wrap in bubblewrap if you ever need to use "Warranty" (or how Apple make so much money)

    I have ipad 2 - 9/10 months old - probably my 10th apple product from the ipod/iphone/ipad range.  The £700 64G with 3G model.
    It has developed the "common" (design fault?!) microphone problem where all it records now is crackles.
    Sent off for repair under warranty.
    But guess what there is some cosmetic damage to the dock connector.....oh by the way no it has no affect on the performance when i dock it with anything and you may be asking what has that got to do with the broken microphone.......the answer is nothing however it does allow apple to ensure that they never have to fix anything that is broken (especially when its something that clearly is breaking down left right and centre).
    ha ha and they want £280 from me to fix their broken microphone because CLEARLY I DID NOT READ THE PART THAT SAID NO WEAR AND TEAR OF ANY KIND WILL BE TOLERATED IF SOMETHING YOU PAID A LOT OF MONEY FOR EVER BREAKS DOWN.  SO MY RECOMMENDATION TO EVERYONE ELSE IS BUY AN IPAD, NEVER USE IT, PUT IT IN BUBBLEWRAP SO THAT WHEN IT BREAKS DOWN WITHIN 12 MONTHS THERE IS NO CHANCE THAT IT COULD BE ANY WAY COSMETICALLY DAMAGED SO THAT THEY DONT FIX THE PROBLEM.
    THIS HAS BEEN THE WORSE (AND IT TAKES SOME BEATING) CUSTOMER SERVICE EXPERIENCE I HAD EVER HAD IN MY LIFE. 
    My husband was considering an Ipad 3 - no longer.
    I work for a large financial services organisation currently piloting ipads for business use....suppose they will find this interesting to know as well.
    I reckon the customer service people must hear it all the time because they dont give a s**t at all.
    Anyone recommend an external microphone as there is no way on earth I will be putting any more money in Apple's direction if this is how they treat customers?

    To get to the second question, I use the Vericorder Mini-Mic and am very happy with it so far.
    To answer the second question, I've taken in iOS devices (two phones) with "cosmetic" damage (scuffs, etc) and have not had any problem getting service. I've found their customer service to be excellent.
    I see you're upset - but ALL CAPS is considered to be yelling/screaming in online discussions, and doing so makes it less likely you'll get any support.

  • Lightroom have you ever got a picture name pop up on your screen then another pop up telling you to close lightroom down ? help please !

    I've currently been using been lightroom 3.2 64-bit as my raw manager and official marker for quite a fair few years now, so long I've forgot . .
    I know that lightroom has gone up to 4 and higher but I'm doing fine anyway ...
    today I needed to mark a picture and a problem cropped up ! ...
    first I shutdown the computer and I thought it would just re start from there scratch . .
    but no ..
    I've tried re-install using the actual software disk and that is a no
    I've now got the point where by if I click on the lightroom icon on my desktop it produces  my picture name 3 quarters up the screen ,
    as    " lightroom opening catalog : Flight and Speed, Albefiera , Portugal ,JPG.LRCAT
    than later on below a larger window bordered  "adobe photoshop lightroom 64-bit"
    saying      windows can check online for a solution to the problem.
                 -> check online for a solution and close the program
                 -> close the program
              V view problem details
    Problem signature:
      Problem Event Name: APPCRASH
      Application Name: lightroom.exe
      Application Version: 3.2.0.10
      Application Timestamp: 4c69066d
      Fault Module Name: MSVCR100.dll
      Fault Module Version: 10.0.40219.325
      Fault Module Timestamp: 4df2bcac
      Exception Code: 40000015
      Exception Offset: 00000000000761c9
      OS Version: 6.1.7601.2.1.0.256.1
      Locale ID: 2057
      Additional Information 1: 7ca5
      Additional Information 2: 7ca59d909df4ff9ce7becbdd4d760b48
      Additional Information 3: 223f
      Additional Information 4: 223f678575c9291349fad229d1f7de8b
    Read our privacy statement online:
      http://go.microsoft.com/fwlink/?linkid=104288&clcid=0x0409

    You’ve tried to open a JPG as a catalog and LR can’t do that, but it also doesn’t know what to do, now.
    Try to delete your preferences file, which is where LR remembers what catalogs it’s opened, and then, hopefully, you’ll be able to open your actual catalog, again.  The location of the preferences file for LR3 is here:
    http://helpx.adobe.com/lightroom/kb/preference-file-locations-lighroom-3.html
    I think you got into this situation by dragging-and-dropping a JPG image onto LR’s shortcut.  LR opens catalogs not images, so when you drag-and-drop an image onto LR’s shortcut it tries to open that image as a catalog, and it can’t.
    Newer versions of LR won’t even try to open an image as a catalog, instead of getting stuck like yours is.
    I have some vague memory of your situation not being easy to get out of, so maybe deleting the preferences file won’t actually fix it.

  • Have you ever had Compressor go missing??

    Tried reinstalling FCP and tried the fixes listed re: background process. I cannot get Compressor to open while in FCP. Has this happened to anyone else?

    after I followed the steps detailed in the Apple link, Compressor stopped working altogether.
    That's interesting because if you followed Apple's instructions to the letter and ended with that result it could mean that you have an improper mix of software components on your system. Therefore, somehow you've ended up with a set of software that is not internally consistent. What I mean (by example) is that if component A requires version 1.1 of component B your system may actually have version 1.0 of component B. It's not only the major versions of FCP and Compressor that need to be matched, it's also lots of smaller files and components that make up the entire FCP/Compressor package.
    I suppose that this problem could happen if an installation or update failed, or if someone manually installed or removed a component that was not the correct match to your existing system. Or, it could even be caused by some third piece of software that was installed over your existing setup.
    I can't suggest any way to resolve such a problem (other than with a complete or clean reinstallation of all of your software) and frankly there is no certainty that what I've described is even the cause of your problem (I'm only making a guess at what could be wrong).
    I'd suggest that you look in your console and system logs to see if there are any error messages or warnings that might hint at what could be going wrong. You can view these logs by going to the Apple menu and selecting "About This Mac" and then "More Info..." This will bring up the System Profiler and then under the left-hand column ("Contents") go down to "Software" and select "Logs."
    You will likely find a lot of messages in both of these logs, even some warnings that have nothing to do with your particular problem. Just scan through the information looking for anything that seems related to Compressor, FCP, Qmaster, QuickTime, or any warning about a missing or incompatible component that could be related to the above.

  • Have you ever tried to remove yourself from email notifications?

    It takes 5 clicks and navigating through several menus, it's a joke

    Hi jenseely,
    I apologize, there may be a bit of confusion regarding the iTunes Store. iTunes Store Accounts are a subset of Apple IDs, as noted in these articles:
    Using an existing Apple ID with the iTunes Store, Mac App Store, and iBooks Store - Apple Support
    Set up an Apple ID in iTunes - Apple Support
    It is certainly possible that you may have more than one Apple ID, including one that you have been using just for iTunes Store purposes. If that is the case and you need to change it, you may find the following articles helpful:
    Apple ID: How to find your Apple ID - Apple Support
    Change your Apple ID - Apple Support
    Apple ID: What to do after you change your Apple ID - Apple Support
    Cheers,
    - Brenden

  • Have you ever come across this ?

    Hey there,
    Every time I record a midi region, all the the the regions before are glued together with the one just recorded.....it's GrrrrrREALLY anoying ??
    I've used Logic for years and it's never done this before. Is it a bug or just me seeing things
    Thanks.
    J.

    eDrew,
    You're a star !! It must have switched it self on or something
    Thanks a bunch...
    J.

  • Have you ever order a product from bea shop online?

    I wonder how long does it take to deliver the license file?
    my case, i've ordered since Nov 11 and has not get the email that send me a link to download or serial number yet.
    just new to bea and this community, please forgive me if i'm asking the wrong forum. I've tried to email to customer service but it's failed (due to the return mail to me).
    Best
    Sudarat L.

    You’ve tried to open a JPG as a catalog and LR can’t do that, but it also doesn’t know what to do, now.
    Try to delete your preferences file, which is where LR remembers what catalogs it’s opened, and then, hopefully, you’ll be able to open your actual catalog, again.  The location of the preferences file for LR3 is here:
    http://helpx.adobe.com/lightroom/kb/preference-file-locations-lighroom-3.html
    I think you got into this situation by dragging-and-dropping a JPG image onto LR’s shortcut.  LR opens catalogs not images, so when you drag-and-drop an image onto LR’s shortcut it tries to open that image as a catalog, and it can’t.
    Newer versions of LR won’t even try to open an image as a catalog, instead of getting stuck like yours is.
    I have some vague memory of your situation not being easy to get out of, so maybe deleting the preferences file won’t actually fix it.

  • Have you ever see such error in service desk crmd_order ?

    Start of processing 'Individual receipt'

    Hello Priyanka,
    I have the same problem by using Service Ticket in SAP CRM 5.0.
    Did you already solved this issue? If so, can you please provide the solution!?
    How can I activate and check the transfer log?
    Thanks and regards
    Alex

Maybe you are looking for

  • OIM 10g : SQL Script to Delete or Cancel process instance tasks for user resources

    Hello, I have users with a resource with a process instance that have a large number (1000) of task instance related to reconciliations (Reconciliation Update Received). And when trying to revoke this resource, OIM take a long time to perfom this job

  • I am a Senior Dummy, can I get HELP?

    I have 6 Facebook accounts that need to be deleted. I can't do it! They have spam. I have iPad 2 iOS7.1.

  • Password Protect my DVD-rom on Powerbook

    Is there any way to password protect my dvd burner? I don't want people hopping on my laptop and burning cd's when i'm not around. Any suggestions? Is there anyway to password protect ANY applications??? SDMac Powerbook G4   Mac OS X (10.4.4)  

  • To re-write query using 'ANY' operator

    Hi, How to write the given query using 'ANY ' operator , I dont need to fetch to grade_master table twice in database, just need to fetch within the result set. SELECT dsg_code,dsg_name,dsg_grade FROM designation_master WHERE dsg_orgn='&&Orgn' and ds

  • Lost active desktop

    been having problems with leopard after installation (3X)...unable to mount dmg's..can't drag and drop onto desktop...can't create new folders on desktop, (get 8058 error which i looked up in the knowledge base but it only refers to this under 10.4),