Update all calendarView cells when new date is selected.

Hey Jay, I currently added JTAppleCalendar v 7.0 to my app and I'm loving it! Thanks for the great work and saving the dev community a ton of time. I feel lame asking this but haven't found a way to solve my issue, which seems to be like something that's super simple that I'm not doing. Any pointers or support would be hugely appreciated!
A) What's happening
In the didSelectDate method, I'm adding a function with the hope of triggering multiple date calculations, but as I added this function here, it created an infinite loop when loading the viewController. I believe this is happening because the calendarView.selectDates([date]) calls the didSelectDate method. So I changed it to calendarView.selectDates([date], triggerSelectionDelegate: false) which solved the infinite loop issue! However, now as you select a new date it won't update the rest of the cells.
B) What I would want to happen
This is important to my app because the selected date has a "tail of dates". As it's a mailing service, the selected date is the "Deliver By" date, and the tail of dates shows the user the shipping time required. My hope is that by pressing the selected date, the rest of the cells update to show this tail.
Screenshot of how that tail looks:

Screenshot of how that tail looks when a new date is selected:

The latest code I'm using:
extension PostSchedulerViewController: JTAppleCalendarViewDataSource {

        func setupCalendarView() {
            calendarView?.ibCalendarDelegate = self
            calendarView?.ibCalendarDataSource = self
            calendarView?.minimumLineSpacing = 0
            calendarView?.minimumInteritemSpacing = 0
            calendarView?.allowsMultipleSelection = false
            calendarView?.isRangeSelectionUsed = false
            calendarView?.sectionInset = UIEdgeInsetsMake(20, 20, 20, 20)
            dateStringFormatter.dateFormat = DateFormatType.yearMonthDay
            monthFormatter.dateFormat = DateFormatType.monthYear
            dateFormatter.timeZone = Calendar.current.timeZone
            dateFormatter.locale = Calendar.current.locale
            calendarView?.visibleDates { [unowned self] (visibleDates:DateSegmentInfo) in
                self.setupCalendarView(from: visibleDates)
            }
        }

        func configureCalendar(_ calendar:JTAppleCalendarView) -> ConfigurationParameters {
            dateFormatter.dateFormat = DateFormatType.monthDay
            dateFormatter.timeZone = Calendar.current.timeZone
            dateFormatter.locale = Calendar.current.locale

            if let post = MyObjects.sharedInstance.workingPostViewModel?.post,
                let createdAt = post.createdAt,
                let endDate = Calendar.current.date(byAdding: .year, value: 2, to: createdAt) {
                let parameters = ConfigurationParameters(startDate: createdAt, endDate: endDate, calendar: Calendar.current)
                    return parameters
            } else {
                let parameters = ConfigurationParameters(startDate: Date(), endDate: Date(),calendar: Calendar.current)
                return parameters
            }
        }

        func setInitialPostDatesOnCalendarView() {
            guard let post = MyObjects.sharedInstance.workingPostViewModel?.post,
                let deliverDate = post.deliverDate else {
                    return
            }
            calendarView?.deselectAllDates()
            calendarView?.selectDates([deliverDate])
            calendarView?.scrollToDate(deliverDate, animateScroll:false)
        }
    }

    extension PostSchedulerViewController: JTAppleCalendarViewDelegate {
        func calendar(_ calendar: JTAppleCalendarView, cellForItemAt date:Date, cellState: CellState, indexPath:IndexPath) ->JTAppleCell {
            let cell = calendar.dequeueReusableJTAppleCell(withReuseIdentifier: "DayCell", for: indexPath) as! DayCell
            cell.label.text = cellState.text
            cell.handleSelected(cellState: cellState)
            return cell
        }

        func calendar(_ calendar: JTAppleCalendarView, didScrollToDateSegmentWith visibleDates: DateSegmentInfo) {
            setupCalendarView(from: visibleDates)
        }

        func calendar(_ calendar: JTAppleCalendarView, didSelectDate date: Date, cell: JTAppleCell?, cellState: CellState) {
            print(cellState.date)
            print(GlobalConstants.arrowMark, "selected date: ", date)
            updateFromNewDeliverDate(from: date, cell:cell, cellState:cellState)
        }

        func updateFromNewDeliverDate(from date:Date, cell:JTAppleCell?, cellState:CellState) {
            // guard let cell = cell as? DayCell else {return}

            guard cellState.day != .sunday else {
                // TODO: showPopLabel()
                return
            }

            guard let post = MyObjects.sharedInstance.workingPostViewModel?.post else {
                // TODO: showPopLabel()
                return
            }
            post.calculateDatesFromDeliver(date) { (success:Bool, error:Error?) in
                guard success else {
                    // TODO: showPopLabel()
                    return
                }
                self.calendarView?.deselectAllDates()
                self.calendarView?.selectDates([date], triggerSelectionDelegate: false)
                self.calendarView?.reloadData(withanchor: date, completionHandler: {
                    self.setPostDatesOnLabels()
                })
            }
        }

        func calendar(_ calendar: JTAppleCalendarView, didDeselectDate date: Date, cell: JTAppleCell?, cellState: CellState) {
            guard let cell = cell as? DayCell else {return}
            cell.handleSelected(cellState: cellState)
        }

        func calendar(_ calendar: JTAppleCalendarView, willDisplayCell cell: JTAppleCell?, date: Date, cellState: CellState) {
            guard let cell = cell as? DayCell else {return}
            cell.handleSelected(cellState: cellState)
        }
    }

OK. I'm @ work. I'll read it in more after im done.
We'll find you a solution 👍

ok, whenever you call
calendarView.selectDates([date], triggerSelectionDelegate: false)

This will cause the didSelect delegate to not be triggered as you have found out. But you cells still need to be updated. So, instead of calling the didSelect function, it instead calls the cellforItemWIthIndex function with all the cells that needs to be updated.

Jay! You rock!! Thanks for your response! You're right, the cell needed to be handled on all methods didSelect as well as cellForItemWithIndex. This helped!
I also realized that I should change my strategy and use calendarView?.generateDateRange(from: prep, to: deliver) which made it much smoother. I love this function, as well as being able to adjust the cell via a switch:
    switch cellState.selectedPosition() {
    case .left:
    case .middle:
    case .right:
    }

I do have one thing to figure out still.
Any pointers as you did yesterday would be of grand support. I'm so close to getting it just right!
If a user taps on a cell with cellState.isSelected, it currently deselects it. However, the desired behavior is to recalculate the dateRange just as it would as when the user taps on a didSelect cell.
If add the "recalculate" in didDeselect then it goes back to infinite loop. Maybe there's a way to tell the didDeselect that its past state used to be cellState.isSelected? Or maybe there's something more obvious that I'm not doing?

Where would I put the "recalculate" function to ensure it always happens when a user taps on any cell?

Screenshot of what happens when a user taps on a cell that already is cellState.isSelected:
(where ideally it would not allow for "cutting" dates).

Below is current code just in case:
DATA SOURCE
    extension PostSchedulerViewController: JTAppleCalendarViewDataSource {

        func setupCalendarView() {
            calendarView?.ibCalendarDelegate = self
            calendarView?.ibCalendarDataSource = self
            calendarView?.minimumLineSpacing = 0
            calendarView?.minimumInteritemSpacing = 0
            calendarView?.allowsMultipleSelection = true
            calendarView?.isRangeSelectionUsed = true
            calendarView?.sectionInset = UIEdgeInsetsMake(22, 22, 22, 22)
            dateStringFormatter.dateFormat = DateFormatType.yearMonthDay
            monthFormatter.dateFormat = DateFormatType.monthYear
            dateFormatter.timeZone = Calendar.current.timeZone
            dateFormatter.locale = Calendar.current.locale
            calendarView?.visibleDates { [unowned self] (visibleDates:DateSegmentInfo) in
                self.setupCalendarView(from: visibleDates)
            }
        }

        func configureCalendar(_ calendar:JTAppleCalendarView) -> ConfigurationParameters {
            dateFormatter.dateFormat = DateFormatType.monthDay
            dateFormatter.timeZone = Calendar.current.timeZone
            dateFormatter.locale = Calendar.current.locale

            if let post = MyObjects.sharedInstance.workingPostViewModel?.post,
                let createdAt = post.createdAt,
                let endDate = Calendar.current.date(byAdding: .year, value: 2, to: createdAt) {
                let parameters = ConfigurationParameters(startDate: createdAt, endDate: endDate, calendar: Calendar.current)
                    return parameters
            } else {
                let parameters = ConfigurationParameters(startDate: Date(), endDate: Date(),calendar: Calendar.current)
                return parameters
            }
        }

        func setInitialPostDatesOnCalendarView() {
            guard let post = MyObjects.sharedInstance.workingPostViewModel?.post,
                let prep = post.prepDate,
                let deliver = post.deliverDate,
                let dateRange = self.calendarView?.generateDateRange(from: prep, to: deliver) else {
                    return
            }
            calendarView?.scrollToDate(deliver, animateScroll:false)
            calendarView?.selectDates(dateRange)
        }

        func setNewSelectedDates(deliverDate:Date) {
            guard let post = MyObjects.sharedInstance.workingPostViewModel?.post else {
                showPopLabel(NewPostError.noPost)
                return
            }
            post.calculateDatesFromDeliver(deliverDate) { (success:Bool, error:Error?) in
                if success == false {
                    self.showPopLabel(error?.localizedDescription ?? PostError.errorCalculatingDates.localizedDescription)
                }
                guard let prep = post.prepDate,
                    let deliver = post.deliverDate,
                    let dateRange = self.calendarView?.generateDateRange(from: prep, to: deliver) else {
                        return
                }
                self.calendarView?.deselectAllDates()
                self.calendarView?.selectDates(dateRange, triggerSelectionDelegate: false)
                self.setPostDatesOnLabels()
            }
        }
    }

