Comparing two arrays and getting the uniques elements of first array - pending details

I have two arrays made of extracting some links from a web page and extracting from an csv file. I have to make a unique array with elements that are unique in first array(array_web_links) that are not available in second(array_csv).
Following method give me correct output
array1 = ['https://www.gumtree.com.au//s-ad/point-cook/car-seats/mothers-choice-car-seats/1275605213','https://www.gumtree.com.au//s-ad/point-cook/car-seats/mother-choice-booster/1275583974','https://www.gumtree.com.au//s-ad/point-cook/car-seats/booster-seat-hipod/1275528143']
array2 = ['https://www.gumtree.com.au//s-ad/point-cook/car-seats/mothers-choice-car-seats/1275605213','https://www.gumtree.com.au//s-ad/point-cook/car-seats/mother-choice-booster/1275583974','https://www.gumtree.com.au//s-ad/point-cook/car-seats/booster-seat-hipod/1275528143']
array3 = []
js array3 = array1.filter(function(obj) { return array2.indexOf(obj) == -1; });
for (n=0; n<array3.length; n++)
echo array3[n]
But for the following example above method do not work, where all the elements of first array (array_web_links) are added into unique array
https://www.gumtree.com.au/s-car-seats/wyndham/c20097l3001743?price=__30.00
product = count('//[@class="user-ad-collection-new-design__wrapper--row"]//a')
array_web_links = []
array_csv = []
for item from 1 to product
read (//[@class="user-ad-collection-new-design__wrapper--row"]//a/@href)[item] to link
productrow = ['https://www.gumtree.com.au/'+link]
js array_web_links.push(productrow)
load product.csv to lines_csv
array_lines_csv = lines_csv.split('\n')
for (n=0; n<array_lines_csv.length; n++)
array_items_csv = array_lines_csv[n].split(',')
for (m=0; m<array_items_csv.length; m++)
js array_csv.push(array_items_csv[m])
arrayUnique = []
js arrayUnique = array_web_links.filter(function(obj) { return array_csv.indexOf(obj) == -1; });
for (n=0; n<arrayUnique.length; n++)
echo arrayUnique[n]
Please help me to solve this

Hi @fazlur10 are you saying you tried above method which works but in your automation it does not work?
What is the error you have and what is not working?

if i run the above method as a single automation it works, but incase with
my scenario, when i run it actually no error comes, but the unique values
of first array not added to third array as element, instead all the
elements of first array are added to third array(unique array)
On Thu, 10 Jun 2021 at 18:08, Ken Soh @.***> wrote:

Hi @fazlur10 https://github.com/fazlur10 are you saying you tried above
method which works but in your automation it does not work?
What is the error you have and what is not working?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kelaberetiv/TagUI/issues/1057#issuecomment-858585224,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOBP5KY655TC4E5CEBGSMB3TSCW4TANCNFSM46OELTKQ
.

Your JavaScript code looks correct. Can you try to print out the values of the array_web_links and array_csv and see if you get more clues? The only reason I can think of is the array_csv, the values maybe have some special characters or quotation marks that make the comparison not working correctly and treat every item as unique.

while using echo to display both arrays, output of both arrays are as shown
in attachment echo output.png.
Output of array_csv elements is row by row, while output of
array_web_elements are together. How can I make the output of array_csv
look similar to array_web_links or vice versa?
Still if i print the arrays an error not found occurs as shown in
attachment print.png
array_web_links = []
array_csv = []
for item from 1 to product
read
@.@.)[item]
to link
productrow = ['https://www.gumtree.com.au/'+link]
js array_web_links.push(productrow)
load product.csv to lines_csv
array_lines_csv = lines_csv.split('\n')
for (n=0; n<array_lines_csv.length; n++)
array_items_csv = array_lines_csv[n].split(',')
for (m=0; m<array_items_csv.length; m++)
js array_csv.push(array_items_csv[m])
arrayUnique = []
js arrayUnique = array_web_links.filter(function(obj) { return
array_csv.indexOf(obj) == -1; });
print array_web_links
print array_csv
On Thu, 10 Jun 2021 at 23:54, Fazlur Rahman @.***>
wrote:

okay i will have a look and get back to you by tommrrow
On Thu, 10 Jun 2021 at 22:13, Ken Soh @.***> wrote:

Your JavaScript code looks correct. Can you try to print out the values
of the array_web_links and array_csv and see if you get more clues? The
only reason I can think of is the array_csv, the values maybe have some
special characters or quotation marks that make the comparison not working
correctly and treat every item as unique.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kelaberetiv/TagUI/issues/1057#issuecomment-858776891,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOBP5K3KSNOD46JMUNOU37LTSDTR3ANCNFSM46OELTKQ
.

this is the product.csv file
On Fri, 11 Jun 2021 at 11:43, Fazlur Rahman @.***>
wrote:

while using echo to display both arrays, output of both arrays are as
shown in attachment echo output.png.
Output of array_csv elements is row by row, while output of
array_web_elements are together. How can I make the output of array_csv
look similar to array_web_links or vice versa?
Still if i print the arrays an error not found occurs as shown in
attachment print.png
array_web_links = []
array_csv = []
for item from 1 to product
read
@.@.)[item]
to link
productrow = ['https://www.gumtree.com.au/'+link]
js array_web_links.push(productrow)
load product.csv to lines_csv
array_lines_csv = lines_csv.split('\n')
for (n=0; n<array_lines_csv.length; n++)
array_items_csv = array_lines_csv[n].split(',')
for (m=0; m<array_items_csv.length; m++)
js array_csv.push(array_items_csv[m])
arrayUnique = []
js arrayUnique = array_web_links.filter(function(obj) { return
array_csv.indexOf(obj) == -1; });
print array_web_links
print array_csv
On Thu, 10 Jun 2021 at 23:54, Fazlur Rahman @.***>
wrote:

okay i will have a look and get back to you by tommrrow
On Thu, 10 Jun 2021 at 22:13, Ken Soh @.***> wrote:

Your JavaScript code looks correct. Can you try to print out the values
of the array_web_links and array_csv and see if you get more clues? The
only reason I can think of is the array_csv, the values maybe have some
special characters or quotation marks that make the comparison not working
correctly and treat every item as unique.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kelaberetiv/TagUI/issues/1057#issuecomment-858776891,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOBP5K3KSNOD46JMUNOU37LTSDTR3ANCNFSM46OELTKQ
.

none of the attachments can be seen on the github issue

please check now
On Fri, 11 Jun 2021 at 11:54, Ken Soh @.***> wrote:

none of the attachments can be seen on the github issue
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kelaberetiv/TagUI/issues/1057#issuecomment-859308775,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOBP5K2H2ORD66OG5ZRXME3TSGTZFANCNFSM46OELTKQ
.

hello,
Have found the issue and sorted it, anyways thanks for the help.
The reason was that the array formed from csv data was storing it elements
as objects in the array while the other was not.
On Fri, 11 Jun 2021 at 12:02, Fazlur Rahman @.***>
wrote:

please check now
On Fri, 11 Jun 2021 at 11:54, Ken Soh @.***> wrote:

none of the attachments can be seen on the github issue
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/kelaberetiv/TagUI/issues/1057#issuecomment-859308775,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOBP5K2H2ORD66OG5ZRXME3TSGTZFANCNFSM46OELTKQ
.

Hi @fazlur10 oh great, and congratulations on creating this pretty complex automation!!


make bootstrap ci public

fixes https://github.com/mne-tools/mne-python/pull/6414#issuecomment-517267800
Earlier it came up that we are using a private function in our example, look for _bootstrap_ci
The idea was to make it public (and potentially wrap it).

cc @JoseAlanis

We should probably think a moment what we want from this function in terms of API. It could be nice to return the entire distribution and to allow for transformations or bootstrap-t options. Let's make sure not to create barriers for future  API extensions.

I would be fine with:
bootstrap_confidence_interval
it's more explicit.

+1000
yes, I would also go with something explicit bootstrap_confidence_interval or confidence_interval_bootstrapping or anything on those lines. Anything but ci it makes me think of Travis :P

@dengemann @agramfort @larsoner @massich
this is as far as I can take this PR, which I took up, because it popped up as an issue in one of my other PRs (#6414).
If we want to revamp the function more thoroughly, I suggest that either:

another person takes over this PR
we merge this PR as is, and hope that somebody will add on it before the next release
we close this PR and forget about it until somebody starts a new PR

Thanks @sappelhoff

+1 for a follow-up PR.

thx, @sappelhoff

hopefully the API would not change.


KNOX-2469 - Fixing Knox keystore path directory creation for symlinks

(It is very important that you created an Apache Knox JIRA for this change and that the PR title/commit message includes the Apache Knox JIRA ID!)
What changes were proposed in this pull request?
This patch fixes a potential issue regarding the creation of Knox's keystores. The current logic checks to see if the keystore path exists--if it doesn't, it tries to create the parent folder of the keystore path. However, there is an edge case, as described in JDK-8130464, where the directory creation fails if the final, parent directory of the keystore path is a symlink. This causes a failure during startup. This PR remedies this by checking if the keystore parent directory exists instead of checking the keystore itself, as checking directories is symlink-safe. There is also no extra logic after the keystore creation, so if the keystore does exist, this turns into a no-op.
(Please fill in changes proposed in this fix)
How was this patch tested?
(Please explain how this patch was tested. For instance: running automated unit/integration tests, manual tests. Please write down your test steps as detailed as possible)
(If this patch involves UI changes, please attach a screen-shot; otherwise, remove this)
This PR was tested against an environment in which the keystore path's parent directory is a symlink on Knox 1.4.0. The tests that pass before this change pass after this change, locally.
One issue that may be worth noting is that this does not fix the case where some ancestor directory within the keystore path directory chain is an invalid symlink. If C:\a is a symlink to C:\b but C:\b does not exist, then the attempt to create C:\a\z will fail. However, depending on how we would like to do this, this might be a task best assigned to the users.
Please review Knox Contributing Process before opening a pull request.

@jameschen1519 - thank you for this contribution!
It will be included in the upcoming 1.5.0 release.


Add Spring AI library reference

Spring AI provides full support for Ollama API including Tools and OpenAI API.

Thanks for the PR @tzolov! Possible to place it at the bottom of the list (or near other Spring/Java projects?) We will re-organize these soon


No such file or directory: 'LlamaDecoderLayer'

Hello, I am trying to run the training on my GPU however, when I run the following command
torchrun --nproc_per_node=1 --master_port=RANDOMPORT train.py
--model_name_or_path INPUT
--data_path ./alpaca_data.json
--bf16 True
--output_dir OUTPUT
--num_train_epochs 3
--per_device_train_batch_size 4
--per_device_eval_batch_size 4
--gradient_accumulation_steps 8
--evaluation_strategy "no"
--save_strategy "steps"
--save_steps 2000
--save_total_limit 1
--learning_rate 2e-5
--weight_decay 0.
--warmup_ratio 0.03
--lr_scheduler_type "cosine"
--logging_steps 1
--fsdp "full_shard auto_wrap"
--fsdp_config 'LlamaDecoderLayer'
--tf32 True
However, I keep getting hot with the following error.
No such file or directory: 'LlamaDecoderLayer'
I can't seem to find any info on this file, are we supposed to create our own config file or something? How can I get this fixed?

It looks like you don't have an input model. -model_name_or_path INPUT is supposed to be replaced by your actual directory.

Your command requires a fsdp_config file (LlamaDecoderLayer), not sure what is it. This is not the default command in their repo.

Ok oddly enough the first time I ran this code it failed saying "--fsdp_transformer_layer_cls_to_wrap" is deprecated and to change to fsdp_config and now I ran it again and of course it decides to work... Guess some other thing was happening and now it's fixed....


Feature/using a label identifier

This fixes 14 issues for us 👍🏻 Let me know when its ready to merge :)

