RuntimeError: API version mismatch: librealsense.so was compiled with API version 2.11.0 but the application was compiled with 2.9.1!

Required Info

Camera Model
D415

Firmware Version
<IP_ADDRESS>

Operating System & Version
Linux (Ubuntu 16.04 LTS)

Kernel Version (Linux Only)
4.13.0-41-generic

Platform
PC

SDK Version
2

Issue Description
I use pip install pyrealsense2 to get the python wrapper.
When I run the quick start example , I get the error below.
Traceback (most recent call last):
  File "quick.py", line 2, in <module>
    pipe = rs.pipeline()
RuntimeError: API version mismatch: librealsense.so was compiled with API version 2.11.0 but the application was compiled with 2.9.1! Make sure correct version of the library is installed (make install)

I follow this doc to install sdk 2.0 on my system.
So do I just need to compile the sdk from the source to update the librealsense.so ? Or it is the matter caused by python wrapper?

[Realsense Customer Engineering Team Comment]
Hi @longjj,
Please check below instructions and examples there.
https://github.com/IntelRealSense/librealsense/tree/development/wrappers/python
https://github.com/IntelRealSense/librealsense/tree/development/wrappers/python/examples

I believe that the wrapper version currently available via pip is somewhat older. You can either fetch the older version of the SDK, or build the wrapper from source using the documentation above.
We are planning to update the package, but currently it is not part of our regular release cycle.

@dorodnic @RealSense-Customer-Engineering
Thx, it does work!

Some related issue and docs may be useful for the new commer.
#1220
https://github.com/IntelRealSense/librealsense/blob/master/doc/installation.md

Required Info |
-- | --
Camera Model | D435
Firmware Version | <IP_ADDRESS>
Operating System & Version | Ubuntu 16.04.6 LTS
Kernel Version (Linux Only) | 4.15.0-64-generic
Platform | PC
SDK Version | 2
Hi,
I have the same problem, but with different versions.
API version mismatch: librealsense.so was compiled with API version 2.28.0 but the application was compiled with 2.25.1! Make sure correct version of the library is installed (make install)
I followed https://github.com/IntelRealSense/librealsense/tree/development/wrappers/python but still the above error still occurs.
My steps were:

mkdir reposerver
cd reposerver
git clone https://github.com/IntelRealSense/librealsense.git
cd librealsense
mkdir build
cd build
cmake ../ -DBUILD_PYTHON_BINDINGS:bool=true -DPYTHON_EXECUTABLE=/usr/bin/python
make -j4
sudo make install
export PYTHONPATH=$PYTHONPATH:/usr/local/lib


IPTables / Firewall Cluster Servers

