(undefined method `id' for nil:NilClass). Does not respond to 'read'

I'm getting this error when trying to save a record with an attachment:
ArgumentError - does not respond to `read`.:
  refile (0.2.5) lib/refile.rb:48:in `block in verify_uploadable'
  refile (0.2.5) lib/refile.rb:46:in `verify_uploadable'
  refile (0.2.5) lib/refile/backend/file_system.rb:15:in `upload'
  refile (0.2.5) lib/refile/attachment.rb:35:in `file='
  refile (0.2.5) lib/refile/attachment.rb:93:in `block in attachment'
  activemodel (5.0.0.beta3) lib/active_model/attribute_assignment.rb:46:in `_assign_attribute'
  activemodel (5.0.0.beta3) lib/active_model/attribute_assignment.rb:40:in `block in _assign_attributes'
  activemodel (5.0.0.beta3) lib/active_model/attribute_assignment.rb:39:in `_assign_attributes'
  activerecord (5.0.0.beta3) lib/active_record/attribute_assignment.rb:26:in `_assign_attributes'
  activemodel (5.0.0.beta3) lib/active_model/attribute_assignment.rb:33:in `assign_attributes'
  activerecord (5.0.0.beta3) lib/active_record/core.rb:310:in `initialize'
  activerecord (5.0.0.beta3) lib/active_record/inheritance.rb:65:in `new'
  app/controllers/knowledges_controller.rb:46:in `create'
  actionpack (5.0.0.beta3) lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
  actionpack (5.0.0.beta3) lib/abstract_controller/base.rb:183:in `process_action'
  actionpack (5.0.0.beta3) lib/action_controller/metal/rendering.rb:30:in `process_action'
  actionpack (5.0.0.beta3) lib/abstract_controller/callbacks.rb:20:in `block in process_action'
  activesupport (5.0.0.beta3) lib/active_support/callbacks.rb:126:in `call'
  activesupport (5.0.0.beta3) lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
  activesupport (5.0.0.beta3) lib/active_support/callbacks.rb:455:in `call'
  activesupport (5.0.0.beta3) lib/active_support/callbacks.rb:101:in `__run_callbacks__'
  activesupport (5.0.0.beta3) lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
  activesupport (5.0.0.beta3) lib/active_support/callbacks.rb:90:in `run_callbacks'
  actionpack (5.0.0.beta3) lib/abstract_controller/callbacks.rb:19:in `process_action'
  actionpack (5.0.0.beta3) lib/action_controller/metal/rescue.rb:27:in `process_action'
  actionpack (5.0.0.beta3) lib/action_controller/metal/instrumentation.rb:31:in `block in process_action'
  activesupport (5.0.0.beta3) lib/active_support/notifications.rb:164:in `block in instrument'
  activesupport (5.0.0.beta3) lib/active_support/notifications/instrumenter.rb:21:in `instrument'
  activesupport (5.0.0.beta3) lib/active_support/notifications.rb:164:in `instrument'
  actionpack (5.0.0.beta3) lib/action_controller/metal/instrumentation.rb:29:in `process_action'
  actionpack (5.0.0.beta3) lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
  activerecord (5.0.0.beta3) lib/active_record/railties/controller_runtime.rb:18:in `process_action'
  actionpack (5.0.0.beta3) lib/abstract_controller/base.rb:128:in `process'
  actionview (5.0.0.beta3) lib/action_view/rendering.rb:30:in `process'
  rack-mini-profiler (<IP_ADDRESS>) lib/mini_profiler/profiling_methods.rb:102:in `block in profile_method'
  actionpack (5.0.0.beta3) lib/action_controller/metal.rb:190:in `dispatch'
  actionpack (5.0.0.beta3) lib/action_controller/metal.rb:262:in `dispatch'
  actionpack (5.0.0.beta3) lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
  actionpack (5.0.0.beta3) lib/action_dispatch/routing/route_set.rb:32:in `serve'
  actionpack (5.0.0.beta3) lib/action_dispatch/journey/router.rb:39:in `block in serve'
  actionpack (5.0.0.beta3) lib/action_dispatch/journey/router.rb:26:in `serve'
  actionpack (5.0.0.beta3) lib/action_dispatch/routing/route_set.rb:724:in `call'
  bullet (5.0.0) lib/bullet/rack.rb:12:in `call'
  meta_request (0.4.0) lib/meta_request/middlewares/app_request_handler.rb:13:in `call'
  meta_request (0.4.0) lib/meta_request/middlewares/meta_request_handler.rb:13:in `call'
  actionview (5.0.0.beta3) lib/action_view/digestor.rb:12:in `call'
  warden (1.2.6) lib/warden/manager.rb:35:in `block in call'
  warden (1.2.6) lib/warden/manager.rb:34:in `call'
  rack (2.0.0.alpha) lib/rack/etag.rb:25:in `call'
  rack (2.0.0.alpha) lib/rack/conditional_get.rb:38:in `call'
  rack (2.0.0.alpha) lib/rack/head.rb:12:in `call'
  rack (2.0.0.alpha) lib/rack/session/abstract/id.rb:220:in `context'
  rack (2.0.0.alpha) lib/rack/session/abstract/id.rb:214:in `call'
  actionpack (5.0.0.beta3) lib/action_dispatch/middleware/cookies.rb:613:in `call'
  activerecord (5.0.0.beta3) lib/active_record/query_cache.rb:36:in `call'
  activerecord (5.0.0.beta3) lib/active_record/connection_adapters/abstract/connection_pool.rb:963:in `call'
  actionpack (5.0.0.beta3) lib/action_dispatch/middleware/callbacks.rb:29:in `block in call'
  activesupport (5.0.0.beta3) lib/active_support/callbacks.rb:97:in `__run_callbacks__'
  activesupport (5.0.0.beta3) lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
  activesupport (5.0.0.beta3) lib/active_support/callbacks.rb:90:in `run_callbacks'
  actionpack (5.0.0.beta3) lib/action_dispatch/middleware/callbacks.rb:27:in `call'
  actionpack (5.0.0.beta3) lib/action_dispatch/middleware/reloader.rb:71:in `call'
  actionpack (5.0.0.beta3) lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:84:in `protected_app_call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:79:in `better_errors_call'
  better_errors (2.1.1) lib/better_errors/middleware.rb:57:in `call'
  actionpack (5.0.0.beta3) lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
  rack-contrib (1.2.0) lib/rack/contrib/response_headers.rb:17:in `call'
  meta_request (0.4.0) lib/meta_request/middlewares/headers.rb:16:in `call'
  web-console (3.1.1) lib/web_console/middleware.rb:131:in `call_app'
  web-console (3.1.1) lib/web_console/middleware.rb:28:in `block in call'
  web-console (3.1.1) lib/web_console/middleware.rb:18:in `call'
  actionpack (5.0.0.beta3) lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
  railties (5.0.0.beta3) lib/rails/rack/logger.rb:36:in `call_app'
  railties (5.0.0.beta3) lib/rails/rack/logger.rb:24:in `block in call'
  activesupport (5.0.0.beta3) lib/active_support/tagged_logging.rb:70:in `block in tagged'
  activesupport (5.0.0.beta3) lib/active_support/tagged_logging.rb:26:in `tagged'
  activesupport (5.0.0.beta3) lib/active_support/tagged_logging.rb:70:in `tagged'
  railties (5.0.0.beta3) lib/rails/rack/logger.rb:24:in `call'
  request_store (1.3.1) lib/request_store/middleware.rb:9:in `call'
  actionpack (5.0.0.beta3) lib/action_dispatch/middleware/request_id.rb:24:in `call'
  rack (2.0.0.alpha) lib/rack/method_override.rb:22:in `call'
  rack (2.0.0.alpha) lib/rack/runtime.rb:22:in `call'
  activesupport (5.0.0.beta3) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
  actionpack (5.0.0.beta3) lib/action_dispatch/middleware/load_interlock.rb:13:in `call'
  actionpack (5.0.0.beta3) lib/action_dispatch/middleware/static.rb:136:in `call'
  rack (2.0.0.alpha) lib/rack/sendfile.rb:111:in `call'
  rack-mini-profiler (<IP_ADDRESS>) lib/mini_profiler/profiler.rb:281:in `call'
  railties (5.0.0.beta3) lib/rails/engine.rb:522:in `call'
  puma (3.4.0) lib/puma/configuration.rb:224:in `call'
  puma (3.4.0) lib/puma/server.rb:569:in `handle_request'
  puma (3.4.0) lib/puma/server.rb:406:in `process_client'
  puma (3.4.0) lib/puma/server.rb:271:in `block in run'
  puma (3.4.0) lib/puma/thread_pool.rb:114:in `block in spawn_thread'

Started GET "/__meta_request/a686b2ba-6455-4ca2-856b-4ba0fec69f3a.json" for <IP_ADDRESS> at 2016-04-25 14:41:56 -0500
Started POST "/__better_errors/007029a60a9d2584/variables" for <IP_ADDRESS> at 2016-04-25 14:41:56 -0500

NoMethodError (undefined method `id' for nil:NilClass):

No idea why this is happening...I'm using refile and refile-postgres.  Is refile-postgres necessary?

@chevinbrown Your refile version looks very outdated. Current one is 0.6.2

@krists, I must be getting it from rubygems, not github? Is there a rails 5 branch?

@chevinbrown Have you tried bundle update refile refile-postgres?

@krists, just confirmed...fixed with bundle update (all). Somehow in adding the 'refile' gem, my bundle didn't include some sinatra requisites.


Slightly malformed tsconfig.json

Version
3.0.0-rc.10
Node and OS info
Node v10.8.0 / npm 6.2.0 / yarn 1.9.4 / macOS
Steps to reproduce
Pick following commands:
Vue CLI v3.0.0-rc.10
? Please pick a preset: Manually select features
? Check the features needed for your project: TS, Router, Vuex, Linter
? Use class-style component syntax? Yes
? Use Babel alongside TypeScript for auto-detected polyfills? No
? Use history mode for router? (Requires proper server setup for index fallback in production) No
? Pick a linter / formatter config: TSLint
? Pick additional lint features: Lint on save
? Where do you prefer placing config for Babel, PostCSS, ESLint, etc.? In dedicated config files
? Save this as a preset for future projects? No

What is expected?
tsconfig.json to look like this:
{
  "compilerOptions": {
    "target": "es5",
    "module": "esnext",
    "strict": true,
    "jsx": "preserve",
    "importHelpers": true,
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "esModuleInterop": true,
    "sourceMap": true,
    "baseUrl": ".",
    "types": [
      "node"
    ],
    "paths": {
      "@/*": [
        "src/*"
      ]
    },
    "lib": [
      "es2015",
      "dom",
      "dom.iterable",
      "scripthost"
    ]
  },
  "include": [
    "src/**/*.ts",
    "src/**/*.tsx",
    "src/**/*.vue",
    "tests/**/*.ts",
    "tests/**/*.tsx"
  ],
  "exclude": [
    "node_modules"
  ]
}

What is actually happening?
tsconfig.json looks like this:
{
  "compilerOptions": {
    "target": "es5",
    "module": "esnext",
    "strict": true,
    "jsx": "preserve",
    "importHelpers": true,
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "esModuleInterop": true,
    "sourceMap": true,
    "baseUrl": ".",
    "types": [
      "node"    ],
    "paths": {
      "@/*": [
        "src/*"
      ]
    },
    "lib": [
      "es2015",
      "dom",
      "dom.iterable",
      "scripthost"
    ]
  },
  "include": [
    "src/**/*.ts",
    "src/**/*.tsx",
    "src/**/*.vue",
    "tests/**/*.ts",
    "tests/**/*.tsx"
  ],
  "exclude": [
    "node_modules"
  ]
}

Note the line:
    "types": [
      "node"    ],

Fixed in https://github.com/vuejs/vue-cli/pull/2046


Check current symbols and extend missing / remove outdated symbols

also refer to https://github.com/zskarte/zskarte/issues/42

The currently implemented symbol set is from BABS and is the latest. Our booklet is from BSM. We should implement the missing delta symbols in #42

Move from PNG to SVG in this issue


Address license concerns.

Closes https://github.com/WASdev/azure.websphere-traditional.cluster/issues/3 https://github.com/WASdev/azure.websphere-traditional.cluster/issues/24
modified:   src/main/arm/createUiDefinition.json

Added hidden version box for testing purposes.

Add license texts.  Rendered readable here:

Accept the IBM License Agreements to proceed with the deployment.

IBM WebSphere Application Server Network Deployment

IBM WebSphere Application Server

These go to:
https://aka.ms/tWASNDLicenseAzureVMs https://www-03.ibm.com/software/sla/sladb.nsf/displaylis/51D05F1A5B1DF6AA8525869D0013833A?OpenDocument
https://aka.ms/tWASBaseLicenseAzureVMs https://www-03.ibm.com/software/sla/sladb.nsf/displaylis/7C40AF1F7A9F5DD88525869D00138CF7?OpenDocument
respectively.
Signed-off-by: Ed Burns<EMAIL_ADDRESS>

Obsoleted by #21


Unify the Row types to remove code duplication and make easier-to-use

Row::get is a pretty common method when using the query API. Requiring a trait import is less-than-ideal.
PgRow and MySqlRow are nearly identical in implementation.

Proposal:

PgRow and MySqlRow are now PgDataRow and MySqlDataRow that only expose getting values by index and only getting byte slices.

Row becomes a struct that contains the once duplicated functionality.

pub struct Row<R: DataRow> {
  inner: R,
  shared: Arc<SharedRow>,
}

struct SharedRow<DB: Database> {
  column_names: Arc<HashMap<Box<str>, usize>>,
  column_types: Arc<[DB::TypeId]>,
}

We can add runtime type checking to Row as well ( see #8 )

We decided to not do this. The Row types are different enough now that SQLite is in the mix. We did rearrange the traits to reduce some duplication.


fix: suffix resolved import directory with slash

What kind of change does this PR introduce?
Bug fix: https://github.com/supabase/cli/issues/1338
What is the new behavior?
Directory path in import map must be suffixed with slash.
Additional context
Add any other context or screenshots.

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

14 of 14 (100.0%)  changed or added relevant lines in 2 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.02%) to 60.033%

Totals

Change from base Build<PHONE_NUMBER>:
0.02%

Covered Lines:
6908

Relevant Lines:
11507

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

18 of 18 (100.0%)  changed or added relevant lines in 3 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.03%) to 60.042%

