Trailing slash is stripped from the base URL if no path is given

// No options.
console.log(buildUrl('http://example.com/api/v2/'));
// => http://example.com/api/v2

// Empty path option.
console.log(buildUrl('http://example.com/api/v2/', {path: ''}));
// => http://example.com/api/v2

// Explicit path that is only a slash.
console.log(buildUrl('http://example.com/api/v2/', {path: '/'}));
// => http://example.com/api/v2/

A trailing slash is significant and the two distinct cases represent two different resources, I don't think this library should be manipulating the base URL when no path is given.

@jonathanj Thanks for filing an issue.
I agree that the URL should not be manipulated in this way. I'll try to get a fix out when I have time.


Editor: Saving poster image doesnt respect actuall view

Hi, i am not sure if this is a bug but from user point of view it should be more dumb-resistant.
Description:
By saving a poster image , i would like to save picture of actual view i see on monitor, But it saves only default view.
Solution:
Workaround... i have to press "save current as initial" in another tab to have the correct result of that image..
Its just feedback
Cheers Petr

Yeah, that's fair. Interested in doing a PR? It's all in the space-opera package.

ok

im not sure if i can create PR with my GitHub acount ...i dont see simple link to do it..... so i will let on you

I'm going to call this intended behavior for now. The reason is the poster is intended to go with the model-viewer element that has been set up, which is why it uses the attribute values for the orientation. If you just want a screenshot, you can use the regular screen-shot facilities of the OS, or click the "save as initial" button. But if anyone has other UX idea, please post them here.


Use arrays instead of exec for strings

Don't need return statements. Remove compact from check_executables function. Or just don't make it a function.

Check starred repos (rubocop, reek, rake, ore).

%w(wget, youtube-dl, mpv)

Move wget to it's own function.

Check out %x for executions.


Sort collection by field when defining association

Hey,
I have the following problem:
Let's say I have 2 models: questions and slides. In the respective controller I pass the collection of questions to the QuestionBlueprint in a sorted fashion:
render json: QuestionBlueprint.render(questions.order(position: :asc), view: :normal, root: :questions)

This ensures that the questions in the resulting json are sorted by the position field.
Now let's say I also have a SlideBlueprint that has associated questions:
class SlideBlueprint < Blueprinter::Base
  identifier :id

  association :questions, blueprint: QuestionBlueprint, view: :normal
end

Here I don't have any control over how the collection of questions is sorted. This results in potentially unsorted questions when using the SlideBlueprint. My current idea is using a custom transformer to sort the questions hash before passing it to serialization. Is there a better way to tell blueprinter to sort a associated collection by a certain field?

Hey @leonhess, could you try doing something like the following?
class SlideBlueprint < Blueprinter::Base
  identifier :id

  association :questions, blueprint: QuestionBlueprint, view: :normal do |slide, options|
    slide.questions.order(position: :asc)
  end
end

Thanks for the quick reply. Your suggested solution worked like a charm. Thanks, closing this issue.


Bug in Orientation or Wrong views?

Hi ,
first i am very new to CAD so excuse my bug report if i made something wrong....
import cadquery as cq

res = cq.Workplane("front").box(50, 50, 50)

res = res + cq.Workplane("front").text("Front", 8, 26)
res = res + cq.Workplane("back").text("Back", 8, 26)
res = res + cq.Workplane("top").text("Top", 8, 26)
res = res + cq.Workplane("bottom").text("Bottom", 8, 26)
res = res + cq.Workplane("left").text("Left", 8, 26)
res = res + cq.Workplane("right").text("Right", 8, 26)

res = res.rotate((0, 0, 0), (1, 0, 0), 90) # Rotates the object 90 degree down so it works without touching in Cura Slicer and Super Slicer
cq.exporters.export(res, "test.step")
cq.exporters.export(res, "test.stl")
res = res.rotate((0, 0, 0), (1, 0, 180), 90)
show(res)

The rotate before exporting step and stl is required so it is aligned with 3d printer slicers.
The rotate before the show is required so i dont have to use the mouse to view to click on it.... so it looks good...
This puts everything in a good perspective....

The only problem is the LEFT/RIGHT are opposing.... (TOP, BOTTOM, FRONT, BACK are working correctly)

Closing it because cq chat is not welcoming VSCode users.... was fun to try

Discussion on this issue continues here: https://github.com/bernhard-42/jupyter-cadquery/issues/90


Freezing network with batch norm does not work with TRT

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
16.04
TensorFlow installed from (source or binary):
Source
TensorFlow version (use command below):
1.10.1
Python version:
3.5
CUDA/cuDNN version:
9.0
Bazel version:
N/A
GPU model and memory:
N/A
Mobile device:
N/A
Exact command to reproduce:

import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
import numpy as np
import tensorflow.contrib.tensorrt as trt
import tensorflow as tf
from tensorflow.python.platform import gfile
from tensorflow.keras import backend as K

path         = "/tmp"
output_trt_pb    = os.path.join(path, "output_trt.pb")

np.random.seed(0)

X, Y = np.random.rand(1000, 100, 100, 3), np.random.rand(1000, 100, 100, 16)

with K.get_session() as sess:

    inp = tf.keras.layers.Input(shape=(100,100,3), name="input")
    x = tf.keras.layers.Conv2D(16, (3,3), padding="same", kernel_initializer="ones", name="conv2d", use_bias=False)(inp)
    x = tf.keras.layers.BatchNormalization(name="bn", fused=True)(x)
    x = tf.keras.layers.Activation("relu")(x)
    model = tf.keras.models.Model(inp, x)
    model.compile("adam", "mse")
    model.fit(X, Y, epochs=3, verbose=True)

    # fix nodes (from https://github.com/tensorflow/tensorflow/issues/3628) here doesn't help
    graph_def = sess.graph_def

    output_graph_def = tf.graph_util.convert_variables_to_constants(
        sess,                                     # The session is used to retrieve the weights
        graph_def,                                # The graph_def is used to retrieve the nodes
        [i.name[:-2] for i in model.outputs]      # The output node names are used to select the useful nodes
    )

    trt_graph = trt.create_inference_graph(output_graph_def,
                                           [i.name[:-2] for i in model.outputs],
                                           max_batch_size=1,
                                           max_workspace_size_bytes= 1256 << 20,
                                           precision_mode="FP32")

Describe the problem
When I freeze a protobuf that contains batch normalization and then try to use it with TRT, it fails with the error
InvalidArgumentError: Input 0 of node bn/cond/ReadVariableOp/Switch_1 was passed float from bn/gamma_1:0 incompatible with expected resource.
It seems like this is an issue in other threads, like https://github.com/tensorflow/tensorflow/issues/3628 and in my code I tried to include the suggested fixes, but this does not help.
I tried using both fused=True and fused=False, and also tried trainable=False/True in BatchNormalization.
If you comment out
x = tf.keras.layers.BatchNormalization(name="bn", fused=True)(x)
then everything works fine.
Any comment would be appreciated.

The only way I have got it to stop complaining is by setting K.set_learning_phase(0); however, this is not a solution because the results at inference time will be very different:
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
import numpy as np
import tensorflow.contrib.tensorrt as trt
import tensorflow as tf
from tensorflow.python.platform import gfile
from tensorflow.keras import backend as K

path         = "/tmp"
output_trt_pb    = os.path.join(path, "output_trt.pb")

np.random.seed(0)

X, Y = np.random.rand(1000, 100, 100, 3), np.random.rand(1000, 100, 100, 16)

with K.get_session() as sess:

    inp = tf.keras.layers.Input(shape=(100,100,3), name="input")
    x = tf.keras.layers.Conv2D(16, (3,3), padding="same", kernel_initializer="ones", name="conv2d", use_bias=False)(inp)
    x = tf.keras.layers.BatchNormalization(name="bn", fused=True)(x)
    x = tf.keras.layers.Activation("relu")(x)
    model = tf.keras.models.Model(inp, x)
    model.compile("adam", "mse")
    model.fit(X, Y, epochs=3, verbose=True)
    model.save("/tmp/model_keras.h5")

    # predict output
    print("Keras model (normal):", model.predict_on_batch(X)[0,0,0,0])

K.clear_session()
with K.get_session() as session:

    K.set_learning_phase(0)

    m = tf.keras.models.load_model("/tmp/model.h5")

    print("Keras model (learning phase zero):", m.predict_on_batch(X)[0,0,0,0])

    graph_def = session.graph_def

    output_graph_def = tf.graph_util.convert_variables_to_constants(
        session,                                  # The session is used to retrieve the weights
        graph_def,                                # The graph_def is used to retrieve the nodes
        [i.name[:-2] for i in model.outputs]      # The output node names are used to select the useful nodes
    )

    trt_graph = trt.create_inference_graph(output_graph_def,
                                           [i.name for i in model.outputs],
                                           max_batch_size=1,
                                           max_workspace_size_bytes= 1256 << 20,
                                           precision_mode="FP32")

    g = tf.import_graph_def(graph_def=trt_graph, name="trt")
    output = session.run("trt/activation/Relu:0", feed_dict={"trt/input:0": X})

    print("TRT version:", output[0,0,0,0])

but as you can see:
Epoch 1/3
1000/1000 [==============================] - 2s 2ms/step - loss: 0.3719
Epoch 2/3
1000/1000 [==============================] - 2s 2ms/step - loss: 0.3512
Epoch 3/3
1000/1000 [==============================] - 2s 2ms/step - loss: 0.3348
Keras model (normal): 0.0
Keras model (learning phase zero): 5.8149805
INFO:tensorflow:Froze 5 variables.
INFO:tensorflow:Converted 5 variables to const ops.
INFO:tensorflow:Running against TensorRT version 3.0.4
TRT version: 5.814981

By setting K.set_learning_phase(0) I guess Switch no longer exists, but then the incorrect mean/variance of the inference batch is not considered, leading to erroneous results.

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Bazel version
GPU model and memory
Mobile device

@samikama can you reproduce this?

Yes, I also tried to set K.set_learning_phase(0) but get an error like:
2018-10-30 00:47:18.401715: I tensorflow/core/grappler/devices.cc:51] Number of eligible GPUs (core count >= 8): 1
2018-10-30 00:47:18.403717: I tensorflow/contrib/tensorrt/convert/convert_nodes.cc:2853] Segment @scope '', converted to graph
2018-10-30 00:47:18.406910: W tensorflow/contrib/tensorrt/convert/convert_graph.cc:724] Can't determine the device, constructing an allocator at device 0
2018-10-30 00:47:18.535147: E tensorflow/contrib/tensorrt/log/trt_logger.cc:38] DefaultLogger resources.cpp (199) - Cuda Error in gieCudaMalloc: 2
2018-10-30 00:47:18.535494: E tensorflow/contrib/tensorrt/log/trt_logger.cc:38] DefaultLogger resources.cpp (199) - Cuda Error in gieCudaMalloc: 2
2018-10-30 00:47:18.535555: W tensorflow/contrib/tensorrt/convert/convert_graph.cc:857] Engine creation for segment 0, composed of 7 nodes failed: Internal: Failed to build TensorRT engine. Skipping...

I get similar error when I try to import a GraphDef for my frozen model using tf.import_graph_def.
Input 0 of node instance_normalization/Gather was passed float from sequential/norm_conv2d/gamma:0 incompatible with expected resource

