Music not playing and no errors

So it is not playing anything and I just took the code off your docs so idk (and it's not giving me an invalid file or anything not even logging anything)
Kernal: linux
Os: arch
Rodio v: 0.14.0
Cargo v: 1.53.0
Rust v: 2018
// Get a output stream handle to the default physical sound device
let (_stream, stream_handle) = OutputStream::try_default().unwrap();
// Load a sound from a file, using a path relative to Cargo.toml
let file = BufReader::new(File::open("doom.ogg").unwrap());
// Decode that sound file into a source
let source = Decoder::new(file).unwrap();
// Play the sound directly on the device
stream_handle.play_raw(source.convert_samples());

// The sound plays in a separate audio thread,
// so we need to keep the main thread alive while it's playing.
std::thread::sleep(std::time::Duration::from_secs(5));

Having the same issue
Running Gentoo Linux 5.14
Rust 1.54.0
Rodio: ^0
use std::fs::File;
use std::io::BufReader;
use std::path::Path;
use std::sync::mpsc;
use std::thread;
use std::time::Duration;

use rodio::{Decoder, OutputStream, OutputStreamHandle, Sink};
use rodio::source::{PeriodicAccess, Stoppable, Amplify, Pausable, Source};

fn main() {
    const POLL_RATE: Duration = Duration::from_millis(50);
    let mut duration_played = Duration::from_millis(0);

    let file = File::open("file.ogg").unwrap();
    let buffer = BufReader::new(file);

    let (stream, stream_handle) = OutputStream::try_default().unwrap();
    let (queue_tx, queue_rx) = rodio::queue::queue(true);

    let source = Decoder::new(buffer).unwrap()
        .stoppable()
        .amplify(1.0)
        .pausable(false)
        .periodic_access(POLL_RATE, move |source| {
            duration_played += POLL_RATE;
            eprintln!("Duration: {:?}", duration_played);
        })
        .convert_samples();

    queue_tx.append_with_signal(source);
    let res = stream_handle.play_raw(queue_rx);
    eprintln!("res: {:?}", res);
}

Output
Duration: 50ms
res: Ok(())

I had the same issue with this code (not relying on any external files):
fn main() {
    let (_stream, stream_handle) = OutputStream::try_default().unwrap();

    let source = SineWave::new(10_000);

    stream_handle.play_raw(source.convert_samples()).unwrap();

    std::thread::sleep(std::time::Duration::from_secs(3));
}

It turned out that running the code in tmux caused no audio to be produced, but in a regular terminal things worked fine. I'm not sure why that is.

I was able to get both the play_raw() and Sink version working in tmux, however, when I tried to extract the audio playing part into it's own struct, I found that it would exhibit this behavior unless the sink was declared and defined in main(). The source could be defined outside of main() (I created the source and appended it from a struct method). I'm unsure if this info will help pin the problem, but I thought I'd contribute my observations.

I can confirm @AjiBuster499 's observation that the Sink must be declared and defined in main(), otherwise no sound is played. This is in the context of a Dioxus app, for what it's worth.

I can also confirm that it must be declared/defined in main in a GTK4 app
verbose details here

works
use gtk::prelude::*;
use rodio::OutputStream;
use std::io::BufReader;

fn main() {
    let application =
        gtk::Application::new(Some("com.github.gtk-rs.examples.basic"), Default::default());

    // Play beep
    let (_stream, stream_handle) = OutputStream::try_default().unwrap();
    let file = std::fs::File::open("assets/beep.wav").unwrap();
    let beep1 = stream_handle.play_once(BufReader::new(file)).unwrap();
    beep1.set_volume(0.2);

    application.connect_activate(build_ui);
    application.run();
}

fn build_ui(application: &gtk::Application) {
    let window = gtk::ApplicationWindow::new(application);
    window.set_title(Some("First GTK Program"));
    window.set_default_size(350, 70);

    let button = gtk::Button::with_label("Click me!");
    window.set_child(Some(&button));
    window.show();
}

does not work (plays fraction of beep and is cut off)
use gtk::prelude::*;
use rodio::OutputStream;
use std::io::BufReader;

fn main() {
    let application =
        gtk::Application::new(Some("com.github.gtk-rs.examples.basic"), Default::default());

    application.connect_activate(build_ui);
    application.run();
}

fn build_ui(application: &gtk::Application) {
    let window = gtk::ApplicationWindow::new(application);
    window.set_title(Some("First GTK Program"));
    window.set_default_size(350, 70);

    let button = gtk::Button::with_label("Click me!");

    // Play beep
    let (_stream, stream_handle) = OutputStream::try_default().unwrap();
    let file = std::fs::File::open("assets/beep.wav").unwrap();
    let beep1 = stream_handle.play_once(BufReader::new(file)).unwrap();
    beep1.set_volume(0.2);

    window.set_child(Some(&button));
    window.show();
}

cargo.toml for extra detail
[package]
name = "helloworldplayer"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
rodio = "0.16.0"
gtk = { version = "0.4", package = "gtk4", features = ["v4_8"] }

Just to confirm I had this same issue. I created a function that spun up a thread inside, and used a channel to communicate stopping to the sink. A stop function was returned. No errors, everything compiling fine but no music was planning. I moved the stream handle and sink out into the main thread, passed them into my function and then everything worked fine.

I initially came to the same conclusion as @AjiBuster499 but wanted to know what caused this. After experimenting and identifying the issue, I was able to find #330 which relates to this issue. In short:
As #330 states, the OutputStreamHandle confusingly is a reference to the OutputStream returned by OutputStream::try_default(), and if you do not capture the stream into a variable, the handle cannot point to the object. In the issue here, when the stream goes out of scope, the handle becomes worthless. The inner field of OutputStreamHandle is of type alloc::sync::Weak which explains this behavior.
Bevy handles using Weak and Strong in the same type very well. https://github.com/bevyengine/bevy/blob/f867319336541acb8ed80743c723effeb4be8896/crates/bevy_asset/src/handle.rs#L119

Hey folks, I am also facing a similar issue, not sure if it is related to the above mentioned use case.
thread::spawn(move ||{
    let (_stream, handle) = OutputStream::try_default().expect("speaker broke");
    let sink = Sink::try_new(&handle).expect("speaker on the left broke");
    let source = Decoder::new(...);

    sink.append(source);
    sink.play();
    loop {
        match rx.blocking_recv() {
            ... // This is conditional logic for controlling the channel via different thread using channels
        }
    }
})

So, this above mentioned code doesn't produce any sound. But, here's the fun part, the one mentioned below does work
thread::spawn(move ||{
    let (_stream, handle) = OutputStream::try_default().expect("speaker broke");
    let sink = Sink::try_new(&handle).expect("speaker on the left broke");
    let source = Decoder::new(...);

    sink.append(source);
    sink.sleep_until_end();
    loop {
        match rx.blocking_recv() {
            ... // This is conditional logic for controlling the channel via different thread using channels
        }
    }
})

But, this doesn't fall into my use case where, I need the current thread to handle the incoming message for the channel after starting the sink.
Can anyone please let me know, what might be causing this. Because, for testing I tried adding sleep delay after doing sink.play() in the first code snippet, but it still doesn't seem to work. I am not able to predict the behaviour of the code even after going through the source code of how Sink is written.

Yeah I was having a similar problem with no sound playing. After finding issue #330 I realized it might be the fact that after the stream variable is dropped, the handle doesn't work anymore. So now I keep the OutputStream variable and the OutputStreamHandle variable in the same struct so their lifetimes should be the same.

I think OutputStream either needs to use and Arc<...> ptr instead of Weak<...>, or OutputStreamHandle needs a lifetime parameter in its type towards the OutputStream variable.


Adding a syndicus to a building doesn't work

example on http://localhost:3000/beheer/data_toevoegen/gebouwen/2

select someone as syndicus
press "opslaan"

Request doesn't go through

I'm investigating this while making the syndici page

Duplicate of #361, This is already being fixed there.


Update traefik image tag, make it easy to update

Fixes | Closes | Resolves #1488

Please remove anything marked as optional that you don't need to fill in.
Choose one of the keywords preceding to refer to the issue this PR solves, followed by the issue number (e.g Fixes # 666).
If there is no issue, remove the line. Remove this note after reading.

Changes introduced in this PR:

Upgrade the version of Traefik and move default value to centralized location, constants.py.

Types of changes
What types of changes does your PR introduce?
Put an x in the boxes that apply

[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds a feature)
[ ] Breaking change (fix or feature that would cause existing features to not work as expected)
[ ] Documentation Update
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build related changes
[ ] Other (please describe):

Testing
Requires testing

[ ] Yes
[x] No

In case you checked yes, did you write tests?

[ ] Yes
[x] No

Documentation
Does your contribution include breaking changes or deprecations?
If so have you updated the documentation?

[ ] Yes, docstrings
[ ] Yes, main documentation
[ ] Yes, deprecation notices

Further comments (optional)
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered and more.

@viniciusdc @aktech with this change, do think that we can relax our Kubernetes version upper bound?


Request for collaborator permissions

Hello @neetcode-gh,
I've made some contributions, and I'd like to ask for collaborator permissions so I can merge them in the future.

I believe the best way would be to fork and add your changes after that just start a pull request so the maintainer of this repo can merge those changes for you.

Done. Thanks for the contributions!


release: 1.5.1

This PR verified with blow test scenarios

[x] Fresh install v1.5.1 by helm
[x]  Upgrade from v1.4.3 to v1.5.1 by helm

Create Longhorn CRs before upgrade
After upgrade success, restore volume, replica rebuild, detach/attach volume by scale workload worked properly

[x] Uninstall


Alert is unexpectedly closed by 'class PageLoaded implements ExpectedCondition'

Hi, I got some issue when I try to use AbstractPageElement.redirectTo with an opened alert on a page.
It happens because of PageLoaded.class which try to get a state of the page by JavaScript.
JavaScript will close the alert.
I suggest a solution, before using PageLoaded.class just check is an alert opened or not, for example, by this method:
   public static boolean alertIsPresent() {
        try {
            WebDriverWait wait = new WebDriverWait(getWebDriver(), 0);
            return wait.until(ExpectedConditions.alertIsPresent()) != null;
        } catch (TimeoutException e) {
            return false;
        }
    }

alertIsPresent() || "complete".equals(executeScript(String.class, "return document.readyState"))


fix: script invocation error for "create-solid@latest"

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

[ ] Tests for the changes have been added (for bug fixes / features)

PR Type
What kind of change does this PR introduce?

[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] infrastructure changes
[ ] Other... Please describe:

What is the current behavior?
$ bunx create-solid@latest
error: Script not found "create-solid@latest"

What is the new behavior?
The corrected bunx command for "create-solid@latest" has been updated in the project's README and documentation, resolving the "Script not found" error.
Other information

N/A

Thank you

I don't want to be mean but I think you didn't test the changes before merging.
The old command worked just fine

The changes are not working

What the actual change should have been


Restart/Stop Garry's Mod (Request)

Hello, I want to know if it is possible before a restart or shutdown the server make announcement like say message for onlines players. (Server restart in 5 seconds..) Thanks!

The gist of "roll-your-own" restart announce can be grok'd from the extended discussion here:
http://steamcommunity.com/groups/linuxgsm/discussions/0/458605613414424931/#c458606248614821764
Substitute gmodserver for hwserver.

Thanks!


issue #7201

Issue Reference
#7201

@rachana-webkul
This is working fine. Please find the screenshot Here

@jitendra-webkul
spaces added, please verify


feat(options): add localoptions to opt.sessionoptions

Description

I take markdown notes in multiple languages (English and Spanish), but my langspell settings are not remembered if I switch to something other than the config in opt.spelllang in the options.lua file, which I have set to English
By adding localoptions to  opt.sessionoptions these settings are persisted so that I can change the language to english , spanish or en,es on a buffer and when I re-open the buffer it will pick up that information so that I don't have to be setting the spellang again
See this video for reference
Related Issue(s)

Screenshots

Checklist

[x] I've read the CONTRIBUTING guidelines.

spelllang can take a list of comma-separated languages. Wouldn't it be more prudent to change that in your personal configuration instead of this?

spelllang can take a list of comma-separated languages. Wouldn't it be more prudent to change that in your personal configuration instead of this?

I set spelllang in some buffers to english, other ones to spanish and some others to both english and spanish, are you referring to setting this option vim.opt.spelllang = { "en" } to something else in my options.lua file?

But just to clarify, I'm not touching spelllang in this PR, it's related directly to adding localoptions to sessionoptions so that the language I set on each buffer is persisted. Not sure if that helps or clarifies things, but let me know.

Yes, i'm talking about vim.opt.spelllang in your options.lua file. You can set more than one language. Read the help. You're only adding localoptions, so that the spelllang setting persists across sessions. I believe localoptions might have too much unnecessary info and should belong in the user personal configuration if someone wants that. Not be a LazyVim default.

I appreciate your response, you've helped me a lot in the past with Neovim questions.
I have localoptions set in my local config, and I wasn't planning on submitting a PR until a user in the video suggested it.
I think it would help users that want to take notes in more than 1 language and not set their spellang to a static value, as I can have it set to English, but in some buffers I want to set it to Spanish, and I would like that language information to be remembered for that buffer.
It's ok either way, the video explains how to set it up in case the maintainer thinks this is not a good idea

This is a bad idea since it also sets buffer-local mappings, which can lead to unexpected behavior.

Now I remember what I did and didn't like this option. I had tried it in the past and somewhere along the lines I was experimenting with foldexpr and foldmethod. I had set set foldmethod=manual and set fde= to try manual folds and after restarting Neovim the option persisted obviously due to localoptions and the default settings LazyVim had for folding were messed up.
Of course there might be other ways as well where you can get unexpected behavior.
@linkarzu If you also mention this in a video which probably quite a descent number of newcomers to Neovim might watch, please be sure to mention that localoptions could lead to unexpected behavior like the example I mentioned above (which at first might leave them baffled as to what is going on and why default LazyVim settings don't work) and users should use it if they really understand what they're doing.

Appreciate both responses, and thanks for the folding examples @dpetka2001 Ill try to keep this in mind when things break and I cannot explain what's going on.
By any chance, does any of you know if there's a better way to persist the spelllang on a per buffer basis without adding localoptions to sessionoptions?

Have you tried passing multiple languages to spelllang? The help file has examples. Something like
vim.opt.spelllang:append("es") -- to append to the default `en` that LazyVim has
-- or
vim.opt.spelllang = { "gr", "es" }  -- if you want an entirely new `spelllang` without the English language

should do it in your case I believe. Although I don't use spelling and am not 100% sure I'm right.

Yep, by looking at my options.lua file, I once in the past set it to both en,es, but then I switched it bach to en a seen here below
-- Most of my files have 2 languages, spanish and english, so even if I set the
-- language to spanish, I always add some words in English to my documents, so
-- it's annoying to be adding those to the spanish dictionary
-- vim.opt.spelllang = { "en,es" }

-- I mainly type in english, if I set it to both above, files in English get a
-- bit confused and recognize words in spanish, just for spanish files I need to
-- set it to both
vim.opt.spelllang = { "en" }

So basically, I just set the default to en because if set to both languages all the time, the documents that I just have in 100% english would get confused and start recognizing words in Spanish, I don't remember quite well, I should have documented an example in a better way because now I forgot.
So I change the language on a "per buffer" basis with keymaps, but maybe this is not the best approach?
-- Keymap to switch spelling language to Spanish lamw25wmal
vim.keymap.set("n", "<leader>msls", function()
  vim.opt.spelllang = "es"
  vim.cmd("echo 'Spell language set to Spanish'")
end, { desc = "[P]Spelling language Spanish" })

-- Keymap to switch spelling language to both spanish and english lamw25wmal
vim.keymap.set("n", "<leader>mslb", function()
  vim.opt.spelllang = "en,es"
  vim.cmd("echo 'Spell language set to Spanish and English'")
end, { desc = "[P]Spelling language Spanish and English" })

Now I'm thinking of trying again setting vim.opt.spelllang = { "en,es" } and documenting better why I didn't like it, or why It didn't work for me


what is the lines-and-points api endpoint for and should it be used on the map view

the backend provides a couple of endpoints returning geojson data:

/api/ort-geojson and /api/fuzzy-ort-geojson which provide locations for places
/api/cones which provide the polygon for author perspectives (from location point where a text was written or an author situated, to spatial coverages
/api/spatialcoverage which are the actual polygon areas where ethnicities are located by certain authors

there is an additional /api/lines-and-points endpoint which is currently not used in the frontend map view. what is it? and should it be displayed?

yes.


Make command work with TablePlus installed different places

The Problem/Issue/Bug:
Some have TablePlus installed differently, in our case some used Setapp (https://setapp.com/), which installs the app in a different location.
When researching a more generic solution, all my testing showed that simply specifying the app name "TablePlus" should be enough, and it should launch regardless of install location.
Additionally, we have also included additional information in the query, so that TablePlus uses the project name and gets a grey color (maybe it should be a different color to differentiate it as a local db).
How this PR Solves The Problem:

Path to application removed in favor of App name.
The OS knows where the app is located, no need to keep track of it ourselves.

Manual Testing Instructions:
Automated Testing Overview:

Related Issue Link(s):
Release/Deployment notes:

I would very much like if other people on MacOS helps test that this doesn't break the command for them, on all the tests I've done with my colleagues it still works.

Please add extra locations, delimited by commas to HostBinaryExists
Please run make packr2 after your changes and check in the results.

Thanks!

Thanks :) Just did both, the make packr2 didn't seem to return any output other than the docker run command it uses, but it did make some changes to go.mod (included in the pull request update).
I hope this makes the checks succeed :)

Thanks so much for thoughtfully providing this in the first place. Maybe someday we can figure out how to find the app on macOS, and that would help things. I'm not even sure that things install into /Applications on non-English macOS.

The open command should accept just the application name instead of the full path if the application is properly installed, I know it works personally for a normally installed TablePlus, but there might be other ways to install it so it doesn't get properly registered with the OS and thus not able to be started without the full path.

I guess you're right. The thing then is how to detect whether it exists, to decide whether or not to show the command.

I guess we should have had a command like dbbrowser with subcommands for the various things. Then they could show under that. I just don't like to pollute the command namespace with every little thing people could use.

I completely agree, it would also mean you could end up with supporting 3rd party apps forever, leaving less and less time for work on what is actually important for ddev. I think it is fine to support the default and most common install location, but you shouldn't need to be responsible for every little need there might be, especially since the system you have in place already allow overwriting and modifying existing commands to fit ones needs.
I am sadly not aware of any decent way to find the path to an application, all I know use the same registry as the open command, so would be subject to the same issues.

TablePlus is quite a nice cross-platform tool too. I was really sad there was no way to launch it properly on Windows. Thought I was going to be able to just add some install locations and have it work on Windows, but no dice.

But the heidisql PR just went in, and it's nice for both Windows and WSL2.

I just stumbled over this pull request and I'm not sure why it was closed. On my MacBook Pro, TablePlus is also installed in /Applications/Setapp/TablePlus.app. So ddev currently can't detect that the app is present. I would love to have this great automatic TablePlus support for Mac and SetApp.

You know you can just change the shell command and remove the #ddev-generated from the top of it...

Thx a lot for the hit. I just modified ~/.ddev/commands/host/tableplus and now it works like a charm!

Thanks so much for thoughtfully providing this in the first place. Maybe someday we can figure out how to find the app on macOS, and that would help things. I'm not even sure that things install into /Applications on non-English macOS.

German mac here. It does. Mac OS does weird things by translating directory names in Finder 🙄  but thankfully not in the terminal.

And in case someone needs the content of ``, here it is, works for me:
#!/bin/bash

# Support for TablePlus, https://tableplus.com/
# This command is available if macOS and TablePlus is installed in the normal place
## Description: Run tableplus with current project database
## Usage: tableplus
## Example: "ddev tableplus"
## OSTypes: darwin
## HostBinaryExists: /Applications/TablePlus.app,/Applications/Setapp/TablePlus.app

set -x
query="mysql://root:root@<IP_ADDRESS>:${DDEV_HOST_DB_PORT}/db"

open "$query" -a "/Applications/Setapp/TablePlus.app/Contents/MacOS/TablePlus"

Thanks @rfay for the support! <3

Ah, I missed the context that this PR didn't actually go in. Sorry for the confusion.


knife block does not exist

Using the chefdk on mac os x using rvm, I find that when I do gem install knife-block that the executable is not in my path.
sowens-MBP:Devops sowen$ gem install knife-block
Successfully installed knife-block-0.1.1
Parsing documentation for knife-block-0.1.1
Done installing documentation for knife-block after 0 seconds
1 gem installed
sowens-MBP:Devops sowen$ knife block user list
FATAL: Cannot find sub command for: 'block user list'

I'm pretty new to chef, but I'm guessing this has something to do with the install location of the chefdk?
sowens-MBP:Devops sowen$ which knife
/opt/chefdk/bin/knife

Does this gem work with the most recent versions of chef?

use chef gem install knife-block
You will want to do this for all knife add ons

That worked, thanks. I had to use sudo. I'll open a pull request.

Actually that didn't work.
sowens-MBP:Devops sowen$ sudo knife block list -VV
INFO: Using configuration from /Users/sowen/.chef/knife.rb
/Users/sowen/.chefdk/gem/ruby/2.1.0/gems/knife-block-0.1.1/lib/chef/knife/block.rb:16:in `get_config_file': undefined method `locate_config_file' for Chef::Knife:Class (NoMethodError)
	from /Users/sowen/.chefdk/gem/ruby/2.1.0/gems/knife-block-0.1.1/lib/chef/knife/block.rb:38:in `chef_config_base'
	from /Users/sowen/.chefdk/gem/ruby/2.1.0/gems/knife-block-0.1.1/lib/chef/knife/block.rb:75:in `check_block_setup'
	from /Users/sowen/.chefdk/gem/ruby/2.1.0/gems/knife-block-0.1.1/lib/chef/knife/block.rb:142:in `run'
	from /opt/chefdk/embedded/apps/chef/lib/chef/knife.rb:417:in `block in run_with_pretty_exceptions'
	from /opt/chefdk/embedded/apps/chef/lib/chef/local_mode.rb:38:in `with_server_connectivity'
	from /opt/chefdk/embedded/apps/chef/lib/chef/knife.rb:416:in `run_with_pretty_exceptions'
	from /opt/chefdk/embedded/apps/chef/lib/chef/knife.rb:213:in `run'
	from /opt/chefdk/embedded/apps/chef/lib/chef/application/knife.rb:139:in `run'
	from /opt/chefdk/embedded/apps/chef/bin/knife:25:in `<top (required)>'
	from /opt/chefdk/bin/knife:40:in `load'
	from /opt/chefdk/bin/knife:40:in `<main>'

I don't know why it is looking for ruby 2.1.0 since I'm using ruby 2.2
rvm list
Warning! PATH is not properly set up, '/Users/sowen/.rvm/gems/ruby-2.2.0/bin' is not at first place,
         usually this is caused by shell initialization files - check them for 'PATH=...' entries,
         it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
         to fix temporarily in this shell session run: 'rvm use ruby-2.2.0'.

rvm rubies

   ruby-2.0.0-p598 [ x86_64 ]
=* ruby-2.2.0 [ x86_64 ]

# => - current
# =* - current && default
#  * - default

Perhaps this gem doesn't work with rvm or because I installed with sudo
sowens-MBP:Devops sowen$ chef gem install knife-block
Fetching: knife-block-0.1.1.gem (100%)
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied @ rb_sysopen - /Users/sowen/.chefdk/gem/ruby/2.1.0/cache/knife-block-0.1.1.gem

I tried uninstalling and reinstalling this gem, making sure that the chefdk was at the front of my path.
sowens-MBP:.chef sowen$ chef gem install knife-block
Fetching: knife-block-0.1.1.gem (100%)
ERROR:  While executing gem ... (Errno::EACCES)
    Permission denied @ rb_sysopen - /Users/sowen/.chefdk/gem/ruby/2.1.0/cache/knife-block-0.1.1.gem
sowens-MBP:.chef sowen$ sudo !!
sudo chef gem install knife-block
Password:
sowens-MBP:.chef sowen$ which chef
/opt/chefdk/bin/chef
sowens-MBP:.chef sowen$ sudo chef gem install knife-block
Password:
WARNING:  You don't have /Users/sowen/.chefdk/gem/ruby/2.1.0/bin in your PATH,
	  gem executables will not run.
Successfully installed knife-block-0.1.1
1 gem installed

sowens-MBP:.chef sowen$ knife block
ERROR: knife encountered an unexpected error
This may be a bug in the 'block' knife command or plugin
Please collect the output of this command with the `-VV` option before filing a bug report.
Exception: NoMethodError: undefined method `locate_config_file' for Chef::Knife:Class

I'm not sure it is possible to install this gem on Mac using the chefdk and RVM.

I'm working on getting master working again, I've gotten Travis-CI testing with ChefDK + 2.1](https://github.com/knife-block/knife-block/pull/35), and I'm gonna see if I can get the Travis OSX build support enabled, so I can include OSX + RVM testing.
Please stay tuned!


[release]: OpenSearch Migrations - v0.2.0 - Historical Fetch Migrations

Did you read the on-boarding document
I reviewed this document but not sure if the procedures apply in this the migrations repo is not a plugin.
What is the name of your component?
OpenSearch Migrations
What is the link to your GitHub repo?
https://github.com/opensearch-project/opensearch-migrations
Targeted release date
10/04 - Fetch Migrations with Capture and Replay Updates
Where should we publish this component?
9/13 - Beta Release for Capture and Replay
9/27 - Beta Release for Historical Fetch with Capture and Replay updates
10/27 - Complete Migration Life Cycle
11/27 - AWS Solutions Library Release
What type of artifact(s) will be generated for this component?
At present, we release only tarballs and zip files for the migration repo. We would like these to be PGP signed, and for these artifacts to be referenced on this page: https://opensearch.org/downloads.html.
Ideally, there should be a mechanism that allows us to redirect users to the latest version of the tooling, as this tooling will not be tied to a specific OpenSearch release."
Have you completed the required reviews including security reviews, UX reviews?
Security review has been completed for first release. Second security review to be completed by 10/27.
Given that this tooling is command line driven no UX review is needed.
Have you on-boarded automated security scanning for the GitHub repo associated with this component?
Yes.
Additional context
This issue is a followup to https://github.com/opensearch-project/opensearch-build/issues/4000.

Hi @sumobrian,
Couple of questions:

I saw the documented process for previous release (0.1.0) and we only signed and released tarball. I believe that's what we want to do?
Will we be always releasing only tarballs or is there a possibility of another artifact in future?

For

The process will be the same for the next several releases. Meaning, we will continue to release tarballs. Eventually we will include other artifacts such as docker images and possibly release some of the components as jars but that's tbd.

Hey @sumobrian I assume you also want to onboard to one click process and release once the repo has a new tag, something like https://github.com/opensearch-project/opensearch-migrations/archive/refs/tags/0.2.0.tar.gz?

@sumobrian, the 1-click process is onboarded now. Pls feel free to open a new issue if required.


Updated syntax to work with Postmark's Spamcheck API

Hi @connorqmoore thanks for the contribution. It seems like the PR mainly changed the code style. Does the current code from master not work?

Yeah I was confused why but this syntax change seemed to make the API stop
throwing an error. Unfortunately I ended up changing around the content and
it looks like something stopped working on their API. No matter what I put
for email content it returns a score of 7.9...
On Monday, May 9, 2016, Fabio Fleitas<EMAIL_ADDRESS>wrote:

Hi @connorqmoore https://github.com/connorqmoore thanks for the
contribution. It seems like the PR mainly changed the code style. Does the
current code from master not work?
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/Tesorio/spamcheck-python/pull/1#issuecomment-217931625

--
Connor Moore
B.S. in Information Systems 2017
Carnegie Mellon University

I keep getting a 500 error on both master branch and your PR. Not sure how to diagnose the issue.

Hmmm. Yeah I think something is up with the API. O well.
On Tuesday, May 10, 2016, Fabio Fleitas<EMAIL_ADDRESS>wrote:

I keep getting a 500 error on both master branch and your PR. Not sure
how to diagnose the issue.
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/Tesorio/spamcheck-python/pull/1#issuecomment-218245192

--
Connor Moore
B.S. in Information Systems 2017
Carnegie Mellon University


Add ingressgateway for grafana

This PR makes it possible to configure an ingress gateway for accessing the grafana dashboard. As part of adding the gateway, the PR also enables the ability to add user/pass for grafana (by enabling security). This allows restricting access while exposing grafana.
cc: @costinm

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: douglas-reid
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

install/OWNERS [douglas-reid]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Please advise on a common gateway, etc.

@douglas-reid: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/e2e-bookInfoTests-v1alpha3.sh
272c94618fc6f92018051992e3d91b18e93bc3c3
link
/test e2e-bookInfo-envoyv2-v1alpha3

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

@douglas-reid: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/e2e-bookInfoTests-v1alpha3.sh
272c94618fc6f92018051992e3d91b18e93bc3c3
link
/test e2e-bookInfo-envoyv2-v1alpha3

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.


Is it possible to implement the alias for the router?

In my application there is a route like this:
//  /users/:id
Route.resource('users', 'UsersController')
// /users/:users_id/pages/:id
Route.resource('users.pages', 'PagesController')

Is there a way to create a alias route for /users/:id? I want to create such a route that will correspond to the current user, and reproduce the structure of the nested routes. Thus, routes
/users/current
/users/current/pages/:id

Will correspond
/users/111
/users/111/pages/:id

or
/users/222
/users/222/pages/:id

Depending on which user is authorized

Hey @cawa-93 !
This feature is not implemented in the current version of Adonis.
Mind creating a PR to add it?

I don't think a PR for this is required, since adding user login logic to routes is not going to work. If you need users/current.

Create a route
Guard it with auth middleware
Return the user profile from the session user.

Route.get('users/current', function * (request, response) {
  const user = yield request.auth.getUser()
  response.send(user)
}).middleware('auth')

User got pages?
Route.get('users/current/pages/:id', function * (request, response) {
  const user = yield request.auth.getUser()
  const pageId = request.param('id')

  const pages = yield user.pages().where('id', pageId).fetch()
  response.send(pages)
}).middleware('auth')

Closing since actionable


[BUG] Binary not available in Releases

Describe the bug
The README says:

If you don't want to install using npm you can download the binary from GitHub releases.

But I can only see the binary in the first three releases and not in the more recent ones.

Thank you @andrzej-stencel this project was using bun for creating the binary and then we moved to npm. I'll look into it.


XArray interface dimension_values returns data in wrong order

The XArray interface that was added in 1.6 returns the data in the wrong order when requesting the flat representation using the dimension_values method, causing most Element types to be displayed in the wrong way.

Fixed in PR mentioned above. Closing.


I got an error 'TypeError: Right-hand side of 'instanceof' is not an object' when using the sign() function. Here is the code I am using:

        const jwt = require('jsonwebtoken');

const payload = {
resource: { question: 65  },
params: {},
exp: Math.floor(Date.now() / 1000) + (60 * 60)
};
const secretKey = '9bd3717297e6ef69383e2f7999eb7131448e3333f74fa613a09677ca250408e2'; // Metabase的Secret Key
const token = jwt.sign(payload, secretKey);
This is the error message of the program：
"TypeError: Right-hand side of 'instanceof' is not an object"
How can I solve this problem? Looking forward to your reply💕

I have the same problem.
It seems to be version 9.0.0, at the moment I installed version 8.5.1 and it works fine

thanks,Following your suggestion, I solved the problem😘

Why is this closed? The solution is just a workaround

I was also having the same issue using 9.0.0. Downgrading to 8.5.1 fixed it for me as well. However, this issue should still be open.

Please reopen the issue. Downgrading is not a fix but just a workaround.

Downgrading let me only use sign(). If I want to verify I still get the same error
Also to note: On node the newest version works flawlessly but on bun only sign function works with jsonwebtoken version 8.5.1

+1

I have the same problem.
It seems to be version 9.0.0, at the moment I installed version 8.5.1 and it works fine

Its worked for me too thank you

I have the same issue. I installed version 8.5.1 and now it works.
The Issue should be opened until the documentation gets clear on how to generate a token with the latest version

Please reopen this!

@gtrgeg Could you reopen this?

I m having the same problem when using node 20, I tried downgrading to version 8.5.1 but it doesn't work for me

I m having the same problem when using node 20, I tried downgrading to version 8.5.1 but it doesn't work for me

Same here, i tried on 2 different node versions , 22.1.0 and 21.7.2
i get the same error.

I m having the same problem when using node 20, I tried downgrading to version 8.5.1 but it doesn't work for me

Same here, i tried on 2 different node versions , 22.1.0 and 21.7.2
i get the same error.

I ended replacing the library with jose. It fixed the issue

But, this library is very widely used. Can we expect a permanent solution?

Still experiencing this issue. Any new fixes?


Feature/skip describe standalone

Motivations
Goblin is inspired by Mocha, and Mocha has a set of functions that allows you to skip tests.
Goblin supports skipping with Xit().
Xit("skip this", func(){})

Mocha allows you to invoke tests with a skip() function:
it.skip("skip this", function(){})

Since Go does not allow us to have a struct and a function with the same name we cannot have
g.It()// It is a function attached to the G struct
g.It.Skip() // It is a nested struct in G

Alternatively, and as a way to set up skipping It tests in a future PR, we can follow this pattern:
// skip this It test
g.Skip.It("skip this", func(){})
// skip all tests in this block
g.Skip.Describe("skip these", func(){
  g.It("skip this", func(){})
})

Changes made

Add the ability to skip all tests within a describe block if it was added using g.Skip.Describe().
The before and after hooks on a skipped test in this Skip.Describe block behave the same way as g.Xit() tests - they do not run. Each Describe and It block within a Skip.Describe() will be logged in yellow.

Add a test for g.Skip.Describe()

Alternatives considered:
Tried adding a new struct Xdescribe which holds Describe.
The issue I ran into when trying to implement this is that each It and Describe block currently has a .parent field which references a *Describe block.
That would require a big refactor to convert every Describe and Xdescribe block to implement the same interface so that the .parent in every It and Describe will refer to this interface like Runnable().
I am not completely clear if this will work, but looking for feedback if you guys think this is the preferred solution @marcosnils @xetorthio

bumping this pr


external extractor

when use :binwalk -Me file.bin --run-as=root  , The following alarm message appears, and the file is not decompressed correctly.
WARNING: Extractor.execute failed to run external extractor '7z e -y '%e'': 'module' object has no attribute 'DEVNULL', '7z e -y '%e'' might not be installed correctly
203           0xCB            LZMA compressed data, properties: 0xA2, dictionary size: 0 bytes, uncompressed size:<PHONE_NUMBER> bytes
WARNING: Extractor.execute failed to run external extractor '7z e -y '%e'': 'module' object has no attribute 'DEVNULL', '7z e -y '%e'' might not be installed correctly
8616          0x21A8          LZMA compressed data, properties: 0x5D, dictionary size: 8388608 bytes, uncompressed size: 97728 bytes
WARNING: Extractor.execute failed to run external extractor '7z e -y '%e'': 'module' object has no attribute 'DEVNULL', '7z e -y '%e'' might not be installed correctly
70016         0x11180         LZMA compressed data, properties: 0x5D, dictionary size: 8388608 bytes, uncompressed size: 2733760 bytes
WARNING: Extractor.execute failed to run external extractor 'unsquashfs -d 'squashfs-root' '%e'': 'module' object has no attribute 'DEVNULL', 'unsquashfs -d 'squashfs-root' '%e'' might not be installed correctly
WARNING: Extractor.execute failed to run external extractor 'sasquatch -p 1 -le -d 'squashfs-root' '%e'': 'module' object has no attribute 'DEVNULL', 'sasquatch -p 1 -le -d 'squashfs-root' '%e'' might not be installed correctly
WARNING: Extractor.execute failed to run external extractor 'sasquatch -p 1 -be -d 'squashfs-root' '%e'': 'module' object has no attribute 'DEVNULL', 'sasquatch -p 1 -be -d 'squashfs-root' '%e'' might not be installed correctly
WARNING: Extractor.execute failed to run external extractor 'mkdir 'squashfs-root' && mount -t squashfs '%e' 'squashfs-root'': 'module' object has no attribute 'DEVNULL', 'mkdir 'squashfs-root' && mount -t squashfs '%e' 'squashfs-root'' might not be installed correctly

The errors say you need to install sasquatch and 7zip. Have you tried that?
see the deps.sh script in this repo

We apologize for not being able to provide this information:

The tools needed in the alarm are installed normally by me as well as they are under the path of my system environment variables,
When he reported an error, I tried to cp these tools to the same directory as the tools installed in the deps.sh file of Binwalk, which is also the path of my environment variables, but it didn't work

Ok, well, let's look closely at the error

WARNING: Extractor.execute failed to run external extractor 'mkdir 'squashfs-root' && mount -t squashfs '%e' 'squashfs-root'': 'module' object has no attribute 'DEVNULL', 'mkdir 'squashfs-root' && mount -t squashfs '%e' 'squashfs-root'' might not be installed correctly

If I recall correctly, DEVNULL is an import from subprocess, intended to be used with functions like popen, so you can instruct it to use /dev/null for the stdin, stdout or stderr descriptors
It sounds like the import is failing. Are you on a system that does not have a /dev/null device?
I can't imagine any Python version removing this but I also haven't looked at 3.12, 3.11 subprocess docs

We apologize for not being able to provide this information:

The tools needed in the alarm are installed normally by me as well as they are under the path of my system environment variables,

When he reported an error, I tried to cp these tools to the same directory as the tools installed in the deps.sh file of Binwalk, which is also the path of my environment variables, but it didn't work

You realize that several of these tools have special patches applied, yes? When you say "installed normally", do you mean by following the steps in dep.sh, or do you mean using an OS package manager?
Either way, it seems like a waste of time trying to troubleshoot something that wasn't installed "properly". Sure, it's not rocket science cloning, patching and building a few packages- but you're bound to do something slightly differently than the script does, and then run into cases that mo other users have
Use the script and see if that helps

Finally, you should probably switch to https://github.com/OSPG/binwalk as this repository seems to now be officially moribund

As @mzpqnxow pointed out, Binwalk relies on external utilities to perform extraction. In this case though, the DEVNULL errors make it look like perhaps a Python versioning issue?
In either case, the Python version of binwalk is no longer supported. We recommend trying the latest Binwalk v3, which is Rust based. You will still need to have sasquatch installed to extract SquashFS images, but LZMA extraction is built-in and requires no external utilities.


Add random port instructions and logging

Note that Node.js allows for random port assignment by setting either explicit port env var to 0.
This is useful in scenarios where multiple echo containers are running in the same Docker network (e.g. a single HTTP/HTTPS port is in use, making the other one's assignment unimportant).
Also log the live selected ports on startup for accuracy when 0 is provided.

Hey there this doesn't seem to be working for me, could you show me how you did it.
I tried
docker run -e HTTP_PORT=0  -p 8080:8888 -p 8443:9999 --rm -t mendhak/http-https-echo:34

But it just says
Listening on ports 0 for http, and 8443 for https.

Hey there this doesn't seem to be working for me, could you show me how you did it.
I tried
docker run -e HTTP_PORT=0  -p 8080:8888 -p 8443:9999 --rm -t mendhak/http-https-echo:34

But it just says
Listening on ports 0 for http, and 8443 for https.

Ah, sorry - I missed the logging of these. Just added a commit to grab the ports from the listeners, seems to work:
❯ docker run -e HTTP_PORT=0 -e HTTPS_PORT=0 zalimeni-docker-http-https-echo:latest
Listening on ports 44997 for http, and 33983 for https.

❯ docker run -e HTTP_PORT=18080 -e HTTPS_PORT=18443 zalimeni-docker-http-https-echo:latest
Listening on ports 18080 for http, and 18443 for https.

❯ docker run zalimeni-docker-http-https-echo:latest
Listening on ports 8080 for http, and 8443 for https.

OK I understand a bit more now. It seems there is no way to curl to those ports, since Docker wants a fixed port, isn't that right. Hence the same network requirement.
Could you move the statement you added to the end of the section then, after the docker compose example.

@mendhak after some more testing, I realized the port conflict I was working around was really only an issue when using --net=container... to start additional containers sharing the same networking stack; I'd incorrectly assumed other use cases might benefit from random internal port assignment, but I've failed to come up w/ a realistic one.
That said, requested changes made to the branch (plus a small fix to avoid a null reference). Feel free to merge, but also no worries if you prefer to close this PR since the use case might be too niche to justify a README callout.
Either way, thanks for your review!

Hey same, I did think about it a while but IMO if I include that random port thing it might cause more confusion than some so I'll close the PR just to keep things simple. I do like the port and null check though so might include that later


⚠ Cioos National CKAN has degraded performance

In ce3bac5, Cioos National CKAN (https://catalogue.cioos.ca/) experienced degraded performance:

HTTP code: 200
Response time: 11321 ms

Resolved: Cioos National CKAN performance has improved in 63bf7a0 after 9 minutes.


Error: undefined method 'name' for UserStorableObject

Hi,
I don't know if this is a bug or just an incomplete example issue but I was trying to add UserStorableObject to my project but following the example in the README gave me Error: undefined method 'name' for UserStorableObject.
It seems like the example is missing a couple of properties in the UserStorableObject or did I miss something?
require "json"
require "kemal"
require "kemal-session"

Kemal::Session.config do |config|
  config.secret = "some_secret"
end

class UserStorableObject
  include JSON::Serializable
  include Kemal::Session::StorableObject

  # An error is raised without these lines
  # property id : Int32
  # property name : String

  def initialize(@id : Int32, @name : String); end
end

get "/set" do |env|
  user = UserStorableObject.new(123, "charlie")
  env.session.object("user", user)
end

get "/get" do |env|
  user = env.session.object("user").as(UserStorableObject)
  "The user stored in session is #{user.name}"
end

Kemal.run

You're right, the example is missing the `property's.


DTSPO-12023 Bump elasticsearch and ccd minimum chart versions

On hold till https://github.com/hmcts/nfdiv-case-api/pull/2800#issuecomment-1398127674 is resolved

On hold till hmcts/nfdiv-case-api#2800 (comment) is resolved

seems a localised issue and unrelated, https://github.com/hmcts/prl-ccd-definitions/pull/886 installed fine


add some acceptance tests

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.Stefan Pingel seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.You have signed the CLA already but the status is still pending? Let us recheck it.

Due to the problems with the CLA I created a second PR. All the issues that I commented on that I would fix them have been fixed in PR #41


Spelling mistake in email-link authentication alert box

Step 2: Describe your environment

Objective C or Swift: Swift
iOS version: 12.1
Firebase SDK version: 5.14.0
FirebaseUI version: 6.1.1
CocoaPods Version: 1.5.3

Step 3: Describe the problem:
Spelling mistake in 'Sign-in email Sent' alert box, where 'instrucitons' should be 'instructions'.
Steps to reproduce:

Choose email-link authentication
Provide an email and tap 'Next'

I'll just take it


[Snyk] Security upgrade nginx from 1.23.3 to 1.25.5

This PR was automatically created by Snyk using the credentials of a real user.Keeping your Docker base image up-to-date means you’ll benefit from security fixes in the latest version of your chosen image.
Changes included in this PR

infra/Dockerfile

We recommend upgrading to nginx:1.25.5, as this image has only 102 known vulnerabilities. To do this, merge this pull request, then verify your application still works as expected.
Some of the most important vulnerabilities in your base image include:

Severity
Priority Score / 1000
Issue
Exploit Maturity

714
Out-of-bounds Write SNYK-DEBIAN11-CURL-5955037
No Known Exploit

829
Out-of-bounds Write SNYK-DEBIAN11-GLIBC-5927133
Mature

829
Out-of-bounds Write SNYK-DEBIAN11-GLIBC-5927133
Mature

829
Out-of-bounds Write SNYK-DEBIAN11-LIBWEBP-5893094
Mature

829
Resource Exhaustion SNYK-DEBIAN11-NGHTTP2-5953384
Mature

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
🛠 Adjust project settings

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Resource Exhaustion

@Dale-iohk , do you know about those checks and how to resolve them?

@Dale-iohk , do you know about those checks and how to resolve them?


Parsing Issue for Multi Transaction Proposal Details / List

Related to this comment:
https://github.com/decent-dao/fractal-interface/pull/805#issuecomment-1353405890
@Da-Colon @tbwebb22

This was discussed in chat and will hold off on any changes at the moment.


Match all tokens should look in different keys as well.

From what I understand using tokenize with match all tokens currently forces a match of all tokens on the same key. Would it be possible to force a match of all tokens across any keys of a single match?
e.g.
     {
        title: "Old Man's War",
        author: {
          firstName: "John",
          lastName: "Scalzi"
        }
     }

searching for Old War will match this record, but Old War John will not.
This would be useful in searches where you want two or more attributes of a record to match.
i.e.
{
    jobtitle: 'Lawyer',
    country: 'France'
},
{
    jobtitle: 'Developer',
    country: 'France'
}

There should be a way for a search to return only the first record when search for "lawyer france"

Interesting. Need think on this some more 😅.

I've hit the same problem and am currently working around by using my own getFn which simply bangs all fields together into a single string ... this requires another hack, where I allow multiple fields to be specified in a single key, separated by ",".

 That's something that could potentially become a feature.

Show us the code!

https://github.com/TheDiveO/TwFusejs/blob/master/src/tiddlers/system/plugins/TheDiveO/TwFusejs/getfns/multipath.js ... very simple wrapper doing the fusion into a single item,
https://github.com/TheDiveO/TwFusejs/blob/master/src/tiddlers/system/plugins/TheDiveO/TwFusejs/libs/deep.js ... is a reimplementation of the Fuse.js internal deepValue function, which is otherwise inaccessible to, unless I try to play tricks.

One downside I see is that reporting hit ranges will not work, because these relate to the virtual combined item, not the real key items.

Could really use this feature for my current project! Would love to see it implemented.

This would be really helpful

Any update on this? I think searching across fields would be a common task like the examples stated above by @masimplo and I'm not sure if my solution would be a recommended implementation based on best practices.
Between @TheDiveO's solution with the getFn and this on StackOverflow https://stackoverflow.com/questions/51187276/fuse-js-retrieve-records-which-exactly-match-a-multiple-word-search that adds a keywords field as an array of the desired search fields, the solution that worked for me was a combination.
I memoized my search list with a new field "keywords" as an array of the search fields concatenated by a space in different orders.
Example:
const list = [{
    title: "Old Man's War",
    author: {
        firstName: "John",
        lastName: "Scalzi"
    }
}];

would be defined to Fuse instead as
const newList = [{
    title: "Old Man's War",
    author: {
        firstName: "John",
        lastName: "Scalzi"
    },
    keywords: [
        "Old Man's War John Scalzi",
        "John Scalzi Old Man's War"
    ]
}];

by doing
const newList = list.map((item) => ({
    ...item,
    keywords: [
        `${item.title} ${item.author.firstName} ${item.author.lastName}`,
        `${item.author.firstName} ${item.author.lastName} ${item.title}`
    ]
}));

I found that an array of just the search fields without concatenating them did not work when I tried it. For example, it did not work when I did this:
const newList = list.map((item) => ({
   ...item,
    keywords: [item.title, item.author.firstName, item.author.lastName]
}));

I found that my search word order would matter without having the order combinations in the keywords array.
For example, "lawyer france" would not match if I defined the keywords field with only ${item.country} ${item.jobtitle} unless I also added ${item.jobtitle} ${item.country} as well. This way, searches as either "lawyer france" or "france lawyer", would return the expected match.
{
    jobtitle: 'Lawyer',
    country: 'France'
}

In my opinion, this only works for minimal fields as order combinations would grow exponentially, and,
as @TheDiveO mentioned, the downside is location matching/highlighting will be different if it's a concern.
Also, I'm not sure if there are any Fuse options that would have allowed my solution to work differently, but they were left as their defaults.

For anyone who ends up here from a google search or otherwise, we ended up taking a different approach in https://github.com/sparkletown/sparkle/pull/1460 (thanks to @yarikoptic's awesome work debugging, exploring, and refining this)
We basically split our search query using regex (tokeniseStringWithQuotesBySpaces), to tokenise each individual word, but keep words that are between " and " as a single token):
https://github.com/sparkletown/sparkle/blob/c0e7e40fe7a18db916eae9c48fc4e966f099642e/src/utils/text.ts#L1-L12
/**
 * Split the provided string by spaces (ignoring spaces within "quoted text") into an array of tokens.
 *
 * @param string
 *
 * @see https://stackoverflow.com/a/16261693/1265472
 *
 * @debt Depending on the outcome of https://github.com/github/codeql/issues/5964 we may end up needing to change
 *   this regex for performance reasons.
 */
export const tokeniseStringWithQuotesBySpaces = (string: string): string[] =>
  string.match(/("[^"]*?"|[^"\s]+)+(?=\s*|\s*$)/g) ?? [];

With our standard Fuse config:
https://github.com/sparkletown/sparkle/blob/c0e7e40fe7a18db916eae9c48fc4e966f099642e/src/hooks/posters.ts#L72-L87
But then use our tokeniser + customised Fuse query (using $and to join each of our tokens, then $or for the different fields) for the search:
https://github.com/sparkletown/sparkle/blob/c0e7e40fe7a18db916eae9c48fc4e966f099642e/src/hooks/posters.ts#L90-L115
const tokenisedSearchQuery = tokeniseStringWithQuotesBySpaces(
  normalizedSearchQuery
);

if (tokenisedSearchQuery.length === 0) return filteredPosterVenues;

return fuseVenues
  .search({
    $and: tokenisedSearchQuery.map((searchToken: string) => {
      const orFields: Fuse.Expression[] = [
        { name: searchToken },
        { "poster.title": searchToken },
        { "poster.authorName": searchToken },
        { "poster.categories": searchToken },
      ];

      return {
        $or: orFields,
      };
    }),
  })
  .map((fuseResult) => fuseResult.item);

Is this lib not maintained anymore? I cant believe that 4 years passed and this is still not implemented, this issue is even not open lol. I think proposed solutions, when you have to assemble keyword field yourself, really defeats the purpose of consuming this lib at all.

Another 2 years passed by and I guess it's still not there


[FEATURE] The Comparison Operator assumes elementwise comparisons

We spend time and memory building lists to compare against, and then discard all except the first entry.
Example:
    elif operator == "NotLike":
        # MODIFIED FOR OPTERYX - see comment above
        _check_type("NOT LIKE", identifier_type, (TOKEN_TYPES.VARCHAR))
        matches = compute.match_like(arr, value[0])
        matches = compute.fill_null(matches, True)
        return numpy.invert(matches)

The value list only uses the first item. LIKE, ILIKE etc are never elementwise, so we don't need to waste time and memory building the list.

I think the solution should be for the expression engine to not expand LITERALS to the number of rows in the table, this will have two consequences:

if it is being used to add a column to a table, this should detect scalars and expand them
if being used in functions that are elementwise, this will need to expand the list


Custom ControlPanelControl

Control Panel where we can add items like opacity slider, color switcher, layer visibility and text, ...

The idea of this panel is that you can add any kind of element to it.


series-lines - axis auto scaling

Version
4.8.0
Reproduction link
https://codepen.io/cyric/pen/OJNpLxJ
Steps to reproduce
Use series-lines with default or "dataMin"/"dataMax" values for the xAxis/yAxis "min"/"max" fields.
What is expected?
I expected series-lines to work like series-scatter or series.line, which allows default or "dataMin"/"dataMax" values.
What is actually happening?
The default or dataMin/dataMax values are being ignored, must explicitly set min/max fields.

When using series-lines, the default/'dataMin'/'dataMax' settings for the xAxis and yAxis 'min'/'max' fields are not respected, must explicitly set both "min" and "max" fields. Since series-lines uses a different format for the data field, I'm unsure whether it is supposed to work like series-scatter and series-line or not. I couldn't find anything in the documentation to say it's not supported. I have a large variable set of data, and it's problematic not having the yAxis rescale automatically as I zoom in and out using dataZoom on the xAxis.

Experiencing the same issue. I am needing to draw multiple dotted lines or a single line that is broken up. I switched from a scatter plot with the dots being calculated to a 'lines' series and now the zoom doesn't respect this data.


Feature Request: Feature Alias

Problem
When we choose to use features through classes created with pennant:feature, the feature name is composed of the class name: App\Features\NewDashboard, so when we need to check the feature we need to use the reference to the class:
use App\Features\NewDashboard;
use Laravel\Pennant\Feature;

Feature::active(NewDashboard::class);

The main problem with this is when we need to check the feature through the blade directives: 🥵
@feature(\App\Features\NewDashboard::class)

Solution
Considering the class name as a string, it would be possible to generate an alias name from the class name to enable an easier way to reference the feature without having to use the format mentioned above, that way we could interact with the feature in a similar way to when we define it via AppServiceProvider, without using classes.
Class: ...\NewDashboard::class 👉🏻 new-dashboard
Class: ...\Vip\NewDashboard::class 👉🏻 vip.new-dashboard
Usage
use Laravel\Pennant\Feature;

Feature::active('new-dashboard');
Feature::active('vip.new-dashboard');

@feature('new-dashboard')
@feature('vip.new-dashboard')

Default Alias
The stub for features generated from pennant:feature could contain the $alias property with the proposed alias value of the feature, according to the class name:
namespace App\Features;

class NewDashboard
{
    /**
     * The default alias.
     *
     * @var string
     */
    protected string $alias = 'new-dashboard';

    // ...

Observations:

The null value or the removal of $alias property could be an option to ignore (don't generate) alias.
The alias can be a database column or not, according to what the Laravel team decides.

Easy Way
Perhaps if something like this were possible it would result in the suggestion above 👇🏻
use Laravel\Pennant\Feature;
use App\Features\NewDashboard;

Feature::define('new-dashboard', NewDashboard::class);
// or ...
Feature::alias('new-dashboard', NewDashboard::class);

Final Words
We know that it is possible to do all of the above mentioned when we choose not to use classes for the features, but this ends up making the AppServiceProvider with a lot of definitions or that we need to create a specific ServiceProvider for this.

Hope this helps,
Thanks.

@devajmeireles I think this is already possible. You need to ensure that the class is being registered either explicitly via...
use App\Features\NewDashboard;

Feature::define(NewDashboard::class);

or conventionally via...
Feature::discover();

Then add a public "name" property to the feature with your alias.
namespace App\Features;

class NewDashboard
{
    public $name = 'new-dashboard';

    // ...
}

Please let me know if this doesn't work and we can open this one up and take another look.

For anyone coming across this issue. Tim's suggestion works.
Laravel Pennant v1.5.0

🥳

Created a pull request to add it to the docs.
https://github.com/laravel/docs/pull/9090


[FIX] fix transform_cigar_right_into_insertion if ref_pos == until.

fixes #23

by the way, you dont handle X and = in sviper right?

no currently only simple cigar strings are allowed


Nothing rendered in window after MacPorts migration on Mojave

Versions

Python: 3.5.6
OS: MacOS 10.14 (Mojave)
Kivy: 1.10.1
Kivy installation method: MacPorts (and pip)

Description
I've been using Kivy for a while and it has been working for me. I updated my iMac to Mojave a week or two ago. I believe my kivy apps were still working after the update. Yesterday I migrated MacPorts to Mojave (MacPorts version 2.5.4) and now kivy isn't working for me any more. The application launches and a window appears with the correct title in the title bar, but nothing is rendered in the window itself. This isn't just my applications either. It happens using the Hello, World example shown here https://kivy.org/doc/stable/guide/basic.html.
I've uninstalled and reinstalled the ports a few times and it didn't help. I've also tried installing kivy using pip instead of MacPorts and it doesn't work there either. This is with kivy 1.10.1.
Code and Logs
import kivy
kivy.require('1.0.6') # replace with your current kivy version !

from kivy.app import App
from kivy.uix.label import Label

class MyApp(App):

    def build(self):
        return Label(text='Hello world')

if __name__ == '__main__':
    MyApp().run()

This is from the log file when I run the Hello, World script.
[INFO   ] Logger: Record log in /Users/durian/.kivy/logs/kivy_18-10-10_0.txt
[INFO   ] Kivy: v1.10.1
[INFO   ] Python: v3.5.6 (default, Oct  3 2018, 19:57:36)
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1<IP_ADDRESS>)]
[INFO   ] Factory: 194 symbols loaded
[INFO   ] Image: Providers: img_tex, img_imageio, img_dds, img_sdl2, img_pil, im
g_gif (img_ffpyplayer ignored)
[INFO   ] Text: Provider: sdl2
[INFO   ] Window: Provider: sdl2
[INFO   ] GL: Using the "OpenGL ES 2" graphics system
[INFO   ] GL: Backend used
[INFO   ] GL: OpenGL version <b'2.1 NVIDIA-12.0.19 3<IP_ADDRESS>.10.103'>
[INFO   ] GL: OpenGL vendor <b'NVIDIA Corporation'>
[INFO   ] GL: OpenGL renderer <b'NVIDIA GeForce GTX 775M OpenGL Engine'>
[INFO   ] GL: OpenGL parsed version: 2, 1
[INFO   ] GL: Shading version <b'1.20'>
[INFO   ] GL: Texture max size <16384>
[INFO   ] GL: Texture max units <16>
[INFO   ] Window: auto add sdl2 input provider
[INFO   ] Window: virtual keyboard not allowed, single mode, not docked
[INFO   ] Base: Start application main loop
[INFO   ] GL: NPOT texture support is available

I've installed mojave freshly and it doesn't work either.

I did observe the same issue using Kivy 1.10.1 installed via homebrew on Mac OS 10.14 (Mojave). What I also found is that resizing the root widget causes the previously invisible widgets to become visible.

Same issue for me. Kivy installed via MacPorts. As with huth314, resizing or swiping does cause my invisible widgets to appear.

Same thing here.
MacOS Mojave 10.14
Python 3.7.0, installed using homebrew
Kivy 1.10.1, installed using pip
At startup - black screen, after resize - widgets become visible.

I can confirm that installing a newer sdl library fixed this problem. In my case, using MacPorts, I did a 'port selfupdate' followed by 'port upgrade outdated'. After that my kivy applications started appearing again.

I can confirm that mdurian's fix worked for me as well using MacPorts.

@mdurian 's approach (reinstall sdl2 with --HEAD option) did not work for me. I still have to resize to get to see the widgets.
MacOS Mojave 10.14.1
Python 3.7.0 installed via homebrew
Kivy 1.10.1 installed via pip3

To clarify my previous post...hope this helps.
MacOS Mojave 10.14.1
Python 2.7.15 installed via MacPorts
Kivy 1.10.1 installed via MacPorts

@huth314 I have a a similar setup and managed to fix this!
macOS 10.14.1
Python 2.7.15 installed via pyenv (installed via Homebrew)
Kivy 1.10.1 installed via pip (within a pyenv-virtualenv)
I believe this issue is resolved in SDL 2.0.9 but there is an upstream issue with the sdl2 formula for older versions of macOS. We have to wait until this gets fixed before SDL 2.0.9 is available via brew.
For now, you can use the HEAD version of SDL2 via brew. This is what worked for me...
$ brew uninstall sdl2 sdl2_image sdl2_ttf sdl2_mixer
$ brew install --HEAD sdl2
$ brew install sdl2_image sdl2_ttf sdl2_mixer
$ pip install --no-binary Kivy Kivy

Using the binary package from pip did not work so I had to add the --no-binary Kivy argument to force pip to build Kivy from source.
Hope this helps!

Yep, just reinstall sdl and it's OK!


Add data in suburban Atlanta

Looks like data missing around:

[x] Marietta city: https://github.com/openaddresses/openaddresses/pull/2500
[ ] Cobb county (Marietta is seat?): https://github.com/openaddresses/openaddresses/issues/2497
[ ] Decator
[ ] to the south

Exurbs of Atlanta:

[ ] Jackson County, GA https://github.com/openaddresses/openaddresses/issues/2604

It looks like all the issues linked to the tasks above have been resolved


PyGATT / Cross Platform Compatibility

Do you think, PyGATT could be used instead of bluez' gatttool?
They state Python 2 as a requirement, but pip let me install it anyway - maybe their README didn't get updated. This would have the added benefit of windows compatibility (at least, I hope it would).

I haven't tried PyGATT so far. But taking a look at the source code, you see that there are a lot of subprocess.Popen() calls. You can change these calls with whatever you want e.g. PyGATT. Just make sure that the  payload stays the same.

Hello mpex I try your python script to run with raspberry pi and open new terminal and insert the comand. gatttool -b "00:1A:22:06:1C:D5" --char-write-req  -a "0x0411"  -n "4501"  and is showing to the terminal Characteristic value was written successfully

Nothing happened for trv thermostatic valve no boost

I have raspberry pi 3 and have be and MI thermostatic radiator is https://www.ebay.co.uk/itm/2-x-Bluetooth-Programmable-Thermostatic-Radiator-Valve-TRV-HEAD-ONLY-EQ3B-/283029728088?hash=item41e5e2eb58

I don't know how to pair raspberry pi 3 with eq3 ;

Hello mpex I try your python script to run with raspberry pi and open new terminal and insert the comand. gatttool -b "00:1A:22:06:1C:D5" --char-write-req -a "0x0411"  -n "4501" and is showing to the terminal Characteristic value was written successfully

hi,
the command you sent, 4501, should be sent as hexadecimal (0x4501), a char "4501" or int?
I am trying to do it with an esp32 - but still without luck.
all the best!!


Write Metadata hosting service for Tests

When registering dreps or creating proposals for tests, Metadata json must be publicly hosted.
We need a service to host those data.
Why
Using a metadata host service for testing instead of mock will make sure that the metadata-fetching, indexing  or validating components of govtool are functioning properly.
Here is a deployed service URL:
https://metadata.cardanoapi.io/docs/

PR is ready with the changes: https://github.com/IntersectMBO/govtool/pull/930


Feature suggestion: FOV changer

would it be possible to add a viewmodel fov changer?

good day sir just a clarification i asked for a VIEWMODEL fov changer as in how close/far the gun model and hands are from the screen.
not actual field of view


Weird pattern on 32x32 panel

On trying out the pattern_test, I am getting the following result:

I have tried iterating through different combinations of following:
MuxPattern {BINARY, STRAIGHT}
ScanPattern {LINE, ZIGZAG,ZZAGG, ZAGGIZ, WZAGZIG, VZAG, ZAGZIG}
setRotate {true, false}
setFlip {true, false}
Is it just a weird panel or am I missing anything? I would truly appreciate any help around this :)
Setup:
ESP32, P6 32x32: 1/8 scan, PxMatrix 1.8.1
PS:  I vaguely remember being able to run it without any issues with RPi few years back.

Hello There.. Would you show the wiring in the Back?


Address clean up from Nominatim

In the legacy vue frontend, we stripped some parts of the address from Nominatim:
https://github.com/Couchers-org/couchers/blob/f95e212833a84d9c470e73530f78587676befc02/app/vue/src/components/EditableLocation.vue#L316-L334
This makes the display addresses a bunch nicer, so instead of:
Forbes Street, Macdonaldtown, Newtown, Sydney, Council of the City of Sydney, New South Wales, 2006, Australia
500, West 120th Street, Morningside Heights, Manhattan Community Board 9, Manhattan, New York County, New York, 10027, United States

We have:
Macdonaldtown, Sydney, Australia
Morningside Heights, Manhattan, New York, United States

The problem with this approach is that if we search for example "fa" we will get Italy, because there is a village named "Faedo", which is not really user-friendly. Therefore it should be done by query params to Nominatim, not filtered afterwards. Will take look into Nominatim docs. Also, maybe we should include villages as well? ;)