Files with Coverage Reduction
New Missed Lines
%

internal/utils/console.go
1
90.16%

Totals

Change from base Build<PHONE_NUMBER>:
0.03%

Covered Lines:
6909

Relevant Lines:
11507

💛  - Coveralls


Fix for asynchronous download while using a sharing link

We had an error that happens only with large files and a sharing link.  Simple fix and most of this PR is in testing which was a pain, see both stash and dryad repos.
Also minor change to be sure admin? security lookup it handles nils gracefully.  I think it should already, but just in case.

Looks good. Thanks!


fix(ruby): enable web-mode for erb files

.erb files in bare Doom were being opened in HTML mode, which mangles formatting
on save. This ensures that when ruby and web features are enabled, they open in
the more full-featured web-mode editor.

Here, already opens on web-mode

This is already in effect in the :lang web module.


Query Engine failed ENOENT

OS: MacOS
Database: PostgreSQL
Version: alpha
When I'm running this command prisma2 generate, sometimes I get this error:
Error: Error: Command failed with ENOENT: ../node_modules/prisma2/query-engine-darwin cli --dmmf
spawn ../node_modules/prisma2/query-engine-darwin ENOENT

The only way to make it work again is to rm -rf node_modules and install again. When I'm making a deploy to my server I need to manually do the same thing.

@pantharshit00
I think I have steps. It happened for me when I upgraded from<EMAIL_ADDRESS>to<EMAIL_ADDRESS>and also upgraded a few other packages:
$ yarn add --dev @types/lodash prisma2 ts-node ts-node-dev typescript
$ prisma2 generate
Error: Error: Command failed with ENOENT: /Users/anton/projects/workbooks/apps/api/node_modules/prisma2/query-engine-darwin cli --dmmf
spawn /Users/anton/projects/workbooks/apps/api/node_modules/prisma2/query-engine-darwin ENOENT
error Command failed with exit code 1.
$ rm -r node_modules && yarn && prisma2 generate
Error: Oops! Photon has been renamed to Prisma Client. Please make the following adjustments:
  1. Rename provider = "photonjs" to provider = "prisma-client-js" in your schema.prisma file.
  2. Replace your package.json's @prisma/photon dependency to @prisma/client
  3. Replace import { Photon } from '@prisma/photon' with import { PrismaClient } from '@prisma/client' in your code.
  4. Run prisma2 generate again.
$ yarn remove @prisma/photon && yarn add @prisma/client
$ prisma2 generate
Error: Error: Command failed with ENOENT: /Users/anton/projects/workbooks/apps/api/node_modules/prisma2/query-engine-darwin cli --dmmf
spawn /Users/anton/projects/workbooks/apps/api/node_modules/prisma2/query-engine-darwin ENOENT
error Command failed with exit code 1.
$ rm -r node_modules && yarn && prisma2 generate
worked this time!

@thehappycoder I tried your reproduction, I can't reproduce this. Can you please tell me which OS are you using? I tried this on MacOS 10.15.2

@pantharshit00 I am using macos 10.15.3. Maybe upgrading macos caused this. I am not sure. Originally, I installed prisma2 when I had 10.15.2.

Ok, can you also tell me which yarn version you are using?

yarn version: 1.21.1

Just had the same issue, basic steps:

Have preview021 installed
Bump the versions of other packages
yarn install
-> ENOEnt, looks like binaries aren't getting downloaded after the prune

To fix, manuallly remove all node_modules folders. (The yarn default pruning in of itself isn't enough)
Yarn 1.21.1, Linux 5.5.1

I am still unable to reproduce :/
Do you all have prisma2 globally installed as well or it is just a local dependency?

I have it globally installed as well.

Maybe try resetting the binary cache. Run rm -rf .cache/prisma to reset the cache.
We don't have a reproduction here so we can only guess what is the source of the issue here.

With prisma2 installed locally (latest sdk) I get this error randomly after working with it in development for a while (restarting the process many times in the process). Looks like the node process hangs and then continues to hang on subsequent starts until I dump the local node_modules folder and reinstall.
Error: Error: Command failed with ENOENT: /wkdir/node_modules/prisma2/query-engine-darwin cli --dmmf
spawn /wkdir/node_modules/prisma2/query-engine-darwin ENOENT
error Command failed with exit code 1.

I am seeing this as well:

Everything was running fine
bumped a minor version of a single package (apollo-server)
yarn install
yarn prisma2 generate fails

Error: Error: Command failed with ENOENT: /<project_path>/node_modules/prisma2/query-engine-darwin cli --dmmf
spawn /<project_path>/node_modules/prisma2/query-engine-darwin ENOENT
error Command failed with exit code 1.

yarn v1.22.0
macOS 10.15.3
prisma2 ^2.0.0-preview021 installed locally

I can reproduce this now, thank you @narciero for the steps.

My package.json before:
{
  "name": "issue-1427",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "@prisma/client": "^2.0.0-preview021",
    "apollo-server": "^2.10.0",
    "prisma2": "^2.0.0-preview021"
  }
}

After the minor bump:
{
  "name": "issue-1427",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "@prisma/client": "^2.0.0-preview021",
    "apollo-server": "^2.10.1",
    "prisma2": "^2.0.0-preview021"
  }
}

Then when I ran yarn prisma2 generate, I got the ENOENT error.

We did a fix in prisma2@alpha. Please try it out, everyone :)

I am unable to reproduce this anymore :)

Thanks a lot for reporting 🙏
This issue is fixed in the latest alpha version of prisma2.
You can try it out with npm i -g prisma2@alpha.
In case it’s not fixed for you - please let us know and we’ll reopen this issue!


Use "quilc" rather than argv[0] for syslog name

As is done in QVM. Could alternatively sanitise the name, but that's more work for little gain.

