Type annotations for query parameters

I propose adding type annotations for query parameters. Users will no longer need to cast parameters to the desired type. This proposal builds on Andrew's query annotation
work for vet.
Unified syntax
We added the @sqlc-vet-disable annotation to disable vet rules on a per-query
basis. We can extend this syntax to support other per-query configuration
options.
The current syntax for query name and command are different, so we'll
standardize on the @ prefix. This will be the new, preferred syntax for name
and command.
-- name: GetAuthor :one
SELECT * FROM authors
WHERE id = $1 LIMIT 1;

-- becomes

-- @name GetAuthor :one
SELECT * FROM authors
WHERE id = $1 LIMIT 1;

The existing syntax will continue to work, but it will be an error to use both
annotations on a single query.
-- INVALID!
-- name: GetAuthor :one
-- @name GetAuthor :one
SELECT * FROM authors
WHERE id = $1 LIMIT 1;

Query command
Today, queries must have a name and a command. With the new syntax, the
command option will default to exec.
-- These two annotations are the same

-- @name DeleteAuthor :exec
DELETE FROM authors
WHERE id = $1;

-- @name DeleteAuthor
DELETE FROM authors
WHERE id = $1;

Validation
sqlc will delegate command validation to codegen plugins, allowing plugins to implement new commands without having
to merge anything into sqlc.
If you want to still validate those, you can simulate the current behavior by
using this vet rule.
rules:
  - name: validate-command
    rule: |
      !(query.cmd in ["exec", "one", "many", "execrows", "execlastid", "execresult", "batchone", "batchmany", "batchexec"])

Type annotations for query parameters
The @param annotation supports passing type information without having to use
a cast.
-- @param name type

Casts are required today when sqlc infers an incorrect type, but these
casts are passed down to the engine itself, possibly hurting performance.
For example, this cast is required to get sqlc working correctly, but isn't needed at runtime.
-- @name ListAuthorsByIDs :many
SELECT * FROM authors
WHERE id = ANY(@ids::bigint[]);

Here's what it looks like with the new syntax. The type annotation is
engine-specific and is the same that you'd pass to CAST or CREATE TABLE.
-- @name ListAuthorsByIDs :many
-- @param ids BIGINT[] NOT NULL
SELECT * FROM authors
WHERE id = ANY(@ids);

If a paramater has a type annotation, that will be used instead of inferring the
type from the query.
NULL values
Types in annotations are NULL by default, matching behavior in column definitions and SQL function definitions. If you'd like your parameter to be not null, add the NOT NULL syntax.
-- @name CreateAuthor :one
-- @param name TEXT NOT NULL
-- @param bio TEXT
INSERT INTO authors (
  name, bio
) VALUES (
  @name, @bio
)
RETURNING *;

Positional parameters
If your parameters do not have a given name, use the $n or ?n syntax to add a type annotation.
-- @name CreateAuthor :one
-- @param $1 TEXT NULL
-- @param $2 TEXT NULL
INSERT INTO authors (
  name, bio
) VALUES (
  $1, $2
)
RETURNING *;

-- @name CreateAuthor :one
-- @param ?1 TEXT NULL
-- @param ?2 TEXT NULL
INSERT INTO authors (
  name, bio
) VALUES (
  ?1, ?2
)
RETURNING *;

Why comments?
We're using comments instead of sqlc.* functions to avoid engine-specific parsing issues. For example, we've run into issues with the MySQL parser not support functions in certain parameter locations.
Full example
This is the normal example from the playground using the new syntax.
-- @name GetAuthor :one
-- @param id BIGINT NOT NULL
SELECT * FROM authors
WHERE id = @id LIMIT 1;

-- @name ListAuthors :many
SELECT * FROM authors
ORDER BY name;

-- @name CreateAuthor :one
-- @param name TEXT NOT NULL
-- @param bio TEXT
INSERT INTO authors (
  name, bio
) VALUES (
  @name, @bio
)
RETURNING *;

-- @name GetAuthor
-- @param id BIGINT NOT NULL
DELETE FROM authors
WHERE id = @id;

Future
The plan is to use similar annotations to support type annotations for output columns and values, Go type overrides for parameters and outputs, and JSON unmarshal / marshal hints.

In the named parameter example, I would expect the syntax to be
-- @name CreateAuthor :one
-- @param @name TEXT NOT NULL
-- @param @bio TEXT

so that it's consistent with the $n and ?n treatment. Alternatively we could change the syntax in the numbered parameter cases to remove the $ and ? and just leave the numbers.

I don't like the repetition of the @ character, but agree that the ? and $ syntax feels unnecessary. We shouldn't allow named parameters to start with a number anyways.

Love this. Been type casting params for awhile now, but this is a much cleaner solution imo. :+1:
Does this mean we no longer would need sqlc.narg?

@Emyrk I just update the proposal with a slightly different syntax, which allows for specifying type information without change the nullability of a parameter.

Does this mean we no longer would need sqlc.narg?

Yes, we just added a bit more clarity about that to the proposal.

@kyleconroy @andrewmbenton Would it be okay to use generated model structs in place of query params? By having a syntax like this:
-- @name CreateProduct :one
-- @modelParam Product

or any syntax that hints using model struct as params. I was able to achieve that by applyning new config option called params_struct_overrides in my forked repo. https://github.com/aliml92/sqlc/commit/d38d58a784b40e1c871e9083cf5ae3277a33ad60. Here are the sample codeK

sqlc.yaml:

version: "2"
sql:
  - engine: "postgresql"
    queries: "./db/queries"
    schema: "./db/migrations"
    gen:
      go:
        package: "store"
        sql_package: "pgx/v5"
        out: "./internal/store"

        params_struct_overrides:
        - method_name: CreateProduct
          model_name: Product

models.go

type Product struct {
	ID         int64              `json:"id"`
	StoreID    int32              `json:"store_id"`
	CategoryID int32              `json:"category_id"`
	Name       string             `json:"name"`
	Brand      *string            `json:"brand"`
	Slug       string             `json:"slug"`
	ImageLinks []byte             `json:"image_links"`
	Specs      []byte             `json:"specs"`
	CreatedAt  pgtype.Timestamptz `json:"created_at"`
	UpdatedAt  pgtype.Timestamptz `json:"updated_at"`
}

productcatalog.sql.go

 const createProduct = `-- name: CreateProduct :one
INSERT INTO products
    (store_id, category_id, name, brand, slug, image_links, specs)
VALUES
    ($1, $2, $3, $4, $5, $6, $7)
RETURNING id
`

func (q *Queries) CreateProduct(ctx context.Context, p Product) (int64, error) {
	row := q.db.QueryRow(ctx, createProduct,
		p.StoreID,
		p.CategoryID,
		p.Name,
		p.Brand,
		p.Slug,
		p.ImageLinks,
		p.Specs,
	)
	var id int64
	err := row.Scan(&id)
	return id, err
}

However, enabling such override by type annotations would be much preferable though.

However, enabling such override by type annotations would be much preferable though.

I also have wanted this feature, but there are potentially better ways to solve this (eg sqlc.embed as an example).
My fear of overrides is you lose some of the power of sqlc, which is making sure the models always match the query. If custom models are supported, is there anyway to add some "linting" or something that would warn the user when a new column is added and their custom model does not have it?
The query has all selected columns, so that would be possible. Just food for thought that custom structs might want some additional support to keep them "in line" with the sql.

:+1: again for this. Would be really helpful alongside type overrides for some edge case stuff. Currently trying to get tuples to work as parameters


#131 -- Add feedback mechanism for the Technical Guidelines Documentation theme

This updates the documentation theme footer with a feedback button that is styled to match the font and colour of the current theme.

@john-shepherdson  Very good question. I just checked, and at least the CVS and CDC user guides use that as a gem source. If this is approved,  all the documentation that uses this gem will have a feedback form, and any feedback inquiries will go to the "CESSDA Platform " in the Helpdesk.

CESSDA Platform queue will be be OK.

Updated @john-shepherdson requires your approval


Failed to change kernel

Issue Type: Bug
Launch ADS
Create an ADS notebook with PowerShell kernel and add some code/text cells
Change kernel to Python.
run into error.
Azure Data Studio version: azuredatastudio 1.35.1 (fab63efd307e54c063c8af03474bbb5d77f5fd11, 2022-03-15T18:03:38.261Z)
OS version: Windows_NT x64 10.0.22581
Restricted Mode: No

System Info

Item
Value

CPUs
Intel(R) Xeon(R) W-2235 CPU @ 3.80GHz (12 x 3792)

GPU Status
2d_canvas: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onoop_rasterization: enabledopengl: enabled_onrasterization: enabledskia_renderer: enabled_onvideo_decode: enabledvulkan: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
63.59GB (53.36GB free)

Process Argv

Screen Reader
no

VM
0%

Extensions (2)

Extension
Author (truncated)
Version

arc
Mic
1.0.0

azcli
Mic
1.0.0

What version of python are you using? Is our provided package, or is it something installed separately like Anaconda?

Closing due to no repro.


Invalid code sample

The "Basic" code sample on this page does not compile when copied to Power Query (in either Excel or Power BI). It flags a Token Eof expected on the shared keyword in line 2.

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

ID: 8a834875-02f7-683d-5845-618a5d02d888
Version Independent ID: 36b3e58d-e580-a9fd-4239-7d51b24fdeb6
Content: Adding function documentation - Power Query
Content Source: powerquery-docs/handling-documentation.md
Service: powerquery
GitHub Login: @ptyx507x
Microsoft Alias: miescobar

Just to follow up on this... I am starting to think that this code sample is dependent on a specific project.  I would FAR prefer to see something that shows a standalone example which doesn't require a specific sample file to work.  Something that shows how to add a simple description to a custom function (maybe just add two numbers) and provide documentation for the input fields.

Hi @kpuls
Thanks for your dedication to our documentation. Unfortunately, at this time we have been unable to review your issue in a timely manner and we sincerely apologize for the delayed response. We are closing this issue for now, but if you feel that it's still a concern, please respond and let us know. If you determine another possible update to our documentation, please don't hesitate to reach out again. #please-close


Fix unallocated array and T-cell lat/lon calc.

Brief description
Fix unallocated array, Loop index for area_t calculation, and T-cell lat/lon calculation for MOM6-LETKF ifdef DYNAMIC
Features added

Add config files for ESSIC server: measures1.umd.edu, and a script to create config template files

Bugs fixed

