Cannot invoke initializer for type 'Range<_>' with an argument list of type '(Range<String.Index>)'

you can change this line!!!
subscript (r: Range) -> String {
let start = index(startIndex, offsetBy: r.lowerBound)
let end = index(startIndex, offsetBy: r.upperBound)
// return String(self[NSRange(start ..< end)])
let range: Range = start..<end
    return String(self[range])
}

Regards!!!

@dverdugo85 Thanks!
Dev should update his code and example code

you can change this line
return String(self[NSRange(start ..< end)])
for this:
    let range: Range<Index> = start..<end
    return String(self[range])

Regards!!!

After updating this,
i've got this error


[Finnish Dictionary] add search history

Description
The user of the extension now will be greeted with previous searches instead of an empty view
Screencast

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Good point!


refactor(link): inline link functionality

This PR Closes #2514

BREAKING CHANGE: We had to move the link role inside the shadow-dom due to screen reader limitations. Therefore, for the following components, replace the [aria-label] attribute with [accessibility-label]:

sbb-breadcrumb
sbb-button-link, sbb-secondary-button-link, sbb-tertiary-button-link, sbb-transparent-button-link
sbb-card-link
sbb-header-link
sbb-link, sbb-block-link
sbb-menu-link
sbb-navigation-link
sbb-teaser, sbb-teaser-hero, sbb-teaser-paid

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

:exclamation: No coverage uploaded for pull request base (main@0781c6a). Click here to learn what that means.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2571   +/-   ##
=======================================
  Coverage        ?   93.16%
=======================================
  Files           ?      315
  Lines           ?    25375
  Branches        ?     2060
=======================================
  Hits            ?    23641
  Misses          ?     1701
  Partials        ?       33

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Add a way to block the promotion of a particular release in the promotion train

The promotion train always promotes all release charms, but sometimes this isn't what we want.  For example, if a bug is caught in candidate, running the promotion train will push that bug to stable.  This has happened several times in the past few months, propagating known bugs into the stable branch of our charms
We need a way to indicate when a release should never be promoted further.  Conceptually, I should be able to do something (add a tag, or some other metadata in our gh repo?) that prevents out CI from promoting that revision further.  That way we can see a bug, freeze the release(s) it affects, and still safely use the promotion train for everything else.

