Unable to run executeSet on SQL with  -- comments

Describe the bug
Using the executeSet API, running any SQL statement with comments in it (either -- or \* ... *\) results in:
ExecuteSet: error code 21: not an error

Removing the comments makes the statements run perfectly fine.
To Reproduce
Run any SQL statement with comments in, e.g.:
-- foobar
SELECT * FROM bar;

or
/* foobar */
SELECT * FROM bar;

Expected behavior
The executeSet API should be able to run SQL with comments
Context
Same issue occurs on both iOS and Android with version 5.6.1 of the package.

@msfstef

the executeSet command is for execute Queries like INSERT, UPDATE, DELETE ... but not for the SELECT
the query command is for SELECT
the chapter Comments within SQL statements of the API.md file  give a link to Comments within SQL

Having said that i will check again the executeSet with comments and revert back to you

the executeSet command is for execute Queries like INSERT, UPDATE, DELETE ... but not for the SELECT

Sorry the example was perhaps not the best - we're running into this issue when creating tables and inserting rows etc, see adapter implementation for details.

the chapter Comments within SQL statements of the API.md file give a link to Comments within SQL

Other drivers (like the expo one, the react-native-sqlite-storage, wa-sqlite, etc) all work with the integrated comments so I'm sure it's not an issue with the way the statements and comments are formulated. e.g. for an actual statement that breaks:
-- Toggles for turning the triggers on and off
INSERT OR IGNORE INTO _electric_trigger_settings(tablename,flag) VALUES ('${tableFullName}', 1);

@msfstef  i test this
      let insertQuery = 'INSERT INTO contacts (name,FirstName,email,company,age,MobileNumber) VALUES (?, ?, ?, ?, ?, ?) -- Add Sue Hellen;';
      let bindValues = ["Hellen","Sue","sue.hellen@example.com",,42,"4406050807"];
      let ret = await db.run(insertQuery, bindValues);
      console.log(`>>> run ret 1: ${JSON.stringify(ret)}`)
      insertQuery = `INSERT INTO contacts /* some contacts */ (name,FirstName,email,company,age,MobileNumber) VALUES
<EMAIL_ADDRESS>'IBM', 30, '4403050926'), -- Add Doe
          ('Watson','Dave','dave.watson@example.com','Apple', 30, '4407050932') /* add Watson */,
          ('Smith', 'Jane'<EMAIL_ADDRESS>'IBM', 27, '33607556142') /* Add Smith */-- End of add contact;`;
      bindValues = [];
      ret = await db.run(insertQuery, bindValues);
      console.log(`>>> run ret 2: ${JSON.stringify(ret)}`)

      let selectQuery = "SELECT * /* all columns */ FROM contacts WHERE company = 'IBM' -- for company IBM;";

      ret = await db.query(selectQuery);
      console.log(`>>> query "IBM" ret: ${JSON.stringify(ret)}`)

and it works
and i test this
  const setContacts: Array<capSQLiteSet>  = [
    { statement:"INSERT INTO contacts /* Contact Simpson */ (name,FirstName,email,company,age,MobileNumber) VALUES (?,?,?,?,?,?);",
      values:["Simpson","Tom","Simpson@example.com",,69,"4405060708"]
    },
    { statement:"INSERT INTO contacts /* three more contacts */ (name,FirstName,email,company,age,MobileNumber) VALUES (?,?,?,?,?,?) -- Add Jones, Whiteley and Brown;",
      values:[
        ["Jones","David","Jones@example.com",,42.1,"4404030201"],
        ["Whiteley","Dave","Whiteley@example.com",,45.3,"4405162732"],
        ["Brown","John","Brown@example.com",,35,"4405243853"]
      ]
    },
    { statement:"UPDATE contacts SET age = ? , MobileNumber = ? WHERE id = ? -- Update Jones Contact;",
      values:[51.4,"4404030202",6]
    }
  ];

      ret = await db.executeSet(setContacts);

      selectQuery = "SELECT email /* only email */ FROM contacts WHERE company IS NULL -- for company not given;";
      ret = await db.query(selectQuery);
      console.log(`>>> query "NULL" ret: ${JSON.stringify(ret)}`)

and it works
the database where created with
        CREATE TABLE IF NOT EXISTS contacts (
            id INTEGER PRIMARY KEY NOT NULL,
            email TEXT UNIQUE NOT NULL,
            name TEXT,
            FirstName TEXT,
            company TEXT,
            size REAL,
            age INTEGER,
            MobileNumber TEXT
        );
        CREATE INDEX IF NOT EXISTS contacts_index_name ON contacts (name);
        CREATE INDEX IF NOT EXISTS contacts_index_email ON contacts (email);

@msfstef I cannot access actual statement

@msfstef I cannot access actual statement

Sorry I used the wrong link, here you go
FWIW most of them execute a set that has no bound parameters (and so an empty list [] for the params) - will play around a bit more to see if I can get a more minimal reproducible example.

@msfstef Your comments are outside the SQL statements  so i will have to look at it later

@jepiqueau after some more testing it seems \* ... *\ comments work, but -- comments only work at the end of statements.
Having a -- comment either in between lines or outside of the statement separated by a line break doesn't work.
CREATE TABLE IF NOT EXISTS main.test (
  id INTEGER PRIMARY KEY AUTOINCREMENT, -- testing
  version TEXT NOT NULL UNIQUE,
  applied_at TEXT NOT NULL
);`

-- Error: prepareSQL prepare failed rc: 1 message: incomplete input

@msfstef if you look at the link i gave earlier it said
In SQLite, a comment started with -- symbol is similar to a comment starting with # symbol. When using the -- symbol, the comment must be at the end of a line in your SQL statement with a line break after it. This method of commenting can only span a single line within your SQL and must be at the end of the line.

@msfstef if you look at ChatGPT

SELECT * FROM employees WHERE department = 'Marketing'; -- Retrieve data from the Marketing department is correct
INSERT INTO employees (name, age, department) VALUES ('John Doe', 30, 'Sales'), -- Add John Doe     ('Jane Smith', 25, 'Marketing'); -- Add Jane Smith is correct
-- Add some employees INSERT INTO employees (name, age, department) VALUES ('John Doe', 30, 'Sales'), -- Add John Doe      ('Jane Smith', 25, 'Marketing'); -- Add Jane Smith is incorrect
/* Add some Employees */ INSERT INTO employees (name, age, department) VALUES ('John Doe', 30, 'Sales'), -- Add John Doe      ('Jane Smith', 25, 'Marketing'); -- Add Jane Smith is correct

@jepiqueau yes - all comments starting from -- to the end of the line are valid, as long as the only thing that follows is a line break, like in the examples I gave above.
In fact the only one that works is one that I feel should not work, as it includes the semicolon inside the comment.

-- Add some employees INSERT INTO employees (name, age, department) VALUES ('John Doe', 30, 'Sales'), -- Add John Doe ('Jane Smith', 25, 'Marketing'); -- Add Jane Smith is incorrect

this one is incorrect because it includes a -- comment inline without a line break. If it was:
-- Add some employees
INSERT INTO employees (name, age, department) VALUES ('John Doe', 30, 'Sales'),
-- Add John Doe
('Jane Smith', 25, 'Marketing'); -- Add Jane Smith

it would be correct - you can try any SQLite implementation to check that (example)

@msfstef if you look at what i gave earlier
 insertQuery = `INSERT INTO contacts /* some contacts */ (name,FirstName,email,company,age,MobileNumber) VALUES
<EMAIL_ADDRESS>'IBM', 30, '4403050926'), -- Add Doe
          ('Watson','Dave','dave.watson@example.com','Apple', 30, '4407050932') /* add Watson */,
          ('Smith', 'Jane'<EMAIL_ADDRESS>'IBM', 27, '33607556142') /* Add Smith */-- End of add contact;`;

it works, the reason it is at the end of the first value so it is correct it has to be after the comma .
i also test this and it works to
        CREATE TABLE IF NOT EXISTS contacts (
            id INTEGER PRIMARY KEY NOT NULL, -- testing
            email TEXT UNIQUE NOT NULL,
            name TEXT,
            FirstName TEXT,
            company TEXT,
            size REAL,
            age INTEGER,
            MobileNumber TEXT
        );

@jepiqueau I agree that the comments need to be after all the SQL statements, so from -- to the linebreak \n is commented out - if it was before the comma, the comma would be included in the comment and thus there would be a syntax error.
As for the last example with creating a table, I get an error of Error: prepareSQL prepare failed rc: 1 message: incomplete input as mentioned above in my first snippet of creating a table with a comment at the end of the line. I'm trying this on iOS with the package version 5.6.1
Also, comments don't work before or after the statement on their own line, although they should by the spec

@msfstef
CREATE TABLE IF NOT EXISTS contacts (
            id INTEGER PRIMARY KEY NOT NULL, -- testing
            email TEXT UNIQUE NOT NULL,
            name TEXT,
            FirstName TEXT,
            company TEXT,
            size REAL,
            age INTEGER,
            MobileNumber TEXT
        );

and ```ts
INSERT INTO contacts /* some contacts / (name,FirstName,email,company,age,MobileNumber) VALUES
<EMAIL_ADDRESS>'IBM', 30, '4403050926'), -- Add Doe
('Watson','Dave','dave.watson@example.com','Apple', 30, '4407050932') / add Watson /,
('Smith', 'Jane'<EMAIL_ADDRESS>'IBM', 27, '33607556142') / Add Smith */-- End of add contact;`;
these two do not work on iOS and Android.
There is not much i can do for this as it is the internal sqlite commands which send an error message which is not the case for the web sqlite

@msfstef  after some moifications, i can make this working in iOS,
      insertQuery = `INSERT INTO contacts /* some contacts */ (name,FirstName,email,company,age,MobileNumber) VALUES
