Re: Callout to Pascal

Steve,
The main difference in this area between C and Pascal is the
calling conventions for passing parameters and return values to/from
functions/methods. One pushes parameters on the stack left to right,
while the other pushes parameters right to left. C requires the callee
to clean the stack, while in Pascal the caller to clean the stack.
Forte can wrapper external routines that provide a C interface. If
you have some pascal code you want to call, just define a C wrapper
that calls that Pascal code. In your C wrapper, you would define
a prototype for your external Pascal routine using the pascal keyword
in C, which tells C that when it calls the routine, it should use
Pascal calling conventions. Here's a snippet:
myfile.c
/* The prototype for the Pascal routine. */
extern pascal short MyPascalRoutine();
short MyWrapper()
return MyPascalRoutine();
Hope this helps.
Bobby
At 5:57 PM 6/23/96, "Steve Isaac" (Tel 002 305161) wrote:
Hello all,
I wish to callout to Pascal, passing no parameters but getting one 2-character
value back. Can anyone tell me what differences there are in calling out to
Pascal rather than C from Forte?
Any assistance would be greatly appreciated.
Regards,
Steve Isaac
Hydro-Electric Commission
Tasmania

To get an overall understanding of launchd you should read the following:
Creating Launch Daemons and Agents
To understand the various fields that can go into a launchd plist see,
launchd.plist (5) [man page]
And as previously mentioned Lingon can provide a GUI to allow you to create a launchd plist.