This fixes 14 issues for us 👍🏻 Let me know when its ready to merge :)

Maybe I should replace scanner.advance(2) and actually add the / and the * as tokens?


ADDED : The Complete Web Developer in 2020: Zero to Mastery

added a new course for web development

Hey @matincodes !
Thanks for creating a Pull Request.
I'm sorry I can't merge this PR, because as per the contributing guidelines, only PR submissions which include free resources are valid. Please either commit the changes in this PR or close this one and create a new PR, with a free course.
Hit me up once done, and I'll merge this PR. Goodluck ! ✨


API key required

{
"error": {
"message": "You exceeded your current quota, please check your plan and billing details.",
"type": "insufficient_quota",
"param": null,
"code": null
}
}
Message from freechatgpt.chat:
Too many request! We recommend changing your API endpoint or API key
So that we still need to register an account?  Is there any way to get it work without paying a bill ：）

{ "error": { "message": "You exceeded your current quota, please check your plan and billing details.", "type": "insufficient_quota", "param": null, "code": null } }
Message from freechatgpt.chat:
Too many request! We recommend changing your API endpoint or API key
So that we still need to register an account? Is there any way to get it work without paying a bill ：）

Suggest using your own API.

Due to limited funding, it is difficult to sustain the free ChatGPT API. We suggest that you use your own API key.

免费的瞬间被用爆了

我之前一直用的自己的API，最近一直是这个提示；我是得给我自己充值了吗


Broad grammar improvements

There's a few changes in the PR but each of them isn't very substantial, but together do change a few things.

Update tree-sitter to latest, and update tests to handle new ERROR nodes which are more descriptive
Rearrange the repo so follow tree-sitter conventions, and things like tests work as expected
Fix older tests that we're failing
Add support for the else branch of a when generator
Add fields to nodes so that queries are easier to write
Add a stringFragment rule to allow the easy extraction of strings from within string literals
Improve the highlight query for types
Fix some of the tree-sitter cli complaints

The vast majority of the change are just updating the test to include the stringFragment node, which slightly modified almost every test file.
Strongly recommend working through PR on commit-by-commit basis.

Thanks for the PR! Sorry it took so long to address this.
This PR is a little large, but, I'm going to pick of some of these improvements into smaller PRs that can be merged separately. The first is here: https://github.com/apple/tree-sitter-pkl/pull/21


New payment screen & token network switch overlay UI

Fixes #391

Could you mention a few of the drawbacks compared to BEM?
For a start, I would like to mention that I don't consider the verbosity a
drawback in any case. On the contrary actually prefer the verbosity. It
makes it clear for me, and for the editor on what CSS rule I am editing or
renaming, etc. Maybe CSS modules could work with if they have proper editor
support, but after a quick look at examples with CSS modules and I am not
convinced that it is the best or even a better approach, sorry.
On Wed, Oct 30, 2019 at 6:01 AM Thomas Pischulski<EMAIL_ADDRESS>wrote:

@nephix commented on this pull request.
In raiden-dapp/src/components/TokenOverlay.vue
https://github.com/raiden-network/light-client/pull/433#discussion_r340431563
:

         </v-col>

       </v-list-item>

     </v-list>

   </v-col>

 </v-row>

 <v-row>

   <v-col cols="2" align-self="center"></v-col>

   <v-col cols="10" align-self="center" class="header">

     {{ $t('tokens.connected.header') }}

   </v-col>

 </v-row>

 <v-row id="tokenList">

   <v-col cols="12">

     <v-list v-for="(token, i) in tokens" :key="i" class="item-list">

Yeah but the verboseness and DOM readability could easily be improved by
using CSS modules. That way you get the best of both worlds without having
any compromises. BEM solves the global CSS scope problem but has a lot of
drawbacks. I will do the change for now but we should rethink this in the
future
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/raiden-network/light-client/pull/433?email_source=notifications&email_token=AARKEJER7USAJD4B2BPNWMDQREILHA5CNFSM4JGHLMVKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCJVG6WI#discussion_r340431563,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARKEJAGXMCEGHODJM5TW7TQREILHANCNFSM4JGHLMVA
.

Could you mention a few of the drawbacks compared to BEM? For a start, I would like to mention that I don't consider the verbosity a drawback in any case. On the contrary actually prefer the verbosity. It makes it clear for me, and for the editor on what CSS rule I am editing or renaming, etc. Maybe CSS modules could work with if they have proper editor support, but after a quick look at examples with CSS modules and I am not convinced that it is the best or even a better approach, sorry.

Have to strongly disagree here.

File size: BEM files, even minified, are a magnitude larger than scoped CSS modules
Cluttered templates: BEM CSS selectors clutter templates and therefore decrease readability and maintainability. This again gets worse by magnitudes if you begin add multiple BEM classes to a DOM node
Global modifiers can't be inherited as they're part of the BEM class name
BEM discourages usage of tag selectors, a lot of potential down the toilet

I could go on but just leave it for now. I think BEM had it's time and place in like early 2010s but since then better approaches, like CSS modules, have emerged that eliminated all the drawbacks

Generated CSS names from modules to the examples look quite similar so I
don't really see the magnitude here, more like a small percentage.
Why would you add multiple BEM classes to a DOM node? And I am not
really sure what you mean by clutter?
Global modifiers, could you please clarify?
Do you have a specific example in this project where this happened to
you and BEM has an inhibiting factor?

Like I said before I am still not convinced.
On Wed, Oct 30, 2019 at 7:25 AM Thomas Pischulski<EMAIL_ADDRESS>wrote:

Could you mention a few of the drawbacks compared to BEM? For a start, I
would like to mention that I don't consider the verbosity a drawback in any
case. On the contrary actually prefer the verbosity. It makes it clear for
me, and for the editor on what CSS rule I am editing or renaming, etc.
Maybe CSS modules could work with if they have proper editor support, but
after a quick look at examples with CSS modules and I am not convinced that
it is the best or even a better approach, sorry.
Have to strongly disagree here.

File size: BEM files, even minified, are a magnitude larger than
scoped CSS modules
Cluttered templates: BEM CSS selectors clutter templates and
therefore decrease readability and maintainability. This again gets worse
by magnitudes if you begin add multiple BEM classes to a DOM node
Global modifiers can't be inherited as they're part of the BEM
class name
BEM discourages usage of tag selectors, a lot of potential down the
toilet

I could go on but just leave it for now. I think BEM had it's time and
place in like early 2010s but since then better approaches, like CSS
modules, have emerged that eliminated all the drawbacks
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
https://github.com/raiden-network/light-client/pull/433?email_source=notifications&email_token=AARKEJDSCLKVPI2SRDWNGATQRESDZA5CNFSM4JGHLMVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECTBQTQ#issuecomment-547756110,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AARKEJCTVGUKX5TSLP7ZSU3QRESDZANCNFSM4JGHLMVA
.

Don't really want to bother this pull request more with this debate. My points were meant for you to do your own research and not me trying to convince you or trigger an endless back-and-forth discussion.
If it's more important to "win" a discussion by turning draw backs into supposed-to-be-advantages and challenging all advantages of the opposition instead of finding the best solution for the project, then so be it

@nephix I will continue looking into it, so your points were successful in triggering that if it was not clear. Thank you very much for that.
I have to apologize for the back and forth, and challenging everything, no it's not about "winning", but at this stage of the project, I also take into consideration the effort required to do something, along with the potential benefit over the way things are currently done.
It is my personal opinion, but I always think of the best solution in regards to the problems we are currently facing.
Anyway, thank you for starting this debate it was a starting point, and sorry If I come along as stubborn.

ty @kelsos and it didn't come across stubborn and no need to apologize. Technical debates can be heated as long as we stay open minded 👍


fix: logger accepts arrays as data and use tensorboard_logger Logger

What?
I was running experiments with MuZero when I ran into some errors with the loggers. I made changes so that the logger accepts Jax arrays as data to log and uses a tensorboard_logger Logger object instead of a global variable.
Why?
Somehow, a Jax array gets passed as input to the logger every so often, resulting in an error.
When using Hydra to perform multiple runs with the Tensorboard logger enabled, an error occurs on the second run due to the logger from the previous run existing and already being configured because it is based on a global variable in the tensorboard_logger library.
How?
In the case that a Jax array gets passed to the logger, it converts it to a scalar.
By using an instance of the Logger class instead of a global variable, the Tensorboard logger properly goes out of scope between runs.
Extra
I also had issues with running the commit linter step when making the commit because it would say "Please add rules to your commitlint.config.js". Making this change to the dependencies resolved it. I'm not sure if it's an issue on my end or not, although I did follow the steps for installing the pre-commit hooks.

Hello, thanks so much for spotting this and offering a fix. I'm relatively happy with the tensorboard change however this issue of a jax array being passed seems as if it would be common for all loggers. In that case, we should be making a fix in the StoixLogger class as that filters down to all the loggers being used. That way, the fix will be present for all the other loggers. If you're happy to make changes to this PR, I'd like the following:

Remove the if statements and .item() calls from the individual logger.
Perform a check like this after the np.mean or the "describe" function call in the stoix logger
check to see if the problem is fixed.

I really appreciate the feedback and being so specific on what to change. I moved the check for jax arrays to the StoixLogger log function, and it seems to work fine.


winPB: Install Cygwin without a cache

@gdams found a better way to install Cygwin on the OpenJDK-build github actions, so I thought it'd be best to do the same here:
https://ci.adoptopenjdk.net/job/VagrantPlaybookCheck/883/
This ends up installing in 2 minutes as opposed to the ~20-25 minutes to install it before.

Ref: Latest commit, I also removed the unnecessary var file :-)

At the request of @sxa , I've compiled 2 lists of the cygwin packages that we install, both before this PR and afterwards. This means if we have something go wrong, we have a log of what's we've changed and what we're missing.
This was done in mintty.exe by running cygcheck --check-setup | awk '{print $1 " " $2}' >> ***_cyglist.txt
old_cyglist.txt
new_cyglist.txt


missing 'use strict' break on node 4.2.3

Get error:
stack=SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
from bellajs/index.js:5:28
so it fail to load src/main.js
Seem to me 'use strict' was removed in version 5.2 and this break when try to load bella.js

Hi @mulyoved, thank you for your feedback.
In order to encourage people upgrade Node.js to the latest version and make use of the best ES6 features, BellaJS now is only available in Node.js v6.0.0 and newer.