There's a bug in the generation of the list of clustered servers in the IPtables module.
All of the checkboxes are being assigned no ID and the label associated with the group name (and therefore acting only on the first checkbox and something in the CSS is not quite working correctly with the actual checkboxes visible outside of the table.
I'm seeing this on
Chrome (latest version)
Webmin 18.52
Athentic 18.49-9
CENTOS 6.9
But has been present in previous versions.
I'm very happy to try and take a look but might need a little guidance.

On a further note: I have looked at the same page in the old virtualmin framed theme and I suspect that it's the default bootstrap behaviour partially kicking in injecting labels and trying to 'prettify' the checkboxes, but something is missing.

What is the id of the checkbox? Does it contain special chars? Could you attach a screenshot please?

The checkboxes don't appear to have an id, just a name attribute, which I suspect is part of the issue.

I see now. Thanks. I'll take a look. :sweat_smile:

Cool! Happy to help in any way I can

jamie merged a big firewall update a few days ago. does this happen with this update also?

@quayfee Do you still see this issue with latest 19.01? Can you give it a try please?

It's fixed. Give it a try.

Hi qooob, Just back in the office, I will check it out this afternoon. Thanks


shippingaddresschange returning empty array for addressLine

Summary

Listening to the shippingaddresschange event is returning an incorrect address object, notably an empty array for the key addressLine. I'm not sure if this is a problem with the library itself or a problem with ApplePay.
Other information

paymentRequest.on('shippingaddresschange', (ev) => {
  if (ev.shippingAddress.country !== 'US') {
    ev.updateWith({status: 'invalid_shipping_address'});
  } else {
    console.log(ev.shippingAddress);
    ev.updateWith({ status: 'success' });
  }
});

/* returns
{
  addressLine: [],
  city: "Seattle",
  country: "US",
  dependentLocality: "",
  organization: "",
  phone: "",
  postalCode: "98101",
  recipient: "",
  region: "WA",
  sortingCode: "",
}
*/

Notice in the ApplePay modal both Address Line 1 and Recipient exist, but don't get returned.

macOS 10.14.2
Safari 12.0.2

As mentioned in the docs [0], browsers and payment methods may strip some parts of the shipping address they deem not necessary to calculate shipping costs. This is by design for Apple Pay.
[0] https://stripe.com/docs/stripe-js/reference#payment-request-on

Hi @atty-stripe - is the only way on web to use Apple Pay then to get a valid shipping address first? We were hoping to save the shipping address directly from Apple Pay.

@bkrall The shippingaddresschange event will have a subset of the shipping address, but the token or source object will have the complete address. So you can certainly depend on Apple Pay for the full address.

@atty-stripe thanks, that's encouraging.
right now in the token object I'm seeing all of these address fields as null, I have a shipping address for the card in Apple Pay but I'm not seeing it come through in the token, anything else I should check? Getting a valid token back using this method: https://stripe.com/docs/stripe-js/elements/payment-request-button#complete-payment
card: Object
address_city: null
address_country: null
address_line1: null
address_line1_check: null
address_line2: null
address_state: null
address_zip: null
address_zip_check: null
brand: "American Express"
...

Thanks @atty-stripe, I was indeed incorrectly listening to the shipping address change and not looking at the token returned.


支持0.8 版本的吗

支持0.8 版本的吗

Producer should work with 0.8. As well as SimpleConsumer. GroupConsumer API (v2) is not available in Kafka 0.8 and I have no plans to implement deprecated protocol.


Determination of package version

I set up my repo similarly to grpc-curl. These are my configs.

fsproj
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net6.0</TargetFramework>
    <RootNamespace>TubeDl</RootNamespace>
    <AssemblyName>switchtube-dl</AssemblyName>
  </PropertyGroup>

  <ItemGroup>
  # Compile Includes
  </ItemGroup>

  <ItemGroup>
    <ResolvedFileToPublish Include="..\..\README.md">
        <RelativePath>README.md</RelativePath>
        <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
    </ResolvedFileToPublish>

    <ResolvedFileToPublish Include="..\..\LICENSE">
        <RelativePath>LICENSE</RelativePath>
        <CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
    </ResolvedFileToPublish>

   # Package References removed
  </ItemGroup>

</Project>

pipeline
name: ci

on:
    push:
        paths-ignore:
            - 'CHANGELOG.md'
            - 'README.md'
    pull_request:

jobs:
    build:
        runs-on: windows-latest

        steps:
            - name: Checkout 🛎
              uses: actions/checkout@v2

            - name: Install .NET 6.0 🧳
              uses: actions/setup-dotnet@v1
              with:
                  dotnet-version: '6.0.x'

            - name: Install dependencies 🔌
              run: dotnet restore src

            - name: Build project 🏗
              run: dotnet build src -c Release --no-restore

            - name: Publish 🚀
              if: github.event_name == 'push'
              run: |
                  if ( "${{github.ref}}" -match "^refs/tags/[0-9]+\.[0-9]+\.[0-9]+" ) {
                      dotnet tool install --global dotnet-releaser --version "0.1.*"
                      dotnet-releaser publish --github-token ${{secrets.TOKEN_GITHUB}} src/dotnet-releaser.toml
                  } else {
                      echo "publish is only enabled by tagging with a release tag"
                  }

toml file (in src folder)
# configuration file for dotnet-releaser
[msbuild]
project = "SwitchTubeDl/SwitchTubeDl.fsproj"
[github]
user = "panmau"
repo = "switchtube-dl"

[changelog]
path = "../CHANGELOG.md" # Default config didn't find Changelog

[nuget]
publish = false

What I didn't find out yet is how the version of the package is determined. I added tag 1.0.0 and it made the 1.0.0 version. Then i made 1.0.1 and it made another 1.0.0 version.
Shouldn't this be determined from the associated GitHub Tag? Or do I need to set the Version field in the fsproj?
I didn't find anything about it in the User Guide and Readme.
Thanks a lot for your help.
Other than that I have to say that it's working really well!

What I didn't find out yet is how the version of the package is determined. I added tag 1.0.0 and it made the 1.0.0 version. Then i made 1.0.1 and it made another 1.0.0 version.

That's normal, but something I might need to clarify in the doc. dotnet-releaser doesn't touch the version of your package. It will fetch the version of the package from your csproj. By default, a csproj will setup the version to 1.0.0.

Shouldn't this be determined from the associated GitHub Tag? Or do I need to set the Version field in the fsproj?

So dotnet-releaser doesn't enforce that. You might use a manual tag, you might use MinVer or GitVersion or Nerdbank.GitVersioning.
I would suggest in your case to use MinVer because it is exactly handling what you are expecting.
I will keep this issue around to clarify the doc.

I just started to use MinVer and I'm probably going to generalize it across all my OSS projects:
https://github.com/xoofx/dotnet-releaser/blob/dcde4a0a6f477c2f9bde0d6c320d4f6f5c8d2f26/src/dotnet-releaser/dotnet-releaser.csproj#L48-L51

Thanks for the quick clarification. It's what I figured but very good to know that MinVer seems to handle that case perfectly.
As you say, I think that the doc should clarify that dotnet-releaser doesn't handle this and add pointers to these other packages.

This worked perfectly now with MinVer!
A new small question popped up though:
One of my NuGet dependencies copies a file (namely FsharpLu) to the Publish directory which I don't want in my packaged file. I didn't find out how I can override that in my proj file / whether that is even possible.
Or does it need to be excluded on the release side? How can I do that with dotnet-releaser?
Thanks again in advance.

Or does it need to be excluded on the release side? How can I do that with dotnet-releaser?

dotnet-releaser doesn't interact with this directly so you would have to plug this into the fsproj doing this. MSBuild itself is too configurable to surface this in dotnet-releaser. So, if it is to remove the <Content Include="Sysprep.ps1">, then maybe you could create a target executing before the Publish that would remove it, something along the lines of this (syntax might not be exact, not tested):
<Target Name="RemoveMisc" BeforeTargets="Publish">
  <ItemGroup>
    <Content Remove="Sysprep.ps1"/>
  </ItemGroup>
</Target>

Thanks a lot for the pointer in the right direction!
I now got it working using this:
<Target Name="RemoveMisc" AfterTargets="_PublishNoBuildAlternative">
    <Delete Files="$(PublishDir)\Sysprep.ps1"/>
</Target>

[Source]

Closing as fixed.


Improve Design Layout for Options page

Also fixes #304

It looks like you branched from chrome-extension-master instead of the develop branch, which is why there are so many merge commits. You'll need to clean your branch's history of the chrome-extension-master history, or create a new branch from develop and apply your changes on top of it.

Yeah I realized that. My bad.


ENH : Added a new script just for coveralls test coverage.

This stops the yarn test from returning an error throwed by the coveralls on the development workspace. Remember to update Travis to run both commands: yarn test and yarn coveralls.

Coverage remained the same at 100.0% when pulling 9eb62b4b43effb8dabe3d350e6c707b532bbbf0e on fix-add-test-coverage-npm-script into f4af1b55b2a3408fd4dc0381fed649cb6b628a1b on develop-1.0.0.


Add discovery of Elastigroups

Elastigroups are alternatives to Auto Scaling Groups which are typically used to manage Spot fleets.
The agent should also discover Elastigroups and provide the same level of functionality as the native Auto Scaling Groups.

Implemented in #145 and enhanced by #150


enabled volume option in bubble

@jwerle
looks like you didn't build before committing your lastvolume fix?  that's probably why it wasn't working still.

:+1:


knot-resolver: 2.1.1 -> 2.2.0

Semi-automatic update generated by https://github.com/ryantm/nix-update tools.
This update was made based on information from https://repology.org/metapackage/knot-resolver/versions.
These checks were done:

built on NixOS
ran /nix/store/2fpr2hzspmrnnvmawxd3mv28774rysma-knot-resolver-2.2.0/bin/kresd -h got 0 exit code
ran /nix/store/2fpr2hzspmrnnvmawxd3mv28774rysma-knot-resolver-2.2.0/bin/kresd --help got 0 exit code
ran /nix/store/2fpr2hzspmrnnvmawxd3mv28774rysma-knot-resolver-2.2.0/bin/kresd -V and found version 2.2.0
ran /nix/store/2fpr2hzspmrnnvmawxd3mv28774rysma-knot-resolver-2.2.0/bin/kresd --version and found version 2.2.0
ran /nix/store/2fpr2hzspmrnnvmawxd3mv28774rysma-knot-resolver-2.2.0/bin/kresd -h and found version 2.2.0
ran /nix/store/2fpr2hzspmrnnvmawxd3mv28774rysma-knot-resolver-2.2.0/bin/kresd --help and found version 2.2.0
found 2.2.0 with grep in /nix/store/2fpr2hzspmrnnvmawxd3mv28774rysma-knot-resolver-2.2.0
directory tree listing: https://gist.github.com/3b59aaaf9f7d90b8de351b6eb712e2a5

cc @vcunat for review

Success on x86_64-linux (full log)
Attempted: knot-resolver
Partial log (click to expand)
strip is /nix/store/fzcs0fn6bb04m82frhlb78nc03ny3w55-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/2fpr2hzspmrnnvmawxd3mv28774rysma-knot-resolver-2.2.0/lib  /nix/store/2fpr2hzspmrnnvmawxd3mv28774rysma-knot-resolver-2.2.0/sbin
patching script interpreter paths in /nix/store/2fpr2hzspmrnnvmawxd3mv28774rysma-knot-resolver-2.2.0
checking for references to /build in /nix/store/2fpr2hzspmrnnvmawxd3mv28774rysma-knot-resolver-2.2.0...
moving /nix/store/2fpr2hzspmrnnvmawxd3mv28774rysma-knot-resolver-2.2.0/sbin/* to /nix/store/2fpr2hzspmrnnvmawxd3mv28774rysma-knot-resolver-2.2.0/bin
shrinking RPATHs of ELF executables and libraries in /nix/store/b2mqqy9ky56ckx67rdyyz328yyp40sqw-knot-resolver-2.2.0-dev
strip is /nix/store/fzcs0fn6bb04m82frhlb78nc03ny3w55-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/b2mqqy9ky56ckx67rdyyz328yyp40sqw-knot-resolver-2.2.0-dev/lib
patching script interpreter paths in /nix/store/b2mqqy9ky56ckx67rdyyz328yyp40sqw-knot-resolver-2.2.0-dev
checking for references to /build in /nix/store/b2mqqy9ky56ckx67rdyyz328yyp40sqw-knot-resolver-2.2.0-dev...

Success on aarch64-linux (full log)
Attempted: knot-resolver
Partial log (click to expand)
stripping (with command strip and flags -S) in /nix/store/7565fjpxkgz2wzavcy5bqg48rlkyifr1-knot-resolver-2.2.0/lib  /nix/store/7565fjpxkgz2wzavcy5bqg48rlkyifr1-knot-resolver-2.2.0/sbin
patching script interpreter paths in /nix/store/7565fjpxkgz2wzavcy5bqg48rlkyifr1-knot-resolver-2.2.0
checking for references to /build in /nix/store/7565fjpxkgz2wzavcy5bqg48rlkyifr1-knot-resolver-2.2.0...
moving /nix/store/7565fjpxkgz2wzavcy5bqg48rlkyifr1-knot-resolver-2.2.0/sbin/* to /nix/store/7565fjpxkgz2wzavcy5bqg48rlkyifr1-knot-resolver-2.2.0/bin
shrinking RPATHs of ELF executables and libraries in /nix/store/wkyakmkzwdgal0j35ic792kmp2f6bqv1-knot-resolver-2.2.0-dev
strip is /nix/store/3zq400fri5dv7d30lpxlqm2v9y1iis6j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/wkyakmkzwdgal0j35ic792kmp2f6bqv1-knot-resolver-2.2.0-dev/lib
patching script interpreter paths in /nix/store/wkyakmkzwdgal0j35ic792kmp2f6bqv1-knot-resolver-2.2.0-dev
checking for references to /build in /nix/store/wkyakmkzwdgal0j35ic792kmp2f6bqv1-knot-resolver-2.2.0-dev...
/nix/store/7565fjpxkgz2wzavcy5bqg48rlkyifr1-knot-resolver-2.2.0

Success on x86_64-darwin (full log)
Attempted: knot-resolver
Partial log (click to expand)
Patching '/nix/store/0xvsdb0ls7mjjigk69rsilgn25c79p2a-knot-resolver-2.2.0-dev/lib/pkgconfig/libkres.pc' includedir to output /nix/store/0xvsdb0ls7mjjigk69rsilgn25c79p2a-knot-resolver-2.2.0-dev
gzipping man pages under /nix/store/8kc3mcyrhfjkp1vi272l2ybvv4qc5w0x-knot-resolver-2.2.0/share/man/
strip is /nix/store/0fzpxnsanc02i4jsb1yhchjp4p62b2n3-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/8kc3mcyrhfjkp1vi272l2ybvv4qc5w0x-knot-resolver-2.2.0/lib  /nix/store/8kc3mcyrhfjkp1vi272l2ybvv4qc5w0x-knot-resolver-2.2.0/sbin
patching script interpreter paths in /nix/store/8kc3mcyrhfjkp1vi272l2ybvv4qc5w0x-knot-resolver-2.2.0
moving /nix/store/8kc3mcyrhfjkp1vi272l2ybvv4qc5w0x-knot-resolver-2.2.0/sbin/* to /nix/store/8kc3mcyrhfjkp1vi272l2ybvv4qc5w0x-knot-resolver-2.2.0/bin
strip is /nix/store/0fzpxnsanc02i4jsb1yhchjp4p62b2n3-cctools-binutils-darwin/bin/strip
stripping (with command strip and flags -S) in /nix/store/0xvsdb0ls7mjjigk69rsilgn25c79p2a-knot-resolver-2.2.0-dev/lib
patching script interpreter paths in /nix/store/0xvsdb0ls7mjjigk69rsilgn25c79p2a-knot-resolver-2.2.0-dev
/nix/store/8kc3mcyrhfjkp1vi272l2ybvv4qc5w0x-knot-resolver-2.2.0

:-D you're fast!  I do believe no other changes are required.

Just trying to keep up with @ryantm's flow :)

Maybe I need to write a bot to auto-merge PRs :rofl:


Add missing documentation/refactor backend codebase

It is necessary to document every function and class in accordance with the tech stack and refactor the codebase wherever possible.

I would like to work on this issue! Please assign this issue to me!

@AryanGupta0007 Keep it assigned to yourself until issue is closed

As i am not working on this issue. I think I should unassign myself so that any one else who wishes to work on this can take up this issue.
cc: @SID262000

Sure Aryan, feel free to unassign yourself in case you feel so. I was under the assumption that @neelansh27 and you were working on this.

i unassigned myself as currently I  don't have the time for this vast issue.  Maybe give chance to a newcomer so they can atleast make some contribution as docs are the best beginner friendly issues.
cc: @SID262000

Sure thing @AryanGupta0007 . Thanks for the update

Hi @SID262000,
Hi @AryanGupta0007,
Do you need any help with the documentation? If yes, I'll try to help you wherever I can.

@SID262000 i am not working on this issue .

@N3v1 Please start contributing to it actively.
Also, @Maghish feel free to join in, to speed up the process.
Thanks @AryanGupta0007 for acknowledging

Hi @SID262000, I would like to start working on it from Friday as I have a very busy week
@Maghish We have to split the work
@SID262000 What should we exactly document? Please provide a ToDo List for us. Thanks

It's really difficult for me to provide a detailed written Todo list for each Issue. That's the very reason, I scheduled a weekly staff meeting.
I might be able to update on the Huddle at max, let me know if that works.
cc: @N3v1 @Maghish
For starting point, please refer to the References attached in the Issue description.

@N3v1 Thanks for offering help but I think @AryanGupta0007 has already covered most of the documentation part, currently I'm fixing all the pydocstyle (Docstring) errors so I think rather than documentation it would be better to work on refactoring (if needed).

@N3v1 Thanks for offering help but I think @AryanGupta0007 has already covered most of the documentation part, currently I'm fixing all the pydocstyle (Docstring) errors so I think rather than documentation, it would be better to work on refactoring (if needed).

I could try it but I don't have experience with Python @neelansh27

Ok, then If you find anything missing in documentation, feel free to make changes and ask for help wherever needed since you are not familiar with python @N3v1
In our project, you need to document python files present in main, userAuth, buyer and seller folder.
Go through this page to see how to document python code. No need to read whole document, just get the basic idea when to use comments and when to use docstrings and how to declare them.

Thanks @neelansh27

@SID262000 I don't have the authority to close issues and @N3v1 might contribute to this issue.
I don't have anything else to add, so it's ok if you unassign this issue to me.

I think this issue is close worthy
If @N3v1 is not working on this issue
Cc: @SID262000

@N3v1 please confirm ASAP

@SID262000 I‘m not working on it because the documentation is already done - I think


Prepared statements

Discussion around providing an API for normalizing true database prepared statements where possible (pg, mysql2, oracle?).
Issues:

prepared statements are executed per-connection
does not make as much sense with a dynamically constructed query, unless a cache/prepare api is exposed similar to #798

Prior: #718, #305
/cc @mibi-r

The nature of a prepared query lends itself to the form:
var prepared = buildPreparedQuery(...);
...
prepared(arguments);

so that does tie in nicely with #798 (and depending on API choices might give it to you for free)
The tricky bit seems to be keeping track of and/or "upgrading" connections from the resource pool that can execute the query. A few modifications to pool2's "capabilities" option may provide a way to accomplish this fairly cleanly.
Opened an issue over here to discuss this possibility: https://github.com/myndzi/pool2/issues/5

node-sql correctly constructs parameterized queries for many dialects.

@taoeffect also Knex builds internally parametrized queries for many dialects... could you explain a bit more how your comment helps to resolve this issue?

also Knex builds internally parametrized queries for many dialects...

I did not see that while looking through the source...

could you explain a bit more how your comment helps to resolve this issue?

Sure, it's a library that solves this problem, so taking a look at how it does it could be useful.

I did not see that while looking through the source...

OK, sorry that was my mistake:

I had searched for '?'  on GitHub and it revealed zero results, but I guess that's just a problem with GitHub search
I stumbled upon this issue and I'd read it as Knex simply not supporting parameterized queries

Indeed, it's unclear to me what the extent of support for parameterized queries is in Knex.
I now see, looking at the unit tests, that it does seem to support them. However these lines are not clear to me:
Why is it that here it shows parameterized queries:
  it("multiple inserts", function() {
    testsql(qb().from('users').insert([{email: 'foo', name: 'taylor'}, {email: 'bar', name: 'dayle'}]), {
      mysql: {
        sql: 'insert into `users` (`email`, `name`) values (?, ?), (?, ?)',
        bindings: ['foo', 'taylor', 'bar', 'dayle']
      },
      sqlite3: {
        sql: 'insert into "users" ("email", "name") select ? as "email", ? as "name" union all select ? as "email", ? as "name"',
        bindings: ['foo', 'taylor', 'bar', 'dayle']
      },

And yet for a nearly identical query after it, it does not?
it("multiple inserts with partly undefined keys client with configuration nullAsDefault: true", function() {
    testquery(qb().from('users').insert([{email: 'foo', name: 'taylor'}, {name: 'dayle'}]), {
      mysql: "insert into `users` (`email`, `name`) values ('foo', 'taylor'), (NULL, 'dayle')",
      sqlite3: 'insert into "users" ("email", "name") select \'foo\' as "email", \'taylor\' as "name" union all select NULL as "email", \'dayle\' as "name"',

@taoeffect Actually knex supports 2 different ways of creating queries, knex can do the escaping by it self and then generate string which contains all parameters already replaced. But usually when knex just runs query it passes parametrized query and parameter bindings separately to DB driver which executes query.
If you call knex's toString() or toQuery() methods, querybuilder constructs one string where all the bindings are evaluated to one string.
let knex = require('knex')({client: 'pg'})

knex('table').where('id', 1).toString();
// 'select * from "table" where "id" = \'1\''

If you call knex's toSQL() query builder constructs parametrized SQL string and bindings, which are passed to driver.
let knex = require('knex')({client: 'pg'})
knex('table').where('id', 1).toSQL();
// { method: 'select',
//    options: {},
//    bindings: [ 1 ],
//    sql: 'select * from "table" where "id" = ?' }

You can check the code for actually executing the query for postgres here
https://github.com/tgriesser/knex/blob/master/src/dialects/postgres/index.js#L147
Few lines earlier there is call which converts ? bindings to postgres format $1, $2... etc.
You can always check how knex is sending query by calling toSQL() and checking if it is parametrized or not...
I was trying to write some exotic query which is using knex.raw inside subquery, which is used by main query and wasn't able to make knex to lower any values to strings by itself
subQuery = knex('table2').where('id', knex.raw('(select ?? from ?? where ?? = ?)', ['id', 'table3', 'name', knex.raw('LOWER(?)', ['john'])] ))
knex('table5').whereExists(subQuery).whereIn('id', [1, knex.raw('?', [2])]).toSQL()
{ method: 'select',
  options: {},
  bindings: [ 'john', 1, 2 ],
  sql: 'select * from "table5" where exists (select * from "table2" where "id" = (select "id" from "table3" where "name" = LOWER(?))) and "id" in (?, ?)' }

During the years I've been using knex I have never heard any bug reports of sql injection either so I'm pretty confident of that part of knex working well :)

knex can do the escaping by it self and then generate string which contains all parameters already replaced.

So that's not good, IMO. It should always use parameterized queries unless someone is generating an .sql file database dump.

But usually when knex just runs query it passes parametrized query and parameter bindings separately to DB driver which executes query.

That word "usually" is what I find confusing and makes me nervous. When does it and when doesn't it?
I still don't understand, for example, what the difference is here. Why does one generate parameterized queries while the other doesn't?
That sort of uncertainty is what makes me hold off on Knex and the ORMs that use it. There's just no good reason to rely on inefficient and potentially insecure string escaping.

Any progress on support prepared statements?

No and agreed with @taybin that this issue is too vague to be useful. If someone likes to have support for something regarding prepared statements (I'm not exactly sure what kind of support) new issue with API proposal + investigation how to support them in sqlite, mysql, postgres, mssql and oracle would be necessary.
Closing this since information heris not really useful for anything.
@taybin I haven't heard that anyone would have been working on anything like this. Might be even necessary to have better control of connections which are use for different queries... not sure though.

Why did this issue go nowhere?  This seems like an important improvement, at least in the case of mysql.  Not only do you get the safety of server-side prepared statements, but no need for repeated client side escaping and transmission of SQL.
You can see the difference in the mysqld logs between using mysql2 execute() and knex, which is probably just using query().
mysql2
2019-04-09T00:00:51.657686Z       118 Connect   root@localhost on test_development using TCP/IP
2019-04-09T00:00:51.659328Z       118 Prepare   select * from users where id=?
2019-04-09T00:00:51.661270Z       118 Execute   select * from users where id=1
2019-04-09T00:00:51.665140Z       118 Execute   select * from users where id=1

knex using mysql2
2019-04-09T00:01:43.253314Z       119 Connect   root@localhost on test_development using TCP/IP
2019-04-09T00:01:43.261132Z       119 Query     select * from `users` where `id` = 1
2019-04-09T00:01:43.266717Z       119 Query     select * from `users` where `id` = 1

Why did this issue go nowhere?

Nobody has needed the feature so badly that they would have implemented it. Also because this issue is mixing couple of separate things in its comments.

Not only do you get the safety of server-side prepared statements, but no need for repeated client side escaping and transmission of SQL.

You can see the difference in the mysqld logs between using mysql2 execute() and knex, which is probably just using query().

Original issue was about having real prepared statements, which are sent to session  and then being able to be executed multiple times with different parameters and having that feature available in a crossdb compatible manner.
For example pg-driver always creates first temporary prepared statement and only after that runs the query with parameters.
Also looks like that you are right that mysql2 client always escapes parameter bindings when .query(sql, bindings, ...) method is used https://github.com/mysqljs/mysql#escaping-query-values
So it would be probably good idea to change that to use automatic cache/creation https://github.com/sidorares/node-mysql2/blob/master/documentation/Prepared-Statements.md#automatic-creation-cached-and-re-used-by-connection as you mentioned.
You may also check if mysql driver does something in a different way. In our stress tests mysql driver was a bit more stable than mysql2 when connections are closed unexpectedly.
@kswope Please open proper feature request for that. This issue was not about the thing you are asking for and is also too messed up with various different conversations.

Original issue was about having real prepared statements, which are sent to session and then being able to be executed multiple times with different parameters and having that feature available in a crossdb compatible manner.

This was my point, that's why I included the mysql logs and not toString() which is what everybody seems to do and then gets reprimanded :)
Although I don't think I explained it fully.  In node-mysql2  query() and execute() seem to be interchangeable.  But with execute() you get real server-side prepared statements (subject of this issue).
The first log proves server-side prepared statements, and I had to use node-mysql2 directly to call execute().
knex is the second log entry, sending over the whole query, which is the exact same thing I'd get with the first example if I had swapped out execute() for query(), so I assume knex is using query().
Here's the thing, node-mysql (without the 2), has query(), but doesn't have execute().
I'm just thinking, if knex recognizes that node-mysql2 is being used instead of node-mysql, it could bypass all the client side escaping and just call execute() and let the driver take over and get server-side prepares for free.

Although I don't think I explained it fully. In node-mysql2 query() and execute() seem to be interchangeable. But with execute() you get real server-side prepared statements (subject of this issue).

You did explain it just fine in the first place, thats why I said you are right and pasted a link to documentation, which explains what mysql does with .query(sql, args, cb) (does escaping for values and creates a string). .execute is clearly preferable way to go and as a bonus it has internally built cache for those prepared statements (IIRC pg-driver doesn't cache those).

Here's the thing, node-mysql (without the 2), has query(), but doesn't have execute().

Thats good to know, so we need to change only mysql2 drivers implementation how to send queries to the driver.
Anyways I'm really surprised if mysql driver doesn't offer any way to achieve similar behaviour (except of caching those statements). It could be tried out if it is easy and robust to implement. Would need some performance testing though to be able to verify that creating always prepared statements without caching them doesn't cause huge overhead to DB server side.

I'm just thinking, if knex recognizes that node-mysql2 is being used instead of node-mysql, it could bypass all the client side escaping and just call execute() and let the driver take over and get server-side prepares for free.

Knex is not doing any of those escapings, it all happends inside mysql dirver and yes it is easy change to do and existing tests should be enough to verify that it works. However just to be sure I would like to mark it as breaking change (it is a pretty fundamental change so better be sae than sorry) even that strictly speaking it is not part of public API of knex.
As I said before, please open a separate feature request for that. We are talking about different issues  here than original post did.

Locked conversation in here to force everyone to open clean and properly scoped feature requests for prepared statements / parameter bindings related issues.


Threads

Does runtime.js support multiple threads? So that I could make some parts not block the system?

Threads are not supported at the moment, mainly because of the complexity they would introduce. Just curious, what's your usecase?

So that background jobs could be run (like daemons).

well, nothing really prevents running background jobs provided they don't block the system

Well, I need to run synchronous jobs in the daemon (which may take long and block the system).

The only available option right now is to use setImmediate trick to split long-running tasks into smaller subtasks to prevent blocking.

How easy (or hard) would it be to implement threading into runtime? I know it must be done from C++ (which I understand).

Depends on what kind of threading you'd like to implement, what scheduler and preemption mechanism to use, and a way to make it all thread-safe. I'm afraid it's an extremely complex task.

Ok, well, is there at least a way to launch another V8 instance?

yes, v8 has the concept of Isolate. In fact, runtimejs internally has some support for that, but it's not enabled. I'm actually trying to get rid of it, because it's very ugly and needs to be completely rewritten.
Just FYI, I think node tried to implement multiple isolates support, but then decided not to do it because of the amount of complexity (https://groups.google.com/forum/#!msg/nodejs/zLzuo292hX0/F7gqfUiKi2sJ).

Thanks, i'll take a look at it. You say it needs to be rewritten? I can try (horribly, but at least try 😄).

Not really easy to enable as well. I'd say the first version could ship without threads/web workers support.

Oh well! Guess i'll just finish the RNG driver for now.

https://github.com/xk/node-threads-a-gogo/blob/master/README.md
https://github.com/audreyt/node-webworker-threads
https://github.com/nodejs/io.js/pull/1159
https://github.com/nodejs/io.js/pull/2133
http://wiki.ecmascript.org/doku.php?id=strawman:concurrency
Here are some examples of implementations to take inspiration from.

Woah! Threaded WebWorkers on Io.js! :-D
Not sure if The End is near, anyway... :-P
El 11/07/2015 18:30, "Sam Tobia"<EMAIL_ADDRESS>escribió:

https://github.com/xk/node-threads-a-gogo/blob/master/README.md
https://github.com/audreyt/node-webworker-threads
nodejs/io.js#1159 https://github.com/nodejs/io.js/pull/1159
nodejs/io.js#2133 https://github.com/nodejs/io.js/pull/2133
http://wiki.ecmascript.org/doku.php?id=strawman:concurrency
Here are some examples of implementations to take inspiration from.
—
Reply to this email directly or view it on GitHub
https://github.com/runtimejs/runtime/issues/75#issuecomment-120637700.

They do amazing things over there :3

Don't know if to ask them about to use a PID file and use it to fork() new
Node.js processes instead of create fully new Node.js instance to don't
waste so much memory on NodeOS, or ask them for a girlfriend, whatever come
first... :-P
El 11/07/2015 19:43, "Sam Tobia"<EMAIL_ADDRESS>escribió:

They do amazing things over there :3
—
Reply to this email directly or view it on GitHub
https://github.com/runtimejs/runtime/issues/75#issuecomment-120647735.

I see workers as a part of runtime, but maybe after 1.0

@iefserge Yeah, I can't imagine threads being immediate. I just figured I'd provide whatever info I could since I I've spent (maybe too much) time looking up a variety of threading implementations. And if two of my interests collide, I can't help but pop my head in.
@piranna It seems like they are heavy implementing isolates

https://github.com/nodejs/io.js/pull/2133/files#diff-c5e3109b5f05c63b16cfefb07ce3b079R48
https://github.com/nodejs/io.js/pull/2133/files#diff-cd53544f44aab2c697bcd7b6a57f23ccR3877

I don't know if that will help your cause or basically the same thing : / I have to imagine that require statements are the type of things that will ideally be shared. However, that may create other issues
Also Here's another Inspiring one What I really like about thread.js is how synchronous the code ends up looking while still in the main logic. Theres something to be said for what happens in a thread

I'm reopening this, since it's planned for later

@formula1 that's not the same. What I'm asking for is something similar to what LibreOffice or MS-Office or GEdit or Chromium or Firefox or other thousand programs do, that's when one instance is running and you try to exec a new independent one, the new one detect that's already one running (via a PID file or similar) and open the new file or webpage on the old instance instead, leading to use less memory resources, between other things because the .TEXT section can be shared when forking a process. The same could be done in Node.js, creating a new processes on the old instance for each new script to be executed, or also maybe use an isolate on a new thread (that's somewhat what they are doing internally with workers on that commit) to use less resources by running on the same process and don't have context switching. In that last case there would be problems with compiled modules since they are sharing the same memory space, but probably they have already fixed it.
I ask myself if now that there will be workers I could be able to implement this as a launcher on a Node.js module... Basically it would be to check the PID file and launch the apps in workers from the main process... :-P

Ah, That makes sense. Something along the lines of
var fs = require('fs');

if(fs.existsSync('./pid')){
  fs.writeFileSync("./run", JSON.stringify(process.argv));
  process.exit():
}

fs.writeFileSync("./pid", process.pid);
fs.watchFile("./run",function(event){
  var args = fs.readFileSync("./run).toString("UTF8");
  if(args === "") return;
  fs.writeFileSync("./run", "");
  runProgramInThread(JSON.parse(args));
});

runProgramInThread(process.argv);

Obviously this example would be pretty bad since there would likely race conditions when multiple commands were running at once (A Server might be preferred). Honestly, That sort of system seems pretty straight forward I can see it more valuable in user land than in core.

Ah, That makes sense. Something along the lines of

Yes, sort of, only that maybe using named pipes or domain sockets instead of filesystem files (so no race conditions here anymore :-P). In fact, the PID file itself would be a named pipe, I think this is usually done in Plan9... :-) I supossed it would be simple, but not SO simple... :-D The most complicated part would be the runProgramInThread() function due to the need of the initialization of the Worker, but when they get implemented probably wouldn't be something more that an afternoon project... :-)

That sort of system seems pretty straight forward I can see it more valuable in user land than in core.

runtime.js core, or Node.js core? I think in Node.js it makes sense in both of them, although in some cases it would make sense to dispatch new real processes too, like for example when using different permissions (UID & GID, for example)... Anyway, I think this could (should?) be integrated on NodeOS to fix the memory consumption it has.

Anyone know what happend to the preemtible_threads branch? Can it still be used, at least with some modifications?

It was an experiment to add preemptive multitasking using v8 isolates and v8 stack interrupts. It was very unstable and crashed frequently, and I had to patch v8 for it to work.


fix: [dashboard] should not show edit button when user has no edit permit

SUMMARY
Dashboard Edit icon should only clickable when user has edit_permit.
Otherwise, user start edit dashboard, but when they save the changes, they will get error message.

TEST PLAN
CI and manual tests.
ADDITIONAL INFORMATION

[x] Has associated issue: #10394
[ ] Changes UI
[ ] Requires DB Migration.
[ ] Confirm DB Migration upgrade and downgrade tested.
[ ] Introduces new feature or API
[ ] Removes existing feature or API

cc @mistercrunch @john-bodley

Thanks @graceguo-supercat for the quick fix.


Create a resource with data for average knowledge map

It should contain flashcards' predictions for new user

add new_user_predictions GET parametr to flashcard resource and user new_user_prediction value


Cannot set text of a TextView inside the read Callback

Hi friends!
Calling myself newbie at Android is too much of a complyment for me, as I don't know Jack s*it about it, but I'm adventuring myself into developing a Self Service Beer Tap sistem using Kotlin language anyways.
After struggling a bit, I've managed to make the layout for the app and somewhat setting up the serial communication with an arduino board using this UsbSerial library.
At this point I was supposed to code serial reading at the app, but I don't know how to do it.
Serial communication is set up in the code exactly as the tutorial made by "Apps in the sky":
Part 1: https://www.youtube.com/watch?v=QHa6HWTmQFs
Part 2: https://www.youtube.com/watch?v=ICjjG1VsZmw&t
The messages/commands that the android will receive will have the following format:
Ixxxxxxx> Vxxxxxx> <xxxxxx>
The first character will tell the Android what is the information being passed:
I = ID of the rfid card read by the Arduino
V = Volume measured
< = General Command or info ,like , <POURING_ENDED>, <AUTHENTICATION_FAILURE>
And the stopbit for every data line or command is ">".
Could someone help me on implementing this on the code?
Just in case someone gives up reading the header: I'm using Kotlin.
Almost forgot to mention: the app template is ItemList/Detail, but the communication will be done all in the main application(ItemListActivity).
And sorry for any bad english(I'm brazilian).
EDIT: I read  #37 but couldn't translate it to my code because it's Java and the code wouldnt' use Stopbits as I intend to use.

Ok... I got further on it by myself but I'm still facing some problems...
Here is what I did so far:
1st: I've added a read line to the serial setup, pointing to a callback:

private val broadcastReceiver = object : BroadcastReceiver(){
    override fun onReceive(context: Context?, intent: Intent?) {
        [...]
        m_serial!!.setFlowControl(UsbSerialInterface.FLOW_CONTROL_OFF)
        m_serial!!.read(mCallback)
        [...]

2nd: Then I wrote the callback to get the data from Serial:

private val mCallback = UsbSerialInterface.UsbReadCallback {
    MyVariables.receivedText = String(it, Charsets.UTF_8)
    understandSerial(MyVariables.receivedText)
}

3rd: I wrote a function to understand the data received trough the callback:

fun understandSerial(msg: String){
    val byteArray = msg.toByteArray(Charsets.UTF_8)
    var prefix : Char = '0'
    var readingMSG: Boolean = false
    var messageRead: String = ""
    for ((index, bytes) in byteArray.withIndex()){
        if (readingMSG){
            if (bytes == '>'.toByte()){
                readingMSG = false
                handleCommand(prefix, messageRead)  //Handle command/information received here
            } else {
                messageRead += bytes.toString()
                //
            }
        } else {
            if (bytes == 'I'.toByte() || bytes == 'V'.toByte() || bytes == '<'.toByte()) {
                prefix = bytes.toChar()
                messageRead = ""
                readingMSG = true
            }
        }
    }
}

4th: Every command/information received will then be handled separately by another function:

fun handleCommand(prefix: Char, msg: String){
    if (prefix == 'I'){
        // Actions for ID Received trough serial
    } else if (prefix == 'V'){
        // Show/update current poured volume on screen
    } else if (prefix == '<'){
        //Actions for commands received:
        if (msg == "INCOMPATIBLE_TOKEN"){

        } else if (msg == "DOC_AUTH_FAIL"){

        } else if (msg == "DOC_READ_FAIL"){

        } else if (msg == "ABORT_COMMAND"){

        } else if (msg == "ABORT_COMMAND2"){

        } else if (msg == "WDOC"){

        } else if (msg == "UNDEF_DATA"){

        } else if (msg == "MAXVOL_END_SERVICE"){

        } else if (msg == "IDLE_END_SERVICE"){

        } else {
            //UNKNOWN COMMAND RECEIVED
        }
    }
}

Everything seems to work fine like this.
Then I tried to show/update the volume poured, measured by the Arduino:

     } else if (prefix == 'V'){
        tvPouredCost.text = data
    }

*Volume is received in this format: "Vxxxx>", and at this point of the code, the variable data is supposed to be "xxxx", without the prefix and stopbit;
Right after the RFID card is read, the app stops working.
By the way, the TextView element is declared and initialized right at "onCreate":

private var tvPouredCost: TextView? = null

override fun onCreate(savedInstanceState: Bundle?) {
    super.onCreate(savedInstanceState)
    context = this
    setContentView(R.layout.activity_item_list)

    tvPouredCost = findViewById<View>(R.id.tvValor) as TextView
    //tvPouredCost.text = "0mL"

    m_usbManager = getSystemService(Context.USB_SERVICE) as UsbManager
    val filter = IntentFilter()
    filter.addAction(ACTION_USB_PERMISSION)
    filter.addAction(UsbManager.ACTION_USB_ACCESSORY_ATTACHED)
    filter.addAction((UsbManager.ACTION_USB_DEVICE_ATTACHED))
    registerReceiver(broadcastReceiver, filter)
    startUsbConnecting()

If I uncomment the text setting line right after the declaration, it sets the text correctly.

I tried putting a breakpoint inside the callback and running debug, but I was unable to identify the root of the problem.
What may be happening here?

i can recommend you to add text updates in a separate thread.

I tought it'd be better if I posted the update in the same thread because, if someone have the same issue I had, they could benefit from de direct answer that I implemented...
Of course I can open another thread for the new problem, but what if the problem is related to the way I made the code? If that's the case, I think it should be solved here.

i am sorry i meant to run textupdates creating a user thread or a timer in the program to update the textview:
private void startTextupdateThread() {
Thread th = new Thread(new Runnable() {
    public void run() {

            runOnUiThread(new Runnable() {
                @Override
                public void run() {
                   tvPouredCost.setText();
                }
            });
            try {
                Thread.sleep(1000);
            }
            catch (InterruptedException e) {
                e.printStackTrace();
            }
        }

});
th.start();

}
i am not sure this will fix, but u can try as   you said it was fine when you commented that line out.

It Worked!
I created a new thread:

private fun startTextUpdateThread(){
    val th = Thread(Runnable {
        // try to touch View of UI thread
        this@ItemListActivity.runOnUiThread(java.lang.Runnable {
            this.tvCreds.text = "R$" + MyVariables.actualCredits
            this.tvValor.text = "R$" + MyVariables.actualPouredCost
            this.tvVolume.text = MyVariables.actualPouredVol + "mL"
        })
    }).start()
}

And passed reference to it inside the handleCommand function:

     else if (prefix == 'V'){
        MyVariables.actualPouredVol = msg
        startTextUpdateThread()
        // Show/update current poured volume on screen
    }

Variables are "MyVariables._______" because I put them inside an object, to have access easily everywhere

MyVariables object looks like this:

object MyVariables{
    var tapNum: Int = 1
    var receivedText: String = ""
    var CommandReceived: String = ""
    var actualPouredCost: String = ""
    var actualPouredVol: String = ""
    var actualCredits: String = ""
}


Fix warnings on .NET SDK 6.0 and VS 2022

Changes to the default settings for analyzers in .NET SDK 6.0 meant that anyone trying to build reaqtor with the latest SDK would see a huge number of warnings and errors. This gets us back to a clean build at the command line, and also an absence of code analyzer messages if opening the project in Visual Studio 2022 (which requires more changes than are needed for a clean command line build).
The code still builds without warnings or errors on .NET SDK 5.0, and opens cleanly in Visual Studio 2019.

@bartdesmet, this PR is currently in draft because there are a couple of places in the code that continue to provoke analyzer warnings that look to me like they might be flagging genuine issues.
The first is at https://github.com/reaqtive/reaqtor/blob/85f6f05e895bbcd9397a2145ac4e934e5a16b830/Reaqtor/Core/Engine/Reaqtor.QueryEngine/Reaqtor/QueryEngine/Edges/OutputEdge.cs#L81
The analyzer complains that this field is set but never read from. It is used in exactly one place:
https://github.com/reaqtive/reaqtor/blob/85f6f05e895bbcd9397a2145ac4e934e5a16b830/Reaqtor/Core/Engine/Reaqtor.QueryEngine/Reaqtor/QueryEngine/Edges/OutputEdge.cs#L111-L115
So we hold onto this subscription, but never do anything with it. Should we be disposing the external subscription at some point, and if not, should we just remove this field?
The second is a similar "field set but never read" in the remoting testing framework:
https://github.com/reaqtive/reaqtor/blob/85f6f05e895bbcd9397a2145ac4e934e5a16b830/Reaqtor/Samples/Remoting/Reaqtor.Remoting.TestingFramework/TestClient/TestReactivePlatformClient.cs#L32
Is there missing code that should be cleaning up? Or is there nothing that needs doing here and so we should just remove the field?

The edge subscription stuff can use a _ discard. IIRC, we put it in a field to make dump debugging easier.
The cleanup environment stuff can be removed. That's a remnant of some more sophistication in the Remoting stack but it got stale after we added more roles (messaging, state store, etc.).

It does look like the environment cleanup needs to happen: I tried disabling it completely, and although running all tests concerned individually worked, if I run all the tests, I get failures—presumably there's some parallel execution going on here?
The behaviour in place was to run the cleanup even when it wasn't requested. I've modified it in the "Make TestReactivePlatformClient honour cleanupEnvironment " commit so that it runs cleanup when requested, and doesn't otherwise, and tests seem to be passing with that (but were failing with cleanup completely disabled). So is it OK to stick with that change?
(I see all the builds are now failing. But I think that might be environmental. It's failing on the "Install NBGV tool check, which is before we even get to compiling the code, so I don't think it's caused by this change. The commit from a couple of days ago worked, and I'd be surprised if this latest one caused that.)

(The same NBGV error occurred on January 13th, and then went away again. If it manages a clean build again I'll leave that for now and fix it in a separate PR. But if it persists, I'll have to fix that before we can close this I guess.)


PSCE-299: Adds create-ssp entrypoint

Description

Adds a create-ssp entrypoint for SSP bootstrapping
Stacked with #157
Rationale
SSP creation is becoming more customized with
the addition of yaml header. Adding a create-ssp entrypoint will reduce error  when working with autosync command and SSPs.
Type of change

[X] New feature (non-breaking change which adds functionality)

How has this been tested?

[X] E2E tests updated
[x] Unit tests

Checklist

[X] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[X] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[X] My changes generate no new warnings
[X] I have added tests that prove my fix is effective or that my feature works
[X] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

@JimFuller-RedHat Really helpful feedback on this PR. Thank you! In some of the content repositories using this app, we use markdownlint separately with megalinter. This would probably make a good addition to the docs here.


Create default author photo for the blog

Something with the bison for when we don't have a photo from the author.

@mcharg I like it!

@mcharg Yes, that works. Thanks

@mcharg Looks good! Thanks!


Add token bucket style rate limiter to WOM client

Approach used based on https://en.wikipedia.org/wiki/Token_bucket.

Values are based on information in the WOM Docs. Maybe this should be recorded somewhere? It seemed self explanatory to me since that is the resource this is focused on.

While this prevents hitting the rate limit, I believe WOM prefers adding delay in between request to help evenly distribute server load on their end.

Following up on @DisneyManBro's last comment, WOM has the following note in their API Docs:
.
I am totally in support of adding a sensible delay in here since update all is a long async job already. I reached out to the WOM team to ask if they would prefer this, and what delay length they would like. Will update here when I hear back.

Added a five second delay between each user data fetch as per conversation w/ WOM team.

I am ready for this to get merged if we feel like things are working well in the test env @DisneyManBro @Kojonkler


Reenable the system certificates.

Associated Issue
#3166
Goals :soccer:
Reenable the system certificates, when use the self-signed certificates.
Implementation Details :construction:
// Reenable system anchor certificates.
let systemStatus = SecTrustSetAnchorCertificatesOnly(type, true)

replaced with
// Reenable system anchor certificates.
let systemStatus = SecTrustSetAnchorCertificatesOnly(type, false)

Testing Details :mag:
No testing. However, here is the apple's doc.

If true, disables trusting any anchors other than the ones passed in with the SecTrustSetAnchorCertificates(_:_:) function.  If false, the built-in anchor certificates are also trusted. If SecTrustSetAnchorCertificates(_:_:) is called and SecTrustSetAnchorCertificatesOnly(_:_:) is not called, only the anchors explicitly passed in are trusted.

No changes can be accepted to our certificate handling code without extremely strong justification and robust tests. Please better justify this change and add appropriate tests illustrating the motivating issues.

Ok, it is just an error for an inappropriate comment.


Added Release Summary Report button to grid view

Added release summary report button to Grid View
Fixes: #587
Signed-of-by: Tommy Tho<EMAIL_ADDRESS>

@smlambert @llxia


Fix backslash usage

\R means a special character but not working in single quotes

https://github.com/decodelabs/glitch/blob/32c3f087f61c25fb0d9bc382abaaffeb1a6fec37/src/Glitch/Dumper/Inspector.php#L51-L57

Thanks @szepeviktor, good spot, I'd missed those ones.
Also, the auto-generated Veneer stubs will need extra slashes added to class strings across the board for all packages that use them - I'll get that updated shortly 👍


PoC: Communication between PeerPool and other process via event bus

Abstract?
This is a follow up to the (now closed) #1202 PR. After substantial progress, the description became outdated so I decided to open up a new PR.
This is a PoC to show case how we can communicate between processes with the following properties.

Messaging rather than RPC (related article, related comment)
no Proxy or Manager classes were used. Only Queue
all APIs are non-blocking and are built on top of asyncio

What does this do?

The PeerPool got a handle to the event bus and is listening to PeerCountRequests and answers them with a PeerCountResponse

async for req in self.event_bus.stream(PeerCountRequest):
    self.event_bus.broadcast(PeerCountResponse(len(self)), req.broadcast_config())

Notice that while the event bus enables us to raise events to be consumed by many independent players, in this case the broadcast is done in a fashion to only broadcast an answer to the call site that raised the event we are listening for. This is done by passing a BroadcastConfig as a second parameter which we derive from the incoming event by calling broadcast_config() on it.

We set up another process to communicate with the PeerPool via these events.

test_proc = ctx.Process(
        target=run_test_proc,
        args=(
            test_proc_endpoint,
        ),
    )
     test_proc.start()

Notice that the process gets a handle to the event bus injected (similar to how we inject a handle in the networking process that hosts the PeerPool)
Then, inside that process we are raising a PeerCountRequest on the event bus every second.
async def request_receive_peer_count(event_bus):
    while True:
        response = await event_bus.request(PeerCountRequest())
        print("Peer Count: " + str(response.payload))
        await asyncio.sleep(1)

Where to go from here?
There are many things we can do in the event bus to improve ergonomics and efficiency. However, I feel we are nearing a state where this can actually be used for real. I see the next steps as follows:
Support plugins to run in their own process
Here's roughly what I think needs to be done:

Allow plugins to express that they want to run in their own process. That in turn will cause the plugin manger that lives in the main process (not  to be confused with the instance that lives in the network process) to setup an eventbus endpoint for the plugin. This needs to happen in the main process for now.

Let the plugin handle the launch of the process (not sure, needs more thought)

Let the plugin do it's thing and communicate with the rest of Trinity via the event bus. This also means, depending on the first use case to spearhead this, that probably the PeerPool needs to expose some APIs built on top of the eventbus (similar to the demoed PeerCountRequest / PeerCountResponse in this PR)

I think that the TxPool is a great candidate to spearhead this.

@pipermerriam I pushed this another step forward. The new process is now wrapped as a plugin. There are still a lot of rough edges but hey, this is a plugin, running in its own process, talking to the PeerPool via the event bus with zero plugin specific changes to the core code base :)

This can be closed. It was only meant as a PoC and #1212 aims to move this over the finish line.


Bengen - Status "Inactive"

ENVIROMENT: production
URL: https://scrapers.peviitor.ro/
Browser: Chrome
Device: laptop
OS: Windows 10
STEPS TO REPRODUCE:
Open URL in browser
Type the name of the company in the search bar
Run scraper
Check the status
EXPECTED RESULT:
Status to be "Active"
ACTUAL RESULT:
The status is "Inactive"

Nu mai puneti ce returneaza metoda ca scrapers ui nu suporta decat python 3.8 maxim

Got it, Laurentiu. Modificat, Te rog retesteaza Bea.

Verificat.


Upgrade Firewall Manager to R81.2 for bug, security fixes, and new features including support SAML Authentication for Admin, and bug, security fix

Describe the Issue
We need to update Firewall Manager to newer version for added features, bug, security fixes
Additional Context

Blue/Green Deployment
Backup before Deployment
ECF Forge.   Assembly, Live in another ticket
Same VPC, TGW, ALB/GWLB, Scale Set ?

Acceptance Criteria

[ ] No or very minimal downtime to firewall cluster
[ ] Firewall updated to the newer version, e.g. R81.2
[ ] Firewall Manager updated to the newer version, e.g. R81.2
A set of pre-defined requirement that need to be met in order to mark the user story as “done”.  See below for team agreement details.

As SECOPS (Chris C.) is taking firewall update/migration up, firewall ticket become irrelevant.


We need to decide what should be included in a .sw abi.

There was some discussion on Slack about what should/can be included in a Sway abi.
There is an example in the sway docs showing a storage variable defined in an abi (https://fuellabs.github.io/sway/latest/examples/wallet_smart_contract.html), and I was wondering about whether we should add the ability to define our events in abis.
After thinking about this a little more, I have a few recommendations.

Storage variables (including Constants & Immutables):
I don't think these should be included in an abi. They are implementation details, and therefore not something the abi (interface) abstraction needs to be concerned with or even know about.

Event structs:
I think these must be included in the abi, as they are part of the very definition of how users can interact with a contract which implements a given abi.
Think about  EIP-721 for example (https://eips.ethereum.org/EIPS/eip-721), which defines both the methods and the events a contract will implement.

In Solidity ( and I would assume in Sway as well) there is a distinction between an interface which can be inherited by a contract which must then implement the interface's (public) methods, and the json.abi which is generated from the solidity contract, and  can be used to interact with the deployed contract, ie: from another contract, in Node.js test suites, dApps, etc...

Closing in favour of https://github.com/FuelLabs/sway/issues/2130


Add comments about why cloudstack tests are skipped

Issue #, if available:
Description of changes:
Add a comment describing why the cloudstack skipped tests are skipped.
Testing (if applicable):
Documentation added/planned (if applicable):
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

/approve

/cherry-pick release-0.20

/cherry-pick release-0.19


Посилання на внутрішній ресур Epam

https://github.com/epam/edp-ddm-architecture/blob/c94722ef9a473e13a3e954a6ee6d48998f4e6437/docs/ua/modules/arch/pages/architecture/registry/operational/digital-signatures/overview.adoc?plain=1#L30
https://github.com/epam/edp-ddm-architecture/blob/c94722ef9a473e13a3e954a6ee6d48998f4e6437/docs/en/modules/arch/pages/architecture/registry/operational/digital-signatures/overview.adoc?plain=1#L39

The https://gerrit-mdtu-ddm-edp-cicd.apps.cicd2.mdtu-ddm.projects.epam.com/admin/repos/mdtu-ddm/low-code-platform/platform/backend/applications/digital-signature-ops repository is intended for use exclusively in the development/deployment of the Platform within Ukraine. It is optional and includes implementing specific features and regional requirements for information systems.


Astronomy module to track direct manipulations on DB/collections.

As discussed here it would be good to have a way to track changes made to a DB/collection (or a table in future) by some server-side process, or a user who can access the DB.
The module should be smart to analyze what kind of change has been made?, when?, and by whom? and be flexible to fire certain events with custom messages, something like:
"[a process, or] a user with *username* (*IP address*)
touched *DB/collection* on *Date/Time* and *modified/deleted/created* this doc:
docID, old version: "{modified properties}", new version:"{modified properties}"

This is just a quick example I can think of and surely there are better ways to design this, so I'd love to here some comments.
p.s.: perhaps it could be named as "DB-watch" or something. :)

Right now I'm not going to mess with the mechanism of Database Watch because I'm not familiar with it yet.
For now I'm going to focus on collection level events and validation. To solve this problem I have two solution.
VALIDATION:

Write a wrapper around all collection methods like insert, update etc.
Write deny rules that won't allow operation if a document is not valid.

EVENTS:

Wrapper around all collection methods.

So I will probably implement it using wrapper, however I don't like this approach. Maybe someone would have better solution?

I don't use allow/deny, but I think they work only with db operations triggered by the client. If that is the case, they cannot be used for this feature.

About the other proposed solutions, what I can say is that aldeed:meteor-collection2 does the job well (although with poor usability).

Yes you are right about allow/deny rules. I have to make a good decision if it goes about API. If I override collection methods, then I should have some way of accessing original methods.
In your opinion, what is the worst part of aldeed:meteor-collection2 that causes poor usability. What would you improve? I want to get as many opinions as possible.

There are 3 things that annoy me in aldeed:meteor-collection2:

It tries to ensure database integrity, which makes it difficult to understand. See this discussion. What I need is only the validation of the arguments being passed to insert/update, nothing more.
It manipulates data on-the-fly in a complex way (it is called "cleaning", see here), leading to painful bugs.
Error messages are cryptic. Example here.

In fact the first point for me is a bug in SimpleSchema and could be easily fixed.
Astronomy does two of the things that SimpleSchema does. If it does not do it's a bug :P

Removing properties that are not in the schema
Conversion of values to match what schema expects

Fortunately, in Astronomy error generation mechanism is very flexible.

So, I assume that the you are happy with the API of SimpleSchema which executes validation:
Books.insert({
  field: 'value'
});

I don't like idea of overriding collection's method like insert or update. I would propose something different:
Books.astro.insert({
  field: 'value'
});

or some similar approach not messing with currently existing methods of collection.

I'm not sure it is a better option, but the following API syntax might have few benefits:
Astro.insert('Books', {
  field: 'value'
});

it makes it clear that Astronomy package is used here to handle certain operations (easier for newcomers to the codebase);
it is similar to using Underscore like _.map(...);

What do you think guys?

Yep, seems to be good idea. However, maybe it would be better to pass just a collection not collection name.
Astro.insert(Books, {
  field: 'value'
}, callback /* optional */);

