with pyodbc.connect(cs_sql) as conn does not close connection after leaving the block

with pyodbc.connect(cs_sql) as conn:
pass
print conn
You will see that the connection is not closed.

It is not supposed to close the connection - it commits the connection at the end if no error was raised.  If an error was raised it will roll back.
However, there is zero reason to use a context manager in CPython once you understand how it works.  It uses reference counted garbage collection so:
def func():
    cursor = connect(...).cursor()
    cursor.execute(...) // 1
    cursor.execute(...) // 2
    cursor.commit()     // 3

This is is just as good.  All Python objects are deleted when they go out of scope if there are no other references to them.  In this case i didn't keep a copy of the Connection around so the only reference is the Cursor.  When the function exists, either by completing or via an exception, the cursor will be deleted.  Since the cursor is the only reference to the connection, it will be deleted also.  Immediately - not "someday" like Java or Javascript.  When a connection is deleted, the connection is closed an any outstanding changes are rolled back.  (All DBs roll back uncommitted transactions but pyodbc will make a rollback call anyway.)  If the code made it past the commit (3), your changes are saved.  If (2) were to raise an exception, the changes from (1) will be rolled back immediately as the exception unwinds the stack.

HI mkleehammer
I disagree, the connection object should be closed after the with block. I think most of developers will think that way and the current pyodbc behaviour, they will let connections objects unclosed, thus leaving way to memory leaks.
You're right about the fact that the object memory will be cleanup after exit of a function, but if you're using the connection in another context (like a Jupyter notebook), all connection objects will stay forever. The only way to use pyodbc in this context is to use the try/except blocks, which is not very clean and don't use the PEP343 feature.
Thank you

Also relevant: #43
It appears most python odbc modules treat context managers on connections as a way of managing commits rather than the connection itself.  I was surprised at this too.


Database reset

Hello Devs,
Whenever I restart my bot, it says that I have to do the init command again. Do you know why?

Because the database is not being saved on whatever remote hosting service you are using, if you were using a local windows setup, the database would not be overwritten or deleted every time you restart the bot.


Prep for Storage WebJobs GA release

@jsquire I think there might be an issue with the "storage - ci - functions" pipeline.

@jsquire I think there might be an issue with the "storage - ci - functions" pipeline.

@seanmcc-msft:  It wasn't classified, so DevOps disabled it.   I clicked the buttons, should be active now.   You'll likely need to do the same for the other pipelines that were created yesterday.   Looks like the EngSys automation to classify on creation isn't done yet.

/azp run net - storage - functions - ci

@jsquire I think there might be an issue with the "storage - ci - functions" pipeline.

@seanmcc-msft: It wasn't classified, so DevOps disabled it. I clicked the buttons, should be active now. You'll likely need to do the same for the other pipelines that were created yesterday. Looks like the EngSys automation to classify on creation isn't done yet.

@jsquire is there documentation for these steps?  I am not familiar with this process.

@jsquire I think there might be an issue with the "storage - ci - functions" pipeline.

@seanmcc-msft: It wasn't classified, so DevOps disabled it. I clicked the buttons, should be active now. You'll likely need to do the same for the other pipelines that were created yesterday. Looks like the EngSys automation to classify on creation isn't done yet.

@jsquire is there documentation for these steps? I am not familiar with this process.

If you go to the pipeline, you'll see a big yellow banner at the top yelling at you.  That has a link for help that describes the process.   After you classify, it's Settings => Enable => Save Changes.

@jsquire what service do I assign the pipelines to?

@jsquire what service do I assign the pipelines to?

I've been using:  Azure SDK => Peter Marcu => Azure SDK

@jsquire I don't have permissions:

/check-enforcer override


Add support for sparse accessors in glTF2Loader

I confirmed that Babylon.js is now able to display Simple Sparse Accessor model.
The current status is all green. congratulations!
https://github.com/cx20/gltf-test#simple-models-for-testing-individual-features

Thanks @cx20 for updating so fast!


Script to decide if new version is good

Wimpy could execute a shell script right after deploying the new version, and before deleting the old one.
This script could check error ratio in /metrics endpoint (or whatever logic is needed) to determine if the new version is good, and the old one can be removed.
The default script could just exit 0

Sounds good but isn't it trivial.
Do you want to reference only HTTP metrics or instance metrics too?
I think about instance metrics and is a bit difficult because is not the same measure it in the morning that in afternoon.
I like saying that you can have false positives.

Playing around with Spring and some metrics library, we can an Spring application to show in the /metrics endpoint the HTTP error ratio for an application. The ratio should be similar through the day (since it's a ratio, not just a number).
Anyway, that's not something that wimpy should care about. The user would provide the script: wimpy just executes whatever the user has in her repository, and if the exit code is 0, the old CloudFormation is removed. If the exit code is 1, the old one is kept, and the new one is removed. The script could do anything.


go get command not working

go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/tomasperez/Library/Caches/go-build"
GOENV="/Users/tomasperez/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/tomasperez/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/tomasperez/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.18.7"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/tomasperez/Documents/Personal/courses/edu-101-go-code/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/mx/n4wnqc9x6l9cthf453jy351c0000gn/T/go-build822001193=/tmp/go-build -gno-record-gcc-switches -fno-common"

Then, when I run go get this is the output
go: no package to get in the current directory

Tomas, thank you for including the go env output, which helps me to better understand your environment. However, you didn't specify in the issue which command you ran when you encountered this error, nor the directory from which you ran it. I think those details will help me confirm the root cause.
I was able to produce the same error message you reported when running go get (i.e., without any arguments) from the root directory of my local clone of the code repository. However, the command (go get go.temporal.io/sdk) shown in the "How to Install the Go SDK" section works as expected for me when executed from that same directory. If executed from a directory without a Go module, the latter command produces a different error (as expected).
Could you please update this issue to include the specific command you ran and the directory path where you executed this command? Once I have this, I should be able to better explain the problem, as well as the solution.

I meant to add that I've now added a placeholder program to the project root, so running "go get" without arguments should no longer result in an warning.

I confirm. Now, go get does not produce any warning.
I'll keep in mind adding cwd and being more explicit about the command being run.
Thanks


remove header in stdout unless there is a panic

Hey there! thanks for your issue and PR, so far it seems the PR does nothing? If so could you put it in draft mode so that I know when to review it?
It's A-Okay to add an option for less verbosity, potentially -q --quiet?
Another option that is worth considering is making quiet the default and have a verbose option!

Hey there! thanks for your issue and PR, so far it seems the PR does nothing? If so could you put it in draft mode so that I know when to review it?
It's A-Okay to add an option for less verbosity, potentially -q --quiet?
Another option that is worth considering is making quiet the default and have a verbose option!

I'll look into it over the weekend. the PR disables the stdout header == input.name== when the formatting doesn't panic.

I've added verbose option so that any println! is conditioned on verbose
I've added a config|c flag to specify the path to custom toml file (important for global formatting).

Hi!
is this ready for review? :)

Hi!
is this ready for review? :)

Yes.
Are there any tests I should run?
I've added one bool variable for verbose and one OsString that defaults to "typstfmt.toml"

Tests run automatically !

You should git pull since I took the liberty of pushing to your branch in order to resolve merge conflict

changes applied!

Might be worth to just move that header to stderr by default


Smiths Gloves (i) are not recognized as interchangeable with Ice Gloves

Today I completed Clock Tower using the Smiths Gloves (i), as intended. The plugin did not treat it as valid for the quest requirements. I'm not sure what other situations this is relevant, but I know it's an issue for Clock Tower, at least.

Taking care of this now, I'm going to go through all the quests where this may be occurring.


Avoid warning while reading an empty file

When reading an empty file, fread throws this warning:
Warning: fread(): Length parameter must be greater than 0 in ...Extractors/Extractor.php on line 84
Let's fix this :wink:

Great. Thank you!

Thanks!


Columns not displaying correctly on Chrome 102.0.5005.63

Environment
Browser(s): Chrome Version 102.0.5005.63 (Official Build) (64-bit)
Operating System: Windows 10 (x64)
Legacy or v3 Renderer: v3 Renderer
Description
Manual column breaks are rendered with too much spacing and are pushed off the page on Chrome 102.0.5005.63 but not on earlier versions.
Images
Chrome 101.0.4951.67
Chrome 102.0.5005.63
Share Link :
https://homebrewery.naturalcrit.com/share/19O72H7NrXlGJ17rXmBXZ13QkDBSNGyw0fd5PofH4aTmO

A few other users on the subreddit have noticed this issue as well [1] [2].
Considering this breaks many existing brews, I think it should be considered high priority (P1)

Thanks for the report! It looks like Chrome did indeed change the handling of column breaks a little in Chrome 102. Our columnSplit element that gets inserted when typing \column had rules to split the column before and after it. Previously Chrome would see both and ignore one. Now it seems to apply both, so we now get two column breaks.
Removing break-before: column seems to solve the problem, with the added bonus of removing some odd spacing that would occur around wide blocks. Just need to make sure we aren't accidentally breaking something else.


dotnet error

Problem encountered on https://dotnet.microsoft.com/en-us/learn/aspnet/hello-world-tutorial/install
Operating System: macos
Provide details about the problem you're experiencing. Include your operating system version, exact error message, code sample, and anything else that is relevant.
I received a zsh: command not found: dotnet error after downloading the dotnet app. I tried it on a new terminal but to no avail.

Have you opened a new terminal window after installation?

Yeah i have, it doesn’t work
On Thursday, January 19, 2023, Anton Firszov @.***>
wrote:

Have you opened a new terminal window after installation?
—
Reply to this email directly, view it on GitHub
https://github.com/dotnet/core/issues/8119#issuecomment-1397279723, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/A5K727YGQJMH4IUUW5WJTQ3WTFVANANCNFSM6AAAAAAUAGNEKI
.
You are receiving this because you authored the thread.Message ID:
@.***>

Which kind of Mac do you have? Is it an M1? Which version did you install?


serial: let caller handle serial.ErrTimeout from serial port

Hi,
While the approach of masking serial.ErrTimeout might be intended to simplify higher-level logic that uses retry mechanisms, it may mask real timeout issues. Currently, I have some logic to handle reconnection and the routines were blocking because I couldn't capture this error.
Current code:
func (spw *serialPortWrapper) Read(rxbuf []byte) (cnt int, err error) {
	// return a timeout error if the deadline has passed
	if time.Now().After(spw.deadline) {
		err = ErrRequestTimedOut
		return
	}

	cnt, err = spw.port.Read(rxbuf)
	// mask serial.ErrTimeout errors from the serial port
	if err != nil && err == serial.ErrTimeout {
		err = nil
	}

	return
}

I wonder if letting the user handle this wouldn't be more suitable for all use cases or if, perhaps, making this behavior configurable wouldn't be better. If you think any of this makes sense, I can submit a PR with the changes.

Hi Thiago,
you're right that the design choice of hiding serial.ErrTimeout was made to simplify error handling for users.
Another goal was to avoid exposing the underlying serial library to users of the modbus client, mostly to keep the ability to swap it with another one, or maybe rewrite it, if it ever became necessary.
What are the real timeout issues you're mentioning, and how would your retry/reconnection logic handle it differently than e.g. a modbus/tcp client did not reply to a request (and thus, getting modbus.ErrRequestTimedOut)?
Did you mean that you would like your code to be able to use os.IsTimeout()?