Cannot use Node6 on production as not yet LTS,
use bellajs through feed-reader which use bellajs@latest
so build is broken
should use shrinkwrap

Sorry for the interruption. I will fix this issue as soon.

@mulyoved : Now you can install<EMAIL_ADDRESS>to get it works on node 4.
Cheers,
Dong


[ENG-437] View only links

NOTE: Not testable without BE changes (but could be safely merged/released without them) https://github.com/CenterForOpenScience/osf.io/pull/9020
Purpose
Support view-only links.

Summary of Changes

Add view_only query param to application route
Store VOL info on the current-user service
Include view_only in all API requests, all links within OSF
Display a banner with a button to stop using a VOL
If the VOL is anonymized, display "Anonymous contributors" in place of any contributor list

Side Effects
Added some VOL logic to the @checkAuth decorator/mixin because the VOL token should be set before the mixed-in beforeModel to correctly handle all auth flows. This violates @checkAuth's encapsulation, but the need for this seems to indicate it shouldn't be a decorator/mixin at all. In the future, we should refactor it to a service method called in the application route's beforeModel

Feature Flags

QA Notes
Backend branch required for testing VOLs on the new registries overview page: https://github.com/CenterForOpenScience/osf.io/pull/9020
Registries scenarios:

Non-anonymized VOL: anyone can view (even embargoed reg, even logged out)
Anonymized VOL: anyone can view (even embargoed reg, even logged out), but no contributor info available -- contributor lists say "Anonymous contributors"

Other things:

Because VOLs in the API are more comprehensive than in legacy, we always display a VOL banner. Clicking "Leave this view" in the banner should take you to the landing page (dashboard, if logged in) without view_only in the URL.
When you start with a VOL and browse around OSF, view_only=blahblahblah should stay in the URL
Anonymized VOLs hide all contributor info. If you start with an anonymized VOL and navigate e.g. to the dashboard, all projects in your dashboard list will be anonymized too.

Ticket

https://openscience.atlassian.net/browse/ENG-437
Reviewer Checklist

[ ] meets requirements
[ ] easy to understand
[ ] DRY
[ ] testable and includes test(s)
[ ] changes described in CHANGELOG.md

Pull Request Test Coverage Report for Build 2863

65 of 72 (90.28%)  changed or added relevant lines in 13 files are covered.
18 unchanged lines in 5 files lost coverage.
Overall coverage increased (+0.2%) to 71.628%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

lib/osf-components/addon/components/contributor-list/component.ts
0
1
0.0%

lib/osf-components/addon/components/maintenance-banner/component.ts
0
1
0.0%

lib/osf-components/addon/components/osf-link/component.ts
16
17
94.12%

app/decorators/check-auth.ts
3
5
60.0%

app/services/current-user.ts
3
5
60.0%

Files with Coverage Reduction
New Missed Lines
%

lib/osf-components/addon/components/osf-link/component.ts
1
88.42%

app/decorators/check-auth.ts
1
72.55%

app/adapters/osf-adapter.ts
4
80.0%

lib/osf-components/addon/components/maintenance-banner/component.ts
4
63.77%

app/services/current-user.ts
8
68.32%

Totals

Change from base Build 2857:
0.2%

Covered Lines:
6053

Relevant Lines:
7592

💛  - Coveralls

Closing in favor of #670


Support USB/IP protocol?

The USB/IP protocol is used in a number of locations such as;

USB/IP project itself - http://usbip.sourceforge.net/
Renode - https://renode.readthedocs.io/en/latest/tutorials/usbip.html
Windows Subsystem for Linux  - https://github.com/microsoft/WSL
Probably a lot of others too...

Would be awesome to have a backend for this protocol.

Related (possibly useful) code: https://chromium.googlesource.com/chromiumos/third_party/virtual-usb-printer/+/e9a56869415a3b35f589e5fc1aaeac65ba5ed575/python/USBIP.py


mesh ex13 ourselves

With another round of pygmsh misery upon us #482 #484, I thought it time to lift one more of the examples out of it and mesh it ourselves.

The solution is hardly changed, but the slight artifacts of the mesh are different, so here's a new figure.


Getting TypeError when opening the scan page

Using this in a web app and when tapping on a button
 onTap: () {
            openScanner(context, _onResult);},

I'm getting the below error over and over
TypeError: dart.global.detectBarcode is not a function
packages/camcode/camcode_web.dart 280:5                                  _takePicture
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 84:54       runBody
dart-sdk/lib/_internal/js_dev_runtime/patch/async_patch.dart 123:5       _async
packages/camcode/camcode_web.dart 240:28                                 [_takePicture]
packages/camcode/camcode_web.dart 233:9                                  <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/isolate_helper.dart 80:17  <fn>
Webcam taille : 1080 & 1920
Webcam video taille : 0 & 0

[✓] Flutter (Channel stable, 3.3.7, on macOS 12.6 21G115 darwin-x64, locale en-RO)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1)
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] VS Code (version 1.73.1)
[✓] Connected device (2 available)
[✓] HTTP Host Availability

OK ... so it seems that the above error was because the app was running in the Chrome debugger on my computer. And that's an issue if someone opens the app in a browser. See screenshot.

Other than that, it doesn't do anything when opening the app in a mobile phone with camera access. This is what I did. I took out some code since I don't need multiple cameras. Just the main on the back of the phone.
import 'package:camcode/cam_code_scanner.dart';
import 'package:flutter/material.dart';

class CamCodeScannerPage extends StatefulWidget {
  final Function(String) onResult;

  const CamCodeScannerPage(this.onResult, {super.key});

  @override
  CamCodeScannerPageState createState() => CamCodeScannerPageState();
}