Astro.update(Books, selector, modifier, callback /* optional */);

Agree, I just came back to edit "Books" to Books :)

What do you think about the syntax like:
Book.insert();

Not Books. We can insert, update etc. from the level of the Class not Collection.

:+1: for Book.insert(); I like it :smile:

Hi, I'm almost done with the direct database access methods. There is only one problem: validation. And I want to know your opinion on this subject. Let met explain the problem.
Right now, I've implemented all collection methods:
Post = Astro.Class({
  name: 'Post',
  collection: Posts,
  fields: {
    title: {
      default: 'Default title'
    }
  }
});

Post.insert();
Post.upsert();
Post.update();
Post.remove();
Post.find();
Post.findOne();

It works great and such statement:
Post.insert({});

will insert the following document:
{
  title: 'Default title'
}

All event will be called on the document, so everything works as expected. But what about validation? In fact I think that validating object on direct database access is bad thing. Let's take SimpleSchema as an example. You have to create validation context, validate query and later retrieve errors. If I would like to implement this in Astronomy I would have to do it in the following way:
Post.update(selector, modifier, {
  forEach: function(post) {
    if (post.validate()) {
      return true;
    }
    // Do something with the errors.
    post.getValidationErrors();
    return false;
  }
});

It's ugly but works. However, the problem is even more absurd on insert or remove. Why would I ever need to use forEach method if I'm inserting only one document? Why don't just:
var post = new Post();
if (post.validate()) {
  post.save();
}

