Run Propel-commands without shell

Hi,
is it possible to run commands from propel like propel sql:insert without using the shell at all?
The reason is that I've got an webspace with PHP and MySQL but no access to the shell at all (and exec, system etc. are disabled).
Is there a solution?

Hi,
imho the best solution is the following:

run propel commands locally, to generate the model classes and the sql
file
upload your generated model classes via ftp (or ssh)
the generated sql file contains sql commands and you can run them
directly on your mysql server, via phpMyAdmin or some client like this. In
phpMyAdmin you should be able to upload a file containing sql commands and
run them, isn't it?
Adjust your configuration file according to your remote mysql server
username, password etc.

Regards.
2017-11-18 15:17 GMT+01:00 Syndesi<EMAIL_ADDRESS>
Hi,
is it possible to run commands from propel like propel sql:insert without
using the shell at all?
The reason is that I've got an webspace with PHP and MySQL but no access
to the shell at all (and exec, system etc. are disabled).
Is there a solution?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/propelorm/Propel2/issues/1430, or mute the thread
https://github.com/notifications/unsubscribe-auth/AA00naWPwovJbd0LG58TWcErR8RFKGauks5s3ucAgaJpZM4QjBCP
.

Sure you can... that is if you are allowed to run exec().
Just find the full path to the ~vendor/propel/propel/bin/propel.php and execute the command from your webpage.
But make sure to protect the script from unallowed access ;)

Hi,
@cristianoc72 your answer seems more or less easy, but I think that it would be complicated to update the local instance, then run the migration-command, check the sql, upload it and run it on the server. But for a one-time-job it would be a fast solution :)
@dhm80 sadly I'm not allowed to run exec(), system() and similar commands :/
But in the end I found a way to run every command from Propel 2 only with PHP :D
<?php
// path of current file: /api/lib/propel.php
namespace lib;

use Symfony\Component\Finder\Finder;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\BufferedOutput;
use Propel\Runtime\Propel;
use Propel\Generator\Application;

class Test {

  public function __construct(){
    // code from vendor/propel/propel/bin/propel.php
    $finder = new Finder();
    $finder->files()->name('*.php')->in(__DIR__.'/../../vendor/propel/propel/src/Propel/Generator/Command')->depth(0); // path adjusted to the location of this file
    $this->app = new Application('Propel', Propel::VERSION);
    $ns = '\\Propel\\Generator\\Command\\';
    foreach ($finder as $file) {
      $r  = new \ReflectionClass($ns.$file->getBasename('.php'));
      if ($r->isSubclassOf('Symfony\\Component\\Console\\Command\\Command') && !$r->isAbstract()) {
        $this->app->add($r->newInstance());
      }
    }
    $this->app->setAutoExit(false);
  }

  public function test(){
    // https://symfony.com/doc/current/console/command_in_controller.html
    $input = new ArrayInput([
      'command'     => 'sql:build',
      '--overwrite' => null
    ]);
    // change the current directory to the project's main folder
    chdir(realpath(__DIR__.'/../../'));
    $output = new BufferedOutput();
    $this->app->run($input, $output);
    return $output->fetch();
  }
}

?>


Add ability to pass in HttpClient into ArtifactoryClient factory method(s)

This is to avoid single connection issues in concurrent environments:
java.lang.IllegalStateException: Invalid use of BasicClientConnManager: connection still allocated.

by using a pooling connection manager implementation, as an example.

Hey,
I ran into the same issue, did you figure out a workaround to upload files in parallel?
Stuck on this issue since past 2 days, ironically a relief that I am not alone. Thought I could use your experience on this.
Any tips?

@btiernay and @bhuvneshj,
Thanks for sharing this need. We will soon start working on implementing this.


Improve overlay wiki

Hi, I am doing the translation of the game into Italian. I could use the mod with overlay, on the wiki it's poorly explained and it's not clear how I should do it.
I have done it this way but it doesn't work:
A) I created a folder called "overlay_ITA" and put it in the installation folder.
B) inside I put the folder "Resource" and the file "overlays.txt" with the following lines:
Resource\INI\texts\english
Resource\INI\interfaces
Resource\Textures\Interfaces\LE\Fonts
It doesn't load though, where did I go wrong?

Oh, because you need to put the name of the folder in overlays.txt, so you'd put overlay_ITA, then all the contents of that folder will be overlaid recursively automatically.

I thank you for your answer, it works now.
I didn't realize that the txt file went outside the folder, and that all subfolders should not be specified.
Thank you and good work


Case insensitivity causes broken links

The new search introduced in  dd1f6dbd90e6f9fb82e071c927a1281ad1eb0033 is noticeably faster, but it looks to have caused some breakage, for example searching pow_sub_pow in the top right and clicking a result lands us on
https://leanprover-community.github.io/mathlib_docs/find/polynomial.cyclotomic_eq_prod_x_pow_sub_one_pow_moebius
which is a 404-page (as the x should be upper case), this 404 page then recommends itself in a loop as a "how about one of these instead"

oops

Verified that the links in https://leanprover-community.github.io/mathlib_docs/eqpX work now.


implement manual branch coverage for MyAtoiTest class

What would you like to share?
as the title suggests.
link to java file in repo
Additional information
No response

this class is a bit overkill for the task and my expertise. going to change to a different one


Ensure that redirect warnings appear exactly once per code

Summary
We often have warnings that we want to show users -- but we only want to show those warnings once, no matter how many times the triggering codepath executes, since it's not useful to show the same warning multiple times.
Case in point: when the user lists a rule code that has been deprecated and redirected to a new rule code (e.g., RUF004 was moved to B026), that redirect could happen multiple times in a single invocation -- the out-dated rule could appear in multiple parts of the configuration file, it could be provided on the command-line in addition to the configuration file, and so on.
Historically, to show one-time warnings, we used this warn_user_once! macro, which relies on an AtomicBool. This macro does warn once, but is dependent on the code path. That is: it doesn't support dynamic warnings, since the "state" gets inlined into the call-site.
For the redirect case described above, we currently print that warning multiple times, since we can't use our warn_user_once! macro. This PR thus introduces a warn_user_once_by_id variant that stores the warnings in a global "registry" with arbitrary keys. By registering each redirect warning based on the redirection code, we avoid repeated warnings even for codes that are redirected multiple times.
Closes #3431.

Unrelated to the fix but related to our warn and warn_once outputs:
We should refactor our code in the long term to avoid writing to stdout/stderr during analysis because they, at best, get printed to stdout when running in WebAssembly and are inaccessible to other APIs. That's why we should only rely on Diagnostics to communicate output to the users.
Relying on global-state is related. WebAssembly or other APIs can call the linter multiple times, and calling lint with the same content should produce the exact result. That means that our internals shouldn't rely on any global state that changes between invocations.

Wondering whether to refactor to use log_once, that crate looks reasonable enough.

Wondering whether to refactor to use log_once, that crate looks reasonable enough.

Our code looks simple enough and this is a pattern that we, ideally, shouldn't encourage. That's why I would prefer our code over having another dependency (dependencies have a maintenance cost too)


Add NFT Explorer

Grant Application
Abstract
UniArts NFT Explorer wants to be the best place to analyze, track and discover NFTs.
UniArts NFT Explorer hopes to create a unified NFT dedicated explorer for the Polkadot / Kusama ecology. It can be used to discover and view the NFTs of parachains.
Checklist

[x] The application template has been copied, renamed ( project_name.md) and updated.
[x] The total funding amount of the project is below USD $30k for first-time grant applications and $100k for follow-up ones.
[x] A BTC or Ethereum (DAI/USDT) address for the payment of the milestones is provided inside the application.
[x] I have read and acknowledged the Terms and Conditions.
[x] The software delivered for this grant will be released under an open-source license specified in the application.
[x] The initial PR contains only one commit (squash if needed before submitting your PR).
[x] The grant will only be announced once the first milestone has been accepted.

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

Sorry for the late response here. In general, I think we are interested in an NFT Explorer. However, your current deliverables look like you want to create a NFT explorer for ethereum and doesn’t seem to be focused on our ecosystem, which is a key requirement of our grants program. I’m pretty sure there are existing explorers for this, which you might be able to reuse. Also we usually don’t fund initial research into our ecosystem via grants (regarding: “ how to monitor the events of evm under Substrate”), since this isn’t something necessarily useful for others.
If you want to create an NFT explorer focused on substrate, you might want to take a look at the existing indexing and block explorer solutions: https://github.com/w3f/Grants-Program/blob/master/docs/polkadot_stack.md.

Hi @wuminzhe, thank you for your application.
What are the certain addresses and topics you are planning to query? This seems at odds with what you are saying in the beginning that you do not require submission or application by NFT creators

Sorry for the late response here. In general, I think we are interested in an NFT Explorer. However, your current deliverables look like you want to create a NFT explorer for ethereum and doesn’t seem to be focused on our ecosystem, which is a key requirement of our grants program. I’m pretty sure there are existing explorers for this, which you might be able to reuse. Also we usually don’t fund initial research into our ecosystem via grants (regarding: “ how to monitor the events of evm under Substrate”), since this isn’t something necessarily useful for others.
If you want to create an NFT explorer focused on substrate, you might want to take a look at the existing indexing and block explorer solutions: https://github.com/w3f/Grants-Program/blob/master/docs/polkadot_stack.md.

Thanks for the reply, Here is my opinion:

I don't see an explorer in the Polkadot ecosystem that is suitable for NFT, the current explorers are all block explorers. If there is something I don't know, please tell me.
It's not for ethereum, but for evm compatibility substrate blockchains. because the most widely used VMs in the Polkadot ecosystem now are evm-compatible VMs. I think there will be a lot of evm-based NFTs soon. We will support wasm and statemine in the future.
About "how to monitor the events of evm under Substrate"
I think technically we already know how to do that.
But evm generates both substrate events and evm events, which are tracked differently. And, evm itself is changing rapidly. So, We need to take a different approach depending on the different chains. So this feature is not something to study, but to follow the individual projects that use evm.

Hi @wuminzhe, thank you for your application.
What are the certain addresses and topics you are planning to query? This seems at odds with what you are saying in the beginning that you do not require submission or application by NFT creators

certain addresses and topics. It is just a lib or a framework to track certain addresses and topics.  But the addresses and topics are from auto-discovery.
But we may need a blacklist to block some bad NFTs.