I've searched the error in the TF sources and I only found one place which can match this log message at https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/graph/graph_constructor.cc#L1196:
return errors::InvalidArgument(
        "Input ", input_index, " of node ", dst->name(), " was passed ",
        DataTypeString(src_out), " from ", src->name(), ":", output_index,
        " incompatible with expected ", DataTypeString(dst_in), ".");

So at first it looks like a very generic message but it actually seems like resource is just another data type here?

Nagging Assignee @samikama: It has been 15 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

@fferroni   I have meet the same problem in BN, do you have a method to solve it?

Any update of this issue? I also encounter a similar issue.

Facing similar issue while benchmarking my custom model with tensorflow benchmark tool:-
E tensorflow/tools/benchmark/benchmark_model.cc:275] Could not create TensorFlow Session: Invalid argument: Input 0 of node MobilenetV2/expanded_conv/project/bn/cond/ReadVariableOp/Switch was passed float from MobilenetV2/expanded_conv/project/bn/gamma:0 incompatible with expected resource.

I solved this similar issue, in my case, I added tf.keras.backend.set_learning_phase(0).

@trevor-m @pooyadavoodi  Can you PTAL

Closing this

@fferroni Were you able to solve the issue? I don't see that setting tf.keras.backend.set_learning_phase(0) works because it actually don't generate the batch_norm variables at all, but if the code expects it while loading the model, it raises another issue "No Operation named batch_normalization/x in the Graph.
Any suggestions on how to resolve the issue?

@samikama This is not a solution as tf.keras.backend.set_learning_phase(0)  puts the batch norm layers inference mode and thus the will not update during training
@bhavana3 @ardianumam @fferroni A workaround is to save the weights of the trained model, clear the session, recreate the model this time with tf.keras.backend.set_learning_phase(0) and then load the weights back in before freezing. https://github.com/tensorflow/tensorflow/issues/31331#issuecomment-518655879

Don't forget to clear the session before setting the learning phase to 0 (which puts keras in inference mode, so the batch norm won't be updated)!
K.clear_session()
K.set_learning_phase(0)


Prevent creation of observations with more than 20 photos

ObservationPhotos should not be valid on create if the observation already has >= 20 photos. Should not be implemented before the following are complete:

https://github.com/inaturalist/INaturalistIOS/issues/552
https://github.com/inaturalist/inaturalist/issues/2623
https://github.com/inaturalist/iNaturalistAndroid/issues/805

Bug report
https://forum.inaturalist.org/t/error-message-when-trying-to-combine-observation-uploads-with-multiple-photos/13820/3

This work is already completed. If there's a bug that's been reported in the Forum, we'll add it to github when it's clear there's really a bug that is ready for developers to fix.

Sorry, closed prematurely. This issue is for a hard limit on the number of photos that can be associated with an observation implemented at the model level and is still pending completion of https://github.com/inaturalist/INaturalistIOS/issues/552. If you're having issues with the Uploader on the website, please report them in the Forum and do not report them here on github. We'll make github issues when it's clear a bug exists and it's ready for a developer to work on.


Ruby throws an error on PlugInstall

