Help: Java maximize sum of product (nurse-problem)

Implemented the nurse problem (https://developers.google.com/optimization/scheduling/employee_scheduling) in Java without shift requests (class SchedulingNursesSat below)
However got stuck to implement the shift request on the given python constraint:
 model.Maximize(         sum(shift_requests[n][d][s] * shifts[(n, d, s)] for n in all_nurses             for d in all_days for s in all_shifts))
Question: How to multiply an IntVar (from shifts) with an int (from shiftRequests ) in Java so that a IntVar is returned - so it can be summed up and maximized?
int[][][] shiftRequests = {
                {{0, 0, 1}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 1}, {0, 1, 0}, {0, 0, 1}},
                {{0, 0, 0}, {0, 0, 0}, {0, 1, 0}, {0, 1, 0}, {1, 0, 0}, {0, 0, 0}, {0, 0, 1}},
                {{0, 1, 0}, {0, 1, 0}, {0, 0, 0}, {1, 0, 0}, {0, 0, 0}, {0, 1, 0}, {0, 0, 0}},
                {{0, 0, 1}, {0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 0}, {1, 0, 0}, {0, 0, 0}},
                {{0, 0, 0}, {0, 0, 1}, {0, 1, 0}, {0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 0}}
        };

Following attempt failed (because the Operator * can not be overwritten in Java):
(tried other options with Linear.Expr[] and scalProd but sum only takes IntVar[])
        IntVar[] shiftRequestMet = new IntVar[numNurses*numDays*numShifts];
        for (int n = 0; n < numNurses; n++) {
            for (int d = 0; d < numDays; d++) {
                for (int s = 0; s < numShifts; s++) {
                    shiftRequestMet[n*numNurses*numDays + d*numDays+ s] = shifts[n][d][s] * shiftRequests[n][d][s];

                }
            }
        }
            model.maximize(LinearExpr.sum(shiftRequestMet));

class SchedulingNursesSat
(Working Program without shift requests - solutions are ordered different than from the python example)
import com.google.ortools.sat.*;

/**
 * SchedulingNursesSat
 */
public class SchedulingNursesSat {
    static {
        System.loadLibrary("jniortools");
    }

    public static void main(String[] args) throws Exception {
        // Create the model.
        // [START model]
        CpModel model = new CpModel();
        // [END model]

        // Create the variables.
        // [START variables]
        int numNurses = 4;
        int numShifts = 3;
        int numDays = 3;

        // Creates shift variables.
        // shifts[n][d][s]: nurse 'n' works shift 's' on day 'd'.
        IntVar[][][] shifts = new IntVar[numNurses][numDays][numShifts];
        for (int n = 0; n < numNurses; n++) {
            for (int d = 0; d < numDays; d++) {
                for (int s = 0; s < numShifts; s++) {
                    shifts[n][d][s] = model.newBoolVar("shift_n" + n + "d" + d + "s" + s);
                }
            }
        }
        // [END variables]

        // Create the constraints.
        // [START constraints]

        // Each shift is assigned to exactly one nurse in the schedule period.
        for (int d = 0; d < numDays; d++) {
            for (int s = 0; s < numShifts; s++) {
                IntVar[] nursesPerShift = new IntVar[numNurses];
                for (int n = 0; n < numNurses; n++) {
                    nursesPerShift[n] = shifts[n][d][s];
                }
                model.addEquality(LinearExpr.sum(nursesPerShift), 1);
            }
        }

        //Each nurse works at most one shift per day.
        for (int n = 0; n < numNurses; n++) {
            for (int d = 0; d < numDays; d++) {
                model.addLessOrEqual(LinearExpr.sum(shifts[n][d]), 1);
            }
        }

        //minShiftsPerNurse is the largest integer such that every nurse
        //can be assigned at least that many shifts. If the number of nurses doesn't
        //divide the total number of shifts over the schedule period,
        //some nurses have to work one more shift, for a total of
        //minShiftsPerNurse + 1.
        int minShiftsPerNurse = (numShifts * numDays) / numNurses;
        int maxShiftsPerNurse = minShiftsPerNurse + 1;

        for (int n = 0; n < numNurses; n++) {
            IntVar[] shiftsPerNurse = new IntVar[numDays * numShifts];
            for (int d = 0; d < numDays; d++) {
                for (int s = 0; s < numShifts; s++) {
                    shiftsPerNurse[d * numDays + s] = shifts[n][d][s];
                }
            }
            LinearExpr numShiftsWorked = LinearExpr.sum(shiftsPerNurse);
            model.addGreaterOrEqual(numShiftsWorked, minShiftsPerNurse);
            model.addLessOrEqual(numShiftsWorked, maxShiftsPerNurse);
        }
        // [END constraints]

        // Create a solver and solve the model.
        // [START solve]
        CpSolver solver = new CpSolver();
        NursesPartialSolutionPrinter cb = new NursesPartialSolutionPrinter(shifts, numNurses, numDays, numShifts);
        solver.searchAllSolutions(model, cb);
        // [END solve]

        System.out.println(cb.getSolutionCount() + " solutions found.");
    }
    // [END print_solution]

    // [START print_solution]
    static class NursesPartialSolutionPrinter extends CpSolverSolutionCallback {
        private final IntVar[][][] shifts;
        private int numNurses;
        private int numDays;
        private int numShifts;
        private int solutionCount;

        public NursesPartialSolutionPrinter(IntVar[][][] shifts, int numNurses, int numDays, int numShifts) {
            this.shifts = shifts;
            this.numNurses = numNurses;
            this.numDays = numDays;
            this.numShifts = numShifts;
        }

        @Override
        public void onSolutionCallback() {
            if (solutionCount < 5) {
                System.out.println("SolutionCount:" + solutionCount);
                System.out.println();
                System.out.println();
                for (int d = 0; d < numDays; d++) {
                    System.out.println("Day " + d + " ");
                    for (int n = 0; n < numNurses; n++) {
                        boolean isWorking = false;
                        for (int s = 0; s < numShifts; s++) {
                            if (this.booleanValue(shifts[n][d][s])) {
                                isWorking = true;
                                System.out.println("  Nurse " + n + " works shift " + s);
                            }
                        }
                        if (!isWorking) {
                            System.out.println("  Nurse " + n + " does not work");
                        }
                    }
                }
                System.out.println();
                System.out.printf("Solution #%d: time = %.02f s%n", solutionCount, wallTime());
                solutionCount++;
            } else {
                solutionCount++;
            }
        }

        public int getSolutionCount() {
            return solutionCount;
        }
    }
}
// [END program]

Model.addProductEquality.
See
http://google.github.io/or-tools/java/classcom_1_1google_1_1ortools_1_1sat_1_1CpModel.html#ade05b35462e2e1c3f26de77c7d6da658
Le ven. 26 juil. 2019 à 02:26, Robin Kamps<EMAIL_ADDRESS>a
écrit :

Implemented the nurse problem (
https://developers.google.com/optimization/scheduling/employee_scheduling)
in Java without shift requests (class SchedulingNursesSat below)
However got stuck to implement the shift request on the given python
constraint:
model.Maximize( sum(shift_requests[n][d][s] * shifts[(n, d, s)] for n in
all_nurses for d in all_days for s in all_shifts))
Question: How to multiply an IntVar (from shifts) with an int (from shiftRequests
) in Java so that a IntVar is returned - so it can be summed up and
maximized?
int[][][] shiftRequests = {
{{0, 0, 1}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 1}, {0, 1, 0}, {0, 0, 1}},
{{0, 0, 0}, {0, 0, 0}, {0, 1, 0}, {0, 1, 0}, {1, 0, 0}, {0, 0, 0}, {0, 0, 1}},
{{0, 1, 0}, {0, 1, 0}, {0, 0, 0}, {1, 0, 0}, {0, 0, 0}, {0, 1, 0}, {0, 0, 0}},
{{0, 0, 1}, {0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 0}, {1, 0, 0}, {0, 0, 0}},
{{0, 0, 0}, {0, 0, 1}, {0, 1, 0}, {0, 0, 0}, {1, 0, 0}, {0, 1, 0}, {0, 0, 0}}
};
Following attempt failed (because the Operator * can not be overwritten in
Java):
(tried other options with Linear.Expr[] and scalProd but sum only takes
IntVar[])
    IntVar[] shiftRequestMet = new IntVar[numNurses*numDays*numShifts];
    for (int n = 0; n < numNurses; n++) {
        for (int d = 0; d < numDays; d++) {
            for (int s = 0; s < numShifts; s++) {
                shiftRequestMet[n*numNurses*numDays + d*numDays+ s] = shifts[n][d][s] * shiftRequests[n][d][s];

            }
        }
    }
        model.maximize(LinearExpr.sum(shiftRequestMet));

class SchedulingNursesSat
(Working Program without shift requests - solutions are ordered different
than from the python example)
import com.google.ortools.sat.*;
/**

SchedulingNursesSat
*/
public class SchedulingNursesSat {
static {
System.loadLibrary("jniortools");
}
public static void main(String[] args) throws Exception {
// Create the model.
// [START model]
CpModel model = new CpModel();
// [END model]
 // Create the variables.
 // [START variables]
 int numNurses = 4;
 int numShifts = 3;
 int numDays = 3;

 // Creates shift variables.
 // shifts[n][d][s]: nurse 'n' works shift 's' on day 'd'.
 IntVar[][][] shifts = new IntVar[numNurses][numDays][numShifts];
 for (int n = 0; n < numNurses; n++) {
     for (int d = 0; d < numDays; d++) {
         for (int s = 0; s < numShifts; s++) {
             shifts[n][d][s] = model.newBoolVar("shift_n" + n + "d" + d + "s" + s);
         }
     }
 }
 // [END variables]

 // Create the constraints.
 // [START constraints]

 // Each shift is assigned to exactly one nurse in the schedule period.
 for (int d = 0; d < numDays; d++) {
     for (int s = 0; s < numShifts; s++) {
         IntVar[] nursesPerShift = new IntVar[numNurses];
         for (int n = 0; n < numNurses; n++) {
             nursesPerShift[n] = shifts[n][d][s];
         }
         model.addEquality(LinearExpr.sum(nursesPerShift), 1);
     }
 }

 //Each nurse works at most one shift per day.
 for (int n = 0; n < numNurses; n++) {
     for (int d = 0; d < numDays; d++) {
         model.addLessOrEqual(LinearExpr.sum(shifts[n][d]), 1);
     }
 }

 //minShiftsPerNurse is the largest integer such that every nurse
 //can be assigned at least that many shifts. If the number of nurses doesn't
 //divide the total number of shifts over the schedule period,
 //some nurses have to work one more shift, for a total of
 //minShiftsPerNurse + 1.
 int minShiftsPerNurse = (numShifts * numDays) / numNurses;
 int maxShiftsPerNurse = minShiftsPerNurse + 1;

 for (int n = 0; n < numNurses; n++) {
     IntVar[] shiftsPerNurse = new IntVar[numDays * numShifts];
     for (int d = 0; d < numDays; d++) {
         for (int s = 0; s < numShifts; s++) {
             shiftsPerNurse[d * numDays + s] = shifts[n][d][s];
         }
     }
     LinearExpr numShiftsWorked = LinearExpr.sum(shiftsPerNurse);
     model.addGreaterOrEqual(numShiftsWorked, minShiftsPerNurse);
     model.addLessOrEqual(numShiftsWorked, maxShiftsPerNurse);
 }
 // [END constraints]

 // Create a solver and solve the model.
 // [START solve]
 CpSolver solver = new CpSolver();
 NursesPartialSolutionPrinter cb = new NursesPartialSolutionPrinter(shifts, numNurses, numDays, numShifts);
 solver.searchAllSolutions(model, cb);
 // [END solve]

 System.out.println(cb.getSolutionCount() + " solutions found.");

}
// [END print_solution]
// [START print_solution]
static class NursesPartialSolutionPrinter extends CpSolverSolutionCallback {
private final IntVar[][][] shifts;
private int numNurses;
private int numDays;
private int numShifts;
private int solutionCount;
 public NursesPartialSolutionPrinter(IntVar[][][] shifts, int numNurses, int numDays, int numShifts) {
     this.shifts = shifts;
     this.numNurses = numNurses;
     this.numDays = numDays;
     this.numShifts = numShifts;
 }