DELEGATE
    extension PostSchedulerViewController: JTAppleCalendarViewDelegate {
        func calendar(_ calendar: JTAppleCalendarView, cellForItemAt date:Date, cellState: CellState, indexPath:IndexPath) ->JTAppleCell {
            let cell = calendar.dequeueReusableJTAppleCell(withReuseIdentifier: "DayCell", for: indexPath) as! DayCell
            cell.label.text = cellState.text
            cell.handleSelected(cellState: cellState)
            return cell
        }

        func calendar(_ calendar: JTAppleCalendarView, didScrollToDateSegmentWith visibleDates: DateSegmentInfo) {
            setupCalendarView(from: visibleDates)
        }

        func calendar(_ calendar: JTAppleCalendarView, didSelectDate date: Date, cell: JTAppleCell?, cellState: CellState) {
            updateDatesWithSelected(deliverDate: date, cell:cell, cellState:cellState)
            guard let cell = cell as? DayCell else {return}
            cell.handleSelected(cellState: cellState)
        }

        func calendar(_ calendar: JTAppleCalendarView, didDeselectDate date: Date, cell: JTAppleCell?, cellState: CellState) {
            guard let cell = cell as? DayCell else {return}
            cell.handleSelected(cellState: cellState)
            // TODO: if date == within current selected date range {
            //      update dates with user's tapped deselected date as delivery date
            // }
        }

        func updateDatesWithSelected(deliverDate:Date, cell:JTAppleCell?, cellState:CellState) {
            if cellState.selectedPosition() == .full {
                guard cellState.day != .sunday else {
                    showPopLabel(PostError.deliverDateIsSunday.localizedDescription)
                    setInitialPostDatesOnCalendarView()
                    return
                }
            }
            setNewSelectedDates(deliverDate: deliverDate)
        }

        func calendar(_ calendar: JTAppleCalendarView, willDisplayCell cell: JTAppleCell?, date: Date, cellState: CellState) {
            guard let cell = cell as? DayCell else {return}
             cell.handleSelected(cellState: cellState)
        }

        func calendar(_ calendar: JTAppleCalendarView, shouldSelectDate date: Date, cell: JTAppleCell?, cellState: CellState) -> Bool {
            guard date > Date() else {
                return false
            }
            return true
        }

    }

CELL EXTENSION
    extension DayCell {
        func handleSelected(cellState:CellState) {

            switch cellState.selectedPosition() {
            case .left:
                // Prep Date
                label.textColor = Colors.lightBlue
                label.font = UIFont.systemFont(ofSize: 15, weight: UIFontWeightRegular)
                selectedView.isHidden = true
                travelView.isHidden = false
                travelView.roundLeftCorners(radius: prepView.frame.height/2)
                prepView.setRound()
                prepView.isHidden = false
                return

            case .right, .full:
                // Deliver Date
                selectedView.setRound()
                selectedView.isHidden = false
                label.textColor = UIColor.white
                label.font = UIFont.systemFont(ofSize: 15, weight: UIFontWeightHeavy)
                travelView.isHidden = false
                travelView.roundRightCorners(radius: prepView.frame.height/2)
                prepView.isHidden = true
                return

            case .middle:
                // Travel Time
                selectedView.isHidden = true
                travelView.isHidden = false
                travelView.roundRightCorners(radius: 0)
                label.textColor = UIColor.white
                label.font = UIFont.systemFont(ofSize: 15, weight: UIFontWeightRegular)
                prepView.isHidden = true
                return

            case .none:

                // Other Dates
                selectedView.isHidden = true
                travelView.isHidden = true
                label.textColor = UIColor.black
                label.font = UIFont.systemFont(ofSize: 15, weight: UIFontWeightRegular)
                prepView.isHidden = true

                // Excemption Dates
                if cellState.day == DaysOfWeek.sunday {
                    label.textColor = UIColor.lightGray
                } else if cellState.date < Date() {
                    label.textColor = UIColor.lightGray
                } else if cellState.dateBelongsTo != .thisMonth {
                    label.textColor = UIColor.lightGray
                }
                return
            }
        }
    }

I havent looked at you new question thoroughly yet, but
would it help if you knew when a cell was selected programatically vs userSelected ?
The you might be able to tell when you are doing something vs when a user is doing something?

Yes, the code on master branch has this update.
cellState now has a property which allows you to know if a cell was selected/deselected programitically.
But I am still working on it.
There are some changes on master branch though.
Devs will have to implement the willDisplayCell function.
The willDisplayCell function should have the exact same code as the cellForItem function. The the code is both functions a 99% the same, then devs should avoid code duplication by sharing code in a function.
I did not want devs to implement this function by because synchronization issues due to Apple cell pre-fetching, the apple documents recommended that we implement it.

I just added the pod. Applying changes and testing it soon. I'll surely let you know how it goes soon.

Hey Jay,
The behavior is now much better. Exactly what I needed, plus it was very easy to implement!
🙌👌🤘
All I had to do was add this to didSelect and didDeselect:
    if cellState.selectionType == SelectionType.userInitiated {
        updateDatesWithSelected(deliverDate: date, cell:cell, cellState:cellState)
    }

One thing that did change.
When using a dateRange selected cells now come back with cellState.selectedPosition() == .right with one exception: .left is now .full.
It was not happening before, so I thought it was worth sharing with you as a possible bug or something that needs to be updated in the delegate implementation.
Now I'm wondering if I should:

keep using the dateRange but simplify my views so selectedPosition doesn't matter.
use only one date as cellState.isSelected and handle secondary date comparisons for each cell

ouch. thats a bad issue.
Let me look into that.
@santiagoprieto by the way, here are the changes I was talking about earlier about master branch -> https://github.com/patchthecode/JTAppleCalendar/issues/553

@santiagoprieto if youre still online can you join me here? https://gitter.im/patchthecode/JTAppleCalendar
I do not understand how you got so many right selections.

Hahaha no worries, man. For now I can move forward with this and later improve it.
Let me know if I can do anything to help figure it out!

OK i misunderstood. I thought the screen shot you showed above was  a bug i introduced accidentally. If it is not, then I guess I can close this issue?
But if it is a bug, then once you let me know how you got this, then I will fix it.
cheers man. and thanks 🍻.

Oh! Sorry. I just saw your message about joining you in gitter. I did some extra tests to see what functions were being called to create the array of selected dates and I figured out what was going on. It was something very lame on my side.
When I read the below:

The willDisplayCell function should have the exact same code as the cellForItem function.

I forgot to remove the deque part:
    let cell = calendar.dequeueReusableJTAppleCell(withReuseIdentifier: "DayCell", for: indexPath) as! DayCell

So basically I was dequeuing new cells every time. 😲
Anyway, I thought you'd like to know that now it's working like a charm. It feels soooo good. Thanks for your patience and sorry for freaking you out about a possible bug. Awesome work with these new features!!!
Here's the final code
func calendar(_ calendar: JTAppleCalendarView, didScrollToDateSegmentWith visibleDates: DateSegmentInfo) {
    setupCalendarView(from: visibleDates)
}

func calendar(_ calendar: JTAppleCalendarView, cellForItemAt date:Date, cellState: CellState, indexPath:IndexPath) ->JTAppleCell {
    let cell = calendar.dequeueReusableJTAppleCell(withReuseIdentifier: "DayCell", for: indexPath) as! DayCell
    cell.label.text = cellState.text
    cell.handleSelected(cellState: cellState)
    return cell
}

func calendar(_ calendar: JTAppleCalendarView, willDisplay cell: JTAppleCell, forItemAt date: Date, cellState: CellState, indexPath: IndexPath) {
    guard let cell = cell as? DayCell else {return}
    cell.handleSelected(cellState: cellState)
}

func calendar(_ calendar: JTAppleCalendarView, didSelectDate date: Date, cell: JTAppleCell?, cellState: CellState) {
    if cellState.selectionType == SelectionType.userInitiated {
        updateDatesWithSelected(deliverDate: date, cell: cell, cellState:cellState)
    } else {
        guard let cell = cell as? DayCell else {return}
        cell.handleSelected(cellState: cellState)
    }
}

func calendar(_ calendar: JTAppleCalendarView, didDeselectDate date: Date, cell: JTAppleCell?, cellState: CellState) {
    if cellState.selectionType == SelectionType.userInitiated {
        updateDatesWithSelected(deliverDate: date, cell:cell, cellState:cellState)
    } else {
        guard let cell = cell as? DayCell else {return}
        cell.handleSelected(cellState: cellState)
    }
}

Awesome man. Good stuff.
If you find any new issues, let me know. i'll close this one now. 🍻
I'll keep on testing it, and iff all looks sounds, then i'll release version 7.1.0 soon.


Singleton root view controller instantiated from storyboard

I want to make my root view controller a singleton, but seems like it's impossible, and I can see why. If I declare a scope of the definition as singleton, Typhoon creates controller first, but then storyboard instantiates it once again, and Typhoon doesn't store reference to it as it's already holding singleton reference.
I've been thinking about it for a while, and I can't think of a way to inject root view controller to any component. Do you have any ideas?

Hey @HiveHicks ,
could you create/show example code for this issue?
How do you instantiate root view controller first time? second time?

@mogol, I've created a sample project here: https://bitbucket.org/HiveHicks/typhoonsingletoncontroller
ViewController is defined as TyphoonScopeLazySingleton, however root view controller and view controller which is injected into NavigationManager are different:
2015-09-01 13:49:07.691 TyphoonSingletonController[99950:2732354] Root view controller: <ViewController: 0x7fbc486123f0>
2015-09-01 13:49:07.692 TyphoonSingletonController[99950:2732354] Navigation manager view controller: <ViewController: 0x7fbc48571c10>

@HiveHicks, thanks for sample.
We have a  bug or a feature in instantiating view controllers using storyboards. TyphoonStoryboards always return new instances of view controllers.
WA - try not to use Storyboards with Singleton view controller.
We'll fix soon this.

FYI: yesterday we've encountered the same issue in our project.

I've investigated the problem - and it's a bit deeper than it seems.
We have a bug:

when injecting an instance created outside of Typhoon using inject: method, the singletone scope is overwritten,

and a problem:

ViewControllers, when instantiated via storyboard, are always created outside of Typhoon scope, so we can't use the singletone scope for them.

I see two possible solutions:

We can look for the appropriate ViewController instance in the TyphoonComponentFactory pools by using something like - (id)cachedInstanceForViewController:(UIViewController *)viewController. In the implementation we'll check if this controller is a singletone, if no - then this method will return nil, the controller would be instantiated using [super instantiateViewControllerWithIdentifier:identifier];.
We can explicitly say, that view controllers definitions scopes don't affect direct storyboard instantiation.

@igrekde Hmmm.. I thought we retaining ViewController instances created by storyboard inside Typhoon.
See method, called on each created ViewController:
- (void)inject:(id)instance withDefinition:(TyphoonDefinition *)definition
{
    @synchronized (self) {
        id<TyphoonComponentsPool> pool = [self poolForDefinition:definition];
        [pool setObject:instance forKey:definition.key];
        TyphoonStackElement *element = [TyphoonStackElement elementWithKey:definition.key args:nil];
        [element takeInstance:instance];
        [_stack push:element];
        [self doInjectionEventsOn:instance withDefinition:definition args:nil];
        [_stack pop];
        if ([_stack isEmpty]) {
            [_objectGraphSharedInstances removeAllObjects];
        }
    }
}

Calling this:
[pool setObject:instance forKey:definition.key];

should put instance into correct objects pool..
Is that you looking for?

@alexgarbarev I'm not sure that it's a correct behavior:

We have a definition for MyViewController with the TyphoonSingleton scope. This controller is already injected somewhere.
When we open this controller using a storyboard, a new instance is created:
id viewController = [super instantiateViewControllerWithIdentifier:identifier];
And then, [pool setObject:instance forKey:definition.key]; overrides our previously created singleton, replacing it with a new object.

That's why I'm thinking of a two-step view controller instantiation:

We look for the singleton instance in component pools, and if there is any, we return it.
If there are no singleton instances, we return the original one.

I just checked demo project. The problem is following:

App launched, we injecting ViewController class instance into AppDelegate, retaining into singletons pool
Storyboard instantiate new ViewController instance and replaces ViewController stored in the pool.

I think it's correct behavior since we haven't viewController from storyboard yet, but we need to inject that into AppDelegate.. I can't see any good and consistent way to do that.
If we do two-step viewController instantiation, then it's possible to get different instances for same singleton definition, which looks weird.

I think we should raise an exception, while creating ViewController from storyboard and if we have instance in any singletons pool. Something like "We can't create ViewController from storyboard, since it was already instantiated - please use another definition/scope for that one"

Another possible bug in the Demo project:
- (ViewController *)viewController
{
    return [TyphoonDefinition withClass:[ViewController class] configuration:^(TyphoonDefinition *definition) {
        [definition setScope:TyphoonScopeLazySingleton];
    }];
}

Once ViewController wasn't created by storyboard and stored here, Typhoon will create a 'bare' ViewController without xib counterpart, just alloc-init created object - not good. Maybe we can create something special for storyboards. Maybe another scope.. Or special definition for Storyboard-based viewControllers

Something like
- (UIViewController *)viewController
{
   return [TyphoonDefinition withStoryboardId:@"ViewController" configuration:^(TyphoonDefinition *definition) {
        /// injections
        [definition setScope:TyphoonScopeLazySingleton]; /// <-- this can be default scope for that kind of ViewControllers
    }];
}

Then initialization would be from Storyboard by specified identifier. ViewController would be created by first call and then cached into Singletons (weak or laze) pool.
If ViewController already exists in pool, we can return it from
- (id)instantiateViewControllerWithIdentifier:(NSString *)identifier

method of TyphoonStoryboard
@igrekde What do you think? Make any sense ?

@alexgarbarev that looks great, thanks. Returning the pre-cached instance from - (id)instantiateViewControllerWithIdentifier:(NSString *)identifier is exactly what I meant under two-step instantiation :)
Such definition should use not only view controller identifier, but also storyboard identifier:
- (UIViewController *)viewController
{
   return [TyphoonDefinition withStoryboard:[self myStoryboard] storyboardId:@"ViewController" configuration:^(TyphoonDefinition *definition) {
        /// injections
        [definition setScope:TyphoonScopeLazySingleton]; /// <-- this can be default scope for that kind of ViewControllers
    }];
}

or
- (UIViewController *)viewController
{
   return [TyphoonDefinition withStoryboardName:@"StoryboardName" storyboardId:@"ViewController" configuration:^(TyphoonDefinition *definition) {
        /// injections
        [definition setScope:TyphoonScopeLazySingleton]; /// <-- this can be default scope for that kind of ViewControllers
    }];
}

BTW, currently we use a very same approach, but more verbose:
- (FeedViewController *)viewControllerFeedModule {
    return [TyphoonDefinition withFactory:[self.storyboardAssembly feedStoryboard]
                                 selector:@selector(instantiateViewControllerWithIdentifier:)
                               parameters:^(TyphoonMethod *factoryMethod) {
                                   NSString *identifier = NSStringFromClass([FeedViewController class]);
                                   [factoryMethod injectParameterWith:identifier];
                                } configuration:^(TyphoonFactoryDefinition *definition) {
                                    [definition injectProperty:@selector(output)
                                                          with:[self presenterFeedModule]];
                                }];
}

@igrekde Yes, I see now. The other reason of another kind of definition is: it's more safe, since it guaranteed Storyboard-based ViewController and has identifier for that. Also we could check inside instantiateViewControllerWithIdentifier, that returning instance was created using Storyboard definition.

That's why I'm thinking of a two-step view controller instantiation:

We look for the singleton instance in component pools, and if there is any, we return it.
If there are no singleton instances, we return the original one.

We should put into singletons pool in case 2 (if we have definition with lazy singleton scope).

@alexgarbarev You're right, I forgot to mention this step.
I'll take time to implement this feature in the couple of days.

:+1: Awesome!

Have singleton bug too
// db manager code

- (id)initWithDbName:(NSString *)dbName {
    self = [super init];
    if (self) {
        NSLog(@"INIT WITH %@", dbName);
        [self setupDatabase:dbName];
        NSLog(@"Db %@", self.db);
    }
    return self;
}

// assembly

- (TQDatabaseManager *)dbManager {
    return [TyphoonDefinition withClass:[TQDatabaseManager class] configuration:^(TyphoonDefinition *definition) {
        [definition useInitializer:@selector(initWithDbName:) parameters:^(TyphoonMethod *initializer) {
            [initializer injectParameterWith:TyphoonConfig(@"db.filename")];
        }];
        definition.scope = TyphoonScopeSingleton; // not working =,(

    }];
}

- (TQOfflineViewController *)offlineViewController {
    return [TyphoonDefinition withClass:[TQOfflineViewController class] configuration:^(TyphoonDefinition *definition) {
        [definition injectProperty:@selector(dbManager) with:[_coreComponents dbManager]];
    }];
}

// main
// before this code DBManager already initialized, see log

- (void)offlineTap {
    TQOfflineViewController *controller = [[[TQApplicationAssembly assembly] activate] offlineViewController];

    [self presentViewController:controller animated:YES completion:^{
    }];
}

// log

2015-11-30 17:11:47.968 TQ[1364:800053] INIT WITH db.sqlite
2015-11-30 17:11:48.179 TQ[1364:800053] Db <YapDatabase: 0x145d080c0>
2015-11-30 17:11:55.920 TQ[1364:800053] INIT WITH db.sqlite
2015-11-30 17:11:55.924 TQ[1364:800053] Db (null)

Fixed by #451.


Adding leave and join operations for region screen

🗃 Github Issue Or Explanation for this PR. (What is it supposed to do and Why is needed)
#1618
✅ Checklist

[x] Github issue details are up to date for people to QA.
[x] I have tested all my changes.

🕵♂ Notes for Code Reviewer
Added logic, use cases, mappers and UI for join and leave a region on region main screen.
🙈 Screenshots
https://user-images.githubusercontent.com/42857405/161857320-e30b5da6-c1bf-44b7-a675-509347babce5.mp4
👯♀ Paired with
"nobody"

@gguijarro-c-chwy I need a call to get one region by id in firebase in order to get the url image.

@gguijarro-c-chwy I need a call to get one region by id in firebase in order to get the url image.

Raul the url image is being save on chain.

@gguijarro-c-chwy I need a call to get one region by id in firebase in order to get the url image.

Raul the url image is being save on chain.

As far as the images are in firebase in fact that's how I show them in join regions.
Am I right @gguijarro-c-chwy ?

@gguijarro-c-chwy I need a call to get one region by id in firebase in order to get the url image.

Raul the url image is being save on chain.

As far as I know the images are in firebase in fact that's how I show them in join regions. Am I right @gguijarro-c-chwy ?

Yes we have images in firebase.
Did u create this region @gguij004 ?

@gguijarro-c-chwy I need a call to get one region by id in firebase in order to get the url image.

Raul the url image is being save on chain.

As far as I know the images are in firebase in fact that's how I show them in join regions. Am I right @gguijarro-c-chwy ?

Yes we have images in firebase.
Did u create this region @gguij004 ?

I did


Table not found when TiDB has more than 10,000 tables in a DB

Enhancement
When TiDB has more than 10,000 tables in one Database, TiSpark may throw exceptions like Table not found.
This problem may be because of the large schema, if so, we need to clarify how large the schema will lead to the problem.
Verison
TiDB 5.4
Spark 3.1.3
TiSpark 2.5

I have create 10000 table and try select statement, but there is no exception.
Could you describe you problem in detail, like how many columns each table has and how do you use TiSpark?

It may have something with concurrency.

DDL will be put in a queue to execute one by one in TiDB, so it may not finish all the DDL when we start TiSpark.
TiSpark will load table info into a table cache, which will be updated once the schemaVersion has been changed.

Here come the problems: the first thread loads the cache when the DDL is not finished, and the second thread loads the cache when the DDL is finished. but the first one is slower than the second one, the cache will be the first one finally. schemaVersion will be the second one


Add CNI content for virtualized deployments in Readme

Signed-off-by: Zenghui Shi<EMAIL_ADDRESS>

/cc @martinkennelly @adrianchiris as discussed in biweekly meeting, adding recommended CNI for virtualized environment.


Embed AEExtensionKit into the project

Description
Embed AEExtensionKit into the project
Related Issue
Building issues.
Checklist