Similar Messages

  • Callout to Pascal

    Hello all,
    I wish to callout to Pascal, passing no parameters but getting one 2-character
    value back. Can anyone tell me what differences there are in calling out to
    Pascal rather than C from Forte?
    Any assistance would be greatly appreciated.
    Regards,
    Steve Isaac
    Hydro-Electric Commission
    Tasmania

    To get an overall understanding of launchd you should read the following:
    Creating Launch Daemons and Agents
    To understand the various fields that can go into a launchd plist see,
    launchd.plist (5) [man page]
    And as previously mentioned Lingon can provide a GUI to allow you to create a launchd plist.

  • Simple pascal's triangle problem

    Hi,
    I'm new to Java, and I'm trying to make a recursive method that outputs a pascal's triangle, n = 4. based on the choose function: (n,k) =(n-1, k-1) + (n-1,k). I believe there are a lot of errors in my source code, which compiles, but I just can't figure out what I need to do next to get it to actually display the pascal triangle, based on what I have so far. could anyone give me some directions as to how to think through the problem. here's my source code:
    public class pascal
         public int choose (int n, int k)
              int result = 0;
              if (n==0 && k==0)
                   result = 1; \\base case
              else
                   for (int i=0; i<=k; i++)
                        if(i==0 || i==k)
                             result = 1;
                        else
                        result = choose(n-1,i-1) + choose(n-1,i);
              System.out.print(result);
              return result;
         public static void main (String[] args)
              int n = 4;
              int k = n;
              pascal test = new pascal();
              test.choose (n,k);
    }

    Think of this little recurrence relation a bit more: c(n,k) =c(n-1, k-1) + c(n-1,k).
    When n == k, the result equals 1 (one). Those values can be found
    on the right diagonal side of the triangle. If k > n, the value has to be
    0 (zero). Those values can be found outside the triangle.
    Of course n >= 0 and k >= 0. If you put this all together you get:int c(int n, int k) {
       if (k == n) return 1;
       if (k > n) return 0;
       return c(n-1, k-1)+c(n-1, k);
    }kind regards,
    Jos

  • Pascal's Triangle Problem

    Hey there guys. I was looking around the forums seeing if there was anything that someone posted simliar to my assignment. While there were SOME similar things, I think mines a bit more specific. Let me just state here that I don't want anyone to just come out and do the assignment for me, nor do I think that anyone would be willing to. Anyways, here's what I am dealing with.
    I am to design a method which uses recursion to print the n-th line of the Pascal's triangle. I have a few ideas in my head about how to make it, but I just can't translate my thoughts into words.
    My first guess is that my method declaration should look something like this:
    public int println(int n)
    }But I'm just at a brainlock. My class really hasn't touched recursion extremely in-depthly expect for what was needed for AP Exam and Binary Search methods. Usually I can figure this stuff out, but ahhh!
    Anyways, any help (aka nudge in the right direction) would be very appreciated.

    A recursive function can be explained as a function defined in terms of itself.
    It is a mathematical concept. Let's take a look at something simple, like fibonacci numbers. Fibonacci numbers are defined in math something like:f(1) = 1
    f(2) = 1
    f(n) = f(n-1) + f(n-2)What this means is that the first two fib numbers are 1 and 1, and every fib number after that is the sum of the two numbers immediately preceeding it. So if we unroll the fibonacci numbers, they are:1 1 2 3 5 8 13 21 34 ...Now we want to implement a method in Java that accepts a single int argument, n, and will return the nth fibonacci number. One way is to do this recursively as such:public int fibonacci(int n) {
        if (n == 1 || n == 2)
            return 1;
        return fibonacci(n - 1) + fibonacci(n - 2);
    }(what we haven't handled is when n < 1, but since this is just to increase understanding of recursion I will omit that)
    What you see is a commonality with all recursive functions, a base case and a recursion step. All recursive methods must have a base case or they will run infinately. Similarly all recursive methods must have a recursion step, for the simple reason that they would not be recursive functions otherwise. Another thing that all recursive functions have in common is that the recursive call is made on some narrower scope (in this case n less 1 and n less 2) resulting in a call drawing ever closer to the base case (not doing so would also result in infinite recursive calls).
    Note: sometimes fibonacci numbers are defined to have the 0th number as 0 and the 1st number as 1, for me that is matter of taste and still results in the same sequence of numbers, with an added 0 at the front.
    In your example, the base case is when n == 1, and the recursion step is the call to fillN with n less 1 (i.e., narrowing the scope). The thing that is different in your example is that the resulting array is being passed around in the recursive calls, this is quite common for accumulating results as the recursion is being wound up (the calls themselves) and even down (when calls return, like in your case).
    You should try tracing out the calls on paper with a reasonably small n, this will better help your understanding. Let me do it with n == 2.fillN(2, a) // a = [0, 0]
    // n is not 1 so we do the recursive call
    fillN(1, a) // a = [0, 0]
    // n is 1 so we do the base case
    array[0] = 1 // a = [1, 0]
    // returning back to the call with n == 2
    // we run through the loop (i begins at n - 1 or 1)
    array[1] += array[0] // a = [1, 1]
    // i becomes 0 which is not > 0 so we exit the loop
    // the recursion has ended and a is now [1, 1]Now you try it with n == 3.
    ps. slightly off-topic, there is a great article by Olivier Danvy and Mayer Goldberg called "There and back again" on the programming pattern of traversing one data structure as recursive calls are being made and traversing a different data structure as the calls are returning (hence, there and back again or TABA). If you're interested you should check it out (Note: they use Scheme in their examples, but that doesn't mean that there's nothing to learn from it if you don't know Scheme):
    http://www.brics.dk/RS/05/3/BRICS-RS-05-3.pdf
    Message was edited by:
    dwg

  • How to change font size in a callout on a Mac

    Is there a way to change the font size in the callout tool on a Mac?  I am using Acrobat 9 Pro and the callout font is way too big for where I want to use it.  I have gone to the properties box like it says in many Windows queries on this subject but font size is not available in the properties box.
    Thanks.
    Greg

    Hi Dave,
    Thank you so much for the email.  I tried every object and method I can
    posibly think about such as
    myTable.Rows.Item(1).PointSize = 24
    myCell.Characters.Item(1).PointSize = 24
    I got error message all the time.  These objects don’t support PointSize.
    All I need is to change point size of the text in InDesign tables created
    using VBScript. Could you help me with this?  Thanks,
    Regards,
    Li

  • How to Create a connection pool in OSB java callout

    Dear Team,
    In our project, we need read some data from DB, and do corresponding operation. currently, we need setup the connection first, execute the SQL, and close the connection.
    But the concurrency of call is very high, is there a way to create a connection pool, then we can use the connection pool to get the connection and execute the SQL, then return the connection to the pool.
    if connection pool is not available, is there any way to create the connection outside the java callout, that we can just execute the SQL in java callout.
    The OSB version is 11.1.1.6.0
    Thanks.
    Best Regards,
    Raysen Jia
    Edited by: Raysen Jia on Oct 16, 2012 8:44 AM

    Hi Team,
    Thanks for your help.
    What I need is not only the db connection, may be other kind of things, such as read configuration from file...
    If I write the code in java callout with static java method to create and close the connection, each time when request come in, OSB will create a new connection (or read the file), I think it's not the best practice to do this kind of work.
    I think the weblogic is running in JVM, is there any way we can define variables or new object in the JVM directly?

  • Setting timeout in Oracle Web Service Callouts

    We have a 10.1.0.4 Enterprise DB with dbwsclient.jar loaded. Currently using the database callouts. The problem is there seems to be no timeout when the called web service does not respond. I did not see a setting for the socket timeout in the code produced by JPublisher.
    Thanks

    Hi,
    Where the properties need to be put and how can they be read really depends on how your Web Service is implemented. What is the WS based on - EJB, POJO, PL/SQL, JMS...?
    Yogesh

  • Callouts and anchored objects - there must be a better way to do this

    I've spent a lot of time in the last six months rebuilding PDF files in InDesign. It's part of my ordinary responsibilities, but I'm doing a lot more of it for some reason. Because I'm sending the text of these rebuild documents out for translation, I like to keep all of the text in a single story. It really helps to have the text in "logical order," I think; when I'm prepping a trifold brochure, I try pretty hard to make sure that the order in which the readers will read the text is duplicated in the flow of the story throughout the ID document.
    So, I'm rebuilding a manual that has a 3-column format on lettersize paper, and it's full of callouts. Chock full of 'em. They're not pull quotes, either; each of these things has unique text. Keeping in mind that I'd like the text in these callouts to remain in the same position in the text once I've linked all the stories and exported an RTF for translation, what's the best way to handle them? What I've been doing is inserting an emptly stroked frame as an anchored object, sized and positioned to sit above the text that is supposed to be called out. When my translations come back, they're always longer than the source document, so as I crawl through the text, I resize the anchored frames to match the size and position of the newly expanded translated text, and then nudge them into place with the keyboard.
    There Has To Be a Better Way.
    There is a better way, right? I'm not actually too sure. If I want to actually fill those anchored frames with text, I can't thread them into the story. I suppose that I could just thread the callout frames and assign two RTFs for translation instead of one, but then the "logical order" of my text is thrown out the window. So, I'm down to asking myself "what's more important? reduction of formatting time or maintenance of the flow of the story?" If there's something I'm missing that would let me dodge this decision, I'd love to hear about it. The only thing I can think of would work like this:
    1) Duplicate callout text in the story with a custom swatch "Invisible"
    2) Create "CalloutText" parastyle with "Invisible" swatch and apply it to callout text
    3) Insert anchor for anchored frame immediately before the CalloutText content
    4) Send it out for translation
    5) While I'm waiting for it to come back, write a script that would (dunno if this is possible):
       a) Step through the main story looking for any instance of CalloutText
       b) Copy one continguous instance of that style to the clipboard
       c) Look back in the story for the first anchor preceeding the instance of CalloutText
       d) Fill the anchored object with the text from the clipboard (this is where I'm really clueless)
       e) Apply a new parastyle to the text in the callout
       f) Continue stepping through the story looking for further instances of CalloutText
    If this really is the only decent solution, I'll just head over to the Scripting forum for some help with d). Can any of you make other suggestions?

    In-Tools.com wrote:
    The use of Side Heads saves weeks of manual labor.
    Yup, Harbs, that is exactly what I was describing. If I use the Side Heads plugin to set up a job, will my clients get a missing plug-in warning when they open up the INDD? Will roundtripping through INX strip the plugin but leave the text in the callout? (My clients don't care if the logical flow of the story is broken; it's just me.)
    I'm just curious; seems like a pretty obvious purchase to me. I'll probably try to script a solution anyways, after I buy the plugin; that way I get to learn about handling anchored objects in scripts AND deliver the job on time!

  • This regards Adobe Reader XI 11.0.07 and Adobe Acrobat Pro XI 11.0.07 running on Win 7. Copying text in a text callout (to paste into a text callout in another pdf document (3 instances of Adobe open) sometimes (only sometimes) causes the program to crash

    This regards Adobe Reader XI 11.0.07 and Adobe Acrobat Pro XI 11.0.07 running on Win 7. Copying text in a text callout (to paste into a text callout in another pdf document (3 instances of Adobe open) sometimes (only sometimes) causes the program to crash, losing unsaved work. Windows Task Manager shows only a small percentage of cpu used and plenty of memory available. What is causing this?

    scholtzkie wrote:
    "Please wait...If this message is not eventually replaced by the proper contents of the document, your PDF viewer may not be able to display this type of document.   You can upgrade ...  For more assistance....    Windows is either a registered trademark...."
    This usually occurs if you use a browser that uses its own PDF viewer, not the Adobe Reader plugin; see http://helpx.adobe.com/acrobat/kb/pdf-browser-plugin-configuration.html

  • How can I add callouts on top of anchored images in CS6?

    I am using InDesign CS6 on a MacBook. I have multiple anchored images in a long document. Some of the images require callouts, such as labels or arrows, which should display on top of the image and should always stay with the image as if these items were also anchored. Is there a way to layer images in InDesign so that they are all anchored?
    I tried grouping the callout objects with the anchored object, but you cannot select an anchored object and other objects at the same time. I know in Word you can create an image canvas and add multiple items to that, and they are all grouped together. Is there a way to do that in InDesign? Or would I have to anchor each callout along with its corresponding image?

    Peter, your advice was very helpful. However, the text boxes (callout labels) that are included in the grouped objects get distorted once the grouped objects are anchored. Each text box shows the red +. When I expand the text box to fit content, the text box expands vertically so that all of the text is below the originally anchored object.
    The other callouts (just lines) stay in place perfectly.  Any insight into why the text boxes don't behave the same way that the lines do?

  • Java Callout in OSB failing with null pointer exception

    Hi,
    We have a requirement where we need to convert XML String to org.apache.xmlbeans.impl.values.XmlAnyTypeImpl type using java-callout, but value is not getting set when we are trying to do the same. Below is the code we are using in the java callout:
    byte [] bArray = xml.getBytes();
    InputStream is = new ByteArrayInputStream(bArray);
    Reader reader = new InputStreamReader(is,"UTF-8");
    InputSource iss = new InputSource(reader);
    iss.setEncoding("utf-8");
    xmlNode1 =
    DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(iss);
    XmlAnySimpleType xmlObj = XmlAnySimpleType.Factory.parse(n);
    xmlAnyTypeImpl.set_newValue(xmlObj);
    Node resNode = xmlAnyTypeImpl.getDomNode();
    Can someonce please help for the same.
    Regards,
    Soumik

    First check whether the java class that is called is able to read the string message that is passed by the proxy service.

  • How to Handle Multiple Thread in JAVA Callout with OSB 11g

    Hi Team,
    With My OSB 11g, I want create a static Thread when Java callout.
    Java code as below.
         private static Thread thread;
    static {
              * lazy load thread and with thread-safe ensure
              if(thread == null){
                   synchronized (HornetQConnectionHelper.class) {
                        thread = new ConnectionRecoveryThread();
                        // Daemon thread, JVM level, Won't be interrupted, Safe!
                        thread.setDaemon(true);
                        thread.start();
    When this class was first called in OSB, the thread start run. while when I redeploy it, the old Thread is still running, if call the class again, it will create a new Thread. The two threads will run at the same time.
    Any body know how do configure it, so that there is only one static Thread in the Weblogic JVM.
    Thanks.
    Best Regards,
    Raysen Jia

    Hi Raysen Jia,
    Create a weblogic startup class... See the references bellow...
    Hope this is helpful...
    http://jagadesh4java.blogspot.com.au/2010/05/working-with-weblogic-startup-shutdown.html
    http://docs.oracle.com/cd/E23943_01/upgrade.1111/e10126/basic_upgrade.htm#FUPAS464
    Cheers,
    Vlad

  • To collect small slices into a secondary, callout pie chart in SSRS 2005

    Hi Guys, 
    There exists a property in pie chart in SSRS-2008 which can consolidate the small slices on pie chart. But I am unable to find the same property in SSRS-2005. 
    Is this property only available in SSRS-2008 ? If yes how can we achieve the same functionality in SSRS-2005 Pie Chart ?
    Regards
    Consolidating Small Slices on a Pie Chart
    Consolidating Small Slices on a Pie Chart
    Consolidating Small Slices on a Pie Chart
    Consolidating Small Slices on a Pie Chart
    Consolidating Small Slices on a Pie Chart

    Hello,
    Based on my research, the CollectedStyle property that collect small slices into one signal slice or a secondary, callout pie chart is available from Reporting Services 2008. So it is not supported in Reporting Services 2005.
    For example, you are using the query below to return the SECTION and DIVISION fields as the chart fields: SELECT SECTION , DIVISION FROM TEMP, and you want to collect small slice COUNT(DIVISION) smaller than 5 as the callout pie chart. To work around this
    issue, we can create two charts on the surface, one as the big and collected slices chart, another one as the secondary, callout pie chart. For more details, please refer to the following steps:
    We can use the query with some conditions like below to return the fields for the main chart:
    SELECT CASE
       WHEN COUNT(DIVISION) <= 5 THEN 'Other'
       WHEN COUNT(DIVISION) >5 THEN SECTION
       END  AS SECTION, COUNT(DIVISION) AS DIVISION
     FROM TEMP
    GROUP BY SECTION, DIVISION
    We can use the query like below to return the fields for the callout pie chart:
    SELECT CASE
          WHEN COUNT(DIVISION) <= 5 THEN SECTION
       END  AS SECTION, CASE
          WHEN COUNT(DIVISION) <=5 THEN COUNT( DIVISION)
       END  AS DIVISION
     FROM TEMP
    GROUP BY SECTION, DIVISION
    The following screenshot is for your reference:
    If there are any other questions, please feel free to ask.
    Regards,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Cannot type in a text box or text callout box

    I'm using Windows 7, IE 9.0.8112.16421, and Acrobat version 10.1.6. I am working in a priorietary platform for reviewing material and I can use all of the commenting tools and can create a text box and a text callout box, but I cannot type in them. My text box and text callout box work just fine with every other program that I use on my system. But this requires using Acrobat and its tools within their platform and I cannot type in those two boxes in that situation. Their first suggestion was it was an Acrobat problem. We have repaired and reinstalled several times to no avail. They then said to be sure Acrobat Reader was not installed (and it wasn't). I've cleared history. Their online reviewing system requires a specific Java script in a specific place -- we've installed, deleted, reinstalled, etc. and it still doesn't work.
    I've used this platform on another computer and it works fine. I got a new computer in February with a new CS, and the problem is occurring on only this new system. And only when I am using Acrobat in their platform.
    Would anyone have any suggestions what I might try? They said they had one report of a person having the same problem, but they had Reader installed.
    Thanks!

    I don't know how to save a sample file to the forum.  But I know it's actualy being created because I can close and reopen the document and the text box is still there and you can still select the text in the text box, view it and see it.  But as soon as you click outside the text box, the text in the text box disappears again until you click back inside the text box.
    This problem has been discussed ad nauseum with no solution ever having been given.
    http://blogs.adobe.com/dmcmahon/2011/09/17/acrobatreader-x-how-to-enab le-the-typewriter-tool/
    By Judy - 5:10 PM on May 24, 2012   Reply
    I am on Adobe X Pro and whenever I add text using the text edit tool the text disappears when I add text to another place in the document. It is also creating comments for every place I add text. How do I get the text to remain visible in the document and not create a comment?
    http://answers.acrobatusers.com/text-box-disappears-q8542.aspx
    "I have a map pdf that I printed from Google Earth. I want to use text boxes to put labels on it. I can place the text boxes and get the font and colors all set up OK, but then when I click the cursor in a new place to start a new text box, the first one vanishes and won't come back unless I mouse over it. I've wasted hours trying to solve this one! I'm using Acrobat Pro X and Windows 7. It also happens with Acrobat Pro 9 and XP."
    http://forums.adobe.com/message/4550185
    http://forums.adobe.com/message/4477271
    Usually, responders claim that one is using Mac Preview or reader or some other program.  THAT IS NOT THE PROBLEM.  THE DOCUMENTS ARE BEING CREATED AND/OR EDITED IN ADOBE ACROBAT X AND NO OTHER PROGRAM.

  • What's the difference between Routing and Service Callout in ALSB?

    I am puzzled by that.
    what's the difference between them.
    Or what's the situation should use Routing, and that of service callout?

    There is little difference between routing and service callout.
    Routing is symbolizes the transition of request thread to a response thread starts. (in OSB every invocation of proxy is undertaken by different request and response threads ). So by this definition, there can be only one route node in a pipeline.
    Service call out is also used for similar actions as route node , but in pipeline. So service callout can be either in request pipeline (request thread) or in response pipeline (response thread ) . So in a proxy you can have multiple ServiceCallouts but only one route node.
    There are some other slight differences.
    Manoj

Maybe you are looking for

  • Batch determination at material level.

    Hello SAPians, I have a question about the batch management at material level. i have maintained batch determination policy at material level in system conversions also get done... now my problem is here ,i want to reassing it to plant level.. please

  • Trouble with editing and exporting files

    how do I do that?

  • Macbook Clamshell Display Blank

    Hi guys, hope you can help. I'm running a clean install of Lion on a 2009 MacBook. I've connected it to a HDTV via a VGA adpator (have been doing this for years with Snow Leopard and no issues). The display is fine on the TV when the laptop is open,

  • Adobe AIR version compatibility

    Hi, I am trying to run my application built in Flex Builder 3 and compatibility with Adobe AIR beta 3 on Adobe AIR 1.0 (i.e. latest version 1.0.7.4880); but its not working. It gives "This application requires a version of Adobe AIR which is no longe

  • Error when trying to "Save for Web and Devices"

    Hello All, I have a little issue with Photoshop CS3 on the XP Pro platform.  I get the error when I try and "Save for Web and Devices".  This is the actual error.  "the exception unknown software exception"  uhh... lol I currently work for a school d