IndexError when using with scikit learn's cross validation

Hello,
Could someone give me some pointers on why I might be getting this error? I'm trying to optimize parameters for XGB through scikit learn cross validation. However, after running the cv for all the initialization points it produces the error below.
Thanks.
import pandas as pd
import numpy as np
import xgboost as xgb
from sklearn.cross_validation import cross_val_score
%pylab inline
import GPy
import GPyOpt

def xgboostcv(max_depth = 10,
              learning_rate = 0.1,
              n_estimators = 50,
              gamma = 0.5,
              min_child_weight = 5,
              max_delta_step = 0.05,
              subsample = 1,
              colsample_bytree = 1,
              silent=True,
              nthread=-1):
    return cross_val_score(xgb.XGBClassifier(max_depth=int(max_depth),
                                             learning_rate=learning_rate,
                                             n_estimators=int(n_estimators),
                                             silent=silent,
                                             nthread=nthread,
                                             gamma=gamma,
                                             min_child_weight=min_child_weight,
                                             max_delta_step=max_delta_step,
                                             subsample=subsample,
                                             colsample_bytree=colsample_bytree),
                           X,
                           Y,
                           "roc_auc",
                           cv=5).mean()

def wrapper(X):
    max_depth = X[:,0]
    learning_rate = X[:,1]
    meanAUC = xgboostcv(int(max_depth), float(learning_rate))
    print("max depth: ", int(max_depth))
    print("learning rate: ", float(learning_rate))
    print("mean test AUC: ", meanAUC)
    return meanAUC

bounds = [{'name':'max_depth', 'type':'discrete', 'domain':range(1, 20)},
         {'name':'learning_rate', 'type':'continuous', 'domain':(0.01, 0.3)}]

seed(123)
myBopt = GPyOpt.methods.BayesianOptimization(f=wrapper,
                                            domain=bounds,
                                            acquisition_type='LCB',
                                            initial_design_numdata = 4,
                                            exact_feval = True)

Populating the interactive namespace from numpy and matplotlib
max depth:  16
learning rate:  0.21864600123781328
mean test AUC:  0.828290572493
max depth:  10
learning rate:  0.13270087343609366
mean test AUC:  0.8143772926
max depth:  1
learning rate:  0.2944216175315385
mean test AUC:  0.823469451312
max depth:  15
learning rate:  0.20860062418961034
mean test AUC:  0.825270108225
The set cost function is ignored! LBC acquisition does not make sense with cost.
---------------------------------------------------------------------------
IndexError                                Traceback (most recent call last)
<ipython-input-58-ef0d82ecb5ae> in <module>()
     51                                             acquisition_type='LCB',
     52                                             initial_design_numdata = 4,
---> 53                                             exact_feval = True)

/home/ron/software/anaconda3/lib/python3.6/site-packages/GPyOpt/methods/bayesian_optimization.py in __init__(self, f, domain, constrains, cost_withGradients, model_type, X, Y, initial_design_numdata, initial_design_type, acquisition_type, normalize_Y, exact_feval, acquisition_optimizer_type, model_update_interval, evaluator_type, batch_size, num_cores, verbosity, verbosity_model, bounds, maximize, **kwargs)
    242
    243         # --- Initialize everything
--> 244         self.run_optimization(max_iter=0,verbosity=self.verbosity)
    245
    246     def _model_chooser(self):

/home/ron/software/anaconda3/lib/python3.6/site-packages/GPyOpt/methods/bayesian_optimization.py in run_optimization(self, max_iter, max_time, eps, verbosity, save_models_parameters, report_file, evaluations_file, models_file, **kwargs)
    456                 self.acquisition_optimizer.optimizer ='CMA'
    457             print('WARNING: "acqu_optimize_method" will be deprecated in the next version!')
--> 458         super(BayesianOptimization, self).run_optimization(max_iter = max_iter, max_time = max_time,  eps = eps, verbosity=verbosity, save_models_parameters = save_models_parameters, report_file = report_file, evaluations_file= evaluations_file, models_file=models_file)
    459
    460     def _sign(self,f):

/home/ron/software/anaconda3/lib/python3.6/site-packages/GPyOpt/core/bo.py in run_optimization(self, max_iter, max_time, eps, verbosity, save_models_parameters, report_file, evaluations_file, models_file)
    106
    107             # --- Update and optimize acquisition and compute the exploration level in the next evaluation
--> 108             self.suggested_sample = self._compute_next_evaluations()
    109
    110             if not ((self.num_acquisitions < self.max_iter) and (self._distance_last_evaluations() > self.eps)):

/home/ron/software/anaconda3/lib/python3.6/site-packages/GPyOpt/core/bo.py in _compute_next_evaluations(self)
    184         Computes the location of the new evaluation (optimizes the acquisition in the standard case).
    185         """
--> 186         return self.evaluator.compute_batch()
    187
    188     def _update_model(self):

/home/ron/software/anaconda3/lib/python3.6/site-packages/GPyOpt/core/evaluators/sequential.py in compute_batch(self)
     19         Selects the new location to evaluate the objective.
     20         """
---> 21         return self.acquisition.optimize()
     22
     23

/home/ron/software/anaconda3/lib/python3.6/site-packages/GPyOpt/acquisitions/base.py in optimize(self)
     57             out = self.optimizer.optimize(f=self.acquisition_function)[0]
     58         else:
---> 59             out = self.optimizer.optimize(f=self.acquisition_function, f_df=self.acquisition_function_withGradients)[0]
     60         return out
     61

/home/ron/software/anaconda3/lib/python3.6/site-packages/GPyOpt/optimization/acquisition_optimizer.py in optimize(self, f, df, f_df)
    280
    281         for i in range(num_discrete):
--> 282             self.mixed_optimizer.fix_dimensions(dims=self.discrete_dims, values=self.discrete_values[i,:])
    283             partial_x_min[i,:] , partial_f_min[i,:] = self.mixed_optimizer.optimize(f, df, f_df)
    284

/home/ron/software/anaconda3/lib/python3.6/site-packages/GPyOpt/optimization/acquisition_optimizer.py in fix_dimensions(self, dims, values)
    118
    119         # -- take only the fixed components of the random samples
--> 120         self.samples = self.samples[:,np.array(self.free_dims)] # take only the component of active dims
    121         self.subspace = self.space.get_subspace(self.free_dims)
    122         self.optimizer = select_optimizer(self.optimizer_name)(Design_space(self.subspace), **self.kwargs)

IndexError: index 1 is out of bounds for axis 1 with size 1

@RonLuhtanen Have you solved this?

@yxchng Yes, the error was due to the bug caused from the package accepting the continuous and discrete variables in certain order only, which is already fixed in the development branch.


fix: skip tasks in pretend mode

Copier now skips tasks execution in pretend mode as discussed in #950. I've extended the fix to also skip migration tasks in pretend mode although they weren't explicitly mentioned in #950, but I think that is consistent behavior.
Fixes #950.

Absolutely! :laughing: I've added the type hints and also improved the formatting a bit :wink:.


Debugging call stack is missing frames

VSCode Version: 1.42.1
OS Version: Windows

Steps to Reproduce:

I'm using the C/C++ extension to debug C/C++ code, but the call stack is cutoff. The top of the call stack has no symbols, which could be the cause (deep call stacks with symbols at the top show all the frames)...this is with multiple threads as well. See the screenshot. There's no option to show more frames.

I filed a previous issue at https://github.com/microsoft/vscode/issues/68474 but it got closed with needing more info. The fixed bug at https://github.com/microsoft/vscode/issues/81406 might have the same root cause, but might need a fix in a different place.

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

@pieandcakes @WardenGnaw The C/C++ extension wouldn't be the cause of this, right?

Do you see VS code requesting for the top of the call stack in the C++ extension
Is the C++ extension properly responding to this request
Can you reproduce with vscode insiders?

No other extension is seeing this, thus my main suspicion would be in the extension code.

Our C/C++ debugger team told me to enable their logging, but now I'm not repoing the bug any more (I'm not aware of what changed to cause it to stop reproing, maybe the repro conditions were more complicated).


fix: viewsContainers icon resolver

Types

[x] 🐛 Bug Fixes

Background or solution
fixes: #647

Changelog

viewsContainers support icon resolver

Codecov Report

Merging #712 (2cf05a6) into main (74f341d) will increase coverage by 0.00%.
The diff coverage is 80.00%.

@@           Coverage Diff           @@
##             main     #712   +/-   ##
=======================================
  Coverage   58.63%   58.64%
=======================================
  Files        1209     1209
  Lines       74797    74798    +1
  Branches    15529    15532    +3
=======================================
+ Hits        43857    43862    +5
+ Misses      28202    28199    -3
+ Partials     2738     2737    -1

Impacted Files
Coverage Δ

.../src/browser/vscode/contributes/view-containers.ts
53.57% <ø> (ø)

packages/extension/src/common/index.ts
76.00% <70.00%> (-0.93%)
:arrow_down:

.../extension/src/browser/sumi/contributes/submenu.ts
23.80% <100.00%> (ø)

...tension/src/browser/vscode/contributes/commands.ts
85.00% <100.00%> (ø)

...s/extension/src/browser/vscode/contributes/icon.ts
66.66% <100.00%> (ø)

...s/extension/src/browser/vscode/contributes/menu.ts
48.43% <100.00%> (+2.45%)
:arrow_up:

packages/core-common/src/node/port.ts
43.93% <0.00%> (-3.04%)
:arrow_down:

packages/theme/src/browser/icon.service.ts
83.42% <0.00%> (-0.54%)
:arrow_down:

...ages/file-service/src/node/file-service-watcher.ts
72.31% <0.00%> (+1.12%)
:arrow_up:

Continue to review full report at Codecov.

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


Docs - Cleanup setup step 2?

Describe the request
It looks like step 2 in setup is obsolete for all distros listed in the setup guide except fedora, so why not clean up the docs a little and add it as a part of step 1, under the fedora menu? Let me know if there's a reason not to do that, as I might be missing something.
Is your feature request related to a problem? Please describe.
No response
Additional context
No response

Wait. I missed that this applied to the latest Ubuntu LTS version as well, so it's not just a Fedora issue. Sorry.


docs: middle ware parameter [how to connect mcollective with a middleware]

node puppet {
  class { '::mcollective':
    client           => true,
    middleware       => true,
    middleware_hosts => ['puppet.domain1.net'],
  }
}

using this on puppet master to install mcollective and it's not working because it says "middleware" parameter is not valid?
Invalid parameter middleware on Class[Mcollective] at /etc/puppet/manifests/site.pp:6 on node puppet.salesseek.net

well, it's not entirely wrong, https://github.com/puppet-community/puppet-mcollective/blob/master/manifests/init.pp#L28-L41

Was reading that just now :P
So the readme is outdated. What kind of manifest do I need to set up a puppetmaster with the middleware and an agent?
node puppet {
  class { '::mcollective': middleware_hosts => ['puppet'], }
}

node puppetagent {
 # class { '::mcollective':
 #   client           => true,
 #   middleware_hosts => ['puppet'],
 # }
}

