"Authentication credentials were not provided." Error occur While access through Postman

"Authentication credentials were not provided." Error occur While access API through Postman

following code is used in Django setting.py file
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES':(
'rest_framework.authentication.TokenAuthentication',
# for browsable api view usage
'rest_framework.authentication.SessionAuthentication',
),
'DEFAULT_PERMISSION_CLASSES': (
'rest_framework.permissions.IsAuthenticated',
),
}
Please recommend a solution for this issue??

Hi! The web interface works great however I can not connect using cURL:
Using: REST framework JWT Auth
settings: REST_USE_JWT = True
Here trying to log in with cURL
$ curl -X POST -d "{"username":"shovel"<EMAIL_ADDRESS>"password":"123"}" http://localhost:8000/rest-auth/login/ -v
Note: Unnecessary use of -X or --request, POST is already inferred.

Trying <IP_ADDRESS>...
TCP_NODELAY set
Connected to localhost (<IP_ADDRESS>) port 8000 (#0)

POST /rest-auth/login/ HTTP/1.1
Host: localhost:8000
User-Agent: curl/7.63.0
Accept: /
Content-Length: 71
Content-Type: application/x-www-form-urlencoded

upload completely sent off: 71 out of 71 bytes
< HTTP/1.1 400 Bad Request
< Date: Thu, 14 Feb 2019 03:10:41 GMT
< Server: WSGIServer/0.2 CPython/3.7.2
< Content-Type: application/json
< Vary: Accept, Cookie
< Allow: POST, OPTIONS
< X-Frame-Options: SAMEORIGIN
< Content-Length: 40
<
Connection #0 to host localhost left intact
{"password":["This field is required."]} <---- does not see the password

I tried formatting the data like this also:
-d '{"username":"shovel"<EMAIL_ADDRESS>"password":"123"}'
Got the same result.
Then  i tried copying and pasting the returned JWT from the web interface to view the restricted page:
~$ curl -H "Authorization: JWTeyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NzM5NCwiZW1haWwiOiIifQ.FILWdmNJchAwXh3SVdXSKu16YdrgkulaaXtqfsAygSg" -H "Content-Type: application/json"  -X GET http://localhost:8000/api_jwt/see-stuff/ -v
Note: Unnecessary use of -X or --request, GET is already inferred.

Trying <IP_ADDRESS>...
TCP_NODELAY set
Connected to localhost (<IP_ADDRESS>) port 8000 (#0)

GET /api_jwt/see-stuff/ HTTP/1.1
Host: localhost:8000
User-Agent: curl/7.63.0
Accept: /
Authorization: JWTeyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJJWT: yLCJ1c2VybmFtZSI6InNob3ZlbCIsImV4cCI6MTU1MDExMzM5NCwiZW1haWwiOiIifQ.FILWdmNJchAwXh3SVdXSKu16YdrgkulaaXtqfsAygSg
Content-Type: application/json

< HTTP/1.1 403 Forbidden
< Date: Thu, 14 Feb 2019 03:19:56 GMT
< Server: WSGIServer/0.2 CPython/3.7.2
< Content-Type: application/json
< Vary: Accept, Cookie
< Allow: GET, HEAD, OPTIONS
< X-Frame-Options: SAMEORIGIN
< Content-Length: 58
<

Connection #0 to host localhost left intact
{"detail":"Authentication credentials were not provided."} <--- same thing

In the web console, there is a csrf token and session id in the request header.
Maybe I misunderstood, but I thought that JWT was used instead? We want to go from machine to machine with no web interface. is that possible?

Did You provide the Token parameter in the header?

@Navaruban did you end up finding a solution to this? I've been trying to debug this for hours now.

I have Postman working with JWT. In Headers tab add 'Authorization' as Key and add 'JWT in Values.
Notes:

you MUST HAVE an space after JWT keyword.
Use ONLY JSONWebTokenAuthentication. This will guarantee that Django will ignore things that only exists in browsers like session and you can simulate better for mobiles.
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
# 'rest_framework.authentication.SessionAuthentication',
# 'rest_framework.authentication.BasicAuthentication',
),

@nandojve Thanks, how about the authorization type?

You need to authenticate with Token (In your case).
Try this
curl -X GET http://<IP_ADDRESS>:8000/api/example/ -H 'Authorization: Token 9944b09199c62bcf9418ad846dd0e4bbdfc6ee4b'
And read more in the doc

https://www.django-rest-framework.org/api-guide/authentication/
has all details about Authentication and this issue must be closed

Everything was working fine in Local Server, but on production Server I had to make changes in Apache.

@vasantp20  what were the change you made in apache? please describe

After removing the SIMPLE_JWT settings from the Settings.py file, I got the postman and curl to work
SIMPLE_JWT = {
'AUTH_HEADER_TYPES': ('JWT',),
}

Since it is session Login so you need to provide you credentials
so do /admin and login later it will work fine

@syedmudaseer and anybody else stumbling on this later on, you need to enable WSGIPassAuthorization in the apache config:
WSGIPassAuthorization On

The proper way to attach a token on postman for simple TokenAuthentication is by going to the Headers tab and adding an "Authorization" key with a value "Token  " (without quotes).
As pointed to by @dheerajpai in the link:
https://www.django-rest-framework.org/api-guide/authentication/
I am just restating it here for clarity.

For postman this is what you need

I was facing the same issue. then went to the admin panel(http://<IP_ADDRESS>:8000/admin/) and logged in using superuser credentials. worked for me.
Maybe, in my case, you can not access user data without authentication.

Make sure you have WSGIPassAuthorization On on /wsgi.conf

Make sure you have WSGIPassAuthorization On on /wsgi.conf

After removing the SIMPLE_JWT settings from the Settings.py file, I got the postman and curl to work
SIMPLE_JWT = {
'AUTH_HEADER_TYPES': ('JWT',),
}

This works for me. Can anyone explain why?

has all details about Authentication and this issue must be closed

No

I have Postman working with JWT. In Headers tab add 'Authorization' as Key and add 'JWT in Values. Notes:

you MUST HAVE an space after JWT keyword.
Use ONLY JSONWebTokenAuthentication. This will guarantee that Django will ignore things that only exists in browsers like session and you can simulate better for mobiles.
'DEFAULT_AUTHENTICATION_CLASSES': (
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.BasicAuthentication',
),

Thank you very much @nandojve. Using JWT instead of Bearer worked for me

Hi! I tried to use oauth2 authentification with google API for my django framework project. But I don't know where to place access token to be authenticated in my service. I get an error - Authentication credentials were not provided. I think my token just not passed and the server doesn't get it.
So I did:

created credentials in https://console.developers.google.com/
got access token in postman (I set http://<IP_ADDRESS>:8000/api/accounts/google/login/callback/ as callback URL, set client ID and client secret, auth_url https://accounts.google.com/o/oauth2/auth and auth_access_token_url https://oauth2.googleapis.com/token)
after getting token, it's automatically set into request header as Authorization
used endpoint http://<IP_ADDRESS>:8000/api/accounts/google/login/?process=login to authenticate
I also passed CSRF token
I tried to use 'Token how8fr7hqe9fr3iul2fh' in Authorization header

On finish I get 200 code response (it's HTML file of the google authorization page where I was redirected).
Actually I should get code 404 and be redirected to http://localhost:8000/
I tracked all redirections in postman and I saw that I redirected to google auth page (where it suggest me some of my existed accounts), I passed my client id in request and that's it...  my needed account is not chosen and I redirected to another endpoint and get 200 code.
Well, I hope somebody understands the topic and help me

"Authentication credentials were not provided." Error occur While access API through Postman
following code is used in Django setting.py file
REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES':( 'rest_framework.authentication.TokenAuthentication', # for browsable api view usage 'rest_framework.authentication.SessionAuthentication', ), 'DEFAULT_PERMISSION_CLASSES': ( 'rest_framework.permissions.IsAuthenticated', ), }
Please recommend a solution for this issue??

**I did have the same issue with token access.
In Curl its is working with string with " "  not with single ''
I tried with same

curl http://<IP_ADDRESS>:8000/api/blog/1/ -H "Authorization: Token c63fe7a5286109841e7d25fbc7f9413e9483897b"
Hope it work for you
**

I am getting the same issue, I've tried everything?! I am unable to log into /admin as a superuser as I have a custom API login but I doubt that should matter.
I am getting:
403 Forbidden
"detail": "Authentication credentials were not provided."

@syedmudaseer and anybody else stumbling on this later on, you need to enable WSGIPassAuthorization in the apache config:
WSGIPassAuthorization On

I just want to chime in and thank you for this. Had to do some digging around on to find the proper conf file because there's no /etc/apache2/ or apache/ on my server


linkActiveClass not working as expected after upgrade from 4.1.5 to 4.1.6 anymore

Version
4.1.6
Reproduction link
too-complicated-to-recreate-for-just-reporting-this-issue
Steps to reproduce
Upgrade from 4.1.5 to version 4.1.6
What is expected?
Top level menu is highlighted when a sub-menu item is active.
What is actually happening?
After upgrading to version 4.1.6 top level menu is not highlighted anymore when sub-menu is active.

It is too complicated to sign-up on one of those sandboxes just to report this issue.

Can't do much without a repro but this is very likely linked to https://github.com/vuejs/router/commit/756f755731284f0f1899a2f8b62cb074b6f0f842
Remember to use the forum, Discussions (here) or the Discord chat to ask questions!


update(cmake): bump OpenSSL to 1.1.1o

Signed-off-by: Luca Guerra<EMAIL_ADDRESS>
What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area driver-kmod

/area driver-ebpf

/area libscap
/area libsinsp

/area tests

/area proposals

What this PR does / why we need it:
Update OpenSSL to the latest version for the 1.1.1 Series, also fixing the following vulnerabilities:

CVE-2022-1292
CVE-2022-0778
CVE-2021-4160

Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:

update(cmake): Update OpenSSL to 1.1.1o

Hi @LucaGuerra. Thanks for your PR.
I'm waiting for a falcosecurity member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: LucaGuerra
To complete the pull request process, please assign fededp after the PR has been reviewed.
You can assign the PR to them by writing /assign @fededp in a comment when ready.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

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

Thank you @LucaGuerra!
/ok-to-test

LGTM label has been added.  Git tree hash: 06c134860fa9bc6d006c5c14772094150efc4fc6

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Andreagit97, LucaGuerra
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [Andreagit97]

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

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: Andreagit97, leogr, LucaGuerra
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [Andreagit97,leogr]

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


Update Dockerfile

Update base image because microsoft/mssql-server-2016-express-windows is deprecated

@AntoineGa can you sign your PR?
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work


[KYUUBI #4994][FOLLOWUP] Respect the engine type and share level for listing all engines

Why are the changes needed?

Now, the specified engine type and share level does not work
How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[ ] Add screenshots for manual tests if appropriate

[x] Run test locally before make a pull request

Was this patch authored or co-authored using generative AI tooling?

Codecov Report

Merging #5353 (295665b) into master (2690d6d) will not change coverage.
The diff coverage is 0.00%.

@@          Coverage Diff           @@
##           master   #5353   +/-   ##
======================================
  Coverage    0.00%   0.00%
======================================
  Files         590     590
  Lines       33493   33494    +1
  Branches     4424    4424
======================================
- Misses      33493   33494    +1

Files
Coverage Δ

...rg/apache/kyuubi/server/api/v1/AdminResource.scala
0.00% <0.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Don't forget to answer "Was this patch authored or co-authored using generative AI tooling?" in the PR description.

This actually breaks the semantic of "all", and results in the strange behavior. Reverted in 8980e0752d86d33eee3e915c37902e88886c8f2b


New index of Included Metrics etc. - Questions re. Flip-Flop Index

I am currently working on a new index listing the metrics/tools/tests included in scores, for inclusion in the documentation. I have now finished the first draft, which can be previewed here: https://scores.readthedocs.io/en/228-documentation-testing-branch/included.html
(1) Could somebody please take a look at how I have presented Flip-Flop Index?
Please feel free to either make changes as you see fit, or let me know if there any changes you would like me to make.
(2) Neither API (scores.continuous.flip_flop_index & scores.continuous.flip_flop_index_proportion_exceeding) appears to list the paper references. (Although the paper references are listed in the tutorial).
(3) I noticed the scores.continuous.flip_flop_index_proportion_exceeding API has a box at the bottom that says "see also scores.continuous.flip_flop_index" at the bottom. Should there also be a box at the bottom of scores.continuous.flip_flop_index saying "see also scores.continuous.flip_flop_index_proportion_exceeding"? (I don't have an opinion on this, but thought I would ask).

(4) This is more of a note to myself, although if somebody happens to know the solution, that would be great!
I initially had grid tables, but with the length of the URLs, they became very hard to read (and, as such, I imagine may have been hard to maintain). So I changed the tables to list view.
However, I have just realised re. Flip-Flop Index and Murphy Score - depending on the size of your browser window, the table is not necessarily keeping the Name/API/Tutorial/Reference(s) information in line with one another.
So if Flip-Flop Index and Murphy Score each continue to be listed as two separate lines within one row (not sure if I have used the right terminology), I will need to figure out how to keep each in line with their associated information, or otherwise enter them as separate rows.
I'll try and look into that later, and update here if I solve it. But if anyone happens to know the solution, please feel free to let me know!

(1) I am happy with the presentation layout
(2) I would ideally like a reference to be added in the API docstrings
(3) I don't think it's necessary to say "see also ... exceeding" in the flip_flip_index method.


fix: WeComInternalIdProvider GetUserInfo method could not get the correct user id

According to the Wecom official API documentation, Modify GetUserInfo method in order to get the correct user id instead of always the username.
Reference link：https://developer.work.weixin.qq.com/document/path/90196

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


Union of z.literal() numbers

How would you go about doing this?
const union = z.union(
    [1, 2, 3, 4, 5].map((val) => z.literal(val)),
)
-----------------------------------------------------
const arr = [1, 2, 3, 4, 5] as const
const union = z.union(
    arr.map((val) => z.literal(val)),
)

Neither works with the type system.
Argument of type 'ZodLiteral<number>[]' is not assignable to
parameter of type 'readonly [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]'.
Source provides no match for required element at position 0 in target.
------------------------------------------------------------------------------------
Argument of type 'ZodLiteral<0.166667 | 0.2 | 0.25>[]' is not assignable to
parameter of type 'readonly [ZodTypeAny, ZodTypeAny, ...ZodTypeAny[]]'.
Source provides no match for required element at position 0 in target.

I've tried using refine which works but gives me inferred type 'number' instead of 1 | 2 | 3 | 4 | 5.

Zod requires that the argument to z.union is a tuple because otherwise it can't properly infer the types of the input/result. TypeScript does not support Array.map on tuples. You could use a mapped type to achieve this, or you could just list the options statically:
const union = z.union([z.literal(1), z.literal(2), ...]);


Release

Hey, would you be so kind and create a release here on github? In that case I will probably be able to generate a conda package for easier installation

Hi, welcome to here. The first verison of FVC has been released on the https://github.com/yyren/FVC/releases/tag/v1.0.0. If you have any questions about this, please let me know.


BUG- Loading TOML Config leads to incorrect behaviors

Description
Python and TOML configurations have different behaviors. TOML configuration has incorrect behaviors. Data Nodes are only created once, even with Scope=Scenario, even if multiple scenarios have been created.
How to reproduce
The .data contains two scenarios as expected, but only two data nodes are present in the .data when 4 are expected (two 'a' data nodes and two 'b' data nodes).
from taipy.config import Config

import taipy as tp

def f(s):
    return s

a_cfg = Config.configure_data_node("a", default_data="a")
b_cfg = Config.configure_data_node("b")

t_cfg = Config.configure_task("t", function=f, input=a_cfg, output=b_cfg)
s_cfg = Config.configure_scenario_from_tasks("s", t_cfg)

Config.export('config.toml')

if __name__ == "__main__":
    Config.load('config.toml')

    tp.Core().run()

    print("--------------------")
    for dn_cfg in Config.data_nodes.values():
        print(dn_cfg.id + " - " + dn_cfg.scope.name, flush=True)
    print("--------------------")
    for s_cfg in Config.scenarios.values():
        for p_cfg in s_cfg.pipeline_configs:
            for task_cfg in p_cfg.task_configs:
                for dn_cfg in task_cfg.inputs:
                    if dn_cfg.scope:
                        print(dn_cfg.id + " - " + dn_cfg.scope.name, flush=True)
                    else:
                        print(dn_cfg.id + " - None", flush=True)
                for dn_cfg in task_cfg.outputs:
                    if dn_cfg.scope:
                        print(dn_cfg.id + " - " + dn_cfg.scope.name, flush=True)
                    else:
                        print(dn_cfg.id + " - None", flush=True)
    print("--------------------")
    s1 = tp.create_scenario(Config.scenarios['s'])
    s2 = tp.create_scenario(Config.scenarios['s'])
    print(len(tp.get_data_nodes()))

Expected behavior
TOML and Python configurations should have the same behavior. Data Nodes should be correctly created according to the creation of their respective scenarios.
Runtime environment
Please specify relevant indications.

Taipy version: Taipy 2.3.dev2

Summary of my first investigations:
The applied config is inconsistent. I don't get the root cause, but here is the symptom.
Instances of nested sections of an applied section do not refer to the applied instance.
This issue has been exhibited by the fix on the clean/update. It s the same issue that has not been completely fixed.
Example:
Let's call inst_pyt_A the instance of the data node config A of the _python_config :
inst_pyt_A = Config._python_config._sections["DATA_NODE"]["a"]
Let's call inst_app_A the instance of the data node config A of the _applied_config :
inst_app_A = Config.data_nodes["a"]
Let's call inst_app_task_A the instance of the data node config A of the task config T of the _applied_config :
inst_app_task_A= Config.tasks["t"].inputs["a"]
inst_pyt_A.scope == None
==> correct
inst_app_A.scope == SCENARIO
==> correct
inst_pyt_A is inst_app_A == False
==> correct
inst_app_task_A is inst_pyt_A == True
==> WRONG I am expecting inst_app_task_A is inst_app_A to be True
inst_app_task_A.scope == None
==> WRONG. This is the value that is used by the create_scenario method.
Workaround on Core
In the create_scenario method on taipy-core, we can retrieve the correct value getting the section directly from Config, instead of getting it from the nested sections.


The drop-down list of the user manual column on the website is incompletely displayed

Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
Visit the website  and click Get Started -> User Guide -> Kubernetes/Konfig .

2. What did you expect to see? (Required)
All items in the drop-down list should be displayed.
3. What did you see instead (Required)
Some items in the drop-down list is not fully displayed.
4. What is your KusionStack components version? (Required)
null

Thank you for your feedback. May I know what your browser version is?

OS: Windows 10 Professional 22H2
Browser: Microsoft Edge 112.0.1722.39

OS: Windows 10 Professional 22H2 Browser: Microsoft Edge 112.0.1722.39

Thanks. We will verify if it is a browser compatibility issue with the website framework docusaurus.


Failed at the<EMAIL_ADDRESS>install script 'node-gyp rebuild'

Hello all,
I have latest node version on Windows 7 (node v0.12.3) and latest npm version (npm 2.10.0).
I also have Python installed on the machine and I already registered it:
npm config set python D:\python
... but when I try to install memcached client on my node project I get the following error stacktrace:
npm install memcached --save
|
><EMAIL_ADDRESS>install D:\xampp\htdocs\exp0\node_modules\memcached\node_modules\hashring
> node-gyp rebuild

D:\xampp\htdocs\exp0\node_modules\memcached\node_modules\hashring>if not defined npm_config_node_gyp (node "C:\Users\Alejandro\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (rebuild)
gyp ERR! configure error
gyp ERR! stack Error: spawn D:\python ENOENT
gyp ERR! stack     at exports._errnoException (util.js:746:11)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1053:32)
gyp ERR! stack     at child_process.js:1144:20
gyp ERR! stack     at process._tickCallback (node.js:355:11)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Users\\Alejandro\\AppData\\Roaming\\npm\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd D:\xampp\htdocs\exp0\node_modules\memcached\node_modules\hashring
gyp ERR! node -v v0.12.3
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok
npm ERR! Windows_NT 6.1.7601
npm ERR! argv "node" "C:\\Users\\Alejandro\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "install" "memcached" "--save"
npm ERR! node v0.12.3
npm ERR! npm  v2.10.0
npm ERR! code ELIFECYCLE

npm ERR<EMAIL_ADDRESS>install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the<EMAIL_ADDRESS>install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the hashring package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls hashring
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     D:\xampp\htdocs\exp0\npm-debug.log

Any idea about how to overcome this?
Thanks a lot

I ran into this error today and found this issue through Google. I ran again with npm install --msvs_version=2012 and that worked for me.

doesn't work for me, any other options, how can i help detecting the issue?

It seems the latest version of hashring uses a plain javascript implementation, and that memcached was updated to use it. However, no new version seems to have been released yet.

Published fix as 2.2.0


handle different project dependency configs

The current way of populating project dependencies doesn't always return all the dependencies.  This is mainly because Gradle doesn't really expose the concept of a sourceset in one project depending on a sourceset in another project.
I've added a number of tests to show how various configs have got round this limitation over the years.
I don't think the current Gradle API allows a way to simply query the project dependencies that would satisfy all these new tests.
So the implementation here queries a project's classpath and then matches those entries to the output paths (or archive jars) of other projects' sourcesets.

Fixed checkstyle and rebased

Fixed checkstyle issue

Looks good to me and able to be merged. Meanwhile, there is a PR at the client side needs to be merged based on this change.
I have a question that may not be related with this work:
What about composite build in Gradle: https://docs.gradle.org/current/samples/sample_composite_builds_basics.html
How does bloop handle it?

I'm not sure.  I guess I could add a test and see what happens

I'll merge this once https://github.com/microsoft/vscode-gradle/pull/1464 is merged. It's holiday season now so please expect the delay.


Unable to move (drag with the mouse) track when it's a polygon

My actions before raising this issue

Read/searched the docs
Searched past issues

Hello, when I draw a boundingBox (2 points) in track mode it's totally possible to drag it on the image. But sadly when I try the same thing with a polygon the whole image moves instead of moving the polygon on the image.
I couldn't find anything in the docs or in previous issues related to this problem.
Thanks in advance for your response :)
Best

@bsekachev could you please take a look?

@bsekachev could you please take a look?

@Smirkey
Hi, thanks for you concern.
Polygons are default "pinned" and cannot be moved (in the most of task you do not need to move an entire polygon).
To do them "unpinned" press the icon button (shown on the screenshot below)

@Smirkey
Hi, thanks for you concern.
Polygons are default "pinned" and cannot be moved (in the most of task you do not need to move an entire polygon).
To do them "unpinned" press the icon button (shown on the screenshot below)

Thank you :) !

Thank you :) !

Hi @bsekachev there actually are many instances that suffer from mismatching thus it is crucial to move ans also sometimes to rotate multiple polygons at once. I know about the unpinning, however I was wondering is there any other convenient way of moving (single or multiple at once) polygons? How about rotating? if not is there any plan to add such capabilities which seems crucial to many geospatial data labeling? I appreciate the help and thank you :)

Hi @mohammadreza-sheykhmousa
We do not have these features in our current road map. Since our team has limited resources we can't satisfy all the community requests. But CVAT is an open source tool which everyone can contribute into, and we would like to review community PRs, provide feedbacks, and give advice if necessary


Posterior Predictive Checks

Posterior predictive checks are an important part of Bayesian inference and checking to see if your model is running. At present, Turing does not seem to have any functions or plotting recipes associated with such checks. We should try to develop a few ways for users to run checks on their model after it has completed. Some of the potential issues I can see arising are that the highly customisable model specification means that it would be difficult to have a pre-fabbed function that could easily take a chain object as an argument, unless we were able to parse the likelihood expression out of the model definition. Perhaps the easiest route in the short term is to just provide some examples in the documentation so newer users can see how a posterior predictive check would be performed and visualized in Turing.

I realize this is quite old but since it was unanswered I just thought I'd ask if you have seen ArviZ? More specifically the plot_ppc function?
https://github.com/arviz-devs/ArviZ.jl

I realize this is quite old but since it was unanswered I just thought I'd ask if you have seen ArviZ? More specifically the plot_ppc function?
https://github.com/arviz-devs/ArviZ.jl

Yes--ArviZ.jl is great for this, and we highly recommend it. However, it's a separate package, so questions about it should go in the ArviZ.jl github, rather than here.


Fix CVE-2021-28092

https://nvd.nist.gov/vuln/detail/CVE-2021-28092

Thank you for the contribution.
However, packages are automatically updated on a regular basis by renovate.


Fix $clean handling

$clean like any other input parameter is set to "YES". Presumably the opposite value is expected to be "NO" however the current implementation does not test for "YES" or "NO".

Hi @RussKie, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;

thanks


python312Packages.numpy-stl: 3.1.1 -> 3.1.2

Changelog: https://github.com/wolph/numpy-stl/releases/tag/v3.1.2

Things done

Built on platform(s)

[ ] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 349599 run on x86_64-linux 1

1 package marked as broken and skipped:

cura

4 packages built:

python311Packages.numpy-stl
python311Packages.numpy-stl.dist
python312Packages.numpy-stl
python312Packages.numpy-stl.dist


Add notebook for local RAG

What does this PR do?

In this notebook we give an example how to run RAG locally on your laptop using OpenVINO/LangChain/Phi-2
@echarlaix
Before submitting

[ ] This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
[ ] Did you make sure to update the documentation with your changes?
[ ] Did you write any new necessary tests?

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Hi @echarlaix , the PR is ready for review, will appreciate your comments

Hi @ofirzaf very cool app !
I don't think this should be in the notebooks examples since it's mostly ChromaDB+LangCha code, which is still unstable and will be difficult to maintain. It makes more sense to demonstrate complicated applications like these on a space in intel or optimum-intel huggingface organizations and/or with community blog post.


As a user I can undo recent action (CRUD), so that I can fix my error quickly.

Closing as it is a duplicate #10


(MINOR) Update to c2pa-rs 0.24.0 - revert to previous signing model

Changes in this pull request
c2patool 0.5.4 introduced a 1.3 spec signature change that is not compatible with older sdks.
This version can validate the new signatures but does not write them
We want to avoid creating the new signatures until there are more clients that can read them.

Codecov Report

Merging #127 (c2929b8) into main (e416069) will not change coverage.
The diff coverage is n/a.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@           Coverage Diff           @@
##             main     #127   +/-   ##
=======================================
  Coverage   83.95%   83.95%
=======================================
  Files           3        3
  Lines         374      374
=======================================
  Hits          314      314
  Misses         60       60


kinesisSinkEndpoint is of different format in Beijing

i.e. it is kinesis.cn-north-1.amazonaws.com.cn

Oh! Good point...

I made a pull request for kinesis-s3. Could you please take a look for potential merge?

The PR is here: https://github.com/snowplow/kinesis-s3/pull/71

closing since this will be part of #71


Add SequentialFunction

Proposed Changes

Add SequentialFunction as first example of a MultiDactorFunction

Related

meeting notes with first concept of MultiDactorFunctions
merge #108 first

Woops, that happened. I actually rebased the branch on master before it had any unique commits (anything that wasn't already on master), and that auto-merged with master.
I opened a new work-in-progress PR #112.


User lists: FAB with an incorrect color

In profile -> Lists, the FloatingActionButton is green whereas this color isn't in the design system

Hi @teolemon,
Please assign this issue to me.


Merge concat fails concatenating embeddings

I just experienced a problem concatenating the output of two embedding layer
model = Graph()
model.add_input(name='input1', input_shape=(1,), dtype=int)
model.add_input(name='input2', input_shape=(1,), dtype=int)
model.add_node(Embedding(1000, 50, input_length=5), name='we', input='input1')
model.add_node(Embedding(500, 25, input_length=5), name='f1e', input='input2')
model.add_node(Flatten(), name='flat', inputs=['we', 'f1e'])
model.add_node(Dense(256, activation='tanh'), name='hid', input='flat')
model.add_node(Dense(len(labels), activation='softmax'), name='class', input='hid')
model.add_output('output', input='class')

printing the output shape of each node i obtain:
(None, 5,  50)
(None, 5, 25)
(None, 375)
(None, 256)

with input_shape for the flatten layer as
(None, 5, 75)

so i was pretty sure all was ok.
But i obtained a dimension mismatch error due to the merging layer.
All was fixed by explicitly force the concat_axis=2 (the output_shapes as well as the input shapes results the same but it works at run time).
I was pretty sure that in the embedding case:
concat_axis=-1=2

Am i missing something or it should be considered as bug?

Ok now it should be ok, just had to update Theano to the development version otherwise it is broken should we put something on the homepage about a stable commit of their development version we as a requirement for Keras?
Otherwise both the relu activation and the merge layer are broken?

I put a warning in the docs and the README.


Trim whitespace from uri element text

This copies the whitespace test from #359
but takes a narrower approach by only trimming
whitespace from <uri> element text.
Closes #322.
Signed-off-by: Steve Peters<EMAIL_ADDRESS>

only trimming whitespace from  element text.

While working on an ign-sensors PR I needed the whitespace fix within a <topic> field: ignitionrobotics/ign-sensors#33 (comment)
I think it's not safe to assume that only URIs need the fix. I wouldn't be surprised to see some of these around, for example:
<name>
    my_robot
</name>

I hear you, but it still feels a bit too heavy-handed to modify every xml file like this

clicked the wrong button

I hear you, but it still feels a bit too heavy-handed to modify every xml file like this

I hear you too, the other PR should affect performance. My main concern at the moment is to keep the behavior backward-compatible.
Maybe there's a less invasive way of doing it. Extending your approach to all string values, maybe? I haven't checked how this affects elements like pose... Does this work, for example?
<pose>
1
2
3
0.1
0.2
0.3
</pose>

I hear you, but it still feels a bit too heavy-handed to modify every xml file like this

I hear you too, the other PR should affect performance. My main concern at the moment is to keep the behavior backward-compatible.
Maybe there's a less invasive way of doing it. Extending your approach to all string values, maybe? I haven't checked how this affects elements like pose... Does this work, for example?
<pose>
1
2
3
0.1
0.2
0.3
</pose>

I wrote that but then thought better of it but clicked "close with comment" by accident. I've since deleted it. I'm still thinking it through.

closing in favor of #359


Some improvements to the Repostitory

I have overhauled the README.md file, making it more organized and less cluttered. I have also improved .gitattributes file, which changes you can check yourself (I can revert it if needed). I have also decided to move folders and files to a "content" folder in order to reduce clutter on the main page, which might not be a welcomed change but I felt that it would be a great improvement.

I'll look at this in more detail and If I like the changes I'll merge.
Did you update the part of the readme explaining the config to mention toml (not sure if that should even be done until I make an actual update that uses toml, I plan on adding some extra config option like debug output, turning off the beep, turning on/off the output redirection, env variable configuration (so you don't have to set it globally) before I make a new release. (as of writing this I didn't have time to read your changes yet)
Sorry for the late response I don't look at my GitHub that frequently, but thanks for contributing any imp.

When you reverted those content changes did you manually undo them or did you revert the commit with git revert?
Maybe try and make a new branch (starting from my master) and then use git cherry-pick to get all the excluding everything involving the content folder changes (and your attempts of reverting the changes
Submodules are not defined by the file they are part of the git repo itself so you need to add/remove/modify them with git submodule commands.

Also Looking at your actual readme changes, your added disclaimer is wrong since LargePageInjectorMods does not directly require Admin Privileges.
The LockPagesInMemory Privilege required for Large Pages to work does not grant any sort of Admin privileges, it just allows locking pages in memory(which stops them from ever getting paged out)/using large pages.
The reason this is disabled by default is presumably (I don't actually know why and am just guessing) the fragmentation issues Large Pages can create and/or that an application could presumably crash your system by consuming all your ram and preventing it's ram from being moved out. This seems less of an actual security issue and more an application can crash your system issue, which application can already do anyways.
The only part that actually requires admin is giving your user that privilege, but that's just needing admin to change a setting in Windows, not LargePageInjectorMods ever having access to/needing admin itself.


Merge same value at one column and group values not same at multiple rows to a List in a querry?

I have two table:
table1
    date    |         name     |      receive       |      receive2    |

1/3/2020 |         John        |       100           |         150          |
2/3/2020 |         Alice        |       100           |         150          |
2/3/2020 |         Alice        |       200           |         250          |
2/3/2020 |         Joe          |       250           |         200          |
3/3/2020 |         Joe          |       200           |         250          |
3/3/2020 |         Joe          |       200           |         250          |
3/3/2020 |         Joe          |       200           |         250          |

table 2

date           |     job         |
2/3/2020    |  something1   |
3/3/2020    |  something1   |

Now im using this querry in document to get Streambuilder => Listview.builder
  Stream<List<Table12>> watchJoin2table() {
    final query = select(table1).join(
      [leftOuterJoin(table2, table1.date.equalsExp(table1.date))]
      )..orderBy([OrderingTerm(expression: table1.date,mode: OrderingMode.asc),
                  OrderingTerm(expression: table1.name,mode: OrderingMode.asc)]);
    return query.watch().map((rows){
      return rows.map((row){
        return Table12(
        table1: row.readTable(table1),
        table2: row.readTable(table2)
        );
      }).toList();
    });}

It will return output with each row joined in 2 table as:
   date         |       job            |     name    |    receive1     |     receive2     |
1/3/2020     |                         |      John    |        100         |         150        |
2/3/2020     |   something1   |      Alice    |        100         |         150        |
2/3/2020     |   something1   |      Alice    |        200         |         250        |
2/3/2020     |   something1   |      Joe      |        250         |         200        |
.......

Can i have a general query in moor to have output with same value in multiple rows at one column return one row and put other value to a List in a querry ?
I read some issue about groupBy() but i can't do it in querry. I'm parsing data at outside to have result below.
   2/3/2020    |     job |   [ name , receive1 , receive2   ] as List value not same.
...
   2/3/2020    |   something1   |   [ ( Alice , 100,150 ) , (Alice , 200,250 ) , ( Joe , 250,200) ]
... 2/3/2020   |    something1   |   [ Alice  |  [ ( 100,150 ),  ( 200,250 ) ] , ( Joe , 250,200)  ]

It's not possible to have columns with list values in SQL, so this can't be written in moor directly. You could apply the grouping in Dart, for instance by using the collection or dartx package:
return query.watch().map((rows) {
  // create a map from job to list of rows
  final groupedByJob = rows.groupBy((row) => row.readTable(table2))
  // we only care about table1 in values
  return {
    for (final entry in groupedByJob.entries)
      entry.key: entry.values.map((row) => row.readTable(table1))
  };
});

This should return a Map<Table2, List<Table1>>, which is the structure you want, right? A downside is that you'd be selecting jobs more often than you need to, but this shouldn't impact performance by a lot.

LIST subqueries can also solve this, but writing it manually in Dart is probably the best approach if you don't want to use SQL.


its working?

hi bro, your bot looks like still use old bybit api version. its working can trade?

It's been a long time since I updated it. It worked well before because I had tested it in a real situation but today, I don't think so. It is necessary to review the code concerning the API part yes.

ok, i see for signal trade its just use candle right?


{AKS} Update default test matrix

Update default test matrix.
Remove the following exclusions from aks-preview, since they can now be tested normally

test_aks_create_with_ossku
test_aks_nodepool_add_with_ossku
test_aks_create_with_node_config
test_aks_create_private_cluster_public_fqdn
test_aks_custom_kubelet_identity

Add the following exclusion for acs, since they cannot be tested normally

test_aks_create_with_auto_upgrade_channel

General Guidelines

[ ] Have you run azdev style <YOUR_EXT> locally? (pip install azdev required)
[ ] Have you run python scripts/ci/test_index.py -q locally?

For new extensions:

[ ] My extension description/summary conforms to the Extension Summary Guidelines.

About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify src/index.json.

AKS


Update conditional.md

Added conditional rendering code to describe another v-show use case.

Thanks for the PR. However, I don't think this addition is necessary.


[language] Remove error_specializer in preparation for a logger arg

This is mostly because we are adding another arguments to all the
runtime functions and it's getting a bit too many...
So it is an attempt to see how the code looks removing the error specializer

Todd accepted it already in draft form, so before he changes his mind I am going to get this in.... lol....

/land

:clipboard: Looks like this PR is still in progress, unable to queue for landing

/land


Add additional assertions for CharSequence

Check List:

Fixes #2472
Unit tests : YES
Javadoc with a code example (on API only) : YES
PR meets the contributing guidelines

Following the contributing guidelines will make it easier for us to review and accept your PR.

Team decision from https://github.com/assertj/assertj/issues/2472#issuecomment-1204519079
The following assertions will be included:
assertThat(string).isAlphabetic();   // \p{Alpha}
assertThat(string).isAlphanumeric(); // \p{Alnum}
assertThat(string).isASCII();        // \p{ASCII}
assertThat(string).isHexadecimal();  // \p{XDigit}
assertThat(string).isPrintable();    // \p{Print}
assertThat(string).isVisible();      // \p{Graph}

The existing containsOnlyDigits will not be deprecated.

Superseded by #2482.


Do not request google geolocation every time

When GPS is enabled but Google services are not, the editor constantly nags for its geolocation.

Decided to keep the switch for Google services, which resolves this issue.


DefaultTextStyle is not applied

DefaultTextStyle(
    style: TextStyle(),
    child: SlidingClippedNavBar(),
)

Provide code to produce the issue and attach screenshots/recordings to show the issue.

Basically it is enough to follow the example provided in the README to realize it. Afterwards, when you search in the repo, you will notice that DefaultTextStyle is not used in the code.

thanks for the PR I didn't know this issue.
BTW don't you think .merge(DefaultTextStyle.of(context).style) should be added here instead? Because there are getTextStyle() in two places. https://github.com/watery-desert/sliding_clipped_nav_bar/blob/11013e2dfe15b23da09beaa7c0238289dbbfb97d/lib/src/widget/nav_bar_button.dart#L91

You're welcome. I tried it here before, but it messed the textHeight. It might be necessary to do more tests I guess.

I see. I will check it later if I get time 🙂 Good luck mate 👍


Prevent double-submit of forms

Due to the slowness on AMO or unstability of my network connection, my forms gets submitted more than once. This results in duplicate review actions or messages.
Could you add something to prevent double-submit? If possible, check whether someone else has already posted an update before accepting the form (e.g. show "This add-on review has been updated. Please check whether your comment/review/approval/rejection is still relevant." when another message has been added since the last post).
This check could be at the Python backend, or part of the front-end (perform an (ugh) synchronous AJAX request upon submit, and only confirm the request if the last message hasn't changed; this only works if the server immediately replies, but I've noticed that AMO suffers from an aggressive cache, so this idea does not work...).

It's rare to see a double form submit prevention scheme that isn't crappy. Doing this requires a bit of work and something I hesitant to recommend we work on. Especially because we plan on re-doing the entire front end of AMO next year to have a different structure, this is one of those things that wouldn't last the transition.

Closing based on last comment.

@andymckay
I agree that a general form submission prevention scheme takes a lot of work and rarely results in the desired result, that's why I scoped this bug report to the use case. At the review dashboard on AMO, I frequently see double (and triple!!!) submissions (not just by others, I also commit multiple submissions due to the lag on AMO). The URL is at https://addons.mozilla.org/en-US/editors/review/[addon-id]`
The back-end logic would be something along the lines of:

At form creation time: Include an identifier of the last message (all messages are printed, so this comes at no cost).
At form submission: Query the last row of the message sequence.
If 2 differs from 1, show the form again and ask the user to confirm the submission.

If implemented at the front-end, then I would do:

At form.onsubmit, use event.preventDefault() and request the page using AJAX.
If the last item in the form is equal to the current last element, use an unchecked form.submit().
Otherwise show a warning and request a confirmation.

In both implementations I assume that the data is up-to-date (and not some old cached value).
The logic is not that difficult. If I knew a bit more about the stack that you're using for the backend, then I would have submitted a patch. Given that you're already familiar with the code, is it possible to fix it?


[PROPOSAL]: support not implementation of delta lake or some other physical manifestation, but V2 data source of Spark

Problem Statement
A clear and concise description of what the problem is e.g., I have this scenario and Hyperspace does not work [...]
There seems to be a gaping hole in the architectural approach in designing spark physical data access. It is somewhat natural and totally inline with how developer would plunge into delivering a working solution. Unawares though of a greater design picture.
I believe it is time to take a step back and look at a Spark not as a wonder that has capabilities, but as a design, a blueprint, or a total sum of its blueprints, which holds the key to its purpose and approach to implementing its features.
One of the key blueprints underpinning entire Spark physical data access path ( and indexing is a nothing, but the point of the razor, not only accessing physical data, but optimizing this access to the finite degree, is the V2 Data Source interface, or collection interfaces defining physical layer of data access of Spark.
It was lurking under the copious amount of code all the way since version 2.3.1. I believe it is time to dust away the obfuscating details an implement this V2 interface, albeit limited.
In doing so indexing subsystem becomes integral part of Spark query subsystem, and rather than having to invoke ".enable" stanza the user can start benefiting from using indexes by means of both, legacy API and ANSI SQL, such as CREATE INDEX. And, granted interface develops in evolutionary approach, iteratively, functionality will remain valid and current, and will transparently applicable to more than parquet.
In fact it would probably open a window of opportunity to make this indexing product open ended and allow extensions in its own right. Enabling Hyperspace team to define interfaces for extensions, and then, potentially, benefiting from domain specific implementations, partnering with people working on products.

I agree that it could be more beneficial for the community in general in the long run if Spark supports index as a concept in Data Source V2 API. Actually, there is already work going on (SPARK-36525). If you want to contribute to that direction, then it might be better to work on Spark directly.
I think one of the values of Hyperspace is being or trying to be data format agnostic. For example, covering indexes work as long as the data source supports creating from an existing dataset a new dataset with fewer columns and laid out in certain ways (i.e. bucketing) for efficient scanning by selected columns. Data skipping indexes work as long as the data source stores data in multiple objects (i.e. files) and can compute aggregations grouped by object. So we support not only Parquet, Delta Lake, Iceberg, but also CSV and other data sources as long as they are capable of certain things.
Looking at the current code and how it's evolving, it seems the index API in Spark doesn't allow Hyperspace-like indexing subsystems that support more than one data source to be plugged in. If we want to build Hyperspace around the Data Source V2 API, then we should propose a suitable change to the API so that for example we can hook into the index API.


merge from arlac77/template-arlac77-github,arlac77/template-esm-only,arlac77/template-node-component

package.json

chore(deps): add ^13.0.2 remove ^13.0.1 (devDependencies.documentation)

.travis.yml

chore(travis): add 14.5.0 remove 14.4.0 (jobs.include.node_js)

:tada: This PR is included in version 3.1.2 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


I am using Restangular in the frontend. I want to push values into list field into mongodb collection.  My collection schema is shown below.

 schema': {
    'friends': {
        'type': 'list',
        'schema': {
            'type': 'objectid',
            'data_relation': {
                    'resource': 'people',
                  'embeddable': True

           }
       }
    }
}

How to push new friend id into friends list.

Please refer to StackOverflow #restangular with general usage questions.


Browser distribution should be wrapped in an IIFE

Firstly, the browser distribution of mocha-given (/browser/mocha-given.js) is very much appreciated!
However, the compiled JavaScript currently pollutes the browser's global scope with all of the module's variables. I believe that compiling CoffeeScript without the --bare option should fix that.

can we get this resolved? will a PR get this moving?


Developer Experience / TAB Conf 6 Workshop Demo

Requirements
@w3irdrobot
Functional

[x] Review postinstall.sh and refine where appropriate
[x] Docker container for dpm-registry
[x] Docker container for dwn-server
[x] Setup container orchestration
[x] During postinstall flow, start containers
[x] Figure out how to prevent postinstall from always re-running

Running postinstall every time you run npm install is bad dev exp
Add a check for each thing that the postinstall script does and exit if all are present
If something is missing, run the respective function to install it
E.g. if the registry isn't running, run it.
Checks include:

DPM_HOME exists
.npmrc files exist (locally and/or globally) and contain the registry pointers
/etc/hosts file edited to point <IP_ADDRESS> to the custom domain
nginx installed and running
drpm registry is running either locally or in docker
drpm env vars exist in shell env or in shell env files

[x] As fallback to docker, use registryd.nohup.sh (current flow)
[x] Research custom local domain (http://local.drg.drpm.tools) without requiring editing of /etc/hosts (current flow)
[x] Documentation for install and usage: simple steps to follow to install and run

"Choose your own adventure" style
Adventure 1: I have a current npm project, I want to add DRPM and install DPKs
Adventure 2: I do not have a npm project, I want to start a new one and add DPKs using DRPM

[x] Rename everything to DRPM conventions in line with the upcoming monorepo

dpm-registry => drg or registryd
shell scripts => registryd.*

Non-Functional / Stretch

[x] Add flow to postinstall that builds a nginx docker container using a Dockerfile.nginx
[x] Update docker-compose.yml to orchestrate adding this container
[x] Add a fallback flow to postinstall for nginx if docker not installed (i.e. installing, configuring and running nginx)

@n0nstr

[x] Convert dpm to monorepo with packages dpm, cli, dpk, registry (Backlog)
[ ] Build npm and npx create scripts:

[ ] npm create dpk - creates a dpk template project
[ ] npx create-dpk - creates a dpk template project
[ ] npx drpm-init - creates a dpk template project

@w3irdrobot i figured out a solution to prevent postinstall from always re-running checking that box off

I also updated the issue tasks a bit. We will likely need to sync at some point on naming conventions and such. Bc its all been in flux, I've been making a mess of things. I apologize.

Closing


HELM-421: Fix, nodeId passed to templateSrv.replace must be a string

Grafana reviewer reported this. Grafana TemplateSrv.replace calls string.replace on the target variable, expecting it to be a string, but we were passing nodeId as a number. Coerced it to a string.
External References

JIRA (Issue Tracker): http://issues.opennms.org/browse/${JIRA-ISSUE-NUMBER}
Continuous Integration: CircleCI

Oops, I think I introduced this bug. Now I get it!

It's kind of a subtle runtime issue


doc: Update readme with Gitter channel link

Update readme with Gitter channel link
Testing done
N/A
Proposed upgrade guidelines
N/A
Localizations

[x] English
[ ] Franc
[ ] Slovak
[ ] Czech

The main documentation is done English only
Submitter checklist

[ ] The Jira / Github issue, if it exists, is well-described.
[ ] The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see examples).

Fill in the Proposed upgrade guidelines section only if there are breaking changes or changes that may require extra steps from users during the upgrade.

[ ]~~ There is automated testing or an explanation that explains why this change has no tests.~~
[ ]~~ New public classes, fields, and methods are annotated with @Restricted or have @since TODO Javadocs, as appropriate.~~
[ ] New public functions for internal use only are annotated with @NoExternalUse. In case it is used by non java code the Used by {@code <panel>.jelly} Javadocs are annotated.
[ ]~~ New deprecations are annotated with @Deprecated(since = "TODO") or @Deprecated(forRemoval = true, since = "TODO"), if applicable.~~
[ ] New or substantially changed JavaScript is not defined inline and does not call eval to ease the future introduction of Content Security Policy (CSP) directives (see documentation).
[ ] For dependency updates, there are links to external changelogs and, if possible, full differentials.
[ ]For new APIs and extension points, there is a link to at least one consumer.
[ ] Any localizations are transferred to *.properties files.

Maintainer checklist
Before the changes are marked as ready-for-merge:

[ ] There is at least one (1) approval for the pull request and no outstanding requests for change.
[ ] Conversations in the pull request are over, or it is explicit that a reviewer is not blocking the change.
[ ] Changelog entries in the pull request title and/or Proposed changelog entries are accurate, human-readable, and in the imperative mood.
[x] Proper changelog labels are set so that the changelog can be generated automatically.
[ ] If the change needs additional upgrade steps from users, the upgrade-guide-needed label is set and there is a Proposed upgrade guidelines section in the pull request title (see example).
[ ] java code changes are tested by automated test.

thx


Move terminal interactions to rich

Instead of manually adding colors, and manual formatting, and manual spinners with Halo, use rich

From now on i have it available, but I won't redo all the past prints to use it.
Will only use from now on.


Polyfill only the things we need

Hi all,
I talked to the polyfill.io guys here 1 to add a blissfuljs alias to their service, so we can tell people to request polyfill.io with ?features=blissfuljs instead of the features=all we currently recommend, which is super wasteful. Can anyone help me compile a list of features we need here?

I’ll start:
Array.from
es5
Promise
Element.prototype.remove
URL
XMLHttpRequest
document.querySelector

Did I forget anything?

Event? >> https://cdn.polyfill.io/v2/docs/features/#Event

We don't use that. Maybe we should, but we currently don’t :)

PR sent

super cool...
a few that come to mind. Some of these only need polyfilled if we are going to support IE8.
Array.prototype.forEach()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach
Function.prototype.bind()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind
Array.prototype.reduce()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce
Array.prototype.map()
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map

Can you guys please check my PR (which is now merged) before suggesting things?
I believe I have added all 4 of those.

Done. http://blissfuljs.com/#browser-support


Start the honeyclient when create it. (#22)

Now the API is able to start the honeyclient.

Could you run go fmt on the changed file? You can also set up your IDE to do this for you on every save. It makes sure the file is well formatted according to standards. M ore information here.


allow multiple local users to use bucc [fixes #62]

ok,  I will look later today when I do some hands on lab stuff.


MP-JWT integration

While JWT is an ongoing work in progress in Istio, there is the question of how service identity as well as end user identity fits in with the current MP-JWT RBAC access.

Is there a unified CA?

I thought so, when I saw jwt-service-broker in the current Wildfly Swarm approach.

We might have to create corresponding clients for different app servers to generate MP-JWT token.


Follow up on #14

clean repository only for provided prefix path
fix for label selection, which cannot be inside double quota
Add new variable to readme

This commit also sets the default value of GIT_PREFIX_PATH to "."
which stands for the root directory under git repository.

Sorry for the late response & thanks for the contribution. Looks fine to me except for the one comment!


Fix undefined behavior when parsing boolean options in DBSCAN benchmark

I stumbled onto these while looking into #64 and running UBSan locally
<ArborX>/benchmarks/dbscan/dbscan.cpp:71:53: runtime error: member call on address 0x600001afc0a0 which does not point to an object of type 'boost::program_options::typed_value<bool>'
0x600001afc0a0: note: object is of type 'boost::program_options::typed_value<bool, char>'
 00 00 00 00  08 dc 38 03 01 00 00 00  78 dc 38 03 01 00 00 00  b0 f3 44 6f 01 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'boost::program_options::typed_value<bool, char>'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior <ArborX>/benchmarks/dbscan/dbscan.cpp:71:53 in
<Boost_ROOT>/include/boost/program_options/value_semantic.hpp:201:13: runtime error: member access within address 0x600001afc0a0 which does not point to an object of type 'boost::program_options::typed_value<bool>'
0x600001afc0a0: note: object is of type 'boost::program_options::typed_value<bool, char>'
 00 00 00 00  08 dc 38 03 01 00 00 00  78 dc 38 03 01 00 00 00  b0 f3 44 6f 01 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'boost::program_options::typed_value<bool, char>'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior <Boost_ROOT>/include/boost/program_options/value_semantic.hpp:201:13 in
<Boost_ROOT>/include/boost/program_options/value_semantic.hpp:202:13: runtime error: member access within address 0x600001afc0a0 which does not point to an object of type 'boost::program_options::typed_value<bool>'
0x600001afc0a0: note: object is of type 'boost::program_options::typed_value<bool, char>'
 00 00 00 00  08 dc 38 03 01 00 00 00  78 dc 38 03 01 00 00 00  b0 f3 44 6f 01 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'boost::program_options::typed_value<bool, char>'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior <Boost_ROOT>/include/boost/program_options/value_semantic.hpp:202:13 in
<ArborX>/benchmarks/dbscan/dbscan.cpp:82:73: runtime error: member call on address 0x600001af8640 which does not point to an object of type 'boost::program_options::typed_value<bool>'
0x600001af8640: note: object is of type 'boost::program_options::typed_value<bool, char>'
 00 00 00 00  08 dc 38 03 01 00 00 00  78 dc 38 03 01 00 00 00  14 f4 44 6f 01 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'boost::program_options::typed_value<bool, char>'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior <ArborX>/benchmarks/dbscan/dbscan.cpp:82:73 in
<ArborX>/benchmarks/dbscan/dbscan.cpp:83:55: runtime error: member call on address 0x600001af4000 which does not point to an object of type 'boost::program_options::typed_value<bool>'
0x600001af4000: note: object is of type 'boost::program_options::typed_value<bool, char>'
 00 00 00 00  08 dc 38 03 01 00 00 00  78 dc 38 03 01 00 00 00  15 f4 44 6f 01 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'boost::program_options::typed_value<bool, char>'
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior <ArborX>/benchmarks/dbscan/dbscan.cpp:83:55 in
<ArborX>/benchmarks/dbscan/dbscan.cpp:84:53: runtime error: member call on address 0x600001af40a0 which does not point to an object of type 'boost::program_options::typed_value<bool>'
0x600001af40a0: note: object is of type 'boost::program_options::typed_value<bool, char>'
 00 00 00 00  08 dc 38 03 01 00 00 00  78 dc 38 03 01 00 00 00  16 f4 44 6f 01 00 00 00  00 00 00 00
              ^~~~~~~~~~~~~~~~~~~~~~~
              vptr for 'boost::program_options::typed_value<bool, char>'

The doc
clearly states

This will cause the value to default to false and it will become true if the switch is found

and the API says

but the created value_semantic won't accept any explicit value

I don't see API saying that if the option is not present, it is guaranteed to be false. So, do we need to initialize it prior to parsing to guarantee that?

I don't see API saying that if the option is not present, it is guaranteed to be false. So, do we need to initialize it prior to parsing to guarantee that?

The doc says "will cause the value to default to false".  Tools are pretty good at catching reads from uninitialized values so I am not too concerned but I can do
--- a/benchmarks/dbscan/dbscan.hpp
+++ b/benchmarks/dbscan/dbscan.hpp
@@ -17,7 +17,7 @@ namespace ArborXBenchmark
 struct Parameters
 {
   std::string algorithm;
-  bool binary;
+  bool binary = false;
   int cluster_min_size;
   int core_min_size;
   float eps;
@@ -27,9 +27,9 @@ struct Parameters
   int max_num_points;
   int n;
   int num_samples;
-  bool variable_density;
-  bool verbose;
-  bool verify;
+  bool variable_density = false;
+  bool verbose = false;
+  bool verify = false;
 };

 template <int DIM>

if you really want me to

The doc says "will cause the value to default to false". Tools are pretty good at catching reads from uninitialized values so I am not too concerned but I can do

Where did you see that?

Follow the first link I posted and look above the 2nd code snippet


Can you add user roles and permission based searches?

It would be great if user roles and permission are also considered in the plugin.

Do you mean as in supporting the X-Pack shield component? Or any other ideas?

Supporting X-Pack shield component in the GUI is one option. But it is costly and other alternative is to use search-guard.
It would be nice to use search-guard and authenticate user in the Elasticsearch-GUI .
https://github.com/floragunncom/search-guard

Hide/show search results to the user depending on certain rights:
Something like this:
`angular.module(jcs.modules.auth.name).directive('access', [
jcs.modules.auth.services.authorization,
function (authorization) {
return {
restrict: 'A',
link: function (scope, element, attrs) {
var makeVisible = function () {
element.removeClass('hidden');
},
makeHidden = function () {
element.addClass('hidden');
},
determineVisibility = function (resetFirst) {
var result;
if (resetFirst) {
makeVisible();
}
                      result = authorization.authorize(true, roles, attrs.accessPermissionType);
                      if (result === jcs.modules.auth.enums.authorised.authorised) {
                          makeVisible();
                      } else {
                          makeHidden();
                      }
                  },
                  roles = attrs.access.split(',');

              if (roles.length > 0) {
                  determineVisibility(true);
              }
          }
        };
    }]);`

Interesting, did not know about this project yet. Currently not really planning support, but it is interesting. Going to take a good look at it.

Hello Jettro,
Would it be okay if I use and modify your elastic search library for commercial use? I will put the license in the file and your name attached to it.
Please let me know.
Thanks in advance.
Cheers
AppKeto

On 14 Apr 2016, at 15:19, Jettro Coenradie<EMAIL_ADDRESS>wrote:
Interesting, did not know about this project yet. Currently not really planning support, but it is interesting. Going to take a good look at it.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub https://github.com/jettro/elasticsearch-gui/issues/100#issuecomment-209911540

The project is licensed under apache2 license. So you can do with it what you can under that license. If you need more, than feel free to drop a line with a bit more details.

Thanks for the info. There is no special modification only using basic search function to search and display the query results.
I must appreciate that it  helped me a lot to learn some aspects of elastic search.
Thanks again for putting it on Apache license so that I can use and modify this a bit.
Cheers,
AppKeto

On 28 Apr 2016, at 21:16, Jettro Coenradie<EMAIL_ADDRESS>wrote:
The project is licensed under apache2 license. So you can do with it what you can under that license. If you need more, than feel free to drop a line with a bit more details.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub https://github.com/jettro/elasticsearch-gui/issues/100#issuecomment-215516265

Hello Jettro,
Where do I add this filter to add user role and permission?


how to deal this error

[root@localhost examples]#    fyne-cross --targets=linux/amd64
Project root dir: /root/goproject/examples
Package dir: .
Build output folder: /root/goproject/examples/build
Target linux/amd64
Building...
# runtime
/usr/local/go/src/runtime/stubs_x86.go:10:6: stackcheck redeclared in this block
        previous declaration at /usr/local/go/src/runtime/stubs_amd64x.go:10:6
/usr/local/go/src/runtime/unaligned1.go:11:6: readUnaligned32 redeclared in this block
        previous declaration at /usr/local/go/src/runtime/alg.go:321:40
/usr/local/go/src/runtime/unaligned1.go:15:6: readUnaligned64 redeclared in this block
        previous declaration at /usr/local/go/src/runtime/alg.go:329:40
exit status 2

thanks

deal


Support -DspringAot=false for tests

Dear team,
I was thinking that I could be interesting to have an easy way to disable AOT for unit tests.
Indeed, for example, I'm currently building a Spring cloud function and I haveimplemented unit tests as indicated in Spring Cloud Function docs.
I will package this function with Native, but I don't want to tackle the native part for unit tests, the classic unit tests are fine.
In the gradle plugin, this section enables the aotTest for all tasks of type Test. Wouldn't it be good to do that section for GraalVM nativeTest task only ?
Also, aotMain seems to be run only for nativeCompile task so I think it would make sense to do the same for test.
What do you think ?

But isn't disabling AOT is as simple as setting VM option -DspringAot=false?

Hello,
Thanks for your feedback.
I tried with:
test {
    useJUnitPlatform()
    jvmArgs = ["-DspringAot=false"]
}

or using ./gradlew test -DspringAot=false and it has no effect.
The classpath for unit tests and the system properties are still modified by the plugin.

AOT mode for tests is useful for both JVM and native since it allows to ensure that the AOT flavor run fines on JVM (fast feedback loop) before going on native side (slower).
I think for now, AOT generation for test happen unconditionally (IMO not a major issue) and execution of tests in AOT mode (JVM or native) happen if generated test files are detected. I don't think we support -DspringAot=false for executing tests in regular mode but I think that could indeed be a good thing to support it.
For disabling native tests, Gradle Native Build Tools plugin allow to disable native tests via:
graalvmNative {
    testSupport = false
}

Maven Native Build Tools plugin allow to disable native test by removing the test-native execution and will support shortly doing that onthe command line via -DskipNativeTests, see https://github.com/graalvm/native-build-tools/issues/179.

Thanks @sdeleuze for this feedback 👍
In the meantime, if someone else is interested by having a workaround, I did this for now in a subprojects block:
afterEvaluate {
if (project.plugins.hasPlugin('org.springframework.experimental.aot')) {
  generateTestAot.onlyIf { false }
  test.configure { t ->
    t.systemProperties.remove('spring.test.context.default.CacheAwareContextLoaderDelegate')
  }
}
}

For the record, this is only a problem with Gradle as far as I can see as Maven has two separate goals and you could decide to include them or not. If I understood correctly, generateTestAot is invoked with no way to disable it? I wouldn't put pressure on fixing this but that looks a little odd to me.

For the record, this is only a problem with Gradle

I am not sure I agree since with Maven test invoke AOT generation and someone could need to execute tests in regular mode without having to modify the pom.xml.

Yes but that's not the same problem. I understand there is no easy way to not invoke the test aot task with Gradle. IMO it is a more severe limitations than what you've described.

It is the way it is right now because we initially decided to make it the default.
But we could create a new aotTest task that depends on check.

I renamed this issue to clarify it is about allowing to not invoke the test aot task with Gradle, and created #1356 about providing a way to use regular codepath for test execution.

For us, disabling AOT in Gradle for tests would also be beneficial.
We use MockBeans in our Spring integration tests. MockBean is currently not supported in AOT.
So disabling AOT would help us in not having to rewrite our Spring integration tests.


Changelog file

Could you add a changelog file for each release?
This is helpful to evaluate when and how to update the library if there are breaking changes or valuable upgrades.
Thanks.

Hello dear bozziche,
Thank you very much for your suggestion, it's added now.
Best.


purpose of CSV

i see this:
https://github.com/pages-themes/primer/blob/df56ee7/_sass/primer-markdown/lib/blob-csv.scss
however its not used here:
https://pages-themes.github.io/primer
what is the purpose of this file?

.


[HUDI-4224] Fix CI issues

Upgrade junit to 5.7.2
Downgrade surefire and failsafe to 2.22.2
Fix test failures that were previously not reported
Improve azure pipeline configs

Working on these failed tests


Navigation Preload in sw-precache

Can the new experimental feature "Navigation Preload" be integrated to sw-precache?
Refer: https://developers.google.com/web/updates/2017/02/navigation-preload

This snippet from the article is relevant:

The boot-up time isn't a problem if you're responding from the cache, as the benefit of skipping the network is greater than the boot-up delay. But if you're responding using the network…

If you're using sw-precache effectively, you should be responding to navigations from the cache. (Either serving page-specific HTML, or serving an App Shell via configuring navigateFallback.)
So I don't think it makes sense to add in Navigation Preload support to sw-precache.
If you do have a scenario in which you need to add in support, you can do so by writing an additional fetch handler in a standalone JavaScript file, and then pulling that into your service worker via the importScripts configuration option.


Improve Tags

[ ] add previews of how instant/fade, delay and shake tags appear in-game; this would complement colored text examples
[ ] using the GD font in colored text would be a neat detail

I tried using Helvetica Neue Interface (top-left, chatFont.fnt is "Helvetica Neue DeskInterface" so should be close). On 100% the text looks oddly aliased, especially the middle of "S". It starts looking pretty much the same as the in-game at 175%, but then the "a" is smaller than "m" and "e".
TeX Gyre Heros (bottom-left) is similar to Helvetica and it's a bit bolder and thinner.
Right side is the default font, bottom-right has font-weight: 500.
100%:

175%:

Bottom-left is really really close to chatFont and letters such as aeoucnrs don't have various heights, so I'm choosing this one.


Create MSI packages for new versions

Hello!
Can you please publish MSI packages for the versions > 1.1.2?

Hello,
We will publish the new MSI packages for 1.1.3 very shortly, as we are getting some small fixes into the installer too and upgrading Python version to 3.10.x.
Thank you,
Adrian Vladu


Formes with name differences don't always work.

The following formes don't translate well into the damage calc because of how their names are saved.
Kyurem-White (Kyurem-W)
Kyurem-Black (Kyurem-B)
Rotom-Wash (Rotom-W)
Rotom-Heat (Rotom-H)
Rotom-Frost (Rotom-F)
Rotom-Mow (Rotom-C)
Rotom-Fan (Rotom-S)
Giratina-Origin (Giratina-O)
Landorus-Therian (Landorus-T)
Thundurus-Therian (Thundurus-T)
Tornadus-Therian (Tornadus-T)
Floette-Eternal (Floette-E)
Pumpkaboo (Pumpkaboo-Average)
Gourgeist (Gourgeist-Average)
Wormadan-Sandy (Wormadan-G)
Wormadan-Trash (Wormadan-S)

Fixed, all of the above forme names now translate over.  Please don't hesitate to open a new issue if there are any missing.

Fixed, all of the above forme names now translate over. Please don't hesitate to open a new issue if there are any missing.


[Test]

This is for testing only

Acrolinx Scorecards
We currently enforce a minimum score of 80.
Click the scorecard links for each article to review the Acrolinx feedback on grammar, spelling, punctuation, writing style, and terminology:

Article
Score
Issues
Scorecard
Processed

msteams-platform/bots/design/bots.md
94
21
link
:white_check_mark:

More info about Acrolinx
Use the Acrolinx extension, or sidebar, in Visual Studio Code to check spelling, grammar, style, tone, clarity, and key terminology when you're creating or updating content. For more information, see Use the Visual Studio Code extension to run Acrolinx locally.

Docs Build status updates of commit b789951:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/bots/design/bots.md
:white_check_mark:Succeeded
View

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

Closing the PR as created for testing


Create method of feedback

We want to encourage feedback for all the courses! So we want it to be as easy as possible for people to file issues about courses (and in a way we can try to keep things organized).
We can use Google forms that are linked to GitHub issues using Zapier zaps. This way having a GitHub account is not a barrier for someone to file an issue.
The Google form should probably be rather general, but if there are specific questions we want to ask we should discuss it here.
Probably optionally allow people to leave their email if they are okay with us contacting them for more info.

Here's a draft: https://docs.google.com/forms/d/1PjaJEmpnaHgDS7PwIuKxoY8mX7ZwlneI0i6ciXa73cY/edit

Here's the sharing url: https://forms.gle/tESJ4eSps3N5hGK47
Working on the zap and how we incorporate this into every page in a way that's not horrible to maintain.

I think we should be able to add the link to the bookdown yaml in this template, but then we'll need a way to have it add somewhere to each page in leanpub.

@carriewright11 the bookdown yml part of this seems like something you might know how to do? Would you be able to do it or give me some hints on how you think it could be done?

Hi! sorry I had some meetings this morning. Yes, I could add this, but indeed this would require something different for the Leanpub version. Perhaps we could come up with a way to add some text with the link to the end of each Rmd? This should then would work for both versions.

Sounds like the most straightforward strategy. I can take a whack at this.

Zap's are on! Now just need a way to have this added to the Leanpub version.


How to Use It?

I can't find much documentation on this and the README is both bare-bones and pretty opaque. A real-world use case would help.
The following is my naive attempt. I know it's wrong but it will be useful to show what I need. Also note that the grid spacing of the known data is not even. (By the way, here is my working example using python.)
I am also interested in extrapolating values outside of the known data bounds. Is the ndarray-linar-interpolate library capable of that?
var ndarray = require("ndarray");
var interp = require("ndarray-linear-interpolate");

// Create the 2D ndarray object from the given data
// The first column is "diameter in inches" and the first row is "psi"
// The first cell (A:1)is a dummy value
var data = ndarray(new Float32Array([
  0, 60, 120, 240, 360, 480,
  4, 71, 100, 142, 173, 200,
  6, 106, 150, 212, 260, 300,
  8, 142, 200, 283, 347, 400 ,
  10, 177, 250, 354, 433, 500,
  12, 212, 300, 425, 520, 601,
  14,  248, 350, 495, 607, 701,
  16,  283, 400, 566, 693, 801,
  18,  318, 450, 637, 780, 901,
  20,  354, 500, 708, 867, 1001,
  22,  389, 550, 779, 953, 1101
]), [10,6]);

console.log(interp(data, 4.1, 61)); // x=4.1 inches, y=61 psi. expect a value of a little over 72 but it returns 0.

Soon after I posted, I bailed and went with Python / scipy / RegularGridInterpolator, which was documented and relatively easy to work with.


How to get ciphertext, ephemPublicKey from encrypted like in eccrypto example?

I'm trying to adapt example from Payselection to use it in browsers, and luckily first part with public key and encryption worked.
However, I have no clue how to get encrypted.ciphertext, encrypted.ephemPublicKey, encrypted.iv, encrypted.mac properties because ecies.encrypt methods returns Uint8Array

Under the default configuration, the payload format is:
+-------------------------------+----------+----------+-----------------+
| 65 Bytes                      | 16 Bytes | 16 Bytes | == data size    |
+-------------------------------+----------+----------+-----------------+
| Sender Public Key (ephemeral) | Nonce/IV | Tag/MAC  | Encrypted data  |
+-------------------------------+----------+----------+-----------------+
|           Secp256k1           |              AES-256-GCM              |
+-------------------------------+---------------------------------------+

UInt8Array is literally byte array, you can just array.slice(start, end). Note that the key derivation is HKDF-SHA256 and symmetric cipher is AES-256-GCM (or XChaCha20-Poly1305 by config), which are different from eccrypto

It turns out they have their own library for managing crypto. Very much thanks for your explanation though!
Алгоритм подключения токена.docx


Check type of Any for casting

To cast Any back to its original type we need to check each type used in shogun before casting.
I implemented a function that does this check and then executes a lambda when it finds the right type.
It still needs some work:

[x] handle errors
[x] add more type maps
[x] maybe add some sort of check for the lambda, i.e. does it have the expected signature?
[x] should it be void rather than return int? The int was just initially used for debugging.

Example usage:
#include <iostream>
#include <shogun/base/init.h>
#include <shogun/io/SGIO.h>
#include <shogun/lib/type_case.h>

using namespace shogun;

int main() {

	init_shogun();

	int a = 2.0;
	Any any = make_any(a);

	// declare a lambda that is executed when the original type is found
	// needs this signature
	auto found_it_lambda = [](auto value) {
		std::cout << "It's a " << demangled_type<decltype(value)>() << std::endl;
		std::cout << "Value " << value << std::endl;
	};

	try {
		sg_any_dispatch(any, sg_all_types, found_it_lambda);
	}
	catch (ShogunException &msg) {
		std::cout << msg.what() << std::endl;
	}

	try {
		sg_any_dispatch(any, sg_real_types, found_it_lambda);
	}
	catch (ShogunException &m) {
		std::cout << m.what() << std::endl;
	}
}

Expected output:
It's a int
Value 2
[ERROR] In file /Users/ghoben/anaconda3/include/shogun/lib/type_case.h line 197: Type int is not part of <long double, double, float>

@lisitsyn check this out

Expected output:
It's a int
Value 2
[ERROR] In file /Users/ghoben/anaconda3/include/shogun/lib/type_case.h line 161: Type i is not part of the given typemap

Just looking at the output. The error message is a bit cryptic. It should state "Type int32_t is not part of <float32_t, float64_t, float128_t>" or something in those lines

Without much more code I can get the message Type int is not part of <long double, double, float>
To get  "Type int32_t is not part of <float32_t, float64_t, float128_t>" we would have to map the demangled strings to those strings, i.e. {"long double":  "float128_t"}

Getting this error from CI for the lint job:
2018-12-04T13:38:11.4740116Z ##[error]/usr/bin/docker: invalid reference format.
2018-12-04T13:38:11.4753526Z ##[error]See '/usr/bin/docker run --help'.
2018-12-04T13:38:11.4754489Z ##[error]/usr/bin/docker failed with return code: 125

Is that an issue with the script or is the format not correct in my code?

Getting this error from CI for the lint job:
2018-12-04T13:38:11.4740116Z ##[error]/usr/bin/docker: invalid reference format.
2018-12-04T13:38:11.4753526Z ##[error]See '/usr/bin/docker run --help'.
2018-12-04T13:38:11.4754489Z ##[error]/usr/bin/docker failed with return code: 125

Is that an issue with the script or is the format not correct in my code?

I think @vigsterkr is working on CI stuff atm, so it might behave weirdly ...

Things seem to be working as expected, but the compiler generates so many warnings (all expected) because it looks at the function implementation of each type, due to the recursive nature of the check implementation. What is nice is that the way the static assert is written guarantees that the error doesn't get buried in warnings.

Things seem to be working as expected, but the compiler generates so many warnings (all expected) because it looks at the function implementation of each type, due to the recursive nature of the check implementation. What is nice is that the way the static assert is written guarantees that the error doesn't get buried in warnings.

is there a way to silence the warnings?

is there a way to silence the warnings?

There are two ways, either with compiler flags or add some pragmas (https://stackoverflow.com/a/7159392)

is there a way to silence the warnings?

There are two ways, either with compiler flags or add some pragmas (https://stackoverflow.com/a/7159392)

ok cool, might be worth looking into the pragma (later); we cannot change the flags

I will to read through this in a quiet minute.

Yup, it's quite hard to understand it. I based it on this talk https://channel9.msdn.com/Events/CPP/CppCon-2016/CppCon-2016-Roland-Bock-How-To-Test-staticassert

I like the static assertions a lot (though they come at some cost in readability), while being super helpful for downstream development.

Depending on how we continue developing the API we can have more specific static_asserts

The None{} is API-wise quite similar to nullptr

Yes, it's the same, but felt more natural. Could replace with a macro #define NONE None{}?

I guess the thing I had in mind was overloading in the style we did in put, i.e. overloading via explicitly defining the templated methods for certain types
sg_dispatch(Any, Lambda) // T is primitive
sg_dispatch(Any, Lambda<SGVector>) // T is primitive
or even
sg_dispatch(Any, Lambda<U>) // T is primitive, U is SG*

Ah ok, I will have a look at that. But I thought that was C++17?

The NONE is not really necessary, as it is all the same: positional arguments.
Check what we did in put here:
We define a different put for objects and primitives / vectors, and even more involved for certain swig cases such as scalars, double matrices 1 double matrices 2 etc. The compiler then figures out which call to make, it is not c++17, pretty simple in fact. The internals are not that pretty, but the API is: just a put. I wonder whether this is possible with the lambda signature as well so that there is only one sg_any_dispatch which is overloaded for the different situations. I am by no means sure this goes, but it might be worth trying

Oh I meant the part where we extract the type from the lambda. I am not sure that is possible in C++14, but there might be a work around!

Yes good idea to have the 3 lambda version be there in case we want to revert to it.
Why not keep it for now, and if you start another approach we can have another PR for that?

I got a 1 lambda version working.

Checks at compile time:

lambda has only 1 arg
lambda's only arg is a valid type
lambda is void

Checks at runtime if the Any type is valid and if it's in the map.

Should I push that version and then can decide what is best?

The issue is that you can't convert SGVector<float32_t> to SGVector<float64_t> and all other variations.. Is that something that could/should be implemented?

Yes, maybe open another PR with it? We can keep this one as is for now

OK, I am happy with the code now! The one lambda version doesn't work as I expected so might have to talk over how that would work at some point.

Pretty happy here as well. This is definitely merge-able from my side. Clean API as well.
Let's see whether the lambda type extraction gets you somewhere and if not, continue .... We can always change this later as the touch points with the rest of the code are super minimal and are actually easy refactors ...

We should also move on from this soon actually :) Soon the exciting stuff begins

Ah one last thing, should we replace std::is_scalar with std::is_arithmetic?

what about is_sg_primitive ? :D

No but honestly, I think defining such thins explicitly might be best actually

So something that would include these: bool, char, int8_t, uint8_t, int16_t, int32_t, int64_t, float32_t, float64_t, floatmax_t?

Yes, exactly. Just to have those types centrally defined so we can use them in other templated methods as well. Thanks!

OK, should be good to go now!

I somehow thought I merged this already? Shall I, or was something still missing?

I think everything is in place and working! It's only a first iteration anyway.

Ok shall I then? Just had another look and this is definitely something to use for a start

Ok let’s watch ci. There might be compiler issues on some platforms with this modern stuff

Awesome!

OK! There seem to be some issues with msvc, like #4443.. But it might be an old bug in the compiler that has been fixed in more recent versions.

CI seems to be failing during testing but due to double free or corruption in other tests..?

OK, I'll investigate, but I can't reproduce these issues locally