optimise sequencer code

Sequencer optimisations will go in this PR.
@yatli I need a super fast random() function for MDSeqTrack::trig_conditional( .. )

what's the spec?
int prob = 0..100?
boolean out?

This is the code that needs to be optimised.
    uint8_t rnd = random(100);
    switch (condition) {
    case 9:
      if (rnd <= 10) {
        send_trig();
      }
      break;
    case 10:
      if (rnd <= 25) {
        send_trig();
      }
      break;
    case 11:
      if (rnd <= 50) {
        send_trig();
      }
      break;
    case 12:
      if (rnd <= 75) {
        send_trig();
      }
      break;
    case 13:
      if (rnd <= 90) {
        send_trig();
      }

There was a suggestions on the AVR forum to read bytes out of PROGMEM at memory addresses specified by an incremental counter.
We also have:
uint16_t slowclock,
uint16_t clock
uint16_t MidiClock.div16th_counter;
...
uint16_t MidiClock.div192th_counter;
that could be used to add more variation in the samples.

actually before we waste time on this. probably worth checking the performance of the existing random function.
apparently it's apart of avr-stdlib.

avr-libc random implementation: https://github.com/vancegroup-mirrors/avr-libc/blob/master/avr-libc/libc/stdlib/rand.c

It's a linear congruent generator (something that exploits the integer arithmetic group), but highly inefficient on 8-bit avr chips

The alternative, xor-based RNG:
source:
#include <stdlib.h>
#include <stdint.h>
static uint32_t Seed = 1;

static const int TupleA =  5;
static const int TupleB = 17;
static const int TupleC = 13;

unsigned long tc_RandomGenerate_XorShift( void )
{
  uint32_t Y;

  Y = Seed;

  Y = Y ^ (Y << TupleC);
  Y = Y ^ (Y >> TupleB);
  Y = Y ^ (Y << TupleA);

  Seed = Y;

  return( Y );
}

void tc_RandomSeed_XorShift( unsigned long newseed )
{
  if ( newseed != 0 )
    Seed = newseed;
}

output:
__zero_reg__ = 1
tc_RandomGenerate_XorShift():
        push r16
        push r17
        lds r24,Seed
        lds r25,Seed+1
        lds r26,Seed+2
        lds r27,Seed+3
        mov r20,r24
        mov r21,r25
        mov r22,r26
        mov r23,r27
        ldi r18,13
1:      lsl r20
        rol r21
        rol r22
        rol r23
        dec r18
        brne 1b
        eor r20,r24
        eor r21,r25
        eor r22,r26
        eor r23,r27
        mov r27,r23
        mov r26,r22
        mov r25,r21
        mov r24,r20
        ldi r19,17
1:      lsr r27
        ror r26
        ror r25
        ror r24
        dec r19
        brne 1b
        eor r24,r20
        eor r25,r21
        eor r26,r22
        eor r27,r23
        mov r16,r24
        mov r17,r25
        mov r18,r26
        mov r19,r27
        ldi r30,5
1:      lsl r16
        rol r17
        rol r18
        rol r19
        dec r30
        brne 1b
        eor r16,r24
        eor r17,r25
        eor r18,r26
        eor r19,r27
        sts Seed,r16
        sts Seed+1,r17
        sts Seed+2,r18
        sts Seed+3,r19
        mov r22,r16
        mov r23,r17
        mov r24,r18
        mov r25,r19
        pop r17
        pop r16
        ret
tc_RandomSeed_XorShift(unsigned long):
        mov r27,r25
        mov r26,r24
        mov r25,r23
        mov r24,r22
        sbiw r24,0
        cpc r26,__zero_reg__
        cpc r27,__zero_reg__
        breq .L2
        sts Seed,r24
        sts Seed+1,r25
        sts Seed+2,r26
        sts Seed+3,r27
.L2:
        ret
Seed:
        .byte   1
        .byte   0
        .byte   0
        .byte   0

@jmamma the new RNG is in xor_rand.h: tc_RandomGenerate_XorShift.
We can do some tests on it.

if it's not random enough, we can inject some entropy to it by periodically (not necessarily every time) XOR some bits from a dangling ADC channel.

Yes I have been looking at it.
It's nice, but still too many instructions.
--
https://www.avrfreaks.net/forum/very-fastsmall-random-number-generator?page=all
There's a nice 16 instruction asm solution  above ^
Here's my quick hack which generates random number between [0 - 127]:
5  volatile uint8_t *rand_ptr = 0;
6  while (1) {
7      uint8_t r = (pgm_read_byte(rand_ptr++) ^ get_byte_bank1(rand_ptr) ^ slowclock) & 0x7F;
8      DEBUG_PRINTLN(r);
9  }

I've gone and added my hacky random generator.
Probably need to sit down and analyse how random the distribution actually is.

Could this be a good extension point for more kinds of conditional triggers?
Euclid can be inserted right here.
Different RNGs will produce different vibes, I guess.

Too be honest. RNG is fairly uninspiring, musically.
I wonder how euclid would work

Side note: One neat idea I have for pattern variation, is to make pattern lock track length independent from actual track length. You can get some really nice rhythmic behaviour on melodies this way.

Let every track keep its own RNG state (could be seed, or rand_ptr in your RNG).
In each step, we mutate the state, and generate a value.
The value can then be used for a lot of things.
Conditioning is one of them.
Others include random LFO, random ARP, etc.
Also, the mutation algorithm need not to be an RNG.
A euclid pattern generator also fits in here. (Euclid state in, Euclid state + Trigger ON/OFF out)

If you want to explore these ideas, please do.
I am going to finish optimising the sequencer code. Then maybe some GUI optimisations in the GridPage.
Then after that will likely be expanding some sequencer functionality. Thinking about adding pattern resolution for MD tracks, and increasing parameter locks. Both of these changes may affect firmware performance so I need to investigate.

One last thing. For next release I'm contemplating chaining the project / slot schema to incorporate enhancements. I have a lot of good material on the current firmware so i'll need to create an upgrade tool for old projects.

We can probably queue these ideas in the backlog. :)
I can do the ringbuffer refactor.

@yatli Let me know what you think of b28254
Pushing the sequencer code within a single loop so that it doesn't have to call seq() for each track.
Really need a way to bench these.

about benchmarking:
we can use two MC connected head to tail.
one of them acts as the unit test fixture IMachineDrum.

I've just finished relocating to a new apartment. Computers are being unpacked. Gotta clean up the mess this week. :)

we can use two MC connected head to tail.
one of them acts as the unit test fixture IMachineDrum.

Yes, will probably need to create another timer at higher frequency for this and then read one of the digital IO ports.

I've just finished relocating to a new apartment. Computers are being unpacked. Gotta clean up the mess this week. :)

No worries. I got a lot done on the weekend. I think once the ringbuffer refactor is complete  I will merge the low level optimisations and tag for a new release, 2.40
Increasing from 2.3 to 2.4 because of the deprecation of write mode.
We will update the project spec in 2.5 allowing enhancements of the sequencer.

Occurred to me tonight that we can improve the sequencer algorithm for microtiming.
Instead of looping through each track on each div192th clock event.
At every 16th note, we can pre-calculate the two possible microtiming positions and only call seq() for the track if the current clock position matches.

i've merged this branch in to dev


feat: added port in response and fixed response

Thought it would be better if port is returned for testing

Codecov Report

Merging #3 (4857af6) into master (f3e5b28) will decrease coverage by 5.21%.
The diff coverage is 65.21%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
@@            Coverage Diff             @@
##           master       #3      +/-   ##
==========================================
- Coverage   84.24%   79.04%   -5.21%
==========================================
  Files           2        2
  Lines         146      167      +21
  Branches       16       17       +1
==========================================
+ Hits          123      132       +9
- Misses         23       35      +12

Impacted Files
Coverage Δ

deps.ts
100.00% <ø> (ø)

mod.ts
78.39% <65.21%> (-5.18%)
:arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

there's a slight coverage decrease

@talentlessguy any idea how to test this
https://github.com/deno-libs/superfetch/blob/316e16057f79f1ca4464efb6fcac3122cd6afc3b/mod.ts#L16-L22

nevermind, I figured it out. coverage is now 100%


proposed tweaks for GO-space def

I had initially phrased the first two definitions in term of a local base of open nbhds of a point as I was worried it was required.  But it seems that a local base of order-convex nbhds (without requiring open) is good enough.  Please check the section "Alternate characterizations" that I added to https://math.stackexchange.com/questions/4917398 to see if that makes sense.
So given that, I like your more concise phrasing.  Approving this, and letting you merge.

Ah, well, my definition of "local base" is a collection of open sets. :-) I'd use the term "neighborhood base" to describe what I think you're using "local base" to mean: for every neighborhood $N$ of the point $x$, there exists a neigrborhood $M$ of $x$ in the neighborhood base such that $M\subseteq N$. Fortunately, the point is moot here I think.

Yeah, different authors may use different terminology.  "Local base" and "neighborhood base" are synonyms in wikipedia and in Encyclopedia of General Topology (Hart, Nagata, Vaughan eds.).  Willard uses "neighborhood base" and does not use "local base".  But all three mean what you said above (with nbhds not assumed to be open).


Delay when .onKeyEntered/.onKeyExited is triggered

I'm trying to use Geofire to achieve geofencing functionality offered by the Google Awareness fence api
However I'm wondering what's the best way to achieve the equivalant of INITIAL_TRIGGER_DWELL flag, so onKeyEntered is triggered when the point of interest is already inside the radius for certain amount of time.
References:
GeofencingRequest
LocationFence

I don't quite understand what you want to achieve but you could delay the events easily by either posting Runnables into Handlers or using somethings that more sophisticated like RxJava.

Yes @vanniktech is correct, this is outside the scope of this library.  If you want to do advanced accounting like this you can either delay the initial query or build a customized listener to do that work.


Change "docket images" CI/CD task to build for fewer architectures

Requirement
As a developer I like CI/CD runs to take as little time as possible.
Problem
"Build docker images" workflow takes 30min now, because it builds binaries and images for all possible architectues.
Proposal
Consider reducing the number of architectures built for PRs, and only keep the full set for the main branch / release workflow.
Personally I would limit the PR builds to linux/amd86 architecture.
Open questions
No response

Hi @yurishkuro, Could you give a brief about what changes would be a part of this ticket? I am looking to contribute to an issue for my academic requirement. I have already picked https://github.com/jaegertracing/jaeger/issues/4163 and will be working on it this week but the instructor has also mentioned picking something that would require a good amount of time to finish. Will this be a good issue? Or if there is some other issue you can assign me that as well.

@shubbham1215 the change would be mostly refactoring shell scripts / Makefile to pass fewer arch params to the docker build process. Around a week of work, including ramp-up.

good amount of time to finish

what amount of time do you want to allocate?

Okay. I think this issue is fine as it would require me much more than a week to finish it. Could you assign me this as well? Thanks.

Hi @yurishkuro Here is an initialized PR for this issue:
https://github.com/jaegertracing/jaeger/pull/4286
Since I'm pretty new here, would you help with review and let me know if anything you'd like to share?

