Weird bugs in jQuery implementation

If I write this:
$('input.color').colorPicker();

colorPicker throws an error (Cannot read property 'customBG' of undefined (looks like it always require a config object)). If I pass any object, even
$('input.color').colorPicker({});

It throws another error (undefined is not a function). This points to function "convertColors", at this line (217 in colors.js file):
colors[typ] = convert[from + '2' + typ](colors[from]);

What should we do??

Hi @ct-js
thanks, great finding.
I was never spending enough time for the implementations,... so I guess this is the result ;o)
Thanks again, I committed the fix already.

@PitPik , D:
TypeError: Cannot read property 'nodes' of undefined

This one appeared when I was trying to pick a color, just after clicking on color field.
Also I noticed that colorPicker is displayed in wrong place if it was fired on absolutely positioned elements, or on an element inside a block with position: relative|absolute styling. So colorPicker works with parent's local coordinates, but displayed at absolute ones.

Btw, how can we embed such a cute color ring displayed on http://www.dematte.at/cpn/ ? :3

@ct-js
The positioning bug is fixed...
do you have a jsfiddle account? Could you set up a situation there so I can see what's going wrong. Here, everything seems to be fine when I'm trying to pick a color.

Well, it works fine on codepen.io... I can pick colors on it, but colorPicker doesn't work in my nw.js app. Maybe there are some node-like variables like fs, md, path, process, events etc. in source code?
pen http://codepen.io/anon/pen/YPxBqL
I'm going to test colorPicker with its uncompressed version; will reply with error placement soon...