Trying to switch from Vundle and when I run :PlugInstall, ruby complains about rubygems.rb. I'm not a Ruby developer (I have it because it's used by other programs and because I like the idea of potentially using it), so I'm having trouble figuring out what to do to fix this. Is this script dependent on a particular version of Ruby? I'm using rvm to manage Ruby and am running on 2.1.1 at the moment (haven't tried another version). Here's the output I see at the bottom:

Any ideas?

Oh, I just found this in your FAQ: https://github.com/junegunn/vim-plug/wiki/faq#vim-caught-deadly-signal-segv and indeed :ruby puts RUBY_VERSION throws the same error.

Yep, the hint on rvm use system when installing vim with homebrew worked. Hey, thanks for listening to my problems! Please don't charge me too much. ;)

@tandrewnichols Happy you got it working, great that the faq was useful.


Crash when converting stopsign intersection to traffic light intersection in Task 8 of tutorial.

As the title says.  when converting the intersection of Boyer Avenue East and 15th Avenue East from a stop-sign intersection to a traffic light intersection.  I was able to repeat this multiple times in Task 8 of the game tutorial.
edit:  included edits_during_crash.json (zipped up for github)

edits_during_crash.zip

- load scenario took 0.0072s
    - BorderSpawnOverTime (1)... 0.0000s
    - ... plus 0.0003s
  - ... plus 0.0068s
instantiate scenario...
Instantiating car vs bike contention...
trips for People (20)... 0.0003s
spawn trips (20)... 0.0003s
Instantiating car vs bike contention... plus 0.0419s
Instantiating car vs bike contention took 0.0425s
instantiate scenario... plus 0.0063s
instantiate scenario took 0.0488s

- instantiate scenario took 0.0488s
  - Instantiating car vs bike contention took 0.0425s
    - trips for People (20)... 0.0003s
    - spawn trips (20)... 0.0003s
    - ... plus 0.0419s
  - ... plus 0.0063s
apply map edits...
generate unzoomed roads and intersections...
generate unzoomed roads and intersections took 0.0403s
Wrote data/player/edits/us/seattle/montlake/Untitled Proposal 4.json
apply map edits... plus 0.0109s
apply map edits took 0.0512s

- apply map edits took 0.0512s
  - generate unzoomed roads and intersections took 0.0403s
  - ... plus 0.0109s
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: exact_slice(1.4m, 0.5134m) yielded empty slice

Caused by:
    Can't get a polyline slice [1.4m, 0.5134m]', geom\src\polyline.rs:280:44
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

********************************************************************************
Wrote data/player/camera_state/us/seattle/montlake.json
Wrote data/player/maps.json
Crash! Please report to https://github.com/a-b-street/abstreet/issues/ and include all output.txt; at least everything starting from the stack trace above!

At 00:00:00.0

Camera:
{ "cam_x": 6236.052520046968, "cam_y": 7520.749318134204, "cam_zoom": 10.374969840400013 }

Wrote edits_during_crash.json
Please include edits_during_crash.json in your bug report.

Crash! Please report to https://github.com/a-b-street/abstreet/issues/ and include all output.txt; at least everything above here until the start of the report!
********************************************************************************
error: process didn't exit successfully: `target\debug\game.exe` (exit code: 101)

Running with `RUST_BACKTRACE=1 gives more hints:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: exact_slice(1.4m, 0.5134m) yielded empty slice

Caused by:
    Can't get a polyline slice [1.4m, 0.5134m]', geom/src/polyline.rs:280:44
stack backtrace:
   0: rust_begin_unwind
             at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/std/src/panicking.rs:493:5
   1: core::panicking::panic_fmt
             at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/panicking.rs:92:14
   2: core::option::expect_none_failed
             at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/option.rs:1329:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/9bc8c42bb2f19e745a63f3445f1ac248fb015e53/library/core/src/result.rs:1037:23
   4: geom::polyline::PolyLine::exact_slice
             at /home/dabreegster/abstreet/geom/src/polyline.rs:280:9
   5: map_gui::render::turn::DrawMovement::for_i
             at /home/dabreegster/abstreet/map_gui/src/render/turn.rs:51:21

https://github.com/a-b-street/abstreet/blob/56b16f8daea875a838ea03a33cf67c3e4dfc30c4/map_gui/src/render/turn.rs#L51 is the problem. pl is a poly-line (line-string) representing some movement across the intersection. exact_slice takes 2 Distances, but the first one is somehow winding up to be larger than the second.


751 upgrade from cms 54 version on windows 19 64 bit windows services fail to install start

Validated on a Windows 11 VM.


EGS crash with some assets

Describe the bug
asset fails to be downloaded .
To Reproduce
Try to install MassiveWorld , GUI stops at initializing , for ever.
Expected behavior
MassiveWorld should download and install in a project.
Screenshots
thread 'Download Pool' panicked at /home/user/.cache/yay/eam-git/src/build/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/egs-api-0.6.0/src/api/utils.rs:43:30:
range end index 107218 out of range for slice of length 107215
Desktop (please complete the following information):
an Arch linux based distro.
I have the same problem with the AUR version and the flatpak version.
Additional context
EAM has no problems with other assets . aur and flatpak .
I was able to download the asset with the  official Epic launcher.
This asset a not a free asset, I have bought it , having not tested all other assets I cant tell if it is the only difference with the other assets .
Thank you again for EAM  :)

update:
seems not related to free/non-free ... ?!
I have just bought
https://www.unrealengine.com/marketplace/en-US/product/landscape-combinator
and it works .
but
https://www.unrealengine.com/marketplace/en-US/product/massive-world-procedural-generation-with-pcg
still doesn't work .
ps: the bug  #252  is the same as what i am talking about :)

I noticed a difference between the incriminated assets and the "good" ones: the size field doesn't get populated,
it stays like this and never writes the Size .
with other assets it does display the sizes , whether already downloaded or not .

I think the issue is "new" vs "old". The reason I requested a free one is that I have one that I can test on without needing to spend some excessive amount of money on an asset I do not need:).

You mean the age of the Asset ?

I mean the time of the latest update. The Epic API is kind of a strange thing, it feels like there is some form of Mongo storage behind it and each asset has a unique format. The clearest example is that "Games" are in binary format and Unreal Assets are in json format. What is happening here is that some unknown field has changed from mandatory to optional, or something got removed/renamed.

possible "epic" has a bug but made some workaround in Their client (M$)... but "us" can see it ...

Well no, this is a possible side effect of using Rust for the API, it is stricter on the fields that it gets. The initial setup of the API was done by essentially downloading all the assets I own and building a common structure that matches all of them.
I am working on getting the app to the current GTK, it is/was a blocker for most of my work on it, this comes right after and should not take much longer.

Loaded the git version with Arch's AUR .
problem fixed thank you .


v4 questions

First things first, thanks for your awesome work foostan, I've been using my wireless Corne for almost a year now and I love every bit of its design and simplicity! It's my first ortho, first split keyboard and your design motivated me to solder and build it myself from scratch, even though I never soldered SMDs before.
I love the unified look of the v4, but I have a few questions regarding it, apologies if I missed any docs that answer them:

Does the v4 support wireless? I guess, firstly does it support a battery? And if yes, I guess the best place for it is where the two new keys are?
Secondly, ZMK & RP2040 don't support split wireless keyboards yet if I'm not mistaken, right?
Which PCB manufacturer are you using? Do you assemble the board yourself or choose to have the boards assembled?
Is it possible to solder the v4 with a soldering iron, or am I right to think that it would be very difficult, especially for parts like the RP2040?
Are the "v4 Soldering" versions close to release? No pressure!
Judging from the design, you are releasing the v4 only with a non removable RP2040, right? No plans for a removable MCU.

Thanks again, keep up the good work!

Also will it be possible for new version to be both wireless and wired, as with previous version it wasn't recommended due to way TRRS provided power to other half while battery was built in .

The V4 PCB Foostan has published is wired only due to its on-board microcontroller.

The V4 PCB Foostan has published is wired only due to its on-board microcontroller.

Doesn't the RP2040 support wireless? Or does that require components on the microcontroller's board/shield (which is not part of this design)?

The RP2040 on its own is not a wireless microcontroller. Boards like the Pi Pico W have a separate wireless module.

Furthermore to your original points, the v4 will not be hand assembly friendly, unless you have EXTENSIVE reflow soldering experience.

Thank you for the clarifications 🙏

Does the v4 support wireless? I guess, firstly does it support a battery? And if yes, I guess the best place for it is where the two new keys are?

Wireless is not supported. There are no plans to support it in the future. In Japan, there are strict laws regarding wireless, and it is not possible to use the module freely. Since this is an open-source project, I hope that some people will use it as a basis for the wireless version, as was the v3.

Which PCB manufacturer are you using? Do you assemble the board yourself or choose to have the boards assembled?

Files for the JLCPCB we be available

Is it possible to solder the v4 with a soldering iron, or am I right to think that it would be very difficult, especially for parts like the RP2040?

Basically, I expect to do PCBA.

Are the "v4 Soldering" versions close to release? No pressure!

I'll create after release v4.

Judging from the design, you are releasing the v4 only with a non removable RP2040, right? No plans for a removable MCU.f

Yes. There is no plan for a removable MCU.

Will 3x5 cases be added?

I plan to create the case for 3x5

can I use the case for v3?

No, v4 is not compatible v3

I'll close this issue. If you have any question and concern, please create a new issue.


Update winit to 0.17.0 (#1055)

That seems to work fine.
Tested on macOS 10.13.6 with the following commands:
cargo test
cargo run --example window
cargo run --example fullscreen
cargo run --example transparent  # ❤ that one
cargo run --example multiwindow

Incoming!

Great!

Never mind the "revert" commit above – I played around thinking "GitHub sure does not immediately create a revert (commit) when pushing that Revert button"...


Fixes NotificationChannel error on Android 8.0

Description
Added a NotificationChannel which is required for GCM push notifications to work on Android 8.0
Related Issue
#2421
Motivation and Context
When sending a push notification to a device running Android 8.0, the following message was displayed: Developer warning for package "my-package". Failed to post notification on channel "null". See log for details.'
How Has This Been Tested?
I have tested this on Android 8.0 and 7.1 emulators and now correctly receive push notifications
Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes.
[x] All new and existing tests passed.

Thanks for contributing!
I may be out of touch with the full picture on this feature, but how does this differ from what we already have at:? https://github.com/phonegap/phonegap-plugin-push/blob/cb85fbf69c2c7d64a3b0d403517e6c1c533aa0a2/src/android/com/adobe/phonegap/push/PushPlugin.java#L187
We create and setup a default NotificationChannel during .init() so that we always have at least one, using the same condition you did:
https://github.com/phonegap/phonegap-plugin-push/blob/cb85fbf69c2c7d64a3b0d403517e6c1c533aa0a2/src/android/com/adobe/phonegap/push/PushPlugin.java#L145

@maleriepace first thanks for the PR it looks like it works great. Although I am hesitant to merge it into the 1.x stream. I would really like people to upgrade to the 2.x stream which already provides support for Android 8 and soon to be Android 9. I would really like for folks to upgrade to 2.x ASAP as support for GCM is going away and the upgrade to FCM is not really a big deal.
Thoughts?

As someone who uses the plugin we would love to be able to upgrade to 2.x . The challenge we have is our vendor that we use for sending push still is stuck on GCM so for now that's the only choice we have. We are pushing them to move to FCM but they aren't very responsive. We are coming up with other vendors if/when we need to, but it's not a quick thing.
So that why we at least would really appreciate a new 1.x point release that has these latest changes in it.

hello guys,
this changes works on Android 8.1 when I build android-armv7-debug.apk,  but if I signed this apk for play market, push not received on my phone, any ideas?

Hi @macdonst,
It is possible to upgrade plugin v1.x manual for support channels on android 8.1 ?

Sorry folks, I'm not going to be doing another 1.x release. We are gearing up for a 3.0.0 soon and there is only so much time to go around. If you really are stuck with GCM for now then you can use the Coyote-Logistics/phonegap-plugin-push fork until you get onto FCM.
@maleriepace I appreciate the PR but I won't be merging it. Please note it has nothing to do with the quality of the code I just can't continue to support 1.x. It would be awesome if you made more contributions in the future though.

@macdonst @maleriepace Could we add a link in the docs to that fork for people looking for 1.x "support", and fully deprecate 1.x with 3.x?


package.json should use conditional exports

This package ships with multiple builds, however only the cjs build is exposed in the package.json. I think using conditional exports would resolve to the es6 build when using import and the cjs build when using require.

Resolved by #741 .


x/tools/gopls: incorrect placeholders for aliased types

What version of Go are you using (go version)?

golang.org/x/tools/gopls v0.1.3
<EMAIL_ADDRESS>h1:2RQrzcrEYVmfqqLlivm/WQAKgrN3esjyGgkI4UhN/a0=
<EMAIL_ADDRESS>h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=
<EMAIL_ADDRESS>h1:SqwJrz6xPBlCUltcEHz2/p01HRPR+VGD+aYLikk8uas=

Go info
-------
go version go1.12.7 darwin/amd64

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/chines209/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/chines209/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/zs/qv8flyxx1zl_nmdkklb5p15sz6zd1t/T/go-build867357531=/tmp/go-build -gno-record-gcc-switches -fno-common"

Does this issue reproduce with the latest release?
Yes.
What did you do?
I declared a function type struct field. The function has a parameter and return value with a type that is an exported alias of a type in an internal package my code doesn't have access to. For example:
import "golang.org/x/net/ipv4"

type mockAppender struct {
	appendMessages func(now time.Time, ms []ipv4.Message) ([]ipv4.Message, bool)
	stopped        func()
}

I then declare type literals for mockAppender in VSCode with the gopls.usePlaceholders option enabled.
What did you expect to see?
When I type a struct literal for the above type and add the appendMessages field, I expect the generated placeholder to reference types my code has access to, specifically:
ma := mockAppender{
	appendMessages: // placeholder -> func(now time.Time, ms []ipv4.Message) ([]ipv4.Message, bool, StepTime),
}

What did you see instead?
A placeholder that referenced types from a package my code cannot import that is type that ipv4.Message aliases. Specifically:
ma := mockAppender{
	appendMessages: // placeholder -> func(now time.Time, ms []socket.Message) ([]socket.Message, bool, StepTime),
}

Thanks for filing this issue! This is lower priority for us, so while I will try to fix this when I get a chance, if anyone else is interested in contributing a fix for this, please go ahead!

Hi @stamblerre ,
I'm interested to look into this issue.
I think the problem is related to types.TypeString() function in this line completion_format.go
Am I in the right direction? Thanks.

@wangfenjin: The placeholders for a function are actually determined in the functionCallSnippet function in completion_snippet.go. I would suggest getting started here by adding a test case and running the gopls tests. Examples of the completion snippet tests can be found here.

Hi @stamblerre ,
After some investment, I find it's a placeholder for struct field which determined by structFieldSnippet, which in turn relies on types.TypeString(). I think I should fix this in golang/go package.

Hi @stamblerre ,
Seems it's intended to return the underlining type for alias, please refer to types/decl.go. I think we can't change the logic here.
Do you have any suggestions?

Ah I see, thanks for investigating this. Looks like there's no way for us to to get back the alias information from the go/types package. An alternative solution would be for us to always use the file's AST when constructing the placeholders. That would mean replacing the logic that uses types.TypeString. This would be similar to the logic that gets the item's documentation (see https://github.com/golang/tools/blob/9c6d90b5a7d0c5de88404edf63ae60750868bf0a/internal/lsp/source/completion_format.go#L119).


Dashboard: Add issue graph

Graph visualizing open, resolved, closed at different points in time

Feedback: Maybe only include open & resolved issues in graph

There are multiple potential visualizations. All in common have x-axis = time and y-axis = number of occurrences of some event.
Variants:

Show activity: Show how active the construction site is. Track occurrence of registeredAt, resolvedAt, closedAt.
Show health: Show if construction site is getting better or worse. Track occurrence of registreredAt and closedAt.
Show progress: Show whether more or less issues are open. Count open issues by time span.
Show size: Show how many issues exist. Count open, resolved and closed issues by time span.

Aspects:

Ensure graph does not nudge to create less issues (trying to get "good score").


Add cookie banner to legacy OSF frontend [PLAT-902]

Purpose
Add a banner to alert non-logged in users that the OSF uses cookies. This is dismissible and shouldn't show up for logged-in users.

Note: Appears over the slide-in banner that asks non-logged in users to join the OSF.

Changes

add HTML and CSS for banner
javascript that adds a cookie when accepted and hides the banner

QA Notes
This banner:

Is for legacy OSF frontend
Should only appear for non-logged-in users who haven't previously clicked Accept
Clicking Accept sets a cookie that will hide the banner as long as that cookie is set
The cookie banner should appear over the pre-existing "Join the OSF" banner that slides in

both alerts are separately dismissible.

Documentation
None necessary
Side Effects
None anticipated
Ticket
https://openscience.atlassian.net/browse/PLAT-902

@erinspace, the background color of the banner is meant to be the same color as the navbar. Are those the same colors in the screenshot and my eyes are just deceiving me?

@caseyrollins I struggled with this too! According to the OSF Style Guide #204762 is indeed "OSF Blue" but I thought it also looked really light.  Doing a hover-over it looked more like #3333 but it's even a different color in Baylee's PR sooo basically I'll do whatever, was just defaulting to the style guide!

Ah, thank you for digging! It looks like #263947 to me when I inspect the element, but I can't seem to find that in any of the ember repositories. @laurenbarker or @brianjgeiger, can you point us to where the navbar color is defined?

I believe it's here and here. The navbar isn't actually a solid color :/

@caseyrollins updated to a :hot: :fox: and changed the background color to match the color in the osf-style repo

Updated links to white underlined text as specified in https://github.com/CenterForOpenScience/ember-osf/pull/397#discussion_r201705581

Updated link color!


No 'category_depth' metadata returned for markdown partitioning?

I tried to use the partition function on a markdown document. I would like to know for each element what the category_depth is.
Markdown has several heading levels (h1, h2, etc), thus I assumed this depth would be in the element metadata. This does not seem to be the case.
When looking at the source code for the function partition_md, I see that the markdown text is converted to html with the markdown library. In the small example below I apply both partition_md and partition_html on the original and converted markdown respectively.
When applying partition_md directly, no category_depth is returned, when first converting to html and applying partition_html then the category_depth appears in element metadata.
How is this possible? Internally partition_md calls partition_html, so why does the category_depth metadata get lost? I cannot find the piece of code in partition_md that is causing this behavior.
All help is greatly appreciated! :)
Example:
from unstructured.partition.auto import partition_md, partition_html
import markdown

markdown_text = """
# Title

Some text

## Heading 1

more text

- a
- b
- c

"""

### partition_md ###

elements = partition_md(text=markdown_text)

print(elements[0].to_dict())
# Result: {'type': 'Title', 'element_id': '7e8cd2056da73a7fefb6cd91f4e5d199', 'text': 'Title', 'metadata': {'page_number': 1, 'languages': ['eng'], 'filetype': 'text/markdown'}}

### partition_html ###

# the function partition_md calls partition_html after transforming markdown to html.
html_text = markdown.markdown(markdown_text)

# Apply partition_html
elements = partition_html(text=html_text)

print(elements[0].to_dict())
# Result: {'type': 'Title', 'element_id': '7e8cd2056da73a7fefb6cd91f4e5d199', 'text': 'Title', 'metadata': {'category_depth': 0, 'page_number': 1, 'languages': ['eng'], 'filetype': 'text/html'}}

Hi @rafaelvanbelle, document hierarchy metadata (e.g. category-depth) is not yet supported for Markdown. I'll leave this issue open as an enhancement request :)

hello, is document hierarchy metadata (e.g. category-depth) supported for PDF at the moment?

@rafaelvanbelle, apologies, my mistake, hierarchy metadata is supported for Markdown. Actually not directly, but because partition_md() converts the MD document to HTML, and the HTML partitioner supports hierarchy metadata, Markdown gets it too.
I believe the gap you mentioned is resolved by #3218. I can't point you to exactly what changed produced the fix, but the Markdown you provided produces elements with document hierarchy metadata.


Markdown: Change Security Preview Settings set to disabled.  tags with absolute paths are still being blocked from preview

Does this issue occur when all extensions are disabled?: Yes

VS Code Version: Version: 1.85.1 (user setup)
OS Version: Windows 11

Steps to Reproduce:

Set Markdown: Change Security Preview Settings set to disabled
Attempt to display a image with an absolute path in the preview pane, either ![](C:\media\image_2.png) or

![](./image_1.png)

![](C:\media\image_2.png)

I need to write Markdown document that must use absolute paths for media files, but the Markdown preview pane fails to display linked media using absolute paths.
After reading the documentation and some other articles and asking over at Reddit and Stack Overflow, this is is done so by design.
I have a machine that is always offline, I opted to disable this security feature but I the preview will still not show HTML/MD image tags that use absolute paths. Please the following image:

Any help would be greatly appreciated!

The described behavior is how it is expected to work. If you disagree, please explain what is expected and what is not in more detail. See also our issue reporting guidelines.
Happy Coding!

This is by-design. Allowing arbitrary local file reads is potentially so bad that we don't provide a way to opt out, especially given that limited use cases for using absolute paths


Feature/docs deployment

#patch#

Changes Unknown when pulling 833481c6d0d10836a7f75cab726103c38ee7c666 on feature/docs-deployment into ** on master**.

Changes Unknown when pulling 833481c6d0d10836a7f75cab726103c38ee7c666 on feature/docs-deployment into ** on master**.


Replacements are off with new correct_lines impl

Describe the bug

--- a/node/subsystem-util/src/lib.rs
+++ b/node/subsystem-util/src/lib.rs
@@ -462,7 +462,7 @@ pub mod metrics {
                /// Try to register metrics in the Prometheus registry.
                fn try_register(registry: &prometheus::Registry) -> Result<Self, prometheus::PrometheusError>;

-           /// Convience method to register metrics in the optional Prometheus registry.
+         /// Convenience method to register metrics in the optional Prometheus registry.
                /// If the registration fails, prints a warning and returns `Default::default()`.
                fn register(registry: Option<&prometheus::Registry>) -> Self {
                        registry.map(|r| {

should not mess with indentation.
To Reproduce
Steps to reproduce the behaviour:

cargo run -- fix ./parity/polkadot/node/subsystem-util/src/lib.rs
Add custom fixes or pick suggested ones
Go through with it till the end.
Observe the git diff

Expected behavior

Properly aligned replacements.
Pplease complete the following information:

System:  Fedora 32 x86_64
Obtained:  git
Version: <!-- run $(cargo spellcheck --version) --> 92421f81

Additional context

Merge of #118 seems to be related here.

Unreproducible, seems to be related to a screwed up remote terminal eating some whitespace chars or interpreting them differently :man_shrugging:
Feel free to re-open.


Make SkeletonTable modular

Preview: https://react-component-groups-pr-component-groups-352.surge.sh


texlive: repstopdf not included

Issue description
repstopdf does not seem to be included anywhere in texlive or ghostscript. This means that texlive can't include .eps figures in pdf output.
Steps to reproduce
$ nix-shell -p texlive.combined.scheme-full --pure
$ repstopdf
repstopdf: command not found

Technical details
 - system: `"x86_64-linux"`
 - host os: `Linux 4.14.76, NixOS, 18.09.932.09195057114 (Jellyfish)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.1.1`
 - channels(root): `"nixos-18.09.932.09195057114"`
 - channels(alex): `"nixos-19.03pre155751.45a419ab5a2"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

@veprbl  Thanks!


[CosmosDB-preview] Adding capability to convert database account backup policy to continuous and migrating to track 2 sdk

This checklist is used to make sure that common guidelines for a pull request are followed.

For new extensions:

[ ] My extension description/summary conforms to the Extension Summary Guidelines.

About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your PR is merged into master branch, a new PR will be created to update src/index.json automatically.
The precondition is to put your code inside this repo and upgrade the version in the PR but do not modify src/index.json.

CosmosDB-preview

@kavskalyan, please fix the CI first.

@kavskalyan, please fix the CI first.

@jsntcy , Fixed the CI. Please let me know if I need any more changes.


[Enhancement] Support parens relation syntax in new Parser

What type of PR is this：

[ ] bug
[ ] feature
[x] enhancement
[ ] refactor
[ ] others

Which issues of this PR fixes ：

Fixes #6855
Problem Summary(Required) ：

[FE PR Coverage check]
:heart_eyes: pass : 17 / 20 (85.00%)
file detail

path
covered line
new line
coverage

:large_blue_circle:
com/starrocks/sql/analyzer/QueryAnalyzer.java
9
12
75.00%

:large_blue_circle:
com/starrocks/sql/parser/AstBuilder.java
8
8
100.00%


Updating 'python3 3.7.2' to 'python3 <IP_ADDRESS>00721' failed

Describe the bug and expected behavior
Updating 'python3 3.7.2' to 'python3 <IP_ADDRESS>00721' failed
To Reproduce
run  "cup all" command in CMDer
Screenshots
If applicable, add screenshots to help explain your problem.

Version

OS: Windows 10 Enterprise ,  64 bit

Additional context
Failures  python3 (exited 1) - python3 not upgraded. An error occurred during installation:  Updating 'python3 3.7.2' to 'python3 <IP_ADDRESS>00721' failed. Unable to find a version of 'libraries.python2.fireeye' that is compatible with 'python3 <IP_ADDRESS>00721'.  cmder (exited 2) - Error while running 'C:\ProgramData\chocolatey\lib\Cmder\tools\chocolateyInstall.ps1'.  See log for details.  dnspy.flare (exited 404) - Error while running 'C:\ProgramData\chocolatey\lib\dnspy.flare\tools\chocolateyInstall.ps1'.  See log for details.  syspin (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\syspin\tools\chocolateyInstall.ps1'.  See log for details.

@pprpst This was an unfortunate bug in some earlier versions of Commando. I have since removed the libraries.python2.fireeye dependency from all of the Commando packages, however, some FLARE VM packages still require it so it is going to stick around.
In the mean time, if you need Python 3.8 you should be able to update manually with cup -y -f python3 and it should not break any of the other packages.
Also, unless you upgrade (reinstall Commando) to the current version of Commando (2020.2) this annoyance might continue to plague you 😄

TX ! ... will reinstall all. keep up good work.


Add development branch on ReadTheDocs as version to generate

@davidt0x I believe you are the maintainer for the ReadTheDocs project where the https://mdf.readthedocs.io is generated.
As there will be some updates to the documentation being worked on, could you add at least the development branch of MDF to the list of branches/versions being generated here: https://readthedocs.org/projects/mdf/versions?
Alternatively if you add pgleeson as an admin user I can do it.

I've been added, thanks!


FIREFOX: SchoolCard components have smaller text

Bug Report
What is the current behavior?

What is the expected behavior?

What steps did you take to get this behavior?
I went to OperationCode.org on both Firefox and Chrome and examined the differences.
Additional Info
Operating System
MacOS Sierra 10.12.5
Browser
Firefox 53.0.3

This no longer seems to be an issue.


OfficeOnlineServerDsc: OptIn to DSC Resource Meta Tests

Pull Request (PR) description
This PR opts in to the following DSC Resource meta tests:

Common Tests - Validate Module Files
Common Tests - Validate Script Files
Common Tests - Relative Path Length
Common Tests - Validate Markdown Links

To pass the Common Tests - Validate Script Files, the following files had their BOM mark removed:

Modules/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerInstall/MSFT_OfficeOnlineServerInstall.psm1
Modules/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerInstallLanguagePack/MSFT_OfficeOnlineServerInstallLanguagePack.psm1
Modules/OfficeOnlineServerDsc/DSCResources/MSFT_OfficeOnlineServerMachine/MSFT_OfficeOnlineServerMachine.psm1

This Pull Request (PR) fixes the following issues
None
Task list

[ ] Added an entry under the Unreleased section in the CHANGELOG.md.
Entry should say what was changed, and how that affects users (if applicable).
[ ] Resource documentation added/updated in README.md.
[ ] Resource parameter descriptions added/updated in schema.mof
and comment-based help.
[ ] Comment-based help added/updated.
[ ] Localization strings added/updated in all localization files as appropriate.
[ ] Examples appropriately added/updated.
[ ] Unit tests added/updated. See DSC Resource Testing Guidelines.
[ ] Integration tests added/updated (where possible). See DSC Resource Testing Guidelines.
[ ] New/changed code adheres to DSC Resource Style Guidelines and Best Practices.

This change is

Codecov Report

Merging #48 into dev will not change coverage.
The diff coverage is 100%.

@@        Coverage Diff        @@
##           dev   #48   +/-   ##
=================================
  Coverage   92%   92%
=================================
  Files        4     4
  Lines      273   273
=================================
  Hits       252   252
  Misses      21    21

Can someone review this PR?


get_odesol returns solution where everything is zero

I am developing a function for https://github.com/sebapersson/PEtab.jl/issues/100, and want to use get_odesol in the process of doing so. However, it seems to output something that is uniformly 0?
Example:
using Catalyst, PEtab

rn = @reaction_network begin
    kB, S + E --> SE
    kD, SE --> S + E
    kP, SE --> P + E
end

u0 = [:E => 1.0, :SE => 0.0, :P => 0.0]
p_true = [:kB => 1.0, :kD => 0.1, :kP => 0.5]

# Simulate data.
using OrdinaryDiffEq
oprob_true = ODEProblem(rn, [:S=>1.0; u0], (0.0, 10.0), p_true)
data_sol = solve(oprob_true, Tsit5(); saveat=1.0)
times, data = data_sol.t[2:end], (0.8 .+ 0.4*rand(10)) .* data_sol[:P][2:end]

# Plot simulated data.
using Plots
plot(data_sol; idxs=:P, label="True solution", lw=8)
plot!(times, data; label="Measurements", seriestype=:scatter, ms=6, color=:blue)

# Make PETab problem.
begin
    @unpack P = rn
    obs_P = PEtabObservable(P, 0.5)
    observables = Dict("obs_P" => obs_P)

    par_kB = PEtabParameter(:kB)
    par_kD = PEtabParameter(:kD)
    par_kP = PEtabParameter(:kP)
    params = [par_kB, par_kD, par_kP]

    using DataFrames
    measurements = DataFrame(obs_id="obs_P", time=times, measurement=data)

    petab_model = PEtabModel(rn, observables, measurements, params; state_map=u0)
    petab_problem = PEtabODEProblem(petab_model)
end

using Optim
p0 = generate_startguesses(petab_problem, 1)
res = calibrate_model(petab_problem, p0, IPNewton())

sol_fetched = get_odesol(res, petab_problem)
plot!(sol_fetched; idxs=:P, label="Fetched solution", lw=8)

oprob_fitted = remake(oprob_true; p=get_ps(res, petab_problem))
fitted_sol = solve(oprob_fitted, Tsit5())
plot!(fitted_sol; idxs=:P, label="Fitted solution", lw=8)

(here, the green is using get_odesol, the purple is with get_ps and then simulate using it)

Actually, think there's an error in the example, all good.

Thanks for noticing the error in the code. In addition, something that can cause problems is that it is important to remember the initial values which can be obtained via get_u0:
oprob_fitted = remake(oprob_true; p=get_ps(res, petab_problem), u0=get_u0(res, petab_problem))
fitted_sol = solve(oprob_fitted, Tsit5())
plot!(fitted_sol; idxs=:P, label="Fitted solution", lw=8)

As for #100 in the PEtabODEProblem there is a function named petab_problem.compute_simulated_values(x0) (which is lacking from the docs which I should fix), which for a parameter vector x0 computes the simulated values (with correct observable values, transformation etc...) following the order that can be found in the internal MeasurementsInfo struct, which also stores simulation conditions ids.
So for #100 maybe the best solution would be to just use petab_problem.compute_simulated_values(x0), and then to get the observable data just use the data in MeasurementsInfo, this would also require to put MeasurementsInfo into the PEtabODEProblem struct (it is not a part of it currently, but should)


Dark mode switch corrections

the Icon was wrapped in a div which means that it was the wrapper that was rotating rather than the Icon its self.
It was working by coinsidence. Sorry.
I used a css transition and a cubic-bezier function to give a bit of bounce and to get rid of framer-motion as dependency, whitch I think isnt nececary for this use case.

It's nice not do depend on framer indeed.
That said, "work by coincidence" is not the appropriate expression here. I would be more like a backward solution.
However, remember when you update the dependency that the yarn.lock should be updated accordingly by running yarn.
I don't understand why the CI passes here. It is supposed to give an error in this case...
Thanks for the PR


TransferManager::RetryUpload(...) causes TransferHandle::WaitUntilCompleted() to hang indefinitely when transferred bytes > total bytes

Confirm by changing [ ] to [x] below to ensure that it's a bug:

[x] I've gone though Developer Guide and API reference
[x] I've searched for previous similar issues and didn't find any solution

Describe the bug
When transferring data from an in-memory buffer to S3 using the TransferManager, transfer failures were sometimes seen (which is reasonable and almost expected due to the nature of uploads/downloads).  When they occurred, our code's retry logic invoked TransferManager::RetryUpload.  When we use the returned handle object to call WaitUntilFinished, the method hung indefinitely.
Thread 3 (Thread 0x2acef7f6d700 (LWP 23961)):
#0  0x00002aceecbd1a35 in pthread_cond_wait@@GLIBC_2.3.2 () from /usr/lib64/libpthread.so.0
#1  0x00002aceee398aec in std::condition_variable::wait(std::unique_lock<std::mutex>&) () from /usr/lib64/libstdc++.so.6
#2  0x00002acee60da50a in Aws::Transfer::TransferHandle::WaitUntilFinished (this=0x2ad107004198) at <FOSS-repo>/aws-sdk-cpp-1.8.25/aws-cpp-sdk-transfer/source/transfer/TransferHandle.cpp:340
... (redacted calling code)

Forcing a core with gcore and examining the memory showed the following contents of the TransferHandle:
$1 = {m_isMultipart = {<std::atomic_bool> = {_M_base = {_M_i = true}}, <No data fields>},
  m_multipartId = "REDACTED MULTIPART ID", m_direction = Aws::Transfer::UPLOAD, m_completedParts = std::map with 22 elements = {
    [1] = std::shared_ptr (count 1, weak 0) 0x2acfe8002318, [2] = std::shared_ptr (count 1, weak 0) 0x2acfe8097e28, [3] = std::shared_ptr (count 1, weak 0) 0x2acfe8097ac8, [4] = std::shared_ptr (count 1, weak 0) 0x2acfe8000d28,
    [5] = std::shared_ptr (count 1, weak 0) 0x2acfe8000d98, [6] = std::shared_ptr (count 1, weak 0) 0x2acfe8097ec8, [7] = std::shared_ptr (count 1, weak 0) 0x2acfe8097f38, [8] = std::shared_ptr (count 1, weak 0) 0x2acfe8000e98,
    [9] = std::shared_ptr (count 1, weak 0) 0x2acfe8000f08, [10] = std::shared_ptr (count 1, weak 0) 0x2acfe80978e8, [11] = std::shared_ptr (count 1, weak 0) 0x2acfe8097958, [12] = std::shared_ptr (count 1, weak 0) 0x2acfe8097148,
    [13] = std::shared_ptr (count 1, weak 0) 0x2acfe80971b8, [14] = std::shared_ptr (count 1, weak 0) 0x2acfe8001a28, [15] = std::shared_ptr (count 1, weak 0) 0x2acfe8001a98, [16] = std::shared_ptr (count 1, weak 0) 0x2acfe8001b08,
    [17] = std::shared_ptr (count 1, weak 0) 0x2acfe8001878, [18] = std::shared_ptr (count 1, weak 0) 0x2acfe80018e8, [19] = std::shared_ptr (count 1, weak 0) 0x2acfe8001958, [20] = std::shared_ptr (count 1, weak 0) 0x2acfe8002018,
    [21] = std::shared_ptr (count 1, weak 0) 0x2acfe8002088, [22] = std::shared_ptr (count 1, weak 0) 0x2acfe80020f8}, m_pendingParts = std::map with 0 elements, m_queuedParts = std::map with 0 elements,
  m_failedParts = std::map with 0 elements, m_bytesTransferred = {<std::__atomic_base<unsigned long>> = {_M_i = 111137335}, <No data fields>}, m_lastPart = {<std::atomic_bool> = {_M_base = {_M_i = false}}, <No data fields>},
  m_bytesTotalSize = {<std::__atomic_base<unsigned long>> = {_M_i = 110989879}, <No data fields>}, m_offset = 0, m_bucket = "REDACTED BUCKET", m_key = "REDACTED KEY",
  m_fileName = "", m_contentType = "binary/octet-stream", m_versionId = "", m_metadata = std::map with 2 elements = {["ETag"] = "\"REDACTED ETAG\"",
    ["sha384-hash"] = "REDACTED HASH"}, m_status = Aws::Transfer::IN_PROGRESS, m_lastError = {m_errorType =<PHONE_NUMBER>, m_exceptionName = "", m_message = "",
    m_remoteHostIpAddress = "", m_requestId = "", m_responseHeaders = std::map with 0 elements, m_responseCode = Aws::Http::REQUEST_NOT_MADE, m_isRetryable = false, m_errorPayloadType = (unknown: 21530208), m_xmlPayload = {m_doc =
    0x0}, m_jsonPayload = {m_value = 0x0, m_wasParseSuccessful = true, m_errorMessage = ""}}, m_cancel = {<std::atomic_bool> = {_M_base = {_M_i = false}}, <No data fields>}, m_context = std::shared_ptr (empty) 0x0, m_handleId = {
    m_uuid = "REDACTED UUID"}, m_createDownloadStreamFn = {<std::_Maybe_unary_or_binary_function<std::basic_iostream<char, std::char_traits<char> >*>> = {<No data fields>}, <std::_Function_base> = {
      static _M_max_size = 16, static _M_max_align = 8, _M_functor = {_M_unused = {_M_object = 0x2acf200a9860, _M_const_object = 0x2acf200a9860, _M_function_pointer = 0x2acf200a9860,
          _M_member_pointer = (void (std::_Undefined_class::*)(std::_Undefined_class * const)) 0x2acf200a9860, this adjustment<PHONE_NUMBER>701555304}, _M_pod_data = "`\230\n ?*\000\000http://c"}, _M_manager = 0x0},
    _M_invoker = 0x2acedd9a72ac <std::_Function_handler<std::iostream* (), MY_CLASS::MY_METHOD(char const*, void*, unsigned long, char const*)::{lambda()#1}>::_M_invoke(std::_Any_data const&)>},
  m_downloadStream = 0x0, m_downloadStreamLock = {<std::__mutex_base> = {_M_mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}},
        __size = '\000' <repeats 39 times>, __align = 0}}, <No data fields>}, m_partsLock = {<std::__mutex_base> = {_M_mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0,
          __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 39 times>, __align = 0}}, <No data fields>}, m_statusLock = {<std::__mutex_base> = {_M_mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 1,
          __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}}, __size = '\000' <repeats 12 times>, "\001", '\000' <repeats 26 times>, __align = 0}}, <No data fields>}, m_waitUntilFinishedSignal = {_M_cond = {
      __data = {__lock = 0, __futex = 3, __total_seq = 2, __wakeup_seq = 1, __woken_seq = 1, __mutex = 0x2ad107004418, __nwaiters = 2, __broadcast_seq = 1},
      __size = "\000\000\000\000\003\000\000\000\002\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\001\000\000\000\000\000\000\000\030D\000\a?*\000\000\002\000\000\000\001\000\000", __align =<PHONE_NUMBER>8}},
  m_getterSetterLock = {<std::__mutex_base> = {_M_mutex = {__data = {__lock = 0, __count = 0, __owner = 0, __nusers = 0, __kind = 0, __spins = 0, __elision = 0, __list = {__prev = 0x0, __next = 0x0}},
        __size = '\000' <repeats 39 times>, __align = 0}}, <No data fields>}}

