Is there any scripting library?or a way to evaluate mathimatical strings?

by evaluating strings i mean things of the type
evaluate("5+3-2+sin(5)") should return some value, i know that in other languages, you will find libraries that define some scriptengine that can evaluate such strings, is this available in java aswell? 'Cause after searching i only found one for JavaScript, which is not what i'm looking for.
It doesn't even have to be a scriptengine, just some sort of way i can use to, given some sort of mathematical string (with functions like sinus,POW,...) to evaluate it, it doesn't have to be able to recognise variables in it, but it would help but i'd be happy with just some library or anything that can implement this.
Edited by: omegax on Apr 9, 2009 1:52 AM
Edited by: omegax on Apr 9, 2009 1:53 AM

omegax wrote:
by evaluating strings i mean things of the type
evaluate("5+3-2+sin(5)") should return some value, i know that in other languages, you will find libraries that define some scriptengine that can evaluate such strings, is this available in java aswell? 'Cause after searching i only found one for JavaScript, which is not what i'm looking for.The example you posted can be handled by the JavaScript engine shipped with Java 1.6 (although you'll have to change sin(...) to Math.sin(...)):
ScriptEngine engine = new ScriptEngineManager().getEngineByExtension("js");
System.out.println(engine.eval("Math.sin(45)"));

Similar Messages

  • Is there any java library like MSDN

    is there any java library like MSDN ? probabily you will say java docs .....but java doc dont show any example code.
    MSDN gives syntax+example code almost everything.
    java docs gives the syntax ....but they dont carry example codes. I have downloaded java docs.
    what you people use ? is there any other better thing ?is there any java library which carry example code along with syntax?
    plz share your experience
    thanks

    is there any java library like MSDN ? probabily you
    will say java docs .....but java doc dont
    show any example code.For TONS of examples try here
    It also has very detailed explanations with these examples as to why they work (or don't work, if that's the case).

  • Is there any script to restart the workflow services

    Hi
    Is there any script to restate the workflow services in 11i and R12
    Regards

    Hi,
    Please see (Note: 743264.1 - How to Stop/Start Workflow Service Containers From Command Line).
    Regards,
    Hussein

  • Is there any script to scrabble the salary information in oracle apps HCM.

    Hi,
    Is there any script to scrabble the salary information in oracle apps HCM.
    regards
    Edited by: Maya on Feb 12, 2013 11:43 PM

    Hi Maya,
    We've used a tool called Data Masker (http://www.datamasker.com/) to mask our entire eBusiness Suite database in order to make the environment suitable for training and offshore development (financials, hcm, iproc, etc) - there's an evaluation copy of the website if you want to give that a go, in the background it's just using SQL scripts to manipulate the data.
    If you just wanted to scrabble the Salary information (grades & spinal points / salary?) a couple of API's would probably be sufficient (HR_ASSIGNMENT_API.update_emp_asg_criteria, HR_SP_PLACEMENT_API.update_spp), or if you're not concerned with keeping the instance supported by Oracle then a few direct table updates to fiddle the information around (PER_PAY_PROPOSALS, PER_SPINAL_POINT_PLACEMENTS_F, etc).
    Regards, Jay

  • Is there any script or batch program that can pick a xml file...

    Hi,
    Is there any script or batch program that can pick a .xml file from a folder and place it in a different folder on the same directory periodically without using an XI interface.
    Thanks,
    np

    Hi Nadini,
    Please refer below link for how to sechdule a batch file.
    [Schedule Batch File-How to?|http://www.tech-archive.net/Archive/WinXP/microsoft.public.windowsxp.general/2006-04/msg01349.html]
    And please refer below links for how to write a batch file and other one as batch file commands.
    http://www.wikihow.com/Write-a-Batch-File
    http://www.aumha.org/a/batches.php
    these two links was a click away in google :).
    regards
    Aashish Sinha

  • Is there any script to archive the HFM logs?

    Currently, we are manually archiving the HFM logs from the servers. Is there any automated way (i.e. any script for this process)?

    Please confirm what log you are talking about :
    - HsvEventLog.log
    - HFM Application specific Task Audit log stored in HFM database? (<APP_NAME>TASKAUDIT)
    - HFM Error Log stored in HFM database? (HFM_ERRORLOG)
    - Windows event logs referring to Hyperion/hfm?
    For the database tables, you could create SQL (or oracle) jobs to copy the data to a different table, or export it somewhere.
    For the file(s) such as HsvEventLog.log file, you could create a windows scheduled task or cron job on unix to move the files somewhere.
    For the Windows event log, I believe you could create a job to export log data, but I've never bothered with this log since most of the info you will find here is also in the error log from HFM.

  • Are there any scripts to change all Caps locked items to bold?

    I'm new to this program...like, 5 minutes in to using it. I make typesetted catalogs, where there are 850 or so "lots," that all have Caps locked titles. These titles also have to be in all bold. Is there any easy to take my existing text, & make it bold (like a Find/Change)?

    I presume you mean the text was typed in with the caps lock key on so it is all uppercase. There are a number of ways to do this, but which to use depends on waht you have. Do these headings have a style assigned to them? They should, and if they do all you need to do is edit the style definition to use Bold. If not you can do it with Find/Change and GREP, but we need to know if there is any punctuation and whether there is any other text inthe same paragraph, or if the titles stand alone. A screen capture would help, (and take it with non-printing characters visible, please). You can embed it in a post using the camera icon on the web page like this:

  • Is there any Scripting tool available?

    Hi,
    I am brand new to Web AS and wondering is there any command line scripting tool available within Web AS? For example, something similar to BEA's WebLogic Scripting Tool (WLST) that is based on Jython or IBM’s WebSphere Administrative (wsadmin) that is based on Jacl and Jython.
    Any input/comments/pointers are much appreciated.

    http://bivald.com/lessons-learned/2007/08/flash-media-server-ide.html
    or  if above link fails, try this
    http://www.igorcosta.org/?p=151
    Yes, I believe you can use any text editor, including a javascript editors to write serverside AS, but may not get intellisense in most of those editors while coding.
    check the above links for a development IDE with intellisense enjoy
    Mohamed D. Sankoh
    Calgary
    Alberta, Canada

  • FWSM - Is there any script to analyze syslog and/or optimize rules?

    Hi,
    is there any program/script that optimize FWSM rules?
    For example:
    - check all the objects that are not being used
    - check rules that have no use or impact (can be remove because there is another permit rule that is already doing the job)
    - etc...
    Is there any program/script that analyzes FWSM syslog information and generates reports about all the traffic that has been denied or allowed? For example:
    - To many DNS check that comes from a specific host
    - To many ping denial from a specific source (ddos)
    - etc...
    Thanks,

    This will give you % free per tablespace
    SELECT files.tablespace_name Tablespace,round(files.sze/1024/1024) "Size",
    round(free.free/1024/1024) "Free", round((free.free/files.sze) * 100) "Pct Free"
    FROM
    (SELECT tablespace_name, sum(bytes) sze FROM dba_data_files
    GROUP BY tablespace_name) files,
    (SELECT tablespace_name,sum(bytes) free FROM dba_free_space
    GROUP BY tablespace_name) free
    WHERE files.tablespace_name=free.tablespace_name

  • Is there any Java library that can invoke access point functions?

    Hi, Is there a Java Library that enables programs to access access point and run their functions?
    I want to create sample code that invokes functions of access points such as signal strength e.t.c.
    My ambition is to create a model that can identify the position of wareless devices such as PDA in a wireless LAN

    Thanks for your reply, sorry I have not gotten back sooner. I'm still having the problem.
    All the access points have the same SSID. I did try deleting the network and rejoining, however, I don't think it properly "forgot" all the settings when I did that. I haven't yet taken the time to try to delete the network more thoroughly. I'm still turning off airport, carrying the laptop to within a few feet of the access point I want to join, and turning airport back on, on an almost daily basis.

  • Are there any security risks in two-way trusts?

    Hello!
    Can anybody enumerate security risks two-way trusts have? Security holes?
    I mean two-way trusts between two domains from different forests Windows 2003\2008.
    Thank you for any info.

    Hi,
    There are two potential threats to interforest trust relationships in Windows Server 2003 :
    1: Attack on trusting forest by malicious user in a trusted forest :
    A malicious user with administrative credentials who is located in a trusted forest could monitor network authentication requests from the trusting forest to obtain the security ID (SID) information of a user who has full access to resources in the trusting
    forest, such as a Domain or Enterprise Administrator. SID filtering is set on all trusts by default to help prevent malicious users from succeeding with this form of attack
    2: Attack on shared resources in a trusting forest by malicious users in another organization’s forest :
    Creating an external or forest trust between two forests essentially provides a pathway for authentications to travel from the trusted forest to the trusting forest. While this action by itself does not necessarily create a threat to either forest, because
    it allows all secured communications to occur over the pathway, it creates a larger surface of attack for any malicious user located in a trusted forest. Selective authentication can be set on interforest trusts to help minimize this attack surface area.
    For more info , Please refer :
    http://technet.microsoft.com/en-us/library/cc755321(v=ws.10).aspx
    Though the forest mentioned is on win 2003, this article applies to Win 2008,2008R2 forest environment as well.
    Please revert in case of any queries
    pankaj(MCT)

  • Is there any oauth2 library exist for ColdFusion 11?

    I have designed a Restful component using Coldfusion 11. Now I need to think of securing this REST service.After searching for sometime
    I found HTTPS + oauth2 is the best combination for securing REST service.
    In the official OAuth 2.0 — OAuth page,  We have libraries for different languages. But there is nothing listed for ColdFusion.
    Any one having any kind of knowledge if we have a library for oauth2 in ColdFusion?
    Can I depend upon some Java library ? If yes , any library suggestion?

    Here is an example.  Of course the conversion rules must be set up in the materail master for that material.
    report zrich_0002.
    data: input type p decimals 3 value '10.000'.
    data: begin of xtmp,
          menge type mseg-menge,
          meins type mseg-meins,
          end of xtmp.
    data: imara like mara.
    * Get base UOM
    select single * from mara into imara
                where matnr = '000000000040006541'.
    * The uoms must be of the internal format, check against T006a
    * do conversion
    call function 'MATERIAL_UNIT_CONVERSION'
         exporting
              input                = input
              matnr                = imara-matnr
              meins                = 'GLL'  " Must be internal
              meinh                = 'OZA'  " Must be internal
         importing
              meins                = xtmp-meins
              output               = xtmp-menge
         exceptions
              conversion_not_found = 01
              input_invalid        = 02
              material_not_found   = 03
              meinh_not_found      = 04
              meins_missing        = 05
              no_meinh             = 06
              output_invalid       = 07
              overflow             = 08.
    check sy-subrc  = 0.
    Regards,
    Rich Heilman

  • Is there any script available to fetch the logged in time of all users in a computer for a month?

    Hi,
      I have been searching for a script ,that fetch the logged in time of all the users in a particular computer for a month.I couldnt find anything.
    Thanks in advance for quick response.
    Thanks and regards..
    Midhun P s

    Hi,
    I suggest looking here:
    http://gallery.technet.microsoft.com/scriptcenter
    It's highly unlikely that you'll find something pre-written that will meet all of your requirements, but there should be enough in the repository to give you a starting point.
    EDIT: If you're looking for someone to do all the work for you, you can try posting a request here:
    http://gallery.technet.microsoft.com/scriptcenter/site/requests
    I have no idea if anyone ever goes through these requests though (I know I don't).
    Don't retire TechNet! -
    (Don't give up yet - 12,700+ strong and growing)

  • Is there any script in S1AS which generates Web services from ejbs in jar?

    I'm porting a J2EE app from WebLogic to S1AS7. The ISV uses Ant/XDoclet to do some code generation and build. One of targets in the build scripts is to take as input an EJB JAR file and create all the needed web service components and package them into a deployable EAR file using WebLogic's servicegen Ant task
    (http://edocs.bea.com/wls/docs81/webserv/assemble.html#1052126).
    Is there anything similar in S1AS?
    A quick response is greatly appreciated.
    Thanks
    Kishore

    We had looked into doing something similar, and this post is the closest we found.
    https://community.qualys.com/thread/11816
    Basically you will need a middle-man between Qualys and ConfigMgr to house the data. This may be a new database, or a whole seperate platform. I expect this could easily be done with SQL and SSRS.
    Also note, database edits to the ConfigMgr database are
    not supported  by Microsoft, I would recommend using a central system to pull data from Qualys and ConfigMgr without modifying either.
    Daniel Ratliff | http://www.PotentEngineer.com

  • Firefox 3.6 is using a conditional stylesheet that I created only for IE6. Is there any script available to fix this? Thanks

    I am creating a website and I create stylesheets for the look and feel of the website. Because of conflicting browser engines I have to create a separate stylesheet for versions of Internet Explorer.
    I have noticed that FF 3.6 is using the conditional stylesheet I created only for IE6. Please help, this is not happening in later versions of FF or any other browsers.
    Thanks

    There are solutions for those interface issues, but to address your question about keeping the old version, make sure your auto-update is set to ask you before updating you.
    Tools > Options > Advanced > Update mini-tab
    http://support.mozilla.com/en-US/kb/Updating%20Firefox#w_configuring-update-options

Maybe you are looking for