See NFT Explorer for Kusama & Polkadot. But I was referring to the fact that the existing explorer can be changed to also monitor for example substrate NFT related events (given that they already monitor every event, see https://polkascan.io/kusama/event and once an nft pallet is integrated), so you could reuse the backend for this and mostly focus on the frontend.
Could you describe the difference between an ethereum focused block explorer and an evm focused block explorer for NFTs? I was under the impression that moonbeam implementation let’s you reuse the existing evm stack, but I might be wrong for this specific use case.
In general it would be nice to have more technical details as part of the application.

See NFT Explorer for Kusama & Polkadot. But I was referring to the fact that the existing explorer can be changed to also monitor for example substrate NFT related events (given that they already monitor every event, see https://polkascan.io/kusama/event and once an nft pallet is integrated), so you could reuse the backend for this and mostly focus on the frontend.
Could you describe the difference between an ethereum focused block explorer and an evm focused block explorer for NFTs? I was under the impression that moonbeam implementation let’s you reuse the existing evm stack, but I might be wrong for this specific use case.
In general it would be nice to have more technical details as part of the application.

I listed the kodadot nft gallery in the similar projects section. It is just for rmrk nfts. It's a part of the RMRK. Our final goal is to build an all-in-one explorer for Polkadot & Kusama ecosystem with some data statistics for users to easily discover NFTs. This goal is too big for now. I just want to say that our direction is different from kodadot nft gallery.

Other existing explorers like opensea are NFTs markets than explorers. They are not permissionless. And they are not for Polkadot ecosystem.

An ethereum focused block explorer and an evm focused block explorer for NFTs are similar now. But I think They will be a lot different in the future. Because each project has the ability to modify its own evm pallet.

For evm, we use the filter to get the target logs. eth_newFilter and eth_getLogs are the rpc methods we use. I created a small lib to track logs: https://github.com/wuminzhe/evm-log-tracker
For substrate events, we get the events block by block. similar to https://github.com/darwinia-network/bridger/blob/master/task/task-darwinia-ethereum/src/service/darwinia

I would like to say that for this project, the technology is not difficult, what matters is the direction, and there is not an NFT explorer with the same direction in the Polkadot ecosystem. It is also difficult for the ethereum NFT explorers to cover the chains in the Polkadot ecosystem.

Thanks for the quick response. But could you please update the specification in the application itself. These are basically the requirements of the contract. Also keep in mind that in the future a lot of things can change, but we can only cover things as part of the grant that reflect the current status quo. For example if we sign the grant for evm support, you will be able to deliver the grant based on the current evm implementation and not potential future versions, which might be different. Also you milestone 2 currently only covers the deployment as key deliverable (at least how it’s currently phrased), that’s something we don’t cover with grants. We only support the development of open source code that can be used by others in our ecosystem.

Thank you for your reply. I need your help to figure out what needs to be updated.

I will add the difference between this project and Kodadot NFT gallery.
I will change the milestone 2's deliverables.

Is there something I'm missing? Are the boundaries of this grant not clear enough?

Sounds good. Just two add two things:

Regarding “Workers for chain“, rather focus on the technical deliverable than having something deployed for different chains.
Maybe integrate some explanation why you are not using an ethereum focused block explorer for NFTs, but rather develop your own solution for the evm.

@Noc2 I understand what you mean now. Thank you.

Linking to your previous application for reference: https://github.com/w3f/Grants-Program/pull/368

@Noc2 I have updated the content. Please review again. Thank you.

Uniscan is a newly created team for the NFT explorer. I joined to develop this.
Because the evm integration of Uniarts is still in progress, so I removed it from the application.
I change the milestone 1&2's deliverables.
I add the difference between this project and Kodadot NFT gallery.
I add the Why evm? section.

@Noc2 Updated

Hi @wuminzhe, thanks for the application. Everything makes sense, I'm just wondering if it'll be possible to buy the listed NFTs through the explorer? In other words, is it generally possible to discover if they are listed on a marketplace (through contract events or centralised market APIs) and are you planning to integrate links to these marketplaces?

Hi @semuelle
We will consider adding the marketplace link in the future. We don't plan to add buying and selling functions ourselves.

Congratulations and welcome to the Web3 Foundation Grants Program! Please refer to our Milestone Delivery repository for instructions on how to submit milestones and invoices, our FAQ for frequently asked questions and the support section of our README for more ways to find answers to your questions.
Before you start, take a moment to read through our announcement guidelines for all communications related to the grant or make them known to the right person in your organisation. In particular, please don't announce the grant publicly before at least the first milestone of your project has been approved. At that point or shortly before, you can get in touch with us at<EMAIL_ADDRESS>and we'll be happy to collaborate on an announcement about the work you’re doing.
Lastly, please remember to let us know in case you run into any delays or deviate from the deliverables in your application. You can either leave a comment here or directly request to amend your application via PR. We wish you luck with your project! :rocket:


Update UI - Add the sort for the Select Pool/Validator/Collator/dApp screen

Describe the task
Add the sort for the Select Pool/Validator/Collator/dApp screen
Design:

https://www.figma.com/file/2nYhrm0rlJtfJoMwrT51Ep/SubWallet-Apps?type=design&node-id=3589-160581&mode=design&t=QxSXytdeYLFFsQ4Q-4

https://www.figma.com/file/2nYhrm0rlJtfJoMwrT51Ep/SubWallet-Apps?type=design&node-id=3589-159578&mode=design&t=QxSXytdeYLFFsQ4Q-4

Filter criteria: reference extension @ThaoNguyen998 please help me specific for @Quangdm-cdm

Version test: https://file.cdmteck.com/s/DB9JLAnjJczopcC/download?path=%2F&files=SubWalletMobile-build-197-883-merge-2023-07-11T11-11-29.ipa
Devices test: IP 11

[ ] Do not reset criteria in case open Select validator again
[ ] Update UI Sorting screen follow by design

Version test: https://file.cdmteck.com/s/DB9JLAnjJczopcC/download?path=%2F&files=SubWalletMobile-build-197-883-merge-2023-07-12T08-54-53.ipa
Devices test: IP 11
Validation passed.


error on build: Package 'gpg' has no installation candidate

$ docker build -t solr4 .
Sending build context to Docker daemon  73.22kB
Step 1/12 : FROM    openjdk:8-jre
 ---> e1c2390521a3
Step 2/12 : RUN apt-get update &&   apt-get -y install lsof procps wget gpg &&   rm -rf /var/lib/apt/lists/*
 ---> Running in 35df126d4762
Get:1 http://security.debian.org jessie/updates InRelease [63.1 kB]
Ign http://httpredir.debian.org jessie InRelease
Get:2 http://httpredir.debian.org jessie-updates InRelease [145 kB]
Get:3 http://httpredir.debian.org jessie-backports InRelease [166 kB]
Get:4 http://httpredir.debian.org jessie Release.gpg [2434 B]
Get:5 http://httpredir.debian.org jessie Release [148 kB]
Get:6 http://security.debian.org jessie/updates/main amd64 Packages [643 kB]
Get:7 http://httpredir.debian.org jessie-updates/main amd64 Packages [23.1 kB]
Get:8 http://httpredir.debian.org jessie-backports/main amd64 Packages [1172 kB]
Get:9 http://httpredir.debian.org jessie/main amd64 Packages [9064 kB]
Fetched 11.4 MB in 7s (1582 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
Package gpg is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'gpg' has no installation candidate
The command '/bin/sh -c apt-get update &&   apt-get -y install lsof procps wget gpg &&   rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

Changing:
FROM openjdk:8-jre
to
FROM    openjdk:8-jre-stretch
allowed the docker build to succeed and for the solr server to start in the container (a later JRE broke the server startup)

The unmodified repo builds just fine for me. It sounds like an upstream issue that went away. If you see it resurface please re-open.


String Escape Sequence section

"Unicode Encoding" value for "\x" escape sequence should be "\x41='A'" instead of "\x0041='A'" to show how \x is similar to \u.

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

ID: c7aa6134-64e2-28a7-f7d0-d0c1512f4520
Version Independent ID: 3317fd4a-9cd3-57cd-66f7-abb271e302e8
Content: Strings (C# Programming Guide)
Content Source: docs/csharp/programming-guide/strings/index.md
Product: dotnet-csharp
GitHub Login: @BillWagner
Microsoft Alias: wiwagn

Thanks for the feedback, @B13rg. It would probably be even more helpful to list both versions -- \x41 and \x0041. Would you like to submit a pull request to do that?  Information on submitting PRs can be found in our Contributor's Guide.

@rpetrusha @mairaw this was fixed by #7823

Thanks for pointing that out, @pkulikov. I'll close this issue.


Stabilize ignore config option

Close #3243.

CI failures are spurious, presumably related to the current GH status issues
error: failed to get `ansi_term` as a dependency of package `rustfmt-bin v2.0.0-rc.1 (/Users/travis/build/rust-lang/rustfmt/rustfmt-core/rustfmt-bin)`

Caused by:

  failed to load source for dependency `ansi_term`

Caused by:

  Unable to update registry `https://github.com/rust-lang/crates.io-index`

Caused by:

  failed to fetch `https://github.com/rust-lang/crates.io-index`

Should this work by now?
% cargo --version
cargo 1.52.0 (69767412a 2021-04-21)
% rustfmt --version
rustfmt 1.4.36-stable (7de6968 2021-02-07)
% cat .rustfmt.toml
ignore = [
    "src/schema.rs"
]
% cargo fmt
Warning: can't set `ignore = IgnoreList { path_set: {"src/schema.rs"}, rustfmt_toml_path: "" }`, unstable features are only available in nightly channel.
Warning: can't set `ignore = IgnoreList { path_set: {"src/schema.rs"}, rustfmt_toml_path: "" }`, unstable features are only available in nightly channel.
%

Can confirm the same error with a slightly older version, too.
cargo 1.50.0 (f04e7fab7 2021-02-04)
$ rustfmt -V
rustfmt 1.4.30-stable (8c6769d 2021-01-18)
$ cat rustfmt.toml
ignore = [
    "src/kbn_constants.rs",
]
$ cargo fmt
Warning: can't set `ignore = IgnoreList { path_set: {"src/kbn_constants.rs"}, rustfmt_toml_path: "" }`, unstable features are only available in nightly channel.

Same here:
$ cargo -V
cargo 1.52.0 (69767412a 2021-04-21)
$ rustfmt -V
rustfmt 1.4.36-stable (7de6968e 2021-02-07)
$ cat .rustfmt.toml
ignore = [
    "src/messages/test.rs",
]
$ cargo fmt
Warning: can't set `ignore = IgnoreList { path_set: {"src/messages/test.rs"}, rustfmt_toml_path: "" }`, unstable features are only available in nightly channel.

Was this commit excised from master after commit? I cannot find it in the master branch history.

Issue persisted in:
$ cargo -V
cargo 1.56.0 (4ed5d137b 2021-10-04)
$ rustfmt -V
rustfmt 1.4.37-stable (09c42c45 2021-10-18)

All - your definitive source of truth around which rustfmt configuration options are available, as well as which are stable/unstable, in the version of rustfmt you are using is the configuration website: https://rust-lang.github.io/rustfmt/?version=v1.4.38&search=#ignore
Changes made to source control are not reflective of any and all released versions of software, especially in multibranch repositories, and the ignore option is still unstable in all released versions of rustfmt.
This change was originally made against an exploratory 2.0 version of rustfmt along with a multitude of other breaking changes. That 2.0 version of rustfmt is unlikely to happen (at least any time soon), and as such that version is no longer being tracked on the default/master branch of this repository which is why the commits from this, and other 2.0-bound PRs do not exist on the current master branch, refs #4801. It also means that there are merged PRs and associated closed issues which haven't actually made their way into a release line.
There's a large number of such changes that were made for that potential 2.0 release which we have to revisit individually, including this one, and I'd ask that folks refrain from continuing to post the "me too" types of comments; it's known, and the issues are being tracked.
In the interim, I would again encourage always referencing the config site and check the actual release notes for details on what's indeed been released.

This remains broken in 2024.
Warning: can't set `ignore = IgnoreList { path_set: {"submodules"}, rustfmt_toml_path: "" }`, unstable features are only available in nightly channel.
...
rustfmt 1.7.0-stable (07dca48 2024-02-04)
...
active toolchain
----------------

stable-x86_64-unknown-linux-gnu (default)
rustc 1.76.0 (07dca489a 2024-02-04)

@rdaum please see https://github.com/rust-lang/rustfmt/issues/3243#issuecomment-1954590357


added integration for Chime meetings

The set of changes open the chime app directly if present on the system, by detecting chime links within the meeting invite.
Chime is the meeting tool by Amazon and is extensively used within Amazon. This will help anyone using this tool to have a link for the meetings.

@pratikgoel145 I haven't had a chance to look at this yet, but just wanted you to know I will eventually! Thanks for your patience.

Looking forward to this feature!

Any updates on this?

@pratikgoel145 Does this handle all the kinds of Chime link formats? Do they always match https://chime.aws? Can a link be of the form https://XYZ.chime.aws? And if so, the translation to the app link won't work?

@sfsam Thanks a lot for merging the PR! 😄
Yes, it does handle all chime link formats. All formats will always be of the form: https://chime.aws. So, this covers all scenarios.
This will greatly help a lot of people. Thanks once again!


fix bug in check isStuck condition and change wording

fix loop in checking condition for isStuck
change wording when nobody wins

I'll review this soon and send you the status of the PR soon!


Can's Training by using the data on external SSD

System information

Have I written custom code: yes
OS Platform and Distribution: macOS Catalina
Mobile device if the issue happens on mobile device: No
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): 2.3.0
Python version: 3.7.4
Bazel version (if compiling from source): N/A
GCC/Compiler version (if compiling from source): N/A
CUDA/cuDNN version: N/A
GPU model and memory: N/A

Bug Summary
I am training an image classifier on the local machine, it works ok when the data is on the local machine, however, when I tried the data which on my external SSD, error pops out. The data on external SSD can be read and decoded separately by using the following code:
import tensorflow as tf
IMG_HEIGHT = 90
IMG_WIDTH = 160
path = "/Volumes/External-SSD/dataset/labeled/gaming/Fresh_68799179400006397.bmp"

def load_and_preprocess_image(path):
    img = tf.io.read_file(path)
    img = tf.image.decode_bmp(img, channels=3)
    img = tf.image.resize(img, [IMG_HEIGHT, IMG_WIDTH])
    img /= 255.0  # normalize to [0,1] range
    return img

load_and_preprocess_image(path)

My code

Dataloader

class DataSetGenerator():
    def __init__(self, IMG_HEIGHT, IMG_WIDTH):
        self.IMG_HEIGHT = IMG_HEIGHT
        self.IMG_WIDTH = IMG_WIDTH

    def load_and_preprocess_image(self, path):
        img = tf.io.read_file(path)
        img = tf.image.decode_bmp(img, channels=3)
        img = tf.image.resize(img, [self.IMG_HEIGHT, self.IMG_WIDTH])
        img /= 255.0  # normalize to [0,1] range
        return img

    def prepare_for_training(self, ds, cache=True):
        if cache:
            if isinstance(cache, str):
                ds = ds.cache(cache)
        else:
          ds = ds.cache()

        ds = ds.shuffle(buffer_size=self.SHUFFLE_SIZE)

        ds = ds.batch(self.BATCH_SIZE)

        # `prefetch` lets the dataset fetch batches in the background while the model
        # is training.
        ds = ds.prefetch(buffer_size=self.AUTOTUNE)

        return ds

    def labeled_dataset(self, image_paths, labels):
        # a dataset that returns image paths
        path_ds = tf.data.Dataset.from_tensor_slices(image_paths)

        # a dataset that returns images (loaded off disk, decoded, and preprocessed)
        image_ds = path_ds.map(self.load_and_preprocess_image, num_parallel_calls=self.AUTOTUNE)

        # a dataset that returns labels
        label_ds = tf.data.Dataset.from_tensor_slices(tf.cast(labels, tf.int64))

        # a dataset that returns images and labels
        image_label_ds = tf.data.Dataset.zip((image_ds, label_ds))

        return image_label_ds

    def get_final_dataset(self, data_root, SHUFFLE_SIZE, BATCH_SIZE):
        self.SHUFFLE_SIZE = SHUFFLE_SIZE
        self.BATCH_SIZE = BATCH_SIZE
        self.AUTOTUNE = tf.data.experimental.AUTOTUNE

        # a dataset that returns image paths
        data_root = pathlib.Path(data_root)
        all_image_paths = list(data_root.glob('*/**/*'))
        all_image_paths = [str(path) for path in all_image_paths if str(path).lower().endswith("bmp")]

        random.shuffle(all_image_paths)

        self.label_names = sorted(item.name for item in data_root.glob('*/') if item.is_dir())
        label_to_index = dict((name, index) for index, name in enumerate(self.label_names))
        all_labels = [label_to_index[path.split('/')[-2]]
                        for path in all_image_paths]

        # separate dataset
        train_paths, test_paths, train_labels, test_labels = train_test_split(all_image_paths, all_labels)

        train_ds = self.labeled_dataset(train_paths, train_labels)
        train_ds = self.prepare_for_training(train_ds)

        test_ds = self.labeled_dataset(test_paths, test_labels)
        test_ds = self.prepare_for_training(test_ds)

        return train_ds, test_ds

Model:

def GamingModel(IMG_HEIGHT, IMG_WIDTH, category_num):
    model = models.Sequential()
    model.add(layers.Conv2D(32, (3, 3), activation='relu',
                            input_shape=(IMG_HEIGHT, IMG_WIDTH, 3)))
    model.add(layers.MaxPooling2D())
    model.add(layers.Conv2D(64, (3, 3), activation='relu'))
    model.add(layers.MaxPooling2D())
    model.add(layers.Flatten())
    model.add(layers.Dropout(rate=0.2))
    model.add(layers.Dense(category_num, activation='softmax'))
    model.compile(optimizer='adam',
                loss='sparse_categorical_crossentropy',
                metrics=['accuracy'])
    model.summary()

    return model

Train:

from dataloader import DataSetGenerator
from models import GamingModel
from datetime import datetime

IMG_HEIGHT = 90
IMG_WIDTH = 160

data_root = "/Volumes/External-SSD/dataset/labeled"
dsg = DataSetGenerator(IMG_HEIGHT, IMG_WIDTH)
train_ds, test_ds = dsg.get_final_dataset(data_root, SHUFFLE_SIZE=4000, BATCH_SIZE=32)

category_num = len(dsg.label_names)

model = GamingModel(IMG_HEIGHT, IMG_WIDTH, category_num)
es_callback = tf.keras.callbacks.EarlyStopping(monitor='val_accuracy', patience=2, mode='auto')
history = model.fit(train_ds, validation_data=test_ds, epochs=10, callbacks=[es_callback])

now = datetime.now()
now = now.strftime("%Y%m%d-%H%M")
model.save(f"../endpoints/game_state_{now}.h5")

Log
2020-08-31 17:33:39.847255: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN)to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2020-08-31 17:33:39.860848: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fd061d24690 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-08-31 17:33:39.860873: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
Model: "sequential"
_________________________________________________________________
Layer (type)                 Output Shape              Param #
=================================================================
conv2d (Conv2D)              (None, 88, 158, 32)       896
_________________________________________________________________
max_pooling2d (MaxPooling2D) (None, 44, 79, 32)        0
_________________________________________________________________
conv2d_1 (Conv2D)            (None, 42, 77, 64)        18496
_________________________________________________________________
max_pooling2d_1 (MaxPooling2 (None, 21, 38, 64)        0
_________________________________________________________________
flatten (Flatten)            (None, 51072)             0
_________________________________________________________________
dropout (Dropout)            (None, 51072)             0
_________________________________________________________________
dense (Dense)                (None, 12)                612876
=================================================================
Total params: 632,268
Trainable params: 632,268
Non-trainable params: 0
_________________________________________________________________
Epoch 1/10
Traceback (most recent call last):
  File "train.py", line 24, in <module>
    history = model.fit(train_ds, validation_data=test_ds, epochs=10, callbacks=[es_callback])
  File "/Users/macuser/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py", line 108, in _method_wrapper
    return method(self, *args, **kwargs)
  File "/Users/macuser/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py", line 1098, in fit
    tmp_logs = train_function(iterator)
  File "/Users/macuser/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 780, in __call__
    result = self._call(*args, **kwds)
  File "/Users/macuser/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 840, in _call
    return self._stateless_fn(*args, **kwds)
  File "/Users/macuser/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 2829, in __call__
    return graph_function._filtered_call(args, kwargs)  # pylint: disable=protected-access
  File "/Users/macuser/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 1848, in _filtered_call
    cancellation_manager=cancellation_manager)
  File "/Users/macuser/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 1924, in _call_flat
    ctx, args, cancellation_manager=cancellation_manager))
  File "/Users/macuser/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 550, in call
    ctx=ctx)
  File "/Users/macuser/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/execute.py", line 60, in quick_execute
    inputs, attrs, num_outputs)
