Update Express filename conventions

Capitalize model filename user.js to User.js.
Change Pascal Case to Camel Case for all controller references. For example:

Pascal Case: var UserController = require('./controllers/user')
Camel Case:  var userController = require('./controllers/user') (use this)

@niallobrien I have decided to keep controller names as-is for now. At least with model names capitalized, it shouldn't cause any confusion between user model and user controller file names.

Shame, I think the file name should match the var name. :(


Make sure Nav background does not flash, when going back/forward across pages

Bug/issue #, if applicable: 64168365
Summary
Prevents the nav background from flashing and transitioning if scrolling then navigating to a link and then two finger swiping back in Safari.
Dependencies
NA
Testing
Steps:

Go to a page and scroll midway
Click on a link
Two finger swipe back in Safari
Assert the nav does not change color/flash

Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.

[x] Added tests
[x] Ran npm test, and it succeeded
[x] Updated documentation if necessary

@swift-ci test


[fix] Fixing Antora build errors

Fixing these build errors:
[15:32:08.754] WARN (asciidoctor): skipping reference to missing attribute: a
file: docs/reference/src/components/cairo/modules/language_constructs/pages/notation.adoc
source: https://github.com/starkware-libs/cairo.git (branch: main | start path: docs/reference/src/components/cairo)
[15:32:08.757] WARN (asciidoctor): skipping reference to missing attribute: 2
file: docs/reference/src/components/cairo/modules/language_constructs/pages/notation.adoc
source: https://github.com/starkware-libs/cairo.git (branch: main | start path: docs/reference/src/components/cairo)
[15:32:08.811] WARN (asciidoctor): unterminated table block
file: docs/reference/src/components/cairo/modules/language_constructs/pages/tuple-expressions.adoc:12
source: https://github.com/starkware-libs/cairo.git (branch: main | start path: docs/reference/src/components/cairo)

This change is

Renamed branch to avoid using slashes.


Performance Issue with return_context_logits Enabled in TensorRT-LLM

System Info
Intel(R) Xeon(R) CPU @ 2.20GHz
Architecture:                       x86_64
NVIDIA A100-SXM4-40G
Ubuntu
Who can help?
No response
Information

[X] The official example scripts
[X] My own modified scripts

Tasks

[ ] An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
[ ] My own task or dataset (give details below)

Reproduction
I follow official examples for Llama model: https://github.com/NVIDIA/TensorRT-LLM/tree/v0.8.0/examples/llama
I've been experiencing significant slowdowns when the return_context_logits flag is turned on. For context, I am utilizing the llama example and have specifically enabled the gather_context_logits flag during the TensorRT-LLM build process.
Additionally, I have been passing return_context_logits through the triton_client in an attempt to retrieve logits for the request sentences. To accommodate this, I have set the request_output_len or output_len to 1.
Expected behavior
The anticipated behavior when enabling return_context_logits would be a manageable decrease in speed, ideally not significantly deviating from the throughput when the flag is off. Performance should ideally be on par with or better than the forward pass speed of HuggingFace implementations.
actual behavior
The current observed behavior shows an almost 8-fold decrease in execution speed when trying to obtain logits with a maximum length of 1. This is surprisingly slower than the forward pass speed of comparable HuggingFace models.Here's a comparative table of performance with and without the return_context_logits flag:

Logit Status
max_gen_token
input_len
Execution Time
Average Time per Example

On
1
2000
0:49
0.98s

Off
1
2000
0:06
0.12s

additional notes
I have executed the trtllm-build with the following configuration:
trtllm-build --checkpoint_dir {model_dir}/tensorrt/{tp_size}-gpu \
             --remove_input_padding enable \
             --gpt_attention_plugin float16 \
             --context_fmha enable \
             --gemm_plugin float16 \
             --output_dir {model_dir}/tensorrt_llm/context_fmha \
             --paged_kv_cache disable \
             --enable_xqa disable \
             --multi_block_mode disable \
             --use_custom_all_reduce disable \
	         --tp_size {tp_size} \
	         --workers {tp_size} \
             --max_batch_size 1 \
             --max_input_len 8192 \
             --max_output_len 8192 \
	         --max_num_tokens 8192 \
             --gather_context_logits

Any insights or assistance in addressing this unexpected slowdown would be greatly appreciated. If there are any further experiments or specific areas you would recommend investigating, please advise.

Hi @metterian ,
thanks for your feedback. Are the performance data you show based on triton? If so, could you please try to use only TRT-LLM (not based on triton) (preferably with warmup).
We expect that the overhead caused by this feature on TRT-LLM is limited and acceptable.


Loading new camera post-processing assets dynamically

Hello there.
How can I load a new camera postprocessing effect (uasset) without having to re-compile Carla? Is that possible at this stage?

This is now totally possible using CARLA API, so I am closing this issue.


docs: remove invalid parenthesis in ajax sample code

Description:
Related issue (if exists):

Pull Request Test Coverage Report for Build 7434

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 96.806%

Totals

Change from base Build 7399:
0.0%

Covered Lines:
5244

Relevant Lines:
5417

💛  - Coveralls


Investigate ioc containers should be used on go codebase?

any dependency injecton package will be used in project? if a dependency container used, discus wich package will be used?

google/wired
goioc/di
other options, specify other options on comments or update issue here

my proposal: lets start without it and add it later just before the codebase gets serious. this way we could easily see the need of it.


proxy settings independent of the active profile in VS Code, as it was in version 1.76

I would like to see proxy settings again regardless of the active profile in VS Code. As it was in version 1.76, because after this version most of the settings are shared between existing profiles, I use 2 different profiles in my work, one with a proxy and the other without a proxy and I cannot update to the newer versions of VS Code , because these settings are shared between profiles.
Is it possible to go back to this settings model?

proxy settings are always application scoped, which means they are configured and applied across profiles. There was no change in the model. Are you saying, you are able to update if you do not have any profiles?

Until version 1.76, the proxy settings were like this

In the latest versions, they added a warning "Applies to all profiles" in some settings fields, such as the Proxy field.
I have two profiles created in VSCode, one profile with the Proxy field empty, and another with the proxy address that I sometimes need to use.
So I configured a hotkey combination to easily switch between profiles, (with and without proxy).

In the latest versions, they added a warning "Applies to all profiles" in some settings fields, such as the Proxy field.

This is not a warning. This is information that this setting applies to all profiles.

I have two profiles created in VSCode, one profile with the Proxy field empty, and another with the proxy address that I sometimes need to use.

Can you please share a screenshot of these two? These fields should show the same value across profiles.

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


RDKCOM-1705 RDK Services: org.rdk.System.1.getPreviousRebootReason is…

RDKCOM-1705 RDK Services: org.rdk.System.1.getPreviousRebootReason is giving a false response.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.smathe135 seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.


Add support to Localized DisplayAttribute

Hello,
It would be great if JsonSchemaGenerator was handling the ResoureType property of the DisplayAttribute. We could then generate localized schema.
Ex :
[Display(ResourceType = typeof(MyResources), Name = "MyString")]
Regards,

The project supports
<TargetFrameworks>netstandard1.0;net40;net45</TargetFrameworks>

and I'm pretty sure that ResourceManager is not available in netstandard1.0.
The simplest solution would be to make ApplyDataAnnotations virtual so that you can implement your own generator extending this method. Otherwise we need to implement the ResourceManager code with reflection or #if only for the supported FWs.

Ok, I had a doubt about resourcemanager :)
Yoy are right, paking the applydataannotations virtual seems a good solution.


Removed console.log messages

Fixes issue:
Closes #508
Description:
Removed the console.log message from the code which were displayed on the browser console.

resolve the conflicts and do remove that change of index.html file

@Avinash905 this branch has conflicts

@Avinash905 this branch has conflicts

I'll resolve them

@Avinash905 , I don't see any changes in the file

@Avinash905 , I don't see any changes in the file

1st commit has the changes. 2nd commit is for resolving merge conflicts.

create a new PR

You may close this because this is already been resolved


sentence

I accidentally created this issue. I apologize for any inconvenience. This issue is a mistake, and I kindly request you to delete it.


Implement Acronym

The problem is described in its readme

[ ] Use the standard test definition as the basis for test/acronym.rs file
[ ] Create an example.rs solution
[ ] Place the problem in config.json
[ ] Place the problem and describe its topics in problems.md

I could try taking this on if you want.

Awesome!

For this issue, and all others of its kind: we need to update the readme and json links to point to their post re-organisation locations.

about my above comment: Don't worry @gregcline what I said doesn't prevent you from taking it on, it just tells us that you need to find the README at https://github.com/exercism/x-common/blob/master/exercises/acronym/description.md and the test data at  https://github.com/exercism/x-common/blob/master/exercises/acronym/canonical-data.json , everything else is the same

Yeah I noticed that before I commented, I was able to find them. Thanks for those links though.

So I'm not sure where y'all would like this placed within problems.md. It feels like an introduction section problem to me, but it will be different from many other languages due to Rust not having regexes in the standard library. As a result the example solution I came up with is a little hairy when solving the camel case test.
Also, is the order the problems fall in the config.json the order they're presented to users?

So I'm not sure where y'all would like this placed within problems.md.

Sometimes I'm not sure until I see an implementation, so you are free to share the implementation first and we can work on deciding together.
However, if you were to ask me to guess by imagining what kind of solution I would write:
I'd either iterate over the characters and keep some state (was the last one whitespace? was it capital?) or split up the input by words and pull off the relevant characters from each word. I'd probably place somewhere in the neighbourhood of difference-of-squares through pangram. Happy to be convinced otherwise!

Also, is the order the problems fall in the config.json the order they're presented to users?

