Sort List Task – Mathematica Stack Exchange

I'm trying to understand how to sort multiple columns in Mathematica.

Here is a simple data set that consists of results from sports games. Each element represents a game and contains fields for the date, the name of the first team, the score of the first team, the name of the second team, the score of the second team and the location (home, away or neutral). Some elements may be duplicates, or they may not agree on who played whom or where a game was played. (Suppose a team could only play one game a day.)

I want to be able to rate every game and mark any conflict as "FALSE" or no conflict as "TRUE".

The points list is called gameList:

{{DateObject({2020,1,1}),"Alpha",1,"Bravo",2,"away"},
 {DateObject({2020,1,1}),"Bravo",2,"Alpha",1,"neutral"},
 {DateObject({2020,1,1}),"Charlie",3,"Delta",4,"home"},
 {DateObject({2020,1,1}),"Delta",4,"Charlie",3,"away"},
 {DateObject({2020,1,1}),"Echo",5,"Foxtrot",6,"home"},
 {DateObject({2020,1,1}),"Foxtrot",5,"Echo",6,"away"},
 {DateObject({2020,1,1}),"Gulf",7,"Hotel",10,"home"},
 {DateObject({2020,1,1}),"India",9,"Juliet",2,"home"},
 {DateObject({2020,1,1}),"Kilo",10,"India",9,"away"},
 {DateObject({2020,1,1}),"Lima",11,"Mike",12,"neutral"}}

Here's a code that flips team and point pairs (if necessary) so that the team whose name begins earlier in the alphabet is first in every game record. In the event that the names and scores are rearranged, the venue will also be changed from home to away or vice versa.

alphaSortKey = 
  Table(AlphabeticOrder(gameList((i, 2)), gameList((i, 4))), {i, 
    Length(gameList)});
gameList = 
  Table(Append(gameList((i)), alphaSortKey((i))), {i, 
    Length(gameList)});

regular = Cases(gameList, {_, _, _, _, _, _, 1});
regular = Table(Take(regular((i)), 6), {i, Length(regular)});

needTeamsFlip = Cases(gameList, {_, _, _, _, _, _, -1});
holderLoca = Table(needTeamsFlip((i, 6)), {i, Length(needTeamsFlip)});
holderLoca = 
  Table(If(holderLoca((i)) == "home", holderLoca((i)) = "away", 
    If(holderLoca((i)) == "away", holderLoca((i)) = "home", 
     holderLoca((i)) = "neutral")), {i, Length(needTeamsFlip)});
needTeamsFlip = 
  Table(Take(needTeamsFlip((i)), 5), {i, Length(needTeamsFlip)});
needTeamsFlip = 
  Table(Append(needTeamsFlip((i)), holderLoca((i))), {i, 
    Length(needTeamsFlip)});
holderTeam = Table(needTeamsFlip((i, 2)), {i, Length(needTeamsFlip)});
holderScor = Table(needTeamsFlip((i, 3)), {i, Length(needTeamsFlip)});
Table(needTeamsFlip((i, 3)) = needTeamsFlip((i, 5)), {i, 
   Length(needTeamsFlip)});
Table(needTeamsFlip((i, 2)) = needTeamsFlip((i, 4)), {i, 
   Length(needTeamsFlip)});
Table(needTeamsFlip((i, 4)) = holderTeam((i)), {i, 
   Length(needTeamsFlip)});
Table(needTeamsFlip((i, 5)) = holderScor((i)), {i, 
   Length(needTeamsFlip)});
needTeamsFlip = 
  Table(Take(needTeamsFlip((i)), 6), {i, Length(needTeamsFlip)});


ordered = 
  DeleteDuplicates(Flatten(Join({needTeamsFlip}, {regular}), 1));