tensorflow.python.framework.errors_impl.InvalidArgumentError:  channels attribute 3 does not match bits per pixel from file 288
	 [[{{node DecodeBmp}}]]
	 [[IteratorGetNext]] [Op:__inference_train_function_755]

Function call stack:
train_function

I see the problem is not from the SSD, is a part of data can't be decode, how I can solve that?

I solved that, follow up for others need it. It was because of some broken images and hidden auto-generated images can't be decoded. Preprocess all images one by one using Tensorflow would tell you which image can't be decoded.


Clarify notes on how rangeproof is built up

This addresses #54

Rendered:

@NicolasDorier see the footnote 2. We combine n statements into a single statement by making them terms of a randomly sampled polynomial.


UI: Fixes domain navigation to back

Description
This PR fixes https://github.com/apache/cloudstack/issues/6090

Types of changes

[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] New feature (non-breaking change which adds functionality)
[x] Bug fix (non-breaking change which fixes an issue)
[ ] Enhancement (improves an existing feature and functionality)
[ ] Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale

[ ] Major
[x] Minor

Bug Severity

[ ] BLOCKER
[ ] Critical
[ ] Major
[x] Minor
[ ] Trivial

Screenshots (if appropriate):
How Has This Been Tested?

@blueorangutan ui

@blueorangutan ui