Whatever you think is best, it all sounds fine by me. (Re: internal discussion, I don't understand how this could be considered a compromise in security. Does it... have the potential to reveal read-protected directory structure?? (Not typically, since syslog messages are only available to administrators.))

Whatever you think is best, it all sounds fine by me. (Re: internal discussion, I don't understand how this could be considered a compromise in security. Does it... have the potential to reveal read-protected directory structure?? (Not typically, since syslog messages are only available to administrators.))

I'm not sure exactly what they had in mind either. Information leakage is certainly one possibility. Normally only admins have access to syslog, but if an attacker were to gain access, they might learn something about the system you didn't want them to. There are probably more interesting things in the logs than quilc's argv[0], but who knows?  Or maybe they found a bug in syslog that they can exploit by tricking someone into running quilc from a directory they control, etc, etc.
Often the idea is just that every user controlled/controllable input is a potential attack surface, and therefore anything that doesn't need to be user input shouldn't be. It's about switching from a mindset of "I don't see how this could be exploited", to a mindset of "I'm not close to certain this couldn't be exploited, so mitigate the risk if possible." I never fully internalized this philosophy myself, but I can see where the security folks are coming from. To be fair, the best exploits are almost by definition something you would not have guessed. Try as you might, you will probably not foresee the exact Lemony-Snicket's-series-of-unfortunate-events that some buffer-overflow-breathing ebpf-bytecode-injecting cold-blooded psychopath will manage to pull off to exploit that poor innocent argv[0] that was minding it's own business. So from that perspective, a default policy of paranoia around security issues makes sense.

Whatever you think is best, it all sounds fine by me. (Re: internal discussion, I don't understand how this could be considered a compromise in security. Does it... have the potential to reveal read-protected directory structure?? (Not typically, since syslog messages are only available to administrators.))

I'm not sure exactly what they had in mind either. Information leakage is certainly one possibility. Normally only admins have access to syslog, but if an attacker were to gain access, they might learn something about the system you didn't want them to. There are probably more interesting things in the logs than quilc's argv[0], but who knows?  Or maybe they found a bug in syslog that they can exploit by tricking someone into running quilc from a directory they control, etc, etc.

This is the most likely scenario, in my opinion: an attacker launches quilc from /this/extremely/long/directory/that/triggers/a/buffer/overflow/in/whatever/software/is/used/to/monitor/logs/... where the path contains a suitable shellcode [1]. If the monitoring software used to manage the logs is vulnerable to a buffer overflow and the path name overruns, say, the stack, then this could give the attacker control of the machine were the monitoring code is executed (usually some computer deep in the network operations center).
[1] https://nets.ec/Alphanumeric_shellcode

Some examples of things gone awry when letting users control argv[0]: https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword="argv[0]"


Suggestion: Add imgur alternatives

Hi, thanks for your work on this app.
I suggest adding imgur alts as well.
(rimgo seems to be support more features like galleries/videos)
imgin

https://imgin.voidnet.tech

rimgo

https://i.bcow.xyz
https://rimgo.pussthecat.org
https://img.riverside.rocks
https://rimgo.totaldarkness.net
https://rimgo.bus-hit.me

Thanks! I've added both, but am going to hold off on promoting imgin support in the readme until they have more instances.

Plus, the development hasn't been very active for the last months. @accountForIssues Thanks for mentioning Rimgo, I wasn't aware of this project yet. It seems to be further and more active developed than Imgin.


Improve rounding

Fixes #713
It appears that Math.round() is always preferred except with placements top and bottom (not a variation) and where Math.floor() is preferred (and only on the left and right values)...
See the playground: https://codepen.io/anon/pen/Pxjdoo

Should the playground include already your fix?
I see some misalignment:

Yeah, line 1243...
Perhaps we need to take into account the odd/even width then.
When I resize the window using PR code:

pop = even, ref = odd === perfect
pop = even, ref = even === jittery / sometimes incorrect position

When I resize the window always using Math.round():

pop = even, ref = odd === jittery / sometimes incorrect position
pop = even, ref = even === perfect

Can you reproduce that?

Yes I can repro

I think this is the pattern:

If the reference & popper are the same oddness in width, then use Math.round()
If they're different oddness in width, then use Math.floor()

This still only applies to horizontal placement and the left/right values

top and bottom are working fine as they are already?

It appears so yes. Horizontally it appears flush with the reference, and you can change the code at the very bottom to left / left-end as an example too.
However I just noticed that pop = odd, ref = even doesn't like Math.round() (but doesn't jitter). Another edge case? 😓

Please, let's make sure the behavior is consistent across browsers also.

This might be getting stranger by the second..
If both are odd width, then we need
left: toInteger(bothOddWidth ? popper.left - 1 : popper.left),

I'm going to check Firefox and Safari now

Considering the number of edge cases you are finding I think it would make sense to write some tests so make sure everything is working as expected.

On Firefox it looks like the element is positioned on a half pixel, no matter what if we use a full pixel then it can't be positioned correctly. My suggestion there would be not to round if the screen is HiDPI (so there won't be blurriness). If you don't round at all, FF appears perfect, same with Safari.

this thing is getting complex 😅
may we limit this PR to the most basic use case (non HiDPI screens) and think about the HiDPI screens in a new one?

Yeah it's kinda crazy for something that should be simple..
FWIW here is what it would look like to check for that:
const isVertical = ['left', 'right'].indexOf(data.placement) !== -1;
const isVariation = data.placement.indexOf('-') !== -1;
const sameWidthOddness = reference.width % 2 === popper.width % 2;
const bothOddWidth = reference.width % 2 === 1 && popper.width % 2 === 1;
const isHiDPIScreen = window.devicePixelRatio >= 2;
const noRound = v => v;

// We don't need to round if the device has a high pixel density
const horizontalToInteger = isHiDPIScreen
  ? noRound
  : isVertical || isVariation || sameWidthOddness
  ? Math.round
  : Math.floor;
const verticalToInteger = isHiDPIScreen ? noRound : Math.round;

const offsets = {
  left: horizontalToInteger(
    bothOddWidth && !isVariation && !isHiDPIScreen
      ? popper.left - 1
      : popper.left
  ),
  top: verticalToInteger(popper.top),
  bottom: verticalToInteger(popper.bottom),
  right: horizontalToInteger(popper.right)
};

And yes I agree it needs tests due to all the logic 😅

Will try to write some tests in a sec

@FezVrasta are the tests appropriate?


there is no clients.txt

the file can not be found when node server.js
I have tried to touch a empty clients.txt file, but node throw exceptions of JSON
so would you please help me to run your project?
thanks & Best regards
error message:
_info: Listening on port 8081 with SSL false
undefined:1
SyntaxError: Unexpected end of JSON input
at JSON.parse ()
at /home/sui/src/node/node-wifidog-auth/models/Clients.js:204:27
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)_

It works after putting any json strings into clients.txt, I am not sure if it any other runtime issus;
BYW
anyone know how to set wifidog.conf to connect this auth server? such as login.php...
GatewayID default
#GatewayInterface bridge0
GatewayInterface rmnet_ipa0
GatewayAddress <IP_ADDRESS>
AuthServer {
#Hostname http://<IP_ADDRESS>
Hostname www.suijunqiang.win
#Hostname http://<IP_ADDRESS>
#Hostname  http://www.skybureau.cn/kevin/
SSLAvailable no
HTTPPort 8081
#HTTPPort 8081
#HTTPPort 3001
Path /wifidog/
LoginScriptPathFragment login.php?
PortalScriptPathFragment portal.php?
MsgScriptPathFragment message.php?
PingScriptPathFragment ping.php?
AuthScriptPathFragment auth.php?
}
GatewayPort 2060
CheckInterval 60
ClientTimeout 5
ClientTimeout
TrustedMACList 18:87:40:af:2a:56,00:00:DE:AD:BE:AF,00:00:C0:1D:F0:0D
Thanks & Best Regards
Sui


Typo in README

3.2.1 Current directory
To change directory in which the command is run pass the :chidir option:
A slip.  chidir -> chdir
Nice gem!

Thanks, fancy PR?

Heh heh.  I can proof-read, but programming, that's tougher!


Enabling startup logging in stdout should be covered (or linked)

I had some seriously hard times trying to figure out how to get the logs emitted in the Startup class to appear anywhere.
Using the default .net core 2 approach to web apps and deployments, the web.config file is autogenerated. And this specifically turns off the stdoutLogEnabled logging, which after some thought makes a lot of sense.
First problem for me is that this is covered under troubleshooting, but to me this is not a troubleshooting problem, but seeing/accessing the log statements problem. I never really thought about looking into the troubleshooting instead of the logging documentation.
Second problem is that logs from the Startup (or events) do not appear anywhere, and it was only I randomly stepped onto the blogpost, which explained that turn on the stdoutLogEnabled to get access to those statements.
I would definitely recommend to cover this aspect of the Startup here, even as a link to actual troubleshooting documentation, under the Azure logging parts. It would have saved me at least several days of trying to figure out why the log statements do not appear anywhere.
There is very good explanation of the whole thing in the documentation here https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/azure-apps/troubleshoot?view=aspnetcore-2.1
Perhaps the same information would make sense in "Handle errors" sections as well, as I recall looking there, but the problem was my whole service was crashing before Kestrel came up, so obviously wasn't able to get any information out.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 7184a308-a254-9350-a5cd-5bced1f369ae
Version Independent ID: 726e3bf1-f367-d733-8933-bccc04da0e16
Content: Logging in ASP.NET Core
Content Source: aspnetcore/fundamentals/logging/index.md
Product: aspnet-core
GitHub Login: @ardalis
Microsoft Alias: tdykstra

Hello @laazik. Thanks for commenting.
The underlying reason is that the docs are somewhat compartmentalized according to the API. The logging topic is focused on application logging available via the Logging API and logging providers that load when the app successfully starts. Therefore, we don't cover the stdout logging in the Logging topic. It's treated a different API/layer. What we can do is link at very top of the Logging topic over to the stdout logging information for both IIS and Azure for troubleshooting app startup issues. That should get cats over to the right spot.
RE: Handle errors topic
https://docs.microsoft.com/aspnet/core/fundamentals/error-handling#startup-exception-handling

When running on IIS or IIS Express, a 502.5 Process Failure is returned by the ASP.NET Core Module if the process can't be started. Follow the troubleshooting advice in the Troubleshoot ASP.NET Core on IIS topic.

... almost covers it. I don't like that the Azure Troubleshooting link is only down in the Additional resources section, and a brief shout out to the stdout log might be a good add here. Certainly, I'd like that Azure troubleshooting link in the Startup exception handling section.

I think I see why I don't have that additional link to the Azure troubleshooting topic. When one goes to the Troubleshoot on IIS topic, there's a list of other resources at the top. One of those links is over to the Azure topic.