Allocate missing vars ifdef DYNAMIC
Correct loop index for area_t calculation
Fix calculation of lat/lon of T-cells from supergrids x,y
Increase character length of file and vars names for flexibility

Test changes
N/A
Documentation changes
N/A
Does this create a breaking change?
N/A

@cd10kfsu After the comments are addressed, I'll merge this PR. But in the future I think it would be good to break up the modifications for each individual bug and any new features that are added into separate PR's.

@cd10kfsu Also, please reference the tag for issue #130 so it closes out when this PR is merged.

@cd10kfsu After the comments are addressed, I'll merge this PR. But in the future I think it would be good to break up the modifications for each individual bug and any new features that are added into separate PR's.

Thanks @StevePny. I will separate the bug fixes and new features, and then require a separate PR.
Please ignore this one.

Replace this PR with PR #132, which only performs the bugfix for MOM6-LETKF ifdef DYNAMIC (issue #130)


Docs restructuring and minor edits

Docs preview: https://docs-staging.improbable.io/metagame/0.1.0/index
Summary of changes:

started using “Deployment Pool” (both with caps) throughout, for consistency with “Gateway” and “PlayFab Auth”
added “(including matchmaking)” to “Gateway” in table of contents and page heading
drastically edited the quickstart intro page so that it only contains the stuff that’s different from the setup page, to avoid duplication (and it now links out to the setup page as a starting point)
tidied up setup page a bit
moved the “Deployment Pool” docs into "Services & packages" following discussion with Joel
updated "Services & packages" overview to include the Deployment Pool, and also to make some wording changes after discussions with @petemounce about "services"
changed "Integrations" to "Worker integrations"
“Configuration examples” section now just has an overview and nothing else - not sure if this is a good plan or not
small changes to do with consistency, typos, etc.
some reshuffling of folders and file locations

Thanks @rebekahmullen @JoelOtter for such quick reviews! :)
Once you've approved, I'll merge, and then attempt a docs publish... 🤞
The only thing we haven't confirmed is the bit that needs marketing input (https://github.com/spatialos/online-services/pull/129#discussion_r337579628) but we can follow that up later.

@JoelOtter I've incorporated as much feedback as possible, and have updated the docs preview so that the link at the top should show the updates.


Make the LCT SECIR model a derived class of FlowModel

Motivation / Current Behaviour
Currently the LCT model is not derived from a class. The functionality is similar to the FlowModel.
Also the files memilio/compartments/simulation.h for the CompartmentalModel and models/lct_secir/simulation.h for the LCT model do exactly the same.
Both types of model should be combined.
Enhancement description
It should be no problem to make the LCT SECIR model a derived class of FlowModel to have a consistent project structure.
Additional context
For example: m_initial_values is used exactly like mio::CompartmentalModel::populations. If you want to, you could change its type to mio::Population, make the member public and rename it, so the models have more similar interface.
Originally posted by @reneSchm in https://github.com/SciCompMod/memilio/pull/941#discussion_r1502307064
Checklist

[X] Attached labels, especially loc:: or model:: labels.
[X] Linked to project

The problem with the implemented approach was that CompartmentalModel needs a class derived from Populations for Pop. The logic would be to pass the LctInfectionState class to Populations.  However, Populations inherits from CustomIndexArray, so LctInfectionState is the "Tags" of CustomIndexArray. Using LctInfectionState as CustomIndexArray does not currently work.

You can maybe try and specialize Index? IIRC, CustomIndexArray never instantiates the Tags directly, only an Index for each Tag.


syslog: syslog_device ops are handled internally by the driver.

Summary
This commit mostly simplifies the usage of syslog_device.
syslog_dev_initialize() now provides a completely initialized and properly working channel, in contrast to the previous implementation were the sc_ops had to be set externally.
The addition of syslog_dev_force() reduces code duplication, as a default function is now provided for all channels to use.
Impact
None.
Testing
Builds and logs correctly.
File logger was mostly tested.

One question regarding this.
In file nuttx/drivers/syslog/syslog_consolechannel.c there is the function syslog_console_force().
This function makes the assumption that /dev/console/ is always the same device with up_putc().
Is this a correct assumption, for all cases? Or maybe the default syslog_dev_force() shall also be used here?

One question regarding this.
In file nuttx/drivers/syslog/syslog_consolechannel.c there is the function syslog_console_force().
This function makes the assumption that /dev/console/ is always the same device with up_putc().
Is this a correct assumption, for all cases? Or maybe the default syslog_dev_force() shall also be used here?

It's not always true.

One question regarding this.
In file nuttx/drivers/syslog/syslog_consolechannel.c there is the function syslog_console_force().
This function makes the assumption that /dev/console/ is always the same device with up_putc().
Is this a correct assumption, for all cases? Or maybe the default syslog_dev_force() shall also be used here?

It's not always true.

So syslog_console_force() seems wrong. It may output on the wrong device.
I think I will remove it.
I didn't notice that syslog_dev_putc() handles newlines.
Indeed syslog_devchan_putc() can be removed.
Provided that both the above functions are removed, all syslog_dev_xxx() functions can be private, and I will do so.

Hmm, is CONFIG_SYSLOG_WRITE actually useful anymore?
Now that there can be multiple channels, the user may easily want to create a new custom channel, that may use sc_write.
I think this is to be removed too, as it forces you to enable a possibly unrelated channel (e.g. file logger), to gain access to the write method, and the syslog buffering.

I think so, it's better to enforce all driver support sc_write method and drop sc_putc.

@xiaoxiang781216 I realized another issue with syslog_device driver.
In case of failure, the device is re-opened only during initialization. Not on subsequent failures.
I am now preparing the changes for this.
Do you want me to add these to this PR, or a new one should be created?

If the problem is made by the current patch, let's fix it in this patch. If it's new problem, the new patch is better.

If the problem is made by the current patch, let's fix it in this patch. If it's new problem, the new patch is better.

No, it is not caused by this. The issue is related to the existing behavior of the driver, that can be improved.
So please, merge this, and I will submit the new one today.


Type addition request : Chinese

Please add types relevant to Chinese languages.  Should be a couple, Chinese - Mandarin, Chinese - Cantonese & Chinese - Taiwan.  Recently attended PRAASA And one of the panels was translated into Chinese and the speaker indicated that their home group was local to their location in USA.  So, occurred to me that we should have minimally @ least 1 reference to Chinese - but thought I'd request the big 3.

Let's not accept languages as a type going forward in future specifications. Language is not a meeting type, rather it is part of the meeting culture and social situation; in a vast majority of cases, the language for a meeting is correctly determined by the site's configuration and physical location.
I suggest transferring your broader proposal about handling meetings as a separate data type over here to help start a discussion with GSO.
I'm going to close this issue in favor of what we've discussed on the TSML page.
And reminder, for the near term, any group can add languages (or anything else) as types for their website.
Thanks.


using the plugin as is fails

is this repo still under maintenance?

Not sure but what do you need?

We had some issues running the plugin against certain use cases and cassandra versions
It also does not conform to the new LS APIs from what we could see
We've created a new version you can see here: https://github.com/eladamitpxi/logstash-output-cassandra/tree/dev-logstash2 which we would like to publish as a gem and get pulled into the main logstash repo

any thoughts on the branch?
any reason why you never submitted your plugin version?

Hi @eladamitpxi
Thank you for picking up the plugin!
Im really sorry that i cannot take a part in its maintenance these days.

our pleasure :)
would love to hear any thoughts you may have if you get around to giving the branch a look over
we plan on pushing it as a gem and to the general logstash repo as well
is there anyone else you would like to add to the contributor file?

Contributors, hmm... may be @valentinul could be mentioned who was the first who marked this repo with a star and that was quite inspiring :)

cool, will add that, let me know if you have any further thoughts on this version

@eladamitpxi, I have used your fork, and you have added a feature like here:
The table to use (event level processing (e.g. %{[key]}) is supported)
table => "%{[@metadata][cassandra_table]}"
What do you mean by "%{[key]} is supported" ? Would you please give me an example for using this feature? and ,finally, do you create the table automatically?


When docker-machine env instance fails, exit code should be 1

docker-machine env this-instance-doesnt-exist
Docker machine "this-instance-doesnt-exist" does not exist. Use "docker-machine ls" to list machines. Use "docker-machine create" to add a new one.
echo $?
0

Since we thought we had the same problem, this works fine for me:
Or maybe
$ eval $(docker-machine env does-not-exist || echo "false") && echo ok || echo nope
Docker machine "does-not-exist" does not exist. Use "docker-machine ls" to list machines. Use "docker-machine create" to add a new one.
nope

eval $(docker-machine env default || echo "false") && echo ok || echo nope
Error checking TLS connection: Host is not running
nope

And it works with a running machine, too:
$ eval $(docker-machine env default || echo "false") && echo ok || echo nope
ok
$ env|grep DOCKER_MACHINE_NAME
DOCKER_MACHINE_NAME=default

Or if you prefer, this works, too:
$ docker-machine env does-not-exist && eval $(docker-machine env does-not-exist) && echo okay || echo nope
Docker machine "does-not-exist" does not exist. Use "docker-machine ls" to list machines. Use "docker-machine create" to add a new one.
nope


'urlqoute' now deprecated in Django 4.0

ImportError: cannot import name 'urlquote' from 'django.utils.http'
This has been deprecated in Django 4.0,

You can use my fork for now, it has a fix https://github.com/cyberbudy/django-subadmin.
I guess project is not maintained.

Hey,
I just merged a patch from @cyberbudy and will make a new pypi release in a couple if days.
The project is not unmaintained, just we use in on some large deployments and it takes a while for them to upgrade the latest and gratest django release and it is otherwise feature complete, as far as our needs go.

Great!

Hi @sect2k, any news about the package publication to pypi?

Hello,  I am also interested in when this release will be available on PyPi.

¿Alguien sabe cuando aceptarán este cambio?

Sorry it took so long, but life gets in the way sometimes.


Hide Naga Info Logs

What problem does this solve or what need does it fill?
Currently Naga prints noisy / unhelpful messages to the console (ex: "skip function X") for the Bevy PBR shaders:

These aren't really relevant to Bevy users.
What solution would you like?
Hide Naga info logs by default. This can be done in the bevy_log crate by adding a "naga=warn" entry to the default LogPlugin::filter config.

I was curious if this would cause us to lose some important logs, but it looks like the only info logs in naga are about skipping stuff. So we aren't losing anything by going to warn level.


Allow skipping fields/variants via target_os argument