Note that the m_bytesTransferred of 111137335 is larger than the m_bytesTotalSize of 110989879.
Further examination of the PartStates in the completed parts map showed:
(gdb) print (Aws::Transfer::PartState)*0x2acfe8002318
$2 = {m_partId = 1, m_eTag = "\"1442c59f2ff1962d280da5c87b9bec6e\"", m_currentProgressInBytes = 5242880, m_bestProgressInBytes = 5242880, m_sizeInBytes = 5242880, m_rangeBegin = 0, m_downloadPartStream = {_M_b = {_M_p = 0x0}},
  m_downloadBuffer = {_M_b = {_M_p = 0x0}}, m_lastPart = false}
(gdb) print (Aws::Transfer::PartState)*0x2acfe8097e28
$3 = {m_partId = 2, m_eTag = "\"eafba4cde6a0266da029e23bb2eb0d9d\"", m_currentProgressInBytes = 5242880, m_bestProgressInBytes = 5242880, m_sizeInBytes = 5242880, m_rangeBegin = 0, m_downloadPartStream = {_M_b = {_M_p = 0x0}},
  m_downloadBuffer = {_M_b = {_M_p = 0x0}}, m_lastPart = false}
(gdb) print (Aws::Transfer::PartState)*0x2acfe80020f8
$4 = {m_partId = 22, m_eTag = "\"b75e21897c87ec2a08a0f664622127e3\"", m_currentProgressInBytes = 889399, m_bestProgressInBytes = 889399, m_sizeInBytes = 889399, m_rangeBegin = 0, m_downloadPartStream = {_M_b = {_M_p = 0x0}},
  m_downloadBuffer = {_M_b = {_M_p = 0x0}}, m_lastPart = true}