Yes, exactly. Erm, I wish there were a piece of documentation I can point to that confirms this (well, OK, I could find code if I wanted to, but that's different); best I can do is say https://github.com/exercism/x-api/blob/master/CONTRIBUTING.md#track-anatomy and it says "It contains configuration for which exercises (and in which order)". Anyway, yes, the order in config.json!

So here's the example solution I came up with, please feel free to suggest improvements. Sorry if you would have preferred this in a PR or something. This is the first time I've tried contributing to open source and I'm still learning the git/github workflow.
#[allow(unused_variables)]
pub fn abbreviate(phrase: &str) -> String {
    phrase.split(|c: char| c.is_whitespace() || !c.is_alphanumeric())
          .flat_map(|word| split_camel(word))
          .filter(|word| !word.is_empty())
          .map(|word| word.split_at(1).0.to_uppercase())
          .collect::<String>()
}

fn split_camel(phrase: &str) -> Vec<String> {
    let chars: Vec<char> = phrase.chars().collect();
    let mut words: Vec<String> = Vec::new();
    let mut prev_ind: usize = 0;
    for (i, c) in chars.iter().enumerate() {
        if i > 0 && chars.len() > 0 && i == chars.len() - 1 {
            words.push(chars[prev_ind..i + 1].iter().cloned().collect());
        } else if i > 0 && c.is_lowercase() && chars[i + 1].is_uppercase() {
            words.push(chars[prev_ind..i + 1].iter().cloned().collect());
            prev_ind = i + 1;
        }
    }
    words
}

It is useful if you specify rust after the three backticks so we have syntax highlighting (I added it for you). Alternatively, in a PR, we automatically get syntax highlighting.
We also gain the ability to comment on specific lines if it were a PR.
At first glance:

I'd try to see whether the two instances of words.push(chars[prev_ind..i + 1].iter().cloned().collect()); can be deduplicated.
If chars.len() == 0, the body of the for loop is run zero times, therefore the check for chars.len() > 0 inside it will always be true.

Completed by #204 - thanks!


storage component missing support for bucket versioning.

The "versioning.enabled" bucket metadata property does not appear to be exposed.

https://code-review.googlesource.com/#/c/7818

Is there a way to enable bucket versioning, or create buckets with versioning enabled?

Not yet, but we're working on that. It's a little bit subtle.

Added in 45720db4a4f6f8e754ff7819db31a0603e134946.


Symlink kb.ttf for android

@keybase/react-hackers

Could use more explanation -- when/why did this break, etc?

My fault. When hacking the metrics to fix Android font rendering, I added this directory for android-specific fonts, but didn't realize the kb.ttf updater script needed to handle it.


python37Packages.Wand: 0.6.4 -> 0.6.5

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for python37Packages.Wand is: "Ctypes-based simple MagickWand API binding for Python"
meta.homepage for python37Packages.Wand is: "http://wand-py.org/"
meta.changelog for python37Packages.Wand is: ""
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact

Checks done (click to expand)

built on NixOS

Warning: a test defined in passthru.tests did not pass

0 of 0 passed binary check by having a zero exit code.

0 of 0 passed binary check by having the new version present in output.

found 0.6.5 with grep in /nix/store/zh0nq1gbkqk6ybarmlqd6hpkr89pmba7-python3.7-Wand-0.6.5

directory tree listing: https://gist.github.com/74eefc1464ee4d235775caa1e96cfc09

du listing: https://gist.github.com/2bba156f5e3b5dc5441b3d852a9a68b1

Rebuild report (if merged into master) (click to expand)

24 total rebuild path(s)

6 package rebuild(s)

6 x86_64-linux rebuild(s)
6 i686-linux rebuild(s)
6 x86_64-darwin rebuild(s)
6 aarch64-linux rebuild(s)

First fifty rebuilds by attrpath
python27Packages.SQLAlchemy-ImageAttach
python27Packages.Wand
python37Packages.SQLAlchemy-ImageAttach
python37Packages.Wand
python38Packages.SQLAlchemy-ImageAttach
python38Packages.Wand

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/zh0nq1gbkqk6ybarmlqd6hpkr89pmba7-python3.7-Wand-0.6.5 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A python37Packages.Wand https://github.com/r-ryantm/nixpkgs/archive/4958f5060b241dbd554dfd57e5985b590c8b246a.tar.gz

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/zh0nq1gbkqk6ybarmlqd6hpkr89pmba7-python3.7-Wand-0.6.5
ls -la /nix/store/zh0nq1gbkqk6ybarmlqd6hpkr89pmba7-python3.7-Wand-0.6.5/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review 1

6 packages built:

python27Packages.SQLAlchemy-ImageAttach
python27Packages.Wand
python37Packages.SQLAlchemy-ImageAttach
python37Packages.Wand
python38Packages.SQLAlchemy-ImageAttach
python38Packages.Wand

Maintainer pings
cc @infinisil for testing.

Result of nixpkgs-review pr 105414 1

6 packages built:

python27Packages.SQLAlchemy-ImageAttach
python27Packages.Wand
python37Packages.SQLAlchemy-ImageAttach
python37Packages.Wand
python38Packages.SQLAlchemy-ImageAttach
python38Packages.Wand


Jason/verilator/config

This should make it possible to load any RISC-V binary now.
A good way to test is to use the --debug-flags=MemAccess debug flag. This should show you every read/write/inst that is sent to memory and its data. This will let you compare to other traces to make sure things are executing correctly.

What I used to test the loading code:
em5 compiled Nov  7 2018 08:56:36
gem5 started Nov  7 2018 09:52:54
gem5 executing on palisade, pid 12967
command line: /home/jlp/Code/gem5/gem5/build/X86/gem5.opt --debug-break=1000 configs/example/sodor.py lw1

warn: need to stop all queues
Global frequency set at<PHONE_NUMBER>000 ticks per second
info: kernel located at: lw1
Beginning simulation!
info: Entering event queue @ 0.  Starting simulation...

Program received signal SIGTRAP, Trace/breakpoint trap.
0x00007ffff5c28187 in kill () at ../sysdeps/unix/syscall-template.S:78
78      ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) p/x *(uint32_t*)&(System::systemList[0]->physmem.backingStore[0].pmem[0x80000000])
One of the arguments you tried to pass to operator[] could not be converted to what the function wants.
(gdb) p System::systemList[0]->physmem.backingStore[0].pmem
One of the arguments you tried to pass to operator[] could not be converted to what the function wants.
(gdb) p System::systemList[0]->physmem
One of the arguments you tried to pass to operator[] could not be converted to what the function wants.
(gdb) p System::systemList
$1 = std::vector of length 1, capacity 1 = {0x555558202500}
(gdb) p System::systemList[0]
One of the arguments you tried to pass to operator[] could not be converted to what the function wants.
(gdb) p ((System*)0x555558202500)->physmem
$2 = {<Serializable> = {_vptr.Serializable = 0x555557003d50 <vtable for PhysicalMemory+16>, static ckptCount = 0,
    static ckptMaxCount = 0, static ckptPrevCount = -1, static path = {c = std::deque with 0 elements}}, _name = "system.physmem",
  addrMap = {tree = std::map with 1 element = {[{_start = 0, _end =<PHONE_NUMBER>, intlvHighBit = 0 '\000', xorHighBit = 0 '\000',
        intlvBits = 0 '\000', intlvMatch = 0 '\000'}] = 0x555558222380}, cache = std::__cxx11::list = {[0] =
  {first = {_start = 0, _end =<PHONE_NUMBER>, intlvHighBit = 0 '\000', xorHighBit = 0 '\000', intlvBits = 0 '\000', intlvMatch = 0 '\000'}, second = 0x555558222380}}}, memories = std::vector of length 1, capacity 1 = {0x555558222380}, size =<PHONE_NUMBER>,
  mmapUsingNoReserve = false, backingStore = std::vector of length 1, capacity 1 = {{range = {_start = 0, _end =<PHONE_NUMBER>,
        intlvHighBit = 0 '\000', xorHighBit = 0 '\000', intlvBits = 0 '\000', intlvMatch = 0 '\000'}, pmem = 0x7ffef3756000 "",
      confTableReported = true, inAddrMap = true, kvmMap = true}}}
(gdb) p/x *(uint32_t*)&(((System*)0x555558202500)->physmem.backingStore[0].pmem[0x80000000])
One of the arguments you tried to pass to operator[] could not be converted to what the function wants.
(gdb) p/x *(uint32_t*)&(((System*)0x555558202500)->physmem.backingStore
A syntax error in expression, near `'.
(gdb) p/x (((System*)0x555558202500)->physmem.backingStore
A syntax error in expression, near `'.
(gdb) p/x ((System*)0x555558202500)->physmem.backingStore
$3 = std::vector of length 1, capacity 1 = {{range = {_start = 0x0, _end = 0xffffffff, intlvHighBit = 0x0, xorHighBit = 0x0,
      intlvBits = 0x0, intlvMatch = 0x0}, pmem = 0x7ffef3756000, confTableReported = 0x1, inAddrMap = 0x1, kvmMap = 0x1}}
(gdb) p/x *(uint8_t*)0x7ffef3756000
$4 = 0x0
(gdb) p/x ((uint8_t*)0x7ffef3756000)[0x80000000]
$5 = 0x83
(gdb) p/x (uint32_t)(&((uint8_t*)0x7ffef3756000)[0x80000000])
$6 = 0x73756000
(gdb) p/x (uint32_t)(&((uint8_t*)0x7ffef3756000)[0x80000100])
$7 = 0x73756100
(gdb) p/x *(uint32_t*)(&((uint8_t*)0x7ffef3756000)[0x80000100])
$8 = 0xffffffff
(gdb) p/x *(uint32_t*)(&((uint8_t*)0x7ffef3756000)[0x80000000])
$9 = 0x10002283
(gdb) quit


refactor: :recycle: Migrate Javascript code to Typescript.

As the lib grows, type checking becomes absolutely necessary.
This will prevent many programming issues.
@redDwarf03 @kaumudpa we need to synchronize PRs approvals because this one moves JS files.

Got It. We need to hold this one till we merge other current PR's.

That's a way to do it.
In that case, we must not open new PRs until the pipe is empty.

Ok. No new PR's will be opened from our end till this one is merged.

Wanted to ask - shall we hold this till we commit all the possible implementations?

Wanted to ask - shall we hold this till we commit all the possible implementations?

No, ideally i would like to merge this PR just after your PR with new methods

What is the eta OF this and other PR'S to be merged? Cause we wont be able to work until the main branch is merged with these PR'S as we need to sync our fork accordingly.

I started the merge but now I have to go to the cinema 😅😅 so I merge in a few hours

PR updated with last PR


updated README.md

Spelling typos!
Description
Fixes

lgtm

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@6fa2b25). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master     #778   +/-   ##
=========================================
  Coverage          ?   53.47%
=========================================
  Files             ?        8
  Lines             ?      331
  Branches          ?        0
