Text with upper case in the center of the document

Greetings to all!
Thanks to the developers for this great library!
I really liked how pdf creation was implemented and I started making a template. In the process of creating, I had a problem with creating a string with upper case. How can you do the same as in the picture? I want to note that the text should also be in the center.

You can render subscripted and superscripted text with the SubWrite() method. (This is a recent addition.) However, you'll need to make some small manual adjustments in order to center the text on a line. For example, you may want to measure the text without subscripts or superscripts using GetStringWidth(), then adjust it based on the width of the subscripted and superscripted text.

Thanks for the answer! I'll try!

@jung-kurt Some problems I have. I mean an array of names and to it is superscripted text. I stopped at this:

I get the width of the string. Unmarked: 1,2,3 ...
I divide the string using ",".
Next, I'll give the code better:

func writeAuthors(textArr []string, lineHeight float64, f *gofpdf.Fpdf) {
	lMargin, _, rMargin, _ := f.GetMargins()

	pageWidth, _ := f.GetPageSize()
	width := pageWidth - (lMargin + rMargin)

	textStr := strings.Join(textArr, ", ")
	lines := f.SplitLines([]byte(textStr), width)

	for _, lineBt := range lines {
		lineStr := string(lineBt)
		lineWidth := f.GetStringWidth(lineStr)
		lineWidth += f.GetStringWidth("2")

		f.SetLeftMargin(lMargin + ((width - lineWidth) / 2))
		for _, author := range strings.Split(lineStr, ",") {
			f.Write(lineHeight, author)
			f.Write(lineHeight, ", ")
			f.SubWrite(lineHeight, "2", 14, 4, 0, "")
		}
		f.SetLeftMargin(lMargin)
	}
}

But I’m getting something completely different from what I wanted. All due to the fact that I do not know how to properly divided into lines.

Tell me is it possible to somehow modify the function html2pdf, so that it supports superscript?

It may be easier not to join the reference items at first. Here is an example:
package main

import (
	"fmt"
	"os"

	"github.com/jung-kurt/gofpdf"
)

type refType struct {
	name, super string
}

var refList = []refType{
	{"D. K. Brenner", "2"},
	{"N. J. Benavidez", "1, 2"},
	{"P. L. Villa", "2"},
	{"M. R. Lentz", "1"},
	{"M. C. Hunt", "1, 3"},
	{"C. R. Harris", "2"},
	{"R. J. Gonzalez", "2, 3, 4"},
	{"R. E. Perez", "2"},
	{"D. A. Taylor", "2"},
	{"K. B. Reeder", "2"},
	{"C. A. Hurley", "2"},
	{"J. C. Rosenberg", "3"},
	{"E. G. Urban", "2"},
}

func main() {

	const (
		fontSize  = 12
		scale     = 1.2
		superSize = fontSize / scale
	)

	pdf := gofpdf.New("P", "mm", "A4", "") // 210mm x 297mm
	pdf.AddPage()
	pdf.SetFont("Times", "I", fontSize)
	_, lineHt := pdf.GetFontSize()
	lineHt *= 1.2 // Pad for superscript
	lf, rt, _, _ := pdf.GetMargins()
	pageWidth, _ := pdf.GetPageSize()
	width := pageWidth - (lf + rt)

	// Approximate width of reference item
	refWidth := func(ref refType) float64 {
		return pdf.GetStringWidth(ref.name) + pdf.GetStringWidth(" "+ref.super)/scale
	}

	refWrite := func(ref refType) {
		pdf.Write(lineHt, ref.name)
		pdf.SubWrite(lineHt, " "+ref.super, superSize, 4, 0, "")
	}

	sep := ", "
	sepWd := pdf.GetStringWidth(sep)
	accum := 0.0
	for j, ref := range refList {
		if j == 0 {
			refWrite(ref)
			accum = refWidth(ref)
		} else {
			addWd := sepWd + refWidth(ref)
			if accum+addWd <= width {
				pdf.Write(lineHt, sep)
				refWrite(ref)
				accum += addWd
			} else {
				pdf.Ln(lineHt)
				refWrite(ref)
				accum = refWidth(ref)
			}
		}
	}

	err := pdf.OutputFileAndClose("example.pdf")
	if err != nil {
		fmt.Fprintf(os.Stderr, "%s\n", err)
	}

}

This example does not center the lines, but you have all the information needed to do so.

Tell me is it possible to somehow modify the function html2pdf, so that it supports superscript?

This would be an excellent enhancement. I will make a note about this.

@jung-kurt thanks for the help. I remembered html2pdf because it is well implemented, and I have mixed text, with many different tags, such as italics, underscores, and superscripts. so I look forward to this improvement! Thanks for your beautiful library.


Added programCategory Table

Issue: Programs fall into four different categories: Student Led Services,  Training and Education, Bonner Scholars, One-time Events.
Did: Created a new table called ProgramCategory with a field called categoryName that is a char field and primary key. Added programCategory field in Program table as the foreignKeyField to ProgramCategory table. Added programCategories in test_data.py and added more programs and events so that each programCategory has an event and program.
Test:
-reset database
-run tests and all tests still pass

Not relevant anymore


Not compiling SuperReads_RNA

I've tried to compile jellyfish and quorum. But it didn't work. So, I downloaded all packages from github specific directories and compiled everything. In the end, a error message for SuperRead compilation:
CXX      src/sorted_merge.o
  CXX      src/create_k_unitigs_large_k.o
  CXX      src/create_k_unitigs_large_k2.o
  CXX      src/bloom_query.o
  CXX      src/rename_filter_fastq.o
  CXX      src/read_parser.o
  CXX      src2/findMatchesBetweenKUnitigsAndReads.o
  CXX      src2/createKUnitigMaxOverlaps.o
mkdir -p src/
  CXX      src2/getSuperReadInsertCountsFromReadPlacementFile.o
  CXX      src2/getSuperReadInsertCountsFromReadPlacementFileTwoPasses.o
  CXX      src2/joinKUnitigs_v3.o
sed -e 's,[@]bindir[@],/usr/local/stringtie/test/stringtie-2.2.1/SuperReads_RNA/bin,g' \
    -e 's,[@]libdir[@],/usr/local/stringtie/test/stringtie-2.2.1/SuperReads_RNA/lib,g' \
    -e 's,[@]PERL_EXT_DIR[@],/usr/local/stringtie/test/stringtie-2.2.1/SuperReads_RNA/lib/perl,g' < src/MasurcaPaths.pm.in > src/MasurcaPaths.pm
chmod +x src/MasurcaPaths.pm
  CXXLD    rename_filter_fastq
  CXXLD    bloom_query
/usr/bin/ld: src/bloom_query.o: warning: relocation against `_ZN9jellyfish10mer_dna_ns18error_short_stringE' in read-only section `.text.unlikely
/usr/bin/ld: src/bloom_query.o: in function `jellyfish::mer_dna_ns::mer_base<jellyfish::mer_dna_ns::mer_base_static<unsigned long, 0> >::operatord::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
/usr/local/stringtie/test/stringtie-2.2.1/SuperReads_RNA/global-1/SuperReadsR/./jellyfish/mer_dna.hpp:312: undefined reference to `jellyfish::mer_ns::error_short_string'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1166: bloom_query] Erro 1
make[2]: ** Esperando que outros processos terminem.
make[2]: Saindo do diretório '/usr/local/stringtie/test/stringtie-2.2.1/SuperReads_RNA/global-1/SuperReadsR'
make[1]: *** [Makefile:2111: install] Erro 2
make[1]: Saindo do diretório '/usr/local/stringtie/test/stringtie-2.2.1/SuperReads_RNA/global-1/SuperReadsR'
make: *** [Makefile:847: install-special] Erro 2

Some new versions gcc, python, etc... It should be a new stringtie version too!

I encountered similar problems with compiling SuperReads_RNA.
I solved them by not working with the very latest github code, but instead with the latest stable release of StringTie2.  When I used that, everything including SuperReads_RNA compiled cleanly.
My line-commands were:
cd $PROJECT/src/unpack ;

wget https://github.com/gpertea/stringtie/archive/refs/tags/v2.2.1.tar.gz ;
zcat v2.2.1.tar.gz | tar xf - ;
mv -i stringtie-2.2.1 $PROJECT/src ;

cd $PROJECT/src/stringtie-2.2.1 ;
make release ;
./stringtie -h ;    # it was compiled, and it works

cd SuperReads_RNA ;
./install.sh ;
./create_rna_sr.py ;   # it was compiled, and it works!


Non-deterministic failures running chromedriver --version in Github Actions

Summary
In the past few weeks I've noticed an uptick in Github Action job failures due to attempting to download chromedriver but failing when chromedriver --version runs.
Debug Info
Please provide the following information for bug reports:

Webdrivers version:
Ruby version: 3.2.1
Operating system / CI Environment: 5.2.0
Browser and version: 110.0.5481.177

Expected Behavior
It doesn't fail
Actual Behavior
There's a 15% chance that a job in my test matrix that does browser specs will fail to install chromedriver.