As a side note, I was actually injecting the configured ILoggerFactory in the initial Startup method, as I'm usually accustomed to initialise the common logging system as really the first thing in the application (if there is a need for automated log processing etc. it's pretty convenient to have a common way how to emit information from the app). I can definitely see the merit in App initialised and running part.
Also it did not really seem to be a "troubleshooting IIS" issue, as I knew that something in the code itself must have been broken and it wasn't really related to actual hosting/IIS integration layer.
To give a bit context, my use case was initialisation of the keys from key vault as part of the configuration bootstrapping, which then are later used in configuring the auth providers, all which is happening in the starting up phase and it had some rights issues. Obviously everything was working pretty correctly in the local env, where the console is available and also in Azure from the controllers, so made me wonder really hard, why I wasn't able to get anything out anywhere in production.
Also, after I found the right place to look into, it was actually very straightforward after that to get it working and the documentation itself is really good. So this ended up to be mainly about the search engine query and finding the right place to look info from 🤓.


chore(ci): migrate from travis to github action

Why
Travis is a bit slow and doesn't have new features.
Github action is free and can hook on different events
How

rewrite exactly the same behaviour in a github action workflow

Pull Request Test Coverage Report for Build 627509020

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 95.055%

Totals

Change from base Build 199:
0.0%

Covered Lines:
104

Relevant Lines:
108

💛  - Coveralls


Add support for pingdom team accounts on summary and uptime

I've added an additional optional header for pingdom team accounts
By default it seems to use the account that is specified even though the Api key belongs to the team
account, the API specifies that for Multi-User https://www.pingdom.com/resources/api#multi-user+authentication, it should use an additional header for the main account

Looks good, do you mind add this to the wiki section?  I will merge once the wiki is updated.
https://github.com/QubitProducts/dashing-contrib/wiki/Widget:-Pingdom-Uptime
https://github.com/QubitProducts/dashing-contrib/wiki/Widget:-Pingdom-Summary
Thank you!

I've added this option to the wiki pages, just as an additional argument in the Example Job
Do you think this needs any further details around it.

that's perfectly fine. Thanks for improving this!

Released to rubygem.


uses_from_macos: add mandoc to allowed list

see https://github.com/Homebrew/homebrew-core/pull/115411

[x] Have you followed the guidelines in our Contributing document?

[x] Have you checked to ensure there aren't other open Pull Requests for the same change?

[x] Have you added an explanation of what your changes do and why you'd like us to include them?

[x] Have you written new tests for your changes? Here's an example.

[x] Have you successfully run brew typecheck with your changes locally?

[x] Have you successfully run brew tests with your changes locally?

Thanks so much for your first contribution!  You rock, @razamatan!


isdragging doesn't seem to be updating correctly

I'm guessing we are messing something up here but we are finding that isDragging isn't updating correctly for us as shown below. The demo below shows what's happening. We are writing out debug statements that I've copied below.
Issue steps

Drag Activity 3 (index 2) over Activity 2 (index 1)
Activity 3 is immediately displayed in index 1 which is the correct position but it's opacity isn't changing as it should be hidden. This is because isDragging isn't updating as shown in the logs below.
Acivity 2 is moved to index 2 which is also correct but it's not displayed because it's opacity is changed to be hided because the isDragging is not correct.

Debug output
Activity.render (id, index, isDragging): 3, 2, true
props.moveCard(dragIndex, hoverIndex):  2, 1
moveCard state: [{"id":1,"description":"1"},{"id":3,"description":"3"},{"id":2,"description":"2"}]
Activity.render (id, index, isDragging): 3, 1, false <== Should be true
Activity.render (id, index, isDragging): 2, 2, true <== Should be false
Demo

Code
Drag Target Source
Container
// AcivityFieldContainer.js
import React, { PropTypes } from 'react';
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { findDOMNode } from 'react-dom';
import { DropTarget, DragSource } from 'deloitte-symphony-core-fe/src/components/DragDrop';
import ActivityField from './ActivityField';
import * as wizardActions from '../../../../../../state/actions/wizard.action';
import * as internalControlActions from '../../../../../../state/actions/internalControl.action';

const ItemTypes = {
  CARD: 'card',
};

const cardSource = {
  beginDrag(props) {
    return {
      id: props.id,
      index: props.index,
    };
  },
};

const cardTarget = {
  hover(props, monitor, component) {
    const dragIndex = monitor.getItem().index;
    const hoverIndex = props.index;

    // Don't replace items with themselves
    if (dragIndex === hoverIndex) {
      return;
    }

    // Determine rectangle on screen
    const hoverBoundingRect = findDOMNode(component).getBoundingClientRect();

    // Get vertical middle
    const hoverMiddleY = (hoverBoundingRect.bottom - hoverBoundingRect.top) / 2;

    // Determine mouse position
    const clientOffset = monitor.getClientOffset();

    // Get pixels to the top
    const hoverClientY = clientOffset.y - hoverBoundingRect.top;

    // Only perform the move when the mouse has crossed half of the items height
    // When dragging downwards, only move when the cursor is below 50%
    // When dragging upwards, only move when the cursor is above 50%

    // Dragging downwards
    if (dragIndex < hoverIndex && hoverClientY < hoverMiddleY) {
      return;
    }

    // Dragging upwards
    if (dragIndex > hoverIndex && hoverClientY > hoverMiddleY) {
      return;
    }

    console.log("props.moveCard(dragIndex, hoverIndex): " + ' ' + dragIndex + ', ' + hoverIndex);

    // Time to actually perform the action
    props.onMoveActivity(dragIndex, hoverIndex);

    // Note: we're mutating the monitor item here!
    // Generally it's better to avoid mutations,
    // but it's good here for the sake of performance
    // to avoid expensive index searches.
    monitor.getItem().index = hoverIndex;
    console.log("monitor.getItem().index: " + monitor.getItem().index);
  },
};

class ActivityFieldContainer extends React.Component {
  render() {
    const {
            id,
            value,
            onMoveActivity,
            index,
            name,
            connectDragSource,
            connectDropTarget,
            isDragging,
            actions: {
              updateActivity,
              removeActivity
            }
          } = this.props;

////////////////////////////////////////////////////////
// isDragging is not updating as we expect it too
// and that is causing our problem
////////////////////////////////////////////////////////
    const opacity = isDragging ? 0 : 1;

    console.log("Activity.render (id, index, isDragging): "
                + id + ', ' + index + ', ' + isDragging);

    return connectDropTarget(connectDragSource((

        <ActivityField
          updateActivity={e => updateActivity(id, e.target.value)}
          removeActivity={removeActivity.bind(null, id)}
          value={value}
          onMoveActivity={onMoveActivity}
          index={index}
          id={id}
          name={name}
          opacity={opacity}
        />

    )));
  }
}

ActivityFieldContainer.propTypes = {
  // name: PropTypes.string.isRequired
};

const mapDispatchToProps = dispatch => ({
    actions: bindActionCreators({
        ...wizardActions,
        ...internalControlActions
      },
      dispatch)
  }
);

const connectedActivityField =
        connect(null, mapDispatchToProps)(ActivityFieldContainer);

const activityDragSource = DragSource(
  ItemTypes.CARD,
  cardSource,
  (connect, monitor) => ({
    connectDragSource: connect.dragSource(),
    isDragging: monitor.isDragging(),
  }))(connectedActivityField);

const activityDropSource = DropTarget(
  ItemTypes.CARD,
  cardTarget,
  connect => ({
    connectDropTarget: connect.dropTarget(),
  }))(activityDragSource);

export default activityDropSource

Presentational
// ActivityField.js
import React, { Component } from 'react';
import SvgIcon from 'deloitte-symphony-core-fe/src/components/SvgIcon';
import '../../../../../../assets/sass/controlWizard.scss';

const ActivityField = ({
  name,
  id,
  value,
  updateActivity,
  removeActivity,
  opacity
}) => {

  // TODO: Ryan - create a dragging style and let Josh know about it
  return (

        Activity {name + 1}

        Description
        <textarea
          name={name}
          onChange={updateActivity}
          value={value}
        />

      <button
        className="button iconButton dsiClose"
        onClick={removeActivity} >
        <SvgIcon identifier="#crossspecial" className="dsi" />
      </button>

  );
}

export default ActivityField;

DragDropContext
Container
// ActivitesContainer.js
import React, { PropTypes } from "react";
import update from 'react/lib/update';
import { connect } from "react-redux";
import { DragDropContext, HTML5Backend }
  from 'deloitte-symphony-core-fe/src/components/DragDrop';
import { bindActionCreators } from "redux";
import Activities from './Activities';

class ActivitiesContainer extends React.Component {
  constructor(props) {
    super(props);

    this.moveCard = this.moveCard.bind(this);

    this.state = {
      activities: this.props.dto.activities || [],
    };
  }

  componentWillMount() {
    const { dto } = this.props;
    if (dto.activities) {
      this.setState({ activities: dto.activities });
    }
  }

  componentWillReceiveProps(nextProps) {
    if (this.state.isMoving) {
      this.setState({isMoving: false});
      return;
    }
    this.setState({ activities: nextProps.dto.activities });
  }

  moveCard(dragIndex, hoverIndex) {
    const { activities } = this.state;
    const dragActivity = activities[dragIndex];

    const partialState = update(this.state, {
      activities: {
        $splice: [
          [dragIndex, 1],
          [hoverIndex, 0, dragActivity],
        ],
      },
    });

    console.log("moveCard state: " + JSON.stringify(partialState.activities));

    this.setState({...partialState, isMoving: true});
  }

  render() {
    return (
      <Activities
        activities={this.state.activities}
        onMoveActivity={this.moveCard}
      />
    );
  }
}

ActivitiesContainer.propTypes = {
  // actions: PropTypes.string.isRequired
};

const mapStateToProps = (state) => {
  const { wizardState } = state;

  return {
    // TODO: Ryan - figure out how to not need to clone here
    dto: wizardState.dto,
  };
};

function mapDispatchToProps(dispatch) {
  return {
    // actions: bindActionCreators(ActivitiesContainer Actions, dispatch)
  };
}

const connectedActivitiesContainer
        = connect(mapStateToProps, mapDispatchToProps)(ActivitiesContainer);

export default DragDropContext(HTML5Backend)(connectedActivitiesContainer);

Presenational
// Activites.js
import React, { PropTypes } from 'react';
import ActivityFieldContainer from './ActivityFieldContainer';

const Activities = ({
  activities,
  onMoveActivity,
}) => {
  // TODO: Ryan - figure out a good key to use
  const activityFields = activities.map((activity, index) => (
      <ActivityFieldContainer
        id={activity.id}
        name={index}
        value={activity.description}
        onMoveActivity={onMoveActivity}
        index={index}
      />
    )
  );

  return (

      { activityFields }

  );
};