add new GitHub action to cover cases when JarLocation/PyLocation/GoLocation is specified

as mentioned in #314, we can use skywalking-e2e-infra to support this action. I will first setup the basic framework for this.

I have done the main work, but I found that the action does not work properly in the environment provided by GitHub, but it works in the local and in the self-hosted runner...it's weird.
run on GitHub: https://github.com/tpiperatgod/function-mesh/actions/runs/2599914361
run on self-hosted runner: https://github.com/tpiperatgod/function-mesh/actions/runs/2599816397
If this issue is still unresolved in the next few days, I would prefer to use the kubectl wait command instead of skywalking-e2e-infra to optimize the ci workflows...

seems like it timed out, maybe can retry for several times

seems like it timed out, maybe can retry for several times

I've tried but failed...
I plan to keep skywalking-e2e-infra as a local e2e tests framework, what do you think? 🫠

seems like it timed out, maybe can retry for several times

I've tried but failed...
I plan to keep skywalking-e2e-infra as a local e2e tests framework, what do you think? 🫠

what does the local mean? it won't be triggered by GitHub actions but can be run manually in our local environment?

what does the local mean? it won't be triggered by GitHub actions but can be run manually in our local environment?

yes, just type a command like make e2e

I'm ok with that


Revert "fix: Ignore index for multi-file datasets in distributed mode"