class CamCodeScannerPageState extends State<CamCodeScannerPage> {
  final CamCodeScannerController _controller = CamCodeScannerController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Stack(
        children: [
          CamCodeScanner(
            width: MediaQuery.of(context).size.width,
            height: MediaQuery.of(context).size.height,
            refreshDelayMillis: 16,
            onBarcodeResult: (barcode) {
              widget.onResult(barcode);
            },
            controller: _controller,
            showDebugFrames: false,
            minimalResultCount: 1,
          ),
          Positioned(
            bottom: 48.0,
            left: 48.0,
            child: Row(
              children: [
                ElevatedButton(
                  onPressed: () {
                    _controller.releaseResources();
                  },
                  child: const Text('Release resources'),
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }
}

Ignore the SizedBox please ... I moved the context.pop to the onResult method ... but it never reaches it. Maybe I'm doing something wrong?
  void _onResult(String result) {
    setState(() {
      barcodeValue = result;
    });
    Navigator.of(context).pop();
  }

  void openScanner(BuildContext context, Function(String) onResult) {
    showDialog(
      context: context,
      builder: (context) => SizedBox(
        width: 300.0,
        height: 300.0,
        child: Center(child: CamCodeScannerPage(_onResult)),
      ),
    );
  }

Hi. Thank you for explaining :)
So I did what you said ... but it's still not working. I'm missing something for sure.
Added the scripts in the /web/index.html file
  <script<EMAIL_ADDRESS>  <script src="js/barcode.js"></script>
</head>

You can see from the Source tab from Chrome that they are both being imported.

I've just tested it on my side and all works well. I cannot figure out what's going on on your version. Can you please provide me the full code via a Github link maybe ?

How can I do that? Github link? I made the changes. I didn't understand 100% before and got it to work a bit. I got it to scan a barcode by moving the phone close and away from the barcode. It read it once ... and that's it. I wasn't able to read it again. I tried a barcode from a can of RedBull and nothing ... Code is just as above. Just added the javascript scripts.
While testing, it activated the selfie camera which worked better then the main camera.

This is so weird ... I'll share my code again here
web/index.html
  <script<EMAIL_ADDRESS>  <script src="js/barcode.js"></script>

web/js/barcode.js
function detectBarcode(dataUrl, callback) {
    Quagga.decodeSingle({
        decoder: {
            readers: [
                "code_128_reader",
                "ean_reader",
                "ean_8_reader",
                "code_39_reader",
                "code_39_vin_reader",
                "code_93_reader"
            ] // List of active readers
        },
        locate: true, // try to locate the barcode in the image
        src: dataUrl // or 'data:image/jpg;base64,' + data
    }, function (result) {
        if (result && result.codeResult) {
            console.log("result", result.codeResult.code);
            callback(result.codeResult.code);
        } else {
            console.log("not detected");
        }
    });
}

home_screen.dart
 String barcodeValue = 'barcode';

  void _onResult(String result) {
    setState(() {
      barcodeValue = result;
    });
  }

  void openScanner(BuildContext context, Function(String) onResult) {
    showDialog(
      context: context,
      builder: (context) => CamCodeScannerPage(_onResult),
    );
  }

cam_code_scanner_page.dart
import 'package:camcode/cam_code_scanner.dart';
import 'package:flutter/material.dart';

class CamCodeScannerPage extends StatefulWidget {
  final Function(String) onResult;

  const CamCodeScannerPage(this.onResult, {super.key});

  @override
  CamCodeScannerPageState createState() => CamCodeScannerPageState();
}

class CamCodeScannerPageState extends State<CamCodeScannerPage> {
  final CamCodeScannerController _controller = CamCodeScannerController();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Stack(
        children: [
          CamCodeScanner(
            width: MediaQuery.of(context).size.width,
            height: MediaQuery.of(context).size.height,
            refreshDelayMillis: 16,
            onBarcodeResult: (barcode) {
              Navigator.of(context).pop();
              widget.onResult(barcode);
            },
            controller: _controller,
            showDebugFrames: false,
            minimalResultCount: 1,
          ),
          Positioned(
            bottom: 48.0,
            left: 48.0,
            child: Row(
              children: [
                ElevatedButton(
                  onPressed: () {
                    _controller.releaseResources();
                  },
                  child: const Text('Release resources'),
                ),
              ],
            ),
          ),
        ],
      ),
    );
  }
}

Yeah ... it does. How would I improve the autofocus?

I think the problem is directly inside the camcode plugin itself.
If you look at this code
https://github.com/PiotrFLEURY/camcode/blob/a48c33389a090cdd43d4c8b9fc55f2c9370544fc/lib/camcode_web.dart#L181
We are searching cameras regarding some options in order to filter them. In my opinion, we should find the correct option to find only "standard" camera lens and exclude wide angle ones on order to get better scan performance.

You might be right ... When I was testing the app using flutter run -d web-server --web-port 5011 with my phone connected to the computer, it opened the selfie camera that worked much better than the main.

Hmm ... what about switching between cameras while scanning the barcode?

In fact this feature is already implemented but seems to not working 100% well. I looked at the device selection code but for the moment I can't figure out why it is not working on every devices.
This is a hard part because this is working on every device I have and it is not working so well on some user devices.
As this project is open source, I can only hope that some ones make some enhancement proposition for they own device in a pull request.
If you can make it work on your device I'll be pleased to review your pull request and publish it on pub.dev

I'll see ... Don't have so much experience with Flutter

Just an update ... I tried with another phone (Samsung A52)... but still doesn't work. And FYI the app running on an iPhone 6 doesn't even open the camera.


Can not open profile

Describe the bug
Not possible to open the profile page
(Maybe it's related to #460 somehow?)
To Reproduce
Steps to reproduce the behavior:
Use self-hosted version
Go to 'Profile'
Page is empty
Expected behavior
Possibility to view and edit profile
Get the following console log:
(index):64  cdn.tailwindcss.com should not be used in production. To use Tailwind CSS in production, install it as a PostCSS plugin or use the Tailwind CLI: https://tailwindcss.com/docs/installation
(anonymous) @ (index):64
ma:1  Manifest: Line: 1, column: 1, Syntax error.
react-dom.production.min.js:189  Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7B_title%2C%20_name%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at th (react-dom.production.min.js:152:54)
    at J (react-dom.production.min.js:162:372)
    at Yi (react-dom.production.min.js:192:291)
    at Wk (react-dom.production.min.js:294:1)
    at Vk (react-dom.production.min.js:280:383)
    at Uk (react-dom.production.min.js:280:319)
    at Jk (react-dom.production.min.js:280:180)
    at Ok (react-dom.production.min.js:271:86)
    at Hk (react-dom.production.min.js:268:399)
    at J (scheduler.production.min.js:13:197)
Mi @ react-dom.production.min.js:189
Oi.c.callback @ react-dom.production.min.js:189
ih @ react-dom.production.min.js:144
lk @ react-dom.production.min.js:262
jk @ react-dom.production.min.js:260
ik @ react-dom.production.min.js:259
Xk @ react-dom.production.min.js:283
Qk @ react-dom.production.min.js:281
Hk @ react-dom.production.min.js:269
J @ scheduler.production.min.js:13
R @ scheduler.production.min.js:14
react-dom.production.min.js:189  Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7B_email%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at th (react-dom.production.min.js:152:54)
    at J (react-dom.production.min.js:162:372)
    at Yi (react-dom.production.min.js:192:291)
    at Wk (react-dom.production.min.js:294:1)
    at Vk (react-dom.production.min.js:280:383)
    at Uk (react-dom.production.min.js:280:319)
    at Jk (react-dom.production.min.js:280:180)
    at Ok (react-dom.production.min.js:271:86)
    at Hk (react-dom.production.min.js:268:399)
    at J (scheduler.production.min.js:13:197)
Mi @ react-dom.production.min.js:189
Oi.c.callback @ react-dom.production.min.js:189
ih @ react-dom.production.min.js:144
lk @ react-dom.production.min.js:262
jk @ react-dom.production.min.js:260
ik @ react-dom.production.min.js:259
Xk @ react-dom.production.min.js:283
Qk @ react-dom.production.min.js:281
Hk @ react-dom.production.min.js:269
J @ scheduler.production.min.js:13
R @ scheduler.production.min.js:14
react-dom.production.min.js:189  Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7B_phone%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at th (react-dom.production.min.js:152:54)
    at J (react-dom.production.min.js:162:372)
    at Yi (react-dom.production.min.js:192:291)
    at Wk (react-dom.production.min.js:294:1)
    at Vk (react-dom.production.min.js:280:383)
    at Uk (react-dom.production.min.js:280:319)
    at Jk (react-dom.production.min.js:280:180)
    at Ok (react-dom.production.min.js:271:86)
    at Hk (react-dom.production.min.js:268:399)
    at J (scheduler.production.min.js:13:197)
Mi @ react-dom.production.min.js:189
Oi.c.callback @ react-dom.production.min.js:189
ih @ react-dom.production.min.js:144
lk @ react-dom.production.min.js:262
jk @ react-dom.production.min.js:260
ik @ react-dom.production.min.js:259
Xk @ react-dom.production.min.js:283
Qk @ react-dom.production.min.js:281
Hk @ react-dom.production.min.js:269
J @ scheduler.production.min.js:13
R @ scheduler.production.min.js:14
react-dom.production.min.js:152  Uncaught Error: Minified React error #31; visit https://reactjs.org/docs/error-decoder.html?invariant=31&args[]=object%20with%20keys%20%7B_title%2C%20_name%7D for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
    at th (react-dom.production.min.js:152:54)
    at J (react-dom.production.min.js:162:372)
    at Yi (react-dom.production.min.js:192:291)
    at Wk (react-dom.production.min.js:294:1)
    at Vk (react-dom.production.min.js:280:383)
    at Uk (react-dom.production.min.js:280:319)
    at Jk (react-dom.production.min.js:280:180)
    at Ok (react-dom.production.min.js:271:86)
    at Hk (react-dom.production.min.js:268:399)
    at J (scheduler.production.min.js:13:197)
th @ react-dom.production.min.js:152
J @ react-dom.production.min.js:162
Yi @ react-dom.production.min.js:192
Wk @ react-dom.production.min.js:294
Vk @ react-dom.production.min.js:280
Uk @ react-dom.production.min.js:280
Jk @ react-dom.production.min.js:280
Ok @ react-dom.production.min.js:271
Hk @ react-dom.production.min.js:268
J @ scheduler.production.min.js:13
R @ scheduler.production.min.js:14

This should now be fixed. Please update to latest


Fix stuck requests

If we don't provide a Buffer as res2 (as opposed to a String) to TChannel before sending the forwarded request back to the sender, the size of the buffer TChannel gives back (as arg3) is of an inconsistent size. This is particularly harmful when transferring Content-Length HTTP headers that use the size as a way of communicating how much data there is to consume.
Before the fix was made, the test would hang waiting for data to arrive (as dictated by Content-Length). After the fix, the requestor no longer waits.
@uber/ringpop @jwyuan @charliezhang @Raynos @jcorbin

lgtm

From reading this fix and test I suspect it's a tchannel core bug.
I suspect that fragmentation is broken when str.lenght !== buf.lenght
Cc @jcorbin

@Raynos I originally suspected that might be the case too. It'd be great to prove this is true. Let me know if/when you find something.


Export-NavContainerDatabasesAsBacpac error deleting [user login] data

Just updated to container helper <IP_ADDRESS>. I created new-navcontainer, used same source bakfile as I did before. Export to bacpac cmdlet comes with an error (see below).
I was not aware of data in these tables. My previous version of navcontainer helper did not bother (or did delete).
I deleted data in [user login] tables, created new source bak file (and navcontainer). Still an error when exporting. Because I know tables are empty, I skipped Invoke-Sqlcmd for deleting this data. The script runs OK.
Successfully exported database and saved it to file 'C:\ProgramData\NavContainerHelper\Extensions\dev021nlmt\app.bacpac'.
Copying Database on localhost\SQLEXPRESS from tenant to tempTenant
Removing Database tempTenant from localhost\SQLEXPRESS
Taking database tenant offline
Copying database files
Attaching files as new Database tempTenant
Putting database tenant back online
_**Remove data from User table and related tables in tempTenant database.
DELETE FROM dbo.[Contoso Demo Install bedrijf$User Login]
The WriteObject and WriteError methods cannot be called from outside the overrides of the BeginProcessing, ProcessRecord, and EndProcessing methods, and they can only be called from within the same
thread. Validate that the cmdlet makes these calls correctly, or contact Microsoft Customer Support Services.
at Remove-NavTenantDatabaseUserData, : line 124
at , : line 220
at , : line 216**_

I can see this behavior was added in <IP_ADDRESS>. I assume you were running an older version before that?
I cannot repro the scenario - what database are you using? (country?)
Are you running as admin?

Do you have multiple companies in the database?

Yes 2.
Vriendelijke groet | Kind regards,
Edwin Keukens
Migratie- en release coördinator NAV
+31 6 51253699tel:+31 6 51253699
www.4ps.nlhttps://www.4ps.nl
[https://www.4ps.nl/userfiles/image/logo(1).png]
[https://www.4ps.nl/userfiles/image/footer.png]
Van: Freddy Kristiansen<EMAIL_ADDRESS>Verzonden: donderdag 11 april 2019 23:57
Aan: Microsoft/navcontainerhelper<EMAIL_ADDRESS>CC: Edwin Keukens<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Onderwerp: Re: [Microsoft/navcontainerhelper] Export-NavContainerDatabasesAsBacpac error deleting [user login] data (#421)
Do you have multiple companies in the database?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/navcontainerhelper/issues/421#issuecomment-482336324, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKJD7CPHDGE4RIXMU5ELCN3PP6X3FANCNFSM4HFLQQFA.

Hello,
I’ve created container with imagename = "microsoft/bcsandbox:nl"
So NL database.
NavContainerHelper is version <IP_ADDRESS>
Host is Microsoft Windows 10 Pro - 1803
Docker Client Version is 18.09.2
Docker Server Version is 18.09.2
Using image microsoft/bcsandbox:nl-ltsc2016
Removing container dev021nl
Removing dev021nl from hosts
Removing C:\ProgramData\NavContainerHelper\Extensions\dev021nl
Creating Nav container dev021nl
Using license file C:\MergeToBC\bacpac\4805272.flf
Version: 13.4.28874.29517-NL
Platform: 13.0.28871.29362
Generic Tag: <IP_ADDRESS>
Container OS Version: 10.0.14393.2791 (ltsc2016)
Host OS Version: 10.0.17134.706 (1803)
The container operating system does not match the host operating system, forcing hyperv isolation.
Using hyperv isolation
Creating container dev021nl from image microsoft/bcsandbox:nl-ltsc2016
Vriendelijke groet | Kind regards,
Edwin Keukens
Migratie- en release coördinator NAV
+31 6 51253699tel:+31 6 51253699
www.4ps.nlhttps://www.4ps.nl
[https://www.4ps.nl/userfiles/image/logo(1).png]
[https://www.4ps.nl/userfiles/image/footer.png]
Van: Freddy Kristiansen<EMAIL_ADDRESS>Verzonden: donderdag 11 april 2019 23:51
Aan: Microsoft/navcontainerhelper<EMAIL_ADDRESS>CC: Edwin Keukens<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Onderwerp: Re: [Microsoft/navcontainerhelper] Export-NavContainerDatabasesAsBacpac error deleting [user login] data (#421)
I can see this behavior was added in <IP_ADDRESS>. I assume you were running an older version before that?
I cannot repro the scenario - what database are you using? (country?)
Are you running as admin?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/navcontainerhelper/issues/421#issuecomment-482334644, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKJD7CK6GXFITCEGNKWWWDTPP6XDBANCNFSM4HFLQQFA.

I assume I can continue uploading this bacpac to embed app in LCS?
I only switched off deleting this data, but I checked that in both companies this table is empty. So the created bacpac (ran ok after switching off this statement) must be OK.
In the script I see this is the only user table which is company specific.
Vriendelijke groet | Kind regards,
Edwin Keukens
Migratie- en release coördinator NAV
+31 6 51253699tel:+31 6 51253699
www.4ps.nlhttps://www.4ps.nl
[https://www.4ps.nl/userfiles/image/logo(1).png]
[https://www.4ps.nl/userfiles/image/footer.png]
Van: Edwin Keukens
Verzonden: donderdag 11 april 2019 23:58
Aan: 'Microsoft/navcontainerhelper'<EMAIL_ADDRESS>Microsoft/navcontainerhelper<EMAIL_ADDRESS>CC: Author<EMAIL_ADDRESS>Onderwerp: RE: [Microsoft/navcontainerhelper] Export-NavContainerDatabasesAsBacpac error deleting [user login] data (#421)
Hello,
I’ve created container with imagename = "microsoft/bcsandbox:nl"
So NL database.
NavContainerHelper is version <IP_ADDRESS>
Host is Microsoft Windows 10 Pro - 1803
Docker Client Version is 18.09.2
Docker Server Version is 18.09.2
Using image microsoft/bcsandbox:nl-ltsc2016
Removing container dev021nl
Removing dev021nl from hosts
Removing C:\ProgramData\NavContainerHelper\Extensions\dev021nl
Creating Nav container dev021nl
Using license file C:\MergeToBC\bacpac\4805272.flf
Version: 13.4.28874.29517-NL
Platform: 13.0.28871.29362
Generic Tag: <IP_ADDRESS>
Container OS Version: 10.0.14393.2791 (ltsc2016)
Host OS Version: 10.0.17134.706 (1803)
The container operating system does not match the host operating system, forcing hyperv isolation.
Using hyperv isolation
Creating container dev021nl from image microsoft/bcsandbox:nl-ltsc2016
Vriendelijke groet | Kind regards,
Edwin Keukens
Migratie- en release coördinator NAV
+31 6 51253699tel:+31 6 51253699
www.4ps.nlhttps://www.4ps.nl
[https://www.4ps.nl/userfiles/image/logo(1).png]
[https://www.4ps.nl/userfiles/image/footer.png]
Van: Freddy Kristiansen<EMAIL_ADDRESS>Verzonden: donderdag 11 april 2019 23:51
Aan: Microsoft/navcontainerhelper <navcontainerhelper<EMAIL_ADDRESS>CC: Edwin Keukens <ekeukens<EMAIL_ADDRESS>Author <author<EMAIL_ADDRESS>Onderwerp: Re: [Microsoft/navcontainerhelper] Export-NavContainerDatabasesAsBacpac error deleting [user login] data (#421)
I can see this behavior was added in <IP_ADDRESS>. I assume you were running an older version before that?
I cannot repro the scenario - what database are you using? (country?)
Are you running as admin?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/navcontainerhelper/issues/421#issuecomment-482334644, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKJD7CK6GXFITCEGNKWWWDTPP6XDBANCNFSM4HFLQQFA.

Yes, you should be good

The right fix for this is
                $tables = Invoke-Sqlcmd @params -Query "USE [$DatabaseName] SELECT name FROM sysobjects WHERE (xtype = 'U' ) AND (name LIKE '%User Login')"
                $tables | % {
                    Write-Host "DELETE FROM dbo.[$($_.Name)]"
                    Invoke-Sqlcmd @params -Query "USE [$DatabaseName] DELETE FROM dbo.[$($_.Name)]"
                }

To end the first Invoke-SqlCmd before running into the next.
Will be fixed in the next update - probably later tonight.

Thanks for quick response Freddy, really appreciate..
Almost up and running with embed app at 4ps.. Thanks again..
Vriendelijke groet | Kind regards,
Edwin Keukens
Migratie- en release coördinator NAV
+31 6 51253699tel:+31 6 51253699
www.4ps.nlhttps://www.4ps.nl
[https://www.4ps.nl/userfiles/image/logo(1).png]
[https://www.4ps.nl/userfiles/image/footer.png]
Van: Freddy Kristiansen<EMAIL_ADDRESS>Verzonden: vrijdag 12 april 2019 00:08
Aan: Microsoft/navcontainerhelper<EMAIL_ADDRESS>CC: Edwin Keukens<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Onderwerp: Re: [Microsoft/navcontainerhelper] Export-NavContainerDatabasesAsBacpac error deleting [user login] data (#421)
The right fix for this is
            $tables = Invoke-Sqlcmd @params -Query "USE [$DatabaseName] SELECT name FROM sysobjects WHERE (xtype = 'U' ) AND (name LIKE '%User Login')"

            $tables | % {

                Write-Host "DELETE FROM dbo.[$($_.Name)]"

                Invoke-Sqlcmd @params -Query "USE [$DatabaseName] DELETE FROM dbo.[$($_.Name)]"

            }

To end the first Invoke-SqlCmd before running into the next.
Will be fixed in the next update - probably later tonight.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/Microsoft/navcontainerhelper/issues/421#issuecomment-482344157, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AKJD7CKXCTQZMHSMPSY7BZ3PP6ZDNANCNFSM4HFLQQFA.

Shipped in <IP_ADDRESS>


Deprecate the interactive launcher

Why?
On Jan 30, 2016 7:00 AM, "dessant"<EMAIL_ADDRESS>wrote:

You can view, comment on, or merge this pull request online at:
https://github.com/kivy/kivy/pull/3955
Commit Summary

deprecate the interactive launcher

File Changes

M kivy/interactive.py
https://github.com/kivy/kivy/pull/3955/files#diff-0 (7)

Patch Links:

https://github.com/kivy/kivy/pull/3955.patch
https://github.com/kivy/kivy/pull/3955.diff

—
Reply to this email directly or view it on GitHub
https://github.com/kivy/kivy/pull/3955.

@matham, there were discussions on irc about deprecating it for some time.
It is generally buggy and broken, and people seem to think that it should be rewritten rather than patched.

This is a good idea, we need to provide a alternative too, though for now just deprecating is necessary. It's unmaintained code. We can simply use twisted manhole that already works wonders for us on kivy-remote-shell.

What is the alternative to interactive launcher? Does kivy support interactive usage in ipython currently?


Take vertical and temporal extent in account

Task #4 allows the horizontal component of the area of interest to be given to PROJ when searching for a coordinate operation. However the vertical and temporal components are not yet given to PROJ. The use of vertical extent is pending the mapping of PROJ structure to javax.measure, and the use of temporal extent is pending the mapping of PROJ structure to java.time.

Deferred to GeoAPI 4.0 because extracting the start time / end time from TemporalPrimitive object require more of org.opengis.temporal than what is provided in GeoAPI 3.0.
Extracting of minimum and maximum height values become complicated if there is more than one VerticalExtent since we may have to perform coordinate transformations. Alternatively we can pass the array of VerticalExtent verbatim to PROJ, but this is a little bit complicated and maybe not worth since I'm not sure that current PROJ version uses the temporal extent in CoordinateOperationContext.


Setup PHP Composer Workflow

Description
This PR fixes #69
Notes for Reviewers
Not ready to be merged yet, have created the workflow but haven't fixed issues with composer.json
Signed commits

[ ] Yes, I signed my commits.

Not ready to be merged


type of this in Object.defineProperty

Suggestion
Typescript can't detect the type of this in Object.defineProperty
Object.defineProperty(ConstructionSite.prototype, "memory", {
  get: function (): ConstructionSiteMemory {
    return (Memory.construction_sites[this.id] ??= {
      pos: { x: this.pos.x, y: this.pos.y },
      type: this.structureType,
    });
  },
});

VSCode tells me that this is of type any, and autocompletion doesn't work.But actually this is an instance of ConstructionSite.
I can use asserts to solve this problem.
function assert<T>(value: any): asserts value is T
{ /** simply does nothing */ }
...
assert<ConstructionSite>(this);
...

So, is there any other way to help typescript detect the type of this, or can typescript to be smart enough to know the type of this in Object.defineProperty.
🔍 Search Terms

Object.defineProperty
type hint
this

✅ Viability Checklist
My suggestion meets these guidelines:

[ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
[x] This wouldn't change the runtime behavior of existing JavaScript code
[ ] This could be implemented without emitting different JS based on the types of the expressions
[x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
[x] This feature would agree with the rest of TypeScript's Design Goals.

⭐ Suggestion
Automatically detect the type of this in Object.defineProperty

Could you provide a standalone example that when pasted into The TypeScript Playground clearly demonstrates the issue without unrelated problems?

lib.es5.d.ts has explicitly added ThisType<any>:
defineProperty<T>(o: T, p: PropertyKey, attributes: PropertyDescriptor & ThisType<any>): T;

It's not safe to say ThisType<T>, because the this value is the object on which the property is being accessed, but not necessarily o itself. For example:
const child = Object.create(ConstructionSite.prototype);
child.id = { "I am": "not a string" };
child.memory; // The `this` value inside the getter will be `child` instead of an instance of `ConstructionSite`

Of course, whether that's the actual reasoning I'm not sure. TS is super weak when it comes to prototypes and inheritance and even this contexts in general...

I don't think checking this instanceof ConstructionSite is sufficient, because in my example, child also has ConstructionSite.prototype in its prototype chain, but the id property has been overridden with something totally unrelated. You probably need to check for the type of this.id specifically, if you want to guard against the case I brought up. Again, I don't know if that's the reason why TS has ThisType<any>, because you can hack class getters/object getters in the same way, which TS seems to be happy about.
If you just want better type hints, your empty assert function already works. Otherwise, you can also use an explicit this parameter:
Object.defineProperty(ConstructionSite.prototype, "memory", {
  get(this: ConstructionSite): ConstructionSiteMemory {
    return (Memory.construction_sites[this.id] ??= {
      pos: { x: this.pos.x, y: this.pos.y },
      type: this.structureType,
    });
  },
});


Make the failurePolicy of the mutating admission controller configurable

Is your feature request related to a problem? Please describe.
The helm chart does not allow the failurePolicy for the mutating admission controller to be configurable. Since pods can be created or updated before the Azure Workload Identity webhook controllers have started up, they can be correctly annotated but fail to have the credential information injected into their definition.
Describe the solution you'd like
Allow the user to specify what type of failurePolicy they'd like to have in their cluster.
Describe alternatives you've considered
n/a
Additional context
This comes in scenarios where many nodes are being swapped - especially in small clusters.

@tkent Gatekeeper has some considerations documented here https://open-policy-agent.github.io/gatekeeper/website/docs/failing-closed, this is especially important since you are swapping nodes. Fail closed can cause circular dependencies in your clusters.

Thanks @aramase!
@sozercan  - I appreciate the warning. Hopefully, in a future version of k8s, we'll be able to define scope rules that exclude the pods providing the webhook to avoid the chicken-and-egg problem kubernetes#92157.


Fix start-up crash and drop click_log

Fix a crash caused by a change of interface in click_log.
Given that the new interface is a bit more verbose, and doesn't really add much to using base logging, I'll adhere with the latter.

Well it does provide color formatting :)
On Fri, Aug 25, 2017 at 08:53:04PM +0000, Hugo Osvaldo Barrera wrote:

Fix a crash caused by a change of interface in click_log.
Given that the new interface is a bit more verbose, and doesn't really add much to using base logging, I'll adhere with the latter.
You can view, comment on, or merge this pull request online at:
https://github.com/pimutils/todoman/pull/264
-- Commit Summary --

Fix start-up crash and drop click_log

-- File Changes --
M CHANGELOG.rst (6)
M requirements.txt (1)
M todoman/cli.py (14)

-- Patch Links --
https://github.com/pimutils/todoman/pull/264.patch
https://github.com/pimutils/todoman/pull/264.diff
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/pimutils/todoman/pull/264

I tried upgrading to click_log v0.2.0, but it doesn't seem to work.
Running todo -v DEBUG results in no log output. Looks like click_log only changes the level for the current module's logger (todoman.cli in this case), and won't affect other modules.

@untitaker I'm very open to re-including click-log in future (a few extra things needs polishing, IMHO), but for now, I'm merging this since it fixes a critical, fatal bug that doesn't allow the app to run.
I've opened https://github.com/click-contrib/click-log/issues/9 with one of the issues I've encountered. If I've the time, I might try to look into it.


Hard to Inject Provider-specifc Logic into Quota Check on Provision Requests

It became obvious, while working on adding proper quota checks for CPU upon VM provisioning on IBM Power, that it's not easy to inject provider-specific logic in the workflow. This may be stemming from the fact that IBM Power cloud manager doesn't use the Flavor field to indicate how much CPU for the provisioning, that's assumed by the core class MiqProvisionRequest and ServiceTemplateProvisionRequest. Also, IBM Power allows fraction, instead of integer, to count its CPU allocation.
So, this may well go much wider, but to get my point across, I think we want some or all of ./content/automate/ManageIQ/System/CommonMethods/QuotaMethods.class (in manageiq-content) to lessen assumptions on how certain ManageIQ constructs (ie. Flavor) are used and become friendlier to provider overrides (ie. used, requested).

See ManageIQ/manageiq-providers-ibm_cloud#454 for details specific to the IBM Cloud PowerVS provider.

Here's an example of logic that should be pluggable in the provider repos:
https://github.com/ManageIQ/manageiq/blob/master/app/models/mixins/miq_provision_quota_mixin.rb#L394

cc @agrare

The key is going to be finding something which is provider specific to key off of, then move the quota logic somewhere that a provider can override.
In the miq_provision_quota_mixin.rb there is a def vendor() method which checks request.source.vendor.  This request.source is very likely the source vm/template object which would be of a specific provider subclass.  Whatever logic is needed to be overridden can then be moved into that class and the "default" behavior moved into the base VmOrTemplate class.

This request.source is very likely the source vm/template object which would be of a specific provider subclass.

I dropped a byebug in the vm_quota_values method here and can confirm that the "source" is the template subclass.
(byebug) l =

[288, 297] in /home/jwcarman/src/github.com/ManageIQ/manageiq/app/models/mixins/miq_provision_quota_mixin.rb
   288:      })
   289:   end
   290:
   291:   def vm_quota_values(pr, result)
   292:     byebug
=> 293:     num_vms_for_request = number_of_vms(pr)
   294:     return if num_vms_for_request.zero?
   295:     flavor_obj = flavor(pr)
   296:     result[:count] += num_vms_for_request
   297:     result[:memory] += memory(pr, cloud?(pr), vendor(pr), flavor_obj) * num_vms_for_request
(byebug) pr.source
  VmOrTemplate Load (1.0ms)  SELECT "vms".* FROM "vms" WHERE "vms"."id" = $1 LIMIT $2  [["id", 8], ["LIMIT", 1]]
  VmOrTemplate Inst Including Associations (0.4ms - 1rows)
#<ManageIQ::Providers::IbmCloud::PowerVirtualServers::CloudManager::Template id: 8, vendor: "ibm_power_vs", format: "", version: nil, name: "CentOS-Stream-8", description: "stock", location: "unknown", config_xml: nil, autostart: nil, host_id: nil, last_sync_on: nil, created_on: "2023-08-18 16:02:12.022095000 +0000", updated_on: "2023-08-18 16:02:12.022095000 +0000", storage_id: nil, guid: "e8844402-543c-43da-a916-bf7e5af54d9b", ems_id: 3, last_scan_on: nil, last_scan_attempt_on: nil, uid_ems: "31e22a48-6dee-4e2b-89f1-e669b936acd1", retires_on: nil, retired: nil, boot_time: nil, tools_status: nil, standby_action: nil, power_state: "never", state_changed_on: "2023-08-18 16:02:12.012183000 +0000", previous_state: nil, connection_state: nil, last_perf_capture_on: nil, registered: nil, busy: nil, smart: nil, memory_reserve: nil, memory_reserve_expand: nil, memory_limit: nil, memory_shares: nil, memory_shares_level: nil, cpu_reserve: nil, cpu_reserve_expand: nil, cpu_limit: nil, cpu_shares: nil, cpu_shares_level: nil, cpu_affinity: nil, ems_created_on: nil, template: true, evm_owner_id: nil, miq_group_id: 1, linked_clone: nil, fault_tolerance: nil, type: "ManageIQ::Providers::IbmCloud::PowerVirtualServers...", ems_ref: "31e22a48-6dee-4e2b-89f1-e669b936acd1", ems_cluster_id: nil, retirement_warn: nil, retirement_last_warn: nil, vnc_port: nil, flavor_id: nil, availability_zone_id: nil, cloud: true, retirement_state: nil, cloud_network_id: nil, cloud_subnet_id: nil, cloud_tenant_id: nil, raw_power_state: "never", publicly_available: nil, orchestration_stack_id: nil, retirement_requester: nil, tenant_id: 1, resource_group_id: nil, deprecated: nil, storage_profile_id: nil, cpu_hot_add_enabled: nil, cpu_hot_remove_enabled: nil, memory_hot_add_enabled: nil, memory_hot_add_limit: nil, memory_hot_add_increment: nil, hostname: nil, ems_ref_type: nil, restart_needed: nil, ancestry: nil, placement_group_id: nil>

Whatever logic is needed to be overridden can then be moved into that class and the "default" behavior moved into the base VmOrTemplate class.

I'll start working on a set of PRs to move number_of_cpus from the MiqProvisionQuotaMixin module into the ManageIQ::Providers::CloudManager::Template class and the IbmCloud::PowerVirtualServers plugin's ManageIQ::Providers::IbmCloud::PowerVirtualServers::CloudManager::Template subclass.


PFA: I used calendar in dialog with height as as wrap_content , in some devices i'm getting grey color strip at the bottom of the dialog , whats the issue?

@Venkatesh2391 Can you give us the android version that you used and/or the device ? That would help, thanks!

Android 4.4.2
On May 21, 2016 1:43 AM, "Quentin Colle"<EMAIL_ADDRESS>wrote:

@Venkatesh2391 https://github.com/Venkatesh2391 Can you give us the
android version that you used and/or the device ? That would help, thanks!
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/prolificinteractive/material-calendarview/issues/244#issuecomment-220707368

This is not related to MaterialCalendarView but to Android dialogs


Feedback, Inputs & Proposals

I really like templ. I hope it have a great future.
I have made some notes and thoughts while using it which I want to share now - I write it compact, but let's discuss about some points if you want.
1. Pointer Receiver Templates
I commonly use structs as ViewModels. Instead wire up all of those with it's render function manually this could help a lot:
{% templ (x ViewModel) MyTempl() %}

I used this pattern very much in quicktemplate to make all kind of structures "renderable". Currently in templ I have to create a struct method manually and invoke the render function, for every piece of template.
2. Autocompletion
{%! $ %} // cursor

In this scenario a Component is expected. All functions in the current package, which return a Component are possible candidates.
3. Implicit Package selection
This line of code is most time redundant because the package name can be derrived by the directory name.
When using templ on daily basis I forget this line sometimes.
Also, it is not adjusted by the IDE if the name of the package name changes (i.e. the directory name).
{% package my_pkg %}

4. Comments
Comment out quickly some code like {% comment %} in quicktemplate.
What about HTML comment? Or {{/* a comment */}}
5. Alternative START/END-Tag
This point is mabye a matter of taste. On swiss german keyboard, and maybe a lot others, this {% and %} is arduous to write. And you do it a lot when writing templates.
Maybe the {{ and }} which are used in regular go templates is not bad at all.
6. Required Space after START-Tag and before END-Tag
The space after the {% or before the %} took some getting used to. Strict on the one hand, prone to error on the other.
Perhaps the parser could point out this error more clearly - or even autofix it (like go fmt for templ).
7. The Context
A really happy that a context I passed arround the Component Render methods.
This way I can access global data or a localizer helper.
But this is undocumented feature and somehow not so nice.
{% if getUser(ctx) != nil %}
   Username: {% getUser(ctx).Username %}
   Age: {% getLocalizer(ctx).FormatNumber(getUser(ctx).Height) %}
{% endif %}

I have no concrete implementation-idea currently. I make some thoughts...
But in the abstract a shortcut to access a global "struct" variable would do the job.
{% if .user != nil %}
   Username: {% .user.Username %}
   Age: {% .i18n.FormatNumber(.user.Height) %}
{% endif %}

An easier implementation would be:
A pointer to a struct could be passed via context value, while templ make it visible in a variable x.
{% if x.user != nil %}
   Username: {% x.user.Username %}
   Age: {% x.i18n.FormatNumber(x.user.Height) %}
{% endif %}

In both cases the qualified-id must be specified somewhere (for generation and LSP)
Don't get me wrong, I'm not a make it all global type of guy. But it reduces all this argument passtroughts of really important things (i18n, basic user info etc.).
It's just a third source of (typed) data beside receiver variable + argument variables.
8. The Writer
If I'm not mistaken, virtual calls are 5 times slower than direct method calls. And a template calls it thousands of times including the error check.
A benchmark might help.
Maybe it would be interesting to have a look at the implementation of Quicktemplate, where among other things an acquirable byte buffer comes into play.
Another idea would be to be able to define a writer type via CLI argument.
If I manually implement templ components in go, the io.Writer interface is a bit tedious to work with directly.
9. Switch case improvement
Instead:
{% switch p.Type %}
	{% case "test" %}
		{%= "Test user" %}
	{% endcase %}
	{% case "admin" %}
		{%= "Admin user" %}
	{% endcase %}
	{% default %}
		{%= "Unknown user" %}
	{% enddefault %}
{% endswitch %}

What about:
{% switch p.Type %}
	{% case "test" %}
		{%= "Test user" %}
	{% case "admin" %}
		{%= "Admin user" %}
	{% default %}
		{%= "Unknown user" %}
{% endswitch %}

10. Range improvement
Instead:
{% if len(p.Addresses) == 0 %}
   No addresses
{% endif %}
{% for _, v := range p.Addresses %}

{%= v.City %}

{% endfor %}

What about:
{% for _, v := range p.Addresses %}

{%= v.City %}

{% default %}
   No addresses
{% endfor %}

This construct is rarely found in template languages. To be honest, I have no idea why.
11. Else-If support
Mabye the switch is a better alternative anyway when it have at least the same capacibilities.
12. Compile a specific file only
Currently recursively all templ files are compiled.
I configured my IDE or modd to autocompile templ files on every change.

Thanks so much for the feedback, there's some great ideas in here.
Please let me take a bit of time to think about some of these before I get back to you. However, I can give some immediate thoughts right away...

Implicit Package selection

Totally agree with you on this - I've forgotten to do this myself on more than one occasion. It would be easy to get templ fmt to use name of the directory as the package if it's missing, and add it in.

Comments

Good idea on comments, I know it's something that's lacking from my own use. I hadn't settled on an idea for how it would look yet. The {% comment %} idea looks good, but I do like the idea of using something from Go syntax or allowing HTML comments. I'm looking for something that people would guess at, and just be right the first time. I'm just not sure what that is without doing a bit of research first (i.e. asking people to guess at how you do a comment, and looking at what the most popular templating languages do).
I'll have a chat with some users and canvas some more feedback here.

Alternative START/END-Tag

I've been using templ a lot with a team recently to build email templates, and found the start / end syntax a bit out-of-the-way too, on an English keyboard.
I chose {% and {%= as the start for templ, because originally I was looking to see whether I could implement an LSP for quicktemplate and that's what it uses.
I also thought that since { is a common character in Go code, it wouldn't be a great thing to use, especially since {{ and }} can appear in valid (albeit contrived) Go code, e.g. {{ callFunction([]struct{Name string}{{Name: "example"}}) }} so I thought it could lead to some parser complexity.
The built-in html/template in Go uses {{ but it doesn't support Go expressions in the templates. I thought that using something different would make it clear that it's not Handlebars, Hugo templates or anything else.
At the moment, once the templ start of expression token {%=  is found, the parser just reads to the next %} and assumes anything in there is Go code.
This means that Go code inside templ expressions isn't parsed at all... but it could be interesting to try parsing the code instead.
I used goreplace -o=".*.go$" --no-group --no-colors {{ | wc -l on the Go source code, and got 3218 instances, so it looks like a reasonably common pattern (not sure how common outside of test code though).
I'll need to think about this some more. If we were to support an alternative, I'd want to get templ fmt to rewrite old code so there's only one way to write templ expressions.
Any ideas you've got here would be great.

Required Space after START-Tag and before END-Tag

Yeah, that's just annoying isn't it. What was I thinking!? :)

The Writer

I'm not sure what you mean by a virtual call. Do you mean that the io.Writer is an interface, and not a concrete type?

Compile a specific file only

Yes, that would be easy enough.

I can see the benefit of the pointer receiver templates, and could see another Go developer assuming this was possible while writing templ code.
At the same time though I really like how the generated Go code is fairly self-contained, it just uses types outside that exist outside of it, allowing this means you're allowing templ code to alter the interface of a struct.
My view would be that having the receiver explicitly set for view models isn't too cumbersome:
func (x ViewModel) View() templ.Component { return myTemplate(x) }

btw: that is exactly how I use it now.
I have 1-2 dozens of page templates, 1 layout template, and aprox. 100 renderable components/helpers etc.
I name a file like page_a.go another one page_a.templ which generates page_a.templ.go (I made this naming adjustment in a fork)
page_a.go contains a PageA struct which contains variables this page needs. page_a.templ contains the view.
Regarding all the small view components:
I ended up implement all the small components by hand, I use a helper library which make that work also comfortable.
Especially when more go logic is required, templ files are too limited.
But I'm very happy with this workflow, because bigger templates really profit of templ files, and templ also provides the "framework".

I've just added a feature for implicit package selection, as per your suggestion, see https://github.com/a-h/templ/issues/36

@aight8 - implicit package selection and flexible spacing are now available in version https://github.com/a-h/templ/releases/tag/v0.0.162

And I've added a new flag to templ generate so that you can generate a single file, e.g. templ generate -f example.templ in https://github.com/a-h/templ/releases/tag/v0.0.164

Is it possible to implement struct method template easily? (I referr to "1. Pointer Receiver Templates")
This extra helper functions are lot of work and clutters the stack trace, and also the modules method list.

I think it should be possible to allow the generated function to generate a receiver.
My understanding is that you'd like it so that you've got:
data.go
package data

type Data struct {
  A string
  B string
}

data.templ
{% templ (d Data) Template() %}

  {%= d.A %}

  {%= d.B %}

{% endtempl %}

And you'd expect it to produce Go code like this?
data_templ.go
package data

func (d Data) Template() templ.Component {
  //TODO: Return a component.
}

On how much processing the io.Writer stuff takes, I've created a benchmark to compare React and templ, and also creating a buffer inside each component. Creating an internal bytes.Buffer and writing to that instead of the io.Writer saves about 20% of execution speed, at the cost of additional RAM used for the buffer. I assume this is the cost of looking up the underlying type from the interface.
@joerdav made an improvement to the output speed of Go code by introducing a write buffer instead of writing directly to files. This resulted in a large reduction in the number of OS syscalls being made, see https://github.com/a-h/templ/commit/2a47eafc8bef64e2a570ef6efb2535df77aa1afb
This approach could probably be reused to place a limit on how much RAM is used, and to limit Write calls to the underlying stream and improve the performance.
Even without this improvement, I think templ is still 6 x faster than React (I haven't had chance to verify that my benchmarks make sense yet) based on the benchmark here: https://github.com/a-h/templ/tree/benchmark/benchmarks

I had a play with this. If the input writer happens to be a StringWriter, the performance improves from 1159 ns/op to 853.4 ns/op (26%).
If the input is not a StringWriter (e.g. it's a http.ResponseWriter), then the performance only drops by 8% to 1074 ns/op, but down to 18 allocations from 21.
func Candidate(p Person) templ.Component {
	return templ.ComponentFunc(func(ctx context.Context, ww io.Writer) (err error) {
		w, ok := ww.(io.StringWriter)
		if !ok {
			w3 := bufio.NewWriter(ww)
			w = w3
			defer w3.Flush()
		}
		ctx, _ = templ.RenderedCSSClassesFromContext(ctx)
		ctx, _ = templ.RenderedScriptsFromContext(ctx)
		_, err = w.WriteString("
")
		if err != nil {

@a-h Yes exactly. I try to extend the parser to allow using {% templ -->(d Data)<-- Template() %}.
Ah and I recognized that templ function names must be camel cased (underline is not allowed but can be usefull sometimes and valid go func id) -> for example for big templates to split it to partials for readability reasons.

Hello, since the {% %} operator was removed, whats the way to insert go code into templ templates?

for, if, switch and function calls are inserted by writing them on their own lines.
For example, here's a for loop just mixed in with the markup.
The example is at https://github.com/a-h/templ/blob/main/example/posts.templ
templ postsTemplate(posts []Post) {

		for _, p := range posts {

{ p.Name }

{ p.Author }

		}

}

Where the line doesn't start with a for, switch or other branching statement, the { and } pair are used. For example, this is how p.Name is output inside the div. templ knows that the p.Name is being rendered within a HTML tag, so it automatically HTML encodes it.

{ p.Name }

There are also examples that use the features in https://github.com/a-h/templ/tree/main/generator
There's currently no way to define a variable within templ components (I'm not sure that defining variables inside a template is a particularly good idea in any templating language, including JSX), but you can call functions and output their results with braces:

{ theFunction(p.Name) }

If you want to define theFunction inside a templ file, you can do that by placing it inside the templ file, but I usually keep my functions out of the templ files and in standard .go files.
package main

import "strings"

func toUpper(s string) string {
	return strings.ToUpper(s)
}

templ Name(name string) {

{ toUpper(name) }

}

Hope that helps!

New idea:
Generate Render for Named type when no func name and param list passed:
Example:
templ (c *Component) {
...
}

should generate:
func (c *Component) Render(ctx, io.Writer) {
...
}

New idea:
14. Omit empty string valued attribute
Generate Render for Named type when no func name and param list passed:
Example:
<input zindex??={strVar} />

should generate:
func (c *Component) Render(ctx, io.Writer) {
...
}

New idea:
15. Use "//line" go prefix in generated file so that go directly points to the bad code in the template

@aight8 I think some of these might be easier to track in separate issues.

There's been a lot of changes in the last year. Idea 14 was dealt with by conditional attribute expressions, and I think 15 is dealt with by improvements to the LSP handling, in particular, the new features that help with debugging (there's now a HTTP server that provides a window into the LSP internals).
I'm not thinking to think too much about 13 right now. My main focus over the next few months is going to be adding examples, more docs (see the new docs website at https://templ.guide), and HTMX.
I think it's time to close this issue. Happy for you to raise new issues though. :)

@aight8 - just an update on the number of virtual calls. @joerdav previously added pooled buffers which improved the performance of output writing a lot, but he's also just massively reduced the number of calls by combining what used to be multiple calls to Write into a single operation https://github.com/a-h/templ/issues/96


Cache recent forts (for forts.max_circle_size)

Short Description:
added bool option to cache recent forts -crf --forts.cache_recent_forts (default true)
saves recent_forts in data/recent-forts-{username}.json on spin
loads recent_forts from same file on start up
bot doesn't start a new recent_forts on every reset
Fixes (provide links to github issues if you can):
-Bot forgets recent_forts upon reset

Can you have all the events level in this PR to debug? I don't think any of them looks like information a normal user would care about. Also please fix merge conflicts. Thanks!

@douglascamata updated as per your comment =]

@Quantra can you try to think of a good way of not writing to a file all the time? I don't think this is a good thing to do :/

@douglascamata off the top of my head I can only come up with dumb time based writes but I like the current precision.  After a reset I don't try and spin the same fort again.  I will think on it though.
Could do something like https://github.com/PokemonGoF/PokemonGo-Bot/commit/a5e91315ed82581a901fbf5019a3708e5e7a471b and pass it out to another thread if that would help?  But I see that code isn't being used anymore?

@douglascamata I figured something like this might would allow caching on exit/crash.
pokecli.py
def main():
    bot = False

    try:
        #  run the bot
       .....
       ......
    except GeocoderQuotaExceeded:
        raise Exception("Google Maps API key over requests limit.")
    except Exception as e:
        # always report session summary and then raise exception
        if bot:
            report_summary(bot)
        raise

    finally:
        if bot:
           # CACHE FORTS HERE

But I can only kill via cron so never reach the finally statement and in testing I accidentally ran 2 bots at the same time and now have some kind of ban :(
No more testing for me at least today but I leave this idea here.  I can at least confirm the finally statement is reached when the bot is closed with ctrl-c

@douglascamata I have changed the behaviour such that the caching happens if the bot is stopped by KeyboardInterrupt SIGTERM or an Exception.
The SIGTERM handling will be unreliable when using multiple threads i.e. the recently commented out update_web_location_worker.  Are there any plans to bring this back or other multi threading?

@Quantra no, sir. We're migrating to a web ui with websockets communication. Writting location files for the web ui won't be necessary.

@Quantra looks good. Did you test it?

@douglascamata yes i've tested with SIGTERM, ctrl-c and causing an error and the forts cache works as expected.
Have been running both with and without fort_caching with no problems.

👍

@douglascamata after some more research I found pgoapi uses subprocess.  So SIGINT isn't a reliable way to close the bot running with python2.7.
If SIGINT is sent whilst pgoapi has a thread open that thread takes the SIGINT and pokecli.py will keep running.  So we can't guarantee the caching will happen here.
It's not critical for caching forts but I don't advise caching last-location or anything important like this.
For myself restarting bots with CRON I send SIGINT, wait a bit then send SIGKILL to ensure I don't have overlapping bots.  ~99% of the time forts will be cached properly.


fix(dialog): avoid subpixel rendering issues and refactor GlobalPositionStrategy

Refactors the GlobalPositionStrategy to use flexbox for positioning. This avoids the subpixel rendering issues that come with using transforms for centering.
Fixes #932.

Applied the feedback and rebased.

LGTM


⚠ Bofrost.at has degraded performance

In 4dc419b, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1815 ms

Resolved: Bofrost.at performance has improved in 49c4e2f.


When moving from Email to delivery to API -- deleting a key should reset to "vault"

Start with  email
Change to API
Delete key (should be vault at this point)
View responses should be vault --- currently showing as email

Via @anikbrazeau

related to #4724 and https://github.com/cds-snc/platform-forms-client/pull/4758#issuecomment-2512327095


added assignPosition functionality

added assignPosition functionality, also added committee services, model, and controller

Removed Member code from assignPosition, implemented changeLevel for Committees, and changed User model to make its privileges object field contain all privileges from Members.


fix: expose the LocalName option in Mailer

What kind of change does this PR introduce?

The LocalName should be exposed so that we can set it as the supabase project domain / custom domain rather than making it default to the SMTP Host. Some SMTP servers may enforce that the LocalName can't be the same as the SMTP Host, although this is not strictly enforced across all providers (AWS SES and Resend seem to ignore this).

@kangmingtay : how to check if this PR is included upstream in supabase/auth ?

Hey @PhE,
We manage the mailme version in the go.mod file
On  the Supabase dashboard you can check if the Auth version is greater than v2.152. At present, we have yet to roll out v2.152 so most projects should still be on v2.151
Hope this helps

hello  @J0 we still are on the 2.152, hope to migrate soon to the 2.153...

Hey @farvardin,
Coming soon, please check back next week

@J0
Thank you, it was upgraded to version 2.154.2 after we applied the proposed Postgres upgrade. Since this upgrade, it is now possible to use mxroute again!
@PhE


Crashing my app

If I add this buildpack to my application my app will crash when I try to deploy it to Heroku. If I then remove the buildpack, without altering any other file just simply removing the buildpack, the app will run without errors.
Is this a bug with this buildpack or why might my app crash whenever I add this buildpack?

Hey Sebastian, sorry I removed the watch from this repo on accident and missed this. Were you able to resolve the problem?


Delayed command feature

I added a field called "delayed" for most of the powers so that we can use a int variable to describe how long we need to delay before a command takes place.
Usage:
construct a power with a int param "delay"
or use
/rpgitem set <item.name> <power.name> <power.No> delay
to apply a delayed command or power(default 0).
most powers are supported.
test passed in 1.12.
*unsupported power     and its cause
PowerAttract            //high frequency
PowerConsume            //due to potential of multiple use
PowerConsumeHit         //due to potential of multiple use
PowerDeathCommand       //due to potential of multiple use
PowerDeflect            //isn't suitable
PowerLoreFilter         //no need
PowerNoImmutableTick    //no need
PowerParticleTick       //high frequency
PowerPotionTick         //high frequency
PowerRanged             //no need
PowerRangedOnly         //no need
PowerRescue             //Rescue needs quick action
PowerSelector           //no need
PowerTicker             //high frequency
PowerUnbreakable        //no need

test server available on reinwd.xyz

Actually we can give these power that can be delayed a interface like PowerDelayable, and move the delay to where these power are triggered.

@Librazy I thought about that. But maybe it won't contain any methods, just a mark. Because I think it's no need to distinguish non-delayed task and delayed task (if it doesn't slow down performance). Delay 0 means that it will be executed immediately. Adding a method-contented Interface means the change of architecture. Maybe we can change the way method was called in the future .

Actually runTaskLater with 0 delay means task will run in next tick, not immediately. That may cause some problems. And there are some duplicated code in each delayable power which can be unified.

One issue for making powers delayable is that
game state can be different before and after the delay.
(e.g. Players can go offline, blocks may be modified, etc.)
@Librazy may want to check all such cases.
@ReinWD I suggest making one PR for each delayable power
(or at least one commit for each power,) instead of one huge patch.
Thus the codes can be reviewed more easily.
BTW: Removing the duplicated code is not the focus now.
~I will trash all those garbages someday, hopefully.~

new version created.


fix(readme): Fixing Links

To implement: https://github.com/ipfs/helia/pull/77

Closing as this is very old any possibly not required any more.  Please re-open and update if you disagree.


[GDScript] Support for binary literals

(Almost) Resolves #25755
Adds binary literals in the form of 0bxxxx, e.g 0b01110 => 14
These are useful for things like bitmasking.
MSB is not treated as negative- representation is unsigned.
Issues:

No highlighting for binary literals within the script editor

Looks okay to me but you should try to change gdscript_highlighter.cpp to add the highlighting for the binary notation.

Done, highlights binary literals identically to hex.
A potential consideration is fractions- I've set this to not permit a binary point within a literal, however I understand that GDscript does allow hex points e.g 0xFF.12.
Should binary points be allowed? I doubt anyone would reasonably want to use a binary point

Actually, from just testing, placing a hex point turns the hex value to just be 0. I can change this to be treated as an error (not permit a . in a hex literal), unless someone thinks that hexadecimals should allow reals along with integers

Could you squash all those commits together, and make the resulting commit log more descriptive? See PR workflow and CONTRIBUTING.md.

the answer to that seems to be no... i'll try to copy all the changes to another branch and recommit. Will I need to open a new PR once that's done?

You can update this PR from any branch by force pushing from the local branch to the remote one used by this PR. E.g. if you have a new binary-literals branch and your fork is origin, you can do:
git push --force origin binary-literals:master

to overwrite the master branch of your origin remote.

I've messed this PR up beyond repair. Is it possible to reconfigure the base repo, otherwise I'll need to recreate because I ended up deleting the repo from GitHub and re-forking it to get a clean copy.
Changes, within a single commit, are at https://github.com/JellyWX/godot/tree/binary-literals

If the original fork was deleted, you'll have to open a new PR indeed.


Use Go 1.18 for go-licenses

Right now, the go-licenses script is failing because of an incompatibility between one of its modules and the system go version (1.16). This forces the script to run on Go 1.18. As part of that, a few changes needed to happen:

go install instead of go get for binary install of go-licenses
Introduction of a basic go.mod file to allow go get commands.
Use v2 version of sdk to allow go get to correctly find it.

Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Choose reviewer(s) and mention them in a comment (R: @username).
[ ] Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
[ ] Update CHANGES.md with noteworthy changes.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.
To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md
GitHub Actions Tests Status (on master branch)

See CI.md for more information about GitHub Actions CI.

Can one of the admins verify this patch?

Can one of the admins verify this patch?

Run GoPortable PreCommit

Run GoPortable PreCommit

Run PythonDocker PreCommit

Run Python PreCommit

Run Python PreCommit

Run Python PreCommit

Run Java PreCommit

Not everything is finished running, but the ones that are that run this target have already build and executed the change. Merging to unblock builds.

ah thanks for fixing this...


https://jqueryvalidation.org/ 522 errors in Chrome & Firefox for CSS/JS

Subject of the issue
When navigating to https://jqueryvalidation.org/ Http Status Code 522 errors appear in Chrome & Firefox.
Your environment
Note an issue with the plugin itself but the documentation of the plugin, its inaccessible.

Windows 10
Chrome v87
Chrome Incognito v87
FireFox v83

Steps to reproduce
Navigate to https://jqueryvalidation.org/ in Chrome or Firefox
Expected behaviour
Webpage should load without any JS or CSS errors
Actual behaviour
The browser spends a minute loading but eventually displays the web page without any CSS or JS errors in the dev console.

Accidentally duplicated, closing this issue. Please see issue https://jqueryvalidation.org/ 522 Errors for CSS/JS in Chrome & FireFox #2374.

Accidentally duplicated, closing this issue. Please see issue https://jqueryvalidation.org/ 522 Errors for CSS/JS in Chrome & FireFox #2374.


Abnormal MappingException in modelmapper

i am using jdk V11.0.11 & model mapper V2.4.4. Some times in server, i am getting mapping exception & after restarting the server, error is going away and coming after some time (there is no fix time interval) . Is there any fix for this?In local machine, it is not coming.

see #606
Feel free if you still have issues.


Endless EU

Tell me I am not crazy, but seems like it's working The Never Ending EU Machine :D
How to reproduce it:

Set up an IC2 machine let it work.
Attach an any kind of Mekanism universal cable.
Connect it to a energy cube (with energy).
Then break the cube.

The network not losing energy but still powers any IC2 machine. Oh also it's not even trying to pull energy from the cube even if you leave intact.
in v<IP_ADDRESS>, wonder if this another world specific bug or it can be reproduced.

While I was trying to temporary replace the universal cables in my world, found that even when I connect a ic2 eu cable to the induction matrix I get endless eu without joule loss.

Closing the issue temporaly, I alway use universal cables for IC2 machines but seemlesly I was able to run machines after the cables are disconnected which is weird because I can't reproduce it just by a very odd way where you connect / disconnect cables and from there on the machine does not pull energy anymore. Anyway closed till further evidence.


prevent loadout validation crash due to invalid warpaints

MoreSkins yet again causing problems lol

I ran the test server and I can thus confirm it doesnt crash, code does look a bit on the hacky unreadable side. but this is a LOT better than overriting respawn files


Dynamic BUAD Rate Support

Spinel documentation outlines a way to dynamically determine BAUD rate. It should be implemented. Also we should add support for changing the BAUD rate.

Some additional documentation on how to achieve this:
https://github.com/openthread/openthread/blob/master/doc/spinel-protocol-src/spinel-framing.md#uart-bit-rate-detection


Build fails on Ubuntu 22.04

Version 71b35887225ce5dabc4a3c30e2bdaf2624f9ad3f fails the build process with the following error:
#0 13.20 HEAD is now at 71b3588 venvs + Update Documentation (#36)
#0 14.06 install.swift:50:19: error: 'ProcessInfo' initializer is inaccessible due to 'internal' protection level
#0 14.06 let processInfo = ProcessInfo()
#0 14.06                   ^
#0 14.06 Foundation.ProcessInfo (internal):3:23: note: 'init()' declared here
#0 14.06     override internal init()

@donn Can you please take a look?

Fixed by 54e8665d638393a2e482b237b4ad2b5c02c7ec9a


fix: parse ~= as version not as path

By adding the path parsing to the nameless matchspec I broke the parsing of ~= 1.2.3.
This PR changes a few things to better deal with that.

It now checks for ~/ to verify if it is a path
We can now parse ~/channel_name::package as the tilde is now actually parsed instead of seen as part of the string.
Added a bunch more test cases to catch more issues in the future.

@baszalmstra  The ~\ wasn't something that worked with the TypedPath::starts_with(). Removed that code again but added more tests.

The insta::settings!({filters}... are sooooooo awesome!