Add Objective-C support

astyle also supports Objective-C.
I tested it, and it seems to work just fine on the command-line:
astyle <myObjCFile.m>
However, in vim when I execute :Autoformat, I get the fallback vim auto indent rather than astyle's output.  Adding this to my .vimrc did the trick:
let g:formatprg_objc= "astyle"

Looks like that support is added in version 2.04 indeed. My version of astyle (from the ubuntu 14.04 repositories) is only 2.03 and therefore doesn't support objective-c. Nevertheless it would be a very good thing to have a default definition for it.
Since I'm not familiar with objective-c, would you mind creating a pull request with a working definition? It shouldn't be hard: just copy the definition for C++ in plugin/defaults.vim and tweak a bit.

Hmm... running astyle on several of my Objective-C source files shows that it currently does very little, and what little it does is inconsistent.
It looks like Uncrustify and clang-format are the formatters of choice for Objective-C.
Using clang-format with this .clang-format has worked very well for me:
BasedOnStyle: Chromium
AlignTrailingComments: true
BreakBeforeBraces: Allman
ColumnLimit: 0
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: false
ObjCSpaceAfterProperty: true
ObjCSpaceBeforeProtocolList: true
PointerBindsToType: false
SpacesBeforeTrailingComments: 1
TabWidth: 8
UseTab: Never

Uncrustify with this config has similar results.
However, either of these would require adding a new recommended third party tool in the README, and I'm sure being able to customize the config would be important to users.

Adding another recommended third party tool is not a problem at all. The main purpose of this plugin is to make it easier to integrate formatting programs into vim. One way of doing that is by providing sane default configurations, which can also serve as an example for custom configurations.
If you think that e.g. clang-format would do better than astyle for objective-c, I'm fine with that.

Having a look at clang-format, I see that config can be specified in a file.
If the user wants that, he could add the line
g:format_args_expr_objc = '"-style=file"'

to his .vimrc.


Still being maintained?

Hi @cwilper. Long time!
Are you still maintaining/using this? I have been using it for most of a year in a production environment. I have added a feature (support for multiple paths on some subcommands) and just ran across a bug that I need to fix. Noted also that there is another fork from which there currently a pull request. I'm trying to figure out the best way to proceed.
Cheers,
~Tim

Hi Tim,
Good to hear from you. I haven't touched this in a while but am glad to take a quick look if you send a PR. That other PR managed to escape my attention, will give it a look as well.
Thanks,
Chris.


Bug in Share button

Summary:
Supposing the permission to write to external storage is not given, it'll ask for permission. When granted it should ideally call the "share image" method, but nothing happens. This is because when the Permission is being granted, it's checking for "CAMERA" permission instead of "WRITE_EXTERNAL_STORAGE" permission. It occurs when the permission is being granted initially and later, this error does not occur.
Steps to reproduce:
How can we reproduce the issue?
Click Account Overview
Then click on Profile Image
Then Share button
Expected Behaviour
When the Permission is granted for the first time, it should perform the "share" feature without requiring the user to click on the share icon in the app bar. (1 Click on "share" is expected)
Observed Behaviour
When the Permission is granted for the first time, nothing happens. The user has to again click on the "share" icon in-app bar to use the share feature. (2 Clicks on "share" is required)
Device and Android version:
Redmi 7A Android-9
Screenshots:

I'll be working on it

@ivary43

I'll also try to work on this issue.

@prajwal27 This issue has been solved by PR #88 .So I have also stopped working on it.

@garvit984  This is a issue related to sharing of profile image and not the app.

Okay, sorry, @prajwal27 . I need to tell you that as per contribution guidelines, if someone else is already working on an issue, you need to first ask that person whether he is continuing or not.
I suppose that you will keep this in mind. Otherwise, you have to report your issues.

@garvit984 Please do not delete your comments. It'll confuse other people when they go through the issue. Also, the issue was created 9 days back and hence thought of contributing. I'll keep this in mind.


feat(core)!: Dropdown refactor dropdowns completely

PR Checklist
Please check if your PR fulfills the following requirements:

[ ] The commit message follows Conventional Commits
[ ] Tests for the changes have been added (for bug fixes / features)
[ ] Docs have been added / updated (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Refactoring
[ ] Code style update
[ ] Build or CI related changes
[ ] Documentation content changes

What is the current behavior?
Closes #
What is the new behavior?
Does this PR introduce a breaking change?

[ ] Yes
[ ] No

new behavior of this example: https://taiga-ui.dev/components/hosted-dropdown#native
Is it expected ?
Before => After:
before.after.mov

We had different default alignments in dropdown controller and in abstract dropdown directive. I changed it all to left by default. Here we need to override it to right, I'll update it.

@waterplea links not editable
taiga-ui.dev
https://user-images.githubusercontent.com/12021443/185484555-3c95a25a-4bd9-483e-b7a7-56f204e062d0.mov
https://taiga-ui--pr2389-dropdowns-wbsh8ugo.web.app/components/editor
https://user-images.githubusercontent.com/12021443/185484686-86fe00f7-35f8-4697-9601-eb4becb52c36.mov

E2E

@waterplea what do you think, is this issue depend on that PR?
https://github.com/Tinkoff/taiga-ui/issues/2167

E2E

I removed keyboard access to context menu. It was rather complex and there's not much point in accessibility since it only pops up when you already use the mouse. I'll remove that test.

@waterplea what do you think, is this issue depend on that PR?
#2167

It should be fixed by this PR.


xfs filesystem supports timestamps until 2038

(originally reported by @q3k in T967)
bazel run //:launch:
[   17.338739] xfs filesystem being mounted at /data supports timestamps until 2038 (0x7fffffff)

We could pass -m bigtime=1 to mkfs.xfs, but then the log says:
[   51.272631] XFS (dm-1): EXPERIMENTAL big timestamp feature in use. Use at your own risk!

Not sure which is better :).

I think at some point we decided to not actually act on this for now - as we expect that once 'big timestamps' are non-experimental in XFS, we'll just turn that on; and in the meantime, we'll live with the year 2038 warning.
Tentatively moving this out of Cluster MVP. @leoluk, that alright?

Sgtm

We just need to bump xfsprogs to 5.15 or later which we should do anyways and that will automatically enable bigtime. Minimum kernel version is 5.10 which is much older than what we're shipping already.


Research ML models for facial recognition

Let's identify a few options that will work with the camera and the raspberry pi we have selected.

Followed this resource to set up a locally-working series of Python scripts and file structure to locally detect faces using OpenCV:  https://www.tomshardware.com/how-to/raspberry-pi-facial-recognition
Proved that it can work successfully - future work will involve setting this up on the server side to process incoming client frames.


Explorer opens all projects when searching

VSCode Version: 1.31.0
OS Version: macOS 10.14.2

Steps to Reproduce:

Close all the top-level projects in the explorer
Do a global search Cmd + Shift + F
Go back to the Explorer
=> every project is now open, so need to close the ones I didn't want open before

This did not happen before today (the last version)

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

This also happens whenever switching from Explorer to Debug and back.

I can not reproduce this.
Can you reproduce with vscode insiders https://code.visualstudio.com/insiders/
If yes can you please share a gif/video showing this behavior

This does not happen anymore with version 1.31.1, so I guess it was patched up. Thanks


Twoslash plugin

