PYTHON in HTMLDB

I know nothing about PYTHON, so please think that you are talking to 6 year old ...
my setup: APEX 2.2.1 on ORACLE 10.2.0.2 on SOLARIS 10
I would like to implement this PYTHON library (or better say 2 libraries). http://bitworking.org/projects/sparklines
since i really know nothing about PYTHON, I'm really not sure where to start and I would really appretiany any help.
thank you
jiri

Jiri,
based on the information on the web-page, you can also use there system to generate the graphic, you just have to generate an URL in the following format.
http://bitworking.org/projects/sparklines/spark.cgi?type=smooth&d=88,84,82,92,82,86,66,82,44,64,66,88,96,80,24,26,14,0,0,26,8,6,6,24,52,66,36,6,10,14,30&height=20&limits=0,100&min-m=false&max-m=false&last-m=false&min-color=red&max-color=blue&last-color=green&step=2
Then you don't have to hassle installing PYTHON on your local Apache. A detailed description of the parameters can be found of the web-page.
Patrick
Check out my APEX-blog: http://inside-apex.blogspot.com
Check out the ApexLib Framework: http://apexlib.sourceforge.net

Similar Messages

  • Custom PL/SQL servlet for HTTP Listener like HTMLDB

    We would like to migrate our applications from apache that use a custom perl application server to the xdb http listener and would need to be able to write a custom pl/sql servlet for the listener
    eg
    <servlet xmlns="http://xmlns.oracle.com/xdb/xdbconfig.xsd">
    <servlet-name>Custom</servlet-name>
    <servlet-language>PL/SQL</servlet-language>
    Can this be done? (Well obviously, HTMLDB did it.)
    Is information available to do this?
    Information on the request (url/headers/content) and response (headers/content) objects
    of the http listener would be needed.
    Our pl/sql applications look like
    create package my_app as
    procedure my_job (request xmltype);
    end;
    This is why we need to do the servlet ourselves and why dbms_epg is not suitable.

    Currently
    we don't plan to allow large input to be passed as a
    CLOB parameter to the procedure. Is there a use-case
    for this?YES ;). I have seen this coming up quite a few times in this forum.
    1) we cannot edit sql scripts in Apex directly (>32KB), this is quite inconvenient to download, edit and upload again. If we are talking about sql scripts, they are often larger than 32KB.
    2) building an application where the user can directly edit or copy/paste spreadsheet data or xml data. It is quite a restriction to only have 32KB at your hand.
    3) the common workaround would be to split the data in 32KB chunks and then reassemble them in the backend. Quite tedious.
    4) editing larger HTML texts for a portal application for example.
    5) editing larger HTML texts for a forum application for example.
    ... the list goes on ...
    Another argument is that all other major technologies like servlets, jsps, perl, php, python they are all capable of handling this kind of data. I often feel it is too much of a restriction.
    What do others in the forum think? Feedback is welcome!!!
    Thanks,
    ~Dietmar.

  • Questions on Master-Detail HTMLDB HOW-TO

    Hi all
    I have created a 3 page application based on the master detail how-to given at http://www.oracle.com/technology/products/database/htmldb/howtos/index.html
    Instead of DEPT and EMP tables I have PERSON and PERSON_ADDR tables. The PK of PERSON is the person_id and the PK of PERSON_ADDR is the person_id and addr_start_dt. Person_id column in PERSON_ADDR is obviously the FK to the master table PERSON(person_id).
    At first I had problems trying to create the pages themselves because the wizard always hides the person_id column on all the forms(and I don't want that,even though it is a sequence number I still want people to see it) , it being the PK, then somehow I managed it to display the person_id by replacing the EDIT link with the person_id itself. Now if a person already has an address and I click on EDIT then it copies the person_id values and others to the next page and all looks good but when I try to create a new address it does it ?? (It should take across the person_id as well)
    My PERSON report is on page 1, when I click edit against a person it takes me to page 2 where I can see+change all the person details plus I can see the person_addr details. When I click edit against a person address it takes me to page 3 and I can edit all the address details nicely copied to the new page but when I click CREATE on the page 2, then all the fields appear as NULL on page 3( all the fields but the person_id should be null here). How can I fix this ?
    Also, for my person address I would like to validate the address dates , there should be no overlapping start and end dates for a person's address. How to do this ? I think I will need to create a function to which I pass the person id and the new start and end dates and this function returns error message,if any, or null. I had a play around with validation and I think I need to use "function returning error text", what should I put in the "validate expression 1" box then...just something like
    begin
    my_function(param_1,param_2)
    end;
    If yes, then what variables would store the new start date and new end date of an address.
    Lastly, for every table do I have to user a sequence number or a trigger to define a primary key, what if the primary key is just a character code and I want the users to add it ?
    Thanks a lot in advance !!

    thanks Marc.
    Yes you are right, I used the 1.5 viewlet. I will try the master-detail wizard now.
    With the primary key problems, for things to work nicely in HTMLDB, do you suggest each and every tables should have a sequence number generated primary key ? We have some tables for various statuses like ACTIVE,CLOSED where these codes themselves are the primary keys, so you suggest making these codes unique keys but still have a sequence number PK ? Also when I want the users to enter the primary key themselves I will let them enter new ones but not update existing ones, so data entegrity is maintained.
    I was able to work out how to create validations using "functions returning error text" but my problem is I need to be able to compare what the user has just updated/entered with the data that already exists in the table. I have a table called person_Address having columns like person_id, start_dt,end_dt and various other fields. The primary key is person_id and start_dt and I need to put a validation which avoids any overlapping addresses. Overlap as in there can be only 1 active address for a given start and end date range. Does HTMLDB has something like :new.start_dt the way we can write database triggers ? Please suggest a way to do this.
    Lastly, how does HTMLDB handles error messages raised by table triggers. Can they be shown along with the item on the page as we can with the other HTMLDB validations ? I have many tables with all sorts of triggers and if any validation fails I generally do...raise_application_error(-20001,get_my_message(234));
    get_my_message function returns the message text for message number 234 . Will this message be displayed somewhere or not ? Do I have to duplicate my validations , once in the triggers and then in HTMLDB as well ?

  • Questions on printing in htmldb

    I try to create an invoice page to print.
    Some questions I ask to myself:
    - Is it possible to print to an A4 (papersize)? (I mean, does the application have notions of pagesize or is everything controlled by the browser? this is important when you need to repeat some information on the second page)
    - can I include "pagenumber of total pagenumbers"?
    - Is it possible to repeat an header / footer?
    In my opinion it is very hard to do this with htmldb...
    I started my "print report" like this:
    - created static html like I would like to have my report(in notepad)
    - in htmldb I try to create "the same thing", first I tried with the creation of a report, but, because you 'll always have rows, I stopped with that (I need to say "that item needs to be placed there"). Than I created a form, afterwards I added some other forms (regions) to the same page. One region for every table. I still have problems to place my items like I wish, because of region overlapping. Should I create other items in an other region (and link them) if I want to show the content of an item of an other region in that region?
    I try to replace an Access application, and it looks good so far, but replacing the reports is very difficult!?
    Is it me?
    Dimitri

    I found the answer on most of my questions on this site:
    http://www.w3.org/TR/REC-CSS2/page.html#propdef-size
    In short: you can a lot with css! so for my htmldb application: I probably need to change (create a new) my "print" template
    HTMLDB is a very nice product and in a way it can replace an Access application, but in my opinion we are limited by the html.
    What I would like to have in htmldb (compared with access):
    - submission of a region and not the whole page (like in access subforms)
    - in the tabular form, automatic one (or more) empty line(s) to create a new record (in access you have a new empty record)
    - an easier why to customize the templates/css, for the default ones you can't change everything... (in access you can "draw" your form/report, that's very easy, in htmldb it's more difficult)

  • Error Message when installing Companion CD for HTMLDB 1.6 and HTTP Server

    Hi. First time forum user so bear with me.
    I'm not sure if this is the correct forum for this but the assistance of anyone who may be able to shed some light on the problem whould be greatly appreciated. I am having a problem when attempting to install the Companion CD for HTMLDB 1.6 and HTTP Server, details given below:
    The following Oracle components have been successfully installed
         Oracle 10gR2 Database.
         Oracle 10gR2 Database patch 10.2.03.
         Critical patch up date (security).
    The following Oracle component failed to install.
         Companion CD for HTMLDB 1.6 and HTTP server
    Scenario leading up to failure
         Extracted companion CD installation files to D:\oracle\utilities\Oracle_10_2_0_Companion
         Executed D:\oracle\utilities\Oracle_10_2_0_Companion\companion\setup.exe.
    The following error message is displayed in a "JAVA VIRTUAL MACHINE LAUNCHER" dialog box
         "Could not find the main event class. Program will exit."
    I have been attmepting to resolve this problem for over a week and have already checked the following with no resolution to the problem:
    Cause. This issue may have to do with two issues (and may occur more on Windows):-
    1. Within the ORACLE_HOME directory full pathname there is a space.
    2. The directory from where the software / patch is being installed has a space within the directory full
    pathname (where the file for the installation by default is named products.jar or products.xml).
    Solution. To implement the solution, please execute the following steps:-
    1. Rename the full pathname directory NOT to contain a space.
    2. Launch again the OUI... and verify if the problem occurs.
    Any further guidance would be greatly appreciated.
    Edited by: user10386555 on 03-Oct-2008 02:51

    Can you install using OUI from the RDBMS installation? IIRC, there is a problem using OUI on companion to install companion items.

  • Outlook can not display htmldb mail message correctly

    We are using some applications which constructed by HTML DB. All mail messages from HTML DB applications can not be displayed correctly in Outlook, but they are displayed very well in Netscape mail client. This issue happens in both HTML DB 1.5 and 1.6. Therefore, I am not sure this is HTML DB mail package issue or outlook issue. Have anyone experienced this issue. Any suggestions are highly appreciated. Thanks in advance!
    Here is a sample in our application.
    We see the mail message in Outlook:
    This message generated by the HTML DB Mail Package. -----=1T02D27M75MU981T02D27M75MU98
    Content-Type: text/plain; charset=utf-8
    <BR><FONT color=#0000ff>E-Leave System Notification for SGT China.<FONT
    size=2>(Note: it is NOT an official leave system)</FONT></FONT> <HR align=left width="70%" noShade><TABLE width="80%"><TBODY><TR><TD width="20%"><FONT color=#336699>Leave User :</font></TD><TD width="50%">[email protected]</TD></TR><TR><TD><FONT
    color=#336699>Formal:</font></TD><TD>No</TD></TR><TR><TD><FONT
    color=#336699>Type :</font></TD><TD>Personal<BR></TD></TR><TR><TD><FONT
    color=#336699>Begin Time :</font></TD><TD><FONT color=#ff0000>04-MAR-05 11:30</font></TD></TR><TR><TD><FONT color=#336699>End Time :</font></TD><TD><FONT color=#ff0000>04-MAR-05 13:30</font></TD></TR><TR><TD><FONT color=#336699>Urgent Contact :</font></TD><TD>13811512211<BR></TD></TR><TR><TD><FONT
    color=#336699>Note :</font></TD><TD>Go to CCB Haidian Branch for my debit cards again :(<BR></TD></TR></TBODY></TABLE><P><A
    href="http://sgt.us.oracle.com/pls/htmldb/f?p=132:101">E-Leave
    System</A><BR></P
    -----=1T02D27M75MU981T02D27M75MU98
    Content-Type: text/html;
    <BR><FONT color=#0000ff>E-Leave System Notification for SGT China.<FONT
    size=2>(Note: it is NOT an official leave system)</FONT></FONT> <HR align=left width="70%" noShade><TABLE width="80%"><TBODY><TR><TD width="20%"><FONT color=#336699>Leave User :</font></TD><TD width="50%">[email protected]</TD></TR><TR><TD><FONT
    color=#336699>Formal:</font></TD><TD>No</TD></TR><TR><TD><FONT
    color=#336699>Type :</font></TD><TD>Personal<BR></TD></TR><TR><TD><FONT
    color=#336699>Begin Time :</font></TD><TD><FONT color=#ff0000>04-MAR-05 11:30</font></TD></TR><TR><TD><FONT color=#336699>End Time :</font></TD><TD><FONT color=#ff0000>04-MAR-05 13:30</font></TD></TR><TR><TD><FONT color=#336699>Urgent Contact :</font></TD><TD>13811512211<BR></TD></TR><TR><TD><FONT
    color=#336699>Note :</font></TD><TD>Go to CCB Haidian Branch for my debit cards again :(<BR></TD></TR></TBODY></TABLE><P><A
    href="http://sgt.us.oracle.com/pls/htmldb/f?p=132:101">E-Leave
    System</A><BR></P>
    -----=1T02D27M75MU981T02D27M75MU98--
    -----=1T02D27M75MU981T02D27M75MU98--
    And this is my code:
    declare
    l_body_html varchar2(4000);
    l_subject varchar2(100);
    begin
    l_subject := 'eLeave Notification from ' || lower(:app_user) || '@oracle.com'; l_body_html := '<BR><FONT color=#0000ff>E-Leave System Notification for SGT China.<FONT size=2>(Note: it is NOT an official leave system)</FONT></FONT> ' || '<HR align=left width="70%" noShade>' || '<TABLE width="80%"><TBODY><TR>' || '<TD width="20%"><FONT color=#336699>Leave User :</font></TD><TD width="50%">' || lower(:app_user) || '@oracle.com' || '</TD></TR><TR><TD><FONT color=#336699>Formal:</font></TD><TD>' || :P3_FORMAL || '</TD></TR><TR><TD><FONT color=#336699>Type :</font></TD><TD>' || :P3_LEAVE_TYPE || '<BR></TD></TR><TR><TD><FONT color=#336699>Begin Time :</font></TD><TD>'
    || '<FONT color=#ff0000>' || :P3_BEGIN_TIME || '</font>' ||
    '</TD></TR><TR><TD><FONT color=#336699>End Time :</font></TD><TD>' || '<FONT color=#ff0000>' || :P3_END_TIME || '</font>' || '</TD></TR><TR><TD><FONT color=#336699>Urgent Contact :</font></TD><TD>'
    || :P3_CONTACT ||
    '<BR></TD></TR><TR><TD><FONT color=#336699>Note :</font></TD><TD>' || :P3_NOTE || '<BR></TD></TR></TBODY></TABLE><P><A
    href="http://sgt.us.oracle.com/pls/htmldb/f?p=132:101">E-Leave
    System</A><BR></P>';
    HTMLDB_MAIL.SEND(
    P_TO => :P3_MAIL_TO,
    P_FROM => '[email protected]',
    P_CC => :P3_MAIL_CC,
    P_BCC => :P3_MAIL_BCC,
    P_BODY => l_body_html,
    P_BODY_HTML => l_body_html,
    P_SUBJ => l_subject);
    end;
    ---------------------------------------------------------------------------------------------------------------

    This was not well documented, but we have improved the doc for the next relase. Essentially, you need a carriage return / line feed every 1000 characters. This is part of the SMTP spec. The package does not do this automatically for you, so try adding them yourself. You can use utl_tcp.crlf for the crlf.
    Tyler

  • After upgrade HTMLDB 2.0, the browser can not launch MS words to view doc

    I create a page with an item to hold the file id in flows_files.wwv_flow_file_objects$. and use the htmldb_util.get_file(:P14_file_id) on-load before header process to allow user to view the documents under flows_files.wwv_flow_file_objects$ table.
    When we are still in HTMLDB 1.6, the window would pop-up to ask for Open, Save or Cancel. When we click open, the window would depend on the file extension to lauch the Ms Words or Excel or Acrobat reader to view the file.
    After we upgrade to HTMLDB 2.0, the window won't pop-up asking for open, save or cancel. Instead, it would open another Internet Explorer to try to read the file. Since the web browser could not read the MS words or excel, all of page display strange characters. I check the httpd.conf file and mime.type in the apache, everything looks fine with me. Could anyone provide me further information on the troubleshooting...

    >
    Does any one have this issue before?
    >
    Probably not because this is internal build so most of us don't have this version :)
    I suppose that there is internal forum for questions like this.
    Dario

  • Unable to capture stdout, stderr from python.

    I am trying to read the stdout and stderr of a python program.
    When I invoke anything else apart from python my class works fine.
    The python program takes ca 1 sec to start. It then prints one line of text, then it prints a promt and waits for input from user.
    I tryed with another program that behaves in the same way and there I got the first line. Not the prompt, that not a python but a native C program.
    I have tried using BufferedReader but without sucess.
    My class looks like this.
    import java.io.BufferedInputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    public class Executer extends Thread {
        //read standard out output of the external executable
        //in seperate thread to avoid I/O deadlocks
        final int BUFFER = 2048;
        Process p;
        BufferedInputStream in;
        OutputStream out;
        StringBuffer strbuf;
        String[] cmdarr = null;
        public Executer(String path) {
            this.cmdarr = new String[] { path };
        public Executer(String[] path) {
            this.cmdarr = path;
        public void run() {
            try {
                System.out.println("doing call");
                p = Runtime.getRuntime().exec(cmdarr);
                in = new BufferedInputStream(p.getInputStream());
                strbuf = new StringBuffer();
                out = p.getOutputStream();
                int i;
                byte[] buf = new byte[BUFFER];
                String str;
                            while ((i = in.read(buf, 0, BUFFER)) != -1)
                                System.out.write(buf, 0, i);
            } catch (IOException e) {
                e.printStackTrace();
        public int killProcess() throws InterruptedException {
            p.destroy();
            try {
                in.close();
                System.out.println("Closed");
            } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            return p.waitFor();
    }Any ideas is appreciated.

    When Runtime Exec Won't - a good article on running processes from a Java program...
    Hope that helps;
    lutha

  • Calling a .py script inside a .VI, using anaconda's Libraries or specific python version (SystemExec.vi(?), MAC OSX)

    Hi,
    I'm new to both mac and LabView, so it may well be something obvious I'm missing.
    I'm trying to use System Exec (http://zone.ni.com/reference/en-XX/help/371361L-01/glang/system_exec/ with LabVIEW 2014 on Mac OS X Mavericks) to call a python script to do some image processing after taking some data and saving images via LabView.
    My problem is that I cannot figure out how to point it to the correct version/install of python to use, as it seems to use the pre-installed 2.7.5 apple version no matter whether that's set to be my default or not (and hence, it can't see my SciPy, PIL etc. packages that come with my Anaconda install).
    It doesn't seem to matter whether I have certain packages installed for 2.7 accessable via the terminal, the LabView System Exec command line can't seem to find them either way and throws up an error if a script is called that imports them.
    I've tried changing the working directory to the relevant anaconda/bin folder, I've also tried
    cd /Applications/anaconda/bin; python <file.py> 
    as the CL input to system exec, but it's not wanting to use anything other than the apple install. I've tried Anaconda installs with both python 2.7 and 3.4, so it doesn't seem to be down to the 3.* compatibility issues alone.
    Printing the python version to a string indicator box in LV via python script gives the following:
    2.7.5 (default, Mar 9 2014, 22:15:05)
    [GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]
    Whereas via the terminal, the default version is the anaconda install I'd like to use, currently
    Python 3.4.1 |Anaconda 2.1.0 (x86_64)| (default, Sep 10 2014, 17:24:09)
    [GCC 4.2.1 (Apple Inc. build 5577)] on darwin
    I can do which python3.4 on the sys exec CL input to get the correct /anaconda/bin location, but if I try  python3.4 <file.py>, I just get a Seg fault.
    I've found examples for System Exec use and instructions for calling python scripts with specific versions, but neither works with Mac (frustratingly).
    I've also tried editing the Path Environment Variable, and tried getting rid of the python 2.7 install entirely, but none of these work either (the latter just causing errors all over the shop).
    So, in summary
    I'd just like to know how to specify the python version LabView uses and to have use of the corresponding python libraries.
    Either python version (2 or 3) will do, I'd just like to be able to use my libraries which came with Anaconda which I'll be writing my scripts with (which I installed as the correct packages are only compatible with a specific python version on Mac, which is not the specific version that Xcode was compatible with, argh).
    All packages work normally when using the Anaconda version with the terminal or with Spyder.
    Is there a function I can use other than System Exec? What am I missing?
    Please help.

    janedoe777 wrote:
    Accidental. Also, that's not terribly helpful.
    What exactly does that mean?
    I'm not debating whether it was accidental or intentional.  It certainly isn't helpful to post the same message twice.
    It is helpful to point out this message is a duplicate so people don't waste their time answering this one if you are already being helped in the other one.

  • USB 6009 Python Control

     Hello, 
    I am attempting to use python (with ctypes) to control my USB-6009.  The goal is to write out an analog voltage and then read in the voltage through an analog input with ability to change the number of points averaged and the number of times this is repeated(sweeps) averaging the analog input array.  The issue is that as we increase the number of times the voltage ramp is repeated (sweeps) we get a time out error (nidaq call failed with error -200284: 'Some or all of the samples requested have not yet been acquired).  This has us confused because the sweeps are in a larger loop and the Daq function should be the same if there are 10 sweeps (works) or 1000 sweeps (crashes).  Any insight would be greatly appreciated.  I have included the code below for reference.  
    import ctypes
    import numpy
    from time import *
    from operator import add
    nidaq = ctypes.windll.nicaiu # load the DLL
    # Setup some typedefs and constants
    # to correspond with values in
    # C:\Program Files\National Instruments\NI-DAQ\DAQmx ANSI C Dev\include\NIDAQmx.h
    # Scan Settings
    aoDevice = "Dev2/ao0"
    aiDevice = "Dev2/ai0"
    NumAvgPts = 10
    NumSweeps = 50
    NumSpecPts = 100
    filename = '12Feb15_CO2 Test_12.txt'
    Readrate = 40000.0
    Samplerate = 1000
    StartVolt = 0.01
    FinalVolt = 1.01
    voltInc = (FinalVolt - StartVolt)/NumSpecPts
    # the typedefs
    int32 = ctypes.c_long
    uInt32 = ctypes.c_ulong
    uInt64 = ctypes.c_ulonglong
    float64 = ctypes.c_double
    TaskHandle = uInt32
    # the constants
    DAQmx_Val_Cfg_Default = int32(-1)
    DAQmx_Val_Volts = 10348
    DAQmx_Val_Rising = 10280
    DAQmx_Val_FiniteSamps = 10178
    DAQmx_Val_GroupByChannel = 0
    def CHK_ao( err ):
    """a simple error checking routine"""
    if err < 0:
    buf_size = 100
    buf = ctypes.create_string_buffer('\000' * buf_size)
    nidaq.DAQmxGetErrorString(err,ctypes.byref(buf),buf_size)
    raise RuntimeError('nidaq call failed with error %d: %s'%(err,repr(buf.value)))
    if err > 0:
    buf_size = 100
    buf = ctypes.create_string_buffer('\000' * buf_size)
    nidaq.DAQmxGetErrorString(err,ctypes.byref(buf),buf_size)
    raise RuntimeError('nidaq generated warning %d: %s'%(err,repr(buf.value)))
    def CHK_ai(err):
    """a simple error checking routine"""
    if err < 0:
    buf_size = NumAvgPts*10
    buf = ctypes.create_string_buffer('\000' * buf_size)
    nidaq.DAQmxGetErrorString(err,ctypes.byref(buf),buf_size)
    raise RuntimeError('nidaq call failed with error %d: %s'%(err,repr(buf.value)))
    def Analog_Output():
    taskHandle = TaskHandle(0)
    (nidaq.DAQmxCreateTask("",ctypes.byref(taskHandle )))
    (nidaq.DAQmxCreateAOVoltageChan(taskHandle,
    aoDevice,
    float64(0),
    float64(5),
    DAQmx_Val_Volts,
    None))
    (nidaq.DAQmxCfgSampClkTiming(taskHandle,"",float64(Samplerate),
    DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,
    uInt64(NumAvgPts))); # means we could turn in this to continuously ramping and reading
    (nidaq.DAQmxStartTask(taskHandle))
    (nidaq.DAQmxWriteAnalogScalarF64(taskHandle, True, float64(10.0), float64(CurrentVolt), None))
    nidaq.DAQmxStopTask( taskHandle )
    nidaq.DAQmxClearTask( taskHandle )
    def Analog_Input():
    global average
    # initialize variables
    taskHandle = TaskHandle(0)
    data = numpy.zeros((NumAvgPts,),dtype=numpy.float64)
    # now, on with the program
    CHK_ai(nidaq.DAQmxCreateTask("",ctypes.byref(taskHandle)))
    CHK_ai(nidaq.DAQmxCreateAIVoltageChan(taskHandle,aiDevice,"",
    DAQmx_Val_Cfg_Default,
    float64(-10.0),float64(10.0),
    DAQmx_Val_Volts,None))
    CHK_ai(nidaq.DAQmxCfgSampClkTiming(taskHandle,"",float64(Readrate),
    DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,
    uInt64(NumAvgPts)));
    CHK_ai(nidaq.DAQmxStartTask(taskHandle))
    read = int32()
    CHK_ai(nidaq.DAQmxReadAnalogF64(taskHandle,NumAvgPts,float64(10.0),
    DAQmx_Val_GroupByChannel,data.ctypes.data,
    NumAvgPts,ctypes.byref(read),None))
    #print "Acquired %d points"%(read.value)
    if taskHandle.value != 0:
    nidaq.DAQmxStopTask(taskHandle)
    nidaq.DAQmxClearTask(taskHandle)
    average = sum(data)/data.size
    Thanks, 
    Erin
    Solved!
    Go to Solution.

    This forum is for LabVIEW questions.

  • USB-6009, mac OS 10.6.8 and python

    Hello!
    I am using USB-6009 under mac OS 10.6.8 and python.
    I am trying to run the following commmand:
    analogOutputTask = nidaqmx.AnalogOutputTask(name='MyAOTask')
    I get the following message
    File "/Applications/PsychoPy2.app/Contents/Resources/lib/python2.7/nidaqmx/libnidaqmx.py", line 180, in CALL
    AttributeError: 'NoneType' object has no attribute 'DAQmxCreateTask'
    Any help would be very mch appreciated,
    Thanks 
    j.

    Hello Jamyamdy, 
    Honestly, I am not too sure about this, but were you able to acquire data before or is this your first trial? 
    From the usb-6009 product page, it says the following. 
    For Mac OS X and Linux users, download the NI-DAQmx Base driver software and program the USB-6009 with NI LabVIEW or C.
     http://sine.ni.com/nips/cds/view/p/lang/en/nid/201987
    Regards,

  • Second htmldb as partner application in sso

    Hello ,
    I have 2 databases (say A and B) running each their own htmldb instance.
    I have 1 sso server where already 1 htmldb partner application is defined of DB A.
    Now i want to define the second instance of the htmldb on DB B also as partner application on my sso server.
    In the installation guide, i read the following for value of app_name when running regapp.sql
    'You must use HTML_DB as the app_name', but i already have one defined of DB A. Can I use another name or should i use the same name ? Or is it impossible to define 2 htmldb partner applications on 1 SSO.
    Grtz,
    Chris.

    When defining my app_name with the regapp.sql, i have used
    HTML_DB_TEST:servername:443 as listener_token.
    As i already have a HTML_DB:servername:443.
    I also used HTML_DB_TEST in the definition of the partner application.
    Now I'm getting : Expecting p_company or wwv_flow_company cookie to contain security group id of application owner. when trying to run my application.
    Could this be related, and if so, how can i define a second htmldb application as a partner application in sso ?
    Chris.

  • HTMLDB -SSO- Partner application

    Hi,
    I have installed a database 10g/HTMLDB 1.5 and iAS 10g on two different boxes.
    Refered & successfully completed the steps from
    http://www.oracle.com/technology/products/database/htmldb/howtos/sso_partner_app.html
    to Configure an HTML DB Application as a Partner Application in Oracle AS Single Sign-On
    (TWICE From the Scratch)
    But, Getting error like
    "Error Error in portal_sso_redirect: missing application registration information:
    p_partner_app_name:g_listener_token:HTML_DB:indl097ba.idc.oracle.com:7777
    Please register this application as described in the installation guide."
    Please let me know what would be wrong in doing this.
    Feel free to ask for any further specific details or parameter values.
    As its @ customer's site, need to know the resolution very urgently.
    Thanks in advance.
    Regards,
    Nagadeep.

    Hi Scott,
    I am doing it from scratch now.
    Details are like this:
    C:\SSO_SDK\ssosdk307_032101\packages\oracle\security\sso>path
    PATH=D:\oracle\product\10.1.0\Db_1\BIN;D:\OraHomeOWB\bin;D:\OraHomeOWB\jre\1.4.2
    \bin\client;D:\OraHomeOWB\jre\1.4.2\bin;D:\oracle\product\10.1.0\Htmldb\bin;D:\o
    racle\product\10.1.0\Htmldb\jre\1.1.8\bin;D:\oracle\product\10.1.0\Htmldb\jre\1.
    4.2\bin\client;D:\oracle\product\10.1.0\Htmldb\jre\1.4.2\bin;D:\oracle\product\1
    0.1.0\Db_1\bin;D:\oracle\product\10.1.0\Db_1\jre\1.4.2\bin\client;D:\oracle\prod
    uct\10.1.0\Db_1\jre\1.4.2\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;
    C:\Program Files\Symantec\pcAnywhere\
    C:\SSO_SDK\ssosdk307_032101\packages\oracle\security\sso>loadjava -user FLOWS_01
    0500/welcome1@orcl SSOHash.class
    C:\SSO_SDK\ssosdk307_032101\packages\oracle\security\sso>
    @ the Database Schema:
    SQL*Plus: Release 10.1.0.2.0 - Production on Wed May 18 20:49:33 2005
    Copyright (c) 1982, 2004, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> conn flows_010500/welcome1
    Connected.
    SQL> @C:\SSO_SDK\ssosdk307_032101\packages\loadsdk.sql
    Package created.
    No errors.
    Package body created.
    No errors.
    Type created.
    Table created.
    Sequence created.
    Sequence created.
    Table created.
    No errors.
    Procedure created.
    No errors.
    Package created.
    No errors.
    Package body created.
    No errors.
    Package created.
    No errors.
    Package created.
    No errors.
    Package body created.
    No errors.
    Package body created.
    No errors.
    Package created.
    No errors.
    Package body created.
    No errors.
    SQL>
    Now, at the iAS10g registering HTMLDB application as a partner application.
    Let me know whether I have to create any DAD to specify in HOME URL?
    Regards,
    Nagadeep.

  • HTMLDB as Partner Application to TWO OID instances - Authentication Schemes

    For reasons I won't go into here, we have TWO Oracle OID/SSO instances running - independently.
    I am interested in having HTMLDB / APEX applications capable of authenticate against either one. (one at a time, but on the same engine installation)
    We have done the PARTNER APPLICATION registration which works well against one of the OID instances. Records have been entered into the WWSEC_ENABLER_CONFIG_INFO$ table and everything works as expected.
    What option do I have to register the HTMLDB engine with a SECOND OID/SSO as a partner application and then allow the developers the ability to choose which authentication scheme applies?
    What I have observed is that the package given (custom_auth_sso) has built in
    g_partner_app_name varchar2(2000) := 'HTML_DB';
    Is it possible to duplicate that type of functionality, or is there something deeper ingrained into the engine that I do not understand?
    Regards,
    Tim

    Scott,
    I am working under a model similar to your case number two.
    Application 1 – uses OID A
    Application 2 – uses OID B
    I am going under the assumption that if there were two records in the config_info$ table, that I would need some type of ability to inform the WWV_FLOW_CUSTOM_AUTH_SSO package to switch between them.
    I guess what I am missing is the mechanics. I am trying to avoid having to re-write the WWV_FLOW_CUSTOM_AUTH_SSO package by hand. Besides the package body being compiled, I do not know how that authentication scheme is called by HTMLDB/APEX. I have been using the “Oracle Application Server Single Sign-On (HTML DB Engine as Partner App)” scheme. This leaves most of the Authentication scheme pretty blank with the exception of the Session Not Valid URL ( populated with –PORTAL_SSO-) and the logout URL. Magically it works though.
    If I had TWO schemes registered in the config_info$, how would I indicate which scheme to use?
    Do I have the capability of working with what has already been provided, or am I destined to writing a custom scheme because of the decision which needs to be made?
    Many thanks
    --Tim                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Is it possible to use mod-osso for htmldb applications

    We previously used sso_sdk for registering htmldb(1.4) applications as partner applications to avail single sign-on facility provided in oracle application server.
    Can we use mod_osso for registering html db 1.5 applications as partner applications? If so, could you please provide me the links to the documentation on how to achieve this.
    Regards,
    Lavanya

    Lavanya,
    No, mod_osso is not quite ready for PL/SQL applications that share a DAD the way HTML DB does. We're working on getting mod_osso enhanced to allow that integration. In the meantime, you can continue to use the SSO SDK and the pre-configured authentication schemes in HTML DB. They will work fine.
    Scott

Maybe you are looking for