text:
Proper label for homepage search form

@cjforms has evidence that ‘placeholder’ style labels are detrimental to accessibility. While we don’t necessarily have the luxury of space in the search form in the header, there’s no reason not to have a proper label on the homepage. This uses the label styles from govuk_elements (19px font, 2px padding). It also fixes the no-JS problem where the input was smaller than the expectations set by the visual display.
The JavaScript that controlled the old label behaviour also controls the header search form so needs to remain in place.
New look:

Summoning @markhurrell to comment.

there's no evidence that ‘placeholder’ style labels are detrimental to accessibility for single search inputs like this

The accessibility people are adamant that placeholder text should not be used a label, which is what's happening (visually at least, I haven't checked the markup) in this case. For example, see this from the Paciello Group: https://www.paciellogroup.com/blog/2011/02/html5-accessibility-chops-the-placeholder-attribute/
(Many other similar articles are available, only a couple of them written by me).
GOV.UK is widely used as an exemplar by many other governments and organisations. They won't consider the subtleties like 'we're using a non-recommended thing here on our home page because this particular usage is a special case that probably isn't causing any problems. They'll just point to our home page and say 'Look, GDS uses text inside the box as a label for the box right here, so it must be fine'.
That's why I'm worried about it.

For what it's worth we're using a proper label styled to look like a placeholder attribute.

Thanks. That would mean that it works OK for people using screenreaders which is good.
Visually the problems with 'stuff inside boxes' exist for anyone who doesn't use a screenreader.

Going to close this based on @markhurrell’s evidence that this isn’t a problem.

We decided that the existing style is OK for search boxes. Will revisit this when we redesign the homepage to make sure it’s still working for everyone.

authors: cjforms markhurrell robinwhittleton

repo: alphagov/frontend


text:
AWS Glue Crawlers for log files

This sets up crawlers to run with the 3 strands of log files we have being sent from Fastly to S3: govuk-www, govuk-assets and bouncer.
It sets up a database for these 3 log files and a schema based on the format Fastly is configured to send (details of this is in the individual commits)
Finally this deletes logs from these buckets when they reach 90 days old.

Should the Lambda function used to partition the files be included in this?

@boffbowsh No lambda required 🎉can specify it in fastly UI: /govuk_www/year=%Y/month=%m/date=%d/

Mind. Blown.

source: gharchive/pull-request

authors: boffbowsh kevindew

repo: alphagov/govuk-aws

license: MIT

license_type: permissive

license_source: github-api


text:
Add support for TLS 1.3 with 0-RTT

This commit adds VCL code to support TLS 1.3 with 0-RTT session resumption and prevent 0-RTT for anything other than GET or HEAD requests without query string data, to stop replay attacks.

Additional context: Speaking to Fastly about enabling TLS v1.3 as it can improve performance. 0-RTT improves it further. Cloudflare blog and KeyCDN blog.
With TLS v1.3, new sessions with have a 1-RTT for negotiation. Resumed sessions will require 0-RTT.
TLS v1.3 has around 72% browser support in the UK at the time of writing.

For many users it won't mean anything at all. What it will stop is the possibility of a replay attack where by an attacker can copy the encrypted 0-RTT data and send it to the server again and pretend to be the same user. Under these conditions a 425 status is returned (currently only supported by Firefox).
Code has come directly from Fastly and is recommended if enabling 0-RTT.
The test is the code itself. Testing the browser to see if it supports the Early-Data header.
We can test in FF58+, as it is the only browser at the moment that supports 0-RTT (or at least has it enabled by default)

Closing for now while we test with just TLS 1.3.

authors: Nooshu rubenarakelyan

repo: alphagov/govuk-cdn-config


text:
Update Images guidance and example of alt text

Fixes #1887.
This PR updates our Images guidance's section about alt text to specify:

who our guidance is for
redirect users who want guidance about publishing mainstream content on GOV.UK

We've suggested these changes because our Images guidance did not mirror the recently updated GDS guidance on alt text

I mentioned on the issue but copying here for visibility:

I think we need to clarify our guidance, but just wondering if the content guidance for GOV.UK Publisher might be different to other services. For example if you use an icon in your service, it might help to add alt text. A different context to the content published on GOV.UK publishing.

So maybe something like "In most cases follow the gov.uk content thing, but if it wouldnt make sense to describe the image on the page, for example when using an icon, add alt text (example)"
I do follow that our current alt-text-in-body guidance means the alt text is available to all, which is a good thing. However the downside is that screen reader users are not aware of and cannot interact with images, for example to navigate the page, or download them.

If we update this guidance, should we also this PR to update any other images across the Design System site?

@calvin-lau-sig7 @joelanman Thanks for helping with this! Have tried to action your comments. Can I get another review? :)
Also - if we update this guidance, should we also use this PR to update any other images across the Design System site?

Blocked until we talk to more of the accessibility community.

@joelanman I've just added a commit that restores the original guidance.  Have also added 2 sentences (line 30) to say who the guidance is for, and to redirect users who need the 'publishers' guidance.

Hi @calvin-lau-sig7! This update has been around the houses, but after much investigation @joelanman and I thought it best to limit its scope. For now, we're just going to:

tell users who the Design System guidance is for
redirect them if they need guidance about publishing GOV.UK content.

Full context in comment on original issue.
Could we get a review? :)

@calvin-lau-sig7 Thanks for reviewing! Have added in your suggestion. If all looks ok, can I get an approval?

Certainly, done! I'll let you do the honours and merge it. 😄

@calvin-lau-sig7 Cheers for your help with this!

repo: alphagov/govuk-design-system


text:
Use OAuth access token instead of service account

The GOOGLE_CREDENTIALS key we were using before was a long-lived
credential with access to administer DNS.
We try to avoid giving Jenkins long lived tokens with high levels of
privilege. There are a few reasons why it's bad:

The token is set to expire in the year 9999. A disgruntled former
employee could steal this token and use it later.
Using the service account complicates auditing who made a change to
DNS - it just shows up as Jenkins in the GCP audit logs.
Jenkins itself could be compromised (e.g. due to a bad plugin). If it
always has access to privileged tokens, that could lead to an
escalation.

For AWS, we have a pattern of pasting short lived STS credentials into
Jenkins.
Now that we've updated the GCP terraform provider to a version which
supports GOOGLE_OAUTH_ACCESS_TOKEN we can do the same thing for Google.
This requires that everyone who needs to make changes to DNS has the
gcloud CLI installed.
If this is approved, further work will be needed to:

[ ] Update the documentation on how to deploy DNS
[ ] Update the on-call checklist to make it clear that you need to have gcloud set up
[ ] Email all the engineers on 2ndline to make them aware of the requirement to have gcloud set up
[ ] Update the GDS CLI (which has a function where it can fill in the form in Jenkins for you)

https://trello.com/c/LasnNuz4/561-rationalise-use-of-gcp-credentials-eg-for-dns-deployments

Pretty sure nobody's copy-pasting tokens any more (at least I hope they're not!)

... I'll update gds-cli.

PR to update gds-cli: https://github.com/alphagov/gds-cli/pull/359
I'll raise a docs PR tomorrow before merging this.

repo: alphagov/govuk-puppet

license: mit

license_source: bigquery


text:
Upgrade Python Docker library to restore compatibility with Docker.

Version 2.7 of the Python docker library is not compatible with
the 1.32 API of Docker 17.09.0-ce, which we're currently running.
The version incompatibility was causing collectd to log a warning
and fail to load the Docker plugin.
This might fix the problem where collectd uses 100% of a CPU on
the build machines, but it's too early to tell for sure.

Tested in Carrenza Integration.


text:
Add test for SimpleSmartAnswer to Answer conversion

The functionality is already there, but there was no test coverage for it.
The ability to change a Simple Smart Answer to an Answer has been requested by the content team, and will require code changes in the publisher app.
Trello

I don't think that a test is needed for this because it is generic behaviour - if it had any custom behaviour, then there would be a stronger case for a test.

I dunno, I think this is valid as it ensures that this use case is compatible with the logic in the gem. It also asserts that the fields are being mapped correctly. Plus, more tests never* hurt.

I agree with @boffbowsh. I like that the test indicates there is no custom behaviour when converting a SimpleSmartAnswer.

I think I've figured out what was bothering me: the implementation seems unnecessarily complicated and specific. I've taken a stab at fixing it here: https://github.com/alphagov/govuk_content_models/pull/330
With my suggested change, perhaps we can more confidently provide an interface that lets users convert between any Edition type? If so, is this test still as valuable?

authors: binaryberry boffbowsh fofr jamiecobbett


text:
Adds warning text from design systems

User need
Part of:
https://trello.com/c/UrJYOEVF
Background
Design System has a warning text component. We should add this component in the shared library (govuk_publishing_components).
Ticket: https://trello.com/c/lJ9w813f/351-add-warning-text-component

Component guide for this PR:
https://govuk-publishing-compon-pr-588.herokuapp.com/component-guide/

@alex-ju - updated


text:
Bump version to 16.23.0

https://trello.com/c/1mY4fPN1/857-analytics-for-attachments

Sure - done :-).


text:
zdt deploy

nb: moved command from manifest to procfile
todo: test this, since it's from a docker container so slightly different to existing process. also confusing NOTIFY_APP_NAME and CF_APP stuff.