And validating document on remove operation? I don't see the point. Validation is only for checking document's integrity, no to check if I can remove given document. For that case, we need security package.
So, my question is:
Do you need at all validation on direct collection access?
If yes, then:
Do you need validation on direction collection insert and remove?

I agree validation of a single object before insertion should be left to the programmer.

I think we have deviated from the original purpose of this Issue. But I'll appreciate any comments which can help contributors to progress in their work.

Ok, I decided to make validation possible only on document update. Direct database access have been implemented and @dalerka your original issue is solved by this feature.
Post.insert({field: 'value'});

will trigger all events and model logic as expected. The same is true about other collection operations.
For now I'm closing this issue. It will appear on 1.0 release.


DOCUMENTJsdoc for sources in locale plugin.

add JsDoc for public methods

Signed-off-by: Minsung Jin<EMAIL_ADDRESS>

I think     function _reloadWindow()  is needless.
Because the private fn just used once.
I think window.location.reload(); in the reload() is enough.


Tapping on TextField throws an exception

After the last update of Flutter, TextField has started to behave oddly.  When it is tapped, the following error appears:
flutter: ══╡ EXCEPTION CAUGHT BY GESTURE LIBRARY ╞═══════════════════════════════════════════════════════════
flutter: The following assertion was thrown while dispatching a pointer event:
flutter: 'package:flutter/src/gestures/force_press.dart': Failed assertion: line 209 pos 12:
flutter: 'event.pressureMax >= 1.0': is not true.
flutter:
flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
flutter: more information in this error message to help you determine and fix the underlying cause.
flutter: In either case, please report this assertion by filing a bug on GitHub:
flutter:   https://github.com/flutter/flutter/issues/new?template=BUG.md
flutter:
flutter: When the exception was thrown, this was the stack:
flutter: #2      ForcePressGestureRecognizer.addPointer (package:flutter/src/gestures/force_press.dart:209:12)
flutter: #3      RawGestureDetectorState._handlePointerDown (package:flutter/src/widgets/gesture_detector.dart:731:18)
flutter: #4      RenderPointerListener.handleEvent (package:flutter/src/rendering/proxy_box.dart:2643:14)
flutter: #5      _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:192:22)
flutter: #6      _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter/src/gestures/binding.dart:149:7)
flutter: #7      _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:101:7)
flutter: #8      _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:85:7)
flutter: #12     _invoke1 (dart:ui/hooks.dart:223:10)
flutter: #13     _dispatchPointerDataPacket (dart:ui/hooks.dart:144:5)
flutter: (elided 5 frames from class _AssertionError and package dart:async)
flutter:
flutter: Event:
flutter:   PointerDownEvent(Offset(148.3, 711.3))
flutter: Target:
flutter:   RenderPointerListener#a4a39 relayoutBoundary=up15
flutter: ════════════════════════════════════════════════════════════════════════════════════════════════════

