The height of CupertinoTextField will reduce on editing when the placeholder is not in English

I set the placeholder to non-English words  when using CupertinoTextField, then I found that the height of the widget will reduce on editing.

I have tried four languages, and here is my test code:
class Filter extends StatefulWidget {
  @override
  _FilterState createState() => _FilterState();
}

class _FilterState extends State<Filter> {
  Map languages = {
    'English': 'test',
    'Chinese': '测试',
    'Japanese': 'テスト',
    'Korean': '테스트',
    'Arabic': 'اختبر',
  };

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        leading: CupertinoNavigationBarBackButton(),
        title: Text('CupertinoTextField Test'),
        centerTitle: true,
      ),
      backgroundColor: Colors.white,
      body: Container(
        padding: EdgeInsets.all(8.0),
        child: Center(
          child: CupertinoTextField(
            placeholder: 'Flutter ${languages['Chinese']}',
            decoration: BoxDecoration(border: Border.all(color: Colors.red)),
          ),
        ),
      ),
    );
  }
}

Did I do anything wrong?

CC @GaryQian Is this related to any of the text stuff you've been doing off the top of your head?  Or maybe just a simpler problem with CupertinoTextField.

So when I implemented strut, I added a system to force line heights to strut height. It may not be doing so for placeholders yet.

I fond a workaround for this issue by adding a strut style to the CupertinoTextField with a bigger litter font size.
CupertinoTextField(
strutStyle: StrutStyle(fontSize: 20),
placeholder: "联系名字",
)

CupertinoTextField dosen't have structStyle property, how did you do that? @ehuoyun

strutStyle isn't in the main release channel yet, but it's in master https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/cupertino/text_field.dart#L168

Got it, thanks @justinmc

Issue still exist on when using non-English text
flutter doctor -v
[✓] Flutter (Channel dev, v1.16.2, on Mac OS X 10.15.4 19E266, locale en-GB)
    • Flutter version 1.16.2 at /Users/taha/Code/flutter_dev
    • Framework revision 58cad787d8 (4 days ago), 2020-03-23 08:33:41 -0700
    • Engine revision 2d42c74a34
    • Dart version 2.8.0 (build 2.8.0-dev.16.0 ba8baa46b4)

[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /Users/taha/Code/sdk
    • Android NDK location not configured (optional; useful for native profiling
      support)
    • Platform android-29, build-tools 29.0.3
    • ANDROID_HOME = /Users/taha/Code/sdk
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 11.4, Build version 11E146
    • CocoaPods version 1.9.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 3.6)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 44.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build
      1.8.0_212-release-1586-b4-5784211)

[✓] VS Code (version 1.43.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.8.1

[✓] Connected device (4 available)
    • Taha’s iPhone • 00008020-001059882212002E • ios            • iOS 13.4
    • macOS         • macOS                     • darwin-x64     • Mac OS X
      10.15.4 19E266
    • Chrome        • chrome                    • web-javascript • Google Chrome
      80.0.3987.149
    • Web Server    • web-server                • web-javascript • Flutter Tools

• No issues found!

my solution is to give a height to the text style to fix the height of the text field.
CupertinoTextField(     style: TextStyle(         height: 1.4,     ), ),

Here's a version of @MeFelixWang's sample code that better demonstrates the issue:
import 'package:flutter/material.dart';
import 'package:flutter/cupertino.dart';

enum DisplayLanguage { english, chinese, japanese, korean, arabic }

extension DisplayLanguagesExt on DisplayLanguage {
  String get text {
    switch (this) {
      case DisplayLanguage.arabic:
        return 'Arabic';
      case DisplayLanguage.chinese:
        return 'Chinese';
      case DisplayLanguage.english:
        return 'English';
      case DisplayLanguage.japanese:
        return 'Japanese';
      case DisplayLanguage.korean:
        return 'Korean';
    }
  }

  String get displayText {
    switch (this) {
      case DisplayLanguage.arabic:
        return 'اختبر';
      case DisplayLanguage.chinese:
        return '测试';
      case DisplayLanguage.english:
        return 'test';
      case DisplayLanguage.japanese:
        return 'テスト';
      case DisplayLanguage.korean:
        return '테스트';
    }
  }
}

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const Filter(),
    );
  }
}

class Filter extends StatefulWidget {
  const Filter({Key? key}) : super(key: key);

  @override
  _FilterState createState() => _FilterState();
}