Reverts aws/aws-sdk-pandas#2266

AWS CodeBuild CI Report

CodeBuild project: GitHubDistributedCodeBuild6-jWcl5DLmvupS
Commit ID: 257cb8ec17c775ac67f046be07288e202baa781a
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

AWS CodeBuild CI Report

CodeBuild project: GitHubCodeBuild8756EF16-4rfo0GHQ0u9a
Commit ID: 257cb8ec17c775ac67f046be07288e202baa781a
Result: SUCCEEDED
Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository


Accessibility issues on the community-list page

Describe the bug
The community list page (/community-list) has some serious challenges regarding accessibility.

Improper heading structure: The issue that drew my attention initially was that the headings are not properly nested. The page lacks a h1 at all. The title at the top of the page is an h2, and then each community on the page is a h5.
Keyboard navigation: Expanding any of the communities on the page resets the focus back up to the top of the list. When this happens there is no visual indicator of where the focus has gone.
Screen reader support. I tested the page in the NVDA screen reader and ran across a number of issues.

Telling the software to read the entire contents of the page reads only the first item in the list and then skips to the bottom of the page.
The expand / collapse buttons aren't consistently read out loud. It seems like it will read the first one but doesn't announce the others at all.
The nested structure of the list isn't communicated at all.

To Reproduce
Steps to reproduce the behavior:

Visit the community list page
Try to interact with the community list using keyboard controls only, tabbing through the list and using the space / enter keys to expand communities
Try to read the full community list aloud with the NVDA screen reader
Try to interact with the community list controls using the NVDA screen reader

Expected behavior

If you're going to use headings for the community / collection names at all (I don't think it's really necessary), then they should be hierarchical starting with h1 and then descending down the heading order as necessary, with h2s for each top level community, h3's below each of those and so on.
You should be able to expand and collapse the community tree without having the focus reset to the top of the list each time.
The focus indicator should always be visible when navigating the page via the keyboard
If you read the page in its entirety using a screen reader, you should be able to hear all of the page content
The community / collection hierarchy should be communicated to screen reader users

To my eyes, it seems like the angular cdk-tree component is likely the cause of many of these issues. A lot of these challenges would be resolved if the collection structure were just rendered with simple nested unordered lists.

Agreed with your overall analysis here @doana .  This relates back to an older ticket regarding accessibility issues on this /community-list page: #1177
It's likely we need to find someone to help refactor the code at some point to no longer use cdk-tree (https://material.angular.io/cdk/tree/overview) or see if there is a way to improve accessibility while using it.


automatic comparision

Adds more comparision tests for each libfunc while implementing an automatic comparation of the results between cairo-native (JIT) and cairo-runner (from starkware)