This is what I got so far, but getting a dependency errors, so I'm thinking it's not enough?

I am also stuck on this issue ,
can anybody explain how to solve it?

Full disclosure, I've never used or hacked this module.
Still, I just went hunting for your missing parameter, and it turns out we don't support middleware management anymore since 9be4fed4.
To setup your queue manager, you should pick an ActiveMQ or RabbitMQ module and add it to the respective profile(s).

Hmmm, @ffrank what you recommend, active or rabbit?

I never tried either option, and cannot supply any second hand knowledge either. Sorry.

@fullmooninu depends on your scale, i guess.
for a small (we're running <500 machines) setup, ActiveMQ serves us quite well.

ty ty both. I ended up manually installing rabbitmq followed by mcollective, using someone's written instructions.

Oh nooo :anguished:
And thus we fail...

[silent sobbing]

pats

Reopening so that this won't fall under the rug.
We desperately need to update the docs. This is a pretty serious issue from my point of view.

Hello:
Is this still needed?

I'll try and clean this up.

Ah, I believe this was finally resolved when #178 got merged. Way to go team :)
Closing this for good.


Update ZAP Go Package, Fix Generation Issues, and Autogenerate Interface

Hello,
I would like to try the ZAP API, but I noticed that the Go package is not updated, which is discouraging for users who want to use it with Go. As a result, I decided to fork the repository and implement some updates and fixes. Here are the changes I made:

Readme Update:
Updated the README file to reflect the latest changes and improvements.

Autogenerated Interface:
Created a script to autogenerate the interface.go file to accommodate the updated interfaces.
Ensured the interfaces reflect the current structure and functionality.

Folder Structure Changes:
Adjusted the folder structure to align with the new generation process.

I hope these changes are helpful. Please let me know if there are any additional modifications or improvements needed.
Best regards,

To address the DCO requirement you'll need to sign-off the commit(s):

https://github.com/zaproxy/zaproxy/blob/main/CONTRIBUTING.md#developer-certificate-of-origin
https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff

Hello,
I have addressed the DCO requirement by signing off the commits.


[Bug]: vLLM 0.5.5 and FlashInfer0.1.6

Your current environment

The output of `python collect_env.py`
Your output of `python collect_env.py` here

vllm == 0.5.5
FlashInfer==0.1.6+cu121torch2.4

🐛 Describe the bug
when i use vLLm0.5.5 and FlashInfer0.1.6 to run Gemma-2-2b in T4.
FlashInfer0.1.6 support T4: https://github.com/flashinfer-ai/flashinfer/releases
but i see：
INFO 09-02 16:07:55 model_runner.py:890] Loading model weights took 4.8999 GB
Process SpawnProcess-1:
Traceback (most recent call last):
  File "/opt/conda/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/opt/conda/lib/python3.10/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/conda/lib/python3.10/site-packages/vllm/entrypoints/openai/rpc/server.py", line 230, in run_rpc_server
    server = AsyncEngineRPCServer(async_engine_args, usage_context, rpc_path)
  File "/opt/conda/lib/python3.10/site-packages/vllm/entrypoints/openai/rpc/server.py", line 31, in __init__
    self.engine = AsyncLLMEngine.from_engine_args(
  File "/opt/conda/lib/python3.10/site-packages/vllm/engine/async_llm_engine.py", line 740, in from_engine_args
    engine = cls(
  File "/opt/conda/lib/python3.10/site-packages/vllm/engine/async_llm_engine.py", line 636, in __init__
    self.engine = self._init_engine(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/vllm/engine/async_llm_engine.py", line 840, in _init_engine
    return engine_class(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/vllm/engine/async_llm_engine.py", line 272, in __init__
    super().__init__(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/vllm/engine/llm_engine.py", line 284, in __init__
    self._initialize_kv_caches()
  File "/opt/conda/lib/python3.10/site-packages/vllm/engine/llm_engine.py", line 390, in _initialize_kv_caches
    self.model_executor.determine_num_available_blocks())
  File "/opt/conda/lib/python3.10/site-packages/vllm/executor/gpu_executor.py", line 113, in determine_num_available_blocks
    return self.driver_worker.determine_num_available_blocks()
  File "/opt/conda/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/vllm/worker/worker.py", line 222, in determine_num_available_blocks
    self.model_runner.profile_run()
  File "/opt/conda/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/vllm/worker/model_runner.py", line 1097, in profile_run
    self.execute_model(model_input, kv_caches, intermediate_tensors)
  File "/opt/conda/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/vllm/worker/model_runner.py", line 1415, in execute_model
    hidden_or_intermediate_states = model_executable(
  File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
    return forward_call(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/vllm/model_executor/models/gemma2.py", line 342, in forward
    hidden_states = self.model(input_ids, positions, kv_caches,
  File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
    return forward_call(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/vllm/model_executor/models/gemma2.py", line 281, in forward
    hidden_states, residual = layer(
  File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
    return forward_call(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/vllm/model_executor/models/gemma2.py", line 225, in forward
    hidden_states = self.self_attn(
  File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
    return forward_call(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/vllm/model_executor/models/gemma2.py", line 165, in forward
    attn_output = self.attn(q, k, v, kv_cache, attn_metadata)
  File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
    return forward_call(*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/vllm/attention/layer.py", line 98, in forward
    return self.impl.forward(query,
  File "/opt/conda/lib/python3.10/site-packages/vllm/attention/backends/flashinfer.py", line 688, in forward
    output = torch.ops.vllm.flash_attn_varlen_func(
  File "/opt/conda/lib/python3.10/site-packages/torch/_ops.py", line 1061, in __call__
    return self_._op(*args, **(kwargs or {}))
  File "/opt/conda/lib/python3.10/site-packages/torch/_library/custom_ops.py", line 236, in backend_impl
    result = self._backend_fns[device_type](*args, **kwargs)
  File "/opt/conda/lib/python3.10/site-packages/vllm/attention/backends/flash_attn.py", line 48, in flash_attn_varlen_func
    return _flash_attn_varlen_func(
  File "/opt/conda/lib/python3.10/site-packages/vllm_flash_attn/flash_attn_interface.py", line 1154, in flash_attn_varlen_func
    return FlashAttnVarlenFunc.apply(
  File "/opt/conda/lib/python3.10/site-packages/torch/autograd/function.py", line 574, in apply
    return super().apply(*args, **kwargs)  # type: ignore[misc]
  File "/opt/conda/lib/python3.10/site-packages/vllm_flash_attn/flash_attn_interface.py", line 632, in forward
    out, q, k, v, out_padded, softmax_lse, S_dmask, rng_state = _flash_attn_varlen_forward(
  File "/opt/conda/lib/python3.10/site-packages/vllm_flash_attn/flash_attn_interface.py", line 90, in _flash_attn_varlen_forward
    out, q, k, v, out_padded, softmax_lse, S_dmask, rng_state = flash_attn_cuda.varlen_fwd(
RuntimeError: FlashAttention only supports Ampere GPUs or newer.

I'm not sure if it's a problem with vLLM's integration with FlashInfer
@youkaichao @LiuXiaoxuanPKU
Before submitting a new issue...

[X] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.

RuntimeError: FlashAttention only supports Ampere GPUs or newer.

You are not using flashinfer backend if you encountered this error. This error message is reported by flash-attn package.
Try setting VLLM_ATTENTION_BACKEND=FLASHINFER and run the script again.

see https://github.com/vllm-project/vllm/issues/8189#issuecomment-2332350166
@yzh119 we do have some todos for flashinfer backend, before that, flashinfer still depends on flash attention for prefill :(

Hi @youkaichao , thanks for letting me know! flashinfer v0.1.7 will be fully JIT, and I'll make it a pypi package which can be set as a vllm dependency. I'll keep you posted about the progress.

Any progress?

Hi @youkaichao , thanks for letting me know!
flashinfer v0.1.7 will be fully JIT, and I'll make it a pypi package which can be set as a vllm dependency. I'll keep you posted about the progress.

Now that flashinfer 0.2 is released, any progress on this?

@yzh119 is working on publishing the wheels to pypi .


[PE-D][Tester E] In QuickStart, add example does not work

This can make it confusing for the user, and even undermine the credibility of the User Guide from the start.
Screenshot:

Labels: type.DocumentationBug severity.High
original: kangzongxian/ped#11

Duplicate with #166.


Latest Date Metadata Field

Good Morning All,
Can you please help me with Metadata Field which identify the current changed date in the UI.
For example if there is any changes in the description or title modification then date has to be modified or updated.
We tried with dc.date.updated in UI but there is no changes. Please suggest. Thanks!!

@tdonohue Can you please help me with the above request. Thanks!!

I don't believe any such metadata field exists in DSpace 7 at this time.  This is not a feature that has ever existed in DSpace.  It would require custom coding to implement such a feature for all object types.
This ticket doesn't appear to be actionable, and it's more of a question.  Keep in mind questions should be asked using our Support options: https://wiki.lyrasis.org/display/DSPACE/Support  Tickets should only be created for logging bugs or creating new feature requests.
Closing this as the question is answered.


Technical doubts about the implementation of PBD cloth based on GPU

Why is it suspended? No maintenance. Is GPU parallel data disordered during collision? Why do you have your own Json format in blender? Is there any problem with the vertex sorting of cloth mesh in the forum of unity? Is it because the algorithm of calculating shader to achieve PBD must be handled in this way?

Hey there, unfortunately for now, I am unable update the code to the latest version as I had joined a company which now currently owns the code. Alot has happened since then xd. Also yeah, like you said, a JSON format should not be needed as we can now just store data in the form of scriptable objects.
About the second picture, it is actually just to find edges from the mesh from vertex data and triangle data (because unity does not generate edge data for you by default).

I don't know if you have heard about Nv cloth, a library of cloth simulation in Nvidia, which is also based on PBD algorithm. The main thing is how practical it is on the mobile end (CPU used, but SIMD acceleration of neon)? Is GPU's compute shader fast or Nv cloth? Personally, I think nvbatch has helped us solve many problems.
https://gameworksdocs.nvidia.com/NvCloth/1.1/Compiling/index.html#mac

not sure if nvcloth uses CPU or the GPU, but depending on your task, gpu is faster for highly parallel stuff, as your cloth resolution scales, gpu will eventually beat the cpu.


Failed to connect to '': null

Library version: 2.9
OS: Android 7.1.2
Sometimes, I've got the following error when try to connect:
Failed to connect to '<address>': null
I have no idea what's going on. Here is my code:
webSocket = WebSocketFactory()
    .setConnectionTimeout(5000)
    .createSocket(uri)
    .addListener(WebSocketCallbacks())
    .connect()

Maybe, it would be nice to write more information if there is null in the exception message (SocketConnector:124).

Facing the same issue


Camera is scanning but no camera view (picture) is displayed.

Working fine on Android.
On iOS 17.4.1 running on iPhone 12 pro the camera start and scan (recognize barcodes) but no camera view (picture) displayed. I will add my xaml code.

<VerticalStackLayout
    Spacing="25"
    Padding="30,0"
    VerticalOptions="Center">

    <gv:CameraView x:Name="Camera" HorizontalOptions="FillAndExpand" VerticalOptions="EndAndExpand" OnDetected="Camera_OnDetected" IsVisible="True"
                   TorchOn="False" VibrationOnDetected="True" ScanInterval="200" />

    <HorizontalStackLayout Margin="0,70" FlowDirection="RightToLeft">
        <Label Text="פנס" FontAttributes="Bold" FontSize="Medium"/>
        <Switch  x:Name="Torch"  IsToggled="false" Toggled="Torch_Toggled" Margin="10,-10" OnColor = "Green"  />
    </HorizontalStackLayout>

</VerticalStackLayout>

BarcodeScanning.txt

Issue was resolved by moving to Grid. Using the sample code of this project (Page1).


how to implement  Optimistic Locking  ？

Hey @it512 👋
See this great blog post by @rotemtam: https://entgo.io/blog/2021/07/22/database-locking-techniques-with-ent/

Closing, but please feel free to reopen or join our Discord community in case you need more help with this 😎


update startup help message prompt for version 8.0

:help version8 rather than :help version7

Thanks, I'll include it.


Is OCI controller manager still maintained?

Is this project maintained anymore?
@xtoddx  @JBAnderson5 @jbf @vegard

Yes, this is an actively maintained project. The latest release was about 1.5 months ago. AFAIK there isn't a well-defined cadence on when releases will happen, though. Do you have any specific reasons for asking the question?
You picked an interesting list of folks to mention :) I'll be sure to forward this to folks that work with this project more directly.

Thank you for the quick reply @xtoddx!
I was asking to understand if we can rely on it on 1.19+ or not!

If this ends up being unreliable in any way, please open a ticket with your findings (and feel free to tag me). I'll close this for now, thanks for checking in @kubealex.


Change terminology for allowlisting

Small wording change based on All Hands feedback.

Duplicate https://github.com/prisma/docs/pull/1852


Former theme missing from current set?

Hey there, thanks for making such a neat module for foundry! I'm wondering though, I can't find the theme in this screen shot:
https://raw.githubusercontent.com/LorduFreeman/foundry-lordudice/main/pics/ddset.png
I used it for previous games, but after a few updates, I can't find it anymore, and it's my favorite set!

sorry to bother you, im a moron and didn't realize i didn't have that part of the module activated. feel free to delete this!


Add MarkDistinct Support

Previous PR https://github.com/facebookincubator/velox/pull/2321 was closed by stalebot.
However, this PR incorporates critical comments and feedbacks from the previous PR.
Resolves: https://github.com/facebookincubator/velox/issues/3140

@shiyu-bytedance Would you update PR description to explain the changes in this PR? If you are adding new plan node and operator, please, add documentation for these to velox/docs/develop/operators.rst

@shiyu-bytedance Some initial comments.

@mbasmanova addressed all comments.

@shiyu-bytedance I'm seeing CI failures and "This branch has conflicts that must be resolved". Would you rebase?

@mbasmanova rebased. However, there are still fuzzer failures, are they expected?

The MarkDistinct operator produces an aggregate mask column for distinct aggregations. The mask is a boolean vector set to true for a subset of input rows that contain unique combinations of the grouping keys.
This operator is used to implement queries like
SELECT a, count(distinct c), count(distinct d) FROM t GROUP BY 1

Fixes #3140

It seems like there will be 2 MarkDistinct operators for this query. Please state if that is the case here. If there are 2 operators, how is their order decided ? Also do we re-use that the groups are the same ?

@aditi-pandit Would you mind taking another pass? I understand Ahana is waiting for this PR merge for TPCDS. Thanks!

Could you rebase this PR? I am getting this error when trying to compile it against the main branch.
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__memory/unique_ptr.h:728:32: error: no matching constructor for initialization of 'facebook::velox::exec::GroupingSet'
    return unique_ptr<_Tp>(new _Tp(_VSTD::forward<_Args>(__args)...));
                               ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/velox/velox/exec/GroupingSet.cpp:102:15: note: in instantiation of function template specialization 'std::make_unique<facebook::velox::exec::GroupingSet, std::vector<std::unique_ptr<facebook::velox::exec::VectorHasher>>, std::vector<unsigned int>, std::vector<std::unique_ptr<facebook::velox::exec::Aggregate>>, std::vector<std::optional<unsigned int>>, std::vector<std::vector<unsigned int>>, std::vector<std::vector<std::shared_ptr<facebook::velox::BaseVector>>>, std::vector<std::shared_ptr<const facebook::velox::Type>>, bool, bool, bool, std::nullptr_t, facebook::velox::exec::OperatorCtx *&>' requested here
  return std::make_unique<GroupingSet>(
              ^
/velox/velox/exec/GroupingSet.cpp:40:14: note: candidate constructor not viable: requires 13 arguments, but 12 were provided
GroupingSet::GroupingSet(
             ^
/velox/velox/exec/GroupingSet.h:28:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 12 were provided
class GroupingSet {

Could you rebase this PR? I am getting this error when trying to compile it against the main branch.
/Library/Developer/CommandLineTools/SDKs/MacOSX13.1.sdk/usr/include/c++/v1/__memory/unique_ptr.h:728:32: error: no matching constructor for initialization of 'facebook::velox::exec::GroupingSet'
    return unique_ptr<_Tp>(new _Tp(_VSTD::forward<_Args>(__args)...));
                               ^   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/velox/velox/exec/GroupingSet.cpp:102:15: note: in instantiation of function template specialization 'std::make_unique<facebook::velox::exec::GroupingSet, std::vector<std::unique_ptr<facebook::velox::exec::VectorHasher>>, std::vector<unsigned int>, std::vector<std::unique_ptr<facebook::velox::exec::Aggregate>>, std::vector<std::optional<unsigned int>>, std::vector<std::vector<unsigned int>>, std::vector<std::vector<std::shared_ptr<facebook::velox::BaseVector>>>, std::vector<std::shared_ptr<const facebook::velox::Type>>, bool, bool, bool, std::nullptr_t, facebook::velox::exec::OperatorCtx *&>' requested here
  return std::make_unique<GroupingSet>(
              ^
/velox/velox/exec/GroupingSet.cpp:40:14: note: candidate constructor not viable: requires 13 arguments, but 12 were provided
GroupingSet::GroupingSet(
             ^
/velox/velox/exec/GroupingSet.h:28:7: note: candidate constructor (the implicit copy constructor) not viable: requires 1 argument, but 12 were provided
class GroupingSet {

done

@shiyu-bytedance Do you have bandwidth to work on this PR in the next few days? If not, would you mind me taking over?

@mbasmanova I'll work on this.

@shiyu-bytedance The CI is all red. Would you take a look? It would be nice to make CI green, address remaining comments (if any) and have this merged in the next couple of days.

@mbasmanova There are no outstanding comments. I'll fix the CI and you can merge it.

@shiyu-bytedance Thanks.

@shiyu-bytedance Thank you for rebasing and fixing the CI. Let me try to merge this PR.

@shiyu-bytedance I'm seeing ASAN failures
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from MarkDistinctPODTest/0, where TypeParam = signed char
[ RUN      ] MarkDistinctPODTest/0.basic

stderr:
=================================================================
==4123514==ERROR: AddressSanitizer: stack-use-after-return on address 0x7f843bebd440 at pc 0x7f845ccff62c bp 0x7f840e5fb9d0 sp 0x7f840e5fb9c8
WRITE of size 1 at 0x7f843bebd440 thread T32
SCARINESS: 51 (1-byte-write-stack-use-after-return)
    #0 0x7f845ccff62b in facebook::velox::exec::GroupingSet::addInputForActiveRows(std::shared_ptr<facebook::velox::RowVector> const&, bool) fbcode/velox/exec/GroupingSet.cpp:195
    #1 0x7f845cd27cbc in facebook::velox::exec::GroupingSet::addInput(std::shared_ptr<facebook::velox::RowVector> const&, bool) fbcode/velox/exec/GroupingSet.cpp:165
    #2 0x7f845d02bd01 in facebook::velox::exec::MarkDistinct::addInput(std::shared_ptr<facebook::velox::RowVector>) fbcode/velox/exec/MarkDistinct.cpp:64


Fixes #25709 Memoize filtered entity graph nodes

Hey, I just made a Pull Request!

:heavy_check_mark: Checklist

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

With this fix, testing with an entityFilter and the graph is now drawn properly and no repeated redraws observed.

Hopefully not pushing my luck here 🙏 but if you happen to do another 1.29.x release, could we include this fix? Thanks!

Hopefully not pushing my luck here 🙏 but if you happen to do another 1.29.x release, could we include this fix? Thanks!

Not sure that this on it's own is case enough for us to do a patch release, but perhaps if some other things come up we can bundle this in a patch release. It will be available on the --release next which should go out later today if you wanted to take advantage of it earlier than the next mainline if we don't have another patch release.


Verify that #135 has been resolved

and remove the run dependency on pari which has a run_exports.

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@conda-forge-admin, please rerender.


⚠ AtmoLive06 Server has degraded performance

In 7e393c6, AtmoLive06 Server ($ATMOLIVE06) experienced degraded performance:

HTTP code: 200
Response time: 26324 ms

Resolved: AtmoLive06 Server performance has improved in 5186f0b.


codec: implement in-place byte encoding

PCP #5703
Signed-off-by: wangwangwar<EMAIL_ADDRESS>What have you changed?

Implement in-place byte encoding for components/codec. Add functions MemComparableByteCodec::encode_all_in_place and MemComparableByteCodec::encode_all_in_place_desc.

Some questions:

I provide in-place byte encoding function as MemComparableByteCodec::encode_all_in_place(src: &mut Vec<u8>) -> usize, but the parameter src's type is &mut Vec<u8>, which is different from parameter of MemComparableByteCodec::try_decode_first_in_place(buffer: &mut [u8]) -> Result<(usize, usize)>. I don't know whether it's OK.
Who is responsible to make sure the capacity of src is sufficient? Function encode_all_in_place or the caller, which one is better?

TODO: Implement in-place byte encoding for tikv_utils/codec.
What is the type of the changes?
Improvement
How is the PR tested?
Unit test
Does this PR affect documentation (docs) or should it be mentioned in the release notes?
No. It should not change the behavior.
Does this PR affect tidb-ansible?
No
Refer to a related PR or issue link (optional)
Benchmark result if necessary (optional)
test byte::benches::bench_memcmp_encode_all_asc_large                                 ... bench:         103 ns/iter (+/- 5)
test byte::benches::bench_memcmp_encode_all_asc_large_naive                           ... bench:         202 ns/iter (+/- 12)
test byte::benches::bench_memcmp_encode_all_asc_large_original                        ... bench:         574 ns/iter (+/- 23)
test byte::benches::bench_memcmp_encode_all_asc_small                                 ... bench:          14 ns/iter (+/- 1)
test byte::benches::bench_memcmp_encode_all_asc_small_naive                           ... bench:          21 ns/iter (+/- 1)
test byte::benches::bench_memcmp_encode_all_desc_large                                ... bench:         138 ns/iter (+/- 5)
test byte::benches::bench_memcmp_encode_all_desc_large_original                       ... bench:       1,444 ns/iter (+/- 199)
test byte::benches::bench_memcmp_encode_all_desc_small                                ... bench:          28 ns/iter (+/- 1)
test byte::benches::bench_memcmp_encode_all_in_place_asc_large                        ... bench:         204 ns/iter (+/- 7)
test byte::benches::bench_memcmp_encode_all_in_place_asc_small                        ... bench:          64 ns/iter (+/- 4)
test byte::benches::bench_memcmp_encode_all_in_place_desc_large                       ... bench:         235 ns/iter (+/- 11)
test byte::benches::bench_memcmp_encode_all_in_place_desc_small                       ... bench:          80 ns/iter (+/- 4)

Any examples? (optional)

@sre-bot /test

New benchmarks:
test byte::benches::bench_memcmp_encode_all_asc_large                                 ... bench:         103 ns/iter (+/- 5)
test byte::benches::bench_memcmp_encode_all_asc_large_naive                           ... bench:         182 ns/iter (+/- 13)
test byte::benches::bench_memcmp_encode_all_asc_large_original                        ... bench:         572 ns/iter (+/- 12)
test byte::benches::bench_memcmp_encode_all_asc_small                                 ... bench:          16 ns/iter (+/- 6)
test byte::benches::bench_memcmp_encode_all_asc_small_naive                           ... bench:          23 ns/iter (+/- 8)
test byte::benches::bench_memcmp_encode_all_desc_large                                ... bench:         140 ns/iter (+/- 8)
test byte::benches::bench_memcmp_encode_all_desc_large_original                       ... bench:       1,445 ns/iter (+/- 92)
test byte::benches::bench_memcmp_encode_all_desc_small                                ... bench:          29 ns/iter (+/- 2)
test byte::benches::bench_memcmp_encode_all_in_place_asc_large                        ... bench:         172 ns/iter (+/- 36)
test byte::benches::bench_memcmp_encode_all_in_place_asc_small                        ... bench:          34 ns/iter (+/- 3)
test byte::benches::bench_memcmp_encode_all_in_place_desc_large                       ... bench:         205 ns/iter (+/- 32)
test byte::benches::bench_memcmp_encode_all_in_place_desc_small                       ... bench:          52 ns/iter (+/- 6)

/merge

@sre-bot /run-all-tests


Don't bundle Genereted.xcconfig as a resource

Generated.xcconfig is only required at build time for iOS apps. In the
flutter create project template and example apps, Generated.xcconfig was
previously marked as a resource to be bundled into the built app.

Nice! LGTM

Looks like the tree is red, so I'll hold off landing. @chinmaygarde @xster please feel free to merge on green.


issue/16: trigger window.scroll on popup scroll

scroll lock should trigger window.scroll event when scrolling inside popup
https://github.com/adaptlearning/jquery.a11y/issues/16

+1


Controls not yet functional and not part of 1st Release should be hidden

These controls are not currently working and should not be visible as part of our 1st release MVP:

Edit Neighborhood Name
Search
Recent Messages cards group
Cards

3 dot overflow menu
Heart (like/favorite) icon
Comment icon

this is potentially resolved in PR #32, completely removed buttons for now


How to create a function container image in a different language

Just wonder if there is any sample of creating a function container image in a different language?
If not, how can I do it?
I tried a couple of ways myself by using powershell scripts, however, it ran into the following error in the end:
Action crashed due to an internal error: Post "http://workflow-13418411225808356493-jsonserver.direktiv-services-direktiv": dial tcp: lookup workflow-13418411225808356493-jsonserver.direktiv-services-direktiv on <IP_ADDRESS>:53: no such host
Thank you in advance!

Hi,
we have a couple of examples here: https://github.com/direktiv/direktiv-apps/tree/main/examples. They are implementing a simple "Hello World" scenario but it should get you going.
The documentation is probably helpful too: https://docs.direktiv.io/v0.5.10/getting_started/making-functions/
The basic concept is to have a listener on port 8080 which receives the JSON request from Direktiv. The listener just has to respond to it with JSON and can potentially respond with errors too.
If you are using the local docker container for testing you can use the registry installed in that container: https://docs.direktiv.io/v0.5.10/environment/direktiv-development-environment/ and push images to localhost:31212/myapp
Please feel free to ask a question if that does not get you started with your custom containers.
Thanks

Thanks. That's very helpful!

Actually may I reopen this as I was not able to get a sample working locally using docker container.
I chose the dotnet container and pushed to the local registry localhost:31212.
Here is my sample yaml file:
`id: mycontainer
functions:

id: jsonserver
image: localhost:31212/dotnetservice
type: reusable
states:
id: jsonserver
type: action
action:
function: jsonserver
input:
name: "Jian"
transform: 'jq(.return)'
transition: logger
id: logger
type: noop
log: 'jg(.)'
`

Can you spot any problem with my settings?
Regards,
J

Hi,
there are two little issues here.
1. We implemented a bug with the direktiv-kube container v0.5.10 and you found it :1st_place_medal:
We have migrated Knative from 0.25 to 1.0 in the last release. The direktiv-kube container got updated too but there was something missing in the configuration so it can not pull the images from the local docker registry. We have updated the latest version to fix it. Either you have to stop the container, delete the image and re-pull it for the fix or we have pushed a version v0.5.10a. The following command should pull the fixed version:
docker run --privileged -p 8080:80 -p 31212:31212  -ti direktiv/direktiv-kube:v0.5.10a

But as I said you can delete the old image too and just run latest. That should work too. Sorry for that. We tested it with a different container and it works fine now.
2. jq instead of jq
The last log line has a typo. But that is just a small one.

Thanks for the quick response. I have updated the docker image version, however, it still ran into the same error when invoking the dotnet container.
Anything else I can do to troubleshoot?

Hi,
Maybe I should have asked what the actual problem is?

I am not sure if there are other logs I can look for. Right now the instance details page showed the same error as I started this thread.

There are two ways to find out what is not working with a function.

User Interface

On the right side of the user interface you should see the function(s) used by that workflow. In this case it is only one so you should see only one in that list. I have highlighted it in the screenshot. The red dot usually turns green after downloading and starting a workflow. If you have an empty list, just run the workflow once to trigger the creation of the function because they are on demand. You can click on that function too to see details why it is not turning red. Pleas let me know what the errors are you are seeing on the detail page.

That is one reason why we are getting a new UI in January. This functionality is not obvious :)

Kubectl

If you are  interested in the internals you can use kubectl too. For this you need to go to a shell in the container:
docker exec -it MY_CONTAINER_NAME /bin/bash

The services are based on Knative so they are called ksvc. Because you have only one the following command should show what is wrong with the service:
kubectl describe ksvc -A

This should report the same errors what the UI is showing. Just a preference.

Ok great. Got it working now. Its simply running out of resource in local docker.


Disable Facebook proof checking until after Continue is clicked

@keybase/react-hackers

Yeah, withState() creates a new local state var, exposes it to children as a prop, the container gets the state and the display component gets a prop for accessing the state bool and a prop for changing the state bool.


Chromium 92 update

Windows is the only binary with a version significantly behind the current ungoogled-chromium version. Is there a reason that this is the cash?

It looks like an update stalled in PR #84. Is there anything we can do to help get this going again?

You can try to build yourself and figure out then problems, and then push to the PR (or create a new one if the original one cannot be updated). I think we just lack someone who can keep windows updated regularly right now.

I tried to build it myself and it failed. The documentation on building isn't really that clear

I looked at PR #84 and I'm building without the safe browsing patch. I'll see if it works or not

You can try to build yourself and figure out then problems, and then push to the PR (or create a new one if the original one cannot be updated). I think we just lack someone who can keep windows updated regularly right now.

Seems that most updates are trivial but require lots of time if they are done manually.
https://github.com/Eloston/ungoogled-chromium/commit/a8033105b76b614598df33469b717aa75d4586f3#diff-f1be16a78115f65dfd2553a282c7b1c7b53c9898615a350cb8f6817370c93aa3L4817

I removed the safe browsing patched and opened it up. Seems everything works fine except a graphical bug with the menu. I don't know if this will work on other people's computers.

Weirdly enough the build string internally is 89 but in the settings --> about menu it says 92. Not sure which build number it is actually but it does has some Chromium 90 and 91 features

I tried to compile with chromium 91 instead of 92. Failed with the same error as PR #84. Don't know why it suddenly worked when using chromium 92.

@Nifury On Linux we use quilt to manage such minor changes (and that is why there is a series file). I don't know whether you can use it on Windows, maybe try WSL.
@Eshanepicfighter The error goes away most likely because code changes between v91 and v92. The error in #84 is not complete but my guess is symbol missing when linking (the error doesn't look exactly the same like on Linux but I think that is what happened). That usually means one of the patches missed some function definitions or function calls that should be removed so the linker is referring to them but cannot find the functions.

@wchen342 Ok. The only functional way right now to get ungoogled-chromium 92 on windows is to remove the safe browsing patch which I would not like to do that but its required until somebody can open a pull request with the patch. Whoever has the know how please open a pull request


A strange issue when the APP second launch in debug mode

I have encounter a strange issue when the APP second launch in debug mode, when I run the APP on the real device in debug mode, everything is ok, but if I stop debug and relaunch the APP, the APP will crash, but if install the in-house APP on the real device everything is ok. And on simulator, everything is ok, here is the crash report:
Thread 0 Crashed:
0   ...g_rt.asan_ios_dynamic.dylib	0x008740e8 0x831000 + 274664
1   ...g_rt.asan_ios_dynamic.dylib	0x00872fb2 0x831000 + 270258
2   ...g_rt.asan_ios_dynamic.dylib	0x00868b24 0x831000 + 228132
3   ...g_rt.asan_ios_dynamic.dylib	0x00861a6e 0x831000 + 199278
4   libkeymgr.dylib               	0x37b76cb4 dwarf2_unwind_dyld_add_image_hook + 24
5   dyld                          	0x1fec388c 0x1fec0000 + 14476
6   libdyld.dylib                 	0x37b748ce _dyld_register_func_for_add_image + 50
7   libkeymgr.dylib               	0x37b76c8a __keymgr_initializer + 18
8   libSystem.B.dylib             	0x368c3ae8 libSystem_initializer + 100
9   dyld                          	0x1fed1df8 0x1fec0000 + 73208
10  dyld                          	0x1fed1ef8 0x1fec0000 + 73464
11  dyld                          	0x1fece752 0x1fec0000 + 59218
12  dyld                          	0x1fece6dc 0x1fec0000 + 59100
13  dyld                          	0x1fece6dc 0x1fec0000 + 59100
14  dyld                          	0x1fecd87a 0x1fec0000 + 55418
15  dyld                          	0x1fecd900 0x1fec0000 + 55552
16  dyld                          	0x1fec1c9c 0x1fec0000 + 7324
17  dyld                          	0x1fec5c88 0x1fec0000 + 23688
18  dyld                          	0x1fec11ee 0x1fec0000 + 4590
19  dyld                          	0x1fec1040 0x1fec0000 + 4160

you should decode the symbol first.

I have already reSymbolicatecrash, but the crash file still like this

I'm sorry, but looks like we can't offer more help here... If you think this is about ios-charts, try remove it and reproduce, but I guess it's not about this library. So maybe ask your folks or SO for help. Closing; if you got news reopen it.

I have changed the scheme, everything is ok, not select Enable Address Sanitizer and Enable Zombie Objects

OK, I remeber if I enable Address Sanitizer my app won't start at all.


Add recursive to L.LayerGroup.eachLayer method

It might be useful to add an new option to L.LayerGroup.eachLayer() method for recursive behavior?
This could greatly improve management and research possibilities on complex data.
for example:
....geojson loading...

var geo1 = L.geoJson(Geo1);
var geo2 = L.geoJson(Geo2);
var geo3 = L.geoJson(Geo3);
var geo4 = L.geoJson(Geo4);

var group1 = L.LayerGroup([geo1, geo2]);
var group2 = L.LayerGroup([geo3, geo4]);
var groupAll = L.LayerGroup([group1, group2]);

groupAll.eachLayer(function(lay, layParent) {
   console.log(lay, layParent);
}, {
 recursive: true
//new option
})

+1

+1

Sounds like a cool little feature, but I'd rather have a new function call for recursively traversing layer groups (maybe something like getSingleLayers() and eachSingleLayer()). It should be straightforward to implement in very few lines of code, so I'll encourage any newbies to submit a pull request. cc @yourfirstpr

getSubLayers() or getAllLayers() ?

How about eachLayerRecursive? It's not a get-method, since it will use a callback to visit each layer, so I'd keep that out of the name. Also, since it's more or less the same method as eachLayer, it would be nice if the name makes that clear.

+1

Hi,
It seems to me that getSingleLayers() / eachSingleLayer() convey a different meaning from eachLayerRecursive():

getSingleLayers() / eachSingleLayer() sound like acting only on non-group layers, which is interesting in probably most situations (see Leaflet/Leaflet.markercluster#624 for getting non-group layers, stefanocudini/leaflet-search#101 for applying a method on them). However, it might be ambiguous whether they just skip group layers or if they continue recursively on children of group layers? => getSingleLayersRecursive() and eachSingleLayerRecursive()?

eachLayerRecursive() sounds like doing the same as eachLayer() at the beginning (i.e. applying the method to child group layers as well), but continuing to children of those group layers. Hence it sounds like it does more than eachSingleLayerRecursive().

Similarly, getAllLayers() sounds like it returns all group and non-group layers. => getLayersRecursive()?

Result
Get
Apply

Direct children only (current methods)
getLayers()
eachLayer()

Direct non-group only
getSingleLayers()
eachSingleLayer()

Recursively non-group only
getSingleLayersRecursive()
eachSingleLayerRecursive()

Recursively group and non-group
getLayersRecursive()
eachLayerRecursive()

FWIW, Leaflet-PIP plugin would also benefit from such a recursive extraction: https://stackoverflow.com/questions/37274103/how-to-use-leaflet-pip-plugin-with-pure-geojson-data

Leaflet.draw as well…
http://gis.stackexchange.com/questions/203540/how-to-edit-an-existing-layer-using-leaflet

I propose:
L.LayerGroup.include({
	eachLayerRecursive: function(method, context) {
		this.eachLayer(function(layer) {
			if (layer._layers)
				layer.eachLayerRecursive(method, context);
			else
				method.call(context, layer);
		});
	}
});

Run method on all LayerGroup tree leaves but not on branches.

HI guys, I've been following this issue for a while and I realized that once we add recursion to eachLayer, we should also add recursion or a method with recursion to removeLayer (both on Map and LayerGroup), to hasLayer and to getLayer.
Doesn't make sense be able to execute one function recursively on all layers and "sub-layers" and not be able to manipulate those "sub-layers".


About the depth volume predicted by the mono depth

I have a question. mu + k*sigma might be negative. The depth volume constructed by negative depth might bring some errors to the training results. How do the depth volume work and keep positive?

Hi, thanks for your interest.
Yes, this can happen. But in practice, the estimated 'mu' is positive (usually > 1m) and the scale of 'sigma' is significantly smaller than that of 'mu' - so 'mu + k*sigma' stays positive.


Ensures that all table schemas are of StructType

Description
This change makes the table Schema type an alias to the SchemaTypeStruct thus ensuring that all tables are properly created with the correct schema type.
Related Issue(s)
closes #409
Documentation
The related issue #409 details this a bit more. But as required in other delta implementations -  spark -
the create table must use a struct type as the schema definition.
https://jaceklaskowski.github.io/mastering-spark-sql-book/logical-operators/CreateTableStatement/?h=createtable
https://jaceklaskowski.github.io/mastering-spark-sql-book/types/StructType/

Thank you @blogle !


filezilla: fix default settings in config file

Comment out $SOMEDIR/filezilla/ (doesn't work anyway, $SOMEDIR is not defined) and $USERPROFILE/Documents.
Set Disable update check to 1 - don't check for new FileZilla versions as Scoop handles the updates.

#2328 #2425 #3025


Improve temporary files handling on Windows

Output of restic version
restic 0.12.0-dev (compiled manually) compiled with go1.15.2 on windows/amd64
What should restic do differently? Which functionality do you think we should add?
I would like to reduce the amount of disk writes when restic uses temporary files and prevent those files from being occasionally left behind.
What are you trying to do? What problem would this solve?
Ideally I would have liked to replace temporary files by in-memory buffers, which would have been a more elegant solution, but from this thread it is unclear if it would be accepted. The solution on Linux might be to use a ramdisk, but on Windows it's not as easy.
My solution is to add a few flags (also mentioned in the aforementioned thread) when creating a temporary file:

Specifying the FILE_ATTRIBUTE_TEMPORARY attribute causes file systems to avoid writing data back to mass storage if sufficient cache memory is available, because an application deletes a temporary file after a handle is closed. In that case, the system can entirely avoid writing the data.

I have already implemented a working proof of concept. I am opening this issue as per the contribution guidelines to see if there is interest before polishing and creating the pull request. The change would consist of re-implementing TempFile() in a lower level fashion instead of using ioutil. This isn't ideal, but I don't see how else I could get the flags through.
Example:
func TempFile(dir, prefix string) (f *os.File, err error) {
	if dir == "" {
		dir = os.TempDir()
	}

	access := uint32(syscall.GENERIC_READ | syscall.GENERIC_WRITE)
	creation := uint32(syscall.CREATE_NEW)
	flags := uint32(FILE_ATTRIBUTE_TEMPORARY | FILE_FLAG_DELETE_ON_CLOSE)

	for i := 0; i < 10000; i++ {
		path := filepath.Join(dir, prefix+nextRandom())

		h, err := syscall.CreateFile(syscall.StringToUTF16Ptr(path), access, 0, nil, creation, flags, 0)
		if err == nil {
			return os.NewFile(uintptr(h), path), nil
		}
	}

	// Proper error handling is still to do
	return nil, os.ErrExist
}

Did restic help you today? Did it make you happy in any way?
Reading the discussions here makes me happy to see a welcoming community!

Sorry for the late reply. We're indeed interested in this improvement. Although, implementing a custom TempFile function is not necessarily the nicest thing to do, it's probably worth it in this case. Also not having to deal with temporary files that cannot be deleted because some other process has opened these seems useful.
That said the code should get some documentation on its purpose and why we have to manually implement TempFile.

Ideally I would have liked to replace temporary files by in-memory buffers, which would have been a more elegant solution, but from this thread it is unclear if it would be accepted. The solution on Linux might be to use a ramdisk, but on Windows it's not as easy.

The problem with keeping all temporary files in in-memory buffers is that in some cases the temporary files can become rather large (several dozen MB in case of directories with very large files or very high file count) which could drastically increase the memory usage of restic. There are also lots of requests to increase the default pack size from now 4-5MB to something much larger, see #2750.

@ducalex Are you still interested in opening a PR for the proposed temp file handling?


bottom: add gpu recognition, new apple sdk, refactor

Closes https://github.com/ClementTsang/bottom/issues/1629
Tracking: https://github.com/NixOS/nixpkgs/issues/354146, can't test it as I don't have a darwin machine, but in another commit (9a78e6734410) I saw this exact change so most likely it works.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[x] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 360568

aarch64-darwin

:white_check_mark: 1 package built:

bottom

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 360568

x86_64-linux

:white_check_mark: 1 package built:

bottom

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 360568

aarch64-darwin

:white_check_mark: 1 package built:

bottom


⚠ Jenkins Plugins Artifactory has degraded performance

In 8c8b477, Jenkins Plugins Artifactory (https://get.jenkins.io/plugins/artifactory/) experienced degraded performance:

HTTP code: 200
Response time: 1218 ms

Resolved: Jenkins Plugins Artifactory performance has improved in ddadfc8 after 33 minutes.


I adore this project, would you like help maintaining it?

This project makes me very happy and I'm quite experienced with Vue. Would you have any interest in letting me add features (such as #9 or #61) and modernizing the code base to a supported version of Vue?

Sure. I sent you a collaboration invite.


Setup pytest

Running pytest locally is correctly running the test suite, but integration with Travis-CI doesn't work, as it can not find the Cortex module.
E   ModuleNotFoundError: No module named 'cortex'
Issue #130 has been open.

Errors corrected, the branch should be ready to be merged.


Version Packages

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
<EMAIL_ADDRESS>Patch Changes

#848 16045ba Thanks @threepointone! - update miniflare

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Add travel limits.

Read the size of the working space from GRBL's $130, $131 and $132 parameters. Then on every movement request compare the distance from the current position to the limit and do not allow jogging beyond that distance. This will keep the movement from triggering a limit switch or hitting a hard stop which will cause GRBL to loose its position or the steppers miss steps.

Test on travel_limits branch.


load_model and save_model can now preserve state of stateful recurren…

…t networks
See https://github.com/fchollet/keras/issues/4379

Closing outdated PR. If you still care about the content of the PR, please submit a new PR to master, updated for the Keras 2.0 API.


Event element not defined

Current behavior
When listen to events on a element the element is not definet in the handler
$("body").on("click", ".dropdown", (e) => {
console.log($(this)) . --> Cash {}
})
So i can not use methods on the element such addClass etc...
I am using cash with parcel js (https://parceljs.org) and importing it like
import $ from 'cash-dom'
Thank you

That's not how arrow functions work, you should look that up.

Ah yes sorry, my fault!


Unable to resolve module RCTDeviceEventEmitter

bundling failed: Error: Unable to resolve module RCTDeviceEventEmitter
my code is
import RCTDeviceEventEmitter from "RCTDeviceEventEmitter";
React Native 0.60.5 is ok ,but i upgrade 0.61.0 get error,and i import dismissKeyboard  get the same error. please tell me why,and what should I do. thanks so mush.
React Native version:
"react-native": "^0.61.0"

Same bug 👍  "dependencies": {
"@react-native-community/push-notification-ios": "^1.0.2",
"react": "16.9.0",
"react-native": "0.61.2",
"react-native-notifications": "^2.1.5"
},

Facing the same issue, Any solution

0.60.6 upgrade to 0.61.5 got the same error, I tried RCTDeviceEventEmitter DeviceEventEmitter instead, and get the same dismissKeyboard error, is RCTDeviceEventEmitter abandoned?I haven't found in the documents and the change log

0.60.6 upgrade to 0.61.5 got the same error, I tried RCTDeviceEventEmitter DeviceEventEmitter instead, and get the same dismissKeyboard error, is RCTDeviceEventEmitter abandoned?I haven't found in the documents and the change log

Try import {RCTDeviceEventEmitter} from 'react-native'

@AllenCai1991
I was able to work around by importing directry from the file in RN 0.61.5
import RCTDeviceEventEmitter from 'react-native/Libraries/EventEmitter/RCTDeviceEventEmitter';


getting balnk data in response

i tried with this below code getting blank data in repsone (request with OAuth1.0) .fyi credentials are correct i cheked with postman tool i'm getting response there. any Suggestions how to do it.
request.post(url, {
oauth: {
consumer_key:'con_key',
consumer_secret:'con_sec',
token:'token_key',
token_secret:'token_secret
},
body:{ // parameters for request here },
json: true
},function (err, res, body) {
console.log(body)//getting blank
});
Thanks.

check the response code.

hi @mikeal can you please mention clearly what needs to be checked in response code. there is lot of data if print "res" .

res.statusCode

it's returning 403 @mikeal

That's the problem then, the server would return a 200 response if it liked the request.
https://en.wikipedia.org/wiki/HTTP_403
You probably need some kind of authentication step first, depends on the site.

We have this problem as well. We make a request to a service that basically provides a batch function. You post one request containing three sub-requests. Two of those work and respond with 200, the third fails with 403. This turns the batch request into a 403, but the data for the first two operations is returned. I can see this in postman, but using request.js we only get garbage. Please fix.


Previews don't include images/styles/includes

This can be fixed by rendering out the page on its own or maybe setting the URL of the WebBrowser control before setting its contents.

Compromised a little on this. It is in fact rendered out, but I wasn't able to hack the WebBrowser to get it at the right URL before setting the document HTML. However I did also add build-related functions to the editor which makes up for it some. https://github.com/dotcomboom/AutoSite-XL/commit/033d28c2e25669347cf802b55a5defea70ad80a6


Feature

finish mobile  porfolio project

Fix the conflict errors

I ' m repeating my block , this project was already approved.
I fix some a few things in the css style and change a few code in html like the section.


[Native-Animated] Fix setValue to work properly on natively driven nodes

This change fixes an issue with calling setValue for natively driven nodes. As of now an attempt to call this method from JS would trigger an error "Attempting to run JS driven animation on animated". That is because for natively animated nodes we don't allow for setNativeProps to be executed and method _flush is now responsible for triggering that call. To fix the issue we add extra flag to _updateValue method that indicates if we should be "flushing" updated values using setNativeProps and we pass an appropriate value depending on the status of the node (native/non-native). Note that in animation callback we always pass true - that is because natively driven animations will never call into that callback.
Test Plan
Run JS tests: npm test Libraries/Animated/src/__tests__/AnimatedNative-test.js

@facebook-github-bot shipit

Thanks for importing. If you are an FB employee go to Phabricator to review.


Fix table swap in NestedLoop Join for single node

Follow-up for https://github.com/crate/crate/commit/27201a99bd320a831adf670dc44227c9c2967ca1
This prevents a wrong table swap when table stats are unavailable on a single node.
Summary of the changes / Why this improves CrateDB
Checklist

[x] Added an entry in CHANGES.txt for user facing changes
[x] Updated documentation & sql_features table for user facing changes
[x] Touched code is covered by tests
[x] CLA is signed
[x] This does not contain breaking changes, or if it does:

It is released within a major release
It is recorded in CHANGES.txt
It was marked as deprecated in an earlier release if possible
You've thought about the consequences and other components are adapted
(E.g. AdminUI)

retest this please

retest this please

I fixed the code in NestedLoopJoin and added an additional unit test which breaks when the NestedLoopJoin is not modified. I hope it is clear now.

retest this please
Setting status of 7228caaf59da920a6023ea787d177090f7a7afc5 to FAILURE with url https://jenkins.crate.io/job/CrateDB/job/crate_on_pr/4819/ and message: 'Build finished. 8976 tests run, 2 skipped, 0 failed.'

This needs to be backported. Can I merge it just as a follow-up to the previous fix or should it have an entry in fixes ?

retest this please

retest this please


How to rebuild the scss

Hi,
I want to modify  src/css/_partial/_post/_footer.scss
I already install yarn and webpack, and run
$ yarn run build
yarn run v1.9.4
$ webpack
(node:10333) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
(node:10333) UnhandledPromiseRejectionWarning: TypeError: Cannot create property 'message' on string 'Checksum error in glyf'
    at /Users/scottchayaa/myblog/themes/jane/node_modules/iconfont-webpack-plugin/lib/loader.js:34:19
    at process._tickCallback (internal/process/next_tick.js:68:7)
(node:10333) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:10333) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
✨  Done in 5.38s.

I don't know what the problem is it....
Could anyone help me?
Please give me some step how to rebuild the scss...@@"

Maybe this link could help you? https://github.com/xianmin/hugo-theme-jane/wiki/How-to-Contribute

Hi,
I want to modify src/css/_partial/_post/_footer.scss
I already install yarn and webpack, and run

The issue was grounded in an unmaintained transfoermation-matrix module.
You'll see this when running yarn install:
yarn install v1.12.3
[1/4] 🔍  Resolving packages...
warning iconfont-webpack-plugin > svgicons2svgfont ><EMAIL_ADDRESS>Package no longer supported. Contact<EMAIL_ADDRESS>for more info.

More details - for fun:D at https://www.npmjs.com/package/transformation-matrix-js.
Solution
include a newer version of svgicons2svgfontthat does not depend on transformation-matrix anymore.
Here's my themes/jane/package.json:
{
  "name": "hugo-theme-jane",
  "version": "1.2.0",
  "description": "A simple theme for hugo",
  "main": "",
  "scripts": {
    "build": "webpack",
    "demo": "hugo --contentDir='./exampleSite/content' --config='dev-config.toml' ",
    "dev:assets": "webpack --watch --display='errors-only' ",
    "dev:site": "hugo server --buildDrafts --contentDir='./exampleSite/content' --config='dev-config.toml' ",
    "dev": "concurrently 'npm run dev:assets' 'npm run dev:site' ",
    "clean": "rm -rf ./public",
    "contributors:add": "all-contributors add",
    "contributors:generate": "all-contributors generate"
  },
  "author": "xianmin",
  "license": "MIT",
  "devDependencies": {
    "all-contributors-cli": "^4.11.1",
    "autoprefixer": "^8.1.0",
    "babel-core": "^6.26.0",
    "babel-loader": "^7.1.3",
    "babel-plugin-transform-runtime": "^6.23.0",
    "babel-preset-es2015": "^6.24.1",
    "babel-preset-stage-2": "^6.24.1",
    "concurrently": "^3.5.1",
    "fsevents": "^1.2.4",
    "css-loader": "^0.28.10",
    "expose-loader": "^0.7.3",
    "extract-text-webpack-plugin": "^3.0.0",
    "iconfont-webpack-plugin": "^3.0.1",
    "svgicons2svgfont":"^9.0.3",
    "file-loader": "^1.1.11",
    "node-sass": "^4.10.0",
    "postcss-loader": "^2.1.1",
    "sass-loader": "^6.0.7",
    "style-loader": "^0.20.2",
    "uglifyjs-webpack-plugin": "^1.2.2",
    "url-loader": "^1.0.1",
    "webpack": "^3.11.0"
  },
  "dependencies": {}
}

The important entry is "svgicons2svgfont":"^9.0.3", after that a build works just fine.
successful build output
$ yarn run build
yarn run v1.12.3
$ webpack
Hash: c4f8a2e64542dc7f9e40
Version: webpack 3.12.0
Time: 4293ms
                                      Asset     Size  Chunks             Chunk Names
  fonts/chancery/apple-chancery-webfont.eot  26.1 kB          [emitted]
fonts/chancery/apple-chancery-webfont.woff2  23.5 kB          [emitted]
 fonts/chancery/apple-chancery-webfont.woff  30.3 kB          [emitted]
  fonts/chancery/apple-chancery-webfont.ttf  60.8 kB          [emitted]
  fonts/chancery/apple-chancery-webfont.svg  74.3 kB          [emitted]
                                jane.min.js  4.56 kB       0  [emitted]  jane
                               jane.min.css  38.5 kB       0  [emitted]  jane
                            jane.min.js.map  13.6 kB       0  [emitted]  jane
                           jane.min.css.map   121 kB       0  [emitted]  jane
   [0] ./js/main.js 969 bytes {0} [built]
   [1] ./css/style.scss 41 bytes {0} [built]
   [2] ./js/backToTop.js 400 bytes {0} [built]
   [3] ./js/mobileNavbar.js 1.5 kB {0} [built]
   [4] ./js/toc.js 750 bytes {0} [built]
   [5] ./js/headerAnchor.js 1.41 kB {0} [built]
   [6] ./js/footnoteTooltip.js 1.03 kB {0} [built]
   [7] ./js/highlight.js 767 bytes {0} [built]
   [8] ../node_modules/css-loader??ref--1-2!../node_modules/postcss-loader/lib??ref--1-3!../node_modules/sass-loader/lib/loader.js??ref--1-4!./css/style.scss 159 kB [built]
  [12] ./fonts/chancery/apple-chancery-webfont.eot 87 bytes [built]
  [13] ./fonts/chancery/apple-chancery-webfont.woff2 89 bytes [built]
  [14] ./fonts/chancery/apple-chancery-webfont.woff 88 bytes [built]
  [15] ./fonts/chancery/apple-chancery-webfont.ttf 87 bytes [built]
  [16] ./fonts/chancery/apple-chancery-webfont.svg 87 bytes [built]
    + 5 hidden modules
Child extract-text-webpack-plugin ../node_modules/extract-text-webpack-plugin/dist ../node_modules/css-loader/index.js??ref--1-2!../node_modules/postcss-loader/lib/index.js??ref--1-3!../node_modules/sass-loader/lib/loader.js??ref--1-4!css/style.scss:
     5 assets
       [0] ./fonts/chancery/apple-chancery-webfont.eot 87 bytes {0} [built]
       [1] ../node_modules/css-loader??ref--1-2!../node_modules/postcss-loader/lib??ref--1-3!../node_modules/sass-loader/lib/loader.js??ref--1-4!./css/style.scss 159 kB {0} [built]
       [5] ./fonts/chancery/apple-chancery-webfont.woff2 89 bytes {0} [built]
       [6] ./fonts/chancery/apple-chancery-webfont.woff 88 bytes {0} [built]
       [7] ./fonts/chancery/apple-chancery-webfont.ttf 87 bytes {0} [built]
       [8] ./fonts/chancery/apple-chancery-webfont.svg 87 bytes {0} [built]
        + 3 hidden modules
✨  Done in 5.42s.


Added ADA support for the flip camera button

Jira issue:
https://glia.atlassian.net/browse/MOB-3293
What was solved?
Added ADA support for the flip camera button
Release notes:

[x] Feature
[x] Ignore
[ ] Release notes (Is it clear from the description here?)
[ ] Migration guide (If changes are needed for integrator already using the SDK - what needs to be communicated? Add underneath please)

Additional info:

[ ] Is the feature sufficiently tested? All tests fixed? Necessary unit, acceptance, snapshots added? Check that at least new public classes & methods are covered with unit tests
[ ] Did you add logging beneficial for troubleshooting of customer issues?
[ ] Did you add new logging? We would like the logging between platforms to be similar. Refer to Logging from Android SDKs → Things to consider for newly added logs in Confluence for more information.

Screenshots:

Hey! I made changes and added an accessibility event. I believe, in this case, it is better to ask you for a review again.


Update test suite to Rspec 3

Update syntax to Rspec 3.
Many of the tests require a valid phone number to hit the Authy API.
I also marked all of those failing tests as pending.

I put this commit in my other PR, https://github.com/authy/authy-ruby/pull/33.
Otherwise, the test suite doesn't pass.


Pixracer rev 12 support

code inspection: makes perfect sense now :)
Will test on xr12 shortly

code inspection: makes perfect sense now :)
Will test on xr12 shortly

looks like PX4_SPI_BUS_BARO needs to be defined in all board_config files, not just v2 and v4

How come the build test then passes, even for v1? Its not required.

I will leave this sitting here until RC12 boards are redistributed.

I guess that means PX4_SPIDEV_BARO is not defined in the other board configs


AnnotationDTO: content Column

Please add a column named content to the AnnotationDTO. It contains a JSON encoded String.
Add this column in AnnotationDTO#toJSON.

In the backend this column should be handled as a blackbox. The backend gets a string out of a request, stores it in the database, retrieves it from the database.

content should be handled the same way as tags and settings. Both fields contain JSON encoded in a string.

I would even argue that if we go this route, we should just merge settings in there, or rather into the appropriate subobjects of that. :thinking:
The same could be said about tags, but seeing that this is never used anywhere, I would rather argue to get rid of tags. :sweat_smile:
Opinions?

So we put everything in settings? Ok.


⚠ Bofrost.at has degraded performance

In 37444e2, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1145 ms

Resolved: Bofrost.at performance has improved in 8f14388 after 24 minutes.


Three-way merge not ignoring fields changed in current but shared between modified and original

Describe the bug
Let's use an example of a Deployment that has a HorizontalPodAutoscaler acting on it. When an operator creates the deployment, it sets some number of initial replicas, in this example, spec.replicas = 1. The HPA then adds a replica, to make it spec.replicas = 2. I would expect this library to ignore this field from the patch, because modified == original and therefore, whatever the value of current, it is assumed to be changed externally.
Therefore:
original[spec.replicas] = 1 (generated by an operator)
current[spec.replicas] = 2 (from HPA)
modified[spec.replicas] = 1 (generated identically by same operator later)
Steps to reproduce the issue:
Here is a simple reproducer:
package main

import (
	"github.com/banzaicloud/k8s-objectmatcher/patch"
	v1 "k8s.io/api/apps/v1"
	"log"
)

func main() {
	origReplicas := int32(1)
	currReplicas := int32(2)

	modified := &v1.Deployment{
		Spec: v1.DeploymentSpec{
			Replicas: &origReplicas,
		},
	}

	current := modified.DeepCopy()
	_ = patch.DefaultAnnotator.SetLastAppliedAnnotation(current)

	current.Spec.Replicas = &currReplicas

	patchResult, _ := patch.DefaultPatchMaker.Calculate(current, modified, patch.IgnoreStatusFields())
	if !patchResult.IsEmpty() {
		log.Printf("DIFF: " + string(patchResult.Patch))
	}
}

This will output:
DIFF: {"spec":{"replicas":1}}

Expected behavior
I expected spec.replicas to not appear in the diff, because it is changed in current but original == modified and so should be assumed to be changed externally.

This actually seems to be just how CreateThreeWayMergePatch works. https://github.com/kubernetes/kubernetes/issues/37415 seems to show that this is indeed confusing to at least one other person 😅, and the documentation and implementation say different things.
But i guess, this is not a problem with this library, and fixing it here would be a hack.

This actually seems to be just how CreateThreeWayMergePatch works. https://github.com/kubernetes/kubernetes/issues/37415 seems to show that this is indeed confusing to at least one other person 😅, and the documentation and implementation say different things.
But i guess, this is not a problem with this library, and fixing it here would be a hack.

I beleive your only option in this case is that you don't set a field that you don't want to manage. Original is used only to detect intended field deletions.

I beleive your only option in this case is that you don't set a field that you don't want to manage. Original is used only to detect intended field deletions.


Implement a "Retry" feature

A common use-case in modern applications is a "retry" feature – either refresh a feed or some request failed.
Thanks to providers being declarative, it is possible to have built-in support for such feature.
First, this would require #39 to make the syntax reasonable.
This would consist of the following things:

A MyProvider.retry((ref) {...}) modifier, to mark a state as retryable.
This would wrap the exposed object in a Retry<T>.
For example, if we have:
final provider = FutureProvider((ref) async => 42);

Widget build(context) {
  AsyncValue<int> value = useProvider(provider);
}

Then using the .retry modifier, we would have:
final provider = FutureProvider.retry((ref) async => 42);

Widget build(context) {
  Retry<AsyncValue<int>> value = useProvider(provider);
}

Where Retry is:
abstract class Retry<T> {
  T get value.
  Future<T> retry();
}

The .retry modifier would be specific to Future & StreamProvider only

The UI can then freely call Retry.retry(), which would destroy the previous state and re-create a new state for the given provider.

The result of Retry.retry is a Future<T> that resolves when the state is re-created

The constructor of a .retry provider would expose an parameter to define what state should be displayed during the AsyncValue.data to AsyncValue.data transition:

show the previous value
reset to AsyncValue.loading

This parameter could be named gaplessPlayback, which is the named used by the Image widget for the same behavior.
We could also have an enum.

A provider marked with .rety can hook-up on the retry event to perform some clean-up using ref:
final provider = FutureProvider.retry((ref) async {
 ref.onRetry(() {
   // TODO: clear cache, so that the next request doesn't simply return the same result.
 });

 return 42;
});

When using ref.read(futureProvider), the value obtained is always a Stream<T>, even for FutureProvider.retry – as the value exposed by a retryable FutureProvider can change over time.

Usage example
All in all a typical usage would be a FutureProvider that performs an HTTP request.
Then, the UI would expose a way for users to restart the request, such as with a pull-to-refresh or a "retry" button.
In code, this would look like this:
class Todos {
  static final provider = FutureProvider.retry(
    (ref) async {
      final repository = ref.read(Repository.provider);
      return repository.fetchTodos();
    },
    // during retry, keep showing the previous state
    gaplessPlayback: true,
  );
}

...

Widget build(context) {
  final todos = useProvider(User.provider);

  return todos.value.when(
    loading: () => const CircularProgressIndicator(),
    error: (err, stack) {
      return Column(
        children: [
          Text('Error $err'),
          RaisedButton(
            onPressed: () => user.retry(),
            child: Text('retry'),
          ),
        ],
      );
    },
    data: (todos) {
      return RefreshIndicator(
        onRefresh: () => user.retry(),
        child: ListView(
          children: [
            for (final todo in todos) TodoItem(todo: todo),
          ],
        ),
      );
    },
  );
}

This would be fantastic.
It's essentially what I did with notifier.reload() here: https://github.com/flutterdata/data_state
(That notifier is a StateNotifier.)
Question: Since (a) both FutureProvider.retry and StreamProvider.retry would return a Stream<T> and (b) StateNotifier is also a value changing over time, is there any reason why StateNotifier wouldn't have a retry?
Also: using AsyncValue, what is the idiomatic way to display a loading state and a data state at the same time? I like the idea of gaplessPlayback but even this improvement implies a "loading or data" situation.
I'm working on an app where the "pull to refresh" feature keeps before-transition data and shows a LinearProgressIndicator at the top.
It would be great to see AsyncValue (elegantly) support these scenarios. First to get rid of data_state as Flutter Data's async-handling-utility, and most importantly to push a standard in the Flutter community.

StateProvider could have a retry, but StateNotifierProvider is more difficult
Because a retry would create a new instance of the exposed StateNotifier.
So we'd need "ref.read(retryStateNotifierProvider)" to return a StateNotifier, which would be confusing

We can think about adding a retry to StateNotifierProvider in the future, although I would expect future/stream + their family to cover most needs

Yes I meant StateNotifierProvider. I'm not sure about the practical difficulty, but conceptually Stream and StateNotifier are basically the same thing, aren't they?
I am currently using a ~retry with a StateNotifier (through data_state) which I'd like to replace.

While waiting for this, how can we do it in the current state of the library?

@edisonywh i think you have to write a custom StateNotifier.

Either a StateNotifier/ChangeNotifier or a Stream, yes.
Kind of like how you'd do it in every other architectures by doing it yourself.
This issue is more about solving the problem once and for all.

This will be delayed by #49 – which would introduce a ComputedFuture/ComputedStateNotifier/...
With #49, a retry feature could be implemented as:
final myFutureRetryToken = StateProvider((_) => 0);

final myFuture = ComputedFuture<String>((ref, watch) async {
  watch(myFutureRetryToken); // force the future to be recomputed when retryToken is modified

  await Future.delayed(...);
  return 'Hello world';
}

where to retry muFuture, we would do myFutureRetryToken.read(context).state++
This issue can still be useful to make the syntax less verbose & more readable. But it's less important.

Thinking about it, now that everything is "computed", we could have:
final provider = StateNotifierProvider((_) => Counter());

Counter newCounter = context.retry(provider);

When retry becomes recreate 😛

Well that's the same thing 😜

I quite like this context.retry(provider), I think I'll go with that.
It does not introduce new fancy concepts like a Retry<T> object.
It's easy to implement.
And it also works on anything, not just FutureProvider/StreamProvider

will this be part of the dev release?

Yes. It already is developed. The retry feature was implicitly developed for other things. I just need to make a public API and some tests for it.

This is available in 0.6.0-dev:
final productsProvider = FutureProvider((ref) async {
  final response = await httpClient.get('https://host.com/products');
  return Products.fromJson(response.data);
});

class Example extends HookWidget {
  @override
  Widget build(BuildContext context) {
    final Products products = useProvider(productsProvider);

    return RefreshIndicator(
      onRefresh: () => context.refresh(productsProvider),
      child: ListView(
        children: [
          for (final product in products.items) ProductItem(product: product),
        ],
      ),
    );
  }
}

There is no ref.onRetry(() {}) as I'm not sure if it's needed.
I haven't implemented the "gapless playback" flag either. I am not entirely certain that such flag is a good idea, as it could swallow errors. It'll need more thinking.

Looks great Remi!
Why do you say the flag could swallow errors?

Say we retry a future:
If that future fails, we'll likely want to keep showing the previous data instead, and maybe show a snackbar.
So if the "show last valid data" was implemented with a flag, it could swallow errors after the first success.
Maybe we want a custom myFutureProvider.lastValidData.
But on a Future<T>, such provider would return T? instead of the current AsyncValue<T>, so it wouldn't be enough to handle loading/errors on the first render.
Honestly, it's not much of an issue for apps using flutter_hooks. A custom hook could solve this issue easily.
It's more about "What about non-hooks users?"

With hooks, we could do:
final productsProvider = FutureProvider<List<Product>>.autoDispose((ref) async {
  final cancelToken = CancelToken();
  ref.onDispose(cancelToken.cancel);

  return await repository.fetchProducts(cancelToken: cancelToken);
});

// ...

Widget build(context) {
  // Listens to the Future created by productsProvider and handles all the refresh logic
  AsyncValue<List<Product>> products = useRefreshProvider(
    productsProvider,
    onErrorAfterRefresh: (err, stack) => Scaffold.of(context).showSnackBar(...),
  );

  return RefreshIndicator(
    onRefresh: () => context.refresh(productsProvider),
    child: products.when(
      loading: () {
        return const SingleChildScrollView(
          physics: AlwaysScrollableScrollPhysics(),
          child: CircularProgressIndicator(),
        );
      },
      error: (err, stack) {
        return SingleChildScrollView(
          physics: const AlwaysScrollableScrollPhysics(),
          child: Text('Oops, something unexpected happened\n$err'),
        );
      },
      data: (products) {
        return ListView.builder(
          itemCount: products.length,
          itemBuilder: (context, index) {
            return ProductItem(products[index]);
          },
        );
      },
    ),
  );
}

The list of everything this snippet does related to refresh is:

on the first build, handle loading/error states
on refresh:

if the screen was in error state, show the loading screen once again
if the refresh was performed during loading, cancel pending HTTP requests
if the screen showed some data:

keep showing the data while the new state is loading
if the refresh fails, keep showing the previously obtained data and show a snackbar with the error

if the user pops and re-enters the screen while the refresh is pending, show the loading screen
make sure that the RefreshIndicator says visible while the refresh is pending

The question is how to do that with Consumer.

To do it without hooks I think an equivalent to BlocListener as suggested in #62 would be needed to handle the "show snackbar" case when an error occurs.

Do you have an idea on how that would look like?

Maybe something like this. I'm not so sure what would be the best way to handle the refresh while keeping the previous value though. Maybe the previously mentioned flag in the FutureProvider could do it.
return ProviderListener(
  provider: productsProvider,
  listener: (context, products) {
    products.maybeWhen(
      error: (err, stack) {
        Scaffold.of(context).showSnackBar(...),
      },
      orElse: () {},
    );
  },
  child: Consumer((context, watch) {
    final products = watch(productsProvider);

    return RefreshIndicator(
      onRefresh: () => context.refresh(productsProvider),
      child: // Build based on the state of products
    );
  }),
);

if the refresh fails, keep showing the previously obtained data and show a snackbar with the error

Is this limited to a snackbar?  The refresh error can't be dealt with in build?
Since it's clear that a combination of substates can happen at the same time, why choose union/when that forces to fork the UI?

Since it's clear that a combination of substates can happen at the same time, why choose union/when that forces to fork the UI?

The first build when render a "Oops" screen. But after a retry, instead the error will be shown as a snackbar.
So we have this dual behavior where the error handling depend on whether there is data currently visible on the screen.
I'll make a tutorial about that later today, now that I'm done with ScopedProvider.

@rrousselGit I'm having issues with FutureProvider, I have set up everything and it is working well, the only issue I have now is, when I call context.refresh(walletProvider) it shows the loading widget, is it possible not to show the loading widget instead let the old data be showing until it gets the new data from the server and updates the balance?


Format-on-save for UNION statements continues to indent first line

Describe the bug
Every time I save my SELECT in my UNION statements will indent. So if I continue to save over and over it'll continue to indent.

Example Snippet
SELECT
    DISTINCT
    t
FROM
    (SELECT *, 0 AS s FROM [db]..t UNION SELECT *, 1 AS s FROM [db]..t) AS r

Logs
I believe these logs are unrelated, but just in case
Error - 1:32:07 PM] Request textDocument/definition failed.
  Message: System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at Babel.ParserGenerator.MinimalList`1.get_Item(Int32 index)
   at Babel.ParserGenerator.ModifiedMinimalList`1.get_Item(Int32 index)
   at Microsoft.SqlServer.Management.SqlParser.Parser.TokenManager.GetToken(Int32 tokenNumber)
   at Microsoft.SqlTools.ServiceLayer.LanguageServices.Completion.ScriptDocumentInfo.GetPeekDefinitionTokens(ScriptParseInfo scriptParseInfo, Int32 startLine, Int32 startColumn) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\LanguageServices\ScriptDocumentInfo.cs:line 158
   at Microsoft.SqlTools.ServiceLayer.LanguageServices.LanguageService.GetDefinition(TextDocumentPosition textDocumentPosition, ScriptFile scriptFile, ConnectionInfo connInfo) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\LanguageServices\LanguageService.cs:line 1379
   at Microsoft.SqlTools.ServiceLayer.LanguageServices.LanguageService.HandleDefinitionRequest(TextDocumentPosition textDocumentPosition, RequestContext`1 requestContext) in D:\a\1\s\src\Microsoft.SqlTools.ServiceLayer\LanguageServices\LanguageService.cs:line 519
  Code: 0

To Reproduce
Steps to reproduce the behavior:

Create a .sql file
Paste Example Snippet above
Update settings to uppercase everything
Save

Expected behavior
A result of something like:
SELECT
    DISTINCT
    t
FROM (
    SELECT
        *, 0 AS s
    FROM [db]..t
    UNION
    SELECT
        *,
        1 AS s
    FROM [db]..t
) AS r

Desktop (please complete the following information):

SQLTools Version [1.10.1]
VSCode Version: [1.55.2]
OS: [Windows]
Driver:

[ ] PostgreSQL/Redshift
[ ] MySQL/MariaDB
[x] MSSQL/Azure - though I'm not sure how this is utilized for this bug
[ ] SQLite
[ ] Other? Which...

Database version: [MSSQL 13.0.5698.0?]

Additional Context
I've tested this with working code in addition to this pseudo-code.

User error.


Try SHA224

Might be slightly more performant than SHA256 and we only need the first 11 bytes of the digest.

I haven't been able to find any consistent perf improvements this would bring, so not gonna adopt it.


Improve folding

I was messing around with adding support for multiline comments in folding and ended up changing a bunch of other things.
First of all, I am not convinced of folding groups of successive items. For instance, I don't see why it is worthwhile to be able to fold something like the following:
use foo;
use bar;

Furthermore, this causes problems if you want to fold a multiline import:
use foo::{
  quux
};
use bar;

The problem is that now there are two possible folds at the same position: we could fold the first use or we could fold the import group. IMO, the only place where folding groups makes sense is when folding comments. Therefore I have removed folding import groups in favor of folding multiline imports.
Regarding folding comments, I made it a bit more robust by requiring that comments can only be folded if they have the same flavor. So if you have a bunch of // comments followed by //! comments, you will get two separate fold groups instead of a single one.
Finally, I rewrote the API in such a way that it should be trivial to add new folds. You only need to:

Create a new FoldKind
Add it to the fold_kind function that converts from SyntaxKind to FoldKind

Fixes #113

@matklad I think this is ready to be reviewed!

First of all, I am not convinced of folding groups of successive items. For instance, I don't see why it is worthwhile to be able to fold something like the following:

I am rather strongly in favor of folding import groups, for the following reasons:

imports can get quite long, and it might be useful to fold them
with reliable auto-import, imports could be folded by default
import folding is commonly available for other languages.

I agree that folding import group as a whole can conflict with folding a braced block, but I think it's up to the editor to decide how to render folds if they happen to start on the same line. This problem can arise naturally in cases like
if cond {
   // folded block
} else{
   // another block, which will be on the same *visual* line as cond, if the prev block is folded
}

LGTM, though I'd rather leave use folding in place :)

FWIW, you can write imports in one use { .. } block. Even so, I find the style I fall into uses one root use for each crate that I'm importing from. I think there are merits to both options of only collapsing {} blocks and collapsing all use.
For example, the servo imports in both styles:
Single use

use per crate
use bluetooth::BluetoothThreadFactory;
use bluetooth_traits::BluetoothRequest;
use canvas::{gl_context::GLContextFactory, webgl_thread::WebGLThreads};
use compositing::{
    compositor_thread::{CompositorProxy, CompositorReceiver, InitialCompositorState},
    windowing::{WindowEvent, WindowMethods},
    IOCompositor, RenderNotifier, ShutdownState,
};
#[cfg(all(not(target_os = "windows"), not(target_os = "ios")))]
use constellation::content_process_sandbox_profile;
use constellation::{
    Constellation, FromCompositorLogger, FromScriptLogger, InitialConstellationState,
    UnprivilegedPipelineContent,
};
use embedder_traits::{EmbedderMsg, EmbedderProxy, EmbedderReceiver, EventLoopWaker};
use env_logger::Builder as EnvLoggerBuilder;
use euclid::Length;
#[cfg(all(not(target_os = "windows"), not(target_os = "ios")))]
use gaol::sandbox::{ChildSandbox, ChildSandboxMethods};
use gfx::font_cache_thread::FontCacheThread;
use ipc_channel::ipc::{self, IpcSender};
use log::{Log, Metadata, Record};
use msg::constellation_msg::{PipelineNamespace, PipelineNamespaceId};
use net::resource_thread::new_resource_threads;
use net_traits::IpcSend;
use profile::{mem as profile_mem, time as profile_time};
use profile_traits::{mem, time};
use script_traits::{ConstellationMsg, SWManagerSenders, ScriptToConstellationChan};
use servo_channel::{channel, Sender};
use servo_config::{opts, prefs::PREFS};
use std::{borrow::Cow, cmp::max, path::PathBuf, rc::Rc};
use webrender::{RendererKind, ShaderPrecacheFlags};
use webvr::{WebVRCompositorHandler, WebVRThread};

Looks reasonable to me.

Let's merge this as is for now: I'd love to move the repo rust-beta and 2018 edition, so that to make integrating salsa-rs/salsa easier.

bors r+