Asynchronously execute native method to generate GIF images, and the used MethodChannel causes the UI thread to block

Asynchronously execute Native method to generate GIF images, and the used MethodChannel causes the UI thread to block
Is there any good way to call Native method without blocking the UI thread?
generatingGif = true;
platformAPI
    .generateGif(id: illust.id, zipBytes: response.data!, delays: delays)
    .then((bytes) => gifBytes = bytes)
    .catchError((e) {
  Log.e('Failed to generate GIF', e);
  platformAPI.toast('Failed to generate GIF');
}).whenComplete(() => generatingGif = false);

platformAPI.platformAPI performed a particularly time-consuming operation, cause the program to freeze for a while
note: I did not use the await keyword

Hi @xiao-cao-x
Is the issue on iOS or Android?
Can you please provide your flutter doctor -v & a minimal complete reproducible code sample in a repository
Thank you

Hi @xiao-cao-x
Is the issue on iOS or Android?
Can you please provide your flutter doctor -v & a [minimal complete reproducible code sample]

flutter doctor -v
[✓] Flutter (Channel beta, 2.6.0-5.2.pre, on Microsoft Windows [Version 10.0.19043.1149], locale zh-CN)
    • Flutter version 2.6.0-5.2.pre at D:\SDK\Flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 400608f101 (7 days ago), 2021-09-15 15:50:26 -0700
    • Engine revision 1d521d89d8
    • Dart version 2.15.0 (build 2.15.0-82.2.beta)
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at D:\SDK\Android
    • Platform android-31, build-tools 31.0.0
    • ANDROID_SDK_ROOT = D:\SDK\Android
    • Java binary at: D:\IDE\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 11.0.11+9-b60-7590822)
    • All Android licenses accepted.

[✓] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[✓] Visual Studio - develop for Windows (Visual Studio Enterprise 2019 16.11.3)
    • Visual Studio at D:\IDE\Microsoft Visual Studio\2019\Enterprise
    • Visual Studio Enterprise 2019 version 16.11.31702.278
    • Windows 10 SDK version 10.0.19041.0

[✓] Android Studio (version 2021.1)
    • Android Studio at D:\IDE\Android Studio
    • 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.11+9-b60-7590822)

[✓] IntelliJ IDEA Ultimate Edition (version 2021.2)
    • IntelliJ at D:\IDE\IDEA
    • Flutter plugin version 60.1.4
    • Dart plugin version 212.5284.31

[✓] Connected device (4 available)
    • MI 9 (mobile)     • <IP_ADDRESS>:59865 • android-x64    • Android 7.1.2 (API 25)
    • Windows (desktop) • windows         • windows-x64    • Microsoft Windows [Version 10.0.19043.1149]
    • Chrome (web)      • chrome          • web-javascript • Google Chrome 93.0.4577.82
    • Edge (web)        • edge            • web-javascript • Microsoft Edge 93.0.961.47

• No issues found!

main.dart
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

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 Home(),
    );
  }
}

class Home extends StatelessWidget {
  const Home({Key? key}) : super(key: key);
  final _channel = const MethodChannel("/platform/api");

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('AppBar'),
      ),
      body: OutlinedButton(
        onPressed: () {
          _channel.invokeMethod('test1').then((result) {
            print('result:$result');
          });
        },
        child: const Text('test'),
      ),
    );
  }
}

MainActivity.kt
package com.example.example

import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.embedding.engine.plugins.FlutterPlugin
import io.flutter.plugin.common.MethodCall
import io.flutter.plugin.common.MethodChannel

class MainActivity : FlutterActivity() {
    override fun configureFlutterEngine(flutterEngine: FlutterEngine) {
        flutterEngine.plugins.add(Plugin())

    }
}

class Plugin : FlutterPlugin, MethodChannel.MethodCallHandler {
    private val pluginName = "/platform/api"

    private val methodTest1 = "test1"

    override fun onAttachedToEngine(binding: FlutterPlugin.FlutterPluginBinding) {
        MethodChannel(
            binding.binaryMessenger,
            pluginName
        ).setMethodCallHandler(this)

    }

    override fun onDetachedFromEngine(binding: FlutterPlugin.FlutterPluginBinding) {

    }

    override fun onMethodCall(call: MethodCall, result: MethodChannel.Result) {
        when (call.method) {
            methodTest1 -> {
                Thread.sleep(5000)
                result.success("The program will call print after freezing for 5 seconds.")
            }
            else -> {
                result.notImplemented()
            }
        }
    }
}

build.gradle
buildscript {
    ext.kotlin_version = '1.5.31'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.1.0-alpha11'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

app/build.gradle
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
    compileSdkVersion 30

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    kotlinOptions {
        jvmTarget = '1.8'
    }

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.example"
        minSdkVersion 16
        targetSdkVersion 30
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
        }
    }
}

flutter {
    source '../..'
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
}

Hi @xiao-cao-x
I can reproduce the behaviour better by adding FAB with print and invoking method channel then I click FAB, it doesn't print message until method channel is completed. However method channel gets called on the platform's UI thread, if you're blocking it, then it is expected that UI is blocked. Dart sends messages asynchronously but any function is performed on the UI thread, which you can't block.
"Even though Flutter sends messages to and from Dart asynchronously, whenever you invoke a channel method, you must invoke that method on the platform’s main thread"
See https://flutter.dev/docs/development/platform-integration/platform-channels for more details.
Since UI thread is blocked, any action can't be perform in the app

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

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 Home(),
    );
  }
}

class Home extends StatelessWidget {
  const Home({Key? key}) : super(key: key);
  final _channel = const MethodChannel("/platform/api");

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('AppBar'),
      ),
      body: OutlinedButton(
        onPressed: () {
          _channel.invokeMethod('test1').then((result) {
            print('result:$result');
          });
        },
        child: const Text('test'),
      ),
            floatingActionButton: FloatingActionButton(onPressed: (){
        print('FAB');
      }, child: Icon(Icons.add),)
    );
  }
}

@TahaTesser
So, I can't execute platform code asynchronously, he`ll freeze the Flutter UI, right?

@xiao-cao-x
You can perform long-running task in a background then jump the results to main thread
See https://flutter.dev/docs/development/platform-integration/platform-channels#jumping-to-the-ui-thread-in-android

Also see https://github.com/flutter/flutter/issues/22024#issuecomment-465289341 for more details on this

@TahaTesser
Can i do this?
Handler(Looper.getMainLooper()).post {
  Thread.sleep(5000)
  result.success(123)
}

@TahaTesser
Thank you i have solved it.


Picker: Clicking outside changes the picklist value

Provide a general summary of the issue here
When I select an item and click outside quickly, the picklist value changes
🤔 Expected Behavior?
The picklist value that was selected initially should be selected
😯 Current Behavior
https://github.com/user-attachments/assets/cea89802-5097-4adf-bff8-618f64361370
💁 Possible Solution
No response
🔦 Context
No response
🖥 Steps to Reproduce
https://github.com/user-attachments/assets/cea89802-5097-4adf-bff8-618f64361370
Version
3.38.1
What browsers are you seeing the problem on?
Chrome
If other, please specify.
No response
What operating system are you using?
Windows 11
🧢 Your Company/Team
No response
🕷 Tracking Issue
No response

I'm unable to reproduce on my Windows 11 machine on Chrome (131.0.06778.205) on the same docs page. What browser version are you using and are there any errors in the browser console? Can you reproduce outside of the docs page itself? Rough reproduction rate?

I can reproduce on Chrome on Mac.


Defining a 'default' app

Sorry if this is somewehre in the docs, but i didn't find anything related to it:
When executing atom without a command line argument (or clicking on it through explorer/finder),
by default atom-shell shows an information page to load an app.
Now, for packaging and releasing this really doesn't look very nice, as it should actually start the application and just pass the argument to it.
Is there a way to define a "default" app that is loaded if none is given - afterwards or in the build process?
How are you guys handling the release packaging? (I try to keep away from installers which would generate bash files or shortcuts as startpoint)

You can put a folder named app or an asar-archive app.asar under resources. The default_app will load one of them automatically. Have a look at the default_app.

Ah, now i see!
Wow, looks really clean, coming from nwjs ;)
Thanks!


Warning for benchmarking all datasets constituting the MTEB Semantic Text Similarity (STS) French leaderboard.

I want to evaluate some french embeddings models using MTEB Semantic Text Similarity (STS) task.
To do this, I took inspiration from this code run_mteb_french.py
  import logging

  from sentence_transformers import SentenceTransformer
  from mteb import MTEB

  logging.basicConfig(level=logging.INFO)
  logger = logging.getLogger("main")

  # https://huggingface.co/dangvantuan/sentence-camembert-large
  model_name = "dangvantuan/sentence-camembert-large"
  model = SentenceTransformer(model_name)

   TASK_LIST_STS = [
        "SummEvalFr",
        "STSBenchmarkMultilingualSTS",
        "STS22",
        "SICKFr"
    ]

    for task in TASK_LIST_STS:
      logger.info(f"Running task: {task}")
      evaluation = MTEB(tasks=[task], task_langs=["fr"])
      evaluation.run(model, output_folder=f"fr_results/{model_name}")

while running I have this warning about unknown tasks SummEvalFr, STSBenchmarkMultilingualSTS
& SICKFr.
WARNING:mteb.evaluation.MTEB:WARNING: Unknown tasks: SummEvalFr. Known tasks: 8TagsClustering,AFQMC,ATEC,AllegroReviews,AmazonCounterfactualClassification,AmazonPolarityClassification,AmazonReviewsClassification,AngryTweetsClassification,.....
It seems that only task "STS22" is available.
What should I do ?
Do we have any errors in run_mteb_french.py?

Hey did you install MTEB from source via pip install git+https://github.com/embeddings-benchmark/mteb.git? They are not yet in the latest release

No, I installed MTEB from PyPi.
By installing from source: pip install git+https://github.com/embeddings-benchmark/mteb.git, It's OK.
Python Test code:
from mteb import MTEB
from sentence_transformers import SentenceTransformer