Codecov Report

Merging #245 (9465401) into main (1626cb1) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #245   +/-   ##
=======================================
  Coverage   68.06%   68.06%
=======================================
  Files         108      108
  Lines       19645    19645
=======================================
  Hits        13372    13372
  Misses       6273     6273

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


ci: improve Travis CI setup

I appreciate the PR, but I'm leaning more towards just keeping what we have now. At some point I will probably revisit this across all of my projects to provide a consistent CI setup/environment.


Uncaught Error: Can't redo with an open transaction

Uncaught Error: Can't redo with an open transaction
Atom Version: 0.156.0
System: Mac OS X 10.10
Thrown From: Atom Core
Steps To Reproduce

...
...

Stack Trace
At /Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:91

Error: Can't redo with an open transaction
  at History.module.exports.History.redo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/history.js:91:15)
  at TextBuffer.module.exports.TextBuffer.redo (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:679:27)
  at TextEditor.module.exports.TextEditor.redo (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:1142:26)
  at TextEditor.atom.commands.add.stopEventPropagation.core:redo (/Applications/Atom.app/Contents/Resources/app/src/text-editor-element.js:307:19)
  at atom-text-editor.newCommandListeners.(anonymous function) (/Applications/Atom.app/Contents/Resources/app/src/text-editor-element.js:272:32)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
  at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:549:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:391:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:167:20)

I'm going to pull @maxbrunsfeld :spades: into this old issue. Max, do you think we can close this one? I don't remember any other reports and I think you made quite a few changes to that part of text-buffer.

Yeah, this exception won't happen anymore: redo with an open transaction is allowed now.

Thanks!


Fix injection of old decorated controller resolver service

There is used bad reference ID when you are injecting old decorated service into decorator. See docs: http://symfony.com/doc/current/service_container/service_decoration.html

Those fails are not in my modifications

What exactly is the issue? What part of the docs do you refer?
Could you please also resolve tests, even if it is not related to your PR? I think some Asset component is missing.

In previous version you are trying to decoreate service which is not available in production enviroment (ID: controller_resolver).
In development enviroment is it working because you are referencing service ID: debug.controller_resolver.inner which is (form me unexpectedly available - most probably it's created before calling Symflify bundle).
In docs is sayid:

Most of the time, that's exactly what you want to do. But sometimes, you might want to decorate the old one instead. In this case, the old service should be kept around to be able to reference it in the new one. This configuration replaces app.mailer with a new one, but keeps a reference of the old one as app.decorating_mailer.inner:

    # ...

    app.decorating_mailer:
      class:     AppBundle\DecoratingMailer
      decorates: app.mailer
      arguments<EMAIL_ADDRESS>      public:    false````

So if your service is called `symplify.controller_resolver` and you want reference on decorated service you should you as ID `symplify.controller_resolver.inner`

I see, thanks for explaining. I wish there would by class type hints for this. Would solve lot of these bugs.
Could you please also resolve tests, even if it is not related to your PR? I think some Asset component is missing.

I'll try to resolve them later today

The "Asset" stuffs looks like Symfony 3.2 BC break. I'm fixing that now

And merged :)
Thank you


