Association Rules Generation is implementin in java(ecplice)

I found the following java code for association rules generation and I replace my own dataset in this. But I have uncorrect output but no error in code.Please explain me where the part of code is misused and changed in this code.

details of code

package net.coderodde.mining.associationrules;  import;  import;  import java.util.ArrayList;  import java.util.Arrays;  import java.util.HashSet;  import java.util.List;  import java.util.Scanner;  import java.util.Set;  public class Demo {      public static void main(String[] args) throws FileNotFoundException {         demo();     }      private static void demo() throws FileNotFoundException {         AprioriFrequentItemsetGenerator<String> generator =                 new AprioriFrequentItemsetGenerator<>();          List<Set<String>> itemsetList = new ArrayList<>();          Scanner scanner = new Scanner(new File("bc_dataset.csv"));            scanner.nextLine();            while (scanner.hasNextLine()) {                String str = scanner.nextLine();                itemsetList.add(new HashSet<>(Arrays.asList(str.split(","))));            }            System.out.println(itemsetList);            scanner.close();          long startTime = System.nanoTime();         FrequentItemsetData<String> data = generator.generate(itemsetList, 0.04);         long endTime = System.nanoTime();          int i = 1;          System.out.println("--- Frequent itemsets ---");          for (Set<String> itemset : data.getFrequentItemsetList()) {             System.out.printf("%2d: %9s, support: %1.1f\n",                               i++,                                itemset,                               data.getSupport(itemset));         }          System.out.printf("Mined frequent itemset in %d milliseconds.\n",                            (endTime - startTime) / 1_000_000);          startTime = System.nanoTime();       List<AssociationRule<String>> associationRuleList =                  new AssociationRuleGenerator<String>()                         .mineAssociationRules(data, 0.4);         endTime = System.nanoTime();          i = 1;          System.out.println();        System.out.println("--- Association rules ---");          for (AssociationRule<String> rule : associationRuleList) {             System.out.printf("%2d: %s\n", i++, rule);         }          System.out.printf("Mined association rules in %d milliseconds.\n",                           (endTime - startTime) / 1_000_000);     } } 

Iterate over deepest values in a nested Association

Is it possible to iterate over the values of the deepest layer of keys in a nested association? For example:

assoc = <| "a"->0, "b"-> <| "c"->"one" ,"d"->2 , "e"->3|>, "f"->4|> 

Would it be possible to iterate over just the values of at the deepest level in this example {0,"one",2,3,4}? Or, possible to iterate over the deepest level of keys such that I could test the type for the value of each key?

Is a security association (SA) implemented in ESP and AH protocols?

I’m reading about security associations. I’ve understood that a SA is a virtual connection between a client and a sever, in which all the security parameters, such as encryption algorithm, IP origin and source HMAC algorithm… are defined.

My question is: Is SA implemented when using AH and ESP protocols, or only in ESP when confidentiality is required?

And there goes another question: How does the router know whether to use IPsec or not? By using the protocol field in the IP header?

How to return latest records in nested association?

This query works just fine but it is taking so much time.

SELECT * FROM replies WHERE replies.topic_id IN (   SELECT FROM topics   INNER JOIN categories ON topics. category_id =   WHERE   topics.hidden = 0 AND topics.deleted = 0   AND (categories.private_category = 0 OR categories.private_category IS NULL) ) AND replies.deleted = 0 AND replies.total_points > -1 ORDER BY DESC LIMIT 10" 

This query should return the latest replies from topics. Each reply belongs to topic (post). Each post belongs to category. The app has nested replies.

How to change the default file association for an unrecognized file type?

The default file association for an unrecognized file extension is TextEdit. I’d rather it use Emacs. How can this be changed? High-Sierra and Mojave, if it makes a difference.

Note: This is not about changing the default for a given file-type. I’m asking about the fall-back for any file that has no assigned default.

Wrapped Association into a “structure”: how to define Equal[] and what are the good practices for package dev?

Using a nice answer I got from a previous question I define:

ClearAll[MyData] SetAttributes[MyData, HoldFirst] MyData[stuff : Except[_Symbol]] :=    With[{evaluatedStuff = stuff},     Module[{storeVar = evaluatedStuff}, MyData[storeVar]] /;      AssociationQ[evaluatedStuff]]; 

I understand that when stuff argument is an association, a local variable is created (thanks to Module[...]). This part is ok, demo:

MyData[<|"a" -> 1|>] 

MyData[storeVar$ 7548]

Now let’s say I want to compare two such structures:

No problem here:

q = <|"a" -> 1|> MyData[q]==MyData[q] 


A problem I understand

MyData[<|"a" -> 1|>] == MyData[<|"a" -> 1|>] 

MyData[storeVar$ 7538] == MyData[storeVar$ 7539]

Here we use two different internal variables to store stuff argument and they are not evaluated because of the HoldFirst attribute

So I introduce an overload for the Equal[] operator:

MyData /: Equal[A_MyData, B_MyData] := First[A] == First[B] 

and now:

MyData[<|"a" -> 1|>] == MyData[<|"a" -> 1|>] 


works as expected.

Problem with VerificationTest[]: now I want to do units tests:

VerificationTest[MyData[<|"a" -> 1|>], MyData[<|"a" -> 1|>]] 

but I get an TestResultObject with Failure Outcome!!

First question: Why and how to fix that? (maybe my way to define Equal[] is not the right one?)

Second question:

More broadly speaking, when you write a MMA package using “structure” like MyData, what is the good practice when defining stuff like:

Format[MyData[a_Symbol?AssociationQ]] := "Pretty print of MyData[]" MyData /: MyData[data_Symbol?AssociationQ][s_String] := data[[s]]; 

To put then in the public section or in the private one?

BeginPackage["FooPackage`"];  MyData::usage="A structure ...";   ... <- Format, Equal,... Here ?  Begin["`Private`"];  ... <- Or here???  End[] (*Private *)  EndPackage[]; 

Change file association programmatically without ftype/assoc

From batch the pair ftype+assoc works fine:

ftype my_file_txt=C:\Windows\notepad.exe "%%1" assoc .txt=my_file_txt 

But from JScript/CScript/WScript it can’t be done because these are virtual commands existng within cmd.exe only.

Question: how to change file association another way?

I can exec a special .bat file probably, but I’d like to reduce amount of weird things in my script.

Windows 7 x64

Sort each column in a list contained in an association (envelope of Monte Carlo replicas)

I have an Association which contains three matrices. Each row of a matrix denotes a different set of paramenters, while Each column contains the outcomes of the function for a specific value of x.

I want to sort each column in ascending order, so that the first row will now contains the lowest values, while the last row will contain the highest. This rows will be then used to create a function that represents the envelope of the different outcomes of a Monte Carlo method.

I tried using Sort, together with Transpose but the result is messed up.

Thanks for the help

Is there any association between public IP and secondary alias IP in google compute engine?

I want to implement a HA solution for my product in GCP, where I want to move secondary alias IP and public IP from active to standby node on switchover. For this purpose, I want all traffic coming on public IP of an interface should land on secondary alias IP address. What I observed is: the traffic coming on a public ip is landing on primary private ip address. So is there any way we can bind public IP to alias IP..?

Thanks in advance.

Wireless association to failed for an unknown reason – Win 10

I am unable to connect to my Android Hotspot since the past 2 days, using my Win 10 Laptop (Dell XPS). No Changes in the system. Android 8.1

WLAN Driver : Dell Wireless 1820 802.11 ac Version -> 1.566.0.2

In the System even Log I can see the message: “Repair Option Failure”

I have already tried all the steps below :

Updating my device driver (Online).

Tried Checking my SSID Username Pwd.

Changed my SSID Name (Just in case).

Reset WINSOCK entries to installation defaults: netsh winsock reset catalog

Reset IPv4 TCP/IP stack to installation defaults. netsh int ipv4 reset reset.log

Reset IPv6 TCP/IP stack to installation defaults. netsh int ipv6 reset reset.log (Rebooted after above 3 steps)

Kindly help. TIA