<EMAIL_ADDRESS>'IBM', 30, '4403050926') -- add Doe,
          ('Watson','Dave','dave.watson@example.com','Apple', 30, '4407050932') /* add Watson */,
          ('Smith', 'Jane'<EMAIL_ADDRESS>'IBM', 27, '33607556142') /* Add Smith */-- End of add contact;`;

Notice that -- add Doe is before the comma and not after
and
  const setMessages: Array<capSQLiteSet>  = [
    { statement:`
    /* Define the messages table */
    CREATE TABLE IF NOT EXISTS messages (
      id INTEGER PRIMARY KEY NOT NULL,
      contactid INTEGER, -- key to contacts(id)
      title TEXT NOT NULL,
      body TEXT NOT NULL,
      last_modified INTEGER DEFAULT (strftime('%s', 'now')),
      FOREIGN KEY (contactid) REFERENCES contacts(id) ON DELETE SET DEFAULT
    );`,
      values:[]
    },
  ];

      ret = await db.executeSet(setMessages);

i have now to check in Android, Electron and Web if it works

Looking into the iOS code, for executeSet the statements first go through UtilSQLCipher.executeSet, then they get processed by UtilSQLStatement.getStmtAndRetColNames, which in turn calls the confusing UtilSQLStatement.isReturning that mutates the statements themselves.
See these lines:
https://github.com/capacitor-community/sqlite/blob/e0466f4a4b03c62af8ec51677d60bb0125b0ddc0/ios/Plugin/Utils/UtilsSQLStatement.swift#L328-L330
The isReturning should not really mutate the provided SQL statement (the statement should end up in the underlying SQLite implementation as is, which clearly handles comments as per the spec), but it does by removing all newlines and messing with semicolons, ultimately making the syntax invalid as the newlines are an important part of determining what is a comment.
I've messed around a bit and not mutating the statement within isReturning comments work as they should. I'm reluctant to open a PR as I'm not fully understanding what isReturning is needed for (it seems to split some statements from their RETURNING clauses), but the parsing and mutating happening there is the culprit for the lack of comment support. You can see that the execute API does not go through this route and supports comments properly.

@msfstef Thanks for your help in searching for a fix. i will have a look back starting on your finding and see how i can solve this.

@msfstef the returning mode is use when you have in an INSERT, ... clause a RETURNING keyword meaning that you want to get the result of the whatever clause used

@msfstef Fix in v5.6.2 i add some comment examples in the API. Can you check on your side and please close the issue when done

@msfstef Is it working now?


Shellcheck

Adjust our scripts to met https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/pull/3371

@johnbley, FYI


Add support for Symfony 6

Add support for Symfony 6
Remove support for older versions of Symfony
Remove support for webpack V1

Why do we have this forked? Can't we drop it?


Eloquent: renameColumn doesn't work on columns with '-' in it with MariaDB

Laravel Version: Lumen 5.5.2
PHP Version: 7.0.22-0ubuntu<IP_ADDRESS>
Database Driver & Version: 10.0.31-MariaDB

Description:
When trying to rename a column with a -, the database throws a syntax error:
$ php artisan migrate

In Connection.php line 664:

  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check
  the manual that corresponds to your MariaDB server version for the right syntax to use near '-name g
  ood_name VARCHAR(255) NOT NULL' at line 1 (SQL: ALTER TABLE bug CHANGE weird-name good_name VARCHAR(
  255) NOT NULL)

In PDOConnection.php line 79:

  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check
  the manual that corresponds to your MariaDB server version for the right syntax to use near '-name g
  ood_name VARCHAR(255) NOT NULL' at line 1

In PDOConnection.php line 77:

  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check
  the manual that corresponds to your MariaDB server version for the right syntax to use near '-name g
  ood_name VARCHAR(255) NOT NULL' at line 1

I think the problem is that column name is not quoted, so the - is a syntax error. Maybe dbal is misbehaving?
Steps To Reproduce:
<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class RenameBug extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('bug', function (Blueprint $table) {
            $table->string('weird-name');
        });

        Schema::table('bug', function (Blueprint $table) {
            $table->renameColumn('weird-name', 'good_name');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}

I don’t think MariaDB is supported

MariaDB is essentially MySQL and I don't think it matters for my problem, because it clearly looks like the name is not escaped properly in the Query.

See also here

The query is:
ALTER TABLE bug CHANGE weird-name good_name VARCHAR(
  255) NOT NULL;

But it should be:
ALTER TABLE bug CHANGE `weird-name` good_name VARCHAR(
  255) NOT NULL;

See also here.
This means that this bug happens exactly the same with MySQL.
I've tried chasing the Query through the laravel source code, but I couldn't find where it is actually using PDO to talk to the database.

Looks like the exception comes from DBAL, so maybe it is their bug. But since I have no idea how Laravel uses DBAL, I'd like to get some help here.

I found this but I absolutely do not understand it!

As a workaround, you can quote the column name yourself:
$table->renameColumn('`weird-name`', 'good_name');

But won't that break once the bug is fixed?

It doesn't like it's going to be fixed anytime soon.

Since MariaDB isn't a supported driver this won't be fixed in the core anytime soon.

I'll mark this as a bug for now and check later if we can solve this.

@driesvints This also affects MySQL, PostgreSQL and SQLite (and Laravel 5.7).
The issue is that doctrine/dbal only quotes identifiers if they are keywords. I find that rather weird, but they apparently have no plans to change this.
We could fix it by quoting the column names ourselves. This would work because dbal checks whether they are already quoted.

I'm gonna close this as this is more a dbal issue than a Laravel issue. For now you can work around it with the suggestion from staudenmeir above.

There's a pr on dbal btw but it's for spaces: https://github.com/doctrine/dbal/pull/3876


regression test issue_1205 hangs on all Linux CI

https://dev.azure.com/tokio-rs/Tokio/_build/results?buildId=4073&view=logs&j=95c0de06-86ba-5b83-6acc-e8fdf9d57564&t=804b0c6d-d844-5f90-18fc-e53e483bd33c

So the only log is that its running for longer then 60 seconds?

So the only log is that its running for longer then 60 seconds?

@Thomasdezeeuw Yes, and the fact that it hanged on all Linux CIs during the same run.

See https://github.com/tokio-rs/mio/pull/1231#discussion_r359766938, my change was invalid.


Benchmarks after pip install candle_lib

It picks up candle from pip, which is a good thing, but there are bugs that we need to fix for it work:
(base) jain @ jain ~/projects/Benchmarks/Pilot1/NT3 (develop)
└─ $ ▶ python nt3_baseline_keras2.py
Importing candle utils for keras
Traceback (most recent call last):
  File "nt3_baseline_keras2.py", line 16, in <module>
    import nt3 as bmk
  File "/home/jain/projects/Benchmarks/Pilot1/NT3/nt3.py", line 61, in <module>
    class BenchmarkNT3(candle.Benchmark):
AttributeError: module 'candle' has no attribute 'Benchmark'

this is fixed. set CANDLE_DATA_DIR in your env and try again.

Yes. It works. Thanks. Will add noise tests soon


Potential regression on 2.2.x : ProtocolBinding in SAML2 AuthnRequest is set according to saml2Config.destinationBindingType

It looks like the saml2Config.destinationBindingType is used both by to generate the sp-metadata and generate the authnrequest (protocol binding)
but also to determine how the idp is going be the accessed.

seems the change on pac4j-saml/src/main/java/org/pac4j/saml/metadata/SAML2MetadataGenerator.java is the cause for that change.
Specifically as a new field binding makes use of destinationBindingType :
this.binding = configuration.getDestinationBindingType();
What is the intended purpose of that configuration element ?

There is as well :
public SAML2AuthnRequestBuilder(final SAML2ClientConfiguration cfg) { .. this.bindingType = cfg.getDestinationBindingType();
I suggest the creation of a new field in SAML2ClientConfiguration, eg serviceProviderBindingType which would bear the binding type of the callback
The other destinationBindingType would be kept for the hooking to the idp

I guess you tested the version 2.2.0 and indeed, there was a bug in the binding. It's fixed in version 2.2.1.

That's correct.
Thank you


gardening: make c++98-compat-extra-semi an error

This cleans up 90 instances of this warning and reduces the build spew
when building on Linux.  This helps identify actual issues when
building which can get lost in the stream of warning messages.  It also
helps restore the ability to build the compiler with gcc.

Replace this paragraph with a description of your changes and rationale. Provide links to external references/discussions if appropriate.

Resolves SR-NNNN.

Please test with following PRs:
apple/swift-corelibs-libdispatch#589
@swift-ci please test

Build failed
Swift Test OS X Platform
Git Sha - 910fbee14eb8452cf54bbdbf4d5b4861c7480944

@swift-ci please smoke test

Please test with following PRs:
apple/swift-corelibs-libdispatch#589
@swift-ci please smoke test

Please test with following PRs:
apple/swift-corelibs-libdispatch#589
@swift-ci please smoke test

Please test with following PRs:
apple/swift-corelibs-libdispatch#589
@swift-ci please test

Build failed
Swift Test Linux Platform
Git Sha - cbd0441034ea3023fd8a63c74fcdefbf276fa085

Please test with following PRs:
apple/swift-corelibs-libdispatch#589
@swift-ci please clean test


⚠ Bofrost.lu has degraded performance

In d4cab78, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1562 ms

Resolved: Bofrost.lu performance has improved in c8ddd62 after 6 minutes.


add document which explains multisig

This document explains what multisig is, links to the JSON-encoding of
the related condition/fulfillment, explains the use cases,
and also gives a few example flows one could implement to support
this feature in its rivine-enabled application.
The bash representation of the flow examples described in this document relies on the features to be implemented as part of following issues:

#338: create coin transactions as a raw JSON-encoded string;
#336: sign a raw JSON-encoded transaction and output it back in the JSON-encoded format;

As an extra it also relies on #337, as to be able to sign transactions by 3 or more parties in parallel.
Implicitly it also relies on #332, as that command will/can be used to manually, via the CLI client, find out the ID of the unspent output that is to be spend using multiple (required) signatures.
This document serves 3 purposes:

As documentation for anyone willing to support this feature into their rivine-enabled application (as mentioned above);
It motivates all feature-requests that were created today, as part of the multisig feature of the 1.0.6 milestone;
It ensures that we have entire flows ready in our head, such that we make sure that you spend unspent outputs locked by multisig conditions;

Our repo seems to fail to build/test on Golang TIP, we might need to update some vendoring.


Feat/responsive signin form

Issue #67
Description
I addressed the issue of the non-responsive sign-in form on mobile devices by implementing responsive design improvements. The changes made to the project include:
Added media queries to adjust the sign-in form's layout and styling based on screen width.
How to Verify:
To verify the changes, follow these steps:
-> Open the project on a mobile device (e.g., smartphone or tablet).
-> Navigate to the sign-in page.
-> Observe the sign-in form's behaviour and appearance on various screen sizes.
Screenshots 📷
Before:-

After:-

@Haris-Mohanty conflicts here also


I want to change user information.

I want to change user information.
Is there a way to get the user object in the view?

request.user ?


gpac's MP4Box runtime error

Describe the bug
MP4Box display this error whenever it's launched :
[Core] default modules not found
[core] Cannot create config file GPAC.cfg in /home/ao/.gpac directory
Fatal error: failed to initialize GPAC global configuration

It doesn't seem to be a filesystem permission issue, because I can create this file and directory myself.
Deleting them doesn't solve the issue.
To Reproduce
Steps to reproduce the behavior:

get gpac nix-shell -p gpac
run MP4Box or MP4Box -info $MP4VIDEO

Expected behavior
MP4Box should find this default modules it is complaining about!
Additional context
I tried using MP4Box on 2 computers following the 20.09 channel, and ran across this same issue.
Notify maintainers
@bluescreen303 @mgdelacroix
@FRidh (I saw you updated the gpac lately)
Metadata

system: "x86_64-linux"
host os: Linux 5.4.80, NixOS, 20.09.2122.2fbcd0b9df9 (Nightingale)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.3.9
channels(root): "nixos-20.09.2238.b94726217f7"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos
&
system: "x86_64-linux"
host os: Linux 5.4.81, NixOS, 20.09.2238.b94726217f7 (Nightingale)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.3.9
channels(root): "nixos-20.09.2238.b94726217f7"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:
# a list of nixpkgs attributes affected by the problem
attribute: nixpkgs.gpac
# a list of nixos modules affected by the problem
module:

And thanks for this awesome nixpkgs by the way!
It's been 2 months I intensively play with NixOS and it's my first issue so far.

I run into the same issue, with the gpac version (1.0.1) from unstable the issue does not show up!


IE 9 support

seems to be not working on IE 9 even from your official page

Checked the midnight js looks like on update headers function you are using translateZ which is known that IE does not support kind of 3d transforms well, so removing that translateZ value it works on IE 9. leaving only the translateY which is supported as 2d transformations

Same issue. I used @asotog fix.


Set logging levels for localhost and prod environments

Ticket Link
GROUPINGS-1442
Test Checklist

[x] Unit Tests Passed:
[x] Jasmine Tests Passed:
[x] General Visual Inspection:

I added the missing the logging level properties for application-prod.properties that should have been in this PR: https://github.com/uhawaii-system-its-ti-iam/uh-groupings-ui/pull/823. Now the UI and API have matching properties files for logging levels.


Is the evaluation code for PEZ available?

The method is evaluated in randomly sampled 100 data points across 4 different datasets. Are that code and sample indices available? Thanks!

Hi @SydCS, thanks for asking. Our code is a little hard to clean rn since we load our local dataset on our cluster. However, the eval code is very easy to set up, you can first load the Hugging Face dataset (maybe with streaming) to get the image, and then, generate the prompt with PEZ with this function: optimize_prompt. After you get the prompt, you get the generated images with stable diffusion, and at the end you get the CLIP scores between the original image and the generated image.
In high-level, the code looks like:
# load dataset
dataset = load_dataset("detection-datasets/coco", split="val", streaming=True)
dataset_iter = iter(dataset)

# get all images
images = []
for _ in range(100):
    images.append(next(dataset)["image"])

for img in images:
    # get prompt
    prompt = optimize_prompt(..., target_images=[img])

    # generate image with SD
    gen_img = pipe(prompt).images

    # use (Open)CLIP to evaluate
    ori_feat = clip_model.encode_image(img)
    gen_feat = clip_model.encode_image(gen_img)
    ori_feat = ori_feat / ori_feat.norm(dim=1, keepdim=True)
    gen_feat = gen_feat / gen_feat.norm(dim=1, keepdim=True)
    clip_score = (ori_feat @ gen_feat.t()).mean().item()

Please let me know if you have any further questions.


iOS 11 drag item gets stuck

In the "Basics" section, I moved the green and purple box to the lower left hand set of blocks, then tried to move the red and purple block from the top just a little bit, and it got stuck on the page.

Yeah, unfortunately there are still some issues on touch, which will be resolved very soon! I have updated the README to add least mention it!
https://github.com/Shopify/draggable#known-issues

Ah awesome! Thanks for such a quick response @tsov! Not sure how you want to handle this GH issue so I'll leave it open, but feel free to close it!

Thanks again for reporting, I have created an official issue documenting this behaviour: https://github.com/Shopify/draggable/issues/40
I will close this issue for now


Classes are unsoundly considered subtypes of objects with optional keys

A class type C that has no attribute by the name attr is unsoundly
considered by Flow to be a subtype of {attr?: T} for any type T.
This yields coerce:
// @flow
function coerce<T, U>(t: T): U {
  class C {}
  const x: C = new C();
  const y: { box?: { value: T } } = x;
  const z: { box?: "sentinel" } = x;
  y.box = { value: t };
  if (z.box != null && z.box !== "sentinel") {
    return (z.box: empty).value;
  }
  throw new Error("Unreachable.");
}
const twelve: number = coerce("twelve"); // no type error
twelve.toFixed(); // runtime error!

I noticed this in expecting ((p: Promise<{x?: string}>): {x?: string})
to be a type error. It turns out that it has nothing to do with
Promises specifically.
This is reproducible in Flow v0.83.0 (and master), and all the way back
to Flow v0.37.0, the earliest version available on Flow Try.

@mvitousek is this on your radar?

This now errors inside coerce


chore: bdd-spring-1580824000 to 0.0.1

chore: Promote bdd-spring-1580824000 to version 0.0.1

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approvers:
If they are not already assigned, you can assign the PR to them by writing /assign  in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS

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


Unit 2 changes

Including the one fix from the vendor making the MSIA OneNotes, so csintro1 and csintro2 are both ready for you when you have time @ganicke :)

@jwunderl, you're looking for a full review of both units?

last two are commits are corgi->corgio


export-env.sh supports custom .env file

What's the rationale for this line? Wouldn't this part of the if statement be equivalent to just . somefile?
https://github.com/girder/cookiecutter-girder-4/blob/850c51ece29bd03683fd0ef3fe1feabb1b384151/{{ cookiecutter.project_slug }}/dev/export-env.sh#L7
Running . export-env.sh works on zsh and bash, but if I put it into my .envrc it passes my .envrc file as $1 - which results in an endless loop. Removing the if statement and unconditionally executing the else block seems to work in both scenarios.
Where is export-env.sh being called with an argument?

The intent was to provide the ability to pass other .env files, as a general utility to users. Hopefully, this makes export_env.sh significantly more useful than if the .env file is hardcoded.
In the basic cookiecutter, there are no such other .files, but I was envisioning that some downstreams might add them.
However, if this feature is present, it definitely needs to work in any context which the script is sourced.
@danlamanna Do you know an alternate way to "get the first argument after the script file" which is more robust?

@danlamanna Any thoughts?


As of 12th June Fuckr won't log in

As of today the previously working Fuckr version I had (Courtesy of Robbie @RobbieTechie several months ago and still working yesterday) (I don't know how to get my version number!) is not working.
I have just read lots of threads this morning about editing code lines in individual files but there don't seem to be any posts of a working version download for the less computer savvy like me.
Has Grindr just updated? Do the newer code edits mean the program still works for some people?

Experiencing the same thing here as of a few hours ago. I'm receiving an HTTP 412 error. I previously had a working copy from @RobbieTechie using a few of the other minor fixes to package.json and fuckr.js but neither of those seem to be working anymore.
The last time this error happened, it the user-agent in package.json had to be updated. But it seems that is no longer doing the trick.

@mark-chat @GitYukari I was able to get mine working again by updating the package.json file. I updated the Version, and the User Agent.
"version": "3.28.6",
"user-agent": "Grindr3/<IP_ADDRESS>806042349<PHONE_NUMBER>49; iPhone; iOS 11.4.1)",

@zachdrago Thank you! This did indeed fix it. How did you find the user agent string?

@zachdrago Thank you, now It's working again!

This let me login, but now the user tiles don't show up and I still can't use Fuckr. Any suggestions? I get an error 404 right after I log in.

Mark I'm the same. Not working for me either and even though Zach posted how to fix it, I don't know what I need or how to do that.

Thanks @zachdrago - that worked for me. I only had to change the user-agent, no need to change version as it doesn't seem to be sent to Grindr.

Thanks @zachdrago , where did you find the correct user agent app version number to send?

Thanks again @zachdrago - it works perfectly.

@zachdrago Thanks! Your suggestion worked for me.
Could you explain how you figured out the new user-agent? Should we all be using the same one? Just have some concerns about privacy now :/

@GitYukari @waddup1001 @nezumi17 I proxy my iPhone's connection through my computer and monitor all network/API requests through the mobile Grindr app. No worries or concerns that we're all using the same User Agent, as it just tells the Grindr servers which "device" is being used to access the app. It's one of their way of forcing users to update the app regularly.
I'm not sure why it wouldn't be working for some of you. But I will continue to investigate on this end, and see what I can find.

@zachdrago
Wow!
Thanks so much.
ps AS this is Grindr related:
You're hot!
into?
:oP

@zachdrago 412 here is pretty much always a failed user agent.  Keeping the user agent ot either Android or iPhone consistently will solve this part of a 412.
As for the others, they are new, and I'm pretty sure I already know their problem, but last time I went to help 1 or 2 people, 5 more started bitching (or 1 or 2 created multipe users) because they were too lazy to read an entire post, so I'll let you handle this, (note the 404, not the 412) HINT: url

@helpneeded1 - Use a text editor like Notepad to open the file (package.json in this case, which sits in your fuckr folder), find the line of code that is referred to and change the relevant part then save it.
In this case it's quite easy as package.json is a very short file with only a few lines of code and you only have to make two changes.
I confess it gets more tricky with large files and multiple file changes and an "all-in-one" download of a working package is helpful, but the "owner/originator" of this project doesn't contribute too much these days.
Hopefully he is happily married and not needing Grindr in his life in any form!
We remain indebted to the users who can sniff out the problem and put in effort to find solutions.
(Not least because using Fuckr on a PC rather than the original app on my phone saves my eyesight and saves my iPhone battery from burn out and failure!)

@mark-chat thank you! I didn't think it would be that easy.
Thanks @zachdrago too.

@zachdrago I would like to know if there is a version of your fork that I can just unzip and run it like the original fuckr. I really like the visual adjustments you did.

Tried changing the package file but can't get it to work, I'm on a mac if that makes a difference.
This is what was before
"user-agent": "Grindr3/28234 (iPhone; iOS 11.0)",
tried changing it to the suggested correction but still get error 412 :(

have to second that
On Tue, Jun 12, 2018 at 11:23 AM mark-chat<EMAIL_ADDRESS>wrote:

@zachdrago https://github.com/zachdrago
Wow!
Thanks so much.
ps AS this is Grindr related:
You're hot!
into?
:oP
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tomlandia/fuckr/issues/199#issuecomment-396687371,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AObrIYQPzNg-NTCtf1xNSAYQAl9tXMwvks5t8AcagaJpZM4Uj2jO
.

Third it
From: Kav28 notifications<EMAIL_ADDRESS>Reply: tomlandia/fuckr reply<EMAIL_ADDRESS>Date: 15 June 2018 at 16:43:56
To: tomlandia/fuckr fuckr<EMAIL_ADDRESS>CC: Subscribed subscribed<EMAIL_ADDRESS>Subject: Re: [tomlandia/fuckr] As of 12th June Fuckr won't log in (#199)

have to second that
On Tue, Jun 12, 2018 at 11:23 AM mark-chat<EMAIL_ADDRESS>wrote:

@zachdrago https://github.com/zachdrago
Wow!
Thanks so much.
ps AS this is Grindr related:
You're hot!
into?
:oP
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/tomlandia/fuckr/issues/199#issuecomment-396687371,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AObrIYQPzNg-NTCtf1xNSAYQAl9tXMwvks5t8AcagaJpZM4Uj2jO
.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub(https://github.com/tomlandia/fuckr/issues/199#issuecomment-397529017), or mute the thread(https://github.com/notifications/unsubscribe-auth/AXYnHdGOTwsJJTobCUSCNa8nxpDbJP2Aks5t81esgaJpZM4Uj2jO).
{"@context":"http://schema.org","@type":"EmailMessage","potentialAction":{"@type":"ViewAction","target":"https://github.com/tomlandia/fuckr/issues/199#issuecomment-397529017","url":"https://github.com/tomlandia/fuckr/issues/199#issuecomment-397529017","name":"View Issue"},"description":"View this Issue on GitHub","publisher":{"@type":"Organization","name":"GitHub","url":"https://github.com"}} {"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/tomlandia/fuckr","title":"tomlandia/fuckr","subtitle":"GitHub repository","main_image_url":"https://assets-cdn.github.com/images/email/message_cards/header.png","avatar_image_url":"https://assets-cdn.github.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/tomlandia/fuckr"}},"updates":{"snippets":[{"icon":"PERSON","message":"@Kav28 in #199: have to second that\n\nOn Tue, Jun 12, 2018 at 11:23 AM mark-chat<EMAIL_ADDRESS>wrote:\n\n\u003e @zachdrago \u003chttps://github.com/zachdrago\u003e\n\u003e Wow!\n\u003e Thanks so much.\n\u003e ps AS this is Grindr related:\n\u003e You're hot!\n\u003e into?\n\u003e\n\u003e :oP\n\u003e\n\u003e —\n\u003e You are receiving this because you are subscribed to this thread.\n\u003e Reply to this email directly, view it on GitHub\n\u003e \u003chttps://github.com/tomlandia/fuckr/issues/199#issuecomment-396687371\u003e,\n\u003e or mute the thread\n\u003e \u003chttps://github.com/notifications/unsubscribe-auth/AObrIYQPzNg-NTCtf1xNSAYQAl9tXMwvks5t8AcagaJpZM4Uj2jO\u003e\n\u003e .\n\u003e\n"}],"action":{"name":"View Issue","url":"https://github.com/tomlandia/fuckr/issues/199#issuecomment-397529017"}}} { "@type": "MessageCard", "@context": "http://schema.org/extensions", "hideOriginalBody": "false", "originator": "AF6C5A86-E920-430C-9C59-A73278B5EFEB", "title": "Re: [tomlandia/fuckr] As of 12th June Fuckr won't log in (#199)", "sections": [ { "text": "", "activityTitle": "Kav28", "activityImage": "https://assets-cdn.github.com/images/email/message_cards/avatar.png", "activitySubtitle": "@Kav28", "facts": [ ] } ], "potentialAction": [ { "name": "Add a comment", "@type": "ActionCard", "inputs": [ { "isMultiLine": true, "@type": "TextInput", "id": "IssueComment", "isRequired": false } ], "actions": [ { "name": "Comment", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n"commandName": "IssueComment",\n"repositoryFullName": "tomlandia/fuckr",\n"issueId": 199,\n"IssueComment": "{{IssueComment.value}}"\n}" } ] }, { "name": "Close issue", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n"commandName": "IssueClose",\n"repositoryFullName": "tomlandia/fuckr",\n"issueId": 199\n}" }, { "targets": [ { "os": "default", "uri": "https://github.com/tomlandia/fuckr/issues/199#issuecomment-397529017" } ], "@type": "OpenUri", "name": "View on GitHub" }, { "name": "Unsubscribe", "@type": "HttpPOST", "target": "https://api.github.com", "body": "{\n"commandName": "MuteNotification",\n"threadId": 344942798\n}" } ], "themeColor": "26292E" }

Nice "issues" you guys are having

@zachdrago @RobbieTechie
so no idea about my edited text not working? i'm no programmer but I do know what lines of code look like so I'm pretty sure I did exactly what I had to do, could be a million things I guess?
I'm not even getting an error anymore, I just try to login and the name and password go blank and blocks itself, no error message.
Note: on a mac with High Sierra

@erickvns where did you download your version from?

@RobbieTechie well, the mac app I downloaded last year from the fuckr.me webpage, then it had to be updated by replacing some files I think you uploaded on this board? Something like changing the package.json file and don't remember if another one too, but I did that and the app worked again, until a couple of weeks ago when uploading pictures was not possible anymore (chat worked fine), and since the 12th I was getting the 412 error, edited the file and now I get no error message but it still doesn't log in.

Try editing the file fuckr.js, it's it should be in the main fuckr folder, and look for a line that says
photoOnly: true
change the true to false then save it, and see if that solves the problem when you run the app again.  If you don't use an xtra account and an xtra filter is enabled, such as the photoOnly, it will not show any profiles when loading, like what you are having happen
A 412 error is almost always the user agent, which the lines Zach gave would fix, so that should not cause an issue now.

Nope, the line was already set to false, still won't log in
thanks for trying though and thanks for all the hard work you've put into this app.

For those that need it , here is a working Mac version https://www.dropbox.com/s/dm8t7yz4of6v2jf/Fuckr.zip?dl=0 works on 2 of my Macs fine for me, so if it does not work something else is the issue for the error 412. (It already has the version and user agent changed as above).

@2ilent8cho
thanks for the upload, I still can't login, deleted the Fuckr folder from the user Library and also from the Application Support folder to see if that would help, but it didn't :(

try logging on via phone ... you might discover you've been banned (hence the account won't exist/log in anymore) - it'll tell you if thats the case.

@fm2000 well I'll be damned, my account was banned the same day they made changes to the app so I never thought that would be a problem, so sorry guys, now I have a full working version (last time the app was working I couldn't upload new pictures), thanks for all the help guys!

Hi,
I've put this version together using the various fixes mentioned throughout various comments & forks on here for windows users... I've put it into a zip file, just dump it on your desktop, open it using the shortcut and it should work for you.
I've left the source available for inspection after someone threw a coin mining chunk in their version just so you can go through and check everything's kosher :)
Enjoy & play safe!
Download R'Grind Here
JaiB!

For those that have followed this for a while, you actually still have issues in this that you didn't include fixes for (or fix yourself).  The source has been available all along, there was only one version by victorgrego that was released that he put a bitcoin miner in, that was also released, and then removed.
If you are going to re-brand someone's work, such as what you did here, you really should just promote that on your own rather than capitalize on the work others have done, or just include the fixes and leave it as Fuckr, as it's been done in the past by myself and a few others.....


@3.10.2 -<EMAIL_ADDRESS>

coverage: 99.245%. remained the same
when pulling dc22e1e3e9f52c4a93ec0693906de3218ec2ec97 on rc-3.10.2
into bf998839239aaaae8169031a84008bcfcb2b06f5 on master.


Support Auto-Discovery

https://medium.com/@taylorotwell/package-auto-discovery-in-laravel-5-5-ea9e3ab20518

I've already merged #815, but thank you @Omranic


Cant install pivpn on raspberry pi. Crash at user select menu

Trying to install pivpn onto my pi. Get half way through the config to the point of selecting a user and then it crashes. im no expert and was just following forums so can anyone give me some help
this is what the terminal shows:
pi@raspberrypi:~ $ sudo curl --insecure -L https://install.pivpn.io | bash
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
100   162  100   162    0     0    786      0 --:--:-- --:--:-- --:--:--   790
100 84313  100 84313    0     0   210k      0 --:--:-- --:--:-- --:--:--  210k
:::
::: sudo will be used for the install.
::: Hostname length OK
::: Verifying free disk space...
:::
::: Package Cache update is needed, running apt-get update -y ...
done!
:::
::: Checking apt-get for upgraded packages.... done!
:::
::: Your system is up to date! Continuing with PiVPN installation...
:::    Checking for git... already installed!
:::    Checking for tar... already installed!
:::    Checking for wget... already installed!
:::    Checking for curl... already installed!
:::    Checking for grep... already installed!
:::    Checking for dnsutils... already installed!
:::    Checking for whiptail... already installed!
:::    Checking for net-tools... already installed!
:::    Checking for bsdmainutils... already installed!
:::    Checking for dhcpcd5... already installed!
:::    Checking for iptables-persistent... already installed!
::: Using User: pi
:::
::: Checking for existing base files...
:::    Checking /usr/local/src/pivpn is a repo... not found!
:::    Cloning https://github.com/pivpn/pivpn.git into /usr/local/src/pivpn... [/]  fatal: unable to access 'https://github.com/pivpn/pivpn.git/': server certificate verification failed. CAfile: none CRLfile: none
main: line 1034: cd: /usr/local/src/pivpn: No such file or directory

Why are you using the --insecure flag? You are making yourself vulnerable to attacks. Just run curl -L https://install.pivpn.io | bash

Why are you using the --insecure flag? You are making yourself vulnerable to attacks. Just run curl -L https://install.pivpn.io | bash

I used it because curl -L https://install.pivpn.io | bash doesn't work

I used it because curl -L https://install.pivpn.io | bash doesn't work

This means that there are some SSL issues with your Raspbian installation, or (hopefully not), active attack on your network. You should not attempt to bypass security measures.

Are you trying to install PiVPN on a clean install of Raspberry Pi OS?
Is you Raspberry Pi clock correct? You can check by running date

I have checked everything and there is no active attack.
I normally use my pi for a samba file share server on the home network and have had it running as a server for the last year. 1) When I set up it was a clean raspberry pi os 2) yes the clock is correct
Is it best to start everything again from scratch and reinstall the os and rebuild the pi?

Is it best to start everything again from scratch and reinstall the os and rebuild the pi?

Let's see what's going on first with the connection to GitHub: curl -v https://github.com/pivpn/pivpn. Do you get some secure connection error or something like that? If you do get an error, what about with another website like https://google.com? Since it's related to SSL certificates, you might try to reinstall the associated package sudo apt install --reinstall ca-certificates.

Looks like i needed to reinstall the associated packages
Thanks for the help


format entire column

This is more of a question. I have scoured the internet trying to find out if there is a way to format an entire column as text. My "source" sheet has the entire column formatted as text but only the header row is text when I download/save it. The source file is just a "template" with only the header row having values. Rest are blank rows.
this is all I am doing in my code example (result is an arrayBuffer coming from the .NET webapi)
this.carrierRatesService.getCarrierRatesFileTemplate()
      .subscribe(result => {
        if (result.byteLength > 0) {
          const wb = xlsx.read(result, { type: 'buffer', cellStyles: true });
          const fileName = 'CarrierRatesTemplate.xlsx';
          xlsx.writeFile(wb, fileName)
        }})

This is the source file (7th row showing as Text datatype)

This is the result of my download (7th row as General datatype)

Is there a way to set an entire column manually? It is causing leading 0's to be cut off.

A "hacky" way that I made it work but decided not to use was to add a space in the columns I wanted to retain the type for like 1000 rows.. So I'm guessing it just doesn't pass through formatting information on null value cells

Hi! Tell me, did you create a file with the "text" cell format using an xlsx package or manually? The fact is that I manage to create files only with a "common" cell format, which leads to errors when working with the "=" symbol.  And we need just a way to create an xlsx file with cells of the "text" format

Hi! Tell me, did you create a file with the "text" cell format using an xlsx package or manually? The fact is that I manage to create files only with a "common" cell format, which leads to errors when working with the "=" symbol.  And we need just a way to create an xlsx file with cells of the "text" format

any updates? having the same issue


Investigate outlining support in Dart VM's AOT compiler

We should investigate adding outlining support to the VM's AOT compiler. Objective-C / Swift have now support for that which helps reduce the code size.
One possible way would be to refactor our AOT compiler to produce the IR for individual functions. That would give us more flexibility to e.g. introduce an LTO step that can perform global / module level inlining or outlining optimizations.
/cc @mraleph @alexmarkov

2-step compilation in our AOT compiler could be also used to make inlining decisions more precise and independent of the order of function compilation.


Is it possible to send an html file and request phantom to render it?

The title pretty much says it all. The use case for this is to test the rendering capabilities of phantom in a systematic way using nodeJS. I am not sure if this is the correct place to ask this or not...

Yes it is possible. But this is not the place to ask. Try stackoverflow. I am going to close. Issues are for bugs.


License

Could you please choose a license for this repo.

Fixed by https://github.com/JohnMcLear/ep_font_size/pull/14


Vickel: Watch bottleneck[\W_]*+calculator(?!.pro(?<=bottleneckcalculator.pro))

Vickel requests the watch of the watch_keyword bottleneck[\W_]*+calculator(?!\.pro(?<=bottleneckcalculator\.pro)). See the MS search here and the Stack Exchange search in text, in URLs, and in code.

bottleneck[\W_]*+calculator(?!\.pro(?<=bottleneckcalculator\.pro)) has been seen in 1 true positive, 0 false positives, and 0 NAAs.

Approved by Makyen in Charcoal HQ


Add ALWAYS ON TOP flag for sprite with Y Sort

Allow sprite to be always on top when (Y) sorting is used, add a flag maybe just for that.

done


CLIP models support?

Hi! I am interested how candle can work with such models like clip, for example openai/clip-vit-large-patch14-336?
Is it possible to load models like that to use it in candle? If possible, please share some starting point or examples i can investigate?
Thanks in advance, this project is very cool.

#1950


(dropbox) Is failing to parse version and download the binary

Currently both the dropbox and the dropbox_beta package folders are failing the update run, the former with an error of invalid version, and the later with an error that the download file couldn't be found.
I plan to have a look at both of these later this week, along with combining them to a single package with streams.

@AdmiringWorm
Dropbox package failed with a invalid version because of the compare check not finding the version in the dropbox forum yet. The beta version had a error in the url being used to download the installer had been changed by Dropbox.
I have since fixed both these errors and merged them into a stream package. I will be submitting the PR soon.

@RedBaron2 sounds good, however I do still plan to parse the url from the blog post itself.
But that is something I can do from a separate issue at a later date


DocsArchive-<IP_ADDRESS>Auto archive content

Please don't merge this PR until target archive repo PR https://github.com/OPS-E2E-PPE/docs-yml-archive-non-versioning-archive/pull/50 is merged into live branch.
Auto archive content to https://github.com/VSC-Service-Account/docs-yml-archive-non-versioning-archive.git

Docs Build status updates of commit 61126b8:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

.openpublishing.redirection.json
:white_check_mark:Succeeded

docs/TOC.yml
:white_check_mark:Succeeded
View

docs/index.yml
:white_check_mark:Succeeded
View

docs/to-be-archive/level1/article3-1-1.md
:white_check_mark:Succeeded
View

docs/to-be-archive/level1/article3-1-2.md
:white_check_mark:Succeeded
View

docs/to-be-archive/level1/article3-1-3.yml
:white_check_mark:Succeeded
View

docs/to-be-archive/level1/sql-database-engine.png
:white_check_mark:Succeeded

docs/to-be-archive/level2/article3-2-1.md
:white_check_mark:Succeeded
View

docs/to-be-archive/level2/article3-2-2.md
:white_check_mark:Succeeded
View

docs/to-be-archive/level2/article3-2-3.yml
:white_check_mark:Succeeded
View

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


HTTP server causes assertion failure when uploading large files via POST

Describe the bug
The Zephyr HTTP server throws an assertion failure when uploading large (roughly 1MB or larger) files via HTTP POST.
To Reproduce
Register a dynamic page for the HTTP server, and use an HTML form to upload a binary file (e.g. a firmware image) via POST to that dynamic page.
Expected behavior
HTTP dynamic page callbacks should be called repeatedly until the file has been received, and no assertions should be thrown.
Impact
Makes firmware upload unusable in one of our applications.
Logs and console output
ASSERTION FAIL [((header_field_mark ? 1 : 0) + (header_value_mark ? 1 : 0) + (url_mark ? 1 : 0) + (body_mark ? 1 : 0) + (status_mark ? 1 : 0)) <= 1] @ ZEPHYR_BASE/subsys/net/lib/http/http_parser.c:2225
Environment (please complete the following information):

OS: Linux
Toolchain: Debian 12
Commit SHA or Version used: Zephyr 3.7.0

Additional context
The assertion is not always hit, but the probability grows with file size.

Would you be able to provide a minimal application that shows the issue, the assertion seems to suggest an issue in received data or parsing of it?
Just to clarify the version, did you see the issue in 3.7 or in latest upstream?

I think we need some hint here, I've tried to reproduce this with http_server sample on qemu_x86, no success neither on current main, nor on v3.7-branch.

I've tried to reproduce on real hw (nucleo_h723zg) on 3.7 branch, asserts on, still no luck reproducing though...
Perhaps would be good to check if it's still reproducible on Zephyr 4.0.0 as the release is now out.

Closing as this cannot be reproduced. Please reopen if you have a means to reproduce it.


Backport: disable no-squash with backport-squash label

Changes proposed

Made no-squash option configurable, by default is set to true (i.e., using label backport) but if you want to force no-squash: false for any reason you can simply add label backport-squash rather than backport one.
Added concurrency so that if multiple jobs are triggered targeting the same PR only one will be kept alive

Check List (Check all the applicable boxes)

[x] My code follows the code style of this project.
[ ] My change requires changes to the documentation.
[x] I have updated the documentation accordingly.
[ ] All new and existing tests passed.

@johnaohara maybe this is just temporarily needed but I think that having this option enabled could be useful for the future (don't know maybe there will be other use cases where we would like to disable no-squash)

thanks


Add logo on navbar

A nice and simple logo can be added on navbar which looks relevant to the website

Hello @Ishita928,
Thank you creating an issue on this. I appreciate your thoughts.
As of now we've no intention to add any logo, but if you've any logo preference then share with me. I'll think about it.
Thank you!


Fixes ARP messages from being sent through wrong endpoints

Description
This PR fixes #1088, by adding a new API FreeRTOS_OutputARPRequest_Multi which requires the interface to be targeted while sending the ARP messages.
This PR also fixes some variable declarations that are present after code.
Test Steps

Checklist:

[x] I have tested my changes. No regression in existing tests.
[x] I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

#1088
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/bot run formatting

/bot run formatting

/bot run formatting

The addition of the function FreeRTOS_OutputARPRequest_Multi() is very useful.
However, at the moment the function is called, we already have a reliable endpoint pointer. So I think there is no need to iterate through all endpoints.
In your PR, I see the following loop:
void FreeRTOS_OutputARPRequest_Multi( const NetworkInterface_t * pxNetworkInterface,
                                      uint32_t ulIPAddress )
{
    /* Iterate through all endpoints that are attached to 'pxNetworkInterface'. */
    for( pxEndPoint = FreeRTOS_FirstEndPoint( pxNetworkInterface );
         pxEndPoint != NULL;
         pxEndPoint = FreeRTOS_NextEndPoint( pxNetworkInterface, pxEndPoint ) )
    {
        if( ( pxEndPoint->bits.bIPv6 == pdFALSE_UNSIGNED ) &&
            ( pxEndPoint->ipv4_settings.ulIPAddress != 0U ) )
        {
            // As for the endpoint, you are using the first IPv4 endpoint which has an IP-address
            break;
        }
    }
}

I am using the following configuration for a test:
    SetupV4_t setup_v4_first =
    {
        .pcMACAddress = "00-11-11-11-11-07",
        .pcIPAddress = "<IP_ADDRESS>",
        .pcMask = "<IP_ADDRESS>",
        .eType = eStatic,  /* or eDHCP if you wish. */
    };
    SetupV4_t setup_v4_second =
    {
        .pcMACAddress = "00-11-11-11-11-02",
        .pcIPAddress = "<IP_ADDRESS>",
        .pcMask = "<IP_ADDRESS>",
        .pcGateway = "<IP_ADDRESS>",
        .pcDNS[0] = "<IP_ADDRESS>",
        .eType = eStatic,
    };
    xSetupEndpoint_v4( &xInterfaces[ 0 ], &( xEndPoints[ 0 ] ), &setup_v4_first );
    xSetupEndpoint_v4( &xInterfaces[ 0 ], &( xEndPoints[ 1 ] ), &setup_v4_second );

( using net_setup.[ch] to configure the endpoints. )
When querying gateway "<IP_ADDRESS>" with ARP,  queries are still sent using wrong endpoints. The above function selects the first IPv4 endpoint, which is on the wrong network "172.x.x.x", in stead of "192.168.2.x".
When I swap the order of the declarations, the problem does not occur.
Your test-case: when I use two separate interfaces, the problem does not occur neither. But when I attach the 2 endpoints to the same interface, ARP does not work properly.
So my proposal is the following:
void FreeRTOS_OutputARPRequest_Multi( const NetworkEndPoint_t * pxEndpoint,
                                      uint32_t ulIPAddress )
{
    /* This is called from the context of the IP event task, so a block time
     * must not be used. */
    pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( sizeof( ARPPacket_t ), ( TickType_t ) 0U );
    // etc
}

You will have to change the calls in 4 locations, which is straightforward.
After the above change, the order of declaration of the endpoints doesn't matter anymore.
Regards

Hein,
I think you are referring to #1105
https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/pull/1105 and not my PR. My
PR was #1104 https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/pull/1104
My PR did not add a new function, It just fixed the
old FreeRTOS_OutputARPRequest() function.
After Tony opened #1105, I closed my PR.
I suggested to Tony that he include all the changes from my PR because
after the call to FreeRTOS_FindEndPointOnNetMask() we still need to make
sure that ulIPAddress is != 0 and != ~0 before we send an ARP request. They
haven't included tose checks in #1105 yet, but I hope they do eventually.
On Sun, Feb 25, 2024 at 10:12 AM Hein Tibosch @.***>
wrote:

The addition of the function FreeRTOS_OutputARPRequest_Multi() is very
useful.
However, at the moment the function is called, we already have a reliable
endpoint pointer. So I think there is no need to iterate through all
endpoints.
In your PR, I see the following loop:
void FreeRTOS_OutputARPRequest_Multi( const NetworkInterface_t * pxNetworkInterface,
uint32_t ulIPAddress )
{
/* Iterate through all endpoints that are attached to 'pxNetworkInterface'. */
for( pxEndPoint = FreeRTOS_FirstEndPoint( pxNetworkInterface );
pxEndPoint != NULL;
pxEndPoint = FreeRTOS_NextEndPoint( pxNetworkInterface, pxEndPoint ) )
{
if( ( pxEndPoint->bits.bIPv6 == pdFALSE_UNSIGNED ) &&
( pxEndPoint->ipv4_settings.ulIPAddress != 0U ) )
{
// As for the endpoint, you are using the first IPv4 endpoint which has an IP-address
break;
}
}
}
I am using the following configuration for a test:
SetupV4_t setup_v4_first =
{
    .pcMACAddress = "00-11-11-11-11-07",
    .pcIPAddress = "<IP_ADDRESS>",
    .pcMask = "<IP_ADDRESS>",
    .eType = eStatic,  /* or eDHCP if you wish. */
};
SetupV4_t setup_v4_second =
{
    .pcMACAddress = "00-11-11-11-11-02",
    .pcIPAddress = "<IP_ADDRESS>",
    .pcMask = "<IP_ADDRESS>",
    .pcGateway = "<IP_ADDRESS>",
    .pcDNS[0] = "<IP_ADDRESS>",
    .eType = eStatic,
};
xSetupEndpoint_v4( &xInterfaces[ 0 ], &( xEndPoints[ 0 ] ), &setup_v4_first );
xSetupEndpoint_v4( &xInterfaces[ 0 ], &( xEndPoints[ 1 ] ), &setup_v4_second );

( using net_setup.[ch]
https://github.com/htibosch/freertos_plus_projects/blob/master/plus/Framework/FreeRTOS-Plus-TCP-main/tools/tcp_utilities/net_setup.c
to configure the endpoints. )
When querying gateway "<IP_ADDRESS>" with ARP, queries are still sent using
wrong endpoints. The above function selects the first IPv4 endpoint, which
is on the wrong network "172.x.x.x", in stead of "192.168.2.x".
When I swap the order of the declarations, the problem does not occur.
Your test-case: when I use two separate interfaces, the problem does not
occur neither. But when I attach the 2 endpoints to the same interface, ARP
does not work properly.
So my proposal is the following:
void FreeRTOS_OutputARPRequest_Multi( const NetworkEndPoint_t * pxEndpoint,
uint32_t ulIPAddress )
{
/* This is called from the context of the IP event task, so a block time     * must not be used. */
pxNetworkBuffer = pxGetNetworkBufferWithDescriptor( sizeof( ARPPacket_t ), ( TickType_t ) 0U );
// etc
}
You will have to change the calls in 4 locations, which is straightforward.
After the above change, the order of declaration of the endpoints doesn't
matter anymore.
Regards
—
Reply to this email directly, view it on GitHub
https://github.com/FreeRTOS/FreeRTOS-Plus-TCP/pull/1105#issuecomment-1962970430,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AGALLJ4LCMHUFN62XC2ZL6DYVNIGHAVCNFSM6AAAAABDUGHJPCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNRSHE3TANBTGA
.
You are receiving this because you commented.Message ID:
@.***>

@evpopov wrote:

Hein, I think you are referring to #1105 and not my PR. My PR was #1104

Yes indeed, I was testing Tony's PR about FreeRTOS_OutputARPRequest().
My remarks also apply to your #1104.

Hi @htibosch,

    if( ( pxEndPoint->bits.bIPv6 == pdFALSE_UNSIGNED ) &&
       ( pxEndPoint->ipv4_settings.ulIPAddress != 0U ) )
   {
      // As for the endpoint, you are using the first IPv4 endpoint which has an IP-address
       break;
  }

The FreeRTOS_OutputARPRequest_Multi API doesn't have a break, the requests are sent through all the endpoints of the given interface.
Though the ARP request to the first endpoint is not necessary in this case, it will be sent through the second endpoint as well.

Hello @tony-josi-aws,

The FreeRTOS_OutputARPRequest_Multi API doesn't have a break, the requests are sent through all the endpoints of the given interface.
Though the ARP request to the first endpoint is not necessary in this case, it will be sent through the second endpoint as well.

I haven't had the time to check this thought:
Without the break, the ARP packet will be sent to each IPv4 endpoint that it up, but with a different return address. My router on <IP_ADDRESS> will reply to it, but the there is a problem: the ARP cache entry already has an entry for <IP_ADDRESS>, but with a different endpoint.
With the break, there is 50% chance that it works for me, that depends on the order in which de endpoints were added.

/bot run formatting


The label strings in BottomNavigationBar do not appear centred when overflow is set to visible and label string overflows

Use case
In the BottomNavigationBar, TextStyle for both selected and unselected labels has overflow property set to TextOverflow.ellipsis by default. To fully display long strings as labels, this property needs to be set to TextOverflow.visible. This makes sure when the string is too long to fit in the container, part of it moves to the next line. However, when this happens, the string is left aligned and there is no way to centre it. This is not a problem when there is no overflow as the container size is exactly same as string size, and because the container is always centred, the string appear in the centre. However when the string overflows, the container expands to maximum size and the string inside appears left aligned.
Proposal
Text should be centred even when the label string overflows to multiple lines.

@hellokshitij
This sounds more of a bug rather than a proposal.
Can you provide flutter doctor -v and a minimal code sample that shows the current behavior along with expected behavior ?
Thanks.

It is fairly simple to recreate. Here, I did it with a small change in the first example code given on this page: https://api.flutter.dev/flutter/material/BottomNavigationBar-class.html

I increased the length of the label string (line 76) and added this (line 87) to make sure overflow is visible:
selectedLabelStyle: const TextStyle(
    overflow: TextOverflow.visible,
  ),

As you can see, the label under Home icon isn't centred.
(I get exactly same results on my laptop)

Thanks for the update. I see the same behavior using latest stable and master.

 stable, master flutter doctor -v
[✓] Flutter (Channel stable, 2.5.0, on Mac OS X 10.15.4 19E2269 darwin-x64,
    locale en-GB)
    • Flutter version 2.5.0 at /Users/dhs/documents/fluttersdk/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 4cc385b4b8 (2 days ago), 2021-09-07 23:01:49 -0700
    • Engine revision f0826da7ef
    • Dart version 2.14.0

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.1

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

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

[✓] Connected device (3 available)
    • iPhone 12 Pro Max (mobile) • A5473606-0213-4FD8-BA16-553433949729 • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-14-3 (simulator)
    • macOS (desktop)            • macos                                •
      darwin-x64     • Mac OS X 10.15.4 19E2269 darwin-x64
    • Chrome (web)               • chrome                               •
      web-javascript • Google Chrome 93.0.4577.63

• No issues found!

[✓] Flutter (Channel master, 2.6.0-6.0.pre.127, on Mac OS X 10.15.4 19E2269
    darwin-x64, locale en-GB)
    • Flutter version 2.6.0-6.0.pre.127 at
      /Users/dhs/documents/fluttersdk/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ec3bd9edc4 (2 hours ago), 2021-09-16 20:02:02 -0700
    • Engine revision 72f08e4da3
    • Dart version 2.15.0 (build 2.15.0-116.0.dev)

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.10.1

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

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

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • Mac OS X 10.15.4 19E2269
      darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 93.0.4577.63

• No issues found!

This isn't really a bug, it's more of a proposal.
The material guideline recommends using brief language for the labels so as to not run into this issue in the first place, but I can imagine certain scenarios where this can happen, for example, when the simplest word to describe that action overflows by itself.  For example, in the code sample below the Transportation label overflows.
@HansMuller what are your thoughts on adding a TextAlign property to either the BottonNavigationBar or BottomNavigationBarTheme so that developers can control how the text is aligned when it overflows? For reference, the material guideline doesn't recommend truncating the text or wrapping it, but this isn't always avoidable.
Material 2 spec
Material 3 spec

screenshot

code sample
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  static const String _title = 'Flutter Code Sample';

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: _title,
      theme: ThemeData.from(colorScheme: const ColorScheme.light()),
      home: const MyStatefulWidget(),
    );
  }
}

class MyStatefulWidget extends StatefulWidget {
  const MyStatefulWidget({Key? key}) : super(key: key);

  @override
  State<MyStatefulWidget> createState() => _MyStatefulWidgetState();
}

class _MyStatefulWidgetState extends State<MyStatefulWidget> {
  int _selectedIndex = 0;
  static const TextStyle optionStyle =
      TextStyle(fontSize: 30, fontWeight: FontWeight.bold);
  static const List<Widget> _widgetOptions = <Widget>[
    Text(
      'Index 0: Home',
      style: optionStyle,
    ),
    Text(
      'Index 1: Business',
      style: optionStyle,
    ),
    Text(
      'Index 2: School',
      style: optionStyle,
    ),
    Text(
      'Index 3: Settings',
      style: optionStyle,
    ),
    Text(
      'Index 3: Settings',
      style: optionStyle,
    ),
  ];

  void _onItemTapped(int index) {
    setState(() {
      _selectedIndex = index;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('BottomNavigationBar Sample'),
      ),
      body: Center(
        child: Container(
          decoration: BoxDecoration(
            color: Colors.yellow,
          ),
          clipBehavior: Clip.antiAlias,
          height: 15,
          width: 15,
          child: const Icon(Icons.ac_unit, size: 20, color: Colors.red),
        ),
      ),
      bottomNavigationBar: BottomNavigationBar(
        items: const <BottomNavigationBarItem>[
          BottomNavigationBarItem(
            icon: Icon(Icons.home),
            label: 'Music',
            backgroundColor: Colors.red,
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.home),
            label: 'Transportation',
            backgroundColor: Colors.red,
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.business),
            label: 'Business',
            backgroundColor: Colors.green,
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.school),
            label: 'School',
            backgroundColor: Colors.purple,
          ),
          BottomNavigationBarItem(
            icon: Icon(Icons.settings),
            label: 'Settings',
            backgroundColor: Colors.pink,
          ),
        ],
        type: BottomNavigationBarType.fixed,
        landscapeLayout: BottomNavigationBarLandscapeLayout.linear,
        currentIndex: _selectedIndex,
        selectedItemColor: Colors.amber[800],
        onTap: _onItemTapped,
        selectedLabelStyle: const TextStyle(
          overflow: TextOverflow.visible,
        ),
        unselectedLabelStyle: const TextStyle(
          overflow: TextOverflow.visible,
        ),
      ),
    );
  }
}

I am still experiencing this issue


Dynamically changing tooltipBgColor

This PR is to replace this one: https://github.com/imaNNeo/fl_chart/pull/1348.
All credits goes to @apekshamehta
Original description:
Changes Made:
In the bar_chart_data.dart file:
Added a new parameter getTooltipColor to the constructor of BarTouchTooltipData.
Defined a new type GetBarTooltipColor, which is a function that takes a BarChartGroupData parameter and returns a Color.
In the bar_chart_painter.dart file:
Assigned the tooltip color to the _bgTouchTooltipPaint.color property using the getTooltipColor function from the tooltipData object.
Additionally, the getTooltipColor function has been utilized in the bar_chart_sample1.dart file within the feature/dynamic-tooltip-bgcolor branch.
Please review the changes for this pull request.

There are some minor changes. Please fix them, then It is ready to be merged!

Thanks for your quick response and action!
I hope to see more from you xD


ntr: decreased protein localization to chromatin at chromosome arms

standard def
PMID:16682348

decreased protein localization to chromatin at chromosome arms FYPO:0005386

edit file: 5f36967d7cb5b61e4a6211eb22979c7f1be12d30
release: b8e8e14d27cdadda3688d067256838564a118a90


Clarify Rate-Limiting use in Kubernetes

Do you want to request a feature or report a bug?
Bug
Did you try using a 1.7.x configuration for the version 2.0?

[x] No

What did you do?
This isn't a bug per se, but it might be a "documentation bug". I'm looking for some clarification around how to use rate-limiters with Traefik on Kubernetes.
Example situation: I have an app that can handle 10 rps per container instance. I need to make sure that each container never gets more than 10 rps. This means that if scaled to 2 pods, the service can handle 20 rps, if scaled to 5 it can handle 50 and so on.
I'm unsure how (and if!) Traefik supports this type of rate limiting based on scale. We're discussing this internally at the moment and are unsure if we have to implement ratelimiters in the application middleware itself, or if Traefik can handle it for us in such a way that the limiter is "per pod" based and not just a hard limit for the entire service. It would be good if the documentation was a bit clearer on this topic - maybe even a complete section on rate-limiting since there are multiple open issues regarding how to configure it.

Hi @trondhindenes , thanks for your interest in Traefik!
For now, rate limit in Traefik is only on the frontend part. It means that you can only do some rate limit between a user and a Traefik frontend. May be we can add something in the documentation to clarify this.
Rate limit "per pod" is not as simple as we can think at first, because, your rate limit should take care of how you loadbalance on servers. So it seems that what you need is more like a "new" loadbalancer type which take care of one server load capability. WDYT?

Hi @juliens thanks for commenting.
Yes probably a new loadbalancer type or even a new circuitbreaker type could be the place to implement this.
Since the loadbalancer attribute doesnt support "expressions", maybe a circuitbreaker is a more logical place to do this - something like:
[backends]
  [backends.backend1]
    [backends.backend1.circuitbreaker]
    expression = "MaxRps() > 10"
    [backends.backend1.servers.server1]
    url = "http://<IP_ADDRESS>:80"

I would still prefer this to be a per-server setting than a per-backend setting (similar to "weight") tho. So maybe some completely new construct is needed, something like:
[backends]
  [backends.backend1]
    [backends.backend1.circuitbreaker]
    expression = "MaxRps()"
    [backends.backend1.servers.server1]
    url = "http://<IP_ADDRESS>:80"
   maxrps = 10

That would allow configuring the setting on a per-server level, but actually activate the setting on a per-backend level, which kindof makes sense to me.

Just encountered this issue as well.
Since this is 3 years old, has anything changed, that would allow for a decent workaround?

Hi,
@trondhindenes I'm closing this PR because it is relative to Traefik v1, since this issue documentation has been revamped. Feel free to reopen this issue if needed.
@Xyaren if you encountered the same issue could you please open a new issue with detail on your use case and the Traefik version you are using
Thanks to both of you


Normalize Signing Keys

I started on this with PR microsoft/ApplicationInsights-dotnet-server#1042 but never had the time to finish.

All our Net45 projects are using two keys (develop & release).
NetCore only uses one key (release).
BaseSDK is using only one key.

fixed with #1736


Add null check for BaseNCodec decodning

Add null check for BaseNCodec decodning

Why?

Becuase this code, for example : new Base64().decode(myString) will produce NPE in case of myString is null. This is becuase of inner delegation to public byte[] decode(final byte[] pArray) method (in BaseNCodec class), which cannot handle null values.

这是一封自动回复邮件。已经收到您的来信，我会尽快回复。

<自动回复>
你好，你的来信我已收到，尽快会给你回复。

So don't call decode((String) null).

Becuase this code, for example : new Base64().decode(myString) will produce NPE in case of myString is null. This is becuase of inner delegation to public byte[] decode(final byte[] pArray) method (in BaseNCodec class), which cannot handle null values.

It make sense to encode a empty string, but it does not make sense to encode or decode a null string.

But guys, I am, as a framework user, expect that the framework will take care of this check. Do you really think I am doing the
decode((String) null) - I have a string in application, which can be null, and I, as a framework user, do not want to take care about making checks about it.
Indeed, fellows, I guess you have used Apache Commons. Take a look into its utility classes - they withdraw this boring responsibilities from the framework client.

Becuase this code, for example : new Base64().decode(myString) will produce NPE in case of myString is null. This is becuase of inner delegation to public byte[] decode(final byte[] pArray) method (in BaseNCodec class), which cannot handle null values.

It make sense to encode a empty string, but it does not make sense to encode or decode a null string.

I agree with that, but it forces the client the be aware of the fact that string is not null. I am responsible to check it, as a Client - why? I genuinely do not understand the logic behind it

Please avoid use of gender specific terminology such as "guys" or "fellows" when referring to members of the Tomcat community.

This code is not part of a framework. It is Tomcat's internal API. Applications should not be calling this code.

The logic behind the current design is simple: Tomcat never calls that method with null so a null check is unnecessary.

Ok, I am sorry, I will reference you directly :) I disagree with you, @markt-asf. The class Base64 is used directly by the clients. Just a couple of examples: this, and this, also this and e.t.c.) - and, as I already mentioned, Base64 delegates to BaseNCodec, which does not tolerate null.
@markt-asf I really do not understand why it is so hard to apply this minor, non-breaking change :) As I mentioned above, people are using this API in thier code (it is public b.t.w), so why not make their life easier?)

All those references you provided are for org.apache.commons.codec.binary.BaseNCodec not org.apache.tomcat.util.codec.binary.BaseNCodec
That the class is public is irrelevant. It has to be public as it is a utility class used by various Tomcat packages. Tomcat's public API is documented in the RELEASE-NOTES.
The change won't be applied because it isn't necessary and there is no desire to add unnecessary code bloat to Tomcat.
It your application wants to use Commons Codec then it should package it in WEB-INF/lib.

Ok, that make sence. I will use the public API

Ok, I am sorry, I will reference you directly :) I disagree with you, @markt-asf. The class Base64 is used directly by the clients. Just a couple of examples: this, and this, also this and e.t.c.) - and, as I already mentioned, Base64 delegates to BaseNCodec, which does not tolerate null.
@markt-asf I really do not understand why it is so hard to apply this minor, non-breaking change :) As I mentioned above, people are using this API in thier code (it is public b.t.w), so why not make their life easier?)

@Mikhail2048 , as @markt-asf has emphasised:

This code is not part of a framework. It is Tomcat's internal API. Applications should not be calling this code.

The examples you referenced is org.apache.commons.codec.binary.Base64, that is not this one org.apache.tomcat.util.codec.binary.BaseNCodec. Be aware the two packages are different.

@Mikhail2048 Your patch also doesn't even compile, so it wouldn't have been accepted, anyway.


Is there a way to switch network?

✅ Prerequisites

[ Yes] Did you perform a cursory search of open issues? Is this question already asked elsewhere?
[ Yes] Are you reporting to the correct repository (magic-sdk)?

❓ Question
I am implementing a new feature "Switching network" with Magic & web3js.
I could get it on Metamask wallet by following code:
          await (curWeb3.currentProvider as any)?.request({
            method: 'wallet_switchEthereumChain',
            params: [{ chainId: Web3.utils.toHex(newChainId) }],
          })

But web3 connected to Magic wallet throws an error.
Is there any alternative way?
🌎 Environment

Software
Version(s)

magic-sdk
17.3.0

Browser
Chrome

yarn
1.22.17

Operating System
Windows, CentOS

Hi. You would want to create magic instances for each of the networks you would like to connect to, and then add the UI functionality to choose which instance of magic you would like to use. Here is a tutorial for an example implementation of this.


Installing vagrant cask fails on sha256 checksum.

I'm trying to upgrade my vagrant cask following https://github.com/caskroom/homebrew-cask/commit/5412b8a3ecacb600250c692335ff157c558a6574, and I am getting the following error:
Error: sha256 mismatch
Expected: b05c13675118a7c57ef78f932047f3db44456fff3edb408615fea0ba2cf7afe9
Actual: 78d02afada2f066368bd0ce1883f900f89b6dc20f860463ce125e7cb295e347c

I have run brew update, and removed the cache file, and the same failure occcurs.
The exact command I'm running is brew cask install --appdir="/Applications" vagrant

Fixed by https://github.com/caskroom/homebrew-cask/commit/69682759fa9c45921b95292103d058d63736691f


Display previous requests in a dashboard format

When the user authenticates with the registry it the Web should fetch existing projects and display them in table format. This pate should be called the "dashboard" and is the main landing page users see.

Duplicate of #73


DO journal: add link

when the DO is a journal we don't have any active link to it, nor a url field.
for a quick fix i would make the doi active using google scholar. e.g.
10.1136/jnnp.57.11.1321 displayed is the hyperlink
https://scholar.google.fr/scholar?q=10.1136/jnnp.57.11.1321

the field should display a doi, e.g.
10.1136/jnnp.57.11.1321
in html, something like 10.1136/jnnp.57.11.1321

fixed


⚠ Thumbnails API Endpoint has degraded performance

In 02d2e99, Thumbnails API Endpoint (https://thumbnails.roblox.com/v1/assets?assetIds=82738847&format=Png&isCircular=false&size=30x30) experienced degraded performance:

HTTP code: 200
Response time: 1182 ms

Resolved: Thumbnails API Endpoint performance has improved in 9a9ac4c after 16 minutes.


Moving prototype development to repo from local env

@voglerdaniel does this close the issue? or are you still working on this branch?


Json forms does not work since 1.0.15

Json forms are rendered properly on version 0.2.18. But It doesn't render and shows json file contents instead on 1.0.15 and 1.0.16

The issue is being observed in the latest version 1.1.0 also


fix(reqwest): add default-tls feature to reqwest

enable default-tls feature to reqwest so that the binary can use OS's CA keystore.
It solves the problem that we cannot download cast from a self-hosted server with a private CA certificate.

Thanks.
How does reqwest handle certs when both default-tls and rustls-tls are enabled? Is the behavior documented somewhere?

Hello, from what I learnt, cargo features are additive..

Cargo features are additive, yeah, I'm just not sure which variant reqwest uses when multiple are enabled. I'm pretty sure one always wins over the other, I doubt it both would be active (e.g. one being fallback to the other).
My concern here is default-tls uses native TLS (OpenSSL), which makes the build process more complicated and fragile (need for OpenSSL headers, requires compiling C code, etc). I've actually tried using it initially, for the first version of agg, and I couldn't make it build on some platform/environment (don't remember which).
What about rustls-tls-native-roots? I think this could be the best of both worlds, using pure Rust rustls crate, but looking up certificates in common OS locations.
Can you test if it works with your private CA cert when you replace rustls-tls feature with rustls-tls-native-roots (and not enable default-tls)?

I actually just made this change in main branch, so you can just checkout main and test against your cert.

Hello @ku1ik , thanks a lot for your reply.
I got some local issue with my local build of agg . ( Error: application/octet-stream is not supported )  I will try figure it out .
Meanwhile , I've tested rustls-tls-native-roots on project asciinema. With rustls-tls-native-roots I can successfully upload record to my asciinema server with private CA cert. I assume that it works !
Thanks a lot !

I've updated the PR https://github.com/asciinema/asciinema/pull/643 accordingly .

I think we can close this PR.


Removing the tab binary after an upgrade breaks the running tab daemon

under xubuntu 20.04 terminal (bash, also rxvt, gnome-terminal), "tab foo" hangs
workaround: removing ~/.tab/ and reinstalling via "tab --install all" solves it

Hi @userxfce,
Thanks for all the bug reports!  This one is really interesting - and I saw it once when I ran 'cargo uninstall' and then 'brew install'.  What happened here is the v0.3.7 tab binary was removed.  The daemon re-launches it's own executable to spawn PTY processes, and if the tab binary is removed it can't do this.
Removing the ~/.tab directory was what fixed it - because it removed the daemon pidfile.  You can also use tab --shutdown after installing a new version to trigger a complete shutdown of the daemon and all PTY processes.
I think there are a few things that can be improved here:

Add documentation that tab --shutdown is recommended after upgrades.
Print a warning if the daemon binary and the command-line binary are not the same, and suggest tab --shutdown.
Print a stronger warning (or refuse to connect) if there are breaking API changes between the command-line and daemon binaries.

I also have an item on the backlog (#44) to shut down the daemon when the tab binary changes, but I've been holding off on implementing it because I'm worried about conflicting installations (e.g. both cargo and homebrew) causing weird behavior with daemon shutdowns.

The tab daemon should monitor it's own executable, as well as the tab runtime directory.  If the file doesn't exist, it should trigger a global shutdown.

In 0.4.0, there are incompatibility warnings for two cases (added in #180).

If the tab daemon was launched from a different executable file path than the tab client
If the tab daemon is on a different non-patch version than the tab client (e.g. 0.3.X vs 0.4.X)

Both warning messages recommend tab --shutdown.
I decided against auto-shutdown if the tab executable is removed because existing tabs still work in this case - and those tabs may have local servers, ssh sessions, etc.

After having run "tab --install all", and then "tab -shutdown", now running "tab" no longer hangs.
I think this should be closed.

Closing, v0.4.0 is released!


Error opening 'data/balori/XC324865.wav': System error

Hello blogger, I will report an error when I put the kaggle directory data into the data directory according to your requirements.

Issue seems related the file not existing or that you have not provided the correct directory to the sound file. See issue here: https://github.com/bastibe/python-soundfile/issues/227#issue-335847436


Determine address

This change would allow an orbit-db address to be determined through the API, without actually creating the database. This is useful for applications where peers may wish to determine other peers' orbit-db addresses purely based on their public keys. (I implemented this while experimenting with 3box and mentioned this to @oed).
~Currently this does produce side effects - the manifest and access controller are saved to IPFS. I don't currently see a way to get the IPFS hash from object.put without actually writing the data, but would love to know if there's a way to do this.~
EDIT: this no longer produces side effects
I did add a couple of tests to the create-open file (not sure if that's the right place). I'm happy to update the docs if this is something that you want to consider merging.

This would be very useful for us and the way we're using OrbitDB at Origin Protocol.

@tyleryasaka Thanks for this! It appears that ipfs add has an only-hash option that might allow for what you're after. Try that in js-ipfs with:
ipfs.add(content, { "onlyHash": true })

Might that help remove the necessary side effect?

@aphelionz Yeah, unfortunately we can't just use ipfs add here. We're using object.put which does not have the onlyHash option currently. I started looking into the implementation of object.put to see if there's an easy way to see how they're building the hash, but it got hairy pretty quickly.

@tyleryasaka ah, my mistake - I assume you've looked into this as well but just want to make sure... anything useful here? https://github.com/ipfs/js-ipfs/issues/1205#issuecomment-371134571

@aphelionz I skimmed over that but must have missed that. Trying that method now. 🤞

@aphelionz it worked! Thanks. 🎉

Thanks @tyleryasaka for the PR! Agreed this would be a useful function to add 👍 I left couple of questions in the comments.

Any updates on this? I'd like to use this feature fairly soon :)

Pinging @haadcode and @oed for another look :)

Looks fine now functionality-wise 👍 There are few things that could be improved in the code itself (splitting code into more functions etc.), but I don't think that's necessary and we can refactor things later as we plan to do anyways (if you want to further improve it, let me know and I can give provide more detailed feedback). Thanks @tyleryasaka for your work on the PR! ❤
Should resolve the conflicts before merging, but LGTM 👍


do-not-merge: go: update dependencies depending on<EMAIL_ADDRESS>

<EMAIL_ADDRESS>-><EMAIL_ADDRESS>

replace directive to update the version as spf13/cobra doesn't have a
release with the fix yet: https://github.com/spf13/cobra/issues/1091

go mod tidy

Note: on next updates of tendermint fork it will probably be easiest to just drop this commit
Do not merge, instead once approved just cherry-pick the commit on top of v0.33.4-oasis branch and create an v0.33.4-oasis2 release from that

not needed since even if we update this we still need the replace directive in the oasis-core: https://github.com/oasislabs/oasis-core/issues/2931


Issue 319: Enable delete readergroup

Change log description

Enable delete ReaderGroup on the RUST and Python clients.

Purpose of the change
Fixes #319
What the code does

Enable delete ReaderGroup on the RUST and Python clients.

How to verify it
TBD: Additional tests are being added.
All the existing tests and newly added tests should pass.

Codecov Report

Merging #342 (4091074) into master (792b81d) will decrease coverage by 0.53%.
The diff coverage is n/a.

:exclamation: Current head 4091074 differs from pull request most recent head c617c90. Consider uploading reports for the commit c617c90 to get more accurate results

@@            Coverage Diff             @@
##           master     #342      +/-   ##
==========================================
- Coverage   75.09%   74.56%   -0.54%
==========================================
  Files          47       47
  Lines       11633    11308     -325
==========================================
- Hits         8736     8432     -304
+ Misses       2897     2876      -21

Impacted Files
Coverage Δ

src/client_factory.rs
99.14% <ø> (ø)

src/event/reader_group.rs
92.63% <ø> (ø)

src/sync/table.rs
67.92% <ø> (ø)

shared/src/naming_utils.rs
73.33% <0.00%> (-23.94%)
:arrow_down:

src/segment/raw_client.rs
81.87% <0.00%> (-0.23%)
:arrow_down:

src/segment/writer.rs
84.12% <0.00%> (-0.08%)
:arrow_down:

src/sync/synchronizer.rs
76.62% <0.00%> (ø)

src/event/reader_group_state.rs
87.45% <0.00%> (+0.64%)
:arrow_up:

src/lib.rs
100.00% <0.00%> (+11.76%)
:arrow_up:


button and scroll conflict

if im on Jan 2015 and i scroll (not button press) to Apr 2015, then i press previous button it takes me to Feb 2015. why is this happening?

Thanks for pointing that out it looks like a bug. I'll investigate this one. Actually I might be able to write a test for it as well.

Since I added that functionality, the java calendars might be getting in an inconsistent state. Again, java calendar class is mutable and awkward :(.

I tested it in my calendar iand i got march the 1st fine

It's in master, try and see if it solves the problem. I think it should be fixed. Looks like you have to scroll a few months backwards/forwards and then use the buttons to scroll months. It''ll update the calendar to an incorrect month.

Available in:
dependencies {
    compile 'com.github.sundeepk:compact-calendar-view:1.7.7'
}

yes it is solved. thank u :)


Use relative imports only in plugin folder

I'm working on exporting type definitions from the app/plugin folder in order to make it easier to write plugins thanks to IntelliSense.
Type definitions are available in the _build folder (*.d.ts files).
Thankfully, the folder is mostly self-contained: it has some external dependencies, but no dependency to other folders in grist-core.
Using relative imports within this folder makes it possible to use the definition files as a standalone package.
Right now, I'm copying those files manually where I need them.
As a second step, we could imagine having a routine to copy those definition files to a separate package. That package could possibly live in this repo using yarn workspaces 🤷🏻

Thanks for the link, this looks very relevant to what I'm trying to do! I'll take a close look 👀