[x] I read and understood the contributing guide as well as the code of conduct
[x] My changes generate no new warnings
[x] My code builds and runs on my machine
[x] I documented my code
[ ] Review requested

Screenshots

N/A

Pushing this after tests passes, no review required.


issue about version number

Hey, it seems that the release/tag number is messed up. The lastest one shoule be 0.4.8, but you used 0.11 0.111 0.112 0.113 0.12 0.121 0.122 0.13 0.13.0 0.21, and 0.122 > 0.48, 0.122 is regarded as the latest release/tag. Consider bump version to 1.0?

that’s weird. tag should be 0.4.8 must have been a typo

yeah, I'm trying to create package for ArchLinux automatically, and the package bot check version and found the latest release is 0.121. I have to ignore these version to get the right version.

that’s weird. latest release is 0.4.8. latest tag is also 0.4.8. maybe the pypi version is the one?

I check PyPI release history, https://pypi.org/project/pytorch-lightning/#history, seems all right. I could also check version number from PyPI instead of GitHub repo.

fixed


NestJS PrismaService and Extending it

I am trying to encrypt a particular field in my Prisma model.
Here is the full codes of my PrismaService residing my in NestJS's PrismaModule:
import { Injectable } from '@nestjs/common';
import { PrismaClient } from '@prisma/client'
import { OnModuleDestroy, OnModuleInit } from '@nestjs/common';
import { fieldEncryptionExtension } from 'prisma-field-encryption';

@Injectable()
export class PrismaService extends PrismaClient implements OnModuleDestroy, OnModuleInit {

    constructor() {
        super({
            log: ['query'],
            errorFormat: 'pretty',
        });
        // Extend PrismaClient with fieldEncryptionExtension
        this.$extends(fieldEncryptionExtension()); // extending `PrismaClient`
    }

    async onModuleInit() {
        await this.$connect();
    }

    async onModuleDestroy() {
        await this.$disconnect();
    }
}

On my prisma.schema:
model User {
  telegramId Int    @id @map("telegram_id")
  mnemonics  String @unique @db.VarChar(1024) /// @encrypted

  createdAt DateTime @default(now()) @map("created_at")
  updatedAt DateTime @updatedAt @map("updated_at")
}

Within my database, after using prismaService.user.create, the resulting entry in the PostgreSQL database is NOT encrypted.
import { Injectable } from '@nestjs/common';
import { User as UserModel } from '@prisma/client';
import { PrismaService } from 'src/prisma/services/prisma/prisma.service';
import { Mnemonic } from 'src/common/entities/mnemonic/mnemonic';

@Injectable()
export class AuthService {

    constructor(private readonly prismaSvc: PrismaService) {}

    async signUp(telegramId: number): Promise<Pick<UserModel, "telegramId">> {
        const mnemonic = Mnemonic.createNew()
        const user = await this.prismaSvc.user.create({data: {telegramId: telegramId, mnemonics: mnemonic.toString()}, select: {telegramId: true}});
        return user
    }
}

Any idea how does it work? Thank you.

NestJS uses a class that inherits from the PrismaClient, but applying extensions require to use the return value of $extends(), so applying extensions in the derived class constructor won't work.
There are issues on the Prisma repo about how to deal with Nest and extensions, you should be able to find a solution there.

@franky47 Btw, do you have a quick workaround? Or can you point me more directly to issues that have some quick solutions?

https://nestjs-prisma.dev/docs/prisma-client-extensions/

@franky47 Sir, would it be better practice to have two PrismaService, one specifically for creating records for tables with encrypted column(s) and another for general database operations? I see the link that you shared requires me to purposefully inject the CustomPrismaService whenever I need it.
constructor(
    // ✅ use `extendedPrismaClient` type for correct type-safety of your extended PrismaClient
    @Inject('PrismaService')
    private prismaService: CustomPrismaService<extendedPrismaClient>
  ) {}

That sounds like a recipe for disaster, as a lot can go wrong: overwriting encrypted records with clear-text values (leaking data), or sending ciphertext to the front-end.
The extension makes operations transparent, so inject it to configure your client and you can forget about it being here (albeit losing some features like partial search and sorting on encrypted fields).


Cherrypick a few dash fixes