Failed to make system call: ["/home/runner/work/business-server/business-server/tmp/chromedriver", "--version"]
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/webdrivers-5.2.0/lib/webdrivers/system.rb:190:in `call'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/webdrivers-5.2.0/lib/webdrivers/common.rb:1[48](https://github.com/FutureProofRetail/business-server/actions/runs/4346062033/jobs/7591643043#step:18:49):in `binary_version'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/webdrivers-5.2.0/lib/webdrivers/chromedriver.rb:18:in `current_version'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/webdrivers-5.2.0/lib/webdrivers/tasks/chromedriver.rake:24:in `block (3 levels) in <top (required)>'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/bugsnag-6.24.2/lib/bugsnag/integrations/rake.rb:20:in `execute'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/home/runner/work/business-server/business-server/Rakefile:22:in `block in <top (required)>'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/bugsnag-6.24.2/lib/bugsnag/integrations/rake.rb:20:in `execute'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `synchronize'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:199:in `invoke_with_call_chain'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:188:in `invoke'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:160:in `invoke_task'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `each'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:116:in `block in top_level'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:125:in `run_with_threads'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:110:in `top_level'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/railties-<IP_ADDRESS>/lib/rails/commands/rake/rake_command.rb:24:in `block (2 levels) in perform'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/application.rb:186:in `standard_exception_handling'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/railties-<IP_ADDRESS>/lib/rails/commands/rake/rake_command.rb:24:in `block in perform'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/rake_module.rb:59:in `with_application'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/railties-<IP_ADDRESS>/lib/rails/commands/rake/rake_command.rb:18:in `perform'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/railties-<IP_ADDRESS>/lib/rails/command.rb:[50](https://github.com/FutureProofRetail/business-server/actions/runs/4346062033/jobs/7591643043#step:18:51):in `invoke'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/railties-<IP_ADDRESS>/lib/rails/commands.rb:18:in `<top (required)>'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/bootsnap-1.10.3/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
Tasks: TOP => webdrivers:chromedriver:update

Inconsistency detected by ld.so (omitted duplicate logs from above, which share similar prelude)

2023-03-06 17:43:25 DEBUG Webdrivers Completed download and processing of /home/runner/work/business-server/business-server/tmp/chromedriver
2023-03-06 17:43:25 DEBUG Webdrivers Checking current version
2023-03-06 17:43:25 DEBUG Webdrivers /home/runner/work/business-server/business-server/tmp/chromedriver is already downloaded
2023-03-06 17:43:25 DEBUG Webdrivers making System call: ["/home/runner/work/business-server/business-server/tmp/chromedriver", "--version"]
Inconsistency detected by ld.so: dl-version.c: 204: _dl_check_map_versions: Assertion `needed != NULL' failed!
rails aborted!
Failed to make system call: ["/home/runner/work/business-server/business-server/tmp/chromedriver", "--version"]
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/webdrivers-5.2.0/lib/webdrivers/system.rb:190:in `call'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/webdrivers-5.2.0/lib/webdrivers/common.rb:148:in `binary_version'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/webdrivers-5.2.0/lib/webdrivers/chromedriver.rb:18:in `current_version'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/webdrivers-5.2.0/lib/webdrivers/tasks/chromedriver.rake:24:in `block (3 levels) in <top (required)>'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `block in execute'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `each'
/home/runner/work/business-server/business-server/vendor/bundle/ruby/3.2.0/gems/rake-13.0.6/lib/rake/task.rb:281:in `execute'

Decompression failure -- this one fails earlier, when attempting to decompress

2023-03-06 17:42:48 DEBUG Webdrivers Get response: #<Net::HTTPOK 200 OK readbody=true>
2023-03-06 17:42:48 DEBUG Webdrivers Successfully downloaded /tmp/20230306-2881-1479kvchromedriver_linux64.zip
2023-03-06 17:42:48 DEBUG Webdrivers Decompressing /tmp/20230306-2881-1479kvchromedriver_linux64.zip
rails aborted!
Zip::EntrySizeError: entry 'chromedriver' should be 14452880B, but is larger when inflated.

I believe I've narrowed it down to an issue within rubyzip when running with Ruby 3.1's YJIT enabled. Tracking here: https://github.com/rubyzip/rubyzip/pull/550

I believe I've narrowed it down to an issue within rubyzip when running with Ruby 3.1's YJIT enabled. Tracking here: rubyzip/rubyzip#550

Hi @machty. There is an issue with rubyzip that's been reported here: https://github.com/Shopify/yjit/issues/310
We're planning to look at it tomorrow, but if you're somehow able to find an even smaller repro, that would be useful.

That command is looking for a driver on PATH. This gem doesn't put the driver on PATH, it downloads the latest and tells Selenium where to look for it. If you want to see what this gem downloads you can ~/.webdrivers/chromedriver --version

Closing as it appears the root issue is with rubyzip.
Another note — if you are using a recent version of Selenium you may not even need to use this gem any longer: https://github.com/titusfortner/webdrivers#update-selenium-manager


how to support more than one account?

Hi.
Is it possible to integrate two accounts with the same school URL (but different sets of (Username, Password) ), i. e. kid1 and kid2?
My first workaround idea was to "double" the integration using two subdirs (e. g. ".../webuntis" and ".../webuntis2") and assign different credentials to each during integration, but since there is one central repository for the configuration (.storage/core.device-* and core.config-*) this might end up in a mess.
A feature or workaround would be useful.

Hey,
yes, more accounts would be great! Either if someone knew a workaround or if they could be incorporated straight away.

I don´t really understand your problem. You can add multiple accounts by just configuring the Integration multiple times. This should work with the same URL but different username.
Or do I not understand your problem correctly?

I will try that. The goal is to display multiple schedules (for my four kids...) on the dashboard.
However, I have trouble getting the integration to work, see my other post.


[Feature Request] add support for multiline selecting

Awesome package!
It would be great to make the widget multiline selectable.

Hello GreenLim, thanks for opening this issue.
I'm afraid this is not one of the library's goals. the main goal was to create a 'static syntax view'.
I would recommend other dynamic syntax highlighting widgets such as code_editor ...


Change error message and make it consistent across file.

Signed-off-by: Humble Chirammal<EMAIL_ADDRESS>

@childsb Please review. Thanks !

Thanks for the review.
 `I am personally in favor of the [...] quoting.
IMHO it makes the error messages much more readable (for the human eye).

Thats not the practice in entire kube source tree, thats why it was removed in between and I mentioned it in review comments. I will remove error string and do other correction mentioned here.

Thats not the practice in entire kube source tree, thats why it was removed in between and I mentioned it in review comments.

Hmm, we might still adopt it for our modules, since it makes log messages much more readable. (Easier to spot the relevant pieces.) That's what I was voting for.

I will remove error string and do other correction mentioned here in next iteration of the PR.

Thanks!

ping

closing for now, let me know if we still want this

I think we still want to make the log messages consistent. (There was just the discussion about the "how".) Meanwhile pr #697 has adapted to @humblec 's proposed removal of [...], so I'll withdraw my comments about that.
The other small nitpicks about making the messages really consistent still remain.
@humblec do you want to update the PR?


Use i18n translations (messages) from vuei18n config file

Using Nuxt and @nuxtjs/i18n I already have a translation config in i18n.config.ts:
export default defineI18nConfig(() => ({
  locale: 'en',
  messages: {
    en: {
      welcome: 'Welcome'
    },
    fr: {
      welcome: 'Bienvenue'
    }
  }
}))

This file is picked up automatically by Nuxt i18n. Would it be possible to use this file with its messages for the emails as well? Right now I declare the translations within i18n.config.ts and for emails within nuxt.config.ts.
Also I realized current translations can not be nested. For example I can create an object per email:
vueEmail: {
    baseUrl: getUrl(),
    autoImport: true,
    i18n: {
      defaultLocale: 'de',
      translations: {
        de: {
          invite: {
             greeting: 'hello',
          },
          accountCreated: {
             text: '...',
          }
        },
      },
    },
  },

Also Ive set the defaultLocale in nuxt.config.ts already for Nuxt i18n, can this also be reused maybe?

duplicate of https://github.com/vue-email/nuxt/issues/36


Avoid merge commits if possible

Yesterday I submitted a very simple patch which applied directly to git master:
https://github.com/rgbkrk/libvirt-go/commit/dd29b1f4579842e77773ebfeb765c1718d0a4881
Thanks for merging it, however it was done with a merge commit:
https://github.com/rgbkrk/libvirt-go/commit/644521deb7a2b74ca4dfa5c928e007b3587a5110
I'd like to propose that we avoid merge commits as much as possible, and in particular when there is only one pending patch, we should get it rebase to git master so that it can apply with a fast forward.
IOW, don't click the green merge button in it's current state. Much better to change the button to default to rebase if we plan on using it at all, or apply these kinds of patches with the cli.
Just my $0.02
Cheers!

Here's a nice example for this: https://github.com/rgbkrk/libvirt-go/pull/121

I don't have a strong opinion on that. Rebase or regular merge are fine by me. Squash is not.

Yes, I agree we shouldn't squash. Fast forwarding is my preferred approach when available. Keeps the history logical and easy to understand.

Rebase is good, we can set that as the default on the repo.


Multiple gaps in data for DATL/stream

Describe the issue
Multiple gaps in data for DATL/stream.
Steps to Reproduce
Steps to reproduce the behavior:

Open the DATL_Gaps.csv file attached
Column A is "Last startTime before the gap"
Column B is "Following startTime after the gap"
Column C is gap duration in seconds
Column D is number of expected missing entries
Column E is missing settlementDate
Click on column F's link, that will show link where the gap is found

Expected behaviour
Expected is to see data for every settlement period (startTime every 30 minutes) for links listed in column E.
Observed behaviour
Data is missing for specified time intervals.
HTTP requests/responses
All of the API requests are listed in DATL_Gaps.csv E column. You can use any of them to see the gap.
Checks
Please answer the following questions for yourself before submitting an issue.

[x] I checked the documentation and found no answer
[x] I checked to make sure that this issue has not already been filed
[x] I'm reporting the issue to the correct repository
[x] I'm reporting a problem and not a feature request
[x] I have added the correct labels
[x] I have added screenshots or other relevant evidence (if applicable)

DATL_Gaps.csv

Thank you for your enquiry, this is being investigated.
Please do contact<EMAIL_ADDRESS>further further support

Source data was nor received from the provider, no further action to be taken.  Insights is presented a full set of data as received.


CSV export of JSON values

GET _opendistro/_sql?format=csv
is not exporting quoted values and thus having JSON with additional commas in one of the exported fields will kill the following fields order.
Can quoted output be forced somehow?

Moving to SQL project.


HstSelect not working

Describe the bug
HstSelect is not showing the dropdown. It logs an error in the browser console:
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '$el')

From the stacktrace, this appears to be an issue with another dependency, but wanted to let Histoire know.
Reproduction
https://stackblitz.com/edit/histoire-vue3-starter-udktgy
System Info
System:
  OS: macOS 12.5
  CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
  Memory: 307.04 MB / 16.00 GB
  Shell: 5.8.1 - /bin/zsh
Binaries:
  Node: 16.16.0 - ~/.nvm/versions/node/v16.16.0/bin/node
  npm: 8.11.0 - ~/.nvm/versions/node/v16.16.0/bin/npm
  Browsers:
    Chrome: 103.0.5060.134
    Safari: 15.6
  npmPackages:
    @vitejs/plugin-vue: ^3.0.1 => 3.0.1
    histoire: ^0.8.4 => 0.8.4
    vite: ^3.0.4 => 3.0.4

Used Package Manager
npm
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion.
[X] The provided reproduction is a minimal reproducible example of the bug.

Duplicate of #206


Remove verbose logging when updating chart repo index

This commit removes logs lines resulting from loading the index of a
chart repo containing many charts that don't adhere to semver.
Signed-off-by: Nathan Schmidt<EMAIL_ADDRESS>
What this PR does / why we need it:
This PR removes logs lines resulting from loading the index of a
chart repo containing charts that don't adhere to semver.
Motivation behind this change is simple, there is little to no impact
from these log lines, and in most cases no action that the user could
reasonably expect to make.  In the authors case, this change reduces
the output of helm repo up from +100MB to <1KB.
Special notes for your reviewer:
If applicable:

[ ] this PR contains documentation
[ ] this PR contains unit tests
[ ] this PR has been tested for backwards compatibility

After opening this I stumbled upon https://github.com/helm/helm/pull/9604
I'd say that is a significantly better implementation than my efforts here - closing this one.


remove isNode check from getReadableFromProtocolStream and other similar usages

as the PR is now landed: https://github.com/nodejs/node/pull/39062 (https://github.com/nodejs/node/pull/39062#issuecomment-871685340)
https://github.com/puppeteer/puppeteer/blob/5b792de7a97611441777d1ac99cb95516301d7dc/src/common/helper.ts#L345-L353

