Trim resolve-dnsname results

 
 I am trying to write a script to validate that the forward and reverse lookup of a IP match. With multiple DNS zones I may have multiple periods in the FQDN so the code I have below does not work all the time.  For example split -3 will give me
the shortname server1 if the FQDN server1.domain.local.  However if the FQDN is server1.sub.domain.local the result would be blank.
My question would be how do I take the result that is left of the first period set it as a variable, then also variable for everything to the right of the first period?
$shortname = resolve-dnsname 192.168.0.1 | %{$_.NameHost} | ForEach-Object{$_.Split(".")[-3]}
Write-Host $shortname$longname = resolve-dnsname 192.168.0.1 | %{$_.NameHost} | ???????

$_.split(".",2)[1]
The ,2 just splits the string into 2 parts at the first "."  
[1] picks the 2nd part of that split.
This should work:
$DNSname = (resolve-dnsname 192.168.0.1).NameHost.split(".",2)
$ShortName = $DNSname[0]
$LongName = $DNSname[1]

Similar Messages

  • How to resolve partial result warning msg in WEBI?

    Hi
    how you resolve partial result warning msg in WEBI?
    can any one please guide me.
    Regards,
    Mahendra

    Hello,
    Go to Data Access à Edit à  Query Properties --> Uncheck the maximum rows retrieved option. This is limiting the number of rows which need to be retrieved.
    Regards,
    Shwetha

  • Trimming Text From Results

    Hello folks, I'm not overly familiar with how to trim the results from a query so please excuse my ignorance. What I am attempting to do is to retrieve just the name of the object which has been tombstoned in Active Directory. I'm using the below code to
    get the information, however, it's returning additional data that I would like to omit - here's the code:
    $tombstoned = New-Object System.DirectoryServices.DirectorySearcher -Property @{ Filter = '(&(isDeleted=TRUE))'; Tombstone = $true}
    $tombstoned.Findall() | Foreach-Object {$_.properties['cn']}
    ... and the results I am getting are:
    Lois Taylor
    DEL:5e052fe4-f4f2-4f2f-983d-bfa1892ae044
    How would I effectively trim the second line? Please explain in detail so I can grasp it and not just be provided with an answer.
    Thanks everyone!

    Thanks guys, and thanks for the explanation. Two things:
    Bill, although this works, I replaced the {Name -like "Louis Taylor*"} construct with {Name -like "*"} and received a whole bunch of garbage. Is there are better method you would suggest?
    With JRV, again, although this works on some objects, I appear to randomly receive the error:
    Machine
    User
    ERROR: Method invocation failed because [System.DirectoryServices.ResultPropertyValueCollection] does not contain a method named 'Split'.
    Tombstoned Objects.ps1 (13): ERROR: At Line: 13 char: 12
    ERROR: +            $_.properties['cn'].Split("`n")[0]
    ERROR: +            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ERROR:     + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    ERROR:     + FullyQualifiedErrorId : MethodNotFound
    ERROR:
    Is this something you are familiar with?
    Again, I appreciate you both taking the time to handle this with me.

  • TS4147 How do I resolve duplicates resulting from contacts created from different accounts?

    I have duplicate contacts in my address book. I discovered by merging that the duplicate contacts were created from different accounts. How do I ID the account the contact was created from? Note: the duplicates are in my address book only. I do not have any duplicates on iCloud.
    Brian

    This user tip might help you understand how accounts work with Address Book.

  • Sharepoint 2013 SPSitedataquery result trimming for Loggedin user

    Hi,<o:p></o:p>
    I am using SPSiteDataQuery to roll-up information from Site-collection, it fetches all the records from all the sites
    inside that Site-Collection. Now I want to enable security trimming on the result.
    For example if user has no access to a particular site (SPWeb) inside the Site-collection, records from that site should not be included in
    result of SPSiteDataQuery.<o:p></o:p>
    Please help me out.<o:p></o:p>
    Regards,<o:p></o:p>
    Mayank<o:p></o:p>
    Mayank Nigam

    Hi,                                                             
    For your requirement, a workaround is that we can check whether the current login user has the permission needed, then perform the query job accordingly.
    Gets the current user of the site with SPWeb.CurrentUser property
    by using the a line of code like this:
    SPContext.Current.Web.CurrentUser.LoginName
    Indicates whether the specified user has a specified set of permissions:
    SPWeb.DoesUserHavePermissions method
    http://msdn.microsoft.com/en-us/library/ms441848.aspx
    Another link about Check User Permissions Programmatically for your reference:
    http://tad.co.in/gnosis/check-user-permissions-programmatically-in-sharepoint-2010/748
    Best regards
    Patrick Liang
    TechNet Community Support

  • SOLVED:Strange behaviour:request shows results in Answers not in dashboard

    Hi all,
    I've come across somethings very strange, which I know has to do with the lowest level of detail of my organisation hierarchy (and the keys used at that level), but I cant understand why its doing the following:
    I have a table in a dashboard that can receive 'is prompted' filter values from a prompt on the same dashboard. When i created this request in answers, for test reasons i gave it values for a "centre" (lowest level of the organization hierarchy), and it displays resultos for my metrics.
    Now I place this request on a dashboard. I have removed my manual test filters, and left the four organization columns of the request as "is prompted", the lowest of these being the centre value. Now in the dashboard, i decide to enter a value directly for the centre dropdown (same value as i previously tested) in my prompt...i get no results found!!!
    The lowest level of this prompt has a key made of two atributes (center and center code), this allows me to "drill down" from the centre to the centre code, although centre code is at the same level. If i remove the drilldown capability, the problem is solved...im not quite sure why.
    Message was edited by:
    zjac

    The problem was with the actual data. WHen analyzing the query that was being done, i realised that one of the keys (the centre name) was using a text field that has spaces after the name of the centre (god knows why), so using a trim resolved the issue.
    I guess the other configuration was using the centre id which was not encountering the above problem.

  • How to hide part of search results to particular users?

    Hi,
    Is it possible to hide part of search results to particular users? If it possible can you please tell how to implement? 
    Thanks, Chinnu

    Hi,
    According to your post, my understanding is that you wanted to hide part of search results to particular users.
    You can use the security trimming to achieve it.
    By default, Enterprise Search results are trimmed at query time, based on the identity of the user who submitted the query.
    When results are returned for a user's search, the Query engine performs an access check for the user's identity against the security descriptor stored in the content index for each item in the search results. The Query engine then removes any items in the
    search results that the user does not have access to, so that the user never sees these results.
    SharePoint uses the access control list (ACL) associated with each document to trim out query results that users have no permission to view,
    but the default trimming provided by SharePoint (out-of-box trimming) may not always be adequate to meet data security needs.
    In that case, you can custom the security trimming to meet your requirement.
    There are some articles for your reference.
    Trim SharePoint Search Results for Better Security
    http://msdn.microsoft.com/en-us/magazine/ff796226.aspx
    Writing a Custom Security Trimmer for SharePoint Server Search
    http://msdn.microsoft.com/en-us/library/ee819930(v=office.14).aspx
    Walkthrough: Using a Custom Security Trimmer for SharePoint Server Search Results
    http://msdn.microsoft.com/en-us/library/office/ee819923(v=office.14).aspx
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Creating Trimmed Project in Project Manager

    When I select "Create New Trimmed Project", the resulting project size is exactly the same as the original project even though the sequence only uses a small fraction of the footage in the project. Am I doing something wrong?

    Collected media is what I expected to be dramatically smaller, but all of the media files are exactly the same size in both the original folder and the new folder than contains the "trimmed" project.(4.5GB).
    Before trimming, the project manager reports the original project size as well as the estimated trimmed project size to be 4.5GB.
    When I added the clips to the timeline, I used "set in point" and "set out point" in the source frame and then dragged the clip to the timeline. This is the way I have always done it, but this is the first time I am trying to create a trimmed project, so maybe it is not the correct way.
    The option "Create New Trimmed Project" is what I have selected in the project manager.

  • Security Trim Section in Publishing pages

    HI , We are developing a knowledge portal. There is a requirement to hide few section from normal visitors. We have tried target audience and Security Trim Control. Both hide the content in the UI but when the visitor searches, it comes in the search results.
    We want that content to be security trimmed in search results also. Are we missing out any setting??
    PS. its content management page with mainly HTMLRichText, page contents, content types and comments SharePoint content fields etc.
    Please advise. thanks.

    There's no column level security in SharePoint. You've run into the limits of the platform.
    If you can't compromise on the searchable aspect your requirement cannot be met out of the box.
    There are custom solutions for column level security such as this one;
    http://archive.msdn.microsoft.com/SecureField
    It might need a few changes to work with SP2013.
    w: http://www.the-north.com/sharepoint | t: @JMcAllisterCH | YouTube: http://www.youtube.com/user/JamieMcAllisterMVP

  • Davinci Resolve 8.1.1 to Premiere CS5.5.2  import error

    Importing an XML from Resolve to Premiere gives me a "File import error"  "The importer reported a generic error."
    The XML from Resolve opens correctly in FCP7, and exporting that Resolve XML from FCP as an XML version 5 from FCP7 is correctly opened in Premiere.  Can anyone else verify they are getting the same result?
    thanks, 

    When I removed the offline clips in Premiere and re exported the XML file to Resolve, the resulting XML file from Resolve imported directly into Premiere, No import error, which is why I think having no offline media it might be a work around.
    Both the XML file from Resolve and FCP to Premiere has not caused any crashes on my end.
    I'm using FCP XML-Round-Trip from Resolve when rendering and using "render clip with unique filename"  As long as I render, then export the XML the conform works in Premiere, however the clip names in resolve reflect the original edit of the XML file from Premiere, and only in the file path is the corresponding Resolve renders.  I can not find a way to auto reconnect the resolve renders to the exported XML if moved to another suite with out manually doing every shot. Any thoughts?
    On a positive note, doing the above steps for removing offline media first in Premiere (I have not tested your suggestion yet of deleting offline files in Resolve) has solved my handle slip problems.
    I'd suggest closing both Premiere and Resolve, reopen, and send a sequence from Premiere to Resolve with no offline clips when conformed in Resolve, render and export XML and open directly in Premiere.  It's working for me now as long as Resolve exports a XML file without any offline clips, no more import errors or crashes.

  • Compilation error in java for struts application.

    Hello,
    I'm a newbie in java and struts, i was trying a simple struts application given in "struts complete reference".This is my code of its Controller class(Action class):-
    package com.jamesholmes.struts;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    //Perform employee search based on what criteria was entered.
    String name = searchForm.getName();
    if(name != null && name.trim().length() > 0)
    results = service.searchByName(name);
    else
    results = service.searchBySsNum(searchForm.getSsNum().trim());
    //place search results in SearchForm for access by jsp.
    searchForm.setResults(results);
    //Forward control to this Action's input page.
    return mapping.getInputForward();
    Now problem is when i'm compiling this java file i'm getting error"can not resolve symbol" for the instances i'm creating for SearchForm(view class) and EmployeeSearchService(model class).can any one help me how to resolve this error. I've tried importing those classes explicitly also, but error gets increased this way.

    Tht problem is solved, it was a mistake frm my side in compilation precedure.Anyway, now the real error-After i compiled and created the war file of application, i was running it in tomcat and got this Error, it is i guess a server sprcific error which i am unable to understand., can any one now help me solving this out?????Error is this :-
    HTTP Status 500 -
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    root cause
    java.lang.NullPointerException
         org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:521)
         org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:436)
         org.apache.struts.taglib.html.LinkTag.calculateURL(LinkTag.java:495)
         org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:353)
         org.apache.jsp.index_jsp._jspx_meth_html_link_0(index_jsp.java:96)
         org.apache.jsp.index_jsp._jspService(index_jsp.java:69)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.0.27 logs.
    Apache Tomcat/5.0.27

  • Test DNS Policies Windows Server Technical Preview

    Hello everybody,
    I would like to know if anyone tested the new feature of DNS Server: Policies
    I installed the DNS Role but not see nothing about the Policies on the GUI.
    Thanks in advance.
    Robson Hasselhoff - Follow me @Robk9e

    Hi,
    I've created a simple policy that denies DNS queries from a client subnet for a specific domain.
    I created the domain 'denied.com' and another domain 'permitted.com' and then set up a policy to deny queries from client subnet 192.168.0.0/24 for denied.com. No policy is configured for permitted.com so by default the client can query this domain. The
    results are below, querying from a client that is on the restricted subnet (the client address is 192.168.0.1).
    First, I show that I can query the permitted domain:
    PS C:\> resolve-dnsname www.permitted.com
    Name                                          
    Type   TTL   Section    IPAddress
    www.permitted.com                              A     
    3600  Answer     192.168.0.2
    Next, the restricted domain is queried, and the server replies with a failure:
    PS C:\> resolve-dnsname www.denied.com
    resolve-dnsname : www.denied.com : DNS server failure
    At line:1 char:1
    + resolve-dnsname www.denied.com -server 192.168.0.4
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : ResourceUnavailable: (www.denied.com:String) [Resolve-DnsName], Win32Exception
        + FullyQualifiedErrorId : RCODE_SERVER_FAILURE,Microsoft.DnsClient.Commands.ResolveDnsName
    This is obviously a very simple demonstration, but it works well. The policy is created with registry settings under:
    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DNS Server\Zones
    HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\DNS Server\ClientSubnets
    I would rather not share the details of the registry settings here because it is not advisable to configure policies directly in the registry. The Windows PowerShell cmdlets to configure policies will be available soon. If you'd like to contact me and discuss
    the settings more, please email me at greg dot Lindsay at Microsoft dot com.
    Thanks,
    -Greg

  • Not able to run validation using validation.xml & validator-rules.xml

    Hello Friends,
    I am not able to run validation using validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    </form-beans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    </global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    </action>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}" resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    </form>
    </formset>
    </form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    } else {
    results = service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come from a real data
    source such as a database. */
    private static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees.getName().toUpperCase().indexOf(name.toUpperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.

    Hello Friends,
    I am not able to run validation using
    validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error
    messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    ans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    tion>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in
    className="org.apache.struts.validator.ValidatorPlugI
    ">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    >
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}"
    resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    /form>
    </formset>
    form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping
    mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new
    EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria
    was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    else {
    results =
    service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access
    by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come
    from a real data
    source such as a database. */
    ivate static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if
    (employees.getName().toUpperCase().indexOf(name.toU
    pperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.
    Hi,
    Your error message are not displaying because u does not made Message-Resoucrce property file (Resource Bundle) when you make it .
    give it entry in
    struts-config.xml
    <message-resources parameter="ApplicationResources" />
    and
    define key and corresponding error message to key in this ApplicationResources i.e
    #Error Resources
    label.search.ssNum=Plz Enter correct ssNum

  • Dealing with an empty string parameter

    I'd think this should be simple but is driving me nuts. I have a string parameter (lets call it Foo) that is being passed from my C# application to a CR subreport. For this parameter field I have a formula associated with "Display String" similar to this:
    if (IsNull({?Foo}) or (length({?Foo}) = 0)) then
        "Value is empty"
    else
        "Value is " + {?Foo}
    I can never get the "Value is empty" line to appear! I've tried lots of suggestions:
    1. trim and check result equal to '' (two single quotes)
    2. test if equal to "".
    3. Adding false to Suppress.
    It appears that if this parameter is the empty string CR simply does nothing with my formulas and the entire parameter field is skipped.
    If I pass "null" (or any other special string) instead of "" from my C# code and then change the above test to check for that value as shown below things work properly.
            if (IsNull({?Foo}) or ({?Foo} = "null") then
    However I really don't like testing for a special string as there is the remote possibility that it could be the actual value of the parameter.
    Any help most appreciated.
    Dick

    Not surprised and willing to bet there will be a simple answer to this!
    There is something most odd happening when the string value is empty.
    Let me answer your questions.
    1 - How are you setting your parameter value?
    Since I want to be able to pass parameters to the base report as well as its subreports I'm using this method:
            protected void setParameter(string parameterName, object value)
                ParameterFields fields = report.ParameterFields;
                for (int i = 0; i < fields.Count; i++)
                    if (fields<i>.Name.Equals(parameterName))
                        string reportName = fields<i>.ReportName;
                        if (string.IsNullOrEmpty(reportName))
                        {   // give to base report
                            report.SetParameterValue(parameterName, value);
                        else
                        {   // give to subreport
                            report.SetParameterValue(parameterName, value, reportName);
    2 - What OS and service pack are you on?
    Windows XP, SP 3. All updates from MS installed.
    My development environment is either of these two:
    a. VS 2008. Version 9.0.30729.1 SP. ,NET Framework 3.5 SP1
    b. VS 2010 Version 4.0.30319
    3 - What platform are you targeting?
    For now just running on my XP PC but have tested our app on XP, Win7, and Vista. 32 and 64-bit version of each.
    4 - Is this a win or web form application? Win app
    5 - What is the version of your CrystalDecisions.CrystalReports.Engine?
    Version: 12.2.0.290, Product Type: Full
    6 - What is the version of crpe32.dll do you have on your machine?
    I only have one instance of this file in this directory:
         C:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86
    7 - Did you have one of our betas on this machine? No
    Edited by: dcowan on Dec 7, 2010 2:10 AM
    I needed to finish this so I'm closing it.
    In my C# code I placed the following:
                        if (string.IsNullOrEmpty(value))
                            value = "!_Empty_!";
    and in the CR formula I used:
           (IsNull({?CoBrandName}) or ({?CoBrandName} = "!_Empty_!"))
    Everything is now working just as I want. Not an ideal solution but I gave up.

  • Adobe Premiere Pro CS4 4.0.1

    An update to Adobe Premiere Pro CS4 will be available via Adobe Update Manager shortly. The file will also be available for download tomorrow (November 20) on Adobe.com, as will the readme (at http://www.adobe.com/support/documentation/en/premierepro/releasenotes.html). In the meantime, here is the text of the readme.
    We're really excited about this update, especially considering we released CS4 just one month ago. To force an update, choose help --> find updates from any Adobe application. The AME update that releases with this update is required as well.
    Important note: if you are using the Elemental Technologies RapiHD plug-in, you must update to the latest version in order to use Adobe Premiere Pro CS4 4.0.1. You can update the plug-in by visiting the Elemental Technologies web page: http://www.rapihd.com/?q=node/129
    New in this release
    - OMF export
    - Final Cut Pro import
    - Edit in Audition (Windows only)
    - Surcode support
    - AAF import and export
    - High quality motion
    - Third-party support
    Notable fixes
    - Attempting to trim locked tracks results in a crash (#1888355)
    - Crash on Win and error on Mac when using Numpad-Asterisk keys to generate marker when
    playing in Program Pane when Effect Controls pane is closed (#1890626)
    - Crash when the Metadata panel is brought into focus when a DVCPro HD clip is selected
    (#1884633)
    - When a filter/search is applied in the Metadata Panel and then a different asset is selected, the
    filter does not update (#1876954)
    - Custom schema causes Adobe Premiere Pro to crash performing many basic operations,
    starting with New Project (#1888938)
    - Render of transition in imported EDL-based sequence fails; on Mac, causes application to hang
    indefinitely, user must be force-quit application (#1873434)
    - After ASND is saved, an effect is always ON if it turns OFF while playing (#1864978)
    - Crash when attempting to load a project that contains a composition if headless Adobe
    Premiere Pro is serving Adobe After Effects (#1871578)
    - Exporting video as MPEG 4 will create a video file that imports at the incorrect length
    (#1851063)
    - Trimming both ends of a clip, then moving the clip will cause looped playback to be silent, or
    only playback portions of the clip (#1868409)
    - When exporting a timeline containing cuepoints, deleting a cue point via AME Batch-> Export
    Settings, the cue point is still present in the output file (#1866690)
    - Playing an audio-only file in the source monitor will cause the application to lock up (#1887330)
    - Exporting any MT session as 24bit WAV leads to garbled audio Mac only (#1881684)
    - Adobe Premiere Pro allocates too much memory and reads too much data from disk when
    loading project files on the Mac (#1890579)
    - With camera connected, opening clip from Timeline into Source and selecting File  Debug
    results in a serious error (#1889197)
    - Export to tape is active from DVCPRO HD sequences (#1863718)
    - Application intermittently crashes when exporting a movie (#1868405)
    - Render and Replace of offline clips takes over 20 minutes (#1885273)
    - Application crashes when cancelling Normalize Audio Track dialog (#1887615)
    - When an AVCHD clip is inserted into a DV timeline with Scale to Frame Size applied, rendered
    previews of the clip show artifacts during Timeline playback (#1863988)
    - Using scale to frame size in a timeline lowers output quality and softens detail and sharpness;
    typing in scale attributes manually or using Adobe After Effects produces much better results
    (#1527669)
    - Multiplexed MPEG files exported to HD size and then imported back in to Adobe Premiere Pro
    show up as 601 color space instead of 709 color space and hence the colors of the imported
    files are off (#1852977)

    Other users have reported having trouble with VOB files from DVD recorders.  Properly authored DVDs work.
    Where did you get the VOB files that won't work for you?
    -Jeff

Maybe you are looking for

  • Error message in the IDOC at item level

    Hi, Iam working on IDOC.when idoc failed i get the that idoc error message and displaying in the report at header level.But my requirement is to diplay the error messages at the item level.Is it possible to display the error messages at the item leve

  • Dynamic adding of components (doesn't work when programmatically)

    Hi, I don't understand, why this doesn't work. I'll explain it on this example: import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.TimeUnit; import javafx.application.Application; import javafx.event.ActionEvent; imp

  • MS Office Document Cache keeps failing repeatedly...

    The thread under title "The Microsoft Office cache encountered a problem (with Office 2013 ProPlus Preview/Beta)" described exactly my problem, but discussion on that thread has been locked without any solution to the problem. I'd like to add one sym

  • Java +vista

    well, i'm new to java. i started using windows vista and i would like to know if i can run java on it and if i can ....please i would apprciate it if anyone can tell me what is the right java editon ..........or " in other words" the right link to do

  • 3.2; DAC; ListControl - Problem with rollback

    I have a ListControl used for navigation. The problem arises when I click rollback button on NavigationBar. After this event ListControl stops updating its state according to InfoBus events. Is it a bug or what? Did anyone encounter such behaviour? A