Search Terms
twoslash, intellisense in docs
Problem
The TypeScript site uses @typescript/twoslash (example), this makes it possible to display intellisense within the docs, which is potentially a really useful feature for some libraries.
Suggested Solution
Implement a plugin which detects  ```ts twoslash and runs twoslash on the code block

Why close?

Because I don't have the time to do it - and keeping it open means that I see it every time I'm looking through issues for a newly opened bug.


Propagating baggage correlation fields to Kafka headers does not work

Describe the bug
Using Spring Cloud version 2021.0.1.
When creating baggage values as part of Kafka producer callback method or with a @Scheduled and StreamBridge the values are not propagated to Kafka headers (even though the values are seen in the logger MDC context).
For Kafka producer the following code is used:
@Configuration
class KafkaProducerConfig {
	private static final Logger LOGGER = LoggerFactory.getLogger(KafkaProducerConfig.class);
	private Random random = new Random();
	private BaggageField transactionIdField;

	KafkaProducerConfig(BaggageField transactionIdField) {
		this.transactionIdField = transactionIdField;
	}

	@Bean
	public Supplier<Pojo> kafkaSupplier() {
		return () -> {
			transactionIdField.updateValue("my-transaction-" + random.nextInt());
			LOGGER.info("I am inside the Kafka producer callback");
			return new Pojo("kafka supplier: " + random.nextInt());
		};
	}
}

For the scheduled version the following code is used:
@Component
class ScheduledProducer {
	private static final Logger LOGGER = LoggerFactory.getLogger(ScheduledProducer.class);
	private Random random = new Random();
	private StreamBridge streamBridge;
	private BaggageField transactionIdField;

	ScheduledProducer(StreamBridge streamBridge, BaggageField transactionIdField) {
		this.streamBridge = streamBridge;
		this.transactionIdField = transactionIdField;
	}

	@Scheduled(fixedDelay = 2, timeUnit = TimeUnit.SECONDS)
	public void produce() {
		transactionIdField.updateValue("my-scheduled-transaction-" + random.nextInt());
		LOGGER.info("I am inside the Kafka scheduled producer");
		streamBridge.send(
				"streamBridgeOutputTopic",
				new Pojo("kafka scheduler: " +random.nextInt()));
	}
}

The logs show the right MDC values:
2022-02-24 12:51:38.229  INFO [baggage-sample,9faeeb7cb78d5aa7,9faeeb7cb78d5aa7,my-transaction-1262764079] 12008 --- [   scheduling-1] c.e.s.KafkaProducerConfig                : I am inside the Kafka producer callback
2022-02-24 12:51:38.832  INFO [baggage-sample,81758770dc2e9e6a,81758770dc2e9e6a,my-scheduled-transaction--268572805] 12008 --- [   scheduling-1] c.e.s.ScheduledProducer                  : I am inside the Kafka scheduled producer

But Kafka headers do not contain the baggage (AKHQ screenshots):

Application config for reference:
spring.application.name = baggage-sample
logging.pattern.level = %5p [${spring.zipkin.service.name:}${spring.application.name:},%X{traceId:-},%X{spanId:-},%X{transactionId:-}]

spring.sleuth.baggage.remote-fields = transactionId
spring.sleuth.baggage.local-fields = transactionId
spring.sleuth.baggage.correlation-fields = transactionId

Sample
Sample project attached. Running the main method from SleuthBaggageTroubleshootingApplication should be used to start the app.
sleuth-baggage-troubleshooting.zip

Just remove the spring.sleuth.baggage.local-fields entry. You can't have the field both be local and remote. I checked it in your sample and the baggage header is there.


use conf to get num cores per executor

We should use a combination of spark conf and number of cores per machine via java.lang.Runtime.getRuntime.availableProcessors to figure out the number of cores per executor.
Fixed based on discussion here: https://github.com/Azure/mmlspark/issues/379
Thank to @humbinal for figuring out how to fix the issue.
Also should resolve the issue brought by @ywskycn here: https://github.com/Azure/mmlspark/issues/346
Note: This may be eventually resolved in a better way with spark's barrier execution mode when it is implemented aka project hydrogen (without needing to compute num cores):
https://jira.apache.org/jira/browse/SPARK-24374

@imatiach-msft I think we also need to include "spark.task.cpus" which is the number of cores to allocate for each task. "spark.executor.cores"/"spark.task.cpus" is the number of tasks in one executor.

@ywskycn done!  I used spark.executer.cores/spark.task.cpus.  It looks like task cpus is usually default to 1 anyway (or not defined, as on my databricks cluster).  Hopefully this will handle all cluster scenarios (other than possibly the spark standalone cluster with different # of cores per executor, which I haven't encountered yet from users).

LGTM


Fixed issue on with long not being numeric

Pull Request Checklist
Is this in reference to an existing issue?
No
General

[ ] Update Changelog following the conventions laid out on Keep A Changelog

[ ] Update README with any necessary configuration snippets

[ ] Binstubs are created if needed

[ ] RuboCop passes

[ ] Existing tests pass

New Plugins

[ ] Tests

[ ] Add the plugin to the README

[ ] Does it have a complete header as outlined here

Purpose
Known Compatablity Issues

Thanks for this. Can you add an entry to the CHANGELOG and we'll get this merged.

Could you merge it to master?


Add table of discarded bots

Bots get put there if the twitch user disappears. Rows are retained for 30 days.
Contains all non-Twitch data and the Twitch user IDs.

Or don't prune at all because of infinite bans?


Add primitive caching

The primitive JSON files should be looked for in at least two places:

the package primitives directory
a custom user directory, such as ./mlblocks_primitives

There should also be a method to add a custom folder where primitives should be taken from.
There should also be a dict somewhere in the package where the loaded primitives would be stored "in memory" to avoid having to load them from disk more than once.

Most of this issue has already been implemented, but the caching is not in place yet.
The behavior will be:

MLBlock will store the loaded primitive JSON as a dict in memory, to avoid having to read it again if the same primitive is used again.
Both MLBlock and MLPipeline will accept a new argument cache, which will default to True.
If this is True, the dict will be looked up and used. If it is set to False, it will always re-load the JSON from disk, and overwrite the previously stored dict.


How to get graph result after add_items()

@yurymalkov I need to get the adjacency of the points in each layer. Thx.

knn_query(all_points)

Hey @Mikey2266, you can get it via c++ interface now.
Alternatively the bindings to get the adjacency might be implemented in python.


Call to undefined method DataTables\Controller\Component\DataTablesComponent::callback()

Hi,
I am loading $columns from the controllers and pass them to the view with set.
After setting the render attribute in the columns array like in your documentation CakePHP was giving the following error:
Call to undefined method DataTables\Controller\Component\DataTablesComponent::callback()
I found out callback was only in DataTablesHelper not in the Component.
I copied this function to DataTablesComponent:
public function callback(string $name, array $args = []) : CallbackFunction
{
        return new CallbackFunction($name, $args);
}

And added use to the top of DataTablesComponent
use DataTables\Lib\CallbackFunction;

Now it's working fine, but not sure it was meant to work like this?
Or did you add it to Helper with the purpose of loading $columns in the view?

The columns are shared between controller and view, but the callbacks are a pure view matter.
I suggest you use ColumnDefinitions interface and add the callback in the view. Like $columns['name']['callback'] = ….

You are right, thats working fine. Thanks!


[doc] Draft for language binding consistency. [skip ci]

Hi all, this is a draft for documenting some consistency issues that hopefully we can address in the future. Please help review and make suggestions.
cc @ExpandingMan @david-cortes

@trivialfis Thanks for the info. Also wondering about the recommended way of handling the .cv functions and details like creating one big DMatrix and slicing it vs. creating separate ones out of sliced data. I see for example that the R interface does a lot of things outside of the core C++ library.

@david-cortes IMHO, XGBoost doesn't need to have a CV function in its interface. The existing implementation pre-dates my involvement in XGBoost. To me, the CV function should be part of a more general hyper-parameter optimization library or a model evaluation library instead of XGBoost. My opinion is based on the fact that cross-validation is a general statistic technique instead of a gradient-boosting-specific technique.
Ideal case aside, if we were to have a specialized feature version for XGB, (like working with survival data, custom early stopping strategy, etc), I think we can directly work with input data like data.table and np.ndarray instead of  DMatrix.

I think we can directly work with input data like data.table and np.ndarray instead of DMatrix.

That said, it's totally reasonable to have a different project than XGBoost, or upstream some changes to existing projects like scikit-learn.

(Note: comment is unrelated to the PR in discussion)
Generally, it makes sense to leave cross-validation to a dedicated framework, but there are cases where a dedicated cv function can exploit optimizations specific to the algorithm that a higher-level interface wouldn't.
I'm not familiar with what xgboost does internally in each situation, but for example in catboost, binning data in the histogram method (especially when there are categorical features) can take a lot of time, and an efficient cv routine can be exploited to do this only once instead of once per data fold.

Generally, it makes sense to leave cross-validation to a dedicated framework, but there are cases where a dedicated cv function can exploit optimizations specific to the algorithm that a higher-level interface wouldn't.

That's a very good point! We don't have this sort of optimization yet but can be done if necessary. Basically, one would obtain a QuantileDMatrix for the full dataset and use it as a reference for the others. However, I'm a bit confused, wouldn't this leak information about the validation data into training? Might not matter in practice, but seems like an odd choice.

Generally, it makes sense to leave cross-validation to a dedicated framework, but there are cases where a dedicated cv function can exploit optimizations specific to the algorithm that a higher-level interface wouldn't.

That's a very good point! We don't have this sort of optimization yet but can be done if necessary. Basically, one would obtain a QuantileDMatrix for the full dataset and use it as a reference for the others. However, I'm a bit confused, wouldn't this leak information about the validation data into training? Might not matter in practice, but seems like an odd choice.
Xy = QuantileDMatrix(X, y)  # <- contains the bining for the whole dataset.
X_train, X_test, y_train, y_test = train_test_split(X, y)
Xy_train = QuantileDMatrix(X_train, y_train, ref=Xy)
Xy_test = QuantileDMatrix(X_test, y_test, ref=Xy)

Yes, there is some small data leakage when doing cross-validation with the same quantization for all folds, and it gives slightly different results than doing it the "correct" way, but as sample sizes increase, this difference shrinks.
Although I see that for example lightgbm authors want to move away from this CV behavior, so that's why I was asking whether there would be a recommendation for xgboost's CV function. Although I also think in the case of xgboost, there's less pre-processing that in e.g. catboost so the time and memory gains would be much smaller.

The only part of the draft that I have significant concerns about is the default parameter values.  Some of the default values are problematic, in particular see this issue in which the default value for number of threads can cause programs to silently hang if they exceed the number of Julia process threads.  I would not be at all surprised if that were not the only such issue (are there any parameters that reference an index? I can't think of any off the top of my head, but if so they will be different for 0 and 1-based languages).  I think it's reasonable to require that language bindings can always accept a null argument to reproduce the libxgboost defaults.  I also think it's reasonable to have a policy of preferring libxgboost defaults where they do not cause undesired side effects, but declaring it as a strict policy seems risky.
On a somewhat less important note, iteration number seems like it could present some concerns.  Currently, in the julia wrapper, it looks like we start with round 1 and don't translate it, which, if I'm reading your documentation corrrectly, sounds like it might actually be a bug.  This can of course be easily fixed, but I think on the Julia side we would prefer to keep iteration numbers 1-based for consistency with indexing.
Finally, I agree that the wrapper packages should be separate from additional general machine learning stuff like CV.  I've encountered a few people who claimed we should add it, but there's a handful of packages with CV functionality in Julia, and I'd imagine that the number of such packages in Python must be astronomical.  Early stopping, on the other hand, I don't see the same way, as it's much harder to provide a general interface for that works across different ML algorithms (arguably such a thing could not even be logically consistent).  I do think it would be a good idea for the core library to add early stopping if the developers are so inclined.

Some of the default values are problematic

We can always make exceptions. This is a guideline, not a policy, as shared in the first paragraph.

On a somewhat less important note, iteration number seems like it could present some concerns.

Is it possible to translate it to 0-based under the hood?

I do think it would be a good idea for the core library to add early stopping if the developers are so inclined.

This might not happen in the near future. Having ES inside the core would mean we will move all the logic of callback, custom objective, metrics into c++ core, which is quite challenging to say the least.

Is it possible to translate it to 0-based under the hood?

Yes, definitely, I was just a bit unsure whether that would comply with your proposed guidelines because of reporting and all.  If we can do the same thing we can do with array indices, I have no concern here.

This might not happen in the near future. Having ES inside the core would mean we will move all the logic of callback, custom objective, and metrics into C++ core, which is quite challenging, to say the least.

Oh well.  I had a feeling it might be quite involved, but thought I'd mention it just in case.


Invoking an executable plain-text file that lacks a shebang line fails quietly on macOS

On Unix-like platforms, plain-text files that are marked as executable require a shebang line (#!...) for meaningful interpretation; in the absence of a (valid) shebang line, it is unclear what interpreter to pass the file to.
On macOS (but not on Linux) PowerShell currently fails quietly when attempting to invoke an executable plain-text without (valid) shebang line, presumably because the invocation is delegated to a system call that fails.
Note that while POSIX-like shells such as bash have a fallback mechanism that makes them execute such files either themselves or by passing it to /bin/sh, I think the more sensible behavior is to fail.
Either way, the current quiet failure is problematic (though $? and $LASTEXITCODE do indicate failure).
Also, I suspect that the quiet failure is not limited to shebang-lacking plain-text executable files and may surface for any invalid executable (such as a corrupted binary or one for a different architecture), regardless of the cause.
Update: In fact, a likelier scenario that also surfaces the problem is if a shebang line is present, but happens to reference a non-existent interpreter.
Steps to reproduce (macOS only)
# Create a plain text file without a shebang line (content is otherwise irrelevant),
# make it executable, and try to execute it.
'ls' > t
chmod a+x t
./t

Note: The same behavior applies to invocation with & (unsurprisingly), and also .
Expected behavior
A statement-terminating error should be reported, detailing the inability to execute the file (with the message possibly coming from a platform-native system call).
Actual behavior
No error message is output.
However, $? is set to $FALSE and $LASTEXITCODE is 8, so it is at least possible to detect the failure programmatically.
8 is ENOEXEC, which is a standard error code defined as follows (from man 2 intro on macOS):

8 ENOEXEC Exec format error.  A request was made to execute a file that,
although it has the appropriate permissions, was not in the for-
mat required for an executable file.

It makes more sense to treat this as a statement-terminating error, just as trying to invoke a non-existent executable is (while still setting $LASTEXITCODE).
Environment data
PowerShell Core 6.1.0

@PaulHigin Maybe it will be interesting to you.

Seems it will be a breaking change if we add a terminating error.

In the case of PowerShell, if the command is not a script nor a cmdlet, it runs it as a NativeCommand.  This means it attempts to start a new process with that name ( 't' in the local directory in the sample above ).  Create process on "./t" fails since it's not a binary executable.
Looking at the bash source, they have a helper to look into executables to determine if it's likely a script or a binary and if a script (meaning all printable characters up to the newline) it processes it as a script.  PowerShell, of course, only processes the file if it ends in .ps1.
I don't think we want to special case this and check for an exit code of 8.  This seems to be an edge case that would be handled by https://github.com/PowerShell/PowerShell/issues/3415

they have a helper to look into executables to determine if it's likely a script or a binary and if a script (meaning all printable characters up to the newline) it processes it as a script.

Yes, that's the behavior I suggest we avoid, because in the absence of a shebang line it is a tenuous assumption for a shell to make that it must be written in its own language - to me, it's not a reasonable default behavior (and it sounds like we agree on that).
However, what is  shell's job - any shell's - is to report an error in the event of fundamental inability to invoke an external executable.
This is different from fundamentally successful invocation (in that the process could be created), which may then be followed by the successfully launched external executable itself indicating failure (via its exit code and typically also stderr output).
Here we're talking about the system call that attempts to create the new process indicating failure to the shell, which it should surface.
So, thinking about this some more, I'm not asking to special-case error code 8, I'm asking PowerShell to surface any error condition indicated by the underlying system call when trying to launch an external executable (which presumably is ultimately from the exec family of functions, whose errno values are defined by POSIX here).
It's important for the inability to even launch an external program to fail conspicuously:

PowerShell already reports a statement-terminating error for a non-existent command (executable); e.g., PS> nosuchexe -h

It just so happens that PowerShell itself makes the determination whether a command exists rather than relying on a system call (right?).

A non-existent command is just one reason for the invocation to fail fundamentally, and I don't see a reason to treat others - such as an invalid executable file - differently.

Once we have a shared understanding, I'm happy to amend the title and OP to reflect the broader scope.

@SteveL-MSFT:
Thanks for digging deeper - I've created https://github.com/dotnet/corefx/issues/31519 in the CoreFX repo.
I guess we can label this issue Resolution-External.

Thanks for adding the label, @SteveL-MSFT, but shouldn't the issue then remain open until the external resolution comes?

Changed the labels, we can leave this open for now.

@SteveL-MSFT:
On the plus side: It turns out that the problem exists on macOS only - my bad for not checking initially (I've updated the title and original post)
The less good news that a far less exotic scenario than the one initially described (missing shebang line) also surfaces the problem: if a shebang line is present, but happens to reference a non-existent interpreter.
The discussion at https://github.com/dotnet/corefx/issues/31519 is ongoing, but what it comes down to that we currently don't know how to fix the problem technically - macOS lacks a system call that is used on Linux, where the problem doesn't occur.
If you happen to know macOS / BSD system-programming experts, could you point them to the issue? Thanks.

As of at least v7.1 the problem no longer occurs, and you now get a meaningful `` error message:
ResourceUnavailable: Program 't' failed to run: Exec format errorAt line:1 char:1


dts: Add support for ADC properties

This adds support for e.g. adcs = <&adc 3> analogous to existing pwms = <&pwm 0 10000>, for referencing a specific ADC input.  Also adds support to the nrf-saadc bindings.  This uses the new shared logic from #18065
Example of how I'm using it:
dts/bindings/adc-map.yaml:
title: ADC Map

description: >
    Map ADC input numbers to names

properties:
    compatible:
      constraint: "adc-map"
      type: string-array
      category: required
      description: compatible strings

sub-node:
  properties:
    adcs:
      type: compound
      category: required

boards/arm/foo/foo.dts:
/dts-v1/;
#include <nordic/nrf52832_qfaa.dtsi>

/ {
        model = "Foo";
        compatible = "nordic,nrf52832-qfaa", "nordic,nrf52832";

        adc-map {
                compatible = "adc-map";
                batt_meas {
                        adcs = <&adc 0>;
                };
        };
};

&adc {
        status = "okay";
        #adc-cells = <1>;
};

app/power.c:
adc_dev = device_get_binding(DT_ADC_MAP_BATT_MEAS_ADCS_CONTROLLER);
const struct adc_channel_cfg cfg = {
        .gain             = ADC_GAIN_1_6,
        .reference        = ADC_REF_INTERNAL,
        .acquisition_time = ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 10),
        .channel_id       = 0,
        .input_positive   = (NRF_SAADC_INPUT_AIN0 + DT_ADC_MAP_BATT_MEAS_ADCS_INPUT),
};
adc_channel_setup(adc_dev, &cfg);

Take a look at:
https://git.kernel.org/pub/scm/linux/kernel/git/devicetree/devicetree-rebasing.git/tree/Bindings/iio/iio-bindings.txt
Can we use these semantics to accomplish what you want? Looks similar with different names.

Yeah, I think we'd be pretty close if we named it io-channels and I'm not wedded to adcs if we want to change it.  io-channels seems to cover more than ADCs, though, and I don't know how we'd support different things (my current C code of course assumes *_CONTROLLER is an ADC device).

Yeah, I think we'd be pretty close if we named it io-channels and I'm not wedded to adcs if we want to change it. io-channels seems to cover more than ADCs, though, and I don't know how we'd support different things (my current C code of course assumes *_CONTROLLER is an ADC device).

I think its fine, I'd prefer we try and match existing standard for DT.  So let's use io-channels

Updated from adcs to io-channels

Do we need to update all the adc's to have '#io-channel-cells' and such?

Probably?  I wasn't sure what hardware supported this concept and which didn't.  If it's all of them, it would be nice to put this in the base adc.yaml instead, but that didn't seem to work when I tried it.

Probably? I wasn't sure what hardware supported this concept and which didn't. If it's all of them, it would be nice to put this in the base adc.yaml instead, but that didn't seem to work when I tried it.

Lets work on that as a follow up to this.

@jimparis @galak This merge included a change to nordic,nrf-saadc to add a #cells property.  Was that necessary?  If so, don't we also need it in nordic,nrf-adc and probably all the other ADC peripheral descriptions?
If not, can we get rid of it?

@jimparis @galak This merge included a change to nordic,nrf-saadc to add a #cells property. Was that necessary? If so, don't we also need it in nordic,nrf-adc and probably all the other ADC peripheral descriptions?
If not, can we get rid of it?

See my new PR: #18589


Make it possible to update and persist changes to Config

Part of #42 and #41
cc @TomasHofman

hmm something funny happened with merging... gonna close this and push last change directly


ISPN-11817 Support trace log messages for ContainerInfinispanServerDriver

https://issues.redhat.com/browse/ISPN-11817

Looks good now.


image to base64 on nativescript 7

hi..
i try to convert result to base64, is is my code
   getMyDrawing() {         const pad = this.DrawingPad.nativeElement;         pad.getDrawing().then((data) => {             let image = ImageSource.fromResourceSync(data);             let image64 = image.toBase64String('png');         }, (err: any) => {             console.log(err);         });     }
error message
ERROR Error: Uncaught (in promise): Error: JNI Exception occurred (SIGABRT).
thank you

Can your print out the data and confirm what it is?

Can your print out the data and confirm what it is?

Hi, yep this is crashing my app as well. Also running ns7, my app specifically crashes and closes after this line
image = ImageSource.fromResourceSync(data)
I have also tried:
const pad = this.DrawingPad.nativeElement;

        pad.getDrawing()
            .then(
                (data) => {
                    console.log(data);
                    ImageSource.fromData(data)
                        .then((res) => console.log(res))
                        .catch((error) => console.log(error));
                    // let image64 = image.toBase64String('png');
                },
                (err) => {
                    console.log(err);
                }
            )
            .catch((e) => console.log(e));

Just crashes
No output or errors though. In my case, the data value is android.graphics.Bitmap@4034c7f
Anything else I can try?
Thanks for the cool plugin

Hi, yep this is crashing my app as well. Also running ns7, my app specifically crashes and closes after this line
image = ImageSource.fromResourceSync(data)
I have also tried:
const pad = this.DrawingPad.nativeElement;

        pad.getDrawing()
            .then(
                (data) => {
                    console.log(data);
                    ImageSource.fromData(data)
                        .then((res) => console.log(res))
                        .catch((error) => console.log(error));
                    // let image64 = image.toBase64String('png');
                },
                (err) => {
                    console.log(err);
                }
            )
            .catch((e) => console.log(e));

Just crashes
No output or errors though. In my case, the data value is android.graphics.Bitmap@4034c7f
Anything else I can try?
Thanks for the cool plugin

This def worked at one time 😕 because it was in the demo app and working fine to show the captured image into Image view in NS after the conversion from bitmap. Not sure what changed.

This def worked at one time 😕 because it was in the demo app and working fine to show the captured image into Image view in NS after the conversion from bitmap. Not sure what changed.

Well, the ImageSource does not have a fromResourceSync() method. Could it have to do with how we get it?

Well, the ImageSource does not have a fromResourceSync() method. Could it have to do with how we get it?

Yea... fromResource... was for app_Resource images.
Try using https://github.com/NativeScript/NativeScript/blob/master/packages/core/image-source/index.android.ts#L152 fromDataSync()

Yea... fromResource... was for app_Resource images.
Try using https://github.com/NativeScript/NativeScript/blob/master/packages/core/image-source/index.android.ts#L152 fromDataSync()

Ah... I see the issue now.
2021-01-13 09:55:48.559 4802-4802/org.nativescript.demo A/tivescript.dem: java_vm_ext.cc:542] JNI DETECTED ERROR IN APPLICATION: bad arguments passed to android.graphics.Bitmap android.graphics.BitmapFactory.decodeStream(java.io.InputStream) (see above for details)
2021-01-13 09:55:48.559 4802-4802/org.nativescript.demo A/tivescript.dem: java_vm_ext.cc:542]     from java.lang.Object com.tns.Runtime.callJSMethodNative(int, int, java.lang.String, int, boolean, java.lang.Object[])
2021-01-13 09:55:48.559 4802-4802/org.nativescript.demo A/tivescript.dem: java_vm_ext.cc:542] "main" prio=5 tid=1 Runnable```