Activities.propTypes = {
  // name: PropTypes.string.isRequired
};

export default Activities;

Hi,
Did you find a solution to this? I have a very similar problem and so far all the other fixes people have had do not apply to my code (no mutating, keys are set on all items etc.)
Thanks

@andydhobbs actually, i think this might be working now in our code. let me look and see if i can figure out what fixed it for us.

Hi, @RyanAtViceSoftware
After much more debugging I found my issue late last night!  I am using react-jsonschema-form which was setting the "key" value of my element to an integer. It's not clear in the react-dnd docs that the key needs to match the id returned from beginDrag()
Thanks!

@andydhobbs  thank you ! You are my god

It's not clear in the react-dnd docs that the key needs to match the id returned from beginDrag()

It doesn't have to match id returned from beginDrag, it just needs to be something other than key={indexFromMap}:
{cards.map((card, index) => (
      <Card
            key={index} // this line! This will not work! In official example it's key={card.id} instead. It can be any value uniquely identifying your card except for index.
            index={index}
            id={card.id}
            text={card.text}
            moveCard={this.moveCard}
      />
))}

Struggles with this issue for quite a few hours too.

You're a lifesaver @lakesare :)

This was incredibly helpful ! @lakesare спасибо 🙇♂

u can use (user-select: text) for whice dom you want to drag

My 5 cents. Was struggling with a similar issue as well. My scenario was - I needed to pass isDragging to another list component, while the first component being dragged.
Solved it by changing the name of isDragging prop to something else (i.e. dragging).

@andydhobbs thanks T.T your my hero

For those who come on this issue in the future and already applied the solution and it still not work for you (like me), it's probably because your component is unmounting when the dragging occurs.
For that, make sure you are passing the isDragging callback to the useDrag hook like mentioned in the doc


how to create a topology file

I am a student & I am using the martini 3 parameters for the lipidome tutorial that you have given on your website. I am unable to make a topology file for the dppc lipid. How do I make one? What should be the format of the topolgy file.

Here's the topology for the current Martini 3 DPPC lipid model:
https://github.com/marrink-lab/martini-forcefields/blob/784591ebdc91d762ed4df986c4650546c938f776/martini_forcefields/regular/v3.0.0/gmx_files/martini_v3.0.0_phospholipids_v1.itp#L506-L562


Android Mobile App

The send ETH confirmation screen in the Android app states the transaction is being broadcast to the Bitcoin blockchain

hi why my bitcoin not comming in my coin base


Update cats-effect to 3.2.4

Updates org.typelevel:cats-effect from 3.2.3 to 3.2.4.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "org.typelevel", artifactId = "cats-effect" } ]

labels: library-update, semver-patch

Codecov Report

Merging #314 (bcd2c1d) into main (a050469) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #314   +/-   ##
=======================================
  Coverage   59.87%   59.87%
=======================================
  Files          30       30
  Lines         987      987
  Branches       64       64
=======================================
  Hits          591      591
  Misses        396      396

Continue to review full report at Codecov.

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

Superseded by #315.


Optimized assets + added issues tag to the fabric.mod.json file.

Lossless compression (oxipng).

Thanks for the heads up on oxipng, we might change some textures though and maybe use the tool myself after that.
I already updated the fabric.mod.json and gradle wrapper now myself though, the links were wrong anyway.
Thanks again but I will have to close this PR


fix: handle uninitialized and non-leader states in Raft cluster mode

#307
read/write commands are now dropped if raft has not been initialized in raft mode, and an error message 'NOCLUSTER No Raft Cluster' is returned to the client. This change prevents the system from crashing due to failed assertions.

https://github.com/OpenAtomFoundation/pikiwidb/pull/302 帮忙把这个内容加进这个pr

#302 帮忙把这个内容加进这个pr

已加。
对于处于 raft 集群模式下的请求：

如果 PRAFT 还没有初始化，对于读写命令，返回客户端一个初始化未完成的提示信息。#307
如果 PRAFT 初始化完成了，对于写命令，如果自身不是 leader，返回一个重定向的信息。 #302

@开颜 @changyuan

PR Code Suggestions ✨
CategorySuggestion                                                                                ScorePossible bug

Add a null check for PRAFT to prevent potential null pointer dereferences