Logs
[✓] Flutter (Channel master, v1.2.3-pre.31, on Mac OS X 10.14.3 18D109, locale en-US)
    • Flutter version 1.2.3-pre.31 at /Users/user/Android/flutter
    • Framework revision 3423c831b9 (9 hours ago), 2019-02-24 21:48:50 +0100
    • Engine revision 0546e1e5e9
    • Dart version 2.1.2 (build 2.1.2-dev.0.0 c92d5ca288)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at /Users/user/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-28, build-tools 28.0.3
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 10.1, Build version 10B61
    • ios-deploy 1.9.4
    • CocoaPods version 1.5.3

[✓] Android Studio (version 3.3)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 33.1.1
    • Dart plugin version 182.5215
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

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

[✓] Connected device (1 available)
    • iPhone 6 Plus • 0CBD3FC1-2E7E-4BD2-8728-089A51AD40CA • ios • iOS 12.1 (simulator)

• No issues found!

I tentatively added today label because I think this was fixed recently.
Was the fix reverted? Do I mix something up?

@zoechi Can you share it, if there is an issue or fix related to this? I use the latest version, I guess.

I can confirm that i had same issue after upgrading flutter just now

Same

After running flutter doctor the problem seems gone

I think this was supposed to have been fixed here: https://github.com/flutter/flutter/issues/26563