So, I did a bit more debugging and it was actually my bad. I was setting the ModbusClient timeout too high by mistake. As a result, my retry/reconnection logic never received modbus.ErrRequestTimedOut due to the high timeout, nor serial.ErrTimeout because it was masked. In the end, my routines were blocking and the logic not working.
When I removed the mask (in my fork) the retry/reconnection logic worked fine because serial.ErrTimeout was being returned.
Anyway, adjusting the timeout fixed the problem and I just need to be careful not to set my logic "reconnect_interval" parameter lower than the timeout (otherwise it will hang, obviously 😅).
Thanks for the quick reply!

Glad you figured it out!


Device name already in use

I currently have Keybase setup on an android device, and I am trying to add my linux computer to the account. First I tried adding it using my gui, selecting 'add new desktop' on my phone, and scanning the qr code, but nothing happened. After trying several times I did the same thing using the cli (keybase login), and was able to see the error "ERROR device name already in use".
It looks like the gui client does not surface this error. Interestingly, this device name does not show up under my list of devices on any of my clients.
Version 1.0.34

Ah, thanks for the bug report.
Cc: @keybase/react-hackers
Can you send a keybase log send?

Log Id: 01ec0c5be1d71e89ebe4301c

thanks you


debugging webrtc

Hi thanks for great repo. it really helps me a lot for wroking on my project.
Currently I am encountering one issue.
So I have done test on localhost that peer connection is successful through https connection.
And now, I am trying to deploy my app to remote server, which is google cloud run.
After I deployed my app , I found out that the peer connection was getting disconnected.

So I want to debug in more detail on what is going on between peer connection.
Is there easy way to debug webrtc connection? I don't even know where to start it.

It was due to remote server fire wall issue


Infrastructure for costing functions

Doesn't really change anything, just makes it so I have to rebase less.

BTW you'll need to add the default cost model file to the extra-source-files or similar in the cabal file, otherwise haskell.nix will clean it out.

Just failing stylish now.


[WIP] Handle a unused_dependency_checker_ignored_targets

Description
WIP, just here for the CI
Motivation
WIP

@ittaiz I suspect this is an issue with the high-level mode, because looking the source I don't see references to xml. And it seems this does work with ast mode. So once we switch transitive to use ast instead of high-level by default (and change the tests to all use ast instead of high-level), this should be solved.

SGTM,
Do we want to have an issue open for removing this instance of unused_dependency_checker_ignored_targets and link it to the discussion of making high-level the default?

I added a mention in the first post of https://github.com/bazelbuild/rules_scala/issues/867 (which contains the other TODOs as well), is that sufficient?

Indeed. Can we close this PR for now?


Entering the login page initializes i18next config

Describe the bug
AdminBro calls i18n.init when somebody enters to the login page, so i18next config is overwritten.
Installed libraries and their versions

<EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS><EMAIL_ADDRESS>
To Reproduce
Steps to reproduce the behavior:

Run server (https://github.com/jongwan56/admin-bro-i18next-bug)
See the response of http://localhost:3000
Move to http://localhost:3000/admin/login
See the response of http://localhost:3000 again

Expected behavior
The response should be "안녕, 세상!" always.
Additional context
The problem is here.
I'm not sure why this code exists.

This is an issue with i18next library which introduced a bug/breaking change in version 19.8.8. AdminBro package uses:
    "i18next": "^19.1.0",

so it installs the most recent v19 of i18next whenever you run npm/yarn install.
In<EMAIL_ADDRESS>(https://github.com/SoftwareBrothers/admin-bro/releases/tag/v3.4.0-beta.8) I added a temporary fix which sets i18next to use a fixed version 19.8.7.
This issue is presumably fixed in version 19.9.2 of i18next but for now I've put the update on hold.
TL;DR:
Install admin-bro@beta.

It works! Thank you.


create context.metrics even when request is not sampled

Fixup to this pr:
https://github.com/reddit/baseplate.py/pull/400
Many applications access context.metrics directly, which currently throws an error because context.metrics is not assigned if the request is not sampled.

👓 @spladug

💇


Pie throws panic if iop.proc is nil

Not sure why this is, it could just be that the process is never assigned properly when it is created, this is using a python script as an external RPC plugin, everything works until it tries to close the process and then it explodes at this point:
if err := iop.proc.Signal(os.Interrupt); err != nil {
	return err
}

Not sure if this is just the way I am handling it (I'm trying to use an external, non-golang plugin writen in python, gist is here

Thanks for the bug report.  I'll try to figure out why the process is nil. I wonder if I have a logic error somewhere.  I don't think just avoiding the panic on cleanup is the right approach, instead we should figure out why proc is nil at that point, and try to prevent it from being nil in the first place.
Also, thanks a ton for providing an example python script to use with this.  I'm not a python expert, but I really wanted to try using a python script as a plugin to show how this package supports plugins from different languages.

Actually, looks like this is happening with my example programs as well...

run go get -u github.com/natefinch/pie (or git pull) and try again... there was a bug I introduced when refactoring for tests, ironically.  I'm going to add more tests to catch similar problems in the future.

Allready did - as soon as the fix went in :-)
Works like a charm.
Since this uses stdio though, it's prone to blocking if one RPC call takes too long, I think that's why most RPC implementations instantly asume that you are going to run a TCP server, since you can then fork out to handle load and long-running replies.
Unless I've totally set this up wrong :-/

It's actually not blocking.  The RPC server starts a goroutine for each request.  See here: https://github.com/golang/go/blob/release-branch.go1.4/src/net/rpc/server.go#L476

You can test it out by adding a long wait in your plugin's function, and using rpc.Client.Go() to make a few requests in parallel.
The code for the master process would look something like this:
package main

import (
	"log"
	"net/rpc/jsonrpc"

	"github.com/natefinch/pie"
)

func main() {
	path := "plugin.py"
	client, err := pie.StartProviderCodec(jsonrpc.NewClientCodec, os.Stderr, path)
	if err != nil {
		log.Fatalf("Error running plugin: %s", err)
	}
	defer client.Close()

	var reply1 string
	call1 := client.Go("Plugin.SayHi", "one", &reply1, nil)

	var reply2 string
	call2 := client.Go("Plugin.SayHi", "two", &reply2, nil)

	var reply3 string
	call3 := client.Go("Plugin.SayHi", "three", &reply3, nil)

	count := 0
	for count < 3 {
		select {
		case <-call1.Done:
			log.Printf("#1 is done, reply: %s", reply1)
			count++
		case <-call2.Done:
			log.Printf("#2 is done, reply: %s", reply2)
			count++
		case <-call3.Done:
			log.Printf("#3 is done, reply: %s", reply3)
			count++
		}
	}
}

Oh sorry... you're talking about using python's JSON RPC... I don't know about that... I'm not much of a pythonista.  I would imagine there's a way to do it such that the calls don't have to be blocking.

Ah yes, I did something similar but in a more roundabout way, the server
can take many requests and all that works fine and executes in parallel
When I ran this with wait commands it ran them all very quickly, but the
replies all arrived in order.
So the underlying script or app will need to be threaded in order to reply
appropriately but since the input being stdio there's only one in and one
out, right?

There's one and only one in and out, but that's no different than the one and only one TCP connection to a web-based RPC server, too.  I presume pretty much every RPC server implementation has a way to accept more than one connection at a time, or otherwise force serialization... I'm honestly not an RPC expert... but I trust the go implementation is doing the right thing.

Right, I have tested this just to be sure.
RPCServer can handle out-of-order responses over STDIO.
Which is great, I've created a new python demo which uses threaded handlers for RPC calls over STDIN with a random timer variable to make sure that the responses are printed out-of-order.
The new gist for this demo plugin is here with the matching golang master here. It might help others :-)
Thanks for all the help, we may be using this in our application soon!

That's awesome.  I'm glad it's working out so well for you.  I'd love to see the end result, if it's open sourced.
Would you care to make a PR with the python code and matching master code?  I moved the examples into a single subdirectory, so you could just add those two files to examples/python/master_python.  I could do this myself, but I figured I'd offer you the opportunity to do a PR, to get proper credit (I'd credit you anyway, but this way it's is more "official").  I'd be super happy to have an example of a python plugin working with a go program in the actual repo.

Thanks - will do a PR in the morning :-)
The project is already open sourced - it's Tyk (https://tyk.io) we're
looking for a good way to add plugins to it, so this approach suits us well.

Awesome.  Let me know if there's anything I can do to help.   Actually, here's one thing, typo on the front page of tyk.io: "Swagger and API Blubrint suport".  I went to go make a PR against the website, but couldn't find the code for it (perhaps it's private?).

It is 😊
Thanks for pointing it out, will make the change…

@lonelycode - just a ping on the PR :)

@natefinch Done :-)

Awesome, thanks!
On Fri, Jun 5, 2015 at 3:45 AM Martin Buhr<EMAIL_ADDRESS>wrote:

@natefinch https://github.com/natefinch Done :-)
—
Reply to this email directly or view it on GitHub
https://github.com/natefinch/pie/issues/1#issuecomment-109192792.


Updated Environment to implement 1D objects for 1D environments.

Implemented objects for 1D environments (adding them to the environment and including them in the plots).
Added checks for parameters passed during environment initialization that do not apply to 1D environments (holes, walls).

Thanks for your thorough checks, Tom!
I've fixed the PR:

removed the accidental formatting changes! (I definitely agree: no point in making ad hoc changes to the formatting style unless there's an agreed upon plan, so I always aim to match the original style as much as possible)
updated the objects definition to describe objects format in 1D and 2D
Added plot_objects to the doc string for plot_environment().

woohoo! excellent stuff, merged and grateful as always for the excellent work :))


Performance scales poorly for simulating larger networks

It appears that the package really struggles simulating larger networks (on the order of 100 neurons).
Take this modified version of the connected_STG.jl script,
which runs multiple, identical stg networks in parallel, which are mutually unconnected:
"""
Running the STG network
- For units to check out, synapses also get a conversion factor.
- The names of the variables in the system can be listed with `@show stg.states`.
- You can plot variables by their names with plot(sol;  vars = [STG.AB₊V]).
"""

using NeuronBuilder, ModelingToolkit, OrdinaryDiffEq, Plots, BenchmarkTools

const Area = 0.0628 # Prinz/Liu 0.0628 mm2
const Cm = 10.0 # specific capacitance cₘ is a biological constant (around) 10 nF/mm^2

Prinz_conv = Cm / Area
synaptic_conv = 1e-3 / Area^2 #this gives μS/mm^2

τCa = 200.0
Ca∞ = 0.05

defaults = Dict(Voltage => BasicVoltageDynamics(),
    Calcium => Prinz.CalciumDynamics(τCa, Ca∞, 14.96 * 0.0628),
    Reversal{Calcium} => Prinz.CaReversalDynamics())

somatic_parameters = Dict(
    Reversal{Sodium} => 50.0,
    Reversal{Potassium} => -80.0,
    Reversal{Leak} => -50.0,
    Reversal{Proton} => -20.0,
    Voltage => -60.0,
    Calcium => 0.05,
    Reversal{Calcium} => 0.0)