@sakisv it's used in log groups and such (and is different to CF_APP in places eg https://github.com/alphagov/notifications-api/blob/master/manifest.yml.j2#L57) but I agree I think it's unnecessary.

repo: alphagov/notifications-template-preview


text:
[#150397953] Migrate away from legacy bridge components

What
This enables mutual TLS between CloudController and Diego components. This change also means that much of this communication now happens directly as opposed to going through the cc_bridge components. Once this is deployed, there will be a follow-up PR to remove the unneeded cc_bridge components.
This PR is built on top of #1056, and includes the commits from that PR.
How to review
🚨  #1056 must be merged and deployed to prod before this is merged.

Deploy from this branch against an environment with #1056 deployed.
Verify that the deploy succeeds without any downtime, and that all the tests pass.

Who can review
Not @bandesz or myself.

The api-availability-tests job failed with the following:
Report:
==============
Total task executions: 4273
Total Successes: 4194
Total failures: 79
Elaspsed time: 10m17.10112938s
Average rate: 6.92 tasks/sec

Errors:

    Fetching detailed app information:
        Failed to fetch app stats: Error requesting app stats: cfclient: error (200002): CF-StatsUnavailable (61 failures)
        Failed to fetch app instances: Error requesting app instances: cfclient: error (220002): CF-InstancesUnavailable (18 failures)

Sitenote: do you think it's safe to switch back to the branch for #1056 and test this again?

I've rebased this now that #1056 has been merged.

authors: alext dcarley

repo: alphagov/paas-cf


text:
Start validating message queue payloads with the schema

Currently just log failures, and continue as normal.
This is dependant on https://github.com/alphagov/govuk-content-schemas/pull/333

Hi. Is the plan to do this validation in all environments? The integration environment, even though it represents the master branch, is a shared testing area so it's quite likely that a change from one team could stop another team testing their work.
Maybe that is a good thing of course..

@thehenster I'm still getting up to speed on the use of the schemas, so I'm not too sure.
This change should not break anything, as it just does reporting on the output of the publishing api.
I've gone round the wiki and tagged all the pages relevant to this repository [1], which I have not read in detail yet, but might describe the intent of others regarding the use of the schemas.
1: https://gov-uk.atlassian.net/wiki/dosearchsite.action?cql=siteSearch+~+"labelText%3Agovuk-content-schemas"&queryString=labelText%3Agovuk-content-schemas

Cool.
I'm not sure what the answer to the problem is.. The purpose of the environment integration is in the name isn't it. It's supposed to check that stuff integrates together.
An "integrates in isolation" environment would require the whole stack with just your changes in it. As we don't have QAs here then perhaps this is just our development environments..

Closed in favor of https://github.com/alphagov/publishing-api/pull/387

authors: cbaines thehenster

repo: alphagov/publishing-api


text:
Add Jenkinsfile and update build script

Moving to Jenkins 2, which takes care of Git status.

Neat - is Jenkins 2 running now or is this pre-emptive of that?

@kevindew - https://ci.integration.publishing.service.gov.uk/job/publishing-api/job/add-jenkinsfile/

@carlosmartinez cool - It looks good to me, but I assume once it's merged it breaks on existing CI. Do we need to worry about that? or do we need an intermediary step?

@kevindew yes, probably best to hold off merging it until further discussion

Is there anything stopping this being merged now so that we can switch over to Jenkins 2?

authors: carlosmartinez danielroseman kevindew


text:
Vietnamese marriage outcomes

Trello card
Description
This PR updates the content and links for Vietnamese marraiges:

Add content for same sex marrigages where partner is Vietnamese National
Update Content and links for Opposite and same sex marriages in Vietnam

Factcheck Same sex marriage for Vietnamese Nationals
Preview link
GOV.UK
Expected changes

Update content for same sex marrigages where partner is Vietnamese National

Before

After

Factcheck Content and Links Update
Preview link
GOV.UK
Expected changes

Update Content and links for Opposite and same sex marriages in Vietnam

Before

After

@ikennaokpala There is a lot going on in commit bae1324 that makes it difficult to review.
I would move changes related to _appointment_documents_in_vietnam.govspeak.erb into a separate commit, and regenerate the test artefacts just for these changes.
I would also move the changes related to _convert_cc_to_ss_marriage.govspeak.erb into a separate commit, and regenerate the test artefacts just for these changes.

@ikennaokpala You need to change the description of commit c1c13c4 because, it's not just the opposite sex outcomes that are being changed, and preferably, split the change to add a callout to same-sex outcomes (where the partner is Vietnamese local) to a separate commit.

@pmanrubia and @leenagupte I hope the splits clarify things

@ikennaokpala This much better! Thanks!
Just a few things:

There are only 3 changed test artefacts, so I would squash commit 09bb5e29d976d5f3571065c71db4389bc1fdee61 into 23f054ca7fa7dc512d525c2cacf8790d2de394ab

Can you update the commit note to say that previously, people who weren't Vietnamese nationals could have a same-sex marriage in Vietnam, and that this has now been expanded to allow Vietnamese nationals to marry as well. This is why no further changes were needed to the generic same sex outcome to account for Vietnam.

There are only 3 changed test artefacts, so I would squash commit dea2a8e149d3855a6d4e5fdf82620ef9dbc9500f into 156a071503c1f6ef58f951adea509ded840eea13

There are only 3 changed test artefacts, so I would squash commit 7c80020434f10d8ef5a5294b9c76987579be14fa into af7e9ff0d8ac2ac3b48e1c3a87e8c8a4b387ee48

In commit 2a7372661d4c5eb45ee740ccfba726847150dce9, there is a condition around the text, but in the google doc attached, no condition exists.
a) If the condition is no longer required, delete this commit and commit 482dcb8d7652a6db2fb3eec18445c7702c4e0f57
b) If the condition is required, as there are only 3 changed test artefacts, so I would squash commit 482dcb8d7652a6db2fb3eec18445c7702c4e0f57 into 2a7372661d4c5eb45ee740ccfba726847150dce9

There are only 3 changed test artefacts, so I would squash commit ce999ada38017453df4b93e3871b0deab3a1ad18 into 312cc96e2ab5b247e71310673ffd00ac3db9c93a

I think you should split commit 1f531df0d3a67093430ed8c99279e76ce9e26e36 into 1) the changes that affect same-sex marriages where the partner is a Vietnamese local, and 2) all other Vietnam outcomes.

@ikennaokpala This much better! Thanks!
Just a few things:

There are only 3 changed test artefacts, so I would squash commit 09bb5e29d976d5f3571065c71db4389bc1fdee61 into 23f054ca7fa7dc512d525c2cacf8790d2de394ab

Can you update the commit note to say that previously, people who weren't Vietnamese nationals could have a same-sex marriage in Vietnam, and that this has now been expanded to allow Vietnamese nationals to marry as well. This is why no further changes were needed to the generic same sex outcome to account for Vietnam.

There are only 3 changed test artefacts, so I would squash commit dea2a8e149d3855a6d4e5fdf82620ef9dbc9500f into 156a071503c1f6ef58f951adea509ded840eea13

There are only 3 changed test artefacts, so I would squash commit 7c80020434f10d8ef5a5294b9c76987579be14fa into af7e9ff0d8ac2ac3b48e1c3a87e8c8a4b387ee48

In commit 2a7372661d4c5eb45ee740ccfba726847150dce9, there is a condition around the text, but in the google doc attached, no condition exists.

a) If the condition is no longer required, delete this commit and commit 482dcb8d7652a6db2fb3eec18445c7702c4e0f57
b) If the condition is required, as there are only 3 changed test artefacts, so I would squash commit 482dcb8d7652a6db2fb3eec18445c7702c4e0f57 into 2a7372661d4c5eb45ee740ccfba726847150dce9
6) There are only 3 changed test artefacts, so I would squash commit ce999ada38017453df4b93e3871b0deab3a1ad18 into 312cc96e2ab5b247e71310673ffd00ac3db9c93a

I think you should split commit 1f531df0d3a67093430ed8c99279e76ce9e26e36 into 1) the changes that affect same-sex marriages where the partner is a Vietnamese local, and 2) all other Vietnam outcomes.

I am closing this PR, becuase after chating with @amylaurence. things have now changed and need to be addressed differently

I am closing this PR, becuase after chating with @amylaurence. things have now changed and need to be addressed differently

authors: ikennaokpala leenagupte

repo: alphagov/smart-answers


text:
Energy grants calculator green deal changes

Trello card: https://trello.com/c/fJQXNrxd
Split from card: https://trello.com/c/fwdVopYW
Motivation
There is some confusion in the order of paragraphs. Green Deal and GD funding is completely separate to the other listed schemes (Warm Home Discount, ECO etc). It currently reads like they're connected. Green Deal affects installations, so that paragraph is better off preceding the sub-headings about installation types.
Factcheck
energy-grants-calculator
Expected changes
Three outcomes have had their green deal content modified:

outcome_bills_and_measures_no_benefits
outcome_bills_and_measures_on_benefits_eco_eligible
outcome_bills_and_measures_on_benefits_not_eco_eligible

The changes to these outcomes are:

Change of text to the green deal title, header and body partial templates
Change logic for rendering the green deal title, header and body partial templates