(gdb) print (Aws::Transfer::PartState)*0x2acfe8097ac8
$5 = {m_partId = 3, m_eTag = "\"83576a3de70b4d10bbc2b54a1bd6dc52\"", m_currentProgressInBytes = 5242880, m_bestProgressInBytes = 5242880, m_sizeInBytes = 5242880, m_rangeBegin = 0, m_downloadPartStream = {_M_b = {_M_p = 0x0}},
  m_downloadBuffer = {_M_b = {_M_p = 0x0}}, m_lastPart = false}
(gdb) print (Aws::Transfer::PartState)*0x2acfe8000d28
$6 = {m_partId = 4, m_eTag = "\"f4bc83e735d6e4dc81e3b85db2542e17\"", m_currentProgressInBytes = 5242880, m_bestProgressInBytes = 5242880, m_sizeInBytes = 5242880, m_rangeBegin = 0, m_downloadPartStream = {_M_b = {_M_p = 0x0}},
  m_downloadBuffer = {_M_b = {_M_p = 0x0}}, m_lastPart = false}
(gdb) print (Aws::Transfer::PartState)*0x2acfe8000d98
$7 = {m_partId = 5, m_eTag = "\"74a180656bcbaa60859d8703f7de20b4\"", m_currentProgressInBytes = 5292032, m_bestProgressInBytes = **5292032**, m_sizeInBytes = 5242880, m_rangeBegin = 0, m_downloadPartStream = {_M_b = {_M_p = 0x0}},
  m_downloadBuffer = {_M_b = {_M_p = 0x0}}, m_lastPart = false}