#Using parameters from Prinz (2004) Similar network activity from disparate circuit parameters
#these are specifically in Table 2: AB2, LP4, PY1 for figure 3e
function AB_Neuron(num_connections, i)
    AB2_ch = [
        Prinz.Na(100.0 * Prinz_conv),
        Prinz.CaS(6.0 * Prinz_conv),
        Prinz.CaT(2.5 * Prinz_conv),
        Prinz.H(0.01 * Prinz_conv),
        Prinz.Ka(50.0 * Prinz_conv),
        Prinz.KCa(5.0 * Prinz_conv),
        Prinz.Kdr(100.0 * Prinz_conv),
        Prinz.leak(0.0 * Prinz_conv)
    ]
    b = BasicNeuron(NoGeometry(Cm), defaults, somatic_parameters, AB2_ch, Symbol(:AB_, :($i)))
    return b(incoming_connections=num_connections)
end

function PY_Neuron(num_connections, i)
    PY1_ch = [Prinz.Na(100.0 * Prinz_conv),
        Prinz.CaS(2.0 * Prinz_conv),
        Prinz.CaT(2.4 * Prinz_conv),
        Prinz.H(0.05 * Prinz_conv),
        Prinz.Ka(50.0 * Prinz_conv),
        Prinz.KCa(0.0 * Prinz_conv),
        Prinz.Kdr(125.0 * Prinz_conv),
        Prinz.leak(0.01 * Prinz_conv)
    ]
    somatic_parameters[Voltage] = -55.0
    b = BasicNeuron(NoGeometry(Cm), defaults, somatic_parameters, PY1_ch, Symbol(:PY_, :($i)))
    return b(incoming_connections=num_connections)
end

function LP_Neuron(num_connections, i)
    LP4_ch = [Prinz.Na(100.0 * Prinz_conv),
        Prinz.CaS(4.0 * Prinz_conv),
        Prinz.CaT(0.0 * Prinz_conv),
        Prinz.H(0.05 * Prinz_conv),
        Prinz.Ka(20.0 * Prinz_conv),
        Prinz.KCa(0.0 * Prinz_conv),
        Prinz.Kdr(25.0 * Prinz_conv),
        Prinz.leak(0.03 * Prinz_conv)
    ]
    somatic_parameters[Voltage] = -65.0
    b = BasicNeuron(NoGeometry(Cm), defaults, somatic_parameters, LP4_ch, Symbol(:LP_, :($i)))
    return b(incoming_connections=num_connections)
end

population_size = 9

function nodes(i)
    (i ∈ 1:3:population_size) && return n -> AB_Neuron(n, i)
    (i ∈ 2:3:population_size) && return n -> PY_Neuron(n, i)
    (i ∈ 3:3:population_size) && return n -> LP_Neuron(n, i)
end

intoAB = [(EmptyConnection(),)
    (EmptyConnection(),) #hi
    (Glut(30.0 * synaptic_conv),)
]

intoPY = [
    (Chol(3.0 * synaptic_conv), Glut(10.0 * synaptic_conv))
    (EmptyConnection(),)
    (Glut(1.0 * synaptic_conv),)
]

intoLP = [
    (Chol(30.0 * synaptic_conv), Glut(30.0 * synaptic_conv))
    (Glut(30.0 * synaptic_conv),)
    (EmptyConnection(),)
]

Adjacency_atom_matrix = cat(intoAB, intoPY, intoLP; dims=2)

Adjacency_matrix = let
    matrix = eltype(Adjacency_atom_matrix)[(EmptyConnection(),) for i in 1:population_size, j in 1:population_size]
    for i in 1:3:population_size
        matrix[i:(i+2), i:(i+2)] = Adjacency_atom_matrix
    end
    matrix
end

function edges(i, j)
    return Adjacency_matrix[i, j]
end

tspan = (0.0, 10000.0)
stg = @time build_network(nodes, edges, 1:population_size, name=:stg)
prob = ODEProblem(stg, [], tspan, []; jac=true)

 b = @benchmarkable solve(prob, AutoTsit5(Rosenbrock23()));
 run(b; seconds = 200, samples = 10)

Running this with three parallel networks (for a total of 9 neurons) gives:
BenchmarkTools.Trial: 10 samples with 1 evaluation.
 Range (min … max):  14.065 s …   14.703 s  ┊ GC (min … max): 0.00% … 0.00%
 Time  (median):     14.264 s               ┊ GC (median):    0.21%
 Time  (mean ± σ):   14.271 s ± 183.005 ms  ┊ GC (mean ± σ):  0.24% ± 0.21%

  ▁▁    ▁      ▁  ▁   █   ▁  ▁                              ▁
  ██▁▁▁▁█▁▁▁▁▁▁█▁▁█▁▁▁█▁▁▁█▁▁█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█ ▁
  14.1 s          Histogram: frequency by time         14.7 s <

 Memory estimate: 305.60 MiB, allocs estimate: 545650.

whereas running it with 1 stg network (3 neurons) gives:
BenchmarkTools.Trial: 10 samples with 1 evaluation.
 Range (min … max):  844.067 ms … 5.254 s  ┊ GC (min … max): 0.00% … 1.86%
 Time  (median):     892.654 ms            ┊ GC (median):    0.00%
 Time  (mean ± σ):      1.346 s ± 1.375 s  ┊ GC (mean ± σ):  2.01% ± 2.85%

  █
  █▇▁▄▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▄ ▁
  844 ms         Histogram: frequency by time         5.25 s <

 Memory estimate: 89.21 MiB, allocs estimate: 764291.

I would expect the network with three uncoupled stg's to take three times as long to run as a single stg,
but in the example above it's 15 times as long in practice.
Maybe the EmptyConnections are adding unexpected complexity to the  overall ODESystem?

It turns out this was due to the sparse pattern of the Jacobian not being used.
Explicitely setting the Jacobian to sparse by doing
prob = ODEProblem(stg, [], tspan, []; jac=true, sparse=true)

recovers the analytical relationship between the network scaling and computation time scaling.
The script I used to confirm this was:

Click to expand
using NeuronBuilder, ModelingToolkit, OrdinaryDiffEq, Plots, BenchmarkTools

const Area = 0.0628 # Prinz/Liu 0.0628 mm2
const Cm = 10.0 # specific capacitance cₘ is a biological constant (around) 10 nF/mm^2

Prinz_conv = Cm / Area
synaptic_conv = 1e-3 / Area^2 #this gives μS/mm^2

dynamics = Dict{DataType, SpeciesDynamics}(
    Voltage => BasicVoltageDynamics(),
)

somatic_parameters = Dict(
    Reversal{Sodium} => 50.0,
    Reversal{Potassium} => -80.0,
    Voltage => -60.0,
    )

function neuron(num_connections, i)
    ch = [
        Prinz.Na(100 * Prinz_conv),
    ]
    b = BasicNeuron(NoGeometry(Cm), dynamics, somatic_parameters, ch, Symbol(:Neuron_, :($i)))
    return b(incoming_connections=num_connections)
end

into_neuron1 = [
    #(Glut((30.0 * synaptic_conv)),)
    (EmptyConnection(),)
    (EmptyConnection(),)
]
into_neuron2 = [
    (Glut(30.0 * synaptic_conv),)
    (EmptyConnection(),)
]

adjacency_atom = cat(into_neuron1, into_neuron2; dims = 2)

small_population_size = 2

nodes(i) = n -> neuron(n, i)

small_adjacency_matrix = let
    matrix = eltype(adjacency_atom)[(EmptyConnection(),) for i in 1:small_population_size, j in 1:small_population_size]
    for i in 1:2:small_population_size
        matrix[i:(i+1), i:(i+1)] = adjacency_atom
    end
    matrix
end

tspan = (0.0, 1000.0)

small_net_edges(i, j) = small_adjacency_matrix[i, j]
small_network = build_network(nodes, small_net_edges, 1:small_population_size, name=:net)
small_net_prob = ODEProblem(small_network, [], tspan, []; jac=true, sparse=true)

small_net_trial = @benchmark solve(small_net_prob, AutoTsit5(Rosenbrock23()))

function scaled_network(i)
    scaled_network_size = 2*i

    scaled_adjacency_matrix = let
        matrix = eltype(adjacency_atom)[(EmptyConnection(),) for i in 1:scaled_network_size, j in 1:scaled_network_size]
        for i in 1:2:scaled_network_size
            matrix[i:(i+1), i:(i+1)] = adjacency_atom
        end
        matrix
    end

    scaled_net_edges(i, j) = scaled_adjacency_matrix[i, j]
    return build_network(nodes, scaled_net_edges, 1:scaled_network_size, name=:net)
end

range = 1:2:15
p = plot(range, range, xlabel="i", ylabel="computation time factor", legend=false, color = :black, linestyle = :dash)

@time for i in range
    net = scaled_network(i)
    large_net_prob = ODEProblem(net, [], tspan, []; jac=true, sparse=true)
    large_net_trial = @benchmark solve($large_net_prob, AutoTsit5(Rosenbrock23()))

    scatter!(p, (i, time(median(large_net_trial)) / time(median(small_net_trial))), markercolor = :black)
end

p

which produces several parallel networks, and plots their size multiplier with the multiplier of the computation time, when compared with the original small network.


Add a compatible store implementation that provides 0.8 RaftStorage API and can read data written by 0.7 storage.

Fixed in #695


std.experimental.allocator: makeArray should be safe for GCAllocator