Dongle.send() always returns with Error

Dongle.send() always returns with the error of "Data send timeout"

Hello,
Are you sure you are using version 1.4.1? Also please double check if the characteristic UUID that you use matches the one in the dongle device.
Between 27th and 29th December there will be an update to this SDK with various bug fixes introduced while developing a real customer project using Ubudu dongles.

Yes I am sure I am using 1.4.1. The server is also a mobile device, emulating the beacon as specified in SDK. I've tested it using my developed sample as well as samples found in the SDK. Both of them return the same error. Hopefully you have addressed the issue in the newer SDK.

What I would propose for now is using the following approach:
private static final String UB_SCANNER_PREFIX = "ubScanner-";

private BleDeviceFilter bleDeviceFilter = new BleDeviceFilter() {
        @Override
        public boolean isCorrect(BluetoothDevice device, int rssi, byte[] scanResponse) {
            return device.getName() != null && device.getName().startsWith(UB_SCANNER_PREFIX);
        }
    };

DiscoveryManager.discover(getApplicationContext(), 3000, bleDeviceFilter, mDiscoveryListener);

Then in your mDiscoveryListener callback named onBleDeviceFound you decide which device you want to use. You should call connect on it.
After successful connection you should do:
mBleDevice.setDataReceivedEventListener(mDataReceivedEventListener);
mBleDevice.discoverServices(new BleDevice.ServicesDiscoveryListener() {
            @Override
            public void onServicesDiscovered(final List<BluetoothGattService> services) {
                // select the service which characteristics you want to use
                // the default service UUID of the latest dongle is
                // D9500001-F608-42CD-A37E-92A559491B2B
                for (BluetoothGattService service : services) {
                        if (service.getUuid().toString().equalsIgnoreCase("D9500001-F608-42CD-A37E-92A559491B2B")) {

                            // there should be TX characteristic D9500002-F608-42CD-A37E-92A559491B2B
                            for (BluetoothGattCharacteristic characteristic : service.getCharacteristics()) {
                                  if (characteristic.getUuid().toString().equalsIgnoreCase("D9500002-F608-42CD-A37E-92A559491B2B")) {
                                         mBleDevice.setGattCharacteristicForWriting(characteristic);
                                         break;
                                   }
                            }
                            break;
                        }
                }
            }

            @Override
            public void onError(Error error) {
                mBleDevice.disconnect();
            }
        });

I have tested IOT SDK v1.4.1 with a real dongle following the approach above and it worked without issues. Maybe it will help you.
Using Dongle package was done to reduce the boiler plate code needed for the generic way where you need to specify and pick everything on your own. I suspect that maybe the default UUIDs set for the Dongle in the IOT SDK do not match ones that are present in the Firmware of the dongle device you have.

I think you're not understanding what my error is. You see, I am not using a real dongle. I have installed the UBIe application sample, that is available with the SDK, in a phone, which is working as peripheral. I have installed the same UBIe application as well as another demo that I coded, in another Android phone, which works as Client. Now I am trying to send data from client, to peripheral device. In the provided demo, there is only one service with UUID
0000ffe0-0000-1000-8000-00805f9b34fb
which connects. Other two services return "Connection Error: Could not register to read characteristic notifications".
Now in this service, we have two characteristics. Selecting one for notification characteristic and other for writing characteristic, We reach at the screen where we need to give input to be sent to the peripheral device. Now after writing data in box, when I press "SEND DATA" button, it always returns with an error of "Data Send Timeout".
I am talking about this code in MainActivity.java
`@Override
public void onSendMessageRequested(String message) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M
&& ContextCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {
requestPermissions(new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, ASK_GEOLOCATION_PERMISSION_REQUEST_ON_SEND_DATA);
return;
}
    byte[] data = new byte[0];
    try {
        data = (message).getBytes("UTF-8");
    } catch (UnsupportedEncodingException e) {
        e.printStackTrace();
    }
    mBleDevice.send(data, new DataSentListener() {
        @Override
        public void onDataSent(byte[] data) {
            dismissProgressDialog();
            Log.i(TAG, "Data successfully sent: " + String.format("%020x", new BigInteger(1, data)));
            commFragment.onMessageSendingFinished();
        }

        @Override
        **public void onError(Error error) {
            Log.e(TAG, error.getLocalizedMessage());
            ToastUtil.showToast(getApplicationContext(), error.getLocalizedMessage());
            commFragment.onMessageSendingFinished();
        }**
    });
}`

Here, I never get a callback to onDataSent, instead it always goes into onError with the error of "Data send timeout".

Ok thanks, now I understand your issue. It will be fixed in the new release of IOT-SDK somewhere between 27th-29th of December. I will let you know here too.