Column(ordered = SortBy(ordered, {#((1)) &, #((2)) &}))

ordered = 
  DeleteDuplicates(Flatten(Join({needTeamsFlip}, {regular}), 1));

But

 SortBy(ordered, {#((1)) &, #((2)) &, #((4)) &})

returns an error.

The desired output would be:

{{DateObject({2020,1,1}),"Alpha",1,"Bravo",2,"neutral",FALSE},
{DateObject({2020,1,1}),"Alpha",1,"Bravo",2,"away",FALSE},
{DateObject({2020,1,1}),"Charlie",3,"Delta",4,"home",TRUE},
{DateObject({2020,1,2}),"Echo",6,"Foxtrot",5,"home",FALSE},
{DateObject({2020,1,2}),"Echo",5,"Foxtrot",6,"home",FALSE},
{DateObject({2020,1,2}),"Gulf",7,"Hotel",8,"home",TRUE},
{DateObject({2020,1,3}),"India",9,"Kilo",10,"home",FALSE},
{DateObject({2020,1,3}),"India",9,"Juliet",10,"home",FALSE},
{DateObject({2020,1,3}),"Lima",11,"Mike",12,"neutral",TRUE}}

Thanks in advance for suggestions!

Compile Vanitygen Source – Bitcoin Stack Exchange

I would suggest that you use Bitaddress.org

It is open source and secure with no need to install anything.

or you could do that with Bitcoin PHP library on PHP.

vanitygen is too old and has not been updated in almost 7 years.

TO UPDATE

Sorry for the previous suggestion, I thought bitaddress.org did this.

vanitygen Library you mentioned is too old, use it better
vanitygen-plus is up to date and supports Bitcoin and old coins.

Google AdSense ads.txt file – Web Applications Stack Exchange

Once Google AdSense approves a website for ads, simple steps to enable ads on a website are provided. Suppose I created an HTML site called Test.com. My first step was to insert the HTML into the head tag, something like:

 

Next, Google simply inserts an "ads.txt" file into the site's root domain. This file must contain code that Google provides. For example:

 google.com, pub-8906xxxxx, DIRECT, f08cxxxxx

Now I want ads to appear and track on 2 subdomains on my website: Test.com/sub1 and Test.com/sub2. This is where Google’s leadership is bad. They just say:

"You would add this line to your root domain ads.txt: subdomain = subdomain.example.com."

I'm worried about syntax. I currently have the following in my ads.txt file based on Google's instructions:

 google.com, pub-8906xxxxx, DIRECT, f08cxxxxx
 subdomain=Test.com/sub1
 subdomain=Test.com/sub2

Is this syntax correct and can it be checked whether a clicked advertisement is taken into account? Note that all of the HTML files in my subdomain are in the root directory.

Kirchoff's Spanning Tree Algorithm – Computer Science Stack Exchange

I recently studied Kirchhoff $ spanning $ $ tree $ $ algorithm $that has the following steps ->

  • Create an adjacency matrix

  • Replace the diagonals with their respective degrees

  • Replace all others except those included
    Diagonal of $ -1 $

  • Then find it $ minor $ one of the elements to get your ans

These steps look like magic to me. Can someone explain how Kirchhoff derives this to get the minimum number of spanning tree? I want to know the logic behind this algorithm, but all I can find on YouTube is the above steps.

WordPress playlist WPSE – WordPress Development Stack Exchange

I use the plugin from https://github.com/birgire/wpse-playlist. I really enjoy it, but I hope someone can help me change the code a bit.
The original code:

[_playlist]
   [_track title="Ain't Misbehavin'" src="https://s.w.org/images/core/3.9/AintMisbehavin.mp3"]
   [_track title="Buddy Bolden's Blues" src="https://s.w.org/images/core/3.9/JellyRollMorton-BuddyBoldensBlues.mp3"]
[/_playlist]

I want to change it to:

[_playlist]
   

   
[/_playlist]

Keyboard shortcuts in Paclets? – Mathematica Stack Exchange

I am trying to add simple keyboard shortcuts (along with the menu item) to my Paclet via FrontEndExecute, which works fine in notebooks. However, as soon as I insert it into my Paclet and import it, the menu item is removed from the keyboard shortcut. Is this due to the security requirements for Paclets or is there a way out?
I know KeyEventTranslations.tr, but I prefer not to use it.

Architecture Logging – Code Review Stack Exchange

I have two database tables UsersDownload, Non-UsersDownload. There are also two model objects and two services that pick up the object and insert the data into the correct table. Is that the best architecture for that? or is there a better way to deal with it? Would it be better to use an interface?

public class UserLog
{
    public string CustomerId { get; set; }
    public bool? IsMobile { get; set; }
    public int? DeviceId { get; set; }
} 
public class NonUserLog
{
    public string DeviceId { get; set; }
    public bool? IsMobile { get; set; }
    public string AppType { get; set; }
} 

Insert with support

 internal ResultStatus UsersDownload(UserLog userLog)
        {
            queryName = "usp_Insert_UserLog";
            SQLHelper sql = new SQLHelper(conn);
            ResultStatus rs = new ResultStatus();
            SqlParameter() parms = new SqlParameter() {
                            new SqlParameter("@CustomerID", SqlDbType.NVarChar, 50),
                            new SqlParameter("@IsMobile", SqlDbType.Bit),
                        new SqlParameter("@DeviceId", SqlDbType.Int)
            };

            parms(0).Value = guidelineLog.CustomerId;
            parms(1).Value = guidelineLog.IsMobile;
            parms(2).Value = guidelineLog.DeviceId;

            using (SqlDataReader dataReader = sql.ExecuteReaderStoreProcedure(queryName, parms))
            {
                rs.ResultCode = 1;
                rs.ResultMessage = "Success";
                dataReader.Close();
            }

            return rs;
        }
 internal ResultStatus NonUsersDownload(NonUserLog nonUserLog)
        {
            queryName = "usp_Insert_NonUserLog";
            SQLHelper sql = new SQLHelper(conn);
            ResultStatus rs = new ResultStatus();
            SqlParameter() parms = new SqlParameter() {
                            new SqlParameter("@DeviceId", SqlDbType.NVarChar, 50),
                            new SqlParameter("@IsMobile", SqlDbType.Bit),
                        new SqlParameter("@AppType", SqlDbType.NVarChar)
            };

            parms(0).Value = guidelineLog.DeviceId;
            parms(1).Value = guidelineLog.IsMobile;
            parms(2).Value = guidelineLog.AppType;

            using (SqlDataReader dataReader = sql.ExecuteReaderStoreProcedure(queryName, parms))
            {
                rs.ResultCode = 1;
                rs.ResultMessage = "Success";
                dataReader.Close();
            }

            return rs;
        }

service

public ResultStatus InsertUsersDownload(UserLog userLog)
        {
            return glDb.UsersDownload(userLog);
        }

        public ResultStatus InsertNonUsersDownload(NonUserLog nonUserLog)
        {
            return glDb.NonUsersDownload(nonUserLog);
        }

rabbitmq and several subscribers – Software Engineering Stack Exchange

Can a queue have multiple consumers?

Yes, it is possible for multiple consumers to receive messages from the same queue. However, each message is only consumed once by a consumer

Is it possible for the queue to hold data until a consumer has consumed it?

No, the news is not visible to other consumers when a consumer has started to consume it.

I am working on a system in which multiple consumers have to access a single queue for different microdevices.

I think you need a queue per cause / topic that needs to be addressed