Hey after a lot of trail & error (#4225 #4213 #4190) I think I found a nice solution, how we can allow makeArray to be @safe nothrow.
My solution: assume fillWithMemcpy is @safe - everything else is then deduced by the D compiler.
I had to replace a couple of pointer occurrences with their ref version though.
As you can see if the range is not a ForwardRange it's not @safe, because reallocate isn't.
There is only one thing that I didn't like - casting is unsafe and hence I had to put the destroy method outside of the function and mark it as trusted.
What is your opinion @Hackerpilot @DmitryOlshansky @ZombineDev @JackStouffer ?
Btw can we use the same/similar approach for make?

Makes sense to me

With the changes to fillWithMemcpy and makeArray, the following works:
import std.experimental.allocator;
import std.stdio;

struct SafeGCAllocator
{
    import core.memory : GC;

    static shared SafeGCAllocator instance;
    @trusted shared void[] allocate(size_t bytes)
    {
        if (!bytes) return null;
        auto p = GC.malloc(bytes);
        return p ? p[0 .. bytes] : null;
    }
    size_t goodAllocSize(size_t n) shared @safe
    {
        if (n == 0)
            return 0;
        if (n <= 16)
            return 16;
        import core.bitop: bsr;

        auto largestBit = bsr(n-1) + 1;
        if (largestBit <= 12) // 4096 or less
            return size_t(1) << largestBit;

        return ((n + 4095) / 4096) * 4096;
    }
    // Will be collected via the GC, so no need to do anything
    @safe shared void deallocate(void[] b) {}
}

void main() @safe
{
    auto alloc = SafeGCAllocator.instance;

    int[] a = alloc.makeArray!int(2);
    scope(exit) alloc.dispose(a);
}

With the changes to fillWithMemcpy and makeArray, the following works:

@JackStouffer yep you just remove GC.free(b.ptr) in deallocate (which I had initially) - so maybe I can repeat by question: What's wrong with setting this line to @trusted? We basically just help the GC?

Deallocates the memory referenced by p. If p is null, no action occurs. If p references memory not originally allocated by this garbage collector, if p points to the interior of a memory block, or if this method is called from a finalizer, no action will be taken. The block will not be finalized regardless of whether the FINALIZE attribute is set. If finalization is desired, use delete instead.

What's wrong with setting this line to @trusted? We basically just help the GC?

Because you're manually freeing the memory which may be referenced by other things, rather than calling GC.collect.

@JackStouffer thanks for the explanation. Seems like OS X doesn't like me:
object.Exception@src/rt/minfo.d(167): Aborting: Cycle detected between modules with shared ctors/dtors:
std.experimental.allocator* ->
std.experimental.allocator.building_blocks.free_list ->
std.experimental.allocator.building_blocks.region* ->
std.experimental.allocator.mallocator ->
std.experimental.allocator

I didn't touch any import (or much in allocator at all) - any ideas what might be causing this problem?

@wilzbach if you don't have a OS X VM you can use, you get to play the fun game of "What Makes the Auto-Tester Pass" by randomly commenting things out.

#3891 from @JakobOvrum seems to do the same and for make too - closing in favor of it.


Updates metrics screenshot to Kubeflow v0.5

Fixes https://github.com/kubeflow/website/issues/588
I also improved the text of the page while I was there.
Note: I could not find the code that creates the metrics for the XGBoost sample:
https://github.com/kubeflow/pipelines/tree/master/samples/xgboost-spark
The metrics page currently points to the code for a different Python sample, which only has one metric.
It'd be nice to point to the code that specifies the metrics for the XGBoost sample, if anyone knows where it is.

This change is

Preview: https://deploy-preview-608--competent-brattain-de2d6d.netlify.com/docs/pipelines/metrics/pipelines-metrics/

/assign @abhi-g

looks good to me. /cc @IronPan, please ensure correctness or add someone who can review.

/lgtm
/approve


Remove push billing plan options to clarify positioning

App Center Push supports both the Free and Paid billing plans. With the service in Preview, we've never billed customers for Push usage in the Paid tier. Our long term goals include aligning App Center Push with Azure Notifications Hubs, both of which have free and billable usage plans. To simplify things for our customers, App Center Push will become a free service (with the current limitations on Push Audience and batch Push processing). When the customer's needs exceed the capabilities of App Center Push, we'll streamline the customer's shift to using Azure Notification Hubs.

This was shipped today.

This work is complete.


[Question] Does it export Skinned Mesh Renderers?

Been using this tool for a while (early 2020 )  and I have a question.
Is there any way to export models that uses skinned mesh renderer?
I have been using this tool to create a texture atlas for static scene, but I haven't been able to use it while animated characters. I don't know if this is something that it can't be done at this point, or if is some sort of mistake on my part.

Currently skinned meshes are not supported. It should be doable to add by making sure all the correct bone data, weights etc. gets copied correctly to the newly generated mesh.

@maxartz15  do you have any plans on adding this feature?


upload_mask

Why use  "updates_s = np.where(updates_s == 0, self.epsilon, updates_s) " and "updates_s = np.where(updates_s == 1, 1-self.epsilon, updates_s)"?
It may be not binary mask upload from client to server ,which causes the same communication cost as standard FL

Thank you for the question! We introduced this small value, self.epsilon, to avoid numerical errors when the server takes the inverse sigmoid of the aggregated masks. For instance, if all clients communicate 1 for a coordinate, then the aggregate would also be 1, but the inverse sigmoid is not defined for 1. In practice, the clients would not add self.epsilon themselves; instead, they would still communicate a binary mask (i.e., 0 or 1) and the server would introduce self.epsilon if necessary. So, the clients would still communicate a binary mask with a significantly lower cost than standard FL.
Please let us know if there is any remaining confusion.


Strip port from X-Forwarded-Host

Q
A

Bugfix
yes

Description

Fixes #111

though what it looks like in here is it is properly considering X-Forwarded-Port as the "source of truth" if both that and X-Forwarded-Host are present.

@weierophinney From my understanding, the priority is implicitly decided based on the ordering of the headers within the $trustedHeaders list. I find this reasonable, but it should probably be spelled out explicitly that the order of headers matters (if this is the behavior we want to guarantee here).

The current version of the PR looks reasonable to me as well, the port is taken from the xfh header (if available), if both xfh and xfp match, it does the right thing by definition and if they differ, then the user is able to select the priority based on the ordering in the list. (If xfh and xfp differ, the reverse proxy is broken beyond repair, so … who cares).
Please just give me the time to also check the Traefik source code / behavior (see the existing comment thread with boesing), so that the decision can be backed up with some hard evidence in case someone complains in the future.


How can we add obfuscation feature to this OpenVPN installation?

Checklist

[x] I read the README
[x] I read the FAQ
[x] I searched the issues
[x] My issue is about the script, and not OpenVPN itself

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

Is it possible to add obfuscation to this setup?

As in obfsproxy?
See #413


[Identity] Adjust log level for EnvCred warning

If a possible environment credential is passed in, but no complete environment configuration is found, we output a warning log statement.
However, since the default log level is WARNING, this warning is always printed when a user is trying to use DefaultAzureCredential with the AZURE_CLIENT_ID envvar set (typically for using a user-assigned managed identity).
This warning is not printed with the WARNING prefix and can cause confusion for the user.
Since setting AZURE_CLIENT_ID is a common use case outside of EnvironmentCredential, the log level is relaxed to INFO if that's the only environment config set.
Closes: #https://github.com/Azure/azure-sdk-for-python/issues/30214

API change check
API changes are not detected in this pull request.


docs(parser): Improving parser hooks documentation

I'm working on improving the current documentation for the parser (link), this is a work in progress and I've opened this PR to have some feedback.

I'm debugging how the parser works, so I may misunderstand the purpose of some hooks, feedbacks are appreciated

In statement hook I'm listing all the types of the statements you can receive as callback parameter, I think it can be useful, but it is 36 rows long, is it ok to put it there?

Since this page only shows a list of all the Parser Hooks, I would like to rename it "Parser Hooks" to be coherent to "Compiler Hooks" and "Compilation Hooks", is it a good idea?

Thanks

I've differentiated between:

Hook Parameters: identifier    e.g. hooks.assigned.for('identifier')
Callback Parameters: expression    e.g. .tap('MyPlugin', expression => {});

This page only shows a list of parser hooks so I renamed it "Parser Hooks" to be coherent to "Compiler Hooks" and "Compilation Hooks".

Since this is what I've learned debugging the parser hooks I really appreciate every feedback.
This is ready for review.
@montogeek :)

I've updated this branch, this is ready for review

Thanks @EugeneHlushko for reviewing! I've included your changes and made some more improvements following your suggestion

@montogeek mind taking a look at this too?

Friendly ping :) @montogeek

Double checked it again, looks good and seems doesn't get any more attention. Merging

Thanks!


failed to get the value of  2-level-pointer( point to pointer)

I am sorry that I do not speak English well.
Here is the DLL(C) code and Koffi(NodeJS) Code.
-----------------C code -----------------
int pPointer(int** datain)
{
printf("DLL: %d\n", datain[0][0]);
*datain[0] = 3;
return *datain[0];
}
-------------------NodeJS code-------------------
const pPointer = lib.func('int pPointer(Inout int** datain)');
var datain = [[100]];
console.log("datain[0][0]:"+datain[0][0]);
pPointer(datain);//print 100
pPointer(datain);//print 3
console.log("datain[0][0]:"+datain[0][0]);//print undefined  -----------expected 3 here，and actually output "undefined"

That's because while Koffi converts the parameter out back to nested JS arrays, the inner type is int * and Koffi gives you back a pointer encoded as an internal object (instead of a modified array).
This will work as you want:
const koffi = require('koffi');

const lib = koffi.load('./166.dll');
const pPointer = lib.func('int pPointer(_Inout_ int **datain)');

var datain = [[100]];
console.log("datain[0][0]:", datain[0][0]);
pPointer(datain);//print 100
pPointer(datain);//print 3

// After the call, datain[0] contains an External object which is how Koffi represents pointers
// Ask Koffi to decode it to an array of one int
datain[0] = koffi.decode(datain[0], 'int', 1);

console.log("datain[0][0]:", datain[0][0]);

A simpler way is to use an Int32Array inside the outer array, because this means Koffi does not have to convert anything back. The Int32Array pointer will be passed as-is to your C function, and modified directly, without Koffi having to convert back anything.
const koffi = require('koffi');

const lib = koffi.load('./166.dll');
const pPointer = lib.func('int pPointer(int **datain)');

var datain = [Int32Array.from([100])];
console.log("datain[0][0]:", datain[0][0]);
pPointer(datain);//print 100
pPointer(datain);//print 3
console.log("datain[0][0]:", datain[0][0]);

Hey i had the same problem took me three days to find this. @Koromix would be good to add it into docs under output struct or smth cause nothing says that nested pointer requires kind of decoding.


RangeQuery should take Terms or Field directly, not Strings

impl TermQuery {
    pub fn new(term: Term, segment_postings_options: IndexRecordOption) -> TermQuery;
}
impl RegexQuery {
    pub fn from_pattern(regex_pattern: &str, field: Field) -> crate::Result<Self>;
}
impl TermSetQuery {
    pub fn new<T: IntoIterator<Item = Term>>(terms: T) -> Self;
}

impl RangeQuery {
    pub fn new_term_bounds(
        field: String,
        value_type: Type,
        lower_bound: &Bound<Term>,
        upper_bound: &Bound<Term>,
    ) -> RangeQuery;
    pub fn new_i64(field: String, range: Range<i64>) -> RangeQuery;
    // ...
}

queries which interact with terms or fields take their arguments either as Terms (which already contain a field and a type), or when it's not possible, as a Field. However RangeQuery takes a field_name as String (and ignore the field set in the Terms, for the constructor which takes term bounds).
It should take the same kind of arguments as other queries

Fixed by https://github.com/quickwit-oss/tantivy/pull/2452


starknet connector

Description
Connector for starknet and starknet goerli
Type of change
Please delete option that is not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[X ] New feature (non-breaking change which adds functionality)

Related PRs
List related PRs below

branch
PR

other_pr
link

