Reading TDMS files in Matlab - problems with the example code

I want to use the TDMS files to store data and do offline analysis in Matlab, version 2009b (either on Mac OS10.6 or Windows XP).
To test the data import in Matlab I tried the example from http://digital.ni.com/public.nsf/allkb/0EEADA99DC7D00A4862572E30037C3A2 , but without success.
I tried either with and without the path definition (as explained on the page I referred to before) at the start, and got back the following errors:
with:
??? Error using ==> loadlibrary>deltempfiles at 559
nilibddc_m.i.
Error in ==> loadlibrary at 452
    deltempfiles(delfiles);
Error in ==> Read_TDMData at 7loadlibrary([examplePath '\nilibddc'], hfile);
without: 
??? Error using ==> loadlibrary>deltempfiles at 559
nilibddc_m.i.
Error in ==> loadlibrary at 452
    deltempfiles(delfiles);
Error in ==> Read_TDMData at 36loadlibrary(NI_TDM_DLL_Path,NI_TDM_H_Path); 
I found a few messages on the issue, dating from 2006 and 2007, that didn't lead to a satisfying solution and was hoping that, by now, there would be a solution to my problem.
Thanks a lot
Remco   
Solved!
Go to Solution.

Hi Musk,
Thanks for your answer. 
Unfortunately it didn't help as my problem is not discussed there. I have a problem with this line:
loadlibrary(NI_TDM_DLL_Path,NI_TDM_H_Path);
I said before that I was using 2009b, but I was mistaken, I have R2008a, but the 'loadlibrary' is opened in a 2008b editor (no idea why). On the Mac I have 2009b installed.
Thanks
Remco 