model_name = 'OrdalieTech/Solon-embeddings-base-0.1'
model = SentenceTransformer(model_name)

evaluation = MTEB(task_types=['STS'], task_langs=["fr"])
evaluation.run(model, output_folder=f"fr_results/{model_name}")

Output:
STS
    - SICKFr, s2s
    - STS22, p2p, crosslingual 1 / 18 pairs
    - STSBenchmarkMultilingualSTS, s2s, multilingual 1 / 10 langs
....

So what does s2s, p2p mean?

Great! Those are explained here: https://github.com/embeddings-benchmark/mteb?tab=readme-ov-file#dataset-selection essentially it relates to the length :)


cmd/compile: opt should match rules through phis

The ssa opt pass currently abort matching if the rule go through a phis.
For example:
if c {
  y = -y
} else {
  y *= 2
}
x += y

Should be rewriten:
if c {
  x -= y
} else {
  x += y * 2
}

The necessary rules for that optimization already exists, but they can't be applied since a phi node is in the way.
When encountering a phi node opt should start a routine to apply the rule on all branches where that would remove uses of the previous values in that branch (this is because we don't want to generate dupped code that would slower) (and generate a new fallback block that applies the current operation for branches that didn't matched).
This could lead to a jump in codesize since multiple branches might have the same rules applies to them.
A pass that perform CSE but downward in the control flow would regain that lost space.
The extra compilation time cost might not be worth it.

I guess I'm missing the motivation here. In your given example the generated code would be a little bit better, sure. But I feel like that example is kind of contrived. Does this happen in real code? Can you point to some examples?
My other worry is that applying this transformation blindly would make some cases worse (at least, in code size) and maybe not help execution time at all. Is there any way to understand when performing this transformation might actually help?

I think so, I have seen this annecdotally.
I dont think there is much discussion to have without numbers.
However coding a thing to do stats on how much this optimisation would applies is I think about as much work than doing it in the first place.
In case that not clear i'm not asking for you to take time to code this, I'll (probably) send patches if my implementation is worth it.

@Jorropo Hi, please try using compilecmp, it’s very handy. It will make it easy for you to spot code differences.
It would also be nice to see pass timings and run compilebench to see the impact on compile speed.  AFAIK every optimization should try to “pay for itself” meaning it should improve the codegen enough to offset the extra time doing the optimization. I think this is extra important given the 10-15% compile time increases we have seen from generics.
I also recommend running the /tests/go1 test suite on a non noisy machine and then use benchstat to show the impact.


Modules: With* pattern doesn't translate well to the CLI

The pattern of writing modules that use With* functions to enable updates of object state in a builder-pattern/"fluent" style works pretty well for codegen clients, but looks clunky in the CLI.
@goller has a great example here: https://github.com/goller/daggerverse/blob/60619b38448b058743c52abb3dd3b94be1b1f1c0/flags/main.go#L3-L26
If you embrace the with* pattern your CLI calls look like dagger call with-flag-1 --flag 1 style-1.
 However that comes at the expense of being more clunky for codegen clients and module authors.
This issue is to discuss what we can do to improve this situation.
Some initial thoughts:

The idea that's been brought up a few times of a "constructor" function of the top-level module object would not solve the general problem, but I think it would eliminate quite a few of the cases where it's popping up today, so feels relevant here.

So in Go if your module is named Foo you should be able to write something like this (strawman proposal):
func NewFoo(arg1 string, arg2 Optional[string]) *Foo {
  return &Foo{Field1: arg1, Field2: arg2.GetOr("default")}
}

type Foo struct {
  Field1 string
  Field2 string
}

func (f *Foo) MyFunction(arg3 string) { ... }

In Python we'd just use the standard __init__
Then invoking would look like:

CLI: dagger call -m github.com/foo/foo --arg1 arg1val --arg2 arg2val my-function --arg3 arg3val
Go: dag.Foo("arg1val", FooOpts{Arg2: "arg2val"}).MyFunction("arg3val")
Python: dag.foo("arg1val", arg2="arg2val").my_function("arg3val")

This at least eliminates the cases where users are writing With* functions just because there's no other way to set fields in the module root object right now.

This is a half-baked thought at best, but I have been getting the sense that we may want to somehow formalize the concept of "setters".

We technically already generate getters for fields (more a result of how graphql works than anything), so I wonder if we should do something along the lines of autogenerating setters for fields too (while allowing users to override and provide their own if desired).
This would not only help reduce boilerplate code in modules, but I could imagine it giving a path to also allowing the CLI to turn clunky with-* subcommands into flags.
I need to sit down and think through this more, may totally break down in the details, but it feels like something could be there.

Another half-baked thought: whatever the solution is here, it's going to impact/overlap w/ support for objects as args, which will be unlocked by https://github.com/dagger/dagger/pull/6102

@shykes just reminded me of a discussion a while back about supporting execution of "language-native" one-liners, e.g. (strawman flag names):
dagger call -m github.com/foo/bar --lang=python 'dag.foo("arg1val", arg2="arg2val").my_function("arg3val")'

Or if you want to open a full interactive interpreter we can re-use dagger shell functionality. This would all work of course without actually needing the language toolchain on your local machine since we'd just be re-using module SDK functionality.
This "solves" the problem by just giving a more expressive interface to calling dagger functionality than what we can manage to fit into standard "posix-y flags".
Not mutually exclusive with other fixes and something we'll likely want to do regardless.

I've thought about the first constructor idea and I think that would be nice. 👍
Been wondering about something related to that but more like an SDK convenience. In #6117 I've created multiple object types that are modular and reusable, but they're not consumable as is externally because there's a difference in GraphQL between an object type and an input object type.
Problem is that I find myself duplicating in a top level function the constructor that the class already has:
https://github.com/dagger/dagger/blob/60bc4c985293bc45ac093ba37da47159e53244ab/sdk/python/dev/src/main/__init__.py#L118-L127
https://github.com/dagger/dagger/blob/60bc4c985293bc45ac093ba37da47159e53244ab/sdk/python/dev/src/main/docs.py#L7-L10
Which leads me to repeat not only the arguments but also their documentation and the object's, pushing me to find ways to reuse them:
https://github.com/dagger/dagger/blob/60bc4c985293bc45ac093ba37da47159e53244ab/sdk/python/dev/src/main/__init__.py#L65-L66
So I've been thinking about adding a convenience to somehow expose a function from the object's constructor automatically.
But that would extend to the main object for the model, which would make it easier to share state between multiple objects like the source code Directory.

@helderco I split the constructor idea specifically out to a separate issue here, just FYI: https://github.com/dagger/dagger/issues/6132

Since adding constructors I think we've avoided the worst of this issue and I'm not really convinced there's much more to do other than what's covered in other issues (support for inline code snippets, calling Functions from SDKs running on the host, etc.). So gonna close this out for now.


cvise: drop tests broken by pytest-flake8 update

Commit https://github.com/NixOS/nixpkgs/commit/47e7f78fcb4eb96aedeee430a0c4922bdf61d751
marked pytest-flake8 as broken. Let's demove cvise tests to restore
cvise package until upstream sorts it out.
Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.11 Release Notes (or backporting 22.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Filed https://github.com/marxin/cvise/issues/77 upstream to consider moving from pytest-flake8.

@ofborg eval

@ofborg eval


Email encryption

Any plans to support email decryption if the correct certificate is in the certificate store? Similar to how out look does this.

This would be a good feature to have, but unfortunately, the Microsoft documentation of the PST file format does not describe how encrypted emails are stored.
There are commercial tools available that can decrypt at least some encrypted email formats, so I guess they must have reverse engineered something, but I can't find anything on the Internet that reveals the secret.
So, for the moment, I won't be supporting decrypting encrypted emails.
Dijji

Thanks for getting back to me. I'm going to look into this a bit and see if I can find a way to do it..

Please reopen if you find anything out

Life events. Tell me about it. Or on second thoughts, don't! Let's just close the door and get on with the fun stuff.
XstReader, happily, already has support for opening email attachments, which means that most of the needed framework is there.
The UI is driven by the IsEmail property on the Attachment class in view.cs. You will need to modify this to return true when the attachment is an email that you can decrypt. This will cause the attachment to present as an email and give the user the option to open it.
The starting point when the attachment is opened is OpenEmailAttachment in MainWindow.xaml.cs, which opens the attachment as a message and pushes the existing message down on a stack (in case the attached message contains attached messages, which is also supported).
The real work begins with OpenAttachedMessage in XstFile.cs, which has the job of creating a Message object, with all its ancillary objects such as Attachments, from Outlook's internal tables.
You would need to modify OpenAttachedMessage to detect the encrypted state and invoke your new unpacking code in, say, OpenAttachedEncryptedMessage, instead. If you present the body of the message as either plain text, HTML or RTF, the viewer will then display it.
I hope that this quick sketch helps. Please don't hesitate to ask any further questions - this would be a very cool extension.
Dijji

Thanks for tips! I'll hit you up if I get stuck.

After I have decrypted and decoded the encrypted email I'm left with something that looks like the below(I've trimmed the signature at the end for readability). Is there some functionality you already have built to parse the below into a message object or will I need to parse it myself? I was thinking about trying to copy your creation routine in OpenAttachedMessage  and then manually modifying the fields I need to change but I thought I would ask first.
0..	*.H.÷
... .0....1.0	..+......0..	*.H.÷
... .$....lContent-Type: multipart/alternative;
	boundary="----=_NextPart_000_009C_01D40247.3F4447C0"

This is a multipart message in MIME format.

------=_NextPart_000_009C_01D40247.3F4447C0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Yes, I've been thinking the same thing.  The current method is slow.

From: Dole, Bob
Sent: Tuesday, June 12, 2018 12:09 PM
To: Jenkins, Jim<EMAIL_ADDRESS>Cc:
Subject: Example Email

Hi Jim,

We're good with this proposal:

Thanks, Bob

------=_NextPart_000_009C_01D40247.3F4447C0
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

....<meta =
http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dus-ascii"><meta name=3DGenerator content=3D"Microsoft Word 15 =
(filtered medium)">