@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

UI build: :heavy_check_mark:
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6093 (SL-JID-1241)


Ability to adjust column widths

What would you like to be added:
I would like to be able to individually adjust column widths.
(I would like lots of features regarding columns, such as the ability to hide and show columns, rearrange their order, and create a custom column, but I want to limit this issue to the single feature of being able to adjust column widths.)
Why is this needed:
For example, in the Pods view on my screen, some of the pod names are truncated because the column is too narrow for them to fit, while there is lots of white space around Age and Status. I would prefer to be able to modify the column widths so I can see the full name of the pod and reduce the amount of space given to Age and Status.
Environment you are Lens application on:

Kubernetes distribution: [EKS, AKS, GKE, Rancher, ...] kops AWS
Desktop OS:  macOS Catalina

We would like to have it as well. We have quite long object names and usually we see only the beginning of these names that are the same for many workloads. Therefore we have to rely on tooltips which is not that practical.

Will be much appreciated to have this feature.

Closing as a duplicate of https://github.com/lensapp/lens/issues/601 as it has more 👍 's please go add yours to that issue!


[ApiView] Swagger not showing enum definitions

See https://apiview.dev/Assemblies/Review/7c11c4c760344def8e4ce79217d2e805#-azureopenai-2022-12-01.swagger-Definitions-EntityErrorCode that renders like:

even though the swagger is defined as:
"EntityErrorCode": {
  "title": "EntityErrorCode",
  "description": "Entity error codes.",
  "enum": [
    "internalFailure",
    "jsonlValidationFailed",
    "fileImportFailed"
  ],
  "type": "string",
  "x-ms-enum": {
    "name": "EntityErrorCode",
    "modelAsString": true,
    "values": [
      {
        "value": "internalFailure",
        "description": "Internal error. Please retry."
      },
      {
        "value": "jsonlValidationFailed",
        "description": "Validation of jsonl data failed."
      },
      {
        "value": "fileImportFailed",
        "description": "Import of file failed."
      }
    ]
  }
},

This issue has already been fixed in swaggerApiParser 1.0.3 version. @maririos maybe next ApiView release could use the lastest swaggerApiParser


How do I make structures only slightly sparser than in Vanilla.

In the configs, it says

this is the main spread factor (default is 2)

Is the spreadFactor of vanilla (that is, without the mod) 1? If not, what is it?
What would you say is the number that would separate the spawn altar and this spider dungeon in the image below by, say, 12 blocks.

Structures are not spread out from others, only between two structures of the same pool. That being said, a bigger number means a rarer structure.


Added permitted class attribute to image helper

I just hit the wrong button, I will create a PR once I finish the functionality and tests.


get_storage_group_snapshot_list fails if no snapshot exists

Hello,
While using the Unisphere PyU4V 9.2 observed following exception:
The conn.replication.get_storage_group_snapshot_list raises an error if the storage group doesn't has any snapshots.
>>> conn.common.get_uni_version()
('V<IP_ADDRESS>', '92')
conn.common.UNI_VERSION
'92'