this PR cherrypick following prs from Superset master:
Dashboard related:
[Dashobard]Fix bad merge (#5624)
set default layout for new added charts (#5425)
Remove dashboard transition related config (#5505)
This feature improves line type for timeshift chart:
Improve time shift (#5140)
@michellethomas @john-bodley @timifasubaa

Codecov Report

Merging #86 into airbnb-master will decrease coverage by 0.02%.
The diff coverage is 37.5%.

@@               Coverage Diff                @@
##           airbnb-master     #86      +/-   ##
================================================
- Coverage          63.23%   63.2%   -0.03%
================================================
  Files                351     351
  Lines              22037   22043       +6
  Branches            2463    2465       +2
================================================
- Hits               13935   13933       -2
- Misses              8090    8098       +8
  Partials              12      12

Impacted Files
Coverage Δ

superset/views/core.py
73.68% <ø> (-0.02%)
:arrow_down:

superset/config.py
92.42% <ø> (-0.23%)
:arrow_down:

...t/assets/src/dashboard/reducers/getInitialState.js
0% <0%> (ø)
:arrow_up:

superset/assets/src/modules/colors.js
77.55% <100%> (+0.46%)
:arrow_up:

superset/assets/src/visualizations/nvd3_vis.js
9.03% <100%> (-0.39%)
:arrow_down:

...t/assets/src/dashboard/util/newComponentFactory.js
100% <100%> (ø)
:arrow_up:

superset/assets/src/utils/common.js
60.52% <100%> (+0.52%)
:arrow_up:

superset/assets/src/dashboard/util/constants.js
100% <100%> (ø)
:arrow_up:

superset/viz.py
80.71% <40%> (-0.09%)
: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 de73024...8dd7184. Read the comment docs.


Design Forgot my password page

Workflow:

User provides an email or phone number
System sends a code to the provided email or an SMS to the provided phone number
User types the code
IF the code is correct, system allows the user to type a new password and its confirmation
System will login the user automatically if the operation was successful

is goint to open for now the link
https://docs.reconness.com/getting-started/installation#login-inside-reconness

is goint to open for now the link
https://docs.reconness.com/getting-started/installation#login-inside-reconness


handle varied search field configurations

This makes the search shortcut functionality a bit nicer for sites that choose to use a persistent / always-visible search field.
it pulls out some of the work from #777, which suffered from scope creep.

the CI failures here are the prerelease problems with mistune, already reported in #805.  Just realized that I forgot to add a special page to the demo docs for testing the persistent search field; will do that now.

This is looking really good to me! I think it is pretty much ready to go
One quick thought - this might be an edge case, but if the user is on mobile and they are on a page with a persistent search bar in the sidebar, and they click the search button, then nothing will happen because the search field will be activated but the sidebar will be hidden already. Maybe that is uncommon-enough that it is not worth special casing though.

That's a very good point. Hopefully it is a rare case and most sites will use the button. But if they don't, this actually feels pretty broken. If like to at least add a warning to the docs about this

OK, here's the rendered docs section with the warning: https://pydata-sphinx-theme--807.org.readthedocs.build/en/807/user_guide/configuring.html#search-bar-search-button
Feel free to push or suggest/commit wording changes if you like


Allow scheduling live videos

Feature Request
Is your feature request related to a problem or unsupported use case? Please describe.
We would like to allow an instructor to schedule a live instead of opening it straightaway.
Describe the solution you'd like
When scheduling a live, the instructor provides a date and time (+ an estimated duration?).
This allows us to display a message and a count down to students visiting the live some time before it starts.
Another feature that this would enable is to ping users by email? +by browser notification? when the live is about to begin. For this, we need to retrieve the list of users in the associated course... requires some more thinking.

Duplicate of https://github.com/openfun/marsha/issues/1024


Implement 3DGS-MCMC in gsplat.

I ported the code from 3dgs-mcmc into gsplat for learning purposes. Is this something you guys would want to integrate? If so, I can clean up the PR more.
Visualization of training from a random initialization and a 1M gaussian cap.
https://github.com/nerfstudio-project/gsplat/assets/6775703/69f49999-8da8-4565-8d2c-e754564346dd
Metrics
Preliminary metrics using the benchmark.sh script. MCMC runs explicitly set the number of splats to be the number 3DGS ends with.

PSNR
3dgs_random
3dgs_sfm
mcmc_random
mcmc_sfm

counter
27.74
28.99
29.05
29.39

kitchen
30.41
31.36
31.54
31.82

bonsai
30.78
32.13
32.28
32.76

room
30.24
31.29
31.85
32.24

Number of GSs
3dgs_random
3dgs_sfm
mcmc_random
mcmc_sfm

counter
1.02M
1.19M
1.19M
1.19M

kitchen
1.33M
1.79M
1.79M
1.79M

bonsai
1.25M
1.22M
1.22M
1.22M

room
1.41M
1.58M
1.58M
1.58M

Wow this is super cool! We would love to have this support.
Actually we are considering of abstracting out the densification strategies from the simple_trainer.py as there is a growing list of papers with different densification strategies including 3DGS-MCMC. But that could be a refactor for me to do later after this PR.
For this PR, considering there are many changes needed to be done in the simple_trainer.py, maybe it makes sense to just create another script, e.g. simple_trainer_mcmc.py, without affecting the original script, which is designed to be matching with the official implementation with the default arguements. I could do the refactor and merging later on.
Also, before this PR get accepted, it would be nice to verify the implementation via reproducing the metrics in the paper, and list of the differences with the original paper if there is any. We have a benchmark.sh script that should be helpful to benchmark the mipnerf360 dataset. (It's fine if you dont have the resources to run all the scenes, but we should at least verify it on one of the captures)

Great! I'll make the simple_trainer_mcmc.py script and do my best to reproduce the metrics in the paper. I don't actually have enough vram to fully train the bicycle scene but I should be able to reproduce some of the smaller scenes.

It would be nice to also have comparisons agains splatfacto and splatfacto-big. splatfacto has AbsGrad, which may resolve at least some of the issues that 3DGS-MCMC tackles.

It would be nice to also have comparisons against splatfacto and splatfacto-big. splatfacto has AbsGrad, which may resolve at least some of the issues that 3DGS-MCMC tackles.

splatfacto is using this repo under the hood, including absgrad. In fact if you run our simple_trainer.py with --absgrad, --grow_grad2d 0.0008 it is exactly the splafacto default behavior.

@jefequien Nice benchmarking! Thanks for doing that! It seems to be working very well! Do you know what is happening with  the stump scene though? That one seems to have a bigger drop.
One thing that I didn't notice before, is that the numbers for 3DGS in the MCMC paper are constantly higher than either the numbers reported in the official paper of 3DGS, or what its code produces (as marked on our eval page). I'm wondering what leads to that, which might also explains the slightly drop on the metrics between the MCMC implementation you have comparing to what's the MCMC paper reported?

Yeah! The overall trend seems correct but I don't know about the discrepancy yet. The paper says they use the same number of Gaussians for both methods for a fair comparison but they never specified what that number is for each scene. Maybe their 3DGS implementation ends with a different number than gsplat?
For the stump scene, I only have a GPU with 8G of VRAM so I can't train 3DGS on the bicycle, garden, or stump scenes. I had arbitrarily set the Gaussian cap to 2M. I'll remove those lines for clarity.

Nope. Thanks for the reviews!

How to use this feature with ns-train splatfacto?

How to use this feature with ns-train splatfacto?

We are doing a code refactoring in nerfstudio to support this.

Can wait before it integrates with ns-train splatfacto
I already test it with my custom dataset. It is significantly increasing the quality

Hello, I find an strange haze with drjohnson dataset. Here is the detailed info.


Work around for name collisions?

Problem statement
If I have two separate structs with the same name but in different packages and they are used inside of other swagger:models the resulting swagger docs seems to cause clashes between the two types and shows properties incorrectly.
Is there a way to change the name that shows up in the generated docs?
Steps to reproduce
Consider the following:
package a

// swagger:model ModelA
type ModelA {
    Foo int
    Bar Baz
}

type Baz {
    A string
}

// ...
package b

// swagger:model ModelB
type ModelB {
    Foo string
    Bar Baz
}

type Baz {
    B int
}

ModelA and ModelB themselves show up just fine but the resulting docs only show 1 Baz (however there are actually 2: a.Baz and b.Baz). Since Baz is inside both ModelA and ModelB it will pick one of the two actual definitions and show that
Environment
swagger version: 0.29.0
go version: 18
OS:   macOS Monterey 12.1

Using swagger:model BazA and swagger:model BazB on the two structs fixes the issue


[BUG] Cookies aren't persistent

Cookies work fine during the lifetime of the app, but when it is closed and restarted all saved cookies are lost.
Can we have persistent cookies please? maybe this will help:
https://stackoverflow.com/questions/39772007/wkwebview-persistent-storage-of-cookies

Sorry stupid of me - was using cookies without expire - so only valid for the browser session. So naturally those weren't saved on app restart. When expire was specified - then all cookies were saved and restored well.


BUGFIX Earley: Now yielding a previously repressed ambiguity

Contains 3 commits:

Test test_multiple_start_solutions, that fails before the fix

Fixes Earley. Previously, slightly different items were considered equal.

A fix to the test_cycle2, which I believe was previously wrong

Issue #1424 was the first lead to finding this bug. But seems that it isn't solved by this change alone.
@chanicpanic Can you please verify my work?

P.S. It's easier to see why there should be ambiguity in test_cycle2, if we rename _recurse to recurse. The second recurse is now taken, and was previously ignored. (i.e. it's a new path, not an extra cycle)

@chanicpanic  Like that?

Yup, looks good

@MegaIng Any comments? Or should I just merge it?

Codecov Report
Attention: Patch coverage is 90.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.54%. Comparing base (1be22db) to head (efeb846).
Report is 8 commits behind head on master.

Files
Patch %
Lines

lark/parsers/earley.py
80.00%
2 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1427      +/-   ##
==========================================
+ Coverage   89.53%   89.54%   +0.01%
==========================================
  Files          52       52
  Lines        7814     7825      +11
==========================================
+ Hits         6996     7007      +11
  Misses        818      818

Flag
Coverage Δ

unittests
89.54% <90.00%> (+0.01%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Thanks @chanicpanic  and @MegaIng  !


Hint not work if put it inside another component.

Hint doesn't work if create a functional component and insert that functional component inside the XYPlot.
Eg:
const Tooltip = ({ value }) => {
  return <Hint
    value={value}
  />
}

class Chart extends React.Component {
  ...
  render() {
     <FlexibleXYPlot>
       {hover && <Tooltip value={hover}/>}
     </FlexibleXYPlot>
  }
}

error mssg:

Hint expects a whole bunch of props which are automatically injected from XYPlot, i bet if you change your tool tip to be

const Tooltip = (props) => {
  return <Hint
   {...props}
    value={value}
  />
}

it might work.

Hint expects a whole bunch of props which are automatically injected from XYPlot, i bet if you change your tool tip to be
const Tooltip = (props) => {
  return <Hint
   {...props}
    value={value}
  />
}

it might work.

It works! Thanks for the quick response.
I am wondering if this is also applicable for all the other element that have to nested inside XYPlot?
Also this is something maybe worth to write into react-vis documentation?
Thanks!

I think this is exactly this issue: #194 I would support a PR that throws a console warn when hint doesn't get what it wants


Minor Fixes to Go Discovery Sample Gen

The HTTP client is renamed from "client" to "httpClient" and
"service" is renamed to "client". Fixes #114.
Remove the comment about oauth2.NoContext. Fixes #112.
Comment that an error should be handled instead of log.Fatal(err).
Fixes #116.

LGTM


Test Scala 2.12.11-bin-e1e2bfe

See scala/scala-dev#676

[info] [error] java.lang.NoSuchMethodException: xsbt.CompilerInterface.newCompiler([Ljava.lang.String;, xsbti.compile.Output, xsbti.Logger, xsbti.Reporter)

Problem?

xsbt.CompilerInterface.newCompiler

That's part of compiler bridge, not the compiler. In the case of https://github.com/sbt/sbt/blob/0b12862caf63d1c23449391be6329d947b474157/sbt/src/sbt-test/dependency-management/compiler-bridge-binary/build.sbt, it's using "compiler-bridge_2.12" % "1.3.0" for 2.12.10. sbt not finding a method in the already-built bridge seems like a wiring issue, rather than something bincompat issue.

Looks like this is mostly good otherwise.


Support Vision Language Model in GenAI-Perf

Does this feature have new documentation or examples?

It needs one doc but I was thinking to add them after adding this to main so that NIM team can just pull main branch to use it.

It needs one doc but I was thinking to add them after adding this to main so that NIM team can just pull main branch to use it.

Thats fine with me. Thanks for being on top of that.


Add zero-shot translation and Fix some translation

@Younglina please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
@microsoft-github-policy-service agree [company="{your company}"]

Options:

(default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.

@microsoft-github-policy-service agree

(when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.

@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@Younglina please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
@microsoft-github-policy-service agree [company="{your company}"]

Options:

(default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.

@microsoft-github-policy-service agree

(when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.

@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

@microsoft-github-policy-service agree
来自 younglina

发件人: microsoft-github-policy-service[bot] @.>
发送时间: 2024年4月25日 14:45
收件人: microsoft/generative-ai-for-beginners @.>
抄送: Younglina @.>; Mention @.>
主题: Re: [microsoft/generative-ai-for-beginners] Add zero-shot translation and Fix some translation (PR #372)
@Younglinahttps://github.com/Younglina please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
@microsoft-github-policy-service agree [company="{your company}"]
Options:

(default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.

@microsoft-github-policy-service agree

(when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.

@microsoft-github-policy-service agree company="Microsoft"
Contributor License Agreement
Contribution License Agreement
This Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
and conveys certain license rights to Microsoft Corporation and its affiliates (“Microsoft”) for Your
contributions to Microsoft open source projects. This Agreement is effective as of the latest signature
date below.

Definitions.
“Code” means the computer software code, whether in human-readable or machine-executable form,
that is delivered by You to Microsoft under this Agreement.
“Project” means any of the projects owned or managed by Microsoft and offered under a license
approved by the Open Source Initiative (www.opensource.orghttp://www.opensource.org).
“Submit” is the act of uploading, submitting, transmitting, or distributing code or other content to any
Project, including but not limited to communication on electronic mailing lists, source code control
systems, and issue tracking systems that are managed by, or on behalf of, the Project for the purpose of
discussing and improving that Project, but excluding communication that is conspicuously marked or
otherwise designated in writing by You as “Not a Submission.”
“Submission” means the Code and any other copyrightable material Submitted by You, including any
associated comments and documentation.
Your Submission. You must agree to the terms of this Agreement before making a Submission to any
Project. This Agreement covers any and all Submissions that You, now or in the future (except as
described in Section 4 below), Submit to any Project.
Originality of Work. You represent that each of Your Submissions is entirely Your original work.
Should You wish to Submit materials that are not Your original work, You may Submit them separately
to the Project if You (a) retain all copyright and license information that was in the materials as You
received them, (b) in the description accompanying Your Submission, include the phrase “Submission
containing materials of a third party:” followed by the names of the third party and any licenses or other
restrictions of which You are aware, and (c) follow any other instructions in the Project’s written
guidelines concerning Submissions.
Your Employer. References to “employer” in this Agreement include Your employer or anyone else
for whom You are acting in making Your Submission, e.g. as a contractor, vendor, or agent. If Your
Submission is made in the course of Your work for an employer or Your employer has intellectual
property rights in Your Submission by contract or applicable law, You must secure permission from Your
employer to make the Submission before signing this Agreement. In that case, the term “You” in this
Agreement will refer to You and the employer collectively. If You change employers in the future and
desire to Submit additional Submissions for the new employer, then You agree to sign a new Agreement
and secure permission from the new employer before Submitting those Submissions.
Licenses.

Copyright License. You grant Microsoft, and those who receive the Submission directly or
indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license in the
Submission to reproduce, prepare derivative works of, publicly display, publicly perform, and distribute
the Submission and such derivative works, and to sublicense any or all of the foregoing rights to third
parties.
Patent License. You grant Microsoft, and those who receive the Submission directly or
indirectly from Microsoft, a perpetual, worldwide, non-exclusive, royalty-free, irrevocable license under
Your patent claims that are necessarily infringed by the Submission or the combination of the
Submission with the Project to which it was Submitted to make, have made, use, offer to sell, sell and
import or otherwise dispose of the Submission alone or with the Project.
Other Rights Reserved. Each party reserves all rights not expressly granted in this Agreement.
No additional licenses or rights whatsoever (including, without limitation, any implied licenses) are
granted by implication, exhaustion, estoppel or otherwise.

Representations and Warranties. You represent that You are legally entitled to grant the above
licenses. You represent that each of Your Submissions is entirely Your original work (except as You may
have disclosed under Section 3). You represent that You have secured permission from Your employer to
make the Submission in cases where Your Submission is made in the course of Your work for Your
employer or Your employer has intellectual property rights in Your Submission by contract or applicable
law. If You are signing this Agreement on behalf of Your employer, You represent and warrant that You
have the necessary authority to bind the listed employer to the obligations contained in this Agreement.
You are not expected to provide support for Your Submission, unless You choose to do so. UNLESS
REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING, AND EXCEPT FOR THE WARRANTIES
EXPRESSLY STATED IN SECTIONS 3, 4, AND 6, THE SUBMISSION PROVIDED UNDER THIS AGREEMENT IS
PROVIDED WITHOUT WARRANTY OF ANY KIND, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY OF
NONINFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
Notice to Microsoft. You agree to notify Microsoft in writing of any facts or circumstances of which
You later become aware that would make Your representations in this Agreement inaccurate in any
respect.
Information about Submissions. You agree that contributions to Projects and information about
contributions may be maintained indefinitely and disclosed publicly, including Your name and other
information that You submit with Your Submission.
Governing Law/Jurisdiction. This Agreement is governed by the laws of the State of Washington, and
the parties consent to exclusive jurisdiction and venue in the federal courts sitting in King County,
Washington, unless no federal subject matter jurisdiction exists, in which case the parties consent to
exclusive jurisdiction and venue in the Superior Court of King County, Washington. The parties waive all
defenses of lack of personal jurisdiction and forum non-conveniens.
Entire Agreement/Assignment. This Agreement is the entire agreement between the parties, and
supersedes any and all prior agreements, understandings or communications, written or oral, between
the parties relating to the subject matter hereof. This Agreement may be assigned by Microsoft.

―
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/generative-ai-for-beginners/pull/372#issuecomment-2076483141, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AD42QXFEXBDWG3N37ZPSTZLY7CRAJAVCNFSM6AAAAABGYHVYG2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANZWGQ4DGMJUGE.
You are receiving this because you were mentioned.Message ID: @.***>


it's necessary to give an Interface to control the timeout of JS-bundle loading

sometimes,when a problem occur ，the RN-app is stay loading more than severial  minutes as far as screenlock-key pressed( menukey , backkey ,Homekey of hardware both doesn't work  at the time)

Related to this https://github.com/facebook/react-native/issues/3180

@satya164  tks


Problem with MIUI's night mode

Issue Summary
By activating the night mode in MIUI 12.5.4, the display of PDFs is compromised by black squares that compromise reading.
Steps to Reproduce the Problem
Simply by activating the night mode from the MIUI menu and opening a PDF in the app.
Specifications

App Version: 3.7
Android Version: 11 RKQ1.200826.002
MIUI Version: MIUI Global <IP_ADDRESS> Stable

Hi!!
I've exactly the same issue on my POCO F2 Pro.
Specifications:
App Version: 3.7
Android Version: 11
MIUI Version: MIUI Global <IP_ADDRESS> Stable (V<IP_ADDRESS>.RJKEUXM)

I think that this is rather a MIUI problem than the app's fault.
Apparently, MIUI tries to provide a dark mode even for apps that don't offer it. Sometimes, this feature conflicts with apps that do support a dark mode like this PDF viewer. You can disable the MIUI dark mode for single apps as described here: https://www.xiaomist.com/2021/10/disarmed-how-to-disable-dark-mode-in.html?m=1


how to calc the digest of "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" ?

What's the meaning of in[0] = 0x80 and in[60]=0x18 ?
in[0] = 0x80;
in[1] = 0x64;
in[2] = 0x63;
in[3] = 0x62;
in[4] = 0x61;
in[60] = 0x18;

I've got the answer from the sha256 code

the digest of "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" is  248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1, but the output of this lib is 85e655d6417a17953363376a624cde5c76e09589cac5f811cc4b32c1f20e533a.
However, the digest of abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnop is correct, there should be some wrong in lib


Update YellowPaper

Correction link on WP and minor inaccuracies (commas, etc.); update the link to the actual WP in International YellowPaper.
Upd. I apologize, I couldn't figure out if the document needed a link to the actual WP or if you wanted to leave a link to the original document from the "SmartAgentProtocol" repository. If this is the case, please close my request.

Conflict in Yellow Paper Ukrainian. Please review.

Conflicts with the Ukrainian paper.

Lot of conflicts. Likely due to over Pull Requests by Anton to update these.

Ok, most of my commits got in conflict due to file location change, will have to do it all over again.


Support subject-digest with multiple entries (comma separator or line separator)

I want to generate the build provenance for a multi-arch container image. Rather than using the docker build GitHub action in conjunction with the metadata-action, I use goreleaser.
Unfortunately, I cannot pass a multiline subject-digest but must run the same step as many container images are created.
For instance:

    - name: generate build provenance (binaries)
      uses: github-early-access/generate-build-provenance@main
      with:
        subject-path: "${{ github.workspace }}/tools/my-cli/dist/*.*"

    - name: container image digest
      id: image
      run: |
        set -euo pipefail
        # Gather the container image generated with goreleaser
        image=$(jq -r '.[] | select (.type=="Docker Image") | .path' tools/my-cli/dist/artifacts.json | cut -d':' -f1 | uniq )
        # Fetch the digest for the container image (amd64 and arm64)
        digest_1=$(docker images --format "{{.Digest}}" --no-trunc $image | sed -n 1p)
        digest_2=$(docker images --format "{{.Digest}}" --no-trunc $image | sed -n 2p)
        echo "name=$image" >> "$GITHUB_OUTPUT"
        echo "digest_1=$digest_1" >> "$GITHUB_OUTPUT"
        echo "digest_2=$digest_2" >> "$GITHUB_OUTPUT"

    - name: generate build provenance (containers ARM64)
      uses: github-early-access/generate-build-provenance@main
      with:
        subject-name: ${{ steps.image.outputs.name }}
        subject-digest: ${{ steps.image.outputs.digest_1 }}

    - name: generate build provenance (containers AMD64)
      uses: github-early-access/generate-build-provenance@main
      with:
        subject-name: ${{ steps.image.outputs.name }}
        subject-digest: ${{ steps.image.outputs.digest_2 }}

While I'd like to do something like:

    - name: generate build provenance (binaries)
      uses: github-early-access/generate-build-provenance@main
      with:
        subject-path: "${{ github.workspace }}/tools/my-cli/dist/*.*"

    - name: container image digest
      id: image
      run: |
        set -euo pipefail
        # Gather the container image generated with goreleaser
        image=$(jq -r '.[] | select (.type=="Docker Image") | .path' tools/my-cli/dist/artifacts.json | cut -d':' -f1 | uniq )
        # Fetch the digest for the container image (amd64 and arm64)
        digests=$(docker images --format "{{.Digest}}" --no-trunc $image)
        echo "name=$image" >> "$GITHUB_OUTPUT"
        echo "digests=$digests" >> "$GITHUB_OUTPUT"

    - name: generate build provenance (containers)
      uses: github-early-access/generate-build-provenance@main
      with:
        subject-name: ${{ steps.image.outputs.name }}
        subject-digests: ${{ steps.image.outputs.digests }}

if subject-digests could be a new input, or subject-digest could support a multiline value.

For this use case, would it make sense to generate the provenance attestation for the multi-arch image itself instead of the arch-specific images individually?
The multi-arch image typically has its own digest that points to an index manifest with references to all of the arch-specific variants.

For this use case, would it make sense to generate the provenance attestation for the multi-arch image itself instead of the arch-specific images individually?

That's a possibility, but I somehow think providing a multiple-entry approach could fit some other cases where using a multi-arch image is not needed.


TOC in sidebar does not preserve markup/styling of heading

Astro Info
Astro                    v4.16.7
Node                     v20.17.0
System                   Linux (x64)
Package Manager          pnpm
Output                   static
Adapter                  none
Integrations             @astrojs/starlight

If this issue only occurs in one browser, which browser is a problem?
No response
Describe the Bug
When using markup like ~foo~, _foo_, **foo**, `foo` in the heading these are not preserved in the sidebar.

What's the expected result?
The styling of the headings should be preserved in the sidebar.
Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-mpkxlz-kud7v5?file=src%2Fcontent%2Fdocs%2Fguides%2Fexample.md
Participation

[X] I am willing to submit a pull request for this issue.

Thanks for the issue @septatrix!
This behaviour is expected. Starlight depends on Astro’s headings feature which extracts only the plain text values of headings, not also any HTML markup, so Starlight can’t really support this.
I think it would also be hard to support fully even if this wasn’t the case. It seems OK in this limited subset of examples, but supporting all HTML in the table of contents (which is supposed to be a quick guide to page content), feels very likely to break (e.g. what if you had a word with styles? Do those styles now also apply in the TOC?)

Thanks for the issue @septatrix!
This behaviour is expected. Starlight depends on Astro’s headings feature which extracts only the plain text values of headings, not also any HTML markup, so Starlight can’t really support this.

Yeah that's why I opened this originally in the Astro repo. If I understand correctly it's this code: https://github.com/withastro/astro/blob/feb87c21be37e508ec8b23cfbb47056fd0971dfc/packages/markdown/remark/src/rehype-collect-headings.ts#L13

I think it would also be hard to support fully even if this wasn’t the case. It seems OK in this limited subset of examples, but supporting all HTML in the table of contents (which is supposed to be a quick guide to page content), feels very likely to break (e.g. what if you had a word with styles? Do those styles now also apply in the TOC?)

That is true and I specifically selected those example as they seem reasonable and can be easily used within markdown. One suggestion would be to expand getHeadings() to return not only text but also html or markdown (not sure if child.value is rendered HTML at that stage or still markdown). This way users who like the additional capabilities can use them while everyone else retains the text-only headings.

One suggestion would be to expand getHeadings() to return not only text but also html or markdown (not sure if child.value is rendered HTML at that stage or still markdown).

Yeah that could be an option. You could open a roadmap discussion if you like: https://github.com/withastro/roadmap/discussions/
That would allow other users to upvote and provide feedback on the idea and help us understand if it’s a common need.

One suggestion would be to expand getHeadings() to return not only text but also html or markdown (not sure if child.value is rendered HTML at that stage or still markdown).

Yeah that could be an option. You could open a roadmap discussion if you like: https://github.com/withastro/roadmap/discussions/

Thanks for the hint. I opened https://github.com/withastro/roadmap/discussions/1060 now


Added cookiecutter for C# project containing Objective-C static library binding

Hi, let me know if you see any issues with my adding this cookiecutter project.

Current coverage is 95.32%

Merging #460 into master will change coverage by -0.23% by 92dbc1e

Coverage Diff
@@            master    #460   diff @@
======================================
  Files           12      12
  Stmts          449     449
  Branches         0       0
  Methods          0       0
======================================
- Hit            429     428     -1
  Partial          0       0
- Missed          20      21     +1

Uncovered Suggestions

+0.89% via cookiecutter/vcs.py#59...62
+0.67% via ...okiecutter/compat.py#78...80
+0.67% via ...okiecutter/compat.py#69...71
See 7 more...

Powered by Codecov


dbeaver/dbeaver#21522 Message bar content improved, added logic to hide/show panel.

Message bar content improved, added logic to hide/show panel.

Show panel when limit reached

Hide for all other cases

Verified


Data references are too old

The statistics quoted on this page from 2018 should be updated to reflect more recent statistics.  Here's a more recent source, https://www.microsoft.com/security/blog/2022/02/03/cyber-signals-defending-against-cyber-threats-with-the-latest-research-insights-and-trends/   but there are others.  I think the numbers quoted in Signals should be good enough to replace the 2018 numbers quoted in this page.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: c2e83171-fd05-9fe1-3ba7-0fb20161ee63
Version Independent ID: 2e6b2451-5ff8-a277-90ea-49aa70957977
Content: What is Azure Active Directory Identity Protection?
Content Source: articles/active-directory/identity-protection/overview-identity-protection.md
Service: active-directory
Sub-service: identity-protection
GitHub Login: @MicrosoftGuyJFlo
Microsoft Alias: joflore

@ms-mjkatz where is this available? Need a page I can link to that is not hardcoded in English.


Filter pane breaks when window size changes

A window size increase (or zoom out) or decrease
(change in psgeoSmallDisplayMode)
can render some checkboxes inoperational.
This is a problem because we need to have one control in two different places.

Solved by making changes in the resize event listener set in psgeoFinishLoading.
document.getElementById() and element.insertBefore() were used.
Also in frequent use: style.display=block|float|none


Add build-tools orb to debug memory usage

Towards https://github.com/giantswarm/giantswarm/issues/9520

Stale.


Add touch selection support

This script enhances the Monaco Editor by adding touch support, enabling seamless touch-based text selection. It is one of the first touch handlers designed specifically for Monaco, making it more versatile and user-friendly on mobile devices.

@microsoft-github-policy-service agree company="ONVO"


bb.js-dev script was not working

This is a retroactive issue. The PR has been made here
Problem
As a part of #1640 , the bb.js-dev script was removed because it was not running tests, instead it was printing out the nodemon version.
To reproduce, one can build the repository before that PR.
Solution
The solution was to remove the script and instead run dest/node/main.js directly to use the bb.js binary

pinging @jonybur for visibility

Closing as this was noted to be okay


What is the last 468 float4 in the RefinedFaceVertexBuffer Data?

Hi keijiro,
Thank you for the amazing tool!
Today I try to grab the faceLandmarks data in the FacePipeline from c# script, and it works well.
And inside the _pipeline.RefinedFaceVertexBuffer, there are total 936 float4,
which the first 468 are faceLandmarks for the faceMesh, and there are another 468 float4 I couldn't figure out what they are.

They seems to have a face shape, but only have values when I move. Are they something like motion vectors?
Just curious, and thank you for the time!

They're delta values for the low-pass filter.
https://github.com/keijiro/FaceMeshBarracuda/blob/cf6199d2b07555d9e4554ed4d4b097b25082f314/Assets/FaceMesh/Shader/Postprocess.compute#L108

@keijiro thank you for the quick answer!!


Assignment 5

Two users should be able to specify the difficulty level of the question they want to work on.
 You can also consider including the question category as a criterion for matching in
addition to the difficulty.
 Note: You can consider integrating with the user profile management application
developed in Assignment 2 OR create a separate set of users to demonstrate this
application.
 Each user can wait a fixed amount of time (say 30 seconds) to find a match.
 Provide some form of feedback to the user using the fronted code (e.g., animation to indicate
the user to wait until match is obtained)
 You can handle the scenario where no match is found in various ways (e.g., retry matching,
cancel the matching attempt with an error, etc.,)
 You will typically use some form of queuing mechanism to achieve the matching.
 You are required to containerize this application like the previous ones.


[QUESTION] Executables connect strange IPs

$ python -m nuitka --remove-output --mingw64 --standalone --onefile yy.py If I use mingw64 flag I always get this error in logs
Nuitka-Scons: Mismatch between Python binary ('C:\sss\aaa\venv\Scripts\python.exe' -> 'pei-x86-64') and C compiler ('C:\MinGW\bin\gcc.exe' -> 'pei-i386') arches, that
Nuitka-Scons: compiler is ignored!

I noticed that after that VirusTotal always finds that Executable tries to connect various strange IPs even if it is Hello World like program.
I googled the problem and found this thread https://github.com/pyinstaller/pyinstaller/issues/8323 and seems like people notice same with Pyinstaller.
Accoring that discussion I guess when Nuitka fails to use my minGW compiler it uses VSCode compiler that sews in various IPs that send various data to Microsoft when an Executable gets runned.
If I don't use --mingw64 in nuitka command then in same program VT doesn't say that the program connects to any IPs as it should be.
Thus. I have questions:

Why Nuitka fails to use my GCC ?
If it doesnt use my GCC then what does Nuitka use ?

You might want to ask VirusTotal or Microsoft about why they connect to IPs. I reckon, it's to verify signature validity or malware catalogs before exiting a binary.
Your observations generally are wrong, I think.

I am considering the error output to be pretty self explanatory, you seem to think the issue tracker is for asking unrelated or unclear things, I do not.


Parse/compilation errors can cause Elvish to hang

At this point I've tested just put and re: functions , the sequence in question is "(\."
~> re:find "aaaaa.a" "(\.)"
Parse error: invalid escape sequence
  [interactive], line 1:
    re:find "aaaaa.a" "(\.)"

~# put "(\.)"
Parse error: invalid escape sequence
  [interactive], line 1:
    put "(\.)"

After entering one of these the client seems to become unresponsive . The problem seems to be with the parser .
Update : The root cause is in the doubleQuoted function of the parser and it has to do with the . character .
Update 2 : Also tested on the phone , was able to pin it to something introduced in the last 88 commits as I was using an outdated version and it wasn't replicating before updating the local repo and rebuilding .

The following showed all command and their output since elvish was started to it hanged.
[bnw@bnw-mbp u-root]$ elvish
74487
~/project/go/src/github.com/u-root/u-root> echo $GOPATH
Compilation error: variable $GOPATH not found
[interactive], line 1:
echo $GOPATH
~/project/go/src/github.com/u-root/u-root> ls -l $GOPATH/bin/elvish
Compilation error: variable $GOPATH not found
[interactive], line 1:
ls -l $GOPATH/bin/elvish
~/project/go/src/github.com/u-root/u-root> goroutine 21 [running]<EMAIL_ADDRESS>github.com/elves/elvish/sys.DumpStack(0xc42001b5c0, 0xc42012e4e0)
/Users/bnw/project/go/src/github.com/elves/elvish/sys/dumpstack.go:10 +0xa2
github.com/elves/elvish/program/shell.handleSignal(0x1789440, 0xc4203546d0)
/Users/bnw/project/go/src/github.com/elves/elvish/program/shell/sys_unix.go:19 +0x7b
github.com/elves/elvish/program/shell.handleSignals.func1(0xc4201620c0)
/Users/bnw/project/go/src/github.com/elves/elvish/program/shell/shell.go:210 +0xc7
created by github.com/elves/elvish/program/shell.handleSignals
/Users/bnw/project/go/src/github.com/elves/elvish/program/shell/shell.go:207 +0x8a
goroutine 1 [select]:
github.com/elves/elvish/edit.(*Editor).ReadLine(0xc4201758c0, 0x0, 0x0, 0x0, 0x0)
/Users/bnw/project/go/src/github.com/elves/elvish/edit/editor.go:361 +0x5b0
github.com/elves/elvish/program/shell.interact.func1(0xc42015c7e0, 0x151da4a, 0xd, 0xc42041e300)
/Users/bnw/project/go/src/github.com/elves/elvish/program/shell/shell.go:160 +0x2f
github.com/elves/elvish/program/shell.interact(0xc42015c7e0)
/Users/bnw/project/go/src/github.com/elves/elvish/program/shell/shell.go:171 +0x207
github.com/elves/elvish/program/shell.(*Shell).Main(0xc42013cc80, 0xc420010180, 0x0, 0x0, 0x0)
/Users/bnw/project/go/src/github.com/elves/elvish/program/shell/shell.go:62 +0x209
github.com/elves/elvish/program.Main(0xc420010180, 0x1, 0x1, 0x0)
/Users/bnw/project/go/src/github.com/elves/elvish/program/program.go:118 +0x18a
main.main()
/Users/bnw/project/go/src/github.com/elves/elvish/main.go:12 +0x45
goroutine 5 [syscall]:
os/signal.signal_recv(0x1789440)
/usr/local/Cellar/go/1.9.2/libexec/src/runtime/sigqueue.go:131 +0xa7
os/signal.loop()
/usr/local/Cellar/go/1.9.2/libexec/src/os/signal/signal_unix.go:22 +0x22
created by os/signal.init.0
/usr/local/Cellar/go/1.9.2/libexec/src/os/signal/signal_unix.go:28 +0x41
goroutine 18 [chan receive]:
github.com/elves/elvish/eval.init.9.func1()
/Users/bnw/project/go/src/github.com/elves/elvish/eval/port.go:56 +0x67
created by github.com/elves/elvish/eval.init.9
/Users/bnw/project/go/src/github.com/elves/elvish/eval/port.go:55 +0x49
goroutine 19 [IO wait]:
internal/poll.runtime_pollWait(0x1d04f00, 0x72, 0x0)
/usr/local/Cellar/go/1.9.2/libexec/src/runtime/netpoll.go:173 +0x57
internal/poll.(*pollDesc).wait(0xc42013e218, 0x72, 0xffffffffffffff00, 0x1786d80, 0x1782590)
/usr/local/Cellar/go/1.9.2/libexec/src/internal/poll/fd_poll_runtime.go:85 +0xae
internal/poll.(*pollDesc).waitRead(0xc42013e218, 0xc4201ab000, 0x1000, 0x1000)
/usr/local/Cellar/go/1.9.2/libexec/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc42013e200, 0xc4201ab000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.9.2/libexec/src/internal/poll/fd_unix.go:126 +0x18a
net.(*netFD).Read(0xc42013e200, 0xc4201ab000, 0x1000, 0x1000, 0x150d140, 0x1447b60, 0x1447b60)
/usr/local/Cellar/go/1.9.2/libexec/src/net/fd_unix.go:202 +0x52
net.(*conn).Read(0xc420134078, 0xc4201ab000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.9.2/libexec/src/net/net.go:176 +0x6d
bufio.(*Reader).Read(0xc42015a120, 0xc42013a790, 0x1, 0x9, 0xc420049ca8, 0x102b358, 0x153a430)
/usr/local/Cellar/go/1.9.2/libexec/src/bufio/bufio.go:213 +0x30b
io.ReadAtLeast(0x1783cc0, 0xc42015a120, 0xc42013a790, 0x1, 0x9, 0x1, 0xc420021300, 0xc420413b00, 0x182)
/usr/local/Cellar/go/1.9.2/libexec/src/io/io.go:309 +0x86
io.ReadFull(0x1783cc0, 0xc42015a120, 0xc42013a790, 0x1, 0x9, 0xc420049d10, 0x100612b, 0x3)
/usr/local/Cellar/go/1.9.2/libexec/src/io/io.go:327 +0x58
encoding/gob.decodeUintReader(0x1783cc0, 0xc42015a120, 0xc42013a790, 0x9, 0x9, 0xc420049d88, 0x102ac99, 0xc400000008, 0xc420058080)
/usr/local/Cellar/go/1.9.2/libexec/src/encoding/gob/decode.go:120 +0x63
encoding/gob.(*Decoder).recvMessage(0xc42013e400, 0xc420049da0)
/usr/local/Cellar/go/1.9.2/libexec/src/encoding/gob/decoder.go:80 +0x57
encoding/gob.(*Decoder).decodeTypeSequence(0xc42013e400, 0x153bd00, 0xc42013e400)
/usr/local/Cellar/go/1.9.2/libexec/src/encoding/gob/decoder.go:144 +0x14c
encoding/gob.(*Decoder).DecodeValue(0xc42013e400, 0x144eea0, 0xc420142030, 0x16, 0x0, 0x0)
/usr/local/Cellar/go/1.9.2/libexec/src/encoding/gob/decoder.go:212 +0xe6
encoding/gob.(*Decoder).Decode(0xc42013e400, 0x144eea0, 0xc420142030, 0x0, 0x0)
/usr/local/Cellar/go/1.9.2/libexec/src/encoding/gob/decoder.go:189 +0x16d
net/rpc.(*gobClientCodec).ReadResponseHeader(0xc4201313e0, 0xc420142030, 0xc420413b00, 0x0)
/usr/local/Cellar/go/1.9.2/libexec/src/net/rpc/client.go:223 +0x45
net/rpc.(*Client).input(0xc42015a1e0)
/usr/local/Cellar/go/1.9.2/libexec/src/net/rpc/client.go:109 +0xb5
created by net/rpc.NewClientWithCodec
/usr/local/Cellar/go/1.9.2/libexec/src/net/rpc/client.go:201 +0xc5
goroutine 20 [select, locked to thread]:
runtime.gopark(0x153bc90, 0x0, 0x151956c, 0x6, 0x18, 0x1)
/usr/local/Cellar/go/1.9.2/libexec/src/runtime/proc.go:287 +0x12c
runtime.selectgo(0xc420027750, 0xc420162180)
/usr/local/Cellar/go/1.9.2/libexec/src/runtime/select.go:395 +0x1149
runtime.ensureSigM.func1()
/usr/local/Cellar/go/1.9.2/libexec/src/runtime/signal_unix.go:511 +0x1fe
runtime.goexit()
/usr/local/Cellar/go/1.9.2/libexec/src/runtime/asm_amd64.s:2337 +0x1
goroutine 22 [IO wait]:
internal/poll.runtime_pollWait(0x1d04cc0, 0x72, 0x1)
/usr/local/Cellar/go/1.9.2/libexec/src/runtime/netpoll.go:173 +0x57
internal/poll.(*pollDesc).wait(0xc42012e978, 0x72, 0xffffffffffffff01, 0x1786d80, 0x1782590)
/usr/local/Cellar/go/1.9.2/libexec/src/internal/poll/fd_poll_runtime.go:85 +0xae
internal/poll.(*pollDesc).waitRead(0xc42012e978, 0xc4201cc001, 0x1000, 0x1000)
/usr/local/Cellar/go/1.9.2/libexec/src/internal/poll/fd_poll_runtime.go:90 +0x3d
internal/poll.(*FD).Read(0xc42012e960, 0xc4201cc000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.9.2/libexec/src/internal/poll/fd_unix.go:126 +0x18a
os.(*File).read(0xc4201342b8, 0xc4201cc000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.9.2/libexec/src/os/file_unix.go:216 +0x4e
os.(*File).Read(0xc4201342b8, 0xc4201cc000, 0x1000, 0x1000, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.9.2/libexec/src/os/file.go:103 +0x6d
bufio.(*Reader).fill(0xc42003df58)
/usr/local/Cellar/go/1.9.2/libexec/src/bufio/bufio.go:97 +0x11a
bufio.(*Reader).ReadSlice(0xc42003df58, 0xc42002850a, 0x1012566, 0x1d01c80, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.9.2/libexec/src/bufio/bufio.go:338 +0x2c
bufio.(*Reader).ReadBytes(0xc42003df58, 0xa, 0x0, 0xc420028680, 0x1044587, 0x1000, 0x1462c60)
/usr/local/Cellar/go/1.9.2/libexec/src/bufio/bufio.go:416 +0x6b
bufio.(*Reader).ReadString(0xc420028758, 0x100a, 0x1000, 0xc4201cc000, 0x1000, 0x1000)
/usr/local/Cellar/go/1.9.2/libexec/src/bufio/bufio.go:456 +0x38
github.com/elves/elvish/edit.NewEditor.func1(0xc4201342b8, 0x0, 0x0, 0xc4201758c0)
/Users/bnw/project/go/src/github.com/elves/elvish/edit/editor.go:119 +0x1d6
created by github.com/elves/elvish/edit.NewEditor
/Users/bnw/project/go/src/github.com/elves/elvish/edit/editor.go:116 +0x2ef
goroutine 23 [chan receive]:
github.com/elves/elvish/edit.NewEditor.func2(0xc4201623c0, 0xc4201758c0)
/Users/bnw/project/go/src/github.com/elves/elvish/edit/editor.go:131 +0x118
created by github.com/elves/elvish/edit.NewEditor
/Users/bnw/project/go/src/github.com/elves/elvish/edit/editor.go:130 +0x31b
goroutine 232 [syscall]:
syscall.Syscall6(0x5d, 0x7, 0xc420278600, 0x0, 0x0, 0x0, 0x0, 0x0, 0xc420060d01, 0xc42003fd00)
/usr/local/Cellar/go/1.9.2/libexec/src/syscall/asm_darwin_amd64.s:41 +0x5
syscall.Select(0x7, 0xc420278600, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.9.2/libexec/src/syscall/zsyscall_darwin_amd64.go:1048 +0xa3
github.com/elves/elvish/sys.Select(0x7, 0xc420278600, 0x0, 0x0, 0x0, 0xc42000e010, 0xc42003fea7)
/Users/bnw/project/go/src/github.com/elves/elvish/sys/select_bsd.go:8 +0x53
github.com/elves/elvish/sys.WaitForRead(0xc42003fee8, 0x2, 0x2, 0x0, 0x1, 0x0, 0x0, 0x0)
/Users/bnw/project/go/src/github.com/elves/elvish/sys/waitforread_unix.go:23 +0x13f
github.com/elves/elvish/edit/tty.(*runeReader).run(0xc42013d440)
/Users/bnw/project/go/src/github.com/elves/elvish/edit/tty/rune_reader_unix.go:67 +0x91
created by github.com/elves/elvish/edit/tty.(*runeReader).Start
/Users/bnw/project/go/src/github.com/elves/elvish/edit/tty/rune_reader_unix.go:58 +0x3f

This bug was introduced in 0f7f29a51dd2e4b6b47745fd078084be2771f7dc.


Support multiline values

Is there a way to store multiline values in the config?
Like, maybe, this:
key = """
    value
    value
    value
"""

or this:
key:
    value
    value
    value

Sorry for late response, this will be supported in incoming version.

Yet again, sorry for delay :worried::. Added in 2.0.0-rc.