/assign


[ADD] python oop slides, minor changes

python oop slides
changes authors (not sure if that is necessary)

Ah, yes, will add both.

Thanks


Bulk-delete directory renames

Tests pass, but we need to decide whether we care about the change to semantics: directory renames continue to be non-atomic, but in a whole new way.

Tests pass, but we need to decide whether we care about the change to semantics: directory renames continue to be non-atomic, but in a whole new way.

... so back to draft this PR goes, until we decide whether we actually want it!

  But let's keep the branch!


Add template for regulation-based classification system

https://www.sciencedirect.com/science/article/pii/S0308597X16300197?via%3Dihub
Something not unlike -

See https://github.com/mcclintock-lab/mpa-reg-based-classification.  Should be able to customize the classification for a project if desired.


Add link to more detailed instructions, close #29

Could you actually commit the .gif to git? It could go in book/src/user/, so the docs repo is self-contained

The GIF could be linked near line 32, so Linux users will be likely to see it

Updated PR https://github.com/a-b-street/docs/pull/31


Hamburger hover color

Hi guys,
How do I change the hamburger color on hover? It keeps going to an opacity thing and does not allow me to override the hover state with a background color.
Thanks for your assistance.
Kind regards,
Sanny

Hello Sanny,
You can modify the starting & hover background-color of the hamburger in the CSS .hamburger class.
This seems to do the trick.
Hope it helps.


[QUESTION] Using blendmode with two renderers

Hello,
I currently have an issue with my project.
The context
My 2D game is splitted into two renderers. The first one is the background renderer, it's only drawn once or redrawn sometimes. However, the second one is the "live" renderer - it's rendered at 60 FPS or more (requestAnimationFrame)
I'm using two canvases because the background canvas contains big sprites that doesn't need to be drawn each time and will slow down performance if they are.
The problem
Now I've encountered a problem: I need to use BlendMode  on a sprite in my live renderer, and I need that the blendmode 'applies' with the background canvas.
Example
Here's what's expected :

Here's what I get:

Quick demo illustrating my context: https://codepen.io/anon/pen/xjvPYW
How can I solve this?

You can't. Cache background in RenderTexture instead of second canvas.

put your background into a Container, and render this Container onto a RenderTexture, than use this texture to apply blendmode.

@jcyuan @ivanpopelyshev could you please provide an example?

Hello,
I've created a RenderTexture using PIXI.RenderTexture.create(this.Renderer.width, this.Renderer.height)
I also have a container which contain all my static sprites that can be accessed under the name this.Stage2
Now, how can I draw my container (stage2) into the rendertexture? Thanks

renderer.render(stage2, renderTexture)

@Mikael295 closing this as it seems answered. If you need anymore help, just ask :)


Hard coded AWS Regions