 @Override
 public void onSolutionCallback() {
     if (solutionCount < 5) {
         System.out.println("SolutionCount:" + solutionCount);
         System.out.println();
         System.out.println();
         for (int d = 0; d < numDays; d++) {
             System.out.println("Day " + d + " ");
             for (int n = 0; n < numNurses; n++) {
                 boolean isWorking = false;
                 for (int s = 0; s < numShifts; s++) {
                     if (this.booleanValue(shifts[n][d][s])) {
                         isWorking = true;
                         System.out.println("  Nurse " + n + " works shift " + s);
                     }
                 }
                 if (!isWorking) {
                     System.out.println("  Nurse " + n + " does not work");
                 }
             }
         }
         System.out.println();
         System.out.printf("Solution #%d: time = %.02f s%n", solutionCount, wallTime());
         solutionCount++;
     } else {
         solutionCount++;
     }
 }

 public int getSolutionCount() {
     return solutionCount;
 }

}
}
// [END program]

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/1452?email_source=notifications&email_token=ACUPL3N6BHPURTSZWS6UUOTQBK7MFA5CNFSM4IHCC2AKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HBVOGVA,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACUPL3NVLYFNG7WN7Q3CXITQBK7MFANCNFSM4IHCC2AA
.

Thanks for your help.
I can not see how to apply model.AddProductEquality(IntVar | target, IntVar [] | vars) in this case.
I am not familiar with python - the product operation in the given python example seems to be just a way to strip away all shifts, that are not requested. The resulting array is than feed into the sum and maximize operation.
However if the 0 value product in python has no effect on the sum function such a filtering can be easily archived in java without a product at all. One possible solution:
        List<IntVar> shiftRequestMet = new ArrayList<>();
        for (int n = 0; n < numNurses; n++) {
            for (int d = 0; d < numDays; d++) {
                for (int s = 0; s < numShifts; s++) {
                    if (shiftRequests[n][d][s] == 1) {
                        shiftRequestMet.add(shifts[n][d][s]);
                    }
                }
            }
        }

        model.maximize(LinearExpr.sum(shiftRequestMet.toArray(new IntVar[shiftRequestMet.size()])));


Bump k8s.io/client-go from 0.26.0 to 0.26.1

Duplicate of https://github.com/submariner-io/cloud-prepare/pull/574.


Curriculum Editing/Viewing/Commenting Proposal

I was having a discussion with the “Curriculum  Team” over the weekend. During the call we talked about how we could optimise our current workflow for contribution and consumption of our workshop content. It was essentially agreed by everyone on the call that there was a problem.
The Issues
Firstly, @bogidon mentioned the hoops he had to go through in order to submit his workshops:

Constant rebasing
Checking out branches of branches
Squashing commits

He has prior git experience and wasn’t happy with the process. How can we expect people to submit any revisions in the playbook if it takes so much time? We may receive one or two more contributors, but many people who would be happy to point out spelling errors in another medium will not make a pull request. It needs to be simpler.
Currently we use git, this system works really well for some people and that is awesome. However, we are making these workshops for the club members. This group won’t want to submit a Pull Request but would be more than happy to leave a comment or suggestion throughout the workshop if the platform we used was more analogous to Google Docs. I would like to propose a tool which allows people to make these types of interactions and sits on top of git.
Solution
From a technical perspective the editing interface would operate like the shipit project. It would be a wrapper around basic GitHub functionality to create pull requests and issues. Pull requests would be generated when someone makes changes to a workshop. Issues would be used for other things like spelling and grammar mistakes, broken instructions, etc. As we are still using the same tools, it would not disrupt anyone's current workflow. Everything would proceed as normal.
I imaging this tool supporting three functions:

Editing - Make a bunch of changes which can be added to a pull request
Viewing - A rendered view of the markdown (Perhaps integrated directly into editing the)
Commenting - Write basic suggestions onto a document which are submitted as issues

At the beginning of the Labs program we were tasked to get club leaders to familiarise their co-leads with git. This took a lot of time and explaining. With this system, club leaders would be able to contribute without being ultra familiar and advanced with git.
Conclusion
@zachlatta pitched me packrat about a month ago. I see it as the "hub of your code club", or "a solution for code club management". Like any project, it had to be scoped... In order to get it posible for use this semester it had to be refined into a more data oriented solution. In my head I see contribution and consumption as the next logical progression in this mission. We need to optimise the weakest link.
cc: @MaxWofford @TheThirdOne @ZucchiniZe