There are a lot of question/answer combinations that can reach these outcomes. For simplicity, only one example of each outcome is shown below.
outcome_bills_and_measures_no_benefits

URL on GOV.UK
Preview link

Before

After

outcome_bills_and_measures_on_benefits_eco_eligible

URL on GOV.UK
Preview link

Before

After

outcome_bills_and_measures_on_benefits_not_eco_eligible

URL on GOV.UK
Preview link

Before

After

Great work! 👍 LGTM

This work has been abandoned. The focus will be on meeting the need of this calculator elsewhere on GOV.UK.

authors: leenagupte pmanrubia


text:
Patch 1 - Spain marriage abroad updates

Made small changes following factcheck from FCO. As discussed with Kelvin.
https://trello.com/c/neeDUlaf/583-3-marriage-abroad-improvement-spain-6-outcomes

Thanks so much for doing this. I'll close this PR as it's superseded by https://github.com/alphagov/smart-answers/pull/3278

authors: chao-xian helengds


text:
Fix a deprecation warning for to_s with parameters on Date objects

⚠ This repo is Continuously Deployed: make sure you follow the guidance ⚠

I was under the impression to_fs arrived in Rails 7? I think there's a longer to_formatted_s that works on both

@kevindew Oops, I might have been too quick off the mark with this one

authors: benjamineskola kevindew

repo: alphagov/whitehall


text:
handle TChain with no files

https://github.com/alphatwirl/alphatwirl/blob/fcf553e83024f841fce08e7ecda63172e9fd3122/alphatwirl/loop/EventLoop.py#L36-L39
self.reader.begin(events) can fail if events are built from TChain with no file.
This could happen if no files are verified here:
https://github.com/alphatwirl/alphatwirl/blob/fcf553e83024f841fce08e7ecda63172e9fd3122/alphatwirl/roottree/build.py#L24-L28

resloved. https://github.com/alphatwirl/alphatwirl/commit/dd4d71959878cb05dacd8df60f2d9dc8f1bdcbf9
BranchBuilder.py returns None

source: gharchive/issue

repo: alphatwirl/alphatwirl


text:
🛑 roothouse-1 is down