Exception traceback:
>>> conn.replication.get_storage_group_snapshot_list("SG_OFR730_08_MG_45")
['SG_OFR730_08_MG_45', 'snap840d44db']
>>> conn.replication.get_storage_group_snapshot_list("SG_OFR730_08_MG_60")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.8/site-packages/PyU4V/replication.py", line 192, in get_storage_group_snapshot_list
    response = self.get_resource(
  File "/usr/local/lib/python3.8/site-packages/PyU4V/common.py", line 375, in get_resource
    return self.get_request(
  File "/usr/local/lib/python3.8/site-packages/PyU4V/common.py", line 349, in get_request
    self.check_status_code_success(operation, sc, message)
  File "/usr/local/lib/python3.8/site-packages/PyU4V/common.py", line 177, in check_status_code_success
    raise exception.ResourceNotFoundException(
PyU4V.utils.exception.ResourceNotFoundException:
The requested resource was not found: Error GET symmetrix.
The status code received is 404 and the message is {'message': 'No snapshot named found'}.

Ideally it should return a empty list as it was in PyU4V 9.1:
conn.replication.get_storage_group_snapshot_list("SG_OFR730_08_MG_60")
[]
>>>
>>> conn.common.UNI_VERSION
'91'
>>> conn.common.get_uni_version()
('V<IP_ADDRESS>', '92')

Thanks Gupta, we will will look into this.

Thanks Gupta, we will will look into this.

Mukesh, just curious where did you install this version, the latest on pip is <IP_ADDRESS> and on github it's <IP_ADDRESS>?, just curious

Mukesh, just curious where did you install this version, the latest on pip is <IP_ADDRESS> and on github it's <IP_ADDRESS>?, just curious

Hi Paul,
I am not sure, to what the V<IP_ADDRESS> is referring at.
I tried installing PyU4V==<IP_ADDRESS> on a completely new setup.
pip install PyU4V==<IP_ADDRESS>
Collecting PyU4V==<IP_ADDRESS>
  Downloading PyU4V-<IP_ADDRESS>-py3-none-any.whl (112 kB)
     |████████████████████████████████| 112 kB 4.2 MB/s
Collecting requests
  Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB)
     |████████████████████████████████| 61 kB 9.0 MB/s
Collecting urllib3
  Downloading urllib3-1.26.3-py2.py3-none-any.whl (137 kB)
     |████████████████████████████████| 137 kB 18.0 MB/s
Collecting six
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting prettytable
  Using cached prettytable-2.0.0-py3-none-any.whl (22 kB)
Collecting chardet<5,>=3.0.2
  Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
     |████████████████████████████████| 178 kB 65.7 MB/s
Collecting certifi>=2017.4.17
  Using cached certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Collecting idna<3,>=2.5
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting wcwidth
  Using cached wcwidth-0.2.5-py2.py3-none-any.whl (30 kB)
Requirement already satisfied: setuptools in /usr/local/lib/python3.8/site-packages (from prettytable->PyU4V==<IP_ADDRESS>) (47.1.0)
Installing collected packages: chardet, certifi, urllib3, idna, requests, six, wcwidth, prettytable, PyU4V
Successfully installed PyU4V-<IP_ADDRESS> certifi-2020.12.5 chardet-4.0.0 idna-2.10 prettytable-2.0.0 requests-2.25.1 six-1.15.0 urllib3-1.26.3 wcwidth-0.2.5

And Post that i am still observing the same version as follow:
conn
<PyU4V.univmax_conn.U4VConn object at 0x7fe4bbe05790>
>>> conn.common.get_uni_version()
('V<IP_ADDRESS>', '92')

I have always used pip install for getting the PyU4V Library

Hi Paul,
The version <IP_ADDRESS> is the Unipshere Management console version:

ok, that makes more sense, it's the unisphere version not PyU4V release.

Hi Mukesh,
This has been fixed in PyU4V <IP_ADDRESS>.  Please let us know if you have any further issues.  Thank you.


chore: remove p-timeout test dependency

p-timeout may be a good library for some complicated use case, but it's not small (57 LOC + 1 dependency) and we use it just at one place - to implement our chai-timeout that can be trivially implemented without an external dependency.

@Richienb if under reduces complexity you mean cyclomatic_complexity then it's lower in my rewrite.
Rewriting in AVA is no way close to complete and badly motivated (parallel tests are slower in our case). Anyway, chai-timeout will be useless in AVA, so, p-timeout will have to go anyway and this reference is non-related.

I'm not talking about the underlying complexity, just the surface complexity that abstracts everything away.

yea... sorry, I don't know what surface complexity means in software development, and I have troubles to understand how I increased that...
My solution is faster and saves global internet bandwidth from bloated code if that matters.

My solution is faster and saves global internet bandwidth from bloated code if that matters.

These are unit tests. The developers are the only primary stakeholder for these. Using p-timeout allows us to decrease the bloat code that we are responsible for maintaining.

@Richienb

vs

That even more complicated than Array.prototype.reduce! :smile:

I usually go nuts can do this kind of optimization to other 3rd party package i depend on (even if they are dev dependency). i sometimes look at npm ls and look for stuff i can dispose of (like how the hole lodash is included and only use 1% of it) so I welcome this kind of stuff. so points to you!
But since

It's also a devDependency which is used in tests so optimizing for performance is not the top priority

1 point to @Richienb

Anyway, chai-timeout will be useless in AVA, so, p-timeout will have to go anyway and this reference is non-related.

1 point to @Richienb again since this will essentially be a unnecessary commit anyway
should instead put the focus on rewriting test to AVA - even if it may take a while to get there.

I will take the opportunity and refer to @tinovyatkin's comments from another thread (#880) as it was closed.

I'm just saying that the only motivation of test runner switch at original issue #832 was the ability to run tests in parallel and it's here.

One of the goals of rewriting the current test suite to AVA was to split the huge main.js test file into smaller pieces. This should allow us to utilize parallel testing better and make things easier for future contributors.

When it comes to this PR, let the others decide. I will focus on rewriting tests to AVA :smile:

@jimmywarting I believe wording like should instead put the focus on...  - is the last thing an open-source project maintainer should say to an unpaid third-party contributor. But I'm hearing that second time here from you and I'd finally got your point.
Also you:


cleanup(GCS+gRPC): protos for ComposeObject()

Part of the work for #13910

This change is

Ping?


Revisit dateCreated, dateModified, and datePublished format

Currently it is expected to be ISO 8601 UTC format, revisit to see if we should change to a custom format of nanoseconds since unix epoch or some other format.

so i tried taking a stab at this by changing the JS representation to a Temporal.Instant and having the JSON be a stringified BigInt (e.g. "1234567890123456789" vs "2009-02-13T23:31:30.123456789Z"), but quickly ran into some issues.
the current architecture of having the message be both the argument to construct a RecordsWrite/RecordsQuery/RecordsDelete means that we're kinda constrained to only having JSON types in our JS API, which IMO feels pretty constrained and isnt allowing us to take advantage of all the powerful JS APIs at our fingertips (e.g. we'd have to convert the ISO string to a Temporal.Instant each time we wanted to do a Tempora.Instant.compare instead of being able to have the property be a Temporal.Instant from the getgo).  id suggest we consider an architecture that actually pulls apart (and repacks) the JSON so that we can be much more OOP about all of this, instead of having things basically just be wrappers around JSON.
putting all that aside tho, here are some of the benefits and drawbacks of using other formats

ISO-8601
Pros

standardized format for creation and parsing
very human readable
extremely well known and supported (at least with only milliseconds precision)

Cons

more verbose with lots of repeated characters (e.g. -, T, :, Z, etc.)
most things I can find only support up to milliseconds precision (even the official standards page only lists milliseconds)
stringifying a Date to JSON automatically uses this, but parsing from JSON will not, so would still need a transformer if we wanted to manipulate a Date instead of a raw string
manipulation and comparison are not very easy and likely require transforming to a different form to be done efficiently (or at all)

BigInt
Pros

fantastic JS API for creation, manipulation, comparison, stringification, etc.
easy interop with Temporal.Instant
very standardized and fully builtin
timestamps are a super understood concept (at least with only seconds/milliseconds precision) and have lots of benefits over date strings

Cons

technically i believe that JSON doesnt have a maximum number size, but at least in the browser anything over 53bits causes precision loss, so the only actually usable intermediate representation would be a number string (e.g.<PHONE_NUMBER>123456789), which is more portable and comparable (arguably) to other formats (e.g. "2009-02-13T23:31:30.1233456789Z") but is harder to parse back into its original form (at least with JSON)
not very human readable or immediately understood that "this represents a UNIX timestamp with nanoseconds precision"

Temporal.Instant
Pros

fantastic JS API for creation, manipulation, comparison, stringification, etc.
very standardized (tho still a bit WIP)

Cons

not JSON compatible (i.e. will need an intermediate representation when sending outside of JS)
not fully implemented in all environments (yet)

i really do think we should be using JS APIs (e.g. Temporal.Instant or at least a Date) and timestamps (ideally numbers, but a stringified numbers would also not suck) in transport, but given the current architecture im not sure we can really have that :(

@thehenrytsai can this be closed now that #113 has been merged?

Unlikely to change unless affecting functionality, closing.


Submitting a claim with incomplete information.

From here:

A claim without destinations or descriptions is incomplete.

Currently when submitting a claim, only the incompleteness indicators on the claim's items are checked. From the eClass post we also want to check if:

The claim has a non-empty description.
The claim has at least one destination.

This covers everything at the claim level, as dates are automatically set.
We also might want to check a selection of things from items as well (which is trivial given the items are already being iterated through):

If the item's description is non-empty.
If the item's category isn't set to No Category. Maybe not, what if there's a category we don't cover?
If the item's amount is non-zero. Probably not actually, in case you're entering something that was free? But then a currency doesn't make sense in that case, as there's no difference between 0 CAD and 0 EUR.

You're right, the two claim warnings should be in there.  Each should have a specific warning message for the dialog.
For the item ones:

If the item's description is non-empty.
If the item's category isn't set to No Category. Maybe not, what if there's a category we don't cover?
If the item's amount is non-zero. Probably not actually, in case you're entering something that was free? But then a currency doesn't make sense in that case, as there's no difference between 0 CAD and 0 EUR.

Since the user is prompted with a dialogue no matter what, it is only a bonus to usability if the user is informed about these item-related things.  Again, they need good, specific messages.

I can take this on, I just want to be sure people don't disagree with me before I start adding a bunch of stuff.
Specific warning messages is a good idea, but how would that work if you had lots of different messages? With destination editing for example, since neither location nor geolocation can be blank, I have three different warning messages that can be displayed (one for each of the two and one for both). That way, the warning message always tell the user exactly why the edit wasn't accepted.
If we're talking about two claim fields and several fields from items, not only would the number of combination messages be tedious to work with and a bad idea to do, but one message couldn't reasonably tell you six things are wrong (empty claim description, no claim destinations, expense items marked as incomplete, empty expense item descriptions, expense items not given categories, expense items with zero amounts).
The alternative is you're just told one thing that's wrong (according to wrongness priority hierarchy), and even if everything else is wrong a better worded "and other stuff" could be appended to the message (worst case 7 unique messages to create in strings.xml). Another alternative is to drop the "and other stuff", and just warn of one thing at a time (worst case 6 unique messages to create in strings.xml).

I think having one warning at a time is reasonable. In a perfect world it would show you everything, but I don't know if it's worth the trouble right now.

Yeah, one at a time works. Why can't I have a perfect world though? :/ I will go ahead and do this. Unless anyone has objects, I will only include at least one claim destination, a non-empty claim description, and non-empty expense items descriptions. I will not consider expense item categories or amounts when considering claim completeness.

The alternative is you're just told one thing that's wrong (according to wrongness priority hierarchy)

That sounds like the best tradeoff to me.


Crash when pressing menu button in game when using with controlify mod

^ what the tittle says basically, ik controller support might be work in progress but thought i should report anyways. Will the mod support external controller mods like controlify or midnightcontrols, or will it have its own implementation? ik controlify has an api for other mod devs to tie their mods in.

It's a known issue, probably will not be fixed, a native controller support is a planned addition for now, as there are no good controller support mods for forge and fabric


hello , i want to zip to memorystream

hello , i want save to MemoryStream ,  export the file by external code . but found that the export of the file can not be properly extracted.
        public byte[] Compress(byte[] bytes)
        {
			Stream stream = new MemoryStream();

			ZipStorer zip = ZipStorer.Create(stream, string.Empty);

			Stream zipData = new MemoryStream(bytes);
			zip.AddStream(ZipStorer.Compression.Deflate ,"default", zipData, DateTime.Now, string.Empty);

			bytes = zip.Close(); // i change this code, make it can return byte[]
			return bytes;
        }

Close() should not return a byte array. It is not like that in any other API that handle streams.
You should return stream.ToArray() instead.


CI: Fix nightlies III

Description
Yesterdays fix did not take because make cli attempts to chmod u+w $(GOPATH)/bin/roxctl which is not permitted in the test context (though it is permitted in the image context and cp bin/$(HOST_OS)/roxctl $(GOPATH)/bin/roxctl is fine so /shrug).
Also noted in last nights CI runs is that the roxctl generated in test-bin does in fact have the proper nightly tag. My working theory is that the CCI trigger has created the tag before OSCI runs and that when they run that tag is at HEAD. (It would be tempting to rely on this and avoid the hacking in prior fixes but relying on different cron jobs to behave in any sort of order notwithstanding external changes is a 💩 IMHO). And it appears as if JOB_NAME_SPEC is defined in the test-bin context. So this PR also adds a bunch of defensive checks when building roxctl and some general debug.
Checklist

[x] Investigated and inspected CI test results

Testing Performed
CI is sufficient - Forced the code path with commit 0f381d6. Ideally I would also trigger a nightly run but there is no sane way to do that with prow.

/retest-required


k3s node stuck NotReady

Environmental Info:
K3s Version:
k3s version v1.18.9+k3s1 (630bebf9)
Node(s) CPU architecture, OS, and Version:
Linux lambda 4.15.18-30-pve #1 SMP PVE 4.15.18-58 (Fri, 12 Jun 2020 13:53:01 +0200) x86_64 GNU/Linux
Cluster Configuration:
One host, running k3s as both master and node.  The host is also running LXC containers using Proxmox, which might cause issues with cgroups?
Describe the bug:
k3s node is stuck NotReady with error [container runtime status check may not have completed yet, missing node capacity for resources: ephemeral-storage]

Can you provide logs from startup onward? Hard to tell what's going on without more details.

Sorry for not responding quickly, I was busy with other project and this kind of got lost - in the process I reconfigured some things and cleaned up the root filesystem a bit and it appears to be working now.  Not sure if it was the filesystem actually be overly full or something else I changed in the process, but whatever it is, it's fixed now.


Added additional step for social providers

Added steps to include the OutputClaim city to the SelfAsserted-Social technical profile. This is necessary in order to get the new claim to show up for social providers.

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

@seancostigan : Thanks for your contribution! The author, @davidmu1, has been notified to review your proposed change.

@seancostigan: Thank you for the contribution. I want to make sure that engineering has a chance to review.  Also, not sure the end of the article in the Next steps section is the best place for the content. Can you comment Yoel?

@davidmu1 I added it there since that's where the first 2 required steps were (modifying the technical profiles). The missing step is to then add the output claim as I have documented, without that the claim will not show up for social providers. It may make sense to move that elsewhere, but I think all of it will need to move (i.e. steps 1 & 2) as well as what I added.

@seancostigan, the engineer, @yoelhor,  suggests the following because it's shorter and the same concept as the local account. What do you think?
[Optional] Next steps
If your policy supports social account, add the new claim to the flows for social account logins by changing the Technical profiles listed below. These are used by social account logins to collect the data, write and read the user.

Locate the technical profile SelfAsserted-Social and add the output claim.  The order of the claims in OutputClaims controls the order that Azure AD B2C renders the claims on the screen, make sure you add the output claim in the desire location.

Locate the technical profile AAD-UserWriteUsingAlternativeSecurityId and add the persist claim

Locate the technical profile AAD-UserReadUsingAlternativeSecurityId and add the output claim

@lindavr I'm good with that.

@seancostigan @lindavr I'll go ahead and make the change in a separate PR in the private repo. Please close this PR. Thank you for the feedback.


the on_realtime_transcription_update text issue

Hi,@KoljaB
I use the on_realtime_transcription_update(also try the on_realtime_transcription_stabilized) text,send to the web client,but it always show the pre text word.
Is there other method that can avoid show the repeated pre words?Thanks!

I try to implement live transcription function similar to Zoom Meeting in the product.

No, that ist due to the way Whisper works and how it therefore is implemented. You'd need to program this on top of that.

Ok,thanks a  lot!
I use the process_text callback data, it costs about 3s,is it normal?how should I reduce the time cost?
use the recorder_config,and recorder.feed_audio(audio_chunk) method in GPU env.
`
def recorder_thread():
global recorder, recorder_ready
print("Initializing RealtimeSTT")
recorder = AudioToTextRecorder(**recorder_config)
print("RealtimeSTT initialized")
recorder_ready.set()
while True:
recorder.text(process_text)
if name == 'main':
print("Starting server, please wait...")
recorder_ready = threading.Event()
recorder_config = {
'spinner': False,
'use_microphone': False,
'model': 'distil-small.en',
'language': 'en',
'silero_sensitivity': 0.4,
'webrtc_sensitivity': 2,
'post_speech_silence_duration': 0.4,
'min_length_of_recording': 0,
'min_gap_between_recordings': 0,
'enable_realtime_transcription': False,
'realtime_processing_pause': 0.2,
'realtime_model_type': 'distil-small.en',
'beam_size_realtime': 1,
'on_realtime_transcription_update': text_detected,
}
`

Ok,thanks a lot!
I use the process_text callback data, it costs about 3s,is it normal?how should I reduce the time cost?
use the recorder_config,and recorder.feed_audio(audio_chunk) method in GPU env.
def recorder_thread():
global recorder, recorder_ready
print("Initializing RealtimeSTT")
recorder = AudioToTextRecorder(**recorder_config)
print("RealtimeSTT initialized")
recorder_ready.set()
while True:
recorder.text(process_text)
if name == 'main':
print("Starting server, please wait...")
recorder_ready = threading.Event()
recorder_config = {
'spinner': False,
'use_microphone': False,
'model': 'distil-small.en',
'language': 'en',
'silero_sensitivity': 0.4,
'webrtc_sensitivity': 2,
'post_speech_silence_duration': 0.4,
'min_length_of_recording': 0,
'min_gap_between_recordings': 0,
'enable_realtime_transcription': False,
'realtime_processing_pause': 0.2,
'realtime_model_type': 'distil-small.en',
'beam_size_realtime': 1,
'on_realtime_transcription_update': text_detected,
}

Ok,thanks a lot!
I use the process_text callback data, it costs about 3s to get the text data, is it normal? how should I reduce the time cost?
use the recorder_config,and recorder.feed_audio(audio_chunk) method in GPU env.

Ok,thanks a lot!
I use the process_text callback data, it costs about 3s to get the text data, is it normal? how should I reduce the time cost?
use the recorder_config,and recorder.feed_audio(audio_chunk) method in GPU env.

Absolutely not normal. Even with largest model or on CPU transcription time should be way below 1s.
I have no real idea, why this happens.
Can you please try another model, like small.en or medium? Also a separated test with only faster_whisper library could tell us if it's the transcription or maybe something related to the VAD models.


Add support to others json libraries

It's possible to use another json library instead of jiffy?
Maybe the user could set it during the runtime or compile time.
Thanks.

Another very old issue… I guess, @joaohf just moved on considering that we didn't reply in time 😞 .


Sentence clarification

I wasn't sure this sentence was in error or not and I wasn't able to find any quote like it. I did find this one however, https://www.glassdoor.com/Interview/What-does-it-mean-to-belong-QTN_1980892.htm, and changed the quote to reflect it.

Will squash, apologies

You don't have to worry about squashing, it can be done on my side when I merge it (:


Feature for issue 47

Coverage increased (+0.01%) to 98.698% when pulling c420954a614daabba7c7a522c5d0067bd5ddc50f on Sediug:master into d9314d2b902f9302887df437e6fb941dd7e2934b on nadbm:master.

Thanks @Sediug

I did it on a rush with not much time, your implementation is cleaner and work as expected xD, thanks @nadbm.

No worries @Sediug , contributions are always welcome :)


Module Telemetry Enhancements/Additions - Custom Library & Zero Trust Networking Phase 1

Overview/Summary
This PR adds adds some new telemetry collection to the existing bitfield deployments so we can learn more about how the module is being used.
This PR fixes/adds/changes/removes

AB#27173 - Zero Trust Networking Phase 1 - https://github.com/Azure/Enterprise-Scale/wiki/Deploying-ALZ-CustomerUsage#alz-acceleratoreslz-arm-deployment---zero-trust-networking---phase-1--definition
Telemetry for Custom Library Enabled

Breaking Changes
None
Testing Evidence

Screenshot of deploying module with defaults and then adding connectivity config with AzFW Premium
Can be seen on internal dashboards from test deployment
As part of this Pull Request I have

[x] Checked for duplicate Pull Requests
[x] Associated it with relevant issues, for tracking and closure.
[x] Ensured my code/branch is up-to-date with the latest changes in the main branch
[x] Performed testing and provided evidence.
[x] Updated relevant and associated documentation.

/azp run unit

/azp run unit

/azp run unit

/azp run unit

@matt-FFFFFF all good now


Fix missing null-terminator.

Would have been detectable with ASAN enabled version of NRN.

This fixes a memory leak? If so, what's a MWE that would demonstrate the problem?

No, it fixes an out-of-bounds access. It's covered many times already; but without an NRN with ASAN enabled (or similar) there's no guarantee that it results in a failure (e.g. SEGFAULT).


Decorator Template question

Hello!
Can I somehow implement the generation of a class body, as shown in the decorator example?
How do I use .swifttemplate? Do I need to install sourcery via cocoapods? Now I have installed using brew
Thanks.

Homebrew uses SPM to build Sourcery from source code, so Swift templates will not work, you need to install it with Cocoapods or just download latest release binary.
This template uses auto-inline feature, which will insert generated code in the end of type body even if there are no inline annotations (it will add auto:inline annotation). More about that in the docs


Particle Swarm Optimization -ArgminRandom trait

Hi
I have an issue whenever I try to instantiate the ParticleSwarm optimizer and set the bounds as f64 as per below:
let solver = ParticleSwarm::new((-0.3, 0.3), 40);
returns the errors:
the trait argmin_math::ArgminRandom is not implemented for f64 (even though it seems to be the case).
I use argmin v0.7.0. Also, the example provided in particleswarm.rs leads to a similar error.
Thank you in advance, amazing work!

Thanks Stefan!
Using vec leads to the same issue.
What backend version shoud I use? I am using argmin-math = "0.2.1"

The Vec backend should be fine for PSO and by including argmin-math it should be enabled properly.
Could you paste in more of your code, please? I'm particularly interested in the CostFunction implementation.

I have replaced scalars by vectors in my objective function as per below and it compiles:
`struct ObjFunc<'a> {
profit_fun: &'a Box<dyn Fn(f64) -> f64 + 'a>,
cost_fun: &'a Box<dyn Fn(f64) -> f64 + 'a>,
}
impl CostFunction for GasObjFunc<'_> {
type Param = Vec;
type Output = f64;
fn cost(&self, x: &Self::Param) -> Result<Self::Output, Error> {
    Ok((-(*self.profit_fun)(x[0])) / (*self.cost_fun)(x[0]))
}

}`
However I am not 100% sure it is the correct way of doing things as I get unexpected values for res.state.best_cost .
Thanks

I have replaced scalars by vectors in my objective function as per below and it compiles:

This is what I suspected :) Solvers require some sort of vector/array for their parameter vectors.

