Fix for Visual Studio builds with ADI

This pull request is ready to be merged.
Feature or improvement description
This PR updates the build process so that ADI's registry runs in the VS solution files. It also

removes a few extrap/interp routines that aren't used (and don't need to be generated).
removes non-standard tabs from the Fortran source code
removes some unused variables from AD.

Impacted areas of the software
Visual Studio builds with code that contains the ADI module.
Test results, if applicable
This does not change any results

I suspected the parallelization of FWrap Init to be buggy. I've removed it and the tests seems to pass now...

Thanks, @ebranlard!

FWIW: when I pulled up the GitHub Action artifacts of the failing FAST.Farm case (before Emmanuel reverted that change in dev), the plots are unreadable:

I haven't spent any time trying to figure out what's going wrong there, but thought I'd draw it to someone's attention.
The other PRs that I submitted about the same time also failed on the same case as this one, but they didn't produce any .html file. So, something strange is going on with that.

Yes, I've noticed this as well, I'm not quite sure what's going on. I ended up comparing the files in pyDatView instead.

I'm able to reproduce this locally as well.


x/tools/go/ssa: method calls sometimes have different count of arguments because of closure

What version of Go are you using (go version)?

$ go version
go version go1.13.8 darwin/amd64

Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN="~/go/bin"
GOCACHE="~/Library/Caches/go-build"
GOENV="~/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="~/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.13.8/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.13.8/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="~/go/src/golang.org/x/net/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/_q/1mwpxmn91wj5fs_c_f29mz3h0000gn/T/go-build604211852=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

analysis code
package main

import (
	"fmt"

	"golang.org/x/tools/go/analysis/singlechecker"

	"golang.org/x/tools/go/analysis"
	"golang.org/x/tools/go/analysis/passes/buildssa"
	"golang.org/x/tools/go/ssa"
)

func main() { singlechecker.Main(listargs) }

var listargs = &analysis.Analyzer{
	Name:     "listargs",
	Doc:      "List up all the calls and their arguments",
	Run:      run,
	Requires: []*analysis.Analyzer{buildssa.Analyzer},
}

func run(pass *analysis.Pass) (interface{}, error) {
	ssainput := pass.ResultOf[buildssa.Analyzer].(*buildssa.SSA)
	for _, fn := range ssainput.SrcFuncs {
		for _, b := range fn.Blocks {
			for _, i := range b.Instrs {
				c, ok := i.(ssa.CallInstruction)
				if ok {
					// fmt.Println("********************")
					fmt.Println(c.Common().StaticCallee().Object())
					for j, a := range c.Common().Args {
						fmt.Println("arg", j, a)
					}
					// fmt.Println("********************")
				}
			}
		}
	}
	return nil, nil
}

target code
package main

type X struct{}

func (X) method() {}

func x() {
        var x X
        x.method()
        m := x.method
        m()
}

What did you expect to see?
func (_~/listargs/test/m.X).method()
arg 0 *t0
func (_~/listargs/test/m.X).method()
arg 0 *t0

What did you see instead?
func (_~/listargs/test/m.X).method()
arg 0 *t0
func (_~/listargs/test/m.X).method()

Created closure does not have arguments though its object is the same as (X).method. When developing analysis tools, the consistency of the count of arguments is important for programmers so I think m is better with a receiver argument.
Is this behavior intended?

/cc @ianthehat

cc @findleyr
If I understand this comment, the problem is that the arguments first function call, x.method() include the receiver argument, while the arguments for m() don't. This looks consistent to me: the first function has a reciever, while the second is niladic. It seems like this behavior is intended.

Thank you for your answer. I also confirmed that this behavior is correct and the receiver argument is in the FreeVar of the function m, closure functions.
However, for more simplification for users of the SSA interface, could the first argument of closure functions be the receiver and could the difference of arguments between methods and its closure functions be removed?
For now, users of the SSA interface should concern about the difference of arguments even the functions object is the same. This difference causes potential SEGMENTATION FAULT in analyzers assuming that the arguments are the same in the same function object.
The closure functions of methods are simply the curried functions with the partial application of only the first argument. So I think it is not problematic to unify their arguments.
Luckily, the SSA interface is noted that THIS INTERFACE IS EXPERIMENTAL AND IS LIKELY TO CHANGE. and users can deal with this change only by removing the checks and operations of ObjectFact about curried functions.
This change also solves the problem of uncertainty of the receiver argument because we can't choose the actual receiver from FreeVar easily for now, and the problem of redundant checks dealing with these differences.

I'm leaning against making this change, especially because I don't want to break anyone, but I'll let @finleyr be the final decider.

I'm also leaning against this change.  Yes, go/ssa is labeled as experimental, but it is being used and such a breaking changes carry a high cost/risk.  I'm also not sure that this change would be philosophically correct: I don't think it makes sense for the receiver value to be both a bound FreeVar and an Arg. It seems to me that this is working as intended.  This is consistent with the description of a bound closure as a synthetic wrapper, here:
https://github.com/golang/tools/blob/a0ec867d517c00ba65f6b4d0fc1de72414152fc7/go/ssa/wrappers.go#L169
@Matts966 could you expand on the problems this is causing? You say it can cause a segmentation fault: how specifically does that arise?

@findleyr
Sorry, I should say that there is potential index out of range errors instead of segmentation faults.
Potential index out of range errors are like this.
type argumentsFact []ssa.Value

// Export facts about function arguments here.
var fact argumentsFact = callOfF.Args
pass.ExportObjectFact(f, &fact)
...
// Import facts about function arguments in other place.
pass.ImportObjectFact(f.Object(), &fact)
for i, arg := range fact {
    anotherCallOfF[i] // access arguments in the same index as in `callOfF`
    // This can cause index out of range errors because the count of arguments
    // can be different if the anotherCallOfF's function is method closure, whose
    // receiver is not in arguments but in free variables.
}

In order to handle these cases correctly, we, the users of ssa interface, for instance, writers of some linters, should always check the count of arguments and fetch the actual receivers from free variables, which is sometimes difficult to fetch because they are in the closure declaration, not in calls to closure.
As we already regard methods as functions and receivers as the first argument, it's easier if the method closures and their source functions are dealt with in the same way. So I thought that the bound receivers should be in arguments not in free variables at first, but I admit that this can break somethings.

How are you determining that callOfF and anotherCallOfF are the same? By associating Common().StaticCallee().Object()? I think the lesson here is that this is not sufficient.
For example, consider the following package:
package curry

type X struct{}

func (X) method() {}

func x() {
  var x X
  x.method()
  m := x.method
  m()
  n := X.method
  n(x)
}

When I run your analyzer, all of these invocations look the same:
> go run ./tmp/analyze ./tmp/curry
func (golang.org/x/tools/tmp/curry.X).method()
arg 0 *t0
func (golang.org/x/tools/tmp/curry.X).method()
func (golang.org/x/tools/tmp/curry.X).method()
arg 0 *t0

But if I instead print Common().StaticCallee(), it's clear that they are different:
> go run ./tmp/analyze ./tmp/curry
(golang.org/x/tools/tmp/curry.X).method
arg 0 *t0
(golang.org/x/tools/tmp/curry.X).method$bound
(golang.org/x/tools/tmp/curry.X).method$thunk
arg 0 *t0

I don't think we can change the meaning of Args to include a bound Freevars if that Freevar happens to be a receiver. I understand the API may be difficult to work with, but don't think this is the correct solution to that problem.  Does that make sense?

@findleyr
Thank you for your kind explanation. I will close this issue for I also understood that we should handle those differences correctly.


Use domain-specific constant-time token comparison

As per discussion.

Thanks for this – good stuff. Good catch on the length as well.


Memory Usage

This might be more of a question than an issue... anyways:
I'm using RestEase as part of a DotNetCore 2.0 WebAPI to reach out to other rest apis. I love the simplicity but I notice that my API has a memory leak and I traced it back to my usage of Restease.
public class DemoController : Controller
    {
        public ILegacyAPI legacyAPI { get; set; }

        public DemoController(IOptions<AppSettingsServices> options)
        {
            this.legacyAPI = RestClient.For<ILegacyAPI>(options.Value.LegacyAPIBaseUrl);
        }

        public async Task<dynamic> CallOutToOtherAPI()
        {
            var response = await legacyAPI.GetSomethingFromOtherAPI();

            //Do stuff with response and return
        }
    }

Should I be using a scoped rest client maybe? I also saw something about implementing IDisposable?

Hi
The issue here is that you're creating a new rest client at each call to your webapi.
What you can do is treat your ILegacyAPI as a service contract and inject it into your controller like you'd do for other services. It's highly recommended to declare it as a singleton service.
For IDisposable, you can say that your ILegacyAPI extends IDisposable then you can manually dispose of your rest client. That'll solve your memory leak but it'll introduce performance issues since you'll be creating-disposing. You can view the frequent creation-dispose as an antipattern. You should use in your case the dependency injection mechanisms of aspcore like explained.

I wouldn't have expected that to leak memory. It's true that people recommend keeping a HttpClient instance around, rather than instantiating a new one every time you need one -- you can do that either by keeping the ILegacyApi instance around, or by keeping a static HttpClient and passing it to the RestClient.For method.

Here's what I tried for aspnetcore in the startup:
services.AddSingleton(RestClient.For<ILegacyAPI>("base url here"));

And then in the controller:
public class DemoController : Controller
    {
        private readonly ILegacyAPI legacyAPI;

        public DemoController(ILegacyAPI legacyAPI)
        {
            this.legacyAPI = legacyAPI;
        }

        public async Task<dynamic> CallOutToOtherAPI()
        {
            var response = await legacyAPI.GetSomethingFromOtherAPI();

            //Do stuff with response and return
        }
    }

Is that right?  I'm still seeing memory issues after time. I did also try to throw together a quick console app to validate what you guys are saying about keeping the client around as long as you're using it.
static void Main(string[] args)
        {
            var task = Task.Factory.StartNew(async () =>
            {
                var client = RestEase.RestClient.For<ILegacyAPI>("<URL Here>");
                while (true)
                {
                    try
                    {
                        var response = await client.GetData();
                        System.Threading.Thread.Sleep(500);
                    }
                    catch(Exception e)
                    {
                        var catchstr = e.ToString();
                    }
                }
            });

            Console.ReadKey();
        }

I do see stable memory usage in that example.  So I wonder if my singleton usage isn't correct?

What memory issues exactly are you seeing, and what makes you think that RestEase is responsible?
The other thing I notice is that your controller calls client.GetSomethingFromOtherAPI(), while your demo calls client.GetData(). Is the return type different between those methods?