I believe this has happened.


updating output fields

Just a few comments from me! Let me know when addressed and I will approve

Looks good! Approving!


Bitfinex API Client support for v2/auth/r/order/Symbol:OrderId/trades

Currently I see no support for the bitfinex rest call v2/auth/r/order/Symbol:OrderId/trades I wish to add support myself.  Creating this issue to kick the work off.  Any objections to me creating a pull request for this change?

I have the code ready can I get access to push a branch and create a pull request please


Add allowedUsers setting

This allows users to customize who can use their bot, preventing malicious actors from taking control of the macro without the owner's consent.

Always says I cant run the command

nvm i fixed it


Adding a data-x attribute to the root ?

I'm trying to add a Stimulus handler to all forms:

I looked at the code in simple_form and the only option I see is to add a default_form_class:
https://github.com/heartcombo/simple_form/blob/main/lib/simple_form/action_view_extensions/form_helper.rb
Is there a way to append a data attribute to every form without having to pass a custom data attribute to each one?
I tried appending it to wrapper_html on the default wrapper but it didnt work

Might I suggest overriding the simple_form_for helper and delegating to super instead of looking for a configuration? e.g. something like this on your app helper:
def simple_form_for(record, options = {}, &block)
  options[:html] ||= {}
  options[:html][:"data-x"] ||= ...

  super
end

Alternatively, a custom form builder could work as well, but that might require changing simple_form_for calls across your views so maybe not something to start with.


bump nodejs express stack minor version

Checklist:

[x] Read the Code of Conduct and Contributing Guidelines.

[x] Followed the commit message guidelines.

Updates to the collections
increment patch version of nodejs express stack

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


MineBlocks link not working

MineBlocks Link is blocked I cant find a link that unblocked.

Ok I will try to find a new link.


Add error modifying lenses

I tend to like having the ability to capture contextual in formation in an error like so:
data Err c e = Ctxt c (Err c e) | Err e

withCtxt :: c -> Either (Err c e) a -> Either (Err c e) a
withCtxt = lmap . Ctxt

Is it possible to add a lens combinator that can modify the error (if it occurs) while otherwise being the id lens?
Thanks,
Rohit

Added adjustingErrors and adjustingErrorsWith 👍


changes made to madlibs_list.txt and story.txt for placeholders 1-6 b…

Hi Team,
Creating the pull request for the changes made to the madlibs_list.txt and story.txt.
Please review and approve.

Ankit

Looks good to me!

Good


Display mode cannot change up to higher resolution modes

I have a "Graphics Settings" screen that lists all display modes (for all monitors, though I only have one monitor) and uses Gdx.graphics.setFullscreenMode to change to full screen mode with the selected display mode. This works fine when selecting a mode that uses the current resolution (e.g. a lower or higher refresh rate), or a mode with a lower resolution. I can keep selecting them and changing between them. However it will not change the mode when selecting a mode with a higher resolution (even if changing back to a higher resolution that was previously set). In this case, the method does nothing, returning true as if the mode change was successful. In other words, changes of resolution can only change to a lower resolution than the current resolution.
I'm only considering the desktop application target.
I'm using Linux OS, Java 21 OpenJDK Amd64, gdx 1.12.1 and lwjgl3 approach.
Any suggestions?

It would help if you could share a minimal example with which the problem becomes reproducable on your machine.


Add Beaufort Values

Add the Beaufort Value as a sensor, and a translated description of that value. Support languages will be the same as for Wind Direction.

Released with V0.18


[Tabs extended - with media]: Mobile grid alignment is off when other components are being inserted into the tab content area

JIRA ticket: https://jsw.ibm.com/browse/ADCMS-3155

Description

Within the AEM page template, we're currently inserting different layout components (eg. Card Group, Image with caption, Accordion, etc) into the body content area of the Tabs extended - with media component.
The grid alignment looks correct on larger breakpoints, however, it's off by -16px on mobile.
Currently, we have a stop-gap solution in AEM by overriding styling within the shadow root, which is not recommended, but it's a workaround for now. cc: @KDarch928

Component(s) impacted
Tabs extended - with media
Browser
Chrome, Safari, Firefox, Microsoft Edge
Carbon for IBM.com version
v.1.45
Severity
Severity 3 = The problem is visible or noticeable to users but does not impede the usability or functionality. Affects minor functionality, has a workaround.
Application/website
AEM
Package
@carbon/ibmdotcom-web-components
CodeSandbox example
N/A
Steps to reproduce the issue (if applicable)
No response
Release date (if applicable)
No response
Code of Conduct

[X] I agree to follow this project's Code of Conduct
[X] I checked the current issues for duplicate issues

@oliviaflory FYI ^
@KDarch928 Feel free to add more detail for this particular issue.

Hey @proeung thanks for bringing this to our attention
I believe what's happening is that the accordion content area is extending 16px into the gutter on either side, this is to allow some components like cards to hang.

However, we don't want that with some of the examples your team is using like the Headings and paragraph content on mobile.
I am wondering if this fix should be made in Tabs extended and cascade to Tabs extended with media?
Another thing to consider is Tabs extended with media has the content item horizontal component pre-populated and content item horizontal has top/bottom and horizontal padding applied to it in order to align to the grid properly.

Imagining the final solution will be adjusting the tabs content area

Current – 16px hang
Desired – no hang

Lastly, we will be looking into this and other horizontal spacing issues in our Carbon for IBM.com v2 package.


Sound is garbled after first recording

Hi Nick,
First and foremost, thanks for creating and sharing this! Currently working on a phone and already have the second one in queue :)
I built this using a Raspberry Pi Zero 2W and it works all as expected. However, when recording the second message, the voicemail message played is garbled and kind of sped up. When trying for the third time, there is no beep.wav played and you cannot record. Did you by any chance come across this during development? I think it might have to do with the load on the Pi as it's getting somewhat slower after the first attempt. I already switched the power brick to 5V 2.5A, but to no avail. Perhaps you have an idea. Interestingly, the audio is not garbled after the first attempt when using aplay in terminal :)

Hey @stephanlinke87,
That's great to hear!
Regarding your current issue, I'm wondering a few things:

Which USB audio card are you using?
Do you know the supported sample rate?
File I/O:

After the first recording, can you confirm that the on_hook registered in the logs and the first file has been written?
Is that file playable?

ALSA settings: can you send me the output from:

aplay -l
cat /etc/asound.conf

can you open a terminal and run something like htop to see if perhaps you might be running out of resources?

Also, can you try dropping the buffer_size in the config.yaml down to something like 2048 or 1024 and re-test?

Hi Nick,
Thanks for the quick response on this :) To answer your questions:
USB Soundcard https://www.amazon.de/40520/dp/B06XP5R449?language=en_GB&currency=EUR
Supported Sampling Rates 92kHz/192KHz (ADC/DAC)
File I/O Yup, on hook is registered, but there's something weird, it doesn't find the sound card at first pick up, only after the second pick up:
stephan@dgg-guestbook:~ $ lsusb
Bus 001 Device 002: ID 0bda:4809 Realtek Semiconductor Corp. USB Audio
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

stephan@dgg-guestbook:~ $ journalctl -u audioGuestBook -f
-- Journal begins at Thu 2023-12-21 12:42:00 CET. --
Dec 21 12:42:09 dgg-guestbook systemd[1]: Started Rotary Phone Guest Book Project.
Dec 21 12:50:24 dgg-guestbook env[584]: INFO:__main__:Phone off hook, ready to begin!
Dec 21 12:50:24 dgg-guestbook env[584]: INFO:__main__:Playing voicemail message...
Dec 21 12:50:24 dgg-guestbook env[584]: ERROR:__main__:Error playing voicemail.wav. Error: [Errno -9996] Invalid output device (no default output device)
Dec 21 12:50:24 dgg-guestbook env[584]: INFO:__main__:Playing beep...
Dec 21 12:50:24 dgg-guestbook env[584]: ERROR:__main__:Error playing beep.wav. Error: [Errno -9996] Invalid output device (no default output device)
Dec 21 12:50:24 dgg-guestbook env[584]: INFO:__main__:recording
Dec 21 12:50:24 dgg-guestbook systemd[1]: audioGuestBook.service: Main process exited, code=killed, status=11/SEGV
Dec 21 12:50:24 dgg-guestbook systemd[1]: audioGuestBook.service: Failed with result 'signal'.
Dec 21 12:50:24 dgg-guestbook systemd[1]: audioGuestBook.service: Consumed 5.355s CPU time.
Dec 21 12:50:24 dgg-guestbook systemd[1]: audioGuestBook.service: Scheduled restart job, restart counter is at 1.
Dec 21 12:50:24 dgg-guestbook systemd[1]: Stopped Rotary Phone Guest Book Project.
Dec 21 12:50:24 dgg-guestbook systemd[1]: audioGuestBook.service: Consumed 5.355s CPU time.
Dec 21 12:50:24 dgg-guestbook systemd[1]: Started Rotary Phone Guest Book Project.
Dec 21 12:50:28 dgg-guestbook env[925]: INFO:__main__:Phone on hook.
Dec 21 12:50:28 dgg-guestbook env[925]: Sleeping...
Dec 21 12:50:29 dgg-guestbook env[925]: INFO:__main__:Phone off hook, ready to begin!
Dec 21 12:50:29 dgg-guestbook env[925]: INFO:__main__:Playing voicemail message...
Dec 21 12:50:40 dgg-guestbook env[925]: INFO:__main__:Playing beep...
Dec 21 12:50:41 dgg-guestbook env[925]: INFO:__main__:recording
Dec 21 12:50:44 dgg-guestbook env[925]: INFO:__main__:Finished recording!
Dec 21 12:50:44 dgg-guestbook env[925]: INFO:__main__:Phone on hook.
Dec 21 12:50:44 dgg-guestbook env[925]: Sleeping...
Dec 21 12:50:45 dgg-guestbook env[925]: INFO:__main__:Phone off hook, ready to begin!
Dec 21 12:50:45 dgg-guestbook env[925]: INFO:__main__:Playing voicemail message...
Dec 21 12:50:56 dgg-guestbook env[925]: INFO:__main__:Playing beep...
Dec 21 12:50:57 dgg-guestbook env[925]: INFO:__main__:recording
Dec 21 12:51:00 dgg-guestbook env[925]: INFO:__main__:Finished recording!
Dec 21 12:51:00 dgg-guestbook env[925]: INFO:__main__:Phone on hook.
Dec 21 12:51:00 dgg-guestbook env[925]: Sleeping...
Dec 21 12:51:04 dgg-guestbook env[925]: INFO:__main__:Phone off hook, ready to begin!
Dec 21 12:51:05 dgg-guestbook env[925]: INFO:__main__:Playing voicemail message...
Dec 21 12:51:15 dgg-guestbook env[925]: INFO:__main__:Playing beep...
Dec 21 12:51:16 dgg-guestbook env[925]: INFO:__main__:recording
Dec 21 12:51:16 dgg-guestbook env[925]: INFO:__main__:Finished recording!
Dec 21 12:51:16 dgg-guestbook env[925]: INFO:__main__:Phone on hook.
Dec 21 12:51:16 dgg-guestbook env[925]: Sleeping...