class _FilterState extends State<Filter> {
  DisplayLanguage language = DisplayLanguage.english;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('CupertinoTextField Test'),
        centerTitle: true,
      ),
      backgroundColor: Colors.white,
      body: Center(
        child: SizedBox(
          width: 400,
          child: Container(
            padding: const EdgeInsets.all(8.0),
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Row(
                  children: [
                    TextButton(
                      onPressed: () {
                        setState(() {
                          language = DisplayLanguage.arabic;
                        });
                      },
                      child: Text(DisplayLanguage.arabic.text),
                    ),
                    TextButton(
                      onPressed: () {
                        setState(() {
                          language = DisplayLanguage.chinese;
                        });
                      },
                      child: Text(DisplayLanguage.chinese.text),
                    ),
                    TextButton(
                      onPressed: () {
                        setState(() {
                          language = DisplayLanguage.english;
                        });
                      },
                      child: Text(DisplayLanguage.english.text),
                    ),
                    TextButton(
                      onPressed: () {
                        setState(() {
                          language = DisplayLanguage.japanese;
                        });
                      },
                      child: Text(DisplayLanguage.japanese.text),
                    ),
                    TextButton(
                      onPressed: () {
                        setState(() {
                          language = DisplayLanguage.korean;
                        });
                      },
                      child: Text(DisplayLanguage.korean.text),
                    ),
                  ],
                ),
                Center(
                  child: CupertinoTextField(
                    placeholder: 'Flutter ${language.displayText}',
                    decoration:
                        BoxDecoration(border: Border.all(color: Colors.red)),
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

Reproduces on stable 3.3 and master 3.7. Easily reproducible with Chinese placeholder
https://user-images.githubusercontent.com/31410839/209422225-3c2e916b-5821-4317-baf9-dbb43b1d579a.mov

code sample
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

enum DisplayLanguage { english, chinese, japanese, korean, arabic }

extension DisplayLanguagesExt on DisplayLanguage {
  String get text {
    switch (this) {
      case DisplayLanguage.arabic:
        return 'Arabic';
      case DisplayLanguage.chinese:
        return 'Chinese';
      case DisplayLanguage.english:
        return 'English';
      case DisplayLanguage.japanese:
        return 'Japanese';
      case DisplayLanguage.korean:
        return 'Korean';
    }
  }

  String get displayText {
    switch (this) {
      case DisplayLanguage.arabic:
        return 'اختبر';
      case DisplayLanguage.chinese:
        return '测试';
      case DisplayLanguage.english:
        return 'test';
      case DisplayLanguage.japanese:
        return 'テスト';
      case DisplayLanguage.korean:
        return '테스트';
    }
  }
}

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const Filter(),
    );
  }
}

class Filter extends StatefulWidget {
  const Filter({Key? key}) : super(key: key);

  @override
  _FilterState createState() => _FilterState();
}

class _FilterState extends State<Filter> {
  DisplayLanguage language = DisplayLanguage.english;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('CupertinoTextField Test'),
        centerTitle: true,
      ),
      backgroundColor: Colors.white,
      body: Center(
        child: SizedBox(
          width: 400,
          child: Container(
            padding: const EdgeInsets.all(8.0),
            child: Column(
              mainAxisAlignment: MainAxisAlignment.center,
              children: [
                Row(
                  children: [
                    TextButton(
                      onPressed: () {
                        setState(() {
                          language = DisplayLanguage.arabic;
                        });
                      },
                      child: Text(DisplayLanguage.arabic.text),
                    ),
                    TextButton(
                      onPressed: () {
                        setState(() {
                          language = DisplayLanguage.chinese;
                        });
                      },
                      child: Text(DisplayLanguage.chinese.text),
                    ),
                    TextButton(
                      onPressed: () {
                        setState(() {
                          language = DisplayLanguage.english;
                        });
                      },
                      child: Text(DisplayLanguage.english.text),
                    ),
                    TextButton(
                      onPressed: () {
                        setState(() {
                          language = DisplayLanguage.japanese;
                        });
                      },
                      child: Text(DisplayLanguage.japanese.text),
                    ),
                    TextButton(
                      onPressed: () {
                        setState(() {
                          language = DisplayLanguage.korean;
                        });
                      },
                      child: Text(DisplayLanguage.korean.text),
                    ),
                  ],
                ),
                Center(
                  child: CupertinoTextField(
                    placeholder: 'Flutter ${language.displayText}',
                    decoration:
                        BoxDecoration(border: Border.all(color: Colors.red)),
                  ),
                ),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

flutter doctor -v (mac)
[✓] Flutter (Channel master, 3.7.0-3.0.pre.33, on macOS 12.6 21G115 darwin-arm64, locale en-IN)
    • Flutter version 3.7.0-3.0.pre.33 on channel master
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision<PHONE_NUMBER> (38 minutes ago), 2022-12-05 18:27:21 -0800
    • Engine revision a309d239c4
    • Dart version 2.19.0 (build 2.19.0-463.0.dev)
    • DevTools version 2.20.0
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly
      to perform update checks and upgrades.

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.70.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.55.20221129

[✓] Connected device (3 available)
    • iPhone 12 Pro (mobile) • 026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 12.6 21G115 darwin-arm64
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 108.0.5359.94

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

[✓] Flutter (Channel stable, 3.3.9, on macOS 12.6 21G115 darwin-arm, locale en-IN)
    • Flutter version 3.3.9 on channel stable at /Users/mahesh/Development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision b8f7f1f986 (24 hours ago), 2022-11-23 06:43:51 +0900
    • Engine revision 8f2221fbef
    • Dart version 2.18.5
    • DevTools version 2.15.0

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0-rc4)
    • Android SDK at /Users/mahesh/Library/Android/sdk
    • Platform android-33, build-tools 33.0.0-rc4
    • ANDROID_HOME = /Users/mahesh/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14A400
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] IntelliJ IDEA Community Edition (version 2021.2.1)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 61.2.4
    • Dart plugin version 212.5080.8

[✓] VS Code (version 1.70.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.53.20221101

[✓] Connected device (3 available)
    • iPhone 12 Pro (mobile) • 026D5789-9E78-4AD5-B1B2-3F8D4E7F65E4 • ios            •
      com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • macOS (desktop)        • macos                                • darwin-arm64   • macOS 12.6 21G115 darwin-arm
    • Chrome (web)           • chrome                               • web-javascript • Google Chrome 107.0.5304.110

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

I debugged this issue

packages/flutter/lib/src/cupertino/text_field.dart line 1110.
the placeholder widget and textField (the child) in the stack, but height of placeholder widget is larger than the child's in Chinese, so when enter some Chinese words, the placeholder is hidden, then the height of container changes.

 flutter doctor -v (mac)
[!] Flutter (Channel unknown, 3.9.0-11.0.pre.28, on macOS 13.2 22D49 darwin-x64, locale zh-Hans-CN)
    ! Flutter version 3.9.0-11.0.pre.28 on channel unknown at /Users/zidong/workspace/flutter
      Currently on an unknown channel. Run `flutter channel` to switch to an official channel.
      If that doesn't fix the issue, reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    ! Unknown upstream repository.
      Reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
    • Framework revision 934cad3e8b (6 months ago), 2023-03-19 20:47:44 +0800
    • Engine revision 2ed59405e7
    • Dart version 3.0.0 (build 3.0.0-339.0.dev)
    • DevTools version 2.22.2
    • Flutter download mirror http://flutter-storage.alibaba-inc.com/xianyu
    • If those were intentional, you can disregard the above warnings; however it is recommended to use "git" directly to perform update checks and upgrades.

[!] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    • Android SDK at /Users/zidong/Library/Android/sdk
    • Platform android-33, build-tools 33.0.1
    • ANDROID_HOME = /Users/zidong/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 14C18
    • CocoaPods version 1.11.3

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866)

[✓] IntelliJ IDEA Community Edition (version 2021.3.3)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.81.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.72.0

[✓] Connected device (3 available)
    • zidong  (mobile) • 00008101-001D18E93C91001E • ios            • iOS 16.3.1 20D67
    • macOS (desktop)  • macos                     • darwin-x64     • macOS 13.2 22D49 darwin-x64
    • Chrome (web)     • chrome                    • web-javascript • Google Chrome 116.0.5845.187

[✓] Network resources
    • All expected network resources are available.


narrowing object by property doesn't work if key isn't a const

Bug Report

🔎 Search Terms
narrow property const
🕗 Version & Regression Information
4.9.0-dev.20221025
⏯ Playground Link

Playground link with relevant code
💻 Code

interface Data {
    a?: number
}

declare const data: Data

let key = 'a' as const

if (data.a !== undefined) {
    key // "a"
    const a = data[key] // number | undefined
    const b = data['a'] // number
}

🙁 Actual behavior
data[key] is number | undefined
🙂 Expected behavior
data[key] is narrowed to number

I managed to minify this issue a little bit, take a look below:
declare const data: {
    a?: number
}

if (data.a === undefined) throw "up"

const a = data['a' as 'a']
//    ^?
const b = data['a']
//    ^?

Duplicate of https://github.com/microsoft/TypeScript/issues/10530.  Only certain patterns of property access induce narrowing, specifically only the forms obj.foo and obj['foo'] (i.e. the key must be a naked literal).  obj[key] won't be narrowed, even if key is literal-typed.

the example in that issue seems to have been fixed ages ago https://github.com/microsoft/TypeScript/issues/10530#issuecomment-1298005608

Plenty of issues with your example are closed as duplicate of that issue, and it's still open.

Yeah, foo["bar"] used to not be narrowable.  Now it is, but the larger issue of foo[keyVar] not narrowing (which is a much bigger can of worms, implementation-wise) is still present.


How to know user's full name who pinged the bot?

I was wondering how can I find out the user's full name from Slack, who pinged the bot such that I can take the conversation forward?

Because message.user is just the userid, I ended up dropping down to the Slack api and used /users/info to do something like:
// Within context where you have a message object
var currentUser;
bot.api.users.info({user:message.user},function(err,response) {
  if(err) {
    bot.say("ERROR :(");
  }
  else {
    currentUser = response["user"];

    bot.say(
      {
        text: 'Hi ' + currentUser["name"],
        channel: whateverChannelId
      }
    );
  }
});

Here, the response["user"] object matches what you get back from the Slack API here: https://api.slack.com/methods/users.info
There may be other ways, but that way is currently working for me.

https://github.com/hassifow/Get-slack-user-name-who-pinged-the-bot
For dialogFlow users.


Json Required Attribute on string.

The documentation suggests writing a custom converter for required fileds.
There is however an other alternative, at least when using json on WebApi / MVC Controller.
Simply using the
[Required]
Attribute from System.ComponentModel.DataAnnotations
on a model will generate on the REST API call a 400 error:
{
"type": "https://tools.ietf.org/html/rfc7231#section-6.5.1",
"title": "One or more validation errors occurred.",
"status": 400,
"traceId": "xxxxxxx",
"errors": {
"xxx": [
"The xxx field is required."
]
}
}
This is the most easiest way to force required field for filed of type "string" (or any class).
Note however this won't work on the given example with DateTimeOffset example which is a struct: the default value of the struct will be considered and no error will be generated.

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

ID: 6b74d77c-33e1-d44c-18c6-bd0b612f74de
Version Independent ID: 9c6a7135-eb75-21a9-1d27-0880459523ca
Content: Migrate from Newtonsoft.Json to System.Text.Json - .NET
Content Source: docs/standard/serialization/system-text-json-migrate-from-newtonsoft-how-to.md
Product: dotnet-fundamentals
GitHub Login: @tdykstra
Microsoft Alias: tdykstra

the suggestion above was checked with .NET Core 3.1.

in my WebAPI, I have an other use case I don't know yet how to proceed with:
Take the following Json, containing a data object with a value property as string:
{
"data": {
"dValue": null
}
}
The corresponding model is
public class data
{
public string dValue { get; set; }
}
I want to ensure value field exists but also accept the null value.
I would like to see an example of a custom converter here.
Using Serialization/Deserialization, how can I make the difference between an missing field and a null value on that field?
I.e. I would like the converter to return an error when no "dValue" field is found, but still accepting "dValue" without any value set (accepting null).

Thanks for the suggestion, I'll update the article to mention that possibility.
As for accepting null values but rejecting missing properties, you can use Utf8JsonReader in a converter instead of calling JsonSerializer methods, following the pattern shown in Support polymorphic deserialization. Here's a proof-of-concept example:
using System;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace NullOrMissingConverter
{
    public class Program
    {
        public static void Main()
        {
            string jsonStringWithSummary = @"{""Date"":""2019-08-01T00:00:00"",""Temperature"":25,""Summary"": ""Hot""}";
            string jsonStringWithNullSummary = @"{""Date"":""2019-08-01T00:00:00"",""Temperature"":25,""Summary"":null}";
            string jsonStringWithoutSummary = @"{""Date"":""2019-08-01T00:00:00"",""Temperature"":25}";

            WeatherForecast weatherForecast;
            JsonSerializerOptions options = new() { WriteIndented = true };
            options.Converters.Add(new WeatherForecastRequiredPropertyConverter());

            weatherForecast = JsonSerializer.Deserialize<WeatherForecast>(jsonStringWithSummary, options);
            Console.WriteLine($"Summary={weatherForecast.Summary}");
            //output: Summary=Hot
            weatherForecast = JsonSerializer.Deserialize<WeatherForecast>(jsonStringWithNullSummary, options);
            Console.WriteLine($"Summary is null={weatherForecast.Summary == null}");
            //output: Summary is null=True
            weatherForecast = JsonSerializer.Deserialize<WeatherForecast>(jsonStringWithoutSummary, options);
            Console.WriteLine($"Summary={weatherForecast.Summary}");
            //output: Unhandled exception. System.Text.Json.JsonException: Didn't receive Summary in the JSON
        }
    }

    public class WeatherForecast
    {
        public DateTime Date { get; set; }
        public int Temperature { get; set; }
        public string Summary { get; set; }
    }

    public class WeatherForecastRequiredPropertyConverter : JsonConverter<WeatherForecast>
    {
        public override WeatherForecast Read(
            ref Utf8JsonReader reader,
            Type type,
            JsonSerializerOptions options)
        {
            if (reader.TokenType != JsonTokenType.StartObject)
            {
                throw new JsonException();
            }

            WeatherForecast wf = new();
            bool receivedSummary = false;

            while (reader.Read())
            {
                if (reader.TokenType == JsonTokenType.EndObject)
                {
                    if (wf.Summary == null && receivedSummary == false)
                    {
                        throw new JsonException("Didn't receive Summary in the JSON");
                    }
                    return wf;
                }

                if (reader.TokenType != JsonTokenType.PropertyName)
                {
                    throw new JsonException();
                }

                string propertyName = reader.GetString();
                reader.Read();

                switch (propertyName)
                {
                    case "Date":
                        wf.Date = reader.GetDateTime();
                        break;
                    case "Temperature":
                        wf.Temperature = reader.GetInt32();
                        break;
                    case "Summary":
                        wf.Summary = reader.GetString();
                        if (reader.TokenType == JsonTokenType.Null)
                        {
                            receivedSummary = true;
                        };
                        break;
                }
            }
            return null;
        }

        public override void Write(
            Utf8JsonWriter writer,
            WeatherForecast forecast, JsonSerializerOptions options)
        {
            // Don't pass in options when recursively calling Serialize.
            JsonSerializer.Serialize(writer, forecast);
        }
    }
}


feat: created system-only nbody demo for issue #65

Resolves #65

Oops I don't think you fixed the issue. What I would do:

git log to find the commit with the
Switch to main
Pull from upstream/main
Make a new branch off of main
git cherry-pick f7e2e26c69022d11838f244174d225635a69b190 to apply the commit for nbody
Rename nbody
Push, make new pull request and close this one.


Demo and explain the clustering algorithm for length of feedback

Demo how the algorithm works
Explain how the conversations are clustered

User Story
As a developer, I am expected to demo the insights that were generated from the floop_dataset, and also try clustering algorithms to group various feedbacks into categories.
Estimated time to complete: 4 hours
Actual time to complete: 4 hours
Findings:
The dataset that we had currently, only had two data points:

What was the message
Who sent the message
and this information is made available for each feedback.

What I started with is some Explorative Data Analysis on this dataset, to understand the patterns better.
We discovered that majority of the conversations consist of only one message,  This means that the feedback is most often, one-way in nature, where the student does not revert to the teacher on the feedback submitted.

This might be because of multiple reasons:

Teacher's feedback is not action-oriented, but just descriptive in nature (Eg: Maybe the teacher says: "Good", "I like this", etc.)
Students have a lower tendency to reply to teachers: This could be a behavioral instinct.

#Next steps
It seems that doing clustering with only the text, will not suffice in answering all our questions.
A better idea, would be to combine the features like Question/No-Question, Emotion, Sentiment together into the clustering model and then come up with a strategy on how to improve on the conversation lenght between the teacher and the student.
The analysis was done on a SageMaker notebook that can be found here


update code

Please update the relevant code promptly.

we will release the code and model by the end of this week or latest the next week

Please update the relevant code promptly.

Stop copying the slogan @zjhubio.


fix(lint): Suppress react/no-deprecated rule

I think this should the trick, but I havent yet tested it. Gonna wait for CI 😉
EDIT:// this has fixed original issue, but I'm still fighting with preact build

:tada: This PR is included in version 1.2.7 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[FLINK-22464][tests] Fix OperatorCoordinator test which is stalling with AdaptiveScheduler

This PR fixes a test instability. See comment in the PR for what's going on.

I pushed an additional commit. You'll see that I was not able to get rid of the sleep :(. I just made the sleeping much more specific.
Since its a FLIP-27 source, we can't easily track the checkpoint progress there.
I don't think I've really addressed your concern, but I'm a bit lost what to do. If you have a better idea, let me know and I can try to implement it.

Since its a FLIP-27 source, we can't easily track the checkpoint progress there.

The SourceReader gets notified of completed checkpoints. Could you not modify the TestingNumberSequenceSource to return a custom reader that completes some shared (org.apache.flink.testutils.junit.SharedObjects) CompletableFuture within notifyCheckpointComplete?

Thanks a lot for your input. With this comment, I was able to get rid of the sleep. It's a bit different to what you proposed, but it works very well (at least locally ;) ).

Thanks a lot for your review! Merging ...


Injecting into com.apple.Spotlight does not work. Spotlight fails to launch

Device Model
iPhone 14 Pro
iOS Version
16.5.1
Bootstrap Version
1.1
Serotonin Version
1.2.1
What happened?
When spotlight (com.apple.Spotlight) is enabled from the applist for tweak injection, the spotlight doesn't load.
Log output
No response
Acknowledgement of README and FAQ

[X] I have read both the README and the FAQ.

Hey p2k! Love your work. Marking this as confirmed, can vouch it breaks Spotlight on iOS 17 as well.

still present in 1.1.1, iphone 14 on 16.6 beta 1

will be fixed in next version

latest commits did not fix for me, iphone 14 16.6 beta built from source

It works for me. Tweaks are working in spotlight. I tried thr build posted on discord

It works for me. Tweaks are working in spotlight. I tried thr build posted on discord

link to msg pls :-p

found it, even with that build spotlight is still broken with injection for me :-(

still broke on 1.2.1 for me :p

still broke on 1.2.1 for me :p

any crash logs in /var/mobile/Library/CrashReporter/ ?

and try "disable tweak" then "enable tweak" for spotlight

still broke on 1.2.1 for me :p

crashed by this tweak


V2 Alpha Discussion: Multiple Asks

Hi Actions on Google Node.js developers!
Now that the v2 Client Library alpha has been out for a while, we want to get feedback on the behavior and best practices of constructing complex responses from multiple response fragments.
V1
In v1, we required you to construct a single prompt object using builders to send it all at the end. While that was intuitive to implement since the API is just building and returning a single response, we observed that it wasn't completely intuitive to build multiple responses like multiple speech bubbles (SimpleResponses).
app.ask(app.buildInputPrompt(//...

V2
So, for v2, we decided to help you out.
You can still pass in a single RichResponse object yourself. But now we also give you the option of allowing the library to construct it for you by accepting multiple spreaded arguments in the conv.ask/conv.close method and allowing you to call it multiple times. The response will then be constructed at the end of the function execution or, if you return a Promise, after the Promise resolves.
Asking Multiple Times
conv.ask('Hello')
conv.ask('How are you?')

Asking Once with Multiple Arguments
conv.ask('Hello', 'How are you?')

Asking Multiple Times and using Multiple Arguments (Also Showing usage of Close)
conv.close('Ok', `Here's a cat image`)
conv.close(new Image({
  url: 'https://developers.google.com/web/fundamentals/accessibility/' +
    'semantics-builtin/imgs/160204193356-01-cat-500.jpg',
  alt: 'A Cat',
}))

While the behavior is straightforward, we were concerned that, by abstracting out the construction, it might not be clear that the entire response is still generated into a single object at the end and sent back. Also, we were worried about how the code looks, since it might seem weird to call conv.ask or conv.close multiple times.
There's nothing stopping us from still allowing developers to use both ways, but we want to know which way should be encouraged as the best practice so we can recommend it in our samples and docs.
So let us know what you think!

Having conv.ask multiple times isn't weird, though conv.close multiple times definitely is. If I close something, I expect it to be closed. On the whole, however, I like the idea of being able to offload the construction to the library.

I just ended up combining them into the one element like:
  conv.ask(
    new SimpleResponse({
      speech: textToSpeech1,
      text: displayText1
    }),
    new SimpleResponse({
      speech: textToSpeech2,
      text: displayText2
    }),
    new BasicCard({
      title: `Title Text?`,
      text: 'Text contents',
      buttons: new Button({
        title: 'Title',
        url: `http://url`,
      }),
      display: 'WHITE'
    })
  );

I found that when calling a function from an intent in which the conv.ask was being invoked which requires 'return' before 'conv.ask' this meant the multiple conv.ask wouldn't work so I had to combine them.
Is there a way to inject say new Suggestions into an existing conv.ask so I don't need to duplicate code for different device capabilities within a function called from an intent?
Cheers

The test simulator only seems to read aloud the first simple response ask?

Hello @Canain ! Starting using action on google, I would like to follow on this previous discussion: I see that using conv.ask twice works, but using it three times doesn't work. The richResponse contains well all 3 elements. But the simulator (on alpha and draft) only displays 2 of them.
Code:
conv.ask("hello");
conv.ask("my");
conv.ask("world");
result rendered: hello my
thanks a lot!

Only two simple responses can be provided. Any following that are not shown.
Closing this issue as v2 is no longer in alpha.

Thanks a lot for the answer Fleker! The question is : why would you want to limit that ? :-)


[BUILD] Disable the threading example in MSVC for release and debug builds

This PR disables the threading example in MSVC for the debug and release targets. The project was already disabled for the DLL targets just not the static targets, this seems like a simple oversight. The project will not build on MSVC (and is commented as having that limitation). This simply lets MSVC build the solution without errors for static builds like it does for DLL builds.

@JeffM2501 thanks for the review!


2 jpg images contain propriatry ICC profiles

Version: 1.34.2
Platform: all

Hello
While reviewing copyright information to package new version for Debian, I've noticed that 2 files contain proprietary ICC profile information:
$ for i in $(find . -name *.jpg); do echo $i; exiftool $i | grep Profile; done
./docs/src/static/diagrams.key/preview-web.jpg
./docs/src/static/diagrams.key/Data/st0-311.jpg
Profile CMM Type                : Linotronic
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Profile Connection Space        : XYZ
Profile Date Time               : 1998:02:09 06:49:00
Profile File Signature          : acsp
Profile Creator                 : Hewlett-Packard
Profile ID                      : 0
Profile Copyright               : Copyright (c) 1998 Hewlett-Packard Company
Profile Description             : sRGB IEC61966-2.1
./docs/src/static/diagrams.key/Data/st1-475.jpg
Profile CMM Type                : Linotronic
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Profile Connection Space        : XYZ
Profile Date Time               : 1998:02:09 06:49:00
Profile File Signature          : acsp
Profile Creator                 : Hewlett-Packard
Profile ID                      : 0
Profile Copyright               : Copyright (c) 1998 Hewlett-Packard Company
Profile Description             : sRGB IEC61966-2.1
./docs/src/static/diagrams.key/preview.jpg
./docs/src/static/diagrams.key/preview-micro.jpg

According to this, embedding a color profile in a image is not necessary when color accuracy is not important.
I'd suggest to strip the profile from these image with convert -strip from imagemagick:
convert -strip docs/src/static/diagrams.key/Data/st0-311.jpg docs/src/static/diagrams.key/Data/st0-311.jpg
convert -strip docs/src/static/diagrams.key/Data/st1-475.jpg docs/src/static/diagrams.key/Data/st1-475.jpg

This would get libuv1 rid of some proprietary data.
All the best

Wow, I had no idea about that! IIRCC those images come with the keynote presentation, we didn't necessarily embed them.
Any chance you could submit a Pull Request?

I'm on it ...

Version: 1.34.2
Platform: all

Hello
While reviewing copyright information to package new version for Debian, I've noticed that 2 files contain proprietary ICC profile information:
$ for i in $(find . -name *.jpg); do echo $i; exiftool $i | grep Profile; done
./docs/src/static/diagrams.key/preview-web.jpg
./docs/src/static/diagrams.key/Data/st0-311.jpg
Profile CMM Type                : Linotronic
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Profile Connection Space        : XYZ
Profile Date Time               : 1998:02:09 06:49:00
Profile File Signature          : acsp
Profile Creator                 : Hewlett-Packard
Profile ID                      : 0
Profile Copyright               : Copyright (c) 1998 Hewlett-Packard Company
Profile Description             : sRGB IEC61966-2.1
./docs/src/static/diagrams.key/Data/st1-475.jpg
Profile CMM Type                : Linotronic
Profile Version                 : 2.1.0
Profile Class                   : Display Device Profile
Profile Connection Space        : XYZ
Profile Date Time               : 1998:02:09 06:49:00
Profile File Signature          : acsp
Profile Creator                 : Hewlett-Packard
Profile ID                      : 0
Profile Copyright               : Copyright (c) 1998 Hewlett-Packard Company
Profile Description             : sRGB IEC61966-2.1
./docs/src/static/diagrams.key/preview.jpg
./docs/src/static/diagrams.key/preview-micro.jpg

According to this, embedding a color profile in a image is not necessary when color accuracy is not important.
I'd suggest to strip the profile from these image with convert -strip from imagemagick:
convert -strip docs/src/static/diagrams.key/Data/st0-311.jpg docs/src/static/diagrams.key/Data/st0-311.jpg
convert -strip docs/src/static/diagrams.key/Data/st1-475.jpg docs/src/static/diagrams.key/Data/st1-475.jpg

This would get libuv1 rid of some proprietary data.
All the best

Hey, yes im the guy who asks questions on comments years later. I was wondering if you could tell me exactly what this means? Specifically this "Copyright (c) 1998 Hewlett-Packard Company", my question has nothing to do with your discussion, I am just a guy with way too much time on his hands, and was researching a photograph I found, and that exact same line was written within the Metadata, I have never come across it before, and this comment you made came up in my search for more info. I hope I am not breaking any rules or intruding in any way, just looking for an answer to something that driving me crazy. I am pretty sure the image I am looking at has nothing to do with the two .jpg you are discussing, and that has me even more curious as to the meaning of this line in the metadata.  Thanks!

I II think it was some kind of stock image that Keynote embedded in the key file.

I was wondering if you could tell me exactly what this means? Specifically this "Copyright (c) 1998 Hewlett-Packard Company",

This question highlights not a technical, but a legal problem. According to the copyright above, the color profile is owned by HP and there's no mention of a license that authorize its usage in libuv. Hence this request to remove it.
See https://opensource.stackexchange.com/questions/297/whats-the-difference-between-copyright-and-licensing for more info on this legal topic.

It was already removed.

Thanks for answering so quick, I thought I would be waiting a year or so. Let me ask another weird question, is there any chance I could see what .jpg images the original post was about?

Checkout the tag of the originally reported version, they should still be there.


Invoking :term produces strange output

Steps to reproduce
Invoking :term leaves the prompt full of text output, seemingly related to color codes.

Expected behaviour
Invoking :term is expected to leave us at a clean prompt.
Version of Vim
9.0.1676
Environment
OS: Arch Linux
Term: alacritty
Output of $TERM: alacritty
Shell: bash
Logs and stack traces
No response

it looks like your terminal doesn't understand some of the terminal ansi sequences. CAn you verify this happens with vim --clean and without your empty bash init files?


Pre-fetching all resources slowing down Ghost a lot

Is there any way to disable pre fetching resources at bootstrap? My Ghost setup has 1 million posts and it is very slow to start and there is just not enough memory to store all those resources.
--------------^ Click "Preview" for a nicer view!
We use GitHub only for bug reports 🐛
Anything else should be posted to https://forum.ghost.org 👫.
🚨For support, help & questions use https://forum.ghost.org/c/help
💡For feature requests & ideas you can post and vote on https://forum.ghost.org/c/Ideas
Alternatively, check out these resources below. Thanks! 😁.

Forum
Theme Support
Theme Docs
API Docs
Feature Requests / Ideas
Contributing Guide
Self-hoster Docs

Closing as this belongs on the forum and was raised here: https://forum.ghost.org/t/why-is-ghost-pre-fetching-all-the-resources-at-bootstrap/2823


Add more examples to the README

For example, how to implement the following in React:

keyframe animations
media queries
pseudo selectors

How about keyframe animations?


Refactor select component to calculate dropdown height properly

Coverage remained the same at 42.0% when pulling 1b268d57808ad351d97e3a4c351d1f97bd064777 on release/0.6.2 into e066ff5434ed37ce8616835b9aba5fcd387a7220 on master.


Refactor/update custom table accessibility

Update shared table accessibility :

ajouter les attributs scope
modifier voire supprimer les aria labels inutiles
ajouter un caption obligatoire

[ ] Update npm packages
[ ] Bug fix (non-breaking change which fixes an issue).
[ ] New feature (non-breaking change which adds functionality).
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected).
[ ] Performance improvement
[X] Refactoring (so no functional change)
[ ] Other (docs, build config, etc)

Checklist:

[X] I've added tests for my code. (most of the time mandatory)
[ ] I have added an entry to the changelog. (mandatory)
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (9640e41) 100.00% compared to head (340b44a) 100.00%.

:exclamation: Current head 340b44a differs from pull request most recent head 1002724. Consider uploading reports for the commit 1002724 to get more accurate results

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #99   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files          149       149
  Lines         7359      7371   +12
  Branches       632       632
=========================================
+ Hits          7359      7371   +12

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


Fix mis-detection of Clang on macOS

It is better to test for "GNU" rather than "Clang" because on macOS that will resolve to "AppleClang" and the GNU warnings will be enabled and produce errors.

I believe this has already been addressed by #18
Also... with that final else statement the Clang setting would be applied also if one tries to use ICC or some other compiler, I don't know if they would work in that case 🤔

Already addressed in #18, closing. Sorry for the late review!


CPP program for sub array with given sum

This is a program for finding number of subarrays with given sum in cpp


Upgrade pub libs

No story.
Upgrade libs

@gguij004  good finds, we need to migrate to share_plus at some point.


Expand CPU Meter to support 36 threads

The newest Intel Core i9 processors have 18 (!) cores, so CPU Meter needs to be able to display 36 threads, up from the current 32.
To-do

[ ] Add new meters
[ ] Update config script
[ ] Add new color variables and expand settings skin
[ ] Add to Line Graph

Done.


imgui-examples appear 'glitchy' on Windows

Hello,
Using the examples from folder imgui-examples from the main repo on Windows 10, most of them are appearing 'glitchy' for me (see below image).  I have tried toggling with_vsync(true) / with_vsync(false) in ../support/mod.rs without success.
Does this mean I need to use an alternative renderer or should I be looking elsewhere to resolve this?

That is pretty strange! I would suspect it might be a graphics driver related issue rather than the renderer, but not sure
There was a note in the 1.86 release notes about glitching, https://github.com/ocornut/imgui/releases/tag/v1.86 although it mentions it was limited to modal windows and the keyboard-nav overlay (whereas the attached video is just stuff in standard windows)
A few ideas of other things to test, to narrow it down to "bug with imgui-rs" or something else:

The upstream imgui examples (i.e from https://github.com/ocornut/imgui ), as they are more widely used than the Rust bindings
Trying the imgui-glow-renderer example (we use the latest main version of this renderer on linux+windows without issue)
Same example but from the v0.8 releases (as they are definitely tested on Windows)

I think you're correct, it does look like a specific issue with my PC (4790K iGPU only) or drivers. I have tested the following

imgui-examples are working fine with no glitching on another Windows 10 PC
imgui-glow-renderer works fine on problematic PC with no issues.
Dear imgui C++ demo works fine on problematic PC with no issues.

I'll use the imgui-glow-renderer for now. Thank you.


Readded missing String constructors.

Added String constructors that were inadvertently omitted in the NanNew rewrite.
Fixes #227.
R=@agnat

:+1: let's get a patch release out for 1.5 soon, preferably with #239 too I think

LGTM.


sec, cosec and cot in LaTeX

Can we add \sec \cosec \cot commands to the list of our definitions? Otherwise I have to hope I get the rendering right and we won't be able to recognise these if entered?

If this is still required, please can someone tell me what the definitions should be?


Replace the rect and atlas_size fields of ExtractedUiNode with an enum

Objective
It's a struggle to even explain to someone what these fields are for and how they interact.

atlas_size isn't the size of the texture atlas but is usually a scaled value.

rect is sometimes used to hold the size of a UI node (again maybe scaled) and sometimes holds UV coordinates and is sometimes scaled. Most users seem to intuit that it should contain the node's geometry, which is wrong.

Solution
Replace the fields with an enum and some helper functions.

Changelog

Added ExtractedRect enum.
Removed rect and atlas_size fields from ExtractedUiNode.

Migration Guide
The rect and atlas_size fields of ExtractedUiNode have been removed and replaced with the extracted_rect field.

cargo run --profile stress-test --features trace_tracy --example many_buttons


feat: Auto merge and deploy to staging branch

Reason for Change

#5461

The idea is that we can leverage our existing workflow where a commit to staging branch creates a deployment to the stage environment. So, whenever new commits to main come in, we merge the commit to staging thus kicking off a deployment to stage environment.
Additionally, github action's concurrency group feature is utilized to eliminate race conditions involving multiple builds and deployments run at the same time. Here, we cancel scheduled builds and deployments as well as currently running builds and deployments in favor of the newest build/deployment job.
Changes

add merging main branch to staging branch on new commits to main
add GHA concurrency group feature

Testing steps

The following workflow was used to test a merge between 2 branches not named [dev, staging, prod]. Specifically the following github workflow merges commits from psridharan/issue-5461 into psridharan/test-auto-merge-2 triggered by a pushes to psridharan/issue-5461:

name: Trigger release candidate build and deploy

on:
  push:
    branches:
      - psridharan/issue-5461

jobs:
  merge:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout psridharan/issue-5461 into psridharan/test-auto-merge-2
        uses: actions/checkout@v2
        with:
          ref: psridharan/issue-5461
          fetch-depth: 0
      - name: Merge psridharan/issue-5461 into psridharan/test-auto-merge-2
        run: |
          git config user.name "GitHub Actions"
          git config user.email<EMAIL_ADDRESS>
          echo "BEFORE CHECKOUT: Listing current checked out branches:"
          echo "$(git branch --list)"

          echo "Checking out psridharan/test-auto-merge-2"
          git checkout psridharan/test-auto-merge-2
          echo "Confirming checked out branch receiving merge is: $(git branch --show-current)"

          echo "AFTER CHECKOUT: Listing current checked out branches:"
          echo "$(git branch --list)"

          echo "Current checked out receiving branch is: $(git branch --show-current)"
          echo "HEAD commit in current checked out receiving branch: $(git branch --show-current) is: $(git log -1 --format='%H')"

          echo "HEAD commit in incoming branch psridharan/issue-5461 is:"
          echo "$(git log -1 --format='%H' psridharan/issue-5461)"

          echo "About to merge psridharan/issue-5461 into psridharan/test-auto-merge-2"
          git merge --verbose --no-ff psridharan/issue-5461 -m "Merging psridharan/issue-5461 into psridharan/test-auto-merge-2"

          git push origin psridharan/test-auto-merge-2

Here is the DEBUG log output that inspects the state before the git merge operation:

BEFORE CHECKOUT: Listing current checked out branches:
* psridharan/issue-5461
Checking out psridharan/test-auto-merge-2
Switched to a new branch 'psridharan/test-auto-merge-2'
branch 'psridharan/test-auto-merge-2' set up to track 'origin/psridharan/test-auto-merge-2'.
Confirming checked out branch receiving merge is: psridharan/test-auto-merge-2
AFTER CHECKOUT: Listing current checked out branches:
  psridharan/issue-5461
* psridharan/test-auto-merge-2
Current checked out receiving branch is: psridharan/test-auto-merge-2
HEAD commit in current checked out receiving branch: psridharan/test-auto-merge-2 is: baf69efb5f6f94c2d6645e3eedaf4d8703852ccc
HEAD commit in incoming branch psridharan/issue-5461 is:
4b12fc3e[27](https://github.com/chanzuckerberg/single-cell-data-portal/actions/runs/6386570986/job/17333448676?pr=5860#step:3:28)50f6af67bae5ca[28](https://github.com/chanzuckerberg/single-cell-data-portal/actions/runs/6386570986/job/17333448676?pr=5860#step:3:29)354502e9e[33](https://github.com/chanzuckerberg/single-cell-data-portal/actions/runs/6386570986/job/17333448676?pr=5860#step:3:34)bba
About to merge psridharan/issue-5461 into psridharan/test-auto-merge-2
Merge made by the 'ort' strategy.
 .../build-images-and-create-deployment.yml         |  4 +++
 .github/workflows/deploy-happy-stack.yml           |  5 +++
 .../trigger-release-candidate-build-and-deploy.yml | 41 ++++++++++++++++++++++
 3 files changed, 50 insertions(+)
 create mode 100644 .github/workflows/trigger-release-candidate-build-and-deploy.yml
To https://github.com/chanzuckerberg/single-cell-data-portal
   baf69efb5f6..64a[37](https://github.com/chanzuckerberg/single-cell-data-portal/actions/runs/6386570986/job/17333448676?pr=5860#step:3:38)11d333  psridharan/test-auto-merge-2 -> psridharan/test-auto-merge-2

Attached is an image that shows the auto-merge

Notes for Reviewer

Some of the language you use in the echo statement is confusing to understand. Is there anyway to make it more clear.

@Bento007 - I can clarify some of the echo messages. I initially had them for debugging to understand the state prior to merge but I will clean them up

LGTM, with 2 requests to add follow-up issues for future improvements:

remove need for fetch-depth=0 (full clone)
revisit canceling in-progress builds

@atolopko-czi  - Added issues #5895 and #5896 to address these


startup with newUntitledFile doesn't work

VSCode Version: 1.33.0
OS Version: Mac Mojave 10.14.4

Steps to Reproduce:

in settings, set "workbench: startup editor" to "newUntitledFile"
close all tabs and quit vs code.
start vs code, it starts without editor open up. it stays the blank page with 4 command shortcut in the middle.

Does this issue occur when all extensions are disabled?: Yes/No
Yes

/duplicate 71837

niedz., 7 kwi 2019, 22:22 użytkownik hfcheng66<EMAIL_ADDRESS>napisał:

VSCode Version: 1.33.0
OS Version: Mac Mojave 10.14.4

Steps to Reproduce:

in settings, set "workbench: startup editor" to "newUntitledFile"
close all tabs and quit vs code.
start vs code, it starts without editor open up. it stays the blank
page with 4 command shortcut in the middle.

Does this issue occur when all extensions are disabled?: Yes/No
Yes
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/71890, or mute the thread
https://github.com/notifications/unsubscribe-auth/Almcl53UVjE19a3Zm81x2AYXZh1UWQG2ks5velOAgaJpZM4cg-qm
.

Tak
pon., 8 kwi 2019, 12:54 użytkownik Benjamin Pasero<EMAIL_ADDRESS>napisał:

/duplicate 71837
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/vscode/issues/71890#issuecomment-480783410,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Almcl0VBk5K6MZVl26lDIAMHvkg-yIJOks5vex_1gaJpZM4cg-qm
.


ipfs.io gateway returns internalWebError but cloudflare gateway doesn't

Not a showstopper issue for me, just a weird bug I noticed with some gateways but not others that wasn't very clear, @scout asked me to open an issue so it can be kept track of.
When attempting to view a folder (QmThJ4k554iT3B7SZonmVMwspHALiHGThhqaem7nij1wQD) via IPFS on the gateway, some gateways seem to error with internalWebError: operation not supported others in another and some work as expected.
https://ipfs.io/ipfs/QmTh...: internalWebError: operation not supported
https://ipfs.infura.io/ipfs/QmTh...: internalWebError: operation not supported
https://ipfs.jes.xxx/ipfs/QmTh... and https://cloudflare-ipfs.com/ipfs/QmTh... work as expected:

I wonder if this is related to the use of --raw-leaves

I looked more into this but still confused. The cloudflare and jes gateways load the root object fine as you noted, but are printing ipfs cat /ipfs/QmTh.../ubuntu: cannot currently read symlinks however our and infura's gateway loads that fine.
see:
https://ipfs.jes.xxx/ipfs/QmTh.../ubuntu
https://ipfs.infura.io/ipfs/QmTh.../ubuntu
Does that make any sense to you?

Yeah ubuntu is a symlink

Looks like it's related to this issue: https://github.com/ipfs/go-ipfs/issues/6203

@andrew since this is most likely a software issue can this issue be closed?

Yeah, it seems like it'll solve itself as the different gateways upgrade to the latest versions of IPFS.


eslint-plugin-vue work on html files but does not work on vue files

vscode user config is:
"javascript.validate.enable" : false,
"eslint.options": {
    "configFile": "E:/code-style/src/eslint/.eslintrc",
    "plugins": ["vue"]
},
"eslint.validate": [
    "javascript",
    "html",
    "vue"
]

.eslintrc:
`{
"extends": [
    "./index.js",
    "plugin:vue/recommended"
],
"plugins": [
    "vue"
],
"rules": {
    "vue/return-in-computed-property": [2],
    "vue/no-duplicate-attributes": [2],
    "vue/attribute-hyphenation": [2, "always"]
}

}`
there are two same files named 1.html and 1.vue, but only the html file throw errors.

Can you please provide a GitHub repository I can clone that demos the behavior with steps on how to reproduce. I am not able to reproduce this locally with my test bed.

GitHub repostory is https://github.com/vusion/code-style/tree/develop。
It works on .vue file in cli, but weird in VSCode(version 1.17.1)。

@luoxlgh I cloned the provided branch that the branch has no eslintrc.json file. Can you please provide an example an I clone and easily reproduce the problem with.

Sorry for wasting your time.
https://github.com/vusion/code-style/tree/feature/vsCode-test
clone this repository and npm run test。 The result is:

But VSCode does not report bugs in vue file

You have no configured VS Code to validate vue files. There is no settings file. See here on how to enable ESLint parse for other file types than JS.

https://github.com/Microsoft/vscode-eslint#settings-options

This works for me after I install the Vetur extension which adds the vue language mode and adding this to the settings.
{
	"eslint.validate": [
		"javascript",
		"javascriptreact",
		"vue"
	]
}

If you don't want to install Vectur you can also define vue as a language mode using the association settings. However I would recommend to use the Vectur extension.


MySQL fails to run on Github Actions using Kind

Describe the bug
We are trying to run an official MySQL pod inside a Kind cluster on GitHub actions. Here is our demo repo: https://github.com/tamalsaha/mysql-kind-demo
The problem is mysql pod fails to run with the error message:
+ mysqld --verbose --help
mysqld: Can't read dir of '/etc/mysql/conf.d/' (OS errno 13 - Permission denied)
mysqld: [ERROR] Fatal error in defaults handling. Program aborted!

You can see the full log here: https://github.com/tamalsaha/mysql-kind-demo/commit/dfef4e188accdb6334b75f4658bd0fc1dd35c732/checks?check_suite_id=364071606
The puzzling this is that if I just run docker run mysql:8.0.14 mysqld --verbose --help it works! You can see full log here:
https://github.com/tamalsaha/mysql-kind-demo/commit/d452e672fa2219fb5ea5174bd99108d6d0b2728a/checks?check_suite_id=364034120
When I try these on my Ubuntu 18.04 Desktop (using pod in a Kind cluster and Direct Docker), both modes work.
You can see the diff between pod log from my Desktop (left) and Github action (right). They mostly look identical: https://www.diffchecker.com/D64wMscf
Can you help my understand why mysqld --verbose --help fails when run as a pod inside a Kind v1.16.3 cluster on GitHub actions?
Virtual environments affected

[ ] macOS 10.15
[ ] Ubuntu 16.04 LTS
[x] Ubuntu 18.04 LTS
[ ] Windows Server 2016 R2
[ ] Windows Server 2019

Expected behavior
A description of what you expected to happen.
Actual behavior
Here is our demo repo: https://github.com/tamalsaha/mysql-kind-demo
If you want to run locally, try this:
kind create cluster
kubectl apply -f https://github.com/tamalsaha/mysql-kind-demo/raw/master/hack/kubernetes/mysql.yaml

Anything else we need to know?:
One hack we found is that if we mount an emptyDir to /etc/mysql/conf.d folder, mysqld --verbose --help command starts working.
Environment:

kind version: (use kind version): v0.6.1
Kubernetes version: (use kubectl version): v1.16.3
Docker version: (use docker info):

Client:
 Debug Mode: false
 Plugins:
  buildx: Build with BuildKit (Docker Inc., v0.3.1)

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 13
 Server Version: 3.0.8
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: b34a5c8af56e510852c35414db4c1f4fa6172339
 runc version: 3e425f80a8c931f88e6d94a8c831b9d5aa481657
 init version: fec3683
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 5.0.0-1027-azure
 Operating System: Ubuntu 18.04.3 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 2
 Total Memory: 6.783GiB
 Name: fv-az86
 ID: KRSI:74QW:YCD2:XEK7:4WO2:DOAO:FRYG:MP4B:J2YH:N63L:5SGR:JV5A
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  <IP_ADDRESS>/8
 Live Restore Enabled: false

OS (e.g. from /etc/os-release):

PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

Reposted from Kind issue queue: https://github.com/kubernetes-sigs/kind/issues/1179

Suffering from the same issue here. Don't know how to solve it though.

Hello, @tamalsaha
 -R, --remove
           This flag is used to remove an AppArmor definition already in the kernel.  Note that it still requires a
           complete AppArmor definition as described in apparmor.d(5) even though the contents of the definition
           aren't used.

Please update your ci to exclude mysql:
- name: apparmor
  run: |
      set -x
      sudo apt-get remove mysql-server --purge
      sudo apt-get install apparmor-profiles
      sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld

Log output:
2020-04-08T10:06:49.6199372Z brk(0x55814ceb3000)                     = 0x55814ceb3000
2020-04-08T10:06:49.6199553Z futex(0x7f2ac4eb74e4, FUTEX_WAKE_PRIVATE,<PHONE_NUMBER>) = 0
2020-04-08T10:06:49.6199734Z futex(0x7f2ac5124bb0, FUTEX_WAKE_PRIVATE,<PHONE_NUMBER>) = 0
2020-04-08T10:06:49.6199896Z brk(0x55814ced4000)                     = 0x55814ced4000
2020-04-08T10:06:49.6200078Z brk(0x55814cefc000)                     = 0x55814cefc000
2020-04-08T10:06:49.6200261Z brk(0x55814cf2b000)                     = 0x55814cf2b000
2020-04-08T10:06:49.6200433Z fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
2020-04-08T10:06:49.6200596Z brk(0x55814cf58000)                     = 0x55814cf58000
2020-04-08T10:06:49.6200784Z write(1, "mysqld  Ver 8.0.18 for Linux on "..., 4096) = 4096
2020-04-08T10:06:49.6201271Z mysqld  Ver 8.0.18 for Linux on x86_64 (MySQL Community Server - GPL)
2020-04-08T10:06:49.6201486Z Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

@tamalsaha, Feel free to open the thread if you have any concerns.


Cleaned up CompositePlot instantiation

So I was about to add some code to different plots classes to attach streams and I got fed up with all the duplication in the composite plot constructors. I've moved everything to the base class cutting down a lot of the mess.

Ready to merge.


update fallback colorizer

[ ] I added an entry to CHANGELOG.md if knowledge of this change could be valuable to users.

Here is a brief summary of what I did:
i changed the ticks of the default fallback colorizer

 Unschöne Legende

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

17 of 17 (100.0%)  changed or added relevant lines in 1 file are covered.
22 unchanged lines in 7 files lost coverage.
Overall coverage decreased (-0.006%) to 90.565%

Files with Coverage Reduction
New Missed Lines
%

services/src/pro/api/handlers/permissions.rs
1
97.19%

services/src/datasets/external/pangaea/mod.rs
2
83.19%

services/src/api/handlers/workflows.rs
2
90.21%

services/src/datasets/external/netcdfcf/ebvportal_api.rs
3
87.38%

services/src/pro/layers/postgres_layer_db.rs
3
95.79%

services/src/datasets/external/netcdfcf/ebvportal_provider.rs
5
92.06%

services/src/pro/contexts/postgres.rs
6
96.87%

Totals

Change from base Build<PHONE_NUMBER>:
-0.006%

Covered Lines:
131046

Relevant Lines:
144699

💛  - Coveralls


Update native.c

bugfix for PhGetProcessQuotaLimits

I have read the CLA Document and I hereby sign the CLA

I have added an other fix as well:
The new Kernel driver returns the kernel stack trace as well as the user stack trace,
without this fix System Informer shows the user stack duplicated when the driver is used.

The new Kernel driver returns the kernel stack trace as well as the user stack trace

@jxy-s was adding support for flags to enable/disable user stacks and they're not passed to the client yet:
https://github.com/winsiderss/systeminformer/blob/2fe3a6e71edc958e89ec7e3de96febdbb36eef1e/KSystemInformer/comms_handlers.c#L470-L473

I noticed that, but as its not yet done and at this place in the code we care only for the kernel part of the stack, I think this is a fair fix, and will not cause issues later.
If at some point the plan will be to get the entire stack from the driver only other things will need to be changed as well, at that point the fix can be simply removed.

API change here: https://github.com/winsiderss/systeminformer/pull/1532 - what @DavidXanatos has done in the meantime is reasonable


Remove the ability for command or any antag-safe role from being initial infected in zombie mode #25529

About the PR

https://github.com/ArchPigeon

Remove the ability for any role that is marked as canBeAntag = False to be an initial infected zombie

Why / Balance

https://github.com/ArchPigeon

Initial Infected Captains and heads of security are very very stupid. Secoffs being zombies are similarly dumb. Zombie is the only role where Heads can be antags, sets a bad precedent, enables very short rounds where command or sec as antags have a massive advantage against the rest of the crew

Technical details

https://github.com/ArchPigeon

Check JobSystem.canBeAntag() and make sure it is false for any player before assigning them as a zombie initial infected

Media

[x ] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog

:cl:

remove: Removed the ability for command or any antag-safe role to be initial infected in zombie mode

Oh god the build tests

Why this again, it was voted and suggested to reject last time.
Not having even one zombie in sec, makes zombie mode pain. Quick zombie purge, lasers distributed just in case, insta ambuzol, gg. Zombies has simply no means to rush sec without access or durability to survive armed security or civilians.
With command, sec being inital infected, there is more opportunities to strike chaos, and deal with chemistry, security at the same time. Cargo and Engineering are almost always safe.

Am I having deja va or wasn't something like this already merged (even linking to previous PR)

Am I having deja va or wasn't something like this already merged (even linking to previous PR)

it broke

Why this again, it was voted and suggested to reject last time.
Not having even one zombie in sec, makes zombie mode pain. Quick zombie purge, lasers distributed just in case, insta ambuzol, gg. Zombies has simply no means to rush sec without access or durability to survive armed security & civilians. And no, infecting one random secoff/seccadet is not enough to takeover even lobby of security department.
With command, sec being inital infected, there is more opportunities to strike chaos, and deal with chemistry, security at the same time. Cargo and Engineering are almost always safe.

I agree, zombies should be removed

Perhaps a better alternative would be to exclude command staff - but not training or security jobs. Ie HasComp CommandStaffComponent

Sec is basically command staff.
Example: Be sec.
Lure hos into mains, slap them a few times with baton.
You're now hos


AudioPlayer gives error when trying to play on device audio file on iOS : AVPlayerItemStatus.failed

AudioPlayer gives error when trying to play on device audio file on iOS : AVPlayerItemStatus.failed. Audio doesn't even start playing. On android it's working fine.
Code to reproduce :
import 'package:flutter/material.dart';
import 'dart:io' as io;

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  AudioPlayer _player = AudioPlayer();
  final url =
      '/Users/ajay/Library/Developer/CoreSimulator/Devices/C394D1D9-1355-46C4-9FED-B6F0728B963C/data/Containers/Data/Application/FAD80AED-2F99-4B46-9F71-02ADC2710FFF/Documents/xF58xz9cz43BgxmjVTyqlbuKUHN1dgbcRqwabg4p.mpga';

  @override
  void initState() {
    super.initState();
    AudioPlayer.logEnabled = true;
    _player.onPlayerError.listen((msg) {
      print('audioPlayer error : $msg');
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        backgroundColor: Colors.black12,
        body: Center(
            child: Container(
          child: FlatButton(
            child: Text('Play'),
            color: Colors.greenAccent,
            onPressed: () async {
              _player.play(url, isLocal: true);
              print(await io.File(url).exists()); // returns true
            },
          ),
        )),
      ),
    );
  }
}

I have the same bug.
SomeTimes it play but on certain audio file it won't.
Android is OK.

I am seeing the same issue. Would be great to get an update on this!

Could it be this mpga audio format is not supported? Have you checked the documentation on supported codecs? Do you have a sample file of that format so I can test myself?

Could it be this mpga audio format is not supported? Have you checked the documentation on supported codecs? Do you have a sample file of that format so I can test myself?

By the looks of it, that indeed seems to be the problem
https://www.techotopia.com/index.php/Playing_Audio_on_an_iPhone_using_AVAudioPlayer#Supported_Audio_Formats

This specific issues to be because iOS don't support mpga, so I am closing this. If anyone is facing the same issue with a supported file by iOS, please, open a new issue.

I am seeing the same issue. Would be great to get an update on this!

My issue was that the file extension on device didn't match the extension of the download url. .m4a vs .mp3. Just need to check the extension of the audio url before downloading and works fine 👍
http.Client _client = http.Client();
var req = await _client.get(Uri.parse(audioURL));
var bytes = req.bodyBytes;
String dir = (await getApplicationDocumentsDirectory()).path;
File audioFile = new File('$dir/audio.mp3'); // Audio File Extension Must Match
await audioFile.writeAsBytes(bytes);


Right associative extension method allow apparent forward reference between parameters

Compiler version
Scala 3.2.2
Minimized code
extension [C1 <: Int](c2: (C1, C2)) // C2 looks like invalid forward reference
  def ra2_:[C2 <: C1](c1: (C1, C2)): C2 =
    ???

https://scastie.scala-lang.org/4LgQkgomTNijNcj1BjhGPw
More examples here (tests all confusing situations):
https://scastie.scala-lang.org/B4eX394PQbazeycIPqWiXQ
Expectation
Should not compile
Why it happens
Right associative extension methods go through a confusing swap*, for example the method above becomes:
<extension> def ra2_:[C1 <: Int][C2 <: C1](c1: (C1, C2))(c2: (C1, C2))

Which is indeed a valid method (if you ignore the curried type clauses), even though the original is invalid
*At the time of writing, it is described incorrectly in the reference, and a fixed version for it is here
Why it matters
While it is fine to give surprising tricks to language experts, in this case, this can have very confusing repercussions for normal users:
Type C2 = String

extension [C1 <: Int](c2: (C1, C2)) // C2 looks like it is an alias of String, but is actually a subtype of Int !
  def ra2_:[C2 <: C1](c1: (C1, C2)): C2 =
    ???

How to fix it
My proposal is the following:
In case the swapped groups of clauses (leftParams  trailingUsing and rightTyParam  rightParam) have any reference to something defined in the other group, throw an error
The error should clearly explain why it is not allowed, and maybe solutions for the problem

This issue was picked for the Scala Issue Spree of tomorrow, September 24th. @dwijnand and @nmcb will be working on it. If you have any insight into the issue or guidance on how to fix it, please leave it here.


Simplified secret splitting

I'm writing this out because I've always wanted to describe this. Please feel free to ignore it.
Shamir's secret sharing involves a bunch of polynomial math I don't understand; every time I go to try and understand it I wonder what the point is, because I thought of a naive implementation for secret splitting in the common way it's done for protecting a root key.
Assumptions are: you want 3 shares with a quorum of 2, or 5 shares with a quorum of 3.
Process is:

Generate the root key you're trying to protect (256 bit key)
Generate 3 or 5 shares (256 bit shares) labeled 0..{2,4}
For each combination of quorums, hash the shares together (ordered by label) to make a quorum key
a. For 3 shares you have 3C2, 3 possible quorums, 3 quorum keys
b. For 5 shares you have 5C3, 10 possible quorums, 10 quorum keys
Wrap the root key under each quorum key; store that wrap
When you want to recover the root key, you recreate the quorum key from a quorum of shares and unwrap the root key

You store the root key wrapped 3 or 10 times, but it's super simple and it's always made me wonder why anybody bothers with Shamir.

You make it sounds like SSS is really complicated, but compared to ECC or RSA it's really not that bad. A basic understanding of it can be had with high-school algebra. The final step of performing the calculations over a Galois field is admittedly not high-school algebra, but I don't think it is really as opaque as you are making it out to be.
Your approach would work and would be secure enough for most applications, assuming you are using a modern strong hash function. You could even do away with the labels and just sort the shares by value when calculating the root key, which would make the individual "shares" one byte shorter.
However, Shamir Secret Sharing (Especially over $GF(256)$ )has some really nice properties that you don't get with your scheme. Some of these properties aren't entirely relevant in the way that I'm using it in this project, but I'll enumerate them here nonetheless:

Provably as secure as a one-time pad. You can have mathematical certainty that the only information an attacker could have about the secret if they have less than the threshold number of shares is the length of the secret. The scheme you described can only ever be as strong as the hash function.
No additional state, aside from the minimum number of shares and knowledge of the scheme being employed, needs to be kept to recover the secret. Your scheme isn't really using "shares" in the traditional sense because significant additional state (3 or 10 wrapped keys) is required in order to recover the secret. You could simply distribute that state with each share, but that would increase the size of your shares considerably.
Scalable. For example, with the $GF(256)$ version, you can have up to 255 shares, with any proportion of them being the threshold. The math works exactly the same.
It works even if you don't know the exact threshold. If, say, the threshold is 3, supplying 4 or 5 shares doesn't change the output.

SSS allows you to do weird and interesting things. For example, you could pin one or more of the shares (less than the threshold) to specific values. This would allow you to have some of the shares be actual memorable pass-phrases that don't need to be written down. You could do something similar with your scheme, but the additional state requirements present an additional burden since they cannot be memorized.
Overall, SSS has a lot going for it. You can't do much better in terms of the provable security of the scheme or the size of the shares.

I do like all those properties of Shamir. I didn't know about the provable security to the level of one-time pad before, which is cool. This finally got me to look deeper at Shamir too, and after your explanation and a reminder that I did indeed do Lagrange polynomial stuff back in high school (but not since then), it's not as complicated as I thought it might be. If I need to do something like this in the future, I could now see myself going either way with the trivial solution or with Shamir.


Better exception messages/classes

This has been discussed a bit in #108

discussion happening in #394


⚠ ClamAV has degraded performance

In 3005829, ClamAV (https://spamassassin.apache.org/) experienced degraded performance:

HTTP code: 200
Response time: 447 ms

Resolved: ClamAV performance has improved in 7b29436.


I am having problems after cloning the repo

$ make
npm WARN prefer global<EMAIL_ADDRESS>should be installed with -g
YENV= node_modules/.bin/enb make
17:29:45.792 - build started
17:29:46.230 - [rebuild] [build/build.levels] levels
17:29:46.233 - [failed] [build/build.bemdecl.js] bemdecl
17:29:46.233 - [failed] [build/build.deps.js] deps-with-modules
17:29:46.233 - [failed] [build/build.files] files
17:29:46.233 - [failed] [build/build.page.js] page-js
17:29:46.234 - [failed] [build/build.bt.js] bt-server
17:29:46.234 - [failed] [build/build.css] css-stylus-with-autoprefixer
17:29:46.234 - [failed] [build/build.pre.js] js
17:29:46.234 - build failed
17:29:46.234 - [failed] [build/build.min.css] file-copy
Error: ENOENT, open '/Users/jt3k/github/blog/build/build.bemdecl.js'
    at Error (native)
make: *** [build] Error 1

osx    v 10 10 3
nodejs v 0 12 5
I recursively set permissions 777 on all files in the project.
chmod -R 777 ./bevis-blog/

but it didn't help.

Спасибо за решение, Андрей


supporting anchor links

Using the default sheet-router/href module results in not being able to jump to anchor links when clicked or when first loading a page with a hash that's meant to point to an anchor somewhere on the page.
Supporting anchor links might not be something we want to have in choo by default, but it would be nice to have docs for it somewhere.
This is also potentially a topic for sheet-router.
Here's where I'm at currently with a solution that overrides the default href behavior:
var choo = require('choo')
var el = choo.view
var app = choo()

app.model({
  namespace: 'app',
  subscriptions: [catchLinks]
})

function catchLinks (send) {
  window.onclick = (e) => {
    const node = (function traverse (node) {
      if (!node) return
      if (node.localName !== 'a') return traverse(node.parentNode)
      if (node.href === undefined) return traverse(node.parentNode)
      if (window.location.host !== node.host) return traverse(node.parentNode)
      return node
    })(e.target)
    if (!node) return
    e.preventDefault()
    var href = node.href

    if (location.pathname !== node.pathname) {
      send('app:location', { location: href.replace(/#$/, '') })
      window.history.pushState(null, null, href)
    } else {
      if (window.location.hash !== node.hash) {
        window.location.hash = node.hash
      }
      scrollToHash(node.hash)
    }
  }
}

app.router(function (route) {
  return [
    route('/', home),
    route('/example', example)
  ]
})

var tree = app.start({ href: false })
document.body.appendChild(tree)

function home (params, state, send) {
  return el`

home

    home anchor link

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

home anchor target

    link to example anchor

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

  `
}

function example (params, state, send) {
  return el`

example page

    example anchor link

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

example anchor target

    link to home anchor

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

some text

  `
}

function scrollToHash (hash) {
  if (hash) {
    var el = document.querySelector(hash)
    window.scrollTo(0, el.offsetTop)
  }
}

agreed - think this is related to https://github.com/yoshuawuyts/sheet-router/issues/15; we should def think of a way to resolve this

We should probs do a document.querySelectorAll("[href='href_value']") and not handle the link if it returns true, cause then we've confirmed it's actually an element on the page and we kinda want the behavior to work as expected. What do you reckon?

Actually https://github.com/yoshuawuyts/sheet-router/issues/15#issuecomment-229798345 might have a better solution. Hmmm, I might need some breathing room from choo for a bit, and while this is definitely a priority it's not super pressing for the stuff I'm doing - any PR to add this would be heaps welcome!

Apparently it's possible - but should probs still fix hah - http://regl.party/api

Yeah I got that api page working with roughly the code from the example I pasted above 😄 .
I'm starting to wonder if this is a bug that needs to be fixed or if this is reasonable default behavior and we should have a good guide for showing how to override the location object. Or maybe both.
Working on adventuretron today I encountered a similar but different problem, where electron puts file:///whatever/path/to/the/index.html in location.pathname.
Did this to override it:
app.model({
    namespace: 'location',
    state: {
      pathname: '/'
    },
    reducers: {
      pathname: function (data, state) {
        return { pathname: data.pathname }
      }
    },
    subscriptions: [
      function catchLinks (send, done) {
        window.onclick = function (e) {
          var node = (function traverse (node) {
            if (!node) return
            if (node.localName !== 'a') return traverse(node.parentNode)
            if (node.href === undefined) return traverse(node.parentNode)
            if (window.location.host !== node.host) return traverse(node.parentNode)
            return node
          })(e.target)

          if (!node) return
          e.preventDefault()
          var href = node.href.replace('file://', '')

          send('location:pathname', { pathname: href.replace(/#$/, '') }, done)
        }
      }
    ]
  })

I'm thinking a separate package could be created from that traverse function (which i stole from sheetify 😸) plus maybe a little more logic, and in the choo guide we might say something like:
"hey, need to override the location model? you can use whatever-link-catching-module like this, and here's examples for overrides for electron & supporting anchor links using a subscription"
That subscription could then look a little simpler:
var catchLinks = require('whatever-link-catching-module')

subscriptions: [
  function (send, done) {
    catchLinks(function (node, location) {
      var href = node.href.replace('file://', '')
      send('location:pathname', { pathname: href.replace(/#$/, '') }, done)
    })
  }
]

Turns out there are modules that do mostly the right thing with catching links already, like: https://www.npmjs.com/catch-links

FWIW, this is a current need in my work. I'm getting around the limitation with scrollIntoView.
I'll try to find where the change belongs next I can. I gather this cuts across packages, and perhaps a few other checkboxes for 4.0.0.

So did we decide to fix this as a bug or instead decide this is a browser feature and documentation is needed to explain how to work around it?

Just had a discussion about this with @juliangruber, and we came up with the
following for hash routing:
Inline anchor tags and hash routing cannot co-exist in the same application.
You can choose one, but hash routing should be the default. This is chosen because choo is primarily intended for single page apps, and using hash routing is more in line with that.
Hash routes should be explicit in the application. They're enumerable, and
dynamic hashing can be done through partials:
// enumerable
app.router('/404', [
  [ '/foo', () => {} ],
  [ '/foo#bar', () => {} ],
  [ '/foo#baz', () => {} ],
])
// '/foo#baz' => OK
// '/foo#ohno' => ERROR

// dynamic
app.router('/404', [
  [ '/foo', () => {} ],
  [ '/foo#:baz', () => {} ],
])
// '/foo#baz' => OK
// '/foo#ohno' => OK

An option should be available to enable anchor tag routing, through:
{ anchors: true}.
Browser routing updates can be disabled as a whole through the existing option
of { history: false } - which is useful for widget-like situations.
Thoughts? - should this proposal perhaps be a separate issue?

Had a think.
No applications mixing anchor links and hash routing in a crucial way come to mind. At the same time, IMHO, I've seen plenty of applications using hash routing that should use path routing instead, and then "enable" anchor links again.
Conceptually, I don't see why an application couldn't dynamically differentiate hash-bearing history states with routing implications and hash-bearing history states with anchor links. But practically, that sounds like a nightmare. Not likely worth the effort ... or whatever weight it might add to the bundles.

I honestly feel like it should use default browser behavior when using an
a-tag, and use the router only when using a js api.
On Tue, Aug 2, 2016 at 5:04 PM, Kyle Mitchell<EMAIL_ADDRESS>wrote:

Had a think.
No applications mixing anchor links and hash routing in a crucial way come
to mind. At the same time, IMHO, I've seen plenty of applications using
hash routing that should use path routing instead, and then "enable" anchor
links again.
Conceptually, I don't see why an application couldn't dynamically
differentiate hash-bearing history states with routing implications and
hash-bearing history states with anchor links. But practically, that sounds
like a nightmare. Not likely worth the effort ... or whatever weight it
might add to the bundles.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/yoshuawuyts/choo/issues/65#issuecomment-237043443,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAmDudvsj9KRrng4zcWPlbBbv4oRNY4Sks5qb7DqgaJpZM4I7MX8
.

--
Matt McFarland
Software Engineer | @docodemore https://twitter.com/docodemore | LinkedIn
http://www.linkedin.com/pub/matthew-mcfarland/6a/b9a/135/en | Mobile:
513.638.8685 | Office:<PHONE_NUMBER> xt: 125010

I honestly feel like it should use default browser behavior when using an a-tag, and use the router only when using a js api.

@MattMcFarland Hmm, yeah that does make sense - seems in line with the rest of choo.

Conceptually, I don't see why an application couldn't dynamically differentiate hash-bearing history states with routing implications and hash-bearing history states with anchor links. But practically, that sounds like a nightmare. Not likely worth the effort ... or whatever weight it might add to the bundles.

@kemitchell Yeah, exactly - this is what I initially thought, but yeah I don't feel like the benefits outweigh the costs


Newest version is not available in Nuget repo

The latest version in nuget.org is 4.0.0. Is it possible to upload your latest version, 4.0.1, in Nuget.org?

Thanks for the fast fix!


Which lambda is used on data-driven solutions of Schrödinger equation

Data-driven solutions of partial differential equations, the lambda is given. In continuous time models of Schrödinger equation, what is the value of lambda?
Thanks.

Which lambda is used on data-driven solutions of Schrödinger equation

There is no requirement to define lambda in the inference problem. Instead, the Schrödinger equation is explicitly defined for calculation of the penalization term in the loss function (MSE_f in equation (6) in the paper).


Restructure install packages

This PR builds on top of https://github.com/SymbiFlow/symbiflow-arch-defs/pull/1731 and it performs the install step on all the devices.
It generates different packages for each device, as well as a package containing the common required scripts/utils (e.g. toolchain_wrappers, yosys scripts, python utils, etc):
The final content uploaded to GCS should look like the following:

symbidlow-arch-defs-.tar.xz
xc7a50t.tar.xz
xc7a100t.tar.xz
...

The install CI on this PR always ends up in a failure which does not allow us to verify the cause, as the log is empty. I am unsure how to debug this.

The install CI on this PR always ends up in a failure which does not allow us to verify the cause, as the log is empty. I am unsure how to debug this.

I think I figured out the issue.  Fix is coming in 1275d6c7caed0f07bcc81822815f0852b5b9c5ec .  Basically kokoro has a 100 GB max on the entire workspace, regardless of the artifact filter.  I believe we were pushing up against that limit.

Please rebase on master.

CI has finished and we have the following packages:

symbiflow toolchain
device packages.

Next steps are:

add functionality to https://github.com/SymbiFlow/symbiflow-tools-data-manager to get the latest links of all the packages, as it now it only returns one of them
modify the GH workflow to produce one link for each package
generate a conda package for the symbiflow toolchain
think on how best to download and install a required device package

I have rebased on top of master and included also fixes in https://github.com/SymbiFlow/symbiflow-arch-defs/pull/1828.
I have also disabled the 200T install CI from https://github.com/SymbiFlow/symbiflow-arch-defs/pull/1824

Minor comments. I'll take a look at the output products once done too.

Outputs look good.  Lets rename the filenames to include the git hash, and I think this is ready to go!

Outputs look good. Lets rename the filenames to include the git hash, and I think this is ready to go!

@litghost Done, I have also included the latest version of https://github.com/SymbiFlow/symbiflow-arch-defs/pull/1828


assign a customer to a different plan in the backend

if a customer has a 3 day test plan, the admin should be able to upgrade the customer to a free 14 day test plan, which is not public.
automatically update the date of the end of the contract.

manually:
update saas_contract set plan_id=8, end_date=start_date + INTERVAL '14 day' where id=2;


0.9.15 prerelease1

This early prerelease is mostly for testing of the new redpanda chart for the HA setup

Codecov Report
Patch and project coverage have no change.

Comparison is base (b0c49f0) 7.52% compared to head (0ff1525) 7.52%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@          Coverage Diff          @@
##            main   #1649   +/-   ##
=====================================
  Coverage   7.52%   7.52%
=====================================
  Files         45      45
  Lines      15446   15446
=====================================
  Hits        1163    1163
  Misses     14224   14224
  Partials      59      59

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

GitGuardian complains due to new default private key for databridge

Is this prerelease 1 or 2?

We should wait for this #1651 and then rebase


suppress vispy warning

Description

This PR addresses issue #116 and suppresses the vispy warning (about matplotlib versions when using isocurves). See #116 for a discussion of motivation. Catching the warning if currently done on the import of the window in init file of components - please let me know if it should be somewhere else.
Type of change

[x] Bug-fix (non-breaking change which fixes an issue)

How has this been tested?

[x] examples/layers.ipynb

Final checklist:

[x] My PR is the minimum possible work for the desired functionality

Hello @sofroniewn! Thanks for submitting the PR.

In the file gui/components/__init__.py, following are the PEP8 issues :

Line 18:1: E402 module level import not at top of file
Line 19:1: E402 module level import not at top of file
Line 20:1: E402 module level import not at top of file

@sofroniewn I'm generally ok with this but (a) it would be better if the catch was more specific, see skimage's expected warnings for ways to do this, and (b) can you comment on my comments in #116 that ideally we should be able to update vispy instead?

Thanks @jni I have made the catch specific for this exact warning (good idea), it should be little harm to add this now, but I agree in the long run getting the latest release from vispy sounds like the best idea. I responded to the issue, happy to sync over slack about a plan to reach out

@sofroniewn Ah, thanks for the notes on the issue. I'd presumed that, surely, a release had happened recently. Good to see skimage are not the only ones having trouble releasing in a timely manner! =P


last: 1145 -> 1170

Motivation for this change
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 108435 run on x86_64-linux 1

2 packages built:

last
tebreak

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 108435 run on x86_64-linux 1

2 packages built:

last
tebreak

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 108435 run on x86_64-darwin 1

1 package marked as broken and skipped:

tebreak

1 package built:

last