Hello,
I have just pushed a release v1.5.0. Please check again the Readme.md for API changes and usage details.
Also the sample app has been refreshed. I have tested the peripheral feature. The foreign device is able to write data to it.
Let me know if you experience any issues.


Refactor decode_integer

I'd like to benchmark these four commits to see what speed-ups, if any, they provide.

So I'm in 100% agreement: I think we need to construct a benchmark to get a feel for how this affects the speed of processing. I'm inclined to say that this is almost certainly an improvement, but by how much.

I don't know what a suitable benchmark would look like. Do you have any ideas or suggestions how to find out?

Frankly, I think the best benchmarks are going to be timeit based for a large number of loops. The function is sufficiently simple that if you check what numbers of prefix bits are used throughout the codebase and then run multiple instances of timeit using integers of various different sizes for each of those prefix bits, it should help us get a feel for what's going on. For what it's worth, the codebase uses 4, 5, 6, and 7 as values for prefix_bits.

What does typical data look like? I tried using the values in test_hpack.py, but I didn't see a big difference. If the typical data is longer I'd expect an improvement.

The typical data can vary in length, but generally is only a few bytes long. The biggest possible integers in regular use in HPACK are likely to be of the order of, say, 30,000. When encoded with a four bit prefix, that will only produce a four-byte-long output from encode_integer. It should be noted that the encoded integers have three uses in HPACK: the first is as an index into a table that rarely gets more than a few hundred values long; the second is as a length of a header field name or value, which could be on the order of tens or hundreds of kB but is surely not larger; and finally as a storage for how large the header table is allowed to be, which again is unlikely to be larger than a few MB. Either way, anything more than about 6 bytes is stunningly unlikely, and anything more than 8 is downright unreasonable (an 8 byte integer can store integer values up to 18,446,744,073,709,551,615, and the odds of us getting a header field value longer than that are pretty unlikely!).

Ok, I've written a micro-benchmark based on decoding 2**20 encoded with a different number of prefix bits from 4 to 7, on different interpreters. The code for this is available in this gist, which I recommend people run themselves to reproduce the results. I've arranged them into four tables, below. Underneath these tables I have provided some analysis.
4 Prefix Bits

Platform
Old Run 1
Old Run 2
Old Run 3
New Run 1
New Run 2
New Run 3
Best Old Run
Best New Run
Improvement
Improvement (%)

CPython 2.7.12
1.6426
1.6183
1.6214
1.5508
1.5182
1.5469
1.6183
1.5182
0.1002
6.19%

CPython 3.3.6
2.1991
2.1819
2.1731
1.6059
1.6128
1.6073
2.1731
1.6059
0.5673
26.10%

CPython 3.4.5
2.2584
2.3067
2.2535
1.6561
1.6354
1.6700
2.2535
1.6354
0.6181
27.43%

CPython 3.5.2
2.3044
2.2992
2.3478
1.8173
1.7586
1.7645
2.2992
1.7586
0.5406
23.51%

PyPy 2.7.10
0.0985
0.1129
0.0888
0.0867
0.0766
0.0772
0.0888
0.0766
0.0123
13.81%

5 Prefix Bits

Platform
Old Run 1
Old Run 2
Old Run 3
New Run 1
New Run 2
New Run 3
Best Old Run
Best New Run
Improvement
Improvement (%)

CPython 2.7.12
1.6417
1.6292
1.6187
1.5459
1.5320
1.5342
1.6187
1.5320
0.0867
5.36%

CPython 3.3.6
2.1754
2.2493
2.1857
1.6287
1.6161
1.6317
2.1754
1.6161
0.5593
25.71%

CPython 3.4.5
2.2433
2.2600
2.2219
1.6772
1.6682
1.6552
2.2219
1.6552
0.5667
25.51%

CPython 3.5.2
2.3656
2.3542
2.3927
1.7979
1.7701
1.7976
2.3542
1.7701
0.5841
24.81%

PyPy 2.7.10
0.1007
0.0871
0.0884
0.0816
0.0742
0.0674
0.0871
0.0674
0.0197
22.58%

6 Prefix Bits

Platform
Old Run 1
Old Run 2
Old Run 3
New Run 1
New Run 2
New Run 3
Best Old Run
Best New Run
Improvement
Improvement (%)

CPython 2.7.12
1.6342
1.6229
1.6657
1.5422
1.5462
1.5322
1.6229
1.5322
0.0908
5.59%

CPython 3.3.6
2.2087
2.1845
2.1919
1.6296
1.6904
1.6267
2.1845
1.6267
0.5577
25.53%

CPython 3.4.5
2.2161
2.2661
2.6481
1.9037
1.8310
1.6977
2.2161
1.6977
0.5184
23.39%

CPython 3.5.2
2.3305
2.3529
2.3247
1.8093
1.7884
1.7918
2.3247
1.7884
0.5363
23.07%

PyPy 2.7.10
0.0978
0.0803
0.0821
0.0925
0.0782
0.0777
0.0803
0.0777
0.0026
3.22%

7 Prefix Bits

Platform
Old Run 1
Old Run 2
Old Run 3
New Run 1
New Run 2
New Run 3
Best Old Run
Best New Run
Improvement
Improvement (%)

CPython 2.7.12
1.6669
1.6095
1.6800
1.5634
1.5466
1.5255
1.6095
1.5255
0.0840
5.22%

CPython 3.3.6
2.1846
2.1756
2.2164
1.6323
1.6578
1.6177
2.1756
1.6177
0.5579
25.64%

CPython 3.4.5
2.2648
2.2614
2.2511
1.6744
1.8941
1.7115
2.2511
1.6744
0.5767
25.62%

CPython 3.5.2
2.3498
2.3508
2.3914
1.8056
1.7867
1.7854
2.3498
1.7854
0.5644
24.02%

PyPy 2.7.10
0.1124
0.0865
0.1014
0.1066
0.0688
0.0834
0.0865
0.0688
0.0176
20.40%

So, what have we learned here?

PyPy is stupidly good at this kind of workload, and while it sees some marginal improvement from this change the improvement is highly variable and entirely down to good luck on the run. It can be as low as a few percentage points, or as high as 20% faster with the new workload. Regardless, this provides another TL;DR for anyone who hadn't realised: use PyPy!
Python 2.7 seems to be dominated by other work, so this algorithm change doesn't help it that much. I haven't profiled it, but I suspect that the dominant workload is actually the conversion of single-byte-string to integer in to_byte. There is an improvement here, but it's pretty minor: a few %age points.
Python 3 is way slow at this workload compared to Python 2.7 in the original case! Wow! This change provides a huge benefit to Python 3, somehow removing a really slow operation and replacing it with one Python 3 is much faster at doing. This changes brings Python 3 to be just slightly slower than Python 2, which is a good change.
Interestingly, longer bit lengths don't see incrementally better improvement, at least not in a way that outweighs noise. It seems like the improvement is more or less a flat 25% on Python 3 and about a flat 5% on Python 2 (including PyPy).

TL;DR: this newer variant is faster in all cases and much faster on Python 3, good work @Ian-Foote!

Before we merge this, I'd like to check in some tests that use hypothesis to confirm that our encoder/decoder logic round-trips. That will help us better validate that these functions are really being refactored, and aren't about to encounter some subtle behavioural changes.

I can reproduce the speed-ups with your benchmark.

I've rebased as suggested in #64.

@Ian-Foote Per our one of the team policy, you'll find an invite to the Python Hyper organisation on GitHub in your inbox. Welcome to the team @Ian-Foote!


RESP based encoding

encoding right now is raw binary that doesn't follow the RESP standard.

Not needed


Rails 5.2.0 support

Rails 5.2.0 is out and stable. Could you upgrade the Rails dependency version to 5.2?

A new release with this and https://github.com/rspec/rspec-rails/issues/1857 would be great too!

See #1990


ipptool weird behaviour

I'm using CUPS 2.3.1 on Ubuntu 20.04
Suppose I have the following queues (all of them with no jobs):
Q1, Q2, Q3, Q4, Q5
and this file (file.ipp):
{
OPERATION CUPS-Get-Printers
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR keyword requested-attributes printer-name,printer-state,queued-job-count
STATUS successful-ok
DISPLAY printer-name
DISPLAY printer-state
DISPLAY queued-job-count
}
when I run this command
ipptool ipp://localhost file.ipp
I get an output like this
printer-name printer-state queued-job-count

Q1           idle
Q3           idle
Q5           idle
Notice that queues Q2 and Q4 didn't show up and the job count is empty (and not 0 as expected)
I've got the same behaviour when running with -c, but the correct one when using -X or -t.
Now, if I change the order of the DISPLAY directives as follows
{
OPERATION CUPS-Get-Printers
GROUP operation-attributes-tag
ATTR charset attributes-charset utf-8
ATTR language attributes-natural-language en
ATTR keyword requested-attributes printer-name,printer-state,queued-job-count
STATUS successful-ok
DISPLAY queued-job-count
DISPLAY printer-name
DISPLAY printer-state
}
the output correctly shows all queues and the job count as 0s:
queued-job-count printer-name printer-state

0                Q1           idle
0                Q2           idle
0                Q3           idle
0                Q4           idle
0                Q5           idle

Weird, I've confirmed this but don't know why this is happening, will investigate...

OK, I figured out the problem. It is a side-effect of an old CUPS API change (to make the ipp_attribute_t structure private) and we are losing our place in the response...

Hello Michael, good to know you found the problem. Thank you for your time!
I have some C experience but don't know CUPS "inner guts".
Do you think I could be of any help anyway?

[master 292db66eb] Fix DISPLAY bug in ipptool (Issue #139)

@jcvdev For this issue I have it covered :) but definitely you can contribute, even in small ways with bug fixes, code quality, etc.


FileDataset should fail when urls is empty and repeat is True

currently it causes infinite loop

Fixed: https://github.com/iwiwi/epochraft/commit/31f636d69af196da3200291d2e0c44356f8ec784


fundamentals/index (and other) updates

Fixes #2377
Internal review topic (link will be added when build completes)
Notes:

Bit of a long-shot here on the order of topics in the TOC and the order within the fundamentals index page, so we'll need to work on that. Ordering is (loosely) general-to-specific and important-to-less-important.
I definitely feel the need to add missing fundamentals topic blurbs to the index.
Added and updated descriptions on fundamentals topics.
The order of the TOC matches the order of the features described in the fundamentals index page.
I still wonder: Is it "metapackage" or "meta-package"? ... The :pray: server gods :pray: haven't ruled on this one yet. @Rick-Anderson, can you say??

@guardrex,
Thanks for having already signed the Contribution License Agreement. Your agreement was validated by .NET Foundation. We will now review your pull request.
Thanks,
.NET Foundation Pull Request Bot


Add mocks to SDK

Add mocks to SDK

Not sure we want to do it like this as it will add complexity to every single method implementation forever.
Another way potential way of doing this is defining an interface and implementing it both with a mock and a prod version. Ultimately this is a team decision because it's not a light one. So let's talk !

Let's close this for now since we might not need it anymore with the simulator client that we want to build