I tried a simple test case on an Android device and the current version of the repo ("Channel master, v1.2.3-pre.33"), seems to work OK.

It is fine on Android Emulator. However, I'm still having the same problem on iPhone 6 Plus Simulator although it is Channel master, v1.2.3-pre.41.

This issue is different from #26563 and caused by an addition in #26659. Though it is really surprising that iOS reports a max pressure < 1.
It shouldn't affect Android since the feature isn't turned on currently for non-iOS devices' text fields.

I can't repro on physical+simulator iPhone 6s or simulator iPhone 6. @afnx, can you show us a reduced repro program?
Removing the today tag for now.

Correction: this does break on physical iPhone 4s (and likely more). Adding today tag back on.


Add ability to flush jemalloc arenas and enable, disable, dump profiling

Describe your ideas

Add ability to flush unused arenas and dump jemaloc profile.
Solution

Achive it by 4lw commands:

jmfp: flush unused anrenas
jsep: enable profiling
jmst: dump profile
jmdp disable profiling

The idea is from https://github.com/ClickHouse/ClickHouse/pull/58665


Development

Fell free to delete/reject this pull request if needed. I simply added a dummy file.

There are some of @simontorres commits so it may be usefull to accept the merge.


Retrieve value from optional as from a dictionary

What is your opinion about following extension method:
public static bool TryGetValue<T>(this Option<T> @this, out T value)
{
    value = @this.ValueOr(default(T));
    return @this.HasValue;
}