=========================================
  Hits              ?      177
  Misses            ?      154
  Partials          ?        0

Flag
Coverage Δ

gha
53.47% <0.00%> (?)

python-3.9
53.47% <0.00%> (?)

unit
53.47% <0.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Continue to review full report at Codecov.

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


Need to support arbitrary RoadNetwork rotation

Right now, rotating a RoadNetwork leads to weird outcome. We want to at a minimum support y-rotation, so that people can in practice reuse presaved scenes.
https://user-images.githubusercontent.com/2958461/226203762-e219ce25-a108-4edd-9a00-79656e376f6f.mp4

This is inherently being address as part of the road node hierarchy work: #74


Set default value of return_type to 'filename' instead of 'object'

It seems returning file paths by default would be more interesting to users than the underlying object structure.

As this would be more practical, in our developers meeting we decided to be as close to PyBIDS as possible which is to return objects.


Install: Be able to pass a "non-raw" GitHub URL

Marathon can now install remote scripts 🎉 But one limitation is that it needs to be a "raw" Swift file. That is, if you have a file on GitHub, for example:
https://github.com/JohnSundell/Marathon-Examples/blob/master/AddSuffix/addSuffix.swift

You need to pass its "raw" URL:
https://raw.githubusercontent.com/JohnSundell/Marathon-Examples/master/AddSuffix/addSuffix.swift

Since hosting scripts on GitHub is such a common use case, we should make this more convenient.
The suggestion is to support passing the "non-raw" GitHub URL to marathon install, which Marathon will then expand into its raw counterpart.

Implemented by @kkapitan in #44 🎉


Activity5.01 logo.png from reviews app

I have checked many items, but the logo with the word reviews isn't loaded in base.html inside reviews app. The image from home page is still the same logo.png in all pages.

Also, I tried to change STATICFILES_DIRS in settings.py even using the solution configuration didn't help, neither
STATICFILES_DIRS = [     os.path.join(BASE_DIR, 'reviews/static/') ]
or
STATICFILES_DIRS = [     BASE_DIR / "static",     'reviews/static',    # ("reviews", "full_path_to_static_folder") ]

Hi there, your two logo.png files will conflict. The path for the one in the reviews app should be reviews/static/reviews/logo.png. This is for namespacing. Then when including in your template, use reviews/logo.png as the path.

Hi there, your two logo.png files will conflict. The path for the one in the reviews app should be reviews/static/reviews/logo.png. This is for namespacing. Then when including in your template, use reviews/logo.png as the path.

I made it, but still the image doesn't change.
In reviews/templates/reviews/base.html
{% extends 'base.html' %} {% load static %} {% block brand %}      {% endblock %}
In bookr/templates/base.html
{% block brand %}                                {% endblock %}
I still see the image logo.png in other pages.

Without seeing your whole project it's hard to tell what's wrong.
You have different alt tags for each logo which might help you track it down. Try viewing the source on each page with a logo, and see if the alt tag matches the logo you expect. This will help you tell if it's a template problem or static files problem.
Check that your templates are inheriting from the right base, i.e. your reviews templates extend from the reviews base.html. If your review's base.html extends the main base.html, but none of the other templates extend the reviews base.html then they'll still pick up the main logo.
Finally you can use the findstatic command to check which files are being found for each URL.

Without seeing your whole project it's hard to tell what's wrong.
You have different alt tags for each logo which might help you track it down. Try viewing the source on each page with a logo, and see if the alt tag matches the logo you expect. This will help you tell if it's a template problem or static files problem.
Check that your templates are inheriting from the right base, i.e. your reviews templates extend from the reviews base.html. If your review's base.html extends the main base.html, but none of the other templates extend the reviews base.html then they'll still pick up the main logo.
Finally you can use the findstatic command to check which files are being found for each URL.

Quite a lot of time it'd taken, but I managed it by copying this from repository settings.py
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
Without this my app could find static files from reviews app or other, but I'd got the error from root (bookr) static folder.

I just had the same issue but realized that my view function in views.py was pointing towards base.html in the root folder when it should have been pointing at the base.html file in the reviews/templates directory. That's where I screwed up.

@petrenkonikita112263 Hello, mate. I know the answer to your problem.
Open the other two templates inside 'reviews/templates/reviews'
(They are named "book_list.html" and "book_detail")
These two templates extends the project level "base.html".
What you need to do is replace this:
{% extends 'base.html' %}
With this:
{% extends 'reviews/base.html' %}
The cause of the problem is when the authors asked us to move the "base.html" to project-level 'templates' directory and create a new "base.html" inside 'reviews/templates/reviews', they forgot to tell us that we should make the "book_detail.html" and "book_list.html" extend the "reviews/base.html".
Don't forget to let me know if it works.


Stuttering

Should it be log::Level or log::LogLevel? This comes up all the time and we've never really settled it as a community. So far we have tended to encourage importing types rather than modules:
use log::LogLevel; // encouraged

let level: log::LogLevel; // discouraged

But this works less well if the type relies on the module name to disambiguate what it means, as in the case of io::Result.
use std::io::Result; // probably not what you want in most cases

To add to the mess, we have tended to discourage renaming imports.
use std::io::Result as IoResult; // discouraged

How do we reconcile all of these?

Clippy currently has a lint against types that stutter, but it is disabled by default.

There might be some guidance from the C++ world. In particular, Google's C++ style guide disallows using namespace so they must have conventions to avoid stutter.

IMO, Go forcing everything imported to be qualified by import name did the right thing.

An interesting example is the std::fmt module. You typically are not encouraged to import types from the module, but just import the module itself and qualify all usage. For example:
impl fmt::Display for Foo {
    fn fmt(&self, f: &muy fmt::Formatter) -> fmt::Result {
        // ...
    }
}

That's an interesting one. For whatever reason, in my code I have found that I prefer this:
use std::fmt::{self, Debug, Display};

impl Display for Foo {
    fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
        /* ... */
    }
}

I think this should provide at least one canonical guidance for this: https://github.com/rust-lang/rfcs/blob/master/text/0356-no-module-prefixes.md.
I originally saw this convention at https://aturon.github.io/style/naming/README.html#avoid-redundant-prefixes-[rfc-356] too.

As for renaming imports, the most common place I do that is use std::error::Error as StdError;.

I prefer use std::fmt. Same with io. I dislike stuttering.

Hmm, in reqwest I can see
redirect::{RedirectPolicy, RedirectAction, RedirectAttempt};
This could also qualify as stuttering.

True, though the naming was because I don't expect to expose the internal "redirect" module, so they can just be 'Policy' and so on. I suppose they could internally, with a public reexport introducing the prefix, but either option doesn't seem much better in the end.

So going further with reqwest as an example. Assuming that Redirect module is made public https://github.com/seanmonstar/reqwest/issues/105 should its types be "destuttered" by default along with the export?
Or  is certain level of repetition is still encouraged as is the case Client::ClientBuilder / Request::RequestBuilder?

This came up in https://github.com/chucklefish/rlua/issues/15, too.

To add to the mess, we have tended to discourage renaming imports.

That'd make rluas API a lot more noisy to use, since it would export a lot of generic types (including String) if the Lua prefix is removed.

@jonas-schievink LuaString, LuaResult, etc seem like a reasonable exceptions to the rule to me.

Any conclusion? I need answers, but have no thoughts :)

