CAMEL-20404: fixes

@lburgazzoli  If this one is OK, then I'll send a fix for the other operations in a separate PR. It depends on #4.

when the process method calls 4 different operations, then its better practice to have it do it via
try catch and let sub method throw exception to ensure correct behaviour
in catch exception you set exception on exchange and invoke callback done true, and return true
then all these 4 sub methods can just return false and invoke the callback when they have an answer and are ready to continue
the current code has a few mistakes forgetting to invoke callback done(true) when an exception was thrown etc

the current code has a few mistakes forgetting to invoke callback done(true) when an exception was thrown etc

can you check it again ?

You can use getMandatoryBody(xxx) if the body MUST be present and of a given type, that gives a better error for the end user
Those Object notNull checks are usually for wiring of the classes during bootstrap etc.
For data processing then we have specialized exception for that - NoSuchHeader, InvalidBody...

I updated the tests to accommodate the latest changes, split unit from integration tests, added tests checking for required parameters and adjusted the header check to use the NoSuchHeaderException instead of the ObjectHelper.notNull.

You can use getMandatoryBody(xxx) if the body MUST be present and of a given type, that gives a better error for the end user

One challenge here is that we can only check for either nullability. It accepts only a single type (i.e.; getMandatoryBody(Points.PointStruct.class). We could try to implementer a converter, though.

mandatory body will convert to the given type if the body is not already of that

mandatory body will convert to the given type if the body is not already of that

Yeah, but what I am saying is that there's more than one possible type to be converted to.

Yeah, but what I am saying is that there's more than one possible type to be converted to.

@davsclaus @lburgazzoli this is what I meant: https://github.com/orpiske/camel/commit/0632180303b5b3c65cec3fd39a19cdb70e662d7a
This way we can use the getMandatoryBody as Claus suggested originally.
if you are OK with that, I'll send a separate PR later ... as we have gone off topic a lot here and driving Luca crazy 😆

Yeah, but what I am saying is that there's more than one possible type to be converted to.

@davsclaus @lburgazzoli this is what I meant: https://github.com/orpiske/camel/commit/0632180303b5b3c65cec3fd39a19cdb70e662d7a
This way we can use the getMandatoryBody as Claus suggested originally.
if you are OK with that, I'll send a separate PR later ... as we have gone off topic a lot here and driving Luca crazy 😆

it looks good


Using thread safe NSFileManager objects instead of shared instance

Referenced here: https://developer.apple.com/library/mac/documentation/Cocoa/Reference/Foundation/Classes/NSFileManager_Class/
Issue: #2859

I looked into this recently.
The documentation states:

The methods of the shared NSFileManager object can be called from multiple threads safely. However, if you use a delegate to receive notifications about the status of move, copy, remove, and link operations, you should create a unique instance of the file manager object, assign your delegate to that object, and use that file manager to initiate your operations.

Do you have any data showing that isn't the case?

You're right - it looks like the singleton was not thread-safe in the past and seems to be now, with some caveats. Using the unique instances might be the safer choice at the expense of allocating multiple objects since it's always been the thread-safe option, but I'll leave that choice to you. I'd be curious to see if this fix solved the crashes in #2859 - I haven't been able to replicate it.

I'll have to test this to be sure, but the user could be implementing NSFileManagerDelegate to move files on multiple threads using the defaultManager, which Apple doesn't recommend.

This method always returns the same file manager object. If you plan to use a delegate with the file manager to receive notifications about the completion of file-based operations, you should create a new instance of NSFileManager (using the init method) rather than using the shared object.

While this crash wouldn't be caused directly by anything in AFNetworking, the crash might be prevented from occurring within AFN by allocating its own instance.


Unable to build the app for Android

Platform
Flutter Mobile
Obfuscation
Disabled
Debug Info
Disabled
Doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.16.9, on Microsoft Windows [Version 10.0.19045.3930], locale cs-CZ)
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.7.1)
[√] Android Studio (version 2023.1)
[√] VS Code (version 1.86.0)
[√] Connected device (4 available)
[√] Network resources
• No issues found!
Version
7.15.0
Steps to Reproduce
Try to run app for Android
Expected Result
The app will launch
Actual Result
Launching lib\main.dart on sdk gphone64 x86 64 in debug mode...
e: file:///C:/Users/tom/AppData/Local/Pub/Cache/hosted/pub.dev/sentry_flutter-7.15.0/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt:39:39 Unresolved reference: SentryFlutter
e: file:///C:/Users/tom/AppData/Local/Pub/Cache/hosted/pub.dev/sentry_flutter-7.15.0/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt:49:21 Unresolved reference: SentryFlutter
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':sentry_flutter:compileDebugKotlin'.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
Compilation error. See log for more details

Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

Get more help at https://help.gradle.org

BUILD FAILED in 55s
Exception: Gradle task assembleTstDebug failed with exit code 1
Exited (1).
Are you willing to submit a PR?
None

Tested it on 7.15.0 and 7.16.0 with our example app, no issues here.
Looks like a cache problem?

I've tried to run flutter pub cache repair but unfortunately it did not help.

@denrase can you take a closer look here pls when you have time

@tomas-dorda Interesting, It looks like the SentryFlutterPlugin can't find SentryFlutter. What does your pubspec.yaml look like?

@denrase here is my pubspec.yaml
https://gist.github.com/tomas-dorda/eded82530ccacee6c7fad094f79d3cf8

@tomas-dorda Can't see anything out of the ordinary. I will try to reproduce this on a Windows machine.

@tomas-dorda Can't see anything out of the ordinary. I will try to reproduce this on a Windows machine.

This also happens on Mac. What is weird that in Codemagic pipeline in builds fine (for me). I think it is something with debug mode probably.

@mzdm You are experiencing the same Unresolved reference: SentryFlutter error message on mac? Could you also post your flutter doctor -v output?

flutter doctor -v

I work on the same project as @tomas-dorda
[✓] Flutter (Channel stable, 3.16.2, on macOS 13.6 22G120 darwin-arm64, locale en-CZ)
    • Flutter version 3.16.2 on channel stable at /Users/mzidek/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9e1c857886 (10 weeks ago), 2023-11-30 11:51:18 -0600
    • Engine revision cf7a9d0800
    • Dart version 3.2.2
    • DevTools version 2.28.3

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/mzidek/Library/Android/sdk
    • Platform android-34, build-tools 34.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15A240d
    • CocoaPods version 1.13.0

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

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

[✓] IntelliJ IDEA Ultimate Edition (version 2023.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin version 77.0.1
    • Dart plugin version 233.13135.65

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 13.6 22G120 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 121.0.6167.139
    ! Error: Browsing on the local area network for sma21b634aa. Ensure the device is unlocked and attached with
      a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)

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

For a quick check: can you test which minimum sentry version this occurs? might be easier that way to pinpoint where this bug was introduced

For a quick check: can you test which minimum sentry version this occurs? might be easier that way to pinpoint where this bug was introduced

We have updated from these versions
  sentry: ^7.13.2
  sentry_dio: ^7.13.1
  sentry_flutter: ^7.13.1
  sentry_hive: ^7.13.2
  sentry_logging: ^7.13.2

to versions that I sent in the pubspec.yaml before. When I checkout commits before it works alright.

Created a new flutter app (on mac) and imported the sentry dependencies you also have in the pubspec.yaml
sentry: ^7.15.0
sentry_dio: ^7.15.0
sentry_flutter: ^7.15.0
sentry_hive: ^7.15.0
sentry_logging: ^7.15.0

With minimal setup:
import 'package:flutter/material.dart';
import 'package:sentry_flutter/sentry_flutter.dart';

const String exampleDsn =
<EMAIL_ADDRESS>
void main() async {
  await SentryFlutter.init((options) {
    options.dsn = exampleDsn;
  },
  appRunner: () => runApp(const MyApp())
  );
}

The app launches without issues on a Android emulator for me.

@mzdm What kind of architecture is your emulator or device running on?

I've tried it on device

and emulator

@mzdm What kind of architecture is your emulator or device running on?

physical, android-arm64  • Android 13 (API 33)

So 7.14.0 also doesn't work?

@mzdm I also tried now with x86_64, same result. Everything works as expected. Could you also try to create a sample app, add the sentry dependencies and init Sentry? Please report back if you are still experiencing this issue.

@denrase I have this NDK error, maybe it is useful ?
[CXX1101] NDK at /Users/mzidek/Library/Android/sdk/ndk-bundle did not have a source.properties file
e: file:///Users/mzidek/.pub-cache/hosted/pub.dev/sentry_flutter-7.15.0/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt:39:39 Unresolved reference: SentryFlutter
e: file:///Users/mzidek/.pub-cache/hosted/pub.dev/sentry_flutter-7.15.0/android/src/main/kotlin/io/sentry/flutter/SentryFlutterPlugin.kt:49:21 Unresolved reference: SentryFlutter

So 7.14.0 also doesn't work?

Just tried and it does not work

in sentry flutter 7.14.0 we bumped the sentry android sdk from 6.34.0 to 7.0.0.
please check the breaking changes in the changelog it may give some hint on why this is happening.
Other than that it'd be great to get a sample app that can reproduce this

@mzdm Do you have the ndkVersion set in your project or ndk.dir in your local.properties?  Maybe some of the solutions suggested here are of help: https://stackoverflow.com/questions/64372383/ndk-at-library-android-sdk-ndk-bundle-did-not-have-a-source-properties-file

After some troubleshooting and modifications to the Android project files, I successfully managed to get the app building again. I had to make these changes:
android/app/build.gradle:
from
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.6'
    implementation("com.android.support:appcompat-v7:23.2.0")
}

to
dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3'
    implementation 'androidx.appcompat:appcompat:1.6.1'
}

android/build.gradle:
ext.kotlin_version = '1.8.22' to ext.kotlin_version = '1.7.10'
However, upon further testing, I've tried to revert these changes one by one, returning to the project's original configuration. Surprisingly, the app continued to build as before, even with the original setup restored. So I guess there could be gradle cache-related problem or something like this?

After some troubleshooting and modifications to the Android project files, I successfully managed to get the app building again. I had to make these changes:
android/app/build.gradle: from
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.6'
    implementation("com.android.support:appcompat-v7:23.2.0")
}

to
dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3'
    implementation 'androidx.appcompat:appcompat:1.6.1'
}

android/build.gradle: ext.kotlin_version = '1.8.22' to ext.kotlin_version = '1.7.10'
However, upon further testing, I've tried to revert these changes one by one, returning to the project's original configuration. After every change I ran flutter clean . Surprisingly, the app continued to build as before, even with the original setup restored. So I guess there could be gradle cache-related problem or something like this?

the same story. I spent 3 hours trying to solve this issue: changed sentry version in pubspec, change ndk version in gradle, re install android sdk, update kotlin version, clear all caches - nothing helped..
but then I have revert small piece of code in app.dart:
if (!kDebugMode) {
sent error to flutter
}
I removed this condition and did just:
...
sent error to flutter
and it woked!!
Ok. but after I rewert this condition to recheck, it didn't break anymore.
I can't get this error anymore! all my code now is the same as before I've got this error... rip.