Yes, I've been thinking =
the same thing.  The current method is slow.<o:p></o:p>=

<o:p> </o:p>
=

<o:p> </o:p>

From: Dole, Bob =

Sent: Tuesday, June 12, 2018 12:09 PM
To: =
Jenkins, Jim <jjenkins@example.com>;
Cc:=

Subject: RE: Example =
email<o:p></o:p>

<o:p> </o:p>

Hi Jim, <o:p></o:p>

<o:p> </o:p>

We’re good with =
this proposal: <o:p></o:p>

Thanks, =
Bob<o:p></o:p>

<o:p> </o:p>

------=_NextPart_000_009C_01D40247.3F4447C0--
<email signature block>

That's great progress!
I don't have anything myself. Looking around on the Internet, open source support seems surprisingly patchy, but something like this might help: https://www.codeproject.com/Articles/5759/MIME-Message-Composer-Analyser
I haven't looked at it in any detail, but the API looks the right sort of thing for building a Message object from a MIME file. However, it does need somebody with enough C++ skills to make it accessible from C#.
Dijji

I couldn't resist a quick go. I downloaded the code I sent a link to and wrapped it in a DLL. After a few code tweaks for things that have been deprecated for safety reasons over the years, it compiles quite happily into a 32 bit DLL. Here is the project:
MimeFormat.zip
I haven't tested it, or looked at converting it to Unicode or 64-bit. Have a look yourself, and see if the code offers a promising starting point.

Thanks for the link. I've been looking at this as well https://sigparser.com/developers/email-parsing/parse-raw-email/ . Can you run me through what properties of a message object ( need to be set to get it to display in the viewer? Or if you could just run me through what they all do. Initially I'm just going to try and pull out the encrypted message's html and throw it onto the screen.
I've tried setting the below but that doesn't seem to be enough to get the message to display.
m.NativeBody = BodyType.HTML;
m.BodyHtml = "<some HTML message>"

One issue I have run into so far is that it appear most of the message metadata (to/from, time, etc) are not encrypted in the attached p7m file they are in the parent message.  So I'm having to grab them from there.
Thanks for the help!

We'll probably want to consider encrypted messages with attachments at some point as well but I'm just trying to get the basics working for now.

Agreed. Simple stuff first.
You cite the two properties, that I would regard as crucial. The only way I can see that this would miss is if you never arrive at ShowMessage (in the main window code). But since this is called by  OpenEmailAttachment right after it has called your revised OpenAttachedMessage, this seems impossible. So I'm afraid this is just a question of stepping through ShowMessage to see where it goes astray.
I'm not sure about taking the other properties from the parent.: Isn't the attached message a full MIME message capable of having it's own? If it doesn't have any, you shouldn't show any.
If, on the other hand, the attachment is just there for its body, you should probably abandon the open attached mail approach and reverse the decrypted body into its parent, if you can assume that the existing body of the parent is not significant.
As for questions, you're doing fine. Blundering around in others people's code is firmly in the geek tradition (it is probably the preferred learning approach). The unspoken condition is that you will have made best efforts before asking a question, and you are passing that test comfortably.
Dijji

so I decided to do some digging and go take a look at the RFC to see for sure what an S/MIME should have in it. Unfortunately it seems rather non specific
From section 3.1 https://tools.ietf.org/html/rfc3851 :

In order to protect outer, non-content related message headers (for
instance, the "Subject", "To", "From" and "CC" fields), the sending
client MAY wrap a full MIME message in a message/rfc822 wrapper in
order to apply S/MIME security services to these headers.  It is up
to the receiving client to decide how to present these "inner"
headers along with the unprotected "outer" headers.

So then I looked to see if I could find any documentation on how exchange handled it and there wasn't a whole lot but I found this. https://docs.microsoft.com/en-us/previous-versions/tn-archive/aa995740(v=exchg.65)?redirectedfrom=MSDN

Message encryption makes the text of a message unreadable by performing an encryption operation on it when it is sent. When the message is received, the text is made readable again by performing a decryption operation when the message is read, as shown in the following figure.

That matches up with the behavior I've seen on all the encrypted emails I have looked at. Message body is encrypted but the headers are not. So maybe we are taking the wrong approach here and should just decrypt the contents when the message is first opened.
One edge case is what happened when an encrypted message  has an encrypted message as an attachment. I haven't tested that but it seems like it must just attach like a regular message or it wouldn't have the header info and then it would just have, inside it, a p7m attached.

Which approach would discard the outer body and the inner headers. This is the right solution if it is the common case.
If you want to try this out, your plug-in point is different. The precedent is EmbedAttachments in the Message class, which takes attached images and munges them into an HTML body, returning a new body.
This gets called from our old friend ShowMessage. You would need to add a new property to Message to test for the presence of an encrypted attachment, and then a new method in Message to replace the body with the encrypted attachment's contents.
Dijji

Can you help me with getting the bytes of the attachment? I tried looking at the saveattachments method in xstfile.cs but wasn't able to successfully port it into showmessage because of thew private variables etc.
From what I can tell I need to lookup the subnode tree of the attachment and then I'll need to look it up in the node DB and pull the content. Do I have that right? What is the correct way to pull that data when trying to access it in showmessage?

Also I got showing of content with NativeBody and BodyHtml  working. Not sure what i was doing before but after you confirmed I tested again and got it working.

Just noticed the xstfile property in the "MainWindow : Window" class. Will play with that.
Maybe the right answer would be to write a new method for the xstreader class that returns attachment bytes?

got this sorted :) working on it further now

In case you didn't get here, EmbedAttachments is again your precedent. You can get the contents of the attachment in a MemoryStream:
  var s = new MemoryStream();       xst.SaveAttachment(s, a);       s.Seek(0, SeekOrigin.Begin);

Hey Dijji,
I have most of this working just one major part left and I'm honestly not exactly sure how to handle it so I thought I would see if you had ideas.
Attachment... so attachments are base64 encoded in the message contents these include both things like inline images or attached pdfs doc etc. From what I can tell in a normal message you would look up their content in the NDB. My content is in this encrypted message though and not directly in the NDB.
The possible ways I could see handling this are:

Add a property to the attachment class to hold the attachment bytes
Somehow parse the bytes out of the message and incorporate them into the NDB (I don't really understand all the inner working of this so I wouldn't know where to start)
Manually updating the message object with the bytes ( this works well for inline images but not so much for other types of attachments).

Thanks for the help!

Also one other bug I'm running into:
When I set NativeBody to HTML it looks like it gets reset to RTF if I click off and then back on. Any idea why this is happeneing? My changes to the BodyHTML property stay but not the nativebody ones.

Two quick  answers.
Firstly, stay from anything to do with the NDB. There is a lot of apparatus there, and I keep my dealings with it strictly read-only. All it does in the end, anyway, is to deliver byte streams, representing message and attachment content. Use your own mechanisms, and store the results in the message and attachment objects.
On switching to RTF, I have no idea. I would add breakpoint on the property setter just after I had set it to HTML, and then run things on to see who the culprit was.

Thanks for the reply. Will definitely stay away from NDB and just operate in the attachment class.
The RTF thing turned out to be a Heisenbug for me. I'm not able to replicate it anymore. I cleaned up some of the code I implemented in between so maybe it was an issue with something I was doing and I inadvertently fixed it.
If I update the message object in showmessage should changes to the attachments for it persist between selecting messages in the UI?
At the moment I am trying to remove the p7m attachment since I have extracted the HTML contents of it and am displaying it already. That works fine the first time I select it  but the attachments list seems to reset when I select another message.
I tried following execution and watching for it in listMessages but it seems to stay empty all the way up until it gets displayed but then when I return back to it after selecting another message it has the p7m attachment back in it.

The program deliberately keeps nothing from when a given message is selected to when it is selected again. When a message is selected, its contents are read from the database into memory (Message object, et cetera). When another message is selected, this memory copy is thrown away.
This is the right thing to do for performance. Consider the case of an entire pst file being exported. By the end, every message in the file would be in memory otherwise, causing considerable bloat.
It is also the right thing to do for security. The decrypted copy of an email should be thrown away when a user stops looking at it. Also, one successful decryption does not predict another: the key may have been removed in the meantime.
So, do everything you want to do when the message is opened, and expect to do everything all over again the next time the message is selected.
Dijji

Design wise I am on board.
Behaviorally though in my tests changes to BodyHtml (and several other attributes) are persisting across selection/deselection of a given message. Do I need to hook into some deselection code somewhere to clear them or is this unexpected behavior?
It seems to me a new message object isn't being created on reselection or at least somehow it is retaining the decrypted html string in BodyHtml.

You're right. When it opens a folder, it reads all the messages in it in a minimal state so that they can be listed. However, it does not clean up content after selection when the focus moves away. This is a bug. I propose the following changes:
In message.cs, after line 140, add
   public void ClearContents ()
    {
        // Clear out any previous content
        Body = null;
        BodyHtml = null;
        Html = null;
        Attachments.Clear();
    }

In view.cs, at the beginning of SetMessage, insert
if (CurrentMessage != null)
CurrentMessage.ClearContents();
Let me know if this does the trick.

That worked great. Thanks!

Set up a pull request here https://github.com/Dijji/XstReader/pull/28 let me know if you have any questions or feedback. I learned a lot going through this :)
A couple caveats, I don't do any signature verification. Also, I did run into one email that was sent in winmail.dat format after being unencrypted and I didn't write any support for that other than being able to download it as an attachment.

The actual function of the code looks fine. I do have some stylistic and structural issues, though. Stylistically, remember that method names always begin with a capital letter.
Structurally, the main problem is your static class. I think I would have put most of what you have in ShowMessage in the Message class, along with all of your static class (which rather takes me back to the era of Visual Basic modules).
For instance, parseMessage clearly belongs on Message, as it spends all its time updating message properties. Also, if it were on Message and called something like ParseMimeBody, it would be ready for later extensions like importing mime from another source.
Similarly, with all the decryption work hanging off ShowMessage, should I choose to decrypt a message when I want to export it (it is an interesting question as to whether I should), I don't have access to that capability within the export method on Message.
It just needs a bit of hacking about with cut-and-paste, and no real functional changes. Would you like to have a go, or would you prefer me to try it myself and check in the results to the branch for your review and approval?
But on the whole, congratulations again on a nice piece of work!