When defining types you may not want to typeshare all types/fields/variants to all target platforms. Rust allows you to restrict  definitions via the #[cfg(target_os = "platform"] macro.
This PR allows typeshare to run with an optional command line argument --target-os. When checking for what fields/variants to skip, typeshare will see if this argument is set and compare check if it matches any #[cfg(target_os)] attributes. If the argument and attribute target do not match then it will be skipped. Similar to #[typeshare(skip)] but based on the --target-os argument not matching.
Full file skipping is supported as well when using #![cfg(target_os = "platform_os")] as well. Not supported yet is attributes on mod declarations.
See snapshot test in core/data/tests/excluded_by_target_os.
This is a possible solution for https://github.com/1Password/typeshare/issues/63

This has been released as part of 1.10.0-beta.6 on crates.io.


Installing subversion17 with python bindings fails under 10.10

$ brew install subversion17 --with-python
==> Installing subversion17 from homebrew/homebrew-versions
==> Downloading https://archive.apache.org/dist/subversion/subversion-1.7.14.tar.bz2
Already downloaded: /Library/Caches/Homebrew/subversion17-1.7.14.tar.bz2
==> Downloading https://serf.googlecode.com/files/serf-1.3.3.tar.bz2
Already downloaded: /Library/Caches/Homebrew/subversion17--serf-1.3.3.tar.bz2
==> /usr/local/opt/scons/bin/scons PREFIX=/usr/local/Cellar/subversion17/1.7.14_1/libexec/serf GSSAPI=/usr CC=/usr/bin/clang CFLAGS=-Os -w -pipe -march=native -mmacosx-version-min=10.
==> /usr/local/opt/scons/bin/scons install
==> ./configure --prefix=/usr/local/Cellar/subversion17/1.7.14_1 --with-zlib=/usr --with-sqlite=/usr/local/opt/sqlite --with-ssl=/usr/local/opt/openssl --with-serf=/usr/local/Cellar/s
==> make
==> make install
==> make tools
==> make install-tools
==> make swig-py
ld: warning: ignoring file /usr/local/opt/sqlite/lib/libsqlite3.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/opt/sqlite/lib/libsqlite3.dylib
ld: warning: ignoring file /usr/local/Cellar/apr/1.5.1/libexec/lib/libapr-1.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/Cellar/apr/1.5.1/libexec/lib/libapr-1.dylib
ld: in '/usr/local/opt/sqlite/lib/libsqlite3.dylib', file was built for x86_64 which is not the architecture being linked (i386): /usr/local/opt/sqlite/lib/libsqlite3.dylib for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [subversion/bindings/swig/python/_core.la] Error 1

brew gist-logs subversion17 please.

https://gist.github.com/349206663792c7818616
I figured out what the problem was. Subversion 1.7 is built with the homebrew provided sqlite. When build with --with-python sqlite is required to be universal. Homebrew does not build sqlite as a universal binary when it is installed as a side-effect of installing Subversion 1.7.

Odd. I don't think I've seen that reported before. Presumably tacking on brew install subversion17 --with-python --universal resolves the build problem?

I did a manual reinstall of sqlite with brew install sqlite --universal followed by brew install subversion17 --universal. That did the trick.

Interesting. That's something we could always note in the formula, that installing with Python requires a universal sqlite. We do a similar notice with Java already. Have we seen this before @Homebrew/owners?

Guessing sqlite needs to be universal iff python is universal; Homebrew python isn't but system python is.

Yeah, we've historically tied the Subversion formulae to Homebrew's Python.
Perhaps we could do something like this?
if build.with "python"
  opoo "You must build subversion17 --universal when building with Python"
end

@tdsmith Thoughts on #779?


Table command tests will break

Laravel Version: 5.8.29
PHP Version: 7.3.7
Database Driver & Version: 8.0

Description:
After the commit 42c19bd tests like these will break:
$this->artisan('command:list')
            ->expectsOutput('+----+------+---------------+')
            ->expectsOutput('| ID | Name | Params        |')
            ->expectsOutput('+----+------+---------------+')
            ->expectsOutput('| 1  | Test | {"foo":"bar"} |')
            ->expectsOutput('+----+------+---------------+')
            ->assertExitCode(0);

Steps To Reproduce:
Write a test for a command, which expects a table output:
$this->artisan('command:list')
            ->expectsOutput('+----+------+---------------+')
            ->expectsOutput('| ID | Name | Params        |')
            ->expectsOutput('+----+------+---------------+')
            ->expectsOutput('| 1  | Test | {"foo":"bar"} |')
            ->expectsOutput('+----+------+---------------+')
            ->assertExitCode(0);

Can you provide the command:list code as well?

Command Example:
use Illuminate\Console\Command;

class ListCommand extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'command:list';

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        $this->table(['ID', 'Name', 'Params'], [
            [1, 'Test', '{"foo":"bar"}'],
        ]);
    }
}

I can indeed reproduce this. From what I can tell it's probably best to revert it but that'll break the new behavior again.

This doesn't only affect table command tests, but other 'ordered' expected outputs as well.
We are facing a problem with commands tests after https://github.com/laravel/framework/commit/42c19bd4482ef1c2f850851cf607badeff111a8d .
In our case it's a question that is being asked in a loop, so it can appear more than once in the output, but when the question is being expected for the second time, the test breaks.
 $this->artisan('create:admin')
            ->expectsQuestion('Please provide name for your admin.', 'first')
            ->expectsOutput("Admin with 'first' name successfully created. Admin ID: 1")
            ->expectsQuestion('Would you like to create another admin?', true)
            ->expectsQuestion('Please provide name for your admin.', 'second')
            ->expectsOutput("Admin with 'second' name successfully created. Admin ID: 2")
            ->expectsQuestion('Would you like to create another admin?', false)
            ->assertExitCode(0);

So here the second 'Please provide name for your admin' will break the code due to mockery error:
Method Mockery_1_Illuminate_Console_OutputStyle::askQuestion(<Closure===true>)() called out of order: expected order 1, was 2

@prwnr can you try with the patch provided by mohamed and let us know if that fixes your issues? https://github.com/laravel/framework/pull/29580

@driesvints works fine with my tests as it was working with v5.8.29
I did additional test with the same question being asked 3 times, works regardless of how many times same question appears.

Mohamed's PR was merged and will be in the next minor release for Laravel.


Need fixed or add more option for multi restaurant sync section [$15]

There is a $15 open bounty on this issue. Add to the bounty at Bountysource.

Clarify please what kind of options should be added?

i have submit but it gone away. let me do it again

The current one workflow like:
client come to (table 1) ask for order
first waiter come and take order -> it print to kitchen
client in (table 1) ask for order more
second order come and take order - > system cancel all the old order and preprint again all old & new order (it make me confuse even i work from tourism before)
so the simple way is:
client come to restaurant table
first waiter come & take order -> print to kitchen
client ask order more
second order come & take order -> printing just new order to kitchen
That all

i can sponsor 40$ if you fixed that in quick. plz sent me payment info

Hello i have limit paypal account do you have other payment method?

it ask payment here: https://www.bountysource.com/issues/46833053-need-fixed-or-add-more-option-for-multi-restaurant-sync-section?utm_campaign=plugin&utm_content=tracker%2F2289114&utm_medium=issues&utm_source=github
but i dont have paypal & bitcoin

@W360S @yelizariev Hello I confirm the issue :

waiter1 takes add items for table1 and print kitchen ticket
waiter2 adds new items for table1 and print kitchen ticket
Actual Behavior :
the second ticket prints "cancelled" first items and "new" first items + new second items
Expected Behavior :
the second ticket should print only "new" second items

Is it for odoo.10?

Yeap im running v10

@W360S It should be fixed now. Try latest version.
Thank you for contribution

@invitu you are welcome to try latest version too

yeap thanks for your help :) do you have other payment method? as i said i can sponsor for this :)

@W360S contact us at<EMAIL_ADDRESS>

ok sure


Parameter-Validation example error 'stoi' is not a member of 'std'

Goal: Compile the example included called Parameter-Validation.
After changing the network login information, the compile process gives the following error:
'stoi' is not a member of 'std'
ESP32 Module
Standard Doit
Software (please complete the following information if applicable)
Arduino ide
Wondering if I am missing a library.  I tried string.h but that did not help.
Regards,
BCGuy

That got it working.
Thank you

Thank you for your prompt and professional response.  This is my first
interaction with Github and it appears to me that I should not have
hesitated.
Kind regards,
BCGuy
On Tue, Feb 2, 2021 at 2:30 PM Frank Hessel<EMAIL_ADDRESS>wrote:

Hi, thanks for your report! I can reproduce that for the Arduino IDE as
well as for PlatformIO.
The problem here is that the version of the C++ standard library shipped
with the Arduino Core for the ESP32 does not define _GLIBCXX_USE_C99,
which results in having only limited access to functions like std::stoi
or std::stoul (you'll get the same error for stoul when you fix the other
one).
Getting these functions running within the Arduino IDE won't make fun, and
even though it's easier in PIO, it might have a lot of undesired side
effects.
So what I'd suggest would be using the internal util functions from this
library:
// Change the line in handleSwitch:
LED * led = &myLEDs[parseUInt(params->getPathParameter(0))];
// Rewrite validateLEDID as follows:bool validateLEDID(std::string s) {
uint32_t id = parseUInt(s, 0xffffffff); // convert to number (failure will give 0, or 0xffffffff if number is too big)
return id < LEDCOUNT && (id != 0 || s=="0"); // check that LEDCOUNT isn't exceeded, and if we have a 0, make sure it isn't caused by a failure.
}
I'll leave this issue open as long as the example isn't fixed. I'm not
really happy with the implementation of the additional checks in the second
function...
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/fhessel/esp32_https_server/issues/115#issuecomment-772054567,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AI2RIZJ4XTGC6QVQ5DH4TUTS5B4IZANCNFSM4W7ORXXA
.


Update README.md

Parse JSON before using.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Implement yr_scanner_scan_mem_blocks()-based io.Reader scanning interface?

As per the title, would it be possible to provide a scanning interface that accepts an io.Reader. The implementation could be based on a streaming interface by implementing the YR_MEMORY_BLOCK_ITERATOR* parameter for yr_scanner_scan_mem_block()?
With an io.Reader it'd be much easier to integrate go-yara in a clean and Go-like manner. Unless I missed something of course - happy to hear about alternatives (currently I believe there's either ScanMem(), which takes a singular []byte, ScanFile, which takes a filename, and ScanFileDescriptor, which takes a fd) :-)