In caf9feb, roothouse-1 (https://rhstatus-proxy.alterine0101.id/?deviceId=roothouse-1) was down:

HTTP code: 404
Response time: 258 ms

Resolved: roothouse-1 is back up in d401885.


text:
🛑 roothouse-2 is down

In 9685211, roothouse-2 (https://rhstatus-proxy.alterine0101.id/?deviceId=roothouse-2) was down:

HTTP code: 404
Response time: 259 ms

Resolved: roothouse-2 is back up in 96882c2.


text:
🛑 roothouse-2 is down

In 019c62d, roothouse-2 (https://rhstatus-proxy.alterine0101.id/?deviceId=roothouse-2) was down:

HTTP code: 404
Response time: 180 ms

Resolved: roothouse-2 is back up in c203fbe.


text:
MVVM Example?

Can we have a MVVM example?

I don't know if I should make a new issue just to mask this question but...
How do ICommand's work?
From the examples I find online It looks like ICommand only covers the main event aka

Click for Buttons
Click for MenuItems

How would I bind a ICommand property to a paint event?

I cannot suggest to use Binding for now. It is slow and will be rewritten in future.

I cannot suggest to use Binding for now. It is slow and will be rewritten in future.

ok thankyou

@Shadowblitz16, I am moving this to discussions as this will be done after we redo Binding. Also, do you know any good simple MVVM examples? Is there any in Wpf or Maui?

repo: alternetsoft/AlternetUI


text:
Add a de counterpart for big_endian_int_serialize

src/utils.rs:

Rename big_endian_int_serialize -> big_endian_uint256_serialize to
reflect it using Uint256; also move it up so it's above the tests
Add big_endian_uint256_deserialize to for doing reversing what
[...]_serialize does

src/signature.rs:
src/types.rs:

Reflect above changes

closes #47

repo: althea-mesh/clarity


text:
Usage in Railway Oriented Programming

Hi all, thanks for the great package!
I have a question about using Result class in ROP manner to implement parallel validations.
Check this code as example:
public static Result<Email> Create(string email)
{
    if (string.IsNullOrWhiteSpace(email))
        return Result.Fail<Email>("Email is empty");

    email = email.Trim();

    var validationResult = Result.Merge(
        Result.FailIf(email.Length > 200, "Email is bigger then 200 symbols"),
        Result.FailIf(!Regex.IsMatch(email, @"^(.+)@(.+)$"), $"'{email}' is not a valid email address")
    );

    if (validationResult.IsFailed)
        return validationResult;

    return Result.Ok(new Email(email));
}

This is an implementation of a factory method for Email ValueObject which is a common pattern for DDD.
Result.Merge allows me to do some checks in parallel and return an array of errors instead of failing on the first error. This is quite useful since we can send all found errors to the client. The downside of Result usage here is the code become very verbose and we have to check if Result fail on every level which is using this type.
On of suggested ways to reduce verbosity while using Result type is to follow Railway Oriented Programming (ROP) approach.
By writing a number of Generic extension method for Result class I was able to refactor this code to the following:
return email.ToResult("Email is empty")
    .OnSuccess(value => value.Trim())
    .Ensure(value => value.Length <= 200, "Email is bigger then 200 symbols")
    .Ensure(value => Regex.IsMatch(value, @"^(.+)@(.+)$"), $"'{email}' is not a valid email address")
    .Map(value => new Email(value));

This variant is less verbose. Though I have a problem here. The way how Ensure method is implemented rely on the fact that previous method in the chain succeeded. This mean we'll be able to catch only the first error in the chain. What I want to achieve is to keep parallel validation here after we checked that Email is not null or empty which can be achieved by .ToResult() call.
public static Result<T> Ensure<T>(this Result<T> result, Func<T, bool> predicate, string errorMessage)
{
    if (result.IsFailed)
        return result;

    if (!predicate(result.Value))
        return Result.Fail<T>(errorMessage);

    return result;
}

Can someone help me with some Validate extension method (or maybe some other which going to be more common for functional programming paradigm) which could take a params list of predicates with error messages, run the predicate and accumulate errors in case of failures. I want to achieve something like that:
public static Result<Email> Create(string email)
{
  return email.ToResult("Email is empty")
      .OnSuccess(value => value.Trim())
      .Validate(
        value => value.Length <= 200, "Email is bigger then 200 symbols"),
        value => Regex.IsMatch(value, @"^(.+)@(.+)$"), $"'{email}' is not a valid email address")
      )
      .Map(value => new Email(value));
}

Thanks in advance!

Hi,
I know this railway oriented style of programming in combination with the result pattern because I used it in a project some years ago. I'am not a big fan of that style. Its readable in simple scenarios but is hard to read in complex scenarios. Your scenario is not that complex and you hit already the border. But be aware - I didn't used it much.
You can inspire yourself from the github project https://github.com/vkhorikov/CSharpFunctionalExtensions. This project has many extension methods to support this railway style. Maybe you find appropriate methods for your scenario.
What we did in our current project is to write a small validation engine with works with the result pattern. You can pass a list of validation rules (simple delegates) and the input value and then a result is returned with the error messages. Then you collect all error messages together. For us it is good enough.
I hope it helps.

@altmann for the answer but I am still not sure how to better do this. I looked into CSharpFunctionalExceptions project but can't seems to find what I really need.

Hi, @altmann
Here I tried to adapt some features of CSharpFunctionalExtensions  to use Result from this library. Do you think we could include a separate extension module in this project to support railway style development?

authors: altmann nkz-soft yarus

repo: altmann/FluentResults


text:
Выбор отслеживаемых пользователей в подписках в "активности"

Пользователи дублируются в "друзьях" и не_друзьях после обновления страницы. По логике должно быть как в "ленте" - если человек является другом, то галочка ставится в "друзьях", все остальные выводятся в отдельном блоке.

Да, была ошибка, в шаблон просто не передавалась переменная со списком друзей пользователя, хотя в самом шаблоне она использовалась.

authors: andrey-v inliquid

repo: altocms/altocms


text:
Upgrade to Superset 3 and customization of superset_config.py

Hi Yan. Thank you for sharing this with the public. Do you have any plans to update this to support Superset 3? It looks like they added support for it here: https://aws-ia-us-east-1.s3.us-east-1.amazonaws.com/cfn-ps-apache-superset/templates/superset-entrypoint-existing-vpc.template.yaml . I was going to take a crack at this myself but wanted to check if this is already in the works.
Also, do you have any advice on how to customize the superset_config.py to support features like dashboard embedding. I got that working on an EC2 instance I built to demo Superset and was hoping this was something that was easy to do with this CDK but don't see a straight-forward way to do this.

Hi @billantoniadis, thanks for you issue, it's always great to know someone is interested. I've see the linked yaml just now,  they updated to use image with tag 'latest', it's not very stable if your ecs restart or scaling.
Do you have any plans to update this to support Superset 3?

For updating to Superset3, I'd happy to, but not planned.

Do you have any advice on how to customize the superset_config.py to support features like dashboard embedding?

Have you looked at https://github.com/alvindaiyan/aws-superset-cdk/blob/main/src/superset_dashboard.ts in my repo? Is that something you look for?

@billantoniadis for embedding the dashboard, I haven't done that before. But the setup.py can help you get token and access to your superset server from your client webapp.
There are few good tutorial you may want have a look: https://medium.com/@khushbu.adav/embedding-superset-dashboards-in-your-react-application-7f282e3dbd88

Hi @alvindaiyan thank you for the reply again and for the link. I think the way to have superset read a custom configuration is to extend the PYTHONPATH to include the location where the superset_config.py will be placed. I was thinking about adding a folder in the EFS folder /app/superset_home (or maybe a separate folder) where I can place a superset_config.py file that can be accessed by all the containers running superset. Thoughts?
Also, my clone of this repo to use Superset v3.0.0. If it is helpful, I can do a pull request so you can consider whether it makes sense to add to this repo.

@billantoniadis I'm very happy for you to do a pull request, and let me know if any questions.

Thank you @alvindaiyan, I just submitted my pull request.
As an aside, one thing I noticed while testing is that no matter what password I set on projen deploy command line, the superset admin password is always "admin". For example, if I set the password as:
--parameters superset-cdk-dev:supersetpassword="1q2w3e4r"
It is still being set as "admin" instead of "1q2w3e4r". I think that is a defect that existed prior to my changes.

thanks for your pr and merged. I'll investigate the passport problem later on

Great, thanks again @alvindaiyan.

authors: alvindaiyan billantoniadis

repo: alvindaiyan/aws-superset-cdk


text:
Exception when calling create_album: (404)

Hi,
I would appreciate if someone one push me in the right direction in order to figure out what I'm doing wrong. I've got the latest version of immich-albums, as well as versinon 1.106.4 of Immich server. I'm calling immich-albums with the command:
im --api-key xxxxxxxxxxxxxx --api-host http://192.168.115.2:2283/api --original-path "/mnt/qnap/Media/Markove fotografije" --replace-path "/external/Markove fotografije" .
I have masked the api-key above, obviously, but I'm using the api-key which I had previously generated on Immich server. The result I get is:
`
Album Markove fotografije does not exist
searching for: /external/Markove fotografije/.album
not found: /external/Markove fotografije/.album
Creating album Markove fotografije
Exception when calling create_album: (404)
Reason: Not Found
HTTP response headers: HTTPHeaderDict({'Server': 'openresty', 'Date': 'Thu, 27 Jun 2024 15:22:05 GMT', 'Content-Type': 'application/json; charset=utf-8', 'Content-Length': '100', 'Connection': 'keep-alive', 'X-Powered-By': 'Express', 'x-immich-cid': 'rpt16pdn', 'ETag': '"64-uk9GwFOANWL25jGacOrQW0j712c"'})
HTTP response body: {"message":"Cannot POST /api/album","error":"Not Found","statusCode":404,"correlationId":"rpt16pdn"}
`
The original-path is the path on file system which contains subfolders with the photos, and the replace-path is the volume as seen from inside the Immich server docker.
What am I missing?!

It seems the API scheme of Immich has changed.
According to the API docs the endpoint URL for album creation is now /albums not /album.
If I understood correctly, the repo's (alvistar/immich-albums) script uses the API scheme from this file /immich-albums/blob/main/immich-openapi-specs.json.
According to the Immich docs, the current version (applicable to your server) could be obtained from the Immich instance itself. I don't really know how, unfortunately.

immich-openapi-specs.json file, which is autogenerated by the server when running in development mode

It would be nice if README of this repo explained how to get the up-to-date file.
Even better, if Immich docs did.
If you wanted to try it now (before the repo gets updated), here's what I did.
More elegant, unsuccessful, method
Since I don't know how to get it from the running Immich instance, I edited the immich-openapi-specs.json file manually (/album to /albums).
I tried to recreate the, updated, scheme. I worked inside a Docker Hub's python:latest container.
apt update
apt install npm default-jre # openapi-generator-cli seems to need the Java engine
npm install @openapitools/openapi-generator-cli -g

then inside the repo directory (following the command posted in this repo's README)
openapi-generator-cli generate -g python -o generated/openapi_client -i immich-openapi-specs.json -p packageVersion=1.105.1

and finally
poetry lock --no-update
poetry install # haven't issued this before regenerating the schema
poetry shell # haven't issued this before regenerating the schema

All the above commands exited successfully. but unfortunately the script (im.py) still used the old (/album) endpoint.
I have insufficient knowledge about the tools the script uses so I don't know what I've missed.
Dirty hack, but worked
I manually edited the /album references to /albums by running:
sed 's/\/album/\/albums/g' -i generated/openapi_client/openapi_client/api/album_api.py

After this, running the repo's script created the albums from folders seemingly fine.
Yet, I got pydantic warnings from Python.
For me it was enough to prove that creating albums from directories is feasible (using this repo's script). That's good enough for me during testing. I'll patiently wait for more knowledgeable people to update the repo (and hopefully write down the steps needed to update API scheme it uses).

Thank you for this workaround. I wasn't aware the API point changed.
BTW, in the meantime I came across a docker container salvoxia/immich-folder-album-creator which works similar to Alvistar's  immich-albums but it apparently takes into the consideration updated API.

authors: dmiljk messyalex

repo: alvistar/immich-albums


text:
Wiki typo

Description
I found a very small mistake in the wiki.
In https://github.com/alvr-org/ALVR/wiki/Building-From-Source the wiki talks about cargo xtask build-streamer --release which seem to have been renamed build-server in the last versions of alvr
It is a bit of a shame to open an issue for that but it seem that it is not possible to PR the wiki ^^'
General Troubleshooting
N/A
Environment
N/A
Hardware
N/A
Installation
N/A

Well, cargo xtask build-streamer --release is correct for the master branch. You usually build from the master branch anyway. And you actually can make a PR for the wiki, there is a wiki folder in the root of the repo that get synched to the actual GitHub wiki every push.

repo: alvr-org/ALVR


text:
🛑 gjj.itove.com is down

In b9d6827, gjj.itove.com (https://gjj.itove.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: gjj.itove.com is back up in fde62f1 after 22 minutes.

repo: alzee/up


text:
🛑 itove.com is down

In ec44f84, itove.com (https://itove.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: itove.com is back up in e33ffd0 after 13 minutes.


text:
🛑 zhibao.itove.com is down

In 1a08cbf, zhibao.itove.com (https://zhibao.itove.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: zhibao.itove.com is back up in 1a141a8 after 13 minutes.


text:
🛑 itove.com is down

In 2965364, itove.com (https://itove.com) was down:

HTTP code: 0
Response time: 0 ms

Resolved: itove.com is back up in ce7d24d.


text:
require "ap" Leads to Conflicts

Hi, first thanks for taking this over.
Amazing and Awesome Print both allow one to say require "ap". In the case of existing  Awesome Print  code this mostly works. The exception being code that references AwesomePrint, e.g., AwesomePrint.irb!.
Suggestions:

In ap.rb: AwesomePrint = AmazingPrint (assume they're compatible interfaces)
1 + warnings about this being Amazing Print and AwesomePrint constant will be removed
Unless a goal is backward compatibility (seems like no; from README: ... and should be used in it's place to avoid conflicts) remove ap.rb from future release. Though ruby -rap -e'...' is nice option!
Do nothing!

I think 2 is best. Maybe there are other routes.

@paddor what do you think?

Yeah, I like option 2 using Kernel#warn.

Ok so we can print a warning when require 'ap' is called and AwesomePrint is defined. We could do the same when AmazingPrint.irb! is called.

Assuming you meant AwesomePrint.irb!, how would you implement that? A simple AwesomePrint = AmazingPrint wouldn't be possible anymore. Maybe a new object forwarding all calls to AmazingPrint by default could do the job.

I was thinking that we could update here
https://github.com/amazing-print/amazing_print/blob/7440a61cb80e57014d7ab45f91a5fd85b5df6aaf/lib/amazing_print/custom_defaults.rb#L38-L42
Something like

 def irb!
   return unless defined?(IRB)

   if defined?(AwesomePrint)
     warn 'Things may get a bit weird when AmazingPrint is used along side AwesomePrint'
   end

   IRB.version.include?('DietRB') ? diet_rb : usual_rb
 end

And/or here: https://github.com/amazing-print/amazing_print/blob/7440a61cb80e57014d7ab45f91a5fd85b5df6aaf/lib/amazing_print.rb
if defined?(AwesomePrint)
  warn 'Things may get a bit weird when AmazingPrint is used along side AwesomePrint'
end

I was thinking something like this (untested):

if defined? AwesomePrint
  warn "You've loaded AmazingPrint and AwesomePrint .. some useful info here ..."
else
  AwesomePrint = Class.new do
    AmazingPrint.methods(false).each do |name|
      define_singleton_method(name) do |*argz|
        warn "More useful info here ..."
        AmazingPrint.public_send(name, *argz)
      end
    end
  end
end

@sshaw what's the advantage to defining AwesomePrint within AmazingPrint?

This is the gist of solution 2 in my original comment.
If code requires ap and expects AwesomePrint but instead it gets AmazingPrint things break.
A warning implies continued execution and continued execution may depend on the existence of AwesomePrint. So why warn when seconds later a NameError (uninitialized constant AwesomePrint) will be raised. So the idea is to support Awesome Print code for a time, but warn the user about the situation and eventually remove it.
The other 2-like option is to just assign to the constant and support it without warning or until there's reason to break compatibility and alter the existing AwesomePrint interface.
Hope that clarifies things!

In this case:
def irb!
   return unless defined?(IRB)

   if defined?(AwesomePrint)
     warn 'Things may get a bit weird when AmazingPrint is used along side AwesomePrint'
   end

   IRB.version.include?('DietRB') ? diet_rb : usual_rb
 end

It assumes one has both loaded. That's possible but I think it's probable  unless two different paths are required  since require only loads once.

I guess I'm less concerned about situations like
require 'amazing_print'
AwesomePrint.irb!

because it would be strange for someone to add these lines together or it would be an incomplete change to update the require statement and not the next line.
In this case, why not keep the error so the user updates the next line?

This is quite stale now so I'm going to close unless there's still interest in this.

authors: HarlemSquirrel paddor sshaw


text:
Given a contact id, can a manager join an on-going live call?

Hello,
We have an integration wherein we are storing the contactId for every call with a ticket number. Now we want to develop a feature where a manager sees a live call going on for a while and wants to join in the conversation.
is there an api that allows joining the call if we know the contact id?

Hi, I don't think this is possible via API currently. The only way of doing this is to use the real time metrics page in the Connect Administrator website (/home)

authors: appsmehta ctwomblyamzn

repo: amazon-connect/amazon-connect-streams


text:
Handling Missed Calls

Hi guys,
I hope you can help me. I'm using the click to call feature of Amazon Connect i.e. StartOutboundVoiceContact(). Now sometimes it will start to call/ring but there is a delay to the customer, hence chances the customer will not answer. Then after 8 to 10 rings in the customer (after the missed call), it will start to ring in the Agent CCP/Amazon Connect Stream.  Is there a way we can catch this so that it won't ring in CCP/Amazon Connect Stream for missed calls? It's a little annoying for an Agent to answer a call that is already dropped. The worst case, in the CTR, its an AGENT_DISCONNECT rather than CUSTOMER_DISCONNECT
How do you handle this?
Thanks in advance,
Mik

Following this... I feel there should be an added function to look for elongated handoffs and not generate missed calls so soon.

authors: gigamike oharez


text:
[Feature Request] - refresh-policy-routes systemd timer emits lots of noisy journald log entries

The refresh-policy-routes systemd timer unit, which appears to trigger the refresh-policy-routes systemd service unit (which itself runs /usr/bin/setup-policy-routes), runs around once every 2 minutes, which adds up to a lot of noisy repeated log messages in journald, making it harder to scan the logs and find our important system and application log messages.
systemd itself emits many messages due to the starting and ending of various services (including itself), and the setup-policy-routes script also emits debug logs that are mostly unnecessary. Here's what shows up in our logs every 2 minutes:
Starting refresh-policy-routes@ens5.service - Set up policy routes for ens5...
Got IMDSv2 token from http://169.254.169.254/latest
Starting configuration for ens5
/lib/systemd/systemd-networkd-wait-online ens5
[get_meta] Querying IMDS for mac
Configuring ens5 as primary
Using existing cfgfile /run/systemd/network/70-ens5.network
[get_meta] Querying IMDS for network/interfaces/macs/XX:XX:XX:XX:XX:XX/local-ipv4s
refresh-policy-routes@ens5.service: Deactivated successfully.
Finished refresh-policy-routes@ens5.service - Set up policy routes for ens5.
refresh-policy-routes@ens5.service: Consumed 31ms CPU time, received 1.5K IP traffic, sent 1.3K IP traffic.

I can think of a few possible solutions, not sure if applicable:

Run the script/program as a long running systemd service, instead of invoking repeatedly on a timer, to stop the repeated messages from systemd itself about the lifecycle of the service.
Only emit warning/error messages from the script, not debug/info messages, by default.

In the meantime, is it safe to disable this service? I'm not sure what it does and I couldn't find any documentation/references online or a description in the script itself, and I haven't had time to dive deep into the code yet.

I've reduced the verbosity of some of the messages over the past couple of releases. Resolving this.

@nmeyerhans I still get many logs in journald. Should I open a new issue or could you reopen this issue? I need additional IPv4 addresses, so I cannot disable refresh-policy-routes.
My current workaround is reducing the systemd log level and hijacking the logger command:
# /etc/systemd/system/refresh-policy-routes@.service.d/silent.conf
[Service]
# Avoid frequent messages from ec2net.
LogLevelMax=notice
BindReadOnlyPaths=/usr/bin/true:/usr/bin/logger:norbind

authors: nmeyerhans wilsonzlin yan12125


text:
Support PHP 8.3 and Inertia 0.6

Just wondering if this package is still being maintained and if there's a possibility to support current versions of PHP and Inertia

#9

authors: ambengers ommunoz

repo: ambengers/kinetic


text:
Reactive edge configuration

Implement live config.yaml file sync and reload on change.
Currently changes to config.yaml require restart. It is harder to implement robust config sync with proper graceful state transitions, but it may pay off long term as we move towards API and UI driven config changes.
See #190 as a related topic.

@muka does dynaconf resolve this feature request with https://github.com/ambianic/ambianic-edge/pull/222?

Not directly but there is a dedicated implementation with wathcdog. The implementation has been simplified so that the server will restart if the configuration file is changed on fs.

Then I will close this issue if you are OK with that @muka ?

Yes close thanks!
On Thu, Nov 19, 2020, 5:55 PM Ivelin Ivanov notifications@github.com
wrote:

Then I will close this issue if you are OK with that @muka
https://github.com/muka ?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ambianic/ambianic-edge/issues/191#issuecomment-730504791,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAHZKVN3QJKNIUHMPS2DR63SQVEY3ANCNFSM4NABUFXA
.

authors: ivelin muka

repo: ambianic/ambianic-edge


text:
🛑 MonitoRSS-Tech is down

In ca50dde, MonitoRSS-Tech (https://tech-rss.ambler.app/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: MonitoRSS-Tech is back up in d0865bd after 5 hours, 54 minutes.

repo: amblerapp/status


text:
[Bug] Not show parse error msg

I give at data not json content, and after complete (after msg Loading data...) show me onlu empty graph without errors, msgs.
Not work error msg: Error parsing JSON file

Fixed in 1.0.1

authors: dmachehin martynasma

repo: amcharts/dataloader


text:
box_utils.py decode

def decode(loc, priors, variances):
    boxes = torch.cat((
        priors[:, :2] + loc[:, :2] * variances[0] * priors[:, 2:],
        priors[:, 2:] * torch.exp(loc[:, 2:] * variances[1])), 1)
    boxes[:, :2] -= boxes[:, 2:] / 2
    boxes[:, 2:] += boxes[:, :2]
    return boxes

why boxes[:, :2] -= boxes[:, 2:] / 2?

center_x,center_y, w, h -> xmin, ymin, xmax, ymax


text:
Add delete button to edges and nodes

Closes #221
What do you think about having a delete button as part of the node/edge? I hacked up a prototype to see what it would look like. I think it's more discoverable here than in the menu, as suggested in the linked issue. But totally understand if you think it's taking up valuable real estate.

Description of changes

Added delete button to node/edge. (Is Indicator the right term for this? Wasn't sure what this was supposed to mean)

Additional context

@all-contributors please add @seanyeh for code

authors: keyserj seanyeh

repo: amelioro/ameliorate


text:
Will there be a 1.18.2 version for this?

For my modpack, which is on MC version 1.18.2, I am currently using Squake to make movement at least a bit interesting, however this mod seems much more like my kind of jam, and I'd love to use it in my modpack.
No biggie if you don't want to tho.

sorry, i sort of just made this for the singularity event, i probably won't be maintaining or backporting it. i appreciate the interest though.

authors: ami-wishes martyTF

repo: ami-wishes/MoovyShooty


text:
feat(phone_ext): Allow users to add a phone extension to listings

JIRA-713
To test:
After pulling the branch, go to Create/Edit (Submit a Listing) page.
Scroll to the bottom of the page and click Add New under the Contacts section.
The Unsecure Phone section will have an updated message telling the user how to add an extension.
Use case examples for the phone validation:
###-####
###-###-####
(###) ###-####
###-###-#### x##
###-###-#### x###
###-###-#### x####
###-###-#### ext###
etc, etc
'extension' will also work.
(A new field in the create/edit form was deemed unncessary for this feature.  The backend for a phone number already supports upto 50 characters as a string.  The only step needed to allow the user to add an extension was to update the JS REGEX validation to allow x/ext/extension + a number.)

@blynch11p  - Would adding an additional input field for user to add extension be more user-friendly?

pulled branch
reviewed code
tested

:+1:

:+1:
Regex matches correctly. Tried inserting characters in random places and wouldn't match.

repo: aml-development/ozp-react-commons


text:
Suppress error message from sh for background process

Hey everyone!
Is there a way to suppress the error message from sh for background process?
if there is an error message from the process, this is something I want to show/print .. but not from the sh python traceback, for example, this is something that I don't want to show:
Exception in thread background thread for pid 323610:
Traceback (most recent call last):
  File "/home/xmn/mambaforge/envs/makim/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/home/xmn/mambaforge/envs/makim/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/xmn/mambaforge/envs/makim/lib/python3.10/site-packages/sh.py", line 1641, in wrap
    fn(*rgs, **kwargs)
  File "/home/xmn/mambaforge/envs/makim/lib/python3.10/site-packages/sh.py", line 2569, in background_thread
    handle_exit_code(exit_code)
  File "/home/xmn/mambaforge/envs/makim/lib/python3.10/site-packages/sh.py", line 2269, in fn
    return self.command.handle_command_exit_code(exit_code)
  File "/home/xmn/mambaforge/envs/makim/lib/python3.10/site-packages/sh.py", line 869, in handle_command_exit_code
    raise exc
sh.ErrorReturnCode_1:

  RAN: /usr/bin/bash -c 'pre-commit run --all-files --verbose'

  STDOUT:

  STDERR:

thanks

additionally, I have already something like that:
        try:
            p.wait()
        except sh.ErrorReturnCode:
            ...
        except KeyboardInterrupt:
            pid = p.pid
            p.kill()
            print(f'[WW] Process {pid} killed.')

Is this what you're looking for? https://amoffat.github.io/sh/sections/special_arguments.html#bg-exc

thank you so much! that fixed my problem. appreciate that!

authors: amoffat xmnlab

repo: amoffat/sh


text:
Enable testing on Python 3.7 and 3.8

Fixes test_environment to also work on these versions.
Fixes #498
Replaces #468

@amoffat ping

https://github.com/amoffat/sh/blob/master/sh.py#L3533 would also need to be updated.

authors: TBK ecederstrand ssbarnea


text:
Frame Application: Create order from facilities with errors

User story

As a facility manager
I want / need create work order for facilities with errors
So that I can create request for their repairing/maintenance

Acceptance criteria

[ ] Upon clicking on the "create work order" from the facility details view or the homepage with facilities that have issues, the facility manager is redirected to the work order form creation page, with fields related to the facility (such as name and location) autocompleted.
[ ] Once the work order form has been submitted, the order appears under the facility details page under the section "Open work orders".

DoD general criteria

[ ] Feature has been fully implemented
[ ] Feature has been merged into the mainline
[ ] All acceptance criteria were met
[ ] Product owner approved features
[ ] All tests are passing
[ ] Developers agreed to release

Dependencies

Item #54
Item #68

it probably makes sense to do this after the  #104 issue is done

Duplicate of #104


text:
Add promise- and coroutine-aware event Mediator

This PR proposes a Promise and Coroutine  aware implementation of the GoF Mediator pattern.

I'm closing this PR as there doesn't seem to be any activity. IMO this should be a separate package.

authors: kelunik rdlowrey

repo: amphp/amp


text:
Possibility to override default search method

Q1 . Is it currently possible to override the default search method ?
I need to get the search results from an API instead of doing some client search ?
Q2. Is it possible to find an element by something else other that the text ?
I did the following
tree.find({ id : childNodeId }) // wrong result

but going this approach got me the right results
tree.find( n => n.id === childnodeid ) // right result

Q1 . Is it currently possible to override the default search method ?

You can pass a function to override the default behaviour.

tree.find({ id : childNodeId }) // wrong result

It works for me. This method returns Selection API.

Q1 . Is it currently possible to override the default search method ?

You can pass a function to override the default behaviour.

What's the method to override ?

tree.find({ id : childNodeId }) // wrong result

It works for me. This method returns Selection API.

Odd. I tried using it yesterday and it returned the rootNode instead of the first child node.

For example:
const treeData = [
  {text: 'D15', data: {d: 15}},
  {text: 'D20', data: {d: 20}},
  {text: 'D25', data: {d: 25}},
]

const items = this.$refs.tree.findAll(node => node.data.d >= 20)

Q1 . Is it currently possible to override the default search method ?
You can pass a function to override the default behaviour.

Still having figured out how to override the default search behavior.
I'd appreciate if you could do showcase/example how to.
This is the approach I tried
treeOptions: {
     minFetchDelay: 500,
     dnd: true,
     filter: function (query) {
           console.log(query) // still does the same work
     },

Ohh. Search and filtering are slightly different.

To override filtering:

filter: {
    matcher(query, node) {
        return query == node.data.complexity
    },
    showChildren: false
}

To find node (and proceed to use it via API):

const node = this.$refs.tree.find({text: /^text/})

const node = this.$refs.tree.find({state: disabled})

const node = this.$refs.tree.find(node => {
  return node.data.SOME_PROP === 55
})

You will find a lot of examples if you clone repo and npm run dev

I already cloned the project, there's much I gotten out if it to be honest.
What I actually want to do is, instead of doing the search on the front, I want to send a request to the backend.
The snippets you posted are fine when filtering/searching on the front, but since I'm asynchronysly load the children, going down this approach won't help me.

I can help you if you show me what you want to do. Snippets below can solve almost any possible problem (I think...):
fetchData(node) {
  // Here you do search on the server.
  return fetch(`/searchAPI?nodeID=${node.id}`).then(r => r.json())

 // you can send whatever you want
 return fetch(`/searchAPI?p=${node.data.p}&d=${node.data.d}`).then(r => r.json())
}

Also you can do search on client side. For example you have a huge array of data (const users = []).
 fetchData(node) {
   return new Promise(resolve => {
     resolve(
       users.filter(user => node.data.roles.includes(user.role))
     )
   })
 }

Note that this method calls only if node has isBatch property.

repo: amsik/liquor-tree


text:
The letter is missing in the image.

Hi,
I am creating TextDrawable in following way, but the resulting image doesn't contain the letter. Could you please check what i am missing.
maven {
url 'http://dl.bintray.com/amulyakhare/maven'
}
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
ColorGenerator generator = ColorGenerator.MATERIAL; // or use DEFAULT
// generate random color
int color1 = generator.getRandomColor();
TextDrawable drawable = TextDrawable.builder()
.beginConfig()
.width(50)  // width in px
.height(50) // height in px
.endConfig()
.buildRound("X", color1);
leftImage.setImageDrawable(drawable);

Im having the same problem. Did you solve this?

Same problem. Not sure whats causing it, although it seems to happen when I set the height and width in the config.

authors: bpappin iamtrk summers314

repo: amulyakhare/TextDrawable


text:
Fixes in unmarshal

There are 2 commits in this pull request to improve Unmarshal:

Fix for unameshal string : Using value of string when unmarshalling string into interface{} and fix some of the corresponding unit tests (the original change, roots in when returning type of reader.string changed to a pointer.

Add null check : Setting nil to v.Set() can lead to error.

Codecov Report

Merging #166 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #166      +/-   ##
==========================================
+ Coverage   74.90%   74.94%   +0.04%
==========================================
  Files          25       25
  Lines        4857     4865       +8
==========================================
+ Hits         3638     3646       +8
  Misses        724      724
  Partials      495      495

Impacted Files
Coverage Δ

ion/unmarshal.go
68.64% <100.00%> (+0.55%)
:arrow_up:

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 0d00cfc...3119673. Read the comment docs.

authors: Armanbqt codecov-io

repo: amzn/ion-go


text:
Parameters forwarding in Filters

Is your feature request related to a problem? Please describe.
Is it allowed to forward processed information towards controllers? For example, under a verification filter scenario, the filter performs some verification and obtained some information which may possibly be used by the controllers in the route-chain.
E.g. A user_screte is needed to be given from the request to access some api functions and filters check user_screte exist and is valid. The user_screte may contains information for controllers, say, user_id to perform customized responses. A simple flow like,
user_screte
    |-user_id
    |-some_other_variables
        |-some_more_variables
        |-...

Filter decrypts user_screte from request-parameters/cookies/headers and verified
Controller decrypts AGAIN from request-parameters/cookies/headers and obtain user_id
Controller returns a customized response for user_id

Describe the solution you'd like
Any parameters forwarding mechanism to eliminate the redundancy of step 2 if variables from the filter are enough for certain controllers?
E.g.
void doFilter(const HttpRequestPtr &req,
                          FilterCallback &&fcb,
                          FilterChainCallback &&fccb,
                          std::unordered_map<std::string, any> &routeBucket )
{
    bool feelGd(false);
    //Perform filter ops and set feelGd
    routeBucket["user_id"] = "foo";
    //...
   if ( feelGd ){
      fccb();
   } else {
      fcb(HttpResponse::newHttpInvalidResponse());
   }
}

...

void controller_func(
               const HttpRequestPtr &req,
               std::function<void (const HttpResponsePtr &)> &&callback,
               std::unordered_map<std::string, any> &routeBucket )
{
    if ( routeBucket["user_id"] ){
        LOG_DEBUG << "Got you";
    } else {
        LOG_DEBUG << "Go and decrypt again";
    }
}

Describe alternatives you've considered
It will possibly have a lot of code modifications if the function structure is modified. How about a mutable routeBucket ship along with the request through the route-chain ?
Additional context
Or actually some combination/function of Drogon currently can solve the issue?

Please use the virtual AttributesPtr attributes() const = 0; method of the HttpRequest class.
You could store any type of data into attributes object.
Do you think it's necessary to add a context interface to HttpRequest class like this:
https://github.com/an-tao/drogon/blob/77063e28d03930ad2c605ef72d95a30f1f9a3921/lib/inc/drogon/WebSocketConnection.h#L80-L105

Ok, I thought the attribute is for other usage.
The attribute class is good enough for such  purpose I think. For Websocket, the life cycle is generally much longer that HTTP and context is good for it. IMO, for really short life cycle request like HTTP ones, context will be overkilled.
Thanks.

repo: an-tao/drogon


text:
Remove duplicated inclusion

This remove the duplicated #include "HttpClientImpl.h" in lib/src/HttpAppFrameworkImpl.cc.
Also, I've noticed that there are some #include <stdio.h>  or something similar. Should we change them to #include <cstdio>?

@oToToT Yes, I think so.

authors: an-tao oToToT


text:
Dead ?

Seems dead... Any active fork ?

Not yet :)

repo: anand-patel/oc-wysiwyg-editors


text:
somatic variant calling

Hi, I want to know if this tool can be used (or need some tweaking) to call somatic variants on pacbio-ccs data?
Thanks.

Hi - the tool is designed for germline variant calling. I am not knowledgeable regarding what issues may be presented by SMRT-based somatic variant calling.

authors: AhmedArslan anands-repo

repo: anands-repo/hello


text:
Filter application packages detected by analyzer through the rpm/dpkg/apk results to remove duplicates

A common source of errors in vulnerability matches in Engine is when distro packages (rpms, debs, etc) package up application packages such as python packages. Often the distro rpm has a version bump to indicate backports that are reflected in their own vulnerability feed, but the language package (pip, etc) does not have its version increased to indicate the backport. This cause false positives in the NVD matches due to the same content being identified as both an RPM/DEB/APK package as well as python/ruby/npm package and the NVD matches are against the language package.
To resolve this, the analyzer should filter all detected packages thru the rpm/deb/apk results to remove duplicates and ensure that packages are only reflected against the proper upstream source.

This is the core issue of #445 #315

This was partially addressed in 1dfba96bafaf5bc4e3276a47964754f56b1e2f51 by inclusion of some known package filters. Specifically the 'Python' package that is of type 'python', which is actually installed as part of the python install itself and thus part of the rpm/deb/apk install in most distros.
The more general filter work is yet to be done but the above change helps remove the most consistent source of problems.

repo: anchore/anchore-engine


text:
Move database connection information to environment variables

What does this PR do?
Moves the database connection information to the environment variables
Action points

Move database connection info to environment variables
Add the database connection information to heroku and travis-ci config variables

Coverage remained the same at 89.197% when pulling 7a0a50494384823cb171c02d827dd97ab19ac59c on move-db-to-secure-location into 3b682b2d0040f7d8e426138496be44bda4be9db7 on develop.

authors: andela-oolutola coveralls


text:
editing toolbar dispeared when the size is too large

When the size of the st_canvas (height/width) is set too large, the editing toolbar (undo, redo, delete) is dispeared. Please help solve.
Thanks.

Hello @longswordinhand thanks for reporting.
Do you have a code snippet and a screenshot so I can check on my side?
Cheers,
Fanilo

authors: andfanilo longswordinhand

repo: andfanilo/streamlit-drawable-canvas


text:
Good way to listen for navigation controller state?

Great library!
I have a button at the bottom of the view I'd like to hide in a similar fashion to how the navigation controller hides. So on scroll the nav bar hides + the button moves off the bottom of the screen.
Are there any events I could tap into without having to create new gesture handlers?

You can provide a delegate method to animate out of the view the button:
https://github.com/andreamazz/AMScrollingNavbar#scrollingnavigationcontrollerdelegate

authors: andreamazz stevejcox

repo: andreamazz/AMScrollingNavbar


text:
Button "Add tag" into AMTagListView

Many times me and our team open form where we using AMTagViewList with textfield. And always when we need input new tag we tap to AMTagViewList (this happening automaitcally, by instinct), not to textfield upper. Maybe we add button to add tag in AMTagListView ?

The list itself does not provide an input method by design. It's really a matter of preferences and of how your UI is structured, so this library is and will remain agnostic in that regard.

authors: akhatmullin andreamazz

repo: andreamazz/AMTagListView


text:
Ionic 5 implementation

Hi Andre
How do I use the plugin now in ionic 5?
I have added this to top of my page component.ts:
import { FCM } from "cordova-plugin-fcm-with-dependecy-updated/ionic";
How do I now utilise it as usually I put a fcm: FCM in the constructor
and then I use this.fcm.
Seems now I get many options like :

What object do I use out of those for the following code to work:

im using
"@ionic/angular": "^5.1.0",

I've tried using it straight after import like this but doesn't work:
import { FCM } from "cordova-plugin-fcm-with-dependecy-updated/ionic";
then inside the class I call:
async obtainFCMToken() {
await FCM.requestPushPermission().then(response => {
});
}

import { FCMPluginOnIonic } from "cordova-plugin-fcm-with-dependecy-updated/ionic";
also added it to app.component.ts and added FCMPluginOnIonic in provider section.
It works perfectly in Apple with no errors.
@andrehtissot  Its not working in Android I get a error:

So the actual code:
this.fcm.requestPushPermission().then(response =>{.  Works in Android, I get a True
however when I try  this.fcm.getToken().then(token => {.  Android throws the error above.

That's an issue I've never seen before.
But I'd check if the google-services.json files is correct, as the "sender id", mentioned in the error message, is one of the values there configured.

Please let me know if re-downloading the google-services.json and comparing to the current one you have in the app shows no difference.

Please let me know if re-downloading the google-services.json and comparing to the current one you have in the app shows no difference.

@andrehtissot  Yeah I redownloaded the google-services.json from firebase console.. made sure its prod application and they are identical.
Double checked. And I downloaded the apple plist from same page... so for sure same :)
ive installed the latest version :
ionic cordova plugin add cordova-plugin-fcm-with-dependecy-updated@latest
Am I calling the correct thing in my post above?  using FCMPluginOnIonic

ive tried this as well same deal.
import { FCM } from "cordova-plugin-fcm-with-dependecy-updated/ionic";
FCM.requestPushPermission().then(response =>{
console.log(response);
if(response){
FCM.getToken().then(token => {
this.storeFCMTokenToClient(token);
});
FCM.onTokenRefresh().subscribe(token => {
this.storeFCMTokenToClient(token);
});
    FCM.onNotification().subscribe(data => {
      if (data.wasTapped) {
        this.presentAlertCreateBadge(data); // Google Cloud messaging console
      } else {
        this.presentAlertCreateBadge(data); // Google Cloud messaging console
      }
    });
  }
});

Am I calling the correct thing in my post above? using FCMPluginOnIonic

Thank you @RichardBoyder  for pointing it out. I didn't notice it last time.
The import should be FCM, like:
import { FCM } from "cordova-plugin-fcm-with-dependecy-updated/ionic";

import { FCM } from "cordova-plugin-fcm-with-dependecy-updated/ionic";

FCM.requestPushPermission().then(response => {
	console.log(response);
	if(response){
		FCM.getToken().then(token => {
			this.storeFCMTokenToClient(token);
		});
		FCM.onTokenRefresh().subscribe(token => {
			this.storeFCMTokenToClient(token);
		});

		FCM.onNotification().subscribe(data => {
			if (data.wasTapped) {
				this.presentAlertCreateBadge(data); // Google Cloud messaging console
			} else {
				this.presentAlertCreateBadge(data); // Google Cloud messaging console
			}
		});
	}
});

This code seems good.
As you described, it also triggers INVALID_SENDER native android error. Of which I'll have to search for solutions.

Thankyou Andre  for your effort . It is always appreciated.

I reverted to 6.0.4 and also refreshed my firebase apps removed and readied ... so it works again.
Ill reinstall the latest plugin and test again and let you know how it goes.
Im not sure why the error is gone now... but ill keep you updated @andrehtissot

Issue closed due to inactivity.

authors: RichardBoyder andrehtissot


text:
Issue with SQLQueryAgent maximum context length

I have been getting this issue when I try to execyte the sql query agent :
This model's maximum context length is 4097 tokens, but the given text is 7635 tokens long. (Langchain::Utils::TokenLength::TokenLimitExceeded)
the code is as below :
`
    database = Langchain::Tool::Database.new(connection_string: "postgres://qubitam:@localhost:5432/unipharm_development")

    agent = Langchain::Agent::SQLQueryAgent.new(llm: Langchain::LLM::OpenAI.new(api_key: ENV["OPENAI_API_KEY"]), db: database)
    agent.run(question: "#{self.content}")`

@qubitam, @mattlindsey fixed it. Could you please give it a try again?
When initializing the SQLQueryAgent, pass a list of tables: [] (tables that should be used in the query) or except_tables: [] (tables that should not be used in the query).
But we're still going to work on a better fix, one that does not require actually listing out your tables.

authors: andreibondarev qubitam

repo: andreibondarev/langchainrb


text:
Finish an alarm (Telegram bot)

[x] Same as "complete", but stop chore repetition

Current coverage is 77.14% (diff: 19.04%)

Merging #62 into develop will decrease coverage by 0.40%

@@            develop        #62   diff @@
==========================================
  Files            21         21
  Lines           588        595     +7
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
+ Hits            456        459     +3
- Misses          132        136     +4
  Partials          0          0

Powered by Codecov. Last update 0ab2630...70b2ce6

authors: andreoliwa codecov-io

repo: andreoliwa/python-dontforget


text:
Not working - new install

Mac OS version: 14.1.1
AmongUs version: 2023.10.24o
Tried AmongKey for first time today. Unfortunately it does not seem to be working. I have given the app Recording and accessibility access
Any suggestions?

Im seeing the window reporting "nothing - Confidence 0%", but have checked the screen recording and accessibility setting. Maybe new version of Mac OS has affected this and we need to choose different options?

Same

repo: andresavic/AmongKey


text:
🛑 pharmacomms is down

In 6c83528, pharmacomms (https://pharmacomms.tv/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: pharmacomms is back up in 7a8d379 after 17 minutes.

repo: andrespitt/uptime


text:
🛑 pharmacomms is down

In 3bc5d13, pharmacomms (https://pharmacomms.tv/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: pharmacomms is back up in dd71209.


text:
GraphQLError: String cannot represent an array value: []

When I run gatsby build/develop, everything works fine, but this plugin causes my console to throw GraphQLError: String cannot represent an array value: [] for every single node in my app, for some nodes it posts a wall of the error repeating itself. This doesn't necessarily cause any issues, as I can still use the search once the site is built, but I'd still like to get to the bottom of this if possible, in case it is the cause of another error down the line.
gatsby-config
module.exports = {
  pathPrefix: `/ctc`,
  siteMetadata: {
    title: `Gatsby Default Starter`,
  },
  plugins: [
    {
      resolve: `@andrew-codes/gatsby-plugin-elasticlunr-search`,
      options: {
      // Fields to index
        fields: [
          'title'
        ],
      // How to resolve each field's value for a supported node type
        resolvers: {
            // For any node of type MarkdownRemark, list how to resolve the fields' values
          BookJson: {
            title: node => node.title,
            gatsby_slug: node => node.gatsby_slug,
            image: node => node.image
          },
          AuthorJson: {
            title: node => node.title,
            gatsby_slug: node => node.gatsby_slug,
            image: node => node.image
          }
        },
      },
    },
    `gatsby-transformer-json`,
    `gatsby-plugin-react-helmet`,
    `gatsby-plugin-sass`,
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        name: `src`,
        path: `${__dirname}/src/data/final`
      }
    },
  ],
}

gatsby-node
const path = require(`path`);
const { createFilePath } = require(`gatsby-source-filesystem`)
const slugify = require('slugify')
const request = require('request-promise-native')
const crypto = require('crypto');
const fs = require('fs')

//create pages from OutputJson nodes, using id field as path
exports.createPages = ({ graphql, boundActionCreators }) => {
  const { createPage } = boundActionCreators
  return new Promise((resolve, reject) => {
    graphql(`
      {
        allGenreJson {
          edges {
            node {
              slug
              gatsby_slug
              id
              title
              type
            }
          }
        }
        allClipJson {
          edges {
            node {
              slug
              gatsby_slug
              id
              title
              type
            }
          }
        }
        allReadingAgeJson {
          edges {
            node {
              slug
              gatsby_slug
              id
              title
              type
            }
          }
        }
        allNarratorJson {
          edges {
            node {
              slug
              gatsby_slug
              id
              title
              type
            }
          }
        }
        allSeriesJson {
          edges {
            node {
              slug
              gatsby_slug
              id
              title
              type
            }
          }
        }
        allPublisherJson {
          edges {
            node {
              slug
              gatsby_slug
              id
              title
              type
            }
          }
        }
        allAuthorJson {
          edges {
            node {
              slug
              gatsby_slug
              id
              title
              type
            }
          }
        }
        allBookJson {
          edges {
            node {
              slug
              gatsby_slug
              id
              title
            }
          }
        }
      }`
    ).then(result => {
      result.data.allBookJson.edges.forEach(({node}) => {
        createPage({
          path: `${node.gatsby_slug}`,
          component: path.resolve('./src/templates/book.js'),
          context: {
            id: node.id,
            type: node.type,
            title: node.title
          },
        })
      })
      var apiEnds = ['Genre','Author','ReadingAge','Narrator','Series','Publisher']
      apiEnds.forEach((endpoint) => {
        result.data[`all${endpoint}Json`].edges.forEach(({ node}) => {

          createPage({
            path: `${node.gatsby_slug}`,
            component: path.resolve('./src/templates/category.js'),
            context: {
              id: node.id,
              type: node.type,
              title: node.title,
            },
          })
        })
      })
      resolve()
    })
  })
}

Ah, user error. Completely unrelated to my search functionality (other than it revealing the error). No problemo!


text:
🛑 nhcam is down

In b872833, nhcam ($NHIPCAM) was down:

HTTP code: 0
Response time: 0 ms

Resolved: nhcam is back up in 22ed64a.

repo: andrewdavies-net/upptime


text:
🛑 nhcam is down

In 2b03172, nhcam ($NHIPCAM) was down:

HTTP code: 0
Response time: 0 ms

Resolved: nhcam is back up in 3c726f7.


text:
🛑 nhcam is down

In 47a3279, nhcam ($NHIPCAM) was down:

HTTP code: 0
Response time: 0 ms

Resolved: nhcam is back up in 972756b.


text:
REQUEST: Make show_last_changed available for all entities

This would be extremely useful for all sorts of sensors (especially motion sensors).

This is hard to do without core support.
The feature is supported in state cards which I cloned in CustomUI.
Light and Cover are cloned in order to add the slider.
Toggle and Plain are very simple so I cloned them specifically to support CustomUI features.
It doesn't make sense to clone the advanced cards as I would have to follow the upstream changes.

Is not the grey subheading when you go into the details of each state card not available in a consistent way?
I'm referring to:

I think this used to be displayed by default in earlier versions of Home Assistant (well before I started using it, going by screenshots on the web). Seems to be an often requested feature.

I have added support for show_last_changed for all state cards (except Configurator)

Thank you! I'm sure this will be a very popular addition.

authors: andrey-git mihalski

repo: andrey-git/home-assistant-custom-ui


text:
local option uses /local which isn't mapped in docker

Error loading state-card-custom-ui from /local/custom_ui/state-card-state-card-custom-ui.html
my config is in: /config so the files should be in /config/www/custom_ui

/local/custom_ui/ is not the filesystem path, it is the the url.
However it says "state-card-state-card-custom-ui.html" so this probably doesn't come from customizer but from an old (maybe cached) version of HA frontend looking at a new config (saying custom_ui_state_card: state-card-custom-ui)
Try to clear cache or force refresh (Ctrl+Shift+R / Ctrl+F5)

@kylerw did force-refreshing help?

I was able to fix it. The refresh seemed to do the trick but oddly, not the first time. So I'm not sure what the issue was exactly. But, its now resolved. Thanks for the quick feedback.

authors: andrey-git kylerw

repo: andrey-git/home-assistant-customizer


text:
incomplete get_operands

Hi, is it normal that instruction.get_operands() doesn't give me the same registers as instruction.get_output()?
Example to better explain:
If i execute print instruction.get_output() I get:
v0 ... v7, Landroid/database/sqlite/SQLiteDatabase;->query(Ljava/lang/String; [Ljava/lang/String; Ljava/lang/String; [Ljava/lang/String; Ljava/lang/String; Ljava/lang/String; Ljava/lang/String;)Landroid/database/Cursor;

If I execute print instruction.get_operands() I get:
[(0, 0), (0, 1), (0, 2), (0, 3), (0, 4), (0, 5), (0, 6), (256, 420, 'Landroid/database/sqlite/SQLiteDatabase;->query(Ljava/lang/String; [Ljava/lang/String; Ljava/lang/String; [Ljava/lang/String; Ljava/lang/String; Ljava/lang/String; Ljava/lang/String;)Landroid/database/Cursor;')]

The result of get_output() ranges from v0 to v7, while the result of get_operands() ranges from (0, 0) to (0, 6). Maybe I'm wrong, but I expected get_operands() to range from (0, 0) to (0, 7).
The instruction type in this example is <class 'androguard.core.bytecodes.dvm.Instruction3rc'>
Thanks

I think I see the problem here:
in get_operands it should be  range(self.CCCC, self.NNNN + 1), as NNNN is also a valid register

authors: lucacapacci reox

repo: androguard/androguard


text:
[JetCaster] Migration to androidx.compose.foundation.pager

in the Jetcaster ui/Home.ky migration com.google.accompanist.pager.HorizontalPager to androidx.compose.foundation.pager.HorizontalPager

Thanks for the contribution, this work was actually already done as part of #1106 so I will close this out to avoid merge conflicts.

authors: bentrengrove sajjad-dehnavi

repo: android/compose-samples


text:
All changes from 0.0.5 release (merge from internal repo)

This PR adds all the changes that were made for the 0.0.5 release which was published on Google Play on 9th Feb 2023. Primarily this is the addition of Firebase Analytics, Crashlytics and Performance Monitoring.

Reraun androidTest (26), but not sure why the bot wants you to sign the Contributor License Agreement

@calren Yeah, unfortunately this happens every time we do a gerrit->github merge. I have an open thread with the build team about this but seems like it's not anyone's priority to fix.

authors: calren dturner

repo: android/nowinandroid