The file itself is recorded and playable perfectly fine, no noise or crackling. After the third attempt, no beep.wav is played anymore as well, even though its logged :(
Command Line output from aplay and cat /etc/asound
stephan@dgg-guestbook:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 1: Audio [USB Audio], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
stephan@dgg-guestbook:~ $ cat /etc/asound.conf
defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1
stephan@dgg-guestbook:~ $

Not much going on in htop, only the console feels sluggish/slow after the first pickup, compared to the first one. The configuration as of now is the following:
alsa_hw_mapping: 1
beep_reduction: 0
buffer_size: 2048
channels: 1
hook_gpio: 22
playback_reduction: 0
recording_limit: 300
rotary_gpio: 23
rotary_hold_repeat: true
rotary_hold_time: 0.25
sample_rate: 44100
source_file: audioGuestBook.py
format: INT16
hook_type: NC # or 'NC'

Can you checkout the dev commit I just pushed and let me know how it runs with your set up? I added further logging and safety checks. If it doesn't address the core issue you were facing would you mind pasting the logs?
If running via the systemctl service:
journalctl -u audioGuestBook.service >> audioGuestbook_logs.txt

Thanks!

Awesome, I‘ll check it out tomorrow :) Thanks!

Unfortunately, it's the same with the new version, however, after the first pickup, it complains about the sound card missing. The sound comes out garbled at random now, not just for the first attempt :D The load is normal as well, it goes to ~20% on pick up, but quickly goes down again.
audioGuestbook_logs.txt
Note that the last beep in the log didn't play, altough it was logged :s

Alright, commenced some further testing. The issue is indeed appearing randomly, but often :D New log, directly after reboot, voicemail.wav sounds garbled/sped up, and it's not recording unfortunately (even though the proper directories exist within the src directory). Here's the log :)
stephan@dgg-guestbook:~/AudioGuestbook $ journalctl -u audioGuestBook -f
-- Journal begins at Fri 2023-12-22 09:49:11 CET. --
Dec 22 09:51:37 dgg-guestbook systemd[1]: Started Rotary Phone Guest Book Project.
Dec 22 09:51:45 dgg-guestbook env[585]: INFO:__main__:Remember to monitor system resources during recording.
Dec 22 09:56:12 dgg-guestbook env[585]: INFO:__main__:Phone off hook, ready to begin!
Dec 22 09:56:12 dgg-guestbook env[585]: INFO:audioInterface:Initializing Audio Interface with sample rate: 44100, format: 8
Dec 22 09:56:13 dgg-guestbook env[585]: Cannot connect to server socket err = No such file or directory
Dec 22 09:56:13 dgg-guestbook env[585]: Cannot connect to server request channel
Dec 22 09:56:13 dgg-guestbook env[585]: jack server is not running or cannot be started
Dec 22 09:56:13 dgg-guestbook env[585]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 22 09:56:13 dgg-guestbook env[585]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 22 09:56:13 dgg-guestbook env[585]: Cannot connect to server socket err = No such file or directory
Dec 22 09:56:13 dgg-guestbook env[585]: Cannot connect to server request channel
Dec 22 09:56:13 dgg-guestbook env[585]: jack server is not running or cannot be started
Dec 22 09:56:13 dgg-guestbook env[585]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 22 09:56:13 dgg-guestbook env[585]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 22 09:56:13 dgg-guestbook env[585]: ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
Dec 22 09:56:13 dgg-guestbook env[585]: ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
Dec 22 09:56:13 dgg-guestbook env[585]: ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
Dec 22 09:56:13 dgg-guestbook env[585]: ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
Dec 22 09:56:13 dgg-guestbook env[585]: ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
Dec 22 09:56:13 dgg-guestbook env[585]: ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
Dec 22 09:56:13 dgg-guestbook env[585]: ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
Dec 22 09:56:13 dgg-guestbook env[585]: Cannot connect to server socket err = No such file or directory
Dec 22 09:56:13 dgg-guestbook env[585]: Cannot connect to server request channel
Dec 22 09:56:13 dgg-guestbook env[585]: jack server is not running or cannot be started
Dec 22 09:56:13 dgg-guestbook env[585]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 22 09:56:13 dgg-guestbook env[585]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 22 09:56:13 dgg-guestbook env[585]: INFO:audioInterface:Audio resources initialized.
Dec 22 09:56:13 dgg-guestbook env[585]: INFO:__main__:Playing voicemail message...
Dec 22 09:56:24 dgg-guestbook env[585]: INFO:__main__:Playing beep...
Dec 22 09:56:25 dgg-guestbook env[585]: INFO:__main__:Recording
Dec 22 09:56:25 dgg-guestbook env[585]: Cannot connect to server socket err = No such file or directory
Dec 22 09:56:25 dgg-guestbook env[585]: Cannot connect to server request channel
Dec 22 09:56:25 dgg-guestbook env[585]: jack server is not running or cannot be started
Dec 22 09:56:25 dgg-guestbook env[585]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 22 09:56:25 dgg-guestbook env[585]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 22 09:56:25 dgg-guestbook env[585]: Cannot connect to server socket err = No such file or directory
Dec 22 09:56:25 dgg-guestbook env[585]: Cannot connect to server request channel
Dec 22 09:56:25 dgg-guestbook env[585]: jack server is not running or cannot be started
Dec 22 09:56:25 dgg-guestbook env[585]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 22 09:56:25 dgg-guestbook env[585]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 22 09:56:25 dgg-guestbook env[585]: ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
Dec 22 09:56:25 dgg-guestbook env[585]: ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
Dec 22 09:56:25 dgg-guestbook env[585]: ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
Dec 22 09:56:25 dgg-guestbook env[585]: ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused
Dec 22 09:56:25 dgg-guestbook env[585]: ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
Dec 22 09:56:26 dgg-guestbook env[585]: ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
Dec 22 09:56:26 dgg-guestbook env[585]: ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
Dec 22 09:56:26 dgg-guestbook env[585]: Cannot connect to server socket err = No such file or directory
Dec 22 09:56:26 dgg-guestbook env[585]: Cannot connect to server request channel
Dec 22 09:56:26 dgg-guestbook env[585]: jack server is not running or cannot be started
Dec 22 09:56:26 dgg-guestbook env[585]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 22 09:56:26 dgg-guestbook env[585]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 22 09:56:26 dgg-guestbook env[585]: INFO:audioInterface:Audio resources initialized.
Dec 22 09:56:26 dgg-guestbook env[585]: INFO:audioInterface:Audio stream initialized for recording.
Dec 22 09:56:26 dgg-guestbook env[585]: ERROR:audioInterface:Recording error: [Errno -9981] Input overflowed
Dec 22 09:56:26 dgg-guestbook env[585]: INFO:audioInterface:Stopping audio stream.
Dec 22 09:56:26 dgg-guestbook env[585]: Traceback (most recent call last):
Dec 22 09:56:26 dgg-guestbook env[585]:   File "/usr/lib/python3/dist-packages/gpiozero/pins/rpigpio.py", line 223, in _call_when_changed
Dec 22 09:56:26 dgg-guestbook env[585]:     super(RPiGPIOPin, self)._call_when_changed()
Dec 22 09:56:26 dgg-guestbook env[585]:   File "/usr/lib/python3/dist-packages/gpiozero/pins/local.py", line 128, in _call_when_changed
Dec 22 09:56:26 dgg-guestbook env[585]:     super(LocalPiPin, self)._call_when_changed(
Dec 22 09:56:26 dgg-guestbook env[585]:   File "/usr/lib/python3/dist-packages/gpiozero/pins/pi.py", line 298, in _call_when_changed
Dec 22 09:56:26 dgg-guestbook env[585]:     method(ticks, state)
Dec 22 09:56:26 dgg-guestbook env[585]:   File "/usr/lib/python3/dist-packages/gpiozero/input_devices.py", line 182, in _pin_changed
Dec 22 09:56:26 dgg-guestbook env[585]:     self._fire_events(ticks, bool(self._state_to_value(state)))
Dec 22 09:56:26 dgg-guestbook env[585]:   File "/usr/lib/python3/dist-packages/gpiozero/mixins.py", line 405, in _fire_events
Dec 22 09:56:26 dgg-guestbook env[585]:     self._fire_deactivated()
Dec 22 09:56:26 dgg-guestbook env[585]:   File "/usr/lib/python3/dist-packages/gpiozero/mixins.py", line 452, in _fire_deactivated
Dec 22 09:56:26 dgg-guestbook env[585]:     super(HoldMixin, self)._fire_deactivated()
Dec 22 09:56:26 dgg-guestbook env[585]:   File "/usr/lib/python3/dist-packages/gpiozero/mixins.py", line 369, in _fire_deactivated
Dec 22 09:56:26 dgg-guestbook env[585]:     self.when_deactivated()
Dec 22 09:56:26 dgg-guestbook env[585]:   File "/home/stephan/AudioGuestbook/src/audioGuestBook.py", line 99, in off_hook
Dec 22 09:56:26 dgg-guestbook env[585]:     audio_interface.stop()
Dec 22 09:56:26 dgg-guestbook env[585]:   File "/home/stephan/AudioGuestbook/src/audioInterface.py", line 206, in stop
Dec 22 09:56:26 dgg-guestbook env[585]:     self.stream.stop_stream()
Dec 22 09:56:26 dgg-guestbook env[585]:   File "/root/.local/lib/python3.9/site-packages/pyaudio/__init__.py", line 500, in stop_stream
Dec 22 09:56:26 dgg-guestbook env[585]:     pa.stop_stream(self._stream)
Dec 22 09:56:26 dgg-guestbook env[585]: OSError: Stream not open
Dec 22 09:56:33 dgg-guestbook env[585]: INFO:__main__:Phone on hook.
Dec 22 09:56:33 dgg-guestbook env[585]: Sleeping...```

Hmm... 🤔 I will need to look a bit deeper into this. I'm traveling for the Holidays but I'll try to keep you posted. In the meantime, it might be good to rule out SD card corruption. I suspect this could have happened if you had a power supply that didn't meet the rpi zeros needs prior to the new one you purchased.
If you have a Linux based machine, can you eject the SD card from the rpi (perhaps make a backup of the contents) and connect it to your computer. Then run something like:
sudo fsck /dev/sdX

One other thing I noticed in the logs was the stated sample rate of 44.1kHz and a bit depth of 8 (which usually sounds pretty crappy). This is way lower than what your USB audio interface supports:

ADC sampling rate supports max for 96KHz/16bit and DAC sampling rate supports max for 192KHz/24bit.

Try setting the sample rate and bit depth in your ALSA configuration, update the /etc/asound.conf file as follows:
defaults.pcm.card 1
defaults.pcm.device 0
defaults.ctl.card 1

pcm.!default {
    type plug
    slave {
        pcm "hw:1,0"
        format S24_3LE # Set to 24-bit depth, adjust as needed
        rate 192000 # Set to 192kHz, adjust as needed
    }
}

That was it, the audio is working flawless all the time now, even though I had to set the rate to 44100 :) Great work, dude! :) Now it's just for the recording that doesn't ... record :) But perhaps it's working with the current stable branch as well now? Anyways, enjoy your well deserved holidays. Festive greetings from Germany!

Awesome, glad that fixed it! Yeah, try that config out in the main branch. I haven't even tested the dev branch yet. Hope you have a good holiday as well!

So, just a quick update, as I needed to do some further tinkering to alleviate some issues :)
Logging issues
There were some exceptions in the log when its run as a service, which could be alleviated by adding the sounddevice module:
stephan@dgg-guestbook:~ $ journalctl -u audioGuestBook -f
-- Journal begins at Sun 2023-12-24 15:44:41 CET. --
Dec 24 15:44:51 dgg-guestbook systemd[1]: Started Rotary Phone Guest Book Project.
Dec 24 15:44:58 dgg-guestbook env[584]: INFO:__main__:Remember to monitor system resources during recording.
Dec 24 15:46:12 dgg-guestbook env[584]: INFO:__main__:Phone off hook, ready to begin!
Dec 24 15:46:12 dgg-guestbook env[584]: INFO:audioInterface:Initializing Audio Interface with sample rate: 44100, format: 8
Dec 24 15:46:12 dgg-guestbook env[584]: Cannot connect to server socket err = No such file or directory
Dec 24 15:46:12 dgg-guestbook env[584]: Cannot connect to server request channel
Dec 24 15:46:12 dgg-guestbook env[584]: jack server is not running or cannot be started
Dec 24 15:46:12 dgg-guestbook env[584]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 24 15:46:12 dgg-guestbook env[584]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 24 15:46:12 dgg-guestbook env[584]: Cannot connect to server socket err = No such file or directory
Dec 24 15:46:12 dgg-guestbook env[584]: Cannot connect to server request channel
Dec 24 15:46:12 dgg-guestbook env[584]: jack server is not running or cannot be started
Dec 24 15:46:12 dgg-guestbook env[584]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 24 15:46:12 dgg-guestbook env[584]: JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Dec 24 15:46:12 dgg-guestbook env[584]: ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
Dec 24 15:46:12 dgg-guestbook env[584]: ALSA lib pcm_oss.c:377:

After adding the sounddevice, there were no longer the exceptions above visible, but new ones when recording. This lead to the recording failing after the third attempt. Couldn't get any audio to play further:
lib pcm.c:8545:(snd_pcm_recover) underrun occurred

After some googling, someone in the arch linux forums wrote that configuring the pulse daemon accordingly fixed their issue:
default-fragments = 5
default-fragment-size-msec = 2

After rebooting, everything works indeed as intended, I did multiple test recordings and it went through smoothly. Not sure if its still required, but I also set the exception handler to false when recording so there's no interruption:
# loop through stream and append audio chunks to frame array
        try:
            start = time.time()
            while self.off_hook_condition():
                if time.time() - start < self.recording_limit:
                    data = self.stream.read(self.chunk, exception_on_overflow=False)
                    self.frames.append(data)
                else:
                    # Notify the user that their recording time is up
                    self.play("time_exceeded.wav")
                    break

If this all works for the other phone as well (ordered a different sound card that is smaller), I'll write everything together :)

Hey @stephanlinke87, hope you had a good holiday!
Great catch there with setting the exception handler to false, I believe I had that set for the deployed version and forgot to change it back in the codebase. Thanks for deep diving into this, I'm glad you were able to figure it out!
Anyways, I appreciate your detailed response. Let me know if you'd like to submit a push request otherwise I can integrate your changes into my dev branch and we'll go from there.

If I push anything, it breaks most of the time :D Sorry, I haven't had the time in the last few weeks :) I'll have the phone back tomorrow from friends and then I'll write down the steps/packages installed. It'll use Ubuntu Server instead (to keep the footprint minimal on the Rasperry Pi Zero 2W). Additionally, the phone also now has a web interface and incorporates RaspAP so the following can be done without much troubles:

Listen to recorded messages
Set every message recorded as voicemail
Download recorded messages

This might be out of scope for the project, but perhaps we could put this up in the wiki :)

Those updates sounds pretty sweet @stephanlinke87, up to you if you'd rather keep it as a fork or maybe push the branch with a special ubuntu-server tag or something. Feel free to close this out whenever you're ready!


Consolidated GPU versioning scheme

Different methods are used in GPU common runtime, StreamExecutor, and XLA to
track GPU hardware versions. To support upcoming ROCm SteramExecutor and AMDGPU
XLA, it's now consolidated to DeviceVersion in StreamExecutor.
Adopt the scheme for both CUDA and ROCm platforms.

@parallelo This PR would be better checked by an external NV CI node as it affects both CUDA and ROCm execution path and there are non-trivial changes to bazel scripts on CUDA side.

jenkins: retest this please

The test on ROCm ends up with 1 failure, but it seems to be a flaky test. Retesting again.
@parallelo also it'd be good if we can test it on an NV node when available.

the test is a success on ROCm but I'll keep it open until we can test it on an NV node.
also I'll need to rebase

jenkins: retest this please

jenkins: retest this please

jenkins: retest this please

FYI - looking at the separate ROCm and CUDA target logs, configure.py still needs some further tweaks.

Jenkins:  retest this please
Testing dual-target builds with ROCm (local) and CUDA (aws).

will do a different implementation instead


Add input argument to Task

Hi,
Would love to add an option or argument to my task, is it possible ?  How can we pass a parameter to the task ?
Thks

Hi! Yes, it is possible! But now this feature now in pull request #143 and still now finished. This feature 100% will be in Deployer 3 when i or somebody else finish it.

Done! Use argument and option functions.


Can't select mycroft-core install dir

Hi, I just installed mycroft-core and then this extension. When I try to configure the location of mycroft-core in the extensions' settings window I select 'other', which normally opens a file selection window to allow the user to select a directory. Nothing happens here, though, and the extension config window seems to freeze. Is there a way to specify this location manually?

Sorry, I forgot to add additional information. This is arch linux, gnome 3.22.2. Is there is anything else I should provide, please ask.

Hey,
Could you try this - after the file selection window is open and you are in the directory of mycroft-core there will be a "Select Folder" button typically on the bottom right corner with the "Cancel" Button. Click the "Select Folder" button
If that doesn't work can you run this before you open the config window and perform the task and provide me the output   -

journalctl /usr/bin/gnome-shell-extension-prefs -f -o cat
Open dconf-editor traverse into<EMAIL_ADDRESS>and see if the mycroft-core-location is being set after clicking "Select Folder"

Hacky way of setting it until I can figure the issue out is from changing the value in dconf editor in<EMAIL_ADDRESS>-
mycroft-core-location,
make sure that these are the values
mycroft-install-type --  '0' or '2',
mycroft-is-intall -- true
Thanks


[MINOR] Fixing streamer props in integ tests

Change Logs
Fixing streamer props in integ tests. I have filed a follow up https://issues.apache.org/jira/browse/HUDI-7187 to fix all properties. but for now, aligning all properties to be same.
Impact
low.
Risk level (write none, low medium or high below)
If medium or high, explain what verification was done to mitigate the risks.
Documentation Update
Describe any necessary documentation update if there is any new feature, config, or user-facing change

The config description must be updated if new configs are added or the default value of the configs are changed
Any new feature or user-facing change requires updating the Hudi website. Please create a Jira ticket, attach the
ticket number here and follow the instruction to make
changes to the website.

Contributor's checklist

[ ] Read through contributor's guide
[ ] Change Logs and Impact were stated clearly
[ ] Adequate tests were added if applicable
[ ] CI passed

failure was due to unrelated failure. going ahead w/ landing


Use and export parameterizeNamedList in nimble-angular

Pull Request
🤨 Rationale
Resolves #1551
👩💻 Implementation
There were a few changes made here:

Move parameterizeNamedList in nimble-components from utilities/tests to testing to move it from a private directory to a directory that is intended to be public
Create a new testing entry point in the nimble-angular package that re-exports the parameterize utilities

Note: #172 indicates that processUpdates and waitForUpdatesAsync should ultimately be exported from the same testing entry point, but that hasn't been done yet since it is a breaking change

Update Angular tests that used forEach to loop through test cases to use parameterizeNamedList instead

🧪 Testing
Ran the tests and verified the same number of tests are still being run
✅ Checklist

[ ] I have updated the project documentation to reflect my changes or determined no changes are needed.

@m-akinc, will you buddy this for me?

I'm closing this PR in favor of #1768


no images found in image directory!

Greetings,
I have followed your installation steps, dataset preparation steps as it is. I have an issue that it is showing images are not in the directory even though images are in it. Any help would be great. Thanks in advance.
03/20 15:44:27 oneformer.data.dataset_mappers.oneformer_unified_dataset_mapper]: [OneFormerUnifiedDatasetMapper] Augmentations used in training: [ResizeShortestEdge(short_edge_length=..., max_size=2560, sample_style='choice'), RandomCrop_CategoryAreaConstraint(crop_type='absolute', crop_size=[640, 640], single_category_max_area=1.0, ignored_category=255), <detectron2.projects.point_rend.color_augmentation.ColorAugSSDTransform object at 0x7f05844cbca0>, RandomFlip()]
Traceback (most recent call last):
File "train_net.py", line 435, in
launch(
File "/home/iit29/anaconda3/envs/oneformer/lib/python3.8/site-packages/detectron2/engine/launch.py", line 82, in launch
main_func(*args)
File "train_net.py", line 423, in main
trainer = Trainer(cfg)
File "/home/iit29/anaconda3/envs/oneformer/lib/python3.8/site-packages/detectron2/engine/defaults.py", line 378, in init
data_loader = self.build_train_loader(cfg)
File "train_net.py", line 162, in build_train_loader
return build_detection_train_loader(cfg, mapper=mapper)
File "/home/iit29/anaconda3/envs/oneformer/lib/python3.8/site-packages/detectron2/config/config.py", line 207, in wrapped
explicit_args = _get_args_from_config(from_config, *args, **kwargs)
File "/home/iit29/anaconda3/envs/oneformer/lib/python3.8/site-packages/detectron2/config/config.py", line 245, in _get_args_from_config
ret = from_config_func(*args, **kwargs)
File "/home/iit29/anaconda3/envs/oneformer/lib/python3.8/site-packages/detectron2/data/build.py", line 337, in _train_loader_from_config
dataset = get_detection_dataset_dicts(
File "/home/iit29/anaconda3/envs/oneformer/lib/python3.8/site-packages/detectron2/data/build.py", line 240, in get_detection_dataset_dicts
dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in names]
File "/home/iit29/anaconda3/envs/oneformer/lib/python3.8/site-packages/detectron2/data/build.py", line 240, in
dataset_dicts = [DatasetCatalog.get(dataset_name) for dataset_name in names]
File "/home/iit29/anaconda3/envs/oneformer/lib/python3.8/site-packages/detectron2/data/catalog.py", line 58, in get
return f()
File "/home/iit29/Desktop/OneFormer/oneformer/data/datasets/register_ade20k_panoptic.py", line 295, in
lambda: load_ade20k_panoptic_json(
File "/home/iit29/Desktop/OneFormer/oneformer/data/datasets/register_ade20k_panoptic.py", line 267, in load_ade20k_panoptic_json
assert len(ret), f"No images found in {image_dir}!"
AssertionError: No images found in /home/iit29/Desktop/OneFormer/datasets/ADEChallengeData2016/ADEChallengeData2016/images/training!
wandb: Waiting for W&B process to finish... (failed 1). Press Control-C to abort syncing.
wandb:
Any help would be great, thanks in advance!

Hi @sahityabonumaddi, thanks for your interest in our work.
What value did you set for the DETECTRON2_DATASETS attribute?

AssertionError: No images found in /home/iit29/Desktop/OneFormer/datasets/ADEChallengeData2016/ADEChallengeData2016/images/training!

From the error log, it seems to me that you ran export DETECTRON2_DATASETS=datasets/ADEChallengeData2016. You need to run export DETECTRON2_DATASETS=datasets/.

iit29@iit29-System-Product-Name:~$ export DETECTRON2_DATASETS=/home/iit29/Desktop/OneFormer/datasets/
iit29@iit29-System-Product-Name:~$ echo $DETECTRON2_DATASETS
/home/iit29/Desktop/OneFormer/datasets/
assert len(ret), f"No images found in {image_dir}!"
AssertionError: No images found in /home/iit29/Desktop/OneFormer/datasets/ADEChallengeData2016/images/training!
wandb: Waiting for W&B process to finish... (failed 1). Press Control-C to abort syncing.
wandb:
wandb: Synced ade20k_swin_large_oneformer_swin_large_bs16_160k.yaml: https://wandb.ai/saisahitya/OneFormer/runs/2dnlnyd0
wandb: Synced 6 W&B file(s), 0 media file(s), 0 artifact file(s) and 0 other file(s)
wandb: Find logs at: ./wandb/run-20230320_193332-2dnlnyd0/logs
(oneformer) iit29@iit29-System-Product-Name:~/Desktop/OneFormer$ echo $DETECTRON2_DATASETS
/home/iit29/Desktop/OneFormer/datasets/
Thanks for the reply ,
I have set the path as per instructions, still, error persists, Any help will be appreciated.

Could you try navigating to the images folder? If the folder doesn't exist, you must have missed a dataset preparation step.
cd  /home/iit29/Desktop/OneFormer/datasets/ADEChallengeData2016/images/training
You did follow the dataset preparation instructions for ADE20K, right?

You are absolutely right, I have re-downloaded dataset  and followed your steps again, now it is reading images.
Many thanks!


MAID-2045 fix/NFS: creation and modification timestamps

Coverage decreased (-0.09%) to 85.524% when pulling 46eb36723aa910de941f7d1e68184fbf2fe1e5b3 on bochaco:MAID-2045-creation-modify-timestamps into 2d4814eeae5b86b500e16e542da396f4c60e2c3b on maidsafe:master.

Coverage decreased (-0.09%) to 85.524% when pulling ad784aefdea4756c23dcd71ff0bbdc140e2959ca on bochaco:MAID-2045-creation-modify-timestamps into 2d4814eeae5b86b500e16e542da396f4c60e2c3b on maidsafe:master.

Coverage decreased (-0.07%) to 82.187% when pulling ae92d806aef62c3a4d63f0da3740dd117cb8ea2c on bochaco:MAID-2045-creation-modify-timestamps into 6b0d5919750da818704ed913fc92f1fc871fd36b on maidsafe:master.

Coverage decreased (-0.07%) to 82.187% when pulling ae92d806aef62c3a4d63f0da3740dd117cb8ea2c on bochaco:MAID-2045-creation-modify-timestamps into 6b0d5919750da818704ed913fc92f1fc871fd36b on maidsafe:master.

Coverage increased (+0.4%) to 82.628% when pulling c56e4f2f05b7b5193a2c9e82cad9135c67326511 on bochaco:MAID-2045-creation-modify-timestamps into 6b0d5919750da818704ed913fc92f1fc871fd36b on maidsafe:master.

Coverage increased (+0.4%) to 82.704% when pulling 67371b547c2a9be3985454c66e724c78efd451b5 on bochaco:MAID-2045-creation-modify-timestamps into 6b0d5919750da818704ed913fc92f1fc871fd36b on maidsafe:master.

Coverage increased (+0.4%) to 82.628% when pulling 67371b547c2a9be3985454c66e724c78efd451b5 on bochaco:MAID-2045-creation-modify-timestamps into 6b0d5919750da818704ed913fc92f1fc871fd36b on maidsafe:master.

Coverage increased (+0.7%) to 83.004% when pulling af30957c230e44d95a76813a57bcfcd216f08024 on bochaco:MAID-2045-creation-modify-timestamps into 6b0d5919750da818704ed913fc92f1fc871fd36b on maidsafe:master.

Coverage increased (+0.7%) to 83.004% when pulling af30957c230e44d95a76813a57bcfcd216f08024 on bochaco:MAID-2045-creation-modify-timestamps into 6b0d5919750da818704ed913fc92f1fc871fd36b on maidsafe:master.

Coverage decreased (-35.8%) to 47.364% when pulling 7c51f8079c99047a503208122087179b0edfbf03 on bochaco:MAID-2045-creation-modify-timestamps into b2b19f08db619e01c0c34b446d4c8073b39213f3 on maidsafe:master.

Coverage decreased (-35.8%) to 47.364% when pulling 7c51f8079c99047a503208122087179b0edfbf03 on bochaco:MAID-2045-creation-modify-timestamps into b2b19f08db619e01c0c34b446d4c8073b39213f3 on maidsafe:master.

Coverage decreased (-35.6%) to 46.639% when pulling 3328f32920b3c4a913cccbcdb40106e60bce280c on bochaco:MAID-2045-creation-modify-timestamps into 2a0e8c72ea11eb53f1952f459cdfae0bb9c88e47 on maidsafe:master.


Enable prebuilding for Node 12

As part of working towards https://github.com/vweevers/win-detect-browsers/issues/43.
Haven't tested this properly, but it seems pretty clear cut.

Build failed but upgrading nan might fix that. Lemme take a look at #3, then you can rebase this and retry.

@pimterry I'll make a new PR with fixes for node 12 shortly, please hold

Ok, sure, I'll wait


MicrosoftFamilyOAuth2TokenCache#loadByFamilyId should include AT's in its lookup

See MicrosoftFamilyOAuth2TokenCache#loadByFamilyId
Currently AT's are not loaded for this lookup type - this increases COGs by forcing use of the RT, when there is a valid AT in the cache.
Including AT's in the query needs to include a target - this requires an API change to MicrosoftFamilyOAuth2TokenCache

Wrinkles to consider:

The lookup for the AT needs to be bound for the clientId but the lookup for the RT does not
The lookup for the AT needs to check that the scopes are a complete/superset of the request scopes
The IdToken just needs to match the clientId

@iambmelt I believe this can be closed as it seems like it has been resolved by #608 ?

Yep -- thanks @shahzaibj


Use telnet connection to esp32grbl?

Possible?

Both telnet and websocket connections should work. IIRC websocket uses port 81? I have never tested it though.
The grblHAL driver supports both, now even FTP up/download to SD card if enabled.

Not have info now, wait hardware shipping.. i need heightmap for create pcb, and wireless connection. USB connection very unstable, bluetooth too.
Esp32grbl may use gcode from sd, but not have heightmap algorithm.
Ok, im try as get boards, thanks!


Add support for multiple files at once using useCreateAsset

Description
Added support for multiple files at once using useCreateAsset
Demo
https://user-images.githubusercontent.com/56798748/197220113-0cca4493-c7ce-4bd1-9e95-2f518c545299.mov

Also, this change should be done at the provider level (so in core). We'd also want this functionality with the core createAsset function.

Could you resolve conflicts on this? And I can help push this to the finish line if you'd like

Could you resolve conflicts on this? And I can help push this to the finish line if you'd like

Thanks, just solved the conflicts.

Adding follow-up in https://github.com/livepeer/livepeer.js/pull/140


Simplify extending the framework's default behavior

With the current versions of ASP.NET MVC and Web API it is really easy to extend the default configuration with your own code, by wrapping framework behaviour in your own code. A very common practice is to create a decorator for a framework provided abstraction that extends the framework behaviour and that internally delegates to the original behaviour. This prevents recreating complete (and possible complex) framework logic.
Since in MVC and Web API all framework abstractions are singletons, that are available at the time user code runs, we can simply grab the default implementation, wrap it in our decorator and replace the original implementation. We can repeat this as often as we want.
ASP.NET 5 however, gives us a completely new configuration model, where we add/replace configurations to a collection of ServiceDescriptor objects. Replacing a default implementation is still straightforward, for instance:
services.Add(ServiceDescriptor.Instance<IHttpContextAccessor>(
    new NeverNullHttpContextAccessor()));

However, wrapping an original implementation seems really awkward. It is of course very common to extend framework behaviour this way. For instance:
IHttpContextAccessor original = // grab the original: but how exactly?

services.Add(ServiceDescriptor.Instance<IHttpContextAccessor>(
    new NeverNullHttpContextAccessorDecorator(original)));

Do note that the use of the IHttpContextAccessor is just an example, but does effectively show the problem. The services collection contains ServiceDescriptor objects, and in the case of the IHttpContextAccessor, the ImplementationInstance and ImpementationFactory properties are empty, making it impossible to get that original instance or to get some func for getting it. We can't inject an IServiceProvider into the decorator to delay the registration, because once we request an IHttpContextAccessor inside our decorator, we will get that same decorator back, which will cause a stackoverflow exception.
One way to do this is by using an intermediate service provider, like this:
var innerSp = services.BuildServiceProvider();
var original = innerSp.GetService<IHttpContextAccessor>();
services.AddInstance<IHttpContextAccessor>(new HttpContextAccessorDecorator(original));

This however feels really hacky and might even be very performance heavy.
We absolutely need a better solution for this very common use case.

Updated and fixed the original post.

You can't do this with arbitrary services but if you can point out some of the things you'd want to wrap it might make sense to take a look at those. There's no easy way to express the decorator pattern using DI systems like this.

With the current versions of ASP.NET MVC and Web API it is really easy to extend the default configuration with your own code, by wrapping framework behaviour in your own code. A very common practice is to create a decorator for a framework provided abstraction that extends the framework behaviour and that internally delegates to the original behaviour. This prevents recreating complete (and possible complex) framework logic.

Can you give examples of things you used to do and how you used to do it? That'll be a good starting point for this discussion.

There's no easy way to express the decorator pattern using DI systems like this.

What does that tell us about the current design of that system?

What does that tell us about the current design of that system?

You tell me.
BTW, this wasn't easy before either. That's why I asked for examples. If you can show me what used to work and what doesn't work then it'll be a good starting point.
I'm not here to discuss philosophy :smile:

BTW, this wasn't easy before either.

I'm sorry to say, but it actually IS much easier today. For instance, this is how to do it in Web API:
config.Services.Replace(typeof(IHttpControllerActivator),
    new ExtendedControllerActivator(config.Services.GetHttpControllerActivator()));

config.Services.Replace(typeof(IContentNegotiator),
    new CustomContentNegotiator(
        (IContentNegotiator)config.Services.GetService(typeof(IContentNegotiator))));

@dotnetjunkie great!
The key difference being you can get single instances?
new ExtendedControllerActivator(config.Services.GetHttpControllerActivator())

This one is as bad as what we have today:
config.Services.Replace(typeof(IContentNegotiator),
    new CustomContentNegotiator(
        (IContentNegotiator)config.Services.GetService(typeof(IContentNegotiator))));

The difference being that you can't get ahold of any instances until after container build up.
Will think about this a little bit.  You're resolving the original IContentNegotiator and replacing the in box one with the wrapped one.

Will think about this a little bit.

Sounds good. If you need inspiration, you can always re-read my article on DI-friendly frameworks :smile:

This one is as bad as what we have today

Not exactly. With building an intermediate service provider we lose one important promise. That is the promise that singletons are guaranteed to have only one instance. My previous example actually demonstrates this problem:
var innerSp = services.BuildServiceProvider();
var original = innerSp.GetService<IHttpContextAccessor>();
services.AddInstance<IHttpContextAccessor>(new HttpContextAccessorDecorator(original));

This code looks pretty innocent, but what if the framework's original IHttpContextAccessor depends on a component X that is registered as singleton? Building the intermediate service provider and resolving the IHttpContextAccessor will create a single instance of X as well. But once the final service provider is built, that component X will be created again, breaking the promise that there will be at most one instance of X. Whether or not this will cause problems depends on the implementation of X, but breaking such guarantee is actually a quite serious problem, because now the framework's registrations can't be trust anymore.
You might argue that the IHttpContextAccessor implementation doesn’t have any dependencies at all, and this might be true, at this moment in time, but there is no way for the user to know (without diving into the framework’s source code) and this might change in a future version of the framework.
Also note that it doesn’t really matter whether we resolve the IHttpContextAccessor from the intermediate service provider directly, or we inject a delegate into our custom HttpContextAccessorDecorator  that allows resolving from the intermediate provider later on; the promise of X being a singleton is still broken.
The following registration might be ugly:
config.Services.Replace(typeof(IContentNegotiator),
    new CustomContentNegotiator(
        (IContentNegotiator)config.Services.GetService(typeof(IContentNegotiator))));

But in Web API we have the guarantee that this doesn't break any singleton guarantees. In other words, this 'ugly' registration is actually safe and guaranteed to work correctly, in the current version of Web API and in any possible future versions of Web API as well.

@ploeh:

What does that tell us about the current design of that system?

Challenge accepted.
I get a StackOverflowException if I try to resolve the wrapped service within an implementation factory, and I get a 'Circular Dependency' exception if I try to depend on the wrapped service in the constructor of the wrapping service, so that tells me that the DI system could switch to using a stack for its implementation in order to allow later-registered services to depend on earlier-registered services with the same registered type. :fist:

Not "the" DI system, all DI systems.

Not "the" DI system, all DI systems.

With Pure DI, it's trivial to compose object graphs that include Decorators and Composites.
Castle Windsor natively understands both Decorators and Composites, and correctly composes object graphs with these included.

autofac? Structure map? How does it work?

Just want to say, we have no plans on exposing instances the way we did before, now that we have a DI system.

Autofac, StructureMap, and other DI Containers I know of, don't understand these well-known design patterns (which are as recent as 1994, so I'm guessing these libraries are still catching up), but you can still make them. In addition to Castle Windsor, where it just works, I cover how to do this with Autofac, StructureMap, Spring.NET, Unity, and MEF in my book.

@davidfowl I still like to know how you are going to address the 'failing singleton promise' problem I described above.

autofac? Structure map? How does it work?

I can't speak for Autofac and StructureMap, but with Simple Injector, using the following model:
interface IValidator<in T> {
    void Validate(T instance);
}

class CustomerValidator1 : IValidator<Customer> { ... }
class CustomerValidator2 : IValidator<Customer> { ... }
class ProductValidator : IValidator<Product> { ... }

class CompositeValidator<T> : IValidator<T> {
    private IEnumerable<IValidator<T>> validators;
    public CompositeValidator(IEnumerable<IValidator<T>> validators) {
        this.validators = validators;
    }
    public void Validate(T instance) {
        validators.ToList().ForEach(v => v.Validate(instance));
    }
}

class LoggingValidatorDecorator<T> : IValidator<T> {
    IValidator<T> decoratee;
    public ValidatorDecorator(IValidator<T> decoratee) {
        this.decoratee = decoratee;
    }
    public void Validate(T instance) {
        Logger.Log("validating " + instance.GetType().Name);
        decoratee.Validate(instance);
    }
}

We can make the following registrations:
container.RegisterCollection(typeof(IValidator<>), myAssemblies);
container.RegisterSingleton(typeof(IValidator<>), typeof(CompositeValidator<>));
container.RegisterDecorator(typeof(IValidator<>), typeof(LoggingValidatorDecorator<>));

What this registration does is:

Batch-register all non-generic implementations of IValidator<T> (found in supplied list of Assembly instances) as registrations of IEnumerable<IValidator<T>>.
It registers a composite validator. This composite will be resolved when a single IValidator<T> is requested, and it will be injected with the previously registered collection of validators.
Each resolved validator (both the composite and each validator in the collections) will be wrapped with the LoggingValidatorDecorator<T>.

This is ultimately not an MVC issue but rather a general DI pattern. Closing this out in favor of https://github.com/aspnet/DependencyInjection/issues/340, which covers the general problem.


Refactor/gunney/runtime policy

Refactor runtime policy selection code
We suport sequential, OpenMP, CUDA and HIP runtime policies and have examples that choose one at run time.
The motivation for this refactor are:

The code to define and specify policies is currently duplicated in two algorithms and their examples.
We can anticipate more library, example and test codes requiring this code.
Applications need this code, in the way the examples need it.

This PR is a refactoring.
It does the following:

Factor out DistributedClosestPointRuntimePolicy and MarchingCubesRuntimePolicy enums.
Add header src/axom/core/execution/runtime_policy.hpp where the factored code is moved.
Addresses issue https://github.com/LLNL/axom/issues/1193
Addresses application developer's request for factoring this out.

This branch passes the test on blueos (lassen) and EAS-3 (rzvernal and tioga) systems. (Release build fails on rzansel, but that's happening on the develop branch as well.)

Would it be good to add a check early in this method for whether the local bounding box is empty to avoid operations that aren't needed in that case? https://github.com/LLNL/axom/pull/1225/files#diff-9436794c140ff4fa1edd4f8605e425ee5b5a3bd8c69b8eceafeef63e8c8a7813R578
Based on what's passed in from the call above, the bounding box could be empty, correct?

This seems OK. However, to me it looks like the mix of code conditional logic and macro usage is overly complicated and error prone. What do others think?

@rhornung67 -- This PR captures a pattern that we re-implemented in several places in axom to allow runtime selection of execution policies based on the configuration. Perhaps we can fine-tune/simplify it more in the future, but I think it's a nice improvement over our current approach.

Would it be good to add a check early in this method for whether the local bounding box is empty to avoid operations that aren't needed in that case? https://github.com/LLNL/axom/blob/refactor/gunney/runtime-policy/src/axom/quest/DistributedClosestPoint.hpp#L578
Based on what's passed in from the call above, the bounding box could be empty, correct?

In this case, I think we need to always gather all bounding boxes for the global tree (even empty ones), but we have checks elsewhere to avoid operating on empty ranks.
Interestingly, that function required a bugfix to properly handle empty bounding boxes (https://github.com/LLNL/axom/commit/1314aa2b19365fbf03db72813942f016b6d368c4) without setting the shouldFixBounds parameter to false, empty bounding boxes were erroneously getting converted to infinite bounding boxes!

Would it be good to add a check early in this method for whether the local bounding box is empty to avoid operations that aren't needed in that case? https://github.com/LLNL/axom/blob/refactor/gunney/runtime-policy/src/axom/quest/DistributedClosestPoint.hpp#L578
Based on what's passed in from the call above, the bounding box could be empty, correct?

@rhornung67 Even if the bounding box is empty, all ranks have to participate in the collective communication.

@gunney1 Got it. Thank you.

Thanks @gunney1 -- this is a nice cleanup!
Should we incorporate this into other quest applications, e.g. the IntersectionShaper class and associated example(s)?
Edit: Here's a link to (part of) the shaping example --
https://github.com/LLNL/axom/blob/f511a2593369043c2571f0646fb0ce421acbc572/src/axom/quest/examples/shaping_driver.cpp#L62-L69

Done.


Automated cherry pick of #5424: fix(esxi): Add two account with same account name

Cherry pick of #5424 on release/3.1.
#5424: fix(esxi): Add two account with same account name

Codecov Report

:exclamation: No coverage uploaded for pull request base (release/3.1@7b0cedd). Click here to learn what that means.
The diff coverage is 0%.

@@              Coverage Diff              @@
##             release/3.1   #5428   +/-   ##
=============================================
  Coverage               ?   7.26%
=============================================
  Files                  ?     575
  Lines                  ?   97510
  Branches               ?       0
=============================================
  Hits                   ?    7084
  Misses                 ?   89856
  Partials               ?     570

Flag
Coverage Δ

#aFlag
7.26% <0%> (?)

Impacted Files
Coverage Δ

pkg/multicloud/esxi/manager.go
1.41% <0%> (ø)

pkg/compute/models/cloudaccounts.go
0.76% <0%> (ø)

Continue to review full report at Codecov.

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

/lgtm

/approve


Update link of php

The current link of php return 404 error and dont install it. Set to 5.6.10 and will be fine

Fixed by #392


HmIP-SAM Acceleration Sensor does not connect

Hello alexreinert,
I was trying to connect the SAM Acceleration sensor but in the phase of teaching-in the device it is not being identified.
Is it supposed to work with piVCCU?
Thanks,
quarto4

That device should work since years. Can you tell more about your system (Hardware, OS, piVCCU version) and how you try to teach in the device?

Wow thats shocking. Then it looks like the issue is on my end as I've built the device based on a kit.
Pi 4 8GB, HB-RF-USB-2, RPI-RF-MOD, PiVCCU firmware 3.65.8
Trying to connect by using the Homematic standard functionality
Teach-in devices > Teaching-in of HmIP devices without Internet connection (bottom right)
Enter KEY and SGTIN based on sticker > Teach-in HMIP device (local)
Think I will try again to solder a new one.
Other topic: Btw would devices HmIP-DRSI4 and HmIP-DRDI3 work with piVCCU?

How much distance is between the Pi and the radio module? In case of Pi 4 this should be at least 0.5m, better 1m.
Please describe the teach in exactly  step by step.
As piVCCU uses the original CCU3 firmware, every device supported there should be supported, too. This includes the HmIP-DRSI4 and the HmIP-DRDI3.

Distance was less than 0.5, changed now to 1m.
CCU main screen > click on Teach-in devices (main menu top right)
Enter key and SGTIN on bottom right screen > click Teach-in HmIP device (local)
Insert batteries in device
Devices lights orange for a sec and then green for a sec
Device blinks orange every 10 secs
Teach-in mode 60s active (counts down)
Starting a second round by clicking on Teach-in HmIP device (local)
Teach-in mode 60s active (counts down)
Does not appear in Inbox (0 )

Please try:

Remove Batteries
Start teach in mode in WebUI
Wait for countdown starting
Insert batteries
Click nothing in WebUI, do not press anything on the device
Wait until countdown in finished

I tried but unfortunately that did not solve it.
Maybe there is an issue with the device assembly.
Will check it again.
Thank you for your help.


Raise an error if elasticsearch.yml is present

Signed-off-by: Marc Handalian<EMAIL_ADDRESS>Description
As part of 640, this will throw an error if an elasticsearch.yml file is present in ../config.
Testing steps taken:
tar vfxz opensearch-1.0.0-SNAPSHOT-linux-x64.tar.gz
cd opensearch-1.0.0-SNAPSHOT
./bin/opensearch

<server starts>

cd ../config
touch elasticsearch.yml
../bin/opensearch

output:
Exception in thread "main" SettingsException[elasticsearch.yml was deprecated with opensearch and must be renamed to opensearch.yml]         at org.opensearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:85)         at org.opensearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:113)         at org.opensearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:104)         at org.opensearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:99)         at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:140)         at org.opensearch.cli.MultiCommand.execute(MultiCommand.java:104)         at org.opensearch.cli.Command.mainWithoutErrorHandling(Command.java:140)         at org.opensearch.cli.Command.main(Command.java:103)         at org.opensearch.common.settings.KeyStoreCli.main(KeyStoreCli.java:56)
Issues Resolved
https://github.com/opensearch-project/OpenSearch/issues/640
Check List

[x] New functionality includes testing.

[x] All tests pass

[ ] New functionality has been documented.

[ ] New functionality has javadoc added

[x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

start gradle check

This was harmless and can prevent users from doing something dumb. Why did we decide not to merge it?

I think instead of checking for elasticsearch.yml is present, we should only be concerned whether opensearch.yml is present or not. In case both config files are present we would still be throwing this error with this changes , which I guess is not the right the behavior the user is expecting.

This was my understanding as well @abbashus based on latest conversation in #728.  If I am misunderstanding I can re-open this.


If array is passed into addOption then respect the insert order

Here is a jsFiddle demonstrating the problem: http://jsfiddle.net/8H62B/6/
I'm not a great Javascript programmer so if I did something wrong please feel free to point it out.
When addOption is given an array I would like it if it would respect the order of the array. We already have an $order property on the option so I just fill that in with the appropriate value.
I wasn't sure what files I should change so I just changed everything except the minimized versions. This should hopefully fix #218. Any thoughts?

Thanks for the pull request! I'm going to take a different approach, but agree with you – this is something that needs solved. See https://github.com/brianreavis/selectize.js/issues/640#issuecomment-71788203

Hey @brianreavis, awesome, thanks! Good to hear :)


[Bug] upgrade from 2.0.0 to 2.0.5 then python with default environment will not to work

Search before asking

[X] I had searched in the issues and found no similar issues.

What happened
upgrade from 2.0.0 to 2.0.5 then python with default environment will not to work：
my ${dolphin_home}/conf/env/dolphinscheduler_env.sh had set PYTHON_HOME :
export PYTHON_HOME=/data/soft/miniconda3/envs/jupyterhub
and in dolphinscheduler 2.0.0  it works fine , but after upgrade to 2.0.5 ,I got error :
ImportError: No module named requests
Thant means dolphinscheduler not use the PYTHON_HOME which I set.
What you expected to happen
if I create a environment in dolphin .  how can I bind the environment to my python task by change the dolphinscheduler metadata in database.
How to reproduce
create a python virtual environment ，and set PYTHON_HOME in dolphinscheduler_env.sh to point it ,create python task in 2.0.0 without create any new environment . after update to 2.0.5 ,it will not work.
Anything else
No response
Version
2.0.5
Are you willing to submit PR?

[ ] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

Hi @lordk911 I think you should change the task definition from UI or API, but not update database directly.

sorry, it's not a bug , my env problem


Ability to disable media type validation for UriRetriever

There are several endpoints that do not have the correct media type (e.g. http://json-schema.org/). While this is not ideal it's current reality.
It would be great to be able to disable the content type check as we don't have control of upstream schemas.
Same as #540

This is a good idea. It shouldn't be the default behavior, but adding a config flag to allow non-compliant mimetypes would be extremely helpful to those for whom fixing the mimetype header isn't a viable option.
PRs are welcome, or otherwise I'll get to it eventually :-). We're fairly short on manpower on this project.


How to remove --force from drain command ?

Hi,
Due to --force drain - application is closing connection in Nginx containers ( Using all spot instances for Kubernetes cluster )
I would like to remove --force from below command in entrypoint.sh.
kubectl drain "${NODE_NAME}" --force --ignore-daemonsets --delete-local-data --grace-period="${GRACE_PERIOD}"
please let me know possible solution.
Thanks

--force option in drain operation (https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#drain) only
Continue even if there are pods not managed by a ReplicationController, Job, or DaemonSet

removing --force do not resolve your problem, try to use preStop hook in nginx pod - https://blog.gruntwork.io/gracefully-shutting-down-pods-in-a-kubernetes-cluster-328aecec90d


Can't use email with '+' addressing for AdminEmail parameter

Describe the bug
If I use and e-mail address with<EMAIL_ADDRESS>it template fails to launch with the error message: Parameter 'AdminEmail' must match pattern<EMAIL_ADDRESS>To Reproduce
Enter an e-mail address that has the plus addressing scheme
Expected behavior
I would expect '+' addressing in the e-mail address for AdminEmail.
Please complete the following information about the solution:

[ ] Version: [e.g. v1.0.0]

(SO0009) - The AWS CloudFormation template for deployment of the centralized-logging. Version v4.0.0",

us-east-1
No

Thanks for reporting this bug.
We have added it to our backlog items to be shipped with next release.

Any solution or update regarding this issue ? Iam facing the same problem and cannot deploy cloudformation.

@alb777 until my PR is reviewed, you can try from my fork where I fixed this problem https://github.com/alkayahan/aws-centralized-logging/tree/bugfix-emailregex

This has been addressed with release v4.0.1


[SPARK-36193][CORE] Recover SparkSubmit.runMain not to stop SparkContext in non-K8s env

What changes were proposed in this pull request?
According to the discussion on https://github.com/apache/spark/pull/32283 , this PR aims to limit the feature of SPARK-34674 to K8s environment only.
Why are the changes needed?
To reduce the behavior change in non-K8s environment.
Does this PR introduce any user-facing change?
The change behavior is consistent with 3.1.1 and older Spark releases.
How was this patch tested?
N/A

cc @kotlovs, @HyukjinKwon , @mridulm , @Ngone51

Test build #141200 has started for PR 33403 at commit c216516.

Kubernetes integration test starting
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/45712/

Kubernetes integration test status success
URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/45712/

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/45712/

Test build #141200 has finished for PR 33403 at commit c216516.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/141200/

Gentle ping, @kotlovs, @HyukjinKwon , @mridulm , @Ngone51 .

Thank you, @Ngone51 . Merged to master/3.1.

Thanks!

Hi all, this PR make it only useful for k8s mode, but it can all be helpful for yarn mode, so I made this pr.
https://github.com/apache/spark/pull/40314. WDYT @HyukjinKwon @dongjoon-hyun @Ngone51


InMemory: investigate NREs in ComplexNavigations tests

Several tests in ComplexNavs still throw NRE on InMemory. This issue tracks the investigation and fix for them.

Half of them are already passing.
Duplicate of #16963


SessionNotCreatedException - Error with Chrome

Testbench Version: 9.1.0
Laravel Version: 11.8.0
PHP Version: 8.3.9

Description:
I am using Chrome version 125.0.6422.

But when I run the tests, show this error:

My OS is Ubuntu 22.04.

@crynobone I formatted the PC, installing Ubuntu, Chrome, PHP and Composer from scratch, and the error persists. Dusk even detects Chrome and adds the driver correctly, but when running the tests this error occurs.

I just managed to run it, but I have to leave this command running in my terminal:
./vendor/laravel/dusk/bin/chromedriver-linux --log-level=ALL


esm only, support node 20.6+

get rid of cjs --require support. the only use case for this will be via --loader or --import
there still needs to be a cjs export for the ProcessInfo/ProcessInfoNode class, but that's all
Use --import for node 20.6 and higher.

This landed on v3.
Quite a lot more commonjs support is still required, because it needs to load from globalPreload prior to node 20.6.


Trial status

Describe the issue:
I am a beginner and I simply tried nni following the "Verify installation" part on README.
I started by running:
      nnictl create --config nni/examples/trials/mnist-pytorch/config.yml

The problem is that, when I accidentally ran:
      nnictl stop

the log info showed that the experiment was stopped successfully, but the status of the interrupted trial was still RUNNING and its duration kept increasing. This made me very confused about whether my experiment was stopped or an unexpected error was met.
Only when I ran:
      nnictl resume exp_id

did the status of the interrupted trial become FAILED and its duration stop increasing.
Environment:

NNI version: 2.3
Training service (local|remote|pai|aml|etc): seems remote. I just followed README
Client OS: Ubuntu 16.04
Server OS (for remote mode only): I don't know
Python version: 3.8
PyTorch/TensorFlow version: PyTorch 1.9
Is conda/virtualenv/venv used?: conda used
Is running in Docker?: no

How to reproduce it?:
As I describe above

Sorry the training service is local


Split function opcode validation into new files.

Moved function opcode validation out of idUsage and into new files
minor style changes
General opcode checking is in validate_function.cpp
Execution limitation checking is in
validate_execution_limitations.cpp
Execution limitations was split into a new pass as it requires other
validation to register those limitations first.

Many of the numbers changed here, please take a closer look.

Rebased, squashed and committed as e7fdcdba75eda1f5a70d689cf50628389efa3ed0