That is the crash with `fromData` or `fromDataSync` we're passing the Bitmap and not a stream into the method so of course that crashes.

Ah... I see the issue now.
2021-01-13 09:55:48.559 4802-4802/org.nativescript.demo A/tivescript.dem: java_vm_ext.cc:542] JNI DETECTED ERROR IN APPLICATION: bad arguments passed to android.graphics.Bitmap android.graphics.BitmapFactory.decodeStream(java.io.InputStream) (see above for details)
2021-01-13 09:55:48.559 4802-4802/org.nativescript.demo A/tivescript.dem: java_vm_ext.cc:542]     from java.lang.Object com.tns.Runtime.callJSMethodNative(int, int, java.lang.String, int, boolean, java.lang.Object[])
2021-01-13 09:55:48.559 4802-4802/org.nativescript.demo A/tivescript.dem: java_vm_ext.cc:542] "main" prio=5 tid=1 Runnable```

That is the crash with `fromData` or `fromDataSync` we're passing the Bitmap and not a stream into the method so of course that crashes.

@seankonig it's simply new ImageSource(data) to create the Image from a bitmap on android or UIImage on iOS.
 this._myDrawingPad.getDrawing().then(res => {
      console.log(res);
      alert(res);

      // convert native image data (bitmap on android) to imageSource for NS
      const image = new ImageSource(res);
      console.log(image);
      image.toBase64String('jpg')
      this.set('drawingImage', image);
    });

@seankonig it's simply new ImageSource(data) to create the Image from a bitmap on android or UIImage on iOS.
 this._myDrawingPad.getDrawing().then(res => {
      console.log(res);
      alert(res);

      // convert native image data (bitmap on android) to imageSource for NS
      const image = new ImageSource(res);
      console.log(image);
      image.toBase64String('jpg')
      this.set('drawingImage', image);
    });

Boom, thanks dude.

Boom, thanks dude.

I'm adding a method to do this in the source right now, will publish a minor with the new method also 💯  thanks for helping find the bug 👍

I'm adding a method to do this in the source right now, will publish a minor with the new method also 💯  thanks for helping find the bug 👍

happy to help. your example works like a charm.

happy to help. your example works like a charm.

getDrawingAsBase64(format?: "png" | "jpg" | "jpeg") - Promise (returns image as base64 string if successful)
this will be the method when 4.1.0 is published, just FYI. handles the conversion in the plugin directly since many people seem to need this :)

getDrawingAsBase64(format?: "png" | "jpg" | "jpeg") - Promise (returns image as base64 string if successful)
this will be the method when 4.1.0 is published, just FYI. handles the conversion in the plugin directly since many people seem to need this :)

That's really cool and makes a lot of sense to add. Thanks for including it. I Will update when you publish the new version👍

That's really cool and makes a lot of sense to add. Thanks for including it. I Will update when you publish the new version👍

thank you all for helping

thank you all for helping


Open header tag are not closed when tracking position.

Before editing:
<h1 data-sourcepos="0-36"...

After editing:

...

Thank you!


Feature Addon : Dub Languages

Hello, there. Great program providing smooth operations overall. But I feel some Quality of Life improvements are underway.
It would be handy to show the current released dub languages in the Downloader itself. Currently I check for the dubs on the crunchyroll series page (https://www.crunchyroll.com/series/G6J0G49DR/tower-of-god).
Peace ✌

What you are asking for is already done, if you look in the history file.

Pardon me. I failed to present my appeals clearly.
When downloading simulcasts of the ongoing season, it would be neat to know which episodes are dubbed in english, french, etc. on the "Add episodes to queue" screen.

This is a seasonal show being simulcasted. Episodes 8 and 9 are only offered in Japanese as of now. Episodes 1 through 7 are available in simulcast dubs. Hence, a feature to view the available dubs would be handy.
Someone has raised a similar issue #108 previously, the green text aptly describes what I am referring to.

What you are asking for is shown in the simulcast calendar if you have your region configured, and if you have unchecked hide dubbing you should see what you are asking for.

What you are putting is to search for a specific series and if you want it to have a dubbing, if you leave it selected in configuration the language you want to download when you put it in the queue it will download with that dubbing, because in configuration you can mark more than one dubbing language.

Hmm, how do I get the cdm files?

Hmm, how do I get the cdm files?

Search On Google . l3 dumping with Android Studio


Case for merging/rendering a changeset back into the model

Consider I have model + changeset. Unless I merge changeset back into the model, there is no trivial way for me to render a JSON for the model... essentially before saving it.
P.S. Or did I miss something and there's already a way to do this?

When you insert/update, you get the updated model. Why would you want to render an invalid version of the model? Its rendering can even fail (because you will have invalid data).

I didn't say it is invalid. My current reasons right now: 1) logging/debugging (I can't see the model clearly) before inserting/updating 2) for functions that only accept the original model, not the changeset, I want to pass an updated model, not an old version.

For 2, why can't you do it after you update/insert?

By its nature, changeset is not a destructive, irreversible modification of the model. You can go model -> changeset; therefore it should be possible to go back changeset -> model. It just completes the "type".
Imagine you use a library that works with a model, and there's a function that only accepts models (cast is being one of the current examples, #401). You have to render the model back yourself. I will end up having this helped written myself. Why not include it into Ecto?

:+1: for this then. Just need to think of a good name. apply/2 would be cool but this module is frequently imported and it would clash with Kernel's apply.

This was solved by https://github.com/elixir-lang/ecto/pull/403.


Subclasses do not inherit _init when extended

Godot version:
2cde466ebdb6237b6f72ef78614dc05f2ffb551b
OS/device including version:
Windows 10 64bit
Issue description:
From what I can tell subclasses do not inherit the _init function when they are extended
extends Node

class test:
	func  _init(t = 0):
		print(t)

class test2 extends test:
	var nothing = 0

func _ready():
	test.new(100)
	test2.new(4)

this code prints 100 and then throws an error of Invalid call to function 'new' in 'GDScript'. Expected 0 arguments. at line 12 test2.new(4)
Steps to reproduce:
You can either run the reproduction project, or paste the code above and run it.
Minimal reproduction project:
subclass_bug.zip

[x] I searched the issues for other issues like this.

My initial issue might be related to this
https://github.com/godotengine/godot/blob/master/modules/gdscript/gdscript_compiler.cpp#L1611
0 is hardcoded for the number of arguments for the default _init function, I'm not sure what the right fix is though.
@willnationsdev  I imagine what's happening for your case is you probably need to write it like:
func _init(p_player="test3").(p_player):
  pass

otherwise it's going to call like this: I think
A._init() -> B._init("test3") -> B.Super._init("test3")

I tried to fix this for 3.1 but it wasn't as easy as I thought at first. Will try to review this soon.
For 4.0 we might try to change the syntax for calling the parent constructor (among other things). It's a big compatibility breakage but I think it's for the best.

I tried the attached project in 5ab727b46 and there's no error, but it prints single 0.

Fixed in 4.0 RC 1.


VT-Bypass

https://github.com/6nz/virustotal-vm-blacklist/blob/main/main.py
https://github.com/6nz/virustotal-vm-blacklist
https://github.com/Lawxsz/bypass-virus-total

thanks a lot, i'll implement it later

https://github.com/6nz/virustotal-vm-blacklist/blob/main/main.py

could you check the code and see if it's working correctly :) i directly added it to the beginning from main.py @6nz


Adds support for Ruby 3.1

Ruby 3.1 ships with Psych 4.0.3 which makes YAML.load_file defaults to safe mode (ruby/psych#487).
This causes error on parsing holidays.yml.

Hi @hosht. Thank you for your commitment!
I've modified the CI to run on pull requests. Could you merge the latest master branch?

master branch merged.

Thank you!!!

@komagata
Since Ruby 3.1 has already been released, I think it's okay to release a Ruby 3.1 supported version of holiday_jp.gem.

@k1LoW I think so too.

@komagata
If you are ok, could you release a new version of the gem? (I don't have the authority to do that.)

@k1LoW Thank you for your comment.
I push ver 0.8.1


Cannot specify assertions on array/record elements

In Swagger 2, we can specify constraints on array/additionalProperty elements via:
"fieldConfidence": {
  "additionalProperties": {
    "maximum": 1,
    "minimum": 0,
    "type": "number"
  },
  "polygon": {
    "items": {
      "minimum": 0,
      "type": "number"
    },
    "type": "array"
  }

I do not believe there is a way to express the same concept in TypeSpec.  We can define a new scalar, but that would also create a new intermediate definition in the Swagger and SDK. which is not desirable.  Perhaps we can do something similar to:
  @itemMinValue(0) @itemMaxValue(1)
  fieldConfidence: Record<float32>;

  @itemMinValue(0)
  polygon: float32[];

@marcowl discuss with DPG devs

Cllosing as by design


Fix init function call

[Current coverage][cc-pull] is 100%

Merging [#3][cc-pull] into [master][cc-base-branch] will not change coverage

@@           master    #3   diff @@
===================================
  Files           1     1
  Lines          17    17
  Methods         0     0
  Messages        0     0
  Branches        0     0
===================================
  Hits           17    17
  Misses          0     0
  Partials        0     0

Powered by Codecov. Last updated by [0276442...c5be5df][cc-compare]
[cc-base-branch]: https://codecov.io/gh/segment-integrations/analytics.js-integration-nudgespot/branch/master?src=pr
[cc-compare]: https://codecov.io/gh/segment-integrations/analytics.js-integration-nudgespot/compare/0276442c3a8b0cf4359b0976e23c9b9fc047cdea...c5be5dfdb155a4f4e130096e108ed10ebb2db7b9
[cc-pull]: https://codecov.io/gh/segment-integrations/analytics.js-integration-nudgespot/pull/3?src=pr

lgtm


Greyed Out Fields

It is not obvious that fields grey out because the war is in progress. This needs to be made more apparent some how

This is part of a bigger problem: prompts to help users through the site. Whether that is through guided tours (Bootstrap Tour) or simple on-hover pop-ups, I need to improve usability. I will create a different issue that addresses the larger problem


Fix broken links in top-level README

Update broken links in the top-level README to their obvious targets.
Checklist

Branch

[x] Commit sequence broadly makes sense
[x] Commits have useful messages
[] New tests are added if needed and existing tests are updated
[] If this branch changes Consensus and has any consequences for downstream repositories or end users, said changes must be documented in interface-CHANGELOG.md
[] If this branch changes Network and has any consequences for downstream repositories or end users, said changes must be documented in interface-CHANGELOG.md
[] If serialization changes, user-facing consequences (e.g. replay from genesis) are confirmed to be intentional.

Pull Request

[x] Self-reviewed the diff
[x] Useful pull request description at least containing the following information:

What does this PR change?
Why these changes were needed?
How does this affect downstream repositories and/or end-users?
Which ticket does this PR close (if any)? If it does, is it linked?

[x] Reviewer requested

bors r+


Potential ProGuard and/or attribute issues with 3.7.0

Several users have reported issues with version 3.7.0, e.g. #350 #351 #353 #354
Initial evaluation suggests the changes are related to updated build dependencies, merged in #306
Let's keep this issue to discuss further findings to get to the bottom of this.

Proguard config added in 3.7.0 is another candidate. So far I have not reproduced this, I have made a signed release of the sample project using version 3.7.0 from the maven repository and it worked without issues.

Yeah, same here. The sample project runs fine using 3.7.0 in a release configuration with ProGuard enabled (default config).

Oooh! I just noticed checking mvncentral that 3.6.0 was deployed as an aar file, but 3.7.0 is just a regular jar! So the issues might be related to that. A jar can only class files whereas the aar also can contain resources (e.g. the necessary ProGuard rules).
That still doesn't explain why the sample project works fine, but just putting this here..

Also, 3.7.1 does not appear to be on mvnrepository yet. Did you deploy to bintray?

Okay, so it definitely has to do with the deployment. I just did a side-by-side comparison of 3.6.0 (aar) and 3.7.0 (zip). What's pretty obvious is that values.xml (which includes the necessary attrs.xml), as well as AndroidManifest.xml are missing in 3.7.0:

Yes, the new release.gradle file uploads the jar file plus javadocs. I've tried just reverting the content of the release config back to what it was but that doesn't work. It's next to impossible to find a decent reference for this.
I don't know why 3.7.1 isn't in the repository, I released it as normal.

I don't use BinTray, I use the Sonatype central repository manager. All the tutorials I can find seem to use BinTray and rely on including config gradle files from random github accounts - I can't say I'm too keen on that.
I'm not having any luck getting the new setup to upload an aar file, even though the packaging is specified as aar.

3.7.1 is on maven central but not indexed by their UI yet. The aar is here: http://central.maven.org/maven2/com/davemorrissey/labs/subsampling-scale-image-view/3.7.1/subsampling-scale-image-view-3.7.1.aar

OK more findings, after checking the library on jcenter.bintray.com
(which contains all tree versions of interest: 3.6.0, 3.7.0, and 3.7.1):
Something interesting:

3.6.0 was deployed as .aar only (including signatures)
3.7.0 was deployed as javadoc, sources, aar, and jar
3.7.1 was deployed as .aar only (no signatures)

Of course the signatures won't make a difference. Interesting about 3.7.0 is that the .aar file was modified 3 days ago, whereas the rest of the files were modified 6 days ago. Did you somehow add this file later on? Not sure how that would happen... jcenter is mirroring maven central
Most likely what is happening to some users:
Their dependency resolution tool is somehow downloading the .jar file of 3.7.0 instead of the .aar file. These users might have success adding an @aar modifier to their dependency declaration, e.g.
compile 'com.davemorrissey.labs:subsampling-scale-image-view:3.7.0@aar'

https://stackoverflow.com/questions/26250790/what-does-aar-means-in-gradle-compile-task
Obviously, since this library contains resources, it makes no sense to deploy it as jar in the first place. This was probably a mistake in the release.gradle file, and was likely the only thing that had to be reverted. Of course that is pending further investigation. I'll continue to try to reproduce here.

I've just released 3.7.2. It contained just the aar, the pom, and signatures. I just deleted a lot of the additions from release.gradle - first time I tried that I only got signatures but a second attempt worked.

Great, thanks!! 👍
Meanwhile, I was able to reproduce the issue locally.
As suspected, the issue comes down to the missing resources in the jar file.
BUT: Running the sample app with just the jar library works without issues. The reason is that non of the xml layout files in the sample app use any of the custom attributes defined in attrs.xml of the library project!
After adding a app:zoomEnabled="false" to one of the SubsamplingScaleImageView xml elements, the build failed right away. The app namespace is declared like this:
xmlns:app="http://schemas.android.com/apk/res-auto"

Also, as speculated, adding a @aar to the 2.7.0 dependency will fix the issue an correctly pull the aar file with resources. Not that it really matters - people should update to 2.7.2 asap.
Thanks again for this project, and sorry for not paying closer attention to the release.gradle script in the original PR!

Thanks for your help with this, I should have spotted the build contained more artifacts than usual, all I did was check the aar was there. The packaging is specified as aar in the pom so it seems like that should be the default even when a jar is present.
The devs who reported this didn't seem to be using any of the custom attributes in their layouts, which is why I didn't try that myself!

In #353 you mentioned to the OP:

That suggests your layout XML has a src attribute on the view's element.
That's what led me to try the attributes myself. ;)
Anyway, I'm glad we were able to figure out what was going on. Here is a small follow-up PR: #356

I think you can close this issue. 👍


setData and middleware

Hi there,
The latest middleware update is an excellent addition to the library. Do you think it makes sense to remove setData from the library API because the end user can implement it using middleware?

Actually I want to remove all APIs such as setData, enabled, queryKey and variables etc. But I'm not sure this changes too much for previous users.

You can release it as a breaking change as a new major version.

Thanks for the advice that allowed me to stick with my thoughts on this change. This change is available in 2.0.0
https://github.com/liaoliao666/react-query-kit/releases/tag/2.0.0


Spelling mistake in toast example image

Summary of the bug
Spelling mistake in the image of toast example.
🪜 How to reproduce
Tell us the steps to reproduce the problem:

Go to page: Toast component.
Look at: Multiple images (first 3 on guidance page). - "a fascinating topic, I woul love to hear more."

🧐 Expected behaviour
It should be 'would'.
📸 Screenshots or code

fixed in latest release


virt-operator: [BUGFIX] Retain Kubernetes revision annotation

Currently, virt-operator constantly removes the Kubernetes revision
annotation as it is not part of the operator definition in the
installStrategy.
This behavior is incorrect because the Kubernetes control plane keeps
adding the revision annotation back, as it is a system annotation that
should not be handled by virt-operator.

Fixes #
Why we need it and why it was done in this way
The following tradeoffs were made:
The following alternatives were considered:
Links to places where the discussion took place:
Special notes for your reviewer

Checklist
This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

[ ] Design: A design document was considered and is present (link) or not required
[ ] PR: The PR description is expressive enough and will help future contributors
[ ] Code: Write code that humans can understand and Keep it simple
[ ] Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
[ ] Upgrade: Impact of this change on upgrade flows was considered and addressed if required
[ ] Testing: New code requires new unit tests. New features and bug fixes require at least on e2e test
[ ] Documentation: A user-guide update was considered and is present (link) or not required. You want a user-guide update if it's a user facing feature / API change.
[ ] Community: Announcement to kubevirt-dev was considered

Release note

NONE

/cc

/lgtm
Thanks

/unhold
@jean-edouard Please feel free to add the hold label back if there is something else on your mind.


Patient Name field not allowing special characters

Perhaps name field should allow for more diversity?

Update in UG to state only English alphanumeric characters allowed. This prevents further misuse such as having "@@@@' as a patient name.


feat: check for custom min voting power when voting

Summary

Closes: #597
This PR add support for custom minimum required voting power for offchain voting.
Until now, we allowed anyone with voting power > 0 to cast the vote, and it'll just fail on the backend with an error.
With this PR, we will validate the voting power before allowing user to cast the vote, preventing user frustration and unnecessary actions.
How to test
Go to snapshot.org, and create some proposals with the following conditions (need to edit space settings before creating each proposals):
A. A regular proposal, with basic voting validation (anyone with non-null vp can vote)
B. A proposal with custom minimum voting power (need at least X vp to vote)
Now, try to vote on each of these proposals, by opening the vote modal.
In case of A:

you should be able to vote if your account has vp > 0
if your vp === 0, it should show the warning message that you don't have enough vp, and disable the voting form

In case of B:

When your vp === 0, it should show the warning message that you don't have enough vp, and disable the voting form
When your vp > 0, but < X, it should show that you need at least X vp to vote, and disable the voting form
When your vp >= X, you should be able to vote

@ChaituVR Does that feature work like that ? For now, it's just comparing the user voting power with the minScore in the vote validation object.
Not sure how and where we should take the "custom strategies" into account.

@ChaituVR Does that feature work like that ? For now, it's just comparing the user voting power with the minScore in the vote validation object.
Not sure how and where we should take the "custom strategies" into account.

yep we should check strategies too, we should allow vote only if user minScore based on custom strategies, we can use same logic as here https://github.com/snapshot-labs/snapshot-sequencer/blob/master/src/writer/vote.ts#L49-L76


Rename maximumLevel to availableLevels

This PR renames the maximumLevel variable in ImplicitTileset.js to availableLevels and updates the unit tests accordingly.
@lilleyse @ptrgags - could one of you take a look?

Thanks for the pull request @j9liu!

:heavy_check_mark: Signed CLA found.

Reviewers, don't forget to make sure that:

[ ] Cesium Viewer works.
[ ] Works in 2D/CV.

@ptrgags I added your changes! Let me know if there's anything else I missed.


remove the Session from the allocation pool if refresh fails with "not found"

We currently use a "send-and-forget" GetSession() call to refresh expiring Sessions.  See SessionPool::RefreshExpiringSessions().
If the GetSession() call fails with kNotFound, we could remove the session from the allocation pool (although this should never happen if refresh is working correctly).

We still do not do anything when the session-refreshing "SELECT 1" returns kNotFound/"Session not found" as removing the session from the pool during the async-RPC response remains "problematic".
If we ever try to use that session again, we will drop it when the actual RPC fails, but any retries would be left to higher layers, like a Commit() "mutator" loop.
To date, we haven't heard of any related problems (as noted above, this should never happen if the refresh state machine is operating correctly), but we should keep this open and give it some attention the next time we work on SessionPool.

"Support backlog" for 2022-Q3.


WIP - registerMutations, registerActions, registerEvents methods

maybe just suggest encapsulating Actions and Event names within store?
store.register[x]()
store.registerMutations(Function | [Functions])
A mutation should return an object as new state,
This changes the call signature of emit
emit(String, {Function | Object})

store.registerActions

I think this can be used as such
// action
store.emit("SET_NAME", "Juan");

// mutation
store.on("SET_NAME", async (_newName)=> {

  const valueValid = await checkDBForName(_newName);

  name = valueValid? _newName || store.getProp("name")

  store.emit("UPDATE_STATE", {name});
});


Allow using vue components

Hello I'm looking for a way to render md data from my database on the fly, I have some complex data and having the ability to use vue components in the markdown like in nuxt-content would be great, is there any way of achieving that

Hi @gotenxds
Is this issue for markdownit module?
If so, could you show an example of what you are trying to achieve?

Hi @Atinux This was originally opened for markdown-it, I've sinced moved on to @nuxt/markdown
The idea is to use vue components in markdown much like in nuxt/content but render it in runtime where the data is unknown.
In my use case there are a lot of small text snippets (10-100 lines of text at most) formated using markdown and stored in the DB as a plain string.
The idea would be to fetch this string and display it using md.toMarkup(data) while having the ability to include vue components in the markdown for added functionality, that is for example, call functions or events, veutify components and so on.
In my experiments, I managed to do this  to a point using the vue compiler and registering specific components (as auto-detection is not possible here)


[Improvement-7256][dolphinscheduler-api] Optimization for task instances query

assemble a Map<Long, User> outside of the loop instead of the query inside

Codecov Report

Merging #7331 (9a2b883) into dev (6beae19) will increase coverage by 0.72%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##                dev    #7331      +/-   ##
============================================
+ Coverage     40.54%   41.27%   +0.72%
- Complexity     3589     3661      +72
============================================
  Files           647      634      -13
  Lines         26375    26375
  Branches       2936     2953      +17
============================================
+ Hits          10693    10885     +192
+ Misses        14683    14461     -222
- Partials        999     1029      +30

Impacted Files
Coverage Δ

...uler/api/service/impl/TaskInstanceServiceImpl.java
88.52% <100.00%> (-7.84%)
:arrow_down:

...he/dolphinscheduler/common/enums/SqoopJobType.java
0.00% <0.00%> (-88.89%)
:arrow_down:

...e/dolphinscheduler/server/log/MasterLogFilter.java
0.00% <0.00%> (-33.34%)
:arrow_down:

...e/dolphinscheduler/server/log/WorkerLogFilter.java
0.00% <0.00%> (-33.34%)
:arrow_down:

...olphinscheduler/server/registry/HeartBeatTask.java
0.00% <0.00%> (-27.59%)
:arrow_down:

...che/dolphinscheduler/server/log/TaskLogFilter.java
0.00% <0.00%> (-25.00%)
:arrow_down:

...inscheduler/server/log/SensitiveDataConverter.java
0.00% <0.00%> (-23.53%)
:arrow_down:

...nscheduler/api/service/impl/LoggerServiceImpl.java
66.15% <0.00%> (-11.63%)
:arrow_down:

...he/dolphinscheduler/server/utils/ProcessUtils.java
28.91% <0.00%> (-8.44%)
:arrow_down:

... and 228 more

Continue to review full report at Codecov.

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


TP2000-1124: Add validation for quota definition volume

TP2000-1124: Add validation for quota definition volume

@CPrich905 Yeah I think if we did add more validation we could modify that test or parametrize it

@CPrich905 ...that is to say. I'll update it to test more of the validation because I probably should have done that anyway


fix: LSDV-4600: Lead time for TextArea

PR fulfills these requirements

[x] Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
[x] Tests for the changes have been added/updated (for bug fixes/features)
[ ] Docs have been added/updated (for bug fixes/features)
[x] Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
[x] Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)
(check all that apply)

[ ] Product design
[x] Frontend

Describe the reason for change
Annotation results now have a "lead_time"value in export data for textareas. The value reflects how much time the annotator spent typing values in this TextArea. Lead Time  is calculated with minimal interaction time 0.5s and with debounce of the same 0.5s, for example:

slow typer, one letter per second, 10 letters: 10*0.5s = 5s lead time
fast typer, all 10 letters in 2s: 2+0.5s debounce = 2.5s

What does this fix?
This solves a time tracking problem so that typing time of annotators can be calculated.
What libraries were added/updated?
N/A
Does this change affect performance?
no
Does this change affect security?
no
What alternative approaches were there?
N/A
What feature flags were used to cover this change?
N/A
Does this PR introduce a breaking change?
(check only one)

[ ] Yes, and covered entirely by feature flag(s)
[ ] Yes, and covered partially by feature flag(s)
[x] No
[ ] Not sure (briefly explain the situation below)

What level of testing was included in the change?
(check all that apply)

[x] e2e
[ ] integration
[ ] unit

Which logical domain(s) does this change affect?
(for bug fixes/features, be as precise as possible. ex. Authentication, Annotation History, Review Stream etc.)

/git merge master


AppReproducersTest.versionsParsingMandrel failing after the version change upstream

Currently UsedVersion doesn't implement the 3-line version parsing added with https://github.com/oracle/graal/pull/6302 and, thus, the version test fails:
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 25.956 s <<< FAILURE! - in org.graalvm.tests.integration.AppReproducersTest
[ERROR] versionsParsingMandrel{TestInfo}  Time elapsed: 25.672 s  <<< FAILURE!
org.opentest4j.AssertionFailedError: Sanity check that Graal version parsing worked! ==> expected: <TargetSub: Hello!> but was: <Sub: Hello!>
	at org.graalvm.tests.integration.AppReproducersTest.versionsParsingMandrel(AppReproducersTest.java:797)

[INFO]
[INFO] Results:
[INFO]
[ERROR] Failures:
[ERROR]   AppReproducersTest.versionsParsingMandrel:797 Sanity check that Graal version parsing worked! ==> expected: <TargetSub: Hello!> but was: <Sub: Hello!>
[INFO]
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0

However, even with a fix for the version parsing as proposed in #144 we still get the failure.
That is because of two more fixes missing:

Upstream issue related to -Dorg.graalvm.version no longer being passed to the image builder: https://github.com/oracle/graal/issues/6379
Mandrel packaging issue not setting -Dorg.graalvm.version to begin with: https://github.com/graalvm/mandrel-packaging/pull/331

With all 3 fixes in, the test passes for me.

Once #144 merges, we can close this as all the needed fixes are in.


[Task]: Update github action to use cache v4

What needs to happen?
Github action cache@v2 will be deprecated soon, update to newer version
Issue Priority
Priority: 2
Issue Component
Component: Infrastructure

.take-issue


Custom dataloaders seem to not work

Consider the following code
./operation/schema/scalars.py
@gql.django.type(models.VehicleType)
class VehicleType:
    @gql.field
    def vehicles(self) -> List["Vehicle"]:
        return vehicle_type_vehicle_loader.load(self.id)

operation/schema/loaders.py
from collections import defaultdict
from typing import List

from promise import Promise
from promise.dataloader import DataLoader

from operation.models import Vehicle

class VehicleTypeVehicleLoader(DataLoader):
    def batch_load_fn(self, keys: List[int]):
        vehicles: List[Vehicle] = Vehicle.objects.filter(vehicle_type_id__in=keys)

        vehicle_type_dict = defaultdict()
        for vehicle in vehicles:
            if vehicle.vehicle_type_id not in vehicle_type_dict:
                vehicle_type_dict[vehicle.vehicle_type_id] = [vehicle]
            else:
                vehicle_type_dict[vehicle.vehicle_type_id].append(vehicle)

        return Promise.resolve([vehicle_type_dict[key] for key in keys])

vehicle_type_vehicle_loader = VehicleTypeVehicleLoader()

urls.py
from strawberry.django.views import AsyncGraphQLView

# Not sure if AsyncGraphQLView is a reason for this, hence I included it
urlpatterns = (
    [
        path(
            "graphql/",
            AsyncGraphQLView.as_view(
                graphiql=True,
                schema=schema,
            ),
        ),
    ]
)

It should be expected that in order to resolve VehicleTypes.vehicles, the dataloader should collect ids, then query the database in one query. However by looking into SQL logs, it seems that this is not the case:
(0.002) SELECT "operation_vehicle"."id", "operation_vehicle"."identification_no", "operation_vehicle"."vehicle_type_id", "operation_vehicle"."status", "operation_vehicle"."line_id", "operation_vehicle"."notes", "operation_vehicle"."in_service_since" FROM "operation_vehicle" WHERE "operation_vehicle"."vehicle_type_id" IN (1) ORDER BY "operation_vehicle"."identification_no" ASC; args=(1,); alias=default
(0.008) SELECT "operation_vehicle"."id", "operation_vehicle"."identification_no", "operation_vehicle"."vehicle_type_id", "operation_vehicle"."status", "operation_vehicle"."line_id", "operation_vehicle"."notes", "operation_vehicle"."in_service_since" FROM "operation_vehicle" WHERE "operation_vehicle"."vehicle_type_id" IN (2) ORDER BY "operation_vehicle"."identification_no" ASC; args=(2,); alias=default
(0.002) SELECT "operation_vehicle"."id", "operation_vehicle"."identification_no", "operation_vehicle"."vehicle_type_id", "operation_vehicle"."status", "operation_vehicle"."line_id", "operation_vehicle"."notes", "operation_vehicle"."in_service_since" FROM "operation_vehicle" WHERE "operation_vehicle"."vehicle_type_id" IN (3) ORDER BY "operation_vehicle"."identification_no" ASC; args=(3,); alias=default

Expected SQL query should be:
SELECT "operation_vehicle"."id", "operation_vehicle"."identification_no", "operation_vehicle"."vehicle_type_id", "operation_vehicle"."status", "operation_vehicle"."line_id", "operation_vehicle"."notes", "operation_vehicle"."in_service_since" FROM "operation_vehicle" WHERE "operation_vehicle"."vehicle_type_id" IN (1, 2, 3) ORDER BY "operation_vehicle"."identification_no" ASC; args=(1,); alias=default

P.s. From dataloader design above I think it shows quite clearly I'm from graphene, so... Forgive me if I missed something obvious here 😝
Thanks! 😁

Hey @kwongtn ,
That dataloader only works for graphene. For strawberry you have to use its own dataloader implementation, which is actually a lot simpler and cleaner! :)
The only gotcha is that it only supports async dataloaders, which should not be a problem for you since you are using AsyncGraphQLView

Thank you so much for spending time to answer my questions 😁
I did actually try different approaches, but many of them failed
Attempt 1
async def batch_load_vehicle(keys):
    vehicles: List[Vehicle] = Vehicle.objects.filter(vehicle_type_id__in=keys)

    vehicle_type_dict = defaultdict()
    for vehicle in vehicles:
        if vehicle.vehicle_type_id not in vehicle_type_dict:
            vehicle_type_dict[vehicle.vehicle_type_id] = [vehicle]
        else:
            vehicle_type_dict[vehicle.vehicle_type_id].append(vehicle)

    return [vehicle_type_dict[key] for key in keys]

vehicle_type_vehicle_loader = DataLoader(load_fn=batch_load_vehicle)

@gql.django.type(models.VehicleType)
class VehicleType:
    @gql.django.field
    def vehicles(self) -> List["Vehicle"]:
        return vehicle_type_vehicle_loader.load(self.id)

Attempt 2
async def batch_load_vehicle(keys):
    return [Vehicle.objects.get(vehicle_type_id=key) for key in keys]

vehicle_type_vehicle_loader = DataLoader(load_fn=batch_load_vehicle)

@gql.django.type(models.VehicleType)
class VehicleType:
    @gql.django.field
    def vehicles(self) -> List["Vehicle"]:
        return vehicle_type_vehicle_loader.load(self.id)

Both attempt 1 and 2 results in There is no current event loop in thread 'ThreadPoolExecutor-1_0'.
Attempt 3
# Loaders omitted as they are the same as above
@gql.django.type(models.VehicleType)
class VehicleType:
    @gql.django.field
    async def vehicles(self) -> List["Vehicle"]:
        return await vehicle_type_vehicle_loader.load(self.id)

Error You cannot call this from an async context - use a thread or sync_to_async.
Attempt 4
# Loaders omitted as they are the same as above
@gql.django.type(models.VehicleType)
class VehicleType:
    @gql.django.field
    @sync_to_async
    async def vehicles(self) -> List["Vehicle"]:
        return await vehicle_type_vehicle_loader.load(self.id)

Error sync_to_async can only be applied to sync functions
I'm at my wit's end here 😭

Your attempt 3 is the correct one.
Your options here are to wrap the database access in sync_to_async or even define the dataloader itself with def only and decorate it with sync_to_async.
e.g.1:
async def batch_load_vehicle(keys):
    vehicles: List[Vehicle] = sync_to_async(list)(Vehicle.objects.filter(vehicle_type_id__in=keys))

    vehicle_type_dict = defaultdict()
    for vehicle in vehicles:
        if vehicle.vehicle_type_id not in vehicle_type_dict:
            vehicle_type_dict[vehicle.vehicle_type_id] = [vehicle]
        else:
            vehicle_type_dict[vehicle.vehicle_type_id].append(vehicle)

    return [vehicle_type_dict[key] for key in keys]

e.g.2:
@sync_to_async
def batch_load_vehicle(keys):
    vehicles: List[Vehicle] = Vehicle.objects.filter(vehicle_type_id__in=keys)

    vehicle_type_dict = defaultdict()
    for vehicle in vehicles:
        if vehicle.vehicle_type_id not in vehicle_type_dict:
            vehicle_type_dict[vehicle.vehicle_type_id] = [vehicle]
        else:
            vehicle_type_dict[vehicle.vehicle_type_id].append(vehicle)

    return [vehicle_type_dict[key] for key in keys]

Django 4.1 is adding async orm wrappers, which behind the scenes does that for you, so you will be able to async for vehicle in vehicles instead and not have that error

Thank you so much! It worked like a charm 🥳

Update for Django 4.1, the following code is also now workable  😁
Do take note of the lack of sync_to_async decorators 😎
async def batch_load_vehicle_from_vehicle_type(keys):
    vehicle_type_dict = defaultdict()
    async for vehicle in Vehicle.objects.filter(vehicle_type_id__in=keys):
        if vehicle.vehicle_type_id not in vehicle_type_dict:
            vehicle_type_dict[vehicle.vehicle_type_id] = {vehicle}
        else:
            vehicle_type_dict[vehicle.vehicle_type_id].add(vehicle)

    return [list(vehicle_type_dict.get(key, {})) for key in keys]


Remove unused throws

:+1:

replaced by https://github.com/spotify/helios/pull/582

Confused. Is this PR supposed to be open or is it obsoleted?

It's open. Yea I changed the status a bunch.


CellXGene referred cells tagged

Related with the issue #2252
Introducing a new subset named (cellxgene_subset) to identify cells referenced by CellXGene.
CL usage is reported using the CellXGene Census so only covers human and mouse species. The usage report is automatically generated on a nightly basis.

You can also commit the tsv file.

You can also commit the tsv file.

Tsv is auto generated every night. I didn't committed it to retrieve the latest tsv with every build. But I can still commit it if needed.

No worries, it will download the tsv in every build. Please commit it for transparency.


fix: typo s/move/bracketed/ in "this link" link

[x] I have read CONTRIBUTING.md
[x] I have read CODE_OF_CONDUCT.md

Noticed a small typo. Looking forward to trying out the new module! 🙂

Thanks!
Could you, please, reword this commit to be "(mini.bracketed) Fix wrong link in README."? And I'll merge right away.

I'll rename myself. Thanks again for the catch!


Add OpenEXRTests to Bazel build and change IMF_TMP_DIR on Linux

This PR changes the Bazel Build in the following ways:

Build only OpenEXR library in CI: For Bazel users, the most important thing is that the OpenEXR lib can be built. It is less important that all tests and additional tools such as exrenvmap can be built. Therefore a green Bazel Build requires only a successful compilation of OpenEXR with Bazel. This is a compromise of "CMake users should not be annoyed by Bazel build errors" and "keep the Bazel build green".
Do Bazel CI builds also for pull requests: Currently, Bazel CI Builds run only after a merge. Therefore, during the PR is open no Bazel build errors are shown - only when the PR is merged (when its to late)
Most of the OpenEXR tests are now also available in the Bazel build (e.g.  testChannels, testCustomAttributes, ...). This gives Bazel users the chance to test (via bazel test //...) if a subset of the OpenEXR test works with Bazel

I wished I can split the PR in 3 parts  for easier review

This PR introduces the OpenEXRTests test target to the Bazel build.
Bazel test can access on Linux builds only the /tmp/ folder by default. Therefore, IMF_TMP_DIR was changed from "/var/tmp" to "/tmp/". This change will also affect the CMake build (test run).
According to 1 "/tmp/" seems anyways to be the better place to store test artifacts. Not sure if Reviewers see this the same way and if this change is acceptable.
BTW:

C++17 offers std::filesystem::temp_directory_path. Maybe it makes sense to switch to this everywhere.
Bazel test run (using fast build) on Linux took me 908.7s. With some refactoring (making a single test target for every test and not doing each test sequentially) I am pretty confident that test time will drop to < 10s - but this would also require refactorings that influence/change CMake build (test run)

We're still trying to support C++11, so we can only use C++17 features conditionally defined and still need a fallback.

fyi, the cmake test targets are already running the tests split up into individual tests, I made that change a while ago.

fyi, the cmake test targets are already running the tests split up into individual tests, I made that change a while ago.

Good hint. There is no a Bazel version of  define_openexr_tests.

This PR addresses now too many different concerns. Therefore, I close it. I want to rethink if and how to handle OpenEXR test using Bazel.


Mnakhan01 patch 1

please accept this pull request

Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement
Learn more about why HashiCorp requires a CLA and what the CLA includes
Have you signed the CLA already but the status is still pending? Recheck it.


Transform translateY in MaterialTopTabNavigator with ScrollView flickers

Environment
React Native Environment Info:
System:
OS: Linux 4.15 Ubuntu 18.04.1 LTS (Bionic Beaver)
CPU: (4) x64 Intel(R) Core(TM) i5-4440 CPU @ 3.10GHz
Memory: 566.20 MB / 15.36 GB
Shell: 4.4.19 - /bin/bash
Binaries:
Node: 10.13.0 - ~/.nvm/versions/node/v10.13.0/bin/node
Yarn: 1.12.1 - /usr/bin/yarn
npm: 6.5.0 - ~/.nvm/versions/node/v10.13.0/bin/npm
SDKs:
Android SDK:
API Levels: 23, 26, 27, 28
Build Tools: 27.0.3, 28.0.2, 28.0.3
System Images: android-27 | Intel x86 Atom, android-27 | Intel x86 Atom_64
npmPackages:
react: 16.6.3 => 16.6.3
react-native: 0.58 => 0.58.3
Description
Issue related to #15445, which was reported 2 years ago but was never actually fixed.
When you apply a translateY transformation to a MaterialTopTabNavigator which has a ScrollView as a child the navigator flickers while you drag it. The main purpose is to achieve a collapsible header effect.
As a side note, there's a potential patch but I couldn't test it (https://github.com/facebook/react-native/issues/15445#issuecomment-321721259). After editing ReactScrollView.java and running react-native run-android somehow react-native is not recompiled, even if I remove android/app/build, I see the same behavior.
Reproducible Demo
Any lib for collapsible header presents the same problem (for instance, example 3 and 4 in react-navigation-collapsible).

This issue still exists on the latest react-native.
https://github.com/facebook/react-native/issues/21801

Closing as duplicate of #21801


Error running command mix phx.server

Hi, Error When running mix phx.server - I am getting the following error though I have all the deps.get, compile steps complete.
Can someone help ?
** (Mix) Could not start application real_world: RealWorld.Application.start(:normal, []) returned an error: shutdown: failed to start child: RealWorldWeb.Endpoint
** (EXIT) shutdown: failed to start child: Phoenix.PubSub.PG2
** (EXIT) shutdown: failed to start child: Phoenix.PubSub.PG2Server
** (EXIT) an exception was raised:
** (UndefinedFunctionError) function :pg2.create/1 is undefined or private
(kernel 8.1.3) :pg2.create({:phx, RealWorld.PubSub})
(phoenix_pubsub 1.1.2) lib/phoenix/pubsub/pg2_server.ex:43: Phoenix.PubSub.PG2Server.init/1
(stdlib 3.16.1) gen_server.erl:423: :gen_server.init_it/2
(stdlib 3.16.1) gen_server.erl:390: :gen_server.init_it/6
(stdlib 3.16.1) proc_lib.erl:226: :proc_lib.init_p_do_apply/3
I have done mix hex.local --force and still getting the error

I resolved this myself by installing reinstalling elixir.


Add error pages to orchestra project

Coverage decreased (-0.2%) to 92.945% when pulling 1b1ea1c122c2101f5148f03f0374e4574fd50530 on error-pages into 740beeb3de9f52d0c9e262411756ddb1035c6c3c on master.

lgtm with a few fixes

updated look:

Coverage decreased (-0.2%) to 92.945% when pulling ba63ef7c8e8ced187becd376d3e10f4794d074e4 on error-pages into 740beeb3de9f52d0c9e262411756ddb1035c6c3c on master.


Amazon firestick tv support

hello , I recently discovered this excellent client, I tried to install it on Amazon's Firestick TV Android, I detected a problem when adding the configuration file, when I go to add via + button I can't navigate to the folders of the device, is it possible to check ? Or make the client compatible for Amazon if it isn't? Thanks in advance.

Original app doesn't have this problem goes directly to list all folders /storage/emulated/0

Hello! The reason the original app works is because they built an entire file browser from scratch and that's why it works on FireTV. I am not willing to do this work for this app. I do not own a FireTV to test and FireTV does not support the standard file browser android API.
For a full list of reasons why I stopped supporting FireTV and for a workaround to this getting WG Tunnel working on FireTV, see here.


Review: TeamCard.jsx and TeamMembershipWidget.jsx

Overview
The focus for this code review will be centered around TeamCard.jsx and TeamMembershipWidget.jsx
Please pay attention to:

Javascript issues
React components
Naming Conventions

Review Branch
review-010
Files to review

TeamCard.jsx
TeamMembershipWidget.jsx

Checklists

Architecture
Design
JS
React
Testing

(Combined checklist for ease)
Due date
11/13/23

TeamCard.jsx

arrow function
Remove calls to console.log
L42, 51 replace console.error with swal
L58, 88 isOwner may be redundant
L18 buildTheTeam() is redundant

team is already a prop; use useTracker to get other info (L21-27)

TeamMembershipWidget.jsx

arrow function, useTracker
Remove propTypes
Remove/replace React.Fragment for consistency with other components

TeamCard.jsx

Convert to arrow function
L32 and L46: remove console.log
L42 and L51: change the console.error to sweetalert (swal)

TeamMembershipWidget.jsx

Convert to arrow function
Change withTracker to useTracker

TeamCard.jsx

Convert to arrow function
Remove console.log L32, L46

TeamMembershipWidget.jsx

Convert to arrow function
Convert from withTracker --> useTracker

TeamCard.jsx

L32, L46 Remove console lines
Convert to arrow functions

TeamMembershipWidget.jsx

Convert to arrow functions
Replace withTracker if possible


Add pydap

Insert URLs to the project here:
https://github.com/pydap/pydap

[x] The projects is active, documented, open source licensed, shows usage from external parties and is directly targeting environmental sustainability. Find more details in the Contribution Guide.

All issues labeled as 'Good First Issue' of the project listed on OpenSustain.tech will be visible on ClimateTriage.com. This is a great way to welcome new community members to your project.
Note: OpenDAP is a data access standards to many different datasets relevant for Earth Science. More information here: https://www.earthdata.nasa.gov/engage/open-data-services-and-software/api/opendap

thanks @andrew for the feedback. I improved the description.

@betodealmeida @laliberte


Split CSS out into a separate repository

How to compile css for project?

The CSS is automatically included in the JavaScript, so you don't need to include it manually. That said, I'm considering splitting out the CSS into a separate repo so it can be built by itself.

Hi @i--storm,
As far as @jessepollak says, compiled js file contains compiled css. So you don't have to include/import any file into your page. But, if you want to write some scss for this library, I think you need to do something about that. Like bourbon installing, and bourbon path updating.. Because when I wanted to build this library myself, I have to do this.
Firstly, you need to install bourbon your env with gem install bourbon. Then, you need to remove src/scss/bourbon/ directory and install bourbon with bourbon install when you was in src/scss/ directory. After this installation, you need to update bourbon import line with @import "bourbon/bourbon"; in the card.scss.
Now, you can build this library with gulp build command on CLI.
I hope it works.

Ah... put this into the documentation! #290 I thankfully found this so I don't have to build. TBH I didn't test to see if it would work without it... glad it will!

I recommend to close this issue as out-of-scope.
Documentation is updated and works well. Should be helping enough people with that.


Add more secure RLS policies on the sales table

Problem
The RLS policies on the sales table are very permissive. Any authenticated users can give themselves the administrator privilege.
Solution

[x] Add stricter policies:

Only admins can add new users
Only admins can delete users
Nobody can update sales directly

[x] Fix supabase functions so that simple users can only update their non security related data

How To Test

Use the dev console to copy a user token and the api key from a postgrest call as a simple authenticated user
Use a tool such as Bruno to send an authenticated POST request to the users endpoint (http://<IP_ADDRESS>:54321/functions/v1/users), trying to set the administrator and/or disabled columns to true. It should ignore security related changes. Example request body:

{
  "sales_id": 2,
  "first_name": "Toto",
  "last_name": "Totooooo",
  "email"<EMAIL_ADDRESS>  "administrator": true       ,
  "disabled": true
}

Use a tool such as Bruno to send an authenticated POST request to the users endpoint (http://<IP_ADDRESS>:54321/functions/v1/users), trying to update another user (change the sales_id). It should fail with a 401.
As this user, verify you can still update your own data either with Bruno or the admin UI
As an admin, verify you can still update any user and change their security related options (admin, disabled)
Check that no one can make PATCH requests to the sales endpoint (e.g. http://<IP_ADDRESS>:54321/rest/v1/sales?id=eq.2) using Bruno.

It seems the ability to change the avatar for a sale is broken. Not sure if it's related to this  change though.
Apart from that, my tests are OK.

needs rebase


add interval option for get_coin_market_chart_by_id

As per the coin gecko documentation, the API endpoint /coins/{id}/market_chart alllows an optional interval parameter to request a specific granularity for the retrieved data.
However, it seems this parameter is not implemented in the wrapper with the get_coin_market_chart_by_id.
Could it be added or is there any sort of limitation on implementing it in the wrapper ?
Thanks a lot

Hello,
You can just pass the parameter and any optional parameter using same names, as defined in CoinGecko API doc.
For example:
>>> L=cg.get_coin_market_chart_by_id(id='bitcoin', vs_currency='eur', days=14, interval='daily')
>>> for l in L['prices']:
     print(dt.datetime.fromtimestamp(l[0]/1000.0, tz=dt.timezone.utc))

2021-11-17 00:00:00+00:00
2021-11-18 00:00:00+00:00
2021-11-19 00:00:00+00:00
2021-11-20 00:00:00+00:00
2021-11-21 00:00:00+00:00
2021-11-22 00:00:00+00:00
2021-11-23 00:00:00+00:00
2021-11-24 00:00:00+00:00
2021-11-25 00:00:00+00:00
2021-11-26 00:00:00+00:00
2021-11-27 00:00:00+00:00
2021-11-28 00:00:00+00:00
2021-11-29 00:00:00+00:00
2021-11-30 00:00:00+00:00
2021-11-30 09:19:32+00:00

Best,

Thanks !


Fix NPE breaking admin page config

On the first execution of the Jenkins collector there is a NPE that prevents the collector document for Jenkins from being created. This prevents the General Configuration page from showing the Jenkins configuration.
NPE is avoided by initializing the offending fields in the HudsonSettings class.

@fidelcoria-aa Can you fix the compilation errors in your PR, The build is failing due to missing imports in HudsonSettings


joint contracture

joint contracture (a child of abnormal joint mobility MP:0008069)
DEF: chronic loss of joint motion due to structural changes in muscle, tendons, ligaments, or skin that prevents normal movement of joints; a flexion contracture is a bent (flexed) joint that cannot be straightened actively or passively
SYN: joint contractures
SOURCE: HP:0001371

Added new term:
joint contracture MP:0030798


Create libeosdac

Move the _contract shared headers into its own library which contract developers will be able to include without copying them from our repo
We can also add action_wrappers to all the actions, so they can be used with the new interface

Dallas : I like the idea of shared library code which has all the sharable headers and functions in there and that was the whole reason that I made a _contract_shared_headers folder but I'm wary of putting too much in there unless we think it will not change (or we can abstract away the change within a method implementation). As soon as we create a shared library of re-usable code we need to be very careful with versioning (eg. semantic versioning for developers) and it will be also need to be in a git submodule which adds a little more friction for us too since we will also be consumers. I have been following the guideline that if another one of our contracts needs something from a contract then it should be in the shared folder otherwise I have not shared it. It's easier to add stuff than it is too take them away.

I think that we should at least put in all of the tables into shared headers into contract grouped files.  Then we need to have a consistent naming scheme for them (I suggest [plural type]_table).  If there are changes then we can increment the type name.
ie. we could have eosdac::custodian::custodians_table

Then some common functions could be added.  Potentials are:
get_balance
get_stake
assert_valid_member

Another possibility for actions which assert is to create new actions which only assert.  Then external contracts could inline that action.


Board Review: Introducing Azure.Analytics.Purview.Workflow

Contacts and Timeline

Service team responsible for the client library: Microsoft Purview Workflow Engineering<EMAIL_ADDRESS>Main contacts: Jing Wang<EMAIL_ADDRESS>Expected stable release date for this library:  11/30/2022

About the Service

Link to documentation introducing/describing the service: https://learn.microsoft.com/en-us/azure/purview/concept-workflow
Link to the service REST APIs: https://github.com/Azure/azure-rest-api-specs-pr/blob/357e2b713882930ec598eca079dccde6389322ef/specification/purview/data-plane/Azure.Analytics.Purview.Workflow/preview/2022-05-01-preview/purviewWorkflow.json
Is the goal to release a Public Preview, Private Preview, or GA? GA

About the client library

Name of client library: Azure.Analytics.Purview.Workflow
Link to library reference documentation: https://review.learn.microsoft.com/en-us/rest/api/documentation-preview/approval-request?view=azure-rest-preview&branch=result_03fad3f2-02c9-499d-b4ea-56ca76747c07
client code link:
C#: https://apiview.dev/Assemblies/Review/4254cef7adef46699f52e6ff72055626
Python: https://apiview.dev/Assemblies/Review/43500e48932045aaa9f0b92e18fab1e5
Java: https://apiview.dev/Assemblies/Review/a84e1b458c634ac1b0ee7673c4a2538e
Javascript: https://apiview.dev/Assemblies/Review/6a0c7a03bf834e91a44a63cfaf38919a
Is there an existing SDK library? If yes, provide link: No

Step 1: Champion Scenarios
Ultimately the library should be easy to use for common scenarios that developers want. Consider the following questions when thinking about champion scenarios:

What is the app the developer is building that uses your client library?
Who is the end-user of the application (the developer's customer)?
What features of the API need to be explained in the sample so that someone could use this API in real app?
How does the authentication workflow look?

See Champion Scenario section here.
Code is appreciated but optional. Pseudocode is fine.

Champion scenario 1: Create workflow definition, workflow definition could be seen as a flow diagram which define how user want to operate their data entity.

    WorkflowDefinitionClient client = GetWorkflowDefinitionClient();
    string workflowDefinitionId = Guid.NewGuid().ToString();
    string workflowDefinitionPayload = File.ReadAllText("workflow_definition.json");
    await client.CreateOrUpdateAsync(workflowDefinitionId, payload);

Champion scenario 2: Trigger workflow run, which could be seen as an running instance of workflow definition.

    WorkflowRunClient client = GetWorkflowRunClient();
    string workflowRunId = Guid.NewGuid().ToString();

      var triggerRunPayload = new
      {
          requestType = "CreateTermRequest",
          payload = new
          {
              name = "sample_term",
              anchor = new
              {
                  glossaryGuid = "41065e8b-80af-4bae-afb8-13856b85444d"
              },
              status = "Draft",
              nickname = "sample_term",
              attributes = new { }
          }
      };

    await client.TriggerAsync(workflowRunId, RequestContent.Create(triggerRunPayload));

Champion scenario 3: update workflow request, here is an example of approve approval request(one kind of workflow request)

      ApprovalRequestClient client = GetApprovalRequestClient();
      string approvalId = "98d98e2c-23fa-4157-a3f8-ff8ce5cc095c";

      var approveReply = new
      {
          comment= "Thanks for raising this!"
      };

      await client.ApproveAsync(approvalId, RequestContent.Create(approveReply));

Drafted

Hi @ronniegeraghty , I've sent the email to Architecture Board to schedule the review meeting two days ago, but didn't received any reply till now, may I ask how soon the meeting will be scheduled? Thanks.

Hi @CordeliaGrey, the email alias you listed is the list of our SDK Architects, for assistance with scheduling in the future you should contact our help desk alias. Currently the review session is slated for Nov 15th from 2:05PM - 4PM PST. Once the date and time of the session is confirmed you will receive an invite to the review session and a comment will be added to this issue with the text "Scheduled:" followed by the date and time of the session.

Hi @ronniegeraghty, thanks for your patient explanation, I have few questions hope to get your reply:

Do I need to send scheduling meeting email again to help desk alias?
I followed this guideline to send the email to Architecture Board, I didn't find help desk alias in this guideline, I'm afriad if I missed any other guideline, could you please share it if it does exist?
Could we move the review session eariler? As we are targeting release SDK by the end of Nov. I'm afraid Nov 15th is a little bit late and we can't catch up the expected release date. BTW, our local time is UTC+8，the time after 4PM PST would be appriciated.

Hi @ronniegeraghty Ronnie Geraghty FTE, thanks for your patient explanation, I have few questions hope to get your reply:

Do I need to send scheduling meeting email again to help desk alias?
I followed this guideline to send the email to Architecture Board, I didn't find help desk alias in this guideline, I'm afriad if I missed any other guideline, could you please share it if it does exist?
Could we move the review session eariler? As we are targeting release SDK by the end of Nov. I'm afraid Nov 15th is a little bit late and we can't catch up the expected release date. BTW, our local time is UTC+8，the time after 4PM PST would be appriciated.

If your email included any specific requests for your review session, like who should be invited please do forward it to the help desk email.
 The only other thing would be to make sure champion senarios and APIview links for all tier 1 languages (.NET, Java, JavaScript, Python) are added to this issue. Looks like you have all the APIview links, but I just wanted to check and see if the Champion Senarios listed above are generalized pusedo code that will apply to all the languages. If not, you'll need to have Champion Senarios listed for each language.
We just had another group cancel on their review session for Nov 9th. Would Nov 9th from 4:05PM - 6PM PST work for your team. If not, the 15th is the next available date.

Hi @ronniegeraghty,
Please let me know if I need to provide other language pusedo code after you checked.
Nov 9th from 4:05PM - 6PM PST work for my team, please help to schedule session at this time.
Thanks for your help!

Scheduled: Nov 9th from 4:05PM - 6PM PST

I moved the samples to the API view (samples tab). Please add sample comment there

Recording (MS INTERNAL ONLY)