Not stuttering is good... I like:
use std::io;
fn foo() -> io::Result<()> {
...

Renames are fine too, so long as they don't stutter. Also, I would not love seeings this (which actuall stutters too):
use std::error::Error as StdError;

People will use module-qualified paths if they are sensible and pervasive in your documentation and usage examples. "Sensible" is a function of number of characters typed and how unique the name is.
In my experience people are fine typing 2-3 character modules and mostly fine with 4 character modules. More than that is asking too much, meaning that items in a 5+ character module or library better have a name that can stand alone.

carl::Options -- if your documentation writes it this way pervasively, users typically will as well.
zx::Options -- practically all users will be okay with this.
carl::options::Options -- this is probably the worst. Users cannot import carl::options and then deal with options::Options because options::Options is dumb. Users cannot import carl::options::Options because it looks too much like prelude's Option. Users are forced to import and rename to CarlOptions or something.
carl_framework::Options -- few people will type this any more often than twice in a file, even if your documentation uses it. Framework will need to give Options a more unique name so users can write an import.
carl_framework::CarlOptions -- this is fine, users will import. Better than carl_framework::Options.
carl::CarlOptions -- worse than carl::Options.

Certain items have somewhat higher thresholds between sensible and not sensible. For Error and Result types I would say the threshold is 8-10 characters in the library name (the length up to which users happily write a qualified path, even if used several times in a file). For free functions the threshold is 12-15. Again, documentation needs to be consistent in order for them to do it that way.

I've recently been thinking about this specifically in the context of errors https://twitter.com/softprops/status/1038234080305967105?s=19
Being my own devils advocate what this can lead to is overscoping of errors on focused methods. In other words a method in a foo crate that returns foo::Error but in practice may only yield a subset of the total types of errors foo::Error represents. This means clients are asked to handle a representation of errors that won't ever occur in a specific context. Yes this encourages much more focused crates where foo::Error enumerates a very small set of cases but in practice this  seems rarely the case. foo::Error typically represents all the cases.

The discussion of fine-grained vs broader error types is in #46.
If a library or module uses fine-grained errors like the ones returned by std FromStr impls that you linked to, I would expect that they would not all be called Error. They would also not be called foo::FooError because by definition of being fine-grained they are characterized by more than simply "the error associated with library foo" -- so you probably wouldn't run into a problem of stutter.


Helm chart configs referencing "file" keyword fail

When providing configuration via .Values.config where a realm is configured via the file keyword (as opposed to inline), the chart fails to render.
To reproduce, specify a value for config with the file keyword as follows, and then attempt to helm install | template ... the chart:
config:
  myrealm:
    file: path/to/myrealm.json

This will produce an error similar to the following:
 executing "templates/realms.yaml" at <.Files.Get>: nil pointer evaluating interface {}.Get

This is likely due to .Files.Get not being in context while within {{- range $name, $config := .Values.config }}, and simply needs to be changed to $.Files.Get.

Makes sense! I didn't test a realm import via file yet.
Thanks for the hint.


Adding example of using gopherjs

This is an example of a nodejs Lambda function where the code is written in Go and converted to Javascript using gopherjs. It requires "gopherjs" to be installed (https://github.com/gopherjs/gopherjs).
The generated code is a little big, especially when using Go standard packages, but it may be useful when you have so Go code you want to use but you don't want to use the proxy/skim.
It would also be interesting to add "gopherjs" as a specific runtime and possibly expose via apex a gopherjs library that simplify interacting with the native nodejs runtime and/or AWS.

hmm haha I'm not sure how robust gopherjs is, if we'd want to advocate using it or not, you haven't had issues?

IMHO it might be confusing to add this example if we support golang ~natively.


Pulling someone from a table lets them walk through tables and railings

Reproduction

start two clients
with one of the players click drag the other onto a table
then pull them from the table
sometimes the other player will still count as being on the table, so they will be able to walk over other tables or railings
you might need a few tries
checking ClimbingComponent.IsClimbing on the server VV confirms this happening

Additional context
I have noticed this bug while testing #31147
However, I was also able to reproduce it on master, so it existed before that already.

This might be related to #31583 and #31625

Maybe?
No sprite layering issues in this bug though, you were always above the table.

climbing is strange, it uses collision layers. basically putting the climber in a higher layer until they are not colliding with the lower layer. but that might only be checked on event of witch pulling target is probably not one.


Use rustls crate instead of openssl

The rustls crate is mature rust implementation of TLS. I think it would make a lot of sense to switch to it instead of the openssl that keeps causing some build and startup issues on different platforms.
Note that the tokio-postgres-rustls is relatively recent, but is now archived. So it will likely be moved to the rust-postgres repo - see related issue.

Update: the tokio-postgres-rustls project simply migrated to source hut, and is still actively maintained. It might still move to the rust-postgres for simplicity.


Implement Time Series Forecast Indicator

Description
Adds time series forecast indicator to Lean.
Related Issue
Closes #6988
How Has This Been Tested?
Tested using data from Tulip ([https://tulipindicators.org/tsf])
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] Refactor (non-breaking change which improves implementation)
[ ] Performance (non-breaking change which improves performance. Please add associated performance test and results)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Non-functional change (xml comments/documentation/etc)

Checklist:

[x] My code follows the code style of this project.
[x] I have read the CONTRIBUTING document.
[x] I have added tests to cover my changes.
[x] All new and existing tests passed.
[x] My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

Yes, just reverted the changes. Of course, pleased to help with my first ever PR!

Yes, just reverted the changes. Of course, pleased to help with my first ever PR!

Ty, I think you haven't pushed the changes yet though?

Sorry, just to be clear you just wanted me to revert back to where the .DS_STORE and .sln file were changed, correct? I believe I reverted the changed on my branch.

Oh sorry, I see what you mean now. Just removed them.


Fix Workflow Progress Category uninstall

Workflow progress categories are not uninstalled when unintalling a
package.

Add workflow progress categories to uninstall items

Thanks!


Publish does not show skipped distributions when file is identical to previous upload

When file hashes match, the distributions is shown as published instead of skipped.

Looks related to https://github.com/pypa/twine/issues/354 / https://github.com/pypi/warehouse/issues/2284
Not very helpful for our output but 🤷♀

Can't be fixed basically


IE compatibility issue

Velocity 2.0.1 causes object doesn't support property or method 'velocity' error on IE 9 upwards. I reverted Velocity 1.2.2 and that works perfectly on all browsers. (Also, I cannot animate the height of an element with 2.0.1 on Safari. Again works perfectly with 1.2.2.) Has anyone experienced the same...?

There's a new issue template for a reason... IE9/10 are no longer supported (by Microsoft or Velocity).

Same for Edge 16...

Fill out an issue template and it can get looked at - cross-browser support has got a couple of issues including in Safari that I know of, but it's related to code being rewritten at the moment - hopefully everything comes together correctly when it's done...


Improve removeFileTree

There is a potential race of the given directory being deleted between the exists call and the actual deletion. If this happens, we can ignore the error.

@swift-ci please test

@swift-ci please test

Not sure if it is worth adding a test for this, conserving the complexity of simulating a race that would trigger this.

Not sure if it is worth adding a test for this, conserving the complexity of simulating a race that would trigger this.

a small test would be nice

a small test would be nice

a small test would be nice

Not sure if a small test is possible. We would need to get the timing just right so that we remove the directory right after the exists-check in this method, otherwise we wouldn't actually be testing the change. Do you have anything particular in mind?

a small test would be nice

Not sure if a small test is possible. We would need to get the timing just right so that we remove the directory right after the exists-check in this method, otherwise we wouldn't actually be testing the change. Do you have anything particular in mind?

Not sure if a small test is possible. We would need to get the timing just right so that we remove the directory right after the exists-check in this method, otherwise we wouldn't actually be testing the change. Do you have anything particular in mind?

We could disable the "if exists" check for the test (or in general) and just rely on the exception

Not sure if a small test is possible. We would need to get the timing just right so that we remove the directory right after the exists-check in this method, otherwise we wouldn't actually be testing the change. Do you have anything particular in mind?

We could disable the "if exists" check for the test (or in general) and just rely on the exception

Getting rid of the check is a good idea, it doesn't seem required anymore.

Getting rid of the check is a good idea, it doesn't seem required anymore.

@swift-ci please test

@swift-ci please test


Improve error handling in callbacks

Refs: https://github.com/metarhia/impress/issues/680

Landed in 6e59ee6


make it cups independent (prebuilt lib)

Is there a way to make it cups independent?
I'm using Gentoo Linux x86_64, that currently don't have a package for libchromiumcontent. I install atom editor with the prebuild libchromiumcontent (yes, Linux build) but that depends on cups (yes, Common Unix Printing System) and forces me to install the net-print/cups, but I really no use this.
All other packages on my system uses the cups library as an optional dependency, but libchromiumcontent don't work without cups.
There is no way to make it optional, as the other programs?

This needs more information. Are you referring to the Linux build? Are you referring to CUPS (Common Unix Printing System)? What exactly are you referring to? Is something failing for you?

Sorry,
I'm using Gentoo Linux x86_64, that currently don't have a package for libchromiumcontent. I install atom editor with the prebuild libchromiumcontent (yes, Linux build) but that depends on cups (yes, Common Unix Printing System) and forces me to install the net-print/cups, but I really no use this.
All other packages on my system uses the cups library as an optional dependency, but libchromiumcontent don't work without cups.
There is no way to make it optional, as the other programs?

I just looked through the various build files for this project and don't see any specific references to CUPS requirement. I'd be curious about whether the actual Chrome package on Gentoo also requires CUPS? I'd say if it doesn't then it should be optional for libchromiumcontent. I did have a look through of the Atom 205 ebuild for Gentoo and did not see any specific references to CUPS as a dependency. I'm definitely curious about this. It'd probably be helpful if you posted your build results just to give some more clarification to the CUPS requirement and where exactly it's failing.

cups is a requirement for atom-shell ebuild () because the precompiled libchromiumcontent.so is directly linked with cups:
$ ldd /usr/share/atom/libchromiumcontent.so | grep cups
	libcups.so.2 => /usr/lib64/libcups.so.2 (0x00007fbf02620000)

If i uninstall cups and tries start atom editor:
$ atom -f
/usr/share/atom/resources/../atom: error while loading shared libraries: libcups.so.2: cannot open shared object file: No such file or directory

My guess is that it's required because of the print API in Chrome. Just a guess though.

Just install CUPS

@paulcbetts But I don't want cups, all other packages on my system have cups as an optional dependency, see:
$ equery d cups
 * These packages depend on cups:
app-emulation/wine-1.7.44 (cups ? net-print/cups[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?])
app-text/ghostscript-gpl-9.15-r1 (cups ? >=net-print/cups-1.3.8)
dev-util/atom-shell-0.22.3-r2 (net-print/cups)
net-fs/samba-4.1.18 (cups ? net-print/cups)
x11-libs/gtk+-2.24.28-r1 (cups ? >=net-print/cups-1.7.1-r2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?])
x11-libs/gtk+-3.14.13 (cups ? >=net-print/cups-1.2[abi_x86_32(-)?,abi_x86_64(-)?,abi_x86_x32(-)?,abi_mips_n32(-)?,abi_mips_n64(-)?,abi_mips_o32(-)?,abi_ppc_32(-)?,abi_ppc_64(-)?,abi_s390_32(-)?,abi_s390_64(-)?])

Only the atom-shell that forces me to install it. That does not sound good.

@paulcbetts You could use dlopen() cups instead of linking to it as is. This will get rid the dependency.

@ShyPixie This has been previously discussed here: https://github.com/atom/libchromiumcontent/issues/60
And also here: https://code.google.com/p/chromium/issues/detail?id=148984

@ali No need to implement a possibility of printing without the cups, only make this optional for anyone who "don't want, don't need" support printing. This does not change anything for normal users, but would give more flexibility for advanced users using source-based distributions. This completely eliminates the chrome block on this issue.

@ShyPixie I'm not sure where you'd implement the change you're suggesting.
It seems like if you turned off the use_cups flag here, this project would build chromium without CUPS support, and then Atom would lose CUPS support when it/Electron pulls down the prebuilt libchromiumcontent. I might not be understanding this correctly, though -- @zcbenz would know more.
Possibly relevant links:

chromium/src/build/common.gypi
chromium/src/printing/BUILD.gn
code search for the "use_cups" flag in chromium

Hey there,
It's been a long time coming but the libchromiumcontent repository is being archived as it is no longer used in the Electron build system (🎉 this is a good thing).
If your issue is still relevant to Electron in it's current build system (please verify first) then you should probably raise a similar issue on electron/electron.
Thanks 😄


tutorial doesn't work

The section "Prerequisites" includes commands to install python packages that don't install all required packages actually. Package "sklearn" isn't installed correctly in this way.
So the code from the next tutorial page (https://learn.microsoft.com/en-us/sql/machine-learning/tutorials/python-clustering-model-prepare-data?view=sql-server-ver16) just doesn't work.

Document Details
⚠ Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.

ID: 5c8ec2d0-c578-6c0a-72f9-6f76bde73490
Version Independent ID: 65286e86-1042-bb5f-ce10-a7c20ed07e5b
Content: Python tutorial: Categorize customers - SQL machine learning
Content Source: docs/machine-learning/tutorials/python-clustering-model.md
Service: sql
Sub-service: machine-learning
GitHub Login: @WilliamDAssafMSFT
Microsoft Alias: wiassaf

@Hevgen -- thank you again for your considered feedback.
@WilliamDAssafMSFT -- William, please look into this issue.

Thanks @Hevgen for contacting Microsoft with feedback about our product documentation. It could take from a few business days to a few weeks to look further into this with the product team and decide on how to address. We'll contact you if we need further information, and you'll receive an email message each time we mention you in a comment.

@Hevgen-
Some questions:

"Package "sklearn" isn't installed correctly in this way."  Can you be specific in what way pip install sklearn doesn't install sklearn correctly? Can you provide any error messages or steps to reproduce?
What version of SQL Server are you attempting this tutorial on? And Platform (windows, linux, or SQL MI?)
What version of Python is installed?

To add, it might be easier for you to create a Pull Request to demonstrate the change or part of the change, instead of trying to describe the change. To give you credit as a contributor to the article, would you like to create a Pull Request and get the ball rolling on a change yourself? By opening a pull request, you're collaborating with the authors to add changes directly to the documentation. After the updated article is published, GitHub lists you as an article contributor. Select the "Edit" pencil at the top of the article to begin a pull request on our open source docs. You can reference this issue and my GitHub in your pull request, and I'll personally review and carry it across the finish line. Either way, thanks for your feedback! Closing this issue for now. If you'd rather not create a pull request, we can handle the update.

"Package "sklearn" isn't installed correctly in this way."  Can you be specific in what way pip install sklearn doesn't install sklearn correctly? Can you provide any error messages or steps to reproduce?

I was tried weeks ago. Now i got that result:
> pip install sklearn
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: sklearn in c:\users\hevge\appdata\roaming\python\python39\site-packages (0.0.post1)
So it installed version 0.0.post1. I'm not so known at Python. I tried in few ways with the same result: version 0.0.post1 installed.

What version of SQL Server are you attempting this tutorial on? And Platform (windows, linux, or SQL MI?)
MS SQL Server 2022 Developer edition under Windows 11 Home.

What version of Python is installed?
3.9 and 3.10. The same result for both.

Here additionally for 3.10:
C:\Program Files\Python310\Scripts>pip install sklearn                                            Collecting sklearn                                                                                Using cached sklearn-0.0.post1.tar.gz (3.6 kB)                                                    Preparing metadata (setup.py) ... done                                                          Installing collected packages: sklearn                                                              DEPRECATION: sklearn is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559                                                Running setup.py install for sklearn ... done                                                   Successfully installed sklearn-0.0.post1

To add, it might be easier for you to create a Pull Request to demonstrate the change or part of the change, instead of trying to describe the change.
I don't know what changes should be done. I'm learning. I just know that I have tried according to the article and it doesn't work properly.

@Hevgen It looks like https://pypi.org/project/sklearn/ has been sunset in December. This is an external open source package not controlled by Microsoft, this stuff is expected over time. We'll need to update our doc samples! That is in flight. Meanwhile, per the same site, use pip install scikit-learn rather than pip install sklearn.
Thanks @Hevgen for taking the time to provide this feedback, your suggestions help improve our documentation.


Segmentation fault: 11

I am running the following simple script:
import osqp
import numpy as np
from scipy.sparse import csc_matrix

P = np.array([[1,0], [0,1]])
q = np.array([-1,-1])
A = np.array([[1,0], [0,1]])
l = np.array([0,0])
u = np.array([1,1])

P = csc_matrix(P)
A = csc_matrix(A)

settings = {
    'verbose': True,
}

# This works
m = osqp.OSQP()
m.setup(P=P, q=q, A=A, l=l, u=u, **settings)
results = m.solve()
print(results.x)  # [0.99895712 0.99895712]

# This fails with Segmentation fault: 11
results = osqp.solve(P=P, q=q, A=A, l=l, u=u, **settings)
print(results.x)

Creating OSQP object and calling a solve method on it works fine.
The value of x is [0.99895712 0.99895712].
Direct invocation of osqp.solve terminates with Segmentation fault: 11.
Setup:
MacBook Pro, MacOS Mojave 10.14.6
Python 3.7.2
OSQP 0.6.1
numpy 1.16.2
scipy 1.2.2

I just tried your code and it seems to give the segfault when verbose=True. Have you tried it with False instead? I will look into a fix.

@bstellato I'm getting a seg fault with verbose=False when running 50 in parallel. Here's the code
import osqp
import numpy as np
import scipy as sp
from scipy import sparse
from multiprocessing.pool import ThreadPool

def f(i):
    m = 30
    n = 20
    Ad = sparse.random(m, n, density=0.7, format='csc')
    b = np.random.randn(m)

    # OSQP data
    P = sparse.block_diag([sparse.csc_matrix((n, n)), sparse.eye(m)], format='csc')
    q = np.zeros(n+m)
    A = sparse.vstack([
            sparse.hstack([Ad, -sparse.eye(m)]),
            sparse.hstack([sparse.eye(n), sparse.csc_matrix((n, m))])], format='csc')
    l = np.hstack([b, np.zeros(n)])
    u = np.hstack([b, np.ones(n)])

    # Setup workspace
    osqp.solve(P, q, A, l, u, verbose=False)

pool = ThreadPool(4)
pool.map(f, range(50))

I think the printing issue was related to this https://github.com/cvxgrp/scs/pull/48 I will try to fix it tomorrow together with your segfault problem.

@bstellato thank you for the prompt response! You are right, verbose=False solved the second case.


Exception thrown while executing UI Block: Collection was being mutated while being enumerated

Describe the bug
After following the docs, installing rn-emoji-keyboard and adding it to my project, when selecting an emoji from the keyboard I get this error (screenshot below). This sometimes does not happen the first time I select an emoji but it always happens in the first 3 selections.
To Reproduce
Steps to reproduce the behavior:
`
import EmojiPicker from "rn-emoji-keyboard";
export default function MyEmojiPicker({isOpen, onClose, onSelect}) {
<EmojiPicker
onEmojiSelected={(e) => onSelect(e.emoji)}
open={isOpen}
onClose={onClose}
/>
}
`
Expected behavior
The keyboard is supposed to not crash the entire app when an emoji is selected
Screenshots

Devices this happens on (that I personally tested)

Simulator iPhone 14 pro - iOS 16.2
Simulator Resizable API 32 - Android 12L
Simulator Pixel 6 Pro API Tiramisu - Android 13
Real device iPhone14 pro - iOS 16.2
Real device iPhone 11 pro - iOS 16.1
Real device Huawei Y9 - Android 12

Stack & Versions
"expo": "^47.0.0",
"react": "18.1.0",
"react-native": "0.70.5",
"rn-emoji-keyboard": "^1.1.0"

Hey @baltagih2, I've tried to reproduce it on iPhone 11 and 14 pro simulator (iOS 16.2) and I didn't get any crash. Do you have react-native-reanimated in your project and if so in which version? Do you have any other packages installed that may cause this bug or these are all?

We are using "react-native-reanimated": "~2.12.0" on expo SDK 47 with React native gifted chat "react-native-gifted-chat": "^1.1.0".
The error sometimes only happens after the second or third selection, I'm not sure if it's specific emojis or if the problem is somewhere else.
Any thing I can do to help you debug?

Can you paste your whole component here? It may help, I saw this problem but it was connected with modal animation and entering/exiting animations from reanimated. I have the same versions of the packages and everything works fine so I guess it must be something with the component code.

Here's a minimal version of my code in which the problem still occurs. The "EmojiKeyboard" component is just the "EmojiPicker" wrapped in an ErrorBoundary. When "handleLongPress" is called, an emoji drawer appears with a "plus" sign (similar to instagram) and when the plus sign is pressed, it sets emojiKeyOpen to true to open the emoji keyboard.
export default function MainChatBubble({   props, }: {   props: BubbleProps<ChatMessage>; }) {   return (     <View>       <GestureHandlerRootView>         <Swipeable           ref={swipeableRef}           friction={2}           renderRightActions={() =>             isRight ? <View style={{ width: 16 }} /> : null           }           renderLeftActions={() =>             !isRight ? <View style={{ width: 16 }} /> : null           }           onSwipeableOpen={handleSwipe}         >           <Bubble {...props} onLongPress={handleLongPress} />         </Swipeable>       </GestureHandlerRootView>       <EmojiKeyboard         isOpen={emojiKeyOpen}         onClose={() => {           setEmojiKeyOpen(false);           setShowEmojiesSelector((prev) => false);         }}         onSelect={(e) => handleSelectEmoji(e)}       />     </View>   ); }

Thanks for the code. Can I also see the "emoji drawer"? And when do you close this drawer?

Here's the EmojiKeyboard code:
export default function EmojiKeyboard({ isOpen, onClose, onSelect }: Props) {
  return (
    <ErrorBoundary onClose={onClose}>
      <EmojiPicker
        onEmojiSelected={(e: { emoji: string }) => onSelect(e.emoji)}
        open={isOpen}
        onClose={onClose}
      />
    </ErrorBoundary>
  );
}

This is a custom Error Boundary to handle the error thrown by the EmojiPicker so the app does not crash and it's passed the onClose function to close the drawer if an error occurs so the user can continue chatting as usual.
setShowEmojiesSelector((prev) => false) is responsible for closing the small emoji popup that allows the user to select an emoji quickly (a couple of most used emojis displayed). This popup contains a "plus" sign which handles opening the emojiPicker

Can you check if it works well without this small popup? Sorry for so many questions, but I still can't reproduce it and I'm trying to get as small piece of code as it's possible :)

It may be the case, I think that the safiest option is to use the same version as we have in the library if it's possible. But anyway emojis are not svg, only the categories icons are, so it's weird. Without ErrorBoundary it is the same?

Okay, unfortunately I still can't reproduce it on my computer, but I'll talk about it with @jakex7 in the next week and maybe he  will be able to see the error on his computer.

Thank you so much for all the effort, I'll keep trying different things on my end to see if I can find the root cause

Let me know if you come up with anything new and I'll take a look again :)

Hey! Thank you for your help. I'm still running into the same problem and can't seem to get it to work. I also took the keyboard outside of the bubble component into the main one and the problem still occurs. Anything I can try to give you more visibility into the error or more details by any chance?

Maybe you can create a snack with minimal code needed to reproduce it? For example using this tool - https://snack.expo.dev/
Then we will know if it's something with your project only, or no :)

The error happens in this snack that I created: https://snack.expo.dev/@baltagih/intrigued-candies
I tried to remove as much of the clutter as possible. Let me know if you need me to reduce it even more.
Instructions to reproduce error:

Long press on any of the messages
An emoji selector will appear, click on the "plus" sign on the right
The emoji keyboard will appear
Select an emoji (sometimes the error happens when you select a second one or when you choose and emoji from one of the less-used categories like the airplane)
if no errors are displayed, for you to know that the error happened, the small emoji selector will appear empty (Looks like it crashes all svgs or something) and you won't be able to select a second emoji anymore

Tips:

The rn-emoji-keyboard is available in the MainChatBubble.js component at the bottom
The App.js component is just the GiftedChat wrapped in a view and default constant messages are passed to it

Let me know if I can help with anything else in debugging this and thank you again for all your help!

Hi @baltagih2, can you try to move setShowEmojiesSelector((prev) => false); from the handleSelectEmoji fn and use it in '+' onPress? Also you can remove 'setShowEmojiesSelector((prev) => false)' from the emoji onClose function. I think it works fine then, but still it's only snack, and it would be great to test it in your app.

Looks like this fixed it. The small emoji selector with the + sign doesn't close anymore on selection, but at least I can't replicate the crash anymore. Any idea why this could be happening? I'll find a way to keep the same functionality with this setup but it's weird that closing the small selector makes the app crash

I'm not sure why this happens. All I found is this thread and it says that there are some bugs with layout transitions. However after my changes the small emoji selector should close right after clicking +, so there's no reason to close it after selection. I've added ten emojis to one message and it was fine.
Great, let me know if it will crash again in your app :)

There wasn't any update for a long time, so I'm assuming it's fixed. Closing for now, please reopen if it happens again.


hdparm: name -> pname

Motivation for this change
According to the manual, this is preferred for packages in Nixpkgs.
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

Result of nixpkgs-review pr 101582 1

3 packages built:

gparted
hdparm
tlp


Simple SELECT queries (Single WHERE clause and no JOINS).

Simple SELECT queries
Expect
Simple SELECT queries (Single WHERE clause and no JOINS).

Recognition how to do it

recognising how it is done in sqllite.

Btw, I created a discord server for the project so we can start have a more active conversation and build a community. Here is the link: https://discord.gg/zHXUG66X .


Angular: standalone components

@wmarques I started to migrate to standalone components (not all components again). Do you think that we must wait Angular 15 or we can merge it? JHipster Lite is not in version 1.0.0 so 🤷♂
https://angular.io/guide/standalone-components
cc @pascalgrimaud
Fix #3993

I think we can go ahead the API looks stable enough

@wmarques 👍 I agree

As I'm not an Angular user, I'm trusting you both, William and Quentin :-)

@wmarques thanks, yes you're right I updated 🙂


markdown rendering issues

Describe the bug
The auto-markdown conversion for signatureHelp and hover is useful, but appears to have some issues.  For example, consider the numpy function np.unique.  This is the Parameters block from its docstring:
    Parameters
    ----------
    ar : array_like
        Input array. Unless `axis` is specified, this will be flattened if it
        is not already 1-D.
    return_index : bool, optional
        If True, also return the indices of `ar` (along the specified axis,
        if provided, or in the flattened array) that result in the unique array.
    return_inverse : bool, optional
        If True, also return the indices of the unique array (for the specified
        axis, if provided) that can be used to reconstruct `ar`.
    return_counts : bool, optional
        If True, also return the number of times each unique item appears
        in `ar`.

        .. versionadded:: 1.9.0

    axis : int or None, optional
        The axis to operate on. If None, `ar` will be flattened. If an integer,
        the subarrays indexed by the given axis will be flattened and treated
        as the elements of a 1-D array with the dimension of the given axis,
        see the notes for more details.  Object arrays or structured arrays
        that contain objects are not supported if the `axis` kwarg is used. The
        default is None.

        .. versionadded:: 1.13.0

And here is how pyright renders it into markdown:
Parameters
ar : array\_like\
    Input array. Unless axis is specified, this will be flattened if it
is not already 1-D.\
return\_index : bool, optional\
    If True, also return the indices of ar (along the specified axis,
if provided, or in the flattened array) that result in the unique array.\
return\_inverse : bool, optional\
    If True, also return the indices of the unique array (for the specified
axis, if provided) that can be used to reconstruct ar.\
return\_counts : bool, optional\
    If True, also return the number of times each unique item appears
in ar.
axis : int or None, optional\
    The axis to operate on. If None, ar will be flattened. If an integer,
the subarrays indexed by the given axis will be flattened and treated
as the elements of a 1-D array with the dimension of the given axis,
see the notes for more details.  Object arrays or structured arrays
that contain objects are not supported if the axis kwarg is used. The
default is None.

The main issues are (sometimes, but not always) doubling or tripling backslashes (e.g. \\\n), and losing the reverse indentation layout which delineates individual parameters.  The ..versionadded info is also stripped.

this is what i am seeing

I don't see any issue on doc string rendering.
please re-open the issue with more specifics if you think we need to improve doc string rendering.

actually, I think we are

I re-opened the issue and set it as enhancement. we probably want to improve line wrapping.

Thanks for your thoughts on this.  The issue is with parsing the doc info in another tool (Emacs).  While it may be rendered well enough in some tools, the markdown has errors, as you can see above by Github's rendering of the exact content delivered by pyright.  Here's how it renders for me:

It would be great if pyright could stick to simple markdown, renderable anywhere.  Even GitHub has trouble rendering the markdown pyright generates (see example above).  Is there perhaps a plaintext option which returns the docs without processing?

@jdtsmith not all markdown renderer supports all different variations of markdowns. our markdown targets one that vscode LSP client uses. it looks like the markdown renderer you used are not supporting some of markdown vscode renderer supports. (we also have bugs the other way that says vscode LSP markdown renderer not supporting one that other renderers support such as LaTex markdown)
we will take a look but we will probably still target best experience over vscode's markdown renderer.

look into replacing \ with <br>
https://www.markdownguide.org/basic-syntax/#line-break-best-practices

@bschnurr it looks like   is shown as it is according to the image @jdtsmith shared. so, I am not sure the markdown renderer @jdtsmith is using even supports HTML tags. it might be better to use the "two spaces - trailing whitespace" trick the doc is mentioning?

but the renderer user uses doesn't even support char escaping we put for _.  (https://www.markdownguide.org/basic-syntax/#characters-you-can-escape)
so, it might be better to just ask users to use better markdown renderer.

Plain text sounds workable.  What is the config setting enabling that?  Thanks.

@jdtsmith its up to client (Emacs), they need to request plain text hover, not markdown hover.

Not sure there is work to do here? What would the enhancement be?

Unless the markdown can be simplified so as not to include special HTML entities but only pure markdown, I think just reverting to plain text is the right solution.  I've put in a request (no traction yet).
Just came across this particularly bad example today (from python's re module):

I'll close this as the client's problem.


compute memory consumption for keeping events

please tag with v0.11.0 after merge (this version is currently hardcoded in the index.html)


NoSuchFileException: build/tmp/initializeIntelliJPlugin/coroutines-javaagent.jar

What happened?
I get NoSuchFileException: build/tmp/initializeIntelliJPlugin/coroutines-javaagent.jar when running ./gradlew clean build multiple times after updating to 1.16, it was introduced in 1.16 though.
This error is persistent, even running clean does not help, nor deleting the .gradle or build folder. Only workaround I found is downgrading to 1.15.
This won't happen on CI because it is only executed once.
Relevant log output or stack trace
Caused by: java.nio.file.NoSuchFileException: /Users/philipwedemann/GitHub/kobol/intellij-plugin/build/tmp/initializeIntelliJPlugin/coroutines-javaagent.jar
        at com.jetbrains.plugin.structure.base.utils.FileUtilKt.outputStream(FileUtil.kt:38)
        at org.jetbrains.intellij.tasks.InitializeIntelliJPluginTask.createCoroutinesJavaAgentFile(InitializeIntelliJPluginTask.kt:95)
        at org.jetbrains.intellij.tasks.InitializeIntelliJPluginTask.initialize(InitializeIntelliJPluginTask.kt:51)

Steps to reproduce

Checkout https://github.com/hfhbd/kobol/tree/reproducer
Run ./gradlew clean build, a compilekotlin error is expected
Run ./gradlew clean build

Don't be afraid of the size of the project, I am just too lazy to delete the code, but other projects are disabled.
Gradle IntelliJ Plugin version
1.16.0
Gradle version
8.4
Operating System
macOS
Link to build, i.e. failing GitHub Action job
No response

Instead of build, use buildPlugin task.

This also does not work: https://scans.gradle.com/s/mapibsleenhye

Change the config from org.gradle.configuration-cache = true to  org.gradle.configuration-cache = false (in gradle.properties), the problem resolved.

I also noticed the same problem.

Show Gradle console output
Calculating task graph as configuration cache cannot be reused because the file system entry 'build\classes\java\main\classpath.index' has been created.
> Task :plugins:checkKotlinGradlePluginConfigurationErrors
> Task :plugins:generateExternalPluginSpecBuilders UP-TO-DATE
> Task :plugins:extractPrecompiledScriptPluginPlugins UP-TO-DATE
> Task :plugins:compilePluginsBlocks UP-TO-DATE
> Task :plugins:generatePrecompiledScriptPluginAccessors UP-TO-DATE
> Task :plugins:generateScriptPluginAdapters UP-TO-DATE
> Task :plugins:compileKotlin UP-TO-DATE
> Task :plugins:compileJava NO-SOURCE
> Task :plugins:pluginDescriptors UP-TO-DATE
> Task :plugins:processResources UP-TO-DATE
> Task :plugins:classes UP-TO-DATE
> Task :plugins:jar UP-TO-DATE
> Task :initializeIntelliJPlugin SKIPPED
> Task :clean
> Task :processTestResources NO-SOURCE
> Task :patchPluginXml FROM-CACHE
> Task :generateLexer FROM-CACHE
> Task :verifyPluginConfiguration
> Task :processResources
> Task :generateParser FROM-CACHE
> Task :compileJava FROM-CACHE
> Task :classes
> Task :instrumentCode FROM-CACHE
> Task :instrumentedJar FROM-CACHE
> Task :compileTestJava FROM-CACHE
> Task :testClasses UP-TO-DATE
> Task :instrumentTestCode FROM-CACHE
> Task :classpathIndexCleanup
> Task :jar
> Task :prepareTestingSandbox
> Task :test FAILED
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':test' (type 'Test').
  - Type 'org.gradle.api.tasks.testing.Test' property 'jvmArgumentProviders.$0.coroutinesJavaAgentPath' specifies file 'C:\Users\jojo\Entwicklung\nix-idea\build\tmp\initializeIntelliJPlugin\coroutines-javaagent.jar' which doesn't exist.

    Reason: An input file was expected to be present but it doesn't exist.

    Possible solutions:
      1. Make sure the file exists before the task is called.
      2. Make sure that the task which produces the file is declared as an input.

    For more information, please refer to https://docs.gradle.org/8.6/userguide/validation_problems.html#input_file_does_not_exist in the Gradle documentation.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

As can be seen in the console output, :clean may be executed after :initializeIntelliJPlugin. Since :initializeIntelliJPlugin is creating the coroutines-javaagent.jar, the file may be missing during later task executions. I guess the problem is that InitializeIntelliJPluginTask does not declare any output files, but instead stores the output in the directory returned by Task.getTemporaryDir. Note that the Javadoc of this method explicitly mentions that you should not use the content of the directory outside the specific task:

There are no guarantees that the contents of this directory will be kept beyond the execution of the task.

@hsz Can you consider re-opening this issue?

Thanks for reporting and investigating, folks!
Fixed with https://github.com/JetBrains/intellij-platform-gradle-plugin/commit/6fb3b24e75a8d28d00c90e9e852dc58201d3373b and scheduled for 2.0.0-beta9


Plot Kaplan-Meier Curves Based on Model Predictions Using torchsurv?

I am using the torchsurv library for survival analysis and want to plot Kaplan-Meier (KM) curves based on my model's predictions, not the baseline KM curve. I’m looking for guidance on how to generate these KM curves using the predictions from torchsurv. Could anyone provide advice or example code for this?

melodiemonod

Thank you for your response.
I see that when using neg_partial_log_likelihood as the loss, the log_hz value is obtained from cox_model(x). Is log_hz the risk score here?
If I want to estimate the survival function, do I only need to add a function to calculate the cumulative baseline hazard using the Breslow method?

Is log_hz the risk score here?

This is documented in TorchSurv's website. Quoting the documentation:

The log hazard function for the Cox proportional hazards model has the form:
$$\log \lambda_i (t) = \log \lambda_{0}(t) + \log \theta_i$$
where $\log \theta_i$ is the log relative hazard (argument log_hz).

The baseline hazard $\log \lambda_{0}(t)$ is not required to evaluate the partial log likelihood. As you mentioned, there are methods to estimate it, but they are not provided by our package. Nonetheless, should you be able to obtain $$\int_0^t  \log \lambda_{0}(s) ds$$, then you can evaluate the survival function of $i$ at time $t$ with
$$S_i(t) = \exp(-\log \theta_i \times \int_0^t  \log \lambda_{0}(s) ds )$$

Hi @melodiemonod ,
Thank you for providing the method to plot the Kaplan-Meier curve. I would like to ask if there is a way to plot the survival function as a non-smoothed curve, similar to your first example or the attached image.
Thank you in advance.

Hi @melodiemonod , Thank you for providing the method to plot the Kaplan-Meier curve. I would like to ask if there is a way to plot the survival function as a non-smoothed curve, similar to your first example or the attached image. Thank you in advance.

You can refer to the functions compute_baseline_hazards and predict_surv_df in pycox. By computing these, you can plot results similar to those in the image.

Hi @tadongguk ,
Thank you for your feedback. Do you mean that the survival prediction should use predict_surv_df instead of torchsurv.loss.weibull.survival_function?

Hi @tadongguk , Thank you for your feedback. Do you mean that the survival prediction should use predict_surv_df instead of torchsurv.loss.weibull.survival_function?

Yes.


Document PlanetScale specific behaviour for Unique/ Null violations

When working with Prisma & Planetscale, debugging Null/ Unique Constraint violations lead to obscure errors especially when using nested writes. The error message be missed and this is the filtered error from Planetscale (and passed through to Prisma Client):
Null constraint violation on the (not available)

The field that violates the constraint is not available from Planetscale.
Original Prisma Client error
{"type":"PrismaClientKnownRequestError","message":"\nInvalid `prisma.workflowRun.create()`
invocation:\n\n\nNull constraint violation on the (not available)","stack":"Error: \nInvalid `prisma.workflowRun.create()` invocation:\n\n\nNull constraint violation on the (not available)\n    at pn.handleRequestError
(/var/task/node_modules/.pnpm/@prisma+client@4.13.0_prisma@4.13.0/node_modules/@prisma/client/runtime/library.js:176:6477)\n    at pn.handleAndLogRequestError
(/var/task/node_modules/.pnpm/@prisma+client@4.13.0_prisma@4.13.0/node_modules/@prisma/client/runtime/library.js:176:5907)
\n    at pn.request (/var/task/node_modules/.pnpm/@prisma+client@4.13.0_prisma@4.13.0/node_modules/@prisma/client/runtime/library.js:176:5786)
\n    at t._request (/var/task/node_modules/.pnpm/@prisma+client@4.13.0_prisma@4.13.0/node_modules/@prisma/client/runtime/library.js:179:10484)
\n    at action (/var/task/build/build-nodejs-eyJydW50aW1lIjoibm9kZWpzIn0.js:188:25)\n    at Object.callRouteActionRR (/var/task/node_modules/.pnpm/@remix-run+server-runtime@1.16.0/node_modules/@remix-run/server-runtime/dist/data.js:24:16)\n    at callLoaderOrAction (/var/task/node_modules/.pnpm/@remix-run+router@1.6.0/node_modules/@remix-run/router/dist/router.cjs.js:3817:16)\n    at submit (/var/task/node_modules/.pnpm/@remix-run+router@1.6.0/node_modules/@remix-run/router/dist/router.cjs.js:3256:16)\n    at queryImpl (/var/task/node_modules/.pnpm/@remix-run+router@1.6.0/node_modules/@remix-run/router/dist/router.cjs.js:3206:22)\n    at Object.queryRoute (/var/task/node_modules/.pnpm/@remix-run+router@1.6.0/node_modules/@remix-run/router/dist/router.cjs.js:3165:18)",
"code":"P2011","clientVersion":"4.13.0","meta":{"constraint":null}},"msg":"An unexpected error occured"}

Note: tracking issue about this in prisma/prisma https://github.com/prisma/prisma/issues/10829


Could you add about line beacon examples?

I simulate a beacon from windows universal app, then open LINE app with android phone.
I can not receive any beacon message.
I would appreciate if you add about line beacon examples?
Thanks.

Could you let me know about UWP beacon simulator? I will test it.

I use BluetoothLEAdvertisementPublisher class, the code were below,
private BluetoothLEAdvertisementPublisher _blePublisher;
private void BtnStart_OnClick(object sender, RoutedEventArgs e)
{
	var manufactureData = new BluetoothLEManufacturerData();
	// 0x004C	Apple, Inc.
	// LINE Beacon https://admin-official.line.me/beacon/register#/
	// hwid 01 07 77 7E BA
	//0x004C	Apple, Inc.
	manufactureData.CompanyId = 0x004C;

	byte[] dataArray = new byte[] {
		// last 2 bytes of Apple's iBeacon
		0x02, 0x15,
		0x00, 0x00, 0x6F, 0xFE,
		0x0B, 0x16, 0x6F, 0xFE,
		//start with 02
		0x02,
		// hwid
		0x01, 0x07, 0x77, 0x7E, 0xBA,
		// 7f 00 結尾
		0x7F, 0x00,
		// Major
		0x00, 0x01,
		// Minor
		0x00, 0x01,
		// TX power
		0xc5
	};
	//using System.Runtime.InteropServices.WindowsRuntime;
	manufactureData.Data = dataArray.AsBuffer();
	_blePublisher = new BluetoothLEAdvertisementPublisher();
	_blePublisher.Advertisement.ManufacturerData.Add(manufactureData);

	_blePublisher.Start();
}

thanks for your help.


something unexpected happened in the part of Access/Call Function Shorthand

map (.length), <[ hello there you ]>
#=> [5,5,3]
map(function(it){
return it.length;
}, ['hello', 'there', 'you']);
Array.prototype.map(function(it){
return it.length;
}, ['hello', 'there', 'you']);
when i run the js code in chrome 48, its results are not [5,5,3], it's []
the second para of map function is used to change context! so it don't change it!
Am I wrong?

It'd need to be Array.prototype.map.call... But I'm not sure how this is a LS bug?

@vendethiel I'm sorry! the map function is defined in prelude.ls It's not the one defined in Array::

@vendethiel It's my fault

Okay -- can I close this issue, then? :)