@vladislove80 @tomas-dorda Very strange behaviour indeed, hope it was indeed just caching errors and everything works reliably from now on. Closing for now, please report back if the issue arises again. Thank you for the update!

I deleted
c:\Users\<USER>\.gradle\caches\
and
c:\Users\<user>\AppData\Local\Pub\Cache\hosted\pub.dev\
then
flutte clean
and could build again.


[BUG] - VRFKeyBadNonceOVERLAY on epoch cutover

Exernal
Summary
It has been observed running a node on private Guild Operators network that blocks minted right after epoch cutover(under 10s after cutover, exact time not confirmed but at least up to 6s) get rejected, trace: TraceForgedInvalidBlock , kind: VRFKeyBadNonceOVERLAY.
Steps to reproduce
Have a block producing node with enough stake to regularly make blocks right after epoch cutover.
Expected behavior
Blocks successfully made and adopted.
System info (please complete the following information):

OS: Ubuntu
Version: 20.04
Node version:
cardano-node 1.13.0 - linux-x86_64 - ghc-8.6
git rev 9f49515afc8ca3473cc3f1e1104765e0e357d888

Screenshots and attachments
Full JSON trace of VRFKeyBadNonceOVERLAY
{
  "at": "2020-06-19T09:00:02.13Z",
  "env": "1.13.0:c8ec2",
  "ns": [
    "cardano.node.Forge"
  ],
  "data": {
    "kind": "TraceForgedInvalidBlock",
    "reason": {
      "kind": "ValidationError",
      "error": {
        "kind": "HeaderProtocolError",
        "error": {
          "kind": "PredicateFailure",
          "failures": [
            {
              "kind": "VRFKeyBadNonceOVERLAY",
              "blockNonce": "CertifiedVRF {certifiedNatural =<PHONE_NUMBER>28758090498779421544410045289, certifiedProof = CertSimpleVRF {certU = Point<PHONE_NUMBER>362959516303148039147879<PHONE_NUMBER>085357766205839523249491, certC =<PHONE_NUMBER>9167033178960862473799130198, certS =<PHONE_NUMBER>891015280355460803085182}}",
              "currentSlot": "229501",
              "previousHashAsNonce": "Nonce 24ec739bd17a04e65b8931cc8d6a2c6e5f0eaf64f561e344ebee79c92f630a50",
              "seedNonce": "Nonce 6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d"
            }
          ]
        }
      }
    },
    "slot": 229501
  },
  "app": [],
  "msg": "",
  "pid": "3477",
  "loc": null,
  "host": "cnode-ah",
  "sev": "Error",
  "thread": "46"
}

Image from my block collector implemented in guild operators cntools script tool to get a feeling for timestamps. Epoch cutover for guild network is exactly on the hour with 30min epochs.
Shows 5 consecutive epochs for the first blocks made by my block producing node. The Hash field contains a base64 encoded representation of JSON trace like the one above.

Additional context
Genesis for Guild network:
https://github.com/cardano-community/guild-operators/blob/master/files/ptn0/files/genesis.json
We have checked if it's attempting to make a block when there is an overlay schedule with higher priority (due to d= 0.5) but this was not the case, was not on BFT schedule.
I have only ever seen the issue right after epoch cutover.

The correlation with the epoch cutover suggests there may be an issue with e.g. the amount of time that is taken for rewards calculation.

hi @nc6 is this still an issue?

Has this issue been solved?

Has this issue been solved?

Closing this. If this is still relevant please re-open.


[release-1.3] Skip populating destination service host for passthrough and blackhole

This is an automated cherry-pick of #16892

@rlenglet can we merge this before 1.3.1? Thanks!

@rlenglet Ack will do.


Support LLNL<->ARL remote vis

Is your feature request related to a problem?
Users at LLNL run Ale3d simulations on ARL systems. Some of the data produced is quite large. Users would like to do remote vis to ARL systems from LLNL.
Looked at ARL hardware and software and they don't show VisIt as a supported visualization tool there. As an aside, thats sad. We provide good customer support to ARL. I don't know what is happening.
Key logistical issues

VisIt for parallel installed on ARL hardware (in a public place)

If already, what version(s)
If not already, who can we work with to get it installed there

Any gateways between ARL and LLNL

Currently, LLNL users go through CZ systems to get to ARL

LLNL user desktop enviornments (cygwin was mentioned)
One users has supposedly successfully run serial VisIt remotely but I don't know if via client-server or X forwarding.

More info...
Ok, ARL has VisIt support. I just wasn't looking in the right place. From docs there, it appears ARL hosts VisIt executable downloads perhaps rebundled with ARL specific host profiles. I don't really know. I couldn't find any place there that had just the host profiles for ARL systems.

Some steps to confirm for user

Can s/he log in and obtain ARL VisIt downloads here
Download/obtain ARL's customzed HOST profiles from the VisIt executables ARL hosts.
To go direct from user desktop on site @ LLNL to ARL, need to open an ssh egress session. Otherwise, user must first log into CZ system.
User might need to kinit before ssh
Should be able to run client/server from deskop @ LLNL to ARL resource

Some progress...

Downloaded ARL's VisIt binaries to windows machine
Could not set envs as described because need to install kerberose credentials there
Confirmed ARL's VisIt runs and has necessary host profiles

Next steps:

Get kerberose certs on user's machine
Set env. variables as per ARL's instructions
Open ssh egress for user's machine
Attempt client/server launch on excaliber

Have put in request to ARL-HPC customer support to host the host profiles in a publicly accessible place instead of obtaining only by downloading the ARL-custom packaged VisIt binaries. No word back.

ARL help desk responded claiming doing so would represent a security risk though NONE of the information in those host profiles is any different than the information ARL itself hosts in a world-readable place about those systems.
I've aske for further justification.


Please bring back ForceSerialExecution in v11

Our application is separated into three layers: data, domain, and application.  Our architecture is based on the three-layer approach of DDD.
We use EF Core for our data layer; our domain layer uses projections to translate EF entities into domain objects and expose them to the application layer; then, finally, our GraphQL API is implemented in the application layer.  This means the GraphQL API (ideally) has no knowledge of EF Core or DbContexts or entities or anything.  All that it knows is that the domain services it interacts with are not thread-safe.  There isn't any way for the application layer to communicate to the data layer that it should use some particular DbContext.
In v10 we used ForceSerialExecution, and everything just worked.  Unfortunately it looks like this option has been replaced with DbContext pooling in v11, but that is not an alternative for us.  It seems to me that EF Core was not the only use case for ForceSerialExecution—it's generally useful when your services are not thread-safe and it's difficult to scope them outside of the context of a request.
If it's too difficult to bring back ForceSerialExecution, I'm open to other suggestions. I'm also willing to contribute if there is some way I can help to make this happen.

(Just wrote this in the slack channel but this seems a better place to discuss it)
We are running into a similar issue with migrating to v11, in our case the resolvers don't directly access the DbContext, but instead querying is delegated to other services that in turn use DI to access a DbContext.
It seems that the problem stems from HotChocolate breaking the assumptions behind the DI abstraction - that one DI scope is handling one concurrent request.
I think a simple solution to this (unless there's something I've missed) would be to create a DI scope per thread. This way nothing special even needs to be done with DbContext, as far as each service is concerned it is serving sequential requests. The DbContext can still be obtained from a pool by setting up with AddDbContextPool.

(Just wrote this in the slack channel but this seems a better place to discuss it)
We are running into a similar issue with migrating to v11, in our case the resolvers don't directly access the DbContext, but instead querying is delegated to other services that in turn use DI to access a DbContext.
It seems that the problem stems from HotChocolate breaking the assumptions behind the DI abstraction - that one DI scope is handling one concurrent request.
I think a simple solution to this (unless there's something I've missed) would be to create a DI scope per thread. This way nothing special even needs to be done with DbContext, as far as each service is concerned it is serving sequential requests. The DbContext can still be obtained from a pool by setting up with AddDbContextPool.

Alternatively, it is possible to construct a new IServiceScope on a per-field basis. This could be done as part of the field middleware, but it is a bit of a headache to replace the Services object for an existing instance of IMiddlewareContext
I also have no idea what impact this might have on performance

Alternatively, it is possible to construct a new IServiceScope on a per-field basis. This could be done as part of the field middleware, but it is a bit of a headache to replace the Services object for an existing instance of IMiddlewareContext
I also have no idea what impact this might have on performance

Another option, which is extremely cumbersome, is to make your services aware that they are part of the HotChocolate pipeline, and allow them to grab and release pooled DbContexts when necessary.
For example:
public abstract class DbContextClient<TDbContext> : IDisposable where TDbContext : DbContext
    {
        private readonly IDbContextFactory<TDbContext> dbContextFactory;
        private TDbContext dbContext;

        public DbContextClient(IDbContextFactory<TDbContext> dbContextFactory)
        {
            this.dbContextFactory = dbContextFactory;
        }

        public void Dispose()
        {
            if(dbContext != null)
            {
                dbContext.Dispose();
                dbContext = null;
            }
        }

        protected TDbContext DbContext
        {
            get
            {
                if(dbContext == null)
                {
                    dbContext = dbContextFactory.CreateDbContext();
                }
                return dbContext;
            }
        }
    }

    public class UseScopedServiceAttribute : ObjectFieldDescriptorAttribute
    {
        private static readonly MethodInfo _useScopedService =
            typeof(ScopedServiceObjectFieldDescriptorExtensions)
                .GetMethod(
                    nameof(ScopedServiceObjectFieldDescriptorExtensions.UseScopedService),
                    BindingFlags.Public | BindingFlags.Static)!;

        private static readonly MethodInfo _getService =
            typeof(ServiceProviderServiceExtensions)
                .GetMethod(
                    nameof(ServiceProviderServiceExtensions.GetService),
                    BindingFlags.Public | BindingFlags.Static)!;

        private static readonly MethodInfo _dispose =
            typeof(UseScopedServiceAttribute)
                .GetMethod(
                    nameof(UseScopedServiceAttribute.Dispose),
                    BindingFlags.NonPublic | BindingFlags.Static)!;

        private readonly Type _service;

        public UseScopedServiceAttribute(Type service)
        {
            _service = service;
        }

        public override void OnConfigure(
            IDescriptorContext context,
            IObjectFieldDescriptor descriptor,
            MemberInfo member)
        {
            var createType = System.Linq.Expressions.Expression.GetFuncType(typeof(IServiceProvider), _service);
            var create = _getService.MakeGenericMethod(_service).CreateDelegate(createType);

            var disposeType = System.Linq.Expressions.Expression.GetActionType(typeof(IServiceProvider), _service);
            var dispose = _dispose.MakeGenericMethod(_service).CreateDelegate(disposeType);

            _useScopedService.MakeGenericMethod(_service).Invoke(null, new object?[] { descriptor, create, dispose, null });
        }

        private static void Dispose<TService>(IServiceProvider serviceProvider, TService service)
        {
            if(service is IDisposable)
            {
                ((IDisposable)service).Dispose();
            }
        }
    }