Thanks for the feedback! I'll take a crack at it if you don't mind. I'll
try to do better with the pull request this time too :).
re: " should I choose to decrypt a message when I want to export it"
From my point of view I think I would lean towards decrypting when
exporting.
On Tue, Aug 4, 2020 at 7:06 AM Dijji<EMAIL_ADDRESS>wrote:

The actual function of the code looks fine. I do have some stylistic and
structural issues, though. Stylistically, remember that method names always
begin with a capital letter.
Structurally, the main problem is your static class. I think I would have
put most of what you have in ShowMessage in the Message class, along with
all of your static class (which rather takes me back to the era of Visual
Basic modules).
For instance, parseMessage clearly belongs on Message, as it spends all
its time updating message properties. Also, if it were on Message and
called something like ParseMimeBody, it would be ready for later extensions
like importing mime from another source.
Similarly, with all the decryption work hanging off ShowMessage, should I
choose to decrypt a message when I want to export it (it is an interesting
question as to whether I should), I don't have access to that capability
within the export method on Message.
It just needs a bit of hacking about with cut-and-paste, and no real
functional changes. Would you like to have a go, or would you prefer me to
try it myself and check in the results to the branch for your review and
approval?
But on the whole, congratulations again on a nice piece of work!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Dijji/XstReader/issues/15#issuecomment-668617090, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AI7ETXC6PKREMH2ZEQPMDYDR7AIU7ANCNFSM4HW2LBJQ
.

Alright think I did a little better job with the pull request this time. https://github.com/Dijji/XstReader/pull/29

Much better! I've had to turn the picky dial right up, and I'm still not finding a great deal. But here goes.

ParseMessage should be ParseMimeMessage
Why is DecryptMessage public. Why would someone outside the class use it?
Is there a misunderstanding of Encoding.UTF8.GetString(bytes);? For instance, the
comment on DecodeQuotedPrintable says it returns UTF-8. But it doesn't, it returns a string which is a UTF-16 wide string like everything else on Windows. The UTF-8 actually refers to the encoding it is assuming it will find in the byte array. Despite the comments, you seem to have those correct, but you should go round and check.
The handling around SaveAttachment and a.AttachmentBytes is rather clunky. SaveAttachment probably wants to ask the attachment if it has its own byte stream, which could have come from any source, not just from mime, and if so, use it. The counterpart to this is that some of the handling in ParseMessage should be moved into the attribute class. The long series of lines all beginning with a. is a strong indicator that encapsulation is being broken.

Done
Changed DecryptMessage and DecodeSignedMessage to private
HexDecoderEvaluator returns UTF8 encoded characters and is used as the match evaluator for DecodeQuotedPrintable. Maybe I am misunderstanding here but I assumed the regex replaced string would be UTF8 as well.
I am a bit unclear on what I should do here. Do you think I should replace the Byte[] attachmentBytes with a stream on the attachment class? Would I then do all the parsing of the mime section for the attachment in the attachment class? i.e. move the
the GetHeaders method over to there. I can see how certain things can just be determined by the attachment bytes like the attachment length or the attachMethod but other things need to be parsed out like the Filename or ContentId.

The handling around SaveAttachment and a.AttachmentBytes is rather clunky. SaveAttachment probably wants to ask the attachment if it has its own byte stream, which could have come from any source, not just from mime, and if so, use it.