The part examined as $7 above shows a current and best progress value of 5292032 which is larger than the size in bytes of 5242880.  Upon detailed examination of the code in TransferManager::HandleUploadPartResponse (line 538 in version 1.8.25), I found:
            if (pendingParts.size() == 0 && queuedParts.size() == 0 && handle->LockForCompletion())
            {
                if (failedParts.size() == 0 && handle->GetBytesTransferred() == handle->GetBytesTotalSize())
                {
                    *attempt to convert state to COMPLETED*

Since the bytes transferred and the bytes total size are not equal (in fact the amount transferred is more), then the upload never transitions to a COMPLETED state and any WaitUntilFinished calls will never return.
I suspect that the culprit here is that somewhere along the retry path, the PartState is not getting reset (via the handy Reset method) which causes the m_currentProgressInBytes variable to retain the original progress that was made in the initial upload attempt.
SDK version number
aws-sdk-cpp-1.8.25 (aws-c-common-0.4.51, aws-checksums-0.1.6, aws-c-event-stream-0.1.8).  Note that while this is an older version, I did look at changes to the TransferManager and TransferHandle classes since that release and did not note anything that would seem to solve this issue.
Platform/OS/Hardware/Device
AWS EC2, various instance sizes
Red Hat Enterprise Linux Server release 7.9 (Maipo)
RHEL 3.10.0-1160.11.1.el7.x86_64
To Reproduce (observed behavior)
Since this only occurs on failure to upload a file to S3, which happens very infrequently and there is little in the way of exposed APIs available to simulate this condition, I am not able to provide a SSCCE that demonstrates this.  I can, however, provide a synopsis of our implementation.  The localBufferPtr variable is the in-memery buffer (as a void*) that we are attempting to upload.
      // Create the AWS-style buffer for it to upload the data from
      Aws::Utils::Stream::PreallocatedStreamBuf* writeBuffer =
         Aws::New<Aws::Utils::Stream::PreallocatedStreamBuf>
            ("writeBuffer", reinterpret_cast<unsigned char*>(localBufferPtr), length);

      std::shared_ptr<Aws::IOStream> writeStream = Aws::MakeShared<Aws::IOStream>(
         "writeStream", writeBuffer);

      auto handle = myTransferManager->UploadFile(
         writeStream, storageRoot, simplePath.c_str(), "binary/octet-stream", metadata);

      handle->WaitUntilFinished();
      ***at this point, the transfer fails***

      *** our max retries is 5, although every process that has hung never makes it past the first retry attempt ***
      for( int i=0; !retVal->wasTransferSuccessful()
                 && i < myMaxTransferRetries; i++ )
      {
         *** sleep 500 milliseconds ***
         handle = myTransferManager->RetryUpload(writeStream, handle);

         handle->WaitUntilFinished();
         *** The process hangs on the above call indefinitely (caller of the stack trace at the top of this bug report) ***
      }

The TransferManager was configured with:
max thread pool = 50
multi part buffer size = <SDK default, which I believe is currently 5MB>
total buffer size = 262144000
The S3Client was configured with (due to issue https://github.com/aws/aws-sdk-cpp/issues/271):
connect timeout = 60ms
request timeout = 60ms
Expected behavior
I expected that the TransferManager would either:
a) correctly track the number of bytes transferred by accounting for the fact that some bytes may have been transferred in previous attempts
or
b) allow the transfer to be marked as completed if all parts are completed, no parts are failed/pending/queued, and the number of bytes transferred equals or exceeds the number of bytes requested to be transferred by the user of the TransferManager API.
Preferably option a) would be the ultimate behavior exhibited since that is a much more accurate manner of accounting in this situation.
Logs/output
All relevant output was provided in the description above (no logging was turned on during these occurrences)
Additional context
The system experiencing this issue is a data processing system that uploads millions of files of varying sizes (a few KB to 100s of MB) to S3 every day, but this issue was only found in 4 processes out of hundreds over the course of several days to a week of processing.  Thus, reproducing the issue in a similar manner would likely take either some intense resources, or direct access to lower level API calls that would result in this behavior.  Ideally, some additional unit testing surrounding the retry logic in the TransferManager/TransferHandler can be constructed to reproduce this issue.

Hi @devyndraen ,
Thanks for bringing this up to us and sorry for the delayed response.
Yea this seems like an overlooked edge case, I'll try and investigate see if I can figure a way to reliably reproduce it.


description not presented in the ProcessedCreateParams

According to the type sig, I'm expecting to retrieve my description set in the RawCreateParams previously.
import { z } from 'zod'

const foo = z.string({ description: 'Foo' })
console.log(foo.description) // undefined in console

Then I check the code and find out that the processing function seems to have no way passing the description data out.
Is this a bug or I just miss something? Since I'm not really familiar with the codebase, just want to be sure before a PR.

My bad, after a thorough check, it turns out to be caused by another framework's cache mechanism :)

It turns out that I'm testing on my forked version, so there is really an issue. (sigh)


Failures on [vm] on https://dart-review.googlesource.com/c/sdk/+/322720

There are new test failures on https://dart-review.googlesource.com/c/sdk/+/322720
The tests
vm/dart/awaiter_stacks/stream_methods_test/1 Timeout (expected Pass)

are failing on configurations
vm-aot-linux-release-simarm_x64

//cc @mraleph


User should be informed about overriding his inline styles

Example:
<vaadin-form-layout>
  <vaadin-text-field label="First Name" value="Jane"></vaadin-text-field>
  <vaadin-text-field label="Last Name" value="Doe"></vaadin-text-field>
  <button style="width: 100px">Submit</button>
</vaadin-form-layout>

Inline style for the submit button will be overriden by form-layout without any notification.
Suggestion: throw console.warning about inline style overriding.
(This is the DX tests finding)

If a developer intentionally wants to include a button inside a form layout, it doesn't sound reasonable to show a console warning always. Closing.


Refactor code to return interactions as sparse/dense Eigen matrices

Closes https://github.com/paulsengroup/hictk/issues/171

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

Project coverage is 84.92%. Comparing base (4075162) to head (4bad2f5).
Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #176      +/-   ##
==========================================
+ Coverage   84.85%   84.92%   +0.06%
==========================================
  Files         117      119       +2
  Lines       10037    10076      +39
==========================================
+ Hits         8517     8557      +40
+ Misses       1520     1519       -1

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


no_std support for ReadCache

Hello! I'm using this wonderful crate in a no_std environment. In my particular case, I'm parsing UKI (PEs) files on an ESP (vfat) partition using the fatfs crate.
fatfs mainline branch works in no_std by simply defining their own variants of std::io::Read/Seek traits: https://github.com/rafalh/rust-fatfs/blob/master/src/io.rs ... It's worth noting that the current latest published release depends on the now-defunct core_io crate.
As it happens, I was able to get this working satisfactorily by simply duplicating the entirety of ReadCache + ReadCacheRange, and updating the Read+Seek trait references from std::io to fatfs. The trait signatures are otherwise identical, so everything "just worked" without me needing to wrap my head around how I might implement such a thing myself.
Which got me to thinking ... could the object crate do something similar? That is, export object::io::Read + object::io::Seek traits with some ergonomics to easily coerce std::io variants (not sure how to do that off the top of my head, my Rust-fu is weak).

Oh it's also worth noting that in no_std environment I had to explicitly bring in the memchr crate. I suppose object could also do that when std feature is absent.

Does #653 meet your needs?

I suppose object could also do that when std feature is absent.

It already does. However, it also needs the hashbrown crate, and I don't want that as a dependency all the time, so I added to no_std feature to enable this.

This is wonderful. I've just tested with your branch and confirm it works exactly as I'd hoped. Thank you!


Fill in error code and message for timeout exception

While debugging a timeout problem, I noticed that the exception message changed from its first throw and was lacking information. With this change the message now says it is a timeout exception and what the taskparameters where.

LGTM. Thank you~


XCode keep search for flutter windows path

I try to build IOS version to my flutter app
I'm using virtual box with macOC catalina
after edit flutter & app path in XCode like:

when I start to build app archive, XCode show this code
That mean its still looking for flutter windows path (C:\src\flutter..........)

what's wrong here?!

Hi @Slackgate
You need to execute flutter clean and then execute flutter run -v as you're running a project in a different environment that where it used

Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.


az aks use-dev-spaces

I am trying to setup an environment to debug a remote kubernetes pod.

I have followed the example in this article https://docs.microsoft.com/en-gb/azure/dev-spaces/quickstart-netcore I am getting the above error message and not sure how to proceed.
When the Cluster was originally created there was not an option to Enable HTTP Application Routing.

We are about to release our latest Azure Dev Spaces cli today. That should fix the issue. Meanwhile, please try to run these commands to use a dev space controller:
azds controller create
azds space select

Thank you for the quick update


how to suppress null values in cosmos-db spring repository save method

Hello,
I have a repository called "Shipment" which has following structure. I am noticing that Null values are not being suppressed when we try to insert using repository.save(shipmentObject) method. But Null values are being suppressed while using documentClient.upsertDocument(shipmentObject) method. how can we suppress null values being stored in cosmosDB  when we use springdata cosmosdb?
Code Snippet:
Shipment shipment = new Shipment();
shipment.setShipementID(id);
Shipment sp = shipmentRepository.save(shipment); ==> null values being stored in "shipmentmessage" field
documentClient.upsertDocument(shipment) ==> null values are not stored in  "shipmentmessage"  field

Shipment Repository Bean:
@JsonInclude(Include.NON_NULL)
@Document(collection = "shipment")
@DocumentIndexingPolicy(mode = IndexingMode.Lazy)
public class Shipment {
	@Id
	@JsonProperty("id")
String id;
String shipmentMessage;
...
}

Expected Output:
{
    "id": "436",
    "_rid": "Io1rAM1GtAAuAAAAAAAAAA==",
    "_self": "dbs/Io1rAA==/colls/Io1rAM1GtAA=/docs/Io1rAM1GtAAuAAAAAAAAAA==/",
    "_etag": "\"04001d06-0000-0000-0000-5b44304d0000\"",
    "_attachments": "attachments/",
    "_ts":<PHONE_NUMBER>
}