@vendethiel  of course! Thanks


Flutter Web http.post works on local, but return XMLHttpRequest error when deployed on Firebase Hosting

So I'm building Flutter Web and tried to send data over API using http.post like this:
final url =
    Uri.parse('http://sirs.kemkes.go.id/fo/index.php/LapV2/PasienMasuk');

final response = await http.post(url,
    headers: getHeader(hospitalId, hospitalPass),
    body: utf8.encode(jsonEncode(covidPatientSummary.toMap())));

final responseBody = jsonDecode(response.body);

final data = List.from(responseBody['RekapPasienMasuk']);
final result = data.map((e) => ResultStatus.fromJson(e)).toList();

and set my headers like so:
static Map<String, String>? getHeader(
  String hospitalId, String hospitalPass) {
return {
  'X-rs-id': hospitalId,
  'X-Timestamp': DateConverter.toTimestampUtc().toString(),
  'X-pass': hospitalPass,
};
}

I've tried to run it locally using Chrome with --disable-web-security, it works and I get 200 status response. However, when I deploy it using firebase deploy, I get XMLHttpRequest error.
I've put CORS on my firebase.json file like this, but still doesn't work.
{
  "hosting": {
    "public": "public",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "headers": [ {
      "source": "**",
      "headers": [ {
        "key": "Access-Control-Allow-Origin",
        "value": "*"
      } ]
    }]
  }
}