Oh right. If you’re also getting a raw http response, you should dispose of it after getting what you wanted from it. (@canton7 is this what you were thinking of?)

Perhaps, perhaps it's an Response<T> (same issue). Perhaps it's a custom type which has something funky about it.

@canton7 - the calls are different cause I gave you example code.
What I've noticed is that I started having memory issues when I started using Restease.  I was able prove out with a console app that they way I was using restease was causing memory issues.
I'm seeing its difficult to pin down what is actually causing the issue though.  Here's what I'm seeing in the memory profiler from that console app:

Here's the code that I was using for that snap shot:
class Program
    {
        static void Main(string[] args)
        {
            var task = Task.Factory.StartNew(async () =>
            {
                while (true)
                {
                    var client = RestEase.RestClient.For<IAPIClient>("<base url here>");
                    try
                    {
                        var response = await client.GetData();
                        System.Threading.Thread.Sleep(500);
                    }
                    catch(Exception e)
                    {
                        var catchstr = e.ToString();
                    }
                }
            });

            Console.ReadKey();
        }
    }

@canton7 - the calls are different cause I gave you example code.

Are the return types actually different, or are they the same? I want to make sure that you are using RestEase in the same way both in your controller and in your test code.

I was able prove out with a console app that they way I was using restease was causing memory issues.

I'm afraid I'm still unclear on where there's a problem. Previously you could not reproduce an issue in the test console app. Now it looks like you have been able to reproduce them?
There's nothing scary in the profile dump you posted that I can see -- you're just looking at these static cached MethodInfo/PropertyInfo/ConstructorInfo fields.

The example reproduces, naturally, because you create a client at every iteration.

Hi, any response?

I'm still seeing some memory consumption, but I wonder if its delayed release or what. Would this be the right way to do it for asp.net core?
services.AddSingleton(RestClient.For<ILegacyAPI>("base url here"));
or should I make my HttpClient the singleton?

That’s the correct way. But you still need to show us the exact interface you are using. If you expect a Response for example, then you need to clean up the response object after each call.

I'm still interested in what you have seen which makes you think that there's a memory leak. The screen shot you posted above only shows a snail number of cached Type objects.

Hello,
We also face an issue with memory usage. It seems it come from the unmanaged heap :(
I attached to this ticket a test project reproducing the issue and on the following screenshot you could see the "private bytes" counter that constantly increase during the run of this test.
Hoping this could help.

RestEaseMemoryLeakTest.zip

A colleague of mine found the issue :)
https://github.com/canton7/RestEase/blob/master/src/RestEase/Implementation/ImplementationBuilder.cs#L83
This line is creating a new instance each time we are accessing the Instance property.  I'll get that fixed up over lunch.

I'm working on the patch. I can create the PR if you want.
This is an error prone addition of C# 7, it's very easy to get tricked by it.

Relesed as 1.4.5.


Probabilistic membership

As an addendum to my approval: There are changes to jurity.fairness.BinaryFairnessMetrics.get_all_scores that need to be implemented to make probabilistic values available from the main access point for the code base. Those changes need a through code review from the current code owners.
Right now, I have them in a separate branch. I can merge that branch to this one, or we can review it separately as an update to main.


[FEATURE REQUEST]  Adding social media button in footer under Shloks Section

Description
Is your feature request related to a problem? Please describe.
In Shloks page, in the footer section the social media buttons are not there
Describe the solution you'd like
I will like to add the social media button in the footer section of the Shloks Page
Screenshots or Mockups (optional)
If applicable, include any screenshots, mockups, or visual representations of the requested feature.

Priority (optional)
Medium

@akshitagupta15june please address this issue


Werkzeug debugger pin doesn't appear when using runserver_plus command

When I use runserver_plus and try to use the interactive console, I get this warning:

Console Locked
The console is locked and needs to be unlocked by entering the PIN. You can find the PIN printed out on the standard output of your shell that runs the server.

But the console only shows:

Performing system checks...

System check identified no issues (0 silenced).

Django version 1.9, using settings 'settings.local'
Development server is running at http://<IP_ADDRESS>:8000/
Using the Werkzeug debugger (http://werkzeug.pocoo.org/)
Quit the server with CONTROL-C.

I had this same problem, but it turned out I'd disabled the werkzeug logger.  I just added the following to LOGGING['loggers'] in settings.py:
    'werkzeug': {
        'handlers': ['console'],
        'level': 'DEBUG',
        'propagate': True,
    }

Anybody have a little of time to add this example to the documentation ? :)


Add framework for testing using pytest-qt. Also add a few simple tests.

Can you please resolve the merge conflicts?

Also, do you know how to run these tests automatically after every commit? @boldar99 was looking at setting up something like that in the deploy branch https://github.com/Quantomatic/zxlive/pull/96

Also, do you know how to run these tests automatically after every commit? @boldar99 was looking at setting up something like that in the deploy branch #96

Just filed #137 for this before I saw your question.
The instructions are here. Since it's already set up for the pyzx repro, whoever set it up there (I assume @jvdwetering?) should be able to just do something similar for this repo.


Fetcher: ALX

Mappers dependent on this fetcher:

#367

Some general links to know:

Development contribution process
"CIC all tasks" list view
"CIC current sprint" status view

Specific to this fetcher:

List of collections, by fetcher type: https://registry.cdlib.org/?harvest_type=ALX

Rikolti MVP project board cheat sheet:

Please @ CDL developers liberally, in the comments.
When picking up an "issue," please indicate:

a) Assignees: self assign;
b) Sprint: select the current sprint cycle;
c) Date started: indicate the start date -- see right side fields

CIC developers will likely need to create PRs (and possibly additional issues). When doing so, please also indicate the following:

a) Repository: Rikolti;
b) Milestone: "4 CIC work" (these details are required in order for them to surface in the Rikolti MVP project board); and
c) link the PR to the associated issue.

When requesting review, please:

a) include a comment & @ CDL developers; and
b) Date delivered: indicate the date delivered (field on the right)

This fetcher is obsolete. Closing this issue. Thanks!


Feature request : Add a -use switch to the install command

My Environment

[ ] Windows 7 or below (not truly supported due to EOL - see wiki for details)

[ ] Windows 8

[ ] Windows 8.1

[X] Windows 10

[ ] Windows 10 IoT Core

[ ] Windows Server 2012

[ ] Windows Server 2012 R2

[ ] Windows Server 2016

[X] My Windows installation is non-English.

I'm using NVM4W version:
1.1.7
I have already...