type Param = Vec;

Just a side note: I assume you mean type Param = Vec<f64>;?

However I am not 100% sure it is the correct way of doing things as I get unexpected values for res.state.best_cost .

Given the information I have, this looks correct to me. If you input best_param into your cost function, does it lead to the same cost function value?
Since it is a 1D problem you could scan the cost function over the parameter space and see if it does what it is supposed to do. If the cost function is correct then there may be a bug in PSO.

Thanks for your reply.
I think I found when the issue happens; whenever I launch two or more PSOs in parallel with rayon, I get different results between res.state.best_individual.unwrap().cost and the objective function valued at that point.
I don't experience this issue when only one PSO is performed so I guess this is not thread-safe?

The rayon feature is documented here. When enabled, the cost function is evaluated in parallel for the entire population (and as such only works for population based methods such as PSO). But it seems that this is not the kind of parallelization that you are looking for.

Will try to post the code later on.

Thanks!

Thanks, should I add rayon to the crate's features as per below?
argmin-math = { version = "0.2", features = ["ndarray_latest-serde", "nalgebra_latest-serde", "rayon"]

The rayon feature is part of the argmin dependency (not argmin-math):
argmin = { version = "0.7", features = ["rayon"] }

Yes in fact when I use rayon as an argmin dependency I get a thread safe error:
dyn Fn(f64) -> f64 cannot be shared between threads safely
which seems to indicate that using rayon upstream is not a good idea.

If that was the actual reason for your problems I'd expect that compilation would also fail when running multiple Executors in parallel. I assume that something else is wrong, for instance some kind of memory shared between the different instances. It is difficult for me to give any more advice without more context in form of code. The functions  profit_fun and cost_fun are essentially black boxes to me and I'm unsure about the general setup. The references to your functions in your ObjFunc are definitely something that can cause issues in a multi-threaded setting. As an alternative you could implement those functions as methods on ObjFunc and call them directly (instead of via a reference to the function). While this will solve the error you see when compiling with the rayon feature, I doubt that this will solve the actual problem. The only thing I can think of with the information that is available to me is that those functions (profit_fun and cost_fun) somehow have side effects across thread boundaries (via shared memory).

You are correct, there are some boundaries effect uinder the hood (basically a lock in tokio conflicting with rayon) making the code thread unsafe at exec. Thank you for your help!


Errors hide other errors

Bug description
-- Error:

-- Now hidden by the error for previewFeatures

Expected behavior
Both errors should show
Prisma information
generator client {
    provider = "prisma-client-js"
    previewFeatures = [""]
}

datasource db {
    provider = "postgresql"
    url      = env("DATABASE_URL")
}

model Post {
    id Int @id

    @@index([id(ops: InetOps )], type: Gin)
}

Environment & setup

OS: MacOS
Editor: VS Code
Editor version: v1.74.0
Extension version: v4.7.1

Is this language tools specific or is this something that is already tracked in prisma/prisma as a problem in validation in general?


panic when stopping vm

Required information

Distribution: Ubuntu
Distribution version: 20.10
The output of "lxc info" or if that fails:

Kernel version: 5.8.0-33-generic #36-Ubuntu SMP Wed Dec 9 09:14:40 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
LXC version: 4.0.0-devel
LXD version: 4.9
Storage backend in use: btrfs

Issue description
Panic in qmp when running lxc stop <vm> --force
Steps to reproduce
Not completely sure.
Information to attach

[ ] Any relevant kernel output (dmesg)
[ ] Container log (lxc info NAME --show-log)
[ ] Container configuration (lxc config show NAME --expanded)
[ ] Main daemon log (at /var/log/lxd/lxd.log or /var/snap/lxd/common/lxd/logs/lxd.log)
[ ] Output of the client with --debug
[ ] Output of the daemon with --debug (alternatively output of lxc monitor while reproducing the issue)

DBUG[01-04|12:49:39] Instance stopped                         instanceType=virtual-machine instance=f2-vm project=default
DBUG[01-04|12:49:39] Stopping device                          instance=f2-vm project=default instanceType=virtual-machine device=root type=disk
DBUG[01-04|12:49:39] Stopping device                          instance=f2-vm project=default instanceType=virtual-machine device=eth0 type=nic
DBUG[01-04|12:49:40] Clearing instance firewall static filters project=default instance=f2-vm parent=lxdbr0 dev=eth0 host_name=tapfc1ce2e8 hwaddr=00:16:3e:42:74:4d ipv4=<IP_ADDRESS> ipv6=::
DBUG[01-04|12:49:40] Clearing instance firewall dynamic filters ipv4=<nil> ipv6=<nil> project=default instance=f2-vm parent=lxdbr0 dev=eth0 host_name=tapfc1ce2e8 hwaddr=00:16:3e:42:74:4d
DBUG[01-04|12:49:40] UnmountInstance started                  driver=btrfs pool=btrfs1 instance=f2-vm project=default
DBUG[01-04|12:49:40] UnmountInstance finished                 driver=btrfs pool=btrfs1 instance=f2-vm project=default
panic: close of closed channel

goroutine 13502 [running]:
github.com/lxc/lxd/lxd/instance/drivers/qmp.(*Monitor).Disconnect(0xc000216940)
        /home/brauner/src/go/src/github.com/lxc/lxd/lxd/instance/drivers/qmp/monitor.go:176 +0x103
github.com/lxc/lxd/lxd/instance/drivers/qmp.(*Monitor).run.func1()
        /home/brauner/src/go/src/github.com/lxc/lxd/lxd/instance/drivers/qmp/monitor.go:86 +0x2b5
created by github.com/lxc/lxd/lxd/instance/drivers/qmp.(*Monitor).run.func2
        /home/brauner/src/go/src/github.com/lxc/lxd/lxd/instance/drivers/qmp/monitor.go:149 +0x208

Note that this issue seems to be gone when restarting the LXD daemon. Maybe it was a dependency issue like @tomponline pointed out on irc. In any case this can be closed if that's not a bug likely to hit users when upgrading.

Note that this issue seems to be gone when restarting the LXD daemon. Maybe it was a dependency issue like @tomponline pointed out on irc. In any case this can be closed if that's not a bug likely to hit users when upgrading.

It does look like there is a possibility of a race here https://github.com/lxc/lxd/blob/master/lxd/instance/drivers/qmp/monitor.go#L175-L176 so probably need to move critical section below to include this check

It does look like there is a possibility of a race here https://github.com/lxc/lxd/blob/master/lxd/instance/drivers/qmp/monitor.go#L175-L176 so probably need to move critical section below to include this check


Implement span-based call tracing throughout host

This was originally thought to be an OpenTracing thing but it's possible that OpenTelemetry might be the better approach? The main requirement is that we need to be able to trace the first stimulus through all calls resulting from it and then be able to emit that entire span, along with suitable metadata. For reference, see this issue from the archived repository.

been working on it, will upload current status by end of weekend...
was closes to doing that a couple of weeks ago but i had to chop it up once I'd seen the new arch, there are a few immediate benefits but also a couple of challenges, will send you a link by Monday morning

it's an opentelemetry package for tracing and metrics... absorbing the prometheus middleware from the original host.
once I'd thought through the fact that wascc host is now able to switch out messaging providers and I'd made the adjustments, a few interesting ideas came to mind... will outline in an issue.
Apologies for not communicating, I managed to get malaria again, 4 months after the first (never expected that to happen) and 2020 keeps upping the crazy so I haven't had as much keyboard time as I'd expected to this year... since it was the oldest issue and still at the bottom of the pile, I thought it was still an undesirable :)