Do you know what am I missing to make it work?

Hi @choirunnisa, Thanks for filing the issue this is basically a CORS issue
Taken from the flutter docs

CORS is a mechanism that browsers use to control how one site accesses the resources of another site. It is designed such that, by default, one web-site is not allowed to make HTTP requests to another site using XHR or fetch. This prevents scripts on another site from acting on behalf of the user and from gaining access to another site’s resources without permission.

Please check this similar stackoverflow thread and see if this helps resolve the issue.
This issue does not describe a bug or feature request in the Flutter framework, Please try asking such questions on community forums like stackoverflow or Reddit in the future, Closing this issue as invalid if you disagree feel free to comment and I will reopen it.
Thank you.


An example of using geotorch for output embeddings

Thank you for coming up with the approach and building this fantastic library. Still working through the paper but was interested if you can hint if and how the library can be build for optimizing the output embeddings of an ANN if we have a constraint that those should be on a unit sphere. In other words can I use this library somehow on the output vector of the last Linear layer to normalize it or is it only usable for weights/biases?
A little bit of background: this will be particularly interesting in a number of applications that work with deep metric learning - those often use Siamese networks and are optimized in Euclidean space during training. Later, during inference cosine similarity is used. This sort of gap is often waved off as "not problematic" in literature but would be nice to experiment with make the proper training procedure (esp. for ADAM-based optimization).

