NameError when adding params to a preview

Before opening an issue please make sure you have consulted the Lookbook documentation (in particular the Troubleshooting section) and have checked the existing issues to see if this has already been reported.

Describe the bug
When adding dynamic parameters, a NameError is generated:
uninitialized constant #<Class:#<YARD::CodeObjects::MethodObject:0x0000ffff14ae8080>>::TITLE
To Reproduce
Steps to reproduce the behaviour:

Create a component called TestComponent that takes a title parameter.

test_component.rb
# frozen_string_literal: true

class TestComponent < ApplicationComponent
  attr_reader :title

  def initialize(title:)
    super

    @title = title
  end
end

test_component.html.erb

<%= title %>

Create a preview file.

test_component_preview.rb
# frozen_string_literal: true

class TestComponentPreview < Lookbook::Preview
  TITLE = 'A default title'

  # @param title text
  def default(title: TITLE)
    render TestComponent.new(title: title)
  end
end

Attempt to view the component in Lookbook.

Expected behaviour
The component preview is rendered in Lookbook without errors.
Screenshots
(none, but see the full error text below)
Version numbers
Please complete the following information:

Lookbook: 2.0.0.beta.8
ViewComponent: 2.82.0
Rails: <IP_ADDRESS>
Ruby: 2.7.4p191 (2021-07-07 revision a21a3b7d23) [aarch64-linux]
Yard: 0.9.28

Additional context
Removing the # @param title text line allows the component to render, but the title is no longer changeable by the viewer.
I'm not sure if this is Zeitwerk-related; we had to rename some files just to get Rails to start once the lookbook gem was added, even though it started just fine without the gem in place. Does Lookbook make any changes to the autoloader configuration?
Full error text:
NameError
uninitialized constant #<Class:#<YARD::CodeObjects::MethodObject:0x0000ffff14ae8080>>::TITLE
(eval) [line 1]
Full stack trace:
(eval):1:in `value_default'
/usr/local/bundle/gems/lookbook-2.0.0.beta.8/lib/lookbook/tags/param_tag.rb:31:in `instance_eval'
/usr/local/bundle/gems/lookbook-2.0.0.beta.8/lib/lookbook/tags/param_tag.rb:31:in `value_default'
/usr/local/bundle/gems/lookbook-2.0.0.beta.8/lib/lookbook/param.rb:58:in `from_tag'
/usr/local/bundle/gems/lookbook-2.0.0.beta.8/app/controllers/concerns/lookbook/targetable_concern.rb:71:in `block in set_params'
/usr/local/bundle/gems/lookbook-2.0.0.beta.8/app/controllers/concerns/lookbook/targetable_concern.rb:70:in `map'
/usr/local/bundle/gems/lookbook-2.0.0.beta.8/app/controllers/concerns/lookbook/targetable_concern.rb:70:in `set_params'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:428:in `block in make_lambda'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:200:in `block (2 levels) in halting'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/abstract_controller/callbacks.rb:34:in `block (2 levels) in <module:Callbacks>'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:201:in `block in halting'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:513:in `block in invoke_before'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:513:in `each'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:513:in `invoke_before'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:110:in `block in run_callbacks'
/usr/local/bundle/gems/actiontext-<IP_ADDRESS>/lib/action_text/rendering.rb:19:in `with_renderer'
/usr/local/bundle/gems/actiontext-<IP_ADDRESS>/lib/action_text/engine.rb:55:in `block (4 levels) in <class:Engine>'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:121:in `instance_exec'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/local/bundle/gems/marginalia-1.11.1/lib/marginalia.rb:109:in `record_query_comment'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:121:in `block in run_callbacks'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:139:in `run_callbacks'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/abstract_controller/callbacks.rb:41:in `process_action'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/rescue.rb:22:in `process_action'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications.rb:180:in `block in instrument'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/notifications.rb:180:in `instrument'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/instrumentation.rb:32:in `process_action'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal/params_wrapper.rb:245:in `process_action'
/usr/local/bundle/gems/activerecord-<IP_ADDRESS>/lib/active_record/railties/controller_runtime.rb:27:in `process_action'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/abstract_controller/base.rb:136:in `process'
/usr/local/bundle/gems/actionview-<IP_ADDRESS>/lib/action_view/rendering.rb:39:in `process'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal.rb:190:in `dispatch'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_controller/metal.rb:254:in `dispatch'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/routing/route_set.rb:33:in `serve'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/journey/router.rb:49:in `block in serve'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/journey/router.rb:32:in `each'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/journey/router.rb:32:in `serve'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/routing/route_set.rb:834:in `call'
/usr/local/bundle/gems/railties-<IP_ADDRESS>/lib/rails/engine.rb:527:in `call'
/usr/local/bundle/gems/railties-<IP_ADDRESS>/lib/rails/railtie.rb:190:in `public_send'
/usr/local/bundle/gems/railties-<IP_ADDRESS>/lib/rails/railtie.rb:190:in `method_missing'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/routing/mapper.rb:48:in `serve'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/journey/router.rb:49:in `block in serve'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/journey/router.rb:32:in `each'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/journey/router.rb:32:in `serve'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/routing/route_set.rb:834:in `call'
/usr/local/bundle/gems/omniauth-2.1.0/lib/omniauth/strategy.rb:202:in `call!'
/usr/local/bundle/gems/omniauth-2.1.0/lib/omniauth/strategy.rb:169:in `call'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/static.rb:126:in `call'
/usr/local/bundle/gems/dragonfly-1.4.0/lib/dragonfly/middleware.rb:14:in `call'
/usr/local/bundle/gems/meta_request-0.7.3/lib/meta_request/middlewares/app_request_handler.rb:15:in `call'
/usr/local/bundle/gems/meta_request-0.7.3/lib/meta_request/middlewares/meta_request_handler.rb:15:in `call'
/usr/local/bundle/gems/bullet-7.0.2/lib/bullet/rack.rb:12:in `call'
/usr/local/bundle/gems/rack-attack-6.6.1/lib/rack/attack.rb:103:in `call'
/usr/local/bundle/gems/rack-attack-6.6.1/lib/rack/attack.rb:103:in `call'
/usr/local/bundle/gems/rack-<IP_ADDRESS>/lib/rack/static.rb:161:in `call'
/usr/local/bundle/gems/remotipart-1.4.4/lib/remotipart/middleware.rb:32:in `call'
/usr/local/bundle/gems/warden-1.2.9/lib/warden/manager.rb:36:in `block in call'
/usr/local/bundle/gems/warden-1.2.9/lib/warden/manager.rb:34:in `catch'
/usr/local/bundle/gems/warden-1.2.9/lib/warden/manager.rb:34:in `call'
/usr/local/bundle/gems/rack-<IP_ADDRESS>/lib/rack/tempfile_reaper.rb:15:in `call'
/usr/local/bundle/gems/rack-<IP_ADDRESS>/lib/rack/etag.rb:27:in `call'
/usr/local/bundle/gems/rack-<IP_ADDRESS>/lib/rack/conditional_get.rb:27:in `call'
/usr/local/bundle/gems/rack-<IP_ADDRESS>/lib/rack/head.rb:12:in `call'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/http/content_security_policy.rb:18:in `call'
/usr/local/bundle/gems/rack-<IP_ADDRESS>/lib/rack/session/abstract/id.rb:266:in `context'
/usr/local/bundle/gems/rack-<IP_ADDRESS>/lib/rack/session/abstract/id.rb:260:in `call'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/cookies.rb:654:in `call'
/usr/local/bundle/gems/activerecord-<IP_ADDRESS>/lib/active_record/migration.rb:567:in `call'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/callbacks.rb:101:in `run_callbacks'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/callbacks.rb:26:in `call'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/executor.rb:14:in `call'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in `call'
/usr/local/bundle/gems/appsignal-3.0.27/lib/appsignal/rack/rails_instrumentation.rb:19:in `call'
/usr/local/bundle/gems/better_errors-2.9.1/lib/better_errors/middleware.rb:87:in `protected_app_call'
/usr/local/bundle/gems/better_errors-2.9.1/lib/better_errors/middleware.rb:82:in `better_errors_call'
/usr/local/bundle/gems/better_errors-2.9.1/lib/better_errors/middleware.rb:60:in `call'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call'
/usr/local/bundle/gems/rack-contrib-2.3.0/lib/rack/contrib/response_headers.rb:19:in `call'
/usr/local/bundle/gems/meta_request-0.7.3/lib/meta_request/middlewares/headers.rb:18:in `call'
/usr/local/bundle/gems/web-console-3.7.0/lib/web_console/middleware.rb:135:in `call_app'
/usr/local/bundle/gems/web-console-3.7.0/lib/web_console/middleware.rb:22:in `block in call'
/usr/local/bundle/gems/web-console-3.7.0/lib/web_console/middleware.rb:20:in `catch'
/usr/local/bundle/gems/web-console-3.7.0/lib/web_console/middleware.rb:20:in `call'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
/usr/local/bundle/gems/railties-<IP_ADDRESS>/lib/rails/rack/logger.rb:37:in `call_app'
/usr/local/bundle/gems/railties-<IP_ADDRESS>/lib/rails/rack/logger.rb:26:in `block in call'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/tagged_logging.rb:80:in `block in tagged'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/tagged_logging.rb:28:in `tagged'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/tagged_logging.rb:80:in `tagged'
/usr/local/bundle/gems/railties-<IP_ADDRESS>/lib/rails/rack/logger.rb:26:in `call'
/usr/local/bundle/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in `call'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
/usr/local/bundle/gems/request_store-1.5.1/lib/request_store/middleware.rb:19:in `call'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/request_id.rb:27:in `call'
/usr/local/bundle/gems/rack-<IP_ADDRESS>/lib/rack/method_override.rb:24:in `call'
/usr/local/bundle/gems/rack-<IP_ADDRESS>/lib/rack/runtime.rb:22:in `call'
/usr/local/bundle/gems/activesupport-<IP_ADDRESS>/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/executor.rb:14:in `call'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/static.rb:126:in `call'
/usr/local/bundle/gems/dragonfly-1.4.0/lib/dragonfly/cookie_monster.rb:9:in `call'
/usr/local/bundle/gems/rack-<IP_ADDRESS>/lib/rack/sendfile.rb:110:in `call'
/usr/local/bundle/gems/actionpack-<IP_ADDRESS>/lib/action_dispatch/middleware/host_authorization.rb:103:in `call'
/usr/local/bundle/gems/rack-cors-1.1.1/lib/rack/cors.rb:100:in `call'
/usr/local/bundle/gems/rack-mini-profiler-3.0.0/lib/mini_profiler/profiler.rb:237:in `call'
/usr/local/bundle/gems/webpacker-5.4.3/lib/webpacker/dev_server_proxy.rb:25:in `perform_request'
/usr/local/bundle/gems/rack-proxy-0.7.2/lib/rack/proxy.rb:67:in `call'
/usr/local/bundle/gems/railties-<IP_ADDRESS>/lib/rails/engine.rb:527:in `call'
/usr/local/bundle/gems/railties-<IP_ADDRESS>/lib/rails/railtie.rb:190:in `public_send'
/usr/local/bundle/gems/railties-<IP_ADDRESS>/lib/rails/railtie.rb:190:in `method_missing'
/usr/local/bundle/gems/puma-5.6.5/lib/puma/configuration.rb:252:in `call'
/usr/local/bundle/gems/puma-5.6.5/lib/puma/request.rb:77:in `block in handle_request'
/usr/local/bundle/gems/puma-5.6.5/lib/puma/thread_pool.rb:340:in `with_force_shutdown'
/usr/local/bundle/gems/puma-5.6.5/lib/puma/request.rb:76:in `handle_request'
/usr/local/bundle/gems/puma-5.6.5/lib/puma/server.rb:443:in `process_client'
/usr/local/bundle/gems/puma-5.6.5/lib/puma/thread_pool.rb:147:in `block in spawn_thread'