Test Issue

Hello there,
I don't think there is an issue, but I always wanted to open up an issue to see how that looks.
Cheers! Hope we can solve this issue soon.

I think we can close this with this nice solution of ignoring it.


add coding exercises resources

added resources for coding exercises and quizzes

I've made the changes! Could you please check it again?


Enable travis-ci

It would be nice to have a sanity check on the PRs.  This needs to be done by an admin.  /cc @nnance

enabled CI and added build tag to readme


Implement changes to support passing through raw query result rows

These two commits are necessary for passing through the raw data rows for proxied queries when using the Parse/Bind/Describe/Exec path (as opposed to the SimpleQuery path, where this kind of passthrough is already implemented).
The bulk of the necessary changes are to let us specify custom result formats when we execute a query, since we need to specify the same result formats as the original client query if we want the results we pass through to match what the client expects. We also add a public accessor for the underlying row data on the Row type. See the individual commit messages in this PR for more detail.
(For more context on why I'm making these changes, see readysettech/readyset#268).

I think I'm likely going to need to add one more commit to this PR, because if we want to add a new variant to psql_srv::message::BackendMessage to wrap a Row, then we may need Row to implement PartialEq since it's derived for BackendMessage. Hoping there's a way around that, since we only seem to use the PartialEq implementation for tests, which wouldn't be using the variant that wraps a Row anyway, but it'd add a bunch of ugly boilerplate to do a custom impl so I'm weighing my options right now.

Cool, thanks @dfwilbanks395! I ultimately decided it's better to eliminate the PartialEq impl on BackendMessage instead, so I think these changes should be sufficient after all.
(I think we can also revert some of the derives we added in 9366b3392b9d7d3bd149936101c04ae8d3195c6f now that we don't need them for BackendMessage anymore, but I'll address that later in a separate PR.)


brew audit on description length isn't strict enough

Please always follow these steps:

[x] Confirmed this is a problem with Homebrew/brew and not one or more formulae? If it's a formulae-specific problem please file this issue at https://github.com/Homebrew/homebrew-core/issues/new
[x] Ran brew update and retried your prior step?
[x] Ran brew doctor, fixed as many issues as possible and retried your prior step?
[x] Ran brew config and brew doctor and included their output with your issue?

brew audit on description length is not restrictive enough. See https://github.com/Homebrew/homebrew-science/pull/5608
 $ brew desc https://raw.githubusercontent.com/MmgTools/homebrew-science/30777e8/mmg.rb | wc -c
     113

yet brew audit --strict --online for the same formula doesn't raise an error. The issue is that the string is constructed weirdly:
  desc "Simplicial remeshers: mesh improvement,"\
  "isotropic or anisotropic mesh adaptation and isovalue"\
  "discretization."

I don't know how to debug rubocops so if someone could point me in that direction that would be great.

Rubocop is a static code analyzer, meaning it analyze the code without running it. It can’t detect this. One way to circumvent the issue would be to flag this way of building strings (i.e. "foo" "bar" instead of "foobar"); I don’t think there’s any valid use-case for those in Homebrew.

Perhaps it can reject a description line ending in \

@GauthamGoli any thoughts on this?

Three string types can result after rubocop parses the code as listed here. I didn't know that when I first wrote the cop. So a multi line string with \ s is interpreted as an interpolated string.
I need to add these conditions and I'll submit a PR
Can we also expect here docs for formula desc ?

@GauthamGoli I think it's worth assuming anything can get any format of string input.


Azure Account extension that Azure Api Center extension depends on for authentication will be deprecated in January 2025.

Hello 👋,
Azure Account extension that Azure Api Center extension depends on for authentication will be deprecated in January 2025. Please see https://github.com/microsoft/vscode-azure-account/issues/964 for more details.
After taking a look at the Azure Api Center extension, we recommend onboarding it onto our Azure Resources API. A great example of an extension migrating onto the Azure Resources API is the Azure Spring Apps extension: https://github.com/microsoft/vscode-azurespringcloud/pull/49.
Please reach out to me on Teams for questions or support.

https://github.com/microsoft/vscode-azureapicenter/pull/192

@alexweininger thank you for your reminder, we already remove the 'azure-account' extension and do sign in flow leverage vscode authentication session.
so just close this issue.

Awesome, thank you @wenytang-ms


EbaySvg could be a cached file

I've been working on refactoring the EbayIcon and EbaySvg for our use cases.
At the moment, the EbaySvg component exports all of the possible icons you might need. When thrown onto a site, this leads to an additional ~2'474 dom elements being rendered to the page, regardless of which icons are being used on that page.
We could instead host the SVG file separately and make use of browser caching to reduce the bundle size.
as you can see, when loading the svg file first, it responds with a 200 status, the file is still a little large, but 216kb is less than it adds to the js bundle

where this gets better though, is that the browser will then use the cached image from that point onward

So far I've managed to come up with this.
import { SVGProps } from 'react';
import { EbayIconProps } from '@ebay/ui-core-react/ebay-icon';
import classNames from 'classnames';
import { toKebabCase } from '@utils';

export type CachedEbayIconProps = SVGProps<SVGSVGElement> & {
  name: EbayIconProps['name'];
  className?: string;
};

const iconFileUrl = '/icons.svg';

export function CachedEbayIcon({
  name,
  className,
  ...rest
}: CachedEbayIconProps) {
  const iconInKebabCase = toKebabCase(name);

  return (
    <svg
      className={classNames(className, 'icon', `icon--${iconInKebabCase}`)}
      xmlns="http://www.w3.org/2000/svg"
      focusable={false}
      {...rest}
    >
      <use href={`${iconFileUrl}#icon-${iconInKebabCase}`} />
    </svg>
  );
}

There are some limitations to this solution:

Any SVG files have to be hosted on the same domain name as the page that references it, so any project using the svg icons will have to upload their svg file to a public folder on their server. (it's also an aditional setup step)
The iconFileUrl probably aught to be an env variable or another variable solution so the path can be changed.

In terms of rollout though, there are a few challanges:
If you note this line:
<use href={`${iconFileUrl}#icon-${iconInKebabCase}`} />

You'll notice that the iconFileUrl has to be prepended to the use:href attribute. This isn't how EbayIcon currently works, since the svg definitions are rendered directly on the page.
A very questionable bandaid fix, is that we can use the xlink:href (currently deprecated but still used and working) as a fallback, for example:
<use xlinkHref=`#icon-${iconInKebabCase}` href={`${iconFileUrl}#icon-${iconInKebabCase}`} />

While really questionable, it does make it so a user is able to opt-in for the improvement, and EbaySvg can still be used as normal.
I'd be interested in seeing what you think

Thank you for opening this issue @JamesManningR, we want to improve how icons are loaded in the page.
Overall we discourage people to use EbaySvg since it is a huge component and the server takes time to build it and the browser takes time to parses it. But also to add to this, EbaySvg should never be part of the bundle. This should be a component only rendered by the server.
What we encourage people to do is to use EbaySvg as a reference and create your own Svg component with only the icons that the application uses. The problem with this approach is that is manual and is hard to get icons up to date on every skin upgrade. This exact same problem would happen with the proposed solution, since the icons.svg needs to be up to date with skin version that is being used in the application adding also the step to publish this icons in the CDN.
If we see how Marko ebayui-core implements icons, they add the definition in cases it wasn't already added. This works for marko because the definition not necessary will be part of the bundle size, but that is not possible in React model where they need to match the rendering part so it must be part of the bundle if we put on the EbayIcon rendering part.
One possible solution would be having a script to generate the icons that the application uses (similar to what we use today already to generate EbaySvg and types), and they will render that component only on the server.
// scripts/generate-icons.js
import { generateIcons } from '@ebay/ui-core-react/scripts'

generateIcons('/path/to', [
 ... // list of icons
])

By running the command node scripts/generate-icons.js it should output a new component svg.tsx file
/* This file is autogenerated, do not edit - it will be overwritten anyway */
export const SvgIcons = () => (
  <svg>
     ...
  </svg>
)

To make it even simpler we could have a ui-core.config.ts (can be a json also, just to have autocomplete and validation of icon name) file and have a scripts for that so application doesn't need to create a scripts/generate-icons
import type { EbayUICoreConfig } from '@ebay/ui-core-react'

const uiCoreConfig: EbayUICoreConfig = {
  icons: [
     ...
   ]
}

And then can be generated with the command npx @ebay/ui-core-react generate-icons
The main concept between the two is the same (have a script that generate the icons).
And then the application would be responsible to use that component on the server only:
import { SvgIcons } from './path/to/svg.icons.tsx'

const html = ReactDom.renderToString(
  <html>
   <head>
      ...
    </head>

    <body>
       <SvgIcons />

       <App />
    </body>
  </html>
)

@abiyasa @darkwebdev @shpandian @montoya332 any thoughts?

@HenriqueLimas That could be combined with hosting a static file, Instead of outputting a new SvgIcons with the icon definitions, you could output it as a new icons.svg with a hash suffix. ie icons-i4h1s.svg so you don't get any issues updating the asset.
On a later addition, we could also add a search script to crawl your project in the same vein of how tailwind searches for your classes (but probably easier since its always gonna be an attribute of EbayIcon)
If the generateIcons is app wide, it might be better to have all of those icons cached than output them to every page.


[FEATURE] More public get-properties for fields

Is your feature request related to a problem? Please describe.
Currently it's sometimes hard to write own tools or editor scripts (or even own components) that work with atoms, because a lot of fields are private only and have no public getter property.
Describe alternatives you've considered
Reflection is currently the only alternative
Additional context
Event References

[ ] getter for _usage
[ ] getter for _event, _variable, _eventInstancer, _variableInstancer - name the getter: "InternalEvent"/"InternalVariable"/... to make it clear that you're accessing inner workings.
[ ] bool IsUnassigned property that returns whether or not the _variable/_event/... is assigned.

AtomReference

[x] getter for _usage
[ ] getter for _constant, _variable, _variableInstancer - name the getter: "InternalEvent"/"InternalVariable"/... to make it clear that you're accessing inner workings.
[x] bool IsUnassigned

TODO check instancers and listeners for hidden private fields, that might come in handy for users.
mark those getters/method with the UnstableApiAttribute.
/// <summary>
/// Custom attribute to mark methods, properties, or fields that are not part of the stable API.
/// They can change or being removed entirely even in minor or patch releases.
/// </summary>
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field,
                Inherited = false, AllowMultiple = false)]