If I have understood the problem correctly, you want to design a map (say an ANN) with outputs on the sphere.
You can certainly do that, although at the moment GeoTorch does not offer a clean way of doing it (it will do so in the future). Of course, the most obvious way of doing this would be to normalise the output by dividing by the norm of the output. Other way, would be to use the exponential map on the sphere. Both of these maps are implemented in
https://github.com/Lezcano/geotorch/blob/master/geotorch/sphere.py
although the second one is implemented in a bit of a cryptic way.
A less cryptic way to implement that is presented in section E.3.2 of the paper that you mention. Note that in this formula, although we also have the a v/\norm{v}, it is multiplied by sin(\norm{v}), so we have that lim_{t=0}sin(t)/t v = 0, so it is well defined for small vectors. The x \in S^n in that formula, you can fix it at the start of the training by sampling a random vector in the Sphere and saving it in your layer as a buffer. A short implementation of this layer would go as follows:
class expSn(nn.Module):
    def __init__(self, n):
        self.x = torch.rand(n)
        self.x = self.x / torch.norm(self.x)

    def forward(self, v):
        # Assume v a vector of size (batch, n)
        x = self.x.expand_as(v)

        # Project to T_xS
        v = v - (v @ x).expand_as(v) * x
        norm_v = torch.norm(v)
        # Maybe it is worth to see how to compute sin(t)/t in a stable way
        return torch.cos(norm_v) * x + (torch.sin(norm_v)/norm_v) * v