I believe that this should be doable. and would be quite useful Thank you for the suggestion.

@jbremer Please have a look at branch scan-mem-blocks which I just pushed.

Very interesting, thank you for your work @hillu :-)
Built the following PoC, seems to work very well.
package main

import (
	"flag"
	"fmt"
	"io"
	"log"
	"os"

	"github.com/hillu/go-yara"
)

type Scan struct {
	offset int
	buf    []byte
	length int
	r      io.Reader
}

func (s *Scan) copy(buf []byte) {
	copy(buf, s.buf[:s.length])
}

func (s *Scan) First() *yara.MemoryBlock {
	return s.Next()
}

func (s *Scan) Next() *yara.MemoryBlock {
	n, err := s.r.Read(s.buf)
	if err != nil {
		return nil
	}
	s.offset += n
	s.length = n
	return &yara.MemoryBlock{
		Base:      uint64(s.offset - n),
		Size:      uint64(n),
		FetchData: s.copy,
	}
}

func scan(r *yara.Rules, f io.Reader) (yara.MatchRules, error) {
	var s Scan
	s.r = f
	s.buf = make([]byte, 0x10000)
	var mrs yara.MatchRules
	err := r.ScanMemBlocksWithCallback(&s, 0, 0, &mrs)
	return mrs, err
}

func main() {
	flag.Parse()
	f, err := os.Open(flag.Arg(0))
	if err != nil {
		log.Fatalln("error:", err)
	}
	defer f.Close()

	rs := yara.MustCompile(`
rule A {
	strings:
		$a = "abc"
		$b = "def"
	condition:
		all of them
}
	`, nil)

	mrs, err := scan(rs, f)
	if err != nil {
		fmt.Println("err:", err)
	}
	for _, rule := range mrs {
		fmt.Println("match:", rule)
	}
}

@jbremer For the general case, you'll find that you need an io.Reader that can be reset to the start of the file, otherwise simple rules such as rule B { condition: uint32(0) == 0 } won't work because YARA will read from the iterator again as it evaluates the conditions. Replacing the Reader in your example with a ReadSeeker and modifying the First method accordingly was enough for my test.
In any case, if you like the general interface and think that the functionality is solid, I'll be happy to merge it.

Thanks. Yes, in that case a ReadSeeker should definitely do the job.
Excellent! Yeah, this interface is looking good to me. Please feel free to merge it :-)

Small update, sample code implementing what you described:
package main

import (
	"flag"
	"fmt"
	"io"
	"log"
	"os"

	"github.com/hillu/go-yara"
)

type Scan struct {
	offset int
	buf    []byte
	length int
	r      io.ReadSeeker
}

func (s *Scan) copy(buf []byte) {
	copy(buf, s.buf[:s.length])
}

func (s *Scan) First() *yara.MemoryBlock {
	s.offset = 0
	s.r.Seek(0, io.SeekStart)
	return s.Next()
}

func (s *Scan) Next() *yara.MemoryBlock {
	n, err := s.r.Read(s.buf)
	if err != nil {
		return nil
	}
	s.offset += n
	s.length = n
	return &yara.MemoryBlock{
		Base:      uint64(s.offset - n),
		Size:      uint64(n),
		FetchData: s.copy,
	}
}

func scan(r *yara.Rules, f io.ReadSeeker) (yara.MatchRules, error) {
	var s Scan
	s.r = f
	s.buf = make([]byte, 0x10000)
	var mrs yara.MatchRules
	err := r.ScanMemBlocksWithCallback(&s, 0, 0, &mrs)
	return mrs, err
}

func main() {
	flag.Parse()
	f, err := os.Open(flag.Arg(0))
	if err != nil {
		log.Fatalln("error:", err)
	}
	defer f.Close()

	rs := yara.MustCompile(`
rule A {
	strings:
		$s1 = "abc"
		$s2 = "def"
	condition:
		uint8(0) == 0x7f and all of ($s*)
}
	`, nil)

	mrs, err := scan(rs, f)
	if err != nil {
		fmt.Println("err:", err)
	}
	for _, rule := range mrs {
		fmt.Println("match:", rule)
	}
}

Hi @hillu, would it be possible to squeeze in one improvement still: namely that of being able to pass a []byte slice to the MemoryBlockIterator struct such that the user can 1) define the buffer size 2) the additional copy(...) and malloc/realloc isn't necessary, essentially making it zero-copy.

Hmm, changing the last part of the PoC to:

I had also noticed the base / offset issue, but had not looked further into it.
I'll add (*Match).Base(), exposing the base field from YR_MATCH.

@jbremer Unfortunately, we can't do without the malloc-backed buffer because the Go runtime will panic if we return a pointer to Go-allocated memory to C land. That being said, we can do with just one copy if we stick to the YR_MEMROY_BLOCK_ITERATOR logic and only do seek operations in the First() and Next() methods.
I have opened a pull request containing some example/test code demonstrating this. Let's use that PR to discuss any remaining issues.

Since I have merged #62, this can be closed. Thanks for the constructive discussion. :-)


TC SEARCHING BAR - Performance testing for the searching bar

Description : Verify the performance of the results when searching a company
Preconditions : the website is up and running

step1: go to the companii section of the validator
expected results : in the section, the searching bar is displayed

step 2: type the name of a company .
expected results : the searching bar is functional and the typing is allowed


[Feature Request] Wanted Global Gaia Theme has a template theme of white background.

I am fond of the theme of Gaia,  but when I insert a image with white background the template both <!-- *template: invert --> and <!-- *template: default --> seems not well.

I prefer that The Gaia theme has a template of white background like this <!-- *template: white -->        to meet such needs.

You can use inline style as a workaround.
<!--
$theme: gaia
*template: white
-->

<style>
.slide_wrapper[data-template="white"] .slide {
  background: #fff !important;
}
</style>

In Marp Next, we have backgroundColor directive to support changing background color directly (came from Marpit framework). The below example would receive the same result in future.
<!-- _backgroundColor: white -->

_ works as same as * in current Marp.


Reduce and fine-tune regression threshhold

This is a meta issue to track all noise and threshold issues on benchmarking

[ ] Noisy compilation time metric

[ ] Reduce the noise by tuning the parallelism on module compilation

[ ] Fine-tune x86_64 and ARMv8 regression thresholds

Duplicated to #12330


prevent dismiss modal before allowing all permissions

Describe the solution you'd like
A clear and concise description of what you want to happen.
I need to prevent user from dismissing modal view before allowing all permissions.

@jevonmao adding error haptic is so great. It improves the UI/UX so great.
About denying some permissions, we can pass the permission windows if the user has decided about all permissions needed (Allow or Deny). If denied, the user can be prompted again during the app to allow that permission.

@gharary Sounds good! Stay tuned, this feature should be done within this week. 🙌

@gharary Done. Please make sure your package is on the newest version, reference here if needed.

The haptic error still needs work (because SwiftUI does not offer a native way to react to a dismiss gesture), and it will take a while before I figure out the UIKit stuff underneath.

So wonderful to see those changes soo quick. 👏


Add health check for RB/CRB

Signed-off-by: chaunceyjiang<EMAIL_ADDRESS>What type of PR is this?
/kind cleanup

What this PR does / why we need it:
Add health check for RB/CRB
Which issue(s) this PR fixes:
Fixes https://github.com/karmada-io/karmada/issues/2464
Special notes for your reviewer:

/lgtm


Implementing CNN as unsupervised learning using FFA

Hello, I tried creating CNNBuildOperation, ConvBNReLU, ConvFFLayer and CNNForwardForwardTrainer where I trained CNN via KMeans clustering. Please let me know what you think!

Hello, I had created a PR regarding hugging face, hence, had to close this. I will reopen this with the same title. Sorry for the inconvenience.


Won't compile throwing errors about graceful-fs and node-localstorage

Versions
Angular CLI: 6.0.0
Node: 8.11.1
OS: darwin x64
Angular: 6.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.6.0
@angular-devkit/build-angular     0.6.0
@angular-devkit/build-optimizer   0.6.0
@angular-devkit/core              0.6.0
@angular-devkit/schematics        0.6.0
@ngtools/webpack                  6.0.0
@schematics/angular               0.6.0
@schematics/update                0.6.0
rxjs                              6.1.0
typescript                        2.7.2
webpack                           4.6.0

Repro steps

Update from Angular 5 to 6 using ng update following official docs
Run ng serve

Observed behavior
** Angular Live Development Server is listening on localhost: 4200, open your browser on http://localhost:4200/ **
                                                                              u Date: 2018-05-08T15:54:59.281Z
Hash: da671adf478a1eedee6e
Time: 10345ms
chunk {main} main.js, main.js.map (main) 74.1 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 227 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 5.4 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 59.7 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 4.86 MB [initial] [rendered]

ERROR in ./node_modules/graceful-fs/polyfills.js
Module not found: Error: Can't resolve 'constants' in '/Users/joe/projects/verado/node_modules/graceful-fs'
ERROR in ./node_modules/graceful-fs/graceful-fs.js
Module not found: Error: Can't resolve 'fs' in '/Users/joe/projects/verado/node_modules/graceful-fs'
ERROR in ./node_modules/graceful-fs/fs.js
Module not found: Error: Can't resolve 'fs' in '/Users/joe/projects/verado/node_modules/graceful-fs'
ERROR in ./node_modules/node-localstorage/LocalStorage.js
Module not found: Error: Can't resolve 'fs' in '/Users/joe/projects/verado/node_modules/node-localstorage'
ERROR in ./node_modules/node-localstorage/LocalStorage.js
Module not found: Error: Can't resolve 'path' in '/Users/joe/projects/verado/node_modules/node-localstorage'
ERROR in ./node_modules/graceful-fs/legacy-streams.js
Module not found: Error: Can't resolve 'stream' in '/Users/joe/projects/verado/node_modules/graceful-fs'
ℹ ｢wdm｣: Failed to compile.

Desired behavior
It should compile successfully
Mention any other details that might be useful (optional)
I am currently talking with @SanderElias and both agree this is a cli issue as I don't have any external deps that use graceful-fs or node-localstorage

Closing as this has been resolved offline.

As an addendum, the source of the problem came out of an API that loaded a node library. This was working in the previous version, but the new version doesn't support the node globals anymore, because those can lead to hard to trace problems.
We agreed that the CLI could have provided a better error message, so it would be easier to find the real problem that is causing this issue.