this was my intention with the code below but I guess I missed the mark
   public void SaveAttachment(Stream s, Attachment a)
    {
        if (a.AttachmentBytes != null)
        {
            s.Write(a.AttachmentBytes, 0, a.AttachmentBytes.Length);
        }

Thanks for the feedback! Looking forward to learning more.

What I mean is, it cannot return a UTF-8 encoded string because there is no such thing. See https://docs.microsoft.com/en-us/dotnet/api/system.string?view=netcore-3.1
For attachment, maybe a constructor that takes filename and a byte array. Then a property to see if it has a byte array value, then if so, a property or method to retrieve it.
Even better, why doesn't that constructor just store the byte array as Content, then we can get rid of the AttachmentBytes property altogether, and remove the special casing needed to handle it?

Did most of this but ran into some issues around SaveAttachment. I wasn't able to find a way to really simplify it down because of the NDB usage.
It does seem kind of redundant since the same code/checks happen around content but I couldn't think of a way to check both before the NDB is accessed and after without separately checking if content was already set.

No, I think what you have is about as good as it gets. I'm going to merge your code into master.
Could you give me a couple of lines on what your addition does that I can include in the release notes?

How about the below:

Added support for viewing  encrypted or signed messages and their attachments if matching certificate is in user certificate store. (Does not perform signature verification)

Looks good. I will build the release shortly, though the usual regression testing will doubtless take me a few days to get through.

Just a thought and I'm not surew how you would like to handle this but we may want to add some error handling around decryption with a custom error message that says "message failed to decrypt" in mainwindow.xaml.cs (~line 572). Unless we just want it to fall back to the normal error handling.

This would be in cases, for example, where the correct cert was not in the user cert store.

This makes a lot of sense. A quiet message on the status bar when you go to open the email would be perfect. At the moment, any thrown exception would result in a message box containing the full stack trace, not nearly so helpful. Would you like to have a go at it, or should I?

Took a crack at it let me know what you think.


BeamNGpy should provide more code examples

Closing, since we are continuously updating our examples. Thanks for your input and feel free to open another issue, if you need a specific example.

Closing, since we are continuously updating our examples. Thanks for your input and feel free to open another issue, if you need a specific example.


README cleanup

The obvious spelling and formatting nits were addressed

Codecov Report

Merging #1065 into develop will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #1065   +/-   ##
========================================
  Coverage    70.47%   70.47%
========================================
  Files            1        1
  Lines        14181    14181
  Branches      4789     4789
========================================
  Hits          9994     9994
  Misses        4187     4187

Continue to review full report at Codecov.

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

Thank you!


update MAX_NUMBERS to 15 digits

What is the context of this PR?
Credit Granters and Insurance surveys require larger numbers to be collected. To be applied to numbers, units and currency.
The scenarios are on this trello card
Updated MAX_NUMBERS to 15 digits (13 whole numbers and 2 decimal points)
Updated  MAX_NUMBERS to 15 digits (15 whole numbers) and up to (6 decimal points)
Updated test_numbers, test_currency and test_unit_pattern
How to review
Functional

Open a schema for example stocks, and see if you can enter 15 digits.
It should let you enter 13 whole numbers and 2 decimal points
Open test_numbers and test the limitations. It should allow for negative numbers in some of the questions. Test, the highest and lowest ranges (via looking at the schema) to see if correct messages are sent
Open test_currency and test it and see if it works fine
Open test_unit_pattern and test if the new min-max test works with the boundaries expected

Other

Should the test_numbers be separated with two different pages (like in test_currency) so you can test negative in one page and positive in another page. Or is the way I have set it up okay
Check if tests checks out all the scenarios
Should I add more testing in the negative numbers for test_unit_pattern . Not sure which units would be the best to be tested when negative

Checklist

[ ] New static content marked up for translation
[ ] Newly defined schema content included in eq-translations repo

 Enable up to 15 digits in relevant fields (1 SP)

On the test numbers schema it is adding more errors to the error list than there are inputs when I enter a number that is too small. Numbers seem to be limited to 2 decimal places whereas I thought we would support 6?

On the test numbers schema it is adding more errors to the error list than there are inputs when I enter a number that is too small. Numbers seem to be limited to 2 decimal places whereas I thought we would support 6?

I dont seem to be getting that issue. The test currently limits the decimals to 2 but runner has already supported 6 decimals.  Same with Katies comments above I can update it to use 6 but it wont show 6 decimals on the screen it only displays up to 3 decimal points.

On the test numbers schema it is adding more errors to the error list than there are inputs when I enter a number that is too small. Numbers seem to be limited to 2 decimal places whereas I thought we would support 6?

I dont seem to be getting that issue. The test currently limits the decimals to 2 but runner has already supported 6 decimals. Same with Katies comments above, I can update it to use 6 but it wont show 6 decimals on the screen it only displays up to 3 decimal points. Up to you guys if I should change it to 6, happy to change it 👍

I suggest keeping it as is, validator enforces max 6 decimal, but schema limit might be 2 etc. There is a known issue where decimals don't format to more than 2 or 3. At the moment, live surveys only use like 2, so not an issue yet but we will need to support more for Complex 2.

On the test numbers schema it is adding more errors to the error list than there are inputs when I enter a number that is too small. Numbers seem to be limited to 2 decimal places whereas I thought we would support 6?

I dont seem to be getting that issue. The test currently limits the decimals to 2 but runner has already supported 6 decimals. Same with Katies comments above, I can update it to use 6 but it wont show 6 decimals on the screen it only displays up to 3 decimal points. Up to you guys if I should change it to 6, happy to change it 👍

In that case leave it, It could make the functional tests confusing.
As for the error I just tried it again and same thing happened, this is how I created it:

I spun up your branch
loaded the test_numbers schema
entered "-99999999999999.999999" in the first input
left the second input blank
clicked the submit button

On the test numbers schema it is adding more errors to the error list than there are inputs when I enter a number that is too small. Numbers seem to be limited to 2 decimal places whereas I thought we would support 6?

I dont seem to be getting that issue. The test currently limits the decimals to 2 but runner has already supported 6 decimals. Same with Katies comments above, I can update it to use 6 but it wont show 6 decimals on the screen it only displays up to 3 decimal points. Up to you guys if I should change it to 6, happy to change it 👍

In that case leave it, It could make the functional tests confusing. As for the error I just tried it again and same thing happened, this is how I created it:

I spun up your branch
loaded the test_numbers schema
entered "-99999999999999.999999" in the first input
left the second input blank
clicked the submit button

Is the errors not correct?. There are 3 errors, first input must be >= -1000 and must be 2 decimals max. Second input is mandatory, so 3 errors in total is correct?. Unless you meant something different.

On the test numbers schema it is adding more errors to the error list than there are inputs when I enter a number that is too small. Numbers seem to be limited to 2 decimal places whereas I thought we would support 6?

I dont seem to be getting that issue. The test currently limits the decimals to 2 but runner has already supported 6 decimals. Same with Katies comments above, I can update it to use 6 but it wont show 6 decimals on the screen it only displays up to 3 decimal points. Up to you guys if I should change it to 6, happy to change it 👍

In that case leave it, It could make the functional tests confusing. As for the error I just tried it again and same thing happened, this is how I created it:

I spun up your branch
loaded the test_numbers schema
entered "-99999999999999.999999" in the first input
left the second input blank
clicked the submit button

Just had a look, I think that is what is meant to happen, same thing occurs on the Main Branch 👍

On the test numbers schema it is adding more errors to the error list than there are inputs when I enter a number that is too small. Numbers seem to be limited to 2 decimal places whereas I thought we would support 6?

I dont seem to be getting that issue. The test currently limits the decimals to 2 but runner has already supported 6 decimals. Same with Katies comments above, I can update it to use 6 but it wont show 6 decimals on the screen it only displays up to 3 decimal points. Up to you guys if I should change it to 6, happy to change it 👍

In that case leave it, It could make the functional tests confusing. As for the error I just tried it again and same thing happened, this is how I created it:

I spun up your branch
loaded the test_numbers schema
entered "-99999999999999.999999" in the first input
left the second input blank
clicked the submit button

Is the errors not correct?. There are 3 errors, first input must be >= -1000 and must be 2 decimals max. Second input is mandatory, so 3 errors in total is correct?. Unless you meant something different.

They are correct, I was just under the impression that the design was to have one error per output. I could be wrong though


[For discussion] Attempt at documenting a public API

This PR attempts to document the public API of diagrams with the goal of reducing the footprint of the docs (and letting us keep changing internal things). I did this by writing a couple of python scripts that show off the main features with visual examples.

I think I like this approach. It is easy to do, doesn't require manually running things, and works with examples. We could also make the help part a bit more pretty and remove the notebook-y display fomat.
However the main downside is that you don't get the full docstring of every function. (and the docstrings look ugly). Alternative would be to have a separate collection of pretty doc strings and have this as a tutorial like section.

This PR also removes some of the extra mkdocs extensions. Would like to get this down to the minimal amount we need, however I do not know what a lot of them do.
@sugatoray

@srush Also, it will be nice to see it in action. Could you please set it up with your GitHub pages so the docs are available to easily see the output?
If you need help with this, please let me know.

Sure, I set it up here https://srush.github.io/pydiagrams/

@srush Beautiful! They look terrific! 💯🚀🎉

Also, could you please update the readme and remove Installation with Conda (bit of an unnecessary prelude), as you had pointed out earlier?

This PR also removes some of the extra mkdocs extensions. Would like to get this down to the minimal amount we need, however I do not know what a lot of them do.

Do you need any help with identifying which ones you could do away with?


Fix browser caching of images when using S3 upload backend

Apparently, the way we securely handle user-uploaded images on zulipchat.com prevents proper browser caching from occurring.  As described in our security model doc, when serving uploaded files, we serve a redirect to a randomly generated temporary URL in S3, to ensure that uploaded files can only be accessed by an active Zulip account with the appropriate credentials.
Unfortunately, this means that when one reloads a browser window, we get served a redirect to a different temporary S3 URL, and there's no way for the browser to know that it already has a copy of the file, even though the user-facing URLs for uploaded files (that serve the redirects) are in fact immutable.
I'm not sure if there's an architecturally sound way to fix this without requiring a Zulip server that can check cookies to be an intermediary for every request for uploaded files, which we could do, but feels wasteful.  @andersk any ideas?
https://stackoverflow.com/questions/5172630/how-do-i-display-protected-amazon-s3-images-on-my-secure-site-using-php I think describes our scenario and has no satisfying answer.  Maybe we can do something cool with service workers (https://developers.google.com/web/ilt/pwa/lab-caching-files-with-service-worker)?  I haven't played with those much, but I think a tiny bit of code that for /user_uploads URLs resolves the redirect and caches based on the pre-redirect URL might work.

If we do the service worker plan and it works, we should be sure to open a mobile app issue for doing the same technique.

We apparently had a different bug with Cache-Control in the local uploads backend, which was reported today and is fixed in c869a3bf82473efd6c3d415bb1af849b31c96a17.
Still need to fix the S3 backend issue.

Addressed by #23713.


AccessToken not supported in .net core 2.1

Above doc says not supported in 2.1 but this url says it does
https://docs.microsoft.com/en-us/dotnet/api/system.data.sqlclient.sqlconnection.accesstoken?view=netframework-4.7.2

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

ID: 31b0d33c-f88e-d50c-2926-7933940f3b92
Version Independent ID: 4aaef906-f501-6947-5d23-1b704470f09d
Content: Secure SQL Database connection with managed identity - Azure App Service
Content Source: articles/app-service/app-service-web-tutorial-connect-msi.md
Service: app-service-web
GitHub Login: @cephalin
Microsoft Alias: cephalin

@krishnasingh1818 Thanks for the feedback! I have assigned the issue to the content author to investigate further and update the document as appropriate.
@cephalin It appears there might have been an update since the original note was placed.

@krishnasingh1818 I just tested this in VS 2019 with the latest updates and it doesn't appear that 2.1 supports this property still. I don't know why the .NET Core doc says that it's supported but I've been told by .NET Core engineers in the past they would not add the property to <2.2.
#please-close


perf: optimize tfae_finish using scc

The current tfae_finish uses solve_by_elim to prove implications, but sometimes solve_by_elim doesn't have enough maxDepth to prove implications (see the new example in test/tfae.lean from MeasureTheory.Group.Action), but when we increase maxDepth, it timeouts.
This problem is solved by using scc, which is newly ported tactic.

[x] depends on: #4153

This PR/issue depends on:

leanprover-community/mathlib4#4153
By Dependent Issues (🤖). Happy coding!

Please refer to #4422.


Fixed ui render bug

Fixed a render bug caused by short circuit evaluation on the modal collapse.
A "0" would render after the wallets list if you included every wallet in the featured wallets section.
The bug happened when trying to render every wallet without showing the "More options" button.
Fixed by replacing the short circuit evaluation with a ternary operator inside the render functions.

Ah, good call. Thanks!

These packages and their dependents have been published to NPM.


Getting random 'out of range for 2/select_point'

Hey, I am seem to be having an issue with selecting Terran Barracks unit, while getting unit coordinates from feature_units. This happens rarely, however, results in a crash.
While trying to figure out what the issue is, figured I'll keep track of what coordinates I get during training. Most of the time I get results like [1, 26], [1, 29], [5, 26] or [5, 29] for x and y, even though Barracks are spawned in exact same location each time. The crash happens when I get [-2, 29] with "Argument is out of range for 2/select_point". Seems to be happening randomly, once occurred after training for 150+ episodes, then once after 400+, then after 8, etc.
Some code below.
This is how I get barracks unit info:
  barracks_list = self.get_units_by_type(obs, units.Terran.Barracks)

     if len(barracks_list) > 0:
         barracks = barracks_list[0]

def get_units_by_type (Source)
    def get_units_by_type(self, obs, unit_type):
        return [unit for unit in obs.observation.feature_units
                if unit.unit_type == unit_type]

How I select the barracks:
return actions.FUNCTIONS.select_point("select", (barracks.x, barracks.y))
Output just before error:
Game has started.
I0619 20:25:50.108715<PHONE_NUMBER>20576 sc2_env.py:433] Starting episode: 176
Barracks coord.:  1  &  26
I0619 20:25:58.141600<PHONE_NUMBER>20576 sc2_env.py:510] Episode 176 finished after 9600 game steps. Outcome: [1], reward: [0], score: [0]
episode: 176   reward: -299
..........................................................................
Game has started.
I0619 20:25:58.680646<PHONE_NUMBER>20576 sc2_env.py:433] Starting episode: 177
Barracks coord.:  5  &  26
I0619 20:26:01.617632<PHONE_NUMBER>20576 sc2_env.py:510] Episode 177 finished after 3408 game steps. Outcome: [1], reward: [1], score: [1]
episode: 177   reward: 196
..........................................................................
Game has started.
I0619 20:26:02.163400<PHONE_NUMBER>20576 sc2_env.py:433] Starting episode: 178
Barracks coord.:  1  &  29
I0619 20:26:10.197444<PHONE_NUMBER>20576 sc2_env.py:510] Episode 178 finished after 9600 game steps. Outcome: [1], reward: [0], score: [0]
episode: 178   reward: -299
..........................................................................
Game has started.
I0619 20:26:10.745496<PHONE_NUMBER>20576 sc2_env.py:433] Starting episode: 179
Barracks coord.:  -2  &  29
I0619 20:26:10.764039<PHONE_NUMBER>20576 sc2_env.py:531] Environment Close
RequestQuit command received.
unable to parse websocket frame.
Closing Application...
Terminate action already called.
Entering core terminate.
Core shutdown finished.
I0619 20:26:12.267772<PHONE_NUMBER>20576 sc_process.py:197] Shutdown gracefully.
I0619 20:26:12.268002<PHONE_NUMBER>20576 sc_process.py:182] Shutdown with return code: 0
Traceback (most recent call last):
  File "Agent.py", line 320, in <module>
    app.run(main)
  File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 274, in run
    _run_main(main, args)
  File "/usr/local/lib/python3.6/dist-packages/absl/app.py", line 238, in _run_main
    sys.exit(main(argv))
  File "Agent.py", line 313, in main
    timesteps = env.step(step_actions)
  File "/usr/local/lib/python3.6/dist-packages/pysc2/lib/stopwatch.py", line 197, in _stopwatch
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/pysc2/env/sc2_env.py", line 449, in step
    self._controllers, self._features, self._obs, actions))
  File "/usr/local/lib/python3.6/dist-packages/pysc2/lib/run_parallel.py", line 54, in run
    funcs = [f if callable(f) else functools.partial(*f) for f in funcs]
  File "/usr/local/lib/python3.6/dist-packages/pysc2/lib/run_parallel.py", line 54, in <listcomp>
    funcs = [f if callable(f) else functools.partial(*f) for f in funcs]
  File "/usr/local/lib/python3.6/dist-packages/pysc2/env/sc2_env.py", line 448, in <genexpr>
    for c, f, o, a in zip(
  File "/usr/local/lib/python3.6/dist-packages/pysc2/lib/stopwatch.py", line 197, in _stopwatch
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.6/dist-packages/pysc2/lib/features.py", line 969, in transform_action
    func, func_call.arguments))