Now it doesn't even create colorPicker form T___T Used latest version
TypeError: Cannot read property 'getElementsByTagName' of undefined
    at getInstanceNodes (file:///D:/ct/build/app/js/main.js:1088:24) //  <--- this is its first line: colorPicker == undefined
    at initInstance (file:///D:/ct/build/app/js/main.js:928:25) // THIS.nodes = _nodes = getInstanceNodes(buildView(THIS), THIS);
    at new ColorPicker (file:///D:/ct/build/app/js/main.js:810:4) // the end of ColorPicker constructor: initInstance(this, options || {});
    at createInstance (file:///D:/ct/build/app/js/main.js:2198:13) // return new initConfig.klass(initConfig);
    at HTMLInputElement.<anonymous> (file:///D:/ct/build/app/js/main.js:2208:32)
    at HTMLInputElement.n.event.dispatch (file:///D:/ct/build/app/js/main.js:9:6444)
    at HTMLInputElement.r.handle (file:///D:/ct/build/app/js/main.js:9:3219)

Now I see your problem (...took me a while to find out):
You probably forgot to load colorPicker.data.js. I think I made this a bit to confusing or it is just a lack of documentation (sorry for the confusion)...
If you run in single file mode (or source file mode), you have to load ./colors.js (the color module), ./colorPicker.data.js (the HTML, CSS and images for the UI), ./colorPicker.js (the UI itself)...
...or ./color.all.min.js instead that contains all three files.
The implementation file jQuery_implementation/jqColor.js must then be loaded to be able to run it with jQuery.
jQuery_implementation/jQueryColorPicker.min.js contains again all four files...
Let me know how this works out for you.
Cheers

BTW: the color circle on the demo page:

either see the index.js how it's done (documentation will show you... less memory)
or, the more KBs solution: inspect the page with DEV-tools (Chrome) and find the canvas (mark it...), then type $0.toDataURL() in your browser-console. This will give you a link, when clicked, opens a new tab with the image that you then can download and use...

Well, this error disappeared, but I have Cannot read property 'nodes' of undefined again.

the color circle on the demo page

I meant the whole circular colorPicker :) It is really useful for painters to use such color pickers rather than rectangular ones. Color theory, triads, etc ;) Maybe there will be another colorPicker layout type? :)

... in colorPicker.js there is 5 spots where I use .node. It is hard to 'guess' an error if I don't see the code or at least some more error information. Maybe you can get me more information??

Maybe you can get me more information??

I'll try to...

BTW: are you also using AngularJS?

:mask: No, I'm not. JS + jQuery + Node + nouislider

Hey, I just updated colorPicker.js (and all minified files). Maybe you want to try them first. It might bring you a solution.

@ct-js
Maybe http://www.dematte.at/cpn2/ would do it for you as well. I guess you don't need all the functionalities of colorPicker (it's actually great for more complex color manipulation, etc.).
The other one will be only about 4KB all together and still has a rich and nice color model (works with a subset of colors.js)... What do you think? I'll be finishing it in a few days, the you can try to implement it into your project.

Trying old version. You are too fast :D So, I take

colors.js
colorPicker.data.js
colorPicker.js
jqColor.js

And concatenate them in exactly this way. The error points to the doEventListeners function found in jqColor.js file, exactly here.
The reason is that there are no cP in colorPickers array (it's empty as array but has evt: true), so the current one can't be retrieved. Besides that, it seems that no arguments except elm were specified.

@ct-js
I'm too fast :D that's funny!
I just committed a new version of jqColor.js. Maybe that does it then...

Off:
    _html = '

'

Optimization? Which optimization?

:D
String concatenation is a complex (and long) process for computer, you would better just escape line breaks, like this:
str = 'Olala, what a long \
string!';

I just committed a new version of jqColor.js. Maybe that does it then...

IT WORKS!!! :confetti_ball:  :confetti_ball:  :confetti_ball:  :confetti_ball:  :confetti_ball:
Thank yoooouuuu ^_______^

:D I know... this is work in progress... the HTML will go anyhow ;o) for now I just want it to work... then there will be optimization...

Oh, great to hear that it finally works... If you find more issues, then let me know.
I assume I can close this issue then.
Cheers and good luck!!

V2: I guess _css variable should create a style tag, but it doesn't, so without it it is just a pile of invisible blocks. Maybe it is just WIP ^-^ But with css it works great for me too.
Thank you again :3 Truthly, your tool is one of two (another one is a small bootstrap component) well-looking and functioning colorPickers in the world for today. And your is more cool :sunglasses:
Yeah, the issue can be closed. (hooray!)


adding transaction_id, subscription_id as part of standard response dictionary

Given that the various payment processor gateways have widely varying transaction response objects, it would be incredibly helpful to include 'transaction_id' and 'subscription_id' as part of the standard response dictionary.
As an example, here's the implementation for the authorize.net gateway: tinio/merchant@55954480511dba80e99f93f039a6f75e9f19533e
@theju, if this sounds agreeable and doesn't go against a possible desire to keep the standard response dictionary simple, I'd be happy to implement this for additional gateways, and submit a proper Pull Request.
Thanks.

@tinio, I am fine with your request but certain gateways don't send a transaction_id if the transaction fails. Let me check with all the gateways we have implemented so far.


cmd/cue: unexpected result from two-stage comprehension

I'd expect the following code to produce {z: true} but it produces {} instead:
if E["x"] != _|_ {
	E :: y: true
}
if E["y"] != _|_ {
	z: true
}
E :: [_]: bool
E :: x: true

From Slack: Currently, all comprehensions are evaluated before they are mixed in. This means that the second comprehension cannot see the y inserted by the first one. However, it probably makes more sense to adopt a fixed-point semantics, where embeddings and comprehensions are evaluated until a fixed point is reached. There is also an odd consequence with the current semantics where comprehensions may be evaluated anyway if structs with comprehensions are passed around, effectively executing the next step in a fixed-point computation.

See https://github.com/cuelang/cue/blob/master/cue/testdata/comprehensions/issue287.txtar

This issue has been migrated to https://github.com/cue-lang/cue/issues/287.
For more details about CUE's migration to a new home, please see https://github.com/cue-lang/cue/issues/1078.


Fix ORC Bloom Filter

This is same issue refers to : https://github.com/prestodb/presto/issues/12900
The same is reproduces in community version of presto.
All releases of community presto from 300 to 313 will not get advantage of ORC Bloom filter due to this.
Below is the description :
After changes of StreamId in readBloomFilterIndexes method of StripeReader class the Bloom filter does not skip unsatisfied Row Group of ORC due to coding bug as the below line return always null.
StripeReader.java
List<HiveBloomFilter> bloomFilters = bloomFilterIndexes.get(entry.getKey());
This have an impact on Presto ORC performance.
@martint I have created the same issue here too and submit the PR for this.

hi.. But would this PR solves (https://github.com/prestosql/presto/pull/914) the issue ?

@Praveen2112  Yes, The PR will resolve this.
This is the snapshot of the query run on the current presto community version that should skip all the Splits and should read 0 Rows instead.
presto:default> select count(*) from msc_cdr_orc where called_calling_no='0091889' AND date_of_call=190508 AND call_type='SMT';
 _col0
-------
     0
(1 row)

Query 20190605_123713_00008_qxskm, FINISHED, 1 node
Splits: 67 total, 67 done (100.00%)
0:05 [26.3M rows, 91.1MB] [5.35M rows/s, 18.5MB/s]

This is the snapshot after the fix.
select count(*) from msc_cdr_orc where called_calling_no='00919811680000' AND date_of_call=190508 AND call_type='SMT';
 _col0
-------
     0
(1 row)

Query 20190605_124920_00001_ieepp, FINISHED, 1 node
Splits: 67 total, 67 done (100.00%)
0:02 [0 rows, 0B] [0 rows/s, 0B/s]

Fixed


Extends controller-runtime with new metric

Extends controller runtime metrics adding prometheus metrics to count cluster static entries failures
Fix issue #278

Thanks for testing this IRL, @kfox1111!


fix sg project attrs constant

While syncing SG project we faced the issue with ayon project name. Ayon tried to get field "sg_ayon_project_name" from SG Project that was not set before by "create_ay_fields_in_sg_project" method

Hey there!
Sorry for having missed this!
I have now merged a PR https://github.com/ynput/ayon-shotgrid/pull/19 which does away with this field, since in AYON the project id is the actual project name! So when synchronizing, it will now try to create a sg_ayon_id in the Project schema. More specifically in this commit: https://github.com/ynput/ayon-shotgrid/commit/ac18ad2996ea45868c76d2031c151ef9ad275a61
Sorry for the inconvenience, and feel free to add me as reviewer next time :)


Amendment process: Add announcement on Google Groups when starting votes.

Reference to issue https://github.com/google/transit/issues/96

More specific direction about group to announce to here: https://github.com/MobilityData/transit/pull/39


Add secrets patch to buildah

Signed-off-by: umohnani8<EMAIL_ADDRESS>Signed-off-by: Daniel J Walsh<EMAIL_ADDRESS>

A couple of nits, but otherwise it looks reasonable.

Will merge when the tests pass.  And then will build new version of buildah


Support for custom notification sounds

If an app doesn't provide any custom notification sounds, all notifications for the app use the default Tri-tone sound. It would be nice if the app offered a choice of notification sounds.

Hi @elyscape - can you make a feature request for this on our feature request forums?
We're working on a new mobile app at the moment, so it's probably easiest to track this as a feature request and then look at adding it in the new mobile apps.

Done.

Great, thank you @elyscape!


Unable to install CLI on Windows 10

Environment

OS: Windows 10 v. 1803
Syncano version: 0.15.0
Node version: 12.8.0
NPM version: 6.10.2

Describe the bug
Syncano CLI throws showstopping error during installation on empty project (freshly npm initialized directory). It breaks the installation, yielding half-processed package content inside node_modules.
Error indicates that it can't run postinstall script due to an unexpected dot.
To Reproduce
Steps to reproduce the behavior:

npm install -g @syncano/cli or npm install @syncano-cli in empty node project

Expected behavior
Syncano CLI gets completely installed either locally or globally.
Screenshots

+1 here on my team, any ideas ?

This is inside the post install
#!/usr/bin/env sh

cd $INIT_CWD
if [ -z "$CI" ]
then
  npx s init
else
  echo "CI detected - skipping post install."
fi


What is the status of this repo?

@waylonflinn
This repo is no longer compatible with the latest versions of Katex - which means that it is necessary to use a forked update ala @iktakahiro/markdown-it-katex to get katex working as intended.
Would it please be possible to clarify the status of the repo and whether there are plans to continue maintaining it? If no plans to maintain, whether it would be possible to cede the project to a new active maintainer, maybe @iktakahiro?
Given the name of the repo it would be opportune to keep this working, as this is the most apparent option when people are searching for markdown-it + katex.
Thanks.

That fork does not appear to actually change anything significant.

There are 5 pending PR, one of them from June 2017. The code has not been updated for the last 2 years, 3 years for most files. There is a script injection issue that has been detected https://github.com/waylonflinn/markdown-it-katex/issues/26
@waylonflinn could you please let us know your thoughts on the repo status?
@iktakahiro should we open issues on your fork instead? https://github.com/iktakahiro/markdown-it-katex/

For those of you using vuepress, note that vuepress-plugin-mathjax is now available. I still prefer katex but give the difficulty in getting any of the katex markdown-it parsers to work for vuepress, the above option proves quite useful.

Glad you're all interested in the library. I intend to bring it up to date with the latest version. I'll carve out some time to work on this next week.
Thanks for your patience.

@jbe456 thanks for your mention, I'd like to maintain my forked project https://github.com/iktakahiro/markdown-it-katex/
However, If this original package is upgraded, I think that is the best 👍

Hi All, note that there is a proliferation of markdown-it katex plugins developing:
In addition to this repo:
markdown-it-texmath
@iktakahiro/markdown-it-katex
@neilsustc/markdown-it-katex
@mathssyfy/markdown-it-katex
Possibly because this repo wasn't maintained for a while. Might be worth trying to consolidate efforts if this repo gets going again.
Note that they all seem to have an issue with vuepress for some reason when running webpack-dev-server. See https://github.com/songololo/markdown-katex-debug and https://github.com/goessner/markdown-it-texmath/issues/13

@waylonflinn any news?
(http://waylonflinn.github.io/markdown-it-katex/ make me laugh btw)

@yakovlevkll
On my radar. Just waiting for a free block of time.
(thanks, glad you liked it)

FYI
@waylonflinn Thank you for your time creating this package! Until the repo is updated I've forked the project and updated it to the latest KaTeX, plus a few other changes, as the current setup here was breaking my math.
@everyone else - I've published the updated package to the NPM registry, so you can install it as markdown-it-katexx and use it the same as the original one.


Add run on repl.it badge to README

Repl.it is an online IDE that's much (much) faster than Cloud9, you also don't need to sign up and the environment comes pre-setup.
This adds a run on repl.it badge. Your students/users can then just click on that and get started in a matter of seconds. Here is a screenshot of selfie self-compiling

If you want to try it before you merge: https://repl.it/@amasad/selfie

@amasad This is awesome! Thanks so much!


Plan review and comments

SIG & friends – The EDU.SIG SIG has been working since summer to revise the initial OpenSSF’s Mobilization Plan(1) Stream 1. We are pleased to announce that our work is nearly complete and we are seeking feedback on the newly revised plan(2) from the SIG & friends prior to officially sharing it with the TAC and GB the first full week of December.
Please read the plan (Summary and three sections [the final section where all of the “Costs” are pulled together is actively being updated and is not ready at this time, but will be for the final proposal]) and provide us feedback in this issue.
(1) - https://openssf.org/oss-security-mobilization-plan/
(2) - https://github.com/ossf/education/tree/main/plan

SIG & WG - please provide feedback by 23Dec2022

I'm only up to a skim so far but: outstanding work.

From Education SIG DEI subcommittee, proposed list of work items to consider and add to the overall plan:

Mentorship
Skills Develpment

Technical

Ex: Using Git

Professional

Project Management
Collaboration
Presentation
Writing

Industry Experience

Internships
Fellowships

Career Preparation

Interview prep
Resume writing
Coding practice
Digital portfolio

Ideas include:

Leveraging existing LF initiatives
Working with HBCUs, HSIs to identify experience and outcome gaps from their current industry partnerships.
Partnering with organizations that focus on providing mentorship (and career preparation services) to underserved communities, ex: Women in Cybersecurity.
Working with a new Alpha-Omega DEI initiative to bring mentorship opportunities and build interview skills.
Exploring partnership opportunities with critical open source projects to help folks build a digital portfolio of work in the security space.
Challginging premier OpenSSF members to sponsor (hire/intern) a certain number of people from underserved communities who go through our programs.

Other bubbling ideas that we did not have time to discuss on the 20221215 meeting:

Reviewing existing education resources for accessibility gaps and suitability for neurodiverse learners as well as those from various backgrounds.
Partnering with neurodiversity organizations to drive better hiring outcomes for those who go through security training.

From Education SIG DEI subcommittee, proposed list of work items to consider and add to the overall plan:
1. Mentorship

2. Skills Develpment

   * Technical

     * Ex: Using Git
   * Professional

     * Project Management
     * Collaboration
     * Presentation
     * Writing

3. Industry Experience

   * Internships
   * Fellowships

4. Career Preparation

   * Interview prep
   * Resume writing
   * Coding practice
   * Digital portfolio

Ideas include:
1. Leveraging existing [LF initiatives](https://www.linuxfoundation.org/about/diversity-inclusivity)

2. Working with HBCUs, HSIs to identify experience and outcome gaps from their current industry partnerships.

3. Partnering with organizations that focus on providing mentorship (and career preparation services) to underserved communities, ex: Women in Cybersecurity.

4. Working with a new Alpha-Omega DEI initiative to bring mentorship opportunities and build interview skills.

5. Exploring partnership opportunities with critical open source projects to help folks build a digital portfolio of work in the security space.

6. Challginging premier OpenSSF members to sponsor (hire/intern) a certain number of people from underserved communities who go through our programs.

Other bubbling ideas that we did not have time to discuss on the 20221215 meeting:
1. Reviewing existing education resources for accessibility gaps and suitability for neurodiverse learners as well as those from various backgrounds.

2. Partnering with neurodiversity organizations to drive better hiring outcomes for those who go through security training.

How can we get this integrated into the plan prior to us sharing with the TAC in 3 weeks?

The plan first draft was complete and shared with the TAC,GC, and gb


additional functionalities to support packed-struct encoding

during write, able to write a struct with multiple fields to one page, and record it in the metadata.

during read, able to detect a column is a packed-struct column and it maps to many column indices.

during scheduling, able to map one physical page to many fields in this struct.

we should also allow reading a subset of fields instruct array

issue with PR #3186
9a5a13f4ebf6b83ed35bb3322372407f0d4ccfbc
some facts:
from lance.file import LanceFileReader, LanceFileWriter
import pyarrow as pa

# Define the fields for the struct column
fields = [
    pa.field('x', pa.uint32()),
    pa.field('y', pa.uint32()),
]

# Create the struct type
struct_type = pa.struct(fields)

# Create 8 rows of data for the struct column
data = [
    {'x': 1, 'y': 2},
    {'x': 4, 'y': 5},
    {'x': 7, 'y': 8},
    {'x': 10, 'y': 11},
    {'x': 13, 'y': 14},
    {'x': 16, 'y': 17},
    {'x': 19, 'y': 20},
    {'x': 22, 'y': 23}
]

lance_file_path = "/home/x/packed-struct.lance"

# Convert the data to a list of structs
struct_array = pa.array(data, type=struct_type)

# Define the new int32 column
int32_column = pa.array([1, 2, 3, 4, 5, 6, 7, 8], type=pa.int32())

# Define the metadata
metadata = {b'packed': b'true'}
struct_field = pa.field('struct_col', struct_type, metadata=metadata)
int32_field = pa.field('int_col', pa.int32())
second_struct_field = pa.field('second_struct_col', struct_type)

# Create a schema with the updated fields
schema = pa.schema([struct_field, second_struct_field])

# Create a table using the struct array, int32 column, and duplicate struct column
table = pa.Table.from_arrays([struct_array, struct_array], schema=schema)

# Write the table to a Lance file
with LanceFileWriter(lance_file_path, version="2.1") as writer:
    writer.write_batch(table)
print("Data written to Lance file successfully.")

# Read the Lance file and display the contents
tab_lance = LanceFileReader(lance_file_path).read_all().to_table()
print(tab_lance.to_pandas())

has result:
           struct_col   second_struct_col
0    {'x': 1, 'y': 2}    {'x': 1, 'y': 1}
1    {'x': 4, 'y': 5}    {'x': 4, 'y': 4}
2    {'x': 7, 'y': 8}    {'x': 7, 'y': 7}
3  {'x': 10, 'y': 11}  {'x': 10, 'y': 10}
4  {'x': 13, 'y': 14}  {'x': 13, 'y': 13}
5  {'x': 16, 'y': 17}  {'x': 16, 'y': 16}
6  {'x': 19, 'y': 20}  {'x': 19, 'y': 19}
7  {'x': 22, 'y': 23}  {'x': 22, 'y': 22}

observation: the result of second_struct_col is wrong, y field has the wrong result of x field.


Healthcheck in app groups

Hi all, When I define the marathon request blow, Did the marathon will start theapi after the db is health?
Thanks in advance
{
  "id": "controller",
  "apps": [
    {
      "id": "db",
      "cpus": 0.2,
      "mem": 256,
      "instances": 1,
      "container": {
        "type": "DOCKER",
        "docker": {
          "image": "tutum/mysql",
          "network": "BRIDGE",
          "portMappings": [
            { "containerPort": 3306 }
          ]
          ]
        }
      },
      "healthChecks": [
        {
          "protocol": "TCP",
          "gracePeriodSeconds": 3,
          "intervalSeconds": 2,
          "portIndex": 0,
          "timeoutSeconds": 5,
          "maxConsecutiveFailures": 3
        }
      ]
    },
    {
      "id": "api",
      "cpus": {{ .cpus }},
      "mem": {{ .mem }},
      "instances": 1,
      "container": {
        "type": "DOCKER",
        "docker": {
          "image": "{{ .image }}",
          "network": "BRIDGE",
          "portMappings": [
            { "containerPort": 8088, "hostPort": 0 }
          ]
        }
        ]
      },
      "dependencies": ["/controller/db"],
      "healthChecks": [
         {
           "path": "/",
           "portIndex": 0,
           "protocol": "HTTP",
           "gracePeriodSeconds": 120,
           "intervalSeconds": 2,
           "timeoutSeconds": 3
         }
      ]
    }
  ]
}

Hi @sjkyspa,
As written in the docs

dependencies (Array of Strings)

A list of services upon which this application depends. An order is derived from the dependencies for performing start/stop and upgrade of the application. For example, an application /a relies on the services /b which itself relies on /c. To start all 3 applications, first /c is started than /b than /a.

Your application api will start after the /controller/db application is started. Following my knowledge the api should start after the healthchecks pass for the db

Please reopen, if it does not work as expected


Feature Request: add auto gain compensation

Currently, it is difficult to compare dry/wet, A/B, or enabled/bypassed, because one has to manually match the gain. Please consider adding an optional auto gain compensation feature that would match the gain (e.g., RMS/LUF) regardless of what effect parameters are adjusted, besides the output gain which would override any auto gain matching. Thanks for offering such a great plugin for free.

Thanks for the suggestion! That's definitely a good idea. I'll have to take a look at how difficult it will be to implement, and hopefully I can include an auto-gain option in the next release!

Just implemented a version of automatic gain compensation, now on the develop branch. To switch it on, you can right-click on the "Wet" gain control, and turn it on from there. Right now, the auto-gain will make sure the wet signal is at the same level as the input signal before the wet gain is applied. If you'd like to try it out, the feature should be in the next nightly builds.

Awesome!
On Fri, Dec 10, 2021 at 4:52 PM jatinchowdhury18 @.***>
wrote:

Just implemented a version of automatic gain compensation, now on the
develop branch. To switch it on, you can right-click on the "Wet" gain
control, and turn it on from there. Right now, the auto-gain will make sure
the wet signal is at the same level as the input signal before the wet
gain is applied. If you'd like to try it out, the feature should be in the
next nightly builds https://chowdsp.com/nightly.html#matrix.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Chowdhury-DSP/ChowMatrix/issues/112#issuecomment-991395864,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ACO2622NF2P24SWGIP6VNOLUQKOEPANCNFSM5I5IICRQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.


Improve navigation of adr plugin

Signed-off-by: David Weber<EMAIL_ADDRESS>Hey, I just made a Pull Request!
This PR will solve https://github.com/backstage/backstage/issues/15995
The new navigation looks like this

:heavy_check_mark: Checklist

[X] A changeset describing the change and affected packages. (more info)
[X] Added or updated documentation
[X] Tests for new functionality and regression tests for bug fixes
[X] Screenshots attached (for UI changes)
[X] All your commits have a Signed-off-by line in the message. (more info)

pinging @kuangp to have a look

@kuangp updated PR :wink:

Nice idea. Have added the screenshot in the README.


guild delete event.

Bot encounters a crash when a guild is deleted due to line 73 in GuildSyncCollection not having "e" referenced.
function handleGuildDelete(guild**, e**)

Fixed. Thanks.


Not connecting to peer

I am attempting to setup wireguard (package version 0.1.1 installed using the webUI) on my netgate sg-3100. However I can not seem to get it to connect at all.
My VPN provider is mullvad and this is the config I got from them:
[Interface]
PrivateKey = Lm0BA4...
Address = <IP_ADDRESS>/32,fc00:bbbb:bbbb:bb01::4:5265/128
DNS = <IP_ADDRESS>

[Peer]
PublicKey = T1fKJp8knv4kqsfy9O04OIy+1nl5b9ypcnIzdmcfyzM=
AllowedIPs = <IP_ADDRESS>/0,::0/0
Endpoint = <IP_ADDRESS>:51820

tunnel settings:

peer settings:

status:

wg showconf tun_wg0

I believe I have set everything up correctly but as shown on the status page no data is being transferred. The only problem I can find is when I run wg showconf tun_wg0, the private key differs from the one I entered in the web UI. Is this by design or is something wrong?
Thank you.

That is wired. even when you restart the service it still shows a different private key? Also I noticed when testing mullvad, that it provides you config even if you have paid for it, but never connects. so assuming you have paid for sub with mullvad.

Yes, the different private key stays through restarts. I even tried changing it with wg set but it didn't do anything.
Yes, I have a paid subscription. I am currently using mullvad on other devices and I actually had it working with netgate's wireguard implementation before they removed it.

Did you install from scratch or get here via upgrades? also if you can post the wireguard section from the configl.xml (obfuscated) might shed some light as well.

Through upgrades of both pfSense and the wireguard package.
<wireguard>
	<config>
		<keep_conf>yes</keep_conf>
		<hide_secrets></hide_secrets>
	</config>
	<tunnels>
		<item>
			<addresses></addresses>
			<name>tun_wg0</name>
			<enabled>yes</enabled>
			<descr><![CDATA[Mullvad SEA]]></descr>
			<listenport>51820</listenport>
			<privatekey>Lm0BA4...=</privatekey>
			<publickey>SHRPJKc1SLByfYd3r1mwlUnPGe3ziNTXNJt3XgDMHB8=</publickey>
			<mtu>1500</mtu>
		</item>
	</tunnels>
	<peers>
		<item>
			<allowedips>
				<row>
					<address><IP_ADDRESS></address>
					<mask>0</mask>
					<descr></descr>
				</row>
				<row>
					<address>::0</address>
					<mask>0</mask>
					<descr></descr>
				</row>
			</allowedips>
			<enabled>yes</enabled>
			<tun>tun_wg0</tun>
			<descr><![CDATA[us177]]></descr>
			<endpoint><IP_ADDRESS></endpoint>
			<port>51820</port>
			<persistentkeepalive></persistentkeepalive>
			<publickey>T1fKJp8knv4kqsfy9O04OIy+1nl5b9ypcnIzdmcfyzM=</publickey>
			<presharedkey></presharedkey>
		</item>
	</peers>
</wireguard>

That looks good. now sure why/how the showconf is mismatching from the .
what does /usr/local/etc/wireguard/tun_wg0.conf contain? the correct keys or incorrect ones? you can try moving that file out,  that and restarting the service that should recreate that.

/usr/local/etc/wireguard/tun_wg0.conf:
# This WireGuard config file has been created automatically. Do not edit!
# Description: Mullvad SEA

[Interface]
PrivateKey = Lm0BA4...
ListenPort = 51820

# Peer: us177
[Peer]
PublicKey = T1fKJp8knv4kqsfy9O04OIy+1nl5b9ypcnIzdmcfyzM=
AllowedIPs = <IP_ADDRESS>/0,::0/0
Endpoint = <IP_ADDRESS>:51820

Correct keys.

AllowedIPs = <IP_ADDRESS>/0,::0/0
v6 should be ::/0

AllowedIPs = <IP_ADDRESS>/0,::0/0
v6 should be ::/0

Huh, I don't know where that extra 0 came from. Like with the private key, it differs based on where you look.

I decided to try do a factory reset and then install v0.1.2_1. It did not go very well...
I installed v0.1.2_1 from github which caused the wireguard service not be able to start. service wireguardd start says 'Unable to build WireGuard tunnels(s)'. The only way I could get it to start was to delete all tunnels/peers. Then it works fine but if I even create a tunnel with just my privatekey, this makes the service unable to start.
So I uninstalled that version. I went to pfSense's package manager to reinstall v0.1.1 but pfSense only gave me v0.0.8. This happened before right after I upgraded pfSense but I don't know how I got it to give me v0.1.1 before and I was unable to repeat it. I think I ran pkg update and then rebooted or something like that but it didn't do the trick this time.
So I installed v0.1.1 from github and #71 is happening again even though when I had v0.1.1 installed before it was able to load the kernel module. On wireguard's status page it says I have v0.1.1_1 installed verses v0.1.1 from before. Maybe thats because this time I installed it using the pkg command and not the web UI?

Correction: I'm having issues with Mullvad too. My other tunnels work fine

Should I contact mullvad's support?

@completion please can you join us on discord and we can discuss this much faster. This sounds like it might need some more quick debugging from us.
https://discord.gg/d8vCftC

discussed on Discord in Channel  DEBUG105
Private key Lm0BA4UyPilHH5qnXCfr6Lw8ynecOPor88tljLy3ALk= is accepted by the web gui but then gets mangled during save and translated into KG0BA4UyPilHH5qnXCfr6Lw8ynecOPor88tljLy3AHk= on wg showconf

Here is another example.
zQwldrChCYP3P2fZeTtHmj3c/88hxM+TaLIq1mJ28ZY= turns into
yAwldrChCYP3P2fZeTtHmj3c/88hxM+TaLIq1mJ28VY=. There seems to be a pattern. Only a few bits are changed.

This seems to be an issue with WireGuard Tools and not with the package itself. I'm going to reach out to Jason and see what he thinks. But the key is correct up until it is passed to wg(8).

After consulting with Jason, this is expected. Mullvad isn't properly clamping those private keys. This shouldn't impact connectivity though. I've built some checks for cases like this and can use these to inform users when an unclamped private key or psk was entered.

I've left some notes in the automatically generated .conf files for those users who happen to be technically motivated to go digging around on disk. This should be sufficient in nudging them that this is expected behavior. Other than that, this scenario will be transparent to end-users via the UI.


Issue with docs.zowe.org/stable/user-guide/cli-using-integrating-apiml

Description
It would be helpful to add instructions for Zowe CLI users to authenticate to the APIML using client certificates.
Currently, the page does not mention certificates.
Pages to Update
docs.zowe.org/stable/user-guide/cli-using-integrating-apiml
Screenshots

Expected behavior

Additional context

Do you need our help on this one?


Add supporrt for composed models and reference models

The goal of this PR is to support specifications that have:

reference to references

definitions:
  model:
    type: object
    properties: ...
  model_r:
    $ref: '#/definitions/model'

definitions that have allOf attributes where only one item does characterise the final schema

definitions:
  model:
    type: object
    allOf:
    - $ref: '#/definitions/something'
    - description: "override the description"

@cortinico ping


Option to hide one or more features from FeatureCollection

When working with more than one feature inside the feature collection with at least 2 with the same geometry, you need to remove an entire feature just to check if you are looking for the correct geometry.

I support this idea and I'm thinking it would be a nice addition to the table view to show/hide individual features.  (This is similar to another idea I've had to allow highlight a feature on the map when its respective row is hovered on the map)


Middleware docs update

Updates URL Rewriting Middleware, Response Caching Middleware, and Response Compression Middleware docs.

Refer to the new IIS Modules doc for info on disabling IIS modules
Change "or higher" to "or later" when referring to versions, per https://github.com/aspnet/Docs/pull/2777#issuecomment-280423095
Change URL path segments from bold to inline code
Update sample versions

@mikaelm12 @davidpeden3 I need help on the Unsupported Features list in the URL Rewriting Middleware doc. Except for one that's marked 2.0, I can't easily determine from the milestones which (if any) have been solved for the 1.0.1 release of the package to remove them from the list.
@tdykstra This is WIP until I hear back from them.

@GuardRex,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot

@GuardRex The only thing that made it into the 1.0.1 Rewrite package was support for the REQUEST_METHOD server variable https://github.com/aspnet/BasicMiddleware/commit/2e147f364599688d6af699a1817662c3785e8c6f
The other changes are going into 2.0

@mikaelm12 Thanks!
@tdykstra This is ready for review/merge.


fix: ts esm types (close #173)

@developit Could you please review this pr and publish a 3.0.1 soon? I am patching this package for quite a long time.


Fixes augur#811

We didn't manually convert from hex to int during reorg, so the code works on sqlite but not postgres.

@FilipPyrek  -- Mind testing out this patch?

@pgebheim yep, gonna test it. I'will let you know tomorrow (I'm based in Europe..) 👍


Support for WebSocket Denial Response

I added support for Starlette some time ago, it would be nice to have it here.

It's hitting an assertion on message["type"] == "accept" nowadays.


Add localhost to network address.

This fixes the 'unreachable network' error during the test.

The test timeout seems too short. Will submit anyway.

I actually did not notice that you revert this commit before. Just revert it if my merge is not appropriate.

Thanks Chris, I think this test should be fine now.
I removed network_util_test.go because there is several places in the test code that cause flakiness, or fail constantly inside the travis CI.
This PR (pull request) only fail in travis CI because of timeout. You mentioned in the other PR timing out is not due to the code running too slow. Then there is no known issues for this change.
Sorry for the churns in the change history. I will follow the workflow:

local change
pull request + travis test
merge
For all of my following tests changes.


Possible memory leak

I have some problems with libraries based on nx-remotecache-custom
We have a big project. And when I try to build I see this output:
(node:25020) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 Symbol(destroyed) listeners added to [Pack]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)

Tried to use 2 custom libs, and write my own interpretation, but no luck.
Think this is something with "stream"'s

Are you having the problem directly with nx-remotecache-custom or one of the libraries using it, e.g. nx-remotecache-azure?  Also I'd need the node version please 👀


Update getting_started.rst

Coverage remained the same at 100.0% when pulling c02dc8a0b8c845f7dd073fcd4ab6a30b1787b427 on getting_started_cleanup into 2fa2abad0e2e8225de25f02507ec70564f03144c on master.


Auto-tag behaviour

Been trying the autotag feature, but getting poor results.
Config looks like this:
files =
  [ {"name": [], "name_exclude": [],
     "ext": ["tmp*", "TMP*", "temp*", "TEMP*", "cache*", "CACHE*"],
     "path": [],
     "path_exclude": [], "mtime": 90, "atime": 0, "ctime": 90,
     "tag": "delete", "tag_custom": "autotag"},

  { "name":[], "name_exclude": [],
    "ext": ["zip", "ZIP", "dmg", "DMG", "iso", "ISO", "gz", "bz2"],
    "path": [], "path_exclude": [],
    "mtime": 0, "atime":0, "ctime":0,
    "tag": "archive", "tag_custom": "archive" },

  { "name":[], "name_exclude": [],
    "ext": ["mov","MOV","mp4","MP4","m4v","M4V","avi","AVI"],
    "path": [], "path_exclude": [],
    "mtime": 0, "atime":0, "ctime":0,
    "tag": "keep", "tag_custom": "video" },

  { "name":["DSCF*","dscf*","IMG_*","img_*"], "name_exclude": [],
    "ext": ["cr2","CR2","RAF","raf"],
    "path": [], "path_exclude": [],
    "mtime": 0, "atime":0, "ctime":0,
    "tag": "keep", "tag_custom": "rawimage" }
  ]

However, the only thing that gets tagged correctly is DSCF*.RAF
None of the other files specified in the search seem to be working, all are still untagged.
Am I doing something wrong?

I pushed a few patches just now for rc10, please update and let me know if the auto tags work for you now. If not, please reply with some example filenames that work and some that don't.

Thanks for the quick response.
That's now tagging everything defined in the "keep/rawimage" section, but none of the other definitions are tagging.
I think it's not handling undefined names/ext search correctly.  For example, looking at
            try:
                for ext in pattern['ext']:
                    if ext.startswith('*') and ext.endswith('*'):
                        ext = ext.replace('*', '')
                        if re.search(ext, metadict['extension']):
                            extpass = True
                            break
                        else:
                            extpass = False
                    elif ext.startswith('*'):
                        ext = ext + '$'
                        if re.search(ext, metadict['extension']):
                            extpass = True
                            break
                        else:
                            extpass = False
                    elif ext.endswith('*'):
                        ext = '^' + ext
                        if re.search(ext, metadict['extension']):
                            extpass = True
                            break
                        else:
                            extpass = False
                    else:
                        if ext == metadict['extension']:
                            extpass = True
                            break
                        else:
                            extpass = False
            except KeyError:
                pass

If ext is undefined, then it goes to exact match instead of wildcard.  Conversely, if you use "*" then it'll go to "starts and ends with ", but replaces the "" with '' which also will never match.
May either have to have a special case for * or '', or maybe just allow plain regex directly since that's what the search uses anyway.....?

Never mind I'm off the mark there, sorry.
It seems to work with just the LAST pattern definition, I wonder if previous matches in the "for pattern in" loop is getting overwritten?

Ah yes, it is getting overwritten.

Created a pull request for the fix, not sure how to link it to this issue.

thank you for that patch, I've merged it into master branch.

glad to help!


React-scripts causes yarn workspaces to fail silently

Describe the bug
Attempting to run yarn install in a large workspaces project gets about 75% through linking dependencies and then fails silently. On subsequent tries it fails almost immediately after starting linking dependencies. Even with --verbose there is no error or any indication of why it stops.
After removing packages one by one I was able to narrow it down to an interaction between yarn workspaces and react-scripts from one of the workspaces that uses create react app. If I remove the react-scripts package, yarn installs fine for the whole workspaces project. If I move the create react app workspace to a separate project it runs correctly.
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
Workspaces, Yarn, Install, react-scripts
Environment
Environment Info:
current version of create-react-app: 4.0.3
running from C:\Users\ccourtney\AppData\Roaming\npm-cache_npx\11380\node_modules\create-react-app
System:
OS: Windows 10 10.0.19042
CPU: (12) x64 Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz
Binaries:
Node: 12.20.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.10 - C:\Program Files\nodejs\yarn.CMD
npm: 6.14.11 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 89.0.4389.114
Edge: Spartan (44.19041.423.0), Chromium (89.0.774.75)
Internet Explorer: 11.0.19041.1
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce

Pull a project with yarn workspaces that has a create react app in one of the workspaces
Run yarn install
It fails silently

Expected behavior
Yarn finishes installs correctly
Actual behavior
Yarn fails silently about 75% through when react-scripts is present
A couple notes, the project installs correctly on some other peoples machines. Also, I have opened a ticket on yarn here https://github.com/yarnpkg/yarn/issues/8603  but wanted to check if the issue might be here.

I don’t know the number of token but 0x7296333e1615721f4bd9df1a3070537484a50cf8 is already listen in my zeroin wallet and around $100,000  was deposited from my zerion into react app..
I have yet to try and interact with the smart contract via solidity on etherscan .
Perhaps should give it a try ?
Sent from my iPhone

On 13 Apr 2021, at 00:45, ccourtney3 @.***> wrote:

Describe the bug
Attempting to run yarn install in a large workspaces project gets about 75% through linking dependencies and then fails silently. On subsequent tries it fails almost immediately after starting linking dependencies. Even with --verbose there is no error or any indication of why it stops.
After removing packages one by one I was able to narrow it down to an interaction between yarn workspaces and react-scripts from one of the workspaces that uses create react app. If I remove the react-scripts package, yarn installs fine for the whole workspaces project. If I move the create react app workspace to a separate project it runs correctly.
Did you try recovering your dependencies?
Yes
Which terms did you search for in User Guide?
Workspaces, Yarn, Install, react-scripts
Environment
Environment Info:
current version of create-react-app: 4.0.3
running from C:\Users\ccourtney\AppData\Roaming\npm-cache_npx\11380\node_modules\create-react-app
System:
OS: Windows 10 10.0.19042
CPU: (12) x64 Intel(R) Core(TM) i7-9850H CPU @ 2.60GHz
Binaries:
Node: 12.20.2 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.10 - C:\Program Files\nodejs\yarn.CMD
npm: 6.14.11 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 89.0.4389.114
Edge: Spartan (44.19041.423.0), Chromium (89.0.774.75)
Internet Explorer: 11.0.19041.1
npmPackages:
react: Not Found
react-dom: Not Found
react-scripts: Not Found
npmGlobalPackages:
create-react-app: Not Found
Steps to reproduce
Pull a project with yarn workspaces that has a create react app in one of the workspaces
Run yarn install
It fails silently
Expected behavior
Yarn finishes installs correctly
Actual behavior
Yarn fails silently about 75% through when react-scripts is present
A couple notes, the project installs correctly on some other peoples machines. Also, I have opened a ticket on yarn here yarnpkg/yarn#8603 but wanted to check if the issue might be here.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.


mIoU with background in semantic segmentaion

Hi!
I have a question about background in the calculation of the mIoU.
When we calculate the mIoU of the segmentaion, usually IoU of the background is included.
In  that case, mIoU is at least 0.45 even the model didn't catch anything because of the IoU(background).
I wondering about
Is the calculation(mIoU with background) correct or reasonable?
If the calculation is not reasonable, then how can we measure the performance of the segmentation model?
Thank you.

Hi @Gil-TakKong
I think, background can ignored by passing class_indexes argument to the sm.metrics.IOUScore() function.
For example, to ignore background during IoU evaluation (for 3 classes CLASSES = ['sky', 'building', 'pole', 'unlabelled/background']), sm.metrics.IOUScore() function can be modified as follows:
metrics = [sm.metrics.IOUScore(threshold=0.5,class_indexes=[0,1,2]), sm.metrics.FScore(threshold=0.5,class_indexes=[0,1,2])]

Cheers


Ubuntu Simple example,  Web server directives need updating

web1 not joining the weave network as expected, in the sample:
sudo docker logs web1
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using <IP_ADDRESS>. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using <IP_ADDRESS>. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using <IP_ADDRESS>. Set the 'ServerName' directive globally to suppress this message

http://askubuntu.com/questions/329323/problem-with-restarting-apache2

The apache image in this sample needs to updated.

It's not a fatal error, just a warning, will try fixing later on.

This also will probably get fixed in 1.1 with https://github.com/weaveworks/weave/pull/1265.


nodes (ip/port) that leave the cluster and then rejoin are never reflected in redison cluster topology, but are in CLUSTER NODES

Redis version
6.x
Redisson version
3.32.0
Redisson configuration
Cluster Configuration
What is the Expected behavior?
When a master is detected as suspect and removed from the cluster and its standby promoted, and then the same master node ip/port is re-added to the cluster, and re-promoted to master, redisson's cluster topology should reflect the current state of the cluster as returned by CLUSTER NODES
What is the Actual behavior?
The new master is not present in redisson's cluster topology and the old master continues to be attempted to be used.
org.redisson.client.WriteRedisConnectionException: Unable to write command into connection!
Additional information
it appears to be happening because ClusterConnectionManager.lastUri2Partition does not have entries removed when nodes leave the cluster.  Then, when the node rejoins and is re-promoted to master, masterFound == true and the logic for adding partitions does not run.
ClusterPartition currentPart = (ClusterPartition)this.lastUri2Partition.get(newPart.getMasterAddress());
boolean masterFound = currentPart != null;
...
if (!masterFound && !newPart.isMasterFail()) {
    addedPartitions.put(newPart.getMasterAddress(), newPart);
}

Can you share Redisson logs in debug mode?

Duplicated with https://github.com/redisson/redisson/issues/5972

https://gist.github.com/sclasen/17907cb2433d0163b6384eb430ee2f42

Fixed in https://github.com/redisson/redisson/issues/5972. Thanks for the provided logs


New installation of hass.io missing repository

Hello!
I’ve tried reimaging my SD card multiple times with the lastest hassio release. Still no luck though, the only repository that displays is the Community Hassio Addons(https://github.com/hassio-addons/repository). Everytime I try to add this repository to my addon store I get this error:
18-05-12 15:44:22 ERROR (MainThread) [hassio.addons] Can't load from repository https://github.com/home-assistant/hassio-addons
18-05-12 15:44:22 INFO (MainThread) [hassio.addons] Load addons: 14 all - 0 new - 0 remove.
Please help, I want to use letsencrypt on my setup. Thanks, Will.

I'm running into a similar issue, in which this repository fails to be cloned and therefor won't show up in the addon store for a fresh hassio install on a PI3:
18-05-22 00:00:10 ERROR (MainThread) [hassio.addons.git] Can't clone https://github.com/home-assistant/hassio-addons repo: Cmd('git') failed due to: exit code(128)
cmdline: git clone --recursive -v https://github.com/home-assistant/hassio-addons /data/addons/core
stderr: 'Cloning into '/data/addons/core'...
POST git-upload-pack (177 bytes)
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 110
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
'.
18-05-22 00:00:10 ERROR (MainThread) [hassio.addons] Can't load from repository core

I have the same issue, is there any solutions? I already flashed the .bz2 file.

That is with ResinOS?
If I google this error message, I read that it could be a problem with Internet/Firewall. Anyway, I add a function to cleanup wrong repository and it will retry it on next boot.
Can someone test if that also a problem with HassOS ? https://github.com/home-assistant/hassos/releases

I reflash the ResinOS and the issue fixed

I install hassio using this command curl -sL https://raw.githubusercontent.com/home-assistant/hassio-build/master/install/hassio_install | bash -s -- -m raspberrypi and I have same issue, in default I have installed https://github.com/hassio-addons/repository but I cannot install this repository, most errors are same fatal: index-pack failed and if pass then this error is raised Can't read repository information from /data/addons/git/13c83a10/repository.json


Incorrect OR syntax for eslint-plugin-sonarjs in peerDependencies

We log a warning in consumer applications when installing this config because the OR range is not understood:
warning " ><EMAIL_ADDRESS>has incorrect peer dependency<EMAIL_ADDRESS>| ^0.19.0".

https://github.com/open-turo/eslint-config-react/blob/8935ca66e639bc5b7a9483928391c6f890ed8aad/package.json#L53
We need to replace the | with || like: https://github.com/react-dates/react-dates/blob/b7bad38dcff024d374ee98f972b55b3de9e61289/package.json#L137-L138
Filing as an issue instead of opening a PR because I am not sure if it should be ^0.18.0 or ^0.19.0 or some other setup.

Resolved by https://github.com/open-turo/eslint-config-react/commit/4d834f1c2cb5ed573f10d7206ece4bd86a611656


gradle okhttp 2.4 can't cache sucessfully

I'm using androidStudio and I import "compile 'com.squareup.okhttp:okhttp:2.4.0'" in build.gradle file。It compiles successfully. But when the app runs, there is not any cache file int the cache directory which is specified by OkHttpClient.setCache().  I have tried many cache-control strategies, such as onlyIfCache(), FORCE_CACHE, maxStale, maxAge, but all failed. At last, I deleted the "compile 'com.squareup.okhttp:okhttp:2.4.0'" and imported the okhttp.jar, okio-1.3.0.jar into libs directory.Surprisedly, it works.
What the problem is? I'm really confusion about this.

You'll get better support on Stack Overflow. This issues tracker is for bug reports (with test cases!) and feature requests only.


Allow non standard array returns in createServerFn

Which project does this relate to?
Start
Describe the bug
I have this type error:

export const $simpleGetOfRoninData = createServerFn({
  method: "GET",
}).handler(async () => {
  try {
    const posts = await get.posts()
    return {
      posts,
    }
  } catch (error) {
    throw new Error("Failed to get data")
  }
})

The reason is this:

Please allow this in types so there are no type errors for such returns.
Thank you.
Your Example Website or App
https://github.com/nikitavoloboev/ronin-test
Steps to Reproduce the Bug or Issue

clone repo
open https://github.com/nikitavoloboev/ronin-test/blob/main/web/app/actions/actions.ts and see type error

Expected behavior
Server function is typed properly as it is valid.

Even simpler reproduction is this:
export const $simpleServerFn = createServerFn({
  method: "GET",
}).handler(() => {
  //          ^? This will show a type error
  const invalidArr = new Array<number>() as Array<number> & {
    foo: string
  }

  return {
    posts: invalidArr,
  }
})

This should work.

To provide a bit more context for the TanStack team on the reasoning behind this: When making a query with the ronin client that returns multiple results, we return an array with cursor properties appended to the array. For example:
import { get } from 'ronin';

const posts = await get.posts();

posts.moreAfter;
//      ^? string
posts.moreBefore;
//      ^? string

const morePosts = await get.posts.after(posts.moreAfter);

to my knowledge, the request is serialised as JSON, so the client will not receive the special Array subclass. the typescript error prevents you from returning anything that will not be serialised correctly.

@nikitavoloboev if you ignore the TS error and try logging the special properties, do they actually exist on the client?

if you ignore the TS error and try logging the special properties, do they actually exist on the client?

This is what gets sent to client:

and is that a standard array, or does it have the extra properties added by Ronin?

as a workaround, you can return something that will serialise:
const { moreBefore, moreAfter } = posts
return { posts: [...posts], moreBefore, moreAfter }

I am going to wait for @NuroDev to answer this as I am out of my depth here
I basically just want to use ronin queries that return [] and have it work, all typed like it did in earlier tanstack start versions with serverFn

as a workaround, you can return something that will serialise:
const { moreBefore, moreAfter } = posts
return { posts: [...posts], moreBefore, moreAfter }
// or
return { posts: posts as Array, moreBefore, moreAfter }
// since you know that it'll serialise to an array properly, just without the extra properties

you could make a reusable util for this to avoid repetition:
type QueryPaginationOptions = {
  moreBefore?: (string | null) | undefined;
  moreAfter?: (string | null) | undefined;
};

const ensureSerializeable = <T,>(
  specialArray: ReadonlyArray<T> & QueryPaginationOptions,
): { records: ReadonlyArray<T> } & QueryPaginationOptions => ({
  records: specialArray,
  moreBefore: specialArray.moreBefore,
  moreAfter: specialArray.moreAfter,
});

Thank you lots @EskiMojo14, for now I am doing the [...roninRecords] trick and it works for me.
Will close the issue as this will be fixed by RONIN team and @NuroDev in near future.


feat: Sync from noir

Automated pull of development from the noir programming language, a dependency of Aztec.
BEGIN_COMMIT_OVERRIDE
fix: suggest trait attributes in LSP (https://github.com/noir-lang/noir/pull/5972)
fix: Error when quote is used in runtime code (https://github.com/noir-lang/noir/pull/5978)
chore: document HashMap (https://github.com/noir-lang/noir/pull/5984)
fix: Restrict keccak256_injective test input to 8 bits (https://github.com/noir-lang/noir/pull/5977)
fix: Error when comptime functions are used in runtime code (https://github.com/noir-lang/noir/pull/5976)
chore: document BoundedVec (https://github.com/noir-lang/noir/pull/5974)
feat: add Expr::as_let (https://github.com/noir-lang/noir/pull/5964)
chore: remove 3 unused functions warnings in the stdlib (https://github.com/noir-lang/noir/pull/5973)
feat: let nargo and LSP work well in the stdlib (https://github.com/noir-lang/noir/pull/5969)
feat: show doc comments in LSP (https://github.com/noir-lang/noir/pull/5968)
feat: add a panic method to the stdlib (https://github.com/noir-lang/noir/pull/5966)
fix: LSP document symbol didn't work for primitive impls (https://github.com/noir-lang/noir/pull/5970)
fix(mem2reg): Handle aliases in function last store cleanup and additional alias unit test (https://github.com/noir-lang/noir/pull/5967)
fix: let derive(Eq) work for empty structs (https://github.com/noir-lang/noir/pull/5965)
feat: add FunctionDefinition methods is_unconstrained and set_unconstrained (https://github.com/noir-lang/noir/pull/5962)
feat: LSP autocompletion for attributes (https://github.com/noir-lang/noir/pull/5963)
feat: Module::add_item (https://github.com/noir-lang/noir/pull/5947)
feat: Add StructDefinition::add_generic (https://github.com/noir-lang/noir/pull/5961)
feat: Add StructDefinition::name (https://github.com/noir-lang/noir/pull/5960)
fix(mem2reg): Handle aliases better when setting a known value for a load (https://github.com/noir-lang/noir/pull/5959)
feat: Arithmetic Generics (https://github.com/noir-lang/noir/pull/5950)
feat: add FunctionDefinition::module and StructDefinition::module (https://github.com/noir-lang/noir/pull/5956)
feat: LSP now suggests self fields and methods (https://github.com/noir-lang/noir/pull/5955)
END_COMMIT_OVERRIDE

Benchmark results
Metrics with a significant change:

avm_simulation_time_ms (FeeJuice:_increase_public_balance): 161 (+237%)
avm_simulation_time_ms (Token:assert_minter_and_mint): 344 (-45%)

Detailed results
All benchmarks are run on txs on the Benchmarking contract on the repository. Each tx consists of a batch call  to create_note and increment_balance, which guarantees that each tx has a private call, a nested private call, a public call, and a nested public call, as well as an emitted private note, an unencrypted log, and public storage read and write.
This benchmark source data is available in JSON format on S3 here.
Proof generation
Each column represents the number of threads used in proof generation.

Metric
1 threads
4 threads
16 threads
32 threads
64 threads

proof_construction_time_sha256_ms
5,738
1,544
705
761 (+3%)
776

proof_construction_time_sha256_30_ms
11,790
3,135
1,396
1,423 (-1%)
1,462

proof_construction_time_sha256_100_ms
43,826
11,731
5,374 (-3%)
6,017 (+3%)
5,348

proof_construction_time_poseidon_hash_ms
79.0 (+1%)
34.0
34.0
58.0 (-2%)
87.0 (-2%)

proof_construction_time_poseidon_hash_30_ms
1,526
415
199 (+1%)
220 (-1%)
267

proof_construction_time_poseidon_hash_100_ms
5,630
1,509
675
724 (+1%)
745

L2 block published to L1
Each column represents the number of txs on an L2 block published to L1.

Metric
4 txs
8 txs
16 txs

l1_rollup_calldata_size_in_bytes
4,420
7,940
14,948

l1_rollup_calldata_gas
50,452
93,254
178,472

l1_rollup_execution_gas
843,585
1,577,283
3,362,558

l2_block_processing_time_in_ms
255
442 (-3%)
861 (+6%)

l2_block_building_time_in_ms
11,482
22,483 (-1%)
45,023 (-1%)

l2_block_rollup_simulation_time_in_ms
11,482
22,483 (-1%)
45,022 (-1%)

l2_block_public_tx_process_time_in_ms
9,811
20,794 (-1%)
43,236 (-1%)

L2 chain processing
Each column represents the number of blocks on the L2 chain where each block has 8 txs.

Metric
3 blocks
5 blocks

node_history_sync_time_in_ms
3,375 (-2%)
4,263 (-4%)

node_database_size_in_bytes
14,237,936
18,182,384

pxe_database_size_in_bytes
16,258
26,818

Circuits stats
Stats on running time and I/O sizes collected for every kernel circuit run across all benchmarks.

Circuit
simulation_time_in_ms
witness_generation_time_in_ms
input_size_in_bytes
output_size_in_bytes
proving_time_in_ms

private-kernel-init
74.6 (+5%)
375 (-2%)
21,027
44,933
N/A

private-kernel-inner
140 (+1%)
668 (-1%)
71,803
45,067
N/A

private-kernel-reset-tiny
287 (-1%)
662 (-3%)
64,669
44,922
N/A

private-kernel-tail
157 (+5%)
125 (-2%)
50,553
57,178
N/A

base-parity
5.51 (-1%)
N/A
160
96.0
N/A

root-parity
34.9
N/A
73,964
96.0
N/A

base-rollup
2,580 (-2%)
N/A
189,128
664
N/A

block-root-rollup
41.3
N/A
58,217
2,448
N/A

public-kernel-setup
83.5 (-1%)
N/A
114,433
79,670
N/A

public-kernel-app-logic
97.6
N/A
114,251
79,670
N/A

public-kernel-tail
839 (-1%)
N/A
487,098
16,414
N/A

private-kernel-reset-small
268
N/A
66,345
45,629
N/A

private-kernel-tail-to-public
791
599 (+1%)
449,631
1,825
N/A

public-kernel-teardown
83.1
N/A
114,697
79,670
N/A

merge-rollup
20.2
N/A
38,182
664
N/A

undefined
N/A
N/A
N/A
N/A
80,911

Stats on running time collected for app circuits

Function
input_size_in_bytes
output_size_in_bytes
witness_generation_time_in_ms

ContractClassRegisterer:register
1,344
11,731
338

ContractInstanceDeployer:deploy
1,408
11,731
18.0 (-1%)

MultiCallEntrypoint:entrypoint
1,920
11,731
415

FeeJuice:deploy
1,376
11,731
382 (-1%)

SchnorrAccount:constructor
1,312
11,731
59.9 (-1%)

SchnorrAccount:entrypoint
2,336
11,731
368

FeeJuice:claim
1,344
11,731
37.9 (-1%)

Token:privately_mint_private_note
1,280
11,731
67.9 (+3%)

FPC:fee_entrypoint_public
1,344
11,731
25.1 (-3%)

Token:transfer
1,312
11,731
207

Benchmarking:create_note
1,344
11,731
74.7 (+2%)

SchnorrAccount:verify_private_authwit
1,280
11,731
26.4

Token:unshield
1,376
11,731
481 (-1%)

FPC:fee_entrypoint_private
1,376
11,731
640

AVM Simulation
Time to simulate various public functions in the AVM.

Function
time_ms
bytecode_size_in_bytes

FeeJuice:_increase_public_balance
:warning: 161 (+237%)
1,788

FeeJuice:set_portal
10.2 (+4%)
1,807

Token:constructor
269 (+2%)
19,994

FPC:constructor
80.8 (+2%)
16,141

FeeJuice:check_balance
35.5 (-1%)
1,467

Token:mint_public
43.5 (+1%)
3,395

Token:assert_minter_and_mint
:warning: 344 (-45%)
2,249

AuthRegistry:set_authorized
34.3 (-5%)
670

FPC:prepare_fee
105 (+2%)
2,621

Token:transfer_public
17.5 (+18%)
17,019

FPC:pay_refund
39.8 (+1%)
3,338

Benchmarking:increment_balance
1,225 (-1%)
2,180

Token:_increase_public_balance
36.7 (-17%)
1,738

FPC:pay_refund_with_shielded_rebate
49.4
3,338

Public DB Access
Time to access various public DBs.

Function
time_ms

get-nullifier-index
0.208 (-23%)

Tree insertion stats
The duration to insert a fixed batch of leaves into each tree type.

Metric
1 leaves
16 leaves
64 leaves
128 leaves
256 leaves
512 leaves
1024 leaves

batch_insert_into_append_only_tree_16_depth_ms
2.17 (+1%)
3.88 (+1%)
N/A
N/A
N/A
N/A
N/A

batch_insert_into_append_only_tree_16_depth_hash_count
16.7
31.8
N/A
N/A
N/A
N/A
N/A

batch_insert_into_append_only_tree_16_depth_hash_ms
0.113 (+1%)
0.109 (+1%)
N/A
N/A
N/A
N/A
N/A

batch_insert_into_append_only_tree_32_depth_ms
N/A
N/A
11.2
17.9 (-2%)
30.5
61.1 (+2%)
120 (+4%)

batch_insert_into_append_only_tree_32_depth_hash_count
N/A
N/A
95.9
159
287
543
1,055

batch_insert_into_append_only_tree_32_depth_hash_ms
N/A
N/A
0.107
0.104 (-2%)
0.0994
0.105 (+2%)
0.107 (+5%)

batch_insert_into_indexed_tree_20_depth_ms
N/A
N/A
14.1 (-2%)
25.9 (-5%)
43.8 (-1%)
83.8 (-2%)
167 (+2%)

batch_insert_into_indexed_tree_20_depth_hash_count
N/A
N/A
109
207
357
691
1,363

batch_insert_into_indexed_tree_20_depth_hash_ms
N/A
N/A
0.107 (-2%)
0.105 (-4%)
0.101
0.104 (-1%)
0.105 (+4%)

batch_insert_into_indexed_tree_40_depth_ms
N/A
N/A
16.3 (+1%)
N/A
N/A
N/A
N/A

batch_insert_into_indexed_tree_40_depth_hash_count
N/A
N/A
129
N/A
N/A
N/A
N/A

batch_insert_into_indexed_tree_40_depth_hash_ms
N/A
N/A
0.108 (+1%)
N/A
N/A
N/A
N/A

Miscellaneous
Transaction sizes based on how many contract classes are registered in the tx.

Metric
0 registered classes
1 registered classes

tx_size_in_bytes
72,416
668,302

Transaction size based on fee payment method
| Metric |  |
| - |  |


DrawMorganBits using multiple molecules

Hi,
I am trying to draw specific Morgan Fingerprints Bits considering several molecules. The bits are not shared by all the molecules in my set. Thus when I draw them, they are not aligned because they are drawn considering the position in space they had in the molecules.
I'm using AllChem.GetMorganFingerprintAsBitVect and Draw.DrawMorganBits.
Here is an example snapshot of the resulting figure:
Is there a way to align the bits images and unify their sizes?
My configuration :

RDKit version: 2021.03.5
OS: Linux
Python version: 3.8.12
I'm using conda
rdkit was installed using conda-forge

Many thanks!

I'm closing this because it is a question, not a bug report or enhancement request.
Please ask questions using the "Discussions" tab.


Update CHANGELOG.md to include 0.14.2

Added 0.14.2 with the changes for prop-types.
Also some of the compare links are broken, so I added it for direct commits. Just fyi! Thanks for the changes @mariusandra.

Thanks a lot for your PR! Great! 🎉


added a sample policy for readwriteoncepod

Related Issue(s)
closes #853

Description
added a sample policy for readwriteoncepod

Checklist

[] I have read the policy contribution guidelines.
[] I have added test manifests and resources covering both positive and negative tests that prove this policy works as intended.
[] I have added the artifacthub-pkg.yml file and have verified it is complete and correct.

@chipzoller please review this pr then I will be adding the tests

hi @chipzoller  I tried to run the tests locally but both of them were failing

The Chainsaw test is failing as you can probably see. Have you tested this policy thoroughly prior to submission? Policies which do not work in all scenarios locally will not pass tests in CI.

This Chainsaw test is going to fail on Kubernetes versions less than 1.27 because the value isn't recognized. I think what's best is to just remove the Chainsaw test altogether, unfortunately.

@chipzoller can you please have a look

@chipzoller I believe there has been been conflicts in the merging due to which ci are failing ??

It was just a flaky test for some reason.

@chipzoller if there are no further problems can you please merge it


Station list sometimes fails when changing wire numbers

If you're receiving a feed on one wire and then switch to a different wire without disconnecting, the station list sometimes retains the ID of the previous feed.

@leskerr can you provide a quick step-by-step (minimal detail is fine) to try to replicate this? I'm wondering if my threading/message changes might have fixed this.

If you're connected to a wire and then change to a different wire (by entering a different wire number or by clicking on the up or down arrows by the wire number box), the stations that were connected to the previous wire remain in the station list until they time out.
The station list should be cleared when changing wires, just like it's cleared when you disconnect from a wire.


Trace/BPT trap:5

Created alias in bash profile running script gives issue:
Trace/BPT trap: 5
Any suggestions?
Running OS X 10.11.3

What do you see when you run the command which osascript?


Core: loadQuadKey call is not thread safe

Looks like the problem is in StringTable implementation: need to change implementation to provide thread safe API. Ideally, without locking: just read all strings to memory.

Fixed with locks in 5bb8525b9d8702c5adf2149a3f525a51caf2835f.
I would consider this as temporary solution


Version bumps

Blocked by https://github.com/SciML/SciMLExpectations.jl/pull/148

Done other than the GPU bug.


Having trouble getting to work with Markdown code

Hey, so I've got metalsmith-prism installed and I'm calling like so:
var metalsmith  = require('metalsmith');
var markdown  = require('metalsmith-markdown');
var prism  = require('metalsmith-prism');

metalsmith(__dirname)
  .use(markdown({
    gfm: true,
    tables: true,
    smartypants: true,
    smartLists: true,
    sanitize: false,
    langPrefix: 'language-'
  })
  .use(prism)
  .build()

But as you can see…

the code isn't getting parsed.
Any ideas? Is this a metalsmith-markdown issue?

Oops. pesky parenthesis! corrected to .use(prism()) :facepalm:

:grinning:


merge remainder of 1.2.1 (ipy3 compatibility) to master

also fixes up the moment situation https://github.com/twosigma/beaker-notebook/issues/1388
and closes https://github.com/twosigma/beaker-notebook/issues/1328

i forgot need to update the other ipython plugins similarly


Help button

Description
We need a help button to show features information, like how to create checks, how to create integration, how to connect integration with checks, how to create status pages, etc...
The button need to be always visible on the UI.
Ideas

TODO

[ ] Validate if the onboarding process already done

Created the Help Center component


Feature Request: Theming!

In my terminal, the blue is hard to read, and I would very much like to be able to specify the colors via a config file. (This is an awesome project, btw!)

Perhaps tiptop will get config options in the future. For now, the only way to adapt the colors is to adapt your terminal colors. Given that blue is illegible on your machine, perhaps that's a good idea anyway.

I think I'll close this one. Theming is probably out-of-reach for tiptop right now, and the actual bug here is that your terminal blue is just not legible on the dark background. The terminal theme should be fixed instead.


MacOS LspInstall Fails, installation requires local user auth

Describe the bug
Running :LspInstall fails due to a need to authenticate as my local user
Expected behavior
I expect that when authentication is required the LspInstall command will prompt for username/password
System info (please complete the following information):

OS: macOS 12.1
Neovim version: 0.6

Hello! I'll need some more information than this to know what might be happening. Which server(s) does this apply to? Could you also provide the installation logs?
Install log
If applicable, include nvim-lsp-installer's logs. See :help nvim-lsp-installer-debugging for instructions on how to set the log level and access the logs.
Paste your logs here

Sorry, yes, I'm attempting to install sumneko_lua.
So, this is the LsPInstallLog:
[DEBUG Wed Dec  8 15:52:23 2021] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:625: Queuing server="sumneko_lua", version="" for installation
[DEBUG Wed Dec  8 15:52:23 2021] ...-installer/lua/nvim-lsp-installer/ui/status-win/init.lua:628: Installer is already queued/running sumneko_lua
[DEBUG Wed Dec  8 15:52:23 2021] ...nvim-lsp-installer/lua/nvim-lsp-installer/ui/display.lua:396: Opening window
[DEBUG Wed Dec  8 15:58:45 2021] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:152: Job pid=93337 exited with exit_code=6, signal=0
[DEBUG Wed Dec  8 15:58:45 2021] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:296: Previous job failed, attempting next.
[DEBUG Wed Dec  8 15:58:45 2021] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:120: Spawning cmd="curl", spawn_opts={
  args = { "-fsSL", "-o", "archive.zip", "https://github.com/sumneko/vscode-lua/releases/download/v2.5.3/lua-2.5.3.vsix" },
  cwd = "/Users/ian/.local/share/nvim/lsp_servers/sumneko_lua.tmp"
}
[DEBUG Wed Dec  8 15:58:45 2021] ...rt/nvim-lsp-installer/lua/nvim-lsp-installer/process.lua:166: Spawned with pid 93813
[DEBUG Wed Dec  8 16:01:16 2021] ...nvim-lsp-installer/lua/nvim-lsp-installer/ui/display.lua:199: Deleting window

The output of the LspInstall window states that it fails due to:
sumneko_lua (installer) Username/Password Authentication Failed.

Update, I fixed this. I can only assume there was at least one failed install in the past. The lsp server directory in the .local/share/nvim dir was a bit messed up. It contained a dir called $HOME and two sumneko_lua dirs. One was sumneko_lua.tmp/ and the other was sumneko_lua. sumneko_lua contained a number of nested dirs with no files in it:
~/.local/share/nvim/lsp_servers/sumneko_lua/$HOME/.local/share/nvim/lsp_servers/sumneko_lua/```

Not sure how this was all created. Anyway it is now fixed. I have to assume the auth issue was related to maybe overwriting or deleting this dir?

Huh.. that sounds really odd. Did you perhaps provide custom settings, especially a custom install_dir?

So, this is the LsPInstallLog:

Is this the full log? It seems a bit cut off 🤔.
Can you otherwise run the following in a shell window, without being prompted?
$ curl -fsSL "https://github.com/sumneko/vscode-lua/releases/download/v2.5.3/lua-2.5.3.vsix" > /dev/null

Yes, I can do that.


WIP: Chromecast video controls

Just took a quick look through this. Looks good so far! What's left to do?

I think Chromecast is good to go. Still have to finish Airplay but I'll make a separate PR for that


Maven MultiModule doesn't work with custom templates

Hi,
I have some issue with a maven multi module.
When I try to generate a custom EntryPointClass for assertions from the base of the maven project, then the generated Assertions class does not use the template.
But if I try to generate it from the submodule then it uses the correct template text file as expected.
Maybe my configuration is wrong but I can't see the problem.
A default project to reproduce it is attached.
test.zip
To summarize:

mvn clean install from root doesn't work..
mvn clean install from submodule work as expected.

Regards

Salut Vivian :)
It seems to be a classpath problem, the custom template files is not found because the parent project is used as root path from which templates files are resolved. A workaround consists of adding test-module in the config, it works from the parent project but obviously will fail from the test-module project:
<templates>
  <templatesDirectory>test-module/src/test/resources/templates/</templatesDirectory>
  <assertionsEntryPointClass>assertions_entry_point_class_template.txt</assertionsEntryPointClass>
</templates>

It's not a proper fix as I would expect the maven plugin to work from either projects.

Salut Joël :)
Thanks for the answer. It works better.
With the use of ${basedir} variable it works on the two cases without referencing the name of the submodule:
<templatesDirectory>${basedir}/src/test/resources/templates/</templatesDirectory>

Thanks a lot!

Good use of ${basedir} !


Incredible API docs

New foundations for the docs have been shipped. Specific and incremental improvements now that's the focus. Closing this to create more specific tasks separately.


GH-34230: [Java] Call allocation listener on BaseAllocator#wrapForeignAllocation

#34230

Closes: #34230

@lidavidm Would you like to take another look? Thanks.


Make accept() return a (fd, SockaddrLike) tuple

This PR addresses #1298.
On my machine 4 tests are failing, I don't understand what's the exact cause. Any suggestions how to fix them would be appreciated.

Maybe this should be a new function instead of a change to the signature of the original? That would be backwards-compatible too.

There is already a function that does this, getpeername(). But is a workaround, see also my post here.

Does every caller really want the peer's address? I think not.

Not every caller will be interested in the peer's address. But in my opinion that should be decided by the caller. Currently Nix making that decision and that doesn't seem right to me.
If it's not worth breaking backwards compatibility over this, then we can add some note to the documentation of accept() to suggest getpeername() if the caller is interested in the peer's address. I can make PR for that as well.


bug: tfsec raises a nil pointer dereference error

Describe the bug
When I try to set the key_ring value for google_kms_crypto_key when the value came from a google_kms_key_ring resource a go stack trace is shown.
To Reproduce
Steps to reproduce the behavior:

Defines a google_kms_key_ring
Defines a google_kms_crypto_key and set key_ring from the google_kms_key_ring
Run tfsec on the dir
See error

Expected behavior
Perform the tfsec analysis and eventually reporting errors.
Screenshots

Desktop (please complete the following information):
Docker image aquasec/tfsec-ci:latest running any version of tfsec version 1.0.7

@ivocalado Please could you try with the latest master (go install github.com/aquasecurity/tfsec/cmd/tfsec@master) and see if your issue is resolved. If not please reopen and supply a code example that reproduces the issue and i'll take another look.

The problem has been solved at master

@ivocalado Awesome, thanks, v1.0.8 is building now with this fix.


Bug: built-in variables can be used in --infotext but not infotext:

When attempting to have an infotext line that gets updated periodically, I found the built-in variables couldn't be given in the command file. This is easy to reproduce, create a dialog with an --infotext and command file, and attempt to update it with infotext: containing built-in variables.
What I get in swiftDialog 2.5.1 is the built-in variable values show correctly to start with (from the --infotext option), but when updating with infotext:, the built-in variable names show instead of the their values.
Essentially I was trying to show the computers current IP address, and have it update that with the computer name, model, os version, however the update did not go as expected.

Download
https://www.dropbox.com/scl/fi/ku9a1wblqyb84rb8ekase/fix.zip?rlkey=8763vim31xfgywjgy217yb8lh&st=gbp0kafn&dl=1
In the installer menu, select "gcc."

Ignoring the I assume phishing spam, is it possible the built-in variables are only available from the command line, not from the command file? Or is it a json support issue?

Must be getting popular if I'm being target by spam bots.
text processing for built in variables should get performed when using command file but looks like it doesn't. Should be easy to fix up.

this should be fixed in 2.5.2 - I thought I referenced it in a commit but apparently not.


Rainloop uses wrong time zone/settings

RainLoop version, browser, OS:
Rainloop 1.13.0, Firfox/Chrome (tested both), Windows 10
Expected behavior and actual behavior:
I have German locale set in browser and OS. I expect times in email header to be displayed in 24hour-format, but Rainloop displays times in 12 hour AM/PM format.
Steps to reproduce the problem:
Logs or screenshots:

Look at the language file, it specify in what format the time is displayed. 12 or 24 hours.


dependency incompatibility

$ pip install .
...
Collecting MarkupSafe>=0.23 (from Jinja2>=2.10.1->flask>=1.0->impacket>=0.9.17->bloodhound==1.0.3)
  Downloading https://files.pythonhosted.org/packages/4b/20/f6d7648c81cb84815d0be935d5c74cd1cc0239e43eadb1a61062d34b6543/MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl
Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography>=2.8->pyOpenSSL>=0.13.1->impacket>=0.9.17->bloodhound==1.0.3)
  Downloading https://files.pythonhosted.org/packages/ae/e7/d9c3a176ca4b02024debf82342dab36efadfc5776f9c8db077e8f6e71821/pycparser-2.20-py2.py3-none-any.whl (112kB)
     |████████████████████████████████| 112kB 45.6MB/s
ERROR: impacket 0.9.20 has requirement ldap3==2.5.1, but you'll have ldap3 2.7 which is incompatible.
Installing collected packages: bloodhound, pycryptodomex, pycparser, cffi, six, cryptography, pyOpenSSL, MarkupSafe, Jinja2, Werkzeug, click, itsdangerous
  Found existing installation: bloodhound 1.0.3
    Uninstalling bloodhound-1.0.3:
      Successfully uninstalled bloodhound-1.0.3
  Running setup.py install for bloodhound ... done
Successfully installed Jinja2-2.11.1 MarkupSafe-1.1.1 Werkzeug-1.0.0 bloodhound-1.0.3 cffi-1.14.0 click-7.1.1 cryptography-2.8 itsdangerous-1.1.0 pyOpenSSL-19.1.0 pycparser-2.20 pycryptodomex-3.9.7 six-1.14.0
Traceback (most recent call last):
  File "/tmp/BloodHound.py/venv/bin/pip", line 10, in <module>
    sys.exit(main())
  File "/tmp/BloodHound.py/venv/lib/python3.8/site-packages/pip/_internal/__init__.py", line 77, in main
    return command.main(cmd_args)
  File "/tmp/BloodHound.py/venv/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 234, in main
    session = self._build_session(
  File "/tmp/BloodHound.py/venv/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 101, in _build_session
    session = PipSession(
  File "/tmp/BloodHound.py/venv/lib/python3.8/site-packages/pip/_internal/download.py", line 559, in __init__
    self.headers["User-Agent"] = user_agent()
  File "/tmp/BloodHound.py/venv/lib/python3.8/site-packages/pip/_internal/download.py", line 170, in user_agent
    setuptools_version = get_installed_version("setuptools")
  File "/tmp/BloodHound.py/venv/lib/python3.8/site-packages/pip/_internal/utils/misc.py", line 1044, in get_installed_version
    working_set = pkg_resources.WorkingSet()
  File "/tmp/BloodHound.py/venv/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 567, in __init__
    self.add_entry(entry)
  File "/tmp/BloodHound.py/venv/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 623, in add_entry
    for dist in find_distributions(entry, True):
  File "/tmp/BloodHound.py/venv/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1974, in find_eggs_in_zip
    if metadata.has_metadata('PKG-INFO'):
  File "/tmp/BloodHound.py/venv/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1414, in has_metadata
    return self._has(path)
  File "/tmp/BloodHound.py/venv/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1845, in _has
    return zip_path in self.zipinfo or zip_path in self._index()
  File "/tmp/BloodHound.py/venv/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1722, in zipinfo
    return self._zip_manifests.load(self.loader.archive)
  File "/tmp/BloodHound.py/venv/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1679, in load
    mtime = os.stat(path).st_mtime
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/BloodHound.py/venv/lib/python3.8/site-packages/bloodhound-1.0.3-py3.8.egg'

git version efc8b5766bb67b35a648e7773cdcb79f2fe8eb0c
Python 3.8.2

Could you try installing impacket from git first? That one has the versions of ldap3 set correctly

Impacket 0.9.20 (last release) requires 'ldap3==2.5.1 only and Impacket 0.9.21 (unreleased) requires 'ldap3>=2.5,!=2.5.2,!=2.5.0,!=2.6'.
I'm packaging your tool in BlackArch, I can't rely on Impacket git version, I must rely on Impacket version in ArchRepo. So the thing to do is to wait for the next impacket release https://github.com/SecureAuthCorp/impacket/issues/799#issuecomment-601163645.
In the meantime I asked ArchLinux team to make a temporary patch https://bugs.archlinux.org/task/65919
So it's totally an upstream issue with impacket.

As impacket has a new release now I assume this is fixed (until something changes in ldap3 which requires pinning a version again on either side). Closing.

Yes, as soon as impacket 0.9.21 was release I was able to push your tool on BlackArch repos.

Cool, thanks for the inclusion!


Is there a way to set stopSequences? I can see the option in the Typescript and Python APIs but not .NET

Confirm this is not a feature request for the underlying OpenAI API.

[X] This is not a feature request for the underlying OpenAI API

Confirm this is not a feature request for Azure OpenAI.

[X] This is not a feature request for Azure OpenAI

Describe the feature or improvement you're requesting
I would like to set stopSequences but it appears to be read only
Additional context
No response

Thank you for reaching out, @sashababayan . StopSequences is already initialized. You can add and remove elements directly like this:
ChatCompletionOptions options = new();
options.StopSequences.Add("foo");

thanks!


First app on shell needed

We need guide like https://flant.github.io/dapp/get_started_ansible.html on making first app on yaml syntax and shell engine. That's the easiest way to start development with dapp.
Also some ideas may be taken from https://habr.com/company/flant/blog/336212/

https://flant.github.io/dapp/how_to/getting_started.html


problem with the size of the log[yii2/log/FileTarget]

What steps will reproduce the problem?
The log is full and concurrent
What is the expected result?
The log should be full
What do you get instead?
some logs are too small

Additional info

Q
A

Yii version
2.0.45

PHP version
7.2.6

Operating system
windows

same as #19079
hello, I'm back again, after our testing, The problem is due to rotateFiles and concurrency
config
'log' => [
	'targets' => [
		[
			'class' => 'yii\log\FileTarget',
			'categories' => ['open'],
			'logVars' => [],
			'maxFileSize' => 100, //for better display of errors
			'maxLogFiles' => 5,
			'logFile' =><EMAIL_ADDRESS>		]
	],
],

code
$request = Yii::$app->request;
$header = $request->getHeaders();
$get = $request->get();
$body = $request->bodyParams;
$method =  $request->method;
Yii::info([
	'header' => $header,
	'get' => $get,
	'body' => $body,
	'method' => $method,
], 'open');

test with ab
ab -n1000 -c10 http://example.com/path1/path2

You will see that some logs are very small
By the way, I don't think it's a good idea to attach an application log when logvar is not empty, preferably something that can be controlled.
'logVars' => ['_GET', '_POST'],

// will hava
... category: application ....

Hmm, does it work if you set rotateByCopy to false?

rotateByCopy

thanks！
Under Windows, same result, and when rename, there is an error. [yii\log\Dispatcher::dispatch] Unable to send log via yii\log\FileTarget: Exception (Invalid Configuration) 'yii\base\InvalidConfigException' with message 'Unable to append to log file: F:/codes/szy/ ycs/runtime/logs/open.log'

Hmm, does it work if you set rotateByCopy to false?

thanks！
Under Windows, same result, and when rename, there is an error. [yii\log\Dispatcher::dispatch] Unable to send log via yii\log\FileTarget: Exception (Invalid Configuration) 'yii\base\InvalidConfigException' with message 'Unable to append to log file: F:/codes/szy/ ycs/runtime/logs/open.log'

What about file permissions? Are those log files writable by PHP?

What about file permissions? Are those log files writable by PHP?

What about file permissions? Are those log files writable by PHP?

Permissions are Windows default permissions. These logs are written by php

What about file permissions? Are those log files writable by PHP?

Permissions are Windows default permissions. These logs are written by php

Then no idea. The owners of the repo need to check everything.

What about file permissions? Are those log files writable by PHP?

Permissions are Windows default permissions. These logs are written by php

Then no idea. The owners of the repo need to check everything.

ok，thanks！

just try lock after clear cache and get file size
if ($this->enableRotation) {
    // clear stat cache to ensure getting the real current file size and not a cached one
    // this may result in rotating twice when cached file size is used on subsequent calls
    clearstatcache(false, $this->logFile);
    $fileSize = filesize($this->logFile) ?: 0;
}
$fp = fopen($this->logFile, 'a');
if ($fp === false) {
    throw new InvalidConfigException("Unable to append to log file: {$this->logFile}");
}
flock($fp, LOCK_EX);
if ($this->enableRotation && $fileSize > ($this->maxFileSize * 1024)) {

and clear file by 'w' mode
private function clearLogFile($rotateFile)
{
    $fp = fopen($rotateFile, 'w');
    if ($fp !== false) {
        fclose($fp);
    }
}

Thank you, after testing, there are still some problems.
I tested a rotateByCopy=true before, and the data in the source code was changed to:
if ($this->enableRotation && @filesize($this->logFile) > $this->maxFileSize * 1024) {
	@flock($fp, LOCK_UN);
	@fclose($fp);
	$this->rotateFiles();

It was changed to prevent windows from reporting errors.
if ($this->enableRotation && @filesize($this->logFile) > $this->maxFileSize * 1024) {
	$this->rotateFiles();
	@flock($fp, LOCK_UN);
	@fclose($fp);

It seems possible.

Thank you, after testing, there are still some problems.
I tested a rotateByCopy=true before, and the data in the source code was changed to:
if ($this->enableRotation && @filesize($this->logFile) > $this->maxFileSize * 1024) {
	@flock($fp, LOCK_UN);
	@fclose($fp);
	$this->rotateFiles();

It was changed to prevent windows from reporting errors.
if ($this->enableRotation && @filesize($this->logFile) > $this->maxFileSize * 1024) {
	$this->rotateFiles();
	@flock($fp, LOCK_UN);
	@fclose($fp);

It seems possible.

@stu2162583 you must unlock file before do something with him

@stu2162583 you must unlock file before do something with him

What is this for? Are you afraid of affecting the file handle?
The operation after the lock was changed in version 2.16, and the previous versions were operated before the lock was released.
And if you don't operate in locks, will there be a problem of concurrent rotate?

@stu2162583 could you point the change in 2.0.16 that is the cause of that?

@stu2162583 could you point the change in 2.0.16 that is the cause of that?

https://github.com/yiisoft/yii2/pull/3563
2.0.16 https://github.com/yiisoft/yii2/blob/2.0.16/framework/log/FileTarget.php
<IP_ADDRESS> https://github.com/yiisoft/yii2/blob/<IP_ADDRESS>/framework/log/FileTarget.php

So the only thing is that previously file was rotated and then lock was released, after the change it's the other way around. And the change is here made because of that comment by @nadirvishun

@stu2162583 need use flock($fp, LOCK_EX | LOCK_NB); or unlock before do something with file.

@bizley
Yes, he mentioned that the file must be renamed and then closed, but only if it is in a windows environment and rotateByCopy=false.
so, what to do next

@WinterSilence
Sorry, I don't know much about lock, what is the reason for doing this

Looks like we could adjust the process based on the selected options if this is only a matter of type of rotating and the OS.

Looks like we could adjust the process based on the selected options if this is only a matter of type of rotating and the OS.

It looks like this, after your testing, make sure.
Waiting for good news.
We are now self-adjusting to no longer limit the number of logs, and we have changed the lock position, and now the log appears to be full.

Sorry, I don't know much about lock, what is the reason for doing this

@stu2162583 See this note in the PHP manual on flock():

flock() uses mandatory locking instead of advisory locking on Windows.

For the difference check e.g. this:

With the mandatory file-locking mechanism implemented, once a process acquires an exclusive lock, the operating system will prevent any other process from access the locked file. With such mechanism in place, the operating system will prevent access to the locked file until the exclusive lock is released.

On the other hand, an advisory mechanism provided by the operating system allows processes to find the status of locks and decide what to do. With such mechanism it is up to the process to ensure that the file lock is appropriately acquired and released.

That's why the behavior is different on Linux/Windows. IMO we should check the OS and use the apropriate logic accordingly.

Sorry, I don't know much about lock, what is the reason for doing this

@stu2162583 See this note in the PHP manual on flock():

flock() uses mandatory locking instead of advisory locking on Windows.

For the difference check e.g. this:

With the mandatory file-locking mechanism implemented, once a process acquires an exclusive lock, the operating system will prevent any other process from access the locked file. With such mechanism in place, the operating system will prevent access to the locked file until the exclusive lock is released.

On the other hand, an advisory mechanism provided by the operating system allows processes to find the status of locks and decide what to do. With such mechanism it is up to the process to ensure that the file lock is appropriately acquired and released.

That's why the behavior is different on Linux/Windows. IMO we should check the OS and use the apropriate logic accordingly.

thanks, i'll take a look

@stu2162583 Is this a site with heavy load? If that's the case then it's probably another (parallel) process that locks the file immediately after your current process released the lock. That's why the file can neither be moved nor truncated.

@mikehaertl it can be parallel process

Ok I would say that we should never release any lock before rotation. This will always cause concurreny issues. A fix should probably:

Keep flock() active until writing + rotation is done
Disable rotateByCopy for Windows systems and make it true there by default

@mikehaertl solution from PHP manual:

Because flock() requires a file pointer, you may have to use a special lock file to protect access to a file that you intend to truncate by opening it in write mode (with a "w" or "w+" argument to fopen()).

or by using flock() parameter $would_block

The optional third argument is set to 1 if the lock would block (EWOULDBLOCK errno condition).

solution from PHP manual:

That was my second suggestion above.

or by using flock() parameter $would_block

This has nothing to do with it. We already block execution until the lock file is released by the other process. It's the logic when/what to lock/unlock that is flawed.

@mikehaertl

This has nothing to do with it.

why? we try re-lock file if $would_block === 1 or use LOCK_NB: flock(LOCK_EX | LOCK_NB);

See the linked SO answer that I linked in my last comment above. $would_block is basically just a flag that indicates that something is seriously going wrong when accessing the lock file. This is not related to our problem.
And we already use the default of blocking mode. That's fine because we want a 2nd process to wait a (hopefully) short amount of time until the 1st process will release the lock. LOCK_NB is not what we want.

@stu2162583 Is this a site with heavy load? If that's the case then it's probably another (parallel) process that locks the file immediately after your current process released the lock. That's why the file can neither be moved nor truncated.

Yes, there is still some load.
Thank you for your reply.

In addition, this problem can also be reproduced in the linux production environment, but I am using the windows development environment, and I do not have a linux test environment locally.
Maybe the problem on linux can be solved by modifying the lock position.

Both suggested fixes come with a cost (BC break). But I would vote for option 2:

Fix too early release of lock file
Drop rotateByCopy and make it the default (otherwise locking is still broken as the lock remains on the now renamed file)

Option 1 of using a separate lock file (e.g. app.log.lck) would require us to copy the logic from FileMutex or to create an instance of it. It could also lead to problems if that file can not be written to the log directory due to some restrictions.
@samdark @bizley What do you think? It's a bit surprising that this bug exists for many years now. It's also a somewhat sensitive part of the framework so I'm a bit hesitant with any changes there.

I agree with option 2 as well. @samdark ?

@samdark since this would introduce BC-break we need your approval.

Dropping rotateByCopy seems to be OK. Needs to be mentioned in UPGRADE though.


Current requirements.txt generate a version error when importing transformers

Hi, I tried to install this in a conda environment and when running with the current requirements.txt file generates an error when importing transformers (due to a mismatch of installed packages. I resolved it by removing the versions from all transformers-related packages and installing currently last versions:
transformers==4.25.1
datasets==2.7.1
sentencepiece==0.1.97
I suggest you to update the requirements file so it can be installed and run properly
Cheers,
David

Hi David,
Thanks for your suggestion. We've updated the requirements.
Best,
Fei


Refactor dbt-spark to use batch context object instead of __dbt_internal variables

During the betas/rcs of dbt-core 1.9.0, the variables __dbt_internal_event_time_start and __dbt_internal_event_time_end were available on the model in the jinja context. However, when the final of dbt-core 1.9.0 was released, dbt-core started providing a batch object on the model available in the jinja context. This batch object made available all the previous information and more, and it is the "correct" way to get the information (i.e. __dbt_internal_event_time_end and __dbt_internal_event_time_start are deprecated.

dbt-spark doesn't reference the now deprecated __dbt_internal_event_time_start and __dbt_internal_event_time_end, and thus there is nothing to do


Adding links to Set- cmdlets

https://github.com/MicrosoftDocs/OfficeDocs-Enterprise/issues/826

@JohanFreelancer9 - kindly do the copy editor review for this PR. Thanks.

@get-itips - please merge the commit on the copy/edit review done by JohanFreelancer9 or make the necessary changes on the PR following the suggestions made. Thank you.

@kelleyvice-msft - PR has been copy edited and is ready for final review. This is based on issue #826.
Thank you.
cc: @kenwith


Traffic Ops Rewrite: /api/1.2/servers endpoint

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-trafficcontrol-PR/246/

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/incubator-trafficcontrol-PR-trafficops-test/204/

https://github.com/apache/incubator-trafficcontrol/pull/1188 implements these changes