As a disclaimer, this is just a sketch, I have not tested it, so expect some dimension errors, but hopefully the idea is clear.

Of course, the most obvious way of doing this would be to normalise the output by dividing by the norm of the output.

Interesting, tried it on a couple occasions before to do just that in forward() pass and for some reason training with that modification never seem to work, so without going into deep I speculated that this is due to gradient pushing the ANN in all sort of random directions as opposed to keep outputs on the unit sphere, or to quote a more eloquent another paper:

Since the optimization problem is constrained on the unit sphere, the Euclidean space optimization
methods such as SGD cannot be used to optimize our objective, because the Euclidean gradient
provides the update direction in a non-curvature space, while the parameters in our model must be
updated on a surface with constant positive curvature. Therefore, we need to base our embedding
training problem on Riemannian optimization.

Does it sound reasonable? If not - perhaps I should go back and check for bugs / hyper-parameters.

What they say is not really correct. As you see in my paper, you can use Euclidean optimisers to do optimisation on manifolds, as long as you can pullback the problem to a Euclidean space. What can happen is that, if you get some outputs with small norm and you use x / \norm{x} to pullback the problem to a Euclidean space, then the gradients will be very large, hence making the problem very unstable.
Now, this does not say that using the parametrisation of the exponential that I implemented up there should work in any given problem. What I think it should happen though is that, if you replicate the experiments in the paper that you cite on spherical text embeddings and use the class Sphere in GeoTorch to optimise those parameters, I think you should be able to improve, or at the very least match, their results, as pulling back the problem to a tangent space tends to work much better than the usual gradient descent they do (which is basically what I argue on my paper). But then again, the problem they have in that paper looks different to the one you mentioned, as they do optimise some parameters, while you said that you wanted to parametrise the output of an ANN, which is different.

Thank you, that helps. I think the problem they mention is exactly the same I try to solve but I just failed to verbalize it properly. Once again, cool paper and library, looking forward to see where it all goes, good luck!


Geocoding - Revamp geocoder

Revamp geocoder to make code cleaner. Changes should include, at least:

use of a base geocoding class
clear differentiated geocoding and batch_geocoding functions
standardized output in the event of an error

See also this library for standardizing geocoding requests.

That looks dope.


Update Set-SPOSite.md

Suggested parameter description

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

File
Status
Preview URL
Details

sharepoint/sharepoint-ps/sharepoint-online/Set-SPOSite.md
:white_check_mark:Succeeded
View (sharepoint-ps)

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

@JohanFreelancer9

@get-itips @dariomws

@tiburd Please merge this PR. Thanks

Docs Build status updates of commit 4f3b269:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

sharepoint/sharepoint-ps/sharepoint-online/Set-SPOSite.md
:white_check_mark:Succeeded
View (sharepoint-ps)

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


improve how repeated row content is shown within a column (in this example in namespace column)

During the TGIK viewing, Joe was using kapp, and he had great things to say about it! But it looks like he found a bug:

maintainer edit: it's a current UI behavior, read more details below...

currently ~ is used to shown for rows that have same content as row above. in this case kpack-controller row has the same namespace as controller, hence it shows ~.
one downside of this is that ~ is also very close looking as - which indicates no namespace. ~ is also used for that repeating content as well, making things more confusing potentially.
one proposal is to remove namespace deduplication but that potentially will make things more noisy.

any thoughts @jbeba?

Sometimes people use " for this, like so:
kpack, one, two, three
", two, two, three

additional alteratives for repeating chars: ", ^, ^^, ~~~

to improve table output:

show (cluster) in namespace column: https://github.com/k14s/kapp/commit/e2a5937a34462adad1d3f7f0f15080b58555ab9f
use ^ marker for dup content: https://github.com/k14s/kapp/commit/2049009d286d22e60d301a1c6640ce4325843eb3

will be available in v0.14.0

available in https://github.com/k14s/kapp/releases/tag/v0.14.0


Add C# benchmarks

This PR introduces two C# implementations: "naive" one (using 2D array) and "optimized" one (that uses 1D array).
I'm tired of manual updating the benchmark results; need to solve #18 before updating them.
For now, please check the correctness of my implementations. I'll create the documentation update script and update the documentation in one of the next pull requests.

Thanks!


[CP] Replace deprecated exists in podhelper.rb

Issue Link
https://github.com/flutter/flutter/issues/141167
Target
beta
PR Link
https://github.com/flutter/flutter/pull/141381
Changelog Description
Building macOS projects containing plugins may fail with newer versions of Ruby
Impacted Users
macOS developers
Impact Description
Build fails.
Workaround
Possibly installing an older version of Ruby; nothing straightforward
Risk
low
Test Coverage
no
Validation Steps

Have Ruby 3.2.0 or later
Make a macOS project
flutter pub add path_provider
flutter build macos

(The reason I answered "no" above is that we don't have CI with this version of Ruby. We do have test coverage that my change does not regress functionality for users for whom it was not broken, and the fix is extremely straightforward, which is why the risk level is low.)

@jmagman @christopherfujino could you take a look at this cherry-pick?

LGTM

LGTM

Released in https://github.com/flutter/flutter/commits/3.19.0-0.2.pre


Unit test false negatives (usage of fixture.debugElement.query + toBeDefined)

Describe the bug
Multiple unit tests always succeed (even when they should fail). This happens because expect(...).toBeDefined() checks are used on variables that will never be set to undefined.
For example:
const btn = fixture.debugElement.query(By.css('.btn-success'));
expect(btn).toBeDefined();

If fixture.debugElement.query can find a match, it will return a DebugElement. (So far so good.)
However, if no element can be found, it will return null. Consequently, the test still passes, but it is supposed to fail.
To Reproduce
Building on the example:

run yarn test --include src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.spec.ts (all tests should pass)
change the css selector here, e.g. to .this-class-does-not-exist (optionally log btn to the console)
run the tests again (still passes)

Expected behavior
When the tests are run the second time, they should fail, because no element with class .this-class-does-not-exist exists in the component.
Possible fix
Replace expect(...).toBeDefined() with expect(...).not.toBeNull(). (Better checks may be crafted on a case-by-case basis.)
Occurrences

https://github.com/DSpace/dspace-angular/blob/main/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.spec.ts#L52
https://github.com/DSpace/dspace-angular/blob/main/src/app/shared/mydspace-actions/claimed-task/approve/claimed-task-actions-approve.component.spec.ts#L61
https://github.com/DSpace/dspace-angular/blob/main/src/app/shared/mydspace-actions/claimed-task/edit-metadata/claimed-task-actions-edit-metadata.component.spec.ts#L47
...

A text search on toBeDefined yields 100+ results, so chances are high this issue occurs in other tests as well.

This does seem like an issue, though it may require a more detailed analysis of how many tests have this issue.  Therefore scheduling for 7.1 and adding Estimate TBD

Atmire would like to claim this, it will take an estimate of 3h


PLAT-101081: Fix sync ilib loader on chromium > 79

Checklist

[X] I have read and understand the contribution guide

[X] A CHANGELOG entry is included

[ ] At least one test case is included for this feature or bug fix

[X] Documentation was added or is not needed

[ ] This is an API breaking change

Issue Resolved / Feature Added
Chromium > 79 throws errors on failed synchronous XHR
Resolution
Catch errors and invoke callback

This doesn't appear to be required as expected.