Hey @unikitty37, thanks for the bug report - I've taken a look and I've spotted the problem is so I'll get that fixed up now and it'll go out in the next beta release.

I'm not sure if this is Zeitwerk-related; we had to rename some files just to get Rails to start once the lookbook gem was added, even though it started just fine without the gem in place. Does Lookbook make any changes to the autoloader configuration?

The params bug is not a Zeitwerk issue, but I'd be very interested to find out a bit more about the problems you describe above. Lookbook absolutely should not be stopping Rails running so I'm very keen to figure out what is going on here!
Do you think you could give me some examples of what you needed to do to get it working? A one or two examples of file paths with the changes needed in each one would be really helpful.
Also, if possible, could you paste in the output of the "copy debug data" link in the Lookbook debug menu? With any sensitive info redacted, if needed. It's the little ? icon in the top right of the header:

I don't want to take up too much of you time but any more info on this would be much appreciated 🙏
Lookbook does add some additional paths to the autoloader, but it doesn't tinker with any wider Zeitwerk settings outside of autoloading it's own files. However there may still be some conflict somewhere that is causing the issues you ran into.
Thanks for all the detailed info and I'll let you know when a fix is ready to test.

@unikitty37 I've just released beta.9 that should fix the NameError issue you are seeing. Let me know how you get on when you get a chance to try it.
I'll leave this issue open for now to track the conversation around the Zeitwerk problem but I may split that out into it's own issue once I know a bit more about it.

Hey @unikitty37, thanks for the bug report - I've taken a look and I've spotted the problem is so I'll get that fixed up now and it'll go out in the next beta release.

Thanks! Beta 9 seems to have fixed it 🎉

I'm not sure if this is Zeitwerk-related; we had to rename some files just to get Rails to start once the lookbook gem was added, even though it started just fine without the gem in place. Does Lookbook make any changes to the autoloader configuration?

The params bug is not a Zeitwerk issue, but I'd be very interested to find out a bit more about the problems you describe above. Lookbook absolutely should not be stopping Rails running so I'm very keen to figure out what is going on here!
Do you think you could give me some examples of what you needed to do to get it working? A one or two examples of file paths with the changes needed in each one would be really helpful.

Sure; the file that was throwing the error was lib/redacted_integration/nomination_helpers.rb, which had to be moved to lib/redacted_integration/redacted_integration/nomination_helpers.rb.
module RedactedIntegration
  module NominationHelpers
    ...
  end
end

(there were three or four others in the same folder that needed to be moved one deeper)
and the file lib/redacted_integration.rb had to have all the require_relative paths changed similarly.

Also, if possible, could you paste in the output of the "copy debug data" link in the Lookbook debug menu? With any sensitive info redacted, if needed. It's the little ? icon in the top right of the header:

{
  "version": "2.0.0.beta.8",
  "env": "development",
  "config": {
    "project_name": "REDACTED",
    "project_logo": null,
    "preview_paths": [
      "test/components/previews",
      "/workdir/spec/components/stories"
    ],
    "preview_display_options": {
    },
    "preview_controller": "ViewComponentsController",
    "preview_template": "lookbook/previews/preview",
    "preview_inspector": {
      "main_panels": [
        "preview",
        "output"
      ],
      "drawer_panels": [
        "source",
        "notes",
        "params",
        "*"
      ]
    },
    "preview_embeds": {
      "enabled": true,
      "policy": "SAMEORIGIN",
      "panels": false,
      "actions": [

      ],
      "scenarios": [

      ],
      "display_option_controls": true
    },
    "preview_layout": "component_preview",
    "preview_disable_action_view_annotations": true,
    "preview_type_default": "view_component",
    "preview_sort_scenarios": false,
    "page_controller": "Lookbook::PageController",
    "page_route": "pages",
    "page_paths": [
      "test/components/docs"
    ],
    "page_extensions": [
      "html.*",
      "md.*"
    ],
    "page_options": {
    },
    "markdown_options": {
      "tables": true,
      "fenced_code_blocks": true,
      "disable_indented_code_blocks": true,
      "strikethrough": true,
      "highlight": true,
      "with_toc_data": true,
      "lax_spacing": true
    },
    "highlighter_options": {
      "theme": "github",
      "dark": false
    },
    "component_paths": [
      "app/views",
      "app/components"
    ],
    "reload_on_change": true,
    "live_updates": true,
    "listen_paths": [

    ],
    "listen_extensions": [
      "rb",
      "html.*"
    ],
    "ui_theme": "indigo",
    "ui_theme_overrides": {
      "accent_50": "#f3fafb",
      "accent_100": "#e8f5f7",
      "accent_200": "#c5e5eb",
      "accent_300": "#a2d5df",
      "accent_400": "#5cb6c7",
      "accent_500": "#1696af",
      "accent_600": "#14879e",
      "accent_700": "#117183",
      "accent_800": "#0d5a69",
      "accent_900": "#0b4a56"
    },
    "ui_favicon": true,
    "log_level": 2,
    "log_use_rails_logger": true,
    "debug_menu": true,
    "experimental_features": false,
    "links": {
      "docs": "https://v2.lookbook.build",
      "demo": "https://v2-demo.lookbook.build",
      "repo": "https://github.com/ViewComponent/lookbook/tree/v2"
    },
    "using_view_component": true,
    "dependencies": {
      "actioncable": true,
      "listen": true,
      "view_component": true
    },
    "panels": {
    },
    "inputs": {
    },
    "tags": {
    }
  }
}

Thanks! Beta 9 seems to have fixed it 🎉

Excellent! 🙂

Sure; the file that was throwing the error was lib/redacted_integration/nomination_helpers.rb, which had to be moved to lib/redacted_integration/redacted_integration/nomination_helpers.rb.

This is very odd - the lib directory is definitely not where I would have not expected autoloading issues caused by a Lookbook integration! I'll try and recreate the problem at my end and see if I can get top the bottom of it. Really appreciate you getting back to me with more details about it.
I don't want to take up any more of your time but if you have a chance could you possibly see if you have the same autoloading issue with the previous beta.4 version? There was a small change to autoloading in beta.5 that shouldn't have any impact on the lib directory but it would be good to rule it out if possible.
I'm going to close this issue down and open a fresh one to track the autoloading problem - I'll link to this conversation from it and I'll update there once I have figured out what is going on.


Add a complex command to open the command palette with a specific group

I want to add a button to the editor title menu to help my users open the command palette with my specific group already typed in.

That exists via the workbench.action.quickOpen command. E.g. as keybinding:
{
	"key": "ctrl+0",
	"command": "workbench.action.quickOpen",
	"args": "test"
}

That shows files with a specific prefix, not the command palette with a specific prefix. @bpasero

Oh nevermind. I guess you just have to add > in front of that top open the palette.


Fix text coming in reverse order with boxes flow disabled

Closes #398
I've got a TODO in the code to change after #396 is merged, so I'll keep this as a draft PR for now.
Example PDF
Code to reproduce:
from pdfminer.high_level import extract_text
from pdfminer.layout import LAParams

laparams = LAParams(boxes_flow=3, line_margin=0.001)
print(extract_text("test.pdf", laparams=laparams))

