## 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 topics.id FROM topics   INNER JOIN categories ON topics. category_id = categories.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 replies.id 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 https://mathematica.stackexchange.com/a/197936/42847 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] ``

True

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|>] ``

True

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..?

## 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

## What is the difference between “illegitimate opportunity theory” and “differential association theory” [on hold]

What is the difference between “illegitimate opportunity theory” and “differential association theory”

The two really seem based on the same idea. What is the key difference between the two theories?

## Association in Use Case diagram have arrow?

I research about [association] in use case diagram : It is a line has not arrow as image: https://www.uml-diagrams.org/use-case-actor-association.html

But i using Rational Rose: If i draw a [association], it is a line has arrow: Is it ok? Association in Use Case diagram have arrow?

## NBA – National Basketball Association Teams https://hdvstvon.co/76ersvsbucks/

NBA – National Basketball Association Teams
https://hdvstvon.co/76ersvsbucks/
https://hdvstvon.co/kingsvscavaliers/
https://hdvstvon.co/lakersvswarriors/
——————-
https://hdvstvon.co/melvsess/
https://hdvstvon.co/essendonvsmelbourne/
——————–
https://hdvstvon.co/greenbayvsmarshall/
https://hdvstvon.co/marshallvsgreenbay/
https://hdvstvon.co/lipscombvstexas/…

NBA – National Basketball Association Teams https://hdvstvon.co/76ersvsbucks/