Similar Messages

  • Read TDMS file in MATLAB on x64 Windows

    I have read many posts on this forum regarding reading TDMS files in MATLAB, but the DLL available only works on 32-bit windows. Has anyone come up with a 64-bit DLL? I know there is some MATLAB code available to read the file as binary but it would make everything faster for me if there was already a DLL similar to the 32-bit version. Plus, using C code would be better since I want to read the file continously (perhaps every 2 seconds) in MATLAB for real-time analysis.

    As of now, there is no support for 64 bit but it is a possible feature for future releases. Keep an eye on the DLL download page for new versions.
    Sappster

  • How to Read TDMS Files in Matlab in OSX

    Using the example found on the NI website (http://digital.ni.com/public.nsf/allkb/0EEADA99DC​7D00A4862572E30037C3A2), I am able to read my TDMS files into Matlab when using a PC.  However, when I try to read them on my Mac, I receive an error:
    ??? There was an error loading the library "/Applications/MATLAB75/work/TDMS_files/dev/bin/ni​libddc.so"
    Error using ==> loaddefinedlibrary
    dlopen(/Applications/MATLAB75/work/TDMS_files/dev/​bin/nilibddc.so, 1): image not found
    Error in ==> read_tdms at 21
    loadlibrary(DLL_Path, H_Path);
     My best guess for this error is the fact that Matlab operates through a Linux interface on Mac, which I found will open the file type .so and not .dll for this type of library.  Is there some way to get around this in OSX and get it to read the .dll files?  Or is there some way to get the libraries as .so files instead of .dll files?
    Thanks for any help!
    -Shelby

    Shelby,
    You may wish to look at a Matlab script another user wrote since they were having issues with NI's matlab support:
    http://forums.ni.com/ni/board/message?board.id=170​&view=by_date_ascending&message.id=318487#M318487
    The script supposedly converts TDMS files directly in Matlab with no use of NI generated external DLLs.  He was having issues because the NI tools hadn't been updated for the new version of Matlab.

  • Reading TDMS files in Matlab

    I am trying to read TDMS files directly into Matlab using the NI  nilibddc.dll. I have read most of the posts on here but still have a problem...
    Within Matlab I can open and read a file and get the data but I cant find anything that tells me what the sample interval (between samples) is for a particular file. I guess its in the header somewhere but how do I access it?
    I cant find anything that tells what function to use to get it from the header.
    In fact i cant find anyhting that tells me what the functions are in the DLL.
    I tried opening the CHM help file, this has a list of all the functions but when you click on one in the contents it reports 'the address is not valid'. It seems the link is borken somehow in the help file (this is on XP)!
    any help gratefully receieved!
    mike

    hi mike,
    if your data is stored in form of waveforms, this information can be retrieved from the channel:
    Entity
    Property
    Data type
    Description
    tdm_channel
    wf_xname
    string
    Name of the x-channel of the waveform
    tdm_channel
    wf_xunit_string
    string
    Unit text of the x-channel
    tdm_channel
    wf_start_time
    time
    Time stamp for the waveform
    tdm_channel
    wf_start_offset
    double
    Starting offset (to be added to the time stamp)
    tdm_channel
    wf_increment
    double
    Increment
    tdm_channel
    wf_samples
    long
    Number of samples in one shot (needed by LabVIEW when concatenating
    more consecutive shots). This property is used by DIAdem and DataFinder to decide whether the tdm_channel is a waveform (wf_samples > 0) or not (wf_samples = 0, or not existing).
    tdm_channel
    wf_time_pref
    string
    (enum: "absolute" or "relative") Additional information for LabVIEW to
    determine if the x-channel is treated as time (absolute) or as index
    (relative). (not available in LVM)

  • "The file .docx cannot - problems with the contents."

    Word 2007 file HELP!
    I started a paper this morning and saved it as normal, however when I try to reopen it I get the following messege: The file .docx cannot be opened because there are problems with the contents. Does anyone know how to resolve this issue?

    Hi,
    Please check if this applies:
    http://support.microsoft.com/kb/2528942
    Regards,
    Steve Fan
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Problems with the examples in NWDS

    Hi All,
    Running the Welcome example project in NWDS i  have the included error.
    I have problems with other examples too.
    I did all the step by step tutorials.
    I have NWDS 2.0.3
             J2EE 6.40 SP15
             EP 2004
    I am new in NWDS and i have not still successed to run any application.
    What is wrong with my systems?
    I did all the configurations start J2EE /sdm etc.
    Do i have to install other versions? I read that maybe i have to install the same SP 15.
    Please if anybody can help me .
    Thanks,
    Ari 
    Error Summary
    While processing the current request, an exception occured which could not be handled by the application or the framework.
    If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
    Root Cause
    The initial exception that caused the request to fail, was:
    com.sap.tc.webdynpro.services.sal.deployment.api.WDClassLoaderException: Classloader of 'local/Welcome' is null, even though application is started.
    at com.sap.tc.webdynpro.serverimpl.wdc.deployment.DeployableObject.getClassLoader(DeployableObject.java:81)
    at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:588)
    at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
    at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:248)
    at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
    ... 18 more
    Ari

    Thank you for your help,
    I have NWDS 2.0.3 and Web AS 6.40 SP15 and EP 04.
    How can i be sure if  are compatible? Maybe i have to install NWDS SP15?
    I did "Rebuild" and then  "Deploy new archive and run" Deploying i was asking for the sdm password  , then the application opened in a new browser and we can see this message below.
    The Deploy Output View is empty. There is no eny successful deploy message.
    I appreciate your help.
    Thanks,
    Ari
    500   Internal Server Error
      Web Dynpro Container/SAP J2EE Engine/6.40 
    Failed to process request. Please contact your system administrator.
    [Details...]
    Error Summary
    While processing the current request, an exception occured which could not be handled by the application or the framework.
    If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
    Root Cause
    The initial exception that caused the request to fail, was:
       java.lang.InstantiationError: com.sap.tc.webdynpro.progmodel.context.NodeInfo
        at com.sap.examples.welcome.wdp.InternalWelcomeComponent.<init>(InternalWelcomeComponent.java:41)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
        ... 27 more
    See full exception chain for details.
    Correction Hints
    The currently executed application, or one of the components it depends on, has been compiled against class file versions that are different from the ones that are available at runtime.
    If the exception message indicates, that the modified class is part of the Web Dynpro Runtime (package com.sap.tc.webdynpro.*) then the running Web Dynpro Runtime is of a version that is not compatible with the Web Dynpro Designtime (Developer Studio or Component Build Server) which has been used to build + compile the application.
    Note: the above hints are only a guess. They are automatically derived from the exception that occurred and therefore can't be guaranteed to address the original problem in all cases.
    System Environment
    Client
    Web Dynpro Client Type HTML Client
    User agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)
    Version 
    DOM version 
    Client Type msie6
    Client Type Profile ie6
    ActiveX enabled
    Cookies enabled
    Frames enabled
    Java Applets enabled
    JavaScript enabled
    Tables enabled
    VB Script enabled
    Server
    Web Dynpro Runtime Vendor: SAP, Build ID: 6.4015.00.0000.20051123162612.0000 (release=630_VAL_REL, buildtime=2005-12-14:21:51:22[UTC], changelist=377533, host=PWDFM026)
    J2EE Engine No information available
    Java VM Java HotSpot(TM) Server VM, version:1.4.2_07-b05, vendor: Sun Microsystems Inc.
    Operating system Windows 2003, version: 5.2, architecture: x86
    Other
    Session Locale en_US
    Time of Failure Fri Jan 26 14:29:31 EET 2007 (Java Time: 1169814571353)
    Web Dynpro Code Generation Infos
    local/Welcome
    No information available
    sap.com/tcwddispwda
    No information available
    sap.com/tcwdcorecomp
    No information available
    Detailed Error Information
    Detailed Exception Chain
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Failed to create delegate for component com.sap.examples.welcome.WelcomeComponent. (Hint: Is the corresponding DC deployed correctly? Does the DC contain the component?)
         at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:110)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingComponent.<init>(DelegatingComponent.java:38)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.doInit(ClientComponent.java:776)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.init(ClientComponent.java:330)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.init(ClientApplication.java:370)
         at com.sap.tc.webdynpro.clientserver.task.WebDynproMainTask.execute(WebDynproMainTask.java:608)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:59)
         at com.sap.tc.webdynpro.clientserver.cal.ClientManager.doProcessing(ClientManager.java:248)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doWebDynproProcessing(DispatcherServlet.java:154)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:116)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doGet(DispatcherServlet.java:48)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
         at com.sap.tc.webdynpro.progmodel.generation.ControllerHelper.createDelegate(ControllerHelper.java:74)
         ... 26 more
    Caused by: java.lang.InstantiationError: com.sap.tc.webdynpro.progmodel.context.NodeInfo
         at com.sap.examples.welcome.wdp.InternalWelcomeComponent.<init>(InternalWelcomeComponent.java:41)
         ... 31 more

  • Problems with the postal code in address iview ESS.

    I would greatly appreciate if someone answer this threat. I am having this big problem with the address iview. It is not possible to change the postal code in the address iview.

    Can you explain the issue? Means for which country this issue is coming. We faced similar issue. There is some bug in ESS/MSS package itself. You send me details of issue at [email protected] I will reply you back with OSS message answered by SAP if that is a bug.

  • Java EE Tutorial - problem with the example Bookstore

    Hi,
    I've been working few days on a problem running the Bookstore example from the Java EE Tutorial. When I run the application, I'm redirected from the servlet BookStoreServlet to errorpage.html with the following message: The application is unavailable. Please try later. The tutorial troubleshooting reads: ... a servlet can’t retrieve the web context attribute representing the bookstore. This will occur if the database server hasn’t been started. But the database server is running (I'm running Derby bundled into NetBeans 6.5). The Glassfish admin console reads:
    StandardWrapperValve[BookStoreServlet]: PWC1406: Servlet.service() for servlet BookStoreServlet threw exception
    com.sun.bookstore.exception.BookNotFoundException: Couldn't find book: 203
            at com.sun.bookstore1.database.BookDBAO.getBook(BookDBAO.java:58)
            at com.sun.bookstore1.servlets.BookStoreServlet.doGet(BookStoreServlet.java:76)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
            at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:333)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
            at com.sun.bookstore1.filters.HitCounterFilter.doFilter(HitCounterFilter.java:71)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:313)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
            at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
            at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648)
            at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1096)
            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:288)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:647)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:579)
            at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:831)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
            at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
            at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:380)
            at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
            at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)This would indicate that the tables are empty, but they were created according to the tutorial, with the command ant create-tables, and I can see their content in NetBeans. Please help, I really need to run the examples.
    Best regards,
    Rene Puchinger

    I solved the problem running the command that is correctly explained in the page 97 of the tutorial:
    Ant create-tables
    My mistake was that until that day, I was believing that I could do everything inside Netbeans.
    For this you explicitly need to use ant.
    Then I got some error which I solved fixing the file
    C:\Java\JavaEETutorial5\examples\bp-project\ build.properties
    ( like set correctly the path to the server and so on)

  • The problem with the return code of JOptionPane

    I debug the follow code, when I press button No, return code is 0, but OpenXLSFile(ResultXSLName); executed, why?
    the result is whether I press YES or NO, the if condition will be true
    how to compare the return code?
              int open = JOptionPane.showConfirmDialog(null, "Do you want Open the result File \"" + ResultXSLName + "\" ?", "Confirm", JOptionPane.YES_NO_OPTION);
              if (JOptionPane.YES_OPTION == open);
                   OpenXLSFile(ResultXSLName);
              }Edited by: Kevin.Tong on Feb 26, 2008 7:26 PM

    the result is whether I press YES or NO, the if condition will be truethis line will execute
    OpenXLSFile(ResultXSLName);regardless of the condition being true or false,
    because the if statement terminates at the semi-colon
    if (JOptionPane.YES_OPTION == open);<------------------

  • A Problem with the JavaScript Code can anybody help me

    Hi every body,
    I prepared a html page using the following code, which i grab it from some web site, and used it in my web project,
    but the code that is not working and it is showing some javascript error, can anybody correct it for me please, the code is as follows
    <html>
    <head>
    <title>Contact Form</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    // CSS goes here
    </style>
    <script language="JavaScript">
    function checkForm()
       var cname, cemail, csubject, cmessage;
       with(window.document.msgform)
          cname    = sname;
          cemail   = email;
          csubject = subject;
          cmessage = message;
       if(trim(cname.value) == '')
          alert('Please enter your name');
          cname.focus();
          return false;
       else if(trim(cemail.value) == '')
          alert('Please enter your email');
          cemail.focus();
          return false;
       else if(!isEmail(trim(cemail.value)))
          alert('Email address is not valid');
          cemail.focus();
          return false;
       else if(trim(csubject.value) == '')
          alert('Please enter message subject');
          csubject.focus();
          return false;
       else if(trim(cmessage.value) == '')
          alert('Please enter your message');
          cmessage.focus();
          return false;
       else
          cname.value    = trim(cname.value);
          cemail.value   = trim(cemail.value);
          csubject.value = trim(csubject.value);
          cmessage.value = trim(cmessage.value);
          return true;
    function trim(str)
       return str.replace(/^\s+|\s+$/g,'');
    function isEmail(str)
       var regex = /^[-_.a-z0-9]+@(([-_a-z0-9]+\.)+(ad|ae|aero|af|ag|
    ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|
    bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|
    ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|
    dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|
    gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|
    hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|
    kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|
    ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|
    mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|
    nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|
    re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|
    su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|
    ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|
    zm|zw)|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i;
    return regex.test(str);
    </script>
    </head>
    <body>
    <form method="post" name="msgform">
    <table width="500" border="0" align="center" cellpadding="2" cellspacing="1" class="maincell">
    <tr>
    <td width="106">Your Name</td>
    <td width="381"><input name="sname" type="text" class="box" id="sname" size="30"></td>
    </tr>
    <tr>
    <td>Your Email</td>
    <td>
    <input name="email" type="text" class="box" id="email" size="30">
    </td></tr>
    <tr>
    <td>Subject</td>
    <td><input name="subject" type="text" class="box" id="subject" size="30"></td>
    </tr>
    <tr>
    <td>Message</td>
    <td><textarea name="message" cols="55" rows="10" wrap="OFF" class="box" id="message"></textarea></td>
    </tr>
    <tr align="center">
    <td colspan="2"><input name="send" type="submit" class="bluebox" id="send" value="Send Message" onClick="return checkForm();"></td>
    </tr>
    <tr align="center">
    <td colspan="2"> </td>
    </tr>
    </table>
    </form>
    </body>
    </html>

    function isEmail(str)
       var regex = /^[-_.a-z0-9]+@(([-_a-z0-9]+\.)+(ad|ae|aero|af|ag|
    ai|al|am|an|ao|aq|ar|arpa|as|at|au|aw|az|ba|bb|bd|be|bf|bg|
    bh|bi|biz|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|
    ch|ci|ck|cl|cm|cn|co|com|coop|cr|cs|cu|cv|cx|cy|cz|de|dj|dk|
    dm|do|dz|ec|edu|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|
    gd|ge|gf|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|
    hr|ht|hu|id|ie|il|in|info|int|io|iq|ir|is|it|jm|jo|jp|ke|kg|
    kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|
    ma|mc|md|mg|mh|mil|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|museum|
    mv|mw|mx|my|mz|na|name|nc|ne|net|nf|ng|ni|nl|no|np|nr|nt|nu|
    nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|pro|ps|pt|pw|py|qa|
    re|ro|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|
    su|sv|sy|sz|tc|td|tf|tg|th|tj|tk|tm|tn|to|tp|tr|tt|tv|tw|tz|
    ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|ye|yt|yu|za|
    zm|zw)|(([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5])\.){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5]))$/i;
    return regex.test(str);
    Remove all enter sequences inbetween lines in the above function. It vl work.
    All d Best :-)

  • Problem with the examples of Transmitting and Receiving Custom RTP Payloads

    I have tried the examples of this web:
    http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/solutions/CustomPayload.html
    Transmitting and Receiving Custom RTP Payloads
    I run the examples all right.
    But I want to transmit the sound using my own format, so i want to change the file PcmPacketizer.java
    and PcmDepacketizer.java
    I think the sound data is in the byte[] inData ---- {byte[] inData = (byte[])inBuf.getData();}
    so i change the data with my own function, so the inData have the diffrent length:
    then i transmit the data with the packet header
    public synchronized int process(Buffer inBuf, Buffer outBuf) {
    int inLength = inBuf.getLength();
    byte[] inData = (enbase((byte[])inBuf.getData()));
    byte[] outData = (byte[])outBuf.getData();
         if (outData == null || outData.length < PACKET_SIZE) {
         outData = new byte[PACKET_SIZE];
         outBuf.setData(outData);
         // Generate the packet header.
         int rate = (int)inFormat.getSampleRate();
         int size = (int)inFormat.getSampleSizeInBits();
         int channels = (int)inFormat.getChannels();
         outData[0] = 0;     // filler
         outData[1] = (byte)((rate >> 16) & 0xff);
         outData[2] = (byte)((rate >> 8) & 0xff);
         outData[3] = (byte)(rate & 0xff);
         outData[4] = (byte)inFormat.getSampleSizeInBits();
         outData[5] = (byte)inFormat.getChannels();
         outData[6] = (byte)inFormat.getEndian();
         outData[7] = (byte)inFormat.getSigned();
         int frameSize = inFormat.getSampleSizeInBits() * inFormat.getChannels();
         // Recompute the output format if the input format has changed.
         // The crucial info is the frame rate and size. These are used
         // to compute the actual rate the data being sent.
         if (rate != (int)outFormat.getFrameRate() ||
         frameSize != outFormat.getFrameSizeInBits()) {
              outFormat = new AudioFormat(CUSTOM_PCM,
                        AudioFormat.NOT_SPECIFIED, // rate
                        AudioFormat.NOT_SPECIFIED, // size
                        AudioFormat.NOT_SPECIFIED, // channel
                        AudioFormat.NOT_SPECIFIED, // endian
                        AudioFormat.NOT_SPECIFIED, // signed
                        size * channels,     // frame size
                        rate,               // frame rate
                        null);
    if (inLength + historyLength >= DATA_SIZE) {
         // Enough data for one packet.
                   int copyFromHistory = Math.min(historyLength, DATA_SIZE);
                   System.arraycopy(history, 0, outData, HDR_SIZE , copyFromHistory);
    int remainingBytes = DATA_SIZE - copyFromHistory;
    System.arraycopy(inData, inBuf.getOffset(),
                   outData, copyFromHistory + HDR_SIZE, remainingBytes);
    historyLength -= copyFromHistory;
    inBuf.setOffset( inBuf.getOffset() + remainingBytes);
    inBuf.setLength( inLength - remainingBytes);
         outBuf.setFormat(outFormat);
         outBuf.setLength(PACKET_SIZE);
         outBuf.setOffset(0);
    return INPUT_BUFFER_NOT_CONSUMED ;
    if (inBuf.isEOM()) { // last packet
    System.arraycopy(history, 0, outData, HDR_SIZE, historyLength);
    System.arraycopy(inData, inBuf.getOffset(),
                   outData, historyLength + HDR_SIZE, inLength);
         outBuf.setFormat(outFormat);
         outBuf.setLength(inLength + historyLength + HDR_SIZE);
         outBuf.setOffset(0);
    historyLength = 0;
    return BUFFER_PROCESSED_OK;
    // Not enough data for one packet. Save the remainder
         // for next time.
    System.arraycopy(inData, inBuf.getOffset(),
                   history, historyLength,inLength) ;
    historyLength += inLength;
    return OUTPUT_BUFFER_NOT_FILLED ;
    I think I change the data use my own function debase(), so i should decode the data in the file:PcmDepacketizer.java
    but int PcmDepacketizer.java the example is so simple that i don't know how to find and change the data.
    there is only a few lines here:
    Object outData = outBuf.getData();
         outBuf.setData(inBuf.getData());
         inBuf.setData(outData);
         outBuf.setLength(inBuf.getLength() - HDR_SIZE);
         outBuf.setOffset(inBuf.getOffset() + HDR_SIZE);
         System.out.println("the outBuf length is "+inBuf.getLength());
    I write a function : public static byte [] debase(byte[] str)
    but i don't know where can i use it.
    please tell me what should i do or where is wrong about my thought.

    the function in PcmPackettizer.java is
    public static byte[] enbase(byte [] b) {
         ByteArrayOutputStream os = new ByteArrayOutputStream();
         //byte[] oo = new byte[(b.length + 2) / 3*4];
         //for (int i = 0; i < (b.length + 2) / 3; i++) {
         for (int i = 0; i < (b.length + 2) / 3; i++) {
              short [] s = new short[3];
              short [] t = new short[4];
              for (int j = 0; j < 3; j++) {
                   if ((i * 3 + j) < b.length)
                        s[j] = (short) (b[i*3+j] & 0xFF);
                   else
                        s[j] = -1;
              t[0] = (short) (s[0] >> 2);
              if (s[1] == -1)
                   t[1] = (short) (((s[0] & 0x3) << 4));
              else
                   t[1] = (short) (((s[0] & 0x3) << 4) + (s[1] >> 4));
              if (s[1] == -1)
                   t[2] = t[3] = 64;
              else if (s[2] == -1) {
                   t[2] = (short) (((s[1] & 0xF) << 2));
                   t[3] = 64;
              else {
                   t[2] = (short) (((s[1] & 0xF) << 2) + (s[2] >> 6));
                   t[3] = (short) (s[2] & 0x3F);
              for (int j = 0; j < 4; j++)
                   os.write(t[j]);
                   //os.write(t[j],(3*i+j),1);
                   //os.write(Base64.charAt(t[j]));
         //return new String(os.toByteArray());
         return os.toByteArray();
    just like the base64 function

  • Importing m2ts files but having problems with the audio layer

    Hi all, I'm new to the whole video editing side of things and so would appreciate some help.
    I've just bought myself a Canon HF200 HD camcorder, and a Sony Vaio notebook which came with Premiere Elements 7.0 pre-installed.
    For the last month I've been shooting footage, and just getting down to trying to edit everything and put a DVD together.
    The problem I have at the moment (and I've just started using the program, so everything is new to me) is that while I seem to be able to import the m2ts file format that my Canon records, only the video is imported into Premiere - not the audio.
    I can play all my videos in Windows Media Player just fine, with both video and audio.  So it seems my machine is able to read the files correctly in this program.  However, the audio seems to drop out when I import the file into Premiere.  The program was pre-installed in my machine, and when I go in to have a look at the audio settings, there doesn't seem to be an ability to change the settings to something different.
    So far I've spent a long time googling and trying to find a solution, but with no joy just yet.
    Appreciate any assistance the anyone can offer.
    Thanks.
    Jeff

    Hi there
    I think I sorted it. If you look at the Premiere Pro forum, on the right is a box with a link to "Forum Best Practices".
    Click the image below for larger view.
    Being a good first time poster, you read that. But the problem is, it places you inside the Forum Comments forum. So when you choose to Create a Discussion, you aren't creating the discussion in the Premiere Pro forum. Instead, you are creating it in the Forum Comments forum.
    Looks like perhaps a forum mod needs to work on this and create a duplicate thread in the forums in question.
    Cheers... Rick

  • The specified Brick has reported multiple excessive load conditions during read or write, indicating a problem with the Brick. If the problem continues

    I want to know what is the reason for this alarm. and is it hardware or software issue.

    I want to know what is the reason for this alarm. and is it hardware or software issue.

  • I have problem with the eror code 1009  when its on the net

    i want to know about eror 1009 when phone is
    on the net

    and what did a Google search for "iPhone error 1009" give you?

  • Does anyone know how to read in a TDMS file into Matlab?

    I am trying to read a TDMS file into Matlab. Are the two compatible? How can I import this file into matlab?

    A search can turn up wonderful things, such as:
    Reading TDM/TDMS Files with The MathWorks, Inc. MATLAB® Software

Maybe you are looking for

  • Dynamic sql query

    Hi, i neeed to create a table of data of other tables which needs to be executed in cursor level, for eg i need to create CURSOR cur IS select object_name from user_objects where object_type = 'TABLE' and object_name like '%JSP%' and rownum<3; creata

  • Paragraph styles reassured .js to .jsx

    Hi folks, could use a littele help: Who knows how to translate the following old script to work with InDesign CS 6 and CC?: 1 myStyles = app.documents[0].paragraphStyles; 2 app.findPreferences = null; 3 app.changePreferences = null; 4 for (var n = 1;

  • My iTunes Won't Start. Help Me.

    Ok, well first, a couple weeks ago, my iphone wouldn't sync, so i just ejected it and tried again. When it didn't work again i turned my computer off and tried turning iTunes back on and nothing happened. No matter which way i try: desktop, files, st

  • No sim

    No sim message

  • More CS2 Problems.

    I had problems installing adobe cs2, computer froze, had to go into safe mode, etc. I did my software update and was able to install everything but my newest problem is that ONLY photoshop will work. Indesign and Illustrator come up with some error a