ValueError: Argument is out of range for 2/select_point (6/select_point_act [4]; 0/screen [0, 0]), got: [[<SelectPointAct.select: 0>], [-2, 29]]
I0619 20:26:12.357553<PHONE_NUMBER>20576 sc2_env.py:531] Environment Close

I have the same problem too.


ERROR: test_creating_and_reading_multiple_sheets (pandas.io.tests.test_excel.ExcelReaderTests)

======================================================================
ERROR: test_creating_and_reading_multiple_sheets (pandas.io.tests.test_excel.ExcelReaderTests)
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/io/tests/test_excel.py", line 474, in test_creating_and_reading_multiple_sheets
for sheetname, df in dfs.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/io/tests/test_excel.py", line 475, in test_creating_and_reading_multiple_sheets
df.to_excel(ew,sheetname)
File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/io/excel.py", line 619, in exit
self.close()
File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/io/excel.py", line 623, in close
return self.save()
File "/var/tmp/portage/dev-python/pandas-0.16.1/work/pandas-0.16.1-python3_3/lib/pandas/io/excel.py", line 651, in save
return self.book.save(self.path)
File "/usr/lib64/python3.3/site-packages/openpyxl/workbook/workbook.py", line 280, in save
save_workbook(self, filename)
File "/usr/lib64/python3.3/site-packages/openpyxl/writer/excel.py", line 211, in save_workbook
writer.save(filename)
File "/usr/lib64/python3.3/site-packages/openpyxl/writer/excel.py", line 194, in save
self.write_data(archive)
File "/usr/lib64/python3.3/site-packages/openpyxl/writer/excel.py", line 88, in write_data
archive.writestr(ARC_WORKBOOK_RELS, write_workbook_rels(self.workbook))
File "/usr/lib64/python3.3/site-packages/openpyxl/writer/workbook.py", line 316, in write_workbook_rels
i += 1
UnboundLocalError: local variable 'i' referenced before assignment

pls show pd.show_versions()

Happens with version 0.16.1 and HEAD.
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.9.final.0
python-bits: 64
OS: Linux
OS-release: 4.0.2-lh
machine: x86_64
processor: Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz
byteorder: little
LC_ALL: None
LANG: en_GB.utf8
pandas: 0.16.0
nose: 1.3.6
Cython: 0.22
numpy: 1.8.2
scipy: 0.15.1
statsmodels: 0.6.1
IPython: 3.1.0
sphinx: 1.3.1
patsy: 0.3.0
dateutil: 2.4.2
pytz: 2015.2
bottleneck: 0.8.0
tables: 3.1.1
numexpr: 2.4.1
matplotlib: 1.4.3
openpyxl: 2.1.0
xlrd: 0.9.3
xlwt: 1.0.0
xlsxwriter: None
lxml: 3.4.3
bs4: 4.3.2
html5lib: 0.999
httplib2: 0.9.1
apiclient: None
sqlalchemy: None
pymysql: None
psycopg2: None

I see even more error using openpyxl-2.2.2

this looks like a problem with openpyxl itself. pls report there.

FWIW this is really a problem with distutills. setup.py install is being run on a checkout and is disregarding the manifest. Python's packaging strikes again.

Please don't mix things up. It is run on the pypi hosted tarballs.

The issue you're hitting with openpyxl is precisely because you're not using the tarball from PyPI but a checkout.