[X] read the README to be aware of npm gotchas & antivirus issues.
[X reviewed the wiki to make sure my issue hasn't already been resolved.
[X] verified I'm using an account with administrative privileges.
[X] searched the issues (open and closed) to make sure this isn't a duplicate.
[X] made sure this isn't a question about how to use NVM for Windows, since gitter is used for questions and comments.

My issue is related to (check only those which apply):

[ ] settings.txt
[ ] proxy support (Have you tried version 1.1.0+?)
[ ] 32 or 64 bit support (Have you tried version 1.1.3+?)
[ ] Character escaping (Have you tried version 1.1.6+?)
[ ] A standard shell environment (terminal/powershell)
[ ] A non-standard shell environment (Cmder, Hyper, Cygwin, git)

Expected Behavior
It would be cool to add a -use switch to the install command, in order to allow one line install and use.
ex:
nvm install 13.2.0 -use

to be the equivalent of :
nvm install 13.2.0
nvm use 13.2.0

Or, maybe, an alternative could be to add a -install switch to the use command, to allow installing the new version if not yet installed.
nvm use 13.2.0 -install

Actual Behavior
Steps to reproduce the problem:

These concepts have been mentioned before, but I like the idea of both flags.
Some users have requested that nvm use x.x.x would auto-install if it doesn't already exist. Some have also requested that nvm install x.x.x would auto-"use". Ultimately, I think it would be best to let users specify a default (i.e. preferences) and use flags to override preferences when necessary.
I've marked this as an enhancement request. There's a reasonable chance this could make it into a near future release (as soon as I can get the release process automated.... that has taken quite awhile).


Add right-click actions in explorer

The add action/configuration should be also visible on right-click,

Fixed on 2020-05-04.


⚠ Bofrost.es has degraded performance

In fad4797, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1518 ms

Resolved: Bofrost.es performance has improved in eb51659 after 6 minutes.


chore(snippets): remove Hide Upgrade Button

Hide Upgrade Button

adblock does this

Better lyrics style

poorly made + beautiful lyrics extensions or bloom theme do the job better

if you insist


toc changes

Per discussion with Z:

In the Getting Started section:

Delete the First-console-app article stub, and in its place move Philip’s step-by-step guide to the Getting started section.
Change title of the step-by-step guide to make clear it’s using the CLI tooling, and locate it in the TOC before the IDE set-up articles.
Change the title of the IDE setup articles section to make clear they’re for IDE setup as opposed to CLI tooling.

In the Scenarios/deployment section

Link to ASP.NET docs and NuGet docs from the TOC instead of going to a .NET Core doc that does nothing but send you to those places.

In the .NET Core Development section

In console subsection, remove the console paradigm doc, leaving the console overview doc. When written, it will link to the CLI step-by-step getting started guide in the getting started section, and/or we could add a cross-link here in the TOC.
For Web development, link to ASP.NET docs from the TOC instead of going to a .NET Core doc that does nothing but send you to that site.

In addition, the CLI console step-by-step guide had a link to "name of advanced tutorial" at the end, and I created a stub for the proposed tutorial and linked to it.
Please review, @blackdwarf @BillWagner @mairaw @cartermp

I'm not sure with it was @richlander that was saying the other day that we shouldn't link to external sites from the TOC. Not sure how others feel about this. I think it's unexpected for customers.

Closes #298
Closes #299
Closes #482
Resolves #466

@mairaw removed external links from TOC; we can discuss advisability of doing that later as a separate issue and move forward with the rest of the PR

I think the changes are good and you can :shipit:
There a few things that I've noticed that would be to improve the text itself of some of the topics like using very short links like here or overview that don't help with SEO, but they maybe out of scope for this PR.

FYI @tdykstra, if you have a lot of commits which are small and/or related to feedback, please merge with the "Squash and Merge" feature.  This keeps the history cleaner.  Not a big deal here, but for larger articles with a lot of feedback it can get cumbersome.  Thanks!

@cartermp Will do.


Add runtime switch to name anonymous functions

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
This week a friend of mine ( @Timehat ) hacked together something amazing. Something that allowed us to read the Chrome timeline in a way that we had never been able to before. We modified the FunctionModuleTemplatePlugin to name the anonymous function to be the full path of the file being included. With this, we were able to use the Chrome Devtools Timeline feature to completely understand what was happening when the app was bootstrapping. We were able to see which pieces of the app took the longest time to init, and we were able to target those pieces first for lazyloading. Naming the anonymous functions corrected the course of action that we were going to take. We can now attack the slowest pieces of code, rather than simply looking at the full gzipped size of each file. The app init time takes around 2.6 seconds. With the aforementioned change, we could absolutely see which pieces were the slowest and were able to lazyload the files that took up 20% of the time with just a few minutes of effort. Now we can spend the next few weeks to lazy load another 20-30% of effort, reducing the total init time by 50%. Without the named anon functions and without Webpack, this would have been something that would have taken us months to figure out. Webpack really knocked this out of the park.
It would be nice if this feature was in webpack by default, behind a runtime switch that we could set.  We want our build machines to log the times of each of these so that we can add some monitoring around them so that if they ever go off the reservation, we could know about it. I would like to submit this PR, but had a few questions.
Question was... we were able to easily get the name of the directory that we were in by using module.context, but getting the name of the current file was actually kind of tough. The file @timehat and I were working on was FunctionModuleTemplatePlugin. Can anyone give some guidance on how to get the full name of the file in there? Or if I am even in a call about a specific file or not?
Second question... is enabling a feature like this behind a command switch something that is likely to get approved/rejected? Please provide guidance on the best way for us to get this feature implemented. And thank you ahead of time for all help.

If this is a feature request, what is motivation or use case for changing the behavior?
The motivation is to give people better insight into what is happening when a webpack-enabled app inits.
Please mention other relevant information such as the browser version, Node.js version, webpack version and Operating System.

@timehat @aaronfrost
What method did you use to make the function names unique. Are you normalizing module.resource to a string and making it to be unique?

@TheLarkInn I'm currently using module.userRequest. Turning it into a string like this: module.userRequest.replace(/[^a-zA-Z0-9]/g, '_'). Not doing anything to ensure names are unique. Assumption was that the request includes the module's path, which should be unique.

any progress on this? sounds very exciting!

This is described as being about helping people understand initialization. I think that it would also help when working with promises. It's common to pass a lambda function to promise.then and the result is that stack traces are harder to read and profiling is almost impossible, because even if we replace .then on Promise, we can't identify each function.
Does anyone have suggestions on how to push this forward?


pull request for e2e test at 12/23/2016 00:45:16

:white_check_mark: Validation status: passed
For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.


Usage with Nextjs (ssr)

How should I setup Nextjs to work with xstyled ?
I tried a lot of things but I keep on having the famous:
Warning: Prop className did not match. Server: "sc-cCwQvm kpdCzu sc-czEUsQ jOIaqK" Client: "sc-dSnYFs ukjpK sc-cGKHXZ fvrtsY"
I manage to make it work if I only use styled-components by following this Nextjs exemple: https://github.com/vercel/next.js/tree/canary/examples/with-styled-components
But as soon as I use xstyled, things go wrong.
_app.js
import { ThemeProvider } from '@xstyled/styled-components';

import theme from '../assets/theme';

export default function App({ Component, pageProps }) {
	return (
		<ThemeProvider theme={theme}>
			<main>
				<Component {...pageProps} />
			</main>
		</ThemeProvider>
	);
}

_document.js
import Document from 'next/document';
import { ServerStyleSheet } from '@xstyled/styled-components';

export default class MyDocument extends Document {
	static async getInitialProps(ctx) {
		const sheet = new ServerStyleSheet();
		const originalRenderPage = ctx.renderPage;

		try {
			ctx.renderPage = () =>
				originalRenderPage({
					enhanceApp: (App) => (props) =>
						sheet.collectStyles(<App {...props} />),
				});

			const initialProps = await Document.getInitialProps(ctx);
			return {
				...initialProps,
				styles: (
					<>
						{initialProps.styles}
						{sheet.getStyleElement()}
					</>
				),
			};
		} finally {
			sheet.seal();
		}
	}
}

.babelrc
{
  "presets": ["next/babel"],
  "plugins": [["babel-plugin-styled-components", { "ssr": true }]]
}

I found why it wasn't working: babel-plugin-styled-components doesn't work with xstyled.
Check out this plugin: https://github.com/hookydev/babel-plugin-styled-components
npm install --save-dev @hookydev/babel-plugin-styled-components

.babelrc
{
  "presets": ["next/babel"],
  "plugins": [["@hookydev/babel-plugin-styled-components", { "ssr": true }]]
}

No more errors !

OMG banging my head against styled-components + nextjs issues for a while
🤦♂

Cross referencing https://github.com/gregberge/xstyled/issues/94 which provides an appropriate solution for this issue.

Cross referencing https://github.com/gregberge/xstyled/issues/94 which provides an appropriate solution for this issue.


Font size of signin key is different from account number

The font size of the signin key is different from the account number.

@zinoadidi Fixed it. Please confirm.

We should use a monospaced font for account numbers and signing keys.

Fixed.


Add install target to CMakeLists.txt

This should make make install produce something.

Now it passed the build. What do you think @koide3 ?

Sorry for the late reply. I was a bit busy last weeks. The PR looks now fine, and I merge it. Thanks for your contribution!


Armour rendering and layer rendering is bugged

Yay, first issue :fire:

https://minecraft.curseforge.com/projects/crawl/files/2695631


(#304) Enable Tabs on docs

Description Of Changes
The appropriate JavaScript has been updated to allow usage of the Bootstrap Tab on docs.chocolatey.org
Motivation and Context
We would like to use the tab component, and this is a requirement.
Testing

Linked to docs.chocolatey.org locally
Ensured the tab component worked as expected.

Operating Systems Testing
n/a
Change Types Made

[ ] Bug fix (non-breaking change).
[x] Feature / Enhancement (non-breaking change).
[ ] Breaking change (fix or feature that could cause existing functionality to change).
[ ] Documentation changes.
[ ] PowerShell code changes.

Change Checklist

[ ] Requires a change to the documentation.
[ ] Documentation has been updated.
[ ] Tests to cover my changes, have been added.
[ ] All new and existing tests passed?
[ ] PowerShell code changes: PowerShell v2 compatibility checked?

Related Issue

#304
https://github.com/chocolatey/docs/issues/661

Merging as the failing test here is an issue with the workflow and not the js that was changed. A separate issue will be created to address this.


GoogleTest should be included as ExternalProject

Hi!
First off, thanks for providing and maintaining this library!
I noticed that GoogleTests is checked in as a part of the source and I'd like to suggest that CMake's ExternalProject feature could be used instead. It would allow cppfs to checkout and include it in the configure process. Additionally, this could become optional based on if find_package() cannot find an already installed GTest library on the host.
Please see GoogleTest readme for more information: Incorporating Into An Existing CMake Project (https://github.com/google/googletest/blob/4f4c01d8c86659f587ea0bc27c815ffa94fc9f72/googletest/README.md)
Main benefits include

3rd party code is not checked in
cppfs no longer need to update GoogleTest them self.
cppfs could easily point to specific git tag or branch of GoogleTest
GoogleTests source is not included if OPTION_ for tests is ON
If installed on host, Linking is easy as find_package(GTest WANTED_VERSION EXACT) and target_link_libraries with GTest::GTest and GTest::Main
If GoogleTests is downloaded and added to the project like suggested, just call target_link_libraries with gtest and gtest_main

If this sounds reasonable I would be happy to help out by sending a PR or further instructions.
Best regards

Thanks for your interest in this project.
Within our cmake-init template, we currently examine alternative approaches to integrate googletest and googlemock. Our latest approach can be viewed in https://github.com/cginternals/cmake-init/pull/97.


1.0.0 tag is not part of crystal-devel branch (or any other branch)

The 1.0.0 tag that was released with Crystal doesn't appear in any branches. At present, it should be part of crystal-devel, but that branch appears to have the same commit at HEAD with a different commit ID.

I found that too. which cause vcs export failed with:

src/ros-visualization/rqt_py_console: Could not determine remote containing '2ab8356f46d073e48f38cba11668118317007a39'

I change the 1.0.0 tag to point to the commit on the crystal-devel branch. It seems two different versions of the changelog have been pushed.
@mlautman FYI


WinForms .Net Framework VB.Net Issue

Hello,
I added the Appcenter.Start(..) method to the application_startup event of the ApplicationEvents module,
and I got the  "App Center SDK configured successfully" confirmation in the console, but still no data is shown an analytics nor logs nor anything, the device is online..
What am I doing wrong? How can I get the data to show?

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

ID: 4f2add0f-2806-8bfa-92d5-cc3fdd1e1055
Version Independent ID: c572b535-a780-fba3-0845-f5127d98d7d6
Content: UWP SDK Troubleshooting - Visual Studio App Center
Content Source: docs/sdk/troubleshooting/uwp.md
Service: vs-appcenter
GitHub Login: @elamalani
Microsoft Alias: emalani

Hello, this forum is only used for issues with the documentation. For product support, the quickest way to get help is to use the in-product support channel.


Feat (trader_pearl): Update to the latest hash

Proposed changes
Update trader to the version that supports taking arguments from GNOSIS_LEDGER_RPC
This version comes from https://github.com/valory-xyz/trader/pull/354/files
Types of changes
What types of changes does your code introduce?
Put an x in the boxes that apply

[ ] Bugfix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

@OjusWiZard This has to be updated to use Trader 0.18.2 / 0.18.7 once this PR https://github.com/valory-xyz/trader/pull/356 is resolved.


AWS Transfer Utility does not set content types correctly when uploading a directory

When uploading a directory with the Transfer Utility, it is not setting content types correctly, causing the browser to interpret these files incorrectly when accessing our static site on our s3 bucket.
Expected Behavior
Content types should be set on .svg, .json, and .css files
Current Behavior
Currently when uploading a directory certain files are not showing the correct content types.  In our case, any files that is showing this behavior has been set to application/octet-stream instead.
Steps to Reproduce (for bugs)
Current code:
TransferUtilityUploadDirectoryRequest req = new TransferUtilityUploadDirectoryRequest
{
	BucketName = _bucketName,
	Directory = _directory,
	CannedACL = S3CannedACL.PublicRead
};

await util.UploadDirectoryAsync(req);

Context
These files are interpreted incorrectly by the browser when trying to access the static website on our s3 bucket.
Your Environment

AWSSDK.Core version used:  <IP_ADDRESS>
Service assembly and version used:
Operating System and version:  Win 10

.NET Core Info

.NET Core version used for development:   2
.NET Command Line Tools (2.0.3)

Runtime Environment:
OS Name:     Windows
OS Version:  10.0.15063
OS Platform: Windows
RID:         win10-x64
Base Path:   C:\Program Files\dotnet\sdk\2.0.3\
Microsoft .NET Core Shared Framework Host
Version  : 2.0.3
Build    : a9190d4a75f4a982ae4b4fa8d1a24526566c69df

To confirm what I'm seeing the SDK do
css -> text/css (Which seems right)
svg -> image/svg+xml (Which seems right)
json -> application/octet-stream (Not correct and should be application/json)
Is that what you are seeing?

I feel a little foolish now.  Turns out all these files were in an assets directory that was not getting included with the upload.  Dev tools were showing 403s for those files rather than 404s so it was a little confusing.  I added a search option to the upload directory request so it includes subdirectories now and it seems like it is working way better.


Support for Keycloak 10.x

Using Keycloak-10.0.2. Deployed and configured bankid identityprovider as instructed using key/truststore from existing working bankid application.
Run into this whatever I do, problem manifests itself before getting into debuggable code. Tried to set media type, but that should be done by freemarker implementation.
17:39:23,804 ERROR [org.keycloak.headers.DefaultSecurityHeadersProvider] (default task-2) MediaType not set on path /auth/realms/mytestrealm/broker/bankid/login, with response status 307
17:39:23,808 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-2) Uncaught server error: javax.ws.rs.InternalServerErrorException: HTTP 500 Internal Server Error
Disclaimer! Is totally new to keycloak so UBD may have occurred.

I have exactly the same problem. run the same version of Keycloak-10.0.2.

Thanks for the report.
We have only tested the project with Keycloak 9.x (9.0.2 to be exact).
Some initial tests shows that there are some issues with keycloak 10.x. I will rename this issue to be "Support for Keycloak 10.x".

Quite certain this is due to --> https://github.com/keycloak/keycloak/pull/7079
As you see a fix was merged a few days ago, whereas i'm pretty sure this issue will self repair.
If you're not dependent upon 10.x I'd suggest we skip that version entirely and jump straight to 11 (master is now tagged 11.0), that includes this fix.
I've created a docker image from master including this fix as well as our bankid broker.
You're more than welcome to try it out, please not however I've only tested it for a few minutes, but for evaluation and or testing it should do the trick.
It's basically just a wrapper around the official keycloak container -> https://hub.docker.com/r/jboss/keycloak/
An example on howto start it. Please note the volume path needs adjustents.
docker run -d --name keycloak -v /home/isrjo/tmp/tls:/tls -p8080:8080 -e "KEYCLOAK_USER=admin" -e KEYCLOAK_PASSWORD="supersecret" bankid4keycloak/bankid4keycloak:1

Does the performLogin method in BankidIdentityProvider really need to use temporary redirect(307)?
Changing this to a 302 or 303 is sufficient to avoid the MediaType problem in Keyclaok 10.0.2, although I agree that 307 should be supported by Keycloak.

Did a local change and changed to ResponseseeOther and this works in 10.0.2
```
@Override
public Response performLogin(AuthenticationRequest request) {
try {
return Response.seeOther

Did a local change and changed to Response.seeOther (because this was the only other redirect method) and this works in 10.0.2
@Override
	public Response performLogin(AuthenticationRequest request) {
		try {
			return Response.seeOther

Any redirect status is possible using
Response.status(302).location(
The seeOnly and temporaryRedirect are only convenience methods for the above. Not sure though which status would be the most "correct" one to use if that even matters.

Thanks for the investigation and proposed solution. If anyone of you want to create a pull request you are welcome. Otherwise I will implement this next time I have time to work on the project. Probably sometime this weekend.

Thanks for the investigation and proposed solution. If anyone of you want to create a pull request you are welcome. Otherwise I will implement this next time I have time to work on the project. Probably sometime this weekend.


fix for proxying feature_count param in wmts getfeatureinfo request

https://github.com/mapproxy/mapproxy/issues/405

Thanks. Can you add a testcase to https://github.com/mapproxy/mapproxy/blob/master/mapproxy/test/system/test_wmts.py

I added a test case for a getfeatureinfo request with feature_count parameter.

The Travis build failed, but only for Python: 2.7 USE_LATEST_PILLOW=1.
The following test failed:
mapproxy/test/system/test_wms.py::TestWMS100::test_get_map FAILED        [ 30%]

This seems unrelated to the test case I added. Any idea what is going on?

Thanks!


Create sharedObject in LayoutItem

The LayoutItem uses the ValueTree interface, but stores it's children in an extra OwnedArray. So the hierarchical features of the ValueTree cannot be used. The data in the LayoutItem needs to go into a sharedObject, like the ValueTree does.

This will not work, as ValueTree is not virtual. Alternative solution will be, to aggregate a ValueTree in the Layout. The LayoutItem will then have a ValueTree node for there properties.
As they use sharedObjects there is no problem with keeping them or if they change.
A ReferenceCountedObject holding the reference or actual Component (via ScopedPointer) will serve as property to reach the component.
The owning Component will be referenced in the root node.
The API will change:

addItem methods will no longer return pointers but Items.
to get an Item either pass a ValueTree (node) or the component pointer into a static method
the XML method will not change
Neither will inherit ValueTree any longer

Fixed in feature branch "ValueTree" - will be merged, when stretch issue is solved

Merged into master


Experiment With Changing SF2

Trying to experiment with changing the sound part of a MIDI file using the Sony Ericsson SF2 Series

Added in version 0.84


Update create-type-transact-sql.md

The comment before the 2 examples appears to be wrong. it's not the case of "disk-based table" vs "memory-optimized table".
the 2 examples show

how to define a user-defined datatype
how to create a table-valued parameter type using the AS TABLE option. in this case you have
<table_option> ::=
{
[MEMORY_OPTIMIZED = {ON | OFF}]
}
Indicates whether the table type is memory optimized. This option is off by default; the table (type) is not a memory optimized table (type).
So i propose the new comments . Thanks

@baleng : Thanks for your contribution! The author, @CarlRabeler, has been notified to review your proposed change.


Tests

It needs them

I'd be immensely grateful if someone could set up just one test. I've just never done any real testing in javascript. If someone could set up a single test (with the runner and everything), however simple, then I can come in and write more.

Done


Implemented a Widget for reading messages

Currently this widget is read only
Messages can be filtered by showing only today's, yesterday's or a week before messages!
And the update frequency can be changed!
Recording:

Screenshot:

Automated message from Dropbox CLA bot
@kunall17, it looks like you've already signed the Dropbox CLA. Thanks!

lgtm @kunall17 ! I pointed out a few things to change, but otherwise seems smashing!

Rebased branch + fixed the comments

Great, merged! :)


Allow symbols to be escaped in DocText

Related to #3374, this is an implementation of escaping characters in doc comments, such as the @ symbol.

@microsoft-github-policy-service agree

/azp run typespec - pr tools

:x: There is undocummented changes. Run chronus add to add a changeset or click here.
The following packages have changes but are not documented.

:x:@typespec/compiler

Show changes

You can try these changes at https://cadlplayground.z22.web.core.windows.net/prs/3375/
Check the website changes at https://tspwebsitepr.z22.web.core.windows.net/prs/3375/

/azp run typespec - pr tools


fix(core): user is not redirected to Login page after requesting password reset link

What/Why?
This PR fixes the flow of redirecting users to the Login Page after changing the password
Testing
locally
before:
https://github.com/bigcommerce/catalyst/assets/82589781/636fcd57-79ff-42a3-95b4-f7abbe559251
https://github.com/bigcommerce/catalyst/assets/82589781/fe0a9e3f-aa04-455d-bea3-bddb7fd4611c
after:
https://github.com/bigcommerce/catalyst/assets/82589781/f46f3a41-1a8f-4b0f-a907-2a0b384ac425
https://github.com/bigcommerce/catalyst/assets/82589781/8212c532-90e2-42bf-8e09-97735e668c06

To redirect to the Login, I used the context that was created for the Account, so as not to create a separate context for the Login. Guys, do you think this approach is acceptable in this case? If so, should we move this context out of the Account directory and rename it to something more generic to use for both Account and Login? thanks!

Some functional tests would be good with this PR as well 🙏


Prep v0.11

A few small things to get ready for a release.

@cippaciong @pbrisbin Note that I've changed the Arch package a little bit. If either of you are planning on updating the AUR with the new release, the new dependency might effect things.

Tanks for the notice, I'm updating the package on AUR right now 👍


Add Laravel Sail

Hello,
Do you have any plans to add laravel Sail for easier containerized development?

I haven't used Sail but I'm definitely open to a PR. Otherwise I can try to look into it in the future, I'm stretched a little thin right now. 😞


Google chrome installed via winget shows error while checking for updates, package identifier Google.Chrome

Please confirm these before moving forward

[X] I have searched for my issue and not found a work-in-progress/duplicate/resolved issue.
[X] I have not been informed if the issue is resolved in a preview version of the winget client.

Category of the issue
Other
Brief description of your issue
I have tried installing Google chrome via winget on 2 devices and on both of them I am seeing the same issue that after installation when I open Chrome and go to Settings > About Chrome , it shows the following error

If I download Chrome manually from web then this issue doesn't show up
Steps to reproduce
I have tried the following command
winget install --Id Google.Chrome --version 122.0.6261.112 --silent --scope machine --accept-package-agreements --accept-source-agreements
and other variation of it with a different version and also a user level scope
Actual behavior
Chrome's version checker is not working
Expected behavior
Chrome's version checker should work
Environment
Windows Package Manager v1.7.10861
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.3155
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.22.10861.0

Winget Directories
-----------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\Diag…
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\sett…
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled

Screenshots and Logs
No response

All WinGet does is download and run the installer, so this must be something with the way Google is hanlding command line installs

@SpecterShell I saw that you have recent commits for the Chrome manifest, do you have any idea as why this would be happening?

@SpecterShell I saw that you have recent commits for the Chrome manifest, do you have any idea as why this would be happening?

If Chrome was installed in user scope (did not use --scope machine in WinGet when installing Chrome), you can try winget install Google.GoogleUpdate to install the missing update component.
If Chrome was installed in machine scope (used --scope machine in WinGet when installing Chrome), you can try winget install Google.Chrome --force to install the MSI version of Chrome and override the existing one.

@spectershell - should we add Google.GoogleUpdate as a dependency just for the user scoped installers of Google.Chrome ?

@SpecterShell - should we add Google.GoogleUpdate as a dependency just for the user scoped installers of Google.Chrome ?

Probably not. Google.GoogleUpdate does not write ARP entries to registry, so adding it as a dependency could cause WinGet to install it every time it upgrades Google.Chrome as WinGet can not find that ARP entry.

@SpecterShell - should we add Google.GoogleUpdate as a dependency just for the user scoped installers of Google.Chrome ?

Probably not. Google.GoogleUpdate does not write ARP entries to registry, so adding it as a dependency could cause WinGet to install it every time it upgrades Google.Chrome as WinGet can not find that ARP entry.

Does it always install the files to the same location?

@SpecterShell - should we add Google.GoogleUpdate as a dependency just for the user scoped installers of Google.Chrome ?

Probably not. Google.GoogleUpdate does not write ARP entries to registry, so adding it as a dependency could cause WinGet to install it every time it upgrades Google.Chrome as WinGet can not find that ARP entry.

Does it always install the files to the same location?

In user scope it is installed in %localappdata%\Google\Update. In machine scope (although this package can not be installed in machine scope directly) it is stored in C:\Program Files (x86)\Google\Update.


Add max page sized to select

Often times when I am building a select at the CLI, I don't want it to take up the entire terminal and instead I'd like it to take up a set size.
I've hacked around in dialoguer a little bit to get what I want working and I am wondering if the maintainers would like this feature backported to them?

Blocked on #130 to be done first

@justinbarclay Since the paging refactor has been done, do you want to update this? cc @deg0nz

Hey, thanks for the ping. I'll try to take a look at this on the weekend 🙂


Pack Yii in a PHAR-archive

Original Yii 1.1 issue: https://github.com/yiisoft/yii/issues/800
In my opinion we could do this before alpha release. This would let community and users test it intensively (alpha release is far better for this than beta or stable releases).

expired for now. If someone want to do a PR for this, feel free to do so.


Use Zulu JDK vendor

It supports Java 8 on Apple Silicon chips.

@Goooler , what are these changes supposed to accomplish?

The ADOPTIUM vendor doesn't support Java 8 on M1 mac, may cause some build errors.

ADOPTIUM is the default for toolchain auto-provisioning for Gradle for historical reasons. People still can make such changes in their build-script, if they so desire. It doesn't really help anybody if we apply these changes for tests, here in the plugin repo.


"No suitable method method found to override" on DefaultMatchHandler after QnADialog update

I just updated my QNADialog NuGet package to the more recent one, and now for no reason that I can see I started getting a "No suitable method method found to override" error on the overriding DefaultMatchHandler method, which I didn't have beforehand.
My code:
using System;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Microsoft.Bot.Builder.CognitiveServices.QnAMaker;
using Microsoft.Bot.Builder.Dialogs;
using QnAMakerDialog;
using QnAMakerDialog.Models;

namespace Wegho_BOT.Dialogs
{
    [Serializable]
    [QnAMakerService("d3cdd6de1ff240a28b15144f8e76af5a", "e85cf625-1519-405f-907e-f4f8455bd821")]
    public class QnADialog : QnAMakerDialog<bool>
    {
        /// <summary>
        /// Goes back to the MainLUISDialog with a false boolean value when no answer is found in the QnAMaker knowledge base.
        /// </summary>
#pragma warning disable CS1998
        public override async Task NoMatchHandler(IDialogContext context, string originalQueryText)
        {
            context.Done(false);
        }
#pragma warning restore CS1998

        /// <summary>
        /// Sends the user an answer to the user's question, and goes back to the MainLUISDialog with a true boolean value, after the QnAMaker calculates it..
        /// </summary>
        /// <param name="originalQueryText">The original question asked by the user</param>
        /// <param name="result">The answer calculated by the QnAMaker</param>
        public override async Task DefaultMatchHandler(IDialogContext context, string originalQueryText, QnAMakerResult result)
        {
            var answerSeparated = SplitAnswer(result.Answer);

            foreach (var item in answerSeparated)
            {
                await context.PostAsync($"{item}");
            }
            context.Done(true);
        }

        /// <summary>
        /// Splits an answer into an array of strings, separated by phrases.
        /// </summary>
        /// <param name="answer">The string to separate</param>
        /// <returns>Array of strings of the separated answer</returns>
        public string[] SplitAnswer(string answer)
        {
            string pattern = @"([^\d][.!?][^a-z])";
            string pattern2 = @"([\d][.])";
            string substitution = @"$1|";
            string substitution2 = @"|$1";
            Regex regex = new Regex(pattern, RegexOptions.IgnoreCase);
            Regex regex2 = new Regex(pattern2, RegexOptions.IgnoreCase);
            string answerSeparated = System.Net.WebUtility.HtmlDecode(regex.Replace(answer, substitution));
            answerSeparated = System.Net.WebUtility.HtmlDecode(regex2.Replace(answerSeparated, substitution2));
            return answerSeparated.Split(new[] { "|" }, StringSplitOptions.RemoveEmptyEntries);
        }
    }
}

I've even tried copying and pasting the method signature from the sample in the repository and still I get this error.

Thanks for this. I'll take a look and come back to you.
Get Outlook for Androidhttps://aka.ms/ghei36

From: 1110770MiguelSilva<EMAIL_ADDRESS>Sent: Friday, February 9, 2018 2:16:40 PM
To: garypretty/botframework
Cc: Subscribed
Subject: [garypretty/botframework] "No suitable method method found to override" on DefaultMatchHandler after QnADialog update (#16)
I just updated my QNADialog NuGet package to the more recent one, and now for no reason that I can see I started getting a "No suitable method method found to override" error on the overriding DefaultMatchHandler method, which I didn't have beforehand.
My code:
using System;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Microsoft.Bot.Builder.CognitiveServices.QnAMaker;
using Microsoft.Bot.Builder.Dialogs;
using QnAMakerDialog;
using QnAMakerDialog.Models;
namespace Wegho_BOT.Dialogs
{
[Serializable]
[QnAMakerService("d3cdd6de1ff240a28b15144f8e76af5a", "e85cf625-1519-405f-907e-f4f8455bd821")]
public class QnADialog : QnAMakerDialog
{
///
/// Goes back to the MainLUISDialog with a false boolean value when no answer is found in the QnAMaker knowledge base.
///
#pragma warning disable CS1998
public override async Task NoMatchHandler(IDialogContext context, string originalQueryText)
{
context.Done(false);
}
#pragma warning restore CS1998
    /// <summary>
    /// Sends the user an answer to the user's question, and goes back to the MainLUISDialog with a true boolean value, after the QnAMaker calculates it..
    /// </summary>
    /// <param name="originalQueryText">The original question asked by the user</param>
    /// <param name="result">The answer calculated by the QnAMaker</param>
    public override async Task DefaultMatchHandler(IDialogContext context, string originalQueryText, QnAMakerResult result)
    {
        var answerSeparated = SplitAnswer(result.Answer);

        foreach (var item in answerSeparated)
        {
            await context.PostAsync($"{item}");
        }
        context.Done(true);
    }

    /// <summary>
    /// Splits an answer into an array of strings, separated by phrases.
    /// </summary>
    /// <param name="answer">The string to separate</param>
    /// <returns>Array of strings of the separated answer</returns>
    public string[] SplitAnswer(string answer)
    {
        string pattern = @"([^\d][.!?][^a-z])";
        string pattern2 = @"([\d][.])";
        string substitution = @"$1|";
        string substitution2 = @"|$1";
        Regex regex = new Regex(pattern, RegexOptions.IgnoreCase);
        Regex regex2 = new Regex(pattern2, RegexOptions.IgnoreCase);
        string answerSeparated = System.Net.WebUtility.HtmlDecode(regex.Replace(answer, substitution));
        answerSeparated = System.Net.WebUtility.HtmlDecode(regex2.Replace(answerSeparated, substitution2));
        return answerSeparated.Split(new[] { "|" }, StringSplitOptions.RemoveEmptyEntries);
    }
}

}
I've even tried copying and pasting the method signature from the sample in the repository and still I get this error.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/garypretty/botframework/issues/16, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADuE6T3g8GnZ3PWG9KhCRNzpQ5JuiNYbks5tTFNIgaJpZM4R_--V.

Okay, I seem to have figured it out, apparently the QnAMakerResult being called in the method signature was from: "Microsoft.Bot.Builder.CognitiveServices.QnAMaker.QnAMakerResult" instead of "QnAMakerDialog.Models". After changing it the error seized to appear, thanks anyway for your time :)

Yes, this is what I just found too.  I think you must have been using a slightly older version of the dialog as the QnAMakerResult never used to be part of the signature for the DefaultMatchHandler.  Glad you have things working anyway!


Static sence

Hi, thanks for putting the fantastic work on public!
Is this also for static object (360 surrounding like) surface reconstruction? How can I use my own NERF/NeuS-like dataset in this code?
Looking forward to your reply. Thanks.

This code was built on torch-ngp, which means you should convert your own dataset to ngp-like camera format (transforms.json).
Besides, we didn't additionally implement a background model, so you may need to mask the foreground (RGBA images) for better training.


The search window is not limited to the current project

Does this issue occur when all extensions are disabled?: Yes/No
I cannot disable all extensions because I need to use remote SSH to have access to my project.

VS Code Version: 1.65.2
OS Version: Windows 10

Steps to Reproduce:

Open a project in remote SSH
Type some string in the search window
The string is searched on the whole machine, not the project, which causes the search to last for more than 30 min

Do you have a path in the files to include box?
Can you share a screenshot?

Here is a screenshot, I didn't modify anything in the search box.

This looks like a file in your workspace, it would be at ./sku_potential_forecast/dataprep.py

Sure, the search window returns results from all the machine. Is it possible to restrict the search to a project?

Is it possible to restrict the search to a project?

This is what happens by default. It would be helpful to share a screenshot showing the issue, otherwise I can't really help.
If search is leaving the workspace, maybe you have a symlink pointing outside of the workspace.


Presentation: Support BeGuid type properties in hierarchies

Closes: https://github.com/iTwin/imodel-native/issues/257
itwinjs-core: https://github.com/iTwin/itwinjs-core/tree/presentation/support-guid-type-in-hierarchies
itwinjs-core-pr: https://github.com/iTwin/itwinjs-core/pull/5588

/azp run imodel-native


single line if-else statement

This fixes the issue where single line if-else statements are diagnosed as an error:
variable = true if x == y else false

The regex(.*?if.*else.*) might be too broad though...

Agreed that the regex is a bit too broad.  The regexp before it (line 115) looks like it should cover your example - see https://regex101.com/r/PqK3de/1 - and copy/pasting that expression into a .gd file didn't throw an error.  Can you explain how to reproduce this error?
If this is in reference to #25 , this wouldn't address that since it's for a multi-line if-statement.

You were absolutely right. The regexp before should've covered it, but my line was actually as the following:
is_on_tree = true if "Tree" in current_bottom.name else false

(and yes, I do know that it could've been just is_on_tree = "Tree" in current_buttom.name)
The " wasn't caught in there, so I've fixed the previous regexp to accept double quotes as well.


Subclassed models generating scope override warnings, again

Greetings, I'm in the process of upgrading our project's gems and, upon upgrading Kaminari to version 0.16.2 I began receiving the following errors:
Creating scope :page. Overwriting existing method Admin.page.
Creating scope :page. Overwriting existing method FarmAddress.page.
etc ...

At first, I expected this to be an issue with another gem making use of the "page" method, but that no longer appears to be the case.
I have tried setting a custom page value, ex: config.page_method_name = :kaminari_page, but all this does is change my errors to the following:
Creating scope :kaminari_page. Overwriting existing method Admin.kaminari_page.
Creating scope :kaminari_page. Overwriting existing method FarmAddress.kaminari_page.
etc ...

Upon further inspection, I noticed that all of the scope warnings were related exclusively to subclassed objects. For example FarmAddress is a direct subclass of Address. This appears to be an issue reminiscent of #48 which was fixed in 0.13.0.
I tested out various Kaminari versions in order to pinpoint the troublesome version. What I found was that versions up to 0.16.2 were working properly and that the 0.16.2 version is what was causing this issue to appear.
Here are a few of our existing gems in order to shed a bit of light on the issue:
ruby 2.1.5
rails 3.2.21
mongoid 3.1.6
kaminari 0.16.2

Lastly, we are not using the will_paginate gem in our application. Good luck on debugging the issue, let me know if any further info would be helpful. For the time being we'll just stick with 0.16.1.

This was introduced by https://github.com/amatsuda/kaminari/pull/634. Unfortunately, I don't think we can fix this issue without breaking #634 as subclasses have to override page method now. Any good idea?

I'm getting the same problem. I have had to go back down to 0.16.1 temporarily.

Again, this is unfixable due to how mongoid's scope works.
class User
  include ::Mongoid::Document

  scope :puts_self, -> {
    puts self
  }
end

class Admin < User
end

User.puts_self  # => User
Admin.puts_self # => User

The last line outputs User instead of Admin. This means Admin will retrieve config values from User class so configurations in Admin class won't work properly. #634 fixed it. If someone really wants the warnings to go away, try to fix mongoid, not kaminari. The current implementation is what we can do the best. Saying just I have the same or +1 would NEVER help fix bugs.

Thank you YUKI24 that definitely put ME in my place. Terribly sorry.

Thanks for the updates and troubleshooting work yuki, much appreciated.

Does the error message Creating scope :page. Overwriting existing method Admin.page. actually affect performance? I'm seeing this too but wasn't sure if it's something I should just ignore.

@netwire88 You can use Benchmark or benchmark-ips if you need.


New Windows Build System using Visual Studio instead of Gradle

LARGE PR
See README.md for more information.
Tested in all configs for both app and library in x64.
Any suggestions/feedback appreciated.

Anything special need to done to the jenkins jobs to build and run UT ?

There currently isnt a system in place to build UT (There was not before so was unsure if there was need) - I'll happily work on this if need be

Build should suffice, UT is only run on linux and that should be good enough.

Build should suffice, UT is only run on linux and that should be good enough.

Ill look into it, thanks!


What other types of content do you want to see in here?

Some examples of the topics that I can think of and am going to work on adding:

Gtk/Icon themes section (see #2)
Kernel hacking resources.
Security hardening resources.
Getting to know Linux internals.

Anything else you would recommend deserves a spotlight in this list?

resources for write scripts... @aleksandar-todorovic What do you think?

@gutierri I'm definitely saying yes if you can compile such a list.

how about adding a shell section? and resources to learn or enhance em?

Since we already have bash resources, I guess zsh resources would be appropriate as well. Might even give them a specific category after some time.
You could use this repo to see if there's anything worth cross-posting to this repository: https://github.com/unixorn/awesome-zsh-plugins
I have already referenced a bit less specific https://github.com/alebcay/awesome-shell in the repository.

A section for Gentoo might be nice.

Podcasts about Linux.

@SiqingYu That would indeed be awesome material to have!
Unfortunately, I'm not much of a podcast kind of guy, so if someone else wants to kick off the category, you're more then welcome to!


Driver not able to validate newer version of Virtualbox as pre flight check.

-- Starting Minishift VM ..... FAIL E1224 19:36:14.712940    3730 start.go:494] Error starting the VM: Error creating the VM. Error with pre-create check: "Virtual Box version 4 or lower will cause a kernel panicif xhyve tries to run. You are running version: 6.0.0r127566\n\n\t Please upgrade to version 5 at https://www.virtualbox.org/wiki/Downloads". Retrying.
Error starting the VM: Error creating the VM. Error with pre-create check: "Virtual Box version 4 or lower will cause a kernel panicif xhyve tries to run. You are running version: 6.0.0r127566\n\n\t Please upgrade to version 5 at https://www.virtualbox.org/wiki/Downloads"

Could be fixed in https://github.com/machine-drivers/docker-machine-driver-xhyve/pull/214.

As a note, I can't use Virtualbox 6 as a provider either:
minishift start --vm-driver=virtualbox.

-- Starting profile 'minishift'
-- Check if deprecated options are used ... OK
-- Checking if https://github.com is reachable ... OK
-- Checking if requested OpenShift version 'v3.11.0' is valid ... OK
-- Checking if requested OpenShift version 'v3.11.0' is supported ... OK
-- Checking if requested hypervisor 'virtualbox.' is supported on this platform ... FAIL
   See the 'Setting Up the Virtualization Environment' topic (https://docs.okd.io/latest/minishift/getting-started/setting-up-virtualization-environment.html) for more information


Spock Rock Game

I want to work on this under GSSOC21.Please assign to me

Hey @gupta31 Idea sounds awesome
Few things to say currently there is project rock paper scissor what I would say is to contribute to that project and create a switch button in the game for difficulty mode which will change the mode of game

Easy will remain Same Rock Paper Scissor
Hard will be your Idea

Any different kind of suggestions are welcome.
Let me know if you want to do it. I will assign it to you

@gupta31 Let me know are you interested ?

Yes I am interested .For harder level I will include Spock and lizard apart from rock,paper and scissor.
This is inspired from Big bang theory TV series.
Soon I will create PR .Please assign to me under gssoc 2021.

@gupta31 Sure !!

@gupta31 Any update?, Kindly reply within 2 days or I have to close it.


medical word typo in CSV file.

Hello, my name is hiroya iizuka, 12 years experience cardiology doctor.
I found typo in clinical_knowledge_test.csv (line 66)

In hypovolaemic shock -> In hypovolemic shock
Please fix this typo.

I believe this is the correct UK spelling.  See https://www.bmj.com/content/348/bmj.g1139 (and also the spelling of haemorrhage).


[SPARK-40560][SQL] Rename message to messageTemplate in the STANDARD format of errors

What changes were proposed in this pull request?
In the STANDARD format of error messages, rename the message field to messageTemplate.
Why are the changes needed?
Because the field contains a template of an error message, actually.
Does this PR introduce any user-facing change?
Yes.
How was this patch tested?
By running the affected test suites:
$ build/sbt "core/testOnly *SparkThrowableSuite"
$ build/sbt -Phive-2.3 -Phive-thriftserver "test:testOnly org.apache.spark.sql.hive.thriftserver.CliSuite"
$ build/sbt -Phive -Phive-thriftserver "test:testOnly *ThriftServerWithSparkContextInBinarySuite"

also cc @srielau @anchovYu

Merging to master. Thank you, @cloud-fan for review.


Greyscale scanned pdf not working on safari, pdf.js 1.1.114-dist

I scanned same document 2 times, color and greyscale. i upload both files and color document is larger in size still its working properly but same greyscale document is not working its displayed as blank pages. i have both files but i am not able to upload pdf files here.

Without the PDF files and more information (errors/warnings in the console, details about your configuration, et cetera), there is unfortunately nothing we can do about this. Please make sure to read https://github.com/mozilla/pdf.js/blob/master/CONTRIBUTING.md before submitting an issue. Closing as invalid until more information is provided. You could try making other PDF files without sensitive data.

By this reply i don't think so you guys want to resolve this issue. I have
windows server from GoDaddy. You can find my both pdf files in attachment.
I scan same document 2 times in canan scanner, one is as colored and one as
greyscale. You can check both files working great firefox or IE but if you
open this in IPad Safari you can see that color document is working but
greyscale is not.
On Wed, Jun 3, 2015 at 1:48 PM, Tim van der Meij<EMAIL_ADDRESS>wrote:

Without the PDF files and more information (errors/warnings in the
console, details about your configuration, et cetera), there is
unfortunately nothing we can do about this. Please make sure to read
https://github.com/mozilla/pdf.js/blob/master/CONTRIBUTING.md before
submitting an issue. Closing as invalid until more information is provided.
You could try making other PDF files without sensitive data.
—
Reply to this email directly or view it on GitHub
https://github.com/mozilla/pdf.js/issues/6077#issuecomment-108571738.

We are willing to resolve the issue, but we are not able to if not enough information is provided. Unfortunately GitHub does not support adding attachments via e-mail, so you will have to upload them to a file sharing service like Dropbox or Google Drive.

You can find both files on below links. let me know if you need any other information.
IPad, iOs 8.3
GreyScale : https://www.dropbox.com/s/z55jm9dv7t5w92c/greyscale.PDF?dl=0
Colored : https://www.dropbox.com/s/rrgsgon3anogiqa/color.PDF?dl=0

@priyesh875 Are you using the latest version of PDF.js? You can verify by opening both files with https://mozilla.github.io/pdf.js/web/viewer.html (Open File button in the toolbar) and see if the problem persists.

yes, i am using pdf.js 1.1.183 latest version. it still doesn't work.

I am having the same issue, we have pdf's that are all grayscale except for a blue line at the bottom. The blue line of text is rendered but the rest of the document is not. This is on ios in a angular app using pdf.js the latest stable version. I have also included compatibility.js.

right now for solution we convert over pdf at uploading time with ImageMagick, its open source converter. We are using this command "convert -density 175 -compress jpeg -quality 20 abc.pdf abc_result.pdf" to convert over pdfs and its working nice but its not proper solution. i am also waiting for reply from pdf.js developers.

thanks for the info.

I have looked a bit more into the shared PDF files. The grayscale version contains an image that is almost two times larger than the color version. It is known that resource-constrained devices currently have issues rendering these large images. For web usage, it is better to reduce the size of those images. Marking as performance issue.

Does anyone still have the files here? None of the links work.

Aside from the links not working anymore, this is also a very old issue that might well be resolved in the latest version already due to all performance improvements in the meantime. Closing for now; please attach the PDF on GitHub if there are still issues (to avoid the file getting lost).


Update mesolve vector_field for QArrays

On top of https://github.com/dynamiqs/dynamiqs/pull/620.
This PR makes the following simple mesolve example run without errors:
import dynamiqs as dq
import jax.numpy as jnp

H = dq.number(8)
jump_ops = [dq.destroy(8)]
tlist = jnp.linspace(0.0, 1.0, 10)
psi0 = dq.basis(8, 0)
result = dq.mesolve(H, jump_ops, psi0, tlist)

In practice, this only requires modifying the vector_field function to avoid the call to jnp.stack. It now uses a simple for loop. Below are several benchmarks to show that this doesn't impact performance.

Benchmark sums of matmuls
import jax.numpy as jnp
import jax
import timeit

# benchmark sum of matmuls
@jax.jit
def f(A, B, C):
    tmp = jnp.zeros_like(A)
    for x in [A, B, C]:
        tmp += x @ x
    return tmp

@jax.jit
def g(A, B, C):
    x = jnp.stack([A, B, C])
    return jnp.sum(x @ x, axis=0)

@jax.jit
def h(A, B, C):
    x = [A, B, C]
    return sum([x_ @ x_ for x_ in x])

N = 1000
A = jnp.ones((N, N))
B = jnp.ones((N, N))
C = jnp.ones((N, N))

print(jnp.allclose(f(A, B, C), g(A, B, C)))
print(jnp.allclose(f(A, B, C), h(A, B, C)))

%timeit f(A, B, C).block_until_ready() # 46.6 ms ± 2.28 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
%timeit g(A, B, C).block_until_ready() # 55 ms ± 8.29 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)
%timeit h(A, B, C).block_until_ready() # 51.2 ms ± 7.2 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)

Benchmark vector_field variants
import jax.numpy as jnp
import jax
import timeit

# benchmark vector_field
@jax.jit
def vf1(H, Ls, y):
    tmp = -1j * H @ y
    for L in Ls:
        L_dag = L.conj().mT
        L_y = L @ y
        tmp += 0.5 * (L_y @ L_dag - L_dag @ L_y)
    return tmp + tmp.conj().mT

@jax.jit
def vf2(H, Ls, y):
    Lsd = [L.conj().mT for L in Ls]
    Hnh = -1j * H
    for L, Ld in zip(Ls, Lsd):
        Hnh += -0.5 * Ld @ L
    tmp = Hnh @ y
    for L, Ld in zip(Ls, Lsd):
        tmp += 0.5 * L @ y @ Ld
    return tmp + tmp.conj().mT

N = 1000
H = jnp.ones((N, N))
Ls = [jnp.ones((N, N)) for _ in range(3)]
y = jnp.eye(N)

print(jnp.allclose(vf1(H, Ls, y), vf2(H, Ls, y)))

%timeit vf1(H, Ls, y).block_until_ready() # 352 ms ± 69.3 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
%timeit vf2(H, Ls, y).block_until_ready() # 351 ms ± 51.4 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

Closing in favor of https://github.com/dynamiqs/dynamiqs/pull/639


Git integration being removed in ADF when using PublishADFTask

We have an ADF with Git Integration enabled and would like to publish the changes in ADF every time a PR is merged to our Dev branch.
The publishing seems to work, but after the deployment stage, the Git Integration is gone.
Is this supposed to happen? We have a separate deployment POC using Git Enterprise and it does not happen in there.
This is the task we configured:

I tried to reproduce the issue, but I can't.
Please provide a script with all required file to reproduce the issue, so then I can reopen this ticket.


Dart2JS pattern code less efficient than manual check.

class C {
  final int? _x;
  C(this._x);

  @pragma("dart2js:never-inline")
  void manual() {
    var x = _x;
    if (x != null) print(x);
    else print("null");
  }

  @pragma("dart2js:never-inline")
  void pattern() {
    if (_x case var x?) print(x);
    else print("null");
  }

  @pragma("dart2js:never-inline")
  void promote() {
    if (_x != null) print(_x);
    else print("null");
  }
}

If I compile this with dart compile js -O4 --no-minify, the code for the pattern method is less efficient than the other two:
    manual$0() {
      var x = this._x;
      if (x != null)
        A.print(x);
      else
        A.print("null");
    },
    pattern$0() {
      var x, t1,
        _0_0 = this._x;
      if (_0_0 != null) {
        x = _0_0;
        t1 = true;
      } else {
        x = null;
        t1 = false;
      }
      if (t1)
        A.print(x);
      else
        A.print("null");
    },
    promote$0() {
      var t1 = this._x;
      if (t1 != null)
        A.print(t1);
      else
        A.print("null");
    }
  };

It looks like some desugaring of patterns ends up reifying the match result as a boolean value, and introducing a temporary variable for the non-matching branch too, in a way that the Dart2JS compiler doesn't manage to optimize afterwards. (It seems like code that should be easily optimizable, so is optimization omitted for "lowered" Dart code?)
I'd prefer to use the case version, but only if it's actually as efficient.

dart2js has a structural problem that prevents it from generating nice code for examples like this.
It will take significant significant effort to fix the problem, but I think we should do it.
The root cause is that dart2js was originally envisioned to be a more JIT-like compiler, so the CFG and translation from optimized CFG to JavaScript made a compromise that the CFG structure is immutable, and JavaScript generation was guided by the original Dart program structure. We have limped along with this for a long time. dart2js never generated nice code for complex conditionals (the condition becoming reified), and with more elaborate lowerings coming out of the CFE, this is no longer appropriate.
Fixing this in dart2js will be a significant effort since it will require rewrites of the code generator and pieces of the optimizer.
Being able to reshape the CFG is a necessary to doing better, but, as the similar issue you opened on the VM shows, it is not sufficient. The VM optimizer has excellent CFG reshaping capabilities.
If the CFE could generate better lowerings (there has been progress),  that would help a lot with naive compilers like DDC.
This is the lowered Kernel IR:
class C extends core::Object {
  final field core::int? _x;
  constructor •(core::int? _x) → self::C
    : self::C::_x = _x, super core::Object::•()
    ;
  static method _#new#tearOff(core::int? _x) → self::C
    return new self::C::•(_x);
  @#C3
  method manual() → void {
    core::int? x = this.{self::C::_x}{core::int?};
    if(!(x == null))
      core::print(x{core::int});
    else
      core::print("null");
  }
  @#C3
  method pattern() → void {
    {
      hoisted core::int x;
      final synthesized core::int? #0#0 = this.{self::C::_x}{core::int?};
      if(!(#0#0 == null) ?{core::bool} let final dynamic #t1 = x = #0#0{core::int} in true : false)
        core::print(x);
      else
        core::print("null");
    }
  }
  @#C3
  method promote() → void {
    if(!(this.{self::C::_x}{core::int?} == null))
      core::print(this.{self::C::_x}{core::int?} as{Unchecked} core::int);
    else
      core::print("null");
  }
}

See also: https://github.com/dart-lang/sdk/issues/29475, https://github.com/dart-lang/sdk/issues/7475
/cc @johnniwinther @alexmarkov @nshahan I don't think we should all try to solve this in our little silos. Perhaps we should meet somehow to figure out what we would need to allow the most straight-forward generation of better code.

With the fix c6347389d2c6953ab5447e3daa2a725406f16a4d, the generated code for pattern is the same as manual and promote (other than names)
    pattern$0() {
      var _0_0 = this._x;
      if (_0_0 != null)
        A.print(_0_0);
      else
        A.print("null");
    },

Reopening due to revert: https://dart-review.googlesource.com/c/sdk/+/350006

The issue causing the revert is addressed by https://dart-review.googlesource.com/c/sdk/+/352443
The branch condition in B4 is not controlling for the join at B12


nix-darwin support

Tangentially related to #62, it would be useful to be able to ship secrets on nix-darwin systems.

Mic is probably happy to accept PRs. 😄
PS launchctl is horrible to work with and debug stuff.

Yes. patches are welcome. I don't actively use macOS and hence won't implement that myself.

Hey guys!
I was browsing forks and noticed that @4825764518 actually made some decent progress regarding darwin implementation in their branch https://github.com/4825764518/sops-nix/tree/darwin. Maybe some of the maintainers could check it out?

Add a minimal launchd service based on https://github.com/4825764518/sops-nix/tree/darwin.

#268 implements darwin support for home-manager.
Room for improvement:

Adjusting for global darwin modules should be as easy as creating the nix files and documentation.
Also the docs could describe sops-nix behaviour on darwin better and darwin instructions need to be merged into the install guide

This issue should not be closed. nix-darwin is still not supported, as #268 only allows using user-level secrets with home-manager, which is less safe than limiting access to root only.

A note - I'm using sops-nix on an AWS Mac2.metal node. Here, the present home-manager support is insufficient because it is installed as a launchagent - it runs only when a user is logged in. I've found as a workaround that each time I update, I copy ~/Library/LaunchAgents/org.nix-community.sops-nix.plist (or whatever it is) to /Library/LaunchDaemons and then load it as root. It then works great.

Hi there! My journey trough the nix world brought me here.
I was super happy that I managed to simplify secret management for my NixOS VM and equally stumped when I tried to move that to my macOS machine.
One of my short term goals is to learn more nix and contribute back to the community, and this feels like an interesting challenge to tackle.
@pogobanane what do you mean by "We'd need nixos tests though to proceed with that since the manual test matrix is getting too big otherwise"

New issue for nix-darwin support: https://github.com/Mic92/sops-nix/issues/409


twig.js shouldn't support the array's <.length>

{{ array.length  }} in Twig render nothing, but twig.js got the array's length.
this makes people confused, especially the FE-developers who use javascript more offen then PHP.

There is nothing that prevent that behaviour in Twig specs. It's even the opposite that is supported: any public property or method of an object represented by a variable is accessible in a template.
length is a public property of arrays in JavaScript and thus it is totally expected that it is accessible in the template.
It doesn't render nothing with TwigPHP because length is not a public property of arrays in PHP - arrays are not even objects to begin with.
FE developers should start by reading and understanding Twig specifications. Nothing can prevent them from accessing any public property or method of any object passed to the template.


[42] Improving and scaling up relevance labelling

Fixes #42
Pipeline to label the patent and publication data in terms of relevant/not relevant/not specified. Find more information about the pipeline and its usage in the README.md file
When test running the code, you can try a command like:
python discovery_child_development/pipeline/labelling/relevance/relevance_labels.py --dataset openalex --num_samples 5 --model gpt-3.5-turbo-1106 --output_filename testing

You can try changing the dataset name to openalex, patents or openalex_broad
No need to review the one ipynb notebook, as that's just for testing.
@j-gillam, just to note that I have changed the output format of the pipeline to a simple jsonl file, which also includes the text for labelling and subsequent training for each data point. This is a different format from the previously used csv file - but the keys/columns should be the same as before. I hope that's OK, but let me know if you think we should change the way the output file is produced.
Thank you!

Thanks a lot @RFOxbury, I've implemented your suggestions!

I'll go ahead and merge, but FYI @j-gillam I've changed the getters slightly for the relevance labels.


feat: support l2 plus

Part of #1080

@karlem Another question I have is regarding nonce. Say a bottom up message is created in L3, the nonce will be set by the local network. Then in L2, will the cross network message nonce change? If so, then the id (keccak) will change too?

@karlem Another question I have is regarding nonce. Say a bottom up message is created in L3, the nonce will be set by the local network. Then in L2, will the cross network message nonce change? If so, then the id (keccak) will change too?

Hmm that's a good point. I will think about how to mitigate this.

@cryptoAtwill should be ready for another review :)

@cryptoAtwill The issue was resolved by not using or supporting native token transfers in the Call message.

This looks good to me. Just one more thing regarding the tests, shall we also add nonce check to bottom up, just make sure it's correct?


drivers: gpio: Fix Coverity static scan issues

patch fix the dead code issue reported by coverity static scan
for gpio driver of cc2650 TI SOC. GPIO_DS_DFLT_LOW macro
is defined Zero, bitwise and with any value would result to
zero,because of which only false condition of if is evaluated
but not the true condition.This is a fix for jira ZEP-2355.
Signed-off-by: Savinay Dharmappa<EMAIL_ADDRESS>

If you can update this to match the changes suggested by  @ClumsyApe.  Thanks

Thanks for spotting this!


Disable gapless playback via runtime flag

Follow up to the work in #430, added a runtime flag for the feature.
@kaymes  I didn't look at your implementation in detail - but from a quick glance  this should suffice or will the sink continue to remain open?

Just thinking about it, most people are going to want this enabled by default, indeed I believe Spotify does enable it by default. Therefore might I suggest that we change this flag to --disable-gapless?

You are right, it is enabled by default now.. actually, you can't turn it off, only crossfade is an option (windows client)
I recall it being the other way around some time back. Will flip it.

There are two aspects to the gapless feature: the first one is preloading the next track. The second is to keep the sink open when possible.
This PR is only disabling the preloading part. However, if the next track just happens to be loaded, the sink will still stay open. With preloading disabled this would still be the case if you repeat the same track because the player is smart enough to realise it's loaded already (see handle_command_load()).
As far as I see, the purpose of disabling preloading would be to save bandwidth for those who are really worried about it.
The purpose of closing the sink would be backends that need to close the sink to separate tracks properly (e.g. I could imagine the Kodi plug-in needing this, not 100% sure). Thus, my suggestion would be to have separate flags for this because people might want to still have the preloading but force sink closure.
To force the sink being closed between tracks, I would suggest to put a self.ensure_sink_stopped() at the very beginning of handle_command_load().

@kaymes Thanks for the clarification.
The intention was that have a flag to ensure the sink is closed b/w tracks. I'll give your implementation a proper gander over the weekend.
I can change this flag to reflect what it does --disable-prefetch, but IMO I don't think the bandwidth penalty of prefetching warrants a separate flag..

I'm not sure we should allow prefetching to be disabled at all - main clients don't allow it, and if prefetching is too strenuous for your bandwidth, then librespot is going to be subpar anyway. Would --disable-gapless just disabling the sink between songs be acceptable, as mentioned above?

This should work as discussed - default behaviour is to have gapless enabled by default, and when disabled via --disable-gapless we force a sink stop and start b/w track changes. The prefetch is mechanism continues to work as before.

@kaymes if this looks good to you, will merge (and update the wiki)

Looks good to me.


Feature/visualizations delete button

This PR adds delete visualisation functionality on visualisation cards on  My Climatewatch dashboard.
It also hides My Insights from the menu (anchor navigation) from My Climatewatch.

Basecamp threads:

remove button
hide my insights

pivotal tracker

@Bluesmile82 ready to review 👐


it doesn't work for IE ?

it doesn't work for IE ?

http://jamesflorentino.github.io/nanoScrollerJS/
Howerver, nanoScrollerJS  is fine!


toInteger() from cypher query returns Long in Java

toInteger() in cypher returns after query Long in the mapping
Expected Behavior
should return Integer type according to  https://neo4j.com/docs/cypher-manual/current/functions/scalar/#functions-tointeger
Current Behavior
returns Long type
Possible Solution
check in the mapping
Steps to Reproduce (for bugs)

Context

use in a query in RETURN toInteger()
Your Environment

OGM Version used: 3.1.11
Java Version used: 1.8.x
Neo4J Version used: 3.4.0
Bolt Driver Version used (if applicable): 3.1.11
Operating System and Version: Ubuntu 17
Link to your project:

Hi @oleksandrzakharov. This is the correct behaviour. Cyphers Integer` is a 64 bit value and thus maps natively to a long, see: https://neo4j.com/docs/driver-manual/1.7/cypher-values/
We trust OGM user to declare int's in the domain when the value to map fits into it. For custom queries and results, we cannot expect anything and use Cypher's native mapping.


Run all callbacks in parallel

This builds on my previous support for using contexts + a timeout but runs all the callbacks in parallel. This makes the timeout a little easier to understand since a long-running handler doesn't mean that later handlers will time out. Ideally should should be a no-op since the handlers were already run in a random order.

This has roughly the same issues as the previous patch: Not Quit()ing / abandoning the connection will leak goroutines.
There are a couple options:

The easier / safer option is to treat a timeout as a fatal error, ideally this shouldn't happen often, but if you wanted to turn on the timeout as a default (i.e. to prevent a blocking goroutine from stalling the read loop). Then it it could introduce some unwanted behavoir
A slightly more complex option is to keep track of the done channel + callbacks and continue waiting for them to exit, but set either a max number that can hang or another longer timeout. Maybe CallbackSoftTimeout and CallbackHardTimeout ?

2018/05/18 10:31:51 Timeout while waiting for 3 callback(s) to finish (main.Sleeper.func1, main.Sleeper.func1, main.Sleeper.func1)
2018/05/18 10:32:00 <-- PING :leguin.freenode.net
2018/05/18 10:32:00 PING (1) >> &irc.Event{Code:"PING", Raw:"PING :leguin.freenode.net", Nick:"", Host:"", Source:"", User:"", Arguments:[]string{"leguin.freenode.net"}, Tags:map[string]string(nil), Connection:(*irc.Connection)(0xc4200c4000), Ctx:(*context.timerCtx)(0xc4201e62a0)}
2018/05/18 10:32:00 --> PONG :leguin.freenode.net
2018/05/18 10:32:16 Canceled callback main.Sleeper.func1 finished in 40.002092758s >> &irc.Event{Code:"PRIVMSG"<EMAIL_ADDRESS>PRIVMSG #sadtest :asdf", Nick:"sadbox", Host:"sadbox.org"<EMAIL_ADDRESS>User:"~jmcguire", Arguments:[]string{"#sadtest", "asdf"}, Tags:map[string]string(nil), Connection:(*irc.Connection)(0xc4200c4000), Ctx:(*context.timerCtx)(0xc420072240)}
2018/05/18 10:32:26 Canceled callback main.Sleeper.func1 finished in 50.001119938s >> &irc.Event{Code:"PRIVMSG"<EMAIL_ADDRESS>PRIVMSG #sadtest :asdf", Nick:"sadbox", Host:"sadbox.org"<EMAIL_ADDRESS>User:"~jmcguire", Arguments:[]string{"#sadtest", "asdf"}, Tags:map[string]string(nil), Connection:(*irc.Connection)(0xc4200c4000), Ctx:(*context.timerCtx)(0xc420072240)}
2018/05/18 10:32:36 Canceled callback main.Sleeper.func1 finished in 1m0.000472867s >> &irc.Event{Code:"PRIVMSG"<EMAIL_ADDRESS>PRIVMSG #sadtest :asdf", Nick:"sadbox", Host:"sadbox.org"<EMAIL_ADDRESS>User:"~jmcguire", Arguments:[]string{"#sadtest", "asdf"}, Tags:map[string]string(nil), Connection:(*irc.Connection)(0xc4200c4000), Ctx:(*context.timerCtx)(0xc420072240)}

Something new here?


Split core_impl into directories for Android, Java 7, and Java 8.

This directory structure will allow us to support the three Java versions but
also take advantage of the features available in each one.  Each directory has a
readme.
I refactored the stats code so that there is one StatsManagerImpl for each of
Android, Java 7, and Java 8.  StatsManagerImpl is loaded with reflection, and it
specifies the stats classes that should be used for the implementation.  I also
moved DisruptorEventQueue to core_impl_java, since it isn't Android-compatible.
This commit doesn't affect tracing.
/cc @dinooliva @songy23 @a-veitch
@bogdandrutu I'm not sure if I updated the build files correctly.

Codecov Report

Merging #260 into master will decrease coverage by 0.18%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master     #260      +/-   ##
============================================
- Coverage     94.23%   94.05%   -0.19%
+ Complexity      466      459       -7
============================================
  Files            67       66       -1
  Lines          1458     1429      -29
  Branches        103      103
============================================
- Hits           1374     1344      -30
- Misses           57       59       +2
+ Partials         27       26       -1

Impacted Files
Coverage Δ
Complexity Δ

...le/instrumentation/stats/StatsManagerImplBase.java
94.44% <100%> (ø)
7 <1> (?)

...n/java/com/google/instrumentation/stats/Stats.java
60% <0%> (ø)
2% <0%> (-1%)
:arrow_down:

Continue to review full report at Codecov.

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

I noticed that the first coverage report was incomplete, so I listed the new directories in all/build.gradle.  The duplicate StatsManagerImpls seemed to cause a NullPointerException in the Gradle javadoc command, though: https://travis-ci.org/google/instrumentation-java/jobs/226581574#L914