Hey @YuppiePF it appears to me that the requests are being sent with EthConnector.py instead of the new StarknetConnector.py. Docker-compose doesn't rebuilt images automatically if files change in the build context, so if I had to guess, you're running this branch on a machine with an existing nodies/blockchain_exporter image already built without the new connector. Please try rebuilding the image before bringing up the container (docker-compose build) (and keep in mind to rebuild using the one you were using previously before restarting your other bcexporter containers.


Uncaught TypeError: undefined is not a function

[Enter steps to reproduce below:]

Hit the esc key
Type w to write the file

Atom Version: 0.194.0 :warning: in 1.0 API Preview Mode :warning:
System: Mac OS X 10.10.3
Thrown From: ex-mode package, v0.4.1
Stack Trace
Uncaught TypeError: undefined is not a function
At /Users/eric/.atom/packages/ex-mode/lib/ex-state.coffee:56

TypeError: undefined is not a function
  at Ex.write (/Users/eric/.atom/packages/ex-mode/lib/ex.coffee:117:29)
  at Ex.w (/Users/eric/.atom/packages/ex-mode/lib/ex.coffee:143:5)
  at /Users/eric/.atom/packages/ex-mode/lib/ex.coffee:1:1
  at Command.execute (/Users/eric/.atom/packages/ex-mode/lib/command.coffee:148:7)
  at ExState.processOpStack (/Users/eric/.atom/packages/ex-mode/lib/ex-state.coffee:49:17)
  at ExState.pushOperations (/Users/eric/.atom/packages/ex-mode/lib/ex-state.coffee:40:6)
  at ExViewModel.ViewModel.confirm (/Users/eric/.atom/packages/ex-mode/lib/view-model.coffee:12:14)
  at ExViewModel.module.exports.ExViewModel.confirm (/Users/eric/.atom/packages/ex-mode/lib/ex-view-model.coffee:35:5)
  at ExViewModel.confirm (/Users/eric/.atom/packages/ex-mode/lib/ex-view-model.coffee:1:1)
  at ExCommandModeInputView.module.exports.ExCommandModeInputView.confirm (/Users/eric/.atom/packages/ex-mode/lib/ex-command-mode-input-view.coffee:46:16)
  at atom-text-editor.<anonymous> (/Users/eric/.atom/packages/ex-mode/lib/ex-command-mode-input-view.coffee:1:1)
  at atom-text-editor.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4430:9)
  at atom-text-editor.elemData.handle (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/jquery/dist/jquery.js:4116:28)
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:519:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:354:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:178:20)

Commands
     -1:01.1.0 vim-mode:activate-command-mode (atom-text-editor.editor.cursor-block.vim-mode.command-mode.is-focused)
     -1:00.7.0 ex-mode:open (atom-text-editor.editor.cursor-block.vim-mode.command-mode.is-focused)
     -1:00.5.0 core:confirm (atom-text-editor.editor.mini)
     -0:58.1.0 ex-mode:open (atom-text-editor.editor.cursor-block.vim-mode.command-mode.is-focused)
     -0:57.9.0 core:confirm (atom-text-editor.editor.mini)
     -0:56.1.0 editor:consolidate-selections (atom-text-editor.editor.mini)
     -0:56.1.0 core:cancel (atom-text-editor.editor.mini)
     -0:54.9.0 ex-mode:open (atom-text-editor.editor.cursor-block.vim-mode.command-mode.is-focused)
     -0:54.7.0 core:confirm (atom-text-editor.editor.mini)
     -0:53.5.0 core:save (atom-text-editor.editor.cursor-block.vim-mode.command-mode.is-focused)
     -0:53.1.0 core:close (atom-text-editor.editor.cursor-block.vim-mode.command-mode.is-focused)
     -0:51.1.0 settings-view:open (atom-text-editor.editor.cursor-block.vim-mode.command-mode)
  3x -0:46.7.0 core:confirm (atom-text-editor.editor.mini)
     -0:03.2.0 core:close (atom-text-editor.editor.mini)
     -0:01.8.0 ex-mode:open (atom-text-editor.editor.cursor-block.vim-mode.command-mode)
     -0:01.0 core:confirm (atom-text-editor.editor.mini.is-focused)

Config
{
  "core": {
    "themes": [
      "one-dark-ui",
      "solarized-dark-syntax"
    ],
    "followSymlinks": true
  }
}

Installed Packages
# User
advanced-new-file, v0.4.0
atom-grails, v0.1.0
autocomplete-paths, v1.0.2
autocomplete-plus, v2.12.0
block-cursor, v0.12.4
cargo-test-runner, v0.0.3
ex-mode, v0.4.1
language-groovy, v0.4.0
language-latex, v0.6.1
language-rust, v0.4.3
latex, v0.22.0
linter-clang, v2.25.1
linter-rust, v0.0.9
minimap, v4.7.6
minimap-find-and-replace, v4.2.0
minimap-selection, v4.2.0
project-manager, v1.15.5
theme-switcher, v1.1.0
vim-mode, v0.44.0
vim-surround, v0.5.1

# Dev
No dev packages

fixed by c43b2658

The problem just happened to me. It could be related to the fact that 1) it was a new "buffer" and/or 2) I used "w file.xml".

I also got this error when running e asdf or edit asdf the first time from any file (if it's ran again in the same file it doesn't show an error but the command doesn't do anything)
TypeError: undefined is not a function
  at getFullPath (/home/jluke/.atom/packages/ex-mode/lib/ex.coffee:35:33)
  at Ex.edit (/home/jluke/.atom/packages/ex-mode/lib/ex.coffee:102:20)
  at Ex.e (/home/jluke/.atom/packages/ex-mode/lib/ex.coffee:105:19)
  at /home/jluke/.atom/packages/ex-mode/lib/ex.coffee:1:1
  at Command.execute (/home/jluke/.atom/packages/ex-mode/lib/command.coffee:153:7)
  at ExState.processOpStack (/home/jluke/.atom/packages/ex-mode/lib/ex-state.coffee:50:17)
  at ExState.pushOperations (/home/jluke/.atom/packages/ex-mode/lib/ex-state.coffee:40:6)
  at ExViewModel.ViewModel.confirm (/home/jluke/.atom/packages/ex-mode/lib/view-model.coffee:13:14)
  at ExViewModel.module.exports.ExViewModel.confirm (/home/jluke/.atom/packages/ex-mode/lib/ex-view-model.coffee:35:5)
  at ExViewModel.confirm (/home/jluke/.atom/packages/ex-mode/lib/ex-view-model.coffee:1:1)
  at ex-command-mode-input.ExCommandModeInputElement.confirm (/home/jluke/.atom/packages/ex-mode/lib/ex-command-mode-input-element.coffee:46:16)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:241:29)
  at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:520:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:355:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:180:20)

This happened to me as well when I typed ":w file" using Atom 1.0.2 and ex-mode 0.5.1 and vim-mode 0.57.0 on Ubuntu 15.04. Stacktrace:
TypeError: undefined is not a function
  at getFullPath (/home/matthew/.atom/packages/ex-mode/lib/ex.coffee:35:33)
  at Ex.write (/home/matthew/.atom/packages/ex-mode/lib/ex.coffee:131:20)
  at Ex.w (/home/matthew/.atom/packages/ex-mode/lib/ex.coffee:143:5)
  at /home/matthew/.atom/packages/ex-mode/lib/ex.coffee:1:1
  at Command.execute (/home/matthew/.atom/packages/ex-mode/lib/command.coffee:153:7)
  at ExState.processOpStack (/home/matthew/.atom/packages/ex-mode/lib/ex-state.coffee:50:17)
  at ExState.pushOperations (/home/matthew/.atom/packages/ex-mode/lib/ex-state.coffee:40:6)
  at ExViewModel.ViewModel.confirm (/home/matthew/.atom/packages/ex-mode/lib/view-model.coffee:13:14)
  at ExViewModel.module.exports.ExViewModel.confirm (/home/matthew/.atom/packages/ex-mode/lib/ex-view-model.coffee:35:5)
  at ExViewModel.confirm (/home/matthew/.atom/packages/ex-mode/lib/ex-view-model.coffee:1:1)
  at ex-command-mode-input.ExCommandModeInputElement.confirm (/home/matthew/.atom/packages/ex-mode/lib/ex-command-mode-input-element.coffee:46:16)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/local/share/atom/resources/app.asar/src/command-registry.js:241:29)
  at /usr/local/share/atom/resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/local/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:520:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/local/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:355:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/local/share/atom/resources/app.asar/src/window-event-handler.js:177:20)

fixed this with 656ed90f7e5391ce7228f9da00f77423573403c2


fix: README.md formatting

Sorry, already fixed here: https://github.com/yetone/avante.nvim/pull/12


Failed to reproduce the result (finally solved, due to bugs in dataset setup)

Hi, I've tried to reproduce the result on DAVIS with ResNet18 backbone with the script as follows.
./tools/dist_train.sh configs/r18_nc_sgd_cos_100e_r2_1xNx8_k400.py 2
The official ckpt that you released is 66.73% J&F. However, for my retrained model, I got only ~60.86% J&F for the final checkpoint (epoch=100). The detailed evaluation result on DAVIS is as follows. So I am not sure what's going wrong.
What's more, I would like to ask you about the deviation of results. Thanks.
Results copypaste  60.86
J&F-Mean: 0.6086
J-Mean: 0.5830
J-Recall: 0.6685
J-Decay: 0.2298
F-Mean: 0.6343
F-Recall: 0.7311
F-Decay: 0.2853

Hi @JerryX1110
The deviation of results is relatively small, with in 0.5 J&F mean.
May I ask how large your Kinetics400 is?

Oh, I think maybe something goes wrong with the dataset setup step. The video items that I downloaded with mmaction scripts are only ~30,000. Maybe using such less Kinetics400 is the reason for the drop in my reproduced performance.
I previously also download kinetics400 with the other method and the video number is about ~240,000.
Thank you for your timely reply!
Best wishes for the New Year in 2022 👍

Oh, I think maybe something goes wrong with the dataset setup step. The video items that I downloaded with mmaction scripts are only ~30,000. Maybe using such less Kinetics400 is the reason for the drop in my reproduced performance.
I previously also download kinetics400 with the other method and the video number is about ~240,000.
Thank you for your timely reply!
Best wishes for the New Year in 2022 👍

@JerryX1110 Were you able to reproduce the result?


Cargo.toml of release 0.25.1 is still tagged as 0.25.0

Describe the bug
MeiliSearch version reports version 0.25.0 in release 0.25.1
To Reproduce
Steps to reproduce the behavior:

Execute meilisearch --http-addr <IP_ADDRESS>:57943
In a different shell, execute curl -s <IP_ADDRESS>:57943/version
See the version being 0.25.0

Expected behavior
The new release should be at version 0.25.1
MeiliSearch version: [e.g. v0.20.0]
0.25.1
Additional context
See https://github.com/meilisearch/MeiliSearch/blob/d0aa5f747c0e5818184632623ece570b05a09423/meilisearch-http/Cargo.toml#L7

Hello @Moisan ! We are aware of this, this is a mistake from our end. @curquiza will confirm, but I think the plan is to leave it like that until the next release?

Yes, I confirm, sorry for this @Moisan. This is indeed v0.25.1 but with the wrong version in the Cargo.toml.
We will not be able to change this until the next release.

When is the next release planned to be?

Next release should be v0.26.0, and the planned date is 07/03/2022
Except if we figure out a critical bug, in this case, we would release a patch (v0.25.2) in the meantime.

Closing this, v0.25.2 is released and is having the right version in cargo.toml :)


"Post Might Not Be Available" for every post on specific public account

https://www.ddinstagram.com/p/C75ipYLRd7r/?igsh=amdnaHhnM2VoZ3Y5
https://www.ddinstagram.com/p/C7ppee_sDKs/?igsh=cnlmNnpqNnpjN2c1
https://www.ddinstagram.com/p/C7etMDdRKaR/?igsh=MTBrcWlqZzF0dTExeg==
All of these posts are from the same public account, but none of the embeds will load. At the same time, embeds for other accounts will load instantly and work as expected. It seems to be specific to this account and has been a persistent issue for at least a month.

Hello, InstaFix scrape a post information from the embed and the user ytyutiktv has disabled the embed functionality for their account. So it will always shows "Post Might Not Be Available" for that account.
You can check it from this URL: https://www.instagram.com/p/C75ipYLRd7r/embed/captioned


NIFI-10636 Update Jython-standalone to 2.7.3

Summary
NIFI-10636
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking

[X] Apache NiFi Jira issue created

Pull Request Tracking

[X] Pull Request title starts with Apache NiFi Jira issue number, such as NIFI-00000
[X] Pull Request commit message starts with Apache NiFi Jira issue number, as such NIFI-00000

Pull Request Formatting

[X] Pull Request based on current revision of the main branch
[X] Pull Request refers to a feature branch with one commit containing changes

Verification
Please indicate the verification steps performed prior to pull request creation.
Build

[ ] Build completed using mvn clean install -P contrib-check

[X] JDK 8
[X] JDK 11
[X] JDK 17

Licensing

[ ] New dependencies are compatible with the Apache License 2.0 according to the License Policy
[ ] New dependencies are documented in applicable LICENSE and NOTICE files

Documentation

[ ] Documentation formatting appears as expected in rendered files

This upgrade involves some testing, as previous patch versions of Jython included some dependency differences. Tagging @mattyb149 for review.

Reviewing...

+1 LGTM, verified os.getpid() works and that Xerces is still included. Thanks for the upgrade! Merging to main


Improve the error message for to small values of MAX_CPU_COUNT

Fixes #3594 and #3482
Proposed Changes

Setting a wrong value to -DHPX_WITH_MAX_CPU_COUNT results in an unspecific error message

[diehlpk@centaur build]$ ./bin/fibonacci
terminate called after throwing an instance of 'hpx::detail::exception_with_info<hpx::exception>'
  what():  The number of OS threads requested (20) does not match the number of threads to bind (12): HPX(bad_parameter)

This is misleading and we should improve the error handling here.
Any background context you want to provide?
The PR shows this error message instead
[diehlpk@centaur build]$ ./bin/fibonacci
terminate called after throwing an instance of 'std::runtime_error'
  what():  partitioner::partioner: HPX_HAVE_MAX_CPU_COUNT is set as 64 your system has 160. Please recompile HPX and increase the maximal CPU count!
Aborted (core dumped)

and no error message when the value is correct
[diehlpk@centaur build]$ ./bin/fibonacci
fibonacci(10) == 55
elapsed time: 0.002081 [s]

@diehlpk Please also fix the error reported by inspect: https://52910-4455628-gh.circle-artifacts.com/0/hpx_inspect_report.html (please replace tabs with spaces and remove all endline whitespace, for our coding style guidelines please see: https://github.com/STEllAR-GROUP/hpx/wiki/HPX-Source-Code-Structure-and-Coding-Standards).

Could you please rebase your changes on master? That should get rid of all the unrelated commits on this PR.

@hkaiser I totally screwed up my branch and could not push after the rebase and squash anymore, because my branch was behind master, but git merge master and git rebase master said it was up to date. I generated a new PR #3603.


Add custom message field to _unsafeUnwrap* config object

Pull Request Description
Summary
This PR introduces enhancements to the error handling mechanism within the codebase by allowing custom error messages to be specified. Additionally, it updates the README documentation and adds new test cases.
Changes Made

README.md:

Added documentation on how to conditionally add a custom error message that will propagate with the error object.
Provided an example to demonstrate the usage of the custom error message with a stack trace.

src/_internals/error.ts:

Updated the ErrorConfig interface to include an optional message property.

src/result.ts:

Modified the _unsafeUnwrapErr method in the Ok class to use the custom error message if provided, otherwise, it defaults to the existing message.
Updated the _unsafeUnwrap method in the Err class to use the custom error message if provided, otherwise, it defaults to the existing message.

tests/index.test.ts:

Added test cases to verify that custom error messages are correctly included when _unsafeUnwrap and _unsafeUnwrapErr are called with a custom message in the Ok and Err classes.

Hey @dmmulroy thank you for the first contribution :) ... please provide a changeset file and additionally address the merge conflicts!

Going to close this and reopen with fixes addressed, i made a silly mistake by pushing to my master branch


[NOC-276] replace Enterprise database with SSOT API

Switch MSSQL Enterprise Database with SSOT API
The approach shown in this pull request is appears more straight-forward than swapping the MSSQL Enterprise database for the SSOT database.  At present, there aren't the SSOT API endpoints needed to replace the Enterprise database joins so the SsotApi class stubs out what's required.

Sounds good, let's continue on this path. Please use the nocs endpoint on SSOT to get some of the needed data here.


RFC: setTokens: option to avoid triggering tokenfield: events

A hack to work around #207. Please review and comment.

This is not a very good workaround though. If tokenfield:createdtoken is not sent, I can't change the token presentation as I need... :(


Adding Locale Page

This add a locale picker page that is used by the footer

Docs Build status updates of commit 3107e29:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

rd/Locale/index.yml
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


42 finalize the patient intake process

Short description

Add allowed days (i.e. Monday, Wednesday) to ward model.
Update the patient intake view to respect ward's allowed intake days, and provides feedback and an option to resolve invalid discharge days.
Add buttons and input field to intake view to set discharge date by offset relative to the admission, i.e. 2/7/14 nights after.

Please open this pull request on the fork your group is working on. This repo (and I) are not part of the current Praktikum.


prerelease.keybase.io refuses traffic

apt-get upgrade says:
http://prerelease.keybase.io/deb/pool/main/k/keybase/keybase_1.0.34-20171023181047.b7ef5cc9b_amd64.deb  403  Forbidden [IP: <IP_ADDRESS> 80]

Also, where's the IPv6 address for it?

Same error today.
(Is there no +1 button here?)

Try an ‘apt get update’ first.
On Thu, Nov 23, 2017 at 9:03 PM Jeff Van Epps<EMAIL_ADDRESS>wrote:

Same error today.
(Is there no +1 button here?)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/keybase/client/issues/9660#issuecomment-346723398,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AA05_8ChxElPhFn-z3Xl8qUOBrFeA8jUks5s5iPZgaJpZM4QnWuo
.

That worked, thanks.


fix: use gauge.body_size/2 as target in try_split

Also update a vestigial with the correct name of the test.

#644  👈 (View in Graphite)
master

This stack of pull requests is managed by Graphite. Learn more about stacking.


onPress

Thanks for your job, but I hava  a question,how to custom the onPress props ,such  as  when i click "@twitter" I can go his home page ? I need help ,can you give me a  example?thanks
<AutoLink
text="This is the string to parse for urls (https://github.com/joshswan/react-native-autolink), phone
twitter handles (@twitter), and hashtags (#exciting)"
hashtag="instagram"
twitter={true}
onPress={ ?} />
how  to  get the  value   "twitter" ?  in the onPress

onPress={(link, match) => {
  const type = match.getType(); // email, hashtag, phone, twitter, or url
})

See the README for more info. The match object details can be found here: http://gregjacobs.github.io/Autolinker.js/docs/#!/api/Autolinker.match.Match


Avoid catching of ArithmeticExceptions, by avoiding division through 0.

Contains
Proper fix of #2212 . Replaces catch added by #2215 logic that avoid the division through 0.
How to test
See  #2215

Refer to this link for build results (access rights to CI server needed):
http://jenkins.terasology.org/job/TerasologyPRs/473/
Hooray Jenkins reported success with all tests good!

Thanks @flo - I can confirm the fix and appreciate going the extra mile for this :-)
I know we all wish for the most perfect code we can get yet none of us have infinite time. Maybe my new day job is showing too much, talk about having to make compromises, heh.
In this case with WaS "broken" (set to inherit "default") you get a workstation screen with no slots in it, yet nothing gets logged hinting at what it might be. Do you think it Is better to keep the code clean and let a dev figure out what's wrong and never commit bad code or add in extra logging that in an ideal world will never trigger?
I thought the one-time logging was clever, with the simple if variant to avoid the try-catch. But I'll admit it then in theory would never trigger outside a developers workspace - you'd find the error and correct it before ever committing.
Is this something we'd be better off catching via the effort in #1402? Which coincidentally @rzats is showing an interest in as well, so that may be a perfect fit.


Update education.md

Insert URLs to the project here:
https://github.com/datacarpentry/r-intro-geospatial
In one sentence, explain what the project is about:
Provides an introduction to R for learners working with geospatial data.

[x] The projects is active, documented, open source licensed, shows usage from external parties and is directly targeting environmental sustainability. Find more details in the Contribution Guide.

All issues marked as 'Good First Issue' of the project listed on OpenSustain.tech will be visible on ClimateTriage.com. This is a great way to welcome new community members to your project.

@sritchie73 @fmichonneau @naupaka @ErinBecker


Upgrade ocaml-rs to 0.22.0

This depends on o1-labs/zexe#50; we should land that first.

This has already been merged to the release branch on the mina side. Merging.


Unable to successfully start the web ui

I have attempted to manually start and run the stack without using the playground with a few issues when accessing the web ui.
Steps to Reproduce (for bugs)
I built and started the stack with the shell scripts, then I attempted to load http://localhost:8080 and got forever-loading empty request.

./build.sh
./deploy_stack.sh

Deploying stack
Creating network func_functions
Creating service func_gateway
Creating service func_alertmanager
Creating service func_nodeinfo
Creating service func_markdown
Creating service func_decodebase64
Creating service func_wordcount
Creating service func_hubstats
Creating service func_prometheus
Creating service func_echoit
Creating service func_base64
Creating service func_webhookstash

curl localhost:8080/function/func_markdown/ -d "## Testing"
curl: (56) Recv failure: Connection reset by peer

I inspected the docker network and got the ip for the gateway container, and accessed it via http://<containerid>:8080. I got a white page with just this text: Select a function..
I also manually ran docker-compose build docker-compose up docker-compose down to see if raw compose was a possible solution. I checked but didn't see a particular version of docker that is required.
Am I doing something entirely wrong, or is there a step for setting up the network that I need to do first?
I read all the md files in the repo, your blog post referencing faas, and some of the linked gists without finding a particular solution.
Your Environment

Docker version version 17.06.0-ce, build 02c1d87

Operating System and version (e.g. Linux, Windows, MacOS):

Debian Linux 4.9.0-3-amd64

I got it to work by changing the build version of the gateway to the local image: https://github.com/alexellis/faas/blob/master/docker-compose.yml#L10 latest-dev.
Still some form of issue as I needed to change the image.

Hi @stevelacy,
Thanks for your message.
You may have an ipv4/ipv6 conflict on the name localhost in your hosts file such as:
cat /etc/hosts
<IP_ADDRESS>	localhost
::1		localhost ip6-localhost ip6-loopback

You can comment out the 2nd line, or use <IP_ADDRESS> or the IP address of your LAN/WAN connection instead.
Curl can also be forced into ipv4 mode with the -4 flag.
docker-compose is not used for FaaS, but it does have a docker-compose.yml file which is used for creating the Docker stack, so docker-compose up/down/build are not going to be valid.
The tag 0.5.6 for the gateway image is working (I also re-tested it this morning), but you can switch out to a newer (master) version like you did by running ./build.sh and updating the image tag to: latest-dev.
Hope this helps. I'll close the issue for now since you have got up and running, but do re-open if you need to.

Thanks


Add an option to rewrite paths

Hi, this is an awesome library!
I was trying to use it with one my projects, but all the paths have the webpack prefix _N_E on them, making it not work correctly:

If I had a way to rewrite those paths, I would be able to fix this issue.