Consider checking if PRAFT is not null before calling its methods to avoid potential null pointer dereferences.
src/base_cmd.cc [39-41]
-if (!PRAFT.IsInitialized() && (HasFlag(kCmdFlagsReadonly) || HasFlag(kCmdFlagsWrite))) {
+if (PRAFT && !PRAFT.IsInitialized() && (HasFlag(kCmdFlagsReadonly) || HasFlag(kCmdFlagsWrite))) {
   DEBUG("drop command: {}", client->CmdName());
   return client->SetRes(CmdRes::kErrOther, "PRAFT is not initialized");
 }

Suggestion importance[1-10]: 9
Why: Adding a null check for PRAFT is a crucial improvement to prevent potential null pointer dereferences, which could lead to runtime crashes.
9
Enhancement

Use more descriptive error codes for specific failure scenarios

Consider using a more specific error code than kErrOther for uninitialized PRAFT and non-leader scenarios to improve error handling and client debugging.
src/base_cmd.cc [41-46]
-return client->SetRes(CmdRes::kErrOther, "PRAFT is not initialized");
-return client->SetRes(CmdRes::kErrOther, fmt::format("MOVED {}", PRAFT.GetLeaderAddress()));
+return client->SetRes(CmdRes::kErrPraftUninitialized, "PRAFT is not initialized");
+return client->SetRes(CmdRes::kErrNotLeader, fmt::format("MOVED {}", PRAFT.GetLeaderAddress()));

Suggestion importance[1-10]: 8
Why: Using more descriptive error codes enhances error handling and client debugging, making it easier to diagnose specific issues.
8
Performance

Optimize the atomic load operation with relaxed memory ordering for potential performance improvement

Use std::atomic::load(std::memory_order_relaxed) for potentially better performance when the ordering of use_raft is not critical.
src/base_cmd.cc [37]
-if (g_config.use_raft.load()) {
+if (g_config.use_raft.load(std::memory_order_relaxed)) {

Suggestion importance[1-10]: 7
Why: This suggestion is correct and can improve performance, but the impact is minor as it only optimizes a single atomic load operation.
7
Maintainability

Refactor complex condition checks into a separate method to enhance readability and maintainability

Refactor the condition checks into a separate method to improve code readability and maintainability.
src/base_cmd.cc [39-46]
-if (!PRAFT.IsInitialized() && (HasFlag(kCmdFlagsReadonly) || HasFlag(kCmdFlagsWrite))) {
-  DEBUG("drop command: {}", client->CmdName());
-  return client->SetRes(CmdRes::kErrOther, "PRAFT is not initialized");
+if (checkPraftState(client)) {
+  return;
 }
-if (!PRAFT.IsLeader() && HasFlag(kCmdFlagsWrite)) {
-  return client->SetRes(CmdRes::kErrOther, fmt::format("MOVED {}", PRAFT.GetLeaderAddress()));
-}
+// Define checkPraftState elsewhere in the class

Suggestion importance[1-10]: 6
Why: Refactoring condition checks into a separate method improves readability and maintainability, but it is a minor enhancement compared to functional or performance improvements.
6

PR Review 🔍

 ⏱ Estimated effort to review [1-5]
3, because the PR involves changes in the core command execution logic and introduces new conditions based on the state of the Raft cluster. Understanding the implications of these changes on the overall system behavior and ensuring they do not introduce new bugs or regressions requires a moderate level of effort.

 🧪 Relevant tests
Yes

 ⚡ Possible issues
Possible Bug: The new code in BaseCmd::Execute does not handle the case where a command is neither read-only nor write, which might lead to unexpected behaviors for such commands.

 🔒 Security concerns
No

 Code feedback:
relevant filesrc/base_cmd.cc
suggestion

Consider adding an else clause to handle commands that do not fall into read-only or write categories. This will ensure that all command types are accounted for and handled appropriately. [important]

relevant linereturn client->SetRes(CmdRes::kErrOther, fmt::format("MOVED {}", PRAFT.GetLeaderAddress()));


[Bug] Horizontal swipes always translate the toolbar

Describe the bug
Various popular websites contain iframes or scrollable elements that if scrolled should not also animate the toolbar.
This is probably an impossible bug to tackle at the moment as a wrapper over WebView.
A comparison of DDG and Chrome:
https://user-images.githubusercontent.com/11428869/215857912-02cf6698-2f5e-4b38-ac64-9eb200bff5bd.mp4
How to Reproduce

visit youtube.com and scroll horizontally (just slightly on the vertical) in a horizontally scrollable element

visit maps.google.com and scroll the map horizontally or even vertically.

Expected behavior
The toolbar should not be animated.
Environment
Happens on all devices and all DDG versions.

Thanks. It's a known limitation, scroll behavior on webview is problematic and I don't think we can tackle it without fixing first https://github.com/duckduckgo/Android/issues/914, but we never prioritized that task. Until then, any vertical scroll will translate to the toolbar.
On your video, the toolbar hides because of the vertical scroll you apply. A horizontal scroll doesn't translate to the toolbar.


vue example: fix context -> ctx

getRender wants createApp to return ctx not context, hence the PR.

Awesome, great catch — thank you @IlyaSemenov. BTW this is our Discord — please join if you want to get more involved with the project. Let's talk!


351p Blank screen after new artwork on game startup

Once I select a game and run it, after the new gameboy art logo pops up, the sound of the game plays, but nothing shows on the screen unless I bring up retroarch, then the game shows as normal.  Not sure if something I did is causing it but would love to have it addressed if possible.  I have only tested gba games, but every single one does it.  Thanks!

When did you start experiencing this issue?

I just updated to the latest version last night, so since then.

What version of ArkOS were you on before you updated last night?  Trying to pinpoint which update may have caused this for you.

Also are you using shaders?

Unfortunately I can't remember the exact update.  Probably an update from a few weeks ago, as I haven't had the 351 more than a month.  I updated maybe twice in that time, and then of course last night.  I also don't use any shaders.  Not sure if the gameboy logo after you start a game is the culprit, but it's the only thing that seems different from before that may have led to no video playing.

Same here... I have narrowed it down to Retroarch32, any emulator using Retroarch32 has a blank screen when loading a game, only sound is present, but seems to be ok for emulators that use Retroarch.

I have a slightly different variation of this issue.. For me only GBA has no video (audio plays). All other emulators are working And the other difference: even pressing select-X to bring up the RetroArch does not show anything. All I can do is Select-Start twice to exit.
Only starting happening after updating today.
I forget which version I had before, but I last updated on March 12th.
If I recall correctly, GBA may be the only emulator that I did NOT set a shader on. Not sure if that helps.

Update: I tried changing the emulator for GBA:
No video for: MGBA and MGBA_RUMBLE
All other emulators show video.

Update 2:
I logged into the terminal and removed this folder:
/home/ark/.config/retroarch/config/mGBA
Which I assume contained core overrides to the retroarch configuration.
Now MGBA and MGBA_RUMBLE work with video again.


VSCode Editor Crashes when a folder is deleted

When I try to delete a folder within a repo, VSCode freezes.
VS Code 1.38.1
Ubuntu 19.04 (Kubuntu)
And yes, it happens when VScode is launched without extensions.

Please provide concrete steps to reproduce the problem. Thank you.

/needsMoreInfo

Updated! Thanks for checking this out.

Please see if you can find any logged output that could help us find the source of the issue:

run code --verbose from the command line and attach the output
in Code select Help | Toggle Developer Tools and select the Console
attach any output you see in the Console you can find

Thanks!

Please see if you can find any logged output that could help us find the source of the issue:

Hi @bpasero ,
Unfortunately, as chance would have it, I just replaced that Kubuntu partition (the day before you asked for the logs), for unrelated reasons, with KDE Neon, and I'm no longer getting the same issue.
Thanks for your attention to this! I'll close the issue now, as I can no longer reproduce it.


Can't install for Laravel 6

Hi,
I can't install the package via composer for Laravel 6.
Problem 1
- Installation request for josh/laravel-terminal dev-develop -> satisfiable by josh/laravel-terminal[dev-develop].
- Conclusion: remove laravel/framework v6.0.3
- Conclusion: don't install laravel/framework v6.0.3
- josh/laravel-terminal dev-develop requires illuminate/support ~5.1 -> satisfiable by illuminate/support[5.1.x-dev, 5.2.x-dev, 5.3.x-dev, 5.4.x-dev, 5.5.x-dev, 5.6.x-dev, 5.7.17, 5.7.18, 5.7.19, 5.7.x-dev, 5.8.x-dev, v5.1.1, v5
.1.13, v5.1.16, v5.1.2, v5.1.20, v5.1.22, v5.1.25, v5.1.28, v5.1.30, v5.1.31, v5.1.41, v5.1.6, v5.1.8, v5.2.0, v5.2.19, v5.2.21, v5.2.24, v5.2.25, v5.2.26, v5.2.27, v5.2.28, v5.2.31, v5.2.32, v5.2.37, v5.2.43, v5.2.45, v5.2.6, v5.2.
7, v5.3.0, v5.3.16, v5.3.23, v5.3.4, v5.4.0, v5.4.13, v5.4.17, v5.4.19, v5.4.27, v5.4.36, v5.4.9, v5.5.0, v5.5.16, v5.5.17, v5.5.2, v5.5.28, v5.5.33, v5.5.34, v5.5.35, v5.5.36, v5.5.37, v5.5.39, v5.5.40, v5.5.41, v5.5.43, v5.5.44, v
5.6.0, v5.6.1, v5.6.10, v5.6.11, v5.6.12, v5.6.13, v5.6.14, v5.6.15, v5.6.16, v5.6.17, v5.6.19, v5.6.2, v5.6.20, v5.6.21, v5.6.22, v5.6.23, v5.6.24, v5.6.25, v5.6.26, v5.6.27, v5.6.28, v5.6.29, v5.6.3, v5.6.30, v5.6.31, v5.6.32, v5.
6.33, v5.6.34, v5.6.35, v5.6.36, v5.6.37, v5.6.38, v5.6.39, v5.6.4, v5.6.5, v5.6.6, v5.6.7, v5.6.8, v5.6.9, v5.7.0, v5.7.1, v5.7.10, v5.7.11, v5.7.15, v5.7.2, v5.7.20, v5.7.21, v5.7.22, v5.7.23, v5.7.26, v5.7.27, v5.7.28, v5.7.3, v5
.7.4, v5.7.5, v5.7.6, v5.7.7, v5.7.8, v5.7.9, v5.8.0, v5.8.11, v5.8.12, v5.8.14, v5.8.15, v5.8.17, v5.8.18, v5.8.19, v5.8.2, v5.8.20, v5.8.22, v5.8.24, v5.8.27, v5.8.28, v5.8.29, v5.8.3, v5.8.30, v5.8.31, v5.8.32, v5.8.33, v5.8.34,
v5.8.35, v5.8.36, v5.8.4, v5.8.8, v5.8.9].
- don't install illuminate/support 5.5.x-dev|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.5.0|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.5.16|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.5.17|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.5.2|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.5.28|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.5.33|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.5.34|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.5.35|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.5.36|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.5.37|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.5.39|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.5.40|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.5.41|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.5.43|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.5.44|don't install laravel/framework v6.0.3
- don't install illuminate/support 5.6.x-dev|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.0|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.1|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.10|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.11|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.12|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.13|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.14|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.15|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.16|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.17|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.19|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.2|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.20|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.21|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.22|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.23|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.24|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.25|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.26|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.27|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.28|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.29|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.3|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.30|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.31|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.32|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.33|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.34|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.35|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.36|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.37|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.38|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.39|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.4|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.5|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.6|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.7|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.8|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.6.9|don't install laravel/framework v6.0.3
- don't install illuminate/support 5.7.17|don't install laravel/framework v6.0.3
- don't install illuminate/support 5.7.18|don't install laravel/framework v6.0.3
- don't install illuminate/support 5.7.19|don't install laravel/framework v6.0.3
- don't install illuminate/support 5.7.x-dev|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.0|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.1|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.10|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.11|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.15|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.2|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.20|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.21|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.22|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.23|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.26|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.27|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.28|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.3|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.4|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.5|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.6|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.7|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.8|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.7.9|don't install laravel/framework v6.0.3
- don't install illuminate/support 5.8.x-dev|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.0|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.11|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.12|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.14|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.15|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.17|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.18|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.19|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.2|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.20|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.22|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.24|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.27|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.28|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.29|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.3|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.30|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.31|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.32|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.33|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.34|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.35|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.36|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.4|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.8|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.8.9|don't install laravel/framework v6.0.3
- don't install illuminate/support 5.1.x-dev|don't install laravel/framework v6.0.3
- don't install illuminate/support 5.2.x-dev|don't install laravel/framework v6.0.3
- don't install illuminate/support 5.3.x-dev|don't install laravel/framework v6.0.3
- don't install illuminate/support 5.4.x-dev|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.1.1|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.1.13|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.1.16|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.1.2|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.1.20|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.1.22|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.1.25|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.1.28|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.1.30|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.1.31|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.1.41|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.1.6|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.1.8|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.2.0|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.2.19|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.2.21|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.2.24|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.2.25|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.2.26|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.2.27|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.2.28|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.2.31|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.2.32|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.2.37|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.2.43|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.2.45|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.2.6|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.2.7|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.3.0|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.3.16|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.3.23|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.3.4|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.4.0|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.4.13|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.4.17|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.4.19|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.4.27|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.4.36|don't install laravel/framework v6.0.3
- don't install illuminate/support v5.4.9|don't install laravel/framework v6.0.3
- Installation request for laravel/framework (locked at v6.0.3, required as ^6.0) -> satisfiable by laravel/framework[v6.0.3].

Hey there, Thanks for the issue.
Since 2018 I don't work with php language anymore, so i can not work on packages like this.
I fixed the issue but i highly recommend you to use another package for getting a best experience and reliability.
The new release here you can check it out {0.1 release version}
You can install it with composer like this:
composer require josh/laravel-terminal:0.1

PS: I think this repo has more reliability.
https://github.com/mikehaertl/php-shellcommand
you should check it out!
Good luck and enjoy programming))


Consider MurmurHash3 as default hash function instead of md5

MurMurHash3 seems a main adoption for hash function in many systems, instead of md5.
Quote from wikipedia:

Unlike cryptographic hash functions, it is not specifically designed to be difficult to reverse by an adversary, making it unsuitable for cryptographic purposes.

Briefly, if not consider security issue, Murmurhash3 is way more quicker.
I compare hashlib.md5 with mmh3.
In [1]: import numpy as np

In [2]: s = np.random.bytes(120)

In [3]: import hashlib

In [4]: %%timeit
   ...: int(hashlib.md5(s).hexdigest(), 16)
   ...:
   ...:
1.51 µs ± 10.1 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)

In [5]: import mmh3

In [6]: %%timeit
   ...: mmh3.hash(s)
   ...:
   ...:
233 ns ± 2.21 ns per loop (mean ± std. dev. of 7 runs, 1000000 loops each)

It's ~6.5x faster. Maybe we can include the code from mmh3 project.

I've done some small perf tests. For each test, I will do the test on the version without mmh3, and then do with mmh3.
Test1
Old md5 hash
In [151]: import mars.tensor as mt

In [152]: %%timeit
     ...: a = mt.random.rand(1000, 1000, chunk_size=50)
     ...: a.dot(a.T).tiles()
     ...:
     ...:
1.39 s ± 13.4 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

mmh3
In [1]: import mars.tensor as mt

In [2]: %%timit
   ...: a = mt.random.rand(1000, 1000, chunk_size=50)
   ...: a.dot(a.T).tiles()
   ...:
   ...:
UsageError: Cell magic `%%timit` not found.

In [3]: %%timeit
   ...: a = mt.random.rand(1000, 1000, chunk_size=50)
   ...: a.dot(a.T).tiles()
   ...:
   ...:
1.32 s ± 13.3 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)

~5% faster.
Test2, only with tokenize
Old md5 hash
In [1]: from mars.utils import tokenize

In [2]: import numpy as np

In [3]: a = ['abcdefg', 1, 2.2, np.random.rand(10, 20)]

In [4]: %timeit tokenize(a)
20.4 µs ± 144 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)

mmh3
In [1]: import numpy as np

In [2]: a = ['abcdefg', 1, 2.2, np.random.rand(10, 20)]

In [4]: from mars.utils import tokenize

In [5]: %timeit tokenize(a)
16 µs ± 168 ns per loop (mean ± std. dev. of 7 runs, 100000 loops each)

This time ~20% faster.
Conclude
We can expect mmh3 can bring reasonable benefit for speed of tokenize. Maybe later on, I will bring more perf on the DataFrame part.