You are wrong,
here the results for 2.0.2, 2.1.0 and 2.2.2 from pypi:
======================================================================
ERROR: test_creating_and_reading_multiple_sheets (pandas.io.tests.test_excel.ExcelReaderTests)
Traceback (most recent call last):
File "/local/src/opensource/pandas/pandas/io/tests/test_excel.py", line 474, in test_creating_and_reading_multiple_sheets
for sheetname, df in dfs.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/local/src/opensource/pandas/pandas/io/tests/test_excel.py", line 475, in test_creating_and_reading_multiple_sheets
df.to_excel(ew,sheetname)
File "/local/src/opensource/pandas/pandas/io/excel.py", line 619, in exit
self.close()
File "/local/src/opensource/pandas/pandas/io/excel.py", line 623, in close
return self.save()
File "/local/src/opensource/pandas/pandas/io/excel.py", line 651, in save
return self.book.save(self.path)
File "/usr/lib64/python3.4/site-packages/openpyxl/workbook/workbook.py", line 267, in save
save_workbook(self, filename)
File "/usr/lib64/python3.4/site-packages/openpyxl/writer/excel.py", line 185, in save_workbook
writer.save(filename)
File "/usr/lib64/python3.4/site-packages/openpyxl/writer/excel.py", line 168, in save
self.write_data(archive)
File "/usr/lib64/python3.4/site-packages/openpyxl/writer/excel.py", line 86, in write_data
archive.writestr(ARC_WORKBOOK, write_workbook(self.workbook))
File "/usr/lib64/python3.4/site-packages/openpyxl/writer/workbook.py", line 231, in write_workbook
{'activeTab': '%d' % workbook.get_index(workbook.get_active_sheet()),
File "/usr/lib64/python3.4/site-packages/openpyxl/workbook/workbook.py", line 131, in get_active_sheet
return self.active
File "/usr/lib64/python3.4/site-packages/openpyxl/workbook/workbook.py", line 136, in active
return self.worksheets[self._active_sheet_index]
IndexError: list index out of range
======================================================================
ERROR: test_creating_and_reading_multiple_sheets (pandas.io.tests.test_excel.ExcelReaderTests)
Traceback (most recent call last):
File "/local/src/opensource/pandas/pandas/io/tests/test_excel.py", line 474, in test_creating_and_reading_multiple_sheets
for sheetname, df in dfs.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/local/src/opensource/pandas/pandas/io/tests/test_excel.py", line 475, in test_creating_and_reading_multiple_sheets
df.to_excel(ew,sheetname)
File "/local/src/opensource/pandas/pandas/io/excel.py", line 619, in exit
self.close()
File "/local/src/opensource/pandas/pandas/io/excel.py", line 623, in close
return self.save()
File "/local/src/opensource/pandas/pandas/io/excel.py", line 651, in save
return self.book.save(self.path)
File "/usr/lib64/python3.4/site-packages/openpyxl/workbook/workbook.py", line 280, in save
save_workbook(self, filename)
File "/usr/lib64/python3.4/site-packages/openpyxl/writer/excel.py", line 211, in save_workbook
writer.save(filename)
File "/usr/lib64/python3.4/site-packages/openpyxl/writer/excel.py", line 194, in save
self.write_data(archive)
File "/usr/lib64/python3.4/site-packages/openpyxl/writer/excel.py", line 88, in write_data
archive.writestr(ARC_WORKBOOK_RELS, write_workbook_rels(self.workbook))
File "/usr/lib64/python3.4/site-packages/openpyxl/writer/workbook.py", line 316, in write_workbook_rels
i += 1
UnboundLocalError: local variable 'i' referenced before assignment
======================================================================
ERROR: test_creating_and_reading_multiple_sheets (pandas.io.tests.test_excel.ExcelReaderTests)
Traceback (most recent call last):
File "/local/src/opensource/pandas/pandas/io/tests/test_excel.py", line 474, in test_creating_and_reading_multiple_sheets
for sheetname, df in dfs.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/local/src/opensource/pandas/pandas/io/tests/test_excel.py", line 475, in test_creating_and_reading_multiple_sheets
df.to_excel(ew,sheetname)
File "/local/src/opensource/pandas/pandas/io/excel.py", line 619, in exit
self.close()
File "/local/src/opensource/pandas/pandas/io/excel.py", line 623, in close
return self.save()
File "/local/src/opensource/pandas/pandas/io/excel.py", line 651, in save
return self.book.save(self.path)
File "/usr/lib64/python3.4/site-packages/openpyxl/workbook/workbook.py", line 280, in save
save_workbook(self, filename)
File "/usr/lib64/python3.4/site-packages/openpyxl/writer/excel.py", line 211, in save_workbook
writer.save(filename)
File "/usr/lib64/python3.4/site-packages/openpyxl/writer/excel.py", line 194, in save
self.write_data(archive)
File "/usr/lib64/python3.4/site-packages/openpyxl/writer/excel.py", line 88, in write_data
archive.writestr(ARC_WORKBOOK_RELS, write_workbook_rels(self.workbook))
File "/usr/lib64/python3.4/site-packages/openpyxl/writer/workbook.py", line 316, in write_workbook_rels
i += 1
UnboundLocalError: local variable 'i' referenced before assignment

Needs openpyxl specific tests.


Company page - when redirect from home page with tag name tag is not changing in company page

Describe the bug
when click on any of tag in top 10 company tags in home page it redirects to company page, when select multiple company and try to change the tags it shows error
Screenshots

Post
https://community.easycloudbooks.com/t/Questions or Bugs/fd124bab-1ed0-4f8b-987a-6272c9867389
Video
https://www.berrycast.com/conversations/c5a5e70e-9a9a-5174-9c1b-73020034b0e6

https://www.berrycast.com/conversations/64178c96-0689-5b08-9af5-0a8deb764d35


Update Dependencies to Stable Tauri V2 Version

This PR updates the dependencies for both the plugin and the example to the stable Tauri V2 release.
I'd also like to ask if it's possible to set the v2 branch as the default. I’d like to publish this package to npm to use it in Nuxt projects with TypeScript typing, but that isn't currently working because, coming from GitHub, only the Rust part builds while the plugin does not. Correct me if I'm wrong, but as far as I understand, using pnpm publish would publish the main branch instead of v2.

About a new release: https://github.com/FabianLars/tauri-plugin-oauth/issues/26
Also, you can publish from any branch.
I should be back at work tomorrow and will try to get to this asap.


Make the wallet more responsive for mobile

center the connect wallet button
unify paddings (add the same padding to the tx lists that are present in the e.g. search)
introduce small vertical paddings
add horizontal margins
polish up the navbar, make font smaller, center veritcally, make all the items same height (also GH icon)


[QR] Stop to update bottomRight finder position when the alignment pattern not found

Issue
Cannot read the follwing QR codes.

Cause
zxing-cpp has a unique algorithm that is not found in the original zxing.
Even when the AlignmentPattern was not found, updates the bottomRight position with its own method.
This process seems to work well when the QR code is distorted and the AlignmentPattern is hidden, but it gets to be sensitive to the distortion of the outer border of the FinderPattern.
Here is a visualization of the actual coordinates being sampled. The red dots are sample points.
You can see that a small difference in the image causes a large change in the sample point (look at the bottom right).

Solution
As with the original ZXing, if no AlignmentPattern is found, the bottomRight position is determined by simple vector calculation only.
https://github.com/zxing/zxing/blob/44267115986e7fdcb2a9629fd7986f65ab9a2670/core/src/main/java/com/google/zxing/qrcode/detector/Detector.java#L154-L165
The current QRDetector.cpp overrides bottomRight even if AlignmentPattern is not found.
https://github.com/nu-book/zxing-cpp/blob/1d4eac6c6e50c43180ea7223b977bd67716aad1c/core/src/qrcode/QRDetector.cpp#L266
Side effects
This change makes one test case fails.
https://github.com/nu-book/zxing-cpp/blob/1d4eac6c6e50c43180ea7223b977bd67716aad1c/test/samples/qrcode-2/%231314.jpg
However, this test case is very nasty because the AlignmentPattern is intentionally hidden and it is shot at an angle.
The original ZXing can't decode it, and the iOS Code Scanner can't scan it either. I think we can ignore this.

Thanks a lot for this detailed PR. I'll have a closer look in the coming days, once I find the time. One thing I noticed: your sample JPG files are empty (according to the github UI).

You can see the images with Display the rich diff button.

I checked out your samples and found that only one of them actually fails to be decoded by the old code. After some other experiments I ended up making a change that is inspired by your idea but does not break any existing test cases. Thanks for your input!

@axxel
I see https://github.com/nu-book/zxing-cpp/commit/d36bf65da889b9cb67fb83beb6b55fa0dc373bc0 .
This problem is not only version 1.
Current implementation rescues the image that has perspective angle and that has no alignmentPattern (like https://github.com/nu-book/zxing-cpp/blob/1d4eac6c6e50c43180ea7223b977bd67716aad1c/test/samples/qrcode-2/%231314.jpg), but fails in some images that is positive.
See the next image. This is version 2.

The sampling points are below.

Current
My proposal

I think we have to choose whether to rescue an image like this or  %231314.jpg.
I think in more cases it is better to rescue the image that is positive.

I see your point and would like the code to be able to detect your second example as well. That said, it is somewhat contrived, since the alignment pattern is broken/corrupt in a similar way as it is in #1314.jpg. I'll have a look and see if I find a solution that can deal with both cases (trapezoid projections and low resolution/aliasing).


add webkit prefix to audiocontext

Summary
Describe what modifications this PR brings to the project.

Adds the webkit prefix to the Audio Context for Safari users.

Checklist
All tasks below must be performed in addition to automated CI/CD checks.

[x] Changes are documented.
[ ] Tests were added, deleted, and/or updated.
[ ] Version was bumped with npm run upgrade:patch, npm run upgrade:minor or npm run upgrade:major
[x] Example was updated (if applicable).

Issue(s) adressed
Enter the issue number of the bug(s) that this PR fixes.

Closes #136

The solution offered in this PR does not actually work since the implementation of the AudioContext API is still experimental in WebKit/Safari.


Kestrel build is failing (locally and in appveyor)

Kestrel build of dev is failing both locally and in build agents
https://ci.appveyor.com/project/aspnetci/KestrelHttpServer/branch/dev
Building Microsoft.AspNet.Server.Kestrel for DNX,Version=v4.5.1
C:\projects\kestrelhttpserver\src\Microsoft.AspNet.Server.Kestrel\KestrelServer.cs(44,37): DNX,Version=v4.5.1 error CS0246: The type or namespace name 'IHttpApplication<TContext>' could not be found (are you missing a using directive or an assembly reference?)
C:\projects\kestrelhttpserver\src\Microsoft.AspNet.Server.Kestrel\Http\FrameOfT.cs(15,26): DNX,Version=v4.5.1 error CS0246: The type or namespace name 'IHttpApplication<TContext>' could not be found (are you missing a using directive or an assembly reference?)
C:\projects\kestrelhttpserver\src\Microsoft.AspNet.Server.Kestrel\Http\FrameOfT.cs(17,22): DNX,Version=v4.5.1 error CS0246: The type or namespace name 'IHttpApplication<TContext>' could not be found (are you missing a using directive or an assembly reference?)
C:\projects\kestrelhttpserver\src\Microsoft.AspNet.Server.Kestrel\Http\FrameOfT.cs(23,22): DNX,Version=v4.5.1 error CS0246: The type or namespace name 'IHttpApplication<TContext>' could not be found (are you missing a using directive or an assembly reference?)
C:\projects\kestrelhttpserver\src\Microsoft.AspNet.Server.Kestrel\KestrelServer.cs(14,34): DNX,Version=v4.5.1 error CS0535: 'KestrelServer' does not implement interface member 'IServer.Start(RequestDelegate)'

Looks related to https://github.com/aspnet/KestrelHttpServer/commit/168f4770f450d3b3ca73c2330d42c8f64661b899

@JunTaoLuo is this related to your last merge? https://github.com/aspnet/KestrelHttpServer/commit/168f4770f450d3b3ca73c2330d42c8f64661b899

@jonburney think its ok now? Upstream packages needed some time to work through?

Travis also seems to be failing: https://travis-ci.org/aspnet/KestrelHttpServer/builds/94258362

Yes, there were breaking changes in Hosting, Kestrel, and WebListener. aspnetcidev might not be updated yet (that's what travis and build.cmd depend on). aspnetvolatiledev should work if you need to get unblocked.

I believe @pranavkm is looking to fix the build after Roslyn updates broke our CI.

Resolved. Closing

Travis: https://travis-ci.org/aspnet/KestrelHttpServer
@jonburney @benaadams Please restore with the latest packages on aspnetcidev

@JunTaoLuo @pranavkm thank, will do!


Correct documentation

In the getting started section of the docs should be mentioned that voc won't build on Python3.5+.
The default version apt-get provides on Ubuntu 16.04 is 3.5+, it should be mentioned that a separate
Python 3.4+ is required.
Accordingly in the page "Contributing to VOC"
https://voc.readthedocs.io/en/latest/internals/contributing.html
there shouldn't be a reference to libpython3.5-testsuite.

Thanks for the suggestion. I can see how this would be confusing, so a documentation fix is definitely called for.

Hi, I would like to work on this.

Fixed in 0331a80. Please close this ticket


Linux build: conflict between headers and libraries.

It looks like my Code::Blocks IDE have mixed your Assimp headers or libraries with my preinstalled version on my Linux PC. Should it get fixed if I clear the value or remove the ASSIMP_DIR entry?
Also I feel that it would be nice if adding a CMake entry named USE_SYSTEM_ASSIMP for linux build.
Linux distro: Manjaro KDE 20 64bit
Toolchain: GNU Make

I will add an issue report for thT situagion in assimp as well.
流陳光<EMAIL_ADDRESS>schrieb am Do., 2. Juli 2020, 08:30:

It looks like my Code::Blocks IDE have mixed your Assimp headers or
libraries with my preinstalled version on my Linux PC. Should it get fixed
if I clear the value or remove the ASSIMP_DIR entry?
Also I feel that it would be nice if adding a CMake entry named
USE_SYSTEM_ASSIMP for linux build.
Linux distro: Manjaro KDE 20 64bit
Toolchain: GNU Make
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/SaschaWillems/Vulkan/issues/742, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARXFVG2MGPWRZ2XHLRBB6TRZQSRJANCNFSM4OOSBWJQ
.

Ops that situation!
kim kulling<EMAIL_ADDRESS>schrieb am Do., 2. Juli 2020,
08:37:

I will add an issue report for thT situagion in assimp as well.
流陳光<EMAIL_ADDRESS>schrieb am Do., 2. Juli 2020, 08:30:

It looks like my Code::Blocks IDE have mixed your Assimp headers or
libraries with my preinstalled version on my Linux PC. Should it get fixed
if I clear the value or remove the ASSIMP_DIR entry?
Also I feel that it would be nice if adding a CMake entry named
USE_SYSTEM_ASSIMP for linux build.
Linux distro: Manjaro KDE 20 64bit
Toolchain: GNU Make
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/SaschaWillems/Vulkan/issues/742, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARXFVG2MGPWRZ2XHLRBB6TRZQSRJANCNFSM4OOSBWJQ
.

I have removed ASSIMP and replaced it with a custom glTF loader based on the header-only tinyglTF, so closing this.


expose api function to get sign for a certain line

With the introduction of 'statuscolumn' it would be great if there was a function like get_sign(v:lnum) -> kind, glyph able to fetch the symbol and kind for a specific line. This could be used, for example, to customise the position of signs before/after line numbers, i.e. diagnostics on the left and gitsigns on the right

I'm not too sure about adding this kind of API. Signs are really low level. You can already do get_hunks which will return a list of hunks you can use to deduce the signs.

Yes it's possible to deduce them via get_hunks, I felt a bit unsure how to handle the data structure tho.


width of box on the left in the Sign Bank window

Could you make the box a little wider?  There is information that cannot be viewed (especially since there is no horizontal scroll).
e.g. how many occurrences are there here?

not fixed yet


Typo fix in readme

s/conntecing/connecting/

@ferhatelmas - I really appreciate your help! Just for future PRs, and other people reading this: if you can try to remember to push to ponzu-dev it helps me keep things organized. I updated the base branch to ponzu-dev and will merge into master once I have some of my commits finished.

@nilslice Sure, next time. Sorry for the inconvenience this time.

@ferhatelmas - no inconvenience at all! Thank you for the PR. :+1:


Add navigate next method

Hey, me again.
I have a workflow with neovim and tmux where I would like to just be able to go the next window/pane depending if I'm in neovim or in a tmux pane. I thought other people might be interested in such a workflow.
By default, I set the Ctrl + Space key binding as this is what I use.

I will be honest, I never heard about this kind of workflow. Could you please give an example on how you would use this functionality?
I have nothing against the idea of the PR, if people find it useful, I will accept it. I just never had the need of using more than up/down/left/right + previous window.

It's a combination of the Ctrl w + w in vim and the Ctrl b + o in tmux. It enables you to go to the next window/pane with a common key binding. It's the same as doing Ctrl + Tab in Chrome/Firefox to go to the next tab.
Does that help?

I understand what it does, I just don't see how you would use it in practice. That's why I asked for an example.
I will take a look at the PR today. At first glance it looks good. However I want to make a clear distinction between last "current window" (what is currently called "previous") and the next window by number.
If you introduce next as in "next by number", there might be confusion as to what "previous" means.
In Tmux man page, "next" and "previous" are used for windows by numbers, while "last" is used for the last (previously current) window.
Do you think we should also change this here? I.e. change "previous" to "last"..

Considering what you've described, changing "previous" by "last" would make more sense I think.

For now, I will keep the naming as it is, though I just want to make it clear for the user what each command does.


fix - make sure stroke color & width gets applied in Cross object

Motivation
Make sure that the user-supplied stroke color & width gets applied to the Cross object
Overview / Explanation for Changes
Here is the current implementation
class Cross(VGroup):
    def __init__(self, mobject, stroke_color=RED, stroke_width=6, **kwargs):
        self.stroke_color = stroke_color
        self.stroke_width = stroke_width
        VGroup.__init__(
            self,
            Line(UP + LEFT, DOWN + RIGHT),
            Line(UP + RIGHT, DOWN + LEFT),
        )
        self.replace(mobject, stretch=True)
        self.set_stroke(self.stroke_color, self.stroke_width)

VGroup.__init__ resets stroke_color and stroke_width attributes & therefore the first 2 lines in this function are nullified. As a consequence, the last line of this function ends up passing None for both the parameters
Also, there is nothing to be gained by setting the attributes, we need to simply pass the stroke_color & stroke_width to the self.set_stroke. Please see the change.
Oneline Summary of Changes

Make sure that the user-supplied stroke color & width gets applied to the Cross object
(:pr:PR NUMBER HERE)

Testing Status
Tested it using a sample script
Further Comments
No
Acknowledgements

[ X] I have read the Contributing Guidelines

Reviewer Checklist

[ ] Newly added functions/classes are either private or have a docstring
[ ] Newly added functions/classes have tests added and (optional) examples in the docs
[ ] Newly added documentation builds, looks correctly formatted, and adds no additional build warnings
[ ] The oneline summary has been included in the wiki

Would appreciate it if this can be merged as I intend to document this module this weekend. Thanks.

Thanks!


feat(release): expose architecture filter options for Platforms

Description
This PR moves the Platform architecture specifications from flags to the ImagesetConfigurationSpec. The default functionality remains unchanged ("amd64"). Since release architectures are handled in a separate manner from image architecture filtering, this has been moved to describe the Platforms in the configuration.
Type of change
Please delete options that are not relevant.

[X] New feature (non-breaking change which adds functionality)
[X] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[X] This change requires a documentation update

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

[X] Unit tests added
[X] Manually verified
[ ] Integration tests

Checklist:

[X] My code follows the style guidelines of this project
[X] I have performed a self-review of my own code
[X] I have commented my code, particularly in hard-to-understand areas
[X] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[X] I have added tests that prove my fix is effective or that my feature works
[X] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

/kind feature

cc @afflom


ddclient: Make verbose logging deactivatable.

I try to reduce unneeded logging on one of my system, so the ddclient is constantly filling my log with useless informations.
Things done

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

[ ] NixOS
[ ] macOS
[ ] Linux

[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Fits CONTRIBUTING.md.

I chose to rebase this into master in commit 0bd211d84f66975380c35386b7b19a69d1beff44.
While I agree with changing the default verbosity I thought it through and I think @sargon has a fair point in not changing the default as part of this PR. Especially if it makes this PR start to languish in PR purgatory. If anybody feels strongly about changing the default then feel free to open an issue, assign it to me, and I'll sort out less verbose defaults.


chore(ci): fix release workflow

Closes # .
Changes proposed in this pull request:

@hobynye/reviewer

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

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

GitHub release
v1.0.0

Your semantic-release bot :package::rocket:


Upgrade process should not assume the administrative user is named 'root'.

When Accumulo is configured to use Kerberos for client authentication the
administrative user is configured at security initialization. Before this
change the upgrade process would attempt to grant access to the system
namespace to the 'root' user rather than to the configured administrative
user.

tested by running a cluster using kerberos for clients through a 1.7 -> 1.9 upgrade.

Is this for systems which use the KerberosAuthenticator, but with something other than the ZKPermHandler?

It's for the Kerberos configs. The current code has hard coded the user name "root", which is extremely unlikely to be used in a kerberos set up.
the KerberosePermissionHandler base 64 encodes all the principals, so you also can't directly use ZKPermHandler on a non-encoded name (as mentioned in the comments in the code)

Okay, so I knew the Kerberos setup used its own KerberosAuthenticator, but for some reason, I misremembered it still using ZKPermHandler directly instead of indirectly via KerberosPermissionHandler, which wraps it. That was the basis of my confusion. Your fix makes sense to me now. Thanks.
While this change fixes the problem, I think the comment could be improved. I'll update my review with a proposed diff.

Nice catch, Busbey. Thanks for the thorough comments too.
LGTM

merged to master in abc19721a


Badges e instrucciones en el readme

Codecov Report

Merging #40 into master will decrease coverage by 1.28%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master      #40      +/-   ##
============================================
- Coverage     41.33%   40.05%   -1.29%
  Complexity       86       86
============================================
  Files            41       41
  Lines           375      387      +12
  Branches         13       15       +2
============================================
  Hits            155      155
- Misses          215      227      +12
  Partials          5        5

Impacted Files
Coverage Δ
Complexity Δ

...ba/algo3/controller/GenericQuestionController.java
0.00% <0.00%> (ø)
0.00 <0.00> (ø)

Continue to review full report at Codecov.

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


Field for video search required query terms

Currently there is an issue where the Pexels API queries can respond with content with irrelevant keywords.
For example, searching for "Helsinki landmarks", if there are no content with "Helsinki" tag, it just returns content with "landmarks" tag, which can be highly irrelevant (since we are looking for landmarks in Helsinki)
Add a field in the UI where you can specify keywords that have to be included in the video title, description or tags etc.

We cannot specify required terms in the Pexels API, but we can override the whole search.


Disabled button state doesn't use native semantics

We have a-btn__disabled class, which in the docs is applied to a button that doesn't have the disabled attribute set. Shouldn't we use the native semantics and set the disabled attribute on the button, ditch the custom class name, and style it accordingly?
Current behavior

a-btn__disabled class is used in place of disabled attribute.

Expected behavior

Native disabled attribute could be applied and style the button according to the a-btn__disabled style.

This would work for input and button elements, but not for button-styled a elements. Perhaps we should support both.

Ah right, yeah we should probably support both.

Like making a-text-input I believe we used a class specifically to avoid having to figure out all the attribute combinations when overriding styles. The example should be using the disabled attribute in the markup, but only to allow the browser to handle the interaction, not as a styling hook.

@jimmynotjim Sorry, what did you mean with this? Is a-text-input__disabled needed? Or is that it was added to clarify things, but wouldn't be needed?

Sorry, I completely botched that comment.
I was trying to explain why we used a-btn to capture all element types instead of something like a.btn, button.btn, input.btn similar to why we use a-text-input. I didn't mean it to sound like a-text-input__disabled and a-btn__disabled had any relationship.
The other half of my comment I was trying to say that I believe we should continue using a-btn__disabled  as the single styling hook, for the reasons that @Scotchester pointed out about links, but that the markup should still get the attribute for whatever native browser interactions exist outside styles.
TL;DR I don't think we should do a-btn[disabled] because it won't work for links and having two patterns is just one more thing to remember.

I believe the disabled attributes were all added to the docs some time ago. I think we can close this.


[3] Use Typescript in admin scripts

This PR tries to turn src/scripts/blockUser into Typescript.
Since it's the first script turned into Typescript, multiple common utilities are being rewritten to Typescript as well, which includes

The logic that generates GraphQL context (extracted from src/index to new filesrc/contextFactory)
dataloaders
user util (src/util/user)
client util (src/util/client)
CreateOrUpdateArticleReplyFeedback
Small JSDoc fix on UpdateArticleReplyStatus

coverage: 83.132% (-5.2%) from 88.316%
when pulling 9a2da2f2c4fd541fbb935ce7b8e2ccd484527ac8 on ts-scripts
into 8a1bffbef9dbd78e1de76232dd897cc85fa8f2a2 on master.


Split large content config

Coverage remained the same at 90.411% when pulling 3ea2e13b80758ff831c693b646029a30587a7bd3 on feature/Improve_code_climate into e7a5d4a32088d5b65393134ee2cff60e5781c877 on develop.