BC4J : Validation Rule - Using Compare Validator

Hi,
I am not able to use Compare Validator with "Compare With" as "View Object Attribute"
When I select "VO Attribute", I just see components in the "Select Attribute" Text Area...Cannot see the attributes.
I have lots of VO's in my project.How do I go about it?
Thanks,
Sandeep
How dio
null

Hi,
if you validate against a query, why don't you use a LOV for users to choose from this list ?
Here's a doc that explains how to filter LOVs https://blogs.oracle.com/jdevotnharvest/entry/how_to_dynamically_filter_model If you hide the LOV query panel (which you can do declaratively) then users wont be able to override your query filter.
Frank

Similar Messages

  • Sort array list and using comparable

    With the following code I would like to setup a score object for the current player.
    Change it to a string(Is it correct to say parse it to a string type)
    Then add it to the arraylist.
    So I can sort the array list according to the string size.
    That's why I have the variables in that order.
    So if 3 players have the same amount of guesses, they can be positioned on the high score list according to their gameTime.
    //create score object
                   Score currentScore = new Score(guessCount, gameTime, name);
                   String currentScoreToString = currentScore.toString();
                   //add score to arrayList
                   scores.add(currentScoreToString);So the error message says " The method add(Score) in the type arrayList <Score> is not applicable for the arguments(string)"
    Now, I understand that, I would like to know if there is another way to achieve what I am trying to do.
    Is the string idea I am trying here possible? is it practical or should I use comparable?
    I have looked at comparable, but I don't get it.
    Will my Score class implement comparable. I am looking at an example with the following code.
    Employee.java
    public class Employee implements Comparable {
        int EmpID;
        String Ename;
        double Sal;
        static int i;
        public Employee() {
            EmpID = i++;
            Ename = "dont know";
            Sal = 0.0;
        public Employee(String ename, double sal) {
            EmpID = i++;
            Ename = ename;
            Sal = sal;
        public String toString() {
            return "EmpID " + EmpID + "\n" + "Ename " + Ename + "\n" + "Sal" + Sal;
        public int compareTo(Object o1) {
            if (this.Sal == ((Employee) o1).Sal)
                return 0;
            else if ((this.Sal) > ((Employee) o1).Sal)
                return 1;
            else
                return -1;
    ComparableDemo.java
    import java.util.*;
    public class ComparableDemo{
        public static void main(String[] args) {
            List ts1 = new ArrayList();
            ts1.add(new Employee ("Tom",40000.00));
            ts1.add(new Employee ("Harry",20000.00));
            ts1.add(new Employee ("Maggie",50000.00));
            ts1.add(new Employee ("Chris",70000.00));
            Collections.sort(ts1);
            Iterator itr = ts1.iterator();
            while(itr.hasNext()){
                Object element = itr.next();
                System.out.println(element + "\n");
    }The thing I don't understand is why it returns 0, 1 or -1(does it have to do with the positioning according to the object is being compared with?)
    What if I only use currentScore in a loop which loops every time the player restarts?
    //create score object
                   Score currentScore = new Score(guessCount, gameTime, name);
                   String currentScoreToString = currentScore.toString();
                   //add score to arrayList
                   scores.add(currentScoreToString);Also why there is a method compareTo, and where is it used?
    Thanks in advance.
    Edited by: Implode on Oct 7, 2009 9:27 AM
    Edited by: Implode on Oct 7, 2009 9:28 AM

    jverd wrote:
    Implode wrote:
    I have to hand in an assignment by Friday, and all I have to do still is write a method to sort the array list. Okay, if you have to write your own sort method, then the links I provided may not be that useful. They show you how to use the sort methods provided by the core API. You COULD still implement Comparable or Comparator. It would just be your sort routine calling it rather than the built-in ones.
    You have two main tasks: 1) Write a method that determines which of a pair of items is "less than" the other, and 2) Figure out a procedure for sorting a list of items.
    The basic idea is this: When you sort, you compare pairs of items, and swap them if they're out of order. The two main parts of sorting are: 1) The rules for determining which item is "less than" another and 2) Determining which pairs of items to compare. When you implement Comparable or create a Comparator, you're doing #1--defining the rules for what makes one object of your class "less than" another. Collections.sort() and other methods in the core API will call your compare() or compareTo() method on pairs of objects to produce a sorted list.
    For instance, if you have a PersonName class that consists of firstName and lastName, then your rules might be, "Compare last names. If they're different, then whichever lastName is less indicates which PersonName object is less. If they're the same, then compare firstNames." This is exactly what we do in many real-life situations. And of course the "compare lastName" and "compare firstName" steps have their own rules, which are implemented by String's compareTo method, and which basically say, "compare char by char until there's a difference or one string runs out of chars."
    Completely independent of the rules for comparing two items is the algorithm for which items get compared and possibly swapped. So, if you have 10 Whatsits (W1 through W10) in a row, and you're asked to sort them, you might do something like this:
    Compare the current W1 to each of W2 through W10 (call the current one being compared Wn). If any of them are less than W1, swap that Wn with W1 and continue on, comparing the new W1 to W(n+1) (that is, swap them, and then compare the new first item to the next one after where you just swapped.)
    Once we reach the end of the list, the item in position 1 is the "smallest".
    Now repeat the process, comparing W2 to W3 through W10, then W3 to W4 through W10, etc. After N steps, the first N positions have the correct Whatsit.
    Do you see how the comparison rules are totally independent of the algorithm we use to determine which items to compare? You can define one set of comparison rules ("which item is less?") for Whatsits, another for Strings, another for Integers, and use the same sorting algorithm on any of those types of items, as long as you use the appropriate comparison rules.Thanks ;)
    massive help
    I understand that now, but I am clueless on how to implement it.
    Edited by: Implode on Oct 7, 2009 10:56 AM

  • Need help in using Comparator

    hi,
    I have a list of objects in that there is a field called lastModifiedDate.
    I have to sort the list on the basis of this filed.
    I m trying to sort the list using Comparator, also converting the date field in long. But I m getting back the list, in that entries are sorted but duplicates though the original list is having unique values.
    I have used the code as follows:
    public int compare(Object arg0, Object arg1) {
    if (((((ComparatorEntity) arg0).getDate()) - (((ComparatorEntity) arg1).getDate())) < 0) {
         return 1 ;
    else {
         return 0 ;
    please help me
    Thanx in advance.
    Abhishek

    Well, your Comparator is wrong because it never returns -1. That won't cause it to insert additional elements though. I'd suggest you print both the list and its size, both before and after sorting.
    Also, if you put the -1 return value in following the pattern you've started, the list will be sorted in reverse order. That may be what you want, but I thought I'd point it out in case it's not.
    When you post code, please use [code] and [/code] tags as described in Formatting Help on the message entry page. It makes it much easier to read.

  • 0x8007000e (E_OUTOFMEMORY) while adding a firewall rule using the windows firewall COM API

    Hello,
    Configuration: Windows Embedded 8 64-bit.
    I'm using the Windows Firewall with Advanced Security COM API. The program uses the INetFwRules interface. Basically, I'm using the following code (Form the code sample available here : http://msdn.microsoft.com/en-us/library/windows/desktop/dd339604%28v=vs.85%29.aspx.)
     I get the error when performing "hr = pFwRules->Add(pFwRule);".
    We can also encounter the problem when removing a rule (using pFwRules->Remove(ruleName);)
    HRESULT hrComInit = S_OK;
    HRESULT hr = S_OK;
    INetFwPolicy2 *pNetFwPolicy2 = NULL;
    INetFwRules *pFwRules = NULL;
    INetFwRule *pFwRule = NULL;
    long CurrentProfilesBitMask = 0;
    BSTR bstrRuleName = SysAllocString(L"SERVICE_RULE");
    BSTR bstrRuleDescription = SysAllocString(L"Allow incoming network traffic to myservice");
    BSTR bstrRuleGroup = SysAllocString(L"Sample Rule Group");
    BSTR bstrRuleApplication = SysAllocString(L"%systemroot%\\system32\\myservice.exe");
    BSTR bstrRuleService = SysAllocString(L"myservicename");
    BSTR bstrRuleLPorts = SysAllocString(L"135");
    // Initialize COM.
    hrComInit = CoInitializeEx(
    0,
    COINIT_APARTMENTTHREADED
    // Ignore RPC_E_CHANGED_MODE; this just means that COM has already been
    // initialized with a different mode. Since we don't care what the mode is,
    // we'll just use the existing mode.
    if (hrComInit != RPC_E_CHANGED_MODE)
    if (FAILED(hrComInit))
    printf("CoInitializeEx failed: 0x%08lx\n", hrComInit);
    goto Cleanup;
    // Retrieve INetFwPolicy2
    hr = WFCOMInitialize(&pNetFwPolicy2);
    if (FAILED(hr))
    goto Cleanup;
    // Retrieve INetFwRules
    hr = pNetFwPolicy2->get_Rules(&pFwRules);
    if (FAILED(hr))
    printf("get_Rules failed: 0x%08lx\n", hr);
    goto Cleanup;
    // Create a new Firewall Rule object.
    hr = CoCreateInstance(
    __uuidof(NetFwRule),
    NULL,
    CLSCTX_INPROC_SERVER,
    __uuidof(INetFwRule),
    (void**)&pFwRule);
    if (FAILED(hr))
    printf("CoCreateInstance for Firewall Rule failed: 0x%08lx\n", hr);
    goto Cleanup;
    // Populate the Firewall Rule object
    pFwRule->put_Name(bstrRuleName);
    pFwRule->put_Description(bstrRuleDescription);
    pFwRule->put_ApplicationName(bstrRuleApplication);
    pFwRule->put_ServiceName(bstrRuleService);
    pFwRule->put_Protocol(NET_FW_IP_PROTOCOL_TCP);
    pFwRule->put_LocalPorts(bstrRuleLPorts);
    pFwRule->put_Grouping(bstrRuleGroup);
    pFwRule->put_Profiles(CurrentProfilesBitMask);
    pFwRule->put_Action(NET_FW_ACTION_ALLOW);
    pFwRule->put_Enabled(VARIANT_TRUE);
    // Add the Firewall Rule
    hr = pFwRules->Add(pFwRule);
    if (FAILED(hr))
    printf("Firewall Rule Add failed: 0x%08lx\n", hr);
    goto Cleanup;
    This works pretty well but, sometimes, at system startup, adding a rule ends up with the error 0x8007000e (E_OUTOFMEMORY) ! At startup, the system is always loaded cause several applications starts at the same time. But nothing abnormal. This is quite a random
    issue.
    According MSDN documentation, this error indicates that the system "failed to allocate the necessary memory".
    I'm not convinced that we ran out of memory.
    Has someone experienced such an issue? How to avoid this?
    Thank you in advance.
    Regards, -Ruben-

    Does Windows 8 desktop have the same issue? Are you building a custom WE8S image, or are you using a full WE8S image? The reason I ask is to make sure you have the modules in the image to support the operation.
    Is Windows Embedded 8.1 industry an option?
    www.annabooks.com / www.seanliming.com / Book Author - Pro Guide to WE8S, Pro Guide to WES 7, Pro Guide to POS for .NET

  • I can't seem to get individual elements when comparing 2 arrays using Compare-Object

    My backup software keeps track of servers with issues using a 30 day rolling log, which it emails to me once a week in CSV format. What I want to do is create a master list of servers, then compare that master list against the new weekly lists to identify
    servers that are not in the master list, and vice versa. That way I know what servers are new problem and which ones are pre-existing and which ones dropped off the master list. At the bottom is the entire code for the project. I know it's a bit much
    but I want to provide all the information, hopefully making it easier for you to help me :)
    Right now the part I am working on is in the Compare-NewAgainstMaster function, beginning on line 93. After putting one more (fake) server in the master file, the output I get looks like this
    Total entries (arrMasterServers): 245
    Total entries (arrNewServers): 244
    Comparing new against master
    There are 1 differences.
    InputObject SideIndicator
    @{Agent= Virtual Server in vCenterServer; Backupse... <=
    What I am trying to get is just the name of the server, which should be $arrDifferent[0] or possibly $arrDifferent.Client. Once I have the name(s) of the servers that are different, then I can do stuff with that. So either I am not accessing the array
    right, building the array right, or using Compare-Object correctly.
    Thank you!
    Sample opening lines from the report
    " CommCells > myComCellServer (Reports) >"
    " myComCellServer -"
    " 30 day SLA"
    CommCell Details
    " Client"," Agent"," Instance"," Backupset"," Subclient"," Reason"," Last Job Id"," Last Job End"," Last Job Status"
    " myServerA"," vCenterServer"," VMware"," defaultBackupSet"," default"," No Job within SLA Period"," 496223"," Nov 17, 2014"," Killed"
    " myServerB"," Oracle Database"," myDataBase"," default"," default"," No Job within SLA Period"," 0"," N/A"," N/A"
    Entire script
    # things to add
    # what date was server entered in list
    # how many days has server been on list
    # add temp.status = pre-existing, new, removed from list
    # copy sla_master before making changes. Copy to archive folder, automate rolling 90 days?
    ## 20150114 Created script ##
    #declare global variables
    $global:arrNewServers = @()
    $global:arrMasterServers = @()
    $global:countNewServers = 1
    function Get-NewServers
    Param($path)
    Write-Host "Since we're skipping the 1st 6 lines, create test to check for opening lines of report from CommVault."
    write-host "If not original report, break out of script"
    Write-Host ""
    #skip 5 to include headers, 6 for no headers
    (Get-Content -path $path | Select-Object -Skip 6) | Set-Content $path
    $sourceNewServers = get-content -path $path
    $global:countNewServers = 1
    foreach ($line in $sourceNewServers)
    #declare array to hold object temporarily
    $temp = @{}
    $tempLine = $line.Split(",")
    #get and assign values
    $temp.Client = $tempLine[0].Substring(2, $tempLine[0].Length-3)
    $temp.Agent = $tempLine[1].Substring(2, $tempLine[1].Length-3)
    $temp.Backupset = $tempLine[3].Substring(2, $tempLine[3].Length-3)
    $temp.Reason = $tempLine[5].Substring(2, $tempLine[5].Length-3)
    #write temp object to array
    $global:arrNewServers += New-Object -TypeName psobject -Property $temp
    #increment counter
    $global:countNewServers ++
    Write-Host ""
    $exportYN = Read-Host "Do you want to export new servers to new master list?"
    $exportYN = $exportYN.ToUpper()
    if ($exportYN -eq "Y")
    $exportPath = Read-Host "Enter full path to export to"
    Write-Host "Exporting to $($exportPath)"
    foreach ($server in $arrNewServers)
    $newtext = $Server.Client + ", " + $Server.Agent + ", " + $Server.Backupset + ", " + $Server.Reason
    Add-Content -Path $exportPath -Value $newtext
    function Get-MasterServers
    Param($path)
    $sourceMaster = get-content -path $path
    $global:countMasterServers = 1
    foreach ($line in $sourceMaster)
    #declare array to hold object temporarily
    $temp = @{}
    $tempLine = $line.Split(",")
    #get and assign values
    $temp.Client = $tempLine[0]
    $temp.Agent = $tempLine[1]
    $temp.Backupset = $tempLine[2]
    $temp.Reason = $tempLine[3]
    #write temp object to array
    $global:arrMasterServers += New-Object -TypeName psobject -Property $temp
    #increment counter
    $global:countMasterServers ++
    function Compare-NewAgainstMaster
    Write-Host "Total entries (arrMasterServers): $($countMasterServers)"
    Write-Host "Total entries (arrNewServers): $($countNewServers)"
    Write-Host "Comparing new against master"
    #Compare-Object $arrMasterServers $arrNewServers
    $arrDifferent = @(Compare-Object $arrMasterServers $arrNewServers)
    Write-Host "There are $($arrDifferent.Count) differences."
    foreach ($item in $arrDifferent)
    $item
    ## BEGIN CODE ##
    cls
    $getMasterServersYN = Read-Host "Do you want to get master servers?"
    $getMasterServersYN = $getMasterServersYN.ToUpper()
    if ($getMasterServersYN -eq "Y")
    $filePathMaster = Read-Host "Enter full path and file name to master server list"
    $temp = Test-Path $filePathMaster
    if ($temp -eq $false)
    Read-Host "File not found ($($filePathMaster)), press any key to exit script"
    exit
    Get-MasterServers -path $filePathMaster
    $getNewServersYN = Read-Host "Do you want to get new servers?"
    $getNewServersYN = $getNewServersYN.ToUpper()
    if ($getNewServersYN -eq "Y")
    $filePathNewServers = Read-Host "Enter full path and file name to new server list"
    $temp = Test-Path $filePathNewServers
    if ($temp -eq $false)
    Read-Host "File not found ($($filePath)), press any key to exit script"
    exit
    Get-NewServers -path $filePathNewServers
    #$global:arrNewServers | format-table client, agent, backupset, reason -AutoSize
    #Write-Host ""
    #Write-Host "Total entries (arrNewServers): $($countNewServers)"
    #Write-Host ""
    #$global:arrMasterServers | format-table client, agent, backupset, reason -AutoSize
    #Write-Host ""
    #Write-Host "Total entries (arrMasterServers): $($countMasterServers)"
    #Write-Host ""
    Compare-NewAgainstMaster

    do not do this:
    $arrDifferent = @(Compare-Object $arrMasterServers $arrNewServers)
    Try this:
    $arrDifferent = Compare-Object $arrMasterServers $arrNewServers -PassThru
    ¯\_(ツ)_/¯
    This is what made the difference. I guess you don't have to declare arrDifferent as an array, it is automatically created as an array when Compare-Object runs and fills it with the results of the compare operation. I'll look at that "pass thru" option
    in a little more detail. Thank you very much!
    Yes - this is the way PowerShell works.  You do not need to write so much code once you understand what PS can and is doing.
    ¯\_(ツ)_/¯

  • Agent Determination Rule using Function Module

    Hi all,
    I am trying to create a custom agent determination rule using function module. But my rule is not getting invoked when the workflow is executed.
    I created a custom rule and linked my function module (with proper signature).
    FUNCTION 'ZRULEXXX''
    ""Local Interface:
    *"  TABLES
    *"      AC_CONTAINER STRUCTURE  SWCONT
    *"      ACTOR_TAB STRUCTURE  SWHACTOR
    *"  EXCEPTIONS
    *"      NOBODY_FOUND
    And I am hard coding some values into table ACTOR_TAB
    REFRESH ACTOR_TAB.
    CLEAR ACTOR_TAB.
    IF SY-SUBRC NE 0.
        RAISE NOBODY_FOUND.
      ELSE.
        ACTOR_TAB-OTYPE = 'US'.
        ACTOR_TAB-OBJID = 'XXXX'.
        APPEND ACTOR_TAB.
        ACTOR_TAB-OTYPE = 'US'.
        ACTOR_TAB-OBJID = 'XXXXXX'.
        APPEND ACTOR_TAB.
      ENDIF.
    But a worklist item is not being created for the users appended to ACTOR_TAB.
    Is there anything am missing. Please let me know.
    Thanks in advance
    Regards
    Raju

    Hi,
    Change it to following code. It will work.
    REFRESH ACTOR_TAB.
    CLEAR ACTOR_TAB.
    *IF SY-SUBRC NE 0.
    *RAISE NOBODY_FOUND.
    *ELSE.
    ACTOR_TAB-OTYPE = 'US'.
    ACTOR_TAB-OBJID = 'XXXX'.
    APPEND ACTOR_TAB.
    ACTOR_TAB-OTYPE = 'US'.
    ACTOR_TAB-OBJID = 'XXXXXX'.
    APPEND ACTOR_TAB.
    *ENDIF.
    Regards,
    Vaishali.

  • Query rule using query variables

    Hi All,
    I am working on a query rule in SharePoint 2013. I am trying to build a query text using query variables to provide profile based results to the users. The query text which I am using in the query builder is of the following format:
    {SearchBoxQuery} CombinedLanguage:{User.PreferredContentLanguage}
    but its not taking the user.preferredcontentlanguage value. Has any one worked on similar type of query rules using query variables? Please share your suggestions.
    Thanks !!

    Hi,
    As I understand, you cannot get the user.preferredcontentlanguage value.
    1. Make sure you have set the value of query variable {user.preferredcontentlanguage}, it will return -1 if not set.
    2. Make sure you search in the right result source.
    3. Please check the crawled property mapped to the managed property CombinedLanguage and make sure that there is at least one value indexed by the crawled property equal to the {user.preferredcontentlanguage}.
    The article below is about the query variables.
    https://technet.microsoft.com/en-us/library/jj683123.aspx
    The article below is about the different query variables return different result examples.
    http://techmikael.blogspot.in/2014/05/s15e03-query-variables-constant-trouble.html
    Best regards
    Sara Fan
    TechNet Community Support

  • Download runtime version of rule used and create in bpm process

    Dear experts,
    does anybody know, if there is a possibility of updating used brm rules used in a bpm process? There seems to be a way, when you create a separate brm project:
    Importing an Updated Project into the Rules Composer - Working with the Rules Manager - SAP Library
    How does this work for rules coming from bpm?
    Do i really have to manually export and import things e. g. over excel for this?
    Regards,
    Markus

    Dear Siddhant,
    thanks a lot for your reply. You got it perfectly right.
    What do you mean with "always points to the updated rules"?
    Do you mean, that using the "Download runtime version" feature on the brm project helps us to keep the rule up-to-date within NWDS?
    Regards,
    Markus

  • How to Create Windows Firewall Predefined rules using Powershell

    Windows Firewall Predefined rules using Powershell
    Following commands are working some time however sometimes it's giving errors. Any help would be appreciated
    WORKING ==> Set-NetFirewallRule -DisplayGroup "File and Printer Sharing" -Enabled True 
    Set-NetFirewallRule -DisplayGroup "File and Printer Sharing" -Enabled True -Direction Inbound
    NOT WORKING
    PS C:\Windows\system32> Set-NetFirewallRule -DisplayGroup "File and Printer Sharing" -Enabled True -Direction Outbound
    Set-NetFirewallRule : One of the port keywords is invalid.
    At line:1 char:1
    + Set-NetFirewallRule -DisplayGroup "File and Printer Sharing" -Enabled True -Dire ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (MSFT_NetFirewal...ystemName = ""):root/standardcimv2/MSFT_NetFirewallRule) [Se 
       t-NetFirewallRule], CimException
        + FullyQualifiedErrorId : HRESULT 0x80070057,Set-NetFirewallRule
    PS C:\Windows\system32> Set-NetFirewallRule -DisplayGroup "File and Printer Sharing" -Enabled True -Direction Outbound
    Set-NetFirewallRule : One of the port keywords is invalid.
    At line:1 char:1
    + Set-NetFirewallRule -DisplayGroup "File and Printer Sharing" -Enabled True -Dire ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidArgument: (MSFT_NetFirewal...ystemName = ""):root/standardcimv2/MSFT_NetFirewallRule) [Se 
       t-NetFirewallRule], CimException
        + FullyQualifiedErrorId : HRESULT 0x80070057,Set-NetFirewallRule
    Anoop C Nair (My Blog www.AnoopCNair.com)
    - Twitter @anoopmannur -
    FaceBook Forum For SCCM

    The command:
    Get-NetFirewallRule -DisplayGroup "File and Printer Sharing" -Direction Outbound
    produces the output:
    Name : FPS-NB_Session-In-TCP
    DisplayName : File and Printer Sharing (NB-Session-In)
    Description : Inbound rule for File and Printer Sharing to allow NetBIOS Session Service connections. [TCP 139]
    DisplayGroup : File and Printer Sharing
    Group : @FirewallAPI.dll,-28502
    Enabled : True
    Profile : Any
    Platform : {}
    Direction : Outbound
    Action : Allow
    EdgeTraversalPolicy : Block
    LooseSourceMapping : False
    LocalOnlyMapping : False
    Owner :
    PrimaryStatus : OK
    Status : The rule was parsed successfully from the store. (65536)
    EnforcementStatus : NotApplicable
    PolicyStoreSource : PersistentStore
    PolicyStoreSourceType : Local
    Name : FPS-NB_Session-Out-TCP
    DisplayName : File and Printer Sharing (NB-Session-Out)
    Description : Outbound rule for File and Printer Sharing to allow NetBIOS Session Service connections. [TCP 139]
    DisplayGroup : File and Printer Sharing
    Group : @FirewallAPI.dll,-28502
    Enabled : True
    Profile : Any
    Platform : {}
    Direction : Outbound
    Action : Allow
    EdgeTraversalPolicy : Block
    LooseSourceMapping : False
    LocalOnlyMapping : False
    Owner :
    PrimaryStatus : OK
    Status : The rule was parsed successfully from the store. (65536)
    EnforcementStatus : NotApplicable
    PolicyStoreSource : PersistentStore
    PolicyStoreSourceType : Local
    Name : FPS-SMB-In-TCP
    DisplayName : File and Printer Sharing (SMB-In)
    Description : Inbound rule for File and Printer Sharing to allow Server Message Block transmission and reception via Named Pipes. [TCP 445]
    DisplayGroup : File and Printer Sharing
    Group : @FirewallAPI.dll,-28502
    Enabled : True
    Profile : Any
    Platform : {}
    Direction : Outbound
    Action : Allow
    EdgeTraversalPolicy : Block
    LooseSourceMapping : False
    LocalOnlyMapping : False
    Owner :
    PrimaryStatus : OK
    Status : The rule was parsed successfully from the store. (65536)
    EnforcementStatus : NotApplicable
    PolicyStoreSource : PersistentStore
    PolicyStoreSourceType : Local
    Name : FPS-SMB-Out-TCP
    DisplayName : File and Printer Sharing (SMB-Out)
    Description : Outbound rule for File and Printer Sharing to allow Server Message Block transmission and reception via Named Pipes. [TCP 445]
    DisplayGroup : File and Printer Sharing
    Group : @FirewallAPI.dll,-28502
    Enabled : True
    Profile : Any
    Platform : {}
    Direction : Outbound
    Action : Allow
    EdgeTraversalPolicy : Block
    LooseSourceMapping : False
    LocalOnlyMapping : False
    Owner :
    PrimaryStatus : OK
    Status : The rule was parsed successfully from the store. (65536)
    EnforcementStatus : NotApplicable
    PolicyStoreSource : PersistentStore
    PolicyStoreSourceType : Local
    Name : FPS-NB_Name-In-UDP
    DisplayName : File and Printer Sharing (NB-Name-In)
    Description : Inbound rule for File and Printer Sharing to allow NetBIOS Name Resolution. [UDP 137]
    DisplayGroup : File and Printer Sharing
    Group : @FirewallAPI.dll,-28502
    Enabled : True
    Profile : Any
    Platform : {}
    Direction : Outbound
    Action : Allow
    EdgeTraversalPolicy : Block
    LooseSourceMapping : False
    LocalOnlyMapping : False
    Owner :
    PrimaryStatus : OK
    Status : The rule was parsed successfully from the store. (65536)
    EnforcementStatus : NotApplicable
    PolicyStoreSource : PersistentStore
    PolicyStoreSourceType : Local
    Name : FPS-NB_Name-Out-UDP
    DisplayName : File and Printer Sharing (NB-Name-Out)
    Description : Outbound rule for File and Printer Sharing to allow NetBIOS Name Resolution. [UDP 137]
    DisplayGroup : File and Printer Sharing
    Group : @FirewallAPI.dll,-28502
    Enabled : True
    Profile : Any
    Platform : {}
    Direction : Outbound
    Action : Allow
    EdgeTraversalPolicy : Block
    LooseSourceMapping : False
    LocalOnlyMapping : False
    Owner :
    PrimaryStatus : OK
    Status : The rule was parsed successfully from the store. (65536)
    EnforcementStatus : NotApplicable
    PolicyStoreSource : PersistentStore
    PolicyStoreSourceType : Local
    Name : FPS-NB_Datagram-In-UDP
    DisplayName : File and Printer Sharing (NB-Datagram-In)
    Description : Inbound rule for File and Printer Sharing to allow NetBIOS Datagram transmission and reception. [UDP 138]
    DisplayGroup : File and Printer Sharing
    Group : @FirewallAPI.dll,-28502
    Enabled : True
    Profile : Any
    Platform : {}
    Direction : Outbound
    Action : Allow
    EdgeTraversalPolicy : Block
    LooseSourceMapping : False
    LocalOnlyMapping : False
    Owner :
    PrimaryStatus : OK
    Status : The rule was parsed successfully from the store. (65536)
    EnforcementStatus : NotApplicable
    PolicyStoreSource : PersistentStore
    PolicyStoreSourceType : Local
    Name : FPS-NB_Datagram-Out-UDP
    DisplayName : File and Printer Sharing (NB-Datagram-Out)
    Description : Outbound rule for File and Printer Sharing to allow NetBIOS Datagram transmission and reception. [UDP 138]
    DisplayGroup : File and Printer Sharing
    Group : @FirewallAPI.dll,-28502
    Enabled : True
    Profile : Any
    Platform : {}
    Direction : Outbound
    Action : Allow
    EdgeTraversalPolicy : Block
    LooseSourceMapping : False
    LocalOnlyMapping : False
    Owner :
    PrimaryStatus : OK
    Status : The rule was parsed successfully from the store. (65536)
    EnforcementStatus : NotApplicable
    PolicyStoreSource : PersistentStore
    PolicyStoreSourceType : Local
    Name : FPS-ICMP4-ERQ-In
    DisplayName : File and Printer Sharing (Echo Request - ICMPv4-In)
    Description : Echo Request messages are sent as ping requests to other nodes.
    DisplayGroup : File and Printer Sharing
    Group : @FirewallAPI.dll,-28502
    Enabled : True
    Profile : Any
    Platform : {}
    Direction : Outbound
    Action : Allow
    EdgeTraversalPolicy : Block
    LooseSourceMapping : False
    LocalOnlyMapping : False
    Owner :
    PrimaryStatus : OK
    Status : The rule was parsed successfully from the store. (65536)
    EnforcementStatus : NotApplicable
    PolicyStoreSource : PersistentStore
    PolicyStoreSourceType : Local
    Name : FPS-ICMP4-ERQ-Out
    DisplayName : File and Printer Sharing (Echo Request - ICMPv4-Out)
    Description : Echo Request messages are sent as ping requests to other nodes.
    DisplayGroup : File and Printer Sharing
    Group : @FirewallAPI.dll,-28502
    Enabled : True
    Profile : Any
    Platform : {}
    Direction : Outbound
    Action : Allow
    EdgeTraversalPolicy : Block
    LooseSourceMapping : False
    LocalOnlyMapping : False
    Owner :
    PrimaryStatus : OK
    Status : The rule was parsed successfully from the store. (65536)
    EnforcementStatus : NotApplicable
    PolicyStoreSource : PersistentStore
    PolicyStoreSourceType : Local
    Name : FPS-ICMP6-ERQ-In
    DisplayName : File and Printer Sharing (Echo Request - ICMPv6-In)
    Description : Echo Request messages are sent as ping requests to other nodes.
    DisplayGroup : File and Printer Sharing
    Group : @FirewallAPI.dll,-28502
    Enabled : True
    Profile : Any
    Platform : {}
    Direction : Outbound
    Action : Allow
    EdgeTraversalPolicy : Block
    LooseSourceMapping : False
    LocalOnlyMapping : False
    Owner :
    PrimaryStatus : OK
    Status : The rule was parsed successfully from the store. (65536)
    EnforcementStatus : NotApplicable
    PolicyStoreSource : PersistentStore
    PolicyStoreSourceType : Local
    Name : FPS-ICMP6-ERQ-Out
    DisplayName : File and Printer Sharing (Echo Request - ICMPv6-Out)
    Description : Echo Request messages are sent as ping requests to other nodes.
    DisplayGroup : File and Printer Sharing
    Group : @FirewallAPI.dll,-28502
    Enabled : True
    Profile : Any
    Platform : {}
    Direction : Outbound
    Action : Allow
    EdgeTraversalPolicy : Block
    LooseSourceMapping : False
    LocalOnlyMapping : False
    Owner :
    PrimaryStatus : OK
    Status : The rule was parsed successfully from the store. (65536)
    EnforcementStatus : NotApplicable
    PolicyStoreSource : PersistentStore
    PolicyStoreSourceType : Local
    Name : FPS-LLMNR-In-UDP
    DisplayName : File and Printer Sharing (LLMNR-UDP-In)
    Description : Inbound rule for File and Printer Sharing to allow Link Local Multicast Name Resolution. [UDP 5355]
    DisplayGroup : File and Printer Sharing
    Group : @FirewallAPI.dll,-28502
    Enabled : True
    Profile : Any
    Platform : {}
    Direction : Outbound
    Action : Allow
    EdgeTraversalPolicy : Block
    LooseSourceMapping : False
    LocalOnlyMapping : False
    Owner :
    PrimaryStatus : OK
    Status : The rule was parsed successfully from the store. (65536)
    EnforcementStatus : NotApplicable
    PolicyStoreSource : PersistentStore
    PolicyStoreSourceType : Local
    Name : FPS-LLMNR-Out-UDP
    DisplayName : File and Printer Sharing (LLMNR-UDP-Out)
    Description : Outbound rule for File and Printer Sharing to allow Link Local Multicast Name Resolution. [UDP 5355]
    DisplayGroup : File and Printer Sharing
    Group : @FirewallAPI.dll,-28502
    Enabled : True
    Profile : Any
    Platform : {}
    Direction : Outbound
    Action : Allow
    EdgeTraversalPolicy : Block
    LooseSourceMapping : False
    LocalOnlyMapping : False
    Owner :
    PrimaryStatus : OK
    Status : The rule was parsed successfully from the store. (65536)
    EnforcementStatus : NotApplicable
    PolicyStoreSource : PersistentStore
    PolicyStoreSourceType : Local
    The command:
    (Get-NetFirewallRule -DisplayGroup "File and Printer Sharing" -Direction Outbound).DisplayName
    shows the display names of the 14 outbound rules in the FPS group:
    File and Printer Sharing (NB-Session-In)
    File and Printer Sharing (NB-Session-Out)
    File and Printer Sharing (SMB-In)
    File and Printer Sharing (SMB-Out)
    File and Printer Sharing (NB-Name-In)
    File and Printer Sharing (NB-Name-Out)
    File and Printer Sharing (NB-Datagram-In)
    File and Printer Sharing (NB-Datagram-Out)
    File and Printer Sharing (Echo Request - ICMPv4-In)
    File and Printer Sharing (Echo Request - ICMPv4-Out)
    File and Printer Sharing (Echo Request - ICMPv6-In)
    File and Printer Sharing (Echo Request - ICMPv6-Out)
    File and Printer Sharing (LLMNR-UDP-In)
    File and Printer Sharing (LLMNR-UDP-Out)
    If your output is different than this, it means rules have been removed (or added) to the File and Print Sharing group.
    For example, if you run the command:
    New-NetFirewallRule -DisplayName "My test rule 2" -group "File and Printer Sharing" -Enabled True -Protocol tcp -LocalPort 12346 -Direction Inbound
    This adds a new inbound firewall rule to the FPS group. Output looks like:
    Name : {06449724-944b-4048-834f-8870b9dce4f6}
    DisplayName : My test rule 2
    Description :
    DisplayGroup : File and Printer Sharing
    Group : File and Printer Sharing
    Enabled : True
    Profile : Any
    Platform : {}
    Direction : Inbound
    Action : Allow
    EdgeTraversalPolicy : Block
    LooseSourceMapping : False
    LocalOnlyMapping : False
    Owner :
    PrimaryStatus : OK
    Status : The rule was parsed successfully from the store. (65536)
    EnforcementStatus : NotApplicable
    PolicyStoreSource : PersistentStore
    PolicyStoreSourceType : Local
    This test rule is of course useless because there's no listener on TCP port 12346 on this particular machine..
    The new rule can also be viewed in Windows Firewall with Advanced Security:
    Now if you run the command:
    (Get-NetFirewallRule -DisplayGroup "File and Printer Sharing" -Direction Inbound).DisplayName
    the output will look like:
    File and Printer Sharing (Spooler Service - RPC)
    File and Printer Sharing (Spooler Service - RPC-EPMAP)
    My test rule 2
    Sam Boutros, Senior Consultant, Software Logic, KOP, PA http://superwidgets.wordpress.com (Please take a moment to Vote as Helpful and/or Mark as Answer, where applicable)

  • Sort column by without case sensitive  using Comparator interface

    Hello,
    When i sorted my values of a column in a table it was showing all sorted upper case letters at top rows and all sorted lower case letters on bottom. So i would like to sort values without case sensitive order. Like. A, a, B, b, C, c....
    I am using Collection class to sort vector that contains the values of a column as an object and using Comparator interface to sort the values of a column in either ascending and descending order. It facilitates to compare two objects like.
    <class> Collections.sort(<Vector contains values of column to be sort>, <Comparator interface>);
    and in interface it compares two objects ((Comparable) object).compareTo(object);
    Now Let's suppose i have three values say Z, A, a to sort then this interface sorted in ascending order like A, Z, a
    but the accepted was A, a, Z. So how can i get this sequence. I would like to sort the values of a column without case sensitive manner.
    Thanks
    Ashish Pancholi
    Edited by: A.Pancholi on Dec 29, 2008 1:36 PM

    [http://java.sun.com/javase/6/docs/api/java/lang/String.html#CASE_INSENSITIVE_ORDER]

  • Sorting date using Comparator.

    Hi frnds,
    I have a problem sorting a date using comparator Interface. To the compare method I am passing Objects, which contains values retrieved from bean.
    I have hyperlinks for all the fields, upon clicking am able to sort all the fields except the date:
    The format of date is MM/DD/YYYY. It is sorting only taking month into consideration. I want the date to be sorted completely taking into consideration the complete date.
    Kindly help me in this regards.
    Below is the code listed:
    public int compare(Object vendoremployee1, Object vendoremployee2){
              String strSowTitle1 = ((CVendorEmployees) vendoremployee1).getSowTitle().toUpperCase();
              String strSowNum1 = ((CVendorEmployees) vendoremployee1).getSowNumber().toUpperCase();
              String lastName1 = ((CVendorEmployees) vendoremployee1).getLastName().toUpperCase();
              String strCreatedDate1 = ((CVendorEmployees) vendoremployee1).getCreatedDate().toUpperCase();
              String strSowTitle2 = ((CVendorEmployees) vendoremployee2).getSowTitle().toUpperCase();
              String strSowNum2 = ((CVendorEmployees) vendoremployee2).getSowNumber().toUpperCase();
              String lastName2 = ((CVendorEmployees) vendoremployee2).getLastName().toUpperCase();
              String strCreatedDate2 = ((CVendorEmployees) vendoremployee2).getCreatedDate().toUpperCase();
    // How do i sort
    strCreatedDate1.compareTo(strCreatedDate2);Thanks

    II am assuming that you are using either the Collections.sort() method, passing in a Vector of your objects or the Arrays.sort() method passing in an array of your objects. Either way your class definition for your object must implement Comparable. Then you have to implement the compareTo(Object o) method. Inside this method you can setup the sort any way you want. If you want the object to sort by the date member, the easiest way to accomplish the sort is to get the milliseconds from EPOC. Then you can sort either ascending or descending.
    Example code: forgive the formatting, cut and paste it into an editor
    The example has the data member as a Long object.
    Hope this is helpful.
    public int compareTo( Object o ) throws ClassCastException
              YourClassNameHere obj;
              if( o instanceof YourClassNameHere)
                   obj = (YourClassNameHere) o;
              else
                   throw new ClassCastException("Specified Object o is not of type YourClassNameHere." );
               //Only if these are not primitives
              if( this.getYourDatamember() != null && obj.getYourDatamember() != null) 
                        if(this. getYourDatamember().longValue() < obj. getYourDatamember().longValue())
                              return -1;
                        else if( this. getYourDatamember().longValue() > obj.getYourDatamember().longValue() )
                             return 1;
                        else
                             return 0;
              else if(this.getYourDatamember != null && obj.getYourDatamember() == null)
                   return -1;
              else if(this.getYourDatamember == null && obj.getYourDatamember() != null)
                   return 1;
              else
                   return 0;
         }

  • Filtering assoc rules using subset method.

    Hello,
    Am trying to filter the association rules using subset method of arules package.
    I have a vector of items that are to be filtered from LHS/RHS.
    Here is the sample code that i have used.
    metalAssoc.mod <-ore.odmAssocRules(~.,NBAssocreqOF,case.id.column="TRANSACTION_VALUE",item.id.column = "PARAM_NAME",
      item.value.column = "PARAM_VALUE_BIN",min.support = 0.05 ,min.confidence = 0.5,max.rule.length = 5)
    rules <- rules(metalAssoc.mod)
    arules <- ore.pull(rules)
    1. Able to filter the rules using below condition.
    arules.subset <- subset(arules, subset= rhs %pin% "Temperature" |  rhs %pin% "Pressure" )
    2. We get a string like  "Temperature";"Pressure" to the function as input.
    Tried forming a vector out of the string and
    arules.subset <- subset(arules, subset= rhs %pin% c( "Temperature", "Pressure")
    This command throws the below error.
    Error in rhs %in% c("Pressure", "Temperature") :
      table contains an unknown item label
    3. Tried forming a string str with valuerhs %pin% "Temperature" |  rhs %pin% "Pressure"
    arules.subset <- subset(arules, subset= str )
    Got the below error
    Error in .translate_index(i, rownames(x), nrow(x)) :
      subscript out of bounds
    Our aim is to filter the rules based on the list of items from RHS/LHS that are passed as a function variable.
    Any help is greatly appreciated.
    Thanks,
    Swathi.

    Swathi,
    If I understand correctly, the following example from the ore.odmAssocRules help file accomplishes what you want using the functions itemsets() along with subset():
    set.seed(7654)
    id <- 1:10
    color <- sample(c("B", "Y", "W", "G"), 10, replace=TRUE)
    shape <- sample(c("tri", "rect", "round"), 10, replace=TRUE)
    state <- sample(c("MA", "CA", "NY"), 10, replace=TRUE)
    data3.ore <- ore.frame(ID=id, COLOR=color, SHAPE=shape, STATE=state)
    ar.mod3 <- ore.odmAssocRules(~., data3.ore, case.id.column = "ID",
             min.support = 0.15, min.confidence = 0.05, max.rule.length = 2)
    rules <- subset(rules(ar.mod3), min.confidence=0.5,
             lhs=list(SHAPE="tri", COLOR="B"), orderby="lift")
    itemsets <- subset(itemsets(ar.mod3), min.support=0.35)
    To view the help file for ore.odmAssocRules, type at the R command prompt:
    ?ore.odmAssocRules
    Sherry

  • Hi guys, need your help with iCloud notes on Mac 10.7.5; I've found this feature's more useful comparing with stickers, however can't pin notes to desktop or dock, "double click"on the note doesn't work with this version of software.

    Hi guys! Need you help with iCloud Notes on Mac Pro 10.7.5. I've found this apllication more useful comparing with "stickers", however can't pin it to desktop or dock. Thanks a lot in advance!

    Hi guys! Need you help with iCloud Notes on Mac Pro 10.7.5. I've found this apllication more useful comparing with "stickers", however can't pin it to desktop or dock. Thanks a lot in advance!

  • Using Comparator to sort an array

    I didn't undersatnd why a comparator is used for sorting an arry in ascending order
    For descending also i didn't understand the logic it follows
    I have a program which works for both asc and desc using comparator
    import java.io.*;
    import java.util.*;
         class Ascend implements Comparator<Integer>
              public int compare(Integer i1, Integer i2)
                   return i1.compareTo(i2);
         class Descend implements Comparator<Integer>
              public int compare(Integer i1, Integer i2)
                   return i2.compareTo(i1);
         public class ArrayDemo {
         public static void main(String[] args) throws Exception
              BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
              System.out.println("How many Elements");
              int size = Integer.parseInt(br.readLine());
              Integer[] arr = new Integer[size];
              for(int i=0 ;i<size;i++)
                   System.out.println("Enter "+(i+1)+"th element");
                   arr=Integer.parseInt(br.readLine());     
              Arrays.sort(arr, new Ascend());
              System.out.println("The sorted array in Ascending order is:");
              display(arr);
              Arrays.sort(arr, new Descend());
              System.out.println("The sorted array in Descending order is:");
              display(arr);
         static void display(Integer[] a)
              for(Integer i:a)
                   System.out.print(i+"\t");
                   System.out.println("");
    can anyone explain
    1 why do we are passing an object of Ascend class(code was there in above program) to Arrays.sort() method
    2. what will be retruned by that object
    3 why do we are passing an object of Descend class(code was there in above program) to Arrays.sort() method
    4. what will be retruned by that object
    5 We can sort the array in ascending simply by using Arrays.sort(arr) method directly, then what was usage of Ascend class
    If I am wrong in understating the code of the above pls correct me and tell me the actual usage of Comparator<T> interfance and its method compare()
    Pls....

    camickr wrote:
    Don't forget to use the Code Formatting Tags so the posted code retains its original formatting. That is done by selecting the code and then clicking on the "Code" button above the question input area.am sorry!! pls find the code and try to execute it. It works fine in sorting
    import java.io.*;
    import java.util.*;
         class Ascend implements Comparator<Integer>
              public int compare(Integer i1, Integer i2)
                   return i1.compareTo(i2);
         class Descend implements Comparator<Integer>
              public int compare(Integer i1, Integer i2)
                   return i2.compareTo(i1);
         public class ArrayDemo {
         public static void main(String[] args) throws Exception
              BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
              System.out.println("How many Elements");
              int size = Integer.parseInt(br.readLine());
              Integer[] arr = new Integer[size];
              for(int i=0 ;i<size;i++)
                   System.out.println("Enter "+(i+1)+"th element");
                   arr=Integer.parseInt(br.readLine());     
              Arrays.sort(arr, new Ascend());
              System.out.println("The sorted array in Ascending order is:");
              display(arr);
              Arrays.sort(arr, new Descend());
              System.out.println("The sorted array in Descending order is:");
              display(arr);
         static void display(Integer[] a)
              for(Integer i:a)
                   System.out.print(i+"\t");
                   System.out.println("");
    Can u explain the below
    what happens actually when Arrays.sort(arr,new Descend() ) is executed

  • Is there any way to set a mail rule using an applescript code?

    I just wanted to know if there is a way to set a rule using a applescript, so that I can send it to a friend.

    You will need to use OLE on the client, which would further require the use of WebUtil. Here (below) are a couple of MS examples that you would need to convert to pl/sql. There are a variety of Oracle notes which discuss reading and writing to MS Word and Excel. These can likely be used as a starting place to talk to Outlook. There is a WebUtil demo which includes an example of how to write to MS Word. It can be found on the WebUtil home page:
    http://www.oracle.com/technetwork/developer-tools/forms/webutil-090641.html
    <li> http://support.microsoft.com/kb/160502
    <li> http://support.microsoft.com/kb/170262

Maybe you are looking for

  • Freezing and issues on STB Model QIP7216

    So I've had Verizon FIOS now almost a year. I'm on a QIP7216 STB running version 1.7. I've been experiencing problems in the following areas; • Recorded programs freeze upon play back. STB also seems to freeze momentarily hang until last command can

  • Unable to install itunes error 7 and windows error 193

    I could not update my itunes. I have Windows 7. I got an error 7 and windows error 193. I followed itunes Microsoft.Net fix but it did not work. I get a message to reinstall. Itunes is successfully installed. But then there is a message that I need t

  • What is AppleCare Technician Training? How does it helps?

    Hi i am a student of IT... I have decided to built my IT career based on mac. as i was looking for what tranings are there to start my career with mac i found about AppleCare Technician Training. but i dont know what does it actuly do? i realy want t

  • I can't a DVD from my Powerbook?

    Hi, Something weird was happening with my computer and I was running Firewire disk mode to salvage files from an overwritten iMac. Also was watching a show. The whole screen faded out and I panicked and shut my Mac down and heard a tone while shuttin

  • My computer crashed and all songs were lost, how do I get them back?

    My Dell computer crashed, and I lost my songs in my library. When I plugged it back in, only the purchased songs were put back in the library. How can I put all of the songs on my iPod Touch back into my iTunes library? Please help me! Thank you so m