With the above, you can inherit your services from DbContextClient and use [UseScopedService(typeof(MyService))] on your resolver method.
I do not think this is a good solution as it is very invasive to existing services. It would make far more sense to have HotChocolate provide a scope per thread (or per field if that wouldn't impact performance), but can serve as a temporary workaround

Another option, which is extremely cumbersome, is to make your services aware that they are part of the HotChocolate pipeline, and allow them to grab and release pooled DbContexts when necessary.
For example:
public abstract class DbContextClient<TDbContext> : IDisposable where TDbContext : DbContext
    {
        private readonly IDbContextFactory<TDbContext> dbContextFactory;
        private TDbContext dbContext;

        public DbContextClient(IDbContextFactory<TDbContext> dbContextFactory)
        {
            this.dbContextFactory = dbContextFactory;
        }

        public void Dispose()
        {
            if(dbContext != null)
            {
                dbContext.Dispose();
                dbContext = null;
            }
        }

        protected TDbContext DbContext
        {
            get
            {
                if(dbContext == null)
                {
                    dbContext = dbContextFactory.CreateDbContext();
                }
                return dbContext;
            }
        }
    }

    public class UseScopedServiceAttribute : ObjectFieldDescriptorAttribute
    {
        private static readonly MethodInfo _useScopedService =
            typeof(ScopedServiceObjectFieldDescriptorExtensions)
                .GetMethod(
                    nameof(ScopedServiceObjectFieldDescriptorExtensions.UseScopedService),
                    BindingFlags.Public | BindingFlags.Static)!;

        private static readonly MethodInfo _getService =
            typeof(ServiceProviderServiceExtensions)
                .GetMethod(
                    nameof(ServiceProviderServiceExtensions.GetService),
                    BindingFlags.Public | BindingFlags.Static)!;

        private static readonly MethodInfo _dispose =
            typeof(UseScopedServiceAttribute)
                .GetMethod(
                    nameof(UseScopedServiceAttribute.Dispose),
                    BindingFlags.NonPublic | BindingFlags.Static)!;

        private readonly Type _service;

        public UseScopedServiceAttribute(Type service)
        {
            _service = service;
        }

        public override void OnConfigure(
            IDescriptorContext context,
            IObjectFieldDescriptor descriptor,
            MemberInfo member)
        {
            var createType = System.Linq.Expressions.Expression.GetFuncType(typeof(IServiceProvider), _service);
            var create = _getService.MakeGenericMethod(_service).CreateDelegate(createType);

            var disposeType = System.Linq.Expressions.Expression.GetActionType(typeof(IServiceProvider), _service);
            var dispose = _dispose.MakeGenericMethod(_service).CreateDelegate(disposeType);

            _useScopedService.MakeGenericMethod(_service).Invoke(null, new object?[] { descriptor, create, dispose, null });
        }

        private static void Dispose<TService>(IServiceProvider serviceProvider, TService service)
        {
            if(service is IDisposable)
            {
                ((IDisposable)service).Dispose();
            }
        }
    }

With the above, you can inherit your services from DbContextClient and use [UseScopedService(typeof(MyService))] on your resolver method.
I do not think this is a good solution as it is very invasive to existing services. It would make far more sense to have HotChocolate provide a scope per thread (or per field if that wouldn't impact performance), but can serve as a temporary workaround

relevant: #2735

relevant: #2735

Alternatively, it is possible to construct a new IServiceScope on a per-field basis. This could be done as part of the field middleware, but it is a bit of a headache to replace the Services object for an existing instance of IMiddlewareContext
I also have no idea what impact this might have on performance

This could be a good solution.
I will have a look at this.

Alternatively, it is possible to construct a new IServiceScope on a per-field basis. This could be done as part of the field middleware, but it is a bit of a headache to replace the Services object for an existing instance of IMiddlewareContext
I also have no idea what impact this might have on performance

This could be a good solution.
I will have a look at this.

We would actually not need to have this on every field but on those accessing certain services ...

We would actually not need to have this on every field but on those accessing certain services ...

So... I now have a branch with this capability, but it introduces new issues with the DataLoader and other APIs that would now reset on those fields. It also introduces other issues with scoped services that are specifically scoped to the request ...

So... I now have a branch with this capability, but it introduces new issues with the DataLoader and other APIs that would now reset on those fields. It also introduces other issues with scoped services that are specifically scoped to the request ...

So... I now have a branch with this capability, but it introduces new issues with the DataLoader and other APIs that would now reset on those fields. It also introduces other issues with scoped services that are specifically scoped to the request ...

Do you think these issues are solvable or is it a fundamental problem with the approach?
If it's not possible to have a separate context per field, then maybe a better approach might be to allow fields to opt in to serial execution. Fields that do this go into a queue to guarantee serial execution. I think this kind of thing might be necessary, because if a context per field is not possible, then fields and services themselves cannot be insulated from being aware that they are executed concurrently. In that situation, the only options are a) the field/service is aware of concurrent execution and is able to cooperate in carrying it out, or b) the field cannot cooperate for one reason or another so concurrent execution should not be attempted with that field

So... I now have a branch with this capability, but it introduces new issues with the DataLoader and other APIs that would now reset on those fields. It also introduces other issues with scoped services that are specifically scoped to the request ...

Do you think these issues are solvable or is it a fundamental problem with the approach?
If it's not possible to have a separate context per field, then maybe a better approach might be to allow fields to opt in to serial execution. Fields that do this go into a queue to guarantee serial execution. I think this kind of thing might be necessary, because if a context per field is not possible, then fields and services themselves cannot be insulated from being aware that they are executed concurrently. In that situation, the only options are a) the field/service is aware of concurrent execution and is able to cooperate in carrying it out, or b) the field cannot cooperate for one reason or another so concurrent execution should not be attempted with that field

think this kind of thing might be necessary, because if a context per field is not possible, then fields and services themselves cannot be insulated from being aware that they are executed concurrently.

Actually depending on your approach you can already use scoped-services for a field.

Do you think these issues are solvable or is it a fundamental problem with the approach?

We are looking at various approaches to this problem. We have not found one that we at this moment like. The idea with the queue was one of them. The fundamental issue here is that not all features work with this. I fundamentally believe that we should not introduce something that introduces issues to other aspects of Hot Chocolate like batching.
We will have a look at solving the problem probably for version 11.2.

think this kind of thing might be necessary, because if a context per field is not possible, then fields and services themselves cannot be insulated from being aware that they are executed concurrently.

Actually depending on your approach you can already use scoped-services for a field.

Do you think these issues are solvable or is it a fundamental problem with the approach?

We are looking at various approaches to this problem. We have not found one that we at this moment like. The idea with the queue was one of them. The fundamental issue here is that not all features work with this. I fundamentally believe that we should not introduce something that introduces issues to other aspects of Hot Chocolate like batching.
We will have a look at solving the problem probably for version 11.2.

Serial execution behavior is now handled by the query plans. This means that everything that cannot be executed in parallel is executed serially. However, Microsofts recommendation is to use parallel execution with pooled dbcontexts for performance.
https://youtu.be/4k3WzW2ZdXs


fossid-webapp: Change some extension functions return type

As explained in the toList function, the FossID server is not
consistent. It usually returns a List or a Map, but if there is no
entry, it returns data:false.
The toList function abstracts this behaviour, but we nevertheless need
a Kotlin representation that could be all these types at once, to be
able to deserialize them from JSON.
That's why we are forced to use EntityPostResponseBody in
several functions. However such generic placeholder is not nice for
API users. Therefore this commit changes the return type of the
extension functions and inline the toList call.
Signed-off-by: Nicolas Nobelis<EMAIL_ADDRESS>

I like the idea of https://github.com/bosch-io/oss-review-toolkit/commit/39d2e162924adfd62876194510a58cd432488e3d to use custom deserializers to completely get rid of the toList() function. (That's the goal, right?) Please try to implement that approach. I already found some nits to address in your POC commit, but we can address there later as part of a real PR review.

Replaced by https://github.com/oss-review-toolkit/ort/pull/4045.


Make local variable final to avoid compiler warning.

Motivation:
In my previous commit I introduced a compiler warning by not making
a local variabe final.
Modifications:
Make the variable final.
Result:
No more warnings.

@Scottmitch Mi Scusi :-).

@buchgr - No problem :)  Thanks for the PR!
Can you also clean up the imports for DefaultHttp2ConnectionEncoderTest.java

-import static org.mockito.Mockito.reset;

and DefaultHttp2RemoteFlowControllerTest.java

-import io.netty.handler.codec.http2.Http2RemoteFlowController.FlowControlled;

done

Maybe it is best to pull the on going conversation from PR #3456 to here:

@buchgr - I agree about pulling the code apart would be good to avoid if we can. I would just like to make sure that the original exception trace is not lost here. For example what about having cancel take a Throwable argument (or add another internal cancel method with a parameter)? Just some way to have the streamError call propagate the exception (i.e. use the other streamError method with the Throwable argument).

@nmittler - WDYT?

@Scottmitch Yup, I agree :).  I think allowing cancel to take a Throwable makes sense (or maybe just overloading the cancel).

@Scottmitch That's a good point. We shouldn't lose it. Maybe logging it is enough? I am just thinking, if we pass the Exception to cancel(Throwable t) and we rethrow it once cancel cleared the queue, what should happen if cancel also throws an Exception?

@buchgr - Let me clarify some terminology to be sure we are talking about the same thing.  What I am suggesting is to pass the Throwable as an argument to the streamError method here. Is this what you mean by "rethrow"?  If cancel() throws an exception I think we are in trouble because we are already trying to propagate an INTERNAL_ERROR.  I'm not sure what to do here yet, some cases the exception will be caught higher up, and some may go back to the caller of the writeXXX method.  Perhaps we could open another issue/PR for this if it becomes a problem, or we have a better idea how to handle it?

@Scottmitch not that's not what I meant. Thanks for clarifying. Yes I think passing the Throwable to streamError makes sense. I ll add it to this PR.

@buchgr - Ping me when the updates are made and we can cherry-pick.

@buchgr - Is this still on your TODO list?

@Scottmitch completely forgot about this. will do asap.

@Scottmitch PTAL

@buchgr - Just 1 question and then I will cherry pick.

Cherry picked into 4.1 (8e04d70) and master (c884847)
Thanks @buchgr!

@buchgr thanks for the patch and thanks to @Scottmitch for taking care!


Incorrect comparer implementation causes infinite loop

RetryingHttpClientWrapper.cs contains the WeightedRandomComparer class that implements IComparer<int> in a way that involves rolling random numbers. This implementation does not pass basic sanity check for the comparer: Compare(a,b) == -Compare(b,a). Specifically, for the case when array of zeroes is attempted to be sorted it causes the sort implementation to loop infinitely.
Specifically in case of Gallery, if both instances of search service are considered down, eventually, each request that involves the subsequent request to the search service would create a thread with an infinite loop inside of it. So after few dozens of such requests we'd have Gallery machines completely unresponsive.

Found the paper offering efficient solution for the problem: http://utopia.duth.gr/~pefraimi/research/data/2007EncOfAlg.pdf

Even worse, the instance of the WeightedRandomComparer is declared static, created once and exists for the life time of the process. It does not contain any synchronization logic inside and uses the object of Random class which is not thread safe.

We will move to traffic manager: https://github.com/NuGet/NuGetGallery/issues/5700