Actual Output:
{
    "id": "436",
"shipmentMessage":null,
    "_rid": "Io1rAM1GtAAuAAAAAAAAAA==",
    "_self": "dbs/Io1rAA==/colls/Io1rAM1GtAA=/docs/Io1rAM1GtAAuAAAAAAAAAA==/",
    "_etag": "\"04001d06-0000-0000-0000-5b44304d0000\"",
    "_attachments": "attachments/",
    "_ts":<PHONE_NUMBER>
}

Please let me know if you need additional details.

@senthilkrishnankr
Thanks for you issue. The implementation of this repo keep null here for keep the consistency between entity in database and java instance. But it seems the client will eliminate the null when persistent. Could u please share why you need to suppress null ? or what problem the null value brings to u ?

Thanks for reaching out to me. we don't face any functionality issue so far. But it occupies some space in the database. For my case, our shipment repository will have 30-40 columns. almost 60% of the columns value would be null when we insert data. It may get value as and when shipment progress. Sometimes it won;t have data for 60% columns. So If we suppress null values ,then I would save some space in the cosmos DB. Earlier we were using mongodb and now we are migrating towards cosmos DB. But Mongo DB did not store null values in the database while using spring data Mongo DB repository.save() method.

@senthilkrishnankr Are you still facing this issue ?

@kushagraThapar : This issue is still there. It will be useful if we could have support to suppress null fields

@mohitmate - I will take a look at this soon. Now since the repo has been moved here: https://github.com/Azure/azure-sdk-for-java/blob/master/sdk/cosmos/azure-spring-data-cosmos
I have created this issue and tracking it here and closing this one: https://github.com/Azure/azure-sdk-for-java/issues/13307


[AMBARI-23516] Ambari can not recognize slash in property name in xml…

… file.
What changes were proposed in this pull request?
UI is able to parse '/' in properties
How was this patch tested?
21529 passing (25s)
48 pending

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


fix: DevTools Database CORs error