Fix typo in max-widths scale

Hello!
I spotted a typo in the max-widths documentation. It suggested that mw-100 defined a literal value of 33% — it should be 100%.
I just updated the template itself, let me know if I need to do anything else to make this good to merge?
💃

Thanks for that @colepeters! The file you edited is the source code for the documentation, but you have to generate the built site as well. The docs team is working on improving this, but for now you need to manually run npm run doc to regenerate the pages people will see. Thanks :)

@lachlanjc Thanks for the pointer. Done!

Wasn't sure about the module number updates so merged this patch in manually. Thanks for catching it.


Fix warning related to tank MG gun

To repro:

Go into tank
Switch to M240 weapon
Exit tank
Press 5 to select drone
Left click to possess drone
Notice warning below.

Warning:

[2024.01.05-21.50.12:043][532]LogScript: Warning: Script Msg: Divide by zero: Divide_DoubleDouble
[2024.01.05-21.50.12:043][532]LogScript: Warning: Script Msg called by: WBP_Magazines_C /Engine/Transient.ProjectMUnrealEdEngine_0:GameInstance_ProjectM_C_1.WBP_Tank_UI_C_0.WidgetTree_0.WBP_WeaponDescription.WidgetTree_0.WBP_Magazines

DevNote:
Might be related to this
I found bug that is present on main and it blocks 738 issue, after leaving the tank mass seems to keep some kind of connection between tank entity and soldier entity. You can see that because, on the map it looks as if the soldier was in the tank and after possessing him you end up in the previously used tank, and other weird behaviour I encauntered when trying to debug that is that after using "ai.debug.mass.DestroyEntity [TankID]" it removed soldier with the tank if he was previously using the tank.

@archimonde1111 that bug is now fixed on main

DevNote:
Blocked until 738 and 812 are merged, so I don't have to maintain 3 PRs built on top of each other. (this issue will require me to make changes in at least 1 BP that was changed there)

Unable to replicate on dc44d409 commit.


feat: Anonymous report upload with name

Codecov Report

Merging #1540 (f058c1c) into master (905ec11) will decrease coverage by 0.21%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #1540      +/-   ##
==========================================
- Coverage   98.91%   98.69%   -0.22%
==========================================
  Files          91       91
  Lines        7251     7187      -64
  Branches     1282     1247      -35
==========================================
- Hits         7172     7093      -79
- Misses         49       58       +9
- Partials       30       36       +6

Impacted Files
Coverage Δ

src/schemathesis/cli/__init__.py
99.20% <100.00%> (+<0.01%)
:arrow_up:

src/schemathesis/specs/openapi/validation.py
76.47% <0.00%> (-11.77%)
:arrow_down:

src/schemathesis/extra/pytest_plugin.py
95.58% <0.00%> (-4.42%)
:arrow_down:

src/schemathesis/cli/callbacks.py
98.62% <0.00%> (-1.38%)
:arrow_down:

src/schemathesis/specs/openapi/loaders.py
98.31% <0.00%> (-0.85%)
:arrow_down:

...c/schemathesis/specs/openapi/negative/mutations.py
98.75% <0.00%> (-0.84%)
:arrow_down:

src/schemathesis/utils.py
96.81% <0.00%> (-0.80%)
:arrow_down:

src/schemathesis/runner/serialization.py
91.17% <0.00%> (-0.50%)
:arrow_down:

src/schemathesis/serializers.py
98.36% <0.00%> (-0.09%)
:arrow_down:

...rc/schemathesis/specs/openapi/negative/__init__.py
95.91% <0.00%> (-0.09%)
:arrow_down:

... and 22 more

Continue to review full report at Codecov.

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


feat(CTCP-3227): set authtype ACT when procedureType is simplified

functionality moved to arrival cache on branch CTCP-3227


⚠ Bofrost.de has degraded performance