(When I say packrat, I don't necessarily mean the same rails app... Just packrat as an idea)

I don't think building an editor for markdown should be a part of this. Building or using a framework that is good enough for working on markdown is a sizeable project on its own; that in addition to that workshops are generally multi file means that this would be a hugely complex project.
Submitting a workshop is ultimately very simple, but that is hidden within the poor PR process that currently exists (partly because its part of a large multi-purpose repo). Separating workshops into their own repo with a well defined PR process (or maybe submodules instead) should solve the difficulty submitting a workshop.
The submission process could be as simple as fork, copy in files (after they were already made), commit, and PR. There would be no need for branching, rebasing, etc.
As for viewing and commenting, I think it is essential that clubs be able to easily discover (index of workshops), learn (view), and review (comment).
I will have to leave this short for now, but I will add more later.

@TheThirdOne re your first point.
We would not need to implement a markdown editor. In fact the solutions which currently exist are pretty good actually. I actually wrote a system which essentially implements the viewing (and part of the editing) of this project already a while ago. The source is here: https://github.com/paked/steel (cc: @zachlatta @MaxWofford ). If you wish I can setup a hosted version for you to play around with it if you wish.
The markdown editor would not be the issue.
Perhaps an improved process would solve all of our problems.
I was not saying that the markdown editor would be impossible. Dillinger is a fairly good single file editor. The problem comes in the amount of work it takes to make a good one; even stealing from Dillinger would not be a trivial undertaking.
Making it work with multiple files (this is a must) I have never seen done in real time. It is certainly not the case that "The markdown editor would not be the issue." The markdown editor would be most of the project.
And ultimately the editor is not the problem, club leaders can make workshops; the problem is submitting them not making them. To that end revising the PR process / making a tool to help is more appropriate.
However, testing a workshop before its merged in would be useful so a renderer (probably not interactive) for previewing a workshop would probably be helpful.

@TheThirdOne
I made a really easy markdown editor app a while ago and I could use that to flush out a full application that allows you to submit pr's and stuff like that if needed.
Also, I maybe could create a simple API that allows you to send markdown and get a reply of the HTML back and build that functionality into the project.
In response to the problem of getting someone to submit a PR with a finished workshop, we could make something like shipit.hackedu.us integrated into the editor that allows you to easily submit a PR based on the current edits.
If we were to create something like this we could make it so all of the PR's follow a strict standard so we would not have the current problems we are having.

@ZucchiniZe putting it into an API sounds like a premature optimisation, for a system we haven't even designed yet. Besides, there are some really great client side libraries available.
I mentioned that it would operate like shipit above. I am going to try and gage some community members' interest in various systems like this.

@paked: I meant a simple API that you post raw markdown to and get HTML so we could have a serverless SPA app for all of this.

@ZucchiniZe
For single file edits, Github's web GUI is a great tool. Click edit, make edits, commit; now you have a fork that you can PR whenever you want (also very easy).
For  multi file edits, I doubt anyone could easily make a good system.

@ZucchiniZe but why not just do it with a browser side library...

@paked check the edit.

@TheThirdOne
OK steel is live at http://steel.harrisonshoebridge.me. I have not bothered SSLing it, and I do not remember how secure it is... So please do not use any real passwords or email addresses.
In terms of getting something demo-able, I will try and make it so that you get automatically added to a certain class (and thus can see a pre-made workshop, of which I have none). However, If I fall asleep before then feel free to copy parts of the hackEDU syllabus into a new workshop after creating a class.
Keep in mind, its barely alpha software... I didn't even OSS it until it was brought up :laughing:.

Closing bc packrat is deprecated


README mentions tests but none in the repo?

Looks like source was initially committed fully-formed, specs in another project?

Better late than never: unit tests covering all source code are in the making. I'll leave this open for future reference.


add farsi analyzer to simple seacher

A fix to pr #1868
@ToluClassics could you check if this fixes the issue?

Codecov Report

Merging #1931 (04bccb6) into master (1e57840) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master    #1931      +/-   ##
============================================
- Coverage     58.71%   58.70%   -0.02%
  Complexity     1079     1079
============================================
  Files           180      180
  Lines         10429    10431       +2
  Branches       1429     1430       +1
============================================
  Hits           6123     6123
- Misses         3786     3787       +1
- Partials        520      521       +1

Impacted Files
Coverage Δ

...c/main/java/io/anserini/search/SimpleSearcher.java
63.52% <0.00%> (-0.41%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1e57840...04bccb6. Read the comment docs.

A fix to pr #1868
@ToluClassics could you check if this fixes the issue?

it does, thank you!


SetUpMainPage should work with MvvmNanoViewModelBase instead

SetUpMainPage accepts only a MvvmNanoViewModel view-model type.
If you have a MvvmNanoViewModel<T> view-model, you can't use it with SetUpMainPage.
Scenario: I have a login page and registration page. After use registered successfully, I want to navigate to login page and remove the registration page from back-stack.
For that I need to know in presenter whether the registration page should really be removed. So I was thinking to use an initialization parameter for the view-model which I can check in view-presenter and remove registration page from back-stack.
For this particular scenario where I need to remove page from back-stack (a logic for the view presenter), maybe a more correct approach would be to have a presentation parameter in NavigateTo, similar to how MvvmCross has it, which can be used by presenter to do some specific things.
For now, not sure which is the best workaround..

I reached this limitation, too, but I didn't have the time to update the framework (will do so later). But: SetUpMainPage() basically does this:
MainPage = new MvvmNanoNavigationPage(GetPageFor<TViewModel>());

So what you really need is a second GetPageFor() method, which accepts a navigation parameter. And here it is:
public MvvmNanoContentPage<TViewModel> GetPageFor<TViewModel, TNavigationParameter>(TNavigationParameter navigationParameter) where TViewModel : IViewModel<TNavigationParameter>
{
    var viewModel = MvvmNanoIoC.Resolve<TViewModel>() as IViewModel<TNavigationParameter>;
    viewModel.Initialize(navigationParameter);

    var page = MvvmNanoIoC
        .Resolve<IPresenter>()
        .CreateViewFor<TViewModel>() as MvvmNanoContentPage<TViewModel>;

    if (page == null)
        throw new MvvmNanoException("Could not create a MvvmNanoContentPage for View Model of type " + typeof(TViewModel) + ".");

    page.SetViewModel(viewModel);

    return page;
}

Having parameters which are directly and only accessible by the Presenter could be a considerable option, for now I am passing those parameters through the Page. So when a ViewModel is being called with a navigation paramter, I can make this available to the presenter with a public property in the Page of the View Model.

Thanks!
I think having a clear separation between parameters for presenter and for view-model would be good, otherwise the view-model get a parameter when its logic actually doesn't need one.

Agreed and looking forward to your pull request ;)


Subsetting rows of xgboost.DMatrix object

I am following along to the example here. It appears that the agaricus.txt.train file that you can get from here contains some errant labels:
In[10]: set(dtrain.get_label())
Out[10]: {0.0, 1.0, 3.0, 240.0, 722.0, 878.0, 2014.0, 2015.0, 6514.0}

which will cause xgboost.train to fail with:
 xgboost.core.XGBoostError: b'label must be in [0,1] for logistic regression'

What is the simplest way to subset the xgboostDMatrix object. Should I use xgboost.slice for this purpose?

Hmm, I guess this could due to the platform and string encoding problem \r\n vs \r so the parser did not parse correctly

@fgnu  hello， i face the same problem..... could please you tell me how you solved your problem...
My issue is just like this:
......
xgtrain = xgb.DMatrix(train[offset:, :], label=labels[offset:])
......
model = xgb.train(plst, xgtrain, num_boost_round = num_rounds, evals = watchlist, early_stopping_rounds=120)
And I am sure that my label contains only 0 and 1, instead:
xgboost.core.XGBoostError: b'label must be in [0,1] for logistic regression'

@CSJLOVEJX IIRC, this was an issue with the xgboost installation and not the file itself. I re-installed xgboost and the example worked fine for me. Sorry, it has been a while, so I can't be more specific.

I have the same question..


API Passthrough not resolving promise

In my mirage config: this.passthrough('http://foo.bar/**');
Request: GET http://foo.bar/me
The request goes out to the live API, but when it returns, the promises don't actually resolve properly. It's like the request just gets swallowed and nothing happens. The code works as-is, it was only when I installed mirage that it stopped resolving. Any thoughts @samselikoff?

Mirage: 0.1.11
Ember: 1.13.13
Ember-Data: 1.13.14

Think this could be related to https://github.com/pretenderjs/pretender/pull/130 .
I've dealt with similar behaviour prior, and was able to fix this by upgrading to pretender >= 0.11.0 || jquery >= 2.1.0

@samselikoff I see Mirage is adding pretender ~0.10.1 to projects in the afterInstall hook. Any reason the upgrade's not landed yet / if not, want me to change it?

@anulman thanks for the heads up! I was able to get it working on the latest pretender without upgrading jQuery.

:hand:

Merged the upgrade - thanks for taking care of this yall!


[Feature Request]: Add support for Knockback Resistance

Is there an existing issue for this?

[X] I have searched the existing issues

Description
It'd be neat if we could see knockback resistance on the toughness bar, or as its own bar if the toughness one isn't enabled.
Solution
I guess extra programming?
Alternatives
Tooltips say it, but I like bars more.
Additional Context
No response

Could be a little shield with KB written on it.
As I said, it's not a bit deal, it'd just be a neat thing.


Improve url detector regex list

Change Description
Currently, the presidio URL detector does not appropriately recognize URLs from less common, albeit valid, gTLDs. For example, if attempting to recognize the URL of https://webhook.site/324d38de-dc6b-4920-9c3e-813f7cf78729?q=1&b=2, the recognizer will only match on https://webhook.si, thus missing the complete URL including query params.
This change fixes it.
The list of URLs was pulled from the list of gTLDs supported by namecheap as of today:
https://www.namecheap.com/domains/full-tld-list/
Issue reference
There was no related issue opened, this was simply uncovered through the use of presidio analyzers.
Checklist

[X] I have reviewed the contribution guidelines
[X] My code includes unit tests
[X] All unit tests and lint checks pass locally
[X] My PR contains documentation updates / additions if required

@microsoft-github-policy-service agree [company="Pillar Security"]


[Bug]: Risk bundles view, unexpected sorting results

What happened?
Sorting by state, APR, balance and capacity works unexpectedly
https://github.com/etherisc/depeg-ui/assets/41779817/2f529143-4d2b-45ff-8ac2-48edcd771b79
What operating system are you seeing the problem on?
Mac OS
What browsers are you seeing the problem on?
Safari
What wallet extension are you using?
Metamask
Rules

[X] I agree to follow this project's rules

This is strange. For me it works. But there are three states of the sort order, unsorted (no arrow), ascending and descending. Is this maybe why you think its wrong?

BTW Where did you get a metamask safari extension (you entered that you're using metamask and safari browser). I cannot find one.

sorry, mis clicked, using Firefox


Bump to 2.3.1

Signed-off-by: MaxKsyunz<EMAIL_ADDRESS>Issues Resolved
https://github.com/opensearch-project/sql/pull/836
Check List

[ ] New functionality includes testing.

[ ] All tests pass, including unit test, integration test and doctest

[ ] New functionality has been documented.

[ ] New functionality has javadoc added
[ ] New functionality has user manual doc added

[ ] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

CI failed:
> Could not resolve all dependencies for configuration ':opensearch-sql-plugin:runtimeClasspath'.
   > Conflict(s) found for the following module(s):
       - com.fasterxml.jackson.dataformat:jackson-dataformat-smile between versions 2.13.4 and 2.13.3
       - com.fasterxml.jackson.dataformat:jackson-dataformat-yaml between versions 2.13.4 and 2.13.3

Codecov Report

Merging #894 (61a3773) into 2.3 (568f9a9) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##                2.3     #894   +/-   ##
=========================================
  Coverage     94.82%   94.82%
  Complexity     2912     2912
=========================================
  Files           291      291
  Lines          7780     7780
  Branches        566      566
=========================================
  Hits           7377     7377
  Misses          349      349
  Partials         54       54

Flag
Coverage Δ

query-workbench
62.76% <ø> (ø)

sql-engine
97.78% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


SubCommand suggests FLAGS that are not valid

Rust Version

rustc 1.16.0-nightly (4ecc85beb 2016-12-28)

Affected Version of clap

2.19.3

Expected Behavior Summary
FLAGS section should:

Not be present if no flags are available
Not show flags that are not available for said subcommand

Actual Behavior Summary
FLAGS section includes -h/--help and -V/--version.
Steps to Reproduce the issue
tmba:sentinel-cli thill $ ./target/debug/sentinel-cli help init
sentinel-cli-init 0.1.0
Taryn Hill<EMAIL_ADDRESS>Initialize a new Sentinel project in the given directory

USAGE:
    sentinel-cli init [<path>]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

ARGS:
    <path>    Defaults to the current directory

Sample Code or Link to Sample Code
    let matches = App::new("sentinel-cli")
        .version("0.1.0")
        .author("Taryn Hill<EMAIL_ADDRESS>        .about("CLI for Sentinel -- git hooks that guard you from yourself")
        .setting(AppSettings::SubcommandRequiredElseHelp)
        .subcommand(SubCommand::with_name("init")
            .about("Initialize a new Sentinel project in the given directory")
            .version("0.1.0")
            .author("Taryn Hill<EMAIL_ADDRESS>            .arg(Arg::with_name("path")
                .value_name("path")
                .help("Defaults to the current directory")
                .index(1)))
        .get_matches();

--help and --version are available for the subcommand though.
$ sentinel-cli init --version
sentinel-cli-init 0.1.0
```
This is because some people will develop subcomands as either external applicaitons/plugins (like `cargo`) or wish to have their subcommands have their own versions independant of the parent. If you'd like to develop the entire application (subcommands and all) with a single version number, I'd suggest using [`AppSettings:GlobalVersion`](https://docs.rs/clap/2.19.3/clap/enum.AppSettings.html#variant.GlobalVersion).

Also note the following are identical in terms of functionality:

```
$ sentinel-cli help init
[..snip..]

$ sentinel-cli init -h
[..snip..]

$ sentinel-cli init --help
[..snip..]
```

One major difference is if `init` had it's own subcommands (for example `foo`), you could also do:

```
$ sentinel-cli help init foo
[ foo's help]

$ sentinel-cli init help
[ init's help]
```

I forgot to mention, if you don't want them available, you simply hide help:
let app = App::new("sentinel-cli")
    .subcommand(SubCommand::with_name("init")
        .arg(Arg::with_name("help")
            .long("help")
            .hidden(true)));

And version can be disabled entirely, either globally (all child subcommands) with AppSettings::VersionlessSubcommands or just for specific subcommands with AppSettings::DisableVersion

I swear this did not work last night but it is working just as you described this time around.
Thank you for the detailed response!


GitHub organization not persisting in the Jira configuration

When attempting to configure the app, we are having issues with Jira not “remembering” or persisting the settings. I have been successful in installing the app for both endpoints (Github, Jira), however in Jira, it seems like it keeps looping back to the page titled “Connect a GitHub organisation to your Jira site” - and below it gives me the message that “No Github organisations with Jira installed”, although I have set this up multiple times already. I have been in contact with Github Support who referred me to reach out to Atlassian Support for help with this. Github Support also confirms that they are able to see successful API requests on their end. Could you please help me look into this?

Update: got it working now. It appears there's some kind of bug in the deployment phase on the Jira side. Unless all steps are performed in a certain order, the setup will fail, and the user does not get any type of error or status message at all. This should really be brought up internally as an RFE.

Feel free to close out this ticket.

Hi @mattlavinder, I'm one of the developers from Atlassian working on this integration and can confirm that we do monitor the issues here on a weekly basis. We'll be more than happy to help you if provide some screenshots or steps to reproduce the issue you're having. Cheers.

@mattlavinder I had to uninstall/re-install the app on both ends at least a dozen times before getting it to work, but was finally successful. Try following the official documentation (https://github.com/atlassian/github-for-jira/blob/old-master/README.md) exactly to a tee, because it seems that the slightest wrongful click will cause the integration to fail.

Hey @mattlavinder sorry to hear you had so many issues try to get the integration up and running. Do you have any specific examples of issues you ran into so we can potentially look into areas to improve?

Hey @joasve. As we haven't heard from you in a while, I'm going to go ahead and close this issue. Please feel free to reopen if you still require assistance.


"enable_max_difficulty": false, yet I get "Difficulty above config limit or below publish threshold"

I'm trying to help get ppl's tx confirmed.
My config.json is:
{
    "node": "https://rpc.p2pow.online",
    "worker": "http://<IP_ADDRESS>:7076",
    "min_pending_amount": "0.000001",
    "enable_active_difficulty": true,
    "min_consensus": 100,
    "enable_max_difficulty": false,
    "max_difficulty_send": 100,
    "max_difficulty_receive": 6400
}

Yet with a command like this:
 node src/index nano_1nf3kdph1wsxkc7hqifink9n3zktfjpjbz1as434jjrp4psxpuuro7j4gpn7 --sync --follow

I end up failing with this:
Status Local: unconfirmed
Subtype: receive
Old multiplier: 143338.17x
Generating Work...
Difficulty above config limit or below publish threshold

Why am I getting this when enable_max_difficulty is false?

First, you must use --force
But the error you're getting probably comes from your node. Install nano-work-server and set "http://[::1]:7076" as the "worker" in config.json. In the same file, set "https://rpc.p2pow.online" as a "node",
:
you can directly download the nano-work-server binaries in "releases": https://github.com/nanocurrency/nano-work-server/releases
And run:
Linux (terminal):
./nano-work-server --gpu 0:0
Windows (CMD, prompt)
nano-work-server --gpu 0:0

Thanks. How does nano-work-server differ from my already running node? And as my node already uses 7076 for RPC, how will that work with nano-work-server using the same port?
./nano-work-server --gpu 0:0 is failing anyway. My linux env is on WSL 2. Maybe that's why?

nano-work-server does not need to download the Nano ledger, so it is lighter. And it also has a few different settings that can solve this PoW difficulty limit problem.
If you need to use a different port, use the -l option:
./nano-work-server -l [::1]:7080 --gpu 0:0
And I don't understand about WLS, but it's possible that your GPU drivers don't work there in the same way. You can run directly on Windows.

Ya, nano-work-server just can't access the GPU from WSL 2. But running it on Windows directly seems to be fine.


Demo node improvements

Push the demo node image to DockerHub because it can be handy to play with the Demo node locally.
Change the import to use the http operator. To make that possible we also switch to the compressed file data instead of the tarballs.
Remove the intermediate image layer with data files

@dominiklohmann @tobim do you mind if I merge RUN /demo-node/load.bash with RUN /demo-node/import.bash and don't store the raw files locally anymore. Downloading them into a layer increases the image size by ~1GB which is actually quite a lot 😅. It wouldn't even involve that much more overhead at build time as the layer is invalidated anytime the base image/code changes anyway.

I think it'd be even better if you spin up a node, start the two pipelines using the API, and then wait for them to complete; that way, the demo node also shows the two pipelines as completed and you don't need to have them twice in the file.

I'll just wait for Tobi's input as he's the original author and there might be some non-obvious reason for the extra layer

I'll just wait for Tobi's input as he's the original author and there might be some non-obvious reason for the extra layer. In all cases I'm quite confident this spared 1GB might reduce the demo node startup of 10s or more.

The download size itself should be less than 1GB thanks to compression.
The original use case for it was to test loading the data into the image as part of the build.
I don't think we need this mode any more, so we can just as well get rid of that layer.

I think this PR is derailing a bit. My original intent was just to push the demo image to DockerHub 😅 . I propose we merge this as is and open follow up items:

add back a continuous pipeline (needs some product design first)
preload the data using the pipeline API instead of the current combination of "CLI build time load + unstarted pipeline in the entrypoint "

Fine by me—please create the issues on the housekeeping board before merging.

Done, still missing an approval though.


how it compares to cookiecutter

I'm currios how this tool compares to cookiecutter?
I can see that it's written in Go instead of Python, and has significantly different CLI. However, it would be good to know if there is any fundamental difference in philosophy and approach of this tool vs cookiecutter, so that one can tell why they might prefer to use one over the other.

 It is more tailored towards providing a bare repository for projects around licensing, maintainer and contributor docs.
Will have to look more deeply into the various cookiecutter subprojects to compare in detail.

So reposeed doesn't cater for stuff like build config templates (e.g.
make/docker/CI), or anything else of similar nature?
On Wed, 22 Aug 2018, 3:12 pm Michael Grosser<EMAIL_ADDRESS>wrote:

To give a first rough answer. It is more tailored towards providing a bare
repository for projects around licensing, maintainer and contributor docs.
Will have to look more deeply into the various cookiecutter subprojects to
compare in detail.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/okkur/reposeed/issues/55#issuecomment-415045858, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAPWS_QcUtSeFaW22psW9EyLOJTNt2b0ks5uTWbQgaJpZM4WHY19
.

Not at this time.

Thanks, good to know!
On Thu, 23 Aug 2018, 11:01 am Michael Grosser<EMAIL_ADDRESS>wrote:

Not at this time.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/okkur/reposeed/issues/55#issuecomment-415361918, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAPWS_ocxvL8qdr4r41yHsExUUNx4yvbks5uTn2QgaJpZM4WHY19
.

Context:
https://github.com/audreyr/cookiecutter
https://github.com/NathanUrwin/cookiecutter-git
https://github.com/lacion/cookiecutter-golang


Performance testing

/kind performance
From async-component:
We're looking at initially supporting about 1000 requests/second - and eventually hoping to slowly increase that over time. How long each request's processing time is will obviously vary, but for now we can assume about 5 seconds per request.

/remove-lifecycle stale


[Model Request] Falcon

⚙  Request New Models

Link to an existing implementation (e.g. Hugging Face/Github): https://huggingface.co/blog/falcon
Is this model architecture supported by MLC-LLM?

A: I cannot determine if the model architecture in general would work

In general, Falcon is leading the truly open source LLM, and it would be fantastic to have it supported by mlc-llm

Hi @juwalter, we are currently working on adding Falcon support and it is expected to be up soon. Please stay tuned :-)

wow, that is great!! really looking forward to it :)

Hello, is there any update to this?

Also interested in Falcon support in MLC-LLM.

What's the status of Falcon support? @MasterJH5574

Hi @juwalter, we are currently working on adding Falcon support and it is expected to be up soon. Please stay tuned :-)

Hello, does this will work with the new falcon 3?


Added new resource and fixed and arranged index and resources alphabetically. [Hacktober Fest]

Hacktoberfest notes:

due to volume of submissions, we may not be able to review PRs that do not pass tests and do not have informative titles.
please read our contributing guidelines
be sure to check the output of Travis-CI for linter errors
if this is your first open source contribution, make sure it's not your last!

What does this PR do?
Add info
Improve Repo
Added New Resource
Description

Added Missing index languages and links.
Arranged Alphabetically.
Added a new resource in Python - Courses section.

Why is this valuable (or not)?

Arranging alphabetically helps to find a resource faster and it looks neat.
New resource to learn python built-in functions.

Checklist:

[X] Not a duplicate
[x] Included author(s) if appropriate
[X] Lists are in alphabetical order
[x] Needed indications added (PDF, access notes, under construction)

please resolve conflicts.
For youtube, we prefer "playlist" links and the name of the producer/creator.
JavaScript

Sure. I resolved the conflicts. Will keep in mind.

Thanks, and welcome to free-programming-books!


LEDC - when restarting after changing the ouput pin, the signal is generated also on previous configured pin (IDFGH-10712)

Answers checklist.

[X] I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
[X] I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
[X] I have searched the issue tracker for a similar issue and not found a similar issue.

IDF version.
v4.4.3
Operating System used.
Windows
How did you build your project?
Eclipse IDE
If you are using Windows, please specify command line type.
None
Development Kit.
custom board
Power Supply used.
External 5V
What is the expected behavior?
When starting ledc peripheral with different gpio_num in ledc_channel_config_t, the signal should be provided only on the selected gpio.
What is the actual behavior?
When starting ledc peripheral with different gpio_num in ledc_channel_config_t, the signal is provided on the current selected gpio and also on the previous selected gpio
Steps to reproduce.
1
configure ledc timer with this config
ledc_timer_config_t pt_timer_config =
		{
		.speed_mode = LEDC_LOW_SPEED_MODE,
		.timer_num = LEDC_TIMER_0,
		.duty_resolution = 10,
		.freq_hz = SIGNAL_FREQ,
		.clk_cfg = LEDC_AUTO_CLK
		};

use this config
ledc_channel_config_t run_config =
		{
		.channel = LEDC_CHANNEL_0,
		.speed_mode = LEDC_LOW_SPEED_MODE,
		.timer_sel = LEDC_TIMER_0,
		.intr_type = LEDC_INTR_DISABLE,
		.duty = ((1 << 10) * 50) / 100,
		.hpoint = 0
		};

plus
run_config.gpio_num = 12;
start ledc by invocking
 ledc_channel_config(&run_config);
Now the generated signal is present on GPIO 12
2
Stop ledc by
ledc_stop(LEDC_LOW_SPEED_MODE, LEDC_CHANNEL_0, 0);
3
change the output pin and configure agin
run_config.gpio_num = 11;
ledc_channel_config(&run_config);

Now the signal is present on both GPIOs: 11 AND 12
...
Debug Logs.
No response
More Information.
No response

SIGNAL_FREQ in my case is 100

Ok got it! So this apply to any peripheral.
Good to know,
thanks @songruo


Provide command line option to select time resolution at startup

Hey hey :wave:
It would be amazing to be able to select the time resolution from the command line already.
For example: you have a raspberry pi zero with a display and want it to start up with a specific time resolution automatically on boot.

Great idea, I'll get this one added no problem!

New option added as:
-t, --time-frame <time-frame>              Use specified time frame when starting program and when new stocks are
                                           added [default: 1D]  [possible values: 1D, 1W, 1M, 3M, 6M, 1Y, 5Y]

Oh wow, that was quick! :hugs: Thanks! :bow:


Fix remote

this is a PR containing my old PR and a new fix for remote images not being available online anymore on build time. Still need to figure out how to get this to be less slow on large amounts of remote images though.

@nhoizey can I have some feedback on your ability to review and merge PRs? My old PR has been lying around for a while now and has received no attention. If you don't have the time anymore I'll fork this and re-release it so I can integrate it into my builds. For me right now, this is a blocking issue, because my circle.ci server expects code that I only have locally until you merge.

I'm gonna republish this under a _fork name because you are not responding and I need this repo to be in the public gem archive to use with my CI.

There are a few typos, but it works, I'll merge it and fix after to not lose any more time.
Thanks a lot, and sorry again for the delay.


helm: Configuring hasKey to enable boolean Usage

Please ensure your pull request adheres to the following guidelines:

[x] For first time contributors, read Submitting a pull request
[ ] All code is covered by unit and/or runtime tests where feasible.
[x] All commits contain a well written commit description including a title,
description and a Fixes: #XXX line if the commit addresses a particular
GitHub issue.
[x] If your commit description contains a Fixes: <commit-id> tag, then
please add the commit author[s] as reviewer[s] to this issue.
[x] All commits are signed off. See the section Developer’s Certificate of Origin
[ ] Provide a title or release-note blurb suitable for the release notes.
[ ] Are you a user of Cilium? Please add yourself to the Users doc
[ ] Thanks for contributing!

Fixes: #28381
Make use of hasKey in cilium-configmap.yaml to enable proper use of booleans in values.yaml

@gandro The PR regarding the issue assigned

Hi @hasan-alkama , thanks for the PR!
A couple of style notes: For a PR title, it helps to communicate to reviewers "what does the PR change". Currently the title reflects the problem, which is usually better kept in the PR description. Perhaps something like "Convert Helm values from string to bool"? Also, for the release note, the text is put into the release note verbatim. Please remove the <!--, --> characters.

I'm not exactly sure about the upgrade impact, but whenever we change types like this I think it is worth considering what, if anything, users must change when upgrading to the latest Helm chart with this change.

/test

@hasan-alkama thanks, your adjustments make sense. I'll leave it up to the codeowners for further review. You'll need to rebase and remove the merge commit before we merge this.
Just to let you know, Cilium is a fast-moving project, so at the bottom of the page the button "This PR is outdated" will almost always be showing up, and it will ask you to update the PR with the main branch. However, there's generally no need to keep rebasing the PR unless there is a specific file conflict. Each time you do an update, we'll need to re-trigger the tests which take some time to run, so in general updates should primarily be made just when you make a change to the commits, for instance following some feedback from reviewers.

Thanks @nathanjsweet  for pointing Out i have updated the commit title.

/test

@joestringer Thanks , What could be the reason for CI failure? As i see some checks are not successful should we wait for CI Failure to solve before merging ?

@joestringer Thanks , What could be the reason for CI failure? As i see some checks are not successful should we wait for CI Failure to solve before merging ?

Those are caused by spot instances being removed during tests. This is unrelated to your PR and there was a recently merged PR to fix that: https://github.com/cilium/cilium/pull/32553
Let me restart the tests using the trigger, hopefully that should fix the issue. If not, we might have to rebase on main (but please hold off on that for the moment as it would invalidate all other test results)

/ci-eks

Removed the upgrade impact label and upgraded the release note description as the new version of the PR is much smaller in scope

/test


Class Zelenin\yii\modules\I18n\Components\Language does not exist

I have installed the module via composer (as it was written in doc),
but the application fails to find it...

this file not exists in this module. where is calling it in your app?

in common/config/main.php
'components' => [
		'i18n' => [
			'class'=> Zelenin\yii\modules\I18n\components\I18N::className(),
    		//'languages' => ['ru', 'de', 'it','ja'],
		    'translations' => [
        		'yii' => [
		            'class' => yii\i18n\DbMessageSource::className()
        		]
			]
		],
    ],

you do something wrong.
Language class not exists in this module.
And namespace Components too.
See full error trace for place where this class is initialized.

 You`re totally right!


Broken on 1.19.2 Paper

The plugin is loaded without any issues. For some reason it plays the Vanilla disc instead of the custom one. I haven't changed anything except update the server from 1.19 to 1.19.2 and update the voice chat plugin and Custom Discs plugin. I made sure all mp3s are in their place and the disc is created properly. No other player can hear the music too.

If you updated the plugin, some discs may need to be converted to a new format. Use /cd convert.

Thanks, that made it work. I totally missed that. I'd suggest have this documented a bit better. I'd also suggest to not change the format too often in the future.


doc: Update pymapdl.rst

Description
Please provide a brief description of the changes made in this pull request.
Issue linked
Please mention the issue number or describe the problem this pull request addresses.
Checklist

[ ] I have visited and read Develop PyMAPDL.
[ ] I have tested my changes locally
[ ] I have added necessary documentation or updated existing documentation.
[ ] I have followed the PyMAPDL coding style guidelines.
[ ] I have added appropriate unit tests that also ensure the minimal coverage criteria.
[ ] I have reviewed my changes before submitting this pull request.
[ ] I have linked the issue or issues that are solved to the PR if any.
[ ] I have assigned this PR to myself.
[ ] I have marked this PR as draft if it is not ready to be reviewed yet.
[ ] I have made sure that the title of my PR follows Commit naming conventions (e.g. feat: adding new MAPDL command)

Thank you @MaxJPRey ! :)

Merging this.


As a Data user I want to be able to change the styling (colour ramp) ..so that I can visualise the data better for me

original id#62
Accessibility to all users (e.g. colour blindness) so product is available to all equally

Users can do this if they download the data and display it on their own GIS software.
To do this on-line is costly and very little advantage to be able to do this.

Out of scope


Cosmos Change Feed Input Trigger - Lease Stops Sending Triggers

Investigative information
Please provide the following:

Timestamp: 2017-12-28T15:42:22.000Z
Function App version (1.0 or 2.0-beta): 1.0
Invocation ID: 17bb63ca-ab9c-45bc-9b77-41c8e9a21dee
Region: East US 2

Repro steps
Seems that after our change feeds have been running for awhile they intermittently just stop working. It seems it could be related to RU/s being exhausted, but there is no recovery process. There are 429s that were logged in the DB being monitored as it was under occasional load.
Expected behavior
Even when the DB being monitored is under load or receives 429s, the lease for the change feed should not ever get into a hung state. It should recover when the lease gets frozen. The input trigger should never stop firing.
Actual behavior
The input trigger stops firing and no new change feed docs are processed despite there still being traffic/activity in the lease db collection.
Known workarounds
The only known workaround I've been able to identity is to delete the lease collection and restart the function host. Restarting the function host recreates the lease collection (assuming createLeaseCollectionIfNotExists=true in function.json) and input triggers begin flowing in again. This is a very weak solution as we lose any change feed activity since the feed stopped responding.
Related information
Language: Javascript
AzureWebJobsHostLogs: stops writing trigger events when change feed is hung/expires, even though there are change feed events occurring and the lease collection has activity. The function host just stops checking for new events or is hung. Restarting the function app has no effect.
Lease Collection Partition State
Upon further inspection of the lease collection, all other partition documents contain state=2 and contain a valid Owner guid. One partition does not contain an owner and has state=1 .
Invalid Lease Collection Document
{
	"state": 1,
	"PartitionId": "7",
	"Owner": null,
	"ContinuationToken": "\"245895\"",
	"SequenceNumber": 4726
}

Other partitions are sending triggers to the function app, just not this partition stuck in state=1. Appears this issue is related to a partition state being stuck.

So I found another workaround that doesn't require re-creating the entire lease collection. If you identify the documents in your lease collection that contain state=1 and Owner=null, you should set the ContinuationToken=null. Here is the before/after and the final state once the lease continued to get out of the errored state. Unsure why the ContinuationToken gets out of whack.
Lease Collection Document (Error State)
Partition change feed trigger stops sending input triggers to azure function. state=1 and Owner=null.
{
	"state": 1,
	"PartitionId": "7",
	"Owner": null,
	"ContinuationToken": "\"245895\"",
	"SequenceNumber": 4726
}

Lease Collection Document (Modified State)
Update the state=2 (healthy) and ContinuationToken=null.
{
	"state": 2,
	"PartitionId": "7",
	"Owner": null,
	"ContinuationToken": null,
	"SequenceNumber": 4726
}

Lease Collection Document (Healthy State)
ContinuationToken=<new_value> and SequenceNumber increments.
{
	"state": 2,
	"PartitionId": "7",
        "Owner": "e40a9970-6f13-4fe3-9581-7e5306d982e5",
	"ContinuationToken": "\"246479\"",
	"SequenceNumber": 4727
}

After modifying the lease collection partition document, change feed events are no longer hung. Hoping someone can shed some light on why this happens. Seen this with numerous change feed functions we are using.

Still seeing the issue daily where the lease needs reset, our watchdog script is still resetting invalid states - likely due to a large transaction update. I will be refactoring the large transaction to occur outside a stored procedure to see if this improves until we get large transaction support in CFP.
The stored procedure is exhausting server-bound resources as it occasionally receives "the script with id 'xxxxx is blocked for execution because it has violated its allowed resource limit several times." so it needs redesigned as a client-side script, rather than calling it repeatedly with continuation tokens as it is taking too long to execute with server-bound resources.

There don't seem to be any signals of stuck partitions during last 3 days.
We can take a quick look at your sproc, if you want. Share via email.

@mkolt  I just shared the sproc via email, hope you can identify any issues we have.
I tried refactoring the large transaction (server-side sproc) which bulk updates to client-side, but it takes 2-3x the time (updating 6k 100KB docs takes 5-6min server-side and 15-20min client-side). Unfortunately there is no way to do partial document updates yet so client-side is taking a penalty for retrieving and updating the entire document each time, adding a proportionate amount of latency with each client/server cycle.
I can consistently fail the CFP when sprocs exceed their bounded execution or process a large batch of bulk updates, presumably related to larger-sized docs. Until this can be remedied, we have to keep our lease watchdog actively fixing broken partition leases.

@ealsur Not sure if its related to this issue but in my case, change feed doesn't get triggered the first time, until I manually visit the Function App -> Change Feed Function -> function.json -> Logs. This change feed is being observed on a partitioned collection with 25k RUs. Function is hosted on consumption plan with a single lease (leases collection: 400 RUs). Once it gets triggered it works fine afterwards but the first time I always have to navigate to the Logs as mentioned above.
The behavior is not tied to a specific Collection or Cosmos DB account but always reproducible by deploying this ARM template and running these load tests. The trigger is configured in code here.

@syedhassaanahmed please open a different issue, this is not related to SPROCs. The Consumption Plan is not creating instances for your Function App (that is why it's not triggering). When you open the Functions Portal, it forces the creation of one instance if there are none, and that is when it works.

Thanks @ealsur #2549

Any update? Also, is there any direction to someone starting new to not face such issues?

There is a PR that updates the CFP Library to a version that can handle batch size better for these scenarios. https://github.com/Azure/azure-webjobs-sdk-extensions/pull/410

Since the fix is targeting V2, I don't know the release schedule. Maybe @paulbatum can shed more light on what could be an estimated time frame.

Since this PR is still pending review, I would guess the ETA for this to be merged and then deployed to prod to be around mid June.

@ealsur you say there is a fix targeting V2, what about customers running V1 Functions that are running in to this problem? what's the mitigation for them?

@ryancrawcour V1 dependencies cannot be upgrade futher due to a couple of hard lock dependencies on Functions V1 (Newtonsoft.Json & DocumentDB SDK).

Upgrade to V2 - V1 has known issues that can't be fixed without breaking changes.


more "magic" with bundle exec

I am reinstalling my rbenv now, all works, but i leave the rbev-bundler pliugin outside.
right now i am testing https://github.com/maljub01/rbenv-bundle-exec and works very well with me.
Ubuntu 14.04
zsh with oh-my-zsh, bundler, and rbenv plugin now installed.
this one works very well, with me, without need for "bundle exec" (i have a 'be' alias in zsh that works very well in any case too)
this plugin have any problem with rbenv core ? i would like to work in this too (if is needed)

If rbenv-bundle-exec plugin works for you, then great. We only recommend that people don't use rbenv-bundler because of hard-to-debug problems.
Are you actually reporting a bug? It seems like you don't have any problems yet.

On Thu, Jan 8, 2015 at 12:49 PM, Mislav Marohnić
<EMAIL_ADDRESS>wrote:

If rbenv-bundle-exec plugin works for you, then great. We only
recommend that people don't use rbenv-bundler because of
hard-to-debug problems.
Are you actually reporting a bug? It seems like you don't have any
problems yet.

i would like to know if is posible add this plugin to rbenv core (maybe
in some branch for integration, like rbenv-gem-rehash?) or at least
validate that works and maintain compatibility with future rbenv
versions.

i will  do more tests, the plugins have problems :-( bad way... continue without this ...


[Feature]: Add --nodelete Flag to shopify theme dev

What area(s) will this request affect?
Theme
What type of change do you want to see?
New feature
Overview
Add --nodelete flag to the cli command shopify theme dev similar like in the shopify theme push command
Motivation
My use case: For project that I'm working on we are using ESBuild to handle all JS files. We used slate, but since its deprecation, there was practically no real replacement to it, so we build our own quirky and slim one. The package.json script for dev looks kinda like this:
"start": "node esbuild.watch.js & shopify theme dev"
and as the ESBuild is still compiling for a few seconds, shopify theme is already watching and since the asset build is not yet fully completed, deletes remotes files, to upload them again a few seconds later when the asset build is done.

still relevant

still relevant

Hey @maks-afew 👋🏻
The PR that implements this feature has been merged, and will be available on the next minor version release of the CLI.
Thank you for the issue! 🙏🏻


Introduce QueueManager to make seperation between store and manager

Coverage decreased (-0.004%) to 68.866% when pulling 607b32c6886ca5dc2d9ddb0180694e41ca108e51 on anish531213:aanish/queueOperation into c5a3b3f5bd9df3f51e4dc4dbe241b35f0b928cc3 on uber:master.


[Build script] Remove double-quotes around variables to fix incorrect array expansion

In order to use Realm within our app, we need to rebuild it with some extra settings enabled. While experimenting, I noticed what appears to be a bug in Realm's build script:
When adding more than one argument to the REALM_EXTRA_BUILD_ARGUMENTS variable, the arguments get passed to xcodebuild as a single string, rather than multiple space-separated strings.
An example:
# Running the following command:
REALM_EXTRA_BUILD_ARGUMENTS='REALM_BUILD_LIBRARY_FOR_DISTRIBUTION=YES DEBUG_INFORMATION_FORMAT=dwarf-with-dsym' ./build.sh ios-swift

# Results in this `xcodebuild` invocation:
/Applications/Xcode-15.0.1.app/Contents/Developer/usr/bin/xcodebuild -IDECustomDerivedDataLocation=build/DerivedData -destination generic/platform=iOS -scheme Realm -configuration Release build REALM_HIDE_SYMBOLS=YES "REALM_BUILD_LIBRARY_FOR_DISTRIBUTION=YES DEBUG_INFORMATION_FORMAT=dwarf-with-dsym"

Note the last two arguments in the xcodebuild invocation are surrounded by double-quotes, so xcodebuild interprets them as a single argument.
I've run into this exact issue before when writing my own build scripts in Bash. It has to do with how Bash does array expansion. Luckily the fix is pretty simple, just to remove double-quotes from a couple places.
Here's a diff of the xcodebuild output before and after the fix is applied:
Building with command: xcodebuild -IDECustomDerivedDataLocation=build/DerivedData -destination generic/platform=iOS -scheme Realm -configuration Release build REALM_HIDE_SYMBOLS=YES REALM_BUILD_LIBRARY_FOR_DISTRIBUTION=YES DEBUG_INFORMATION_FORMAT=dwarf-with-dsym
Command line invocation:
-    /Applications/Xcode-15.0.1.app/Contents/Developer/usr/bin/xcodebuild -IDECustomDerivedDataLocation=build/DerivedData -destination generic/platform=iOS -scheme Realm -configuration Release build REALM_HIDE_SYMBOLS=YES "REALM_BUILD_LIBRARY_FOR_DISTRIBUTION=YES DEBUG_INFORMATION_FORMAT=dwarf-with-dsym"
+    /Applications/Xcode-15.0.1.app/Contents/Developer/usr/bin/xcodebuild -IDECustomDerivedDataLocation=build/DerivedData -destination generic/platform=iOS -scheme Realm -configuration Release build REALM_HIDE_SYMBOLS=YES REALM_BUILD_LIBRARY_FOR_DISTRIBUTION=YES DEBUG_INFORMATION_FORMAT=dwarf-with-dsym

User defaults from command line:
    IDECustomDerivedDataLocation = build/DerivedData
    IDEPackageSupportUseBuiltinSCM = YES

Build settings from command line:
-    REALM_BUILD_LIBRARY_FOR_DISTRIBUTION = YES DEBUG_INFORMATION_FORMAT=dwarf-with-dsym
+    DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
+    REALM_BUILD_LIBRARY_FOR_DISTRIBUTION = YES
    REALM_HIDE_SYMBOLS = YES

Hi @dianaafanador3. Any chance this could get a review? Just adding you here because I see you approved a recent PR. Let me know if there's someone else I should mention instead. Thanks 👋

Hey @hisaac,
I don't know why the original array expansion is surrounded by quotes like that, but I tested a few different invocations and it seems that the problem you spotted appears every time and that your patch makes it go away.

Awesome, thanks for testing it out to make sure @fealebenpae. 🙏


GitHub Action

While I have not tested your project it sounds great, have you considered making this available as a GitHub action?

Hey @vanbroup, could you expound on what you're proposing here? I'm totally down, but what would the action do?

It could take two docx files as input and create a redlined artifact.

Would love to take a shot at this @vanbroup. How do you envision this working? Just looking for docx files with the same filename in both commits and running redlines for all? Configuring it to only work on specific files?

You could look at this repository for inspiration:
https://github.com/vanbroup/build-guidelines-action


issue

I can't answer your question because I was blocked from msft. https://github.com/microsoft/vscode-jupyter/issues/11027#issuecomment-1203445042

So can you answer it here? Or shall I close this issue as off topic to the repository you opened it on?

Yeah, it's probably off topic. I'll try using the keyboard tomorrow.

Pressing ctrl+c does not work either, but in this particular case, it shouldn’t, because I’m clicking a single cell, so the expectation would be that only the single cell value is copied.


Fix for #3888: knife cookbook site share doesn't work

rewrite of the specs on top of @andy-dufour's patch
closes #4428
closes #3888

@chef/client-core i think this is ready, appveyor is green even though the callback to github seems to have failed to register


[BUG] BlobBaseClient.WithVersion()  will encode blob name

Describe the bug
In the just released Azure.Storage.Blobs 12.5.0-preview.5, the BlobBaseClient.WithVersion() not work well.
If the Blob Client has blob name include any special char like “/”, the char will be encoded after run BlobBaseClient.WithVersion().
I believe BlobBaseClient.WithSnapshot() should have same problem.
This issue also happen on class inherit from BlobBaseClient, like BlockBlobClient.WithVersion().
Expected behavior
the blob name should not be encoded after run BlobBaseClient.WithVersion()
Actual behavior (include Exception or Stack Trace)
What is the actual behavior?

To Reproduce

Create a blobbaseclient with base blob Uri, the blob name contains "/", like "dir1/blob1"
run blobbaseclient.WithVersion(versionId) , the blob name encoded to "dir1%2Fblob1"

Environment:

Name and version of the Library package used: [e.g. Azure.Storage.Blobs 12.5.0-preview.5]
Hosting platform or OS and .NET runtime version (dotnet --info output for .NET Core projects): [e.g. Azure AppService or Windows 10 .NET Framework 4.8]

.NET Core SDK (reflecting any global.json):
 Version:   2.2.108
 Commit:    33ed5b90ce

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.18363
 OS Platform: Windows
 RID:         win10-x64
 Base Path:   C:\Program Files\dotnet\sdk\2.2.108\

Host (useful for support):
  Version: 2.2.6
  Commit:  7dac9b1b51

.NET Core SDKs installed:
  2.2.108 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
  Microsoft.AspNetCore.All 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
  Microsoft.AspNetCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 2.2.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

IDE and version : [e.g. Visual Studio 16.3]
VS 15.7.4

@AlexGhiondea
Would you please also add "Client" tag for the issue that's on storage dataplane?
As we will monitor the SRP storage issues: with "Storage" but not with "Client" tag.
As this issue is for dataplane, would you mind to add "Client" tag, so our monitor won't report it.

I have a PR out to fix this issue - https://github.com/Azure/azure-sdk-for-net/pull/13334


Update windows libs to VS 2015

This will make dev installation a lot easier.

Fixes #53

I'm definitely wondering if we should be building the .lib here as well. 🤔


Build failed with error message "cachelib/navy/common/FdpNvme.h:143:28: error: expected ‘)’ before ‘&’ token   143 |   explicit FdpNvme(NvmeData& data, struct nvme_fdp_ruh_status* ruh_status);       |                   ~        ^       |                            ) make[2]: *** [navy/CMakeFiles/cachelib_navy.dir/build.make:328: navy/CMakeFiles/cachelib_navy.dir/common/Device.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:395: navy/CMakeFiles/cachelib_navy.dir/all] Error 2 make: *** [Makefile:130: all] Error 2 build-package.sh: error: make failed"

Describe the bug
Build failed with error output "cachelib/navy/common/FdpNvme.h:143:28: error: expected ‘)’ before ‘&’ token
  143 |   explicit FdpNvme(NvmeData& data, struct nvme_fdp_ruh_status* ruh_status);
      |                   ~        ^
      |                            )
make[2]: *** [navy/CMakeFiles/cachelib_navy.dir/build.make:328: navy/CMakeFiles/cachelib_navy.dir/common/Device.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:395: navy/CMakeFiles/cachelib_navy.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
build-package.sh: error: make failed"

To Reproduce
Steps to reproduce the behavior:

build.sh -j or build-package.sh -S -i cachelib

Expected behavior
Build succeeded.
Screenshots

Desktop (please complete the following information):

OS: ubuntu 20.04 running in workstation as a guest os.

Additional context
root@ubuntu:/home/essd/CacheLib# cat /proc/cpuinfo
processor	: 0
vendor_id	: GenuineIntel
cpu family	: 6
model		: 140
model name	: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz
stepping	: 1
microcode	: 0xffffffff
cpu MHz		: 2419.198
cache size	: 8192 KB
physical id	: 0
siblings	: 1
core id		: 0
cpu cores	: 1
apicid		: 0
initial apicid	: 0
fpu		: yes
fpu_exception	: yes
cpuid level	: 27
wp		: yes
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xsaves arat avx512_vpopcntdq md_clear flush_l1d arch_capabilities
bugs		: spectre_v1 spectre_v2 spec_store_bypass swapgs retbleed gds bhi
bogomips	: 4838.39
clflush size	: 64
cache_alignment	: 64
address sizes	: 43 bits physical, 48 bits virtual
power management:

I also encountered this issue https://github.com/facebook/CacheLib/issues/323 if I didn't contain its fix.

I guess that this problem only occurred in VM with a single-core CPU. I didn't encounter the same issue in a new machine with multiple cores.

Is this issue still occurring? The recent fixes might have mitigated this. I will close this if it is not a problem anymore or if I don't hear back in a few days.


Deploying a website in the VDC marketplace failed.

While deploying the website chatwizard it failed with the following error:
Failed to initialize publishingtools, please contact support with this information: Domain: weynandkuijpers-publishingtools-weynandsweb.webg2test.grid.tf VDC Name: vdc_newvdctoo_weynandkuijpers Farm name: freefarm Reason: Couldn't find resources in the cluster for the solution . Use the refresh button on the upper right to restart Website creation

Active workloads:

Deleted all the existing workloads in the silver VDC so that all the resources would be available in my VDC for this single website (blog).  It did still not deploy.

The first issue is a resources issue, the second one is a duplicate of #2354.

The first issue is a resources issue, the second one is a duplicate of #2354.

closing because of duplication

closing because of duplication


Activated tests after registration of EnergyModelsBase v0.8

PR #31 deactivated the tests so that we could register a version with running tests (although nothing was tested). These are reactivated in this PR. In addition, I changed the suppressions to focus only on the examples to still get the error messages of the tests, if they are failing.

Omitting x86 tests as it is not the most relevant test anyhow.


Add how to set custom layout to Readme.md

I've added info about how to set custom default layout as well as layout for specific render.

Thank you David.


Suggest + volunteer: rename HumanOrigins249_tiny.eigenstratgeno to HumanOrigins249_tiny.bed

Dear GenoCAE maintainer,
Thanks so much for having example files and example code: I find those very useful!
I did find something unexpected, the file extension of HumanOrigins249_tiny.eigenstratgeno: this appears to be a PLINK .bed file, as it follows the same structure as described in the PLINK .bim file format doc. Also, genio (an R package to read PLINK files) cannot read .bed files if they do not have that extension.
I suggest to rename the file to what any PLINK user would expect for a .bed file, which is HumanOrigins249_tiny.bed
I volunteer to do so.

Seems like a duplicate of #11 now. I have volunteer to add those funky PLINK files :-)

May be fixed with Pull Request #15


Callback

I've a lot of troubles adding please wait in a page with masonry. I could add the masonry after finish(), but I don't know how to add a callback function... Could you help me ?

I only know a little about masonry, but it sounds like you should probably follow this workflow:

Show PleaseWait
Do what you need with masonry and the layout
Once masonry has finished, close PleaseWait

If you have a specific error you're running into though, please elaborate and we'll try to help!

Hello, the issue is due to:
body { display: none }
befor pleaseWait finishes. I replaced it with:
body { opacity: 0 }..
Another important issue is about Android browser which doesn't close the splash screen at finish()


Error logs while parsing neovim inputs

Things like this happen sometimes:
CRI<3120>:eovim /home/fguerret/drafts/eovim/src/nvim_event.c:383 nvim_event_mode_change() Invalid argument count. (2 == 1) is false

@francoisGuerret can you please provide more details about how to reproduce this?


DEV: Backfill system tests

Adding some system tests first while I fix a bug.

shakes fists at topic creation


Duplicate property creation every time it runs

Versions:

ide-helper Version: v2.13.0
Laravel Version: v9.52.0
PHP Version: 8.2

Description:
After updating to the latest version, every time I run the php artisan ide-helper:models --write command, the property-read in the model is added again, causing duplicate values in the model.
/**
 * App\Models\Branch
 *
 * @property int $id
 * @property int $company_id
 * @property string $name
 * @property string|null $phone
 * @property bool $active
 * @property \Illuminate\Support\Carbon|null $created_at
 * @property \Illuminate\Support\Carbon|null $updated_at
 * @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\QrMenu> $activeQrMenus
 * @property-read int|null $active_qr_menus_count
 * @property-read \Illuminate\Database\Eloquent\Collection<int, User> $admins
 * @property-read int|null $admins_count
 * @property-read \App\Models\Company $company
 * @method static \Database\Factories\Company\BranchFactory factory($count = null, $state = [])
 * @method static \Illuminate\Database\Eloquent\Builder|Branch newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|Branch newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|Branch query()
 * @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\QrMenu> $activeQrMenus
 * @property-read \Illuminate\Database\Eloquent\Collection<int, User> $admins
 * @mixin \Eloquent
 */

The activeQrMenus and admins values here are repeating.
There are many models in the project, but this error only occurs in 5 models.

Same issue. However, I found, that use_generics_annotations set to true will produce duplicates like this
I ran it three times with this setting and it always seem to duplicate the @property-read from HasApiTokens and Notifiable in my default User model. Switching the generics annotations off fixes this issue (requires deleting the previous model docBlock)
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
* @property-read \Illuminate\Database\Eloquent\Collection<int, \Laravel\Sanctum\PersonalAccessToken> $tokens
+* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
+* @property-read \Illuminate\Database\Eloquent\Collection<int, \Laravel\Sanctum\PersonalAccessToken> $tokens
+* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
+* @property-read \Illuminate\Database\Eloquent\Collection<int, \Laravel\Sanctum\PersonalAccessToken> $tokens

Related block:
https://github.com/barryvdh/laravel-ide-helper/blob/4dc20b028adaeadf603860f179f09da5aa21f5b5/src/Console/ModelsCommand.php#L748
Both mentioned traits indeed extend from Relation, so maybe it just can't match the correct type for collections of those relations.

+1 on this issue

FYI I needed to fix this because it caused my CI to fail every time. How I fixed is by changing the command to php artisan ide-helper:models --no-interaction --write --reset. The --reset flag resets the lookup and re-populates the models.

+1, having the same issue

+1 on this issue

I acknowledge this seems buggy, so we definitely appreciate if someone steps up and looks into fixing this.
Btw, for those affected: can you use --reset?
(I realized I'm not affected by this bug, because my pipeline uses ide-helper:models --write --reset)

I can't use --reset because I've defined some model getters using Laravel's Attribute, and when I add --reset, it deletes the manually added properties.

+1 on this, using the reset switch helps but it's quite annoying

Not work with generic types?

In latest version phpDocumentor/ReflectionDocBlock generic type parsed correctly, but this package use fork barryvdh/ReflectionDocBlock and this fork can't parse generic type in DocBlock correcly. So need update fork package, maybe).

I create PR to fork repository
https://github.com/barryvdh/ReflectionDocBlock/pull/14

@barryvdh can you help please?)

Running into this issue too:
* @property-read \Illuminate\Database\Eloquent\Collection<int, \Laravel\Sanctum\PersonalAccessToken> $tokens
* @property-read \Illuminate\Database\Eloquent\Collection<int, \Laravel\Sanctum\PersonalAccessToken> $tokens
*/
class User extends Authenticatable {
}

Same problem here. Just a  bit of knowledge since it's not mentioned in this thread. In my case, it only happens if there was something "irregular" with the naming convention.
For example the model is User but the relation is called admins. Or if it's two words like payment_logs. Or if it's 1 word, but you're not using standard column naming like user_id for a foreign key on users

Hello @mfn,
The bug located here: https://github.com/barryvdh/ReflectionDocBlock/pull/14, has been successfully corrected with this pull request. If possible, I kindly request you to release a new version incorporating these fixes.

Still encounter this error even though I upgraded to dev:master.

Still encountered this error even though I upgraded to dev:master.

The issue was resolved in the barryvdh/ReflectionDocBlock package to which this package is linked. If this package updates its dependencies and releases a new version, the problem will be solved.

+1 can we get that dependency updated?

Tagged

https://github.com/barryvdh/ReflectionDocBlock/compare/v2.1.0...v2.1.1 fixed here.


[BUG] Wrong sandbox configuration causes unreadable exception

This line https://github.com/mattgodbolt/compiler-explorer/blob/master/lib/exec.js#L199
Is displayed as:
error: Exception while processing compilers: {"0":"B","1":"a","2":"d","3":" ","4":"s","5":"a","6":"n","7":"d","8":"b","9":"o","10":"x","11":" ","12":"t","13":"y","14":"p","15":"e","16":" "}
(indexed array saying "Bad sandbox type ")
This happens when you set "executionType=" instead of  "executionType=none"

Whoops :) Thanks @partouf

Now we get:
error: Exception while processing compilers:Bad sandbox type  {"stack":"Error: Bad sandbox type \n    at Object.execute (/home/matthew/dev/compiler-explorer/lib/exec.js:388:15)\n    at DefaultCompiler.execCompilerCached (/home/matthew/dev/compiler-explorer/lib/base-compiler.js:114:33)"}

which should get reported correctly in both papertrail and sentry.


[DropdownMenu] Pointer up on trigger doesn't close menu

I noticed in MacOS that a trigger click opens the menu, as well as pointer down but pointer up closes:
https://user-images.githubusercontent.com/175330/137324353-d49060d6-e2d2-4d40-89a1-73992af4c317.mp4
I wonder if we should do the same to pass the following success criterion which states that a pointer up should reverse the pointer down outcome.
https://www.w3.org/WAI/WCAG21/Techniques/failures/F101

Haha, great minds as I initially named this [DropdownMenu] Doesn't close on long press of trigger but I renamed it to try not to influence the implementation.


the Darkmode feature is not working

Describe the bug
the dark mode button doesnt have a good Ui as well as the button isnt changing to light mode.
To Reproduce
Steps to reproduce the behavior:
this can be checked by trying to use the button,
Expected behavior
I can fix the code immediately if u can assign me this project and label it.
Screenshots
If applicable, add screenshots to help explain your problem.

Can u please assign it to me , i would love to work on this project.
Thank you!

thank you , can u tag the level aswell.


dts: sensor support and i2c bus generation

This pull-request provides support for sensor in device tree.
New yaml file is provided for sensor.
To help generation of a I2C bus master information, a new type of yaml property category is defined
with new yaml category: default-value.
The pull request focus on disco_l475_iot1 board as feature enabler

DId you see other use cases for 'required-implicit'?

Not yet. I wanted t avoid a too much ad-hoc, and this was the best solution I've found.
I wanted to add it as a yaml property as this is a node property that what we want to generate and I found that using other solutions such as #cells or something not under "properties" would end up being not generic enough.
'required' would have been confusing, as property is not there in general.
'implicit' would not be true either as i2c-bus actually exists and could be used for this purpose.
'required': was not quite

I wonder about doing just "required-parent”, and dropping the "default-value” bit.

k

I wonder about doing just "required-parent”, and dropping the "default-value” bit.`

What about using "optional" + default-value?
With just "required-parent" I feel this would end up in a ad-hoc code where required-parent would bound to "get parent label". Besides, there is a possibility to actually state i2c-bus (according to Linux documentation). In that case you need to use provided value.

@galak: one point I was not sure, is location of hts221.yaml and others.
Under /arm/ right now, I feel it is not appropriate

@galak: one point I was not sure, is location of hts221.yaml and others.
Under /arm/ right now, I feel it is not appropriate

Agreed, I want to restructure the yaml dirs to try and mimic the linux dt binding structure as much as possible.  So if those sensors have reasonable locations from a linux dt binding point of view, that we should put them there.

Agreed, I want to restructure the yaml dirs to try and mimic the linux dt binding structure as much as possible. So if those sensors have reasonable locations from a linux dt binding point of view, that we should put them there.

Sounds good to me

@galak: can you feedback on this new version?

I pulled in the base set of patches that enabled the sensors on the disco board.

So from a yaml point of view, I'm wanting to maybe add a new property to 'reg' to qualify it as on a i2c-bus.  Wondering if/how that might work/look.
from the 'yaml' side we'd only have something like (with 'bus') being the new thing.

reg:

 type: array

 description: address on i2c bus

 generation: define

 category: required

 bus: i2c

Like :
if 'reg' property has 'bus' attribute:

add a 'bus' property to node
'bus' value = parent node label

This should be doable(I guess we can do anything), but might be a little bit trickier since we need to generate 2 defs base on reg attributes. This require extra logic in extract_reg_prop which is not yaml aware right now  (today, it works only with #address-cells and #size-cells).
I feel this would be a bit awkward, my view is we want to generate a #define element out of the node.
This is done generally thanks to treatment of node properties described as yaml 'properties' of a yaml node binding. Exception is when we generate more than one #define out of a single property, which is done thanks to "#cells" hook.
It would be nice if we don't add a new method each time we have a new need. This what I tried to do by trying to re-use existing node property generic treatment. I'm sure it could be done otherwise, and more generic hopefully. But I'd like to avoid doing it in a less generic way.

Like :
if 'reg' property has 'bus' attribute:
add a 'bus' property to node
'bus' value = parent node label
This should be doable(I guess we can do anything), but might be a little bit trickier since we need to generate 2 defs base on reg attributes. This require extra logic in extract_reg_prop which is not yaml aware right now (today, it works only with #address-cells and #size-cells).
I feel this would be a bit awkward, my view is we want to generate a #define element out of the node.
This is done generally thanks to treatment of node properties described as yaml 'properties' of a yaml node binding. Exception is when we generate more than one #define out of a single property, which is done thanks to "#cells" hook.
It would be nice if we don't add a new method each time we have a new need. This what I tried to do by trying to re-use existing node property generic treatment. I'm sure it could be done otherwise, and more generic hopefully. But I'd like to avoid doing it in a less generic way.

So I agree we don't want to add a new method every time, but I think we have some patterns we will find out and need to add some hooks/changes.  I was looking at this and think we can do something like in extract_property():
if y_key == 'reg':
extract_reg_prop(node_address, names, defs, def_label,
1, y_val.get('label', None))
bus = y_val.get('bus', None)
if bus:
....

I pushed an update to the branch with a change that supports 'bus' as I described.  We probably want to clean this up, but its at least in a working state.

Another issue we need to deal with is have the same sensor on 2 different buses.  This is broken right now based on how we generate the #define names.

I'll have a look to the change.
By the way, what about existing i2c-bus property, as (sparely) used in Linux.

Another issue we need to deal with is have the same sensor on 2 different buses.

Do you have an example on how this happens in Linux dts?

Here's a snipet based on disco:
&i2c1 {
        status = "ok";
        clock-frequency = <I2C_BITRATE_FAST>;

        lis3mdl-magn@1e {
                compatible = "st,lis3mdl-magn";
                reg = <0x1e>;
                label = "LIS3MDL";
        };

};

&i2c2 {
        status = "ok";
        clock-frequency = <I2C_BITRATE_FAST>;

        lis3mdl-magn@1e {
                compatible = "st,lis3mdl-magn";
                reg = <0x1e>;
                label = "LIS3MDL";
        };

ok, yes, was elementary.

Another issue we need to deal with is have the same sensor on 2 different buses

I understand these would be 2 different sensors. Each one being located on a different bus.
In that case, we need to add bus id/base address in sensor define.

If we're to add bus id/bus base address in i2c-device node #defines, first idea would be:
#define ST_STM32_I2C_V2_40005400_ST_HTS221_5F_BASE_ADDRESS0	0x5f
#define ST_STM32_I2C_V2_40005400_ST_HTS221_5F_I2C_BUS		"I2C_2"
#define ST_STM32_I2C_V2_40005400_ST_HTS221_5F_LABEL		"HTS221"
#define ST_STM32_I2C_V2_40005400_ST_HTS221_5F_BASE_ADDRESS	ST_STM32_I2C_V2_40005400_ST_HTS221_5F_BASE_ADDRESS_0
This requires new mecanism. Maybe alike of current "cell_string"/"#cells", that would be added in i2c.yaml, which would then need to be included in i2c-device.yaml. For instance (to be refined):
bus: I2C_BUS
"#cells":

master_label

If we're to add bus id/bus base address in i2c-device node #defines, first idea would be:
#define ST_STM32_I2C_V2_40005400_ST_HTS221_5F_BASE_ADDRESS0	0x5f
#define ST_STM32_I2C_V2_40005400_ST_HTS221_5F_I2C_BUS	"I2C_2"
#define ST_STM32_I2C_V2_40005400_ST_HTS221_5F_LABEL	"HTS221"
#define ST_STM32_I2C_V2_40005400_ST_HTS221_5F_BASE_ADDRESS ST_STM32_I2C_V2_40005400_ST_HTS221_5F_BASE_ADDRESS_0
This requires new mecanism. Maybe alike of current "cell_string"/"#cells", that would be added in i2c.yaml, which would then need to be included in i2c-device.yaml. For instance (to be refined):
bus: I2C_BUS
"#cells":
master_label

I was thinking something like this, instead of adding 'bus' to reg property in the yaml, of introducing something new that conveys something about the parent.  So maybe:
description:
parent:
- bus: i2c
properties:

Pushed functionnal attempt for parent-node yaml section.
Still WIP, as master bus generation code is quite specific.

@galak: Before I do some clean up, how do you feel with this new proposal?
On my side, I'm not fully satisfied with the way we retrieve label information from parent to child (both on yaml side and python side). Any idea if there would be some other king of info we'd need to get from parent ?
If this is only label, maybe we could just assume that if node parent is bus, generate #define I2C_BUS_MASTER.. by default.

@galak, @MaureenHelm, @agross-linaro : PR Cleaned-up.
Branch is based onto #5076.

recheck

Moved to master branch as arm branch is rebased on master branch by CI before testing and it showed some conflicts at that step

I'd like a means for us to associate the parent and child yaml's together for things on a bus.  So I'm thinking something like:
[ in dts/bindings/i2c/i2c-device.yaml ]
parent:
bus: i2c
generation: define
[ in dts/bindings/i2c/i2c.yaml ]
child:
bus: i2c
If 'parent' is set for a node's yaml, that we should check that the parent node in the yaml has 'bus' set.  If that's true, than the values of 'bus' should be the same.  If either case isn't true, its a parsing error.

@galak : So added a new commit to enable yaml parent/child binding on bus value. Error is generated if not matching or definition missing on parent side. Let me know if this answers the query


Remove transmission support for PS VAs

This removes support for sending the old 0-6 range VA field as part of trait comms. The VA field was deprecated and replaced by V2 all the way back in 2018, so there should be nothing on the network that requires it.
For receipt, we still process the VA field if there's no V2 field in viewed profile data. The cost of keeping this around is minimal for now, and we can kill it off some other time if that ever changes.
Additionally some improvements have been made to our serialization of custom trait colors for transmission to try and reduce wire consumption.
Unfortunately when custom colors were added they were transmitted in RGB table form rather than hex colors, so are subject to a bit of blow-up if color components are a bit too exact. We now try and round them to 2 significant digits prior to transmission, so there's a bit of lost information but it should be mostly accurate.

I suspect no one has an import string old enough that just has a VA field and no V2, so testing a change to the import logic would be a pain anyway. Honestly - maybe we just kill the VA support completely and say 6+ year old profile imports aren't supported.


MetaCI Information - Feature Development

Explanation and steps for using MetaCi with the CumulusCI Process. How to do this and how this actually works (This whole project is for novices as well)

https://buildmedia.readthedocs.org/media/pdf/metaci-cli/latest/metaci-cli.pdf
Link to Jason Lantz documentation