When accessing the Database via the DevTools it shows a CORs error. This is due to the fetch occurring from an external domain (https://admin.hub.nuxt.com).
Normally this would be handled but we are filtering the route for post which is bypassing the options request.
This does not seem to be an issue for the other devtool pages.

Thanks @harlan-zw
Welcome to NuxtHub contributors 🚀


Can't add network security configuration

Issue Description
I tried to add a custom network security configuration by adding a "network_security_config.xml" file in the XML folder and defining the "android:networkSecurityConfig=@xml/network_security_config" attribute in the AndroidManifest.xml. However, I encountered an error during the build.
Local resource not defined: @xml/network_security_config, for path: res/xml/network_security_config.xml

Please help me resolve the issue.

Did you declare it on public.xml ?

Thank you. I have declared the path in the public.xml file.


Document how to use custom domain names for services

See: https://github.com/geerlingguy/internet-pi/pull/179
That didn't add any documentation for how things work in the README, but I'd like to do that.

As a quick note, the default setup still requires port names, but at least I can now visit like pihole.geerli.net/admin and then grafana.geerli.net:3030. Everything kinda 'just worked' after setting things up, and rerouting my DNS from <IP_ADDRESS> temporarily back to my Pi's IP address.
The Nginx container does end up giving 503's when the Pi's rebooting since the underlying services take a couple minutes to come back up.


DNS Resolution service

This is how I was going to handle it:
func NewTorResover(proxy string) *madns.Resolver {
	return &madns.Resolver{
		Backend: &net.Resolver{
			PreferGo: true,
			Dial: func(ctx context.Context, network, address string) (net.Conn, error) {
				d := net.Dialer{
					Timeout: time.Millisecond * time.Duration(10000),
				}
				return d.DialContext(ctx, network, proxy)
			},
		},
	}
}

With:
tor.StartConf{
		ExtraArgs:       []string{"--DNSPort", "2121"},
}

And then you can set the global libp2p name resolution using:
madns.DefaultResolver = NewTorResover("localhost:2121")

Not sure if you can think of a better way to do it. Downside is this does not resolve TXT records as far as I can tell.

Not a big fan of global vars but without any changes to libp2p I'm not sure there's a better way.

I'm not a big either, I guess we can create a DNSResolverOption in the libp2p basic host, and ensure routed/circuit host use the underlying basic host for that.


*** MEDIA NOT DISPLAYING? -- READ HERE ***

Google gives this application a quota on how many items it can pull from the Google Photos service daily. As this channel just moved to the new API - March 15, 2019 - we are evaluating the overall demand and negotiating this quota with Google.
If your images/videos do not appear, please try again tomorrow. Thanks

Thanks for the great app.  It's one of the most useful roku channels.  However the new hourly limit on the screen saver function greatly reduces the functionality of the app.  My suggestion is that instead of enforcing a time limit, enforce a limit on the number of photos that each roku device can pull from the google photos service per 24 hours.  This can be easily implemented by enforcing a lower limit on the slide show delay time.  For example, by making the lowest delay time possible 5 minutes, the roku device will only pull 24*60/12=120 pictures for each 24 hours.  This will make the screen saver function useful again and also limit the pulled data.

@rezaahmadi65 -- Thanks for the feedback and suggestion. I like the idea. Unfortunately, the time based approach was the quickest to add in short notice. I'll look to move to a rate-limited type approach in an upcoming release.  See: #190

Thanks for getting back to me.  Looking forward to the upcoming release

Any news on this issue yet?

They increased it last week by 5x what we originally were given, however still not enough. We requested additional on Monday and still waiting to hear back.

Hi, I just recently discovered your channel and I really like it. However, as I started to upload my local photo library to my google account, the channel cannot load any of my images and only show up a black screen. I switched to a different google account and it's the same thing. Is there a certain amount of photos that the app can load? Thank you very much!

No photos are displaying, thumbnails or otherwise, in any view, anywhere, ever. that means the app fails to fulfill its only goal, which is to display photos. note i have not opened the app in weeks and have not uploaded very many photos to google itself. has the app become a brick?


My mat file version is v7.0. Can savemat set this version number?Thank you.

My mat file version is v7.0. Can savemat set this version number?Thank you.

How did you create it?

There are three options on the picture. I can only save the options above and below through the matio library. I can't save the options of version 7.0 in the middle. If you have any methods, please let me know. Thank you very much!

Duplicate of https://sourceforge.net/p/matio/discussion/609377/thread/28532fb664/#0605, but I agree, the versioning is confusing.

I have read the article and tried to compress the mat file when saving it. But the mat file generated by Matlab is not exactly the same, so there is no way for the matio library to generate the - V7 version of the mat file? There are other ways, I am not very clear, if there is a way, please tell me, thank you very much.

My English is not very good, is through the translation program translation, if I said is difficult to understand, I am very sorry about this...

Here is the table of matio create/write options along with the corrsponding MATLAB save options.

Create file by Mat_CreateVer
Write variables by Mat_VarWrite
Corresponding MATLAB save options

mat_file_ver = MAT_FT_MAT4
compress = MAT_COMPRESSION_NONE
-v4

mat_file_ver = MAT_FT_MAT5
compress = MAT_COMPRESSION_NONE
-v6

mat_file_ver = MAT_FT_MAT5
compress = MAT_COMPRESSION_ZLIB
-v7

mat_file_ver = MAT_FT_MAT73
compress = MAT_COMPRESSION_NONE
-v7.3 -nocompression

mat_file_ver = MAT_FT_MAT73
compress = MAT_COMPRESSION_ZLIB
-v7.3

Thank you very much for your detailed answers, but I have tried these saving options, and there are still some differences between MATLAB native mat files and them. I will think of other ways to solve the problem, thank you very much again!


Not working on Edge

When using Edge, sometimes you can't enter anything (no keystrokes registering), other times intellisense is interfering with ability to type.

@dnasmyth I've not seen this edge issue before. Can you tell me on which URL you are seeing this experience?


[THRIFT-3066] fix assert that was assigning

I forgot to mention the PR in the commit message, please close it manually.


` breaks TS coloring

Latest vscode, open debugViewer.ts, notice the coloring is broken after the `
Today's vscode version broke this, previously it was coloring correctly

I still see this all the time, adding important label

@aeschli did you do any grammar update ?

Yes, I updated he typescript grammars. We're now on the commit from Feb 9.
I can reproduce with this snippet. Seems to be related to the occurrence of var, which is highlighted by itself, which is also a bug.
const $ = dom.emmet;
const booleanRegex = /^true|false$/i;
const stringRegex = /^(['"]).*\1$/;

export function renderVariable(tree: tree.ITree, variable: model.Variable, data: IVariableTemplateData, debugInactive: boolean, showChanged: boolean): void {
	if (variable.available) {
		data.name.textContent = `${variable.name}`;
	}

	if (variable.value) {
		renderExpressionValue(variable, debugInactive, data.value, showChanged);
	} else {
		data.value.textContent = '';
		data.value.title = '';
	}
}

This issue was moved to Microsoft/TypeScript-TmLanguage#84

@aeschli THANKS!


[Adaptive Cards] suggestedAction and adaptiveCards are not being rendered on  Skype

System Information

SDK Language: NODE
SDK Version: 3.8.4
Development Environment: AZURE_BOT_SERVICE, AZURE_APP_SERVICE,

Issue Description
My bot is working properly on emulator and Skype [web version], but in skype app (for W10 and Ubuntu) some of the component are not getting rendered.
SuggestedAction and AdaptiveCard are not working.
does skype app support these component?,

@anks333 Hello, the official word on adaptive cards support in the skype channel is "Coming soon"

Skype does not currently support the Adaptive Cards spec.
Relates to: [Microsoft/AdaptiveCards] .io site needs Partners/Integration page showing AC support status #367
Adaptive Cards channel support:

Emulator – full support
WebChat – Full support
Facebook – render to image + limited mapping to buttons
Slack – Image + limited mapping to buttons
Kik – render to Image + limited mapping to keyboard
Telegram – Render to Image + limited mapping to keyboard
SMS – Image + text
GroupMe – Image + text
Email – Image + limited mapping to links
Bing – I think supports it via SkypeWeb Chat control which has implementation. Not sure if it is in production yet.
Skype – Coming Soon
Teams – Coming Soon
Cortana – not supported
Skype for Business – Not supported

Hi,
Is there any update for Skype. Latest version of Skype for windows 10 shows adaptive card, but few controls like ChoiceSet, SubmitAction are not shown.


TypeError: run_process() got an unexpected keyword argument 'process_args'

The example in the readme indicated there is a process_args lkeyword argument, but when I try the example I get the following error:
TypeError: run_process() got an unexpected keyword argument 'process_args'
Did I miss anything?

It seems the signature of run_process differs from the one in the README.rst. Use the keyword args instead of process_args. The definition is here.
README.rst should be updated.

sorry about that, PR welcome to fix this.


Temperature Sensor

Hello and thanks for project!
For some reason temperature sensor displays wrong value. F.e openHAB reports 65.60 to MQTT topic but HomeKit displays 150. Any ideas ?

Seems to be the wrong unit. 65.6°C is 150°F. I guess the Home App and Siri respect the setting in iOS language preferences, there you can choose between Fahrenheit and Celsius.

Well, I have other temp sensor in homekit - Ecobee - and it displays °F. iOS settings also setup for °F. Also when I ask siri what is temperature she says 160 °F (not celsius ).

So I switched from F to C in iOS settings and got 66 instead of 150. So looks like it reversed.

hmm... So the 65° OpenHAB reports is the correct value in Fahrenheit but homekit2mqtt treats it like it's Celsius. Have to see if there is a TemperatureDisplayUnits Characteristic for the TemperatureSensor, I know the Thermostat has this, but I'm not sure if TemperatureSensor can use this too... Will have to try and if it works I will create a config option for that.
Meanwhile a workaround could be to do the conversion before sending the mqtt message to homekit2mqtt, possibly in OpenHAB or with some other tool that can send and receive mqtt and do a litte math on the payload (e.g. Node-RED)

ok, thank you! Also there is a problem with outlet item. I'll open another topic for it.

as far as i understood homekit is internally working with celsius only. So I added an optional conversion to the TemperatureSensor Accessory. Just add the config option fahrenheit like this:
  "TemperatureSensor": {
    "service": "TemperatureSensor",
    "name": "TemperatureSensor",
    "topic": {
      "statusTemperature": "TemperatureSensor/Temperature"
    },
    "config": {
      "fahrenheit": true
    },
    "manufacturer": "Generic",
    "model": "TemperatureSensor"
  },

/usr/local/lib/node_modules/homekit2mqtt/accessories/TemperatureSensor.js:5
log.debug('converting', value, '°F to °C');
^
ReferenceError: log is not defined
at convertTemperature (/usr/local/lib/node_modules/homekit2mqtt/accessories/TemperatureSensor.js:5:9)
at sensor.addService.getCharacteristic.setProps.on.callback (/usr/local/lib/node_modules/homekit2mqtt/accessories/TemperatureSensor.js:27:37)
at emitThree (events.js:116:13)
at emit (events.js:194:7)
at Characteristic.getValue (/usr/local/lib/node_modules/homekit2mqtt/node_modules/hap-nodejs/lib/Characteristic.js:129:10)
at Bridge. (/usr/local/lib/node_modules/homekit2mqtt/node_modules/hap-nodejs/lib/Accessory.js:650:20)
at Array.forEach (native)
at Bridge.Accessory._handleGetCharacteristics (/usr/local/lib/node_modules/homekit2mqtt/node_modules/hap-nodejs/lib/Accessory.js:614:8)
at emitMany (events.js:127:13)
at HAPServer.emit (events.js:201:7

Sorry. my fault. Just pushed an update that should fix this.

Same error, what should I do to get updates ? I am updating using - sudo npm install -g homekit2mqtt --unsafe-perm

Sorry, rushed. I got update.

Did you get the 0.6.8? Perhaps there is some lag in npmjs's cdn, you could also try to install this specific version by doing npm install -g<EMAIL_ADDRESS>--unsafe-perm

seems we're both too fast ;-))

:) you are awesome! Looks like it works. I am waiting for OH to push update from sensor. Thank you. I have another question regarding "GarageDoor", may I ask here or open another topic ?

i would prefer separate issues :)

Confirmed. Fixed. Thank you!


”Ion Neculce”, ”Prigoreni”, ”Războieni” are listed in the drop-down menu

Description:
When user writes ”Ion Neculce”, ”Prigoreni”, ”Războieni” the locations appear in the drop-down menu next to the comune and the county which is a part according to the law.
Precondition:
The website is up an running.

Step 1
Write in the search bar "Ion Neculce"

Expected results
The location appears in the drop-down menu as "Sat Ion Neculce, IAȘI (Ion Neculce)".

Step 2
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 3
Write in the search bar "Prigoreni"

Expected results
The location appears in the drop-down menu as "Sat Prigoreni, IAȘI (Ion Neculce)".

Step 4
Press "x" button.

Expected results
The location was deleted from the search bar.

Step 5
Write in the search bar "Războieni"

Expected results
The location appears in the drop-down menu as "Sat Războieni, IAȘI (Ion Neculce)".


min month constraint

It'd be useful to set a minimum month in order to block users from moving back if the current month view is equal to the min month value.

@masia5 With the current version, it's not possible. I know the new slides in latest Ionic 1.3.2 version is based on Swiper, and it provides such disabling swiping functionality. But I found it doesn't work quite well. So it may take some time to get this feature.

What happen if you don't create the <ion-slide> block on the left of the min-month?

I'm using the loop mode of the ion-slides, so when swiping left, it will go to the last slide in the loop. Btw, do you know the * isDateDisabled* option? At least it can give user indication that the previous date is disabled.


Improve error from bosh SSH when key is not provided

$ gosh -e superman -d cf ssh tcp-emitter/4bbbaf91-b571-427a-aca9-43cc48262e74
Using environment 'https://<IP_ADDRESS>:25555' as client 'user-JuebXTq'

Using deployment 'cf'

Task 73. Done
Warning: Permanently added '<IP_ADDRESS>' (ECDSA) to the list of known hosts.
Unauthorized use is strictly prohibited. All access and activity
is subject to logging and monitoring.
Permission denied (publickey).
ssh_exchange_identification: Connection closed by remote host

Running SSH:
  1 error(s) occurred:

* Running command: 'ssh -tt -o ServerAliveInterval=30 -o ForwardAgent=no -o PasswordAuthentication=no -o IdentitiesOnly=yes -o IdentityFile=/Users/shannon/.bosh/tmp/ssh-priv-key620976802 -o StrictHostKeyChecking=yes -o UserKnownHostsFile=/Users/shannon/.bosh/tmp/ssh-known-hosts509365145 -o ProxyCommand=ssh -tt -W %!h(MISSING):%!p(MISSING) -l vcap <IP_ADDRESS> -o ServerAliveInterval=30 -o ForwardAgent=no -o ClearAllForwardings=yes -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null <IP_ADDRESS> -l bosh_10c60d4a7c464339', stdout: '', stderr: '': exit status 255

Exit code 1

Apparently I also have to provide the --gw-private-key option. It would be helpful if the response actually said that.

Closing - the --gw-private-key is optional. When it is not provided, the gateway connection will fall back to your ssh-agent for a key. The error message here accurately indicates the gateway server rejected your public key with the Permission denied (publickey) message. It was probably trying your GitHub or another key which was already added to your ssh-agent.

@dpb587-pivotal
I have the same issue when trying to SSH into BOSH created by bosh bootloader. What is the right key to be used?

@virajago I think you're looking for the ssh-key subcommand of bbl

@dpb587-pivotal - yes, thanks. This is the what I did
bbl ssh-key > bblboshkey
chmod 0700 bblboshkey
ssh-add bblboshkey


Cocos assert failed

After recent checkout i noticed that Cocos complains about kinda inconsistency when i run tests:

cocos2d: fullPathForFilename: No file found at data/map1.tmx. Possible missing file.
Assert failed: Argument must be non-nil
Assertion failed: (child != nullptr), function addChild, file /Users/sandro/work/repo/topsecretgames/game/src/cocos2d/cocos/2d/CCNode.cpp, line 981.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
run-tests is a Catch v1.2.1 host application.
Run with -? for options

-------------------------------------------------------------------------------
Tests that game event listeners got notified well
-------------------------------------------------------------------------------
GameControllerTest.cpp:12
...............................................................................

GameControllerTest.cpp:12: FAILED:
due to a fatal error condition:
  SIGABRT - Abort (abnormal termination) signal

===============================================================================
test cases: 1 | 1 failed
assertions: 1 | 1 failed

Seems that GameController.cpp:Init() crashes on trying to load map from data/map1.tmx which doesn't exist on test scope.
To correct fix it we need solve #23 first

This bug could be solved without DI issue.


Specify what DNS resolver is being used

⚠ Please verify that this feature request has NOT been suggested before.

[X] I checked and didn't find similar feature request

🏷 Feature Request Type
UI Feature
🔖 Feature description
You should add a field to allow for custom DNS resolvers to be used, for monitors that monitor a hostname rather than an IP.
✔ Solution

An extra field under the advanced section, that defaults to the global DNS server of the container/installation.
❓ Alternatives
No response
📝 Additional Context
This would allow uptime-kuma to monitor whether services are accessible/performing as they should be in different networks.
An example: a service hosted in the same network as uptime-kuma, might have a local DNS entry point to the local IP address, while it might also have a public DNS entry pointing to the public IP. The service might work perfectly fine inside the local network, while it may not be publicly accessible.

+1
Also, exactly my scenario.
Currently the only way to achieve this is to run two different Uptime instances and specifying different /etc/resolv.conf files.

This would also make it easier to monitor that a given DNS server is actually up. I run 2 piholes and want to know if one of them is not serving traffic

+1 any news on this?


Run toxic lightgbm benchmark using a surrogate model

$ WARM_START=100 BUDGET=30 REPEATS=12 ./benchmark/runner.sh toxic-lightgbm ./tmp/kurobako.json

surrogate: https://storage.googleapis.com/hpo-bench/kurobako-surrogate/toxic-lightgbm-warm-start.zip

kurobako v0.2.9 which supports warm-starting method is released.
https://github.com/sile/kurobako/releases/tag/0.2.9


Is mp-units targeting freestanding implementations

As title . I work mainly on embedded systems, which are typically freestanding . Is mp-units going to require a hosted implementation?

Sure, freestanding is our target as stated here https://wg21.link/p3045#low-standardization-cost.

Sure, freestanding is our target as stated here https://wg21.link/p3045#low-standardization-cost and as I explicitly said several times before (#406, #7).

OK. Apologies. I have not followed mp-units for a while. That is reassuring, but slightly vague.  Ideally I would hope for the full functionality but without major IO overhead , though in practise some diagnostic output in a simple format is always going to be required.

Initially, we tried to isolate IO as much as possible (separate CMake targets, separate C++ modules, etc.), but it didn't scale. I consulted the best freestanding experts in the ISO Committee on how to proceed, and they said to do the same as a C++ standard library does. If needed, we will provide preprocessor logic to limit functionality for freestanding if such is requested by the users.

in practise some diagnostic output in a simple format is always going to be required.

Sure, this is why we expose the following functions that should help build a custom mechanism without the need to include streams or formatting facilities:
https://github.com/mpusz/mp-units/blob/792bd2c191d3d936070dad9d098716b78ea35193/src/core/include/mp-units/unit.h#L840-L841
https://github.com/mpusz/mp-units/blob/792bd2c191d3d936070dad9d098716b78ea35193/src/core/include/mp-units/unit.h#L860-L861

I will try to get back to testing mp-units.  In embedded environment absolute limit is the amount of rom available on the microcontroller.  The smaller the footprint of the library, the bigger the range of microcontroller a library will run on. nyway don't underestimate the microcontroller side. It is a large user base and could find mp-units very useful, but don't make anything like as much noise as others ;)

This would be great @kwikius! As of now we don't use any conditional compilation for freestanding. We need to decide if we should introduce custom flags or use those used by the compiler vendors. But we need some for sure and we need some testing on embedded environments as well.

More info on text output can be found in https://mpusz.github.io/mp-units/2.2/users_guide/framework_basics/text_output/#derived-unit-symbols-generation


[fix][gws][workflow2] check readable settings when resolving approver routing

coverage: 70.292%. first build
when pulling d6567d03a1dc656878cc344b70e237b30e8cd876 on fixup-gws-workflow2
into 7ea8a19ce34ce2472297cb1de330bc57d5b73326 on master.