I'm getting the same error. Is there a fix for this?

Closing as this has been resolved offline.

If you solved offline how we could know the solution!!!

see the next comment in the thread: https://github.com/angular/angular-cli/issues/10730#issuecomment-387818455
If you are getting these errors, the application is trying to use a node library in a web application.  If a library is not designed to be cross platform (a browser and node are different platforms that happen to share a language), then it shouldn't be used outside its chosen platform.

I didn't understand what should i exactly do to solve the problem.

@ali-hasani Check your 3rth party libraries, Probably one of those is not suited to work in the browser. Contact the vendors of those libraries to get a solution.
Or declare the needed globals as properties of the windows object, you might add that to the polyfills. .ts. The exact solution is highly depended on what you want to link in.


Change to dynamically use the TagResource API

Fix https://github.com/Azure/autorest.csharp/issues/2525
There are some environments like AzureStack which do not have the TagResource deployed.  In these cases we need to fall back to use the PATCH/PUT methods for updating the tags for a given resource.  The benefit to TagResource is it utilizes either the TagResource permission OR the write permission on the resource where as PATCH/PUT only works with write permission on the resource.
This change dynamically checks to see if the TagResource API is deployed in the current environment and switches which implementation it uses for manipulating tags.  I also added an override in the options, if we don't want this we will need to find a way to override this at runtime in the test cases to test both cases.
Contributing to the Azure SDK
Please see our CONTRIBUTING.md if you are not familiar with contributing to this repository or have questions.
For specific information about pull request etiquette and best practices, see this section.

API change check
APIView has identified API level changes in this PR and created following API reviews.
Azure.ResourceManager

@m-nash this change is killing our machine pool because it is touching so many files which trigger all the pipelines. Every time a new commit is pushed we are requesting about 1000 agents which is backing up everything else trying to run. Can you please avoid pushing a lot of commits and only push when everything is complete? Also in the future if you are going to have a large change that touches all these files please reach out to EngSys first so we can come up with a plan to best handle this load.

@weshaggard spoke offline to come up with strategies on how to remove duplicate runs given the base library resourcemanager now runs all tests from all dependencies.
@ArthurMa1978  FYI

changes were merged in here https://github.com/Azure/azure-sdk-for-net/commit/49d50b33ccb348eb665cb3e27428ad095e09b449


An error occurs in epoch_to_timestamp: multiply with overflow.

The epoch_to_timestamp function can handle time units from seconds to nanoseconds.
As explained in the documentation below, the range for nanoseconds is between 1677-09-21T00:12:43.145224192 and 2262-04-11T23:47:16.854775807:
https://docs.rs/chrono/latest/chrono/struct.DateTime.html#method.timestamp_nanos_opt
Inside the function, all values are forcibly converted to nanoseconds for processing. If a value is input that cannot be converted to nanoseconds (i.e., the computed value exceeds the i64 range), a multiply with overflow error occurs in debug mode. In release mode, this error is ignored, leading to incorrect calculations due to overflow.
Therefore, it seems necessary to handle inputs differently depending on their scale.
Below is test code to reproduce the error:
let overflow_time = DateTime::parse_from_rfc3339("1600-06-18T23:12:44.000Z").unwrap();
let time = epoch_to_timestamp::<1_000_000>(overflow_time.timestamp_micros());
println!("{:?}", time);

// Release output:
// Timestamp { year: 1715, month: 11, day: 28, hour: 23, minute: 38, second: 10, fraction: 290448384 }

Hello @yjhong79 ,
thanks for reporting the bug!
Yeah indeed, I think you are correct. Luckily so far no one seems to work in a domain which requires dating historical artifacts with nanoseconds precision 😁 .
I'll handle it, but I am pretty swamped until the end of the month.
Best, Markus

Hello @yjhong79 ,
thanks again for reporting the bug. arrow-odbc 13.0.2 is released with a fix.
Best, Markus


Update grammar script and grammars themselves

[x] All compiled assets are included (atom packages are git tags and hence the built files need to be a part of the source control)

This PR updates the scripts/grammar script to work with the upstream plist files instead of the YAML files as that seems to be the correct way forward according to this:
https://github.com/Microsoft/TypeScript-TmLanguage/issues/333
The script is also now written in Typescript (added ts-node as a dependency) and did some other minor cleanup.

The identifiers are still a little too red for my taste, but idk what's going on with that.
Closes #1112

What is the theme you're currently using? I think it may be theme related.

You are, of course, correct. I'm using One Dark and it has a declaration like this:

I guess the Typescript grammar was pretty bad before and it didn't tag variables as such, that's why the jarring change.
Thanks for all your help. I think I'll merge this and cut a new release.

@guncha @admosity This was a HUGE improvement... especially for React (.tsx) files, thank you!!

@chrissm79 you're welcome!
PSA: This new grammar does seem to break some existing template string highlighting. So for others that want to have some semblance of highlighting you can add the following to your stylesheet:
  .source.tsx, .source.ts {
    .string.template {
      .variable {
        color: white;
      }
      .punctuation.accessor {
        color: red;
      }
      .template-expression {
        &.begin {
          color: #f92672;
        }
        &.end {
          color: #f92672;
        }
      }
    }
  }

So now my highlighting looks like this on atom:


Update date data type casting

PR Overview
This PR will address the following Issue/Feature: https://github.com/fivetran/dbt_quickbooks/issues/96
This PR will result in the following new package version:

0.11.2
Non breaking as these changes are under the hood and will not have visible impact on downstream model materializations.
This will also be in combo with PR #51 in the source
Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:

Update seeds and configs in the integration testing folder to match what was updated in the [source]( PR #51)

PR Checklist
Basic Validation
Please acknowledge that you have successfully performed the following commands locally:

[x] dbt compile
[x] dbt run –full-refresh
[x] dbt run
[x] dbt test
[x] dbt run –vars (if applicable)

Before marking this PR as "ready for review" the following have been applied:

[x] The appropriate issue has been linked and tagged
[x] You are assigned to the corresponding issue and this PR
[x] BuildKite integration tests are passing

Detailed Validation
Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":

[x] You have validated these changes and assure this PR will address the respective Issue/Feature.
[x] You are reasonably confident these changes will not impact any other components of this package or any dependent packages.
[x] You have provided details below around the validation steps performed to gain confidence in these changes.

Models should successfully run. Additionally will ask the customer to run on this branch as well.
Standard Updates
Please acknowledge that your PR contains the following standard updates:

Package versioning has been appropriately indexed in the following locations:

[x] indexed within dbt_project.yml
[x] indexed within integration_tests/dbt_project.yml

[x] CHANGELOG has individual entries for each respective change in this PR

[n/a] README updates have been applied (if applicable)

[ n/a] DECISIONLOG updates have been updated (if applicable)
[ n/a] Appropriate yml documentation has been added (if applicable)

dbt Docs
Please acknowledge that after the above were all completed the below were applied to your branch:

[ ] docs were regenerated (unless this PR does not include any code or yml updates)

If you had to summarize this PR in an emoji, which would it be?

:dancer:

reminder to change package deps before merging

@fivetran-reneeli New changes look good to me!


Fix Peripheral throws NullPointerException when invoking getName method

fix null pointer exception when invoking getName fix #640
add missing import

PLEASE READ THE GUIDELINES BEFORE MAKING A CONTRIBUTION

Please check if the PR fulfills these requirements

[x] The commit message are well described
[x] All changes have fully been tested

What kind of change does this PR introduce? (Bug fix, feature, ...)
Bug fix

What is the current behavior? (You can also link to an open issue here)

#640

What is the new behavior (if this is a feature change)?
Now getName returns an empty string instead of throws error

Does this PR introduce a breaking change? (What changes might users need to make in their scripts due to this PR?)
No

Other information:
1.19.2 do not have this bug

Does this need to be fixed for 1.19.2 too?

Does this need to be fixed for 1.19.2 too?

I've tested that 1.19.2 do not have the bug


Add toggle option for RSS feed visibility

This is an enhancement or feature.
Summary
Adds a hide property to the atom_feed in _config.yml. When hide is set to true (false by default), prevents the header and footer from rendering the RSS feed icons.
Context
Resolves #2786.

:+1: Would love to see this, I agree with all comments posted by iBug

:+1: Would love to see this, I agree with all comments posted by iBug

@iBug good feedback. I think I've addressed everything you've raised; let me know if you've got more.

@iBug good feedback. I think I've addressed everything you've raised; let me know if you've got more.


Latest Pixi not compatible with Angular 9

Expected Behavior
Should Run Angular 9 with Pixi.
Current Behavior
I manage to run but after 2s my GPU processor go up 100%

Possible Solution
Steps to Reproduce
Clone demo repo and run, npm run start
Environment

pixi.js version: 5.2.1
Browser & Version:  81.0.4044.113
OS & Version: macOs Catalina 10.15
Running Example: https://github.com/oshri/pixijs-5-angular-9

Supporting Angular unfortunately is not a promise of this project. There are many third party integrations that we don’t have the expertise to debug, this is one. Will leave this open but we need help identifying if this is actually a pixi problem or not.

"Zone.js changes the prototypes of all async calls in the browser api (setTimeout, etc.) so that a) context can be shared across call stacks and b) that hooks can be emitted at the end of micro, macro, and event tasks.
Cool. And Angular?
Angular creates a new zone called NgZone which is a child of the root zone. This way when those end-of-task hooks are emitted, angular can run change detection on the off chance that a call has resulted in something, somewhere, changing. Which is great when you don’t have a ton of components. Not so much when you have lots."
-Source
https://medium.com/@hazterisk/how-3-lines-of-code-reduced-cpu-and-memory-consumption-by-13-b451de874701


Not able to get private channels

Hi,
I want to send messages to a private channel and be able to list all historical messages. I'm using:
var RtmClient = require('@slack/client').RtmClient;
var MemoryDataStore = require('@slack/client').MemoryDataStore;

var token = "xxxxxxxxxxxxxxxxxxxxxxxxxxx";

var slack = new RtmClient(token, { logLevel: 'debug', dataStore: new MemoryDataStore() });
slack.start();

but in slack.channels I got only public channels so I can't interact with the one I want. BTW, is it possible to list all channel messages?
Thanks,

This response looks long but it really only takes like two to three minutes to read. Sorry about that.

How do I find the list of DMs using the RTM client?

The data store of the RTM client has a field named dms which holds all known DM (see footnote 1) channels by the client.
// side note: currently, a MemoryDataStore is created for the client if none is
// supplied, so you don't really need to provide one yourself
var client = new RtmClient(token);

client.start();

client.on(CLIENT_EVENTS.RTM.RTM_CONNECTION_OPENED, function() {
    console.log(client.dataStore.dms);
});

How do I list all channel messages?

Depends on what kind of channel you want to list messages from. Here's a small little table of the channel type and the web method you should use for that channel type to get message history:

Channel Type
Web Method

Regular
channels.history

Group
groups.history

DM/IM
im.history

Multi-Party DM/IM
mpim.history

To use these, you'll need to use the WebClient. Given your last question was about DMs, I'll show off a small example of the web client myself:
var web = new WebClient(token);

// using a filler dm channel id
web.im.history('DXXXXXXXX', function(err, result) {
    // Regular error-handling for web request callbacks
    if (err)
        return console.log(err);
    if (!result.ok)
        return console.log(result.error);
    if (result.warning)
        console.log(result.warning);

    console.log(result.messages);
});

You also have the choice of promises with the web client if you prefer that fashion:
web.im.history('DXXXXXXXX')
    .then(function(result) {
        if (result.warning)
            console.log(result.warning);

        console.log(result.messages);
    })
    .catch(function(err) {
        // Slack API errors are handled by the client in the case of promises.
        console.log(err);
    });

Have fun.

[1]: the repository refers to person-to-person messages as DMs while the actual web API that Slack provides uses the term IM. The only time you will (or, better yet, should) see IM in this repository is if it relates to the actual web API, like in the case of web API method names or properties (key names) in responses from the API.

I'm going to close this one as solved!

Since the response does not address the ticket question, and this is the first entry in google that covers private channels, I want to add that Slack private channels are not handled internally as channels but as groups. If you are looking for a listing of private channels, you would find them in slack.datastore.groups; or can retrieve the channel object via getGroupByName()/getGroupById().
Some caveats to be noted, is that while proper channels can accept the name with or without a leading # sign, since it gets stripped out within getChannelByName(), this is not the case with getGroupByName() - a group does not include a leading #. If you are attempting to allow passing in either a valid channel name, or a private channel name at the same time, you should pre-sanitize the channel name, and then call them after each other to find a proper channel object; i.e.
function getChannelEntity(channel) {
    channel = channel.replace(/^#/, '');
    return slack.dataStore.getChannelByName(channel) || slack.dataStore.getGroupByName(channel);
}


Add export/import functionality to model exercises

Especially relevant for team exercises since studenty might want to export there submission and modify it afterwards.

Export should always be available
Import only before duedate

(As discussed)

I don’t think we should add this because it would simplify cheating!

Then at least we should add an export functionality for given argument and probably for only the team model exercises.
I can't see how this would simplify cheating however it would make it way more easy for the students to make an updated version they can provide their tutor if something changed.
What do you think about that @krusche ?

It is already possible to copy and paste diagram elements (also the whole diagram), so from the cheating aspect thats already given in my opinion. Waiting with implementation until clarification.

It is already possible to copy and paste diagram elements (also the whole diagram), so from the cheating aspect thats already given in my opinion.

There is a big difference between copy / paste and import / export, though!
We should not make cheating easier, and I don't want to have this feature in Artemis for now. We intentionally designed the modeling editor in a way, that cheating is difficult! Therefore, I'll close this issue!
If copy and paste is easily possible between multiple browser windows/tabs, we should revert this, so that in Artemis, you can only copy and paste elements within a model of the same browser window / tab!

@krusche I don't endorse closing this since the issue with the export functionality it not resolved yet.
I can't see how it improves cheating but I can see how it would improve the workflow for team modeling exercises.

Then I suggest you specify this in more detail in a separate issue what you exactly mean. Please follow the issue template!
We could allow students to export a PNG or PDF vector graphics.
Another option would be to provide a link to open the same model on apollon.ase.in.tum.de.
However, it should never be possible to import a model in Artemis because students would abuse this to cheat!

I'll do, I only didn't do it here because I've already discussed it with Tobias and wanted to save some time ^^


proposal: cmd/go: -benchformat option in go test

Background
Currently go test -bench . prints out benchmark results in a certain format, but there is no guarantee that this format will not change. Thus a tool that parses go test output may break if an incompatible change to the output format is made.
Also currently there is no good way to distinguish benchmark results from the rest of go test output, other than checking that a line starts with "Benchmark".
Proposal

Add -benchformat flag to go test. Its value is a text/template template with BenchmarkResult input, similar to -f flag in go list.
Add Proc to BenchmarkResult. It will have the value of runtime.GOMAXPROCS at the beginning of B.launch call.

Example:
$ go test -run=^$  -bench . \
  -benchformat "BENCHMARK STARTS HERE:{{.Name}}:{{.Proc}}:{{.T}}:{{.N}}:{{.Bytes}}"
PASS
BENCHMARK STARTS HERE:BenchmarkFoo:8:1s:10000:0
BENCHMARK STARTS HERE:BenchmarkBar:8:1s:10000:0

One may be concerned that adding -benchformat for benchmarks without adding -format for tests would be inconsistent. We can add -format for tests too.
Currently there is no struct for a test result template. It would need to be added. I don't see a strong reason to add testing.TestResult to that API, though, as we can just document the test result struct in go test -help.

Considering that go list accepts a text/template format, this seems consistent. I think it's probably worth exploring and writing up a more formal proposal, unless somebody disagrees.
/cc @adg

See also #2981.
I think having a -json flag is enough to solve this problem
once and for all.

Thanks for mentioning #2981.
One advantage of -format over -json is that go test can stream results to stdout, rather than waiting for completion of all tests/benchmarks and then dump a big json blob. This is important for tools that present test results to the user. In my case, I need to process test output and print it out (annotated) as soon as a benchmark completes. Without streaming UX would be worse.
Also from reading #2981 it seems that adding -json is hard, whereas adding -format is trivial, more consistent with go list and provides same, if not more, functionality.

With -json it can still stream the result out as a single
json object for each test/benchmark. Actually, I think
that's the only way to go, because we don't want to
lose progress even if the test binary panics in midway.
Even if adding -json is hard, if we intended to add -json
eventually, I don't think we should add more redundant
mechanisms now. This is different from the go list case
because go list are normally used by shell scripts so
having a -f flag in addition to -json makes sense.

Let's continue the discussion about -json in #2981.

Currently go test -bench . prints out benchmark results in a certain format, but there is no guarantee that this format will not change.

OK. Counter-proposal: let's guarantee that this format will not change.
Specifically, I propose that the output format is exactly a sequence of lines containing space-separated fields:
<name> <iterations> (<value> <unit>)+

The number of   on a particular line is not specified, nor is the space of possible s.
This describes all the current output and blesses (instead of forcing rewrites of) tools that parse the output already, like benchcmp and benchstat.
/cc @aclements

I don't have a strong opinion about this, but I'm inclined to think it's unnecessary as long as we simply bless the current format as suggested by @rsc and especially unnecessary if we add -json (and if I had to choose between the two, I would definitely choose -json).
Suppose we were to simply bless the current format. What future changes to go test -bench might that cause friction with? I have a few things on my list. I'd like an external tool (e.g., benchstat) to be able to do linearity testing. We could support that by outputting lines for each run-up step. I'd like go test -bench to be able to output many more instances of shorter runs so external tools can compute more robust statistics. Again, go test -bench can just output more instances of the same benchmark line. I've thought about adding custom outputs (# of GCs, max pause, etc). We could support that by adding more (value unit) pairs.

Formal counter-proposal: #14313.

Either #14313 or #2981 will go ahead in favor of this proposal. Marking as declined. Thanks for your time.


Can not link using msvc

Hi,
I tried to install diesel_cli on my Windows 10
It says
note: LINK : fatal error LNK1181: cannot open input file 'pq.lib'

There is a libpq.lib in the pqsql/lib folder, if I rename it to pq.lib, diesel_cli can be installed successfully...
Maybe this is a cargo's issue?
Thanks.
https://github.com/diesel-rs/diesel/issues/487

same here? was trying to use diesel on Win 10... but got this issue.
Also exactly what postgree do I need to install @fluxxu ?

@tyoc213
For Postgres server, I use Docker because I don't want Postgres to create user on my computer.
For client library to link with diesel, I used EnterpriseDB zip archive here:
https://www.enterprisedb.com/download-postgresql-binaries
Assume you extract it to X:\pgsql
You need to rename or copy X:\pgsql\lib\libpq.lib to X:\pgsql\lib\pq.lib otherwise cargo can not find it.
Don't forget to set environment variable PQ_LIB_DIR to X:\pgsql\lib
Related issue:
https://github.com/diesel-rs/diesel/issues/487
😄

This still isn't working for me. I know I have the updated version because it says LNK1181: cannot open input file 'libpq.lib'. I have my PG_LIB_DIR env var set to C:\Program Files\PostgreSQL\9.4\lib and can confirm libpq.lib lives there. Is there something else I can try?

PG_LIB_DIR doesn't do anything. As per the readme, you need to do on of:

have LIB_PQ_DIR is set and pointing to the right directory
have pg_config.exe on your PATH
have pkg-config on your PATH and configured to be able to find libpq.

Sorry, that was a typo. I actually have it set as PQ_LIB_DIR. (readme has it wrong, see my PR)
I figured it out. I was trying all these things and just doing a cargo build on my project, which never ran build.rs again since pq-sys already built successfully (it just failed to link). Once I did a cargo clean and it reran build.rs, it picked up my env var and linked successfully.

I encounted this issue too. Firstly, I get this
LNK1181: cannot open input file 'libpq.lib'
Then I installed postgrel server.(I don't really understand I need to install a server to get this lib. Why libpq.DLL is not enough.)
Now I get
note: LINK : fatal error LNK1181: cannot open input file 'pq.lib'
So I copy libpq.lib and named it as 'pq.lib'. Then I run cargo install(I did not run cargo clean) ... everything works!


Models disappear when captured through RenderTarget

I added a model to the stage background of my script, and when the boss comes in it disappears. It seems to be related to the RenderTarget more than the PostEffect shaders.
To reproduce, try rendering a model resource between calls to PushRenderTarget and PopRenderTarget.

As it turns out, clearing the z-buffer (despite not using it) solved my problem. Closing


"provider FAILED" Error when using notebooks

Environment data

VS Code version: 1.73.1
Jupyter Extension version (available under the Extensions sidebar): 2022.10.110
Python Extension version (available under the Extensions sidebar): 2022.18.2
OS (Windows | Mac | Linux distro) and version: Ubuntu
Python and/or Anaconda version: 3.9.16
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
Jupyter server running: Remote

Expected behaviour
Notebooks run properly
Actual behaviour
Notebooks are laggy, cell executions take a very long time, jupyter extension takes a long time to activate
Steps to reproduce:

run any notebook or load vscode with a notebook open

Logs

Output for Extension Host in the Output panel

2023-02-22 11:38:19.046 [info] Extension host with pid 582 started
2023-02-22 11:38:19.061 [info] Lock '/usr/local/vscode/User/workspaceStorage/73c2f926/vscode.lock': Lock acquired.
2023-02-22 11:38:20.035 [info] ExtensionService#_doActivateExtension vscode.ipynb, startup: false, activationEvent: 'onNotebook:jupyter-notebook}'
2023-02-22 11:38:20.036 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: true, activationEvent: '*', root cause: vscode.git
2023-02-22 11:38:20.060 [info] ExtensionService#_doActivateExtension ms-python.python, startup: true, activationEvent: 'workspaceContains:requirements.txt'
2023-02-22 11:38:20.507 [info] ExtensionService#_doActivateExtension vscode.git, startup: true, activationEvent: '*'
2023-02-22 11:38:20.507 [info] ExtensionService#_doActivateExtension vscode.github, startup: true, activationEvent: '*'
2023-02-22 11:38:24.174 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2023-02-22 11:38:24.174 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onStartupFinished'
2023-02-22 11:38:24.175 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
2023-02-22 11:38:24.176 [info] Eager extensions activated
2023-02-22 11:38:26.339 [info] ExtensionService#_doActivateExtension ms-toolsai.jupyter, startup: false, activationEvent: 'onNotebook:jupyter-notebook'
2023-02-22 11:38:26.339 [info] ExtensionService#_doActivateExtension ms-toolsai.vscode-jupyter-cell-tags, startup: false, activationEvent: 'onNotebook:jupyter-notebook'
2023-02-22 11:38:26.339 [info] ExtensionService#_doActivateExtension ms-toolsai.vscode-jupyter-slideshow, startup: false, activationEvent: 'onNotebook:jupyter-notebook'
2023-02-22 11:38:26.339 [info] ExtensionService#_doActivateExtension ms-toolsai.jupyter-renderers, startup: false, activationEvent: 'onNotebook:*'
2023-02-22 11:38:27.341 [info] ExtensionService#_doActivateExtension ms-toolsai.vscode-jupyter-powertoys, startup: false, activationEvent: 'onNotebook:jupyter-notebook'
2023-02-22 11:38:27.583 [info] ExtensionService#_doActivateExtension ms-python.isort, startup: false, activationEvent: 'onLanguage:python'
2023-02-22 11:40:20.106 [error] [ms-toolsai.jupyter] provider FAILED
2023-02-22 11:40:20.106 [error] Error: FileNotFoundError: [Errno 2] No such file or directory: '/home/jovyan/compare-human-search-eval-with-openai/notebooks/_NotebookCon>
        at /usr/local/vscode/extensions/ms-toolsai.jupyter-2022.10.110-universal/out/extension.node.js:17:1719895
        at /usr/local/vscode/extensions/ms-toolsai.jupyter-2022.10.110-universal/out/extension.node.js:17:1720189
        at Immediate.<anonymous> (/usr/local/vscode/extensions/ms-toolsai.jupyter-2022.10.110-universal/out/extension.node.js:17:1720551)
        at processImmediate (node:internal/timers:466:21)
2023-02-22 11:40:37.325 [error] [ms-toolsai.jupyter] provider FAILED
2023-02-22 11:40:37.325 [error] Error: FileNotFoundError: [Errno 2] No such file or directory: '/home/jovyan/compare-human-search-eval-with-openai/notebooks/_NotebookCon>
        at /usr/local/vscode/extensions/ms-toolsai.jupyter-2022.10.110-universal/out/extension.node.js:17:1719895
        at /usr/local/vscode/extensions/ms-toolsai.jupyter-2022.10.110-universal/out/extension.node.js:17:1720189
        at Immediate.<anonymous> (/usr/local/vscode/extensions/ms-toolsai.jupyter-2022.10.110-universal/out/extension.node.js:17:1720551)
        at processImmediate (node:internal/timers:466:21)
2023-02-22 11:40:40.458 [info] ExtensionService#_doActivateExtension vscode.extension-editing, startup: false, activationEvent: 'onLanguage:markdown'
2023-02-22 11:40:40.458 [info] ExtensionService#_doActivateExtension vscode.markdown-language-features, startup: false, activationEvent: 'onLanguage:markdown'
2023-02-22 11:41:32.988 [error] TypeError: Cannot read properties of undefined (reading 'start')
        at ContextualHelp.activeNotebookSelectionChanged (/usr/local/vscode/extensions/ms-toolsai.vscode-jupyter-powertoys-0.0.6-universal/out/main.js:5330:71)
        at h.invoke (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:60:145)
        at v.deliver (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:60:2266)
        at g.fire (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:60:1844)
        at P.$acceptEditorPropertiesChanged (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:92:43626)
        at l._doInvokeHandler (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:102:13680)
        at l._invokeHandler (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:102:13362)
        at l._receiveRequest (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:102:12132)
        at l._receiveOneMessage (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:102:10834)
        at /usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:102:8941
        at h.invoke (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:60:145)
        at v.deliver (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:60:2266)
        at g.fire (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:60:1844)
        at r.fire (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:69:16515)
        at /usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:118:17104
        at h.invoke (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:60:145)
        at v.deliver (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:60:2266)
        at g.fire (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:60:1844)
        at r.fire (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:69:16515)
        at o._receiveMessage (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:69:21327)
        at /usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:69:18770
        at h.invoke (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:60:145)
        at v.deliver (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:60:2266)
        at g.fire (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:60:1844)
        at g.acceptChunk (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:69:13346)
        at /usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:69:12476
        at h.invoke (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:60:145)
        at v.deliver (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:60:2266)
        at g.fire (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:60:1844)
        at g._processReadQueue (/usr/local/vscode/lib/vscode/out/vs/workbench/api/node/extensionHostProcess.js:69:32010)
2023-02-22 11:42:22.676 [info] ExtensionService#_doActivateExtension vscode.markdown-math, startup: false, activationEvent: 'api', root cause: vscode.markdown-language-f>
2023-02-22 11:42:22.800 [info] ExtensionService#_doActivateExtension vscode.configuration-editing, startup: false, activationEvent: 'onLanguage:jsonc'
2023-02-22 11:42:22.800 [info] ExtensionService#_doActivateExtension vscode.json-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
2023-02-22 11:42:22.801 [info] ExtensionService#_doActivateExtension vscode.typescript-language-features, startup: false, activationEvent: 'onLanguage:jsonc'
2023-02-22 12:06:52.853 [error] Error: read ECONNRESET
        at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
2023-02-22 12:11:50.020 [error] actual command NOT FOUND __vscleflqhi1 undefined
2023-02-22 13:09:22.527 [error] Error: Unknown webview handle:be707a8f-6c27-413d-91c1-005fb506c54e
    at Ka.getWebview (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055b9906>
    at Ka.$setOptions (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055b990>
    at v._doInvokeHandler (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055>
    at v._invokeHandler (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055b9>
    at v._receiveRequest (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055b>
    at v._receiveOneMessage (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f0>
    at https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055b99068d3688932416f23>
    at f.invoke (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055b99068d368>
    at s.deliver (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055b99068d36>
    at u.fire (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055b99068d36889>
2023-02-22 13:09:22.528 [error] Error: Unknown webview handle:be707a8f-6c27-413d-91c1-005fb506c54e
    at Ka.getWebview (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055b9906>
    at Ka.$setHtml (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055b99068d>
    at v._doInvokeHandler (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055>
    at v._invokeHandler (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055b9>
    at v._receiveRequest (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055b>
    at v._receiveOneMessage (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f0>
    at https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055b99068d3688932416f23>
    at f.invoke (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055b99068d368>
    at s.deliver (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055b99068d36>
    at u.fire (https://sciencebox-jupyterhub-server-prod-eu.notebooks.spotify.net/user/claudiah/e6281988167701afc06da885d9d72ff0/vscode/stable-6261075646f055b99068d36889>
2023-02-22 13:09:29.927 [error] Error: Unknown webview handle:be707a8f-6c27-413d-91c1-005fb506c54e
    at Ka.getWebview [REDACTED]

The errors are coming from the Jedi language server in the Python extension.


Add a fullscreen button in the FoodChain activity

Sugarizer activities don't look good on devices with small screen - for example smartphones.
On these devices, the toolbar could sometimes take 1/4 of the screen.
To increase the size for activities contents, the idea is to add a fullscreen button in the toolbar  like in the QRCode activity. When clicked, the fullscreen button hide the toolbar and display only an unfullscreen button. When clicked, the unfullscreen button show again the toolbar.
This features is implemented here: https://github.com/llaske/sugarizer/blob/dev/activities/QRCode.activity/js/activity.js#L144-L160
The objective of this issue is to implement the same feature in the FoodChain activity.
Thinks to check:

[ ] The fullscreen button should be on the right of the toolbar, near the Stop button.
[ ] The fullscreen button should be always visible, including in small screen size. Could require to adapt media queries in CSS.
[ ] The size of the board should be increase in fullscreen mode. So it means that the resize event should be call directly or indirectly when clicking on fullscreen/unfullscreen button.
[ ] The unfullscreen button should be visible only when the screen is in fullscreen mode.
[ ] The unfullscreen button should be attach to the right of the screen. It's better if it's not at the same location than the Stop button to avoid side effect on multiple click.

Fixed in https://github.com/llaske/sugarizer/pull/619


configure.py: error: unrecognized arguments: --enable-shared

It errors when I run “ python configure.py --enable-shared” to compile NNPACK. Why ? I just run it as the steps the Mxnet provides:
Now, if the trained model meets some conditions of using NNPACK, you can build MXNet with NNPACK support. here is the steps for you:
install NNPACK based on this tutorials, that’s to say you need ninja to build NNPACK. make sure add --enable-shared when running configure.py(i.e. python configure.py --enable-shared), because MXNet will link NNPACK dynamically.
set lib path of NNPACK as the environment variable, such as export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$YOUR_NNPACK_INSTALL_PATH/lib
add the include file of NNPACK and its third-party to ADD_CFLAGS in config.mk, such as ADD_CFLAGS = -I$(YOUR_NNPACK_INSTALL_PATH)/include -I$(YOUR_NNPACK_INSTALL_PATH)/pthreadpool/include
set USE_NNPACK = 1 in config.mk.
build MXNet.

This is a temporary regression due to a change in build systems.

@Maratyszcza  but the mxnet connot be built correctly now

For now, please use commit 9c6747d7b80051b40e6f92d6828e2ed997529cd2, the last before the transition to the new build system.

Sorry but I couldn't perform to compile NNPACK acc. to here. If I switch back to 9c6747d by git reset --hard 9c6747d7b80051b40e6f92d6828e2ed997529cd2, confu setup cannot find confu.yaml. If I do not run confu setup, ninja returns the following error.
ninja: error: 'NNPACK/third-party/pthreadpool/src/pthreadpool.c', needed by 'NNPACK/third-party/pthreadpool/lib/pthreadpool.c.o', missing and no known rule to make it

Follow the instructions in the README that you checked out, not the current README

Finally found the problem, I missed to clone the submodules in the corresponding commit. Now, fixed.

Hi - how in the new build system I can get a shared library?

@tracek Its not yet supported. If you just need PIC code, after running configure.py edit build.ninja and add -fPIC to cflags.

Are there any plans to integrate shared library support? I need it for using the torch ffi-bindings.

@mcxkarakoc how to clone the submudules in the corresponding commit?

git checkout TO_YOUR_COMMIT
git submodule update --init --recursive

No longer relevant due to addition of CMake configs.


Figure out a better way to keep track of the list of classes

UsbDevice::poll currently has a nasty warning:
/// Note: The list of classes passed in must be the same for every call while the device is
/// configured, or the device may enumerate incorrectly or otherwise misbehave. The easiest way
/// to do this is to call the `poll` method in only one place in your code, as follows:

Things will break in weird and wonderful ways if the user doesn't always pass in the same slice of classes in the same order.
What I would really want is for UsbDevice to hold references to the list of classes. However this is a problem because both UsbDevice and the user would want to have a &mut to each class. Earlier versions used immutable references but this meant all classes had to be written using interior mutability which was nasty.
Possible solutions:

Use RefCells. This means the user has to borrow_mut every time they want to use their serial port or whatever though. Not ideal.
Have UsbDevice own the classes instead. They're mixed types but a tuple might work. Then the user could ask UsbDevice for a temporary &mut to their class to talk to them. If compile time device/descriptor generation is implemented this could possibly be quite ergonomic. However the ability to access multiple classes in parallel might be lost, which is currently possible (reading/writing from multiple endpoints at the same time with DMA could be a thing in the future)
Use something similar to smoltcp where they have a SocketSet type you pass to poll, and instead of the actual sockets you get socket handles you can then request access to via the SocketSet. This is probably even more convoluted to use than the RefCells though. (Example)
Live with it.

I like solution 2, because it helps fix a problem in the no-scheduler case:
Currently, the classes reference back to the UsbBus via endpoints, which at least in some cases means the UsbBus implementation needs something like a mutex (ATSAMD example) to prevent multiple "concurrent" accesses to the bus.  The mutex is problematic when there's no scheduler, because locking it disables all interrupts for the duration of the lock.  A mutex with a try_lock() could be implemented which doesn't block if the mutex is held already, returning an error instead, and which only disables all interrupts for a couple instructions while locking/unlocking.  But, if the USB classes and bus were all owned by one struct, then I think we could get rid of the mutex requirement since Rust would ensure there's only one execution context that can access an instance of that struct.


Generated ViewBinding doesn't extend from library module ViewBinding

There's problem with extend views (Activities, Fragments, etc.) from library module and overriding inflated layout. Unfortunately your great, etc. library doesn't catch this kind of situations so generated ViewBinding for one module doesn't extends from another one.
In example situation ActivityB_ViewBinding should extends from ActivityA_ViewBinding
public class ActivityB_ViewBinding<T extends ActivityB> implements Unbinder {

public class ActivityA_ViewBinding<T extends ActivityA> implements Unbinder {

should be
public class ActivityB_ViewBinding<T extends ActivityB> extends ActivityA_ViewBinding<T> {

public class ActivityA_ViewBinding<T extends ActivityA> implements Unbinder {

app module:
public class ActivityB extends ActivityA {
    @BindView(R.id.text_b) TextView textB;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        textB.setText("test");
    }

    @LayoutRes
    @Override
    protected int getLayoutRes() {
        return R.layout.activity_b;
    }
}

gradle includes:
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
compile project(':lib')

lib module:
public abstract class ActivityA extends Activity {
    @BindView(R2.id.text_a) TextView textA;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayoutRes());
        ButterKnife.bind(this);
        // textA is null when ActivityA is extended in other module!
        textA.setText("test");
    }

    @LayoutRes
    protected int getLayoutRes() {
        return R.layout.activity_a;
    }
}

gradle includes:
compile 'com.jakewharton:butterknife:8.4.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'

activity_b.xml layout of course have 2 TextView with R.id.text_a and R.id.text_b.  Unfortunatelly ButterKnife doesn't have anything against when we forget to include layout with R.id.text_a - generator validator doesn't work at compile time here.
logs:
Looking up binding for com.test.ActivityB
HIT: Loaded binding class and constructor.

This issue probably is connected to https://github.com/JakeWharton/butterknife/issues/771 and https://github.com/JakeWharton/butterknife/issues/698 but I'm not sure about that.

To solve this problem author should add methods
@NonNull
@UiThread
public static Unbinder bind(@NonNull Activity target, Class<?> tClass) {
	View sourceView = target.getWindow().getDecorView();
	return createBinding(target, sourceView, tClass);
}

@NonNull
@UiThread
public static Unbinder bind(@NonNull Object target, View sourceView, Class<?> tClass) {
	return createBinding(target, sourceView, tClass);
}

to ButterKnife class.
When you want to bind your Activity (or any View), on your BaseActivity you should bind View like this:
ButterKnife.bind(this);
if (!this.getClass().getName().contains("YOUR_MIAN_PACKETNAME_OF_MODULE")) {
	ButterKnife.bind(this, this.getClass().getSuperclass());
}

In first line is binded your class ActivityB , in next we check that your class is from out of app-module (lib-module). If if return true we are call bind method for super class of ActivityB  - in this case for ActivityA
This method works for Activity, Fragment and other Views which have it's parent in other module in project

No, that requires the caller have knowledge of whether or not their base
class uses ButterKnife or not and whether it's present in the same module
or not. Additionally, it doesn't handle two base classes from two separate
libraries that extend each other.
On Fri, Dec 2, 2016 at 11:48 AM PanBaklazan<EMAIL_ADDRESS>wrote:

To solve this problem author should add methods
@NonNull @UiThreadpublic static Unbinder bind(@NonNull Activity target, Class tClass) {
	View sourceView = target.getWindow().getDecorView();
	return createBinding(target, sourceView, tClass);
}
@NonNull@UiThreadpublic static Unbinder bind(@NonNull Object target, View sourceView, Class tClass) {
return createBinding(target, sourceView, tClass);
}
to ButterKnife class.
When you want to bind your Activity (or any View), on your BaseActivity
you should bind View like this:
ButterKnife.bind(this);if (!this.getClass().getName().contains("YOUR_MIAN_PACKETNAME_OF_MODULE")) {
ButterKnife.bind(this, this.getClass().getSuperclass());
}
In first line is binded your class ActivityB, in next we check that your
class is from out of app-module (lib-module). If if return true we are
call bind method for super class of ActivityB - in this case for ActivityA
This method works for Activity, Fragment and other Views which have it's
parent in other module in project
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/JakeWharton/butterknife/issues/808#issuecomment-264501667,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEEEb3LrR23kMaTU7KVexRo4VaxVZA5ks5rEEvygaJpZM4K2oko
.

Yes, it doesn't handle two base classes from two separate libraries. My solution is little hack and works if it is our modules (app and library) and we know about that ActivityB from app have parent ActivityA from lib module, but if lib-module which we extend, uses ButterKnife and we have no access to modify code - this method will not works

I faced this issue after the division of the app into several ui modules. As a workaround we've added to the super class an explicit call to the corresponding ViewBinder
Using names from the OP question:
public abstract class ActivityA extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(getLayoutRes());
        ButterKnife.bind(this);
        unbinder = new ActivityA_ViewBinding<ActivityA>(this);
        textA.setText("test");
    }
}

@JakeWharton If I understand correctly this is currently the limitation of the library, right? Are you aware of any other solutions?

I think this issue is the same as : https://github.com/JakeWharton/butterknife/issues/958
The problem is that BK expect all annotated elements to be passed by the process method, and this is not true in the case of a super class in a separate module. Moreover, the annotations are not visible anymore.
Though, I think it should be possible for BK to deal with this situation: when a "parent" class is scanned for annotations, BK could also try to load the TypeElement corresponding to this class View Binder (usingElements.getTypeElemement()). If the view binder exists, it means the class was already processed in a module, which means subclasses should call this view binder.

Is there a next release date slated that will include this?

No. But soon.
On Mon, Sep 9, 2019 at 3:27 PM Benjamin Wicks<EMAIL_ADDRESS>wrote:

Is there a next release date slated that will include this?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/JakeWharton/butterknife/issues/808?email_source=notifications&email_token=AAAQIEPAC4UXTDBOEFD2EUDQI2PTTA5CNFSM4CW2REUKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6IYELQ#issuecomment-529629742,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAAQIEIBYYGKXWMWOLP2F7TQI2PTTANCNFSM4CW2REUA
.


Open a gitter

Open a gitter for support and discussion.

Done! https://gitter.im/valhalla-chat/Lobby


docs: fix intro video link in README

The introductory video link was incorrect in the README, this PR updates it to the correct video.

Thanks so much!


Add benchmark

Simple benchmark setup using criterion.rs and git_testtools

Thanks a lot for the review @spenserblack and happy new year!! 🎉 🎊

Happy new year! 🎊


Explicitly mark templated functions as host/device

Thanks for the PR. I tested the fix with the following versions:

Cuda 11.2 & 11.4
cuDNN 8.1.0
Tensorflow 2.11.0
GCC 9.4.0


Synop not working anymore after latest update from KMI

Synop is not working anymore after latest update. Error related to the code field that's not in the response anymore.

Closed by f6e92681e00f14c2b70fe6565bba5fdab866cf5a