(Note that once #396 is merged we'll be able to do boxes_flow=None, I'm passing 3 simply to disable it)
Output before fix:
Text 4
Text 3
Long Text 1
Text 2
Text 1

Output after fix:
Text 1
Text 2
Long Text 1
Text 3
Text 4

Checklist

[X] I have added tests that prove my fix is effective or that my feature
works
[X] I have added docstrings to newly created methods and classes
[X] I have optimized the code at least one time after creating the initial
version
[X] I have updated the README.md or I am verified that this
is not necessary
[X] I have updated the readthedocs documentation or I
verified that this is not necessary
[X] I have added a consice human-readable description of the change to
CHANGELOG.md

@pietermarsman I've rebased this now that 396 is merged, so should be good to go now


golint: strange behaviour when processing code involving go.mod replace statements

What version of Go are you using (go version)?

$ go version
go version go1.19.3 linux/amd64

Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (go env)?
Fedora 37.
go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/mike/.cache/go-build"
GOENV="/home/mike/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/mike/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/mike/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/lib/golang"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.19.3"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/mike/Scratch/mwe/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build66445986=/tmp/go-build -gno-record-gcc-switches"

What did you do?
The utility golint behaves strangely in the presence of replace statements in go.mod. Given the following directory tree:
go.mod
|
pkg--test--+--go.mod
|          |--test.go
|
prog--main.go

The following prog/main.go:
package main

import (
	"fmt"
	"local/test"
)

func main() {
	// Give golint something to complain about.
	if false {
		return
	} else {
		fmt.Printf("Hello, %d!\n", test.I)
	}
}

The following top-level go.mod:
module main

go 1.16

replace local/test => ./pkg/test

require local/test v0.0.0-00010101000000-000000000000 // indirect

I ran the command golint pkg/test/ local/test/.
What did you expect to see?
I expected to see:
$ golint pkg/test/ local/test/
prog/main.go:12:9: if block ends with a return statement, so drop this else and outdent its block
pkg/test/test.go:3:1: comment on exported var I should be of the form "I ..."

What did you see instead?
Usage of golint:
	golint [flags] # runs on package in current directory
	golint [flags] [packages]
	golint [flags] [directories] # where a '/...' suffix includes all sub-directories
	golint [flags] [files] # all must belong to a single package
Flags:
  -min_confidence float
    	minimum confidence of a problem to print it (default 0.8)
  -set_exit_status
    	set exit status to 1 if any issues are found

Things worked better if I run golint twice:
$ golint pkg/test/
pkg/test/test.go:3:1: comment on exported var I should be of the form "I ..."
$ golint local/test/
/home/mike/Scratch/mwe/pkg/test/test.go:3:1: comment on exported var I should be of the form "I ..."

Here is a file containing a minimum (not?) working example: mwe.tar.gz.

As can be seen in the readme, golint is frozen and deprecated:
https://github.com/golang/lint
This won't be fixed, sorry.

Thank you for the clarification!


ref: Performance improvements when serializing events

Large perf difference for breadth benchtest. Requires running without --boxed (edit pytest.ini)

We probably should land https://github.com/getsentry/sentry-python/pull/226 at some point to get benchtests working out of the box...


Why can't I visit monik.ai?

Whether visit it out of the Great Firewall or visit it in China Net. Is the server stopped?

looks like the domain registration ran out (https://www.whois.com/whois/monik.ai)  let's hope no one buys the domain before the current maintainer can get it and set the site back up

The domain was not held by me back in the day, but by one of the community members on our Discord. They stopped paying for it a while back ¯\(ツ)/¯
Anyway, I updated the Readme to no longer point to that domain, as I will not repurchase it. You can still download from the GitHub releases directly, as always.


Hash_b explanation incorrect?

It is possible that hash_b will return 0, reducing the second term to 0. This will cause the hash table to try to insert the item into the same bucket over and over. We can mitigate this by adding 1 to the result of the second hash, making sure it's never 0.
index = hash_a(string) + i * (hash_b(string) + 1) % num_buckets

hash_b(string) + 1 will never be 0, but it may end up having the same effect if hash_b(string) is (num_buckets-1). Then no matter what i is, the final result will be the same as hash_a(string) % num_buckets, effectively resulting in the same DDOS explained before.

Yes, i face the same problem, here is a example
int prime_a  = 151;
int prime_b = 163;
int buckets = 107;
int hash_a = 92; //calc
int hash_b = 106; //calc

then the result of   (hash_a + (attempt* (hash_b+1)))%buckets will always give me the same number 92 no matter what attempt is.
so i use big number to instead prime_a and prime_b, but i think this is not a prefect solution. the problem still there.

Hi all, sorry for the delay in response, I've just started a new job and have been pretty busy this past week.
You're both right - that situation would cause the same issue. However, I ~ think ~ that this problem can be avoided by choosing a hash_b whose maximum number is smaller than hash_a's maximum number (which is by design the same as num_buckets). Then, hash_b(string) could never be num_buckets - 1.
Does that sound correct to you? If so, I'll definitely add this info to the tutorial.

I think @jamesroutley is suggesting to use a smaller prime for HT_PRIME_2 to ensure that hash_b remains lower than hash_a.

I update (hash_a + (attempt* (hash_b+1)))%buckets to (hash_a + (attempt* (hash_b+sqrt(ht_table->size))))%buckets which fix the error.
+1 changed to +sqrt(ht_table->size).


Sketch type issue

change color transparency, but color and color hex  no change。

a six digit hex doesn't contain alpha, of course it would not change.


Add tmx port.

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

Thanks for the PR and sorry for the long delay!
I needed to rebase out the extra change in this PR, however since you made your changes on master I didn't want to push to this PR.
Instead, I made and merged #4460.


Change http to https to make Live Input work

And by the way, if I feel significant delay (maybe 0.2-0.3s), is it my hardware is not good enough to support Chrome to get live input? Anyway to tweak it?

@cwilso I noticed the same thing and was just coming here to open the same PR.

If you're getting 200-300ms delay, that's pretty bad; some Linux systems will just have that in our audio pipeline, though (and some older or lower-powered Android devices).


Suggestions :)

Hi MrV,
I've been working with your scripts and used the update-sui script lately. It's been working great and I've nothing to complain about. I only have some minor suggestions you can think about.

I'd personally pipe the output of actions under [INFO] Check out GIT repo to dev\null. These actions are mainly git clone, git fetch upstream, git checkout, and curl -fLJO, since these produce an outcome that is not very useful information to have displayed in the terminal and can be omitted in my opinion.
In the install script, I'd implement a check if screen and jq have already been installed on the machine and if not, install them. I'd also add a new paragraph under the Getting Started section, on how to update the Sui node by simply adding screen -S sui -m bash ./update-sui.sh and some short descriptive words.
Update: I just finished the update script and (just for fun) executed it again. My exception was that my local and the remote version should be the same now. But the script says, my local version is 0.6.2 whereas the remote version is 0.6.3. So, has the update not been installed?
Is it possible to also install the Sui binaries alongside the build of the Sui node? This would make commands such as sui --version available.

That's it for the moment, been looking forward to more updates :)
Thank you for this great and useful work!

Thank you for testing it out and the feedback.  I did take your suggestion and pipe some of that output to clean it up.
There is a check for jq already, but not one for screen.  However, screen is never used in the script and prefer to keep it to dependencies the script needs.  Screen is likely called before the script anyways, so checking for it is a bit late.
As for the update script, I will have to check, there is sometimes a delay with the devnet releases and the GitHub tags I think so it may have just been bad timing.
Yeah, I think an option to add the binaries is a good idea.

Hi,
sorry to bother you again, but I just downloaded the latest version of the scripts and tried to execute the update-sui script, but it fails due to this error:

I even cloned the whole repo, but this issue persists.
Any idea what I can do?

Oh, sorry about that bug.  I should add a better update script.  You need to manually download the VERISON file or update the number in it to 4

So I changed the number in the VERSION file to 4 and it works now.


[typescript-language-features] Add command and editor context menu contribution for Find Source Definition

I was overconfident in my ability to figure out how to expose https://github.com/microsoft/TypeScript/pull/48264 in VS Code 😅, calling on @mjbvz for help. I started copying some relevant stuff about commands and contexts from Find File References, but then I realized the UI behavior I want is identical to definitions/implementations, and I didn’t know how to reconcile those two things.

@andrewbranch Can you share the VS Code branch you've been using for testing?

When I was developing https://github.com/microsoft/TypeScript/pull/48264, I just tested with VS Code Insiders by temporarily replacing the implementation of Go To Definition with the implementation of Find Source Definition since the response shape was the same. Now that https://github.com/microsoft/TypeScript/pull/48264 is merged, I don’t have a VS Code branch capable of testing it yet.

@andrewbranch Thanks! Just pushed a fix that should enable this command in two places:

Right click in the editor context menu
Through the command palette

Notes for testers:

Verify that the command only shows up when using TS 4.7+
The command should jump to the definition directly if there is a single source definition. Otherwise it should show a list of references
If no references are found, we show an error notification. This UX is not ideal. In the future we hope to show an inline notification like find all references does

Worked well so far for my "weird" cases:

JS project that has separate types folder with declare module 'path/to/js/file' {...} for key files. Correctly navigated to actual JS file (even for exports that are (intentionally) not exported in type declarations).
JS project where jsconfig.json and node_modules are in one folder, however node_modules with corresponding @types packages are couple of levels above. Navigated to correct JS source in node_modules.

Thanks for testing!

Works great, very useful!


[Bug]: not able to run PandasExcelReader

Bug Description
when running the excat same code of the ofiicial example of PandasExcelReader at llama-hub page, i get the following err:
TypeError: PandasExcelReader.load_data() got an unexpected keyword argument 'pandas_config'
when removing pandas_config parameter, i get the following err:
AttributeError: 'PandasExcelReader' object has no attribute '_row_joiner'
Version
V0.6.21.post1
Steps to Reproduce
just try the official example code of PandasExcelReader
Relevant Logs/Tracbacks
No response

Same for me :-(

Having the same issue

Same here :/

Same here.  Any update?  Do we actually test this stuff?

Is there any update on this issue?

I stopped using llama index and switched to langchain doc loaders

Got Sweep to fix at https://github.com/emptycrown/llama-hub/pull/391. Not sure if the docs were wrong or if it was a real bug though...

hey everyone, sorry about this issue. the example shown here is wrong (there's no pandas_config arg in load_data) https://llamahub.ai/l/file-pandas_excel

Closed in https://github.com/emptycrown/llama-hub/pull/397


Update touch.md

Point pt = args.Location is no longer valid in the newest version

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

This code appears in https://github.com/xamarin/xamarin-forms-samples/blob/master/SkiaSharpForms/Demos/Demos/SkiaSharpFormsDemos/Transforms/TouchManipulationPage.xaml.cs#L48-L51 which I just tested with Xamarin.Forms 4.1 and it works fine.
Can you share more details about why you think it is no longer valid?

Your feedback is appreciated, but after review we have found the existing content is valid.


article submit: How to deploy Elysiajs App on CloudFlare Workers

By submitting this pull request, I promise I have read the contribution guidelines twice and ensured my submission follows it. I realize not doing so wastes the maintainers' time that they could have spent making the world better. 🖖
⬆⬆⬆⬆⬆⬆⬆⬆⬆⬆

Hi, I just checked this. I'm sorry but i did not receive a notification for this PR, Do you want me to merge it now?

No problem at all! I am reopening then :)


Added $startIndex param to Pos method

Description
I've added $startIndex param to the Pos method with a default value of 1.
Manual testing steps
Loop through elements in an elemental area and print the results of $Pos(1).
Issues

#1221

Pull request checklist

[X] The target branch is correct

See picking the right version

[X] All commits are relevant to the purpose of the PR (e.g. no debug statements, unrelated refactoring, or arbitrary linting)

Small amounts of additional linting are usually okay, but if it makes it hard to concentrate on the relevant changes, ask for the unrelated changes to be reverted, and submitted as a separate PR.

[ ] The commit messages follow our commit message guidelines
[X] The PR follows our contribution guidelines
[X] Code changes follow our coding conventions
[ ] This change is covered with tests (or tests aren't necessary for this change)
[X] Any relevant User Help/Developer documentation is updated; for impactful changes, information is added to the changelog for the intended release
[ ] CI is green

@nedmas Are you still interested in having this feature added to CMS 6? If so, please make the requested changes.
If the changes aren't made, the PR may be closed.


add a cache for sample data

Summary

What: Add a data cache for samples
Why: So they automatically disappear from the table when they are deleted, without a refresh
Ticket: [sc-173844]

Checklist

[x] I merged latest trunk
[x] I manually verified the change
[x] I added labels to my PR
[x] I either asked design for a review or hid my changes behind a feature flag
[ ] I tested in multiple browsers
[ ] I added relevant unit tests
[ ] I have notified others of changes they need to make locally (migrations, jobs, package updates, etc)

This needs to wait for #843 to merge first.

So, after combining the map and the transform into one step, I feel like I do want to keep the state vars for samples and trees, so we don't need to redo on that on every render.

@mmmmmmaya Could we do it with useMemo instead? The motivation here is that the transformData call is reasonably heavy, not that we're going to need to modify the samples or trees state down the road, right? If that's the case, I think useMemo that fires on the same set of conditions ([isTreeInfoLoading, isSampleInfoLoading, sampleData, treeData]) will hit that goal of avoiding waste while keeping it a bit clearer that we do not expect samples or trees to be modified due to some later event or something.


Added PowerShell snippet

Category

[ ] Content fix
[x] New article
Related issues: fixes #X, partially #Y, mentioned in #Z

What's in this Pull Request?
Added PowerShell snippet to be used in Azure Automation runbooks for the App-only model to communicate with SPO

thx @robinmeure, appreciated.


Prevent batch systems from returning killed jobs in getUpdatedBatchJobs (resolves #460)

In all batch systems, getUpdatedBatchJob now returns (jobID, exitValue) tuples only for jobs on which killBatchJobs was not called. This prevents killed jobs from being processed twice in the leader.
batchSystemTest.testKillJobs updated to enforce this behavior.
abstractBatchSystem.getFromQueueSafely removed, since it was only necessary for multiprocessing.Queue, which has been replaced with Queue.Queue.

I think I'll get rid of getFromQueueSafely in the other PR, because in this one parasol still uses a process for the worker.

@adderan, This looks like it can be merged. However, I hesitate because you removed the in progress label and added the ready label. These two labels aren't exactly intuitive (they are used by Waffle). An issue is ready if it is ready to be picked up by someone to work on. So the ready state precedes the in progress state. IOW, ready != ready to be merged. To indicate ready to be merged, we use the absence of the needs work label.
Let me know if you would like me to merge this.

Oops, yes I do mean that it's ready to be merged.


Properties without type

Within the class SetExpressCheckoutRequestDetailsType from line 174 to 197, the highlighted properties have no type whereas the schema defines them even with an annotation (which is absent too):
<element name="cpp-header-image" type="xs:string" minOccurs="0">
				<annotation>
					<documentation>
			A URL for the image you want to appear at the top left of the payment page. The image has a maximum size of 750 pixels wide by 90 pixels high. PayPal recommends that you provide an image that is stored on a secure (https) server.

Optional

Character length and limitations: 127
</documentation>
				</annotation>
			</element>
			<element name="cpp-header-border-color" type="xs:string" minOccurs="0">
				<annotation>
					<documentation>
			Sets the border color around the header of the payment page. The border is a 2-pixel perimeter around the header space, which is 750 pixels wide by 90 pixels high.

Optional

Character length and limitations: Six character HTML hexadecimal color code in ASCII
</documentation>
				</annotation>
			</element>
			<element name="cpp-header-back-color" type="xs:string" minOccurs="0">
				<annotation>
					<documentation>
			Sets the background color for the header of the payment page.

Optional

Character length and limitation: Six character HTML hexadecimal color code in ASCII
</documentation>
				</annotation>
			</element>
			<element name="cpp-payflow-color" type="xs:string" minOccurs="0">
				<annotation>
					<documentation>
			Sets the background color for the payment page.

Optional

Character length and limitation: Six character HTML hexadecimal color code in ASCII
</documentation>
				</annotation>
			</element>
            <element name="cpp-cart-border-color" type="xs:string" minOccurs="0">
                <annotation>
                    <documentation>
            Sets the cart gradient color for the Mini Cart on 1X flow.

Optional

Character length and limitation: Six character HTML hexadecimal color code in ASCII
</documentation>
                </annotation>
            </element>
			<element name="cpp-logo-image" type="xs:string" minOccurs="0">
				<annotation>
					<documentation>
			A URL for the image you want to appear above the mini-cart. The image has a maximum size of 190 pixels wide by 60 pixels high. PayPal recommends that you provide an image that is stored on a secure (https) server.

Optional

Character length and limitations: 127
</documentation>
				</annotation>
			</element>

fixed in 2.6.0 and 1.11.0


Improve gating content generation in build_openstack_packages role

This pull requests improves following things:

Renames gating repo var to cifmw_bop_gating_repo_dest to store repo file and generated repo metadata at one place.
Use temp directory to copy all build rpms and generate repos content in temp directory
Drops the compress repo task as it is no longer needed.
Removes the tcib specific task from under create_repo task file

As a pull request owner and reviewers, I checked that:

[x] Appropriate testing is done and actually running

/lgtm

Care to trigger a molecule job for the pkg_build role? It's dependent and we already broke it with changes in bop role :)

recheck

recheck


Does not work in WordPress 4.2.4

Thanks for the good plugin. It worked very well for WordPress 4.1.7. But when I updated WordPress 4.1.7 in the new version 4.2.4, pictures stopped loading. How to fix the problem in a WordPress 4.2.4?

No idea. It is jQuery plugin and not realted to Wordpress in any way. You might be using some Wordpress implementation of it.

I know this is jQuery plugin , and I added it to a WordPress template by your instruction.
And on WordPress 4.1.7 all works very well. Here is the link you can see: www.nebesnasotnya.com
But I can't update the WordPress in 4.2.4, because stops working Your plug-in. ((

this instruction I used to embed the plugin in the site template - http://www.appelsiini.net/projects/lazyload/enabled_fadein.html

Open console to see if there are any JavaScript errors when using  Wordpress 4.2.4. Also see if 4.2.4 generates different HTML than 4.1.7. Lazy Load plugin works on HTML so it is not tied to Wordpress itself in any way.

Thanks for Your hint, I found a bug in the code. This is $. WordPress 4.1.7 of this error was not noticed and the plugin worked well, but the new WordPress 4.2.4 it has been considered a critical error.
It was enough to replace in the code the $ with jQuery and now Your plugin is working well again on the updated Wordpress !!! :-)
The correct code in the site template (for new WordPress 4.2.4) like this:

The correct code in the site template (for new WordPress 4.2.4) like this:

Thank you. The problem is solved.

Glad you found a solution!


rkhunter is stopping our monitoring from starting

separate rkhunter to rkhunter.yml
execute by ops-runner to track result in zabbix
add timeout to ops-runner to ensure script doesn't take too long
execute configuration in background, allowing container to start crond

Note:  oc adm snuck into this due to someone not running generate-containers.yml, but I'm ok with the change.

Looks reasonable to me.  What sort of testing have you done on the change?

Tangential request -- one git commit for the actual change, a second git commit for the output of generate-containers in order to better isolate the change from the two copies for rhel/centos.


kotlin-spring-boot2: adding a Kotlin with Spring Boot 2 stack

This is a refinement of #76
Checklist:

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

[x] Followed the commit message guidelines.

[x] Stack adheres to Appsody stack structure.

Contributing a new stack:

Describe how application dependencies are managed:
This PR relates to Kotlin support with Spring Boot 2. Just like the java-spring-boot2 stack the dependency management is done using Maven's parent object model (POM).

Explain how Appsody file watcher is utilised:
The APPSODY_WATCH_REGEX is, for now, set only for .kt files. This triggers a recompile whenever a Kotlin source file is modified.

Describe other Appsody environment variables defined by the stack image:
This defines only those environment vars that are defined by java-spring-boot2.

Describe any limitations and known issues:
This stack has a structure that is identical to java-spring-boot2. If appsody provided a way to inherit code from other stacks, we could be reducing on the LOC here.

I would like to close this in preference to #107 (a template in the existing Spring stack)

Thanks @ebullient


question

Hi Dmitry:
Does the UFCNN simulation show that CNN works better than LSTM RNN? I have read the paper, but I take a sceptical attitude. @lukovkin

Hi, @hackerwei!
We were thinking and experimenting a lot with this paper, and I came to the conclusion that though it's interesting and novel in some aspects, it's not pretty accurate and the final results are doubtful.
But our further experiments shown that CNN built in the some specific manner could show much better results than LSTM or GRU. On the other hand, the CNN block could be used in front of the LSTM block (though this setup hadn't delivered accuracy improvements in our case).
Also, WaveNet deliverables prove the fact that CNNs could be used for time series generation/prediction very efficiently.
Some aspects of the WaveNet are pretty similar to the proposed UFCNN architecture, but some are very different.
I found that WaveNet could be applied to the task, but suffers from the overfitting, we'll try to conduct additional experiments later.

Great, very clear now. Thanks very much, I have sent you an email.


Flagging a wallet?

Is your feature request related to a problem? Please describe.
Flag Slope Wallet?
Describe the solution you'd like
Slope has not been really communicating with the community. (A month+ on twitter, discords pretty dead too.). The issue is people 'still' use slope so removing the wallet is probably not a good idea, but maybe explaining that users should move to another wallet until the issue is fully resolved.
They even recommend abandoning their current wallet and at least making a new wallet: https://slope-finance.medium.com/slope-wallet-sentry-vulnerability-digital-forensics-and-incident-response-report-d7a5904e5a39
It's mostly just a 'trying to save people/move your stuff to at least a new wallet' thing. The wallet was already removed from the app store. I think it might be a good idea to at least have a little flag warning and linking an article or something to it. I know we can say 'it's not our problem' but I think for Solana itself it's better to be proactive with protecting the users rather then washing our hands on the matter.

Wallet Adapter does not promote or censor wallets. It's an adapter layer for the wallets that exist, nothing more. The existence of an adapter for a wallet does not imply quality, security, testing, or approval of a wallet, nor does the inverse. Adapters are mostly added by teams that build wallets. We don't decide which ones are good or not, or even install them.
Speaking of Slope specifically, the Slope adapter has existed since before Slope had a mobile app, when there was only browser extension. To the best of my knowledge (and I was part of the security group that handled the issue) the browser extension was not affected by the issue that caused a leak of key material.
Even if it had been affected, we wouldn't pull the adapter. Wallet Adapter never has access to key material, since it's entirely downstream of wallets themselves. And it's not Wallet Adapter's purpose to tell users or devs what to do, but to make all wallets easier to use without respect to, or prohibition of, any particular wallet.


Improved documentation

So that we can keep a track of this:
Improving documentation for this, so that the internal methods and structural representations become clearer. That should allow easier understanding of the current capabilities and workflow that is designed into NoteMate. Future options that could be empowered by things like this are alternative static site generators, or translating semantic information in a different notes structures to the common notes format underpinning the implementation.

@SevorisDoe , I think the other issues open cover this issue pretty well so I am now going to close it in lieu of the other issues.


Increment version on main to 2.0 to avoid confusion with 1.1.

Signed-off-by: dblock<EMAIL_ADDRESS>Description
We've been selectively backporting changes to 1.x for 1.1 version, but main is gathering lots of other changes. Plugins keep building against main as if it's 1.1. Increment version to 2.0 on main to avoid confusion.
Check List

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

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

@nknize is saying that before incrementing to 2.0 we need to remove deprecated features


How to use Flask-Cache with Flask-Restful

Hi, when i want to use that code as follow:
@cache.cached(timeout = current_app.config['CACHE_DEFAULT_TIMEOUT'])
def get(self):
     return something

it does not work, because not in the context of the app.
so how i use cache decorator in the front of the function.
The same question like this link :
http://stackoverflow.com/questions/24816799/how-to-use-flask-cache-with-flask-restful

The value of the timeout is evaluated when the module containing the Resource is imported. There is no active application or request context active at this point, hence the context related error you see when trying to use the current_app proxy.
If you don't specify a value for the timeout parameter, the value from CACHE_DEFAULT_TIMEOUT in the application's config object is used instead, so what you were trying to assign for timeout is basically redundant.

Thank you for your kind reply. i set it in the application 's config.


Marcel/content fill part 2

Added functionality to the functionApp listing page so the cycle for function applications is (complete)
Added listing for all the function apps that exist in the user account
Refactored small bugs

Updates look good!


assert(something ~= false) easier to read as assert(something)?

In a couple of places, there are double-negatives like:
https://github.com/Element-Research/rnn/blob/master/Recursor.lua#L22
 if self.train ~= false then

and https://github.com/Element-Research/rnn/blob/master/Recursor.lua#L130
 assert(online ~= false, ...

I find these really hard to read, and have to double-take on them for a while :-)  I think they can be written simply as the affirmative? :
 if self.train then

 assert(online, ...

@hughperkins Sorry for confusion. The if self.train ~= false then is used to handle self.train = nil (the default value of self.train. So it is equivalent to if self.train or self.train == nil then. Same principle for the the assert(online ~= false). The default value of online (i.e. when online = nil) is true.
I have just added comments to the code to make this more obvious. Hope that helps.

Ah... can we maybe add to the __init function, or similar, something like:
self.train = self.train or true

?

hmmm, oh wait, that doesnt work, right?  hmmm...

Seems like ~= false is a good way of doing this.  I guess we only need to do it once perhaps, in __init method?
self.train = self.train ~= false

@hughperkins Ideally, this would be added to the nn.Module:__init. What do you think @soumtih ?

Well... for Dropout, which is directly comparable, since behavior changes between train and evaluate, they are putting it in Dropout.__init:
https://github.com/torch/nn/blob/master/Dropout.lua#L6
 self.train = true

Hmmm... although... now I check the git blame, I see that... you wrote that :-)
b7822796 (nicholas-leonard 2014-07-09 14:26:32 -0400  6)    self.train = true

Created a PR, see if it gets merged https://github.com/torch/nn/pull/553


No autoreload for documents

With the beancount option:
option "documents" "/path/to/documents"

you can add a (root) folder for documents. When you place documents there, they'll be automatically included in your journal.
Currently, this folder isn't monitored, so you need to manually restart the application (or force a reload by saving a source file) before documents show up.

@corani Fixed in #467b5be. Please try if this is working for you.

Unfortunately, no. The documents folders need to be added recursively, and any folders created while running, need to be added as well.

I just tested (Mac OS 10.11.3) and it does work recursively for me. On which system are you?

Ubuntu 14.04
I'll try to do some more testing later today.
On Tue, Feb 23, 2016 at 5:44 PM, aumayr<EMAIL_ADDRESS>wrote:

Reopened #156 https://github.com/aumayr/fava/issues/156.
—
Reply to this email directly or view it on GitHub
https://github.com/aumayr/fava/issues/156#event-561310590.

--
Best regards,
Daniël Bos
Your government is reading your email. Slow them down with encryption.
My public key: http://goo.gl/gms497 (4096 bit RSA, id EF2D5D91)
Fingerprint  : D8D0 9FBE F075 F709 7B52  2F73 326C 2123 EF2D 5D91

OK, please let me know what you found out. I'll leave the issue open for now.

It looks like it indeed works recursively. I see the Reload 1 waiters log message and the page reloads. However, the new document doesn't show up until I manually restart the application.
Additionally, I noticed two things while saving the config file:

When I remove the theme = alternative option, it doesn't revert back to default. If I put in an explicit theme = default, it works file, but apparently it doesn't clear the previous user-config settings when reloading.
When saving, I get the following exception:

[E 160223 21:42:15 ioloop:629] Exception in callback <bound method LiveReloadHandler.poll_tasks of <class 'livereload.handlers.LiveReloadHandler'>>
    Traceback (most recent call last):
      File "/home/daniel/.pyenv/versions/3.5.1/lib/python3.5/site-packages/tornado/ioloop.py", line 1039, in _run
        return self.callback()
      File "/home/daniel/.pyenv/versions/3.5.1/lib/python3.5/site-packages/livereload-2.4.1-py3.5.egg/livereload/handlers.py", line 66, in poll_tasks
        filepath, delay = cls.watcher.examine()
      File "/home/daniel/.pyenv/versions/3.5.1/lib/python3.5/site-packages/livereload-2.4.1-py3.5.egg/livereload/watcher.py", line 73, in examine
        func and func()
      File "/home/daniel/.pyenv/versions/3.5.1/lib/python3.5/site-packages/beancount_fava-0.2.3-py3.5.egg/fava/cli.py", line 106, in <lambda>
        server.watch(settings_path, lambda: reload_settings(server))
    TypeError: reload_settings() missing 1 required positional argument: 'settings_path'

When saving, I get the following exception:

...
      File "xxx/3.5.1/lib/python3.5/site-packages/beancount_fava-0.2.3-py3.5.egg/fava/cli.py", line 106, in <lambda>
        server.watch(settings_path, lambda: reload_settings(server))
    TypeError: reload_settings() missing 1 required positional argument: 'settings_path'

Fixed in 61c72f0

When I remove the theme = alternative option, it doesn't revert back to default. If I put in an explicit theme = default, it works file, but apparently it doesn't clear the previous user-config settings when reloading.

Fixed in 840a308

It looks like it indeed works recursively. I see the Reload 1 waiters log message and the page reloads. However, the new document doesn't show up until I manually restart the application.

This is still open. I have to set up a test VM and everything, so this could take a while...

61c72f0 and 840a308 confirmed fixed.

👍

This is still open. After adding a document (directly in the folder, or uploading through fava), I get the following log message:
[I 160228 11:14:48 handlers:92] Reload 1 waiters:

The page reloads, but the new document doesn't show up.

This is a beancount issue, as the pickle cache prevents the documents folder from being rescanned.
Ref beancount Issue 122

Any update on this?

Not as far as I can see. If someone wants to work on this, beancount's #123 would be the way forward. Shouldn't be too hard to implement (but for me it's quite a low priority).

This was actually just a one-line change...
Using an internal function is not ideal of course, but in this case it's worth it. We're following beancount's development close enough anyway.


Photo and Background of profile as url (String)

Can you add this function in your lib?
I want to use
account.setPhoto(bitmap)
account.setBackground(bitmap2)

like this (url, url2 - String)
account.setPhoto(url)
account.setBackground(url2)

and in library downloading image from internet and paste as photo and background.
Now I'm using AsyncTask:
	private class Ava_Bg_load extends AsyncTask<String, Void, Void> {
		Bitmap avatar, bg;
		String g_avatar, g_bg;

		@Override
		protected Void doInBackground(String... urls) {
			g_avatar = urls[0];
			g_bg = urls[1];
			try {
				InputStream u_avatar = new java.net.URL(g_avatar).openStream();
				avatar = BitmapFactory.decodeStream(u_avatar);
				if(!g_bg.equalsIgnoreCase("")) {
					InputStream u_bg = new java.net.URL(g_bg).openStream();
					bg = BitmapFactory.decodeStream(u_bg);
				}
			} catch (IOException e) {
				e.printStackTrace();
			}
			return null;
		}
		@Override
		protected void onPostExecute(Void result) {
			account.setPhoto(avatar);
			if(!g_bg.equalsIgnoreCase("")) {
					account.setBackground(bg);
				} else {
					account.setBackground(getResources().getDrawable(R.drawable.temp_img));
				}
			notifyAccountDataChanged();
		}
	}
But it's very inconvenient

I hope you make it.

I think @neokree's answer will be unfortunatelly no for a simple reason - lib complexity.
There are so many popular  file / image downloading & caching libs out there with full blown, networking, async operations, stack, backward compatibility, memory usage & other optimizations & features.
Use whichever lib you prefer for your whole project or write your own module, but creating this from scratch / including some external lib just for this case inside this lib makes no sense - creates unnecessary / unwanted complexity, possible lib versions conflics, etc.


Add ZipCrypto reading support

Added two new functions to the API ( resolves #64 ):
ZipArchive::by_name_decrypt
ZipArchive::by_index_decrypt

These functions behave identically to their already existing counterparts without _decrypt, but take a password in the form of &[u8]. The password is not a &str because the ZipCrypto standard does not define which encoding is used, so UTF-8 cannot represent all possible passwords (for details, please read the comments in zipcrypto.rs).
The functions integrate seamlessly with the existing API. Substantial restructuring was necessary to insert the CryptoReader between the other readers. The code has been modified to facilitate the addition of further crypto or decompression routines.
Note that the API for read_zipfile_from_stream does not yet support ZipCrypto reading. However, this is not hard to add. Also, ZipCrypto writing support has not been added at this point in time. I want to make sure that my work is in line with what the authors and the users expect before I continue working on this.
In addition to that, a ZipCrypto writer will need cryptographically secure randomness (even though the crypto is weak). Where this notoriously hard to get randomness comes from is up for discussion.

@mvdnes Any thoughts on this PR? I'm willing to invest time and fix issues if needed.

Merged improvements from master into pkzip-cipher feature branch. Added unit test to verify correct ZipCrypto reader implementation. I have been using the feature branch regularly for half a year, and no problems were found so far. If there is interest to have ZipCrypto on master, I'm still open for feedback and willing to invest time.

This is brilliant! I hope we can get this merged soon. Would it be possible to support Central Directory Encryption with this implementation?
@rylev and I have recently been given permission to accept PRs, and should be able to give this a proper review soon.

Would it be possible to support Central Directory Encryption with this implementation?

Technically, yes. The ZipCrypto algorithm stands for itself and can be used to decrypt any binary stream, operating on the std::io::Read trait* (I also considered creating a separate crate just for ZipCrypto, but that's probably overkill). However, I am not sure if there is any ZIP software in existence that uses the weak ZipCrypto cipher to encrypt the Central Directory (relevant: https://github.com/nmoinvaz/minizip/issues/141 ).
A higher value task would be to support ZIP files with strong crypto like AES encryption which is believed to provide real security. It seems like Central Directory Encryption is often (always?) done with Strong Encryption. The encryption method of choice is almost always AES because all the alternatives in the specification are deprecated & insecure by now (RC2, RC4, DES, 3DES). AES encrypted ZIP files are somewhat common.
However, I think Strong Encryption should be treated in a separate issue/PR because it's a separate subject that requires its own considerations. The restructuring of the reader that I've done in this PR can be used to hook any other crypto algorithm into the reader pipeline, so it's a good preparation for further work.
*Also, encryption is almost finished, it just needs to get cryptographically secure randomness from somewhere.

LGTM! Could you run a cargo fmt on the changes?

Thanks! Do you mean just running cargo fmt on the changes or also additionally merging my branch such that it is up to date with master (26 commits happened in the meantime)?

@Plecra Merged all the improvements from master. Applied cargo fmt.

Ah, sorry to be a pain, but I don't want to erase the commit history - I'd rather rebase the changes. I can handle that tomorrow if you'd like 😃

How does merging erase the commit history? The merge from master pulls in the entire commit history as well.
I used to rebase my changes, but for read.rs the process was so grueling that after a few failed attempts during a difficult rebase operation, I started to do merges only (maybe that is also an indication that this file needs to be split up). The merge in read.rs is not trivial. I'd appreciate it a lot if you could handle it if you think rebasing is the way to go. You should arrive at the same resulting source files as I did after the merge.

@rylev Thanks for the detailed review. I applied all your suggestions.

Thanks for following up on that! I've created #157 to discuss more encryption features if you'd like to share your thoughts 😉

Fantastic! I'm very happy to see this PR accepted and merged 🎉


patch-upgrade-pygments-2.15.0

Codecov Report
Patch and project coverage have no change.

Comparison is base (bf91d96) 36.52% compared to head (e7cb055) 36.52%.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop     #268   +/-   ##
========================================
  Coverage    36.52%   36.52%
========================================
  Files          104      104
  Lines         4290     4290
  Branches       737      737
========================================
  Hits          1567     1567
  Misses        2723     2723

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


create rebuild queue

Descripton
This PR addresses the issue #2328
Creates a new section under: releases/queue page called Rebuild queue. By default it only shows the count with an option to click "Show" would reveal the queue.
Example screenshots:
Queue with 3 items and expand=0:

Queue with 3 items and expand=1:

@zahidkizmaz feel free to re-request reviews when you're ready


[iOS 13] how to set preferredStatusBarStyle dark content in dark mode?

I can't apply set statusbar color with material app's brightness after iOS 13 updated.
how to set preferredStatusBarStyle dark content in dark mode?

[✓] Flutter (Channel dev, v1.10.6, on Mac OS X 10.15 19A573a, locale en-KR)
• Flutter version 1.10.6 at /Users/hammyeongho/Dev/tools/flutter
• Framework revision cc3ca9a916 (5 days ago), 2019-09-25 10:57:58 -0400
• Engine revision 63949eb0fd
• Dart version 2.6.0 (build 2.6.0-dev.0.0 69b5681546)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
• Android SDK at /Users/hammyeongho/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-29, build-tools 29.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 11.0)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 11.0, Build version 11A419c
• CocoaPods version 1.8.0.beta.1
[✓] Android Studio (version 3.5)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 39.0.3
• Dart plugin version 191.8423
• Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405)
[!] IntelliJ IDEA Ultimate Edition (version 2019.1.3)
• IntelliJ at /Applications/IntelliJ IDEA.app
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• For information about installing plugins, see
https://flutter.dev/intellij-setup/#installing-the-plugins
[✓] VS Code (version 1.38.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.4.1
[✓] Connected device (1 available)
• iPhone Xs • 8F2740FE-0FA4-4A71-9D18-76F887E7C57E • ios • com.apple.CoreSimulator.SimRuntime.iOS-13-0 (simulator)

It would help if you could provide  a small self-contained app that demonstrates the problem (it sounds like this is a regression?). Note also: https://gist.github.com/ is a useful way to share the code.

https://gist.github.com/cdd4b8addab5262de8b88af4dbce7869.git

https://drive.google.com/open?id=1rJOle2ogKzbsaCZ9Hx-6iRL3ac-MQM-z
i want to set dark content in status bar, when material app set brightness light

This seems to be a dup of https://github.com/flutter/flutter/issues/41067.

Did you figure this out?

I also encountered the same problem as you. The official Flutter version is Flutter 1.12.13 + hotfix.8. • Channel stable does not adapt to iOS13 Dark Mode. If you want to change the color of the status bar in Dark mode on iOS13, you need to wait until the Flutter page is loaded and rendered, and then go to the iOS native bridge through the MethodChannel to modify it. It is OK. Listen in the main.dart file: if (Platform .isIOS) {
WidgetsBinding.instance.addPostFrameCallback (_setupStatusBarStyle);
}, The initial initialization setting needs to add a 1.0 second delay operation in iOS native, set in the delay function, if (@available (iOS 13.0, *)) {
[UIApplication sharedApplication] .statusBarStyle = UIStatusBarStyleDarkContent;
} else {
[UIApplication sharedApplication] .statusBarStyle = UIStatusBarStyleDefault;
} And then in Flutter
You can set the color of the status bar arbitrarily through the MethodChannel during the project operation.


better scaling

[ ] I added an entry to CHANGELOG.md if knowledge of this change could be valuable to users.

Here is a brief summary of what I did:

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

51 of 58 (87.93%)  changed or added relevant lines in 2 files are covered.
6 unchanged lines in 2 files lost coverage.
Overall coverage increased (+0.02%) to 87.562%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

operators/src/processing/raster_scaling.rs
23
30
76.67%

Files with Coverage Reduction
New Missed Lines
%

operators/src/util/stream_zip/vec_zip.rs
1
90.65%

operators/src/processing/neighborhood_aggregate/aggregate.rs
5
97.55%

Totals

Change from base Build<PHONE_NUMBER>:
0.02%

Covered Lines:
89762

Relevant Lines:
102512

💛  - Coveralls

 Bessere Skalierung

bors merge


test broken in ruby 2.3

Hey guys,
I was running the tests with ruby 2.3 and I saw this test is broken:
https://travis-ci.org/thiagovsk/typhoeus/jobs/113751852
any suggestion to fix it?
 1) Typhoeus::Hydra::Runnable#run when request queued in callback when real request when max_concurrency default calls on_complete callback once for every response

     Failure/Error: expect(String).to receive(:new).exactly(2).times

       (String (class)).new(*(any args))

           expected: 2 times with any arguments

           received: 4 times with any arguments

I guess it is resolved now and can be closed.


SQLSTATE[HY000] [2002] Connection refused - Docker Installation

Hello There
I have an issue using the Docker Installation it appears that it gives me an error when I try to sign up

Here's the MYSQL logs from Docker
2024-08-20T10:49:21.262340Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 9.0.1)  MySQL Community Server - GPL.
2024-08-20T10:49:21.262365Z 0 [System] [MY-015016] [Server] MySQL Server - end.
2024-08-20 10:49:24+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.0.1-1.el9 started.
2024-08-20 10:49:24+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2024-08-20 10:49:24+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.0.1-1.el9 started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
2024-08-20T10:49:25.199708Z 0 [System] [MY-015015] [Server] MySQL Server - start.
2024-08-20T10:49:25.440614Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 9.0.1) starting as process 1
2024-08-20T10:49:25.446291Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-08-20T10:49:25.670511Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
mysqld: Table 'mysql.plugin' doesn't exist
2024-08-20T10:49:25.807676Z 0 [ERROR] [MY-010735] [Server] Could not open the mysql.plugin table. Please perform the MySQL upgrade procedure.
2024-08-20T10:49:25.808061Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-20T10:49:25.808232Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-20T10:49:25.808388Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-20T10:49:25.808589Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-20T10:49:25.808741Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-20T10:49:25.808934Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-20T10:49:25.809088Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-20T10:49:25.857850Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2024-08-20T10:49:25.918647Z 0 [Warning] [MY-010015] [Repl] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2024-08-20T10:49:25.925486Z 0 [Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
2024-08-20T10:49:25.925550Z 0 [System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
2024-08-20T10:49:25.930027Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2024-08-20T10:49:25.930377Z 0 [Warning] [MY-010441] [Server] Failed to open optimizer cost constant tables
2024-08-20T10:49:25.930647Z 0 [ERROR] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-001146 - Table 'mysql.component' doesn't exist
2024-08-20T10:49:25.930673Z 0 [Warning] [MY-013129] [Server] A message intended for a client cannot be sent there as no client-session is attached. Therefore, we're sending the information to the error-log instead: MY-003543 - The mysql.component table is missing or has an incorrect definition.
2024-08-20T10:49:25.930893Z 0 [ERROR] [MY-000067] [Server] unknown variable 'mysql_native_password=ON'.
2024-08-20T10:49:25.931916Z 0 [ERROR] [MY-010119] [Server] Aborting
2024-08-20T10:49:27.461703Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 9.0.1)  MySQL Community Server - GPL.
2024-08-20T10:49:27.461723Z 0 [System] [MY-015016] [Server] MySQL Server - end.

Cheers

Fixed by updating the mysql to version 8, here's the docker-compose.yml I use
version: '3.7'

services:
  ezxssdb:
    image: mysql:8.0
    restart: always
    environment:
      - MYSQL_RANDOM_ROOT_PASSWORD=yes
      - MYSQL_DATABASE=${dbName}
      - MYSQL_USER=${dbUser}
      - MYSQL_PASSWORD=${dbPassword}
      - DEFAULT_AUTHENTICATION_PLUGIN=mysql_native_password
      - MYSQL_SSL_MODE=DISABLED # Disable SSL; remove or set to REQUIRED for production
    volumes:
      - "./ezxssdb:/var/lib/mysql"

  ezxss:
    build:
      context: .
      dockerfile: ./Dockerfile
      args:
        - USE_MAIL_ALERTS=${useMailAlerts}
    ports:
      - "${dockerHttpPort:-80}:80"
      - "${dockerHttpsPort:-443}:443"
    volumes:
      - .:/var/www/html
    restart: always
    depends_on:
      - ezxssdb
    environment:
      - INSTALL_CERTIFICATE=${autoInstallCertificate}
      - DOMAIN=${domain}
      - HTTPMODE=${httpmode}

  docker-compose down
  docker-compose up -d --build

There is, indeed, a problem with Docker, since MySQL 9 doesn't support the native password no more.
I will fix this soon, I just need to look into if locking to MySQL 8 is the correct fix.

After resolving the error with @Sicks3c idea, I got in the loop of name resolution error and @unrealistic-reality showed how to resolve it but unfortunaltely it is not working for me. should I stick with manual apache or nginx installation but setting up a db is also a pain there.

The issue has been fixed in https://github.com/ssl/ezXSS/commit/c33854483228ce3ecac21fead5623388f95f9fd5 by removing the deprecated command. MySQL 9+ by default uses the new 'caching_sha2_password' method.
To make sure your setup is correct, please fetch the latest changes from GitHub and rebuild your Docker container. If this still gives errors, you might need to delete the ezxssdb folder (be careful if you temporary bypassed this issue and already have items in your database, they will get deleted).
git pull
docker-compose down
rm -rf ./ezxssdb
docker-compose up

If any issues persist, please re-open the ticket or create a new ticket with a the new issue. Thanks for the heads up y'all!


Random positioning of Search Area in Book section

Related Issue
Closes #1211
Description
This pull request contains the updated code for 'Random positioning of Search Area in Book section'. It is the result of following issue:
Random positioning of Search Area in Book section
Screenshots

Checklist

[x] My code adheres to the established style guidelines of the project.
[x] I have included comments in areas that may be difficult to understand.
[x] My changes have not introduced any new warnings.
[x] I have conducted a self-review of my code.

Hi @SiddhantPawar03
Kindly review this pull request.

Hi @SiddhantPawar03
Kindly review this pull request.

Resolve the conflicts

Done with resolving conflict


Fix automatic scientific notation

Fixes #226 .
Description of the changes:

Disable scientific notation in Standard Mode.
In Scientific Mode "auto-scientific" behavior is preserved, added ability to untoggle the F-E button to force a decimal result. If a user manually disables F-E, state is preserved until the user clears all input or switches modes.

How changes were validated:

Manual

We're converting Calculator to C# with a PR for the conversion coming in the next few days, so we're going to close this PR. If you want to revisit the issue, please open a new PR after the conversion has completed.


[DO NOTE MERGE] beta4 api changes

Packages impacted by this PR
Issues associated with this PR
Describe the problem that is addressed by this PR
What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen?
Are there test cases added in this PR? (If not, why?)
Provide a list of related PRs (if any)
Command used to generate this PR:**(Applicable only to SDK release request PRs)
Checklists

[ ] Added impacted package name to the issue description
[ ] Does this PR needs any fixes in the SDK Generator?** (If so, create an Issue in the Autorest/typescript repository and link it here)
[ ] Added a changelog (if necessary)

API change check
APIView has identified API level changes in this PR and created following API reviews.
@azure/communication-call-automation

Recording kind seems to be updated from ga3 - was this intended?

 Recording kind seems to be updated from ga3 - was this intended?

GA3 changes checked-in to the main with this change, this part of that. it is working fine, and just to make sure, of the difference i will revert this change back and keep as it is in the ga3 branch


Extraction of Editors

Extraction of the editor names and dblp author Id lookup.
The editors need to be added to the proceedings as editor.
Additionally the order of the editors needs to be preserved by the qualifier series ordinal

as example see https://www.wikidata.org/wiki/Q113531126

The question is how we translate the editor who submitted the proceeding.
We could additionally add this editor as   editor-in-chief (P5769)

dblp has 2410 volumes with editors
PREFIX dblp: <https://dblp.org/rdf/schema#>
SELECT ?proceeding ?volume (group_concat(?editor;separator=";") as ?editors)
WHERE {
  ?proceeding dblp:publishedIn "CEUR Workshop Proceedings";
			  dblp:publishedInSeriesVolume ?volume;
			  dblp:editedBy ?editor.
}
GROUP BY ?proceeding ?volume

Try it!
Over all volumes there are 4696 distinct editors See
Checking wikidata shows that for 1331 editors a wikidata  item that is linked to dblp already exists.
For the remaining editors I need to check if a missing dblp author ID already indicates that the wikidata item itself does not exist for most of the cases.

For checking this I intend to use the disambiguation feature of OpenRefine to decide how to approach the creation/linking of the missing editors

dblp has 1359 editors that are already linked to wikidata.
49 dblp editors have two wikidata ids

9 wikidata items could be merged as they represented the same person
39 wikidata items were already merged
1 dblp editor id represented actually two persons and thus the wikidata items were correct( 3601 →Q56459864 and Q51932541)

PREFIX dblp: <https://dblp.org/rdf/schema#>
SELECT DISTINCT ?editor ?editorName ?editor_wikidata
WHERE {
  ?proceeding dblp:publishedIn "CEUR Workshop Proceedings";
			  dblp:publishedInSeriesVolume ?volume;
			  dblp:editedBy ?editor.
	?editor dblp:primaryCreatorName ?editorName.
	?editor dblp:wikidata ?editor_wikidata .
}

Try it!

Link between dblp and wikidata not always bidirectional → editor with wikidata id does not always mean that the item has the dblp author id defined and vice versa

To disambiguate the editors can use all available identifiers
PREFIX datacite: <http://purl.org/spar/datacite/>
PREFIX dblp: <https://dblp.org/rdf/schema#>
PREFIX litre: <http://purl.org/spar/literal/>
SELECT DISTINCT ?editor ?editorName ?editor_wikidata ?affiliation ?primaryhomepage ?identifier ?acm ?dblp ?gepris ?github ?gnd ?googleScholar ?ieee ?isni ?lattes ?linkedin ?loc ?mathGenealogy ?orcid ?researchGate ?scigraph ?twitter ?viaf ?wikidata ?zbmath
WHERE {
	?proceeding dblp:publishedIn "CEUR Workshop Proceedings";
		dblp:publishedInSeriesVolume ?volume;
		dblp:editedBy ?editor.
	?editor dblp:primaryCreatorName ?editorName.
	OPTIONAL{?editor dblp:wikidata ?editor_wikidata .}
	# orcid
	OPTIONAL {
    		?editor datacite:hasIdentifier ?orcid_blank.
		?orcid_blank datacite:usesIdentifierScheme datacite:orcid;
			litre:hasLiteralValue ?orcid.
	}
	# google_scholar
	OPTIONAL {
    		?editor datacite:hasIdentifier ?google_scholar_blank.
		?google_scholar_blank datacite:usesIdentifierScheme datacite:google-scholar;
			litre:hasLiteralValue ?googleScholar.
	}
	# acm
	OPTIONAL {
    		?editor datacite:hasIdentifier ?acm_blank.
		?acm_blank datacite:usesIdentifierScheme datacite:acm;
			litre:hasLiteralValue ?acm.
	}
	# twitter
	OPTIONAL {
    		?editor datacite:hasIdentifier ?twitter_blank.
		?twitter_blank datacite:usesIdentifierScheme datacite:twitter;
			litre:hasLiteralValue ?twitter.
	}
	# github
	OPTIONAL {
    		?editor datacite:hasIdentifier ?github_blank.
		?github_blank datacite:usesIdentifierScheme datacite:github;
			litre:hasLiteralValue ?github.
	}
	# viaf
	OPTIONAL {
    		?editor datacite:hasIdentifier ?viaf_blank.
		?viaf_blank datacite:usesIdentifierScheme datacite:viaf;
			litre:hasLiteralValue ?viaf.
	}
	# scigraph
	OPTIONAL {
    		?editor datacite:hasIdentifier ?scigraph_blank.
		?scigraph_blank datacite:usesIdentifierScheme datacite:scigraph;
			litre:hasLiteralValue ?scigraph.
	}
	# zbmath
	OPTIONAL {
    		?editor datacite:hasIdentifier ?zbmath_blank.
		?zbmath_blank datacite:usesIdentifierScheme datacite:zbmath;
			litre:hasLiteralValue ?zbmath.
	}
	# researchGate
	OPTIONAL {
    		?editor datacite:hasIdentifier ?researchGate_blank.
		?researchGate_blank datacite:usesIdentifierScheme datacite:research-gate;
			litre:hasLiteralValue ?researchGate.
	}
	# mathGenealogy
	OPTIONAL {
    		?editor datacite:hasIdentifier ?mathGenealogy_blank.
		?mathGenealogy_blank datacite:usesIdentifierScheme datacite:math-genealogy;
			litre:hasLiteralValue ?mathGenealogy.
	}
	# loc
	OPTIONAL {
    		?editor datacite:hasIdentifier ?loc_blank.
		?loc_blank datacite:usesIdentifierScheme datacite:loc;
			litre:hasLiteralValue ?loc.
	}
	# linkedin
	OPTIONAL {
    		?editor datacite:hasIdentifier ?linkedin_blank.
		?linkedin_blank datacite:usesIdentifierScheme datacite:linkedin;
			litre:hasLiteralValue ?linkedin.
	}
	# lattes
	OPTIONAL {
    		?editor datacite:hasIdentifier ?lattes_blank.
		?lattes_blank datacite:usesIdentifierScheme datacite:lattes;
			litre:hasLiteralValue ?lattes.
	}
	# isni
	OPTIONAL {
    		?editor datacite:hasIdentifier ?isni_blank.
		?isni_blank datacite:usesIdentifierScheme datacite:isni;
			litre:hasLiteralValue ?isni.
	}
	# ieee
	OPTIONAL {
    		?editor datacite:hasIdentifier ?ieee_blank.
		?ieee_blank datacite:usesIdentifierScheme datacite:ieee;
			litre:hasLiteralValue ?ieee.
	}
	# gnd
	OPTIONAL {
    		?editor datacite:hasIdentifier ?gnd_blank.
		?gnd_blank datacite:usesIdentifierScheme datacite:gnd;
			litre:hasLiteralValue ?gnd.
	}
	#gepris
	OPTIONAL {
    		?editor datacite:hasIdentifier ?gepris_blank.
		?gepris_blank datacite:usesIdentifierScheme datacite:gepris;
			litre:hasLiteralValue ?gepris.
	}
	#homepage
	OPTIONAL {?editor dblp:primaryHomepage ?primaryhomepage .}
	OPTIONAL{?editor dblp:primaryAffiliation ?affiliation .}

Try it!

@tholzheim  this looks great. The disambiguation query suffers from the non truly tabular effect.

Unfortunately, all the identifiers seem not to help in this case.

identified: only one match for all provided ids
conflict: multiple matches for all provided ids
unknown: no match  for all provided ids
Note: dblp id is excluded since it is present for all authors

From this plot we can conclude that if at least one author id is in wikidata the link to dblp is already made (since the number of identified editors and already linked dblp author ids is nearly identical).
dblp seems to sync their data with wikidata to complete the author data since we can not gain information coming from their direction (in terms of authors).
The conflict cases needs manual curation and for the unknown cases I will look into the email, affiliation and name to see how these properties can be used to make a correct match and to how error prone this matching would be...

To add the >3000 unidentified  editors to wikidata with high confidence that their item currently does not exist we need additional information.
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT
  (COUNT(DISTINCT ?mail) as ?numberOfEmailAddresses)
  (COUNT(DISTINCT ?homepage) as ?numberOfHomepages)
  (COUNT(?employer) as ?numberOfEmployers)
  (COUNT(?affiliation ) as ?numberOfAffiliations)
  (COUNT(?residence ) as ?numberOfResidence)
WHERE{
  ?author wdt:P106 wd:Q1650915.
  OPTIONAL{?author wdt:P968 ?mail}
  OPTIONAL{?author wdt:P856 ?homepage}
  OPTIONAL{?author wdt:P108 ?employer}
  OPTIONAL{?author wdt:P1416 ?affiliation}
  OPTIONAL{?author wdt:P551 ?residence}
}

Try it!

Email Addresses
Homepages
employer entries
affiliations  entries
residence entries

642
59828
935757
17597
2063

The result suggests that an editors homepage and affiliation (basically the same as employer) are useful information to verify if an item belongs to an editor/author if multiple matches or an unclear match exist.
For this reason I added a parser for the editor, editor homepage, affiliation and affiliation homepage to the VolumeParser.
See ef3114dca529be8e04188a14326df5aa205945de
A first test showed that for 97% of the volumes 600-3225 these information could be extracted correctly.
In a next step it needs to be analyzed if these information help to identify more editors or to ensure that currently no entry exists.
For the volumes 600-3225 the parser extracted:

9891 editors
7089 affiliations (with link to website if present)
6201 editor homepages

Reminder: dblp has 1333 editors linked to wikidata and 3395 not linked to wikidata. In ceur-ws we have 5294 distinct editor names (different writings of the name can link to the same editor) and 9912 raw editor records.

Affiliations
Official Website
From the 3439 distinct affiliation websites 515 can be exactly matched against official website (P856).
By generating alternative website URLs the number of matched affiliations can be increased to 1180.

For the url http://www.uni-kiel.de/ the following variants are generated and also queried

http://www.uni-kiel.de/
http://www.uni-kiel.de
https://www.uni-kiel.de/
https://www.uni-kiel.de
http://uni-kiel.de/
http://uni-kiel.de
https://uni-kiel.de/
https://uni-kiel.de

A match is then found for http://www.uni-kiel.de.
This method has shown to be faster than using string contains  or other string pattern functions.

Query
SELECT ?affiliation ?affiliationLabel ?homepage
WHERE
{
  VALUES ?homepage {}
  ?affiliation wdt:P856 ?homepage
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Label
The affiliation label often contains the country or other location information such as University of Bremen,   Cartesium, 28359 Bremen, Germany

Note: currently only the first part of the label is used. For the example this means we only search for University of Bremen.
Matching the country, region, city, and/or address could increase and validate the match but leads to a more complex query and procedure and is thus for the time being omitted.

Query
SELECT DISTINCT ?affiliation ?affiliationLabel ?inputLabel
WHERE
{
  VALUES ?inputLabel {%s}

  ?affiliation rdfs:label|skos:altLabel ?inputLabel;
               ^wdt:P108 ?editor. # item has employees
  SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}

Result
pie showData
    title Matching of affiliations against Wikidata items
    "by label" : 492
    "by website" : 503
    "by label and website" : 677
    "no match" :  1771

pie showData
    title Matched affiliations of editor records
    "editor record with matched affiliation" : 5099
    "editor record without matched affiliation" : 4813

Note: here all editor records are considered and not the distinct editor names since the affiliations can differ and thus link to different persons.

Editors
From the 4225 distinct editor websites

164 can be matched against official website (P856)
50 are orcid links

For each editor that is not already linked to wikidata query for the name and try to narrow down the results by including the affiliation homepage.


Add diff syntax definition

Largely based on git’s definition for inserted and deleted, but expanded to support

All coord styles including diff -c and diff -u.
The >/< syntax.
The ! syntax in context diff.

Example page included.
For the ! syntax I aliased important to diff.

In general, +1, although I would appreciate it if you can make Git depend on diff instead of still being stand-alone.

I don’t own the Git syntax though. Would be happy to help if @lgiraudel thinks this is a good idea.

Overall looks nice, see a few minor comments.
Thanks for adding examples too!
Please fix the merge conflicts?
Re:git, once I merge this, feel free to submit a PR to make it dependent on diff. It makes sense. Just because you don’t own it doesn’t mean you can’t suggest changes to it!

Thanks @LeaVerou, amended. Sorry for the changes taking so long, I totally forgot about this. :(

(You should not have included the autohotkey changes in this PR)
Thanks, I'm merging.

@uranusjr Is it intended that those two lines in unified diff are matched as "coord"?
--- qcli.yml	2014-12-16 11:43:41.000000000 +0800
+++ /Users/uranusjr/Desktop/qcli.yml	2014-12-31 11:28:08.000000000 +0800

@Golmote Yes that is what I intended, since they sort of act as separators between diff chunks, like the *** lines in context diff. That’s just my opinion though; I wouldn’t mind if you want it be done differently.

I'm telling because of #401 and #769. I just modified the git component to match those lines as "inserted" and "deleted".
I'll try to think of a way to distinguish between those lines containing file names and the lines containing coords.


Allow tracker to be configured with multiple namespace:collector pairs

Depends on #112
Also depends on splitting out the collector and emitter concepts (currently emitter == collector)

This depends on a ticket in 0.7.0 so bumping it back.

Closing as implemented as part of the upcoming version 2.0.
More details in this ticket: #566


add Episode Controller

I made this EpisodeController, it's like InsertSample but it increments only when a terminal state is inserted. To achieve this I had to change the internals in a way that allows the controller to access the pushed elements to check the terminal flags.
Caveat: this only works with environments that do have a terminal state, meaning that it cannot be used with other reset_conditions than ResetAtTerminal.

Also, I found a bug at commit 60b86e3


[stable/redis]: add args parameter for custom command-line arguments

This PR adds an args parameter to the stable/redis chart for specifying arbitrary command-line arguments. For example, this will allow you to configure Redis as an LRU cache with the following:
args:
  - "redis-server"
  - "--maxmemory-policy volatile-ttl"

/ok-to-test
/assign

Bumped stable/redis version and added conditional around args in deployment.yaml.

/lgtm

/test all

@mbrevoort Thanks for the contribution. i would have only incremented the patch version number and not a minor version number bump.


#956: Switch to java-s2i image, fixed console and s2i build

I think it's time to use the java-s2i image for the spring-boot quickstart.
This patch fixes the issue with the visualization of the jolokia console (https://github.com/fabric8io/ipaas-quickstarts/issues/956).
I also fixed the template.json file for s2i. According to https://github.com/openshift/origin/issues/3487, tags are not allowed in the "dockerImageRepository" element.
I removed the tag indication and verified that the correct tag is still used (it is referenced in the BuildConfig section).

Can one of the admins verify this patch?

thanks ;-)
Have you tested whether hawt-app works with spring-boot ? Last time I had issues running it a spring-boot application within an s2i build because of the different ways jars are handled (flat vs. embedded).
In fact for the s2i case I wonder whether we shouldn't have an option without hawt-app for wildfly-swarm and spring-boot applications which do their own packaging. Either as third s2i image or even one without s2i.

Yes, it works, at least with the camel-quickstart..
The resulting image has a hawt-app style structure, with all dependent jars in the lib directory. Not the natural structure for a spring-boot application.
I agree, we should provide a specific option for one-jar applications like this one. I'll think about that.

@nicolaferraro ah, cool. I'll will try it myself, too, to be sure.
But even then, its not sure whether that we head to s2i in the future because we are more targetting to docker builds with a binary build source for the OpenShift case.
However, the base images should be consistent.

So is this PR supposed to be merged? Should this be reverted until the discussion above is decided?

Interesting - it looks like the CI job merged it automatically.

Have you tested ....

Maybe because of this in the comment ?

Wonder how strict the CI regexps are ?

Whoever set up the build was very kind: trigger phrase regexp of .*...

Have correctly configured now. Do you want to revert this PR? Will mean we have to resubmit it again for discussion before merging.

It sounded strange to me too.. So PRs were accepted, no matter what you said :)
I just submitted the change as I've seen many other quickstarts referring to the java-s2i image. I though the old issues with product vs. upstream were solved in favor of s2i... I'll revert it for now

Thanks @nicolaferraro - should just be able to click revert button (I can do if you can't - not sure of required permissions).


Higher Priority Items

Make Destination field on data header optional
Add GROUND_STATION_# to devices list
Add MISC_TEST_# to devices list
Make it so a device value of 0 does not map to an actual device (ie, either no device is assigned id 0, or 0 maps to something like "BROADCAST" or "NOBODY_IN_PARTICULAR" [lol])
Currently all the fields on the data header are nullable in the ctor, but the validate method will not take None for an answer.  I imagine transmit header works the same

@thomasmholder thoughts?

Also add devices for I2C_DRIVER and ADC_DRIVER, unless we think they fall under MISC_SENSOR_#

I2C and ADC driver can definitely fit under MISC_SENSOR_#, the idea with adding so many is not having to update the list super often. That said I'm not super wild about how we're handling device IDs so maybe we should take another look at that.

It's less-than-ideal but having an exhaustive devices list in EosLib seems to be the best way to make sure the payload and ground station are on the same page about who's who.  The only other way I can think of is to make a communications-based discovery protocol which gets real messy real fast due to our connection being super unreliable.
A refactor that could ease some of this would be to rename this list DeviceType and remove all the duplicates.  Then the DeviceID field on a driver is just some unique integer used to disambiguate between devices of the same type on the same system
That being said, we likely need to make a slightly more complicated addressing system anyway for the future so we could support multiple payloads and ground stations.  Probably the end result would be a specific device being identified by an address string like "1:7:3" mapping to System=1, Device Type=7, ID=3


[Question] On generation hyper-parameters.

Question
Hello haotian! Thank you for your great work! I recently find that using a pretrained llava to genarate answer and evaluate on some benchmark is a little unstable. Llava generate different answers with same hyper-parameters.
You mentioned that this may come from do_sample=True. I would like to know what is the hyper-parameters you use in generating answers. Top_k, Top_q, termperature. What is the recommanded hyper-parameters?
And I observed that you use beams search in generation process. Would you like to release the code for beams search?

I use beam search with temperature = 0.2 in your model_vqa.py. But it returns an error. Maybe the default temperature is too large for beams = 5. Could you please tell us the hyper-parameters you use for evalutaion? Thank you!

Hi, when using beam search, we set the temperature to 1.0

Thank you!