public class UnstableApiAttribute : Attribute
{
    /// <summary>
    /// Initializes a new instance of the <see cref="UnstableApiAttribute"/> class.
    /// </summary>
    public UnstableApiAttribute()
    {
        // Constructor logic, if needed
    }
}

Just encountering this same problem - with Input System Interpreters.  Have had to edit the package directly to add some public properties to "CallbackContextInterpreter.cs" so I can set the input phase events programmatically.

"check instancers and listeners for hidden private fields" - a setter for Base for Instancers at runtime to swap out prefab generated.  I've added a setter so I can initialise the template prefab values at setup.
FYI Use Case: rather than having the data inside project SO's, I've setup an import from BakingSheets (ie Google Sheets) that generates the Atom SO's and wires them up on import - so can adjust and inspect data/events and observables are created at runtime but a bunch of Atom SO's are auto generated from spreadsheet. Instancers represent the DB Row prefab values... ie a table of monster archetypes for example, where each row then gets translated to a Prefab with Instancers for the monster properties.  Instances of the prefab then have values based on the initial spreadsheet values. So the Base should represent the value imported from the spreadsheet and is set in code, not via Inspector.


Update DEVELOPMENT.md

Updates to align language to OAI Charter (and GitHub functionality)
Charter-related changes:

Technical Contributor Board (TCB) --> Technical Developer Community (TDC)
Committers --> Maintainers

GitHub-related changes:

Issue --> Pull request (PR)
Allow for LGTM

Also:

Fixes Open API -> OpenAPI
Specifies the #spec channel on Slack

Closing issue as this work is now being tracked in #1346


LineEdit secret character hard to change/enter

Godot version
v4.1.1.stable.official [bd6af8e0e]
System information
Godot v4.1.1.stable - Windows 10.0.22621 - Vulkan (Forward+) - integrated Intel(R) Iris(R) Plus Graphics (Intel Corporation; <IP_ADDRESS>21) - Intel(R) Core(TM) i5-1035G7 CPU @ 1.20GHz (8 Threads)
Issue description
LineEdits secret character property is hard to edit in the inspector. It won't let me input more or less than one character so when I try and delete the default . to input my own character it gives me an error in the Output panel and does not change the .. You can change it by highlighting the . and typing the new character but that feels unintuitive to me so it took me a while to work out how to change it.
Steps to reproduce

Create a LineEdit node
Try and edit its Secret Character property in the Inspector without highlighting the ..

Minimal reproduction project
Not really required but I'll add one if anyone asks.

FYI. 3.x prints an error but keeps the invalid text. I'm not sure if we need a regression label for this.

Personally, I think if the user is deleting the secret char then give an error in console is fine.
If the user is typing the new character maybe it should automatically replace the current one ?

There are 2 things we can do:

Allow values longer than 1 character in the property, but trim characters after the first one. Mention this behavior in the documentation.
Allow empty strings (this will act like if a space was used as a secret character), so that an error isn't printed when you erase all characters in the property.

Would it be possible to force the character to be selected so that typing anything overwrites it?

Would it be possible to automatically force the character to be selected so that typing anything overwrites it?

This would mean adding dedicated inspector functionality just for a single property, which I think is overkill.


SILGen: Soften assertions it is okay for an base value of an boxed ex…

…istentials not to be an address
rdar://46343977

@swift-ci Please test and merge


Pasted paragraphs are not divided into blocks

If a blockRenderMap is not defined  with a 'p' element, pasted HTML with paragraph tags is not divided:

Shouldn't the text be splitted into two 'unstyled' blocks?
Is this the intended behavior or a bug?

Similar issue: On my Mac, pasted paragraphs from Microsoft Word are not divided into blocks, but Pages works right.

Attached a PR that fixes this https://github.com/facebook/draft-js/pull/488

This issue has been fixed by https://github.com/facebook/draft-js/pull/828

@mitermayer Cool! I checkout draft-js 0.9.0, cherry-pick your commit and it works.
But I find a problem that if I set blockRenderMap like below:
unstyled: {
  element: 'p',
  aliasedElements: 'div',
},

and I try to paste some paragraph like
123

234
 into my editor, it fails into a block again.
I have noticed that in https://github.com/facebook/draft-js/blob/master/src/model/encoding/convertFromHTMLToContentBlocks.js#L173 it excludes unstyledElement. I wonder why is unstyledElement excluded in BlockMapSupportedTags? Does it cause my problem? Or I misunderstand something here?
Thanks a lot.


Struggling with icon fonts

If you download the Font zip from https://github.com/hfg-gmuend/openmoji/releases/tag/13.1.0, unpack it and upload the Color variant to Wakamai Fondue, the resulting tables look garbled:

Could also be a good candidate for the Beta:

@b-g For your information :point_up_2:
I'm not sure, whether it's a problem with Wakamai or with the font.


DebugApplication causes recursion loop

Hi,
Since upgrading Werkzeug (0.10.4) I get a "Maximum recursion depth exceeded" when Flask brings up the debug application.
I have Flask = 0.10.1, Werkzeug (0.10.4) and I am using uwsgi. Here is the relevant code:
app creation
app = Flask(package_name, instance_relative_config=True)

    rv = os.environ.get('RUN_ENV')
    app.config.from_object('settings.%s' % rv)
    app.config.from_object(settings_override)

    if app.config.get('DEBUG'):
        from werkzeug.debug import DebuggedApplication
        app.wsgi_app = DebuggedApplication(app, evalex=True)

uwsgi.py
app = DispatcherMiddleware(frontend.create_app(), {
    '/admin': admin.create_app(),
    '/api': api.create_app()
})

Anyone might have a clue on why is this happening ?
Here is the traceback:
Traceback (most recent call last):
  File "/Users/ra/code/truepath/nms/env/lib/python2.7/site-packages/flask/app.py", line 1836, in __call__
    return self.wsgi_app(environ, start_response)
  File "/Users/ra/code/truepath/nms/env/lib/python2.7/site-packages/werkzeug/debug/__init__.py", line 166, in __call__
    if request.args.get('__debugger__') == 'yes':
  File "/Users/ra/code/truepath/nms/env/lib/python2.7/site-packages/werkzeug/utils.py", line 71, in __get__
    value = self.func(obj)
  File "/Users/ra/code/truepath/nms/env/lib/python2.7/site-packages/werkzeug/wrappers.py", line 429, in args
    cls=self.parameter_storage_class)
  File "/Users/ra/code/truepath/nms/env/lib/python2.7/site-packages/werkzeug/urls.py", line 723, in url_decode
    include_empty, errors))
  File "/Users/ra/code/truepath/nms/env/lib/python2.7/site-packages/werkzeug/datastructures.py", line 373, in __init__
    for key, value in mapping or ():
  File "/Users/ra/code/truepath/nms/env/lib/python2.7/site-packages/werkzeug/urls.py", line 779, in _url_decode_impl
    key = url_unquote_plus(key, charset, errors)
  File "/Users/ra/code/truepath/nms/env/lib/python2.7/site-packages/werkzeug/urls.py", line 545, in url_unquote_plus
    return url_unquote(s, charset, errors)
  File "/Users/ra/code/truepath/nms/env/lib/python2.7/site-packages/werkzeug/urls.py", line 522, in url_unquote
    rv = _unquote_to_bytes(string, unsafe)
  File "/Users/ra/code/truepath/nms/env/lib/python2.7/site-packages/werkzeug/urls.py", line 351, in _unquote_to_bytes
    if isinstance(string, text_type):
RuntimeError: maximum recursion depth exceeded while calling a Python object

You should pass app.wsgi_app to DebuggedApplication instead of just app

What @warik said.

thanks for the quick answer.
I've changed it

Now the debugger does not show at all.
here is my entire uwsgi.py
app = DispatcherMiddleware(frontend.create_app(), {
    '/admin': admin.create_app(),
    '/api': api.create_app()
})

app = frontend.create_app()

if __name__ == "__main__":
    app.debug = True
    run_simple('<IP_ADDRESS>', 5000, app, use_reloader=False, use_debugger=True)

Please use proper formatting, this post is barely readable. You're defining the app-variable twice. What is create_app? Why not use the app object directly?

As far as i remember there is no need to use DebuggedApplication middleware explicitly. It will be added by means of flag use_debugger if You are using flask application.

For whom it may concern, it turned out that I had the following settings:
PROPAGATE_EXCEPTIONS = False
PRESERVE_CONTEXT_ON_EXCEPTION = False
and this was presenting the debugger from being called.


adding github actions for downstream ci

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

Welcome to Codecov :tada:
Once merged to your default branch, Codecov will compare your coverage reports and display the results in this comment.
Thanks for integrating Codecov - We've got you covered :open_umbrella: