invalid version field in bower.json - easy fix

In JSSOR's bower.json, there is:
  "version": "19.0",

which is not recognized by bower.  You can demonstrate this by typing "bower info jssor-slider".  It will ignore the version there and report that there are "no versions available".
Consumers can get around this by putting
    "jssor-slider": "*",

in their project's bower.json.  That will let them install JSSOR.  Once installed, however, bower cannot cache the package.  For instance, typing bower cache list will NOT list jssor-slider.  And every time you bower install (or bower info, or anything) you will get a cache miss like this:
bower jssor-slider#*        not-cached https://github.com/jssor/jquery-slider.git#*
bower jssor-slider#*           resolve https://github.com/jssor/jquery-slider.git#*
bower jssor-slider#*          checkout master

Fortunately, the solution is SIMPLE.  Just change the version number to a semver-compatible "19.0.0".  Then all is well.
Can you make this simple change to JSSOR and bump the version to 19.0.1?

Wow! Thanks a lot!
I will make this change later.

fixed

thanks!  should i expect to see a 19.0.1 release here?
https://github.com/jssor/slider/releases
jssor/slider
|   |
|   |  |   |   |   |   |   |
| jssor/sliderslider - Bootstrap Javascript jQuery Carousel/Slider/Slideshow/Gallery/Banner Responsive Image - http://jssor.com |
|  |
| View on github.com | Preview by Yahoo |
|  |
|   |
-Andy
 On Thursday, October 15, 2015 3:13 PM, jssor<EMAIL_ADDRESS>wrote:

fixed—
Reply to this email directly or view it on GitHub.


Implemented: encryption and decryption of data(#207jut0)

Related Issues

Closes #
Short Description and Why It's Useful

Screenshots of Visual Changes before/after (If There Are Any)

IMPORTANT NOTICE - Remember to add changelog entry
Contribution and Currently Important Rules Acceptance

[ ] I read and followed contribution rules

Currently not needed. Closing


hotfix/cougarCashDirect -> dev

This change is

Reviewed 1 of 1 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Blank username on AcquireCredentialsHandle results in error

If I pass a blank usename to AcquireCredentialsHandle I get an error, which is different than what happens in the windows sspi.
AcquireCredentialsHandle failed (One or more of the parameters passed to the function was invalid., Win32ErrorCode -2146892963 - 0x8009035D)

I could not reproduce this error on Windows, this is the code I use to try reproducing, did I miss something?
fn main() {
    let username = "".to_string(); // username@domain
    let password = "password".to_string(); // "password

    let kerberos_config = KerberosConfig::new("kdc_url", "hostname".to_string());
    let mut negitiate = Negotiate::new(
        NegotiateConfig::from_protocol_config(Box::new(kerberos_config.clone()), "client".to_string())
    ).unwrap();
    let _ = get_cred_handle(&mut negitiate, username, password);
}

pub(crate) fn get_cred_handle<T>(
    sspi: &mut T,
    username: String,
    password: String,
) -> AcquireCredentialsHandleResult<Option<CredentialsBuffers>>
where
    T: SspiImpl<CredentialsHandle = Option<CredentialsBuffers>> + Sspi,
    <T as SspiImpl>::AuthenticationData: From<sspi::AuthIdentity>,
{
    let identity = sspi::AuthIdentity {
        username: Username::parse(&username).expect("username is not in the correct format"),
        password: password.into(),
    };
    let acq_creds_handle_result = sspi
        .acquire_credentials_handle()
        .with_credential_use(sspi::CredentialUse::Outbound)
        .with_auth_data(&dbg!(identity).into())
        .execute()
        .expect("AcquireCredentialsHandle resulted in error");

    acq_creds_handle_result
}

Closing as discussed in https://github.com/Devolutions/sspi-rs/pull/304#discussion_r1793546562


Add tooltips for the reader status indicators

The meaning of the indicator color (which can be red, yellow and green) is not absolutely clear from the user perspective.

BTW, the color-based approach is also not good from the accessibility perspective: users might have troubles with distinguishing the colors.

So maybe writing the status next to the reader name (Success/Failure/Warning)?

Let's probably start from the tooltips for the icons as a small improvement. This icon is a non-crucial piece of the UI, but having it clarified in form of tooltips would make it clearer for the curious users.
As for displaying the status clear-text - we'd have to make sure we're not making the UI overcomplicated. Some thoughts:

When everything is alright (which is 99% of all scenarios), it's probably better to just show the reader name, without any additional labels.
Note that in the case of failure, we already display the word "error" and (together with the error code).
So the only remaining state is the "yellow" intermediate state; but that one is usually displayed only for a fraction of a second - so again probably better to avoid any additional labels, since they'll just cause flickering.


Data: build dataloader for creating categorical data from input df

Why do we need it?: to start building ML models in the first place
When do we need it?: as soon as possible to start building ML models
Who should do it?: this is a good practice to learn how to transform a dataset into a categorical dataset (ligands) and numerical dataset (NMR signals, maybe descriptors). There are a few catches such as train-test leakage that we need to pay attention to. We can also change this "representation" of the data further down the line. The basic script to load the data as a .csv file and extract the ligand "categories" is already implemented in ./nmrcraft/data/
1 person should be on it
-- Data loading from .csv dataset
-- Prepare data for our task: Ligand classification task --> one-hot-encoding of existing ligand library
-- Data cleaning, data scaling
-- Train/Val/Test split

Friday discussion: add this as a DataLoader class in nmrcraft/data @strsamue


feat: Add Browserslist configuration options (#24)

Two configurations are provided depending on the projects required browser support.

@yokuze as discussed, this is the preliminary configs. Some testing to determine the cost of supporting IE 11 and Opera Mini in the broad configuration would be good.


ALIGN-45 change location condition

@davidmiddletonmoj thanks for taking a look.
I have added the caseloads api endpoint.
I have left the locations work in there as we will still need it for when we rebuild the locations details page.
https://digital-dev.prison.service.justice.gov.uk/prisoner/G6123VU/cell-history


ISPN-12087 Some tests are failing on windows

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

integrated! Thanks @gustavolira


Error banner does not throw error after X number of times that we retry an error action

Describe the bug
One user tried adding an incorrect consumption role. The first 4-5 times an error appears in the screen explaining that it is an incorrect arn. After X number of times the API keeps returning the error but it is not shown in the UI.
How to Reproduce

Try to add a consumption role with an incorrect arn more than 4 times in a row

Expected behavior
Errors are always shown in the UI
Your project
No response
Screenshots
No response
OS
n/a
Python version
n/a
AWS data.all version
2.3
Additional context
No response

Adding to backlog, to prioritize and investigate the above behavior once have additional bandwidth


feat: add support for checking for multiple remotes

This improves on #25
Allows user to specify a list of remotes in order of most to least prioritized. cmp-git will try to retrieve git info (host, owner, repo) using this list. It currently only supports retrieving data from 1 remote though

That's a really nice idea! Great :3


Add datadog tags

Use the datadog tags to send telemetry to datadog.

Would that be enough @Sturgelose ?

Use the datadog tags to send telemetry to datadog.

Maybe I am mistaken but I didn't find this tags for kafka and it is already a service.

@devvesa add mqtt-transport too.


Add overview of geoscience stack

I've had a go at expanding the overview of the Python geoscience software stack.
The content I've added has been adapted from this page on the PyAOS website. Incorporating some of the PyAOS content into Pythia Foundations is something we've been discussing for a while.

Thanks, @brian-rose and @mgrover1. I've gone ahead and made all the changes you suggested.

Done :-)


swagger-ui src cleanup

@banders do we need the full repo of swagger-ui, I thought only dist is required.

Files removed.  Pull request is here.


Publish latest 1.3.2 version to Maven Central

Currently latest version in Maven Central is <IP_ADDRESS>
https://search.maven.org/artifact/net.steppschuh.markdowngenerator/markdowngenerator
Could you please publish the 0.3.2 to Maven Central as well

Current and feature releases won't be available through Maven Central. You can get 1.3.2 from Bintray or JitPack instead.

Can I know the reason why the default maven repo is not supported any more?

Because publishing to Bintray and JitPack is much more convenient for me and I'm using this model in all my open-source libraries.

Excuse my integrity, but you're making an open source library not only for yourself, I believe. It's probably worth thinking about other people convenience if your goal is the lib's popularity.
Maven Central is a default repository for Java dependencies, and adding an additional repository just for a single utility looks odd and prevents the lib's popularity.
What do you think about it?

you're making an open source library not only for yourself

I do, in fact, make libraries for myself. I open source them to provide value for other developers as well, in case they find it useful. Becoming popular is not one of my goals.

It's probably worth thinking about other people convenience

I feel like the effort it takes to add the Bintray or JitPack repository is nothing compared to the effort it takes to publishing artifacts to Maven Central. Speaking from experience, as someone who has done both.

Maven Central is a default repository for Java dependencies

Maven Central is a legacy relic of the past. The default is jcenter, the Java repository in Bintray, for various reasons. The switch has been made more than 5 years ago, and IMO there's absolutely no reason left to still use Maven Central.

Okay, I got your point. Thanks for detailed explanation! :)


Duplicate Programs in one Playspace from another

From #8:

We should have one playspace that contains all programs, one "vetted" space with templates, and then infinite others.
We'll need a way for spaces to reach across each other, e.g., when in summer-codesign-2023, we should be able to pull scripts from approved-templates.

It'd be nice to have a good way to see programs in other spaces without necessarily leaving the one you're in.
The do-no-further-development "simple" implementation here I believe, is:

Create new Program in Playspace 2.
Navigate to Playspace 1.
Filter/Search for Program you want from Playspace 1.
Copy entire Program
Navigate to Playspace 2
Paste entire program
Modify as desired

If Programs are backed up to Github, then you could also copy-paste from the hardcoded examples in the repo.
Maybe this is enough, but there are a few "luxury" features we could implement:

[simple or already in place?] Editor opens on last opened Program when switching Playspaces
Create another interface component that lets you preview another Playspace and duplicate a Program into current Playspace
Enable side-by-side editor (which I believe Monaco Editor supports, at least in the newer versions) where the two editors can exist in two different playspaces.

This was completed in another issue with changes to the Add New Program button.


Notification payload in the API

In GcmRequest I can only see support for data payload, how about the notification payload as described in https://developers.google.com/cloud-messaging/server-ref#notification-payload-support document? This is not really critical for me, just curious because Google seems to have updated their documentation quite a bit and added iOS support too.

https://github.com/phonedeck/gcm4j/pull/8 added the required fields. Should be available in Maven Central in a couple of hours.


STAYFIT - "Targetare" section is missing

ENVIRONMENT: production
URL: https://scrapers.peviitor.ro/
Browser: Mozilla Firefox
Device: PC
OS: Ubuntu 22.04.3 LTS
STEPS TO REPRODUCE:
Open the URL in the browser
Run scraper for "Stayfit" Company
Go to logo in the upper part of the page
Check for "Targetare" button

EXPECTED RESULTS:
Find Targetare section which opens  relevant information on the company.
ACTUAL RESULTS:
"Targetare" section is not displayed.

Fixed

Retested. Now "Targetare " link is present.


Getting different results almost every time I run my code despite fixing the random seed

I wonder, wouldn't fixing the random seed should lead to get the same exact solution every time? Basically every time I'm trying to fit the GP with the same exact data points, the optimization does not necessarily get me the same hyperparameters. For instance, the optimization might say lengthscale is 1.0034057019672782 at one point and 1.0034057019688161 another time, despite fixing numpy's random seed! This is a very annoying thing cause this is making it impossible for me to reproduce my results. Is there a general solution to resolve this issue?
Note that I'm also constraining my hyperparameters as follow:
Matern32 = GPy.kern.Matern32(input_dim=4, ARD=True)
Matern32.lengthscale.constrain_bounded(1e-8, 12.0, warning=False)
Matern32.variance.constrain_bounded(1e-1, 100.0, warning=False)

And then initialize GP as follow:
GPy.models.GPRegression(x, y, normalizer=True, noise_var=1e-4, kernel=Matern32)

@Amir-Arsalan I didn't have time to go into the detail of GPy, but managed to get reproducible results by fixing the random seed with the following code each time I run the training procedure:
"""
import random
import numpy as np
np.random.seed(12345)
random.seed(12345)
"""
I can't remember which of these worked, but please experiment and let us know.


integers C tutorial

Populate C file with a tutorial and challenge.

Can I please be assigned to this issue?

@ruandias You're assigned now. I noticed you requested to be assigned to several issues but please submit a PR for this issue first before I can assign you to another, thanks!


Issue in flattened upper triangle of coexpression matrix

Hello, I am a student and currently starting a scRNAseq project that includes Trajectorama for an analysis. I used a subsampled data of 3000 cells using sc.pp.subsample from a 3-time points dataset as my input for X (adata_red.X) and used adata_red.obs['sample'] as my 'studies' variables. For the analysis, I used the provided basic API, just made a slight change in this part:
X_coexpr = np.concatenate([
    Xs_coexpr_i[triu_idx].flatten() for Xs_coexpr_i in Xs_coexpr
])

However, I may have a problem with the shape of X_coexpr after concatenating of csr_matrix, which creates an object as stated below:
<1x558414780 sparse matrix of type '<class 'numpy.float64'>'
	with 152874082 stored elements in Compressed Sparse Row format>

and thus when I run into the Scanpy it has the error because n_comps = 0 and can't create the KNN-graph. Can you please help me to tackle this error? Thank you!

There might be a problem with trying to np.concatenate sparse matrices? Could you try scipy.sparse.vstack instead?

I have tried the scipy.sparse.vstack but it showed an error message of ValueError: blocks must be 2-D. Instead, I tried using np.vstack, but the resulted X_coexpr matrix at the end is
<4x139603695 sparse matrix of type '<class 'numpy.float64'>' 	with 152874082 stored elements in Compressed Sparse Row format>
and when I generated the plot in Scanpy the resulted plot becomes funny. My nest question is, what is the expected result/matrix of the concatenated and the end matrix before entered into theAnnData? Thank you!

The desired output is a # matrices by coexpression dimension matrix. I'll close the issue since it doesn't seem to be a bug with Trajectorama, but happy to answer more questions.
Also, perhaps you might try some other analyses before Trajectorama?  For trajectory methods, there's PAGA a number of others. Scanpy (http://scanpy.readthedocs.io/) has good tutorials on basic single-cell analysis.

The data I have is coming with 3 different time points with the total number of samples = ten. For my analysis, my supervisor recommended me to use Trajectorama without prior batch correction (Scanorama, ComBat, etc.) within each time point to preserve biological variance I think and aimed to make the trajectory out of the 3 different time points that come from 3 different studies. As my input, I used the adata.X matrice with 3000 cells (subsampled) and used the 'sample' annotation for my 'studies' input. My output (Xs_coexpr) is a list that consists of 4 arrays with shape 16.709 x 16.709 (same number as n_vars of my AnnData object). Is this as expected from Trajectorama? Thanks a lot!

I see, makes sense. That output is expected, but I'd highly recommend two things: (1) give the algorithm all the cells and (2) restrict the analysis to the top ~1-2k highly variable genes. Also, there's currently a min_cluster_samples parameter that filters out clusters below 500 cells, which is probably removing all the clusters in your data. So maybe set that parameter to something lower like 50 or 100. The Xs_coexpr should have the number of rows equal to the number of coexpression matrices and the number columns equal to the number of genes squared.
Also, if you want a Trajectory with a single-cell output, then there are other standard trajectory tools to try like PAGA, etc. But these might result in discontinuity across timepoints.


[question] admin.createTopics Timeout

The timeout setting has no effect when creating a topic:
my code:
  await admin.createTopics({
    topics: [{ topic }],
    waitForLeaders: true,
   timeout: 1000000
  })

It will fail after waiting for about 10 seconds:
[KafkaJSTimeout: Timed out while waiting for topic leaders
    at Timeout._onTimeout (/xxxxx/node_modules/kafkajs/src/utils/waitFor.js:41:23)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7) {
  name: 'KafkaJSTimeout',
  retriable: false,
  helpUrl: undefined
}
](url)

I checked the kafkajs code:
(https://github.com/tulios/kafkajs/blob/master/src/admin/index.js#L108-L121), in L118, timeout is not passed as maxWait parameter.
Is this expected?

That is indeed a bug.


Disk_info not working correctly on Snow Leopard

The script disk_info in the disk_report module does not correctly gather disk data on Mac OS X 10.6 Snow Leopard, as the output of
diskutil list -plist
differs from later versions of diskutil on newer OS X versions.
I have made some changes in my disk_info script locally to get correct information, but as I am no Python-expert, I imagine it can be handled more elegantly. Basically I have created an extra function (or definition) to handle diskutil on Snow Leopard, so the output mimics the one created on Lion or later versions.
def _DictFromDiskutilList_SnowLeopard():
    """as Snow Leopard delivers a different output from diskutil
    list we will mimic the output from newer versions of OS X"""
    Partitions = _DictFromDiskutilList()["AllDisks"]
    DiskArray = []

    for Partition in Partitions:
        DiskArray.append(_DictFromDiskutilInfo(Partition))

    plist = [{'Content':'Guid', 'Partitions':DiskArray,}]
    plistfile = '%s/cache/SL_tmpdisk.plist' % os.path.dirname(os.path.realpath(__file__))
    plistlib.writePlist(plist, plistfile)
    return plistlib.readPlist(plistfile)

I have then altered the AllDisksAndPartitions definition to check for os-version and then run either the Snow Leopard version of the function or the standard function.
I've attached my full disk_info script for comparison.
disk_info.zip

Ok, nice solution. Do you want to file a Pull Request for this?

Thanks - I've created a Pull Request. :)

Fixed with 733e224d0d3110b704d736c89dd3c4490b5336c9


Errors occurred  when I try to build it

The error messages generated by cmake are below.
[build] FAILED: quic/server/CMakeFiles/mvfst_server.dir/QuicServer.cpp.o  [build] /usr/local/bin/clang++  -DFMT_LOCALE -I../ -g   -Wall -Wextra -Woverloaded-virtual -Wnon-virtual-dtor -std=c++17 -MD -MT quic/server/CMakeFiles/mvfst_server.dir/QuicServer.cpp.o -MF quic/server/CMakeFiles/mvfst_server.dir/QuicServer.cpp.o.d -o quic/server/CMakeFiles/mvfst_server.dir/QuicServer.cpp.o -c ../quic/server/QuicServer.cpp [build] ../quic/server/QuicServer.cpp:25:1: error: C++ requires a type specifier for all declarations [build] DEFINE_bool( [build] ^ [build] ../quic/server/QuicServer.cpp:26:5: error: use of undeclared identifier 'qs_io_uring_use_async_recv' [build]     qs_io_uring_use_async_recv, [build]     ^ [build] ../quic/server/QuicServer.cpp:173:12: warning: lambda capture 'workerEvb' is not used [-Wunused-lambda-capture] [build]            workerEvb, [build] ~~~~~~~~~~~^~~~~~~~~ [build] ../quic/server/QuicServer.cpp:199:33: error: use of undeclared identifier 'FLAGS_qs_io_uring_use_async_recv' [build]       this->shared_from_this(), FLAGS_qs_io_uring_use_async_recv); [build]                                 ^ [build] 1 warning and 3 errors generated.
The gflags version I used is v2.2.2.

It seems to be an include error, because the building succeeded after I copied all the includes of quic/tools/tperf/tperf.cpp to the file where errors had occurred.

Or rather, adding an include #include <folly/portability/GFlags.h>  also solved this problem.


Add blog section

👷 Deploy Preview for semanticclimate processing.

Name
Link

🔨 Latest commit
db2aa05e123c17ae1d0292e2e001cb841a1bbde6

🔍 Latest deploy log
https://app.netlify.com/sites/semanticclimate/deploys/63514d7589bbb000085c2695


In 2d, why is Triangular not implementing Shape?

I think I don't understand what the use of Triangular is since it doesn't implements the trait Shape. After reading #202, it feels that the right shape to use is ConvexPolygon, but in that case, I don't see why Triangular exists at all (and I'm sure there is a reason). I think that the documentation could be more explicit.

Hi!
Yes, Triangle does not implements the trait Shape because that would be redundant with ConvexPolygon.
Yet, triangles exist because they are used by triangle-meshes to simply their collision detection. So basically, they are not expected to be used directly by the end-user, but are useful for algorithmic reasons.
I agree the documentation should be more explicit. Or event better: you should consider putting in the shape module only geometries actually implementing the Shape trait.

I also have the same question for Compound. I guess, it's the same answer?

Shape is implemented for Compound.

I don't know what I've done, I guess I did a syntax error and was too tired, so I just iterated over my ConvexPolgon manually.


[feature] adding functions to visualise and export the map data

Add some helper functions

[ ] functions for exporting the clipped map data with any augmentations into shapefiles.
[x] Plot shapefiles using the colour maps that has been extracted
[ ] draw plot of stratigraphic column showing relative thicknesses

This function exists for the plotting of clipped maps with the colourmap.
proj.draw_geology_map()
Also there is an optional parameter overlay="" which can be used to overlay the contacts, basal_contacts, orientations or faults
There is not a plotter of the stratigraphic column with thicknesses but you can get the strat column list via:
proj.stratigraphic_column.column

@RoyThomsonMonash thanks I hadn't seen those functions, its what I needed.
I will add a similar one for the stratigraphic column

There is a function in map_data that exports the raw map data (save_raw_map_data), this could be modified to use self.data instead of self.raw_data if you want the current modifications (clipping and filters).  Using a flag should be a quick fix, though you might need to check that the self.data variable is valid before trying to export it.
You can also export the current state of the geology map with its modifications (as a raster map) to a geoTiff with the proj.save_geotiff_raster function.
Included in the function parameters is a way to set the projection of the geoTiff so you can use it to create a map with a web specific projection such as EPSG 3857 for a google maps or open street maps overlay.


Client side implementation

I'm eagerly awaiting a Rust-native implementation of an ssh client that includes sftp. This is because I offer a remote editing experience through distant and distant.nvim respectively, which can be done both through a custom server written in Rust and ssh.
The two existing ssh client library wrappers, ssh2 and libssh, are both error-prone and add extra complexity to support.
Just wanted to drop a line that I'm watching the work being done here and am hopeful that I'll be able to adopt russh and this 3rd party addon to for sftp support in the near future!

I will be glad if you share your experience with other libraries, it will help me to think over a better solution during development.

Sure. The library I use today is wezterm-ssh written by an old colleague of mine. It acts as a wrapper around both ssh2 and libssh client libraries, themselves wrappers around the associated sys bindings to the C ssh client libraries.
For using ssh with sftp, the entrypoint starts from crating an ssh session and then creating a new SFTP channel via Session::sftp. I actually wrote the original code for the SFTP wrapper for wezterm-ssh, and the API itself is okay, but the client libraries themselves are a bit buggy and poor-performing, so I'm hoping that a Rust-native implementation will eventually reach better stability.
The SFTP API
The high-level SFTP channel API can be found here: https://docs.rs/wezterm-ssh/0.4.0/wezterm_ssh/struct.Sftp.html. Because this library was abstracting across two different client implementations, you find wrapper implementations like wezterm_ssh::SftpWrap to invoke the underlying library method, but you shouldn't need to do this yourself since you'd be using russh and your own implementation on top.
In a nutshell, it provides a flat collection of async functions to perform common filesystem actions. Many of these mirror those you'd find in the std::fs module:

open_with_mode - returns an ssh File (not exported out of the crate) representing a remote file. Uses OpenOptions to specify how you're opening file (reading/writing, binary, etc). This is the core method used for working with files (everything else tends to use this underneath).
open - same as open_with_mode, but just for reading a file. Equivalent to std::fs::File::open.
create - same as open_with_mode, but just for writing a file. Equivalent to std::fs::File::create.
open_dir - like opening a pointer to a file, but for a directory to read the entries one by one. In a better implementation, this would actually be an iterator similar to std::fs::ReadDir.
create_dir - makes a remote directory and supports being provided the mode that you'd use on a Unix system (e.g. the octal of permissions). The mode flags were abstracted using bitflags into wezterm_ssh::FilePermissions with a method to_unix_mode that you could call to convert it into an u32. Redoing this, I'd just make the high-level abstraction take the bitflag instance and convert behind the scenes, especially since this abstraction already supported being created from a u32 representing the bits.
remove_dir - deletes a directory. I can't remember if ssh's protocol for SFTP supports anything more complex. Mirrors std::fs::remove_dir.
metadata - retrieves metadata for a file/directory. SFTP supports this version and another one that I named symlink_metadata. The difference is that this version returns information about the file pointed to by the symlink, so it has to resolve it and report the kind (directory/file), etc. Mirrors std::fs::metadata.
symlink_metadata - same as metadata, but not resolving symlinks. Mirrors std::fs::symlink_metadata.
set_metadata - sets the metadata for a file/directory. Alongside the metadata method, this uses an abstraction struct wezterm_ssh::Metadata similar to std::fs::Metadata (but a bit more limited).
symlink - creates a symlink. Mirror of std::os::unix::fs::symlink.
read_link - evaluates a symlink's path to the real directory/file. Mirror of std::fs::read_link.
canonicalize - evaluates the real path. Mirror of std::fs::canonicalize.
rename - renames a file/directory. The SFTP libraries we used provided some additional options like whether or not to fail or overwrite an existing path, which were abstracted into the struct wezterm_ssh::RenameOptions with a default that overwrites the existing path. Kind of mirrors std::fs::rename, but with more options.
remove_file - removes the file. Mirror of std::fs::remove_file.

Abstractions
When I first wrote the sftp abstraction, I had exported types that represented high-level wrappers across API usage. Those specifically were:

wezterm_ssh::sftp::Dir - provides a singular method, read_dir, that reads the next entry from in the directory. You call this multiple times until you get an error, IIRC. In a better implementation, this would actually be an iterator similar to std::fs::ReadDir.
wezterm_ssh::sftp::File - provides methods to read and write the metadata of a file (specifically permissions) as well as implements the async traits for reading and writing to the file itself so you can use it as you would any other IO implementation. It's equivalent to tokio::fs::File or std::fs::File. You can find examples of it being used in the end-to-end tests.

@chipsenkbeil I researched this issue and the current implementation of serialization and deserialization is not very good for extending the code with the client side, so I will do that first and then add a small client example. I'll provide the basis for the client side soon, hopefully you can help expand the client side in the future

@AspectUnk great! Keep me posted on the updates.

@AspectUnk any update here? Anything else I can contribute to help?

@chipsenkbeil sorry, i didn't have much time before this. i'll try to provide a new beta version for feedback one of these days

I'm interested in adding client support, a few questions.

Do you have any un-pushed work I would be overwritting
Is the idea for the handles that they implement nothing by default or is that just a side-effect of the project being in early development
Would you consider using tracing over log
If you are interested in having functional default implementations do you want the server to be multi-threaded / multi-tasked

@oh-yes-0-fps Welcome

Yes, at the moment I am actively working on the client side and most of the work is not published at the moment, only reworked packets are published now.
Initially the goal of the project was to provide raw work with the protocol, but now I see that the standard implementation will also be useful. So yes, now it is a consequence of early development
No problem
Definitely yes, it will become part of the standard implementation because for many projects this may be a bottleneck, but it will be after the client part

If you have any suggestions that require a longer discussion, please create a new issue. Thank you

I opened a PR https://github.com/AspectUnk/russh-sftp/pull/5 with an almost completely ready raw api and partly a ready high level api.
@chipsenkbeil I apologize again for the long inactivity, I'll try not to repeat this. For the most part, I just have to implement the high level api for folders and files, while I'm doing this, could you please evaluate the current implementation. I tried to leave the high level api exactly the same as in your crate to make it easier for you to integrate. After looking through your library, I had a question. Is its high functionality superficial and maybe it should be expanded?

@chipsenkbeil I apologize again for the long inactivity, I'll try not to repeat this. For the most part, I just have to implement the high level api for folders and files, while I'm doing this, could you please evaluate the current implementation. I tried to leave the high level api exactly the same as in your crate to make it easier for you to integrate.

Thanks for this and no worries about inactivity! You're doing this in your spare time and for free, so I'm appreciative when you take my needs into consideration. I skimmed through it earlier, and will try to take a deeper look and leave comments in the next week or so.

After looking through your crate, I had a question. Is its high functionality superficial and maybe it should be expanded?

Sorry, I don't understand the question. Can you rephrase it? Are you asking if the high level API should be expanded to include other features?

Sorry, I don't understand the question. Can you rephrase it? Are you asking if the high level API should be expanded to include other features?

Yes, I think it can be significantly expanded. Btw I did not see an AsyncSeek implementation for a file in your crate. Why is this so?
Now I have already implemented read_dir by analogy with std::fs::read_dir, file and their async i/o implementation (btw AsyncSeek too), and all other methods from your crate. An example of using the client can be found here. I hope this is what you wanted 😅
A couple of points:

You said about wezterm_ssh::RenameOptions, is it that important? It is not in the current version of the protocol, but if it is important, it could be expanded to a new version
Currently, the flush or fsync method is not implemented. Their implementation implies support for the<EMAIL_ADDRESS>extension. Probably only this and<EMAIL_ADDRESS>is stopping us from beta. I would be glad if you could contribute to this, if not then let me know and I will try to find the time but a little later. If you have such an opportunity, let me know and after that I can write docs for the client part and release it as beta.

Btw I did not see an AsyncSeek implementation for a file in your crate. Why is this so?

No reason. Wasn't needed for the minimum implementation at the time. So if you've already implemented it, that's great!

I hope this is what you wanted 😅

You've done so much! I can take a stab and trying to use it as a replacement for wezterm-ssh to see how it works.

You said about wezterm_ssh::RenameOptions, is it that important? It is not in the current version of the protocol, but if it is important, it could be expanded to a new version

I don't use the options in my downstream library powering distant. It was just created to expose some options you could provide during a rename. The libssh backend doesn't even support the rename options, so I'd say they could just be ignored.
    pub fn rename(
        &self,
        src: &Utf8Path,
        dest: &Utf8Path,
        #[cfg_attr(not(feature = "ssh2"), allow(unused_variables))] opts: RenameOptions,
    ) -> SftpChannelResult<()> {
        match self {
            #[cfg(feature = "ssh2")]
            Self::Ssh2(sftp) => {
                Ok(sftp.rename(src.as_std_path(), dest.as_std_path(), Some(opts.into()))?)
            }

            #[cfg(feature = "libssh-rs")]
            Self::LibSsh(sftp) => Ok(sftp.rename(src.as_str(), dest.as_str())?),
        }
    }

Currently, the flush or fsync method is not implemented. Their implementation implies support for the<EMAIL_ADDRESS>extension. Probably only this and<EMAIL_ADDRESS>is stopping us from beta. I would be glad if you could contribute to this, if not then let me know and I will try to find the time but a little later. If you have such an opportunity, let me know and after that I can write docs for the client part and release it as beta.

It was just part of me exposing a friendly wrapper on top of the ssh libraries. I don't see it being used in my downstream library within distant, so if it simplifies things I'd say leave it out.
I'm not familiar with extensions, so what does<EMAIL_ADDRESS>provide?

I'm not familiar with extensions, so what does<EMAIL_ADDRESS>provide?

It provides the client with information about server limits such as the max open of handles, the max number of bytes to read/write per packet, and the max length of the packet itself. If the client violates these limits, the server may terminate the connection. So this is a pretty important part

I'm not familiar with extensions, so what does<EMAIL_ADDRESS>provide?

It provides the client with information about server limits such as the max open of handles, the max number of bytes to read/write per packet, and the max length of the packet itself. If the client violates these limits, the server may terminate the connection. So this is a pretty important part

How common is this extension? If a server doesn't implement the extension, can you still use all of the other features of sftp if the server supports that subsystem?

How common is this extension? If a server doesn't implement the extension, can you still use all of the other features of sftp if the server supports that subsystem?

Almost every modern server has it. And no, due to its absence the protocol is not limited. In any case, you don't have to worry about this, I have already implemented support for<EMAIL_ADDRESS>and<EMAIL_ADDRESS>now the flush and sync_all (old fsync, I renamed it according to std::fs::File::sync_all) methods are available. On your abstraction (SftpSession) you don't have to worry about limits because the async i/o implementation splits packets depending on the method used.
Now I can be sure that this is a completely ready sftp client with advanced abstraction and methods, but there may still be errors or flaw so I hope you can test it. Btw, I saw your issue, if you need help with integration let me know 😼

Almost every modern server has it. And no, due to its absence the protocol is not limited. In any case, you don't have to worry about this, I have already implemented support for<EMAIL_ADDRESS>and<EMAIL_ADDRESS>now the flush and sync_all (old fsync, I renamed it according to std::fs::File::sync_all) methods are available. On your abstraction (SftpSession) you don't have to worry about limits because the async i/o implementation splits packets depending on the method used.

Fantastic!

Now I can be sure that this is a completely ready sftp client with advanced abstraction and methods, but there may still be errors or flaw so I hope you can test it. Btw, I saw your https://github.com/chipsenkbeil/distant/issues/193, if you need help with integration let me know 😼

Yep! Was planning to use russh and was figuring out if I needed to implement the sftp protocol myself. Since you've done all of the work now for me to try, I'll be giving your implementation a go instead 😄
So once you've published a beta, I can give it a go to try to swap my usage of wezterm-ssh for russh and russh-sftp!

It's now published as 2.0.0-beta.1

It's now published as 2.0.0-beta.1

Woo hoo! I'm going to give it a try to implement in a branch I'd started to migrate over to russh. Will share my findings here within the next couple of days.

@chipsenkbeil I did not notice one flaw that made it into the published version. New 2.0.0-beta.2 was published. Looking forward to your feedback! 😄

@chipsenkbeil I did not notice one flaw that made it into the published version. New 2.0.0-beta.2 was published. Looking forward to your feedback! 😄

Got it. I've updated my branch with that beta version. Didn't have time this weekend to work on it, but hoping to tackle this coming weekend. At least within the next couple of weeks! The harder part for me is the general switch to russh and authentication. I'm hoping your work for sftp will integrate more easily from all of the hard work you put in 😄


WebView, the only limitation in large application

In furtherance of issue #217 it's amazing how well this magnificent component has worked on a large, involved application with complicated navigation (using our own nav stack manager), etc.  The one limitation noted is that WebView isn't compatible, even in a minimalist test, with  a button on the same page.  Running a full build of Ooui source in debug mode we  note that WebView leaves the message pump not running.  Exit from app.use is premature with WebView present for reasons we haven't yet identified despite seeming lack of differences leaving ExecuteResultAsync.  It does not appear to be a race condition.  It would be good to resolve this issue since we believe that would make Ooui sufficiently ready for general usage in major applications more involved than the various test and demo apps demonstrating effective handling of individual controls.  Thanks for a wonderful contribution.

request to ooui.js path is not initiated, nor subsequently to websocketpath ooui.ws, as they are when webview is not on page.

The WebView issues are not side effects of the vagaries of our own code.  A simple environment to demo and test the dead buttons is had by simply building the sample jamesmontemagno/MyFirstOouiApp and then adding this line to its page:

The button on this page becomes unresponsive with no message pump active, and the middleware pipeline never requesting ooui.js nor ooui.ws.

The line to add:

        <WebView Source="TESTURL"></WebView>

While the problem originates from having among a page's children any active element such as a button plus an (offending) WebView, the unresponsiveness of these elements results not initially but from the outside wherein e.g. MVC does not do page requests on ooui.js or the ooui socket message file to establish the message pump.  We can imagine a spoofing kludge/fix as the remaining http response comes in, but this would not be correct.  To solve the problem it seems one needs to run with the debugging versions of open source mvc, xamarin forms, etc., the controllling components outside ooui itself that fail to generate the proper http requests.  We've spent time and tried to find the problem but have decided a quality solution by Frank is required to maintain the extremely high code quality we've observed while stepping through ooui in the debugger.  It's disappointing we can't forge ahead since we have so much of a very large application (a cross platform code generator operating off of only declarative xml) running and have gotten so close.  Hopefully, Frank might, when he can, address this one serious limitation in all the code we ported into the ooui magnificent and amazing environment.  In the meantime, anticipating that we can eventually be successful, we are grateful for all that has been achieved.


Fix table selection

Pull Request Test Coverage Report for Build 2335

26 of 26 (100.0%)  changed or added relevant lines in 4 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.5%) to 78.903%

Totals

Change from base Build 2328:
0.5%

Covered Lines:
2216

Relevant Lines:
2710

💛  - Coveralls

fix: #694


Docs whatsnew add dropdowns to the template

🚀 Pull Request
Description
This PR adds the sphinx-panels template dropdown to the latest.rst and the latest.rst.template.

Consult Iris pull request check list

Hey @bjlittle .  Happy to approve and merge this once the minor conflict is resolved.

Hey @bjlittle .  Happy to approve and merge this once the minor conflict is resolved.


Material gallery crashes when you press the drop-down button

(A red screen of death crash, not an engine crash.)

Yeah, I broke this with RepaintBoundary.  The problem is that dropdown list uses Positioned to position itself instead of using the OverlayPosition.

Do you mean that _DropDownRoute should provide an override of:
  ModalPosition get position => null; // from ModalRoute<T>

Yes, exactly.

Closing as duplicate of #630


Update bash script snippet to make it work on unix devices

Change looks good to me. What do you mean by making it work on unix devices? I use Linux and all the shells I use allow relative paths to be executed this way. Happy to merge this anyway.

Oh terribly sorry. I meant unix based devices. i.e macos and linux. Cheers! :)

I knew what you meant, I just don't know what shell ./scripts/dev-rome would work but scripts/dev-rome wouldn't. Is this an error you actually ran into?

Oh you're right. It worked as you've mentioned. TIL. I mistakenly assumed it wouldn't work because I rely on tab completion  to run binaries in the directory I'm in. Do you want to leave it as such?


Interpreting de_coef and dv_coef

Hello,
Thank you for developing this awesome method! I am curious about the meaning of de_coef and dv_coef. Are they simply fold changes? Along with having the p-values, knowing what these coefficients mean would help me better contextualize the significance of a gene.
Best,
Salwan

Hi!
In the simplest case of binary comparisons, they are ln(FC) in mean and variability respectively. For more complicated use cases involving replicates and covariates, they are not exactly the fold change between the two groups, but can still be interpreted in the same context.
I do have plans to convert them from ln(FC) to log2(FC) to be more in line other methods, and have clearer labels.
Thank you for your interest!
Best,
Min Cheol

Great, thank you!


Web share target support

Extended the webManifest interface to support web share target completely. Moreover, added escapeJsonString method for formatting the shareTarget JSON on build.gradle.


Add TypedTextAttributes

Add TypedTextAttributes.
This is library creating TextAttributes with Type-Safety.
Project URL
https://github.com/muukii/TypedTextAttributes
Category
Text
Description
Why it should be included to awesome-ios (optional)
Checklist

[-] Only one project/change is in this pull request
[ ] Has unit tests, integration tests or UI tests
[ ] Addition in chronological order (bottom of category)
[-] Supports iOS 9 / tvOS 10 or later
[-] Supports Swift 4 or later
[-] Has a commit from less than 2 years ago
[-] Has a clear README in English

          1 Warning

:warning:
Found 1 link issue, a project collaborator will take care of these, thanks :)

Link issue by awesome_bot

Line
Status
Link

1570
301
https://github.com/facebook/facebook-ios-sdk redirects tohttps://github.com/facebook/facebook-objc-sdk

  Generated by :no_entry_sign: Danger

@muukii We cannot merge your PR yet until you write some tests for your lib. Feel free to open PR once it is ready.


net: test fails when there's no network

Turn off your network (ifconfig eth0 down, whatever else makes sense).

Run all.bash.

--- FAIL: TestIPv4MulticastListener (0.01 seconds)
	multicast_test.go:55: First ListenMulticastUDP on <nil> failed: listen udp <IP_ADDRESS>: setsockopt: no such device
FAIL
FAIL	net	2.376s

TestIPv6 also fails.

all.bash should work even without the presence of the network, even if it just skips
these tests.

I think go1.6 and above can handle this case. Closing.


ESP32 callback has stopped working

I have had a few issues related to this library due to bugs in ESP32 Arduino. At one point connection between an ESP32 and a secure MQTT broker broke completely, I had to revert to ESP32 Arduino 1.0.6 for this to resolve. The project I am talking about is an IoT light that had been working since last year. Now it is connecting to the broker again but the callback is never triggered. I have checked the broker logs, the connection is good, the subscription is allowed and started, and data sent to the device is being sent successfully, The problem is wirh ESP32 Arduino and Pubsubclient.
To get things working again after the issue with EPS32 Arduino I have:
Board: 1.0.6
Pubsubclient 2.8.0
I have tried other combinations but nothing makes  the callback be executed anymore, the fully working code was uploaded and left running around Dec last year.
#include <ArduinoJson.h>
#include <SPIFFS.h>

#include <WiFi.h>
#include <PubSubClient.h>
#include <WiFiClientSecure.h>

struct Config {
  String ssid;
  String pass;
  String mServer;
  int mPort;
  String lid;
  String zid;
  String did;
  char dn[50];
  char un[50];
  char pw[50];
};

char willTopic[150];
char charBuf[250];

String tempString = "";
String result = "";

const int RelayPin = 23;
const int PushButton = 15;
const int LED = 2;
String state = "Off";

const unsigned long minutes = 1 * 60 * 1000UL;
static unsigned long lastSampleTime = 0 - minutes;

Config config;
WiFiClientSecure espClient;
PubSubClient client(espClient);

void configs(Config &config)
{
  if (!SPIFFS.begin())
  {
    Serial.println(F("Failed to mount SPIFFS"));
  }
  else
  {
    File file = SPIFFS.open("/config.json", FILE_READ);
    if (!file)
    {
      return;
    }
    else
    {
      StaticJsonDocument<1048> doc;
      DeserializationError error = deserializeJson(doc, file);
      if (error)
      {
        Serial.println(error.c_str());
      }
      else
      {
        config.ssid = doc["wifi"]["ssid"].as<String>();
        config.pass = doc["wifi"]["key"].as<String>();
        config.mServer = doc["iotJumpWay"]["host"].as<String>();
        config.mPort = doc["iotJumpWay"]["port"];
        config.lid = doc["iotJumpWay"]["lid"].as<String>();
        config.zid = doc["iotJumpWay"]["zid"].as<String>();
        config.did = doc["iotJumpWay"]["did"].as<String>();
        strcpy(config.dn, doc["iotJumpWay"]["dn"]);
        strcpy(config.un, doc["iotJumpWay"]["un"]);
        strcpy(config.pw, doc["iotJumpWay"]["pw"]);
      }
    }
    file.close();
  }
}

void startWifi() {
  delay(10);
  WiFi.mode(WIFI_STA);
  WiFi.begin(config.ssid.c_str(), config.pass.c_str());
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.print(F(""));
  Serial.print(F("WiFi connected: "));
  Serial.println(WiFi.localIP());
}

void subscribeToDeviceCommands(){
  String commandTopic = config.lid+"/Devices/"+config.zid+"/"+config.did+"/Commands";
  commandTopic.toCharArray(charBuf, 250);
  client.subscribe(charBuf);
  Serial.println("Susbcribeed to " + commandTopic);
}
void callback(char* topic, byte* payload, unsigned int length) {
  String readString = "";
  for (int i = 0; i < length; i++) {
    readString += (char)payload[i];
  }

  StaticJsonDocument<250> doc;
  DeserializationError error = deserializeJson(doc, readString);
  if (error)
  {
    Serial.println(error.c_str());
  }
  else
  {
    String Name = doc["Name"];
    String Type = doc["Type"];
    String Value = doc["Value"];
    Serial.println(F("Received command"));
    if(doc["Name"]=="Light"){
      if(doc["Type"]=="Switch"){
        if(doc["Value"]=="On"){
          if(state == "Off"){
            state = "On";
            digitalWrite(RelayPin, HIGH);
            Serial.println(F("Light turned on"));
            result = "OK";
          } else {
            result = "KO";
          }
        }
        else if(doc["Value"]=="Off"){
          if(state == "Off"){
            result = "KO";
          } else {
            state = "Off";
            digitalWrite(RelayPin, LOW);
            Serial.println(F("Light turned off"));
            result = "OK";
          }
        }
      }
      tempString = "{\"Name\":\"" + Name + "\",\"Type\":\"" + Type + "\",\"Value\":\"" + Value + "\",\"Status\":\"" + result + "\",\"Message\":\"" + Name + " " + Value + "\"}";
      char stateBuffer[100];
      tempString.toCharArray(stateBuffer, 100);
      publish("State", stateBuffer);
    }
  }
}

void publish(String channel, const char* data){
  String topic = config.lid+"/Devices/"+config.zid+"/"+config.did+"/"+channel;
  topic.toCharArray(charBuf, 250);
  client.publish(charBuf, data);
}

void reconnect() {
  while (!client.connected()) {
    String willTopicString = config.lid+"/Devices/"+config.zid+"/"+config.did+"/Status";
    willTopicString.toCharArray(willTopic, 150);
    if (client.connect(config.dn, config.un, config.pw, willTopic, 0, 0, "OFFLINE")) {
      Serial.println(F("Connected to HIAS!"));
      publish("Status","ONLINE");
      subscribeToDeviceCommands();
      digitalWrite(LED, HIGH);
    } else {
      digitalWrite(LED, LOW);
      Serial.print(F("Failed to connect to HIAS, rc="));
      Serial.println(client.state());
      Serial.println(F("."));
      delay(5000);
    }
  }
}

void sendState(){
    if(digitalRead(RelayPin)){
      state = "On";
    } else {
      state = "Off";
    }
    tempString = "{\"Name\":\"Light\",\"Type\":\"Switch\",\"Value\":\"" + state + "\",\"Message\":\"Light " + state + "\"}";
    char stateBuffer[100];
    tempString.toCharArray(stateBuffer, 100);
    publish("Actuators", stateBuffer);
}

void setup() {

  Serial.begin(9600);

  pinMode(RelayPin, OUTPUT);
  pinMode(LED, OUTPUT);
  pinMode(PushButton, INPUT);

  if(!SPIFFS.begin(true)){
    return;
  }

  configs(config);
  startWifi();
  client.setServer(config.mServer.c_str(), config.mPort);
  client.setCallback(callback);

}

void loop() {
  if (!client.connected()) {
    reconnect();
  }
  client.loop();

  if (digitalRead(PushButton) == HIGH)
  {
    if(state == "Off"){
      Serial.println(F("Turning on"));
      state = "On";
      digitalWrite(RelayPin, LOW);
      Serial.println(F("Light on"));
    } else {
      Serial.println(F("Turning off"));
      state = "Off";
      digitalWrite(RelayPin, HIGH);
      Serial.println(F("Light off"));
    }
    delay(500);
  }

  unsigned long now = millis();
  if (now - lastSampleTime >= minutes)
  {
    lastSampleTime += minutes;
    Serial.println(F("Sending state"));
    sendState();
  }
}

I found the same issue, revert ESP32 board back to v1.0.6 and the problem goes away.
I did find that compiling ESP32 board v2 uses more flash, I'm not so sure v2 is bug free.

@star297 I found the solution for this and forgot to update, I had to put a delay in the code, unfortunately this means the push switch is no longer working but I can send remote commands to it. I have to use 1.0.4 anyway because the current versions of ESP32 have messed up secure connections and I have been unable to make secure connections with anything higher than 1.0.4


NVIDIA CUDA drivers for WSL

Finding the Nvidia drivers off this page is difficult. Can a direct link be provided?
Download and install the [NVIDIA CUDA enabled driver for WSL](https://www.nvidia.com/download/index.aspx) to use with your existing CUDA ML workflows.
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 0fdfa117-e801-0df5-3c81-3151a97f431d
Version Independent ID: ee755d20-17c2-3d18-0c5c-b9ed31135218
Content: Enable NVIDIA CUDA on WSL 2
Content Source: docs/directml/gpu-cuda-in-wsl.md
Product: machine-learning
GitHub Login: @stevewhims
Microsoft Alias: stwhi

https://developer.nvidia.com/cuda-downloads?target_os=Windows&target_arch=x86_64&target_version=10&target_type=exe_local


Remove CanBeNA for &str

(I originally commented here: https://github.com/extendr/extendr/pull/477#issuecomment-1423452814)
I think the current implementation of CanBeNA for &str is broken. The intention of the following lines is that &[b'N', b'A'] is on a different address from the regular "NA" string, but I'm afraid this is not guaranteed.
https://github.com/extendr/extendr/blob/974cddc4ee5a4c3ab10e8bf85772b74c0a182f32/extendr-api/src/na.rs#L50-L59
For example, this fails on Rust Playground (while it doesn't on my local Windows).
https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=0cd54f21fd4e30e94203942ef385e846
I might be wrong, but, as I don't see any possible fix on this, I now think we should remove CanBeNA for &str.

Could we compare the pointer to the current R process's address of NA_character_ instead? I guess it's not surprising that doing this comparison inside Rust is implementation specific.

We can compare, but we cannot treat R_NaString (i.e., NA_character_) as a Rust string, because it's a C string.

I withdrew #484 for now as it turned out a bit complex than I expected, and it seems manually allocating the string works.
https://github.com/extendr/extendr/pull/477/files#diff-4c22ae4d92a14ac236bff533c4ed348f50e9d70a1984e6ec1b9b2ac0cd48fda0

I don't get this. Aren't we supposed to be checking against R's specific `NA_character_ address? How does allocating a new one ourselves help identify NA strings?

<&str>::na() needs to return &str while R_NaString is a SEXP. Are you suggesting to use R_CHAR(R_NaString)? If so, I tried it, but for some reason I couldn't make it work (got STATUS_ACCESS_VIOLATION error).

How does allocating a new one ourselves help identify NA strings?

We need a pointer that can be used as a sentinel value and is at the same time a valid &str. It seems this can be only achieved by manual allocation.

Aren't we supposed to be checking against R's specific NA_character_ address?

Sorry, I didn't answer to your question directly. In short, no. That's not how CanBeNA for &str works (and this trickiness is the very reason I wanted to get rid of this).

So it's just an internal (in Rust only) sentinel that we use to represent NAs?

Yes.

I tried it, but for some reason I couldn't make it work (got STATUS_ACCESS_VIOLATION error).

Specifically, I tried this.
lazy_static! {
    static ref EXTENDR_NA_STRING: &'static str = unsafe {
        let ptr = R_CHAR(R_NaString) as *const u8;

        let v: &[u8] = std::slice::from_raw_parts(ptr, Rf_xlength(R_NaString) as usize);

        std::str::from_utf8_unchecked(v)
    };
}

It seems I don't hit the error as long as I test it with  --test-threads=1. This probably means the C string underlying R_NaString can be freed while Rust side still needs it. I guess this should never happen when we use extendr from R sessions, but this does matter just because extendr can be used outside of R packages. That's probably why extendr needed the internal sentinel value. Nowadays I'm getting to find this kind of limitation really frustrating.

Let's close this for now.


bedtools intersect -c output adds an extra newline character to each line

I've been running bedtools intersect quite a bit as of late and noticed some peculiar things with its output. When outputting to terminal window:
bedtools intersect -nonamecheck -c -a A.bed -b B.bed

returns lines in the format of:
chromosome	start	stop	featureID	score	strand

Notably it is missing the count column at the end entirely.
When I > it to an output file I, instead, get what looks like:
chromosome	start	stop	featureID	score	strand
	count

The count is, strangely, located on the next line.
I can parse this output without too much difficulty, but it is strange that this behavior is seen with intersect but not other tools like window which outputs the -c option appropriately.
Also, it seems the documentation is incorrect on the output format, the intersect docs don't indicate that the featureID from A will end up in the output (to be clear, I like this, it just doesn't match the docs).
I haven't tried running without -nonamecheck because my genome contains several thousand contigs in addition to assembled chromosomes and without it an error is thrown.
Have I broken something or is this a bug

What version are you using?  I am unable to reproduce this with the latest version in the github repository.

2.26.0
I assume then it has been fixed since the last official release?
Additionally, I think I've narrowed down the problem.
file out.txt
out.txt: ASCII text, with CR, LF line terminators

And
cat -e out.txt
chromosome start      featureID score       strand^M     count$

Looks like there are windows carriage returns in there.

After checking my files. It looks like this is my problem, my A bed file has carriage returns.
Lesson learned!


bug: Structured log field types are not uniform

Issue description
ApisixRoute update event arrived, new object and old object are empty in log.
{"level":"debug","time":"2022-03-09T14:19:23.622142136+08:00","caller":"ingress/apisix_route.go:378","message":"ApisixRoute update event arrived","new object":{},"old object":{}}

Inconsistent data types will cause elasticsearch write failures
Environment

your apisix-ingress-controller version (output of apisix-ingress-controller version --long):
Version: master branch
Git SHA: 1159522
Go Version: go1.17.2
Building OS/Arch: linux/amd64
Running OS/Arch: linux/amd64
your Kubernetes cluster version (output of kubectl version):
if you run apisix-ingress-controller in Bare-metal environment, also show your OS version (uname -a):

Minimal test code / Steps to reproduce
maybe the apisixRoute fields are not exported?
type apisixRoute struct {
	groupVersion string
	v2beta1      *configv2beta1.ApisixRoute
	v2beta2      *configv2beta2.ApisixRoute
	v2beta3      *configv2beta3.ApisixRoute
}

Actual result

Error log

Expected result
No response

Apart from this log, are there any other logs with a similar situation?

Apart from this log, are there any other logs with a similar situation?

Only this one has now been found.

@zlhgo Are you interested in helping to improve it?

@zlhgo Are you interested in helping to improve it?

Please give me some advice though.

Could you provide a way to reproduce it, maybe I can fix this problem.

Could you provide a way to reproduce it, maybe I can fix this problem.

Hi, just run the latest code directly.

Could you provide a way to reproduce it, maybe I can fix this problem.

Hi, just run the latest code directly.

Thanks.

thanks for reminder. Let close this


hellow,why add l2_norm_layer

i run this method,but the result is not good,when i use tf.contibute.XXX.triplet_loss,the result is very good, and it without L2_Norm_Layer

and the orgin_author is not add L2_Norm_Layer .i also using  #tf.keras.backend.flatten# function,but the result loss is always at margin,(without L2_Norm_Layer)

Hi  @majinmin
Thanks for showing interest in my work.
Please note that this repository is intended only to show how omoindrot's code in the https://github.com/omoindrot/tensorflow-triplet-loss repository might be used in Keras.
When I apply L2 normalization on the embeddings in my Jupyter notebook ( i.e. model.add(Lambda(lambda  x: K.l2_normalize(x,axis=1))) ) I am following the architecture in the FaceNet paper ( https://arxiv.org/abs/1503.03832 ) where they do apply L2 norm on embeddings before applying triplet loss.
To help you further assist you in resolving your issues, please share more details, i.e. actual training code, including shape of your variables ( data and label), loss function, optimizer used, model architecture.
Without that I can only guess what goes wrong, and my best guess is that you did not flatten your labels e.g. using labels = K.flatten(labels).

@ma1112 thank you for your answer.
i reading the paper FaceNet,yes the model add the L2_Normal_Layer，It embeds an image x into a d-dimensional Euclidean space.when i add L2_Normal_Layer,the loss is going down,my model is based on VGG16,the mnist data reading style is following:

and part of model code include last layer(L2_Normal_Layer) :

the loss is follwing your code :

model complie and fit :

but the result is not good:

this result is using TripletSemiHardLoss:

and i did not using L2_Normal_Layer , i do not know what happend.

the loss_function is following ：
def triplet_loss_adapted_from_tf(y_true, y_pred):
#del y_true
margin = 1.
#labels = y_pred[:, :1]
labels = y_true
#print(labels)

labels = tf.cast(labels, dtype='int32')

embeddings = y_pred[:, 1:]

### Code from Tensorflow function [tf.contrib.losses.metric_learning.triplet_semihard_loss] starts here:

# Reshape [batch_size] label tensor to a [batch_size, 1] label tensor.
# lshape=array_ops.shape(labels)
# assert lshape.shape == 1
# labels = array_ops.reshape(labels, [lshape[0], 1])

# Build pairwise squared distance matrix.
pdist_matrix = pairwise_distance(embeddings, squared=True)
# Build pairwise binary adjacency matrix.
adjacency = math_ops.equal(labels, array_ops.transpose(labels))
# Invert so we can select negatives only.
adjacency_not = math_ops.logical_not(adjacency)

# global batch_size
batch_size = array_ops.size(labels) # was 'array_ops.size(labels)'

# Compute the mask.
pdist_matrix_tile = array_ops.tile(pdist_matrix, [batch_size, 1])
mask = math_ops.logical_and(
    array_ops.tile(adjacency_not, [batch_size, 1]),
    math_ops.greater(
        pdist_matrix_tile, array_ops.reshape(
            array_ops.transpose(pdist_matrix), [-1, 1])))
mask_final = array_ops.reshape(
    math_ops.greater(
        math_ops.reduce_sum(
            math_ops.cast(mask, dtype=dtypes.float32), 1, keepdims=True),
        0.0), [batch_size, batch_size])
mask_final = array_ops.transpose(mask_final)

adjacency_not = math_ops.cast(adjacency_not, dtype=dtypes.float32)
mask = math_ops.cast(mask, dtype=dtypes.float32)

# negatives_outside: smallest D_an where D_an > D_ap.
negatives_outside = array_ops.reshape(
    masked_minimum(pdist_matrix_tile, mask), [batch_size, batch_size])
negatives_outside = array_ops.transpose(negatives_outside)

# negatives_inside: largest D_an.
negatives_inside = array_ops.tile(
    masked_maximum(pdist_matrix, adjacency_not), [1, batch_size])
semi_hard_negatives = array_ops.where(
    mask_final, negatives_outside, negatives_inside)

loss_mat = math_ops.add(margin, pdist_matrix - semi_hard_negatives)

mask_positives = math_ops.cast(
    adjacency, dtype=dtypes.float32) - array_ops.diag(
    array_ops.ones([batch_size]))

# In lifted-struct, the authors multiply 0.5 for upper triangular
#   in semihard, they take all positive pairs except the diagonal.
num_positives = math_ops.reduce_sum(mask_positives)

semi_hard_triplet_loss_distance = math_ops.truediv(
    math_ops.reduce_sum(
        math_ops.maximum(
            math_ops.multiply(loss_mat, mask_positives), 0.0)),
    num_positives,
    name='triplet_semihard_loss')

### Code from Tensorflow function semi-hard triplet loss ENDS here.
return semi_hard_triplet_loss_distance

def pairwise_distance(feature, squared=False):
"""Computes the pairwise distance matrix with numerical stability.
output[i, j] = || feature[i, :] - feature[j, :] ||_2

Args:
  feature: 2-D Tensor of size [number of data, feature dimension].
  squared: Boolean, whether or not to square the pairwise distances.

Returns:
  pairwise_distances: 2-D Tensor of size [number of data, number of data].
"""
pairwise_distances_squared = math_ops.add(
    math_ops.reduce_sum(math_ops.square(feature), axis=[1], keepdims=True),
    math_ops.reduce_sum(
        math_ops.square(array_ops.transpose(feature)),
        axis=[0],
        keepdims=True)) - 2.0 * math_ops.matmul(feature,
                                                array_ops.transpose(feature))

# Deal with numerical inaccuracies. Set small negatives to zero.
pairwise_distances_squared = math_ops.maximum(pairwise_distances_squared, 0.0)
# Get the mask where the zero distances are at.
error_mask = math_ops.less_equal(pairwise_distances_squared, 0.0)

# Optionally take the sqrt.
if squared:
    pairwise_distances = pairwise_distances_squared
else:
    pairwise_distances = math_ops.sqrt(
        pairwise_distances_squared + math_ops.to_float(error_mask) * 1e-16)

# Undo conditionally adding 1e-16.
pairwise_distances = math_ops.multiply(
    pairwise_distances, math_ops.to_float(math_ops.logical_not(error_mask)))

num_data = array_ops.shape(feature)[0]
# Explicitly set diagonals to zero.
mask_offdiagonals = array_ops.ones_like(pairwise_distances) - array_ops.diag(
    array_ops.ones([num_data]))
pairwise_distances = math_ops.multiply(pairwise_distances, mask_offdiagonals)
return pairwise_distances

def masked_maximum(data, mask, dim=1):
"""Computes the axis wise maximum over chosen elements.
Args:
  data: 2-D float `Tensor` of size [n, m].
  mask: 2-D Boolean `Tensor` of size [n, m].
  dim: The dimension over which to compute the maximum.

Returns:
  masked_maximums: N-D `Tensor`.
    The maximized dimension is of size 1 after the operation.
"""
axis_minimums = math_ops.reduce_min(data, dim, keepdims=True)
masked_maximums = math_ops.reduce_max(
    math_ops.multiply(data - axis_minimums, mask), dim,
    keepdims=True) + axis_minimums
return masked_maximums

def masked_minimum(data, mask, dim=1):
"""Computes the axis wise minimum over chosen elements.
Args:
  data: 2-D float `Tensor` of size [n, m].
  mask: 2-D Boolean `Tensor` of size [n, m].
  dim: The dimension over which to compute the minimum.

Returns:
  masked_minimums: N-D `Tensor`.
    The minimized dimension is of size 1 after the operation.
"""
axis_maximums = math_ops.reduce_max(data, dim, keepdims=True)
masked_minimums = math_ops.reduce_min(
    math_ops.multiply(data - axis_maximums, mask), dim,
    keepdims=True) + axis_maximums
return masked_minimums

@majinmin
I had time today to have a look at your problem.
I advise you to either lower your batch_size when you are using the "batch_hard" version of omoindrot's triples losses ( e.g. use a batch size of 64, as it is ), or try using omoindrot's "batch_all" triplet loss with the currently set batch size of 512.
Let me know whether these ideas worked for you.

Due to lack of feedback on this issue, I'm closing it.


Fix Cloudflare Workers adapter target

When attempting to upload a SvelteKit app which contains modern ES
features such as optional chaining or nullish coalescing, workers is
unable to parse the built output.
Module parse failed: Unexpected token (13066:47)
You may need an appropriate loader to handle this file type, currently no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders
|       if (typeof window !== "undefined") {
|         const windowAny = window;
>         const dataLayer = windowAny.dataLayer ?? [];
|         windowAny.dataLayer = dataLayer;
|         gtag = function() {
Error: webpack returned an error. You may be able to resolve this issue by running npm install

I could not find any official documentation of what version of ES
workers support, but ES2020 is the year that nullish coalescing was
introduced, and setting it to ES2019 appears to fix the issue.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

[ ] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
[x] This message body should clearly illustrate what problems it solves.
[ ] Ideally, include a test that fails without this PR but passes with it.

Unsure how to test this
Tests

[x] Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

[x] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpx changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

Why is webpack being used to bundle stuff in cloudflare workers? The docs recommend to set type = "javascript" in the wrangler config, so webpack shouldn't be used in the first place.


Create and save into concordances, assign mappings to a concordances

This should eventually be possible in Cocoda. Things to consider:

Who can write into which concordance? (Only creator? Can others be given the rights?)
jskos-server would need to be adjusted that those mappings are not deleted on reimport of a concordances.

...

Saving a mapping into a concordance is basically saving a mapping with field partOf referencing an existing concordance (see #99 to manage concordance metadata). The rest is

issues of consistency

should a mapping only be allowed to be part of one concordance at most? (I think so for simplicity)
fromScheme and toScheme of a mapping must match the same fields of its concordance

issues of authentification: who should be allowed to write mappings into concordances (and to remove mappings from)?

identies listed in creator should always be allowed
plus identies listed in contributor (so the creator could add contributors via editing concordance metadata)
we may later want user groups but this is not needed to start with
open question: what if a mapping with author X is part of a concordance but X is not allowed to edit into this concordance (e.g. happened during import or the author was removed from contributor)? - should the author be allowed to delete the mapping and to remove the mapping from the concordance? Otherwise X cannot edit the mapping anymore in this case (actually this may be a wanted feature)

issues of workflow and user interface design: how to select whether/when to assign mappings to concordances. This issues are not part of jskos-server.

I agree with all your points in the last comment and I personally think we could already start to implement this.

open question: what if a mapping with author X is part of a concordance but X is not allowed to edit into this concordance (e.g. happened during import or the author was removed from contributor)? - should the author be allowed to delete the mapping and to remove the mapping from the concordance? Otherwise X cannot edit the mapping anymore in this case (actually this may be a wanted feature)

My suggestion would be to disallow editing or deleting the mapping in this case. Adding this functionality later would not be a breaking change in my opinion, so better to do it this way around for now.

I'm closing this issue in favor of #99 since we've been discussion the same things over there...


[Feature Request] Repository branch as Task's run Variable

Will be great to have ability to run task in context different branches. It will allow to run the same task with different configurations. Now we have to create a lot of copies with task/repo and it is not cool (if you have 50+ branches for prod/stagings/features/etc).

Hi @mmospanenko please describe your idea in detail. What context do you mean?

I mean to add ability to chose branch on task's run level, not on repository only as we have now. So we will be able to not create many Repositories (technically branches) and Tasks for each branch. Just write int Tasks run variable branch name


Add playbook for updating AzureMFA institution config only

Add a playbook to update the AzureMFA gssp config without redeploy

azuremfa-config.yml is a lot of duplication. The deploy script already has the option to skip the untar of the component. This looks very similar to what you are doing here.

I'm looking for a way to safely update config without interruptions for the user. e.g: These playbooks wil never reload php-fpm

This wil resolved by reusing the current playbook


Add [repr(C)] to structs likely to be used in FFI

Same as from previous PR, but now also includes Iso and Rot. Addresses #85. Depends on #98.

Thanks!


Rpc 112 make fill

Hi @disenotov & @evgenynacu,
These orders work if and only if the left order on matchOrders has true for isMakeFill.
Is there a reason for this isMakeFill functionality that allows Order fills to record either the make asset fills or take asset fills?
It allows recording the fills for the same asset type while matching orders. However, this doesn't have any benefit. What am I missing?

I've written some tests demonstrating the matchOrders failures when the left asset has false for isMakeFills: https://gist.github.com/hantuzun/5a80e1bada3b8afb75b7b1dc0b339f4a

hi @hantuzun !
i'm not sure if there is a problem
test for the case when both orders have isMakeFill = false is here https://github.com/rarible/protocol-contracts/blob/master/exchange-v2/test/v2/ExchangeV2.rarible.test.js#L969 and it works
i tried changing orders position in this test https://github.com/rarible/protocol-contracts/blob/master/exchange-v2/test/v2/ExchangeV2.rarible.test.js#L929 so it would be for example
testing.matchOrders( right, "0x", left, await getSignature(left, seller), { from: buyer, value: 600, gasPrice: 0 })

and it still worked correctly
am i missing something? maybe there is an error in your tests?

Hi @disenotov!
My tests are based on the order data v2 tests you refer to.
For all 4 possibilities of isMakeTrueThe ERC1155 and ETH amount:

2 tests fail and 2 tests succeed when I use the amounts from:

https://github.com/rarible/protocol-contracts/blob/master/exchange-v2/test/v2/ExchangeV2.rarible.test.js#L929

All 4 tests succeed when I use the amounts from:

https://github.com/rarible/protocol-contracts/blob/master/exchange-v2/test/v2/ExchangeV2.rarible.test.js#L969

The tests fail with the following stack trace:
Reverted with reason string 'rounding error'
    at Exchange.safeGetPartialAmountFloor (LibMath.sol)
    at Exchange.calculateRemaining (LibOrder.sol)
    at Exchange.fillOrder (LibFill.sol)
    at Exchange.getFillSetNew (ExchangeCore.sol)
    at Exchange.matchAndTransfer (ExchangeCore.sol)
    at Exchange.matchOrders (ExchangeCore.sol)

In both of the failed cases, the same parameters cause the failure:
calculateRemaining(order, fill, isMakeFill) is called where:

order.makeAsset.value is 200.
order.takeAsset.value is 600.
fill is 500.
isMakeFill is false.

Then:
takeValue = order.takeAsset.value.sub(fill); sets takeValue to 100.
Finally, the following line reverts:
makeValue = LibMath.safeGetPartialAmountFloor(order.makeAsset.value, order.takeAsset.value, takeValue);
The failing call with replaced values is:
safeGetPartialAmountFloor(200, 600, 100);
I'm surprised by the fact that changing the amounts fixes or breaks this test case. I'll share more details soon.

In the test, the first matchOrders happens at a price of 5.
Then, the remaining sell order updates its price, while keeping the same hash, therefore preserving its fill record.
And then another matchOrders is called at the new price for the remaining sell order.
Below is the behavior for the second matchOrder's price:
1: SafeMath: subtraction overflow.
2: SafeMath: subtraction overflow.
3: The rounding error I've noticed the first. As in https://github.com/rarible/protocol-contracts/blob/master/exchange-v2/test/v2/ExchangeV2.rarible.test.js#L929
4: The amount change is 300 instead of 400.
5: OK. The same price as the first match.
6: The rounding error.
8: The rounding error.
9: The rounding error.
10: OK. As in https://github.com/rarible/protocol-contracts/blob/master/exchange-v2/test/v2/ExchangeV2.rarible.test.js#L969
11: The rounding error.
14: The rounding error.
15: The rounding error.
20: OK.
21: The rounding error.
25: OK.
30: The rounding error.
35: The rounding error.
45: The rounding error.
50: OK.
100: OK.
150: The rounding error.
900: The rounding error.
1000: The rounding error.
5000: The rounding error.
10000: The rounding error.
The tests fail more often than not.
You can see how I perform these tests by changing a single variable here at the latest commit: https://gist.github.com/hantuzun/5a80e1bada3b8afb75b7b1dc0b339f4a/revisions?diff=unified

Changing order positions like the below doesn't change any behavior:
testing.matchOrders( right, "0x", left, await getSignature(left, seller), { from: buyer, value: 600, gasPrice: 0 })

What is the purpose of isMakeFill?
Also, it'd have helped if running the project tests were documented better.

The error is just that, a rounding error. 1/6 of 200 NFTs is 33 with integer arithmetics and it is divergent from the actual value of 33.33 by more than 0.1%.
I think isMakeFill parameter should be for setting the fill to NFT sides, right?

hi!
yes, the error in your tests is due to the rounding error.
as for the isMakeFill, i started writing an answer and forgot to finish:)

What is the purpose of isMakeFill?
so, we store orders' fill (what part of order is completed) onchain. By default fills are calculated by the take side of the order (e.g. if there is an order 3ERC1155 => 300 ETH, here ERC1155 is the make side, ETH is the take side. it can be matched with another order 100ETH => 1ERC1155, and the first order would be partially filled. so we would store fill = 100 ETH (using take side) for this order , and it can be matched again with 2ERC1155 => 200 ETH for example)
so isMakeFill = true means that fills are calculated using make-side of the order, in the previous example we would store 1 (for the amount of erc1155 traded) instead of 100 (amount of ETH)
it's usefull for sell orders, because it's important for sellers to sell the right amount of nfts. So the order can be considered filled when all nfts are sold.

about documentation, what do you think is missing?

Thanks for the clarification!
As I've guessed, isMakeFill allows the flexibility for setting the fill side to the NFT asset side. This flexibility can cause rounding errors if the fill side is set to the ETH or ERC20 side by mistake. From my understanding, the fill side should always be the NFT side, and in the case of an order of 2 ERC1155 assets, the fill side should be the ERC1155 with less amount to avert rounding errors.
The purpose and proper usage of isMakeFill could be documented.


Bug: Orderfield ignores MapAttribute

Using QueryAll works fine, but for a query with an OrderField the MapAttribute is ignored.
Here is a simple example:
CREATE TABLE [dbo].[Test](
	[Id] [int] NOT NULL,
	[WrongName] [nvarchar](50) NOT NULL
) ON [PRIMARY]
GO

public class Test : DataEntity {
	public int Id {get;set;}
	[Map("WrongName")]
	public string RightName {get;set;}
}

using (var con = new MySqlConnection(ConnectionString).EnsureOpen())
{
  con.Query<Test>(); // works fine

  // The order fields 'RightName' are not present at the given fields 'Id, WrongName'.
  con.QueryAll<Test>(OrderField.Ascending<Test>(a=>a.RightName));
}

It seems that the QueryBuilder/StatementBuilder doesn't map the property name back to it's column name.

The fix is now available at v1.12.8-beta2.

@mikependon Thanks for your fast fix.
I tried the v1.12.8-beta2 package but code and behaviour is unchanged. Maybe be package built is wrong?

Hmmmm. Let me check this one for you later.

Looking at this now, our Unit Test is working properly from here and here. It seems weird and you might be correct that it is because of the built package.

The new built is deliver without any code change from the last fix, but this should fix your issue now. You are correct that it was the built package 😄
Please use the version v1.12.8-beta3
Install-Package RepoDb -version 1.12.8-beta3


Nesting and Redux reducers ?

Nesting itself still seems to be a bit of a problem, especially when it comes to the Drawer (see open issues).
But besides that, can you please provide documentation on how Redux is supposed to work with multiple level deep navigator nesting?
Having multiple reducers, one for each nested navigator works until the Back action is fired, which unfortunately is caught by all navigators :(

Can you post an example of how you've set up your reducer?
It sounds like you may have registered several routers with your reducer, and you should only use your top-level router's getStateForAction. Otherwise, yes, every router will handle the action.

I tried to come up with a minimalistic example with Redux and nested Navigators.
The main navigator is a TabNavigator with two screens, the second one being a nested StackNavigator with two screens.
* TabNavigator
  - TabA
  - TabB       =    * StackNavigator
                                - StackOne
                                - StackTwo

Let me know if you want me to publish it to Exponent for you to play with!
import React from 'react';
import {ScrollView, Text, StyleSheet, Button} from 'react-native';
import {StackNavigator, TabNavigator, addNavigationHelpers} from 'react-navigation';
import {createStore} from 'redux';
import {Provider, connect} from 'react-redux';

// This function is used to create components.
// It expects a name and a list of optional links to other routes.
// The generated component is connected to Redux to display the content of the store.
// This function is used below to easily generate components.
function createComponent(name, navigateTo = []) {
  return connect(state => ({redux: state}))(({navigation, redux}) => (
      <ScrollView style={styles.container}>
        <Text style={styles.title}>I am component {name}</Text>
        {navigateTo.map(route => (
          <Button key={route} title={`Go to ${route}`} onPress={() => navigation.navigate(route)} />
        ))}
        <Text style={styles.title}>Store</Text>
        <Text style={styles.store}>{JSON.stringify(redux, undefined, 2)}</Text>
      </ScrollView>
    )
  )
}

// The nested StackNavigator
const NestedNavigator = StackNavigator({
  StackOne: {screen: createComponent('StackOne', ['StackTwo'])},
  StackTwo: {screen: createComponent('StackTwo', ['TabA'])}
});

// Two tabs, second one is a nested StackNavigator
export const MainNavigator = TabNavigator({
  TabA: {
    screen: createComponent('TabA', ['TabNested'])
  },
  TabNested: {
    screen: NestedNavigator
  },
});

// This connects the MainNavigator to Redux to delegate the whole routing
const AppWithNavigationState = connect(
  state => ({
    nav: state,
  }))(({dispatch, nav}) => (
  <MainNavigator navigation={addNavigationHelpers({ dispatch, state: nav })} />
));

// Redux setup.
// Creating reducer from the main navigator.
const appReducer = (state, action) => MainNavigator.router.getStateForAction(action, state);
const store = createStore(appReducer);

// This is the component that bootstraps the app.
export class MinimalNestedReduxApp extends React.Component {
  render() {
    return (
      <Provider store={store}>
        <AppWithNavigationState />
      </Provider>
    );
  }
}

// Ignore what is below. It is just some basic styling
const styles = StyleSheet.create({
  container: {
    flex: 1,
    marginTop: 20
  },
  title: {
    backgroundColor: 'rgba(0, 0, 0, 0.1)',
    padding: 16,
  },
  store: {
    padding: 6,
    backgroundColor: '#eee',
  }
});

Thanks guys.
I had a look and spent a considerable time to make an app drawer with several different nested tab and stack navs work, but failed for now using react-navigation.
So I reverted back to react-native-router-flux for my current projects.
I'll come back once react-navigation is stable and better documented.
Thanks for the effort.

@hwaterke, that is a great example!
The drawer navigator is still a bit problematic, but I'm going to close this out in favor of more specific issues.

I'm also having this issue, was a way ever found of having nested navigators with redux, and the back action being handled correctly?


PlayStation BlueRetro does NOT work with SCPH 1000 Japanese PS1

BlueRetro syncs up with a controller no problem, however... when you press buttons, nothing happens when used with an SCPH-1000 Japanese PlayStation Console....

Which BT controller you use?
What kind of BlueRetro you got? DIY or something you bought?

Dual Shock 3
Something I bought online. I have got 2 BlueRetro's and both do the same. However, they do work with my SCPH-1002 PAL Console.
Reporting this in case there is a compatibility issue with PU7 Motherboard Revision SCPH-1000 consoles.


Itbit syntax refactor and add specs

This branch this ready to merge, the errors are rubocop, which will be arranged as they go confirming the PRs.


Download youtube video with worst premerged video quality, bad download rate

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

[X] I understand that I will be blocked if I remove or skip any mandatory* field

Checklist

[X] I'm asking a question and not reporting a bug or requesting a feature
[X] I've looked through the README
[X] I've verified that I'm running yt-dlp version 2023.01.06 (update instructions) or later (specify commit)
[X] I've searched the bugtracker for similar questions including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue

Please make sure the question is worded well enough to be understood
Ubuntu Mate 22.04, download a youtube video playlist
I download a complete video playlist with the -f b option, that I can check the videos to decide whether its worst to save the films afterwards in a better quality (then e.g.: with -F, -f 137+140 ...).
But to check the videos, it is not necessary to get the "best" premerged version, its enough to get the "worst" premerged version.
So I did try the option "-f w", and it works. With the parameter -f w I will get the worst premerged version.
  Galaxis.mp4
[download]   4.3% of  264.17MiB at    6.13MiB/s ETA 00:41^C)
On other download sides the parameter -f w works perfectly (https://www.ardmediathek.de).
It is possible to use an another parameter, to save the high download rate if I use "-f w" ?
Provide verbose output that clearly demonstrates the problem

[X] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[ ] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
[debug] Command-line config: ['-vU', '-f', 'w', '-o', '%(title)s.%(ext)s', 'https://www.youtube.com/watch?v=weQqm2AhpXw']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version 2023.01.06 [6becd2508]
[debug] Lazy loading extractors is disabled
[debug] Python 3.10.6 (CPython x86_64 64bit) - Linux-5.15.0-60-generic-x86_64-with-glibc2.35 (OpenSSL 3.0.2 15 Mar 2022, glibc 2.35)
[debug] exe versions: ffmpeg 4.4.2 (setts), ffprobe 4.4.2, rtmpdump 2.4
[debug] Optional libraries: Cryptodome-3.16.0, brotli-1.0.9, certifi-2022.12.07, mutagen-1.46.0, pyxattr-0.7.2, secretstorage-3.3.1, sqlite3-2.6.0, websockets-10.4
[debug] Proxy map: {}
[debug] Loaded 1761 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2023.01.06, Current version: 2023.01.06
yt-dlp is up to date (2023.01.06)
[youtube] Extracting URL: https://www.youtube.com/watch?v=weQqm2AhpXw
[youtube] weQqm2AhpXw: Downloading webpage
[youtube] weQqm2AhpXw: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[info] weQqm2AhpXw: Downloading 1 format(s): 17
[debug] Invoking http downloader on "https://rr4---sn-uxax4vopj5qx-q0n6.googlevideo.com/videoplayback?expire=1676416737&ei=gcLrY8DrEtXfx_AP3dWOoAQ&ip=<IP_ADDRESS>&id=o-ALPscVHXxWTK1F1vULZsFqXTzYZbYzocTsmkC7Bo7ohg&itag=17&source=youtube&requiressl=yes&mh=Fx&mm=31%2C29&mn=sn-uxax4vopj5qx-q0n6%2Csn-i5h7lner&ms=au%2Crdu&mv=m&mvi=4&pl=18&initcwndbps=1001250&spc=H3gIhtzmB4MXXQzQF18vW_eu2hflWfM&vprv=1&svpuc=1&mime=video%2F3gpp&gir=yes&clen=60239224&dur=6132.240&lmt=1554863102697017&mt=1676394794&fvip=1&fexp=24007246&c=ANDROID&txp=5431432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhALauBJMGFmNGSXd6munFG5JjjYSIf2wQCOfhbFYccrbaAiA1-Mj2cxgTFg6sumE-H4IlbrmXeSiPt53QTHdwOyjs2A%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIgQySLDUrLfMsyhUAFkLockzMcn4yfGl1Z6dxIYTfvamsCID3zc_NK5RraRTaF8ncD8tDt6vExLeXCWq56Dr0VLybo"
[download] Resuming download at byte 729088
[download] Destination: Kampf um die 5. Galaxis.3gp
[download]   3.1% of   57.45MiB at   19.21KiB/s ETA 49:28^C
ERROR: Interrupted by user

The 3gp format is rete-limited at server side. You probably don't want to download that format anyway. Try -f w[ext=mp4]

@pukkanden :
Thank you, it works (-f w[ext=mp4]), and that it is what I have want.
Only to have a preview video, to minimize the download time of all videos of the play list (also to save the SSD healthy).
After all I can check the video whether its go through my "Quality assurance" and download then the best quality via " -F ...".


Deal with rootless container engine

our
    public static String getUnixUIDGID() {
        final UnixSystem s = new UnixSystem();
        return s.getUid() + ":" + s.getGid();
    }

Makes builder image to run as -u 1000:1000, while it should be -u 0 in a rootless case.
It's a somewhat niche thing as our CI does not have rootless by default.  TS breaks on my rootless Docker Ubuntu test VM though.

This is controllable by https://github.com/Karm/mandrel-integration-tests/blob/master/testsuite/src/it/java/org/graalvm/tests/integration/utils/Commands.java#L79
closing


Add more WASI libc bindings

I was writing some WASI code and needed some more bits from libc. Here's a patch adding more things from the intersection of things that WASI libc defines and things that other platforms in libc have bindings for.

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @gnzlbg (or someone else) soon.
If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.
Please see the contribution instructions for more information.

Some of the symbols are named __wasilibc, but others aren't. Is there a reason for this?

The __wasilibc_* functions are functions which are WASI-specific and not part of a typical libc API.

All looks good to me!
@sunfishcode looks like there's some verification errors on CI, and libc-test/build.rs may need to be updated for including more headers files or such on wasi.
While you're here, want to update the wasi check in src/lib.rs to any(target_env = "wasi", target_os = "wasi")?

@bors: r+

:pushpin: Commit 5fda33e49045474d8595e9ac2534c1a322cbcf47 has been approved by alexcrichton

:hourglass: Testing commit 5fda33e49045474d8595e9ac2534c1a322cbcf47 with merge 19e81f3264e7f0156c4f206ce36c551a71b3fc8b...

Investigating this more, this has turned up some bugs in on the wasi-sysroot side, so I'm going to step back here momentarily, fix those, and them come back to this.


test: test_conflict

🐙 This pull request conflicts with the target branch and needs rebase.

🐙 This pull request conflicts with the target branch and needs rebase.

🐙 This pull request conflicts with the target branch and needs rebase.

ack 9626c2217cc375917a4f7dc6957b736048966250

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Reviews
See the guideline for information on the review process.

Type
Count
Reviewers

ACK
1
MarcoFalke

nice, ack 9626c2

ACK 9626c2217cc375917a4f7dc6957b736048966250 NACK

the above comment did not change my "Concept NACK"

ACK 9626c2217cc375917a4f7dc6957b736048966250 even more

the above comment did not change my "Concept NACK"

Yes, it is unclear how to deal with several keywords in the same comment, so only the first one is picked

ack

code review ACK

CRACK 9626c2217cc375917a4f7dc6957b736048966250

🐙 This pull request conflicts with the target branch and needs rebase.


Question: Is zmath deterministic?

If possible, I want to use zmath for a replay system in a game, so that you can download a replay from another player, replay their inputs and get the exact same result.
Assuming the same zmath version and no messing with -ffast-math/@setFloatMode()/IEEE rounding modes/flush to zero, are all zmath calculations deterministic across different platforms and architectures?

With one exception (see below) zmath should be fully deterministic. We don't have tests for determinism though.
Currently, for performance reasons we use HW fma instructions on x86 CPUs that support AVX instruction set. But, on CPUs that don't support AVX we use mul add sequence. fma is faster and more accurate (one rounding).
Please take a look at mulAdd() function: https://github.com/michal-z/zig-gamedev/blob/main/libs/zmath/src/zmath.zig#L1408
To make the code fully deterministic we would have to unify this code.
Note that compiler won't generate fma instructions by itself you have to explicitly tell it to do so by using @mulAdd instrinsic.

Great, thanks for the info.
For now, if I absolutely need cross platform determinism I could just edit mulAdd() in my copy of the lib to always multiply and add separately. But would adding ways for the consumer to more easily choose between speed or determinism (such as via alternative functions or build options) fall in line with your vision for zmath? Or is speed the only goal and determinism just an added bonus?

Yes, we should have a build option for this. There are some breaking changes in Zig build system coming (https://github.com/ziglang/zig/pull/14498) - adapting our code to this change will be a good opportunity to add this option. I will do it in coming days.

We now have a prefer_determinism build option:
build.zig:
const zmath_pkg = zmath.package(b, .{
    .options = { .prefer_determinism = true },
});
exe.addModule("zmath", zmath_pkg.module);

@castholm Yes. Thanks you for your hard work!


generate lrc files when updating metadata for existing files

Requested Feature
afaik I have to delete then redownload the entire album if I want get lrc files for albums already downloaded
could you provide a way to do it without completely redownloading the existing files?
Possible implementation
No response

use spotdl meta for this.

This operation won't overwrite the files metadata if it has it unless you use force-update-metadata


installation problem with npm install -g @angular/cli

🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑
Running npm install -g @angular/cli command throws the following warnings
npm WARN deprecated<EMAIL_ADDRESS>this library is no longer supported
npm WARN deprecated<EMAIL_ADDRESS>Please upgrade to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated<EMAIL_ADDRESS>request has been deprecated, see https://github.com/request/request/issues/3142
after running ng new proj1 command, the following error is thrown:
'ng' is not recognized as an internal or external command,
operable program or batch file.
🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑🛑

Hello, we reviewed this issue and determined that it doesn't fall into the bug report or feature request category. This issue tracker is not suitable for support requests, please repost your issue on StackOverflow using tag angular-cli.
If you are wondering why we don't resolve support issues via the issue tracker, please check out this explanation.