In 0952862, Bofrost.de (https://www.bofrost.de) experienced degraded performance:

HTTP code: 200
Response time: 1732 ms

Resolved: Bofrost.de performance has improved in 48cc7e9 after 25 minutes.


pass4SymmKey setting causes restarts of splunk

Affected Puppet, Ruby, OS and module versions/distributions
Puppet: 4.10.6
Ruby: 2.0.0p648
Distribution: RedHat
Module version: 7.2.0

How to reproduce (e.g Puppet code you use)
splunk_server { 'clustering/pass4SymmKey':
  value => "password",
}

What are you seeing
The password is set and splunk automatically encrypts it using its splunk.secret, however splunk and puppet then begin fighting over the password line, with puppet changing it back to the unencrypted password and restarting splunk (and then splunk changing it back to the encrypted password).
What behaviour did you expect instead
The password to be set and not keep changing back and forth, and splunk to not restart every run.
Any additional information you'd like to impart
Unfortunately, it seems that splunk attempts to hold their method of encrypting files very close, so implementing the encryption of the file inside of puppet may be difficult. I have had a few thoughts about generating a shasum of the password and using that to verify the password hasn't changed since last run, but even that is difficult since technically the server.secret can change and the password would then not be updated accordingly (unless puppet is also managing the server.secret).

I'm not sure if there is a reason this isn't the case already, however this may be the best argument I can make for implementing the puppet_inifile refreshonly parameter. This would mean that I could write some hashed value of my password to a file, and subscribe to it with the clustering/pass4SymmKey resource, which seems like a bit of a hack but would probably work.

I'm not sure if there is a reason this isn't the case already, however this may be the best argument I can make for implementing the puppet_inifile refreshonly parameter. This would mean that I could write some hashed value of my password to a file, and subscribe to it with the clustering/pass4SymmKey resource, which seems like a bit of a hack but would probably work.

Closing as fixed by #362.


OpenTracing / Jaeger / Zipkin support?

Summary
Are there any plans to support OpenTracing or Zipkin's X-B3-Header?
Why?
Would benefit debugging as Gatekeeper ist usually just one of many proxies and apps a request goes through.
How
Maybe using https://github.com/opentracing/opentracing-go
Acceptance criteria
OpenTracing or B3-HTTP-Header are injected if not presend.

@lathspell there's nothing planned at the moment, but I'd be more than happy to review a design proposal. @stianst what do you think?

Have a look at this fork which already implements it. The pull request sadly includes unrelated stuff as well but the tracing.go file looks pretty easy: https://github.com/oneconcern/keycloak-gatekeeper/pull/27

@lathspell if this is something that you would like to propose or implement, please start a design proposal. So we can discuss the motivation and the use case scenarios for this.
For now I'm closing this issue, as your question was already answered. But please reopen, if that's not the case.


My cursor in Ubuntu is glitching out.

When I move a file or anything that I use my trackpad for(super annoying in Minecraft making it near unusable). For example when I have a file window and I am moving a file over to another window, it skips about 1/3 of the screen over to a random direction(up/down/left/right). This makes it nearly unusable and such. Here is my version info:
CHROMEOS_AUSERVER=https://tools.google.com/service/update2
CHROMEOS_BOARD_APPID={F67500C1-C6D8-5287-E4EC-F9BBB4AEE5C5}
CHROMEOS_CANARY_APPID={90F229CE-83E2-4FAF-8479-E368A34938B1}
CHROMEOS_DEVSERVER=
CHROMEOS_RELEASE_APPID={F67500C1-C6D8-5287-E4EC-F9BBB4AEE5C5}
CHROMEOS_RELEASE_BOARD=samus-signed-mpkeys
CHROMEOS_RELEASE_BRANCH_NUMBER=0
CHROMEOS_RELEASE_BUILD_NUMBER=6885
CHROMEOS_RELEASE_BUILD_TYPE=Official Build
CHROMEOS_RELEASE_CHROME_MILESTONE=43
CHROMEOS_RELEASE_DESCRIPTION=6885.0.0 (Official Build) dev-channel samus
CHROMEOS_RELEASE_NAME=Chrome OS
CHROMEOS_RELEASE_PATCH_NUMBER=0
CHROMEOS_RELEASE_TRACK=dev-channel
CHROMEOS_RELEASE_VERSION=6885.0.0
GOOGLE_RELEASE=6885.0.0

Can you provide the output of croutonversion (in the chroot)?

(trusty)ash@localhost:~$ croutonversion
crouton: version 1-20150317110704~master:be252afb
release: trusty
architecture: amd64
xmethod: xorg
targets: gnome-desktop,gnome,audio,chrome-dev,cli-extra,core,extension,unity-desktop,gtk-extra,keyboard,touch
host: version 6885.0.0 (Official Build) dev-channel samus

I am having the same issue.

maybe take a look at #1519

Thanks.  This fixes the issue of the ghosting cursor when I switch from ChromOS to Ubuntu.  In Ubuntu, the cursor still jumps around erratically.

@dennisranalli Do you have the touch target installed? Looks like touch installs touchégg and sets parameters in /etc/touchegg.conf — see the script.
I don't use the touch target, and haven't experienced your problems. I wonder if touchégg is causing the cursor to jump?

No -t touch enabled. Thanks

@dennisranalli could you also post the output of croutonversion?

Thanks...
crouton: version 1-20150404180843~master:66d0393b
release: trusty
architecture: amd64
xmethod: xorg
targets: unity
host: version 6680.78.0 (Official Build) stable-channel samus
kernel: Linux localhost 3.14.0 #1 SMP Fri Mar 20 15:41:09 PDT 2015 x86_64 x86_64 x86_64 GNU/Linux
freon: yes

This solution fixes most of the cursor issues.
https://plus.google.com/+ClayCaldovino/posts/beM8HnKMQ64

@dennisranalli links to a Google+ post that uses HughGreenBug's CrOS trackpad drivers repackaged for Ubuntu. Have others tried using these drivers on various Chromebooks? I am testing the replacement driver in a trusty chroot, and it appears to be much better.
If others share this experience, I'm glad to add a Wiki entry explaining how to use the replacement drivers, with @dnschneid's permission.

I am trying this on an Acer C910 -- my mouse seems to be a lot less bouncy, especially when I click with one finger while scrolling with the other.

A simple workaround I found for the corrupt mouse after switching back to the chroot is to touch the touchscreen. Granted this requires a touchscreen device and enabled chroot, but it seems resetting the cursor after switching temporarily fixes the problem.

@dennisranalli That fixed mine jumping, thanks! Now on to editing the rest of the settings.


[No-jira]: Update versions after release rollout at 100% successfully (3.20.0)

📲 What
Version name/code updates

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 67.16%. Comparing base (55eb15e) to head (2cdf104).

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2016      +/-   ##
============================================
- Coverage     67.16%   67.16%   -0.01%
+ Complexity     2057     2056       -1
============================================
  Files           355      355
  Lines         21483    21483
  Branches       3029     3029
============================================
- Hits          14430    14429       -1
  Misses         5445     5445
- Partials       1608     1609       +1

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


sin(x^2+y^2)=0.5 spatial-aliasing

in low resolution it is correct

in high resolution

this is a famous problem because of spatial-aliasing
https://www.zhihu.com/question/624348562

Here is a rendering of the graph with the maximum antialiasing setting (25x25), which almost eliminates the aliasing effect:


Write Project Description in Documentation

Write a description for the AGenC project in the documentation

I think this can be closed since the project description section looks complete.


Example doesn't run on Android 7.0 (power 2)

Gradle task 'assembleDebug'...
AGPBI: {"kind":"error","text":"Invoke-customs are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Invoke-customs are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Invoke-customs are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"error","text":"Default interface methods are only supported starting with Android N (--min-api 24): void com.google.android.exoplayer2.Player$EventListener.onLoadingChanged(boolean)","sources":[{}],"tool":"D8"}
Finished with error: Gradle task assembleDebug failed with exit code 1

@willvlad updated the example. Try rebuilding with the newer source. 😊


fix scale of the css on readme.md

15 is too big scale 😝

Thanks for reporting. This was a bug from perfectionist which is apart of the tachyons-cli. Should be fixed now.

👌


Valkyrie: Collection Metadata issues on existing collections

Summary
DEV NOTE: Adding properties are done via yaml files now. You will not need to adjust models. Ping a dev on Team V for guidance.
This ticket tracks issues with existing collections as they appear post-Valkyrie and version 6.

[ ] Collections now require a Rights statement, and we can't have this be a required field for collections. We do need it to remain required for works, as we've had it established in production up to this point, but it can't apply to collections because in most cases we have collections with multiple rights statuses. Post-upgrade collection pages require copyright to be selected. Prior to the Valkyrie sprint, we only required Title on collections. The way we use collections to group periodical issues that span pre and post public domain makes it impossible to apply a single copyright statement to most of the collections in our repository, so we need the ability to make that field NOT required in collections, even though we have it required on work types (and I know we can modify this via dashboard settings).

[ ]  It looks like a metadata field from previous versions of Hyku has not made it into version 6 collections. This is the "Department, School, or Faculty" field. We used this field in most of our collections in Hyku, and we do not want to lose this metadata when we upgrade to version 6. Can you map this field in our existing version 5 collections to the newly added Source field that is available in version 6 collections? The Source field wasn't present in collections before so I don't expect any issues if we map to Source.

Acceptance Criteria

[x] Rights statement should not be a required field for Collections
[x] Add Department, School or Faculty property to Collection

[ ]  ~map this field in our existing version 5 collections to the newly added Source field that is available in version 6 collections~
[x]  We mapped it to the department field (like prod does) otherwise converting the works would be at risk of losing data

[x] In general, the Collection form's metadata and required fields should match what is seen in Prod

Screenshots or Video
Staging (rights statement should not be required)

Department, School, or Faculty field
Example of a production collection that uses that field:
https://adl.b2.adventistdigitallibrary.org/collections/0ed83a24-3553-48bf-8216-eca875cbc48b?

Screenshot of Source field in version 6 post-Valkyrie staging collection:
https://adl.s2.adventistdigitallibrary.org/dashboard/collections/9c5feb14-7c90-499f-aa4e-ea5cf40baf2d

Testing Instructions
TBD
Notes

Config file: config/metadata/collection_resource.yaml

QA RESULTS: ✅ PASS
tested on STAGING

[x] new collection only matched feature parity with production
[x] new collection form does not require rights statement

PROD
Required fields:

STAGING
Required fields:

TODO:
make sure collection_resource.yaml contains all of these metadata properties:
["aark_id", "abstract", "access_control_id", "access_right", "alt", "alternative_title", "altlabel", "based_near", "bibliographic_citation", "collection_type_gid", "contributor", "creator", "date", "date_accepted", "date_available", "date_created", "date_issued", "date_modified", "date_published", "date_submitted", "date_uploaded", "department", "depositor", "description", "doi", "former_identifier", "funder", "head", "identifier", "import_url", "issue_number", "keyword", "label", "language", "language_code", "lat", "license", "location", "long", "managing_organisation", "note", "official_url", "orcid", "output_of", "output_of_resource_ids", "pagination", "part_of", "place_of_publication", "preflabel", "publication_status", "publisher", "rdfs_label", "refereed", "related_url", "relative_path", "remote_url", "representative_id", "resource_type", "rights_description", "rights_holder", "rights_notes", "rights_statement", "slug", "slug_for_upgrade", "source", "subject", "tail", "thumbnail_id", "title", "volume_number"]
We need to for sure at least add department and map the label name to "Department, Faculty, School".

Acceptance Criteria

[ ] Rights statement should not be a required field for Collections

[ ] Add Department, School or Faculty property to Collection

[ ] map this field in our existing version 5 collections to the newly added Source field that is available in version 6 collections

[ ] In general, the Collection form's metadata and required fields should match what is seen in Prod

NOTE: all fields on prod appear in staging with the addition of the following fields:

Orcid
Peer reviewed?
Remote URL
Rights Holder
Rights description
Preflabel
Altlabel
Volume
Access Rights
Alternative Title
Arkivo checksum
Bibliographic citation
Label
Rights notes
Rights statement
Source
Owner
On behalf of
State
Depositor

I created a new collection and tested the metadata. https://adl.s2.adventistdigitallibrary.org/collections/851b4393-f9d1-4fa1-b1d9-31bf589c8fff?locale=en
I filled in a few fields that did not display on the public view after I saved:

Rights Statement (with dropdown options)
Source

Then I tried to fill in ever field to test all appearances, and I got an error message. I reopened the edit screen, tried to save again, and the error message repeated.

Now the backend shows metadata in all the fields just as I entered it, but only the ones I filled the first time are showing on the public side, minus the two that never showed the first time (Rights Statement & Source).

Staging logs/error from Katharine's comment:
2024-09-25T22:39:58.658842776Z Error: ERROR: [doc=851b4393-f9d1-4fa1-b1d9-31bf589c8fff] Error adding field 'issue_number_isim'='Issue' msg=For input string: "Issue"
this may be related to #822

blocked until #822 is resolved

Metadata spreadsheet link… https://docs.google.com/spreadsheets/d/1Xc-QRpCEw0vNwcK6yxvBlTR6uEH-xrPWxTatRWCJ070/edit?usp=sharing
I went through all of the create forms to identify what I was seeing in my development environment, alphabetized them by their form label text, and added their attribute since some weren’t clear by the label. For each one, I then marked what shows in the prod environment create forms (I did not document what is on the show page). Hopefully this spreadsheet gives you the information you need to make the decisions on what you want on the forms and show pages. Please review it and let me know what you want changed.
Based on what I found, I did some minimal cleanup to try to bring things back to being in synch (such as moving the dates back to only allowing single dates). I can’t say which ones you will want to be on your forms, or showing on the show pages. Some of the terms may have been hidden before, and some are totally new due to the Hyrax updates.
Additionally, keep in mind that if you don’t add a metadata item to a work, it won’t appear on the show page. So there is no need to remove items that are removed from the form unless you think they could come in via bulkrax imports and you don't want them showing.

QA PASS
I was able to create and edit a collection (without based_near)

I created a new collection, and the metadata fields show as expected.
https://testing.s2.adventistdigitallibrary.org/collections/1341148d-5ec5-49d0-a6ad-4d64c3cd2bd9?locale=en


add multiple addons on a single subscription

I'm trying to add multiple add ons on a single subscription call.
...
subscription_add_ons:
      {
        subscription_add_on: {
          add_on_code: 'silver',
          quantity: 3
        },
        subscription_add_on: {
          add_on_code: 'gold',
          quantity: 5
        }
      }
...

but only the second add_on is getting added.
"subscription_add_ons": {
          "$": {
            "type": "array"
          },
          "subscription_add_on": {
            "add_on_code": "gold",
            "unit_amount_in_cents": {
              "_": "2900",
              "$": {
                "type": "integer"
              }
            },
            "quantity": {
              "_": "5",
              "$": {
                "type": "integer"
              }
            }
          }
        },

any idea why only the second one is getting created? I might be missing something very basic.

You have to make it an array item with an object.
subscription_add_ons: {
      subscription_add_on: [
       {
          add_on_code: 'silver',
          quantity: 3
        },
        {
          add_on_code: 'silver',
          quantity: 3
        }
      ],
    }

Pay attention to how the XML is being sent to Recurly (turn debugging to true). You can then compare it to what Recurly needs from their docs.

Also, it isn't logical at all. So there's that. I had the same issue.

Huh. That works. Thanks!
And, yeah, I forgot about debug mode so thank you for that, too.

👍


Part 4 Section III - NAND Backups Can't see "emuNAND_original.bin"

I can't seem to find this "emuNAND_original.bin", All I have is NAND_emu.bin, emuNAND.bin. and NAND.bin, same for the SysNAND? did I miss any steps?

At emuNAND.bin press left or right until you find it


SetFieldMapper does not work on objects accessed from JavaScript

SetFieldMapper works fine on objects that I set directly in Runtime.Set. However, if I access any other object from within JavaScript the field mapper does not get called. This includes properties of objects that are themselves objects as well as objects returned from calling Go functions within JavaScript.

Sorry, looks this was my fault, a mixup deep inside some complex JavaScript code between Go struct and Go map. The former uses the FieldMapper, the latter of course doesn't.


ios background scan

Hi all,
is possible to scan the beacon in background and when the phone is lock?
I try with the guide but when the app is in background and when is Locke the scan doesn't work.
Many thanks

news about that?

same here


feat: replace markdown misspell with typos check in ci workflow

What type of PR is this?

Uncomment only one /kind <> line, hit enter to put that in a new line, and remove leading whitespace from that line:
/kind bug
/kind documentation
/kind enhancement
/kind good-first-issue
/kind feature
/kind question
/kind design
/sig ai
/sig iot
/sig network
/sig storage

/kind feature
What this PR does / why we need it:
It seems that markdown misspell check plugin is deprecated, so we use typos check instead.
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer:

Does this PR introduce a user-facing change?

other Note

/LGTM