Gifs are static

Hi,
since the removal of the awtrixid feature I've changed the icons to url mode. Sadly the GIF icons don't move at all and are static.
What do I have to do to get moving icons?
Cheers
Marco

here's an example:
- url: https://developer.lametric.com/content/apps/icon_thumbs/5582_icon_thumb.gif
  id: ella

I see what I did wrong. I'll try again with the correct URL fortmat.

I see, the automagic scaling of  gif-icons isn't working all the time. But tat is port of the librarys that come from esphome and beyond my scope.
So i made a note in the README.md


bug Address not mapped to object.

version 19.3.3
Linux 4.14.62-70.117.amzn2.x86_64
always down with this message
2019.02.20 03:06:28.703276 [ 65 ] {}  BaseDaemon: ########################################
2019.02.20 03:06:28.703345 [ 65 ] {}  BaseDaemon: (from thread 39) Received signal Segmentation fault (11).
2019.02.20 03:06:28.703357 [ 65 ] {}  BaseDaemon: Address: 0x7f487c180000
2019.02.20 03:06:28.703364 [ 65 ] {}  BaseDaemon: Access: write.
2019.02.20 03:06:28.703371 [ 65 ] {}  BaseDaemon: Address not mapped to object.
2019.02.20 03:06:28.749636 [ 65 ] {}  BaseDaemon: 0. clickhouse-server() [0x4b1df41]
2019.02.20 03:06:28.749683 [ 65 ] {}  BaseDaemon: 1. clickhouse-server(DB::DataTypeString::deserializeBinaryBulk(DB::IColumn&, DB::ReadBuffer&, unsigned long, double) const+0x2ad) [0x4b2119d]
2019.02.20 03:06:28.749702 [ 65 ] {}  BaseDaemon: 2. clickhouse-server(DB::MergeTreeReader::readData(std::string const&, DB::IDataType const&, DB::IColumn&, unsigned long, bool, unsigned long, bool)+0x406) [0x51a85a6]
2019.02.20 03:06:28.749712 [ 65 ] {}  BaseDaemon: 3. clickhouse-server(DB::MergeTreeReader::readRows(unsigned long, bool, unsigned long, DB::Block&)+0x2c1) [0x51a8cc1]
2019.02.20 03:06:28.749721 [ 65 ] {}  BaseDaemon: 4. clickhouse-server() [0x51a39d3]
2019.02.20 03:06:28.749729 [ 65 ] {}  BaseDaemon: 5. clickhouse-server(DB::MergeTreeRangeReader::DelayedStream::finalize(DB::Block&)+0x46) [0x51a4916]
2019.02.20 03:06:28.749751 [ 65 ] {}  BaseDaemon: 6. clickhouse-server(DB::MergeTreeRangeReader::continueReadingChain(DB::MergeTreeRangeReader::ReadResult&)+0x123) [0x51a5c53]
2019.02.20 03:06:28.749762 [ 65 ] {}  BaseDaemon: 7. clickhouse-server(DB::MergeTreeRangeReader::read(unsigned long, std::vector<DB::MarkRange, std::allocatorDB::MarkRange >&)+0x7f6) [0x51a6736]
2019.02.20 03:06:28.749770 [ 65 ] {}  BaseDaemon: 8. clickhouse-server(DB::MergeTreeBaseSelectBlockInputStream::readFromPart()+0x5f0) [0x519fb60]
2019.02.20 03:06:28.749778 [ 65 ] {}  BaseDaemon: 9. clickhouse-server(DB::MergeTreeBaseSelectBlockInputStream::readImpl()+0xb2) [0x51a0fa2]
2019.02.20 03:06:28.749788 [ 65 ] {}  BaseDaemon: 10. clickhouse-server(DB::IBlockInputStream::read()+0x1f5) [0x4a93c25]
2019.02.20 03:06:28.749798 [ 65 ] {}  BaseDaemon: 11. clickhouse-server(DB::ExpressionBlockInputStream::readImpl()+0x1a) [0x4fe3e4a]
2019.02.20 03:06:28.749806 [ 65 ] {}  BaseDaemon: 12. clickhouse-server(DB::IBlockInputStream::read()+0x1f5) [0x4a93c25]
2019.02.20 03:06:28.749814 [ 65 ] {}  BaseDaemon: 13. clickhouse-server(DB::ExpressionBlockInputStream::readImpl()+0x1a) [0x4fe3e4a]
2019.02.20 03:06:28.749821 [ 65 ] {}  BaseDaemon: 14. clickhouse-server(DB::IBlockInputStream::read()+0x1f5) [0x4a93c25]
2019.02.20 03:06:28.749829 [ 65 ] {}  BaseDaemon: 15. clickhouse-server(DB::ParallelInputsProcessorDB::UnionBlockInputStream::Handler::loop(unsigned long)+0x101) [0x4bc0c41]
2019.02.20 03:06:28.749839 [ 65 ] {}  BaseDaemon: 16. clickhouse-server(DB::ParallelInputsProcessorDB::UnionBlockInputStream::Handler::thread(std::shared_ptrDB::ThreadGroupStatus, unsigned long)+0x1fb) [0x4bc119b]
2019.02.20 03:06:28.749866 [ 65 ] {}  BaseDaemon: 17. clickhouse-server(ThreadFromGlobalPool::ThreadFromGlobalPool<DB::ParallelInputsProcessorDB::UnionBlockInputStream::Handler::process()::{lambda()#1}>(DB::ParallelInputsProcessorDB::UnionBlockInputStream::Handler::process()::{lambda()#1}&&)::{lambda()#1}::operator()() const+0x58) [0x4bc15f8]
2019.02.20 03:06:28.749877 [ 65 ] {}  BaseDaemon: 18. clickhouse-server(ThreadPoolImplstd::thread::worker(std::_List_iteratorstd::thread)+0x199) [0x5d9e1b9]
2019.02.20 03:06:28.749884 [ 65 ] {}  BaseDaemon: 19. clickhouse-server() [0x65c272f]
2019.02.20 03:06:28.749892 [ 65 ] {}  BaseDaemon: 20. /lib64/libpthread.so.0(+0x754b) [0x7f5334e8254b]

Can you describe the circumstances?
Like a select / other actions happened just before the failure? You can also check it in clickhouse-server.log (if enabled)

many sql runs,so  not very sure which sql cause it, maybe (because below sql is runs heavy and long time)
CREATE TABLE files ( rank_date Date,  filename String,  filetime Int64,  content String) ENGINE = MergeTree PARTITION BY rank_date ORDER BY filetime SETTINGS index_granularity = 81920;
CREATE TABLE files_new ( rank_date Date CODEC(ZSTD(3)),  filename String CODEC(ZSTD(3)),  filetime Int64 CODEC(ZSTD(3)),  content String CODEC(ZSTD(3))) ENGINE = MergeTree PARTITION BY rank_date ORDER BY filetime SETTINGS index_granularity = 81920;
============================================
insert into files_new select * from files;
after about 2 hour ....  Address not mapped to object occur
run twice/die twice ,all about two hours after execute it
clickhouse-client -q "insert into files_new select * from files where rank_day='2019-01-01'"
clickhouse-client -q "insert into files_new select * from files where rank_day='2019-01-02'"
clickhouse-client -q "insert into files_new select * from files where rank_day='2019-01-03'"
clickhouse-client -q "insert into files_new select * from files where rank_day='2019-01-04'"
.......
day by day
run once/die once, also  about two hours after execute first sql
one day of files table size raw size 17G, lz4 compressed size 5G,about 18,000,000 rows


Additional validation test for ray-tracing implementation

We implemented a new test to validate our raytracing implementation.
Instead of running the N-body simulation, the snapshots at different scale factors are generated by using the same linear power spectrum  at the scale factor a=0.5229969 (with the order set to 1).
The following image shows a comparison between the Jax-cosmo linear power spectrum (dashed line)  and the 3D Power spectrum computed for each snapshot :

Then, we exported the lens planes, created the Convergence map and  computed the angular power spectrum from it.
The final angular power spectrum is obtained averaging over 20 samples.
We also tried to investigate the behaviour of the angular power spectrum for large scale for different values of the field and  Box size.
In particular we adopted the following setting:

Number of lens = 22  (or 11 for Boxsize =200 Mpc^3)
Simulated Volume = 100 Mpc^3  (or 200 Mpc^3 for Number of lens = 11  )
nc = 128
field size = 5x5 deg^2 or (10x10 deg^2)
Convergence map resolution = 512 (or 1024 for 10x10 deg^2)
Lensplane resolution: 256

The specific setting can be found here
To follow, the result of 4 setting combinations compared to the Jax-cosmo linear power spectrum.

The two vertical lines indicate the scale l=300 and l=3000.

I made the  notebook run with different configurations.
What follows is part of the results of our tests.
1. Number of lens = 44 / 22 / 11  (according to the  simulated Volume)
2. Simulated Volume = 50 / 100 / 200  Mpc^3
3. nc = 128
4. field size = 5x5 deg^2
5. Convergence map resolution = 512
6. Lensplane resolution = 256

We were surprised to see how the change of the Box size from 100 to 200  Mpc^3 impacts the small scales, but how the small scales remain unchanged from 100 to 50 Mpc^3.
This can be seen in the matter power spectrum in the snapshots, we don't see any difference between the following plot (obtained with Box size=50 Mpc^3) and the one posted in the message above (Box size=100 Mpc^3)

We also expected a greater impact on the large scale, but we can see that the Box size affects only very large scale, larger than 300, out of range of "l" we are interested to.
1. Number of lens = 22
2. Simulated Volume = 100 Mpc^3
3. nc = 128
4. field size = 5x5 deg^2
5. Convergence map resolution = 512
6. Lensplane resolution = 256 / 512

As we can see, the lensplane resolution affect the angular power spectrum as well.
This is owning to the fact that an higher lensplane resolution has a lower smoothing effect, this causes an extra in power for the small scale but also a jump in the curve (caused by greater noise).
1. Number of lens = 22
2. Simulated Volume = 100 Mpc^3
3. nc = 128
4. field size = 5x5 deg^2 /  10x10 deg^2 /
5. Convergence map resolution = 512 / 1024
6. Lensplane resolution = 256

As we can see, the field doesn't seem to have a particular impact on the angular power spectrum.

After having seen how the change in the Box size impacts the power spectrum we decided to compute an additional test generating the snapshots by using a linear power spectrum at the scale factor of 2.0.
The  following results are computed with this setting :

Number of lens = 22
Simulated Volume = 50 Mpc^3
nc = 128
field size = 5x5 deg^2
Convergence map resolution = 512
Lensplane resolution = 128 / 256

As we can see, with a lensplane resolution = 128 we can reach enough power to match the theoretical power spectrum without introduce more noise.

number of lens 22? for 50 Mpc box?

@EiffL sorry!  I've just corrected, I used 44 lens and scale factor of 0.2

I implemented this new test running the N-body simulation with the following setting:
box_size=50.
nc = 128
nsteps=40

The following image shows a comparison between the Jax-cosmo non linear power spectrum  and the 3D Power spectrum computed for each snapshot.
Each snapshot at a specific scale factor is created twice, by two different values of the force resolution factor (B).


In the fileexplorer demo the left-handside links don't work

here is what it looks like

I am able to click on the navigation links (middle-right) and on the folders, but nothing happens when I click on the left-hand side links.
I'm on OSx and here is the npm install nodewebkit logs:

I use nwjs 0.15 and 0.16, encounter this error when pressing "About" link
Error: Invalid value for argument 2. Property 'toolbar': Unexpected property.
    at validate (extensions::schemaUtils:34:13)
    at Object.normalizeArgumentsAndValidate (extensions::schemaUtils:117:3)
    at Object.<anonymous> (extensions::binding:414:30)
    at Object.about (chrome-extension://npfnmehgalggmdjddldgojjmnapbkmgd/main.js:18:34)
    at HTMLAnchorElement.onclick (chrome-extension://npfnmehgalggmdjddldgojjmnapbkmgd/index.html:33:65)

I have to remove 'toolbar' property in the param object to call gui.Window.open()


Feature Request: Hot Key for Clear Results - Interactive Window

From @drcrook1 on December 13, 2016 15:0
This would be a pretty slick feature.
Also, changing the red text to a brighter red for VS code folks who use the dark theme :D
Copied from original issue: DonJayamanne/pythonVSCode#578

@DonJayamanne Which one is the "interactive window"?


Added Warning state for AME

About the PR
Added new Warning state for AME that triggered when stability < 80
Added new sprite for Warning state of AME.
Why / Balance
Warning state should allow more careful operation of overloaded AME, making personal more aware of the core current stability. I also hope that new state will encourage players to engage more with "overloading" mechanic of AME since core state would be more clear.
Technical details
Added new enumerator value. No high level systems should be affected.
Media
https://github.com/space-wizards/space-station-14/assets/23162722/c171fb26-7d3c-4731-93ca-33e824dc12e9

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

Breaking changes

Changelog

add: AME console new "warning" state (yellow console graph) when stability of the core below 80

Changelog needs to read like a sentence on its own, "AME console new 'warning state" is unclear what's going on.


Use ::create instead of new in GridFieldDetailForm_ItemRequest

Updates instances of new X to X::create so that Silverstripe classes will respect dependency injection
supersedes https://github.com/silverstripe/silverstripe-framework/pull/10789

This has been released as 5.0.3


’ rendered on the homepage snippets

’ rendered on the homepage snippets. On the individual pages, the text renders just fine. This is on my localhost.
Politicians don’t understand

Hugo Static Site Generator v0.78.2/extended linux/amd64 BuildDate: 2020-11-13T14:10:43Z
GOOS="linux"
GOARCH="amd64"
GOVERSION="go1.15.4"

@morariu Hi, I've tested it in my machine, and it works well.

I just pasted Politicians don’t understand, and my hugo version is 0.78.2. I have not tested it in extended version, but I guess this is irrelevant with that.
If there is anything else that can help you, I am willing to help.

Thanks. It must be from my side.


keyboardDisplayRequiresUserAction acts as if it's always false

Bug description:
I've tested keyboardDisplayRequiresUserAction set to true, false or unset. On test uri https://www.macrotrends.net/2616/president-trump-stock-market-performance, input box is always focused and keyboard always opens without user interactivity.
I tested this to be true on iPhone X on 12.3, iOS simulators 12.2 and 11.4.
To Reproduce:
<WebView
  keyboardDisplayRequiresUserAction={true}
  useWebKit={true}
  originWhitelist={['*']}
  source={{ uri: 'https://www.macrotrends.net/2616/president-trump-stock-market-performance' }}
/>

Expected behavior:
WebView should behave this way only if keyboardDisplayRequiresUserAction={false} explicitly
Screenshots/Videos:

Environment:

OS: iOS
OS version: 12.2, 12.3, 11.4
react-native version: 0.59.8
react-native-webview version: 6.1.0

Related: https://github.com/react-native-community/react-native-webview/pull/540

I figured out what the bug is but not how to fix it, I don't know objc.
I have multiple webviews. First webview had keyboardDisplayRequiresUserAction={false}, subsequent webviews have keyboardDisplayRequiresUserAction={true}. The first webview is the culprit, that if 1 has the prop set to false, any subsequent webviews would behave as if it's false regardless of what keyboardDisplayRequiresUserAction is set to on subsequent webviews. This is bugged.
I worked around by simply not trying to programmatically activate keyboard in first webview, and set all webview's keyboardDisplayRequiresUserAction to true. This works fine, all webviews cannot activate keyboard without user action.

keyboardDisplayRequiresUserAction not working in UIWebView -_-

Pretty sure I just came across this issue and its almost 3 years later.  Any chance this was ever looked at?

This is still an issue...


feature/NotifyNetworkConstantChange

Description
Please include a summary of the change and which issue is fixed.
Add new job global constants
Group network safety job and global constants
Add tests
Please also include relevant motivation and context.
The network has global constant which are used by all nodes. When such a constant changes the users should get a notification and be informed.
THOR-8 Network Constant Change Notification
Fixes (issue)
Improvements
Did you improve something? Why did you do this? Why do you think it's better?
How Has This Been Tested?
Sequential tests changing the global state and comparing the expected outcome with the actual.
Checklist:
If you have any comments regarding one of these points just write it down.

[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

Much cleaner!

Much cleaner!


Removed unused references and fixed some of the ref. paths to /lib.

thank you! (didn't realize this wasn't building cleanly)


Unity Project doesn't work

I downloaded the project as a ZIP hoping to successfully test the Image Tracking.
However once built, the ImageTracking scenes do not work, the only thing that appears is a black screen.
Any help is kindly appreciated.
I used Unity 2019.4.1f1.

Same here any update on this issue?

Would be nice if you guys could drop some browser console logs, without that it will be hard to help you.

As we already said, the image tracking feature is super experimental and compatible with a few Android devices.
Where did you test your build?
Was it an Android device?
Did you use chrome? Did you enable the WebXR experimental features?
Can you post any logs?

WebAR is works fine in Unity 2019.4.1f1.
The device is iphone se2. Safari and Chrome both works.
But the WebXR always black screen.
Which devices can support WebXR for Android or IOS?

As of today, WebXR is not available on iOS devices.


Update WritingTests.md

I wasn't able to query the DOM with .find() until I called Enzyme with mount() or render() instead of shallow()

Ah, good call. Thanks!


[xgb] Add GPU support for XGBoost

Upgrade XGBoost to 1.6.1
Change-Id: Id6a6cc911e4a382ccaa94a962d89fad6208c48fc
Description
Brief description of what this PR is about

If this change is a backward incompatible change, why must this change be made?
Interesting edge cases to note here

Codecov Report

Merging #1680 (bbc6991) into master (bb5073f) will decrease coverage by 1.44%.
The diff coverage is 61.61%.

@@             Coverage Diff              @@
##             master    #1680      +/-   ##
============================================
- Coverage     72.08%   70.64%   -1.45%
- Complexity     5126     5452     +326
============================================
  Files           473      510      +37
  Lines         21970    24049    +2079
  Branches       2351     2619     +268
============================================
+ Hits          15838    16990    +1152
- Misses         4925     5750     +825
- Partials       1207     1309     +102

Impacted Files
Coverage Δ

api/src/main/java/ai/djl/modality/cv/Image.java
69.23% <ø> (-4.11%)
:arrow_down:

...rc/main/java/ai/djl/modality/cv/output/Joints.java
71.42% <ø> (ø)

.../main/java/ai/djl/modality/cv/output/Landmark.java
100.00% <ø> (ø)

...main/java/ai/djl/modality/cv/output/Rectangle.java
72.41% <ø> (ø)

...i/djl/modality/cv/translator/BigGANTranslator.java
21.42% <ø> (-5.24%)
:arrow_down:

...odality/cv/translator/BigGANTranslatorFactory.java
33.33% <0.00%> (+8.33%)
:arrow_up:

...nslator/InstanceSegmentationTranslatorFactory.java
14.28% <0.00%> (-3.90%)
:arrow_down:

.../ai/djl/modality/cv/translator/YoloTranslator.java
8.33% <0.00%> (-0.50%)
:arrow_down:

.../modality/cv/translator/YoloTranslatorFactory.java
8.33% <0.00%> (-1.67%)
:arrow_down:

...i/djl/modality/cv/translator/YoloV5Translator.java
5.38% <0.00%> (-0.31%)
:arrow_down:

... and 251 more

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 75e6c25...bbc6991. Read the comment docs.


Format multi-word currency unit as on website

Title explains it all - I have noticed that on the website, if you have a currency unit like bar of gold, the plural will be bars of gold. In the app, it will show as bar of golds. This change is untested as I have no android build suite set up (I am no Android dev). I am sorry about that.
Edit: Love your app, by the way!

Thanks for contributing! And thank you for pointing out this issue as well.
The implementation here assumes that the first word in the currency unit will always be pluralized. This works for bar of gold, but it doesn't work for something like golden bar (which returns goldens bar).
I recommend using a regex pattern like (?i)(.+) of .+ instead to check if the currency unit follows the pattern x of y (which NS seems to pluralize for every case), then pluralizing everything inside the capturing group.
Do you know if NS has other special pluralization cases besides this?

That sounds like a solid approach. A good regex seems to be ^(.+?)( of .+)?$ (https://repl.it/CJ7s)
I have not noticed any other special pluralization rules yet.

I think this regex should cover all eventualities :smile:

Looks good, thank you so much for your help! I'll merge it to master and push it on the next update. :)
If you don't mind, can I add your name (or username if you prefer) to a list of contributors within the app?

I would be honored :)


Update Fig 1

For the 2 figures, the authors have to add a legend with the colors directly in the figure for better readability.
The copyright on Figure 1 is not compatible with the Creative Common license of GigaScience.
The caption for figure 1 should tell which are the starting compound used to produce the methane.

I asked via email and http://www.kegg.jp/feedback/ for permission to use the figure.

---------------------------- Original Message ----------------------------
Subject: Re: [KEGG/GenomeNet] KEGG
From<EMAIL_ADDRESS>Date:    Tue, May 26, 2015 8:29 am
To<EMAIL_ADDRESS>Dear Andreas Bremges,
You are welcome to use the "Methane metabolism (map 00680)" in your
publication of "GigaScience" as long as its original source is acknowledged.
Also we accept you use this image under the CC-BY.
http://www.kegg.jp/kegg/kegg1.html
Sincerely,
Miwako Karikomi

KEGG/GenomeNet Support Team
http://www.kegg.jp/feedback/
http://www.genome.jp/feedback/

Hello,
I intend to use a colored KEGG pathway map (created via your website) in a future publication:
https://github.com/metagenomics/2015-biogas-cebitec/blob/master/latex_src/map00680.png
However, it is copyrighted by Kanehisa Labs. I want to publish under a CC-BY license in GigaScience. Do I have your permission to do so?
Our university is a KEGG subscriber, if that makes any difference.
Thanks,
Andreas Bremges
---[ sender info ]---
Name  : Andreas<EMAIL_ADDRESS>Affil : Bielefeld University
Date  : 2015/05/22(Fri) 22:58:27
Host  : <IP_ADDRESS> ()
Agent : Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36

The caption for figure 1 should tell which are the starting compound used to produce the methane.

This can be addressed in our response (I think). Starting compounds are allover the place.


User Dashboard: Wishlist - Select and Delete Products on Wishlist

This screen allows users to select and delete products added to their wishlist.

Design a screen that allows users select and delete items from their wishlist
The selected item should easily be noticed from unselected products.
Design a confirmation pop up that allows users to confirm if they really want to delete those products
Design a simple alert that informs the user that the product has been successfully deleted from their wishlist
Design must be fully responsive (desktop, tablet and mobile views must be created).
Ensure you use the colors and typography on the style guide to ensure consistency.

hey @Cisco-A this is a design issue, not development😢😢

@nhorah but the design that fits the description is already on the Figma page and that's what I developed... Did I just waste my time?🙂💔

@Cisco-A no you didn't😂😂
All the designs are ready but designers haven't added their contributions to GitHub
We are just adding the contributions

@nhorah oh okay... So what's the label for issues we're to develop? Or there isn't any yet?

@Cisco-A just check through but "design" labels are for design issues
Well done

@nhorah alright, thanks.


BEJEWELED GAME ADDED

PR Description 📜
Please include summary related to the issue you have fixed and describe your PR in brief over here by specifying the issue number on which you were working below
Bejeweled is a puzzle game where the player's objective is to swap adjacent gems in a grid to create matches of three or more identical gems. When a match is made, those gems are removed from the grid, and new gems fall from the top to fill the empty spaces.
Fixes #5059

Mark the task you have completed ✅

[x] I follow CONTRIBUTING GUIDELINE & CODE OF CONDUCT of this project.
[x] I have performed a self-review of my own code or work.
[x] I have commented my code, particularly in hard-to-understand areas.
[x] My changes generates no new warnings.
[x] I have followed proper naming convention showed in CONTRIBUTING GUIDELINE
[x] I have added screenshot for website preview in assets/images
[ ] I have added entries for my game in GameZone's README.md
[x] I have added README.md in my Game folder
[ ] I have added working video of the game in README.md (optional)
[x] I have specified the respective issue number for which I have requested the new game.
[ ] I have added my Game to gamesData.json file and it is loading properly on main website as intended.

Add your screenshots(Optional) 📸
--

Thank you soo much for contributing to our repository 💗

Thank you @shellygarg10 ,for creating the PR and contributing to our GameZone 💗
Review team will review the PR and will reach out to you soon! 😇
Make sure that you have marked all the tasks that you are done with ✅.
Thank you for your patience! 😀

Hey @shellygarg10, You have reached your limit to contribute in GameZone with a score of 160.
We believe in giving equal opportunity to everyone so you will not be able to contribute to GameZone now onwards. 💗
Thank you for your valuable time and contribution in GameZone 🕹!
Your merged pull requests:

#5032 with labels: level3 score: (45)
#4896 with labels: level3 score: (45)
#4831 with labels: level2 score: (25)
#3250 with labels: level3 score: (45)

Thank you  @shellygarg10 , for your valuable time and contribution in our GameZone 💗.
It’s our GameZone, so Let’s build this GameZone altogether !!🤝
Hoping to see you soon with another PR again 😇
Wishing you all the best for your journey into Open Source🚀


add link to boofcv on homepage

Hey there, I found out about this cool project via the BoofCV project ( http://boofcv.org ). As I was reading about webcam-capture and the feature list I noticed that BoodCV isn't on the list of supported frameworks on the http://webcam-capture.sarxos.pl/ homepage. It might be a good idea to add it since it's a valuable resource for CV enthusiasts.

Hi @ivar,
The BoofCV project is not there because it uses Webcam Capture API and all frameworks on that list are actually the ones used by Webcam Capture API to access cameras hardware (depending on capturing framework you've choose). WC exposes common abstraction layer build on top of these various frameworks, but BoofCV is not one of them.
I should probably add some section with links to projects using Webcam Capture API, this is worth to consider.
Take care!


Static linking error [C++, Linux]

Required Info

Camera Model
T265

Operating System & Version
Linux (Ubuntu 18.04 LTS)

Kernel Version (Linux Only)
4.15.0-58

Platform
PC

SDK Version
2.26.0

Language
C++

Segment
Robot

Issue Description
Hello,
I'm trying to compile a static version of the librealsense2 library.
So I set the flag BUILD_SHARED_LIBS to false, and it seems to build and install properly.
However, when I try to link to it in my program with:
target_link_libraries(ambercode "-static" realsense2)
I get a lot of errors (see bellow).
When I link against a dynamic version of the library with:
target_link_libraries(ambercode realsense2)
I don't have any issues though.
Any idea?
Thanks in advance,
Tom
[ 71%] Linking CXX executable ambercode
//usr/local/lib/librealsense2.a(ros_writer.cpp.o): In function std::_Rb_tree_iterator<rosbag::IndexEntry> std::_Rb_tree<rosbag::IndexEntry, rosbag::IndexEntry, std::_Identity<rosbag::IndexEntry>, std::less<rosbag::IndexEntry>, std::allocator<rosbag::IndexEntry> >::_M_insert_equal_<rosbag::IndexEntry const&, std::_Rb_tree<rosbag::IndexEntry, rosbag::IndexEntry, std::_Identity<rosbag::IndexEntry>, std::less<rosbag::IndexEntry>, std::allocator<rosbag::IndexEntry> >::_Alloc_node>(std::_Rb_tree_const_iterator<rosbag::IndexEntry>, rosbag::IndexEntry const&, std::_Rb_tree<rosbag::IndexEntry, rosbag::IndexEntry, std::_Identity<rosbag::IndexEntry>, std::less<rosbag::IndexEntry>, std::allocator<rosbag::IndexEntry> >::_Alloc_node&) [clone .isra.974]': /home/tom/Programs/librealsense/third-party/realsense-file/rosbag/rosbag_storage/include/rosbag/structures.h:83: undefined reference to rs2rosinternal::TimeBase<rs2rosinternal::Time, rs2rosinternal::Duration>::operator<(rs2rosinternal::Time const&) const'
/home/tom/Programs/librealsense/third-party/realsense-file/rosbag/rosbag_storage/include/rosbag/structures.h:83: undefined reference to rs2rosinternal::TimeBase<rs2rosinternal::Time, rs2rosinternal::Duration>::operator<(rs2rosinternal::Time const&) const' /home/tom/Programs/librealsense/third-party/realsense-file/rosbag/rosbag_storage/include/rosbag/structures.h:83: undefined reference to rs2rosinternal::TimeBase<rs2rosinternal::Time, rs2rosinternal::Duration>::operator<(rs2rosinternal::Time const&) const'
/home/tom/Programs/librealsense/third-party/realsense-file/rosbag/rosbag_storage/include/rosbag/structures.h:83: undefined reference to rs2rosinternal::TimeBase<rs2rosinternal::Time, rs2rosinternal::Duration>::operator<(rs2rosinternal::Time const&) const' /home/tom/Programs/librealsense/third-party/realsense-file/rosbag/rosbag_storage/include/rosbag/structures.h:83: undefined reference to rs2rosinternal::TimeBase<rs2rosinternal::Time, rs2rosinternal::Duration>::operator<(rs2rosinternal::Time const&) const'
//usr/local/lib/librealsense2.a(ros_writer.cpp.o):/home/tom/Programs/librealsense/third-party/realsense-file/rosbag/rosbag_storage/include/rosbag/structures.h:83: more undefined references to rs2rosinternal::TimeBase<rs2rosinternal::Time, rs2rosinternal::Duration>::operator<(rs2rosinternal::Time const&) const' follow //usr/local/lib/librealsense2.a(ros_writer.cpp.o): In function librealsense::ros_writer::write_file_version()':
/home/tom/Programs/librealsense/src/media/ros/ros_file_format.h:550: undefined reference to rs2rosinternal::TIME_MIN' //usr/local/lib/librealsense2.a(ros_writer.cpp.o): In function librealsense::ros_writer::ros_writer(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)':
/home/tom/Programs/librealsense/src/media/ros/ros_writer.cpp:17: undefined reference to rosbag::Bag::Bag()' /home/tom/Programs/librealsense/src/media/ros/ros_writer.cpp:20: undefined reference to rosbag::Bag::open(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, unsigned int)'
/home/tom/Programs/librealsense/src/media/ros/ros_writer.cpp:23: undefined reference to rosbag::Bag::setCompression(rosbag::compression::CompressionType)' /home/tom/Programs/librealsense/src/media/ros/ros_writer.cpp:17: undefined reference to rosbag::Bag::~Bag()'
//usr/local/lib/librealsense2.a(ros_writer.cpp.o): In function librealsense::ros_writer::write_notification(librealsense::device_serializer::sensor_identifier const&, std::chrono::duration<unsigned long, std::ratio<1l,<PHONE_NUMBER>l> > const&, librealsense::notification const&)': /home/tom/Programs/librealsense/src/media/ros/ros_file_format.h:550: undefined reference to rs2rosinternal::TIME_MIN'
//usr/local/lib/librealsense2.a(ros_writer.cpp.o): In function librealsense::ros_writer::write_stream_info(std::chrono::duration<unsigned long, std::ratio<1l,<PHONE_NUMBER>l> >, librealsense::device_serializer::sensor_identifier const&, std::shared_ptr<librealsense::stream_profile_interface>)': /home/tom/Programs/librealsense/src/media/ros/ros_file_format.h:550: undefined reference to rs2rosinternal::TIME_MIN'
.
.
.

@tgurriet , the static libs are not linked, so you must specify all the dependent libs for the linker to proceed. For librealsense2.a  archive those are:  libfw.a, libtm.a, librealsense-file.a.
Hence the Cmake line should probably look like:

target_link_libraries(ambercode "-static" realsense2 fw tm realsense-file)


Add missing has_op function

With this PR, looks like the build and test both passed.
I did the following to pass the build.

Install the openmp as:
sudo apt install libomp-dev

added the following line to the requirements.txt file as:
<EMAIL_ADDRESS>-DDNNL_CPU_RUNTIME=OMP

Then the CPU target can be built.


Fix theme menu state on mac

closes #1239
On a mac, the radio type UI is the exact same as checkbox type, but functions correctly. This has not effect on Windows or Linux.

Pull Request Test Coverage Report for Build 1960

3 of 5 (60.0%)  changed or added relevant lines in 4 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.03%) to 50.303%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

packages/app/main/src/main.ts
0
2
0.0%

Totals

Change from base Build 1959:
0.03%

Covered Lines:
4508

Relevant Lines:
8352

💛  - Coveralls


Equihash 192,7 Incorrect Solution Size

Note
Please use the following format to file an issue. Issues that fail to comply will delay our responses.
Please remove this section when you submit the issue. Thank you for your cooperation.
Description
Hi, I have managed to add Equihash 192, 7 to mining core with the help of @bitspill. I am now receiving a lot of rejected shares when trying to mine Vidulum.
Here is my conf file,
"vidulum": {
      "name": "Vidulum",
      "symbol": "VDL",
      "family": "equihash",
      "networks": {
        "main": {
		  "diff1": "0007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
          "solutionSize": 100,
          "solutionPreambleSize": 1,
          "solver": {
            "hash": "equihash",
            "args": [ 192, 7, "EquivPoW" ]
          },
          "coinbaseTxNetwork": "main",
          "payFoundersReward": false
        },
        "test": {
          "diff1": "0007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
          "solutionSize": 100,
          "solutionPreambleSize": 1,
          "solver": {
            "hash": "equihash",
            "args": [ 192, 7, "EquivPoW" ]
          },
          "coinbaseTxNetwork": "testnet",
          "payFoundersReward": false
        },
        "regtest": {
          "diff1": "0007ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
          "solutionSize": 100,
          "solutionPreambleSize": 1,
          "solver": {
            "hash": "equihash",
            "args": [ 192, 7, "EquivPoW" ]
          },
          "coinbaseTxNetwork": "regtest",
          "payFoundersReward": false
        }
      },
      "usesZCashAddressFormat": true,
      "useBitcoinPayoutHandler": false,
      "explorerBlockLink": "https://explorer.vidulum.app/block/$hash$",
      "explorerTxLink": "https://explorer.vidulum.app/tx/{0}",
      "explorerAccountLink": "https://explorer.vidulum.app/address/{0}"
    }

I believe the issue is with these two strings,
"solutionSize": 100,
"solutionPreambleSize": 1,

When mining to the pool I receive this error
[2019-02-13 16:45:17.8383] [I] [vidulum1] [0HLKHH0C2KCGG] Share rejected: incorrect size of solution
Does anyone know the correct solutionSize for Equihash 192,7 and the correct solutionPreambleSize?
Steps to Reproduce

Add Equihash 192,7 Supprt
Create Coin,json for Equihash 192,7
Run Pool

Expected behavior
I expect to be able to mine and hit successful shares submitted.

Additional Information
Any additional information, log, configuration or data that might be necessary to reproduce the issue.

Spoke with the Vidulum Dev team and they have said that the solutionSize is 400 with a solutionPreambleSize of 3. This still results in an error "Share rejected: incorrect size of solution"

You probably forgot to fix the solution size checks in both your managed C# Solver and inside the native code.

Hi, I have checked the files within equihashverify.cc and have will provide the example below:
`bool verifyEH_192_7(const char *hdr, const std::vector &soln, const char *personalization)
{
unsigned int n = 192;
unsigned int k = 7;
if (soln.size() != 400)
    return false;

if (personalization == NULL)
    personalization = default_personalization_vidulum;

// Hash state
crypto_generichash_blake2b_state state;
EhInitialiseState(n, k, state, personalization);

crypto_generichash_blake2b_update(&state, (const unsigned char*)hdr, 140);

bool isValid = Eh192_7.IsValidSolution(state, soln);

return isValid;

}`
I have also checked the EquihashSolver.cs file and will provide an example below:
`    public unsafe class EquihashSolver_192_7 : EquihashSolver
{
public EquihashSolver_192_7(string personalization)
{
this.personalization = personalization;
}
    public override bool Verify(Span<byte> header, Span<byte> solution)
    {
        try
        {
            sem.Value.WaitOne();

            fixed (byte* h = header)
            {
                fixed (byte* s = solution)
                {
                    return LibMultihash.equihash_verify_192_7(h, header.Length, s, solution.Length, personalization);
                }
            }
        }

        finally
        {
            sem.Value.Release();
        }
    }
}`

I don't see where I have gone wrong on this, could you give any advise?

Fixed issue by inserting below code into exports.cpp:
// Explicit instantiations for Equihash<192,7>
template int Equihash<192,7>::InitialiseState(eh_HashState& base_state, const char *personalization);
#ifdef ENABLE_MINING
template bool Equihash<192,7>::BasicSolve(const eh_HashState& base_state,
                                          const std::function<bool(std::vector<unsigned char>)> validBlock,
                                          const std::function<bool(EhSolverCancelCheck)> cancelled);
template bool Equihash<192,7>::OptimisedSolve(const eh_HashState& base_state,
                                              const std::function<bool(std::vector<unsigned char>)> validBlock,
                                              const std::function<bool(EhSolverCancelCheck)> cancelled);
#endif
template bool Equihash<192,7>::IsValidSolution(const eh_HashState& base_state, std::vector<unsigned char> soln);


Alias method

Sometimes the attributes you receive to create the object doesn't match the names you want/need to use in the rest of the application:
Proposal:
var dataFromServer = {
  name: "Someone",
  age: 27,
  human: true,
  clicks: 3,
  company: {
    name: "SomethingCool.io",
    sectors: ["1A", "2B", "9Z"],
    floors: {
      first: "A",
      second: "B"
    }
  }
}

// option 1
var obj =
  MappersmithObject
    .create(dataFromServer);
    .alias({name: 'fullName', clicks: 'numberOfClicksSinceYesterday'});

obj.get('fullName') // "Someone"
obj.get('name') // "Someone"
obj.get('numberOfClicksSinceYesterday') // 3

// option 2
var obj =
  MappersmithObject
    .create(dataFromServer, {
      alias: {name: 'fullName', clicks: 'numberOfClicksSinceYesterday'}
    });

commit a628b31 implements alias like:
var obj =
  MappersmithObject
    .create(dataFromServer);
    .alias({aliasName: 'attributeName'});

without options it has no effect, it always returns the instance to allow chained calls. I have some doubts about the no args call, maybe it should return the list of aliases.


python code check plugin

use Black in git action to automatically check the python code and reformat it if necessary

Codecov Report

Merging #243 (e7c6400) into master (d3c33ed) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #243   +/-   ##
=======================================
  Coverage   47.93%   47.93%
=======================================
  Files         118      118
  Lines       15353    15353
=======================================
  Hits         7359     7359
  Misses       7994     7994

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 d3c33ed...e7c6400. Read the comment docs.

closed as #248 is merged.


Fix regression where external links are rendering as plaintext

Bug/issue #, if applicable: #885, 133444687
Summary
Fixes a regression introduced by #878 where external links are now rendering as plaintext strings instead of clickable links.
Resolves #885
Testing
Steps:

Checkout this branch and run the dev server with VUE_APP_DEV_SERVER_PROXY=https://jverkoey.github.io/slipstream npm run serve
Open http://localhost:8080/documentation/slipstream/slipstreamforswiftuidevelopers#Stacks and verify that the HStack and VStack strings are clickable links now (compare with main branch where they are plaintext)
Repeat testing instructions from #878 to ensure that functionality is not impacted by this change

Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.

[X] Added tests
[X] Ran npm test, and it succeeded
[X] Updated documentation if necessary

@swift-ci test

Thank you!

Thanks for catching this and bringing it to our attention @jverkoey!


Angular-Cli Spa Template. ServerSideRendering with --aot and Typescript 2.6 support

The latest angular officially supports Typescript 2.6. If I use the latest angular-cli template & upgrade package.json to Typescript 2.6.2, everything works fine.
If I follow the SSR instructions from https://docs.microsoft.com/en-us/aspnet/core/spa/angular everything still works fine.
If I add --aot to "build:ssr" in package.json, I get an error.
If I downgrade to Typescript 2.5.3, everything works again, even with --aot.
ERROR in ./src/main.server.ts
Module parse failed: Unexpected token (18:21)
You may need an appropriate loader to handle this file type.
| core_1.enableProdMode();
| exports.default = aspnet_prerendering_1.createServerRenderer(function (params) {
|     var _a = (module as any).exports, AppServerModule = _a.AppServerModule, AppServerModuleNgFactory = _a.AppServerModuleNgFactory, LAZY_MODULE_MAP = _a.LAZY_MODULE_MAP;
|     var options = {
|         document: params.data.originalHtml,

Not sure how important AOT is for server-side rendering (since it's not on by default in the template), but it seems like it'd be valuable to enable, if possible.
main.server.ts is a port to .net core from the node+express version at https://github.com/angular/angular/blob/master/aio/content/examples/universal/server.ts
I haven't tested the node+express version to see if it works with Typescript 2.6.2 & aot.

I've been having this issue since v1.7.0. There is an issue being tracked here: https://github.com/angular/angular-cli/issues/9219
As a workaround, I downgraded to v.1.6.8.

As per @chrisvfabio's comment, it's an Angular CLI issue - please follow up with that project. Thanks!


dispather comand：globals.args.pythonInterpreter, '-m', 'nni', '--exp_params', 占用内存太多

Describe the issue:

Environment:

NNI version: 2.9
Training service (local|remote|pai|aml|etc): local
Client OS:
Server OS (for remote mode only):
Python version:
PyTorch/TensorFlow version:
Is conda/virtualenv/venv used?:
Is running in Docker?:

Configuration:

Experiment config (remember to remove secrets!):

assessor:
 classArgs:
   earlystop: true
   optimize_mode: maximize
   start_step: 5
 name: PAIAssessor
experimentName: "\u65B0\u589E-deepfm-\u6FC0\u6D3B\u6A21\u578B\u4ED8\u8D39\u7387\u9884\
 \u4F30_0117_copy_copy_copy_copy_copy_copy_copy"
experimentWorkingDirectory: ../expdir
maxTrialNumber: 200
searchSpaceFile: search_space.json
trainingService:
 platform: local
trialCommand: python3 -m hpo_tools.core.utils.run --config=./config.ini
trialConcurrency: 2
tuner:
 classArgs:
   optimize_mode: maximize
 name: TPE

Search space:

{"${batch_size}":{"_type":"choice","_value":["64","256","512","1024","5000","1500","2500","7500","10000"]},"${learning_rate}":{"_type":"choice","_value":["1e-5","1e-4","1e-3","5e-5","5e-4","5e-3"]},"${deep_dnn1_units}":{"_type":"randint","_value":[10,1000]},"${deep_dnn2_units}":{"_type":"randint","_value":[10,1000]},"${fm_dnn_units}":{"_type":"randint","_value":[10,1000]},"${combine_dnn_units}":{"_type":"randint","_value":[10,100]},"${seed}":{"_type":"randint","_value":[1,4294967290]},"${epochs}":{"_type":"randint","_value":[3,50]}}

Log message:

nnimanager.log:

 placementConstraint: { type: 'None', gpus: [] }
}
[2024-01-24 15:37:33] INFO (NNIManager) Trial job zIKH1 status changed from WAITING to RUNNING
[2024-01-24 15:49:24] INFO (NNIManager) Trial job ndLXi status changed from RUNNING to SUCCEEDED
[2024-01-24 15:50:01] ERROR (tuner_command_channel.WebSocketChannel) Error: Error: tuner_command_channel: Tuner closed connection
   at WebSocket.<anonymous> (/usr/lib/python3.7/site-packages/nni_node/core/tuner_command_channel/websocket_channel.js:41:49)
   at WebSocket.emit (node:events:538:35)
   at WebSocket.emitClose (/usr/lib/python3.7/site-packages/nni_node/node_modules/express-ws/node_modules/ws/lib/websocket.js:246:10)
   at Socket.socketOnClose (/usr/lib/python3.7/site-packages/nni_node/node_modules/express-ws/node_modules/ws/lib/websocket.js:1127:15)
   at Socket.emit (node:events:526:28)
   at TCP.<anonymous> (node:net:687:12)
[2024-01-24 15:50:01] ERROR (NNIManager) Dispatcher error: tuner_command_channel: Tuner closed connection
[2024-01-24 15:50:01] ERROR (NNIManager) Error: Dispatcher stream error, tuner may have crashed.
   at EventEmitter.<anonymous> (/usr/lib/python3.7/site-packages/nni_node/core/nnimanager.js:647:32)
   at EventEmitter.emit (node:events:526:28)
   at WebSocketChannelImpl.handleError (/usr/lib/python3.7/site-packages/nni_node/core/tuner_command_channel/websocket_channel.js:107:22)
   at WebSocket.<anonymous> (/usr/lib/python3.7/site-packages/nni_node/core/tuner_command_channel/websocket_channel.js:41:37)
   at WebSocket.emit (node:events:538:35)
   at WebSocket.emitClose (/usr/lib/python3.7/site-packages/nni_node/node_modules/express-ws/node_modules/ws/lib/websocket.js:246:10)
   at Socket.socketOnClose (/usr/lib/python3.7/site-packages/nni_node/node_modules/express-ws/node_modules/ws/lib/websocket.js:1127:15)
   at Socket.emit (node:events:526:28)
   at TCP.<anonymous> (node:net:687:12)
[2024-01-24 15:50:01] INFO (NNIManager) Change NNIManager status from: RUNNING to: ERROR
[2024-01-24 16:05:49] INFO (NNIManager) User cancelTrialJob: zIKH1
[2024-01-24 16:05:49] INFO (ShutdownManager) Initiate shutdown: REST request
[2024-01-24 16:05:49] INFO (RestServer) Stopping REST server.
[2024-01-24 16:05:49] INFO (NNIManager) Change NNIManager status from: ERROR to: STOPPING
[2024-01-24 16:05:49] INFO (NNIManager) Stopping experiment, cleaning up ...
[2024-01-24 16:05:49] INFO (RestServer) REST server stopped.
[2024-01-24 16:05:49] INFO (LocalTrainingService) Stopping local machine training service...
[2024-01-24 16:05:49] INFO (NNIManager) Change NNIManager status from: STOPPING to: STOPPED
[2024-01-24 16:05:49] INFO (NNIManager) Experiment stopped.
[2024-01-24 16:05:49] INFO (NNITensorboardManager) Forced stopping all tensorboard task.
[2024-01-24 16:05:49] INFO (NNITensorboardManager) All tensorboard task stopped.
[2024-01-24 16:05:49] INFO (NNITensorboardManager) Tensorboard manager stopped.
[2024-01-24 16:05:49] INFO (ShutdownManager) Shutdown complete.

dispatcher.log:
没有报错
nnictl stdout and stderr:
没有报错

How to reproduce it?:

1）/python -m nni --exp_params 该进程会从2G->66G->98G;
2）出现时机在生成新参数的时候
3）发现是search space设置的空间太大
内存OOM："${seed}": {"_type": "randint","_value": [1,<PHONE_NUMBER>] },
内存正常："${seed}": {"_type": "randint","_value": [1, 100] },
内存正常："${seed}": {"_type": "randint","_value": [4294967280,<PHONE_NUMBER>] },


test-utils can't resolve import '#imports'(Nuxt3, vitest)

Environment
ENV
os: Darwin
nodejs: 18.18.0
nuxt: 3.9.0
@nuxt/test-utils: 3.9.0
vitest: 1.1.1
yarn: 1.15.2
Reproduction
https://stackblitz.com/edit/nuxt-starter-vwmlx3?file=utils.test.js
Describe the bug
Hi, I'm using @nuxt/test-utils and vitest for testing on Nuxt3.
Due to our team's convention, the configuration uses 'autoImport: false'.(For an explicit declaration) So when importing Nuxt's built-in items (useRoute, nextTick, computed, etc.) we use '#imports'.
When I run test, the following error occurs:
Error: Failed to resolve import "#imports" from "utils.js". Does the file exist?
The image below can be viewed in the same way through reproduction.

When using autoImport: false in nuxt.config.js, test-utils can't resolve #imports alias.
Is it possible to solve this problem through the alias property in vitest.config.js?
I tried many things, but couldn't find a way.
Additional context
No response
Logs
No response

@danielroe
Hi, Thank you for you replying.
I resolved this issue as below.
<vitest.config.js>
import { defineVitestConfig } from '@nuxt/test-utils/config';
import { loadEnv } from 'vite';

export default defineVitestConfig({
  test: {
    root: process.cwd(),
    // https://github.com/vitest-dev/vitest/issues/2117#issuecomment-1890908753
    env: loadEnv('', process.cwd(), ''),
    environment: 'nuxt',
    environmentOptions: {
      nuxt: {
        domEnvironment: 'jsdom',
      },
    },
    reporters: ['default'],
    coverage: {
      enabled: true,
      reportsDirectory: './coverage/',
      reporter: [['html', { projectRoot: './coverage/' }]],
    },
    // outputFile: {
    //     html: './coverage/'
    // }
  },
});


Link to Icons not working.

Seems the link is no longer valid.
https://knx-user-forum.de/forum/playground/knx-uf-iconset

Hm, its working fine on my machine.


date format in pluck() for collection

i checked out your demo on collections at https://github.com/tightenco/jigsaw-collections-demo/blob/master/source/_layouts/category.blade.php. here you demonstrate how to "group by" categories in a collection. i would like to do this with dates. my dates are YYYY-MM-DD formatted. i'd like to "group by" just the year. here is what i have.
// front matter on collection
---
title: blah blah
date: 2017-07-26
permalink: blah-blah
---

// i tried the following
@foreach ($events->pluck(date('Y', 'date'))->unique() as $event_date)
  {{ $event_date }}
@endforeach

it didn't work. i checked the laravel docs on pluck() and didn't find anything either. am i close? thanks.

pluck won't work in this case, because it doesn't receive any reference to the current $event. Instead, you could use map:
@foreach ($events->map(function($event) { return date('Y', $event->date); })->unique() as $year)
    {{ $year })
@endforeach

You can clean this up a little more by moving that date function into config.php:
return [
    'collections' => [
        'events' => [
            'year' => function($event) {
                return date('Y', $event->date);
            },
        ],
    ],
];

...and then using a higher-order version of map:
@foreach ($events->map->year()->unique() as $year)
    {{ $year }}
@endforeach


PreloadData is missing

Hi, don't know if you are still working on this docker or if it is no longer supported but I am getting an error message when I try to run it for the first time.
"Unknown error occurred while loading '/home/steam/Unturned/Unturned_Headless_Data/globalgamemanagers.assets'.
(Filename:  Line: 210)
PlayerInitEngineGraphics: PreloadData is missing. It should always be there.
Failed to initialize player"
What data should be there? How do I get that data?

I sadly have no idea where this error comes from

Hi, I have just come back to this, no longer getting the above issue, but I am unable to connect.
Would you be able to add some more information to the readme, such as how to change map, or if I need to bind a IP address, do I need to add steam account information anywhere?


Ability to only archive workflows in a certain state

Summary
Based on the community meeting and the example manifests here, it sounds like workflows will be auto-archived if they enter any terminal state. I think it'd be more valuable to have a configurable list of workflow states that trigger the auto-archive.
Motivation
My workflows generate ~large persistent volumes, with ownership set so the volumes get deleted when the workflow is deleted. It'd be ideal if I could configure the Argo server to:

Auto-archive workflows as they succeed
Auto-delete archived workflows (#2001)

That way volumes get cleaned up automatically in the happy path, but they're kept around for retries when things fail.
Proposal
I'm not sure about the internals, but at the config level I'd expect to see something like this:
persistence:
  archive:
    # Default: []
    # Alt default: [succeeded, failed]
    states: [succeeded]

Message from the maintainers:
If you wish to see this enhancement implemented please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

I think this can be done using archive strategy.


[FEATURE REQUEST] Only swipe to one direction.

@dohooo thanks for the amazing library, can we disable swiping to previous item? i.e user can only swipe to one direction?
Originally posted by @yasirtrimulabs in https://github.com/dohooo/react-native-reanimated-carousel/issues/88#issuecomment-1134613485

// Only swipe to right
panGestureHandlerProps={{
    activeOffsetX: [-screenWidth, 10],
}}

// Only swipe to left
panGestureHandlerProps={{
    activeOffsetX: [10, screenWidth],
}}

Thanks.
I tried this but for the swipe left it throws an error and says that the first value of array should be negatiive.

// Only swipe to right
panGestureHandlerProps={{
    activeOffsetX: [-screenWidth, 10],
}}

// Only swipe to left
panGestureHandlerProps={{
    activeOffsetX: [10, screenWidth],
}}

Thanks.
I tried this but for the swipe left it throws an error and says that the first value of array should be negatiive.

// Only swipe to right
panGestureHandlerProps={{
activeOffsetX: [-screenWidth, 10],
}}
// Only swipe to left
panGestureHandlerProps={{
// first value mast be negatiive
activeOffsetX: [-10, screenWidth],
}}

Unfortunately, when you set :
// Only swipe to left
panGestureHandlerProps={{
    activeOffsetX: [-10, screenWidth],
}}

You can START swiping to the left, but during that, change direction and swipe to the wrong side.

@RobertMrowiec
yup same thing for me


add school

@cmitrokostas First stage of verification passed, official domain is stsebs.org as far as I verified. This is just an informational note. Pull request is still in the review. I appreciate your patience while waiting for the final decision.

@cmitrokostas Pull request merged. Thank you.


Google Drive API upload missing content

OS: MacOS 10.13.5, Ubuntu 14.04.5 LTS
Node.js version: v10.3.0 (Mac), v9.11.1 (Ubuntu)
npm version: 6.1.0 (Mac), 5.6.0 (Ubuntu)
@google-cloud/error-reporting version: N/A

Steps to reproduce

Use my code here on GitHub Gist

an index.js
module.exports = {
gDrive: require()
}
a small test file: test.js
const {gDrive} = require(<gist file index>)

const   file = 'TESTJS.txt',
        folder = <folder-id>

gDrive.insertFile(file, 'text/plain', folder)

Explain:
I've been using Google Drive API v3 to insert/upload files to Google Drive folders without any problems.

Currently, I'm having problems with missing content of plain text .txt files contains multiple white spaces.
The files contain lines like this:
H    12345  2018 # HELLO                     C-12345        mm/dd/yyyy          +0.00                                         K                                                                                ID: 1234, Date: yyyy-mm-dd

It only uploads 64KB out of a 73KB or lager file. However, and a big however, if I copy the same content of the same file and paste it in the file to make it about 2MB, then it uploads the whole 2MB file without any missing line. If I remove part of the file to make it smaller about 30 - 40MB and it works fine.
I've checked:

My txt file only contains data of a big string with spacing. So, there's no special character.
I use a single function out of the code above to upload different file types and sizes and the function works without errors. So no problems from async or Promise functions in Javascript.

My code is basically Google Drive API code. I don't have any errors. I've looked for answers online without success. Google Drive API size limit is 10GB. I wonder if this is a glitch of Google Drive API.

This issue was moved to google/google-api-nodejs-client#1236

Thank you @DominicKramer