This would be great to have; any idea for what we could use? Using repository tags seems like we're abusing their semantics, and I'm not aware of other metadata we can use for this :(

This might be a good in person brainstorming question.  Some (probably bad) thoughts:

add a blocked-revisions.yaml to each repo.  If that file exists and has any revisions, those revisions will never be promoted during the regular execution (but maybe we have a --flag to override, just in case)

possible issues:

when we have branches for tracks, which is the authoritative blocked-revisions.yaml?  Maybe that file only lives in the default branch?  We could even have CI to prevent that file from being put into release tracks just to avoid confusing

add a blocked-revisions.yaml to some central authoritative repo (our workflows repo?), and our CI looks at that (really, we could implement (1) and then have automation that copies the global file locally, so implementing (2) and (1) are almost the same)
maybe we manipulate the repository tags like you mention, or add additional dead-revision tags whenever we want to kill a revsion?  I wonder if using tags within the repo might be really elegant for this


122 refactor db

NOTE: Don't merge yet (see CAVEATS below)
Big changes that need to be made now or never. The main change is to use table inheritance so that cases, methods, and organizations (and eventually news and/or articles) can all be referenced and searched as things (the base table). This also allows us to get rid of table proliferation around the sub-tables: case__authors, method__authors, organization__authors becomes simply authors, and similarly for localized_texts.
Several functions and SQL queries were simplified (some dramatically) as a result. There are more simplifications to shake out, this round only focused on what was necessary to get the refactor running.
CAVEATS:

Requires migration 24 to be run on the server
Requires update to the front-end (we use thingid everywhere now instead of case_id, thingID, thingId, etc.)
One feature I'd hoped for is not (yet) supported by Postgres: using REFERENCES things(id) as a foreign key constraint. That doesn't work for inherited tables.
Uniqueness is not enforced by Postgres, so it is possible to insert a method and a case (for instance) with the same id. Some care is required, but I think our normal usage pattern is safe for this. I do have concerns about integrating updates from the old server around id collisions, but that is something we'd have to deal with in any case.

Very strange that the same build passes tests locally and sometimes through Travis. Makes me think maybe our tests have a race condition? Re-running the test got it to pass, but I'll need to keep an eye out for this.

I'm not seeing a history of failed tests above, I guess because the old failures got squashed by the rerunning. Next time, keep a log of the failures, I can look into it.


try-finally causes "variable is used before being assigned"

TypeScript Version:  3.5.3

Search Terms:

variable is used before being assigned
try finally variable

Code
function bug() {
  let close: () => void | undefined;
  if (process.env.NODE_ENV === 'development') {
    close = () => {}
  }
  try {
    // ...
  } finally {
    if (close) { // Variable 'close' is used before being assigned.ts(2454)
      close()
    }
  }
}

Expected behavior:
Should compile without errors
Actual behavior:
Does not compile: Variable 'close' is used before being assigned.ts(2454)
Playground Link:
http://www.typescriptlang.org/play/index.html#code/GYVwdgxgLglg9mABAIxAcwBQEpEG8BQiiANgKZSITFwDOpAXItogLwB8iAbnDACYDchRDGBMADgCc4EUjRoA6UmE7yAcgHkAIgFEA+ttUA1VixaIA5L1KdS1MQFslUczgJEiVWqVZMc7PAC+QkFEUBIAnnhCRAD0MYjyicGIwDBgAIbExJFu7iJMnnSu0e6FpNglIYhBAUA
Related Issues:
#29684
#12205
#12355

You are using it before being assigned in all code paths. If process.env.NODE_ENV === 'development' evaluates to false you never assign any value to close.

For context, this occurs in this case when strictNullChecks is on. Otherwise, not.

You need to parenthesize your function type
- let close: () => void | undefined;
+ let close: (() => void) | undefined;

This issue is completely unrelated to the try-finally block.

while that's true

You are using it before being assigned in all code paths

this is not 100% true. What I wrote is still valid JavaScript and TypeScript usually checks such conditions in branches. I wrote an explicit if-statement that checks for undefined in that case.
What's really interesting is that when I change the type from a function to for example a string it works:
function bug() {
  let test: string | undefined; // does not work with () => void | undefined
  if (process.env.NODE_ENV === 'development') {
    test = 'bar'
  }
  if (test) {
    // works 👍
  }
}

and as function arguments it works also:
function bug(close?: () => void) {
  if (process.env.NODE_ENV === 'development') {
    close = () => {}
  }
  try {
    // ...
  } finally {
    if (close) { // works 👍
      close()
    }
  }
}

If you mark something as potentially undefined, it will allow you to use it without initialization. That's why https://github.com/microsoft/TypeScript/issues/32836#issuecomment-520946344 should address the issue.

You need to parenthesize your function type. This will fix it.
- let close: () => void | undefined;
+ let close: (() => void) | undefined;

Oh, damn! 🤦♂ How embarrassing that I overlooked that. Sometimes you do not see the forest for the trees

To be honest it just sort of stinks that we don't provide a better error message or something there.

That would be awesome. After hours of coding such a small typo sometimes leads to a total 🤯

See #32846.

Great. I already gave my 👍 and subscribed 😎
At the moment I am thinking about if it would be possible that something like this let close: () => void; automatically has an inferred union type of (() => void) | undefined because nothing is assigned at the moment. So it must be initially undefined. What do you think @DanielRosenwasser ? With that you don't have to explicitly annotate it with (() => void) | undefined

The problem with that is that until an assignment occurs, the narrowed type would be undefined, allowing you to pass it in to optional parameters of unrelated types. That might be undesirable, so requiring an explicit | undefined helps make the intent clearer.

so requiring an explicit | undefined helps make the intent clearer

True. But it's a little bit annoying to always type an | undefined ☺ Mabey a let close?: () => void; like in function arguments would be cool 😉

@screendriver The current behavior is good, because if you do, say, let x: SomeComplexObject, and then forget to give it a value before using it (because there are many cases where you can't meaningfully initialize something like this directly at declaration), you get a nice error.  Effectively, the type says it can't be undefined, so you can ever observe an undefined, it's an error.  let x? would be nice, though, and I've sometimes wished for that myself.


Add 'usage' section with explanation of 'dump' command

As per go-gitea/gitea#448, sending a PR that adds a new 'Usage' section to the docs and documents the behavior of the dump command.
Please let me know what you think of the phrasing and structure.
Looking forward, it would be nice to have explanations of all the commands added to these docs. Right now this information is only present in the CLI help:
     web      Start Gitea web server
     serv     This command should only be called by SSH shell
     update   This command should only be called by Git hook
     dump     Dump Gitea files and database
     cert     Generate self-signed certificate
     admin    Preform admin operations on command line
     help, h  Shows a list of commands or help for one command

IMO, web cert and admin would be the most useful.

LGTM

LGTM

@issmirnov could you send this PR also to release/v1.0?

And dump has a new option -d=mysql, that means you can backup your sqlite as mysql SQL syntax.


[cherry-pick-2.0.4][Fix-8334][API] fix ProcessDefinition update error

cherry-pick #8338

Codecov Report

:exclamation: No coverage uploaded for pull request base (2.0.4-prepare@a322f9c). Click here to learn what that means.
The diff coverage is n/a.

@@               Coverage Diff                @@
##             2.0.4-prepare    #8354   +/-   ##
================================================
  Coverage                 ?   21.03%
  Complexity               ?     1579
================================================
  Files                    ?      536
  Lines                    ?    22426
  Branches                 ?     2642
================================================
  Hits                     ?     4718
  Misses                   ?    17234
  Partials                 ?      474

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a322f9c...1bafdd0. Read the comment docs.


Add inner window width as default

Hey there,
We ran into an issue with the MasonryResponsive component when using Scroll Restoration in react-router-dom. The problem was that Scroll Restoration's useLayoutEffect was triggered before useWindowWidth could calculate the width properly. Since MasonryResponsive uses the width to calculate columns, and columns affect the height, this was causing a conflict.
Here's the fix:
Before:
const [width, setWidth] = useState(0)

After:
const [width, setWidth] = useState(window.innerWidth)

Why This Works
Scroll Restoration relies on the window height and was running its useLayoutEffect before MasonryResponsive had the chance to properly calculate the window's width. When the width was stuck at 0, it affected the calculated columns, and as a result, the overall height. This was causing Scroll Restoration to not work correctly.
By making sure the window's width is always properly returned, the columns and consequently the height are calculated accurately. This allows MasonryResponsive to function smoothly alongside Scroll Restoration, even if Scroll Restoration's useLayoutEffect is triggered first.
Conclusion
This is a straightforward change that ensures MasonryResponsive and Scroll Restoration work well together. It corrects the timing issue between the calculation of window width and Scroll Restoration's useLayoutEffect, making sure everything falls into place nicely.
Please have a look and let me know what you think!
Thanks! 🚀

@cedricdelpoux seems like small and reasonable change

Sorry for the delay 😞
It published in 2.2.0. Thank you for your help !


Add User CRUD to API

Wherever store the users will be saved to, CRUD will be needed to handle them. This requires the creation of functions to CRUD users.

Addressed by #388


Add earl to a list of assertion libraries that works great with mocha

Description of the Change
The documentation lists few assertion libraries: https://mochajs.org/#assertions. I want to add earl - assertion library that was created with Mocha in mind. (I am the author of earl).
Benefits
Earl works great with TypeScript. As TypeScript becomes more and more popular in JS community, Mocha users will for sure look for assertion libraries that work well with TS.

Coverage remained the same at 94.116% when pulling b3191f95ab16adb172e88fc02ee4e28a82b6c53a on krzkaczor:kk/docs-add-earl into 78a41d1c78813f84b8de01f4ce987a3fd99bd22c on mochajs:master.

@boneskull @outsideris any chance to get this merged?

@krzkaczor I didn't add your library to our docs, but inserted your link to our Wiki section.

@juergba thanks for this!
Any reason for not merging it to docs? I feel like 99% of people browse only the website :/

@krzkaczor it's a matter of time. We don't have time to evaluate/recommend third party packages.
Furthermore our docs are currently redesigned and will have a complete different look.
You can add a simple snapshot test case to our mocha/samples, if you wish. This will draw additional attention to your package. Quite a few users are missing this feature in Mocha.


How to use it and what is used for?

Hi,
Would you like to let me know what is it and how to use them?
Maybe you also like everyone know it and use it if not please ignore my request.
Thanks.

Do you have a question on a specific script?


[Snyk] Security upgrade cryptography from 41.0.2 to 41.0.3

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to fix one or more vulnerable packages in the `pip` dependencies of this project.
Changes included in this PR

Changes to the following files to upgrade the vulnerable dependencies to a fixed version:

server/backend/requirements.txt

Vulnerabilities that will be fixed
By pinning:

Severity
Priority Score (*)
Issue
Upgrade
Breaking Change
Exploit Maturity

471/1000  Why? Recently disclosed, Has a fix available, CVSS 3.7
Insufficient Verification of Data Authenticity SNYK-PYTHON-CRYPTOGRAPHY-5813745
cryptography:  41.0.2 -> 41.0.3
No
No Known Exploit

551/1000  Why? Recently disclosed, Has a fix available, CVSS 5.3
Denial of Service (DoS) SNYK-PYTHON-CRYPTOGRAPHY-5813746
cryptography:  41.0.2 -> 41.0.3
No
No Known Exploit

471/1000  Why? Recently disclosed, Has a fix available, CVSS 3.7
Denial of Service (DoS) SNYK-PYTHON-CRYPTOGRAPHY-5813750
cryptography:  41.0.2 -> 41.0.3
No
No Known Exploit

(*) Note that the real score may have changed since the PR was raised.
Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the affected dependencies could be upgraded.
Check the changes in this PR to ensure they won't cause issues with your project.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings
📚 Read more about Snyk's upgrade and patch logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Denial of Service (DoS)

Already done via rennovatebot


Improve readme with example invocation

users don't have a simple copy-paste step to run the script in their environments

done via https://github.com/plz/E-Series-Graphite-Grafana/commit/8e8ce13dfacd0ab05408ffa45e4d018e719754f7 and https://github.com/plz/E-Series-Graphite-Grafana/commit/1c93337ce50efc1a2dd2046444262d552c95f68c


Fix missing slash in fpga codegen

While compiling and running on Xilinx FPGA I ran into the following issue:
terminate called after throwing an instance of 'hlslib::ocl::ConfigurationError'
  what():  Failed to open program file "/home/burgerm/thesis_dace/tasks/blas/level1/axpy/.dacecache/saxpy_perf/buildsaxpy_perf_hw.xclbin".

There is a / missing between ...build and $PROGRAM_NAME .The small change should fix it.

@manuelburger I see Tiziano did this fix for Intel also, we just didn't carry it over to Xilinx. Could you put the slash inside the string please, then I'll approve:
kernel_file_name = "DACE_BINARY_DIR \"/{}".format(self._program_name)


Private symbol server support

Is the feature request related to a problem
Cymbal currently doesn't download from private symbol servers. That's outlined in the readme and I see no mention (in documentation) of any way to change this behavior.
Describe the solution
Support downloading symbols from private symbol servers by permitting the user to specify the symbol server in a MSBuild property.
Describe alternatives considered
None, I can't think of an alternative for this issue.
Additional context
This permits private packages to be used where NuGet packages and symbols are on a private symbol server. I like this approach to packaging (the split packages), but I'm now missing the PDB files in production which reduces usability of logs and exception stack traces.

so this is for your own internal nugets?

Yes, preparing PR as we speak


Element 2.0.0-alpha.1 released 🎉

Changelog
https://github.com/ElemeFE/element/releases/tag/v2.0.0-alpha.1
Documentation
http://element.eleme.io/2.0/#/en-US/component/installation
Installation
npm install element-ui@next

import Vue from 'vue'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

Vue.use(Element)

Tips
theme-chalk is included in 2.0.0-alpha.1, feel free to try it out. It is not recommended to use this version in production though, because it's still in alpha stage.
Some components (e.g. Table) are still being upgraded, and we'll ship them in future releases. Thank you for your patience.
Migration
If you wish to migrate from 1.4 to 2.0.0-alpha.1, please refer to the 'Breaking changes' section in changelog. When the final 2.0.0 version is released, we hope to be able to provide a migration tool for your convenience (fingers crossed).

thanks for the awesome work, please can you tell me how to migrate from version 1.4 to 2

@wvllvw Updated.

@Leopoldthecoder thank you brother, You're doing a great job.
my question isn't clear what I mean is updating Element in webpack

@wvllvw Basically you don't need to change anything in webpack config. Just uninstall 1.4 and install 2.0.0-alpha.1 (remember the next tag), and import theme-chalk instead of theme-default.

Nice work!!!

validation related functionalities are still not good enough,async-validation should be gave up

I am experiencing what seems like styling issues when pulling in only npm i element-datepicker -S and then importing the styles obviously import 'element-ui/lib/theme-chalk/index.css'.
Can anyone confirm datepicker is not working by itself with 2.0 alpha?

2.0单独引用 input 会报下面的错
`
[Vue warn]: Injection "elFormItem" not found
found in
--->

`
on-icon-click 属性失效
另外，单独引用下拉菜单也会报错。

@doramart

Input 的问题请参考 #7344
on-icon-click 已被移除，请参考更新日志
Dropdown 的问题已经在 #7322 修复

@Chinese1904 We haven't updated the standalone packages. We'll do that when we come to the final release of 2.0.0.

message弹窗报错

Also in cards

@Leopoldthecoder quick question, it seems like standalone packages have not been updated yet. Any eta on those? Thanks so much!


Unused private attributes

See log of #65

They aren't really unused, are they?

Well I think its just Pylint and enums being weird.


Run ddev validate models -s on ibm_i

What does this PR do?
Fix master tests, broken because of a race condition between two PRs.
Motivation
Have CI pass on master
Additional Notes
I just ran ddev validate models -s ibm_i
Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
[ ] PR title must be written as a CHANGELOG entry (see why)
[ ] Files changes must correspond to the primary purpose of the PR as described in the title (small unrelated changes should have their own PR)
[ ] PR must have changelog/ and integration/ labels attached

Merging since I have one approval and master will be broken otherwise


Query full player name from Steam in case of a faulty truncation

HLL truncates player names longer than 20 characters. If the 20th character in a player's name is a space, the truncated name will end with a space, and this makes it impossible to get information about that player through the playerinfo RCON command. This information is vital however.
If you take the player's full, untruncated name I believe the command WILL work. And since we know their steamid, we can get this full name through the Steam API. So, when we do notice that one of the players has an invalid name, we query their full name from the API, and use that instead.

As a side note, we need to test how this behaves when the 20th char is a special character. For instance, the name ≡J≡i≡M≡b≡0≡n≡I≡u≡M 🍍 also causes issues. HLU doesn't account for pineapples either, so they will show up as None entirely.

Did you check the assumption of the playerinfo working when the full name is provided? 🤔

Yes, I'm pretty sure I have successfully tried that. I recall at some point mentioning that it was possible, and that ironically the only way to get the full name through RCON was through the playerinfo command.

Apparently neither is true


Can it be used beyond reddit, e.g. providing the own list of headlines?

Hi @davidmezzetti,
This looks great, thanks!
I was wondering if is possible to configure this by using my own list of headlines? I can pierce the code if necessary, but a few hints where to start would be great.

Yes, this would be a relatively straightforward change.
I plan on adding the following shortly:

Read RSS feeds
Read CSV files


Version bump to 0.2.0

Coverage remained the same at 100.0% when pulling 7ac7dfa55cc4a0b4e51ff2fc2293b697271a14f4 on bump-version into fb828abd844e62e56440e277e27f7d9c7ab4a1ed on master.


Weird surface rendering artrfact when zooming in too close

Once zooming in too close on one particular side a weird artifact appears as shown here:

@raghavaro please incorporate 018374c.


Where to keep Nodes Capacity

Currently it's being kept in NodeSpec, and it is being "updated" (hopefully always to the same value, but who knows) in tryUpdatePodStatus in Kubelet. In https://github.com/GoogleCloudPlatform/kubernetes/issues/2726#issuecomment-85896037 it is said, that we want to move Status update to post through subresource, which alone makes a lot of sense.
The question is what to do with Capacity. We can either assume it's immutable and leave it in Spec (may be problematic if we'll want to do vertical node scaling + I'm not sure if it's really immutable), say that it's not the part of the NodeSpec, but NodeStatus (it can make sense if seen from a correct angle), or hack around subresources for Nodes and allow updating Spec in this case (easiest, without visible external changes, but kind of ugly).
@davidopp @bgrant0607 @ddysher

Capacity should be 100% observable from other sources: machine database, cloud provider, the node itself. Therefore, it should just be in NodeStatus.

Ok, I'll write a PR moving it to Status tomorrow.


Internal links update

Fixed the links that pointed to the Confluence page. Did not fix image links as that's a separate ticket
#165

Suggested changes were made.


Add Django 1.10 to the build matrix

Potentially need it for one of my project running Django 1.10.

This PR is now outdated, replaced by #46


Non-Determinism in Messages Table

The blocks messages can have two different values for the command: parse or insert.

Thanks for creating this as its own specific issue, based on https://github.com/CounterpartyXCP/counterparty-core/issues/1614. Adding the relevant part of the issue description here.

Starting with maybe the most critical find. I see that the messages table is now including blocks category, and there is a new parse command. After being fully synced, these blocks stop using the parse command and use insert instead.
Isn't` this a clear source for non-determinism for the messages hash? Nodes will sync at different blocks, so later nodes will have parse while the old ones will have insert for the same blocks.
Also, I think that the messages table could just not include the blocks and this issue will be solved. v9.61 does not have blocks in the messages.

Normally, there should be one "insert" and one "parse" per block (corresponding to NEW_BLOCK and BLOCK_PARSED events). I'll check that this is indeed the case. It is recommended to use the event name rather than command and category (which is actually the table name). These two fields, which expose the SQL schema, should disappear in API v2.

I checked there is indeed a problem. I think it comes from the kickstart filling the block table first.. I'll take care of that.

Is there a purpose for now including the blocks as a message? v9.61 didn't...

fixed here https://github.com/CounterpartyXCP/counterparty-core/pull/1687


Developer

_ No description provided. _

Thanks for the PR. Can you add a few comments detailing what was changed?

The image header block diagram has been replaced in Section 4.1.

Section 5.3 has been added for STM32F411.

Looks good. Please submit an updated PR with revised (permanent) image links and please link the repo that hosts svg images to this thread.

Looks good. Please submit an updated PR with revised (permanent) image links and please link the repo that hosts svg images to this thread.

Here is a link to the repository https://github.com/imrank03/rustBoot-book-diagrams.git, if you modify an image, make sure not to modify the image file name.

I have added a separate git workflow for pull requests. Can you update this pull request with an upstream fetch followed by a push?


Render predefined area instead of the entire pdf page to receive a subset of the pdf page as an image

Detailed feature request
At the moment all methods to save the pdf page as an image render the entire page using X:0  and Y:0 as their origin.
If i only want a subset of the pdf as an image file i need to postprocess the image.
            using (MemoryStream pdfStream = new MemoryStream(resultPdfBytes))
            {
                SkiaSharp.SKBitmap bitmap = PDFtoImage.Conversion.ToImage(pdfStream);
                bitmap.ExtractSubset(bitmap, new SkiaSharp.SKRectI(0, 0, 1000, 1000));

                var data = bitmap.Encode(SkiaSharp.SKEncodedImageFormat.Png, 100);
                if(data is not null)
                {
                    resultPdfBytes = data.ToArray();
                }
            }

This is a time consuming process for very large pdf pages and not necessary if all methods would accept a Rect or x,y coordinates as their render origin + width / height. But it would probably be better to just pass a rectangle that defines the area the pdfium viewer should render.
Additionally rendering a very large pdf (for example large building plans) the rendering might fail. I have reproduced this multiple times by setting a dpi higher then 350 which in one case always fails to render. Rendering a subset should also solve this problem and allow rendering of areas with a higher dpi on a large pdf pages with a predefined rendering area.
I think this should be fairly easy to implement since both methods already expose left and top parameters which are set to 0 as default atm. (PDFtoImage.PdfiumViewer.PdfDocument.Render())
FPDFBitmap_FillRect()
RenderPDFPageToBitmap()

Greetings ynnob!

Hi @ynnob, FPDF_RenderPageBitmap does not support clipping but FPDF_RenderPageBitmapWithMatrix looks like it does. I'm looking into it ...

Hey @ynnob, I've released a preview version with support to render a subset of the PDF: PDFtoImage 4.0.0-preview
You can define the boundaries for the render with the Bounds parameter. The following example renders the bottom left quadrant of the PDF:
// get the size of the first PDF page
var pageSize = PDFtoImage.Conversion.GetPageSize(pdfStream, leaveOpen: true, page: 0);

// render the bottom left quadrant
PDFtoImage.Conversion.SavePng("output.png", pdfStream, page: 0, options: new(Dpi: 300, Bounds: new(0, pageSize.Height / 2f, pageSize.Width / 2f, pageSize.Height / 2f)));

Please note that the Bounds are relative to the size returned by GetPageSize and is independent to your Dpi, Width, Height and other settings. Rendering a subset of the PDF will not shrink the output image, you have to calculate the new size yourself.
You can test this new option here: https://www.sungaila.de/PDFtoImage/
Please let me know if this feature is working as expected so I can build a final release later on.

Jeah the roatation is no problem. We already have similar solutions implemented in different languages and we use rotation adjusted target areas to render the expected areas.
Jeah something seems indeed off when setting a width and height.
Thanks for this already. Looks very promising.

@ynnob PDFtoImage 4.0.1 fixed Bounds when used in conjunction with Width, Height and Rotation.
Please give it a try when you have time.

 When setting the Width and Height the DPI is ignored. No matter what the dpi is set to the output does not change. When removing the Width/Height the dpi takes control again.
Is this supposed to happen? if so this should be documented and maybe you can explain what the individual settings really manipulate in the endresult.
Other than that this semms to correctly render the area. Nice 👍

Hi @ynnob, this is intended behavior and is documented in the method XML comments (e.g. see IntelliSense in Visual Studio). You can either use DPI or set Width/Height, there is no combination of both like "use DPI for width but use this fixed height".


[BugFix] fix boolean decoder in parquet scanner

Fixes #issue
When cross parquet pages, you have to reset decoder buffer.
What type of PR is this:

[x] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Checklist:

[ ] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[x] 3.1
[x] 3.0
[x] 2.5
[ ] 2.4

[FE PR Coverage Check]
:heart_eyes: pass : 0 / 0 (0%)

@MergifyIO backport branch-3.1

@Mergifyio backport branch-3.0

@Mergifyio backport branch-2.5

@mergify backport branch-2.4

@mergify backport branch-2.2

@mergify backport branch-2.3


Copious TSAN warnings on Linux

Problem
We have lots and lots of TSAN data race warnings on Linux that should be addressed before it results in other potentially bigger blow-ups that are more difficult to debug later.
Example: https://github.com/project-chip/connectedhomeip/runs/5039936950?check_suite_focus=true

Example output:
2022-02-03 02:03:15.802 INFO    WARNING: ThreadSanitizer: data race (pid=31995)
2022-02-03 02:03:15.802 INFO      Write of size 8 at 0x7b5000010700 by thread T4:
2022-02-03 02:03:15.803 INFO        #0 memset ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:795 (libtsan.so.0+0x3790f)
2022-02-03 02:03:15.803 INFO        #1 memset ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:793 (libtsan.so.0+0x3790f)
2022-02-03 02:03:15.804 INFO        #2 g_slice_alloc0 <null> (libglib-2.0.so.0+0x70ac2)
2022-02-03 02:03:15.804 INFO
2022-02-03 02:03:15.805 INFO      Previous write of size 8 at 0x7b5000010700 by thread T2:
2022-02-03 02:03:15.805 INFO        #0 posix_memalign ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:835 (libtsan.so.0+0x3046d)
2022-02-03 02:03:15.805 INFO        #1 <null> <null> (libglib-2.0.so.0+0x6f936)
2022-02-03 02:03:15.806 INFO        #2 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/9/bits/invoke.h:60 (chip-tv-app+0x1c9585)
2022-02-03 02:03:15.806 INFO        #3 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/9/bits/invoke.h:95 (chip-tv-app+0x1c94e2)
2022-02-03 02:03:15.806 INFO        #4 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/9/thread:244 (chip-tv-app+0x1c9445)
2022-02-03 02:03:15.807 INFO        #5 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/9/thread:251 (chip-tv-app+0x1c93f2)
2022-02-03 02:03:15.807 INFO        #6 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/9/thread:195 (chip-tv-app+0x1c93b3)
2022-02-03 02:03:15.807 INFO        #7 <null> <null> (libstdc++.so.6+0xd6de3)
2022-02-03 02:03:15.807 INFO
2022-02-03 02:03:15.808 INFO      Location is heap block of size 496 at 0x7b5000010600 allocated by thread T2:
2022-02-03 02:03:15.808 INFO        #0 posix_memalign ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:835 (libtsan.so.0+0x3046d)
2022-02-03 02:03:15.808 INFO        #1 <null> <null> (libglib-2.0.so.0+0x6f936)
2022-02-03 02:03:15.808 INFO        #2 void std::__invoke_impl<void, void (*)()>(std::__invoke_other, void (*&&)()) /usr/include/c++/9/bits/invoke.h:60 (chip-tv-app+0x1c9585)
2022-02-03 02:03:15.808 INFO        #3 std::__invoke_result<void (*)()>::type std::__invoke<void (*)()>(void (*&&)()) /usr/include/c++/9/bits/invoke.h:95 (chip-tv-app+0x1c94e2)
2022-02-03 02:03:15.808 INFO        #4 void std::thread::_Invoker<std::tuple<void (*)()> >::_M_invoke<0ul>(std::_Index_tuple<0ul>) /usr/include/c++/9/thread:244 (chip-tv-app+0x1c9445)
2022-02-03 02:03:15.809 INFO        #5 std::thread::_Invoker<std::tuple<void (*)()> >::operator()() /usr/include/c++/9/thread:251 (chip-tv-app+0x1c93f2)
2022-02-03 02:03:15.809 INFO        #6 std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)()> > >::_M_run() /usr/include/c++/9/thread:195 (chip-tv-app+0x1c93b3)
2022-02-03 02:03:15.809 INFO        #7 <null> <null> (libstdc++.so.6+0xd6de3)
2022-02-03 02:03:15.809 INFO
2022-02-03 02:03:15.809 INFO      Thread T4 'pool' (tid=32000, running) created by main thread at:
2022-02-03 02:03:15.810 INFO        #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:962 (libtsan.so.0+0x5ea79)
2022-02-03 02:03:15.810 INFO        #1 <null> <null> (libglib-2.0.so.0+0x9f2ba)
2022-02-03 02:03:15.810 INFO        #2 chip::DeviceLayer::ConnectivityManagerImpl::StartWiFiManagement() ../../examples/tv-app/linux/third_party/connectedhomeip/src/platform/Linux/ConnectivityManagerImpl.cpp:675 (chip-tv-app+0x1b8e55)
2022-02-03 02:03:15.810 INFO        #3 ChipLinuxAppInit(int, char**) ../../examples/tv-app/linux/third_party/connectedhomeip/examples/platform/linux/AppMain.cpp:182 (chip-tv-app+0x40fc2)
2022-02-03 02:03:15.810 INFO        #4 main ../../examples/tv-app/linux/main.cpp:171 (chip-tv-app+0x3c3f5)
2022-02-03 02:03:15.810 INFO
2022-02-03 02:03:15.811 INFO      Thread T2 (tid=31998, running) created by main thread at:
2022-02-03 02:03:15.811 INFO        #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:962 (libtsan.so.0+0x5ea79)
2022-02-03 02:03:15.811 INFO        #1 std::thread::_M_start_thread(std::unique_ptr<std::thread::_State, std::default_delete<std::thread::_State> >, void (*)()) <null> (libstdc++.so.6+0xd70a8)
2022-02-03 02:03:15.811 INFO        #2 chip::DeviceLayer::PlatformManagerImpl::_InitChipStack() <null> (chip-tv-app+0x1c5b11)
2022-02-03 02:03:15.811 INFO        #3 chip::DeviceLayer::PlatformManager::InitChipStack() ../../examples/tv-app/linux/third_party/connectedhomeip/src/include/platform/PlatformManager.h:329 (chip-tv-app+0x3d37f)
2022-02-03 02:03:15.812 INFO        #4 ChipLinuxAppInit(int, char**) ../../examples/tv-app/linux/third_party/connectedhomeip/examples/platform/linux/AppMain.cpp:151 (chip-tv-app+0x40dee)
2022-02-03 02:03:15.812 INFO        #5 main ../../examples/tv-app/linux/main.cpp:171 (chip-tv-app+0x3c3f5)
2022-02-03 02:03:15.812 INFO
2022-02-03 02:03:15.812 INFO    SUMMARY: ThreadSanitizer: data race (/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x70ac2) in g_slice_alloc0
2022-02-03 02:03:15.812 INFO    ==================

V1 review: fixes in master for this are bug fixes and would be acceptable, however this is not a V1 blocker.

This might be related: https://gitlab.gnome.org/GNOME/glib/-/issues/1672

I've done some tests of this issue and it seems that on Ubuntu 22.04 TSAN has been fixed - it no longer reports such false positives.
One can use provided simple test code to check that with different TSAN versions. Compile the test code as follows:
g++ -g -O0 test.cpp -fsanitize=thread -pthread $(pkg-config --cflags --libs glib-2.0)
#include <iostream>
#include <thread>
#include <glib.h>

struct data {
        int value;
};

static struct data *sharedData1;
static struct data *sharedData2;

void glibMainLoopThread(GMainLoop *loop) {
        g_main_loop_run(loop);
}

gboolean glibCallback1(void * data) {
        auto *sharedData = reinterpret_cast<struct data *>(data);
        std::cout << "T: sharedData1 = " << sharedData->value << std::endl;
        sharedData->value++;
        return FALSE;
}

gboolean glibCallback2(void * data) {
        auto *sharedData = reinterpret_cast<struct data *>(data);
        std::cout << "T: sharedData2 = " << sharedData->value << std::endl;
        sharedData->value++;
        return FALSE;
}

int main() {

        sharedData1 = new struct data({10});

        GMainLoop *loop = g_main_loop_new(NULL, FALSE);
        std::thread t(glibMainLoopThread, loop);

        sharedData2 = new struct data({20});

        // That's not a data race
        // NOTE: TSAN on Ubuntu 20.04 reports it (false positive)
        std::cout << "sharedData1 = " << sharedData1->value << std::endl;
        std::cout << "sharedData2 = " << sharedData2->value << std::endl;

        g_idle_add(glibCallback1, sharedData1);
        g_idle_add(glibCallback2, sharedData2);

        // Here we've got a data race (callback is already added to main loop thread)
        // std::cout << "sharedData2 = " << sharedData2->value << std::endl;

        std::this_thread::sleep_for(std::chrono::seconds(1));

        g_main_loop_quit(loop);
        t.join();

        std::cout << "sharedData1 = " << sharedData1->value << std::endl;
        std::cout << "sharedData2 = " << sharedData2->value << std::endl;

        delete sharedData1;
        delete sharedData2;
        return 0;
}

On Ubuntu 22.04 I've got no errors (unless commented std::cout line is included). However, on Ubuntu 20.04, I've got error mentioned in https://github.com/project-chip/connectedhomeip/issues/14710#issuecomment-1028551023.
Output from Ubuntu 22.04:
$ ./a.out
sharedData1 = 10
sharedData2 = 20
T: sharedData1 = 10
T: sharedData2 = 20
sharedData1 = 11
sharedData2 = 21

With our CI the problem occurs because as for now the ubuntu-latest == ubuntu-20.04. So, maybe we should change to use ubuntu-22.04 with workflows where TSAN is used?

Issue Scrub: @woody-apple to pin us to ubuntu-22.04 in CI. @andy31415 will help check to make sure warnings aren't being suppressed afterwards.

After more research I've found the TRUE cause of false positives. The proper answer is here: https://stackoverflow.com/a/74328089


[feaLib] Lexer for double quote strings should not stop at newline?

I have fonts and fea files with a name table where some nameid strings have newlines in the string. According to the spec

A string is composed of 1-byte ASCII characters enclosed by ASCII double quote characters ("). Newlines embedded within the string are removed from the character sequence to be stored.

Looking at a ttx dump these strings have
 inserted for the newlines so ttx seems to have no issue, but loading the fea file with feaLib fails because in lexer.py there is self.scan_until_('"\r\n')
If I remove  \r\n it loads fine, but then test_string fails in lexer_test.py because it doesn't raise an Exception at the embedded newline. Maybe I'm missing something, but I don't see a reason for the \r\n in the double quote lexer.

Many thanks for the report; sounds like a bug. (I'm traveling next week so it may take a few days until I've a fix ready, sorry about that).

@brawer FWIW, i'm almost done fixing it. I'll send a PR and you can have a look at it next week.


Test Vector scalar multiplication

Add tests to test scalar multiplication between a Vector2 and a Number

Hi, can I work on this?

Completed with #40


use callback to create net.Listener

		ReverseUnixForwardingCallback: ssh.ReverseUnixForwardingCallback(func(ctx ssh.Context, socketPath string) func() (net.Listener, error) {
			isAllowed := true

			if isAllowed {
				return func() (net.Listener, error) {
					ln, err := net.Listen("unix", socketPath)
					if err != nil {
						return nil, err
					}

					if err := os.Chmod(socketPath, os.FileMode(0777)); err != nil {
						return nil, err
					}

					return ln, nil
				}
			}

			return nil
		}),

Should the mkdir and unlink be part of this too? And do you think we should create a public function that provides a basic implementation?

Yeah that might be best since now users can change where the socket is created. I think a default implementation of mkdir and unlink would be good in this case since they generally should be called for most uses.
I'll add that quickly in a bit.

I think just having a single public function that does the combo of mkdir+unlink+listen should work

Hey @deansheather, sorry I kinda forgot about this. I made the changes so if you think this is good could we get this merged please?


Support multiple queries in String

Currently, we seem to assume that there is one query per string.
guess) but the user can put all the queries in one string.
See previous README.md: https://github.com/gluesql/gluesql/tree/e57f16986d90a3b7c71c673172cddc64c7c41bfb
in glue.rs/L30..36
    pub async fn plan(&self, sql: &str) -> Result<Statement> {
        let parsed = parse(sql)?;
        let statement = translate(&parsed[0])?;
        let storage = self.storage.as_ref().unwrap();

        plan(storage, statement).await
    }

you should change the return type.
Starting with Glue::execute_stmt_async ~ plan method , let's specify Vec<Payload> in backwards compatibility.
in glue.rs
    pub async fn plan(&self, sql: &str) -> Result<Vec<Statement>> {
    ...

    pub async fn execute_stmt_async(&mut self, statement: Statement) -> Result<Vec<Payload>> {
    ...

    // Another method...

If this function is not supported in the future, error handling will be required.
For example, the plan level does not support multiple queries.

I'll edit the issue a bit.
Do not accept multiple statements in the execute function.
Starting with Glue::execute_stmt_async ~ plan , let's specify Vec<Payload> in backwards compatibility.

This is a duplicate issue. ref: #258


Updating Persistent Menu for Platform 1.4

Any plan to update setPersistentMenu for Platform 1.4?
Allowing new feature like locales and composer_input_disabled

is this repo still supported?

@jsappme may I know what is the workaround for this?

Shouldn't be hard to implement it in this library. I can do a PR but I see that the owner isn't accepting nor updating anything... is he ok?
@remixz

PRs are always welcome @giacomocerquone, we are other maintainers than @remixz. Unfortunately I'm really busy as well.


Add counter for errors and warnings logged.

How is this intended to be used?
I re-kicked the tests since it wasn't clear why they failed.

Hmm, I'll try to figure out the test issue. Can't seem to see exactly which tests are failing!
Ideally 5.0.0, yes.

I see a crash running the Core unit tests locally in your branch. The location isn't clear because it's from an async call to FIRLogBasic.

I think it's from [NSUserDefaults standardUserDefaults]. I've broken it out into separate lines and it seems consistent there, trying to resolve it.

I removed it from the dispatch_async block and everything is working as expected. Couldn't find any reasoning but I'll upload a new commit making that change.

Yeah, I'll try to figure out what's failing. [NSUserDefaults standardUserDefaults] says it's thread safe, but maybe it's something to do with being on a background thread...

Merging now for 5.0.0 RC.


Dnascope

This is ready for prime-time now, changes include:

Support for DNAscope PASS-only VCF format
Ability to enable dynamic targeting of model recall values based on desired global precision and observed pipeline precision
Ability to enable automatic feature selection in the config
Removal of dead vcf module and replaced with cyvcf2

Data is currently passing validation reqs, and code review looks good; this is ready for merge when we're ready to switch over


Error Running the gst-launch-1.0 command to start RTSP.

Hi, I am trying to run the gst-launch-1.0 commnad to start RTSP.
But I am not able to start. I use below command to use kvssink, but it end up with error.
I am using docker image from amazon ECR.
GST_DEBUG=FIXME gst-launch-1.0 rtspsrc location=<rtsp stream> ! queue ! short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au kvssink stream-name= <stream name> storage-size=512 access-key=<access-key> secret-key=<secret-key> aws-region=<region>

0:00:00.016308656  1241      0x1ce56c0 WARN                 default grammar.y:1137:priv_gst_parse_yyerror: Error during parsing: syntax error, unexpected ASSIGNMENT, expecting IDENTIFIER or BINREF or '('
0:00:00.016338040  1241      0x1ce56c0 ERROR           GST_PIPELINE grammar.y:1061:priv_gst_parse_yyparse: syntax error
0:00:00.016348245  1241      0x1ce56c0 ERROR           GST_PIPELINE grammar.y:1061:priv_gst_parse_yyparse: syntax error
0:00:00.016353089  1241      0x1ce56c0 ERROR           GST_PIPELINE grammar.y:1061:priv_gst_parse_yyparse: syntax error
0:00:00.016901028  1241      0x1ce56c0 WARN     GST_ELEMENT_FACTORY gstelementfactory.c:456:gst_element_factory_make: no such element factory "video"!
0:00:00.016913948  1241      0x1ce56c0 ERROR           GST_PIPELINE grammar.y:816:priv_gst_parse_yyparse: no element "video"
0:00:00.016923953  1241      0x1ce56c0 ERROR           GST_PIPELINE grammar.y:901:priv_gst_parse_yyparse: link has no sink [source=@0x1d22080]

(gst-launch-1.0:1241): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
0:00:00.016956276  1241      0x1ce56c0 ERROR           GST_PIPELINE grammar.y:971:priv_gst_parse_yyparse: no source element for URI "/x-h264,"
0:00:00.016966035  1241      0x1ce56c0 WARN                 default grammar.y:1137:priv_gst_parse_yyerror: Error during parsing: syntax error, unexpected ASSIGNMENT
0:00:00.016971972  1241      0x1ce56c0 ERROR           GST_PIPELINE grammar.y:1061:priv_gst_parse_yyparse: syntax error
0:00:00.016977967  1241      0x1ce56c0 ERROR           GST_PIPELINE grammar.y:1061:priv_gst_parse_yyparse: syntax error

How can I solve this error? it looks like yyparse error ?
thanks in advane.

Hi @lionmat
Seems like one of the required ! is missing . Please try :
GST_DEBUG=FIXME gst-launch-1.0 rtspsrc location=<rtsp stream> ! queue ! short-header=TRUE ! rtph264depay ! video/x-h264, format=avc,alignment=au ! kvssink stream-name= <stream name> storage-size=512 access-key=<access-key> secret-key=<secret-key> aws-region=<region>

Hi @unicornss, thanks for your help.
I fixed my command like below and it works but I got an another error.
gst-launch-1.0 rtspsrc location=<rtsp stream> short-header=TRUE \
! queue \
! rtph264depay \
! video/x-h264, format=avc,alignment=au \
! kvssink stream-name=<stream name>  storage-size=512 access-key=<access-key> secret-key=<secret-key> aws-region=<region>

looks like curl ssl error.
curl perform failed for url https://kinesisvideo.ap-northeast-1.amazonaws.com/describeStream with result SSL connect error: error:1408F10B:SSL routines:ssl3_get_record:wrong version number

so I followrd the link  to rebuild local curl.
but I couldn't find /etc/ssl/cert.pem.
Do I have to copy /kinesis-video-native-build/certs/cert.pem to /etc/ssl/cert.pem ?
I also tried to install with -c option, but it looks like similar problem.
cert.pem file does not exist in the /opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build directory

Can you please refer the steps here:
https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp/blob/master/install-instructions-macos.md#install-the-certificate-in-the-operating-system-certificate-store
Thanks

Thanks for your help.
I followed the instruction and downloaded pem file to /etc/ssl/cert.pem.
and then I use below command to re-install curl.
$ cd /opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build
$ rm downloads/local/lib/libcurl*
$ rm downloads/local/bin/curl*
$ cd downloads
$/usr/bin/curl -L "https://curl.haxx.se/download/curl-7.57.0.tar.xz" -o "curl-7.57.0.tar.xz"
$ tar -xvf curl-7.57.0.tar.xz
$ cd curl-7.57.0
$ export DOWNLOADS=/opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads
$ ./configure --prefix=$DOWNLOADS/local/ --enable-dynamic --disable-rtsp --disable-ldap --without-zlib --with-ssl=$DOWNLOADS/local/ --with-ca-bundle=/etc/ssl/cert.pem
$ make
$ make install

$ which curl
/opt/amazon-kinesis-video-streams-producer-sdk-cpp/kinesis-video-native-build/downloads/local/bin/curl
$ local/bin/curl-config --ca
/etc/ssl/cert.pem

it looks ok... but I still have error.
$ curl https://kinesisvideo.ap-northeast-1.amazonaws.com
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number

[Solved]
I needed to set proxy inside docker container process.
I could send video stream to kvs, thanks for your help @unicornss !


Some suggestions to make usage more clear

The flow is confusing at the moment and took me a while to figure out that I had to go to a different directory.
I'd like to be able to go to my directory, then yo ng2component. Instead I had to go up one directory.
Suggestion:

yo ng2component
component or service
Component folder name? (I didn't know that the folder would be the same as the component)

instead ask Folder and component name?

Resides location?

instead ask "Resides location (/ for current)?" - then make this work (I'm getting errors when I enter /)

Style sheets?

once I choose one, please default it to that like the questions above.

Extra request: allow me to choose not to create the index.ts file. I'm going to end up deleting it every time.
Thanks for this generator. I'm using https://github.com/aspnet/JavaScriptServices/ and couldn't figure out how to get the @angular/cli working inside of it. I didn't want to create all these files by hand.

Hi @aligneddev Kevin, thanks for suggesting so many good ideas. As you suggested, I've already updated generator-ng2component to version 1.0.9, which includes all new improvements you mentioned. For question 4, actually you can type . or ./ as current location (should support all unix-style directory format such as .././). And, you're right, @angular/cli only supports angular-cli-generated-projects, that's the reason why I made this one at the beginning. Again, thanks for your contributions! If you still find issues for v1.0.9, feel free to contact me. if it looks good to you, let me know and I'll close this ticket.

Thanks for the quick response. This is much improved!


Write content for IdP creation forms

Add inline helper docs to IdP forms

Refs #2597

Refs #2674

Closing in favor of #2021

Re-opening -- Google Workspace connector needs to be set up like a special case of the OIDC connector.

Done


Expression Transfer

Great work; thanks for this - how can we do expression transfer between 2 identities here?

You can use multiple samples (each sample corresponds a latent code) to train our model, and then it is easy to do expression transfer by changing the latent code of different identities or different expressions.


Character Loading

the URL isnt working. i mean the Ui is running but the choosing characters is not showing up instead its loading

As it runs on a free server, the backend sometimes takes some time to boot up. Try refreshing and waiting and it will return the characters list! LMK if it still does not work.


proxyless: performance optimization ideas

Ideas:

Handle only pages (change pattern) by-default. Change the target pattern to ALL_REQUESTS_DATA only if the request hook is added to the test.
rewrite transport with WebSockets protocol
don't calculate the whole DomNodeState snapshot on a single property getting.

Handle only pages (change pattern) by-default. Change the target pattern to ALL_REQUESTS_DATA only if the request hook is added to the test.

Declined. @AlexKamaev performed measures, and there is no serious speed increase.

don't calculate the whole DomNodeState snapshot on a single property getting.

Declined. @miherlosev performed measures and found out that DomNodeState snapshot calculation takes less 0.5 % time of the test execution.

rewrite transport with WebSockets protocol

Implemented


Multiple cache-control headers are not handled

Describe the bug
While debugging some code I came across a situation where the server returned a response with multiple cache-control header values. This is valid according to RFC2616 but it will currently cause stash_dio to throw an exception ('"cache-control" header has more than one value, please use Headers[name]')
To Reproduce
Make a request to an endpoint returning several cache-control header values
Expected behavior
The values are concatenated, interspersed with commas
Version
Flutter 2.2.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b22742018b (5 weeks ago) • 2021-05-14 19:12:57 -0700
Engine • revision a9d88a4d18
Tools • Dart 2.13.0
Additional context
Relevant section of RFC2616
Stack overflow question

This interceptor seems to function as a workaround:
static final _cacheControlWrapper = InterceptorsWrapper(
    onResponse: (response, handler) {
      final cacheControl = response.headers["cache-control"];
      if (cacheControl != null && cacheControl.length > 1) {
        response.headers.set("cache-control", cacheControl.join(","));
      }
      handler.next(response);
    },
  );

Thanks for the report @tjarvstrand I will take a look at this during the weekend

Fixed, it was easy to simulate although your complete description helped a lot. I've added a unit test for this and actually used a similar solution as the one you employed on the workaround as per RFC spec two separate cache-control headers are the same as one with the values separated by commas. It's now available on the latest version of stash_dio ^3.0.2

Great! Thanks!


Format of date literal in stats_list

def stats_list(self, list=None, date=None):

Which format does date have to be in? E.g. 03-04-2015, 20150403 etc.
The YYYYMMDD format appears to yield good results, but I'd like to have a clear cut statement from the devs.
Thanks.

Our documentation states that dates should be in the YYYY-MM-DD. However YYYYMMDD is also acceptable as you have tested. So long it's a string variable.

Thanks for the answer.
Closing as solved.


When used with Chrome on Ubuntu, the scroll wheel functions abnormally

Type: Bug
When using VSCODE with Chrome on Ubuntu, a single scroll achieves an undesired scroll distance.
Environment: Ubuntu 22.04+VS+Chrome/Edge
Steps to reproduce the problem: Use VS to open a text file of about 100 lines, at this time scroll up and down once, about 3 lines to move. With the scroll bar at the top, then switch to Chrome or Edge, and on a longer page where the scroll bar will appear, left-click once on the page area to give the page focus, and use the scroll wheel to scroll down a certain distance. Then switch back to VS, you will find that after switching back to VS, the distance that the first scroll wheel scrolls should have been about 3 lines, but it was the distance that was just scrolled on chrome/edge. There is a similar problem with scroll wheel scrolling down.
VS Code version: Code 1.73.1<PHONE_NUMBER>f055b99068d3688932416f2346dd3b, 2022-11-09T03:54:53.913Z)
OS version: Linux x64 5.19.0-41-generic
Modes:
Sandboxed: No

System Info

Item
Value

CPUs
AMD Ryzen 7 4800H with Radeon Graphics (16 x 1895)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: disabled_offdirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_renderer: enabled_onvideo_decode: disabled_softwarevideo_encode: disabled_softwarevulkan: disabled_offwebgl: enabledwebgl2: enabledwebgpu: disabled_off

Load (avg)
1, 1, 0

Memory (System)
15.00GB (10.25GB free)

Process Argv
--unity-launch --crash-reporter-id d8b400fd-0a9a-4f01-ac84-cf606b2f1d2f

Screen Reader
no

VM
0%

DESKTOP_SESSION
ubuntu

XDG_CURRENT_DESKTOP
Unity

XDG_SESSION_DESKTOP
ubuntu

XDG_SESSION_TYPE
x11

Extensions (26)

Extension
Author (truncated)
Version

htmlplay
bia
0.0.10

compare-view
che
0.13.0

fastcompare
Dav
1.1.1

file-script-runner
jer
1.2.0

autoconf
mae
0.2.0

mesonbuild
mes
1.9.0

compare-folders
mos
0.22.5

csharp
ms-
1.25.8

vscode-edge-devtools
ms-
2.1.1

isort
ms-
2022.8.0

python
ms-
2022.18.2

vscode-pylance
ms-
2023.1.10

jupyter
ms-
2022.9.1303220346

jupyter-keymap
ms-
1.1.0

jupyter-renderers
ms-
1.0.14

vscode-jupyter-cell-tags
ms-
0.1.8

vscode-jupyter-slideshow
ms-
0.1.5

remote-ssh
ms-
0.96.0

remote-ssh-edit
ms-
0.84.0

cmake-tools
ms-
1.14.31

cpptools
ms-
1.15.4

hexeditor
ms-
1.9.9

remote-explorer
ms-
0.4.0

vscode-typescript-next
ms-
5.2.20230603

vscode-yaml
red
1.13.0

cmake
twx
0.0.17

A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
pynewext54:30695312
azure-dev_surveyone:30548225
vscccc:30610679
282f8724:30602487
pyind779:30671433
f6dab269:30613381
pythonsymbol12:30671437
showlangstatbar:30737416
pythonms35:30701012
pythonfmttext:30731395
pythoncmvfstrcf:30756944
fixshowwlkth:30730052
pythongtdpathcf:30739705

update: the latest version has the same problem.
Version: 1.78.2
Commit: b3e4e68a0bc097f0ae7907b217c1119af9e03435
Date: 2023-05-10T14:47:05.613Z
Electron: 22.5.2
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: <IP_ADDRESS>-electron.0
OS: Linux x64 5.19.0-41-generic
Sandboxed: No

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.78.2. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!

感谢您创建此问题！
然而，由于您没有使用英语，我们很难进行处理。如果可能，请您将此问题描述修改为英文。请您直接编辑此问题，不要提交回复或新问题。
请注意，机器翻译服务通常无法处理用于讨论软件问题所需的技术性语言，所以我们推荐您寻找一位熟悉相关技术的人来协助翻译。
如果您无法做到，没有关系。此问题已经被标记为需要翻译，等待社区成员志愿进行翻译。

Thanks for creating this issue!
Unfortunately, as the description is not in English, it's hard for us to work on. If possible, please edit the original issue to be in English.
In our experience, automatic translation services are not able to handle the technical language needed to effectively communicate about software issues, so we recommend finding a human translator who is familiar with our technology to help.
Otherwise, we have marked this as needing translation and a community member may be able to help out.

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!

@jrieken


[feature request] upload on instance of *Factory.

It would be nice to have a DSL to upload code to chain like we have for new.
Consider the code that uploads and initialises (called new in this lib parle):
await my_contract.new(arg1, arg2, ..., { options });

The code above will do both: upload the my_contract contract and calls new constructor on it.
But sometimes we want to just upload and that's not available directly on any of the types. We have to
const contractRaw = JSON.parse(
    fs.readFileSync(`my_contract.contract`, 'utf8')
  );
  const abi = new Abi(contractRaw);
  await new Promise(async (resolve, reject) => {
    const unsub = await abi.tx.contracts
      .uploadCode(abi.info.source.wasm, null, 0)
      .signAndSend(deployer, (result) => {
        if (result.isFinalized) {
          unsub();
          resolve(result.txHash);
        }
        if (result.isError) {
          unsub();
          reject(result);
        }
      });
  });

I think it's clear why I'd prefer to write:
await mycontractFactory.upload(...);

Hi @deuszx , thank you for the suggestion! Yes, I think we can consider adding that. I also thought about some auto-deploy functionality where you can just make some simple JSON file, with all the necessary data, init value etc. And by running some typechain deploy it will go through all contracts and deploy them with init, and then you just need to connect to the contract by the address provided. Would it be useful?

@varex83 For some use-cases, most probably yes, but I want to control the moment it's uploaded myself. Currently I'm writing deployment pipelines in TS and upload manually precisely when I need it so the auto-deploy feature would not be useful to me at least.

Okay, thank you for your feedback, I will talk with our team if we have the capacity for fixing all bugs and implementing this feature.
Will get back to you soon!


[Bug]: Action plan: Parts of the content is framed, not consistenly and not as per Ahoy's mock up

Issue description
See here a random example of an action plan https://staging.sdg-innovation-commons.org/pads/action plan/1588
Some parts of the content are frame, a bit randomly when it should be plain text.
Where did this happen?

https://staging.sdg-innovation-commons.org/pads/action plan/1588
What do you expect?
Follow Ahoy's guidance
What browsers are you seeing the problem on?
Firefox, Microsoft Edge
Add any other relevant details
No response

Thanks for reporting this. The url that span out of the box is indeed a problem. The rest actually follows the design provided by Ahoy. They contained "grouped" elements in the page.


Add method has

Hi)
Now its very inconvenience write all time:
$inCart = Cart::search(function($item) use ($product) {
    return $product->id == $item->id;
})->count();

Need shortcut Cart::has($product)

What is your use case for this?

For iterate products and show button "already in cart" => go to checkout order, else "add to cart"

Feel free to submit a PR I can look at


Prometheus remote write to Thanos Receiver (AWS ALB) 502 bad gateway and err="context canceled"

Thanos, Prometheus and Golang version used:
thanos:v0.28.0
Prometheus: 2.37.0

Object Storage Provider:
AWS S3
What happened:
I have setup the Thanos Receiver and expose it through an AWS ALB. Then configure Prometheus (in another EKS cluster) remore_write to send WAL logs to this endpoint.
remote_write configs:
      - url: https://thanos-receiver.foobar.com/api/v1/receive
        remote_timeout: 360s
        queue_config:
          capacity: 2500
          max_backoff: 10s
          max_samples_per_send: 500
        tls_config:
          ca_file: /etc/prometheus/certs/ca.crt

What you expected to happen:
Prometheus should be able to send the WAL logs without errors. But I can see these issues in prometheus logs.
../api/v1/receive msg="Failed to send batch, retrying" err="server returned HTTP status 502 Bad Gateway: <html>"
---
msg="Failed to send batch, retrying" err="Post \"https://thanos-receiver.foobar.com/api/v1/receive\": context canceled"

Anything else we need to know:
I have set the ALB idle time out to 600s to avoid the timeouts, but didn't helped.

Please check the thanos logs for errors.

I am also facing the same issue. Can someone help

Do you have some more information? Can you check thanos logs and provide some infos on the particular thanos setup please?

I am trying to remote write data from a Prometheus server to AKS cluster where thanos components are deployed using helm. Both are in the same vnet. I also added ingress for thanos-receive at port 10902.
And the prometheus remote_url is
url: http://abc.xyz.com/thanos-receive/api/v1/receive
getting below error
level=error remote_name=e7b957 url=http://abc.xyz.com/thanos-receive/api/v1/receive msg="non-recoverable error while sending metadata" count=259 err="server returned HTTP status 404 Not Found: 404 page not found"
Am i giving correct url? any suggestions?


[V8] Let's be sure that all the db tables use the configured charset

I just experienced #8981 while trying to upgrade one of our websites from 8.5.2 to 8.5.4.
It turned out that we had mixed collations for the database tables. This prevents the creation of foreign keys (because the linked columns must all use the same collation).
I don't know how this may happen. BTW, to fix this issue, it's enough to reset the collation of all the database tables to the configured values.
For this reason I added a reapply method to the Concrete\Core\Database\CharacterSetCollation\Manager class, and a migration that calls it.
Closes #8981

PS: this pull request is against the concrete8 v8 branch. Should I open another pull request for the develop branch?

Yeah, you'll have to open another one, just in case someone tries updating from 8.5.2 all the way to 9.0.


Preserve for split panes only

Similar to #2 - it'd be great to be able to configure when the directory is preserved.
In iTerm I only preserve the directory when splitting a pane.

Seems like a nice config option @jakearchibald

Marking this as an enahancement

Is this being worked on at all? I don't know the codebase at all but it's a feature I'm interested in and am willing to help out

Hi @adrianObel 👋
This would be a great one to get some help on!
I think the configuration would look like this:
module.exports = {
  config: {
    // ... other config options

    // add the hypercwd configuration object like this
    hypercwd: {
      initialWorkingDirectory: '~/Documents',
      setNewTab: true, // default to true if not set for all of these new options
      setNewWindow: true,
      setNewPane: true,
    }
  },
}


Error adding to Webjars using bower

http://www.webjars.org/bower -> add a new bower webjar
Failed!
No valid licenses found. Detected licenses: Apache
The acceptable licenses on BinTray are at: https://bintray.com/docs/api/#_footnote_1
License detection first uses the package metadata (e.g. package.json or bower.json) and falls back to looking for a LICENSE, LICENSE.txt, or LICENSE.md file in the master branch of the GitHub repo.
Since these methods failed to detect a valid license you will need to work with the upstream project to add discoverable license metadata to a release or to the GitHub repo.
If you feel you have reached this failure in error, please file an issue: https://github.com/webjars/webjars/issues
Created Bower WebJar
Fetched Bower zip
Generated POM
Converted dependencies to Maven
Got Bower info
Determined Artifact Name: Leaflet.VisualClick
Starting Deploy

Closed by #7.
@gavioto In the future, please explain yourself better in bug reports - a copy-paste of an error message is not a bug report. I suggest you read http://www.chiark.greenend.org.uk/~sgtatham/bugs.html


How do I enable the AI Chat?

I'm trying to enable AI chat in this thing and can't seem to make this work.
I've added an endpoint and key in the appsettings for the AppHost project where it asks for one. In the WebApp project it only has "ChatModel" commented out. So tried then adding the deployment model name for GPT 3.5 16K for the account I am referencing above. Not working either.
Not sure what to try next. This says to add an API key but there is no placeholder for this.

Anybody else figured out how to make this work?

Anybody else having this problem?
I'd really like to get this to work as I am using eShop to shoot a video on how to build a purchasing prediction feature using ALS that also includes doing filtering a vector search using this prediction data.
thanks.

@stephentoub  are we able to add documentation for this?

When using Azure OpenAI, inside eShop.AppHost/appsettings.json, add the following section.
  "ConnectionStrings": {
    "OpenAi": "Endpoint=xxx;Key=xxx;"
  }

Replace the values with your own.
Then, in the AppHost Program.cs, set this value to true
https://github.com/dotnet/eShop/blob/faeb3fae58d08800d0f49b04d71d18309965232c/src/eShop.AppHost/Program.cs#L73
Here's additional guidance on the Aspire OpenAI component.
https://learn.microsoft.com/dotnet/aspire/azureai/azureai-openai-component?tabs=dotnet-cli

Thank you! @luisquintanilla and @jamesmontemagno


Deprecate room=class; use  room=classroom instead

Bug: #1355
Change-Id: I90545a86f84877fea5908fd097334b87b98682e7
Description, Motivation & Context
"classroom" is now a conpound word and being used more frequently than the old 2-word "class room".
The page "Tag:room=classroom" was created first.
The page "Tag:room=class" was never created as a non-redirect page.
Links and data
Relevant OSM Wiki links:

https://wiki.openstreetmap.org/wiki/Tag:room%3Dclassroom

Relevant tag usage stats:

https://taginfo.openstreetmap.org/tags/room=class
https://taginfo.openstreetmap.org/tags/room=classroom
https://taghistory.raifer.tech/#***/room%3Dclass/&***/room/classroom

Checklist and Test-Documentation Template
Read on to get your PR merged faster…
Follow these steps to test your PR yourself and make it a lot easier and faster for maintainers to check and approve it.
This is how it works:

After you submit your PR, the system will create a preview and comment on your PR:

🍱 You can preview the tagging presets of this pull request here.
If this is your first contribution to this project, the preview will not happen right away but requires a click from one of the project members. We will do this ASAP.

Once the preview is ready, use it to test your changes.

Now copy the snippet below into a new comment and fill out the blanks.

Now your PR is ready to be reviewed.

## Test-Documentation

### Preview links & Sidebar Screenshots

<!-- Use the preview to find examples, select the feature in question and **copy this link here**.
     Find examples of nodes/areas. Find examples with a lot of tags or very few tags. – Whatever helps to test this thoroughly.
     Add relevant **screenshots** of the sidebar of those examples. -->

<!-- FYI: What we will check:
     - Is the [icon](https://github.com/ideditor/schema-builder/blob/main/ICONS.md) well chosen.
     - Are the fields well-structured and have good labels.
     - Do the dropdowns (etc.) work well and show helpful data. -->

### Search

<!-- **Test the search** of your preset and share relevant **screenshots** here.
     - Test the preset name as search terms.
     - Also test the preset terms and aliases as search terms (if present). -->

### Info-`i`

<!-- **Test the info-i** for your fields and preset and share relevant **screenshots** here.
     The info needs to help mappers understand the preset and when to use it.
     [Learn more…](https://github.com/tordans/id-tagging-schema/blob/main/CONTRIBUTING.md#info-i)
 -->

### Wording

- [ ] American English
- [ ] `name`, `aliases` (if present) use Title Case
- [ ] `terms` (if present) use lower case, sorted A-Z
<!-- Learn more in https://github.com/openstreetmap/id-tagging-schema/blob/main/GUIDELINES.md#2-design-the-preset -->

@winstonsung I am not sure a deprecation is the right approach here to remove the tag. This came up before, so I wrote about it here https://github.com/openstreetmap/id-tagging-schema/pull/1357/files#diff-22e674f3d1da91695fbafd4d2c81f91246cfabab3d16dcf6492e6024797b4da5
We can wait for input by others to see if they would thinks this a good fit for the deprecation rules. However I suggest you look into the other methods mentioned in the linked section.

I am not sure a deprecation is the right approach here to remove the tag.

If your task is small enough, a few editing sessions in JOSM will often do the trick.

I know the deprecated.json would only show up on iD when editing the element with the tag, and that's what I intended to do.
I've already done the clean up by using JOSM.

https://overpass-turbo.eu/?key=room&value=class&template=key-value

Warning to others: You are not allowed to make undiscussed mass retagging internationally without following such rules https://wiki.openstreetmap.org/wiki/Automated_Edits_code_of_conduct

DWG comment https://www.openstreetmap.org/changeset/157697294
https://www.openstreetmap.org/changeset/157697294

https://www.openstreetmap.org/changeset/157697989
https://www.openstreetmap.org/changeset/157687202
Both of your argument are false

Creation of documentation doesn't approve or disapprove of a tag
Your Taghistory URL is bugged. =class is still more numerous, and growing faster.

So we should do it in the opposite way?

No, you shouldn't do anything until you have asked and reached a consensus, besides following all the regulations. At least I'm indecisive on this.

Your Taghistory URL is bugged. =class is still more numerous, and growing faster.

Is there any known issue that caused the bugged diagram?

Thank you for this change! Even if this pull is not merged it's good that we at least have a tagging discrepancy resolved. I'm an avid indoor mapper so it's good to see this going somewhere.


GPU

Hello Lei Mao,
Does your code run with gpu ? if so which version of tensorflow-gpu should I install ?
looking forward for your answer,
Thanks,

It's written in the README.md, but it should be tensorflow-gpu 1.8. I can confirm that it also works reasonably well, with tensorlfo-gpu 1.9.


Pin to Quick Launch in Context Menu

The fastest way I know of adding a program to Quick Launch is by first dragging it to Programs, and then right-clicking on it to be added into Quick Launch.
Unless I'm missing something, consider adding "Pin to Quick Launch" in the Context Menu, just like I can normally "Pin to Start" or "Pin to Taskbar".

This is a duplicate of issue #262.
I have code in my fork that resolves this to an extent.
Feel free to download and build the fork to get the feature before its merged

Thanks. Sorry I tried to search make sure it wasn't a duplicate.
I don't know how to apply your suggestion. My skills are about as good
as double-clicking on an .exe in windows, haha.
I can do without, just thought it'd be nice to have.
On 6/22/2019 11:04 AM, Joe wrote:

This is a duplicate of issue #262
https://github.com/cairoshell/cairoshell/issues/262.
I have code in my fork that resolves this to an extent.
Feel free to download and build the fork to get the feature before its
merged
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/cairoshell/cairoshell/issues/271?email_source=notifications&email_token=AMNRFL4R5DVSFZ3T3AG5OG3P3Y5RLA5CNFSM4H2W53V2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYKLGOY#issuecomment-504673083,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMNRFL4KJEBCZJBEJUOGGMDP3Y5RLANCNFSM4H2W53VQ.

That’s OK. My code changes Will be included with the main project at some point in the future. Just needs to go through an approval process. The basic idea is you  right click the icon for the running process and be able to pin it to the quick lunch.

This is now available in the latest release.


openssl: Update to pristine 1.0.2o (security update)

Fixes:

Constructed ASN.1 types with a recursive definition could exceed the stack (CVE-2018-0739)

Will also cherry-pick for 2.1 - master is not affected.

The build failure for the server platform on Travis is a false positive (cache issue).


Backport "[ruby]: add pre-compiled binaries for ruby 3.2; drop them for ruby 2.6 #32089" to v1.52.x

Backports #32089
Also note follow-up https://github.com/grpc/grpc/pull/32162

Ruby failure looks like pre-existing flake: b/266212253


Refactor Hashing Prefix to use Hex Values

Description

Convert watermarks to int and transform the resulting hash into a 3 character hex string
Rename types to be consistent with interface
Include work item names in file name interface
Use pointers for faster hashing

Related issues
N/A
Testing
Pipeline and new tests

These changes are awesome. But unfortunately it will break WADO.


local-gadget-tracer-manager: Fix leak fds testing

Increase the maximum time we wait before failing the test to give enough
time to the runcnotify poll logic to finish.
I run the tests 11 times in https://github.com/kinvolk/inspektor-gadget/actions/runs/2476289888 and all of them are passing.
This issue was introduced in https://github.com/kinvolk/inspektor-gadget/pull/656.

Merging as it is a fix for the CI tests that are always failing.


Speed up prepare-features

For a large singing-databese, preparing features can be the 1st or 2nd bottleneck in training. I made it faster (certified).

Speed up prepare-features by multi-threading using joblib.Parallel()
Use logger.info(OmegaConf.to_yaml(config)) instead of logger.info(config.pretty()) to avoid warnings
Remove unused imports

Sorry for the late reply. I have been busy at work. I will get to review once I get some time!

BTW, we can ignore CI errors. I will fix pysinsy https://github.com/r9y9/pysinsy/issues/6 and CI accordingly.

Done fixing the pysinsy and CI issues (https://github.com/r9y9/nnsvs/pull/51). You can fix CI by merging or rebasing on master.

Sorry for having you wait so long. I've just learned about git rebasing. Now I'm learning concurrent.futures.ProcessPoolExecutor and developing the codes above. Thank you.

誤って re-review をリクエストしてしまいました。無視していただけますと幸いです。

In prepare_features, Changed to use ProcessPoolExecutor with config.max_workers.

What do you think about the config name "max_workers"? Would it be better to use "n_jobs" or "num_workers" than "max_workers"?

Added a new line max_workers: none into bin/conf/prepare_features/config.yaml.

Thank you for the checking and fixing!


Improvement: Add additional CLI options for video source

A user should be able to specify the source of the video file, not just a youtube URL.
A url passed as an argument should be validated to be within the 'supported' list of URLs, and a '--force' option made available for situations where yt-dlp is known to work but not explicitly support.
It should also be possbile to specify '--local', and have a local video or audio file, as well as all audio or video files within a specified folder '--folder',  for transcription.

https://github.com/yt-dlp/yt-dlp/blob/master/supportedsites.md

Not going to reinvent the wheel. ytdl will perform its own checks.


NoMethodError: protected method `around_validation'  in Rails 4.1.0.beta1

Store.first.save
  Store Load (0.9ms)  SELECT  "stores".* FROM "stores"   ORDER BY created_at LIMIT 1
   (0.2ms)  BEGIN
   (0.1ms)  ROLLBACK
NoMethodError: protected method `around_validation' called for #<StateMachine::Machine:0x007f674cc70f78>

The model has just statemachine
  belongs_to :vendor
  state_machine :state, :initial => :new do
  end

Mm, I've been using the forked version (seuros above) for sometime in 4.1.x and it's working fine. In 4.2 it fails utterly. I'm trying to look into now as I have a project to finish soon. But I think my work around will be to maintain state myself until I get a chance to dive into it.

Guys take a look
https://github.com/gocardless/statesman

getting this problem on Rails 4.2, looks like @seuros' fork only works for 4.1?? :(

@davidcpell : https://github.com/state-machines/state_machines-activerecord, there is just 1 small bug in 4.2. (initial state is not persisted, but can be worked around by either setting the default in the column or having a before_create callback)

@JohnSmall unless you are using Mongoid or another integrations, can you check if SM-AR works for you ?


chore: sync monitoring stack changes to AS

py-mtcli
Description
MonitoringStack APIs are available in stage, hence, making this PR to incorporate monitoring_stack payloads as well in AS API calls.
More details - https://gitlab.cee.redhat.com/ocm/ocm-addons-service/-/merge_requests/177/diffs
Short description of the change:

modified X
modified Y
modified Z

Checklist
For any modification to managedtenants/bundles/

[ ] $ managedtenants --addons-dir=../managed-tenants-bundles/addons --dry-run bundles (successfuly built all addons)
[ ] $ managedtenants -addons-dir=../managed-tenants-bundles/addons --addon-name=<addon> bundles --quay-org <personal_org> (successfuly built and push a single addon)

/retest

/retest

/retest

/retest


Initial draft of the array APIs SciPy proceedings paper

I have an initial draft of the array APIs SciPy proceedings paper here.
There are still some TODOs in the document, most notably I still need to come up with a good motivating example to show in the introduction, and potentially to make reference to throughout the document (see #2). Any suggestions there are welcome.
I'll be on PTO for the next week, so if people want to take a look, please do. Feel free to comment here any suggestions, or to push or PR suggestions as well. I'm particularly looking for high level suggestions, like if the overall outline of the content looks good, and if there is anything that I omitted or anything that should be trimmed down. A couple of pieces of the text are cribbed from the spec.
Here's a PDF to give an idea of what the final thing will look like. There is an 8 page limit (not including references). (I'm not going to keep this updated though so please make reference to the rst file)
The deadline for the draft submission is May 26. Anyone who wants to be any author on the paper will need to sign off on it, and also will need to be added on the SciPy website.

By the way, to build the PDF:

Clone https://github.com/scipy-conference/scipy_proceedings
Create a new directory papers/01_arrayapi/ and copy the paper materials (paper.rst and the diagrams like dtype_promotion_lattice.pdf into that directory). Alternatively you should be able to just symlink or clone this repo to that directory.
Run ./make_paper.sh papers/01_arrayapi/ and open output/01_arrayapi/paper.pdf.

One unfortunate thing I noticed: they aren't using Sphinx, just plain docutils. So I don't think it it's possible to add captions to the code examples, as that's a Sphinx only feature. If we decide we want that we will need to work with the proceedings team to figure out how to do it.

If it's not too much of a lift, may be nice to setup a GitHub workflow which automatically builds the PDF on each commit, as part of CI.

I have set up a GitHub Actions build which saves the paper as an artifact. You can download the artifact by going to the latest build at https://github.com/data-apis/scipy-2023-presentation/actions and clicking the artifact at the bottom. Unfortunately, the artifact is always saved as a zip file. If that's too annoying, we can instead add something that uploads it to a branch on the repo using https://github.com/marketplace/actions/deploy-to-github-pages

Thanks for adding the workflow!

btw @asmeurer do we have the latest adoption/coverage data? It'd be nice to refer to in the paper, I think.

Adoption and coverage is still not great, so we'll need to think about how to weave the narrative.

I see, so maybe just refer to the data that we collect & tool that we use for tracking the adoption?

Agreed. Will add.

I have submitted the paper https://github.com/scipy-conference/scipy_proceedings/pull/822. If you want to make any further edits to the paper, please make sure those edits get added to that pull request.


Add choices and documentcloud_pages to CvrE530Cd.type_other (in common.py)

Overview
Add choices and documentcloud_pages to the type_other field on CvrE530Cd the database model.
Basically, we think type_other should be defined as a "choice field" (in Django parlance), which just means it's a field with a defined list of valid values and an intelligible definition for each value.
Our goal is for every potential choice field to include references to locations in the official documentation where the field's valid values and their meanings are described AND to have those choices included in the field's definition.
And we need your help!
What to do
Step 1: Claim this ticket by adding yourself as an Assignee (to the right)
Step 2: Find where in the official documentation type_other's list of valid values is defined.
The best place to look first is in the .CAL layout documents: .CAL Format version 2.01 and .CAL Format version 1.05.02. These are documents that describe the layout of the .CAL file format, which is the required electronic format of any filings ingested by the CAL-ACCESS system (more on that here if you are interested).
You can start by opening the document and just searching for "type_other". For example, if you were assigned to tackle the stmt_type field on the CvrCampaignDisclosureCd model, you would be looking for something like this::

But note that the same column might appear on multiple tables, and the list of valid values may vary depending on the table. We want to be sure to find the list of valid values for the type_other on the CvrE530Cd model.
Another good place to look is in the MapCalFormat2Fields document, which describes how .CAL format fields are mapped to CAL-ACCESS database table columns. Note the Valid_V column on the far right.
Step 3: Copy the DocumentCloud ID and the page number(s) where type_other's list of valid values is defined.
The DocumentCloud ID can be found the in the URL that points to the document. For example, the url to the .CAL Format version 2.01 doc is http://www.documentcloud.org/documents/2712034-Cal-Format-201.html#document/p1, and the id is 2712034-Cal-Format-201.
And the start page we want to grab is the DocumentCloud page number, not the page number printed on the .PDF. If the list of valid values spans multiple pages, then grab the page where the list ends as well.
Step 4: Find where type_other is defined in common.py in the /calaccess_raw/models/common.py file underneath the CvrE530Cd class.
Since the model files are rather long, take care to be sure you find the where type_other is defined for the CvrE530Cd model. It should look something like this:
    class CvrE530Cd(CalAccessBaseModel):
        # ...
        # several lines of code later...
        # ...
        type_other = fields.IntegerField(
            max_length=None,
            db_column='TYPE_OTHER',
            blank=False,
            verbose_name='type other',
            help_text='This field is undocumented',
        )

Step 5: Add the document references
Say you found the list of valid values listed in three places. You would list them in the documentcloud_pages attribute like this:
    class CvrE530Cd(CalAccessBaseModel):
        # ...
        # several lines of code later...
        # ...
        type_other = fields.IntegerField(
            max_length=None,
            db_column='TYPE_OTHER',
            blank=False,
            verbose_name='type other',
            help_text='This field is undocumented',
            documentcloud_pages=[
                DocumentCloud(id='2711616-MapCalFormat2Fields', start_page=10),
                DocumentCloud(id='2712033-Cal-Format-1-05-02', start_page=19),
                DocumentCloud(id='2712034-Cal-Format-201', start_page=24, end_page=25),
            ]
        )

Note: You only need to specify the end_page if the list spans multiple pages.
Step 6: Update the type_other's help_text (if necessary)
It might be missing or it might be an empty string or it might not be consistent with what you see in the documentation. Note: The entire help_text string needs to be enclosed in single- or double-quotes like this:
    help_text='This is the help text',

If the help text is really long (80+ characters), then it needs to span multiple lines like this:
    help_text='This is the help text...blah...blah...blah...blah...blah...blah...\
...blah...blah...blah',

Step 7: Define the choices
The normal Django pattern is to define choices within the model class as a tuple which contains a bunch of two item tuples. The first item of each inner tuple is the valid database column value, and the second item is the definition. It should look something like this:
    TYPE_OTHER_CHOICES = (
        ('AAA', 'Some definition of AAA'),
        ('BBB', 'Some definition of BBB'),
        ('CCC', 'Some definition of CCC'),
        # ...and more..
    )

Then we assign this tuple of tuples to 's choice argument with a single line: choices=TYPE_OTHER_CHOICES.
When finished, it should all look something like this:
    class CvrE530Cd(CalAccessBaseModel):
        # ...
        # several lines of code later...
        # ...
        TYPE_OTHER_CHOICES = (
            ('AAA', 'Some definition of AAA'),
            ('BBB', 'Some definition of BBB'),
            ('CCC', 'Some definition of CCC'),
            # ...and more..
        )
        type_other = fields.IntegerField(
            choices=TYPE_OTHER_CHOICES,
            max_length=None,
            db_column='TYPE_OTHER',
            blank=False,
            verbose_name='type other',
            help_text='This field is undocumented',
            documentcloud_pages=[
                DocumentCloud(id='2711616-MapCalFormat2Fields', start_page=10),
                DocumentCloud(id='2712033-Cal-Format-1-05-02', start_page=19),
                DocumentCloud(id='2712034-Cal-Format-201', start_page=24, end_page=25),
            ]
        )

So some of these choice fields show up on multiple tables (the various office_cd fields are a good example), and of course it's rather redundant to repeat these values and their definitions over and over. In some these cases, we've consolidated these valid values into one place: calaccess_raw/annotations/choices.py.
So then instead of listing out all the choices in the tuple of tuples, we can do this:
    OFFICE_CD_CHOICES = get_sorted_choices(choices.OFFICE_CODES)
    office_cd = fields.CharField(
        choices=OFFICE_CD_CHOICES,
        # ...other stuff...
    )

If you think the field your looking at is a candidate for this sort of consolidation, let's have a conversation about it. Just post a comment below.
If you can, check the type_other's defined choices against the actual values in type_other's database column.
This will require you to install the app and run the updatecalaccessrawdata command. Then you can get the distinct column values with a GROUP BY query like this:
    SELECT TYPE_OTHER, COUNT(*)
    FROM CVR_E530_CD
    GROUP BY 1
    ORDER BY 1;

It's likely that you'll find undocumented values in database column, some of which are variants of the valid values. You can note these by repeating the same definition for each variant like this:
    OFFICE_CD_CHOICES = (
        ('GOV', 'Governor'),
        ('gov', 'Governor'),
        ('GUV', 'Governor'),
        # ...
    ),

If you're dealing with a set of choices that's been consolidated into calaccess_raw/annotations/choices.py, you can map the different variants to the same definition using the key of the choices dict like this:
    OFFICE_CD_CHOICES = (
        ('gov', look_ups.OFFICE_CODES['GOV']),
        ('GUV', look_ups.OFFICE_CODES['GOV']),
        # ...
    ),

If you're not able to check the database column values for whatever reason, don't sweat it. We'll deal with it in a later issue.
Wrap up: Review your changes and create a pull request

That's it!
PS: If any of this feels confusing, or if it doesn't seem to match up with what you are seeing, or if you have any suggestions about another approach, don't hesitate to speak up. You can post a comment below, or hit up the #california-civic-data channel on the News Nerdery Slack.

Upon closer inspection, this field appears to be a Boolean field, stores only 0 or 1.


Applied the dark theme

Closes: #62
Description of Changes

Applied the dark mode button with toggle effects
used google icons for sun moon img
also made the navbar initially transparent so that on scroll it will change color

Checklist:

[ x] My code adheres to the established style guidelines of this project.
[x ] I have conducted a self-review of my code.
[x ] I have included comments in areas that may be difficult to understand.
[ x] I have made corresponding updates to the project documentation.
[x ] My changes have not introduced any new warnings.

Hey @shreya024 @SrijanShovit Please review it
I closed previous PR because of conflicts now .

@parasss19 Take a pull and resolve the merge conflicts

Hey @shreya024 please review it now

@parasss19 Resolve the merge conflict

@parasss19 Resolve the merge conflict and I'll merge

hey @shreya024 Please merge it now