Within the Jenkins lab (https://www.eksworkshop.com/intermediate/210_jenkins/codecommit/) , there is a hardcode of US-WEST-2.
git clone codecommit::us-west-2://eksworkshop-app
This errors out when using US-EAST-2 but is fixed when the command is changed to the below.
git clone://eksworkshop-app
Additionally, within the Pod Affinity section (https://www.eksworkshop.com/beginner/140_assigning_pods/affinity/),
The first command of us-west-2 causes confusion if just immediately copied:
kubectl label nodes ip-192-168-15-64.us-west-2.compute.internal azname=az1
Use of the below can be clearer for users:
kubectl label nodes <node-name> azname=az1

That you for reporting the issue, a PR will be ready later this week


refator(recursive): read old proofs from a list

Codecov Report

Merging #91 (4ff5d12) into master (60197d4) will increase coverage by 0.50%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master      #91      +/-   ##
==========================================
+ Coverage   52.86%   53.37%   +0.50%
==========================================
  Files           9        9
  Lines         524      519       -5
==========================================
  Hits          277      277
+ Misses        247      242       -5

Impacted Files
Coverage Δ

src/reader.rs
34.82% <0.00%> (+1.48%)
:arrow_up:

Continue to review full report at Codecov.

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


[FEAT] allow destroying the sheet if it's out of the DOM

What are you trying to add to Cupertino-Pane?
I want to be able to destroy a sheet if it's out of the DOM
Describe your feature request detailed
I have situations where a sheet is not in the DOM because I've moved one of its ancestors out of the DOM (to restore it later). However I may need to .destroy() the sheet before I restore the ancestor. In this scenario, this check fails and prevents the sheet from being destroyed. I want to be able to .destroy() the sheet successfully even when it's attached to a node that is not currently in the DOM. To put it simply, imagine that the sheet is a child of a node called .sheet-parent. Sometimes I remove .sheet-parent from the DOM (but it's saved in a variable so I can restore it later), which causes the sheet to also be removed from the DOM. If I call sheet.destroy() when .sheet-parent is out of the DOM, then the check fails and the sheet is not destroyed. I want to be able to destroy the sheet regardless.
Is there an alternative at the latest version?
[ ] Yes (descripe the alternative)
[x] No
Is this related to an issue?
[ ] Yes (Give a link to the issue)
[x] No

Hello @CodeWithOz
Please show how do you copy DOM element before remove it from DOM. If you are just move it to other place, it is one case, but if you make object copy, then you remove DOM element with .remove(), you might lose your angular callbacks and event on copied elements.
Show me simple example, i will try it.

Hey @roman-rr so what I do is something like this (very simplified):
document.body.insertAdjacentHTML('beforeend', '

Contents

');
const sheetContainer = document.querySelector('.sheet-container');
const sheet = new CupertinoPane('.sheet-node', { ... });
sheet.present({ animate: true });

// remove the sheet container 3s later
setTimeout(() => {
  // now remove the sheet container from the DOM
  sheetContainer.parentNode.removeChild(sheetContainer);
}, 3000);

// try to destroy the sheet 5s later
setTimeout(() => {
  // .sheet-node is not in the DOM because its parent has been removed
  sheet.destroy(); // outputs "Cupertino Pane: Present pane before call destroy()"
}, 5000);

// restore .sheet-container to the DOM 7s later because I want to use it for something else
setTimeout(() => {
  document.body.append(sheetContainer);
  // the sheet is still present because .sheet-node is still a child of .sheet-container even though I tried to remove it
}, 7000);

Essentially, this check fails because it uses document.querySelectorAll(...). In my example, .sheet-node is not in the DOM so document.querySelectorAll will not find it.

Hello @CodeWithOz
Sorry for delay, should works now!


Add Mojo Language

Mojo Language now gets C style /**/ comments. It would be nice to have the correct Python style # comments.

Feel free to post a PR. A link to documentation will expedite it getting included.

Hi Caleb:
Adding it was trivial. Now if I can figure out how to post the update I'll
be a happy man...
-- John
On Sun, Jul 7, 2024 at 4:18 PM Caleb Maclennan @.***>
wrote:

Feel free to post a PR. A link to documentation will expedite it getting
included.
—
Reply to this email directly, view it on GitHub
https://github.com/preservim/nerdcommenter/issues/534#issuecomment-2212559588,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABXESEWN6CCJHSER5D63DLDZLGPBZAVCNFSM6AAAAABKPOSKC6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEMJSGU2TSNJYHA
.
You are receiving this because you authored the thread.Message ID:
@.***>


[hotfix] fix tp latency

📌 Checklist before creating the PR

[ ] I have created an issue for this PR for traceability
[ ] The title follows the standard format: [doc/gemini/tensor/...]: A concise description
[ ] I have added relevant tags if possible for us to better distinguish different PRs

🚨 Issue number

Link this PR to your issue with words like fixed to automatically close the linked issue upon merge
e.g. fixed #1234, closed #1234, resolved #1234

📝 What does this PR do?

Summarize your work here.
if you have any plots/diagrams/screenshots/tables, please attach them here.
Fix some bugs that will slow down tp inference

💥 Checklist before requesting a review

[ ] I have linked my PR to an issue (instruction)
[ ] My issue clearly describes the problem/feature/proposal, with diagrams/charts/table/code if possible
[ ] I have performed a self-review of my code
[ ] I have added thorough tests.
[ ] I have added docstrings for all the functions/methods I implemented

⭐ Do you enjoy contributing to Colossal-AI?

[x] 🌝 Yes, I do.
[ ] 🌚 No, I don't.

Tell us more if you don't enjoy contributing to Colossal-AI.

Don't hack pipeline. For non-pipeline case, we'd better remove pipeline related logic

I'll change this logic


Add UTF-8 encoding to CsvWriter

When creating a csv file, UTF-8 encoded strings aren't supported in Excel without "chr(0xEF) . chr(0xBB) . chr(0xBF)" at the beginning of the file.
Example with french words :
$writer = new CsvWriter(';', '"', null, true);
$writer->writeItem(array('Précédent', 'Suivant'));
$writer->finish();

Question : In the CsvWriter constructor, why is the stream in the third position? In ArrayWriter and ExcelWriter the output is the first parameter.

@mRoca Thank you for your contribution


Fix path-related deprecation warnings

Looks like I missed a few here.

@swift-ci please smoke test

@swift-ci please smoke test Windows

@swift-ci please smoke test Windows

Don't understand how the Windows failure is related to my changes, but it seems consistent

Merging since the required tests pass. @compnerd the Windows failure looks like a compiler crash (Swift compiler).

@abertelrud please consider the Windows tests as required.  The SILOpt issue was fixed as of this morning and more regressions have crept into swift-syntax and sourcekit-lsp because people were ignoring the checks.
CC: @tomerd @shahmishal
@shahmishal can we mark the windows tests as blocking?


Add reconcile annotation for extensions

What this PR does / why we need it:
This PR makes Gardener add gardener.cloud/operation: reconcile for the following resources:

controlplane
extension
infrastructure
operatingsystemconfig
worker

Extension controllers are supposed to only reconcile when gardener.cloud/operation: reconcile is set on the affected resource. With that in place, Gardener still controls the reconciliation of each piece in the Shoot control flow.
Release note:

Gardener now instructs extension controllers when they are supposed to reconcile `ControlPlane`, `Extension`, `Infrastructure`, `OperatingSystemConfig` and `Worker` resources by annotating them with `gardener.cloud/operation=reconcile`.

I'm currently testing https://github.com/gardener/gardener-extensions/pull/178 which this PR depends on. As soon as https://github.com/gardener/gardener-extensions/pull/178 is ready, we can merge this PR as well.

@rfranzke can you please check again?
If you want to test it, you can use tag sha256:006910f3e3704497a2b1c41d7fc3f74c3a6c6c3f251a0cd7e34ccefa8fad386c of Gardener-Extensions.

Thanks for your review @rfranzke. PTAL.


Does not work

it can't to connect with real password. i'am using tor for try your script

Thanks for letting me it right bac with u


[Things] ... Show Today's List opens Things

Extension
https://www.raycast.com/loris/things
Description
Show Today's List opens Things application in the background while Raycast loads, Raycast still shows the list from Today, not sure if that's expected behavior.
Steps To Reproduce
Restarted the application multiple times, if the application is opened in the background Raycast load the list faster, otherwise it opens the application.
Current Behaviour
No response
Expected Behaviour
No response

Hi @alwinsamson let me know if I understood your issue right, but this is working as expected indeed: Things exposes its data using an Apple Script API, which requires the Things app to be opened in background.
The fact that you already see some data while the Things app is still loading is because the extension cache previously loaded data for providing a more responsive experience

@alwinsamson That's a subjective question, but I personally (and I believe many Raycast users) find it more efficient and productive to control some (running) apps within Raycast and avoid context switching: Things, Spotify, Safari, etc

@loris I appreciate your explanation; Previously, I had assumed there might be an alternative method or that the background opening of Things was unintended behavior. Thank you for providing clarity.


chore: add rabobank to adopters and vertical page

This PR adds Rabobank to the financial services vertical page and the adopters page

Can you also add to https://cilium.io/use-cases/network-policy/?

Alright, will make the updates and revert.
On Feb 9, 2024 at 3:47 PM +0100, Bill Mulligan @.***>, wrote:

Can you also add to https://cilium.io/use-cases/network-policy/?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: @.***>

Updated @xmulligan

updated


[BUG] topi.cuda.conv2d_winograd.winograd_cuda() not working when pre_computed=True

topi.cuda.conv2d_winograd.winograd_cuda() get wrong kernel_pack shape and throw exceptions when pre_computed=True

can you provide a script to reproduce?

    N, CI, H, W = 64, 3, 229, 229
    CO, KH, KW = 32, 3, 3
    stride, padding = 1, 1
    data = tvm.placeholder((N, CI, H, W), name='data')
    kernel = tvm.placeholder((CO, CI, KH, KW), name='kernel')
    cfg = autotvm.get_config()
    winograd_conv = topi.cuda.conv2d_winograd.winograd_cuda(cfg, data, kernel, (stride, stride), (padding, padding), dilation=1, layout='NCHW', out_dtype='float32', pre_computed=True)
    s = tvm.create_schedule([winograd_conv.op])
    topi.cuda.conv2d.schedule_winograd_cuda(cfg, s, winograd_conv.op.output(0), pre_computed=True)

pre_computed is not expected to be used in this way, it is called by Relay which run AlterOpLayout pass to change the layout. In your case, you should either set pre_computed should be False or use precomputed weight for the input

@vinx13 I think earlier version doesn't have this issue.

It is a status after v0.5 and before v0.6, but not able to find it easily now.

@ghostplant even if a previous version didn't emit error, the result was likely not correct. If pre_computed = True, the kernel shape shouldn't be (CO, CI, KH, KW), so the error message is correct.

Closing as it is not a bug


Documentation missing to backup & restore a Uptime-Kuma instance between different servers

⚠ Please verify that this bug has NOT been raised before.

[X] I checked and didn't find similar issue

🛡 Security Policy

[X] I agree to have read this project Security Policy

Description
Documentation is curently missing to backup & restore a Uptime-Kuma instance between different servers
👟 Reproduction steps
Read description
👀 Expected behavior
Read description
😓 Actual Behavior
Read description
🐻 Uptime-Kuma Version
N/A
💻 Operating System and Arch
N/A
🌐 Browser
N/A
🐋 Docker Version
N/A
🟩 NodeJS Version
N/A
📝 Relevant log output
N/A

Just backup your docker volume.

I don't know what we would write in this documentation.

When copying the data folder over to a different persistent volume (and different kuma container), I get SQLITE_CORRUPT.
I for one would really like to see the backup function brought back to full-glory, but that'd probably be fit for a separate issue.

For the backup functionality see this PR: https://github.com/louislam/uptime-kuma/pull/2667
=> It is essentially missing a way to test if the functionality works and won't magically break in the future. If you are more proficient in writing tests, help in this department would be appreciated.
about SQLITE_CORRUPT: This means that the data got corrupted on the way to the new location. This can happen due to multiple reasons (network-deamons, bit-flips, ..) but what I would suspect is that you did not shut down both instances before taking a copy.
Since you are talking about PVCs: Could you please read through this https://github.com/louislam/uptime-kuma/issues/2668 and make sure that you are not using an unsupported filesystem?

For the backup functionality see this PR: Fix: Update json backup tool for new features #2667
=> It is essentially missing a way to test if the functionality works and won't magically break in the future. If you are more proficient in writing tests, help in this department would be appreciated.
I found this an hour or so after posting; I wish I were versed in JS or Vue. I'd definitely be willing to if I were.

This means that the data got corrupted on the way to the new location.
It's very believable; I'm doing a weird operation in moving the container from AKS into Az Container Apps.
I think simply downloading a (detached) VHD and re-uploading the contents would be ok, though.

Since you are talking about PVCs: Could you please read through this Any specific reason why uptime-kuma does not support NFS file systems #2668 and make sure that you are not using an unsupported filesystem?
Funny enough, I'm pretty sure the source is NFS (I remember it being quite a battle). The destination is definitely ok, though.

I think my topic is a bit out of the scope of this issue- I'll follow up on more closely related ones (or new) if I can't figure this out.


Unexpected error; java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 8193

Description
The game crashes when I get somewhere within 30 or so blocks of a nearby forest or any type of biome that has trees in it.
To Reproduce
Steps to reproduce the behavior: Just install Dynamic Trees and Rubidium, make a new world and explore it till you find a biome that has alot of trees until a few minutes later or if you spawn in a forested biome then just wait for a few minutes and the game crashes.
Rendering Glitches
I'm using Rubidium, not the piece of trash Optifine!
Also during gameplay before the crashes occured I hadn't seen or experienced any graphical glitches, thankfully..
Additional context
I think that it's possibly being caused by Rubidium because when I looked at the crash reports and the logs and they're screaming Rubidium's name and I'm totally NOT gonna use OptiFine EVER AGAIN 'cause I've been told that OptiFine might cause world corruption since OptiFine touches places where no mod shall ever touch nor go, meaning that OptiFine actually touches the actual base coding of the game itself to try to improve the game's overall performance!!! Also Rubidium is the replacement for OptiFine as of actually boosting the game's overall performance.
Even though this report relates to Rubidium more than Dynamic Trees but why I made this report is 'cause I've restarted my modded play through with a new world called Cora World Redo (R.W.R) for 1.18.2 but this time without Dynamic Trees and the game hasn't crashed ever again which means that either Rubidium doesn't like Dynamic Trees or Dynamic Trees doesn't like Rubidium...
Crashes
Crash Report: https://gist.github.com/Coraline774477/c63f9160cb472bdd90ad252e2ea88157
Log: https://gist.github.com/Coraline774477/44c2ee5358708c3f4eb90cea48067469
Versions

Rubidium: 0.5.3a
Dynamic Trees: 0.11.0-Alpha2
Forge: 40.1.76
Java: Java 17
OS: Windows 10 Home

One last thing; I originally wanted to play with Dynamic Trees again but in 1.18.2, since for me it's been awhile 'cause the last time I've played with Dynamic Trees that I had to stop playing with the mod 'cause of the OpenGL error that I always kept getting when I used to use OptiFine in 1.16.5 whenever I went into a Roofed Forest biome*..
I had made a report about that on here which I do believe that that issue that I had experienced at the time in 1.16.5 hasn't been resolved...
I always liked how the trees of both vanilla minecraft as well as modded minecraft looks than how they normally look like (I still like how they normally look but how the trees looks like when Dynamic Trees is installed looks way better though!..)
Btw Dynamic Trees just can't catch a break from performance rendering mods such as OptiFine and Rubidium, does it?..

*How I remember all of that is 'cause I'm Coraline77447, the one who've reported that issue report a few years ago. My old GitHub account (Coraline77447) that I've created with the email address that I used got hacked a few months ago and lost any accounts that I've made with that email address which means that I've lost my old GitHub account since the hacker made sure that I would never be able to get the email address back by moving the email address onto their device instead of letting it remain on mine....

UPDATE: I'm currently using OptiFine again due to Rubidium having some issues with itself as of it's arrays, since I've gotten tired of my game crashing randomly by Rubidium, so for the time being till the author of Rubidium actually fixes all (and I mean ALL) of their arrays in Rubidium's code I'm currently using OptiFine again even tho I dislike OptiFine nowsdays....

UPDATE: Rubidium 1.18.2 had an update three days ago with a possible fix to the ArrayIndexOutOfBoundsException in Rubidium 1.18.2 0.5.4 BUT I'm keeping this report open just in case Rubisium crashes with Dynamic Trees (1.18.2) again.
On  a side note, in the logs I'm getting errors from Dynamic Trees and they're spamming the logs (as well as the console I believe) with some of the block models of rooted dirt apparentlly...
Unfortunately I can't really restart two of my 1.18.2 modded worlds since I can't just take out Dynamic Trees 'cause of it's current issues since the mod's currently in beta for 1.18.2 since I've already restarted those two worlds multiple times now that I'm not willing to restart again due to the removal of Dynamic Trees...
But if and when I do make any more 1.18.2 worlds they'll not have this mod installed because of it's current issues and that it's issues are spammy and I don't like spammy errors and I don't believe that D.T supports The Twilight Forest's trees let alone t.t.f's MASSIVE tree that's bigger than BOP's redwoods and fers....


Upgrade Jasmine to 2.x

This means:

Adapting to the API changes (the only change that seems relevant to us is the new custom matcher definition syntax).
Replacing the jasmine-node Node.js module with the official jasmine module, adapting the tests as needed.
Updating the vendored version for browser testing, possibly also adapting spec/index.html.

Jasmine version used in Node.js and the vendored version should match exactly after the upgrade.

Actually, let’s switch to Mocha/Chai instead.


Support for ext. Wpf Toolkit Controls

fixes #30

Maybe you canlook after merge:
I think the Controls should stretch, but I'm not sure what look and feel Standart should be!
And should the Cells be Editable only when Editmode is active?
Look and change how you like!

It would also be great to have it included in the appveyor solution!

And a new NuGet package. Simply create the .nuspec and update appveyor.yml

I've Updated.
Also I fixed the AppVeyor Solution!
For the Nuspec. To fix it, I first need to create a Nuget for the modified Extened WPF Toolkit which I use (https://github.com/dotnetprojects/WpfExToolkit)
I use this one (it's from me), because the original one has some Bug's not fixed, and this one also has a few Additional Controls (BrushEditor, TokenizedTextBox,...)

I've not had had time to fix this yet, but it's not forgotten!

This PR is outdated - please reopen this PR or create a new PR when the feature is ready! :+1: :smiley:

I've created a Nuget yesterday! Can you open the Pull Req again, I can't do it!

I create a new One!!!


No Metadata Classes to process.

Hello,
I keep getting the following message when I run:  bin/console orm:schema-tool:create

No Metadata Classes to process.

What am I doing wrong?
Steps to reproduce:

clone the packages repository
go inside the repository
run composer install
copy config.yml.dist to config.yml
edit config.yml
run bin/console orm:schema-tool:create

I even skipped editing of config.yml and tried to use default values and still the same error.
Best regards,
Vladimir

Hi Vladimir, thanks for opening an issue!
I followed the steps as you outlined and I'm able to run the bin/console orm:schema-tool:create command successfully.
Could you provide me with the version of PHP you're using? Could you also run bin/console with the --verbose flag enabled (so bin/console orm:schema-tool:create --verbose), then provide me the stack trace?
Thanks!

I'm closing this since it's been inactive for quite a while now. Please open a new issue if this error is still occurring. Thanks again!


When running scene-graph-tf : TypeError: int returned non-int (type NoneType)

When I follow the introduction and run the test demo :
./experiments/scripts/test.sh mini-vg -1
dual_graph_vrd_final 2
checkpoints/dual_graph_vrd_final_iter2.ckpt
viz_cls
0
I meet with the error : "TypeError: int returned non-int (type NoneType) "
Here is the log, Are there any friends who can help?
./experiments/scripts/test.sh mini-vg -1 dual_graph_vrd_final 2 checkpoints/dual_graph_vrd_final_iter2.ckpt viz_cls 0
++ set -e
++ export PYTHONUNBUFFERED=True
++ PYTHONUNBUFFERED=True
++ DATASET=mini-vg
++ NUM_IM=-1
++ NET=dual_graph_vrd_final
++ INFERENCE_ITER=2
++ WEIGHT_FN=checkpoints/dual_graph_vrd_final_iter2.ckpt
++ TEST_MODE=viz_cls
++ GPU_ID=0
++ CFG_FILE=experiments/cfgs/sparse_graph.yml
++ case $DATASET in
++ ROIDB=mini_VG-SGG
++ RPNDB=mini_proposals
++ IMDB=mini_imdb_1024
++ export CUDA_VISIBLE_DEVICES=0
++ CUDA_VISIBLE_DEVICES=0
++ python ./tools/test_net.py --gpu 0 --weights checkpoints/dual_graph_vrd_final_iter2.ckpt --imdb mini_imdb_1024.h5 --roidb mini_VG-SGG --rpndb mini_proposals.h5 --cfg experiments/cfgs/sparse_graph.yml --network dual_graph_vrd_final --inference_iter 2 --test_size -1 --test_mode viz_cls
Called with args:
Namespace(cfg_file='experiments/cfgs/sparse_graph.yml', gpu_id=0, imdb='mini_imdb_1024.h5', inference_iter=2, model='checkpoints/dual_graph_vrd_final_iter2.ckpt', network_name='dual_graph_vrd_final', output_dir=None, roidb='mini_VG-SGG', rpndb='mini_proposals.h5', test_mode='viz_cls', test_size=-1, wait=True)
Using config:
{'DATA_DIR': '/share/UserFolder/zhpe/scene-graph-TF-release-master/data',
'DEDUP_BOXES': 0.0625,
'EPS': 1e-14,
'GPU_ID': 0,
'PIXEL_MEANS': array([[[ 102.9801,  115.9465,  122.7717]]]),
'RNG_SEED': 3,
'ROOT_DIR': '/share/UserFolder/zhpe/scene-graph-TF-release-master',
'TEST': {'BBOX_REG': True,
'FG_THRESH': 0.5,
'HAS_RPN': False,
'INFERENCE_ITER': 2,
'MAX_SIZE': 1000,
'NUM_PROPOSALS': 50,
'PROPOSAL_NMS': 0.3,
'SCALES': [600],
'USE_RPN_DB': True},
'TRAIN': {'ASPECT_GROUPING': True,
'BATCH_SIZE': 256,
'BBOX_INSIDE_WEIGHTS': [1.0, 1.0, 1.0, 1.0],
'BBOX_NORMALIZE_MEANS': [0.0, 0.0, 0.0, 0.0],
'BBOX_NORMALIZE_STDS': [0.1, 0.1, 0.2, 0.2],
'BBOX_NORMALIZE_TARGETS': True,
'BBOX_NORMALIZE_TARGETS_PRECOMPUTED': False,
'BBOX_REG': True,
'BBOX_TARGET_NORMALIZATION_FILE': 'data/vg/bbox_distribution.npy',
'BBOX_THRESH': 0.5,
'BG_THRESH_HI': 0.5,
'BG_THRESH_LO': 0.1,
'DISPLAY_FREQ': 10,
'FG_FRACTION': 0.5,
'FG_THRESH': 0.5,
'GAMMA': 0.1,
'IMS_PER_BATCH': 2,
'LEARNING_RATE': 0.001,
'MAX_SIZE': 1000,
'MOMENTUM': 0.9,
'NUM_NEG_RELS': 128,
'SCALES': [600],
'SNAPSHOT_FREQ': 50000,
'SNAPSHOT_INFIX': '',
'SNAPSHOT_PREFIX': '',
'STEPSIZE': 50000,
'SUMMARY_FREQ': 250,
'USE_FLIPPED': True,
'USE_RPN_DB': True},
'VG_DIR': '/share/UserFolder/zhpe/scene-graph-TF-release-master/data/vg'}
/gpu:0
split==2
2017-09-17 16:20:56.154149: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations.
2017-09-17 16:20:56.154186: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations.
2017-09-17 16:20:56.154194: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations.
2017-09-17 16:20:56.154200: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations.
2017-09-17 16:20:56.154206: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
2017-09-17 16:20:57.936868: I tensorflow/core/common_runtime/gpu/gpu_device.cc:940] Found device 0 with properties:
name: TITAN X (Pascal)
major: 6 minor: 1 memoryClockRate (GHz) 1.531
pciBusID 0000:02:00.0
Total memory: 11.90GiB
Free memory: 11.75GiB
2017-09-17 16:20:57.936961: I tensorflow/core/common_runtime/gpu/gpu_device.cc:961] DMA: 0
2017-09-17 16:20:57.936981: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0:   Y
2017-09-17 16:20:57.937028: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1030] Creating TensorFlow device (/gpu:0) -> (device: 0, name: TITAN X (Pascal), pci bus id: 0000:02:00.0)
Tensor("ims:0", shape=(?, ?, ?, 3), dtype=float32)
Tensor("conv_out:0", shape=(?, ?, ?, 512), dtype=float32)
Tensor("rois:0", shape=(?, 5), dtype=float32)
[<tf.Tensor 'conv_out:0' shape=(?, ?, ?, 512) dtype=float32>, <tf.Tensor 'rois:0' shape=(?, 5) dtype=float32>]

Traceback (most recent call last):
File "./tools/test_net.py", line 91, in
viz_net(args.network_name, args.model, imdb, args.test_mode)
File "/share/UserFolder/zhpe/scene-graph-TF-release-master/tools/../lib/fast_rcnn/visualize.py", line 111, in viz_net
net.setup()
File "/share/UserFolder/zhpe/scene-graph-TF-release-master/tools/../lib/networks/models.py", line 179, in setup
self._vgg_fc()
File "/share/UserFolder/zhpe/scene-graph-TF-release-master/tools/../lib/networks/models.py", line 58, in _vgg_fc
.fc(4096, name='fc6')
File "/share/UserFolder/zhpe/scene-graph-TF-release-master/tools/../lib/networks/network.py", line 25, in layer_decorated
layer_output = op(self, layer_input, *args, **kwargs)
File "/share/UserFolder/zhpe/scene-graph-TF-release-master/tools/../lib/networks/network.py", line 222, in fc
feed_in, dim = (input, int(input_shape[-1]))
TypeError: int returned non-int (type NoneType)

The version of my tensorflow is 1.2.1.
I have followed the suggestion #1  to fix the error "ops.RegisterShape rather than tf.RegisterShape in roi_pooling_op_grad.py"

I have solved it by lowering the version of tensorflow

how to lower the type of tf?
besides this,other ways to solve thin problem?


[WIP] An attempt to get rid of GetClosestMetadataType

I'm starting to feel like getting rid of GetClosestMetadataType is not feasible.
Things looked good until I found out (the hard way) that there are a bunch of places that use .OwningType on the various virtual methods and make decision based on that. Since the owning type is still ArrayOfT, things didn't work out so great.
That's when I came up with the monster that is ReparentedMethodDesc. How much do y'all hate it?

@davidwrighton @jkotas How much do you hate it?

So... its gross, but it does do what I want. Honestly, I'm a bit conflicted.

The re-parented methoddesc does not feel right. Could you please give me a good example of place that depends on the .OwningType ?

Could you please give me a good example of place that depends on the  .OwningType

Here is an easy one, that can be worked around by introducing a weirdo higher level API:
https://github.com/dotnet/corert/blob/7f703500e8462ae7f99b93f26c20b7c27097e1f6/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/EETypeNode.cs#L238
And this one is more unfortunate: https://github.com/dotnet/corert/blob/7f703500e8462ae7f99b93f26c20b7c27097e1f6/src/ILCompiler.Compiler/src/Compiler/DependencyAnalysis/VirtualMethodUseNode.cs#L37
There might be more. I gave up trying to patch up the abstraction leaks after the second one.

The virtual method resolution should be free to return any method - same as ICastable at runtime.
It is somewhere between hard and impossible to make EEType vtable building work with this general contract. I think it is fine to hardcode special cases into EEType vtable building for arrays, or for other potential irregular ICastable-like cases. This would be my solution to your first example - special case the code for IsArray and be done with it. More general approach would be to always give up building vtable slots for any irregular cases and deal with them at runtime via ICastable, but it is a bit more invasive change.
Your second example deals with decls, not impls, so it should work just file - I do not see a problem with it.

Your second example deals with decls, not impls, so it should work just file - I do not see a problem with it

Maybe it was this one then. I didn't investigate because having the owning type wrong didn't look great either.
https://github.com/dotnet/corert/blob/7f703500e8462ae7f99b93f26c20b7c27097e1f6/src/ILCompiler.Compiler/src/Compiler/VirtualMethodCallHelper.cs#L18

It is somewhere between hard and impossible to make EEType vtable building work with this general contract

That means we will special case:

Arrays
Delegates
Value types
Attributes
...

The reparented method desc might be gross, but it keeps the knowledge of these things confined to the algorithms and nothing else needs to know about them.

Instead ReparentedMethodDesc, would be sufficient to introduce a helper struct like this - that would be used within the vtable layout instead MethodDesc?
struct ResolvedVirtualMethod
{
TypeDesc OwningType;
MethodDesc Target;
}

I think its a much cleaner solution than the ReparentedMethodDesc, but I worry about downstream affects. I worry we could end up with a stream of random extra functionality tacked onto that ResolvedVirtualMethod struct, but I dunno.

Okay, added an attempt at ResolvedVirtualMethod that doesn't work.
The problem is that even I can't wrap my head around when to use it, who should construct it, and what should be the owning type. It feels way convoluted, but maybe just because I don't get it.

As you say... that doesn't actually look cleaner.


Window resize drag location is inside the window

Tested in Ubuntu 20.04.3 LTS.
The borders used for resizing the window are inside the window so any widget which is near the edges of the window can't interact with mouse events.
The window should be re-sizable only when the mouse is near but outside of the visible window.

So, @j787701730  is actually moving in the right direction here. @shujaatak the fix is below
tl;dr : scroll down for the fix, window is big and we make window smaller
The Explination
The red border on this image are the areas where the resizing cursor is displayed (Currently inside the application)

Since that is currently inside the application, we need a way to move it out. Well, you cant really extend the window out past its original size without just making the window larger itself, and by doing that you continue to resize WM_NCHITTEST as well.
The way to fix this is by editing NCCALCSIZE_PARAMS from lparam.
What this essentially does is make the acutal window smaller, and creates an invisible area around the window which is used to scale the application. It's similar to WS_THICKFRAME from: https://docs.microsoft.com/en-us/windows/win32/winmsg/window-styles
The Fix
Inside of bitsdojo_window.cpp, similar to how @shujaatak was explaining, you should edit it as such(notice the + and - 9)
        if (pt.x < resizeMargin - 9)
        {
            return HTLEFT;
        }
        if (pt.x > (rc.right - resizeMargin + 9))
        {
            return HTRIGHT;
        }

also, inside the handle_nccalcsize method add the following code underneath params->rgrc[0].top -= 1; which is in the methods last else statement
params->rgrc[0].left += 8;
params->rgrc[0].right -= 8;

Adding this in resolves the issue mentioned:

Small issues
This will not fix resizing for the top/ bottom/corners since I didn't change the HTBOTTOM and HTTOP. I am however confident that with the information I've provided you will be able to figure out the rest. You will also have to modify params->rgrc[0].bottom -= 8; to get the bottom to work.
I would like to mention that if you modify params->rgrc[0].top -= 1; to be larger, you will start to see the origional windows: minimize, maximize, and close buttons. I know that WS_POPUP removes the frame but haven't messed around with it. You would add styles like that to this line: style = style | WS_CLIPCHILDREN | WS_POPUP;
For me, there is a 1px padding on the right hand side of the window between the window buttons and the edge of the window(Not seen in the above gif because it goes away when the window isn't active) . This is due to incorrect sizing (the hardcoded ints: 8 and 9). What we should really be doing here is scaling the NCCALCSIZE_PARAMS off of the DPI.
Good luck!

@hBurt What an awesome comment! I would definitely try your suggestions soon!

@hBurt I wonder if your solution produces the window frame shadow too?

My solution:
# bitsdojo_window/bitsdojo_window_windows/windows/bitsdojo_window.cpp
@@ -150,8 +150,14 @@
         DwmExtendFrameIntoClientArea(hwnd, &margins);
     }

+    double getScaleFactor(HWND window) {
+        UINT dpi = GetDpiForWindow(window);
+        return dpi / 96.0;
+    }
+
     LRESULT handle_nchittest(HWND window, WPARAM wparam, LPARAM lparam)
     {
+        double scaleFactor = getScaleFactor(window);
         bool isMaximized = IsZoomed(flutter_window);
         if (isMaximized)
             return HTCLIENT;
@@ -162,33 +168,33 @@
         int resizeMargin = getResizeMargin(window);
         if (pt.y < resizeMargin)
         {
-            if (pt.x < resizeMargin)
+            if (pt.x < resizeMargin - (int)ceil(scaleFactor * 5))
             {
                 return HTTOPLEFT;
             }
-            if (pt.x > (rc.right - resizeMargin))
+            if (pt.x > (rc.right - resizeMargin + (int)ceil(scaleFactor * 5)))
             {
                 return HTTOPRIGHT;
             }
             return HTTOP;
         }
-        if (pt.y > (rc.bottom - resizeMargin))
+        if (pt.y > (rc.bottom - resizeMargin + (int)ceil(scaleFactor * 7)))
         {
-            if (pt.x < resizeMargin)
+            if (pt.x < resizeMargin - (int)ceil(scaleFactor * 5))
             {
                 return HTBOTTOMLEFT;
             }
-            if (pt.x > (rc.right - resizeMargin))
+            if (pt.x > (rc.right - resizeMargin + (int)ceil(scaleFactor * 5)))
             {
                 return HTBOTTOMRIGHT;
             }
             return HTBOTTOM;
         }
-        if (pt.x < resizeMargin)
+        if (pt.x < resizeMargin - (int)ceil(scaleFactor * 5))
         {
             return HTLEFT;
         }
-        if (pt.x > (rc.right - resizeMargin))
+        if (pt.x > (rc.right - resizeMargin + (int)ceil(scaleFactor * 5)))
         {
             return HTRIGHT;
         }
@@ -250,11 +256,6 @@
         }
     }

-    double getScaleFactor(HWND window) {
-        UINT dpi = GetDpiForWindow(window);
-        return dpi / 96.0;
-    }
-
     LRESULT handle_nccalcsize(HWND window, WPARAM wparam, LPARAM lparam)
     {
         auto params = reinterpret_cast<NCCALCSIZE_PARAMS*>(lparam);
@@ -286,7 +287,10 @@
         }
         else
         {
-            params->rgrc[0].top -= 1;
+            params->rgrc[0].top -= (int)ceil(scaleFactor * 1);
+            params->rgrc[0].bottom -= (int)ceil(scaleFactor * 6);
+            params->rgrc[0].left += (int)ceil(scaleFactor * 4);
+            params->rgrc[0].right -= (int)ceil(scaleFactor * 4);
         }

         return 0;

@PeterNjeim, in your implementation there was still a white border around the app which looked bad in dark-mode.
I have raised #139, looking for any review.

I have raised #139, looking for any review.


unzip: command not found

Describe the bug
Unzipping v118 (and probably any other version) makes murkmod fail
To Reproduce
Steps to reproduce the behavior:

Run 'bash <(curl -SLk https://bit.ly/murkmod)'
Click on 4
wait until unzipping file
See error

Expected behavior
Murkmod fails installation.
Screenshots

System (please complete the following information):

Board octopus
Version v118
Installation method used devmode installer

Additional context
i tried using chromebrew but it just deleted itself because it doesn't work on root.

found out you had to do it un enrolled


Improve management of fullscreen feature in mobile devices

When running in a mobile devices, switch to fullscreen mode should rotate the screen automatically.

Fullscreen capabilities have been improved in version 0.0.4.

Right stats position fixed on fullscreen.
Fullscreen mode now works fine for any video aspect ratio.

Still working on autoset screen orientation when entering in fullscreen on mobile devices (https://developer.mozilla.org/en-US/docs/Web/API/Screen/lockOrientation).

Released with version 0.0.5.


Close account page - make placeholder static, render primary login in text above input

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Action Performed:

Open app
Navigate to Settings>Security>Close Account
Check Close Button

Expected Result:
Placeholder text should be fully visible or wrapped
Actual Result:
If Email is big, label is wrapped in multiple lines or partially hidden
Workaround:
unknown
Platform:

Where is this issue occurring?

Web
iOS
Android
Desktop App
Mobile Web

Version Number: 1.1.32-0
Reproducible in staging?: Y
Reproducible in production?: Y
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

Expensify/Expensify Issue URL:
Issue reported by: @parasharrajat
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1642208513475800
View all open jobs on GitHub

Triggered auto assignment to @ntrepanier (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

Proposal
proposing early as I reported it.

First we should trim the long label with ellipsis by default for all inputs. TextInput component is designed to have only a single-line label.
https://github.com/Expensify/App/blob/921fa4fe4a3f36fb332b9e5c854771bec5bfe063/src/components/TextInput/TextInputLabel/index.js#L16-L20.

we need to add numberOfLines={1} to label Text.

Showing the user email for this input is necessary but clipping it will hide it. So I suggest adding the user email to the above paragraph in bold.

Instead of Type you phone number or email address to confirm , Type user email from label to confirm. and then the TextInput will not have any label.

Triggered auto assignment to @bondydaa (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

Personally I don't think we need to get too deep into making the labels and placeholders dynamic to show the user's email. for the most part users have 1 account and know their email, if they're unsure they can also look at the profile page which shows it to them.
we want this step to be somewhat manual and hard to do because it's a pain in the butt for us to try and fix it for users who accidentally delete their account (we didn't use to make them type their email in to delete and got so many requests to fix it so that's why we added this into the product to begin with).
So really I'd rather see us just get rid of the dynamic placeholder and have it be Enter in your email to delete the account.

I've asked in our internal slack for guidance on this here https://expensify.slack.com/archives/C03U7DCU4/p1644863538690739
I'll update this once we've gotten a consensus.

Alrighty after discussion / lack of push back there's agreement we shouldn't make this place holder dynamic so let's just change it so that the place holder is static and says Enter your primary login.
We can instead render the primary login in the text above this input then instead to help with a user closing their account so they don't have to then go back to the main profile page if they're not sure:
So then we can update this block https://github.com/Expensify/App/blob/0b7cc877305edca5879e19a7f4b9f796b96888eb/src/pages/settings/Security/CloseAccountPage.js#L82-L88
and after the closeAccountPage.closeAccountPermanentlyDeleteData block add a new row that shows Primary Login: [render the user's primary login] so that a user could copy/paste it into the input.
Something like this

And then just ensure the primary login can be rendered properly and let it just wrap if it's too big which it should do already

Triggered auto assignment to @adelekennedy (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

Triggered auto assignment to Contributor-plus team member for initial proposal review - @parasharrajat (Exported)

Triggered auto assignment to @AndrewGable (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

Internal: https://www.upwork.com/ab/applicants/1493673588213002240/job-details
External: https://www.upwork.com/jobs/~01d8e0eef3b04fe52c

Ok. Thanks. I  will create the PR tomorrow.

I need translations for these:

Primary login
Enter your primary login

Bump for translations :arrow_up:

@bondydaa we're deprecating the terminology Primary login on newDot, so this should actually read something different, but we've not nailed it down yet. @parasharrajat can we HOLD this issue for a day or so until we confirm what we're going with?

Sure. PR is still in draft. I am in no hurry.

Okay @parasharrajat we'll actually want to call these:

Default contact method
Enter your default contact method

Ok. @twisterdotcom  Could you please provide the translations as well?

I speak absolutely no Spanish I'm afraid. I asked in Slack: https://expensify.slack.com/archives/C01GTK53T8Q/p1645711112411529?thread_ts=1645468425.421969&cid=C01GTK53T8Q

PR was merged

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.1.41-6 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

https://github.com/Expensify/App/pull/7783

If no regressions arise, payment will be issued on 2022-03-17. :confetti_ball:

woot! Done and done


add retries counter to data processing

Why are these changes needed?
Adds reading and adding data access retries to statistics
Related issue number (if any).
https://github.ibm.com/ai-models-data/data-prep-kit-inner/issues/16#issuecomment-81632985

should we reference issues from the inner repository in the outer one?

Do not see harm

should we reference issues from the inner repository in the outer one?

I don't believe we should do that for lack of transparency


Trapezoid Generator Function

Have a look at my fork on the trapezoid branch:
https://github.com/james-ward/pydeepspace/tree/trapezoid
The tests are broken, but I think this is a nicer way to do it.


Switch to receive message expectation syntax

I started off improving RSpec/SubjectStub cop that had a special case of dealing with expect(subject).to all receive(...) that was originally present in RuboCop, and I've removed this special case in this commit, since according to an experiment, it's not raising any single offence for repositories from real-world-ruby-apps (11k files) and real-world-rails (79k files).
Original line when a special case was introduced:
expect(formatter_set).to all(receive(:started).with(files))

later reworked to:
expect(formatter_set).to all(have_received(:started).with(files))

I've replaced this with:
expect(formatter_set[0]).to receive(:started).with(files)
expect(formatter_set[1]).to receive(:started).with(files)

that is quite consistent with the style used in the rest of that spec file.
Also, using spies is not justified in this case.
It doesn't make much sense to use a before hook that is only run along with a single example, so I've simplified it as well.
However, I've faced another cop, RSpec/MessageSpies, that complains that receive is used instead of have_received. What confuses me is that according to the chat from 10 Oct 2016:

If a spec example has multiple stubs (allow) and you want a focused spec with just one expectation per example – and RuboCop is now telling you that you must change all those stubs into expectations. Not good.

However, in rubocop this is not a problem, as multiple expectations per example are allowed:
RSpec/MultipleExpectations:
  Max: 25

So I decided to give it a shot and take a look what happens if I switch the default enforced style of RSpec/MessageSpies from have_received to receive, and this pull request is the result of this switch.
Why it makes sense to merge this?

rubocop-rspec's SubjectStub has a special case that deals with a single known example, here, in rubocop's formatter_set_spec.rb.
Less hooks are used, the specs are more straightforward.
Spies have to be additionally instantiated, but now anymore.
Base formatter spec is now "Runner formatter invocation spec", which reflects what it tests.

Why it wouldn't make sense to merge this?

Usage of expect(...).to receive breaks Arrange-Act-Assert pattern.

What is redundant
I've made a couple of changes along the way not directly related to this change, specifically changed receive { ... } to .and_return. Don't remember the details, but I think it's recommended to use this syntax.
Appreciate any feedback on this.

Before submitting the PR make sure the following are checked:

[x] Wrote good commit messages.
[-] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[-] Added tests.
[-] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
[x] The PR relates to only one subject with a clear title
and description in grammatically correct, complete sentences.
[x] Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

Nicely done! Thanks!

😢
I find the main benefit of using RSpec/MessageSpies is that the specs can adhere to the four-phase test pattern, specifically that the “verify” step is after “exercise”.
After this PR, the expectations are sometimes at the bottom of a test example, sometimes at the top, and sometimes a bit of both.

@bquorning I had doubts about this change as well, but looking at the changes one by one I was more inclined to do this change rather than keep things as is:

This is an indicative example of a case when message expectations are used together with value comparison expectations.

-     allow(File).to receive(:open).and_call_original
+     expect(File).not_to receive(:open).with(%r{/ignored/})
      expect(cli.run(%w[--format simple example])).to eq(0)
      expect($stdout.string).to eq(<<~OUTPUT)
        0 files inspected, no offenses detected
      OUTPUT
-     expect(File).not_to have_received(:open).with(%r{/ignored/})

There was (and still is) no clear Act/Excercise stage, it was mixed with value comparison expectation in a single statement.
The combination of allow...to and expect...not_to is a bit confusing. It's a technical construct, but it reads quite poorly.
A necessity to and_call_original is not clear, especially keeping in mind the not_to expectation.

Another example when allow.to .and_call_original is used with expect.not_to.

There is no Arrange/Setup phase.
To avoid incidental state (more like behaviour than state), a block style expectation could be used, e.g. send_message from saharspec.
It reads better, a hook is not used.
Also, I would disagree that setting up a spy counts towards the Setup/Arrange phase.

Swapping.

With swapping two parts of the example, e.g.

when I load the configuration, it's being loaded from a file
vs
configuration is loaded from a file when I load it

Both sentences read quite similarly, and I hope the examples as well.

Overstubbing

Verified doubles are not used, incidental behaviour might strike, since there are at least two statements in Act/Excercise phase, parse_source and commissioner.investigate.

Scattered expectations.

Can't disagree wit this. Found two cases in this pull request, 1 (mentioned earlierand 2. I can imaging an example where a number of message expectations are sent, and then the results are compared to the reference expected values.
Although, the first example had more downsides that just that.
Hiding the Act/Excercise phase in a hook is a bad practice, and this pull request changes this by making a call to run visible in example itself.
I really respect AAA, or 4PT, but the usages of message spies that were changed in this specific pull request did not look like a canonical example of it.
Went through the changes once again. I might have a bias for this, since my goal was to get rid of message spy without breaking ExampleSize and MessageSpies. I might have made a really bad change, appreciate if you point at the worst one. I'm all for improving it in a follow-up.


WIP use cc to build liblzma

Converts lzma-sys/build.rs to use cc to build xz/src/liblzma directly instead of xz's autoconf/make build system.
It seems that xz-5.2.3/src/common/tuklib_integer.h was assuming an #include <windows.h> somewhere else on MSVC because it was casting a pointer to (DWORD *) in a few places, but I can't tell why because _BitScanReverse() doesn't take DWORD *. I've committed the fix here, though I can provide a .patch file to make it easy to apply to future updates of xz. This manual change precludes using xz as a submodule since we can't apply the patch at build time, though we could just copy the directory to target so we can modify it like we were already doing to support Autoconf (but I don't really like that hack anyway).
closes #29
@alexcrichton This builds but fails tests because the one semi-complex thing that Autoconf seems to do for liblzma is detect what implementation of SHA-256/SHA-2 to build/link in: https://github.com/alexcrichton/xz2-rs/blob/master/lzma-sys/xz-5.2.3/configure.ac#L703
On Linux and BSDs we can probably just define HAVE_SHA256_H and forget about it, on OS X use CommonCrypto, and on Windows I guess use the internal implementation. Or, for simplicity and consistency, just use the internal implementation on all platforms.
Nevermind, we weren't using the external SHA-256 feature anyway, was just missing some defines. The tests are still failing but for a different reason.

While I'm at it, it might be worth while to pare the files from xz down to just the bare essentials to make downloads of lzma-sys faster. The bloat is definitely non-negligible.

Thanks! This looks good to me, but CI configs may need an  update to checkout submodules?

@alexcrichton I reverted the submodule change to keep things simple. I'm having trouble accessing the build log but it should be the same failures as I was seeing locally, every test falling on unwrapping an Optipms error.

Ah currently it looks like:
--- stdout
cargo:rerun-if-env-changed=LZMA_API_STATIC
cargo:rustc-link-search=/home/travis/build/alexcrichton/xz2-rs/target/debug/build/lzma-sys-67a7d0e91f4a2092/out/lib
cargo:root=/home/travis/build/alexcrichton/xz2-rs/target/debug/build/lzma-sys-67a7d0e91f4a2092/out
cargo:include=/home/travis/build/alexcrichton/xz2-rs/target/debug/build/lzma-sys-67a7d0e91f4a2092/out/include
cargo:rerun-if-changed=xz/configure
--- stderr
thread 'main' panicked at 'failed to read dir xz/src/liblzma/common: Os { code: 2, kind: NotFound, message: "No such file or directory" }', libcore/result.rs:945:5

Yeah I thought I fixed that path when I reverted the submodule change but it must have gotten lost in the rebase. Now I'm wondering why two of the Travis jobs are green.

Does Travis not have a libc with Pthreads installed? I'm passing both -pthread and -lpthread to cc and still getting "undefined identifiers" for Pthread types/functions.

This may be something like -D_GNU_SOURCE or something like that to get posix extensions maybe?

@alexcrichton I don't think that's the issue, this is the function missing: http://man7.org/linux/man-pages/man3/pthread_sigmask.3.html
But SIG_SETMASK is undefined as well and that's not specifically pthreads, it's also used with sigprocmask().
It's not an import error and not a pthreads linking error, it includes both pthread.h and signal.h just a few lines up in that file and uses a few types from pthreads as well. It's specifically this signals API but I don't understand why it's not available. We're using C99 and pthread_sigmask has a _POSIX_C_SOURCE of >= 199506L.
I'm trying to search for the definitions of these items to see if there's some sort of condition on their exports.

I see, I do need to manually define __POSIX_C_SOURCE.

That should fix the Linux build, still gotta fix the actual failing tests but that's progress. Gotta fix MSVC14 now.

It looks like linux compiled (yay!) but I think it failed at runtime?

Yeah those are the same panics that I was seeing on MSVC16/VS2017 so it's at least consistent with that. I'll have to figure out the cause of course but I imagine it's just missing defaults for some config values or something.
The compile failure on Appveyor is much more interesting. Seems like something with unsupported syntax.

Nevermind, I somehow managed to fix the builds on both. Now just gotta look at those runtime errors.
@alexcrichton we probably should add MSVC17 to the AppVeyor build matrix and OS X builds with LZMA_API_STATIC=1 to Travis-CI.

That fixes most of the failing tests, just one remaining.

Nice!
I'd be totally fine btw adding more entries to the matrix as well

@alexcrichton that commit should push the build green, though I don't understand the purpose of the SPARC/x86/ARM filters or why XZ only provides tests for SPARC and x86 encode/decode. I've only enabled the bare minimum but there may be other encoders/decoders we want to enable, ARM especially.

I rewrote the Travis matrix but Travis isn't liking it so I've gotta install the Travis Ruby gem so I can lint it. I see the failure on the 3rd last commit, more missing defines I suspect.

Travis is running again, but it's not installing lzma-dev like it's supposed to.

@alexcrichton I'm trying to get systest to pass, I'm printing cargo:include from the build script so it picks up the include path for lzma.h but I'm still getting an error:
running: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.13.26128\\bin\\HostX64\\x64\\cl.exe" "/nologo" "/MD" "/Z7" "/I" "\\\\?\\C:\\Users\\cyber\\Rust\\xz2-rs\\lzma-sys\\xz-5.2.3\\src\\liblzma\\api" "/W4" "/W3" "/Wall" "/WX" "/wd4820" "/wd4100" "/wd4996" "/wd4296" "/wd4255" "/wd4668" "/DLZMA_API_STATIC" "/FoC:\\Users\\cyber\\Rust\\xz2-rs\\target\\debug\\build\\systest-40c05e37e47efc8b\\out\\all.o" "/c" "C:\\Users\\cyber\\Rust\\xz2-rs\\target\\debug\\build\\systest-40c05e37e47efc8b\\out\\all.c"
cargo:warning=cl : Command line warning D9025 : overriding '/W4' with '/W3'
all.c
C:\Users\cyber\Rust\xz2-rs\target\debug\build\systest-40c05e37e47efc8b\out\all.c(3): fatal error C1083: Cannot open include file: 'lzma.h': No such file or directory

The include is being passed correctly but it's still not picking up the header file. What gives?

@alexcrichton Running into the issue of lzma_physmem and lzma_cpucores again. The only place these are used are in systest but removing them from lzma-sys is a breaking change. You okay with that or should I try to get them working?

Fixed the include issue. MSVC apparently doesn't like the extended-length path syntax so instead of Path::canonicalize() I just joined it with the current dir.

That should (hopefully) be everything. Once the build is green I'll squash to three commits:

the changes to lzma-sys/build.rs
the changes to AppVeyor
the changes to Travis

Additionally I can go back again and look at making xz a submodule, it's looking like it's actually not really necessary to patch it because I'm not seeing errors on those DWORD casts anymore. It's still warning, but not erroring, and casting pointer types doesn't really affect anything.

@alexcrichton Looking back at the original .travis.yml it seems that the intention was to build and link liblzma whether or not LZMA_API_STATIC was defined; there was an extra job in matrix:include that installed lzma-dev and only ran cargo test and cargo test --features tokio.
Was this intended? The gist is that systest will not run on the job with preinstalled liblzma; it works okay on my WSL but Travis gets some undeclared identifier errors.

Ah the original intention was to basically just test against linking to the system lzma, ideally systest would run but it's not required.
This is looking good though! Did you need some help with the final errors?

I'll look more closely later this evening, one thing that seems to be going wrong on Travis is that it's running the pre_script and after_success stages on more than one job which is not what we want. I guess the stages conditions can't match on the values of the rust key so I'll have to use the environment var that Travis sets instead.
Otherwise, I don't quite understand what's going wrong with systest on those jobs since liblzma should be getting built correctly. I imagine it's more missing defines (gotta love stringly typed configuration through the C preprocessor) but it'll take some sifting through liblzma's headers to figure it out. I noticed the /I argument isn't being passed to cc in this case either.

@alexcrichton can you rerun the Appveyor jobs? All the failures seem to have been timeouts with crates.io.

I've hit the rebuild button

The conditionals are working correctly on Travis now but there's still the same error.

I feel like this error could be caused by it linking an older version of lzma-dev that doesn't have these constants. This is consistent with cc not being given an include directory but finding lzma.h anyway. However, I thought I was also seeing this error when I had lzma-dev installed on all jobs which should have brought it up to date.

@alexcrichton so at some point someone confused lzma-dev and liblzma-dev because the latter is what we're actually linking here; installing the former appears to have no function. Presumably liblzma-dev comes preinstalled with the standard Ubuntu distros.
Travis-CI uses Ubuntu Trusty which has an older version of liblzma than we're building against; there is no source release (of 5.1.1alpha) that I can find on Tukaani's site, but 5.0.8 does not contain the missing identifiers so we can safely assume they were added in 5.2,
This also explains why I was confused because I have it working locally with the same build steps, but I have liblzma-dev already installed on my WSL-running-Bionic: version 5.2.2.
Since we can't add PPAs or anything without sudo, I guess for !LZMA_API_STATIC we can just skip systest which should remedy the issue.

I think it's fine yeah to avoid running systest against system builds, sorry for the headaches you've been getting here!
Additionally I think that liblzma has been ABI-stable for some time, so it shouldn't be too much of a problem with mismatched versions? (in that you'll get link errors or it works)

My main concerns were:

variant LZMA_FULL_BARRIER added to enum lzma_action
constant LZMA_IGNORE_CHECK added to container.h

However, it appears that neither is all that important and if either is passed to a liblzma that doesn't recognize it, it will just be ignored.

I amended the commit to fix the formatting in .travis.yml real quick but before I pushed it, the first job of the build went green which was failing before, so this should finally be about ready to go! I'll squash when everything is green.

@alexcrichton I remade xz into a submodule and created config.h to hold all the defines. It builds locally on Windows and Linux so hopefully the build is green.

Ah, Appveyor doesn't automatically checkout submodules I see. That's inconvenient, but fixable.

That oughta do it.

This looks great to me, thanks so much!


Unable to annotate relations locally: Label studio entity panel is missing

Describe the bug
I am unable to use relations annotations, both using latest pip version of label-studio or using the cloned github repository.
To Reproduce
Steps to reproduce the behavior:

pip install label-studio
label-studio init test && label-studio start test
Connect to  http://<IP_ADDRESS>:8080/ via browser.
Click on Setup your label config.
Click on Relations among entities and confirm on the dialog box by clicking on Proceed.
On the interface preview on the right you will see the text Note: To manage relations you need Label Studio entity panel to be shown.

Expected behavior
I am expecting to see relation annotation pane as I see in the label-studio playground site.
Screenshots
What I see locally:

What I see on the official playground site:

@nopper Can you show your screen entirely?

I've just checked this in latest LS version, everything looks ok..

Sure here's the screenshot of the full page:

@nopper But it's Setup page, you don't need to make a labeling here. Use Labeling or Tasks page, after you setup the project.

Ok then my bad.
I was a confused by the fact that this was working in the Setup page on the playground site, but not locally in the Setup page. Therefore I didn't even bother saving the setup because I thought something was off.
I would probably add a clarification in the Setup page, if what you will see in the labeling phase will be different then what I am seeing in the project/Setup phase.

Yes, it's a good point to write about it. Thank you, I think we will add it.

We've added Result panel on the Setup page in 0.8.0.


Advice for running in a sandbox: Invalid Host Header

Any idea how I can combat the "Invalid Host Header" error? I am trying to see if I can get this running in a Sandstorm instance, but I don't know enough about webpack to figure out how to successfully disable this check. I tried adding --offline and --host <IP_ADDRESS> in the package file for yarn start.

Try to bundle the application:

yarn run build

Then you can use the bundle/ directory.

@bissonex How do I "use" the bundle/ directory once I build? (I'm not able to try this right this moment, so I apologize if it should be apparent.)

Push the bundle/ to your public folder.
A good "ready-to-use tool" option with Node.js could be http-server:

>npm install http-server -g
To use it:

>cd bundle
>http-server

Hey all! Thanks for sitting tight. We now have canonicalized instructions for local deployment here.


refactor(test): use DataChunk::from_pretty for literals in unit tests rather than DataChunkBuilder

What's changed and what's your intention?
To reduce the PR size of DataChunk refactor (#2663), we remove usage of DataChunkBuilder for literals in unit tests.
Checklist
- [ ] I have written necessary docs and comments

[x] I have added necessary unit tests and integration tests

Refer to a related PR or issue link (optional)
#2663

A question of from_pretty unrelated to this PR:
" T T
aaa bbb ccc"
It seems we cannot determine whether the whitespace belongs to varchar or serves as a delimiter?

We cannot use from_pretty if any varchar column contains whitespace.


500 internal server error when SvelteKit returns 301

I have been experimenting with my web app and couldn't figure out why one particular SSR route was giving 500 error. Then i started debugging the render function code. I found out that when a route has a sub route for example '/setting/profile', there is trailing slash put at the end of the route like '/setting/' or '/setting/profile/' which makes it a redirection route, so sveltekit keeps on redirecting to same route causing 500 error.
Reproducing error on demo repo to be sure:
if go to demo Todo list app and the put the '/' at the end of /todo route ,
https://delightful-bush-01bdb9a0f.azurestaticapps.net/todos/  (this will give 500).

Thanks for the report and PR! I want to dig into this a bit more before merging the PR -- I don't think removing the trailing slash would be correct in all cases, since it technically refers to a different route. I wonder if there's an underlying bug with Azure SWA here. But this is a very clear issue report, so it should be easy to repro.

I think the way it is getting the original Url from the header, ( headers["x-ms-original-url"];) is the problem because the trailing slash exist in the header even before it's passed to render function.
If removing trailing slash is not the best solution then another solution could be passing the original route/url as an input binding to the render function context, if that's even possible?

Okay, I've dug into this a bit more and it does seem to be an Azure SWA issue, not a SvelteKit or adapter issue. The original URL in the header is correct -- when you navigate to /todos/, x-ms-original-url should include the trailing slash, since that's in the original URL. By default, SvelteKit will redirect /todos/ to /todos and return a 301 response. However, when the Azure function that performs SSR returns a 301 status, a 500 error page is shown instead. I didn't see any redirect loops; it seems that simply returning a 301 shows the error.
This issue isn't isolated to this adapter. I was able to repro it with a simple Azure function that just returns a 301 and does not invoke SvelteKit. I've opened an issue on the SWA repo for them to address this: https://github.com/Azure/static-web-apps/issues/680
While the fix you proposed in your PR (removing the trailing slash) does mitigate the issue, it won't work in all cases. It's possible to configure SvelteKit to do the opposite of the default and redirect /todos to /todos/. With that configuration, we'd see the same issue navigating to /todos, since SvelteKit would return a 301 response and trigger the error. So I don't think that's the best change going forward. If you do want that behavior in your own app, it would be better to implement it in the handle hook.
Do these findings match what you're seeing?

Another workaround would be to map a 301 status to 302 in the handle hook, since Azure SWA seems to handle 302s fine. But that's not a change I'd want to assume for every app, so it wouldn't be appropriate for the adapter.

This has now been fixed in Azure Static Web Apps. No adapter update is required. The demo link now performs the redirect properly.


Update provider.md

Corrected the Callback URL since we encountered this when implementing.  Also removed the scopes config item - including this resulted in errors for us.
I had submitted a PR before, and I addressed two feedback items - one was wording and the other was a request to include the optional configurations in the instructions.  Both are addressed.  Apologize I had to make a new PR because I had issues with the other being open so long and I didn't rebase it correctly - better to start fresh.
Hey, I just made a Pull Request!

Changes to documentation to include configuration corrections
:heavy_check_mark: Checklist

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

Hey! 👋
I think it looks good and its clear, I do not however use this provider...
Just out of curiosity which was the original PR? Just for some added context 😅

Hello and thanks for the review - the original PR is here (closed): https://github.com/backstage/backstage/pull/28012
I had moved the definitions and descriptions for those elements from being on the same line as the example to below so that it matched the general format - I figured perhaps that's what prettier didn't like.


Testing for simulator

Adding tools to docker

Adding simtests to github actions workflow

Adding runsimci.sh to install carla and start the python script

Python Script for testing communication with simulator

I am not sure if this should go into master or the carla branch.

Does this work yet? The test passes, but I see error messages at the and:
No local packages or working download links found for carla==0.9.7
error: Could not find suitable distribution for Requirement.parse('carla==0.9.7')
ECU Camera Simulated: True
ECU Gas Interceptor: True
******* Successfully started carla ********
Refusing to run with the root privileges.
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
fatal: Not a git repository (or any of the parent directories): .git
Everything successful. Sim works```

I assume it's supposed to actually start up carala?

Yes it should start up carla, but I cant figure out how to run this without root in github actions

Carla does takes ages to open up on GitHub actions. Lack of CPU power probably.


Add support for SSLCERT/SSLKEY/KEYPASSWD curlopts

this addresses cases where a client cert is needed for authorization.
additionally, instead of type aliases (via using declarations) for types that are effectively strings, use mixins to make their use unambiguous (i.e. wrt overloads).
certainly open to any feedback, functional or cosmetic. ~if the implementation looks good, i'll add tests.~ i got bored and added them. 😉

not sure why clang is failing on travis yet. both gcc4.8 and clang3.8 look OK on my end, but i'm also building with Bazel (not cmake). will look into it.

ah, operator overloads. stand by...

ok, things look pretty good on my end, let me know what you think! looking into proxy test failures i'm seeing (connection errors), not sure if it's my network.

added StringHolder tests
explicit StringHolder ctors, added std::initializer_list<std::string> ctor
updated derivative classes (Url, SslCert, SslKey, SslKeyPass) to pull in base ctors

note that using base::base syntax was added in GCC4.8 (travis says clang is fine), so this would actually establish that version as the minimum GCC version (alternatively, they could all be explicitly declared).

added additional ctors to cpr::Url to permit implicit conversion from std::string and const char*, for backwards compatibility

hey @whoshuu, let me know what you think whenever you have a sec!

Hey @mway! There's a bunch of good stuff in here! One can say there's almost too much good stuff :+1:.
That said, it would be much easier to get all of this in piecemeal, especially the pieces that aren't exactly dependent on each other. Here are the distinct chunks I can see being split off from this:

unit test sorting
StringHolder and tests
Cert/Key/Password stuff - this can have the StringHolder changes if you want, but I can review just the non StringHolder stuff and have merging of this PR be depending on the StringHolder PR
removing explicit Url construction in the tests - I have thoughts on this I'll share when a separate PR is up

As for the GCC issue, let's move that discussion into a new PR with just the StringHolder changes. I think I need time to research GCC version usage to get a feel for how setting a 4.8 minimum will affect library users. My current feeling is that the library's primary obligation is to be as useful to as many people as possible without compromising on design. Having to add extra explicit constructors to some internal library classes feels like a small price to pay for larger compiler compatibility, especially because the interface is unaffected by that extra work.
Again, these initial thoughts aren't set in stone and I'll happily open up the discussion more broadly on a focused PR with just the StringHolder changes.
Also, if you rebase this PR you'll see that the only travis failures are the ones caused by the using-declaration constructor inheritance changes.

@mway I’m closing this, but could you create a separate PR for all the StringHolder stuff?
All the SSL related stuff has been added in #276 .


Protect parent= setter method

This marks the :parent= method protected.
Tested with:
ADAPTER=mysql
GIT_BRANCH=release-1.2
The 'moves scope properly with relationships' spec (which has nothing to do with my changes) failed before my changes and still does. I debugged this a little bit and broke it down to the following line:
https://github.com/snusnu/dm-is-awesome_set/blob/master/lib/dm-is-awesome_set.rb#L426
The update! returns true but doesn't change the record. Seems to me like a dm-core bug.

Thx!


style: Arabic RTL layout changes

Issue #1121
Description
This PR addresses the layout issue when a user has chosen Arabic as their language - page header titles and one of the listing info containers was so not switching sides.
How Can This Be Tested/Reviewed?
Note: Make sure 'ar' is listed in your public .env LANGUAGES
Entry point 1: http://localhost:3000/about
Choose Arabic as your language
Notice that the page header is on the right instead of left side of the page

Entry point 2: http://localhost:3000/listings
Choose Arabic
Click any listing
Notice that the info container is on the left side of the listing image as opposed to the right

NOTE: This issue only addresses the functional layout of the page. I think it would be worthwhile to create another issue(s) that addresses some funky margin issues by swapping some of the tailwind css tags with the tailwind rtl css tags, i.e. so that an element that normally has margin-right, would then have margin-left when the layout switched to right-to-left.
Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have reviewed the changes in a desktop view
[x] I have reviewed the changes in a mobile view
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[ ] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules
[x] I have assigned reviewers
[ ] I have run yarn generate:client and/or created a migration if I made backend changes that require them
[ ] I have exported any new pieces added to ui-components
[x] My commit message(s) is/are polished, and any breaking changes are indicated in the message and are well-described
[ ] Commits made across packages purposefully have the same commit message/version change, else are separated into different commits

Reviewer Notes:
Steps to review a PR:

Read and understand the issue
Review the code itself from a style point of view
Pull the changes down locally and test that the acceptance criteria is met
Also review the acceptance criteria on the Netlify deploy preview (noting that these do not yet include any backend changes made in the PR)
Either explicitly ask a clarifying question, request changes, or approve the PR if there are small remaining changes but the PR is otherwise good to go

On Merge:
If you have one commit and message, squash. If you need each message to be applied, rebase and merge.

@emilyjablonski this one is ready for re-review! Thank you!


adding scope.$$postDigest() to stopLoading and disableWithMessage functi...

Adding scope.$$postDigest() to stopLoading and disableWithMessage functions in order to guarantee they are called after angular has completed its dirty checking of the DOM.This fix is required for compatibility with AngularJS >=1.3.0. Without it, the chosen select does not render the data.

Hi @andrewhl this is very promising. Would you mind updating your PR with resolved conflicts so I can merge it? Thanks.

I believe this compatibility issue has been fixed recently. So I'll close this issue.


allow search using substring for findlLocation

From my testing, this works as intended.
Is the plan to leave special characters (such as ,) as acceptable search parameters?

From my testing, this works as intended. Is the plan to leave special characters (such as ,) as acceptable search parameters?

I think it should be ok, as long as it does not throw an error message, and we do we mention in the user guide that we will be searching using substring, so the returned result when using , should make sense?

Codecov Report

Merging #147 (9a43adb) into master (30d7efa) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##             master     #147      +/-   ##
============================================
- Coverage     54.26%   54.23%   -0.04%
  Complexity      429      429
============================================
  Files            92       92
  Lines          1760     1761       +1
  Branches        210      210
============================================
  Hits            955      955
- Misses          755      756       +1
  Partials         50       50

Impacted Files
Coverage Δ

...odel/eatery/LocationContainsKeywordsPredicate.java
37.50% <0.00%> (-5.36%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

In that case, everything looks good to me!


[AMBARI-24310] UI sends host check request for custom jdk with invalid hosts

What changes were proposed in this pull request?
UI sends "java_home_check" host check with all populated hosts instead hosts with passed registration only. This can cause 500 server exception due HostNotFoundException.
2018-07-05 14:10:30,930 ERROR [ambari-client-thread-573] AbstractResourceProvider:295 - Caught AmbariException when creating a resource
org.apache.ambari.server.HostNotFoundException: Host not found, hostname=test-0000
        at org.apache.ambari.server.state.cluster.ClustersImpl.getHost(ClustersImpl.java:456)
        at org.apache.ambari.server.state.ConfigHelper.getEffectiveDesiredTags(ConfigHelper.java:189)
        at org.apache.ambari.server.state.ConfigHelper.getEffectiveDesiredTags(ConfigHelper.java:173)
        at org.apache.ambari.server.controller.AmbariManagementControllerImpl.findConfigurationTagsWithOverrides(AmbariManagementControllerImpl.java:2353)

POST http://host:8080/api/v1/requests 500 (Internal Server Error)
send @ vendor.js:8630
jQuery.extend.ajax @ vendor.js:8082
send @ app.js:192735
doCheckJDK @ app.js:41241
(anonymous function) @ app.js:41318
fire @ vendor.js:1141
self.fireWith @ vendor.js:1252
done @ vendor.js:8178
callback @ vendor.js:8702

Body of request:
{"RequestInfo":{"context":"Check hosts","action":"check_host","parameters":{"threshold":"60","java_home":"/tmp/jdk1.8.0_171/","jdk_location":"http://host:8080/resources","check_execute_list":"java_home_check"}},"Requests/resource_filters":[{"hosts":"test-0000,test-0001,test-0002,...

How was this patch tested?
UI unit tests:
21825 passing (26s)
48 pending

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/3167/
Test PASSed.


Gensim memory issue

Building LSI model from SqliteDict corpus loads the whole SqliteDict into memory.
How to simulate:
from sqlitedict import SqliteDict
from gensim.models import TfidfModel, LsiModel
from gensim.models.lsimodel import Projection
from gensim.utils import grouper
from gensim import matutils

s = SqliteDict('documents.sqlite')  # contains namedtuples with field `tokens` containing unicode token tuple
tfidf = TfidfModel.load('tfidf_model.pkl')  # trained on a dictionary built from `s`

class SegmentCorpus(object):
    def __init__(self, storage, built_dictionary):
        self.storage = storage
        self.inner_dictionary = built_dictionary

    def __iter__(self):
        for segment in self.storage.itervalues():
            yield self.inner_dictionary.doc2bow(segment.tokens)

corpus_tfidf = tfidf[SegmentCorpus(s, tfidf.id2word)]
for i in grouper(corpus_tfidf, 5000):
    nnz = sum(len(doc) for doc in i)
    job = matutils.corpus2csc(i, num_docs=len(i), num_nnz=nnz, num_terms=len(tfidf.id2word))
    Projection(len(tfidf.id2word), 100, job, extra_dims=100, power_iters=1)

Calling Projection will increase RAM usage to the size of SqliteDict db (in my case 22GB).

@tmylk add "bug" label.

@tmylk ping.
@janrygl this is a "feature" that is actually documented: see https://github.com/piskvorky/sqlitedict/blob/master/sqlitedict.py#L457. But really a bug IMO -- goes against sqlitedict's design.
The Projection line was just a red herring -- when you commented it out, the reader (SegmentCorpus iterator) was reading rows off the DB cursor fast enough. With Projection, the cursor was filling up the internal queue faster than your __iter__ was consuming them, leading to memory problems.
A simple sleep(1) statement instead of Projection is enough to slow down reading => cursor rows accumulate inside SqliteDict => memory blows up again.
I'm not sure what "proper" the fix is. We have to be more careful with juggling the output queues between threads, make them somehow blocking if the top-level call is a generator (iterkey, itervalues, iteritems...). It's not going to be trivial, with multiple threads.
As a quick fix, read the (much smaller) keys into memory and avoid the (large) values in memory:
class SegmentCorpus(object):
    def __init__(self, storage, built_dictionary):
        self.storage = storage
        self.inner_dictionary = built_dictionary

    def __iter__(self):
        for key in self.storage:  # all keys in memory
            segment = self.storage[key]  # only a single value in memory
            yield self.inner_dictionary.doc2bow(segment.tokens)

@tmylk @gojomo thoughts on making this type of iteration the default? It assumes keys are smaller than values, which is a mostly true (values are pickled objects).

@piskvorky Unfortunately only an ower can create new labels. As a collaborator I can only apply existing ones.

Wouldn't adding a maxsize at https://github.com/piskvorky/sqlitedict/blob/726d2ca6a56ed2422089ada9834c1c792164b541/sqlitedict.py#L463 force the necessary blocking-before-heap-exhaustion? (Presumably the raw sqlite lib would continue to push in new items as queue-space becomes available.)
The proper limit could start generous (say 10000) but be user-overridable (for cases where the RAM or average value-size or number-of-simultaneous-selects vary).

If that works that would be great (and easy)!
I looked at queue maxsize last night and thought it wouldn't work, but I can't remember why now. I think it should work.

@tmylk aha, OK. Weird. I created a few labels; let me know if you want any others.