Looks like that's an extra prefix Next.js adds to webpack, I'll take a look at stripping that.
In one of your screenshots there's a file e2e/_N_E/design/src/index.ts. Is the actual file located at design/src/index.ts or at e2e/design/src/index.ts?
I can't seem to find documentation on the _N_E prefix and I don't use next.js myself, so I can't tell.

Thanks for looking at this! Yes, I am using Next.js.
This is a monorepo, the e2e tests are inside <root>/packages/e2e/  and the other file is inside <root>/packages/design/src/index.ts.

I've finally realised that rewriting the paths can happen in the main thread, thereby removing all constraints that would be incurred when the rewriting would happen in the worker.

For anyone who finds this issue, using the rewritePaths option in this way seems to have everything working for me.
				rewritePath: ({ absolutePath }: { absolutePath: string }) => {
					// remove next file prefix and suffix
					return absolutePath
						.replace("_N_E/", "")
						.replace(/\?.*/, "");
				},

Hello JCMais,
how did you get the framework to read your e2e folder. I use the framework with Angular and Plywright. With Playwright the e2e tests are in the tests folder by default. But unfortunately I can't get this folder to be read. Can you show me your playwright.config.ts file? This is my current result.


Button/Paste removes all tags no matter what

First off, great plugin for summernote! It's definitely exactly what I was looking for. The only thing I'm encountering is that it's cleaning all tags even with keepHTML: true and any tags in keepOnlyTags doesn't matter.
This is how I'm currently initializing it.
cleaner:{
            action: 'both',
            newline: '

', // Summernote's default is to use '

',
            notStyle: 'position:absolute;top:0;left:0;right:0',
            icon: '',
            keepHtml: true,
            keepOnlyTags: ['
', '', '', '
', '
', '
', '','', ''],
            keepClasses: false,
            badTags: ['style', 'script', 'applet', 'embed', 'noframes', 'noscript', 'html'],
            badAttributes: ['style', 'start']
        }

Any thoughts? thanks

Same here, using the 0.8.9 version

I'm also experiencing this issue.
Here are my settings:
cleaner: {
action: 'both',
newline: ''
notStyle: 'position:absolute;top:0;left:0;right:0',
icon: 'WC',
keepHtml: true,
keepOnlyTags: ['', '', '', '', '', '', '', '', ''],
keepClasses: false,
badTags: ['style', 'script', 'applet', 'embed', 'noframes', 'noscript', 'html'],
badAttributes: ['style', 'start', 'class'],
limitChars: 0,
limitDisplay: 'both',
limitStop: false
}
Using summernote-rails (~> <IP_ADDRESS>).
Requiring these files in asset pipeline:
//= require summernote/summernote.min
//= require summernote-cleaner (your master branch)
//= require summernote-init (init script partially referenced above)
I will note that it is getting initialized and it does clean on paste. It simply doesn't respect the KeepOnlyTags options that are set. Instead it removes all tags no matter what.
Thanks in advance.

Same Issue for me

This is happening to me as well... v0.8.9

Try replacing 'Text' with 'text/html' around line 162 where the data is copied from the clipboard.  It seems that using Text strips html prior to the cleaner cleaning the text.

try commenting out/removing line 154 (e.preventDefault()) and then replacing line 162 with:
if(options.cleaner.keepHtml){
var text = window.clipboardData.getData('Text') ;
} else {
e.preventDefault();
var text = e.originalEvent.clipboardData.getData('text/plain');
}

This commit appears to have fixed in Chrome at time of writing, but maybe has regressed since?
Note also that  getData when used with the 'Text' parameter may well be non-functional in Chrome, requiring 'text/html' instead? This StackOverflow answer goes into more detail.

Use of 'text/html' produces a type error in both Chrome and Firefox.
Chrome says: Failed to execute 'setStart' on 'Range': parameter 1 is not of type 'Node'.
While Firefox tells me: Argument 1 of Range.setStart is not an object.

@nigel-stewart The bug you're seeing is also reproducible in other situations within Summernote - e.g. #1759

Hi there,
I believe the clean function is stripping  and  tags, which at least Chrome and Firefox need to parse the clipboard text/html. I worked around the problem by keeping  and  tags in the cleaner options.

I am having same issue, it does a wonderful job of stripping everything out, but ignores keepOnlyTags. I have tried above solutions with no luck. Anyone fixed this yet?

Same Issue for me :(

A workaround:

In line 162 of summernote-cleaner.js, ensure that if keepHtml is true, use 'text/html' AND
When calling summernote(), ensure that cleaner settings for keepOnlyTags includes  and
When calling summernote(), ensure that cleaner settings for badTags excludes  and

This seems to work in

Chrome 68.0.3440.106
Firefox 62.0

its not work for me. Why ... :(

summernote-cleaner.js  where can i find this file?

Hi,
For my testing needs I just used a local copy of version 1.0.0, downloaded
from https://github.com/DiemenDesign/summernote-cleaner
To use summernote-cleaner, you should have installed it on and be including
it from somewhere on your server "".
On Wed, Oct 17, 2018 at 9:20 AM Peterbins<EMAIL_ADDRESS>wrote:

summernote-cleaner.js where can i find this file?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/DiemenDesign/summernote-cleaner/issues/57#issuecomment-430625185,
or mute the thread
https://github.com/notifications/unsubscribe-auth/Aoggonk75e1sZMiiKqjmw2r2Y7DmJ0j9ks5uly6WgaJpZM4Ss-iw
.

keepHtml = false and it still remove all tags, someone should fork and fix this


Change test files format from JSON to CSV

Currently we use JSON for tests in the following format:
    {
      "name": "Test name",
      "cyr_nar": "суддзя",
      "cyr_taras": "суддзя",
      "lat": "sudździa",
      "lat_no_diactric": "sudzdzia",
      "disabled": "Reason to skip this test (optional field)",
    },

This format is pretty flexible but not very convenient for introducing new tests. Usual test cases are a tuple of four single words in different alphabets: (cyr_nar, cyr_taras, lat, lat_no_diactric). JSON format makes it harder to add new tests: you either have to add a whole new test for just a single word or add words to existing tests.
The latter makes it harder to read tests. For example in the following test it's hard for a given work in cyr_nar to quickly find its corresponding word in latin case. Well, maybe not this instance, but when list grows it will be harder to do.
{
    "name": "Soft letters",
    "cyr_nar": "снег вуллі бяссільны прыволле Наталля ссяляць заззяць каменне жыццё",
    "cyr_taras": "сьнег вульлі бясьсільны прывольле Натальля сьсяляць зазьзяць каменьне жыцьцё",
    "lat": "śnieh vulli biaśsilny pryvolle Natalla śsialać zaźziać kamieńnie žyćcio"
},

I propose to change format to CSV. Each line is a separate word tuple to be tested. Example:
cyr_nar,cyr_taras,lat,lat_no_diactric
суддзя,судьдзя,sudździa,sudzdzia

If a test doesn't have a variant for certain case we can leave it empty or mark with special - symbol.
Another benefit of such tests is that it's easy to share specific test cases: you can share a link that points to a specific line.
The downside of this format is that it's hard just to add big chunk of text as tests. For example like existing one existing test. But actually it's for good. Such tests are hard to debug. Instead we'd need to split big texts to smaller word or sentence-based pieces and convert them to CSV.
This proposal came up while working on adding more test cases. I have a spreadsheet with narkamauka => taras words. While working on it I realized that it will be convenient for future if tests resembled table-like structure as well: easier to navigate and modify.
@frombrest what do you think?

Does it make sense to simply introduce another test data provider (CSV based) and use it like primary, meantime keep JSON like secondary for some complex test cases which must contain several words or commas?

I think for cases with several words (2 words or 3 words with a preposition) we'll still use CSV.
We could leave existing code that parses JSON, yes.


testEnv.sleep doesn't work as expected and hangs

Expected Behavior
testEnv.sleep() should skip workflow's internal timer without actually sleeping.
Actual Behavior
It seems that the timer is actually sleeping or just hangs. All tests that use testEnv.sleep in a similar fashion as below have similar behavior, however, sometimes when ran as a class, it'll pass.
Steps to Reproduce the Problem
Workflow Interface:
import io.temporal.workflow.QueryMethod;
import io.temporal.workflow.SignalMethod;
import io.temporal.workflow.WorkflowInterface;
import io.temporal.workflow.WorkflowMethod;

@WorkflowInterface
public interface ExampleWorkflow {
    @WorkflowMethod
    String execute();

    @SignalMethod
    void updateState(String state);

    @QueryMethod
    String queryState();
}

Workflow Implementation:
import java.time.Duration;
import io.temporal.workflow.Workflow;
import org.slf4j.Logger;

public class ExampleWorkflowImpl implements ExampleWorkflow {
    Logger logger =  Workflow.getLogger(ExampleWorkflowImpl.class);
    private String state;
    private boolean completed;
    private boolean terminated;
    private boolean error;

    public ExampleWorkflowImpl() {
        this.state = "INITIALIZED";
        this.completed = false;
        this.terminated = false;
        this.error = false;
    }

    @Override
    public String execute() {
        state = "WAITING_FOR_SIGNAL";
        while (state.equals("WAITING_FOR_SIGNAL")) {
            Workflow.await(Duration.ofMinutes(20L), () -> (completed || terminated || error));
            if (terminated) {
                state = "TERMINATED";
                return state;
            } else if (error) {
                state = "ERROR";
                return state;
            } else if (completed) {
                state = "PRELIM_COMPLETED";
            }
        }
        state = "WAITING_FOR_MORE_SIGNAL_OR_TIMER_TO_END";
        Workflow.await(Duration.ofMinutes(20L), () -> (error));
        if (error) {
            state = "ERROR";
            return state;
        } else {
            state = "COMPLETED";
        }
        return state;
    }

    @Override
    public void updateState(String newState) {
        switch(newState) {
            case "PRELIM_COMPLETED":
                completed = true;
                break;
            case "TERMINATED":
                terminated = true;
                break;
            case "ERROR":
                error = true;
                break;
            default:
                logger.error("Unknown state: {}", newState);
                break;
        }
    }

    @Override
    public String queryState() {
        return state;
    }
}

Unit Tests:
import static org.junit.jupiter.api.Assertions.assertEquals;

import java.time.Duration;
import static java.util.concurrent.TimeUnit.SECONDS;

import io.temporal.client.WorkflowClient;
import io.temporal.client.WorkflowOptions;
import io.temporal.testing.TestWorkflowEnvironment;
import io.temporal.worker.Worker;
import org.junit.Rule;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.Timeout;
import org.junit.rules.TestWatcher;
import org.junit.runner.Description;

public class ExampleWorkflowImplTest {

    /**
     * Prints a history of the workflow under test in case of a test failure.
     */
    @Rule
    public TestWatcher watchman =
            new TestWatcher() {
                @Override
                protected void failed(Throwable e, Description description) {
                    if (testEnv != null) {
                        System.err.println(testEnv.getDiagnostics());
                        testEnv.close();
                    }
                }
            };

    private TestWorkflowEnvironment testEnv;
    private Worker worker;
    private WorkflowClient client;
    private ExampleWorkflow workflow;
    private static final String WORKFLOW_TASK_QUEUE = "EXAMPLE";

    @BeforeEach
    public void setUp() {
        testEnv = TestWorkflowEnvironment.newInstance();
        worker = testEnv.newWorker(WORKFLOW_TASK_QUEUE);
        client = testEnv.getWorkflowClient();
        worker.registerWorkflowImplementationTypes(ExampleWorkflowImpl.class);
        workflow = client.newWorkflowStub(
                ExampleWorkflow.class,
                WorkflowOptions.newBuilder()
                        .setWorkflowExecutionTimeout(Duration.ofDays(2))
                        .setTaskQueue(WORKFLOW_TASK_QUEUE)
                        .build());
        testEnv.start();
    }

    @Test
    public void testTerminatedUpdateStatus() {
        WorkflowClient.start(workflow::execute);
        workflow.updateState("TERMINATED");
        assertEquals("TERMINATED", workflow.queryState());
    }

    @Test
    @Timeout(value = 10, unit = SECONDS)
    public void testCompletedThenTimerCompletes() throws InterruptedException {
        WorkflowClient.start(workflow::execute);
        workflow.updateState("PRELIM_COMPLETED");
        while (!workflow.queryState().equals("WAITING_FOR_MORE_SIGNAL_OR_TIMER_TO_END")) {
            Thread.sleep(2000);
        }
        // this line hangs without the @Timeout rule
        testEnv.sleep(Duration.ofMinutes(20L));
        assertEquals("COMPLETED", workflow.queryState());
    }

    @AfterEach
    public void tearDown() {
        testEnv.close();
    }
}

Specifications

Version: JUnit5, Mockito 1.10.19, Temporal SDK 1.0.0
Platform: macOS Big Sur

I really appreciate the reproduction! I was looking around for exactly this when saw this issue. I'll update you when the fix is ready.

Found the bug. The fix is in PR. Thanks a lot for your help!

Wonderful. Thank you!


Find Heap Bound

This refactors benchmark/scripts/benchmark_cold_compile.py a little bit and adds an additional script for measuring information about FIRRTL runs: benchmark/scripts/find_heap_bound.py
The basic idea is that you provide a starting heap size (passed via -Xmx), a minimum step size, and JVM arguments and the script will do a binary search to find the minimum allowable heap size. There are sensible defaults for starting heap size and minimum step.
Note that this isn't specific to FIRRTL, you can use this for any java program. The only java specific aspect is that it's using -Xmx.
Use
Help text
$ ./benchmark/scripts/find_heap_bound.py -h
usage: Bound JVM Heap Size [-h] [--verbose] [--start-size START_SIZE]
                           [--min-step MIN_STEP] [--java JAVA]
                           args [args ...]

positional arguments:
  args                  Arguments to JVM, include classpath and main

optional arguments:
  -h, --help            show this help message and exit
  --verbose, -v         Increase verbosity level (cumulative)
  --start-size START_SIZE
                        Starting heap size (default: 4G)
  --min-step MIN_STEP   Minimum heap size step (default: 100M)
  --java JAVA           Java executable to use (default: java)

Example
./benchmark/scripts/find_heap_bound.py --start-size 16G -- -cp utils/bin/firrtl.jar firrtl.stage.FirrtlMain -i regress/Rob.fir -o out -X verilog
Xmx,Max RSS (MiB),Wall Clock (s),User Time (s),System Time (s)
16G,2128,27.64,60.26,5.33
8G,2195,29.08,61.75,4.92
4G,1759,27.67,62.17,4.36
2G,1349,29.29,68.5,4.1
1G,1200,23.02,70.16,2.24
500M,765,27.86,101.59,3.76
400M,674,27.26,111.51,3.91
300M,-,-,-,-
$ echo "
> Xmx,Max RSS (MiB),Wall Clock (s),User Time (s),System Time (s)
> 16G,2128,27.64,60.26,5.33
> 8G,2195,29.08,61.75,4.92
> 4G,1759,27.67,62.17,4.36
> 2G,1349,29.29,68.5,4.1
> 1G,1200,23.02,70.16,2.24
> 500M,765,27.86,101.59,3.76
> 400M,674,27.26,111.51,3.91
> 300M,-,-,-,-
> " | column -t -s,
Xmx   Max RSS (MiB)  Wall Clock (s)  User Time (s)  System Time (s)
16G   2128           27.64           60.26          5.33
8G    2195           29.08           61.75          4.92
4G    1759           27.67           62.17          4.36
2G    1349           29.29           68.5           4.1
1G    1200           23.02           70.16          2.24
500M  765            27.86           101.59         3.76
400M  674            27.26           111.51         3.91
300M  -              -               -              -

This is super useful for examining the tradeoff between heap size, runtime (wall clock) and user time which shows how much extra GC pressure there is.
Future work
It might be nice to search for heap sizes based on different optimization criteria (the current one being "works"). In particular, I think a target user time or perhaps ratio of user time / wall clock time would help find better bounds than just "does it work".
Contributor Checklist

[ ] Did you add Scaladoc to every public function/method?
[ ] Did you update the FIRRTL spec to include every new feature/behavior?
[x] Did you add at least one test demonstrating the PR?
[x] Did you delete any extraneous printlns/debugging code?
[x] Did you specify the type of improvement?
[x] Did you state the API impact?
[x] Did you specify the code generation impact?
[x] Did you request a desired merge strategy?
[x] Did you add text to be included in the Release Notes for this change?

Type of Improvement

new feature/API (for developers)

API Impact
None
Backend Code Generation Impact
None
Desired Merge Strategy

Rebase: You will rebase the PR onto master and it will be merged with a merge commit.

Release Notes
Add script for measuring heap allocation vs. performance and memory use
Reviewer Checklist (only modified by reviewer)

[ ] Did you add the appropriate labels?
[ ] Did you mark the proper milestone (1.2.x, 1.3.0, 1.4.0) ?
[ ] Did you review?
[ ] Did you check whether all relevant Contributor checkboxes have been checked?
[ ] Did you mark as Please Merge?

Also protip, if you paste a CSV into Excel, and then turn the CSV into a normal Excel table, you can copy paste that table into Github and it will autoformat as a table:

Xmx
Max RSS (MiB)
Wall Clock (s)
User Time (s)
System Time (s)

16G
2128
27.64
60.26
5.33

8G
2195
29.08
61.75
4.92

4G
1759
27.67
62.17
4.36

2G
1349
29.29
68.5
4.1

1G
1200
23.02
70.16
2.24

500M
765
27.86
101.59
3.76

400M
674
27.26
111.51
3.91

300M
-
-
-
-

Not sure if this works with GSuite

@seldridge I have incorporated your feedback and rebased on master. I also added another command-line argument --timeout-factor (default 4.0) that allows the script to pick a timeout for java runs since sometimes the JVM can thrash when it's very close to the limit. I had a run of this run all night because of this issue so I figured a timeout is important.


docs: 新增demo「想如何度过一天（抽象版）」

👀 PR includes
🔧 Chore

[ ] Test case
[x] Docs / demos update
[ ] CI / workflow
[ ] Release version
[ ] Other ()

🖼 Screenshot

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


Additional configuration providers

How could we register additional configuration providers(eg. Azure App Configuration). The AddAzureAppConfiguration extension method extends IConfigurationBuilder, which is not exposed in the FunctionsStartup class.

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

ID: 5786402e-9d88-5de0-607a-1c2a143af006
Version Independent ID: 15368d1c-b22e-7eb2-413f-cc0d41d2b909
Content: Use dependency injection in .NET Azure Functions
Content Source: articles/azure-functions/functions-dotnet-dependency-injection.md
Service: azure-functions
GitHub Login: @ggailey777
Microsoft Alias: jehollan

Hi @arkiaconsulting Thank you for your feedback! We will review and update as appropriate.

@fabiocav could you please share your thoughts here ?

Hi, I appeared to install need to install the package  Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator to get this working

This is somewhat related to #30814, as they're both dealing with configuration. We should have a document section covering Configuration, which would address both issues.
/cc @jeffhollan @brettsam

@marctalary: what do you mean ? Could you please explain ?

Sure, I added the Microsoft.Azure.Functions.Extensions package to an
existing function app that didn't also include the
package Microsoft.Azure.WebJobs.Script.ExtensionsMetadataGenerator.
In debug everything compiled and started without error but the function
failed when invoked with a DI error.  After adding the package it started
working.
See https://github.com/marctalary/FunctionDiExample which has a copy of the
the Basic Function using the Microsoft.Azure.Functions.Extensions package
but it does not invoke the SampleStartup method and fails.
On Thu, 9 May 2019 at 20:52, LouisG<EMAIL_ADDRESS>wrote:

@marctalary https://github.com/marctalary: what do you mean ? Could you
please explain ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/azure-docs/issues/30815#issuecomment-491042030,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACVAAQ27PVVTUUGARIAAPH3PUR6GVANCNFSM4HLRFTAA
.

Thanks @fabiocav . I have assigned this to content author @ggailey777 to update the doc as appropriate.

Thanks @marctalary, I see, but I'm affraid that this isn't related to the present issue.

Does this also affect the usage of AddServiceBus()? I have a simple Service Bus triggered function and am unable to get it to bind the service bus extension after implementing this DI system.

Thanks @marctalary, I see, but I'm affraid that this isn't related to the present issue.
@arkiaconsulting you're right, apologies I meant to create a separate issue

@arkiaconsulting following this article I was able to add user-secrets to configuration. Until you get an official answer i think you can use same approach to integrate azure app configuration
code
var configurationBuilder = new ConfigurationBuilder();
            var descriptor = builder.Services.FirstOrDefault(d => d.ServiceType == typeof(IConfiguration));
            if (descriptor?.ImplementationInstance is IConfiguration configRoot)
            {
                configurationBuilder.AddConfiguration(configRoot);
            }
            var config = configurationBuilder.Build();
            configurationBuilder.AddUserSecrets<Startup>();
            config = configurationBuilder.Build();
            builder.Services.Replace(ServiceDescriptor.Singleton(typeof(IConfiguration), config));

@rameshjanjyam How are you setting/updating the values in "User Secrets"? I don't see any options when I right-click the project. Are you just using the command line?

@MisinformedDNA You have to add a UserSecretsId tag in your .csproj. See here

@MisinformedDNA  yes I am using command line. as mentioned by @arkiaconsulting in my .csproj file I have UserSecretsId tag which is a guid
 <PropertyGroup>
    <TargetFramework>netcoreapp2.1</TargetFramework>
    <AzureFunctionsVersion>v2</AzureFunctionsVersion>
    <UserSecretsId>****guid ***** </UserSecretsId>
  </PropertyGroup>

and using cli commands (my development environment is on mac) like below I add secrets to UserSecrets
dotnet user-secrets set <key> <value>

Configuration support is a feature that the product team is investigating. Since this is more a product issue than a doc issue, I am going to #please-close this thread for now.
To request specific features, please feel free to open an issue propose them in the azure-functions-host repo.


Ask for confirmation before deleting a project/label

It appears to me that deleting a project or a label is way too easy if you accidentally click the delete button. Please add a pop up asking for confirmation.

agreed!

Hi @miskolc, looks like there is already a confirm pop-up for deleting a project:

This basic functionality seems to have been in place since 4ab558df4489acb9f67919e759c971d40359a756 (it's undergone a number of refactors since then).
When you refer to confirming on deleting a label, do you mean simply deleting an instance of a label?

Or is it a different context that you mean?

Resolved.
After ver 1.0.0, ask for confirmation before deleting a project/label/documents.