Problem: Creating groups out of a set of points in 2D space based on their relative proximity

Hi,
I'm new to LabVIEW and I've tried doing this several times, but I just can't solve it.
Problem:
I've got a set of points in the 2D space(x,y), and I want to calculate the mean of the sets of closely spaced points.
Example:
Consider 5 points, A(1,2); B(2,3); C(100,200); D(120,220); E(110,210); F(500,600)
I'm trying to get the output a set of points
P[ (1+2)/2 , (2+3)/2 ]
Q[ (100+120+110)/3, (200+210+220)/3 ]
S[ 500, 600 ]
Where the outputs are the means of the points taken in sets which are composed of "closely" paced points(within a limit).
I.e.., (A,B) are close; (C,D,E) are close, while E is separated from the rest, within a small limit(say 30).
This has been causing a lot of problems for me recently and I have to solve it. Image included.
Any suggestions/ideas are most welcome.
Thanks in advance.
Solved!
Go to Solution.
Attachments:
Problem_1.png ‏9 KB

Hi,
"Data clustering" is exactly what I was looking for, and I checked the link. Very informative. Thanks on that.
I didn't post my code intentionally because it's very cluttered and inefficient.(I've just started using Labview).
But my Algorithm is simple and trivial.
1. Take any one point and compare it with every other point within a limit(say L).
2. If comparable, then add an entry into a 2D array, if non-existent else just ignore(points have already been accounted for).
    (The 2Darray  has each column representing a collection of comparable points,i.e. 1 group and N such columns for N point in all)
3. Repeat steps 1 and 2 for the remaining points.
4. Finally, construct a 1D array, with each element representing the mean point based on values taken per column from the 2D array.
Also, this Algorithm works fine for my application(less than 30 points), so I haven't tested it for a large number of points.
I bet It'll be highly inefficient, considering the more widely use clustering algorithms out there.
However, if you know of any VI's or simple algorithms for such(small data set), it would be highly beneficial to me.

Similar Messages

  • Create an area from a set of points

    How to create an area from a set of points ? I searched everywhere but could not find a better solution for it. Let�s say that I have a matrix that contains the points for a shape. I�ll need a way to connect the points near each other continuously to form the outline for the shape.
    Thanks fro any feedback.

    ... But I'll also need a way to connect
    those points in an order so that they'll form the
    path (edge) of the shape.Do you mean the Convex Hull [1] of a set of points?
    If so, you could find it by implementing a Graham Scan [2] algorithm and then calculating the area of the polygon [3].
    [1] http://mathworld.wolfram.com/ConvexHull.html
    [2] http://en.wikipedia.org/wiki/Graham_scan
    [3] http://mathworld.wolfram.com/PolygonArea.html

  • Problem creating walk-out videos

    I'm trying to create a walk-out video by exporting from After Effects, using the VP6 codec. Sound didn't export, so I brought a WAVE file into a Flash stage and saved as swf. Brought the swf on a layer in Dreamweaver. The audio is unacceptable. When exported from another codec or directly to flv in AF, the transparency is lost, but the audio plays okay. Obviously, there's a better way to do this, like the website http://www.talkingheads.com/ .
    Here's what I've got so far http://www.cestcop.com/Heads/Mike_3.htm
    Thanks ahead for your help!
    -Mike Carroll

    When exported from another codec or directly to flv in AF, the transparency is lost,
    Make sure you are actualyl enabling Alpha channel usage. aside from that, transparency usage requires proper support in whatever player you use to embed, usualyl by setting variables in the surrounding JS code. Since the performance hit is considerable, it's optional and off by default. Similarly, your audio issues could be just that. Also sounds like you're embedding teh video and audio in the SWF, which is fundamentally evil. Keep them external and stream them to the stage, rather than making the player cringe by enforcing synchronous redraw of the whole SWF...
    Mylenium

  • How to create an Area(or shape) from a set of points?

    In fact I want to accomplish a function which can fill an area of same color on an image, just like the Magic Wand tool in Photoshop.
    I have written a function to figure out the points which should be included in the Area, but I don't know how to create the Area from a set of points...:(
    I tried to create Rectengel2D from each point, the union them one by one, but it's too slow
    Anyone can help me? Thanks

    you should look att the fillPolygon api instead, it can draw more than one corner.
    I would use it in a paintComponent method and a method that creates the x and y cordinates for each corner.
    API HELP:
    http://jdrawing.sourceforge.net/doc/0.2.1/api/org/jdrawing/graphics/FillPolygon.html

  • Create waveform from a set of points with differtent time intervals

    Hello,
    I would like to create a waveform from a set of points like this
    Time           Data
    0                 0
    0,5              1
    0,6              2
    1                 1
    2                 0
    5                 1
    The problem is that the time interval between each points are not the same.
    The only idea I found was to create a waveform for each doublet of points with the same rate (100ms) and than to append them together.
    Does anybody have a better idea?
    Regards,
    Risotto.

    If you use a Wave From data type, re-sampling is not required.
    When using a WF datatype the chart (graph) will pick-up the X value from the t0 of the waveform.
    The trick is to just build an array of the single update value and make sure the t0 value is correct.
    Re-create this example
    and try it for yourself.
    Ben
    Note: make sure the data you pass is consistant with the data already displayed. If you post a t0 value that is older than what is already displayed, the chart will clear the display and start over.
    Message Edited by Ben on 09-15-2006 11:49 AM
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction
    Attachments:
    WF_Datatype.JPG ‏59 KB

  • Result set problem with GROUP BY

    hi there, this should be the simplest of queries but.........
    when run, the list size is 13, this is the number of letting units in the table. it appears not to be grouping by the property id.if it was doing this there should only be 8 rows. having said this, the while loop should output the count of each row, it does this 8 times with the correct counts. it then crashes with a invalid curser error. it appears the query is workig correctly but the resultset thinks its got 13 rows when it only has 8.
    accessing ms access db
    using jdbc:odbc
    heres the code
    searchResults = stmt.executeQuery(
    "SELECT Count(*) AS FreeUnits " +
    "FROM letting_units " +
    "GROUP BY letting_units.property_id");
    searchResults.last();
    listSize = searchResults.getRow();
    searchResults.beforeFirst();
    System.out.println(listSize);
    while (searchResults.next())
    System.out.println(searchResults.getString(1));
    hope someone can help me
    cheers
    andy

    It's not the problem with GROUP BY. You should use scrollable result set to move in both directions (forward and backward).
    In your code
    searchResults.beforeFirst(); line may return false. So you will get the searchResults.next() false. Once you move forward in non-scrollable cursor cannot come back. So when you create the statement object use TYPE_SCROLL_INSENSITIVE or TYPE_SCROLL_SENSITIVE constants provided in the ResultSet.

  • HT3529 How do I send a group text, I have set up groups in my gmail account but can't figure out how to send a group text without adding them all individually

    How do I send a group text message, I have groups set up in my gmail account but can't figure out how to send a group text without adding them all individually ?

    You can use iCloud:
    Step 1. Log into www.icloud.com using your Apple ID.
    Step 2. Click on Contacts and then click the groups ribbon (the red icon with two people) which is on the left-hand page when viewing All Contacts.
    Step 3. The left page changes to a list of Groups (only those groups stored in iCloud are shown). Click the + button at the bottom to add a new group.
    Step 4. Type a name for the new group and press Enter to save it. To change it after this, double-click its entry in the groups list.
    Step 5. To add contacts to the new group, click on the All Contacts group and locate the first person to be added (you can use the search bar to find them quickly).
    Step 6. Drag their name on top of the new group and drop it to add it to that group.
    Step 7. To add more contacts, repeat steps 5 and 6, but you can add multiple contacts at once by pressing Ctrl (on a PC) or Command (on a Mac) and clicking on each contact in the list that you wish to select. Then, drag one of the highlighted names to the new group and they will all be added.
    It's possible to add names to more than one group, and you can create as many groups as you like.
    Step 8. Launch the Contacts app on your device (iPhone, iPod touch or iPad) and you should see the new group appear almost immediately - as long as you have an internet connection.
    Until Apple builds in a function to create groups directly within the Contacts app, this is the best way to do it.

  • I also am having problems creating cd cover. When I try to print onlt text comes out picture art is 1 big black square. cannot load library error shows up 126. Do anyone have a solution for this problem?

    Having problem creating cd cover.When I try to print one out only text print no picture. Error message appears "cannot load library"LXBBPRP,DLL Default error126. Anyone have a solution to this problem?

    One other note I do have parallels installed but not running on both machines.
    Make sure on both machines that even if Parallels is not running that the two VPNs it creates in System Preferences > Network are set to Off.
    Also make sure that in System Preferences > Sharing that Internet Sharing is nnot ON.
    Later you will have to adjust the Parallels setting to NOT Share the Mac IP.
    10:18 PM Sunday; June 1, 2008

  • Problem in creating group above AND group left in one report!

    Hi all,
    I need a report that is a combination of group above and group
    left.
    Suppose I have 3 table (Emp, Sales, Product):
    Emp Table has 2 column
    - Emp_PK
    - Emp_Name
    Sales Table has 4 column
    -Sales_PK
    -Sales_Date
    -Emp_FK
    -Produck_FK
    -Quantity
    Product Table has 3 column
    -Product_PK
    -Product_Name
    -Product_Price
    I want to make Employee Sales Report For The Month that will
    look like this:
    Emp Number___: Emp_PK
    Emp Name_____: Emp_Name
    Sales Date______Product_Name____Quantity \(2 sales
    ________________Product_Name____Quantity /the date)
    Sales_Date______Product_Name____Quantity
    As you can see this consist of group above (The Employee) and
    group left (The Sales and Product).
    I create this by using 2 queries and link them (the Emp_PK from
    1st query and Emp_FK from 2nd query) on the report builder using
    data link.
    The first query is:
    Select Emp_PK, Emp_Name from Emp
    The second query is
    Select Emp_FK, Sales_Date, Product_Name, Quantity
    From Sales, Product
    Where Product_PK=PRODUCT_FK
    I then create the layout for second query and choose group left
    for Sales_Date using wizard and I create additional layout to
    for the employee.
    The problem is that when I run this report, it will print ALL
    the employee record first (including employee who has NOT sale
    anything) and then on the last page it will print the record of
    Last employee on the Emp table and ALL sales record (including
    those that is done by other employee).
    This report will run correctly if I choose an exact employee
    (For example by adding Where Emp_PK=1111 in the first query) to
    report all of the sales done by this person (employee with emp
    number of 1111). However I need the report to run and print
    ONLY those employee who has Sales Records!
    I thought that by linking the 2 queries in Data Model, it will
    have the same effect as linking using the WHERE clause in query.
    If suppose I create a query like this:
    SELECT Emp_PK, Emp_Name, Sales_Date, Product_Name, Quantity
    FROM Emp, Sales, Product
    WHERE Emp_PK=Emp_FK AND Product_PK=Product_FK
    The report will run OK but I can only choose EITHER group above
    or group left for this ONE query methods in report Wizard.
    Sorry if it is a long question but I hope you can see what I am
    trying to do.
    Thanks in advance for any tip.

    hello,
    of course you can create group left and group above blocks in a
    single report.
    you might want to use the INSERT REPORT BLOCK instead of the
    report wizard, as the report wizard only allows you to use one
    report layout per report, where the report block wizard (invoked
    by INSERT REPORT BLOCK) allows you to choose on a per-block
    basis.
    of course you can create the blocks completely from scarth by
    hand, if you want to.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Lync 2013 I have a strange problem concerning group call pickup in lync 2013.the pickup calls on snom 710 having only a second delay, but in lync client it having about 5-7 second Anybody out there having similar problems with call pickup Groups?

    HI
    I have a strange problem concerning  group call pickup  in lync 2013.the pickup calls on snom 710 having only a second delay, but in lync client it having  about 5-7 second
    Anybody out there having similar problems with call pickup Groups?

    Hi,
    Did you meet any other call delay when you using Lync?
    As the issue happen for Lync desktop client, it can be performance issue. Please check if there is any error message from FE Server when the issue happen.
    Also please check if you have updated Lync Server to the latest version, if not, update it and then test again.
    Best Regards,
    Eason Huang  
    Eason Huang
    TechNet Community Support

  • Problem in Dynamically create Group ui element

    Hi everyone,
    I was trying to create group UI element  dynamically in Webdynpro ABAP. I was getting Error :Access via 'NULL' object reference not possible.
    I have gone through the following procedure
    Create component with window and view
    In view layout Method: WDDOMODIFYVIEW and done the following code
      Source Code
    if first_time  = ABAP_TRUE.
    data:lr_container type REF TO CL_WD_UIELEMENT_CONTAINER,
          lr_flowdata TYPE REF TO cl_wd_flow_data,
          lr_group TYPE REF TO cl_wd_group,
          object type REF TO IF_WD_VIEW_ELEMENT.
    CALL METHOD view->get_root_element
       receiving
         root_view_element = object.
    lr_container ?= object.
    CALL METHOD cl_wd_group=>new_group
       EXPORTING
         design                   = 01
         enabled                  = ABAP_TRUE
         has_content_padding      = ABAP_TRUE
         id                       = 'GRP1'
         view                     = VIEW
         visible                  = 02
       receiving
         control                  = lr_group.
    CALL METHOD lr_container->add_child
       EXPORTING
         the_child = lr_group.
    CALL METHOD cl_wd_flow_data=>new_flow_data
       EXPORTING
         element     = lr_group
       receiving
         control     = lr_flowdata.
    endif.
    To get Group ui element dynamically what i have to do rather than the above code
    Thanks in Advance
    Sreenivas P

    Hi Sreenivas,
    Try to debug and find what line the error occurs and return it to us.
    If the error occurs in
    CALL METHOD view->get_root_element
       receiving
         root_view_element = object.
    or in
    lr_container ?= object.
    you will need to check content of object.
    Best regards

  • Problem creating items in a folder owned by another user

    Hi
    Iam getting an exception when i try to create a folder owned (or shall i say) created by another user.Let me explain what iam doing :
    1. I have created a folder "INPRISE" under "/home".I have
    created an ACL "MyAcl" having group INPRISEGROUP
    as the ACE having all permissions.I have set the ACL "MyAcl" on the folder "INPRISE".
    2. I have created two users i1 and i2
    and placed them in the group INPRISEGROUP .Both these users have a link under thei home folder to "INPRISE" folder(achieved by using and addItem()).
    3. I could successfully login as i1 and create a folder "WebApps" under "INPRISE" and upload a document "A.txt" under "WebApps".
    4.But when i log in as "i2" and try to create a document "B.txt" under "WebApps" which was created by user "i1" i get the following exception :
    javawebserver: Got the user
    javawebserver: got the primary user profile
    javawebserver: THE HOME FOLDER IS --> i1
    javawebserver: The home folder name is --> i1
    javawebserver: home folder
    javawebserver: Got the user
    javawebserver: got the primary user profile
    javawebserver: THE HOME FOLDER IS --> i1
    javawebserver: The home folder name is --> i1
    javawebserver: home folder
    javawebserver: Got the user
    javawebserver: got the primary user profile
    javawebserver: THE HOME FOLDER IS --> i1
    javawebserver: The home folder name is --> i1
    javawebserver: home folder
    javawebserver: **********Creating document in /home/i1/INPRISE/WebApps
    javawebserver: Created document..
    javawebserver: Setting permissions for the document....
    javawebserver: setting the access level
    javawebserver: Got the user
    javawebserver: got the primary user profile
    javawebserver: THE HOME FOLDER IS --> i2
    javawebserver: The home folder name is --> i2
    javawebserver: home folder
    javawebserver: Got the user
    javawebserver: got the primary user profile
    javawebserver: THE HOME FOLDER IS --> i2
    javawebserver: The home folder name is --> i2
    javawebserver: home folder
    javawebserver: Got the user
    javawebserver: got the primary user profile
    javawebserver: THE HOME FOLDER IS --> i2
    javawebserver: The home folder name is --> i2
    javawebserver: home folder
    javawebserver: **********Creating document in /home/i2/INPRISE/WebApps
    javawebserver: Error while creating document.....
    javawebserver: oracle.ifs.common.IfsException: IFS-30002: Unable to create new
    LibraryObject
    javawebserver: oracle.ifs.common.IfsException: IFS-30048: Insufficient access t
    o add items to a Folder
    javawebserver: oracle.ifs.common.IfsException: IFS-30030: Permission not grante
    d on specified ACL
    javawebserver: at java.lang.Throwable.<init>(Compiled Code)
    javawebserver: at java.lang.Exception.<init>(Compiled Code)
    javawebserver: at org.omg.CORBA.UserException.<init>(Compiled Code)
    javawebserver: at oracle.ifs.common.IfsException.<init>(Compiled Code)
    javawebserver: at oracle.ifs.common.IfsException.<init>(Compiled Code)
    javawebserver: at oracle.ifs.common.IfsException.<init>(Compiled Code)
    javawebserver: at oracle.ifs.server.S_AccessControlList.verifyStandardPermissi
    onEnabled(S_AccessControlList.java:602)
    javawebserver: at oracle.ifs.server.S_PublicObject.verifyPublicObjectPermissio
    n(S_PublicObject.java:2169)
    javawebserver: at oracle.ifs.server.S_Folder.verifyCanAddItem(S_Folder.java:10
    05)
    javawebserver: at oracle.ifs.server.S_Folder.addReference(S_Folder.java:719)
    javawebserver: at oracle.ifs.server.S_Folder.addReference(S_Folder.java:697)
    javawebserver: at oracle.ifs.server.S_PublicObject.postCreateAddToFolder(S_Pub
    licObject.java:2753)
    javawebserver: at oracle.ifs.server.S_PublicObject.extendedPostInsert(S_Public
    Object.java:995)
    javawebserver: at oracle.ifs.server.S_LibraryObject.postInsert(S_LibraryObject
    .java:1341)
    javawebserver: at oracle.ifs.server.OperationState.executeAtomicOperations(Com
    piled Code)
    javawebserver: at oracle.ifs.server.S_LibraryObject.createInstance(S_LibraryOb
    ject.java:2348)
    javawebserver: at oracle.ifs.server.S_LibrarySessio n.newLibraryObject(S_Librar
    ySession.java:6596)
    javawebserver: at oracle.ifs.server.S_LibrarySession.newPublicObject(S_Library
    Session.java:6637)
    javawebserver: at oracle.ifs.server.S_LibrarySession.newPublicObject(S_Library
    Session.java:6619)
    javawebserver: at oracle.ifs.server.S_LibrarySession.DMNewPublicObject(S_Libra
    rySession.java:6407)
    javawebserver: at oracle.ifs.beans.LibrarySession.DMNewPublicObject(LibrarySes
    sion.java:6913)
    javawebserver: at oracle.ifs.beans.LibrarySession.NewPublicObject(LibrarySessi
    on.java:4564)
    javawebserver: at oracle.ifs.beans.LibrarySession.createPublicObject(LibrarySe
    ssion.java:2562)
    javawebserver: at oracle.ifs.utils.common.PublicObjectUtilities.createDocument
    (PublicObjectUtilities.java:537)
    javawebserver: at oracle.ifs.utils.common.PublicObjectUtilities.putAsDocumentW
    ithVersioning(PublicObjectUtilities.java:163)
    javawebserver: at oracle.ifs.adk.filesystem.IfsFileSystem.createDocument(IfsFi
    leSystem.java:922)
    javawebserver: at dp.DPDocManager.uploadDocument(DPDocManager.java:374)
    javawebserver: at ifs.jsp_sbin._dp._dpDoc._jspService(_dpDoc.java:115)
    javawebserver: at oracle.ifs.protocols.http.jsp.pagecompile.jsp.runtime.HttpJs
    pBase.service(HttpJspBase.java:94)
    javawebserver: at javax.servlet.http.HttpServlet.service(Compiled Code)
    javawebserver: at oracle.ifs.protocols.http.jsp.IfsJspServlet.runServlet(IfsJs
    pServlet.java:865)
    javawebserver: at oracle.ifs.protocols.http.jsp.IfsJspServlet.processJspPage(C
    ompiled Code)
    javawebserver: at oracle.ifs.protocols.http.jsp.IfsJspServlet.service(IfsJspSe
    rvlet.java:240)
    javawebserver: at javax.servlet.http.HttpServlet.service(Compiled Code)
    javawebserver: at com.sun.server.ServletState.callService(ServletState.java:22
    6)
    javawebserver: at com.sun.server.ServletManager.callServletService(ServletMana
    ger.java:936)
    javawebserver: at com.sun.server.ProcessingState.invokeTargetServlet(Processin
    gState.java:423)
    javawebserver: at com.sun.server.http.HttpProcessingState.execute(HttpProcessi
    ngState.java:79)
    javawebserver: THE ERROR MESSAGE IS IFS-30002: Unable to create new LibraryObje
    ct
    javawebserver: Setting permissions for the document....
    javawebserver: setting the access level
    javawebserver: at com.sun.server.http.stages.Runner.process(Runner.java:79)
    javawebserver: at com.sun.server.ProcessingSupport.process(Compiled Code)
    javawebserver: at com.sun.server.Service.process(Service.java:204)
    javawebserver: at com.sun.server.http.HttpServiceHandler.handleRequest(HttpSer
    viceHandler.java:374)
    javawebserver: at com.sun.server.http.HttpServiceHandler.handleRequest(Compile
    d Code)
    javawebserver: at com.sun.server.HandlerThread.run(Compiled Code)
    javawebserver:
    javawebserver:
    javawebserver: Error during JSP page processing: /ifs/jsp-bin/dp/dpDoc.jsp
    javawebserver: java.lang.NullPointerException
    The Code is :
    package dp;
    import oracle.ifs.beans.*;
    import oracle.ifs.common.*;
    import oracle.ifs.beans.parsers.*;
    import oracle.ifs.adk.security.*;
    import oracle.ifs.adk.filesystem.*;
    import java.io.*;
    import java.util.Locale;
    import javax.servlet.http.*;
    * The document manager bean for the Deal Planner app.
    * <p>
    * This class provides a login session/creates a new account in the IFS. The class
    * implements the <code>IfsHttpLogin</code> interface so it can share login data with other
    * beans.
    * @author Srinivas Sampige
    * @version 1.0
    * @see IfsHttpLogin
    public class DPDocManager implements IfsHttpLogin
    private String userName = "";
    private LibrarySession ifsSession = null;
    private FolderPathResolver fPathResolver = null;
    private IfsFileSystem ifsFileSystem; // File System object
    public DPDocManager()
    {//does nothing
    *Creates a new account in the IFS for
    *a new deal when the deal code is passed in.
    *@ param dealCode The deal code of the deal for which an account has to be created
    *@ param password A system generate d password for the account being created.
    *@ return String Will return "SUCCESS" on creating the account or the reason if an
    * error occurrs.
    public String createDealFolder(String dealCode)
    String result = "SUCCESS";
    try
    ifsSession = getIfsConnection("system","manager","ServerManager","i5ifs");
    ifsSession.setAdministrationMode(true);
    //create a new folder for this deal
    Folder dealFolder = createFolder("/home",dealCode);
    //create a group for this deal;place the group as
    //an access control entry in an access control list.
    //Set the access control list to the folder.
    AccessControlList acl = createDealGroup(dealCode);
    dealFolder.setAcl(acl);
    ifsSession.setAdministrationMode(false);
    }catch(IfsException ie)
    int code = ie.getErrorCode();
    System.out.println("THE ERROR CODE WHILE CREATING DEAL FOLDER IS -- "+code);
    ie.printStackTrace();
    result = ie.getMessage();
    return result;
    }//createDealFolder
    public String createUser(String userId,String password,String dealCode)
    String result = "SUCCESS";
    System.out.println("Creating user and adding to a group "+userId);
    try
    this.ifsSession = getIfsConnection("system","manager","ServerManager","i5ifs");
    ifsSession.setAdministrationMode(true);
    System.out.println("Logged in successully");
    //form the XML necessary for creating the simple user;
    //the new user in the IFS will be the Deal.User id will be the deal code;
    //password is fetched from the DEALS table.
    String simpleUserString = "<?xml version = '1.0' standalone = 'yes'?>\n"
    + "<SimpleUser>\n"
    + " <UserName>"+userId+"</UserName>\n"
    + " <Password>"+userId+"</Password>\n"
    + " <HomeFolderRoot>/home</HomeFolderRoot>\n"
    + "</SimpleUser>\n";
    System.out.println("Parsing "+simpleUserString);
    //invoke the XML parser for creating the new user
    StringReader userDefinition = new StringReader(simpleUserString);
    SimpleXmlParser xmlParser = new SimpleXmlParser(ifsSession);
    xmlParser.parse(userDefinition,null,null);
    //a valid user for a deal must belong to the deals group;add the user
    //to the appropriate group for the deal
    String userToGroupString = "<?xml version = '1.0' standalone = 'yes'?>\n"
    + "<DirectoryGroup>\n"
    + " <Update reftype='Name'>" + dealCode+"Group" + "</Update>\n"
    + " <Members>"
    + " <Member reftype='Name'>" + userId + "</Member>"
    + " </Members>"
    + "</DirectoryGroup>\n";
    //invoke the XML parser for adding the new user to the group
    StringReader groupUpdate = new StringReader(userToGroupString);
    xmlParser = new SimpleXmlParser(ifsSession);
    LibraryObject lo = xmlParser.parse(groupUpdate,null,null);
    System.out.println ("The LO returned by parse is " + lo);
    //link this user's home folder to the deal folder
    Collection c = ifsSession.getDirectoryUserCollection();
    DirectoryUser du = (DirectoryUser) c.getItems(userId);
    System.out.println("The DirectoryUser created is " + du.getDistinguishedName());
    //Folder homeFolder = (Folder) getIfsFileSystem().findPublicObjectByPath("/home/"+dealCode);
    Folder homeFolder = du.getPrimaryUserProfile().getHomeFolder();
    System.out.println("Home folder is"+homeFolder);
    homeFolder.addItem((Folder)getIfsFileSystem().findPublicObjectByPath("/home/"+dealCode));
    System.out.println("Created a link to the deal folder... ");
    ifsSession.setAdministrationMode(false);
    }catch(IfsException ie)
    IfsException.setVerboseMessage(true);
    ie.printStackTrace();
    return result;
    }//public
    /* public String addUserToGroup(String groupName)
    try
    InternetFileSystem ifs = getFileSystem();
    ifs.findPublicObjectByPath(goupName);
    }catch(IfsException ie)
    ie.setVerboseMessage(true);
    System.out.println("Problem while adding user to the group "+ie.getMessage());
    ie.printStackTrace();
    }//addUserToGroup
    *This method creates a group that for a particular deal.
    *All members having access to this deal must belong to thi                                                                                                            s
    * group.
    public AccessControlList createDealGroup(String dealCode)
    AccessControlList acl = null;
    try
    DirectoryGroupDefinition def = new DirectoryGroupDefinition(ifsSession);
    def.setAttribute("NAME",AttributeValue.newAttributeValue(dealCode+"Group"));
    DirectoryGroup dealGroup = (DirectoryGroup)ifsSession.createPublicObject(def);
    AccessControlListDefinition aclDef = new AccessControlListDefinition(ifsSession);
    AccessControlEntryDefinition aceDef = new AccessControlEntryDefinition(ifsSession);
    AccessLevel aLevel = new AccessLevel();
    aLevel.enableAllStandardPermissions();
    aLevel.disableStandardPermission(AccessLevel.ACCESSLEVEL_ADDITEM);
    aLevel.disableStandardPermission(AccessLevel.ACCESSLEVEL_CREATE);
    aLevel.disableStandardPermission(AccessLevel.ACCESSLEVEL_ALL);
    aceDef.setGrantee(dealGroup);
    aceDef.setDistinctAccessLevel(aLevel);
    aclDef.addAceDefinition(aceDef);
    acl = (AccessControlList) ifsSession.createPublicObject(aclDef);
    acl.setName(dealCode+"ACL");
    }catch(IfsException ie)
    System.out.println("error while creating group for deal");
    IfsException.setVerboseMessage(true);
    ie.printStackTrace();
    return acl;
    }//createUser
    *makes a connection the the IFS and returns the LibrarySession object.
    *@param userName user name for a valid IFS account.
    *@param password password for a valid IFS account.
    *@param serviceName the IFS service name.
    *@param schemaPassword the IFS schema password.
    private LibrarySession getIfsConnection(String username, String password, String serviceName,
    String schemaPassword) throws IfsException
    LibraryService service = new LibraryService();
    CleartextCredential me = new CleartextCredential(username, password);
    ConnectOptions connection = new ConnectOptions();
    connection.setLocale(Locale.getDefault());
    connection.setServiceName(serviceName);
    connection.setServicePassword(schemaPassword);
    ifsSession = service.connect(me, connection);
    fPathResolver = new FolderPathResolver(ifsSession);
    ifsFileSystem = new IfsFileSystem(ifsSession);
    return ifsSession;
    }//getIfsConnection()
    public String loginToIfs(String userName,String password,String serviceName,String schemaPassword)
    String result = "SUCCESS";
    try
    getIfsConnection(userName,password,serviceName,schemaPassword);
    this.userName = userName;
    //getResolver().setHomeFolder("/home/"+userName);
    }catch(IfsException ie)
    int code = ie.getErrorCode();
    System.out.println("ERROR CODE "+code);
    result = "FAILED -- "+code+" -- "+ie.getMessage();
    System.out.println("Failed to login "+ie.getMessage());
    ie.printStackTrace();
    return result;
    }//loginToIfs
    public LibrarySession getSession()
    return ifsSession;
    }//getSession()
    public FolderPathResolver getResolver()
    return fPathResolver;
    public IfsFileSystem getIfsFileSystem()
    return ifsFileSystem;
    public Folder getHomeFolder()
    Folder homeFolder = null;
    try
    DirectoryUser user = ifsSession.getUser();
    System.out.println("Got the user");
    PrimaryUserProfile primary = user.getPrimaryUserProfile();
    System.out.println("got the primary user profile");
    homeFolder = primary.getHomeFolder();
    System.out.println("THE HOME FOLDER IS --> "+homeFolder);
    System.out.println("The home folder name is --> "+homeFolder.getName());
    }catch(IfsException ie)
    ie.printStackTrace();
    System.out.println("home folder");
    return homeFolder;
    }//getHomeFolderPath()
    * Called when this object is bound to the HTTP session object.
    * @param event The event when the object is bound to the Http session.
    public void valueBound(HttpSessionBindingEvent event)
    // do nothing
    * Called when this object is unbound from the HTTP session object.
    * @param event The event when the object is unbound to the Http session.
    public void valueUnbound(HttpSessionBindingEvent event)
    //release the reources like the ifsSession etc.
    fPathResolver = null;
    try
    if (ifsSession != null)
    ifsSession.di sconnect();
    }catch (IfsException e)
    e.printStackTrace();
    finally
    ifsSession = null; // release the resources
    }//valueUnbound()
    public Folder createFolder(Folder destinationFolder,String theNewFolderPath)
    Folder createdFolder = null;
    try
    System.out.println("<*---*> IN THE FOLDER "+destinationFolder);
    IfsFileSystem ifs = getIfsFileSystem();
    System.out.println("Creating the folder..");
    createdFolder = ifs.createFolder(theNewFolderPath,destinationFolder,true,null);
    System.out.println("Created the folder..");
    }catch(IfsException ie)
    System.out.println("ERROR CREATING A FOLDER IN THE DESTINATION FOLDER");
    IfsException.setVerboseMessage(true);
    ie.printStackTrace();
    return createdFolder;
    }//createFolder(String inTheFolder,theNewFolder)
    public Folder createFolder(String inTheFolder,String theNewFolderPath)
    Folder createdFolder = null;
    try
    System.out.println("<*---*> IN THE FOLDER "+inTheFolder);
    IfsFileSystem ifs = getIfsFileSystem();
    System.out.println("Creating ANOTHER folder for test");
    Folder destinationFolder = (Folder) ifs.findPublicObjectByPath("/"+inTheFolder);
    System.out.println("The destination folder is "+destinationFolder);
    /* Folder destinationFolderMyTest = (Folder) ifs.findPublicObjectByPath("/home/c6/COREL/MY-TEST/");
    System.out.println("The destination folder my test is "+destinationFolderMyTest);*/
    createdFolder = ifs.createFolder(theNewFolderPath,destinationFolder,true,null);
    /* System.out.println("Created folder in destination folder ");
    createdFolder = ifs.createFolder(theNewFolderPath,(Folder) ifs.findPublicObjectByPath(inTheFolder),true,null);
    System.out.println("Created folder in MY-TEST ");*/
    }catch(IfsException ie)
    System.out.println("ERROR CREATING A FOLDER IN THE DESTINATION FOLDER");
    IfsException.setVerboseMessage(true);
    ie.printStackTrace();
    return createdFolder;
    }//createFolder(String inTheFolder,theNewFolder)
    *Method creates a folder in the path specified(the path includes the name of the folder
    *to be created).If a parent of any of the folders in the path
    *is not found then that folder is automatically created.
    public String createFolder(String folderPath)
    System.out.println("*-*-*-*-* Creating folder *-*-*-*-*");
    String result = "SUCCESS";
    try
    //ifsSession.setAdministrationMode(true);
    IfsFileSystem ifs = new IfsFileSystem(ifsSession);
    Folder folder = (Folder) ifs.findPublicObjectByPath("home/"+userName);
    ifs.createFolder(folderPath,(Folder) folder,true,null);
    }catch(IfsException ie)
    result = ie.getMessage();
    ie.printStackTrace();
    return result;
    }//createFolder
    //Upload a document to the ifs
    public Document uploadDocument(String localPath,String destinationPath)
    Document document = null;
    try
    IfsFileSystem ifs = new IfsFileSystem(ifsSession);
    FileInputStream fis = new FileInputStream(localPath);
    System.out.println("**********Creating document in "+destinationPath);
    document = ifs.createDocument("B.txt", fis, destinationPath, null, false, null);
    System.out.println("Created document..");
    }catch(IfsException e)
    System.out.println("Error while creating document.....");
    IfsException.setVerboseMessage(true);
    e.printStackTrace();
    System.out.println("THE ERROR MESSAGE IS "+e.getMessage());
    catch(Exception e)
    System.out.println("File not found/io exception ");
    e.printStackTrace();
    return document;
    }//uploadDocument
    * Adds an access control entry to the public object passed in.
    *@param PublicObject the publicObject for which permissions have to be set.
    public void setAccessControlOnObject(PublicObject publicObject)
    try
    System.out.println("Setting permissions for the document....");
    AccessControlListDefinition aclDef = new AccessControlListDefinition();
    aclDef.setName(publicObject+"ACL");
    AccessControlEntryDefinition aceDef = new AccessControlEntryDefinition();
    //this sets the acceess control entry's granntee as the "user" who ha s loggen on
    aceDef.setGrantee(ifsSession.getDirectoryUser());
    aceDef.enableGrantToWorld(false);
    String[] permissions = {"ACCESSLEVEL_NONE"};
    System.out.println("setting the access level");
    AccessLevel accessLevel = new AccessLevel(permissions);
    /*PermissionBundleDefinition pbDef = new PermissionBundleDefinition(ifsSession);
    PermissionBundle pb = (PermissionBundle) ifsSession.createSystemObject(pbDef);
    pbDef.setAccessLevel(accessLevel);
    pbDef.setAccessLevel(accessLevel);
    aceDef.addPermissionBundle(pb);*/
    aceDef.setDistinctAccessLevel(accessLevel);
    aclDef.addAceDefinition(aceDef);
    AccessControlList acl = (AccessControlList) ifsSession.createPublicObject(aclDef);
    publicObject.setAcl(acl);
    }catch(IfsException ie)
    System.out.println("The error while settin access control is -0> "+ie.getMessage());
    ie.setVerboseMessage(true);
    ie.printStackTrace();
    }//createAccessControlList
    }//class DPDocManager
    Note : since iam still experimenting with the code please ignore any irrelevant/wrong commenting.Iam using method "CreateDealFolder()" to create the folder "INPRISE" and "CreateUser()" to create users "i1","i2"

    Iam not able to set the main folder's (i.e INPRISE) acl (MyAcl) on the subfolder "MyFolder" because the owner of MyAcl is "system" whereas the owner of MyFolder is user "i1" .Which is the best way of solving these ownership issue which iam running into ? I want to be able to create different folders ,assign a group of uers to each of the folders who can create as well as modify,delete each other's folders/documents (as i have mentioned in my first post in this thread) ?
    thanks
    Srinivas

  • Why can't I select my created group for submitting a batch in Compressor 4.1?

    Hi all,
    My company recently updated our computers to take advantage of Compressor's distributed processing since we're using both a 3.06 ghz c2d imac and a pretty new core i5 imac on the same network. I'm interested in getting Compressor's group processing going to take advantage of the significantly faster i5 after cutting is done on the c2d. I have followed the instructions in the manual to set up a group, and have so far had no problem having the two computers see each other over the network and add each other to processing groups (the new name for clusters, I guess). The issue comes when I try to select the group from the lower-left drop-down box when submitting the batch. Although my created group shows up in the drop-down, it is greyed out and cannot be selected. Is there something I'm doing wrong that's making this not selectable? The primary way that we're moving files into compressor is from the "send to compressor..." option in FCPX, if this is relevant. I would really like to get this running ASAP so any help is appreciated.

    I'm talking about the "Process on:" dropdown found on the bottom bar, like in this screenshot:
    http://www.iclarified.com/images/news/36883/157980/157980-1280.jpg

  • Problem with Group Normalise- any ideas?

    Hi everyone- a bit of weirdness which might be my fault... or not. I've been playing with the Group Normalise function and it might solve my problem (creating a consistent volume with backing tracks I've recorded over many years and systems). I tried it once- and got encouraging results. Then I started tweaking the parameters and suddenly it won't process the multiple files I have selected... it just processes the one (seems the be the last alphabetically in the list). After restarting Audition a few times and trying to avoid or recreate the problem I actually had it NOT processing any of the selected files! The catalyst seemed to be tweaking the maximum Db level- once I tried that, things went wrong. But now I can't even "start all over again" to try and recreate the issue, because it's not processing anything.
    This morning I tried again, hoping that a complete system restart might have dumped the bug or at least give me that one chance of getting things done, but once again the Group Normalise feature will only actually process the last/bottom file listed in the selection pane. I tried emptying my Audition TEMP folders, but there was nothing there anyway.
    The feature "sees" all the selected files and analyses them, adding statistics to the list. It's just the final step that is failing. When I click on "Run Normalise" it applies processing to just that last, listed file.
    I've been working on this too long now- so my memory's getting flaky, but I swear the very first time I tried this function it worked properly. But no luck since. Obviously, the 3.01 update could be applied, but there's no mention of this issue being fixed in the release notes.
    Any ideas, anyone?
    Cheers, Graeme.
    Audition 3.0, SP3 Win XP. E6600 CPU 3Gb Ram. ASIO4ALL driver with on-board sound(temporary driver until I get a new firewire card with a TI chip for my MAudio FW410)
    Cheers!
    Graeme Hague
    Author/Composer
    Freelance Audio Engineer

    Hi Graeme,
    you wrote that:
    > I'll investigate MP3Gain since everyone seems to think it's a good move.
    No, fix it before going to mp3.
    > However, I solved the problem in a straightforward way- back to Steve's "use
    > your ears" concept.
    Hmmm ... that is a luddite concept ....
    > With 70 tracks to balance I chose the best of them all as a benchmark,
    > then loaded them ten at a time into the Multitrack Mixer View and basically
    > "mixed" them to equal perceived volumes with the benchmark track as a control.
    As often previously mentioned the average with a 300 milliseconds window and no frequency compensation of any kind works best for me, only really weird stuff needs a manual lowering of level. What you need to do is to define what average level your canned noise should be at, AVG 22.5 works well for vinyl, AVG 30 to 25 for classical music, higher for larger ensemble with more bass and AVG 25 to AVG 17 is probable for church organ - depending on playing style, it can be extremely dynamic, ie. at AVG 35 - and pop. You do NOT need to go to full scale, what you need is predictability. In house notation used, I find it to be a good strategy to define what AVG rating to aim for with a project, also btw. for for multitrack mixing because compressor setting presets with input AVG rating defined makes a lot of sense to my way of thinking. And yes ... you do NOT have to tweak the track to fix, knowing the AVG rating tells you what input gain to apply in the compressor .... that is, if you DO insist on keeping the number of DSP actions on your audio low. Some of the time I prefer conceptual simplicity .....
    > Whatever settings the mixer required I then applied in Edit View, zeroed everything
    > to re-check and- voila! As close as they'll ever get
    A visual evaluation can be a good tool, move the guide lines from -1 dB to -9 dB and they will become helpful.
    A wise and well thought out design concept is that average values show up quite differently in the group normalize windowm, this entertains the user and poses new challenges so that working with a project doen't get boring. The function works fine IF you aim low, do not aim for 0 procent clipping, aim for no mentioning of clipping in any file, and skip the frequency compensation part of it, it uses a fletcher-munson compensation without telling you what playback level to aim for. It could have been useful if expected playback sound level was enterable as parameter ....however, skip that part of it and it will work. I have encountered file combinations that lead to a numeric overflow when using A2, dunno how it is in A3, I need to make my mind up about what box to install it on first ....
       Kind regards
       Peter Larsen.

  • Problem While Taking out Printout Through ME9F

    Hi,
    I am facing problem while taking out printout of purchase orderthrough ME9F.
    as if i have to take out the printout of any po i have change the printer to LP02 in messages in me22n.
    In messages i hav output type NEUand in that Logical destination is set to LP01.
    Now can any body tell me how can I Set that output type for printer LP02 So that whenever the New Po is created i Don't have to change it's Logical destination type.

    hi,
    FIrstly check NACE
    THen go to MN05 for setting...
    Steps:
    Maintain the o/p type...
    click on the key combination...
    Can maintain at any of them as per your requirement...
    in the next screen,Then change for single vendor or for range of vendors....enter the necessary data...
    Then in the next window, maintain the vendor, function and partner if any, medium etc...and save it...
    Now from next time it'll give you the this maintained o/p type...
    Regards
    Priyanka.P
    Edited by: Priyanka Paltanwale on Oct 22, 2008 10:04 AM

Maybe you are looking for

  • How to change the date time format in jsp

    Hello Sir, I am trying to convert the date from one format into another format. In SQLServer one fields type as datetime. when i tried to display it in jsp with String variable it shown like below, 2006-08-16 09:11:23.0 how to format this value as We

  • Weather widgets for Nokia E6

    anyone know of a good weather widget for the Nokia E6?  I tried the accuweather one and I cant get it to show up in the widgets catalog.  Anyone have a working weather widget on their Nokia E6? what are you using? Solved! Go to Solution.

  • Win8 - Bluetooth Audio Connection

    Hi everyone, its day five with Win8 and the next Problem occurs. In Win7 i installed Bluetooth and connected my Windowsphone7 without ANY Problems, using my X230 for making calls with the setting headset and speakerphone: Link to picture Now in Windo

  • Install fails - CC Photoshop.

    Adobe Application Manager repeatedly fails to install, so I can't install CC Photoshop. Turning off antivirus software doesn't help. What else to try?

  • Can I transfer apps to my daughter's iPod Touch??

    I had an iPod Touch that both my daughter and I used so I had lots of kids games on it. I lost this iPod and got a new one. When I got my new one I downloaded all those apps again without any problems. I have now found that old iPod Touch so I gave t