I know that this is not  "functional style" but it allows to write this kind of "fail-fast" code:
void Foo()
{
    string res;
    if (!option.TryGetValue(out res)) return ; // fail-fast
}

Hi,
I personally do not like the pattern (Try(out value)) very much, mostly due to its verbosity. However, there is nothing intrinsically wrong with it as such, and is mostly a matter of preference.
The easiest thing you can do here and now, is to simply add the extension method to your projects and use it freely.
For now, I will not include it in Optional directly, but will reconsider once C# 7 is out, allowing out variables, e.g. .TryGetValue(out int res)
As a side note, making an initial guard on options might be an indicator of a design problem. If a method doesn't allow a value to be missing, it should not take an option as an argument, but simply the value itself. Then it would be the responsibility of the caller to either call the method or not (or whatever handling of the None-case is suitable). In this way, the method signature is much more explicit about what it expects, and therefore models the domain more precisely.
(there are, however, other situations where such a TryGetValue could be useful, but I tend to prefer a foreach loop, MatchSome or MatchNone, depending on the specific case)

Thanks a lot for all your comments and explanations. I really appreciate it.
I completely understand your opinion about Try(out value) pattern. For a long time I had similar judgment. However recently I have started to think that since this is the shortest way to get something safely from the dictionary so why not to use it.
I agree with your opinion about the initial guard pattern and option type. In this example I wanted to show the shortes code which  demonstratre the TryGetValue extension.
Best regards and many thanks you for the excellent project!


[ FR ] Detect and display times in the outline

I often note the time in my daily logs like this:
13:37
my note text

or
At 17:30 I did a thing

It would be cool if there was an option to detect and show times in the outline.  Might be worthwhile to detect full dates as well.
Another suggestion, let the user set the matching pattern for date and time format.  If available, a clock icon would be cool too.

Thank you for the interesting feature request!
As a concern, there are a couple of points to consider:

To detect the time, it is necessary to check all the text in daily notes that are within the display range. (Outline elements that can be displayed currently are stored as metadata by Obsidian, indicating their position.) This is expected to increase the load.
Whether the date and time can be detected appropriately or not. (It would be great if moment.js could handle it nicely.)

Although it may be difficult to implement immediately, I would like to verify it at some point.


Sara Chandler -- Carets

Ada Trader
Congratulations!
Comprehension Questions

Question
Answer

How do Backbone Views help structure your code?
It helped structure the code into an MVC pattern, making organization easier.

Did you use jQuery directly in your Views? How, and why?
I used it as a selector to empty sections of the HTML.

What was an example of an event you triggered? Why did you need to trigger it?
I triggered an event when 'buy' and 'sell' were clicked so the trade history could be updated with that specific quote information.

In what was is unit testing in JavaScript similar to unit testing in Ruby? In what ways is it different?
You can test for similar things, like validations and model logic. The syntax is a bit different.

Ada Trader
What We're Looking For

Feature
Feedback

Core Requirements

Git hygiene
Good number of commits, and good commit messages

Comprehension questions
Check, but what do View specifically add, Also you didn't use jQuery directly in your views, instead you used this.$ to select within the view and avoid bugs where your view is interacting with elements outside it's purview.

Organization

Models and collections are defined in separate files
Check

Code that relies on the DOM is located in or called by $(document).ready
Check

Functionality

Quote prices change when clicking Buy and Sell
Check

The Trade History updates when buying and selling a quote
Check

A user can create an open order using the Order Entry Form
Check

An open order removes itself from the open orders and updates the Trade History when fulfilled
It detects changes in the Quotes and removes itself when the trade executes, but it does NOT update the trading history.  I left a note in your code.

General

Has separate views for different parts of the app
buyOrder

Uses events (listening/handling and triggering) to manage different behavior in views
Yes, although see my above bug.  I left a note in your code how you could handle it using the event Bus.

