text:
gcc: error trying to exec 'cc1': execvp: No such file or directory

(python3) mike@amax:/data2/mike/Detectron.pytorch/lib$ sh make.sh
running build_ext
building 'utils.cython_bbox' extension
creating build
creating build/temp.linux-x86_64-3.6
creating build/temp.linux-x86_64-3.6/utils
gcc -pthread -B /home/mike/anaconda3/envs/python3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/numpy/core/include -I/home/mike/anaconda3/envs/python3/include/python3.6m -c utils/cython_bbox.c -o build/temp.linux-x86_64-3.6/utils/cython_bbox.o -Wno-cpp
gcc: error trying to exec 'cc1': execvp: No such file or directory
error: command 'gcc' failed with exit status 1
Compiling nms kernels by nvcc...
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
Including CUDA code.
/data2/mike/Detectron.pytorch/lib/model/nms
['/data2/mike/Detectron.pytorch/lib/model/nms/src/nms_cuda_kernel.cu.o']
generating /tmp/user/1003/tmpfre47qs9/_nms.c
running build_ext
building '_nms' extension
creating data2
creating data2/mike
creating data2/mike/Detectron.pytorch
creating data2/mike/Detectron.pytorch/lib
creating data2/mike/Detectron.pytorch/lib/model
creating data2/mike/Detectron.pytorch/lib/model/nms
creating data2/mike/Detectron.pytorch/lib/model/nms/src
gcc -pthread -B /home/mike/anaconda3/envs/python3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/mike/anaconda3/envs/python3/include/python3.6m -c _nms.c -o ./_nms.o -std=c99
gcc: error trying to exec 'cc1': execvp: No such file or directory
Traceback (most recent call last):
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/unixccompiler.py", line 118, in _compile
extra_postargs)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 49, in _build
dist.run_command('build_ext')
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
depends=ext.depends)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "build.py", line 37, in
ffi.build()
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 189, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 111, in _build_extension
outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/api.py", line 684, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/recompiler.py", line 1484, in recompile
compiler_verbose, debug)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 20, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 56, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.error.VerificationError: CompileError: command 'gcc' failed with exit status 1
Compiling roi pooling kernels by nvcc...
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
Including CUDA code.
/data2/mike/Detectron.pytorch/lib/model/roi_pooling
generating /tmp/user/1003/tmpqldme772/_roi_pooling.c
running build_ext
building '_roi_pooling' extension
creating data2
creating data2/mike
creating data2/mike/Detectron.pytorch
creating data2/mike/Detectron.pytorch/lib
creating data2/mike/Detectron.pytorch/lib/model
creating data2/mike/Detectron.pytorch/lib/model/roi_pooling
creating data2/mike/Detectron.pytorch/lib/model/roi_pooling/src
gcc -pthread -B /home/mike/anaconda3/envs/python3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/mike/anaconda3/envs/python3/include/python3.6m -c _roi_pooling.c -o ./_roi_pooling.o -std=c99
gcc: error trying to exec 'cc1': execvp: No such file or directory
Traceback (most recent call last):
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/unixccompiler.py", line 118, in _compile
extra_postargs)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 49, in _build
dist.run_command('build_ext')
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
depends=ext.depends)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "build.py", line 35, in
ffi.build()
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 189, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 111, in _build_extension
outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/api.py", line 684, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/recompiler.py", line 1484, in recompile
compiler_verbose, debug)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 20, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 56, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.error.VerificationError: CompileError: command 'gcc' failed with exit status 1
Compiling roi crop kernels by nvcc...
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
Including CUDA code.
/data2/mike/Detectron.pytorch/lib/model/roi_crop
generating /tmp/user/1003/tmpbwans0u6/_roi_crop.c
running build_ext
building '_roi_crop' extension
creating data2
creating data2/mike
creating data2/mike/Detectron.pytorch
creating data2/mike/Detectron.pytorch/lib
creating data2/mike/Detectron.pytorch/lib/model
creating data2/mike/Detectron.pytorch/lib/model/roi_crop
creating data2/mike/Detectron.pytorch/lib/model/roi_crop/src
gcc -pthread -B /home/mike/anaconda3/envs/python3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/mike/anaconda3/envs/python3/include/python3.6m -c _roi_crop.c -o ./_roi_crop.o -std=c99
gcc: error trying to exec 'cc1': execvp: No such file or directory
Traceback (most recent call last):
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/unixccompiler.py", line 118, in _compile
extra_postargs)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 49, in _build
dist.run_command('build_ext')
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
depends=ext.depends)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "build.py", line 36, in
ffi.build()
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 189, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 111, in _build_extension
outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/api.py", line 684, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/recompiler.py", line 1484, in recompile
compiler_verbose, debug)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 20, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 56, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.error.VerificationError: CompileError: command 'gcc' failed with exit status 1
Compiling roi align kernels by nvcc...
gcc: error trying to exec 'cc1plus': execvp: No such file or directory
Including CUDA code.
/data2/mike/Detectron.pytorch/lib/modeling/roi_xfrom/roi_align
generating /tmp/user/1003/tmp_ix521me/_roi_align.c
running build_ext
building '_roi_align' extension
creating data2
creating data2/mike
creating data2/mike/Detectron.pytorch
creating data2/mike/Detectron.pytorch/lib
creating data2/mike/Detectron.pytorch/lib/modeling
creating data2/mike/Detectron.pytorch/lib/modeling/roi_xfrom
creating data2/mike/Detectron.pytorch/lib/modeling/roi_xfrom/roi_align
creating data2/mike/Detectron.pytorch/lib/modeling/roi_xfrom/roi_align/src
gcc -pthread -B /home/mike/anaconda3/envs/python3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DWITH_CUDA -I/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include -I/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/TH -I/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/../../lib/include/THC -I/usr/local/cuda/include -I/home/mike/anaconda3/envs/python3/include/python3.6m -c _roi_align.c -o ./_roi_align.o -std=c99
gcc: error trying to exec 'cc1': execvp: No such file or directory
Traceback (most recent call last):
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/unixccompiler.py", line 118, in _compile
extra_postargs)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/ccompiler.py", line 909, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/spawn.py", line 36, in spawn
_spawn_posix(cmd, search_path, dry_run=dry_run)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/spawn.py", line 159, in _spawn_posix
% (cmd, exit_status))
distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 49, in _build
dist.run_command('build_ext')
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/command/build_ext.py", line 339, in run
self.build_extensions()
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/command/build_ext.py", line 448, in build_extensions
self._build_extensions_serial()
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/command/build_ext.py", line 473, in _build_extensions_serial
self.build_extension(ext)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/command/build_ext.py", line 533, in build_extension
depends=ext.depends)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command 'gcc' failed with exit status 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "build.py", line 36, in
ffi.build()
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 189, in build
_build_extension(ffi, cffi_wrapper_name, target_dir, verbose)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/torch/utils/ffi/init.py", line 111, in _build_extension
outfile = ffi.compile(tmpdir=tmpdir, verbose=verbose, target=libname)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/api.py", line 684, in compile
compiler_verbose=verbose, debug=debug, **kwds)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/recompiler.py", line 1484, in recompile
compiler_verbose, debug)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 20, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose, debug)
File "/home/mike/anaconda3/envs/python3/lib/python3.6/site-packages/cffi/ffiplatform.py", line 56, in _build
raise VerificationError('%s: %s' % (e.class.name, e))
cffi.error.VerificationError: CompileError: command 'gcc' failed with exit status 1

I have this kind of issue too.
My gcc verison is 6.4. and PyTorch version is 0.4.

authors: AlanStark tianmaliuixing


text:
Embassy-RP and RP2040-hal Compatibility??? - Embedded_Hal::PWM:SetDutyCycle Assistance

Hello All,
I'm building a project based on embedded-hal and embassy for various boards that does async operations.
When doing research I noticed that the embassy-rp crate doesn't expose the channel functionality for setting the duty cycle using embedded-hal.
However rp2040-hal does expose that feature, but doesn't seem to have any ties to embassy, which leads to my issue/question.
Will rp2040-hal work with embassy and are there any potential plans on merging the two?

Will rp2040-hal work with embassy

No. Don't mix HALs.

are there any potential plans on merging the two?

No. These projects are never going to merge. Feel free to copy the implementation from rp2040-hal over to embassy-rp

No. These projects are never going to merge. Feel free to copy the implementation from rp2040-hal over to embassy-rp

But be mindful of licences & a little attribution note wouldn't hurt either.

What do you recommend than for async functionality when using rp-hal?

I'd recommend, if you have the time and energy, to try to contribute the implementation of the drivers you need :)
I did that for i2c because I'm using it in a project of mine. I intend to do that for PIO at some point but I have a bunch of thing to do that are higher in priority.

source: gharchive/issue

authors: 9names Token-Thinker ithinuel

repo: rp-rs/rp-hal

license_type: permissive

license_source: github-api


text:
🛑 Breze Cleaning is down

In 7f23327, Breze Cleaning (https://brezecleaning.com/) was down:

HTTP code: 504
Response time: 15419 ms

Resolved: Breze Cleaning is back up in 34c333d.

repo: rpharaniya/websites-uptime-monitor

license: MIT


text:
Fix bug – ignoring custom threshold in html report

Actual threshold value stored in props.coverageSummaryData,
not in props itself. This caused html report to render always
using default threshold level of 80 and ignore threshold configuration
parameter.

Thanks @dolphin278 for tracking this down!
This fix has been merged as part of #55 (6de48b8)
Let me know if the master branch is now fixed once you try it on your projects.

source: gharchive/pull-request

repo: rpl/flow-coverage-report

license: mit

license_source: bigquery


text:
Why is maxOutputTokens limited to 2048?

Hello,
in Validate.php maxOutputTokens is limited to 2048 and throws an error if the value is higher.
According to this page [1] the default value for gemini-pro is 8192
[1] https://cloud.google.com/vertex-ai/docs/generative-ai/model-reference/gemini

Might be because of unclarity in the API reference I was using which says
maxOutputTokens | Maximum number of tokens that can be generated in the response. A token is approximately four characters. 100 tokens correspond to roughly 60-80 words. Specify a lower value for shorter responses and a higher value for potentially longer responses.
Range: 1-2048
Default for gemini-pro: 8192
Default for gemini-pro-vision: 2048.
I will test and if it works I'll update the library!

repo: rpurinton/gemini-php


text:
Issue with near bait analysis

I am using 4Cker with data from a FourCseq object (trnasformed to a DF) and sometimes this works very nice and sometimes I get error messages like:
nearBaitAnalysis -> startingValuesCis -> rbind -> rbind -> match.names

I tried debugging this, but did not find a simple solution for this.
I am unsure how to provide a minimal not working example for this. But I wanted to document this error (hoping it was not reported before).

I think there is an issue with partitioning the data to training the model. Did you get any QC warnings when you created the object?


text:
💬 Correcting text in french

Changes :

Missing e in the word importe

Thanks :P

authors: bastianfbr rrousselGit

repo: rrousselGit/riverpod


text:
docs: add in hardhat guide reference to RPC API

What
Replace reference to the public nodes for a reference to the RPC API and add a reference to the get started guide.
Before

After

Why
Public nodes will no longer be use
Refs
https://rsklabs.atlassian.net/browse/DV-45

@ivegabr Kindly review these changes by Lucia. Thanks

authors: lumaivzqz-rs owans

repo: rsksmart/devportal


text:
Add method to refresh csrf token

Using cookies mode, when trying to authenticate to the RIF Data Vault using [this app](header https://email-verifier.identity.rifos.org/), the csrf token is not returned in the headers as it should. For example, in this other app the Data Vault login is working fine... I added this method enabling another way to get the csrf token.

Pull Request Test Coverage Report for Build 819179227

1 of 2 (50.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage decreased (-0.2%) to 95.833%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

src/index.ts
1
2
50.0%

Totals

Change from base Build 640532388:
-0.2%

Covered Lines:
337

Relevant Lines:
342

💛  - Coveralls

authors: coveralls ilanolkies

repo: rsksmart/express-did-auth


text:
Token Bridge documentation

All the credits for this great work are to @pmprete.
It would be great if @bguiz can check it.
For this PR it is recommended to run locally the dev portal because there were added new pages.

@pmprete awaiting for your final ok to merge

authors: alebanzas jonathansmirnoff


text:
RSocketRequestHandler -> RSocketResponder

Name change to match protocol terminology

Forcing merge after asking Ondrej to avoid conflict with next changes about to work on.

repo: rsocket/rsocket-cpp


text:
Call #to_hash only when object is not a Hash in RSpec::Matcher::BuiltIn::Include

This PR should fix #1068.
With the change in #1012, RSpec::Matchers::BuiltIn::Include calls #to_hash to actual value. If actual value is aActiveSupport::HashWithIndifferentAccess, #to_hash converts to "a hash with string keys". This behavior causes expectations like expect(hsh).to include(:foo) fail as reported in #1068.
This PR change to call #to_hash only when object is not a hash. Because ActiveSupport::HashWithIndifferentAccess inherits Hash, it will not call #to_hash, and expect(hsh).to include(:foo) should pass.

@myronmarston Thank you for review. I updated where you commented. Also, I added 'undef's to avoid "method redefined" warrings that causes builds on Trivis CI fail.

Thanks @eitoball!  Merging in spite of the appveyor failure; it's some problem installing the bundle on 1.9.3.

So the regression still persists in 3.8.1 for ActiveModel::Errors object.
Having following test:
some_model = SomeModel.new
expect { some_model.validate }
  .to change { some_model.errors }
  .to include :fatal_error

it was passing before 3.8.0

@morgoth please open a new issue with a clear repro snippet (ideally w/o using the change matcher, as I don't think this problem is isolated to the composition of change and include, right?).

Unfortunately, the patch seems not to be enough for fixing sinatra's spec.

https://github.com/sinatra/sinatra/blob/b801c6b76b89eb071e2b01700273054bbe8aae05/sinatra-contrib/lib/sinatra/cookies.rb
https://github.com/sinatra/sinatra/blob/b801c6b76b89eb071e2b01700273054bbe8aae05/sinatra-contrib/spec/cookies_spec.rb#L562

Because Sinatra::Cookie::Jar doesn't inherit Hash. Any ideas?

I've opened PR #1073 which should fix the regressions mentioned by @namusyaka and @morgoth.

authors: eitoball jkowens morgoth myronmarston namusyaka

repo: rspec/rspec-expectations


text:
Revert arg mutation error

Stop calling methods on args passed to a stubbed method.
Any method call may mutate an object, so we can't safely call anything on a passed argument.
This reverts the following PRs and commits:

#871:

8a0962a6b8a896b1f1f2806a1282f29cde7d2baa ("Reword comment to not use “external” twice.")
52c69f1ef8ac2c0de5ec08c72df709593a6a8ba5 ("Just use Array#hash.")

#868:

ed3fb3b1ac9e1187eeb44f4a68dd9878f9ce3ec6 ("Provide a clear error when received message args are mutated.")
fc9e9a59904ec52fa8e26e07ee65c41029ef18d0 ("Ignore arg mutations for method calls we are not concerned with.")

This adds notes to the docs about using mutated args with have_received(…).with(…).
Fixes #892.
(Also, I noticed that our @example formatting could use some improvements so I did that real quick.  Later realized that I should have made that a separate PR but don't feel like putting the effort into splitting it...sorry).
/cc @xaviershay

Yep, LGTM

Thanks, @JonRowe.  I backported this to 3-2-maintenance and add a changlog entry there.  I'll be release 3.2.1 with this in it soon.

:+1: :)

authors: JonRowe myronmarston

repo: rspec/rspec-mocks


text:
Bootgrid pagination and search not working

I am trying to get data from json using bootgrid, the data can be display to grid, but its pagination and search are not working. I tried to debug, but no error was displayed.
$(document).ready(function(){
$("#grid-command-buttons").bootgrid(
{
ajax: true,
url: "/newspider/test.do",
});
})
In servlet , I use out.print(jsonObject)  to html,could you tell me why not working?

Obvious question but have you checked this with fiddler to make sure your ajax requests are working and correct?

I have been having the same problem for the last 2 days. I have been troubleshooting. This is what I have observed so far. As you type on in the search box, BootGrig does create the Ajax request and sends it to the server. Dumping the request at the server-side shows that the request is pretty much empty.
In the examples provided on the web site, it is said that the POST body looks like:current=1&rowCount=10&sort[sender]=asc&searchPhrase=&id=b0df282a-0d67-40e5-8558-c9e93b7befed.
But, nothing shows up on the server side for me.
Thanks

have you got anything displayed in the grid before you type into the search box?
And, of course, is your server expecting a POST request at your url?
You could post more of your code here or, better still, create it in jsfiddle and we can see what you're doing.

In my case, yes. When the page first loads, I get the list I expect. After that, As I type in the search box, I see the table is clearly refreshing as the server returns data. But the data is always the same because no searchPhrase is sent in the POST request. I have confirmed that by dumping the request data on the server side.
Thanks.

The GitHub editor renders the html code when I type it. So, here's a screenshot of the html.

I just found the source of my problem. The route definition (URL) was ambiguous (it collided with another route) that seems to cause the problem. I have redefined the URL and everything works well now. Thanks guys.

I've tried to redefined the URL,but it  still didn't work.
this is my servlet
`package servlet;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import com.dao.UserMapper;
import com.model.ResumeShow;
public class AjaxServlet extends HttpServlet {
private static final long serialVersionUID = 3191586035737158373L;
public AjaxServlet() {
super();
}
public void destroy() {
super.destroy(); // Just puts "destroy" string in log
// Put your code here
}
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doPost(request, response);
}
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
request.setCharacterEncoding("utf-8"); // 设置编码
response.setCharacterEncoding("utf-8");
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
SqlSession sqlSession = getSessionFactory().openSession();
UserMapper userMapper = sqlSession.getMapper(UserMapper.class);
JSONObject jsonObject = new JSONObject();
//	jsonObject.put("page", "1");                // 当前页
//	jsonObject.put("total", "1");        // 总页数
// 总记录数
jsonObject.put("current", 1);
jsonObject.put("rowCount", 10);
JSONArray rows = new JSONArray();
List si = userMapper.selectRShow();
int cont=si.size();
int cnt=1;
//		jsonObject.put("records", cont);
for (ResumeShow resumeShow : si) {
JSONObject cell = new JSONObject();
cell.put("id", cnt++);
cell.put("seeker_name", resumeShow.getSeeker_name());
cell.put("sex", resumeShow.getSex());
cell.put("age", resumeShow.getAge());
cell.put("residence", resumeShow.getResidence());
cell.put("education", resumeShow.getEducation());
cell.put("profession", resumeShow.getProfession());
cell.put("school", resumeShow.getSchool());
cell.put("expect_salary", resumeShow.getExpect_salary());
cell.put("work_place", resumeShow.getWork_place());
cell.put("last_company", resumeShow.getLast_company());
cell.put("position_name", resumeShow.getPosition_name());
cell.put("last_period", resumeShow.getLast_period());
cell.put("workYears", resumeShow.getWorkYears());
cell.put("household_registration", resumeShow.getHousehold_registration());
cell.put("job_category", resumeShow.getJob_category());
rows.add(cell);
}
jsonObject.put("rows", rows);
jsonObject.put("total", cont);
out.print(jsonObject);
}
private static SqlSessionFactory getSessionFactory() {
SqlSessionFactory sessionFactory = null;
String resource = "configuration.xml";
try {
sessionFactory = new SqlSessionFactoryBuilder().build(Resources.getResourceAsReader(resource));
} catch (IOException e) {
e.printStackTrace();
}
return sessionFactory;
}
public void init() throws ServletException {
// Put your code here
}
}`
this is my json
{"current":1, "rowCount":10, "rows":[ {"id":1, "seeker_name":"姜波 ", "sex":" 男","age":"22", "residence":"石嘴山", "education":"本科", "profession":"安全工程", "school":"宁夏理工学院", "expect_salary":"面议", "work_place":"昆山", "last_company":"", "position_name":"气化工程师", "last_period":"应届生简历/无工作经验", "workYears":"应届毕业生"}, ... ],"total":15}
and this is my html

ID
seeker_name
sex
age
residence
education
profession
school
expect_salary
work_place
last_company
position_name
last_period
workYears
household_registration
job_category

<script>
$(document).ready(function(){
	$("#grid-command-buttons").bootgrid(
	{
        	ajax: true,
        	url: "bootgird.do",

		});
})
</script>

I've found that it's Fifteen rows in json,but my rowCount is 10 rows, and it should be 10 rows,who can tell me why?

What's this value? int cont=si.size();

@infopete I've solved this problem， I think I lost a sql statement about pagination
Here is my new servlet
`request.setCharacterEncoding("utf-8"); // 设置编码
response.setCharacterEncoding("utf-8");
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
SqlSession sqlSession = getSessionFactory().openSession();
UserMapper userMapper = sqlSession.getMapper(UserMapper.class);
JSONObject jsonObject = new JSONObject();
String current = request.getParameter("current");
String rowCount = request.getParameter("rowCount");
int k = Integer.parseInt(current);
int n = Integer.parseInt(rowCount);
int m = (n-1)*k;
jsonObject.put("current", k);
jsonObject.put("rowCount",n);
JSONArray rows = new JSONArray();
Pagination pagination = new Pagination();
pagination.setM(m);
pagination.setN(n);
List si = userMapper.selectRShow(pagination);
int totalCount = userMapper.totalCount();
	for (ResumeShow resumeShow : si) {
		JSONObject cell = new JSONObject();
		cell.put("resume_id", resumeShow.getResume_id());
		cell.put("seeker_name", resumeShow.getSeeker_name());
		cell.put("sex", resumeShow.getSex());
		cell.put("age", resumeShow.getAge());
		cell.put("residence", resumeShow.getResidence());
		cell.put("education", resumeShow.getEducation());
		cell.put("profession", resumeShow.getProfession());
		cell.put("school", resumeShow.getSchool());
		cell.put("expect_salary", resumeShow.getExpect_salary());
		cell.put("work_place", resumeShow.getWork_place());
		cell.put("last_company", resumeShow.getLast_company());
		cell.put("position_name", resumeShow.getPosition_name());
		cell.put("last_period", resumeShow.getLast_period());
		cell.put("workYears", resumeShow.getWorkYears());
		cell.put("household_registration", resumeShow.getHousehold_registration());
		cell.put("job_category", resumeShow.getJob_category());
		rows.add(cell);
	}
	jsonObject.put("rows", rows);
	jsonObject.put("total", totalCount);
	out.print(jsonObject);`

thanks a lot !

@infopete thanks for helping @MarlonWilkes!

Hi,
Have you ever tried that stuff before? It's something gorgeous, just take a look http://xidufrope.internetdatingmonitor.com/xyxix
My Best, pete@polysym.com

Dear!
Are you still lookinf for that stuff?  I think I've just seen someething you may like,  look http://vacragovi.carhandle.com/e4iovl
pete

Dear friend!
I just wanted to tell you  that we are  all ok, and we have some good news, read it here please http://pryslerdunge.creditmatter.com/e4ztxts
Yours truly, pete

authors: MarlonWilkes infopete ksidibe rstaib

repo: rstaib/jquery-bootgrid


text:
How to increase H2o total cluster memory when using sparklyr & rsparkling

Reporting an Issue with sparklyr
Hi all,
I'm using sparklyr to use spark ML and sparkling water for a tutorial within Rstudio. I managed to use spark ML fine, however i'm running into memory issue. This is becuase the h2o cluster total memory is 0.8 GB, but i tried to change this by using the following:
config$spark.driver.memory <- "6.0G" # 3.4Gb of RAM to be used
config$spark.driver.extraJavaOptions <-	"append -XX:MaxPermSize= 6.0G"

I have 16 GB of RAM and my OS version: Windows 7 6.1 (amd64). In addition, the log information for the java parameters are as follow:
Java heap totalMemory: 656.5 MB
#r thread INFO: Java heap maxMemory: 910.5 MB 0
#r thread INFO: Java version: Java 1.8.0_92 (from Oracle Corporation)
#r thread INFO: JVM launch parameters: [-Xmx1g]
Hence, my question is how to increase the h2o memory size and JVM launch parameter?
Packages -----------------------------------------
package      * version                date
base         * 3.4.1                 2017-06-30
caret        * 6.0-76               2017-04-18
datasets     * 3.4.1               2017-06-30
dplyr        * 0.7.1                 2017-06-22
ggplot2      * 2.2.1               2016-12-30
graphics     * 3.4.1               2017-06-30
grDevices    * 3.4.1              2017-06-30
h2o          * 3.10.5.2            2017-07-21
lattice      * 0.20-35             2017-03-25
methods      * 3.4.1              2017-06-30
rsparkling   * 0.2.1                2017-06-30
sparklyr     * 0.5.6-9018       2017-07-21
stats        * 3.4.1                  2017-06-30
utils        * 3.4.1                   2017-06-30
Thank you
MJ

CC: @navdeep-G

Could this be because you're using 32 bit java? You need to be using 64 bit to use >4gb of RAM in your JVMs I believe. I had a similar issue and installing 64 bit java fixed it, as described here https://stackoverflow.com/questions/44666503/how-do-i-configure-driver-memory-when-running-spark-in-local-mode-via-sparklyr

Hi jayruffell,
Thanks for the help.
I have tried it and now i'm getting JVM error issue (output log). I have uninstalled my java and then reinstalled to 64 bit.
Error in force(code) :
Failed while connecting to sparklyr to port (8880) for sessionid (9920): Gateway in port (8880) did not respond.
Path: /Users/mubarak/Library/Caches/spark/spark-2.1.0-bin-hadoop2.7/bin/spark-submit
Parameters: --driver-memory, 1.8g, --executor-memory, 1.8g, --driver-cores, 3, --class, sparklyr.Shell, --packages, 'ai.h2o:sparkling-water-core_2.11:2.1.10','ai.h2o:sparkling-water-ml_2.11:2.1.10','ai.h2o:sparkling-water-repl_2.11:2.1.10','no.priv.garshol.duke:duke:1.2', '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/sparklyr/java/sparklyr-2.1-2.11.jar', 8880, 9920
Log: /var/folders/v8/55rqcm69421clr6zxmt8zkmh0000gn/T//RtmpRT9M2g/file4cb71d3e104_spark.log
---- Output Log ----
Invalid maximum heap size: -Xmx1.8g
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
---- Error Log ----
Thanks,
MJ

I can't help with that error I'm afraid, I'm new to this stuff myself. Good
luck getting it working.
On 30/07/2017 5:37 AM, "Jibril-Jama" notifications@github.com wrote:

Hi jayruffell,
Thanks for the help.
I have tried it and now i'm getting JVM error issue (output log). I have
uninstalled my java and then reinstalled to 64 bit.
Error in force(code) :
Failed while connecting to sparklyr to port (8880) for sessionid (9920):
Gateway in port (8880) did not respond.
Path: /Users/mubarak/Library/Caches/spark/spark-2.1.0-bin-hadoop2.
7/bin/spark-submit
Parameters: --driver-memory, 1.8g, --executor-memory, 1.8g,
--driver-cores, 3, --class, sparklyr.Shell, --packages,
'ai.h2o:sparkling-water-core_2.11:2.1.10','ai.h2o:
sparkling-water-ml_2.11:2.1.10','ai.h2o:sparkling-water-
repl_2.11:2.1.10','no.priv.garshol.duke:duke:1.2', '/Library/Frameworks/R.
framework/Versions/3.4/Resources/library/sparklyr/java/sparklyr-2.1-2.11.jar',
8880, 9920
Log: /var/folders/v8/55rqcm69421clr6zxmt8zkmh0000gn/T//RtmpRT9M2g/
file4cb71d3e104_spark.log
---- Output Log ---- Invalid maximum heap size: -Xmx1.8g Error: Could not
create the Java Virtual Machine. Error: A fatal exception has occurred.
Program will exit.
---- Error Log ----
Thanks,
MJ
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/rstudio/sparklyr/issues/855#issuecomment-318846363,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALyTeCzpJisTFLGvLDmaCX2a0bKi8XfEks5sS23hgaJpZM4OfnBF
.

The other thing you could try is modifying driver max result size, e.g.
config <- spark_config()
config$spark.driver.maxResultSize <- "5g"

Hi jayruffell,
Thank you for all help.
It worked after repeatedly trying updating my java. I think my laptop was
just acting up for some reason.
Thanks,
MJ
On Wed, Aug 2, 2017 at 5:31 AM, jayruffell notifications@github.com wrote:

The other thing you could try is modifying driver max result size, e.g.
config <- spark_config()
config$spark.driver.maxResultSize <- "5g"
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rstudio/sparklyr/issues/855#issuecomment-319564365,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHxPVjBtpnKHNb82dddwWgmN0P2TUafhks5sT_uMgaJpZM4OfnBF
.

authors: Jibril-Jama javierluraschi jayruffell

repo: rstudio/sparklyr


text:
Not respecting joypad fallback for show mode = controller

First off: amazing plugin, a huge missing feature of godot.
Even tough I set the Joypad Fallback to something :

(doesnt matter if its the default Xbox or ps5)
In Editor, in the Scene, its empty :

When I plug in a controller, it works fine but it disappears again after I unplug.

Hi, thank you for the kind words! :heart:
The joypad fallback is only used if controller type detection fails, and in that case it will assume whatever is set in the fallback. If the controller icon does not show up at all, then the issue must be somewhere else.
The Show Mode only shows that texture whenever that input method is currently being used. So, with your current settings, it will indeed only show up when a controller is connected/used. If what you want is to force the icon to always show the controller icon even when the keyboard is being used, you need to set the Force Type instead.
If that's not the issue, can you please show how that input action is configured in your project?

Hi, any updates on this? It doesn't seem that there was any real issue here, or do you still believe this is a bug?

Hi, sorry, I had to stop working on that project because of a new job and stuff. I think Force Type was adequate, but I cant remember if there was still a bug. Sorry.

authors: SebastianAtWork rsubtil


text:
speedtest: urlopen error timed out

dreamt:/tmp # ./speedtest --verbose
Retrieving speedtest.net configuration...
Cannot retrieve speedtest configuration
ERROR: <urlopen error timed out>

 !!  speedtest: unhandled ERR via trap, but cleanup finished.
dreamt:/tmp #

Sorry. Miss report.

repo: rsvp/speedtest-linux


text:
Progressbar, bounds not set when executing more than one task

There is one minor issue in progressbar. When executing more than one task, the bounds of progressbar is not reset (set) properly. This causes the progress not to work as expected.
A fix will be released in some days.

Issue is fixed in code.

fixed in 1.8.9.

repo: rsyncOSX/RsyncUI


text:
Profile detail fetch issue

The profile detail module is not fetching data and showing this error:

Also previous profiles are read on the dashboard but not on the profiles screen neither on the hud


text:
Incorrect error msg - Your primary email address is not verified

Details
A persistent error message appears on every page and claims my email address is not verified, although it is.
I have a single email address associated with my account, and it has been verified. Actually, after verification, I even saw both success and error messages.

Expected Result
No error message displayed
Actual Result
Incorrect error message:

Your primary email address is not verified. Please verify it here.

@yackx
It will go away once you click on verify it here.

As mention the note will disappear if you click on it. I'm pretty sure there was an issue for this already, I couldn't find it :/

It was closed https://github.com/rtfd/readthedocs.org/issues/4684

The referenced issues #4684 does not seem to match this one.
If I click on "verify it here", I am lead to "Change email" screen. There, if I click on "Make primary", the warning/error message goes away. But that was just me guessing and clicking on a what seemed to be an unrelated button ("make primary" vs "verify" actions).
I fail to see why that extra action is required after I've clicked the link in the email. That alone should verify the address (and make it primary) IMO.

There are related to the notification, when the user fixes the problem that the notifications says, it doesn't disappear until it's clicked.

There are related to the notification, when the user fixes the problem that the notifications says, it doesn't disappear until it's clicked.

Unfortunately, this is how our notification system works now.
We are not using template-based notifications, but instead when an action is needed based on some db field, we create a notification object with the proper message. Then, the only way to make it disappear is to click on the link from the notification (which trigger an AJAX call to delete it).
We are not going to change this behavior soon, so I'm going to close this issue for now. We can reopen it if we want to refactor our notification system.

authors: dojutsu-user humitos stsewd yackx


text:
[Fix #2328 #2013] Refresh search index and test for case insensitive search

#4211 made the search case insensitive. This PR adds tests for it so it does not get broken while implementing #4266
This fix #2328 #2013
@ericholscher r?

@ericholscher I have fixed the issue. My assumption was wrong as there was a edge case which I did not handle in the update method overwrite.
r?

@ericholscher Fixed!


text:
elm-live

Ubuntu 16.04
elm-live --output=elm.js src/Main.elm --pushstate --open --debug
gives. As you see below, I seem to have elm 0.18 properly working.
I can also start the project from within elm-reactor and click on Main.elm, but the it looks ugly, since the css are not loaded properly.
mattias@omen:~/data-oss/elm/elm-spa-example$ elm-live --output=elm.js src/Main.elm --pushstate --open --debug
/usr/local/lib/node_modules/elm-live/source/elm-live.js:165
  let serverStarted;
  ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/elm-live/index.js:1:80)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
mattias@omen:~/data-oss/elm/elm-spa-example$ ls
assets  elm-package.json  elm-stuff  index.html  LICENSE  README.md  src  tests
mattias@omen:~/data-oss/elm/elm-spa-example$ elm-repl
---- elm-repl 0.18.0 -----------------------------------------------------------
 :help for help, :exit to exit, more at <https://github.com/elm-lang/elm-repl>
--------------------------------------------------------------------------------

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode

Looks like you're running an older version of Node that doesn't support let (among other things). Try installing a newer version of Node.

You are correct, the standard package for Ubuntu 16.04 is 4.2.3 or so. Upgraded to 8.11.1 and works fine.

repo: rtfeldman/elm-spa-example


text:
Clearing selected rows

When i selected a row from the checkbox table and perform some action on the rows.
The rows get unselected but the header checkbox remains checked.
How do i unselect the rows explicitly from any method?
Example:

Here the rows 1 and 2 also selected but they are not showing.
Actually they should be unselected from the header checkbox too.

Hi @ojas360
Sorry, I couldn't understand the problem.
Could you please give me more information or a codepen example would be more easy to debug.

Hi @ojas360
currently What version are you using?

I am using version 1.1.2.
The process i am following is:
On select of rows, i m inserting rows into another array.
On some processing on that data after success i am modifying the rows of the datatable by using map()
When i modify the rows, the rows get deselected on the UI, But they are actually selected (as shown in the image attached).

Currently made it working by assigning ref to the table and then
this.$refs.refname.unSelectAllItems();

Currently made it working by assigning ref to the table and then
this.$refs.refname.unSelectAllItems();

hey ojas360,
Can you show me how you made it ?
I mean this function unSelectAllItems(), is built in, or you made it .
Thanks in advance.

Currently made it working by assigning ref to the table and then
this.$refs.refname.unSelectAllItems();

You saved me Man,
Thanks a lot ☺


text:
Update HAL and cortex-m dependencies

Hello,
Thanks for providing this board crate, it was very useful to quickly get started with OpenOCD and VS Code on my STM32F3-Disco :+1:
There are newer versions available for some of your dependencies. I updated them and tested this on my STM32F3-Disco. The only thing I tweaked (which was not a breaking change) was replacing a deprecated API, using into_af_open_drain instead of into_af4_....
Bumping the dependencies like this probably requires a minor version update, so I did that as well..
Kind Regards
Robin

Thanks! I always run the examples on hardware before merging, so it may take me a few days to merge, but I’ll absolutely do that sometime over the holidays.
I’m glad you found this crate useful and can’t thank you enough for updating the deps.

Cool, take your time :)

Any chance this can be committed and released soon, I would like to use later version of stm32f3xx_hal

authors: cmccorvey robamu rubberduck203


text:
Streams are not clearing messages correctly in between calls

Given we run an SSH command using Streams (i.e ping -c 5 www.google.com)
AND the command ended correctly with a {:status,status}
WHEN we try to run the command again inside a stream
THEN we are getting random responses...
After Inspecting the response (https://github.com/rubencaro/sshex/blob/dc0913eaf4a46a9518bb21c0f2aca0e8147d6d90/lib/sshex.ex#L228) I spotted the following pattern:

First call, I get data then :
{:exit_status, 0, 0}
second call I get nothing with:
{:eof, 0}
{:closed, 0}
third call I get some data ending with:
{:exit_status, 0, 141}
fourth call, I get nothing with:
{:closed, 0}
then it will loop over 3rd and 4th alternatively

If I flush() in between calls then everything works normally.
Theory is that some leftover messages coming from ssh_cm are being left in the message box and they are interfering with subsequent calls.
I'm not familiar enough with these to actually create a pull request so now I'll workaround this issue by running each call inside a Task. But a fix to avoid the need of such a workaround would be great.

Hi @jfayad,
I will find time to take a look at this, but the only way that a stream would halt, leaving hanging messages, is after emitting an '{:error,reason}'. So I guess you could flush while processing that case.
I will take a look at it anyway to see if there is anything broken.
Cheers

Hi @rubencaro
I actually am receiving {:status, status} on the first call, then the misbehaviour occurs.
Also using flush might not be safe if other processes are sending messages to the current process, is it ? I guess the specific messages from ssh should be cleared in the after_fun, that's just an intuition and I'm not really sure how to do that though (selectively clearing messages from the mailbox) otherwise I would have gladly sent a pull request.
Cheers

Can you send me a complete working sample of this behaviour?
El 18 ago. 2017 9:20 a. m., "Julien" notifications@github.com escribió:

Hi @rubencaro https://github.com/rubencaro
I actually am receiving {:status, status} on the first call, then the
misbehaviour occurs.
Also using flush might not be safe if other processes are sending messages
to the current process, is it ? I guess the specific messages from ssh
should be cleared in the after_fun, that's just an intuition and I'm not
really sure how to do that though (selectively clearing messages from the
mailbox) otherwise I would have gladly sent a pull request.
Cheers
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rubencaro/sshex/issues/19#issuecomment-323279597, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAc29-Brj31nhFMaAXl7Sbd2leYrJQrGks5sZTspgaJpZM4O6XU-
.

Here you go:
  defp ssh_connect() do
    ip = Application.fetch_env!(:ew_aegir_bridge, EwAegirBridge.Aegir) |> Keyword.get(:aegir_server_ip)
    username = Application.fetch_env!(:ew_aegir_bridge, EwAegirBridge.Aegir) |> Keyword.get(:aegir_server_user)
    case Mix.env do
      :dev ->
        SSHEx.connect ip: to_charlist(ip),
      user: to_charlist(username),
      user_dir: Application.fetch_env!(:ew_aegir_bridge, EwAegirBridge.Aegir) |> Keyword.get(:user_dir)
      _ ->
        SSHEx.connect ip: to_charlist(ip),
      user: to_charlist(username)
    end
  end
  defp aegir_commad(commands) do

    # open ssh connection to terminal
    case ssh_connect() do
      {:ok, connection} ->
        ping = "ping -c 2 www.google.com; ping -c 3 www.google.fr;"
        IO.puts ping
        str = SSHEx.stream connection,'#{ping}'
        IO.puts "Stream returned from SSHex"
        str
        |> Enum.reduce_while({}, fn(x, acc)->
          IO.inspect x
              case x do
                {:stdout,row}    ->
                  {:cont, {}}
                {:stderr,row}    ->
                  {:cont, {}}
                {:status,status} ->
                  {:halt,{:ok, status}}
                {:error,reason}  ->
                  {:halt,{:error, reason}}
              end
            end)
      {:error, reason} ->
        {:error, reason}
    end
  end

Hi @jfayad ,
You are right. flush would be dangerous. Don't do it unless you know what you are doing.
I will try to walk you through the process so you can understand better how it works, and maybe we both get to the solution. Just as thinking out loud.
SSHEx calls :ssh.exec (see here) internally. That ensures that there is a complete sequence of messages sent to your inbox. Also in order. The Erlang FAQ section 10.8 (see here) states that it is guaranteed that the order of reception will be preserved.
In here that order is still preserved, as anything coming from :ssh_cm is received (see also this). Leaving only the case of a timeout, which should be treated by you accordingly. Not this case anyway.
Everything received from :ssh.exec is parsed here and then mapped here to be served each time the stream requests an item. Non data messages (like :eof) are discarded from the stream in here, so you will not get them, and the close message just halts the stream here. You will not see it either.
This snippet works as expected:
defmodule A do

  def go(cmd) do
    {:ok, conn} = SSHEx.connect ip: "127.0.0.1"
    str = SSHEx.stream conn, cmd
    Enum.map(str, fn(x)->
      case x do
        {:stdout, row}    -> {:normal_output, row}
        {:stderr, row}    -> {:error_output, row}
        {:status, status} -> {:exit_code, status}
        {:error, reason}  -> {:error, reason}
      end
    end)
  end

end

Then A.go "ping -c 3 8.8.8.8" and A.go "ping -c 3 8.8.8.8.8.8" if you want (to make it fail), then you should see every message you get for the complete sequence both times. Nothing left on your inbox. You can flush to see there is nothing left.
iex(5)> A.go "ping -c 3 8.8.8.8"
[normal_output: "PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.\n64 bytes from 8.8.8.8: icmp_seq=1 ttl=60 time=19.2 ms\n",
 normal_output: "64 bytes from 8.8.8.8: icmp_seq=3 ttl=60 time=16.3 ms\n",
 normal_output: "\n",
 normal_output: "--- 8.8.8.8 ping statistics ---\n3 packets transmitted, 2 received, 33% packet loss, time 2055ms\nrtt min/avg/max/mdev = 16.381/17.827/19.274/1.452 ms\n",
 exit_code: 0]
iex(6)> A.go "ping -c 3 8.8.8.8"
[normal_output: "PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.\n64 bytes from 8.8.8.8: icmp_seq=1 ttl=60 time=17.1 ms\n",
 normal_output: "64 bytes from 8.8.8.8: icmp_seq=2 ttl=60 time=16.0 ms\n",
 normal_output: "64 bytes from 8.8.8.8: icmp_seq=3 ttl=60 time=16.2 ms\n\n",
 normal_output: "--- 8.8.8.8 ping statistics ---\n3 packets transmitted, 3 received, 0% packet loss, time 2002ms\nrtt min/avg/max/mdev = 16.088/16.490/17.142/0.487 ms\n",
 exit_code: 0]

BUT this snippet reproduces what you saw:
defmodule A do

  def go(cmd) do
    {:ok, conn} = SSHEx.connect ip: "127.0.0.1"
    str = SSHEx.stream conn, cmd
    Enum.reduce_while(str, [], fn(x, acc)->
      case x do
        {:stdout, row}    -> {:cont, acc ++ [row]}
        {:stderr, row}    -> {:cont, acc ++ [row]}
        {:status, status} -> {:halt, acc ++ ["stopped"]}
        {:error, reason}  -> {:halt, acc ++ [reason]}
      end
    end)
  end

end

You can A.go "ping -c 3 8.8.8.8" and get everything ok, so all the messages were processed, but when you call it again you get an empty response. Like this:
iex(6)> A.go "ping -c 3 8.8.8.8"
["PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.\n64 bytes from 8.8.8.8: icmp_seq=1 ttl=60 time=16.4 ms\n",
 "64 bytes from 8.8.8.8: icmp_seq=2 ttl=60 time=18.7 ms\n",
 "64 bytes from 8.8.8.8: icmp_seq=3 ttl=60 time=16.0 ms\n\n",
 "--- 8.8.8.8 ping statistics ---\n3 packets transmitted, 3 received, 0% packet loss, time 2003ms\nrtt min/avg/max/mdev = 16.095/17.096/18.762/1.185 ms\n",
 "stopped"]
iex(7)> A.go "ping -c 3 8.8.8.8"
[]
iex(8)> flush
{:ssh_cm, #PID<0.199.0>, {:exit_signal, 0, 'PIPE', [], []}}
{:ssh_cm, #PID<0.199.0>, {:closed, 0}}
:ok

If I inspect this line which is called to populate the Stream, by reduce_while in this case, I see this:
iex(2)> A.go "ping -c 3 8.8.8.8"

{[stdout: "PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.\n64 bytes from 8.8.8.8: icmp_seq=1 ttl=60 time=16.4 ms\n"], 0}

{[stdout: "64 bytes from 8.8.8.8: icmp_seq=3 ttl=60 time=17.2 ms\n\n"], 0}

{[], 0}

["64 bytes from 8.8.8.8: icmp_seq=2 ttl=60 time=16.7 ms\n",
 "--- 8.8.8.8 ping statistics ---\n3 packets transmitted, 3 received, 0% packet loss, time 2003ms\nrtt min/avg/max/mdev = 16.435/16.823/17.299/0.358 ms\n",
 "stopped"]
iex(3)> flush
{:ssh_cm, #PID<0.181.0>, {:closed, 0}}
:ok

Meaning for some reason reduce_while stops calling next on the Stream when it receives the response {[], 0}, which according to Elixir source emits {:cont, acc}. So it should go on asking for the next element of the Stream.
I suggest you go using Enum.map, or Enum.each, and avoid using Enum.reduce for using SSHEx.stream by now. Also it would be great if you have the time to open an issue so that the Elixir team get to know that this problem exists. Put a reference to this so the have all the details.
I close this as it seems related to Enum.reduce_while internals.
Thanks.

Hey @rubencaro thanks for the detailed explanation, I got swamped by the time you've put your answer and then got busy with other projects untill now.
I'll go with creating an issue on the Elixir project and see how it goes

hey @rubencaro after further digging, it seems the reduce_while implementation that is proposed in the docs. is the culprit.
I suggest to edit the doc. to provide a command that would be fully compatible with streams or to change the way streams are returning values to the reducer so it's aligned with the doc. suggested.
More details https://github.com/elixir-lang/elixir/issues/7050#issuecomment-346523252

Hi @jfayad,
There's no 'reduce_while' in the docs. In the docs I propose 'each' or 'map', actually.
What it seems as I read the issue you opened on the Elixir repo is that there is a difference in the correct return value for the function passed to a 'map' and the one passed to a 'reduce'.
Our mistake was to assume both functions should return the same values throughout the process. It seems there's a small difference (a ':halt' for the 'map' functions, a ':cont' for the 'reduce' functions).
I suggest you make a pull request adding a working example of a 'reduce' process, but keeping the 'each/map' example, as it is correct.
Thanks

authors: jfayad rubencaro

repo: rubencaro/sshex


text:
Feat: Add script to generate npm lock file for docker deployment

Feature Request
Is your feature request related to a problem? Please describe.
On docker deployment, we mostly use yarn or npm. While npm is the defacto and has things like npm ci which doesn't generate lock file rather uses the existing lock file.If you are using other package managers like me in local development (pnpm) , this would create problem as the package-lock.json doesn't exist. Ofcourse you can always run , npm i --package-lock-only but the point is to automate this for docker deployment.
Describe the solution you'd like
Add a make file script, that gets run before deploy script/
Teachability, Documentation, Adoption, Migration Strategy

Fixed by 2b661e39fc89680cc0769e31ca7bc81e61bf8e87

repo: rubiin/ultimate-nest


text:
Rename Cop to Base

This change is just so we follow the new naming pattern of RuboCop, which recently changed from RuboCop::Cop::Cop to RuboCop::Cop::Base. Here, we change RuboCop::Cop::RSpec::Cop to RuboCop::Cop::RSpec::Base.
This should not cause any user-observable changes, unless someone has their own custom cops inheriting from our base class. Should I add an entry to the changelog?
Would you prefer that I squash the two commits?

Before submitting the PR make sure the following are checked:

[x] Feature branch is up-to-date with master (if not - rebase it).
[ ] Squashed related commits together.
[-] Added tests.
[x] Updated documentation.
[ ] Added an entry to the CHANGELOG.md if the new code introduces user-observable changes.
[x] The build (bundle exec rake) passes (be sure to run this locally, since it may produce updated documentation that you will need to commit).

RuboCop kept Cop with a deprecation notice that Base should be used instead.
Maybe we should, too?

I think the RuboCop Cop is the old implementation with some deprecation notices. Our Cop implementation is already based on the new implementation (::RuboCop::Cop::Base). So the deprecation would only be regarding the name, not the implementation.
It’s quite easy for implementors to add an alias from Base to Cop, so I don’t think we should do it. It would just be pushing the problem further down the road.
I’ve added a notice in the changelog.

What I mean is that ::RuboCop::Cop::RSpec::Cop was renamed to ::RuboCop::Cop::RSpec::Base, and some custom cops, residing in third-party repos and in lib/rubocop/cops folders in certain projects will be broken with an update.
This cop would become broken, as it originated from an internal company's cop.
I suggest keeping ::RuboCop::Cop::RSpec::Cop as an alias of ::RuboCop::Cop::RSpec::Base with a deprecation notice.

@pirj I’ve added ::RuboCop::Cop::RSpec::Cop back, and changed the Changelog notice.

authors: bquorning pirj

repo: rubocop-hq/rubocop-rspec


text:
auto-correct can change the result of a program if offenses collide

Rubocop auto-correct changes the result of the code in scenario related to use of reject and none?.

Expected behavior
Rubocop auto-correct should not break the program in this case overly complex logic detected, but only warn or prompt to run it second time (or more) to overcome that issue safely.
Actual behavior
Having a code like this to be cleaned up with --auto-correct:
example_before.rb
#!/usr/bin/env ruby

array = ["world"]
array_of_hashes = [{ hello: "world" }]
result = array_of_hashes.select { |key| !array.any? { |b| b == key[:hello] } }
puts result.size

rubocop --auto-correct changes it to this:
array = ["world"]
array_of_hashes = [{ hello: "world" }]
result = array_of_hashes.reject { |key| array.none? { |b| b == key[:hello] } }
puts result.size

which produces a different result (here result size is 1 instead of 0).
Steps to reproduce the problem
Create a file with content given below:
$ nano -w example_before.rb

#!/usr/bin/env ruby

array = ["world"]
array_of_hashes = [{ hello: "world" }]
result = array_of_hashes.select { |key| !array.any? { |b| b == key[:hello] } }
puts result.size

Copy the file to a new file to have old one in place:
$ cp example_before.rb example_after.rb

Run auto correction:
$ rubocop --auto-correct example_after.rb

Offenses:

example_after.rb:5:10: C: [Corrected] Use reject instead of inverting select.
result = array_of_hashes.select { |key| !array.any? { |b| b == key[:hello] } }
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
example_after.rb:5:41: C: [Corrected] Use none? instead of inverting any?.
result = array_of_hashes.select { |key| !array.any? { |b| b == key[:hello] } }
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1 file inspected, 2 offenses detected, 2 offenses corrected

Check how the corrected code is working afterwords:
$ ruby example_before.rb
0
$ ruby example_after.rb
1

RuboCop version
$ rubocop -V
0.48.1 (using Parser 2.4.0.0, running on ruby 2.2.7 x86_64-linux)
$ ruby -v
ruby 2.2.7p470 (2017-03-28 revision 58194) [x86_64-linux]

I realize that if the problematic line was written like this:
array_of_hashes.select { |key| !array.include?(key[:hello]) }
it would be corrected to this:
array_of_hashes.reject { |key| array.include?(key[:hello]) }
not causing the issue.

repo: rubocop-hq/rubocop


text:
Add new Layout/AutocorrectableLineLength cop

Similar to https://github.com/rubocop-hq/rubocop/pull/6824 and https://github.com/rubocop-hq/rubocop/pull/6826, this is a cop that we developed internally so that we could achieve more opinionated Ruby formatting using Rubocop.
It programmatically shortens certain lines by conservatively inserting line breaks into long method calls, hashes, and arrays. It's a bit complex, but I think the code comments and documentation do a reasonable job explaining both the implementation and intended usage.
I'm open to suggestions as how best to upstream this. I'm not sure, for example, if I should try to integrate it into Metrics/LineLength, or vice versa.
Open sourced from a Flexport-internal Ruby formatting project.

Before submitting the PR make sure the following are checked:

[x] Wrote good commit messages.
[x] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Added an entry to the Changelog if the new code introduces user-observable changes. See changelog entry format.
[x] The PR relates to only one subject with a clear title
and description in grammatically correct, complete sentences.
[x] Run bundle exec rake default. It executes all tests and RuboCop for itself, and generates the documentation.

That's a really cool cop overall!

I'm open to suggestions as how best to upstream this. I'm not sure, for example, if I should try to integrate it into Metrics/LineLength, or vice versa.

I'll have to think about this. I'd also be curious to hear what the rest of @rubocop-hq/rubocop-core think on the subject of having a separate cop or merging this in the existing one.

It's an awesome new feature, @maxh!
I'm leaning towards incorporation into the existing Layout/LineLength cop as the best alternative. We'd get rid of double reporting of the same offense, and also of the trouble with two Max parameters or a shared Max parameter (both have their drawbacks). Do you think it's doable?

This new logic cannot autocorrect all instances of Layout/LineLength -- only certain long lines that have breakable hashs, method calls, arrays, etc. Is it ok to have the LineLength cop be partially but not completely auto-correctable?

Yes, that's no problem. There are already several cops that autocorrect only some (or perhaps most) of the offenses they report.

LineLength is in the namespace Metrics. The other cops in that namespace don't support autocorrect and tend to be computed summary stats of code. It might seem more natural to me for this cop to live in Layout or Style.

No matter where you put it, the LineLength cop will be a bit different from its department colleagues. It would fit better in Layout than in Style since it only makes whitespace changes, but it has a Max parameter that can be set by --auto-gen-config and that's why it's been put in the Metrics department. It's better to let it stay there IMO.
So, green light from me at least, to go ahead with the merger. I hope @bbatsov agrees.

Please take a look at the new PR "Add initial autocorrection support to LineLength cop" https://github.com/rubocop-hq/rubocop/pull/6927. Thanks!

authors: bbatsov jonas054 maxh


text:
Performance/RegexpMatch not safe for variables that may be numeric

Numerics can be used with =~ operator but not be used as argument for #match?
The code transformation applied can break the code.

For example if it takes a file with this content:
def has_an_o?(arg)
  if arg =~ /o/i
    true
  else
    false
  end
end

has_an_o?("one") # => true
has_an_o?(1) # => false

The file contents is turned into this
def has_an_o?(arg)
  if /o/i.match?(arg)
    true
  else
    false
  end
end

has_an_o?("one") # => true
has_an_o?(1) # => :2:in `match?': no implicit conversion of Integer into String (TypeError)

Which breaks as seen above.
RuboCop version
1.50.2 (using Parser 3.2.2.1, rubocop-ast 1.28.1, running on ruby 3.0.6) [x86_64-darwin22]

rubocop-performance 1.14.3
rubocop-rails 2.15.2

Note, the behavior of Object#=~ has changed in Ruby 3.2:
$ ruby -ve '42 =~ /regexp/'
ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [x86_64-darwin19]
-e:1: warning: deprecated Object#=~ is called on Integer; it always returns nil

$ ruby -ve '42 =~ /regexp/'
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [x86_64-darwin19]
-e:1:in `<main>': undefined method `=~' for 42:Integer (NoMethodError)

Ah, that's really good to know.
I will get to adjust that before get to version 3.2.
My config is set to 3.0 for now, though. I am using:
AllCops:
  TargetRubyVersion: 3.0

Would there be a way to mark a cop conditionally safe by TargetRubyVersion or is this a bad idea somehow?
I do understand it will be better getting the code shape to be ready for future versions, but I believe as me most developers may be disappointed by the tool when we are trying to get things right and the tool works against it.
BTW, I am asking if it is a good or bad idea so I dig further and help making a PR. I took a quick look at the code and it will take me a while to get there. I am just trying to save my time if it may be a silly idea.

authors: formigarafa koic

repo: rubocop/rubocop-performance


text:
Cop Idea: Report redundant database indexes

Is your feature request related to a problem? Please describe.
In PostgreSQL (and perhaps other backends) an index that has the same prefix as another index is redundant as btree indexes are "ordered". For example, given the schema.rb
  create_table "pizza_toppings", force: :cascade do |t|
    t.integer "pizza_id", null: false
    t.integer "topping_id", null: false
    t.index ["pizza_id"], name: "index1"
    t.index ["topping_id"], name: "index2"
    t.index ["pizza_id", "topping_id"], name: "index3", unique: true
  end

The index "index1" is redundant because it shares the same prefix ("pizza_id") as "index3".
Removing redundant indexes reduces database write overhead and reduces the total size of the database.
There is some more information about this in the article: https://xzilla.net/blog/2008/Jul/Index-pruning-techniques.html
Which includes the SQL query:
select
    a.indrelid::regclass, a.indexrelid::regclass, b.indexrelid::regclass
from
    (select *,array_to_string(indkey,' ') as cols from pg_index) a
    join (select *,array_to_string(indkey,' ') as cols from pg_index) b on
        ( a.indrelid=b.indrelid and a.indexrelid > b.indexrelid
        and
            (
                (a.cols LIKE b.cols||'%' and coalesce(substr(a.cols,length(b.cols)+1,1),' ')=' ')
                or
                (b.cols LIKE a.cols||'%' and coalesce(substr(b.cols,length(a.cols)+1,1),' ')=' ')
            )
        )
order by indrelid;

Describe the solution you'd like
When a redundant index is discovered in the database (or schema.rb) report an offense so the project maintainers can correct it.
Describe alternatives you've considered
I've discovered these by inspection within my own projects.
I've used the script above to find these manually.
The advantage of using rubocop-rails is that these are discovered using existing CI tools.

This is better handled by the specialized tools, like https://github.com/gregnavis/active_record_doctor. It has this check and a lot more.

Thanks for the tip. I'll take a look at the suggestion.

authors: fatkodima jdufresne

repo: rubocop/rubocop-rails


text:
Rails/Present and Rails/Blank don't play well with the double bang pattern.

I had some code that started like this:
def has_foo?
  !!object&.foo.present?
end

This is using the double bang pattern to make it so that a nil object counts as not having a foo.

Expected behavior
I'm not sure exactly. It's hard to statically tell when !! is redundant, and when it's necessary.
Actual behavior
Rails/Present will first auto-correct this to:
def has_foo?
  !object&.foo.blank?
end

Rails/Blank will then auto-correct this to:
def has_foo?
  object&.foo.present?
end

Which has different semantics than the original.
Steps to reproduce the problem
rubocop --auto-correct --only Rails/Present
rubocop --auto-correct --only Rails/Blank

RuboCop version
$ [bundle exec] rubocop -V
1.21.0 (using Parser 3.0.2.0, rubocop-ast 1.11.0, running on ruby 2.7.2 x86_64-darwin20)
  - rubocop-minitest 0.15.0
  - rubocop-rails 2.11.3
  - rubocop-sorbet 0.6.2

Nevermind, it looks like !!object&.foo.present? and object&.foo.present? have the same semantics.


text:
Support auto-restart RuboCop server

This PR supports auto-restart RuboCop server when updating RuboCop.
First, cache RuboCop version when the RuboCop server starts.
And, auto-restarts when the runtime (client) RuboCop version does not match the cached RuboCop version.

Before submitting the PR make sure the following are checked:

[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Wrote good commit messages.
[ ] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
[ ] Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

Seems to me that changes to the config should also auto-restart the server.

Right! I would like to look at it separately from this PR.

Thanks!

authors: bbatsov koic

repo: rubocop/rubocop


text:
[Fix #11567] Fix Layout/EndAlignment false negative

Fixes #11567
This PR adds the singleton class definition to the inspection targets of Layout/EndAlignment.

Before submitting the PR make sure the following are checked:

[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Wrote good commit messages.
[x] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
[x] Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

Thanks!

authors: j-miyake koic


text:
Fix dedenting Style/ClassAndModuleChildren

Fixes the auto-corrected indentation for Style/ClassAndModuleChildren with compact style .
This PR adds a failing spec for an issue with the Style/ClassAndModuleChildren cop not dedenting code correctly.
I noticed this as I was wishing to add a new style, and found that the compact style does not remove whitespace correctly.
I am curious if this is normal behaviour. I.e. do the indentation checks occur last, and so can be used for auto-correcting whitespace?
I am trying to familiarise myself with the codebase to work out exactly how to implement this functionality in an idiomatic way. But if you have any pointers that would be helpful. I'd be happy to have a go at fixing this.

Before submitting the PR make sure the following are checked:

[x] The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
[x] Wrote good commit messages.
[x] Commit message starts with [Fix #issue-number] (if the related issue exists).
[x] Feature branch is up-to-date with master (if not - rebase it).
[x] Squashed related commits together.
[x] Added tests.
[x] Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
[x] Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.

Looks good! Thanks!

@bbatsov
Is this a problem? Happy to fix if there's another build step and some failing tests in there.

authors: bbatsov markburns


text:
增加 oauth 的跨域请求

可以让第三方通过 grant_type=password 方式在前端直接 post form 表单到 https://ruby-china.org/oauth/token 获取到合适的 token 并且不需要一个中间服务器来处理这个 proxy
如果需要再严苛一点的路由:
    config.middleware.use Rack::Cors do
      allow do
        origins '*'
        resource '/api/*', headers: :any, methods: [:get, :post, :put, :delete, :destroy]
        resource '/oauth/token', headers: :any, methods: [:post]
      end
    end

attach #233 #263

repo: ruby-china/ruby-china


text:
warning with ruby 2.7

Subject of the issue
after upgraded my mac to ruby 2.7, i have warning when i use ruby-git lib.
/usr/local/lib/ruby/gems/2.7.0/gems/git-1.6.0/lib/git/lib.rb:1054: warning: Using the last argument as keyword parameters is deprecated

https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
Your environment

ruby 2.7.0p0
git-1.6.0

i don't have this warning with git-1.5.0

Yeah, they're quite annoying, esp. since adding -W:no-deprecated to silence them doesn't work for me.
@sylvek, I guess you meant "Ruby", not "Python", right? Would you mind to change that?

@dhs-rec thank you ☺

This issue can be closed. An updated gem has not yet been pushed but this was fixed in #453.

please push a new version, because that is so annoying. The only warning what I see all the time on any command.

In the mean time, as in before the new gem is released, it is super easy to patch your installed version
https://github.com/ruby-git/ruby-git/pull/453/files

Fixed in #453 and release in v1.7.0

authors: chris-roerig dhs-rec jcouball pyrmont skcc321 sylvek

repo: ruby-git/ruby-git


text:
Telling a representer to represent nil adds all of that class's methods to nil

The code causing this behavior is https://github.com/ruby-grape/grape-roar/blob/master/lib/grape/roar/representer.rb#L10
Example
user = User.find_by(email: 'i_dont_exist@gmail.com')
# user => nil
present user, with: User::Representer
# User::Representer.ancestors => [..., Grape::Roar::Representer, ...]

Obviously there's a bug in this application code, but the result is that, since nil is a singleton, now every time the application asks for nil, it gets it, but with all kinds of fun stuff mixed in, like a custom #to_hash that, for instance, mucks with the instantiation of ActionController::Parameters and causes completely unrelated pages in an app to blow up
Thoughts? I'd be happy to submit a PR, but i only have a cursory understanding of all the interplay between grape, roar, grape-roar, representable, etc. and just tossing in a nil check might not be the best approach

This is happening here, maybe we should protect the code from extending singletons, nil being one, maybe there's a better way than comparing to a list?

It appears to be a design consequence of representable using inheritance (via mixin) instead of delegation (in the style of the Presenter pattern). One option aside from checking against a list is to see if the object is dupable.
def represent(object, _options = {})
  dup = object.dup
  dup.extend self
  dup
rescue TypeError
  fail TypeError.new "Can't represent #{object.class}"
end

This would be great, because even non-singletons aren't getting polluted when they're represented and then can continue to be used in another context. But this means that we can't represent anything that's not dupable. After a quick google, integers, symbols, true, false and floats aren't dupable and therefore would not be representable. I'm not sure if this is desirable behavior for grape-roar

Maybe we can just detect whether these are singleton types?

This bit us suddenly, and very strangely. We also were mistakenly calling present nil, ... in one endpoint. A later request to the same process would fail with surprising errors.
We're attempting to patch this by simply guarding against the nil case (object.extend self unless object.nil?), but as discussed above that might not be a complete fix.

@joeyAghion, I'm sorry that this bug has affected you today! My proposed solution can be one of two things:

We can use a blacklist, even though it is not my preferred solution, but it is well defined and I can have it out for you quickly + later reconcile it out properly if time to fix is a problem.
We can instead decorate the singleton classes of the instances of the objects that we receive. Additionally, we have a nice predicate for the objects we should avoid touching.

While not immediately obvious, the magic is in doing checks like this:
nil.singleton_class == nil.class #=> true

We would avoid that object, but we wouldn't avoid this one:
irb(main):013:0> class Foo; end;
=> nil
irb(main):014:0> x = Foo.new
=> #<Foo:0x007fc0e00ff138>
irb(main):015:0> x.singleton_class == x.class
=> false

Thoughts?

@ashkan18 was this your problem?

I think the next step should be to properly spec it, @mach-kernel do you think you understand this enough to code up a failing spec?

Yes @dblock this was the issue in my case as well.

@dblock Yup! I'll draft up a spec for this.

I've opened #23 with the spec so we can explore fixes.

authors: ashkan18 dblock j-clark joeyAghion mach-kernel

repo: ruby-grape/grape-roar


text:
Fix array indicies in error messages.

Error messages for arrays was totally broken. It always returns index 0 and detect errors only for first entry in Array. You may cherry-pick to master first commit from this branch and run specs to see the problem.
Moreover, i have no idea how previous implementation of indicies may work correctly with current ParamsScope implementation (#1218).
Also i've found bug in coercion - look for TODO comment inside diff. Specs aren't green because of this bug.

Looks like specs are broken for some good reason(s). Check it out pls.

@dblock, i've fixed bug with coercion. Checkout last commit for details.

Also, this PR may fix this issue: #1434

This looks good. I made a bunch of cosmetic comments, fix'em and I'll merge. Thanks. If you can squash commits that'd be cool too, otherwise I'll github squash them.

@dblock done)

Merged, thank you.

@ffloyd Thanks a lot for fixing this, I got it wrong and I didn't know how to fix it.

authors: dblock ffloyd towanda

repo: ruby-grape/grape


text:
RDF::Graph should use Repository#insert_statements

RDF::Graph relies on Writable#insert_statements, which always inserts statements individually.
Some (hopefully all) Repository implementations that interact with upstream data implement #insert_statements as a single request. Using Graph to interact with a repository results in sending individual requests, regardless of the Repository implementation.
e.g., the following results in some_statements.count individual requests to some_repository:
my_graph = RDF::Graph.new(RDF::URI('http://ex.org/my_graph'), data: some_repository)
my_graph << some_statements

I'm working on a fix for this.

I think the way to do this may be to redirect to Repository#insert_statements and update each statement's graph_name using map or in an enumerator, depending on the form of statements. Note that insert_statements has a special case if the first element is an Enumerable.

I came up with:
    def insert_statements(statements)
      enum = statements.respond_to?(:each_statement) ? statements.each_statement : statements
      @data.insert(*enum.map { |st| statement = st.dup; statement.graph_name = graph_name; statement })
    end

But planning to dig around a little more to make sure that's the best plan.

There was a recent change to make sure that it could take an enumerator, as the *enum.map... can create too many arguments; see https://github.com/ruby-rdf/rdf/pull/214#issuecomment-146389454.
I was thinking of something like the following:
def insert_statements(statements)
  enum = Enumerable::Enumerator.new do |yielder|
    this.send(statements.respond_to?(:each_statement) ? :each_statement : :each) do |st|
      st = st.dup
      st.graph_name = graph_name;
      yielder << st
    end
  end
  @data.insert_statements(enum)
end

This allows @data.insert_statements to take chunks of statements to insert without evaluating everything at once.

authors: gkellogg no-reply

repo: ruby-rdf/rdf

license: unlicense


text:
Make sure duplicated breakpoint is disabled

The debugger currently shows a warning message for duplicated breakpoints and doesn't add it to the breakpoints list. But line or catch breakpoints would still be activated and stop the program.
To fix this issue, we need to disable duplicated breakpoints. However, binding.bp also uses line breakpoints with a fixed internal location, simply excluding duplicated breakpoints will break it.
So the solution requires 2 checks:

Check if the breakpoint is duplicated by key.
Check if it's a normal breakpoint (e.g. added by the break command) instead of a oneshot (binding.bp or DEBUGGER__.console) breakpoint.

If both are satisfied, the debugger should warn the user and disable the breakpoint.
It also fixes the issue that multiple binding.bp raises duplicated breakpoints warning, which doesn't make sense.

@ko1 this is ready for review now 😄

I accidentally deleted the branch 😬

Question: MethodBreakpoint isn't duplicable?

@ko1 do you mean I missed method breakpoint's test case? I've added it.

Ah, I misread this ticket. Only LineBreakpoint is NOT duplicable, I missed. I see.

repo: ruby/debug


text:
Geocoding for organization model. Is there a DRY way to add to more than one model?

Adding feature #440
This is what I have for the organization model. I started the others but found myself doing a lot of copy-and-pasting. I'm wondering if there's a more DRY way to add to the other models we're interested in.

Hey @LizPrescott looks like you have a few conflicts that need resolving before we can move forward!

Ok done!

authors: LizPrescott seanmarcia

repo: rubyforgood/diaper


text:
Refactor how Rails handles filter categories passed to and from Vue

Why
The contribution filtering works nicely, but difficult to understand. We'd like to add new filters, and that's hard at the moment. I wrote the original code and am unhappy with how confusing it is. Its confusing complexity is what makes adding or editing filters more difficult for us, and also slows down bringing people into the project and up to speed on how all this stuff works.
What
The big change is making each type of filter its own class.
Each class

accepts an ActiveRecord relation
knows how to filter that relation by request parameters passed from the controller

Also used this opportunity to:

make the controller code easier to follow
simplify the logic around conditionally passing links to the frontend (do we show the link to contact someone? does the user have permission to see this?
work on our nomenclature for clarity & simplicity

And hopefully this will make adding new filters easier in the future

Testing

Updated some tests. Could probably use more work in this regard
Next Steps

Some next steps are already called out in the comments when this PR was in Draft status.
Also: add a filter for Date now that it should be easier to do so
Accessibility

We were very careful to leave the existing UI unchanged in any visible way, so this should be accessibility-neutral
Security

Hopefully this improves the security what with less dynamic/functional code and code that's easier for future devs to maintain

Pre-Merge Checklist

[x] Security & accessibility have been considered
[ ] Tests have been added, or an explanation has been given why the features cannot be tested
[x] Documentation and comments have been added to the codebase where required
[x] Entry added to CHANGELOG.md if appropriate
[x] Outstanding questions and concerns have been resolved
[ ] Any next steps have been turned into Issues or Discussions as appropriate

Notes on what we're thinking of following up on as a subsequent refactoring:

[ ] Removing paramters.keys references in the filters so filter classes can scan the full parameter list as they see fit (comment
[ ] Move serialization concerns out of the filter classes, perhaps by breaking up filter_grouping in to one method that returns the filter grouping's name and another method that returns the filter options for that filter grouping (comment)

repo: rubyforgood/mutual-aid


text:
Your bundle is locked to passgen (1.0.2), but that version could not be found in any of the sources listed in your Gemfile.

Seems like passgen has been deleted from RubyGems.
I have repushed version to peatio-passgen. https://rubygems.org/gems/peatio-passgen

It was yanked from RubyGems because of the following issue: https://github.com/cryptice/Passgen/issues/2

authors: deniskoronets lenon

repo: rubykube/peatio


text:
how can i custom size?

hi, thanks fot this, how can i custom size?

@devzucca
You can follow this doc link for size props.
https://github.com/rumess/react-flip-countdown#size

@devzucca You can follow this doc link for size props. https://github.com/rumess/react-flip-countdown#size

Yes, I saw the documentation, but I would like to change it to specific sizes such as pixels, can I pass a number or px type?

@devzucca You can follow this doc link for size props. https://github.com/rumess/react-flip-countdown#size

Yes, I saw the documentation, but I would like to change it to specific sizes such as pixels, can I pass a number or px type?

Sorry, not possible right now.

authors: devzucca rumeshudash

repo: rumess/react-flip-countdown


text:
Azure Open Ai Model Provider Issue

When using the Azure Open AI Model Provider option, I encountered a 404-Resource Not Found error. It seems additional configurations, such as 'azure_endpoint' and 'api_version', might need to be added to settings.py.

Azure OpenAI support has not yet been added officially, meanwhile, please try to set the following env variables:
AZURE_OPENAI_ENDPOINT and OPENAI_API_VERSION

Thanks. Fixed in Release 0.1.25

repo: run-llama/create-llama


text:
Error: Operation timed out after 10.0 seconds

i am getting this error with llama 70b , the app is work fine with gpt4o do i need to put sleep somewhere ans wait till task is finished.

You might have to give a complete traceback. There are many timeouts this could be

authors: Rohith-Scalers logan-markewich


text:
[Bug]: llm.complete getting failed with Value error: Chat response object has no field usage while using ollama

Bug Description
from llama_index.llms.ollama import Ollama
llm = Ollama(model="llama2", request_timeout=60.0)
response = llm.complete("What is the capital of France?")
print(response)
Above code is giving value error
Version
0.12.1
Steps to Reproduce
Install latest llamaindex and llamaindex llms ollama package and run below code
from llama_index.llms.ollama import Ollama
llm = Ollama(model="llama2", request_timeout=60.0)
response = llm.complete("What is the capital of France?")
print(response)
Relevant Logs/Tracbacks
No response

Thanks Logan for checking. Downgrading ollama package to 0.3.3 works and ollama with 0.40 breaks the code


text:
[Question]: what is the difference between sub query engine and agent?

Question Validation

[X] I have searched both the documentation and discord for an answer.

Question
by reading the docs, it seems to me that both  sub query engine and agent are capable of breaking complex questions into smaller ones. What is the difference and when to use each please?

Thanks! Could you please let me know which one( or both) should I use in the following situation, and how?
I am trying to implement a two layer chatbot. the front layer serves as the interface to the user and has memory for the chat; the back layer breaks questions into small ones and send to diifferent engines for answers.

@tobi could you plz help?


text:
[BUG] 413 Request Entity Too Large

I was sending a couple hundred page pdf request.
The site says a 1000 page maximum.
But i get a 413 request entity too large error.

We limit to 750pages, and 50Mb per PDF, how big are your files?

oh i see, i have one that is 300ish pages but 80mb, that's why.
would the best path be to split the pdf into two, parse them separately, and combine the output nodes?

Sorry for the long delay. Yes, you can definitely do what you describe. We plan on supporting larger documents in the future.

authors: BinaryBrain chengyjonathan hexapode


text:
Concurrent Telemetry requests

All requests from the public API service to the Telemetry service were
done serially. In some cases a single request to the public API's Stat
endpoint resulted in 5 serial requests to the Telemetry service.
Make all requests from the Public API to Telemetry concurrent.
Signed-off-by: Andrew Seigner siggy@buoyant.io
Part of #299

Also LOL at golang encouraging multiple return values but not having a tuple type.  SMDH

@rmars I'm seeing the same issue on a different branch --- possibly we should open an issue for it?

@rmars nice catch! Per offline convo, we've confirmed this is an issue on master as well. Filed #328 to follow up.

authors: adleong hawkw siggy

repo: runconduit/conduit


text:
Update quest-helper 4.0.0

This adds the basis for player made quests, such as:

RuneliteNpcs to talk to and examine
Quest steps for NPCs
Tracking of player quest states
Interactable items

This is demonstrated in Cook's Helper.
Main things I think worth considering with this PR:

Item pickup changes the text of "Walk" to something else (Pick up). Doesn't interact with the actual behaviour of walk
NPC replacement keeps the original clickbox of the original NPC, but the menu option is still moved about

Does this PR supersede #4067? (I'm aware both are hold-for-release since they're awaiting API changes to be released)

It will supersede it yes, I can close that one now.

authors: Nightfirecat Zoinkwiz

repo: runelite/plugin-hub


text:
Nylo menu colors

This plugin recolors the menu entry for Nylocas in Theatre of Blood according to the attack style of the Nylo.

Jagex's statement on third-party clients lists the following as an example of a disallowed feature, which this plugin would fall under:

Adds additional visual or audio indicators of a boss mechanic

authors: AnkouOSRS Nightfirecat


text:
Create blast-mine-dynamite-restriction

If the player runs out of dynamite in the Blast Mine, this plugin will alert the player (with a sound effect and chat message) and deprioritize chiseling Hard Rock (set it to right-click only) until they have it again. This way, they don't waste time chiseling the next rock if they can't load it, and helps with increasing efficiency.

Please use a unique config group, not example.

authors: Fabletownn YvesW


text:
Update Chunk Tasks plugin

Track farming tasks
QOL UI enhancements
Refresh tasks from Chunk Picker

@LlemonDuck - You were one of the reviewers for this plugin, and I just wanted to make sure that I'm not missing anything on my PR. Completely understand that it takes time to get to. Just don't want it to sit here forever if I'm missing something dumb. Thanks in advance!

For http requests to 3rd party websites we require a warning to the user that their ip address will potentially be available to the plugin author. If you can change your requests to use a github.io domain then the warning will not be needed, otherwise you must add a config option that defaults to off with a warning such as this:
@ConfigItem(
...
warning = "This plugin submits your IP address to a 3rd party website not controlled or verified by the RuneLite Developers."
)

@MESLewis - thanks for the review. Added the IP address warning as requested

authors: MESLewis nathanreidok


text:
Ability to setup Screen Markers into "Groups"

The ability to setup screen markers as a group, so that a simple click would toggle all of them would be a nice feature to have I think.
For example let's say i have 10 screen markers set up
1-5 are for activity A
6-10 are for activity B
Simply click the group and all of the markers in that group are enabled at the same time, perhaps add the ability to also expand the group so othat you can toggle on and off individual markers in the group if needed.

Duplicate of #3205

authors: JoshuaNLG Nightfirecat

repo: runelite/runelite


text:
World switcher does no longer respond in both game and start screen.

Type
Crash or hang
Operating System
Windows
OS Version
Windows 10
Bug description
Since yesterday I cannot switch worlds anymore. Help
Screenshots or videos
Difficult to screenshot as there just happens nothing
RuneLite version
1.10.10.3
Rev 216
2.6.8
Logs
No response

It works for me
I would delete both runelite and the plugin and download it all over again making sure to download the x64 bit edition versus the x32 bit edition

The issue tracker is not a support forum. Please join the Discord for questions or support.

authors: Kevsosmooth Nightfirecat YahIAmLorde


text:
Kourand Tooltip in World Map plugin

Type
Other
Operating System
Windows
OS Version
10
Bug description
Hovering the Kourand Teleport icon on the world map still displays Level 69, however OSRS recently updated the spell to require level 48.
This is a feature with the World Maps plugin.
Screenshots or videos

RuneLite version
Runelite version: 1.10.21.1
Launcher version: 2.6.8
Logs
No response

this was already fixed in #17447

authors: Alexsuperfly Silersun


text:
Add worldmap tooltip to Ruins of Ullek mine and rare trees #15415

Added the mining location and the rare tree location to worldmap plugin.
Fixes #15415

23d74b5 is second commit. fixed the indentation on line 192 of MiningSiteLocation.java

This looks like a duplicate of #15271, which is still waiting for review.

authors: devPhatt fuzxi