Practices good standards for views (ES6 syntax, doesn't directly use jQuery, returns this in render)
Well done here, I will say that you could write buyTrade(event) { instead of buyTrade: function(event) {.  You're doing things the old-fashioned way.

Error handling for the Order Entry Form
Well done, good use of validate.

Testing

Has unit tests for models
MISSING

Overall
Nicely done, you hit all the learning goals of the project except for testing.  See my in-code notes, but this was good work!


Error when building pyrealsense2 on Raspberry Pi

Originally posted by @eospi in https://github.com/IntelRealSense/librealsense/issues/2496#issuecomment-428193008
I've successfully installed the SDK on my Raspberry Pi, but when I went to build the Python library, the make -j4 fails. The error message says recipe for target 'all' failed.

Hi @eospi
There are couple of things you need to check:

You have a swap file set up (otherwise gcc is very likely to crash because of out of memory)
Verify you have GCC 5
Do not add -j4 - on a Raspberry Pi trying to compile on more then one core is a bad idea.

[Realsense Customer Engineering Team Comment]
Hello @eospi
We were able to replicate what you are seeing, it indeed has to do with swap file space, or lack thereof.
After following these steps the python bindings were able to be compiled:

Enable swap file, for our tests we enabled 1GB:  https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04

Verify you are compiling from main SDK directory, not the python folder.  https://github.com/IntelRealSense/librealsense/issues/1220

If you are still experiencing issues compiling wrappers, disable OpenGL - if you have already enabled it, I have noticed OpenGL being enabled uses more environment resources than when it is turned off.
Steps: - sudo raspi-config

5 Advanced Options

A6 GL Driver

G3 Legacy Original non-GL desktop driver (Enable this if you still can not compile after following above steps.  Remember to enable G1 GL (Full KMS) OpenGL driver setting after wrapper compilation to allow for OpenGL to run camera streams.)

Please let us know if you have any other questions.
Thank you!

Thanks for the help! After trying the swap file, it successfully compiled. I'm excited to get started on my project.


Naming Nodes

Hi,
For a FBP graph embedded system , I need to name some Nodes (not all) . So the name could be used for the embedded system to allow value editing.
For example on a graph , I have a Timer node linked to a Time integer value. I want to name the Integer value, 'Motor Time On' , so I could present a GUI on my system to edit 'Motor Time On' value. Is it possible to do this at this time ?
And thanks for your great  library !

I'm not sure I understand your question.
You can change the name of any node by setting the Name property on the NodeViewModel.
If you want to have the user change the name of a node, there is no built-in support for this.
You can either add a button using LeadingControlPresenter, or do something more custom by creating a custom node view.

In fact what the name property is the name of the 'component' , the name of the type of block ans is linked to the node class. What I need is a way to name a instantiated node . If you consider the codegenap example, theres's a integer value type of node.  I would name a first placed one 'integer A' and another one 'integer B'.

The codegenapp example uses a nodelist. When you drag a node from the list, a new node viewmodel is created of the same type and it is added to the network. The Name property is both the name of the 'component' and of the actual instantiations. If you want to change the name of the instantiations, simply change the Name property after creation of the node.

Ok , then it means we have to chose between Node name (instance name) and node type (component name).
Here's a picture from Soletta (https://github.com/solettaproject), a tool for IoT Function Block Programming:

You can see on some nodes 2 strings : The name of the node and the type name.
For FBP programming editors , it could be mandatory.
I hope such a management  could be be added in your library :)

This seems like something you could add fairly easily using the LeadingControlPresenter property on the node view. (See example here)


📦 App Packaging 📦

(Still incomplete) TODO list about packaging problems/features to be solved/implemented for the various operating systems.

Windows

[ ] The installer doesn't remove previously installed instances of the app

[ ] There is a command-line window opening and closing quickly at the end of the Windows setup wizard since no other WixToolset feature for running commands quietly worked as expected.

[ ] The sample graphics used for the Windows installer should be modified. Since transparency is supported, I suggest the dialog background be limited to the left side only to follow the standards and fix the visual issues there. The same can apply to the banner image, traditionally only an icon was shown on the right side of it.

macOS

[x] Possibility to run cargo bundle without building again (solved by manually building the .app file)
[ ] The wrapper script to open the app on macOS should be changed. Known issues: #197, #198, #226

Linux

[ ] AppImage, Flatpak, and other kinds of packages
[ ] Build and publish a Debian Source Package

Feel free to list other problems/features that come to your mind and I'll add them @4r7if3x

Could be worth getting an SSL certificate to sign the Windows package. Otherwise Windows Defender gets upset that it is an unknown publisher.

Could be worth getting an SSL certificate to sign the Windows package. Otherwise Windows Defender gets upset that it is an unknown publisher.

Yep, absolutely. I immediately add it to the set of features.
And similarly should also be done for macOS...

@GyulyVGC You'd need a registered company and enlist it with D&B to obtain a Code Signing Certificate. Besides, you can buy them cheaper from resellers such as GoGetSSL.

Dang, I was hoping for a for a free solution but it may be utopian.

This may be an option for you: https://github.com/axodotdev/cargo-dist

#252


OneDriver Link.

Could you reprovide a OneDrive link due to the previous one has expired. Thanks!

Can you provide the link that is not working?

https://uillinoisedu-my.sharepoint.com/:f:/g/personal/hokeikc2_illinois_edu/ElEqJXQqaqZAqG8QROa0VesBAw4FiOl5wleP2iq_KXDPyw?e=eKMSbx
The above link generates the following page.

Yeah, it is pretty annoying that Onedrive keeps killing my links. I have updated the links in readme. Can you try again?

Thanks! It works again.


MLflow backed MLCatalog

take over it, will continue from the latest commit

@Renkai i think you may want this as well: https://github.com/eto-ai/rikai/pull/351
Currently we only set tags on the run, which makes it difficult to search models for a particular property. #351 gets you started with logging to the registered model and the version. To wrap it up and make it ready, please test it further and familiarize yourself with the associated Mlflow APIs. #351 and the mlflow catalog goes together


Move reference-docs generation tools into docs/ subdir

This PR simply moves the recently added Bazel docs generation code into the docs/ subdirectory, in an attempt to move things out of hack/ and tidy up the codebase a bit 😄
NONE

/test verify


config to remove " " for the Content Type in accept headers

Currently, dicomwebClient adds "" around the type in the accept header. However, having "" makes a request a "not simple request" resulting in a preflight request to be sent to the server first. You can see below
With quotation

This is basically twice the amount of request hence twice the travel to the server, making the load time significantly slower (on 600 images around 2 seconds).
Apparently in the original RFC for the standard there is no need for quotation, but in the examples there are quotations. I'm opening this issue to check on the feasibility for removing this quotation (or maybe see if there's a better way to do it.)
The RFC is https://www.ietf.org/rfc/rfc2387.txt and the text that is difinitive for the mime type is:
related-param := [ ";" "start" "=" cid ]
[ ";" "start-info" "="
( cid-list / value ) ]
[ ";" "type" "=" type "/" subtype ]
; order independent

where type and subtype are both tokens. Tokens are not permitted to have quotes around them unless otherwise specified in the syntax.
I'm CC'ing the people who I think might want to participate in this discussion
@hackermd @dclunie @pieper @swederik @chafey @wayfarer3130 @Zaid-Safadi @fedorov

The " around is in a note in the RFC, thus not normative.  The normative section is the syntax definition, and that part does not permit quotes - and is defined in exactly teh same way other content parts are defined, so I suspect it is correct there.

Some quick testing shows that this quote behavior is consistent across Chrome, Firefox and Safari.  Given that, I suggest we disable quoting by default and allow it to be turned on if the server requires it

This is great information and thanks to everyone for explaining. I wanted to share my opinion as I got burned by this in the past due to the inconsistency of interpreting the standards.
Assuming the intent of this open-source project is helping everyone, including the average Joe decades from now, to pull the library and start using it with no issues out of the box, I believe we should have the default configuration follow what the standard says.
Subject matter experts who know how to interpret the standards, and wanting to get extra performance will have no problem digging into the details and finding about flipping the quotation configuration if that really helps.
The first version of the DICOMweb standard didn't have the "quotation" requirement, when I implemented DICOMcloud and DICOMweb-is, I spent significant time trying to figure out why my JS client fails to request images from the server, and after tons of research, I found out in the RFC that I had to include "quotation" in my request, and once I did, my requests finally worked. This is due to the .NET Framework not accepting the "type" parameter without these quotes. Eventually, the next version of the DICOMweb standard came out and fixed this by requiring the quotation and I created an issue to have this library fixed accordingly.
I would really hate for this library to cause someone else the same pain I had because by default we are not following the standard.
My suggestion, if this is indeed an issue, let's first get it updated in the DICOM standard after clearing the RFC requirements, then we can change the default (and maybe the NET Framework if needed).

This has a long and sordid history in DICOM PS3.18, and I am still not sure what the "right" answer is (if you will excuse the quotes), but @wayfarer3130 has promised to reactivate CP 1776 and push it through the DICOM process in WG 27 and WG 6.

Thank you all for your responses. Looking at the web standard here https://www.w3.org/TR/2020/SPSD-cors-20200602/#simple-header tells me that it should be unquoted, but I don't care about what should be the default value.
Some sort of configuration is needed for backward compatibility even if the dicom standard gets updated at some point, are you (@hackermd) open to add such config at the library level? I can make the PR for it

WildFly/RESTEasy content type parser is agnostic  concerning quotes of parameter values, so DICOMWeb servers relying on it (as dcm4chee-arc 5.x) should handle quoted and non-quoted content type parameter values the same way.

I can make the PR for it

It sounds to me like we are ready to move to that stage.

Thanks everyone for providing additional background and feedback.
Given all the great input, I suggest adding a parameter to the constructor of the DICOMwebClient class to control the behavior (e.g., quoteTypeParameterValue or something along those lines). Given that the current edition of the standard still requires quotes and the client currently achieves interoperability with a wide range of origin servers, I would suggest keeping the default behavior for the time being (i.e., set { quoteTypeParameterValue: true }). We can monitor the behavior of different servers when omitting the quotes and re-consider the default argument moving forward.
What do you think?

I like your proposal @hackermd because as I understand it changing the default behavior would break some use cases and would only improve performance in others.  Also we can expect that a user will know the capabilities of the server if they choose to change the default behavior to improve performance for a specific server.  It also seems to me that if someone really wanted to we could add a { quoteTypeParameterValue: 'auto' } option that probed the server to see what it accepts.

Thanks everyone for providing additional background and feedback.
Given all the great input, I suggest adding a parameter to the constructor of the DICOMwebClient class to control the behavior (e.g., quoteTypeParameterValue or something along those lines). Given that the current edition of the standard still requires quotes and the client currently achieves interoperability with a wide range of origin servers, I would suggest keeping the default behavior for the time being (i.e., set { quoteTypeParameterValue: true }). We can monitor the behavior of different servers when omitting the quotes and re-consider the default argument moving forward.
What do you think?

Sounds great to me! For OHIF we will just set it false for our demos so they are fast, and this way we won't impact any servers that can't work without the quotes.

Sounds like we have a conclusion. Thanks everyone

@sedghi would you like to draft a pull request?

I have run some tests against a range of different archives and the requests appear to handled just fine when the quotes are omitted. Therefore, I would be open to changing the default behavior of the library and send requests without quotes by default.

@Zaid-Safadi did I understand correctly that quotes are required for the .NET based server?  If that's the case I'd still vote for leaving the default as is (or implement the auto option).

I like the auto option @pieper. If the current behavior in fact violates the HTTP standard, then I tend argue that we should not keep it as default.

@Zaid-Safadi did I understand correctly that quotes are required for the .NET based server? If that's the case I'd still vote for leaving the default as is (or implement the auto option).

That is correct @pieper , .NET framework doesn't recognize the "type" parameter if it is not quoted.
If the quotes are omitted by default, the library becomes not usable OOTB with any DICOMweb server built in .NET including MS DICOMweb server, DICOMcloud or any other server built using the .NET based DICOM toolkit fo-dicom
The only two examples in the RFC showing how a multipart/related content-type header is formatted, are both quoted as well:
Section 5.1

 Content-Type: Multipart/Related; boundary=example-1
<EMAIL_ADDRESS>         type="Application/X-FixedRecord"
         start-info="-o ps"

and Section 5.2
     Content-Type: Multipart/Related; boundary=example-2;
<EMAIL_ADDRESS>             type="Text/x-Okie"

Perhaps @StevenBorg Steven Borg<EMAIL_ADDRESS>who has an interest in DICOMweb for WSI, may be able to help with this.

        I’ll take a look!---- On Thu, 20 Oct 2022 14:43:58 -0700  David<EMAIL_ADDRESS>wrote ----

Perhaps @StevenBorg Steven Borg @.***, who has an interest in DICOMweb for WSI, may be able to help with this.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

Thanks @hackermd for the research, we also opted in to have it as default true (with "") in OHIF https://github.com/OHIF/Viewers/blob/v3-stable/platform/viewer/public/config/default.js#L9

It appears the preflight requests are performed because the " character in the Accept header field is considered a CORS-unsafe request-header byte.
However, simply omitting the character and thereby breaking HTTP syntax rules is not a good way to work around the problem in my opinion.

RFC1872 The MIME Multipart/Related Content-type Section 3.4 Syntax states:

Note that the parameter values will usually require quoting.

As pointed out by @Zaid-Safadi, all examples in the RFC for the Content-type header field quote the value of the type parameter.
RFC9119 HTTP Semantics Section 8.3.3 Multipart Types states:

All multipart types share a common syntax, as defined in Section 5.1.1 of [RFC2046]

RFC2046 Section 5.1.1 Common Syntax doesn't explicitly comment on the quoting of the type parameter, but makes the following statement regarding the boundary parameter:

The grammar for parameters on the Content-type field is such that it is often necessary to enclose the boundary parameter values in quotes on the Content-type line.  This is not always necessary, but never hurts.

RFC9119 HTTP Semantics Section 5.6.6 Parameters states:

A parameter value that matches the token production can be transmitted either as a token or within a quoted-string.

RFC9119 HTTP Semantics Section 5.6.2 Tokens states:

Tokens are short textual identifiers that do not include whitespace or delimiters. [...] Delimiters are chosen from the set of US-ASCII visual characters not allowed in a token (DQUOTE and "(),/:;<=>?@[]{}")

Since the value of the type parameter includes the / character, it should not be considered a token but a quoted-string.
My conclusion is that quoting of the type parameter value is required by HTTP.

This is great details @hackermd , thank you for the effort!


Create main content page

Something like the image below. We no longer need the following:

Comment, attach files, More, Admin, Export, Share

Additional Requirements:

For Purchase Requests, we want to be able to see what funding item is funding it somewhere on the page
For Funding Items, we want to be able to see what sponsorship fund is funding it, as well as what purchase request it is funding
For Sponsorship Funds, we want to be able to see which funding item it is funding.
For the small logo, instead of a rocketship it should be the corresponding logo y'all decide to create for the respective ticket type (purchase request, funding item, sponsorship fund)

Comments are pretty important! Derek uses it all of the time