text:
XSS vulnerability: serialization of props, exposed on the client

As we discussed a few days ago, there is an issue with serialization of props, exposed on the client. Since these props may contain user's input and they will be exposed as javascript variable in the browser, we must escape it to prevent harmful script injection.
Here is the lib that I'm using in Node environment to serialize javascript before it will be exposed on the client: https://github.com/yahoo/serialize-javascript/
We should implement escaping of JS the same way, but on the Ruby side.
/cc: @justin808 @samnang

Let's get to this by the weekend, @alexfedoseev, @samnang.

@alexfedoseev let's have some discussion on monday when you get up.

@samnang :+1:

This is probably NOT an issue for the following reason:
We use Rails to_json which does the encoding.
https://github.com/rails/rails/blob/master/activesupport/lib/active_support/json/encoding.rb#L51-51
private
          # Rails does more escaping than the JSON gem natively does (we
          # escape \u2028 and \u2029 and optionally >, <, & to work around
          # certain browser problems).
          ESCAPED_CHARS = {
            "\u2028" => '\u2028',
            "\u2029" => '\u2029',
            '>'      => '\u003e',
            '<'      => '\u003c',
            '&'      => '\u0026',
            }

          ESCAPE_REGEX_WITH_HTML_ENTITIES = /[\u2028\u2029><&]/u
          ESCAPE_REGEX_WITHOUT_HTML_ENTITIES = /[\u2028\u2029]/u

          # This class wraps all the strings we see and does the extra escaping
          class EscapedString < String #:nodoc:
            def to_json(*)
              if Encoding.escape_html_entities_in_json
                super.gsub ESCAPE_REGEX_WITH_HTML_ENTITIES, ESCAPED_CHARS
              else
                super.gsub ESCAPE_REGEX_WITHOUT_HTML_ENTITIES, ESCAPED_CHARS
              end
            end

            def to_s
              self
            end
          end

HOWEVER, we do support passing a string as a param of the JSON.

Would a rails user convert an object to JSON without using the rails way?
Should we require the passing of a string to pass an extra param saying that it's escaped.

I'm researching this a bit more.
The big hazard is that somebody will use JSON.generate (Ruby stdlib) rather than Rails to_json.

I just pushed https://github.com/shakacode/react-webpack-rails-tutorial/pull/108, which shows how jBuilder will create the JSON string.
This is a sample result. Note how symbols like < are encoded.
//<![CDATA[
(function() {
  window.__appData0__ = [{"id":63,"author":"aaa","text":"dddd","created_at":"2015-09-21T22:44:33.602Z","updated_at":"2015-09-21T22:44:33.602Z"},{"id":64,"author":"afaaf","text":"ffffff","created_at":"2015-09-27T18:20:20.713Z","updated_at":"2015-09-27T18:20:20.713Z"},{"id":65,"author":"afaaf","text":"**afafafa**","created_at":"2015-09-27T18:20:29.251Z","updated_at":"2015-09-27T18:20:29.251Z"},{"id":66,"author":"Justin","text":"\u003c/script\u003e\u003cscript\u003ealert(\"WTF\");\u003c/script\u003e","created_at":"2015-10-04T22:53:12.373Z","updated_at":"2015-10-04T22:53:12.373Z"},{"id":67,"author":"JG","text":"' some \" \" ' etc.","created_at":"2015-10-04T23:09:51.375Z","updated_at":"2015-10-04T23:09:51.375Z"},{"id":68,"author":"aaa","text":"dddd","created_at":"2015-10-05T01:49:23.188Z","updated_at":"2015-10-05T01:49:23.188Z"},{"id":69,"author":"ddd","text":"xxxxxxx","created_at":"2015-10-05T01:50:03.228Z","updated_at":"2015-10-05T01:50:03.228Z"},{"id":70,"author":"ddd","text":"cccccccc","created_at":"2015-10-05T01:50:22.336Z","updated_at":"2015-10-05T01:50:22.336Z"},{"id":71,"author":"addddd","text":"aaaa","created_at":"2015-10-05T01:59:15.763Z","updated_at":"2015-10-05T01:59:15.763Z"}];
  ReactOnRails.clientRenderReactComponent({
    componentName: 'App',
    domId: 'App-react-component-0',
    propsVarName: '__appData0__',
    props: window.__appData0__,
    trace: true,
    generatorFunction: true,
    expectTurboLinks: true
  });
})();

//]]>

So the question is whether or not we should check the String (not Hash) to see if there might be some non-escaped characters. Maybe we should always escape unless an option is set? That seems like a reasonable solution, as we could put the option in the global configuration file for a default.
Maybe the option could be:
escape_javascript: true
Or we can always run this escape:
          ESCAPED_CHARS = {
            "\u2028" => '\u2028',
            "\u2029" => '\u2029',
            '>'      => '\u003e',
            '<'      => '\u003c',
            '&'      => '\u0026',
            }

          ESCAPE_REGEX_WITH_HTML_ENTITIES = /[\u2028\u2029><&]/u

          json_string.gsub(ESCAPE_REGEX_WITH_HTML_ENTITIES, ESCAPED_CHARS)

I'm just against doing this every time unless we can turn this off.
As I mentioned, somebody would have to be using a method like JSON.generate to get non-escaped JSON. Jbuilder, rails to_json all escape. Rails tries to keep everybody safe!

Example of safe and non-safe json conversion
[24] (pry) main: 0> aa
{
        :hello => "world",
         :free => "of charge",
      "script" => "<script>alert(\"yo\");</script>",
    "<script>" => "<script>alert(\"yo\");</script>"
}
[25] (pry) main: 0> non_safe = JSON.generate(aa)
"{\"hello\":\"world\",\"free\":\"of charge\",\"script\":\"<script>alert(\\\"yo\\\");</script>\",\"<script>\":\"<script>alert(\\\"yo\\\");</script>\"}"

[27] (pry) main: 0> safe = aa.to_json
"{\"hello\":\"world\",\"free\":\"of charge\",\"script\":\"\\u003cscript\\u003ealert(\\\"yo\\\");\\u003c/script\\u003e\",\"\\u003cscript\\u003e\":\"\\u003cscript\\u003ealert(\\\"yo\\\");\\u003c/script\\u003e\"}"

My vote is for "always escape", this way we won't let the user shoot in his leg (and I don't see a reason why it might be turned off).

@alexfedoseev My only concern is that it might be a slight performance disadvantage if sending over lots of data, and the developer is using the rails ways of creating the JSON strings.
Do you agree on the escaping rules I posted?

Yep. Well in this case we can:

set escape_javascript: true by default
in docs for this setting explain the differences between JSON methods and put a warning: don't turn this off unless you know what you're doing.

I still feel having an option on and off performance is early optimization for me. I vote for "always scape" and use Rails ActiveSupport::JSON::encode, so that we will take advantage from latest Rails security concern when they found something and they fix it.

@mapreal19 Maybe you can take a crack at this? Let's consider @samnang's suggestion on the encoding. We'll put off making this optional until needed.
@samnang is this the method that we need:
https://github.com/rails/activesupport-json_encoder/blob/master/lib/active_support/json/encoding/active_support_encoder.rb#L76
It seems to do more than Rails is doing by default for to_json. Maybe a good thing?

@justin808 why don't we just use their public interface method https://github.com/rails/rails/blob/master/activesupport/lib/active_support/json/encoding.rb#L19 instead of re-implementing their idea, so we don't need to care when they fix new security problem in future?

Wow -- just found this article:
http://openwall.com/lists/oss-security/2015/06/16/17
Let's do this!
@andreasklinger, @korbin, @lfittl, You might not be affected by this in react-rails as it's using a data prop for browser side data. Hope you guys try out react_on_rails soon! Let's combine efforts!

@justin808 it's a great benefit when we just using Rails api, so they will found Vulnerability quickly and fix them quickly as well.

@samnang Sounds good.

@samnang Let's you or I do this one on our next pairing session, between us or with some other community member.

@justin808 sound good.

FWIW, this does not work:
  def sanitized_props_string(props)
    props_string = props.is_a?(String) ? props : props.to_json
    ActiveSupport::JSON.encode(props_string)
  end

window.__helloWorldData0__ = "{\"helloWorldData\":{\"name\":\"Mr. Server Side Rendering\"}}";

because it escapes the quotes

@justin808 @alexfedoseev  I found the method that does exactly this job when param is string. It's json_escape

See #59 -- that fixes this one.

Related issue: https://github.com/rails/rails/issues/15364

authors: alexfedoseev justin808 samnang


text:
New Feature: Enable multiple registrations

One of the most important features of React are components, that mean you can create isolated SPA ( Single Page Application), that means you could have one big component, but most of the time you have several React components.
One problem I found is related to the fact that the register could be loaded one time, via ComponentRegistry. The latest register overwrites the previous one.
Ideally, you must be able to use the same register across different React components.

@enzolutions If you register multiple times, newer registrations overwrite older ones. You can run register as many times as you like.
What is the exact issue that you're seeing?

Hi @justin808
Thanks for you answer. As you said, newer registration overwrite older.
When I try to access those components, I got the following error
Could not find component registered with name notificationsProject. Registered component names include [ modelNewProject ]. Maybe you forgot to register the component?

The component notificationsProject was registered first, and then the modelNewProject registration overwrite the array.
My proposal is have something like a global array associated with window object and any new register call append the component(s).
Let me know if makes sense.

You must be loading a new page and the registrations are not running.
The registrations are stored on the global window object.

What I am doing is using webpack to create two SPA and loaded both in the same page, maybe that cause what you said.
Any ideas?

@enzolutions Do you mean that you're using two separate webpack bundles on the same page? And you have ReactOnRails in both bundles?
That would cause the error you're seeing, because the second ReactOnRails global object would overwrite the first. You should try putting ReactOnRails in a shared vendor-bundle.

@jtibbertsma
You are correct that is exactly what is happening, but the whole idea of use react is exactly to do that to have separate elements if is necessary, I am wrong?

You're right, but you don't want to bundle libraries twice. You'll be sending the same data across the wire twice. It's redundant.

@jtibbertsma Do you have any recommendation to avoid that?

If I understand correctly, you've got two separate webpack bundles with separate configuration files that you're loading on the same page. Instead, you probably want one webpack config file with two entry points.

source: gharchive/issue

authors: enzolutions jtibbertsma justin808

license: MIT

license_type: permissive

license_source: github-api


text:
🛑 Shakedown Social - Uploads is down

In 30b8ea9, Shakedown Social - Uploads (https://files.shakedown.social/accounts/avatars/109/357/389/718/265/462/original/dd80d2c95e48cfd2.jpeg) was down:

HTTP code: 403
Response time: 290 ms

Resolved: Shakedown Social - Uploads is back up in 85f2088.

repo: shakedown-social/upptime


text:
🛑 Shakedown Social - Uploads is down

In 9e5a71c, Shakedown Social - Uploads (https://files.shakedown.social/accounts/avatars/109/357/389/718/265/462/original/dd80d2c95e48cfd2.jpeg) was down:

HTTP code: 403
Response time: 617 ms

Resolved: Shakedown Social - Uploads is back up in cf2b97c.


text:
python version

На более новых версиях пайтона работает?

Попробуй. Но рекомендуется скачать и установить: Python 3.10.9

repo: shamhi/HamsterKombatBot


text:
Sync page not found

me too

authors: lcsvcn xaduan

repo: shanalikhan/code-settings-sync


text:
140% CPU usage on Apple M2 Max

Type: Bug
Opening the vscodium with enabled Settings Sync extension eats shows 140% CPU usage on M2 Max processor. It leads to enormous energy usage, drawning the battery in about 1 hour
Extension version: 3.4.3
VSCodium version: VSCodium 1.92.2 (21b1e2955ddda36eeba3a94e643128e465285b93, 2024-08-15T18:23:49.317Z)
OS version: Darwin arm64 23.5.0
Modes:

System Info

Item
Value

CPUs
Apple M2 Max (12 x 2400)

GPU Status
2d_canvas: enabledcanvas_oop_rasterization: enabled_ondirect_rendering_display_compositor: disabled_off_okgpu_compositing: enabledmultiple_raster_threads: enabled_onopengl: enabled_onrasterization: enabledraw_draw: disabled_off_okskia_graphite: disabled_offvideo_decode: enabledvideo_encode: enabledwebgl: enabledwebgl2: enabledwebgpu: enabledwebnn: disabled_off

Load (avg)
20, 22, 24

Memory (System)
32.00GB (0.40GB free)

Process Argv

Screen Reader
no

VM
0%

Same case on M1 pro， nearly 330% of CPU useage and drop to 15% after I disabled this extension :(


text:
Gmail header

So I have a question
about MMM-GmailFeed
So under Gmail header I have
GMAIL-INBOX FOR myemail@gmail.com-14
Is there a way I can have just
GMAIL-INBOX-14
That would be awesome if I could
Ray

fixed with #9

repo: shaneapowell/MMM-GmailFeed


text:
deerpipe不能获取用户群昵称

如图，deerpipe插件无法准确获取用户昵称

可是官方机器人他就是不能

本插件也不支持官方bot啊……

最新版本的排行榜支持
用户昵称可以通过 callme 插件自定义昵称
在未指定 callme 插件的名称的时候，默认使用 适配器的username，或者userid

authors: MOZac-hash shangxueink

repo: shangxueink/koishi-shangxue-apps


text:
Update zio, zio-test, zio-test-sbt to 1.0.6

Updates

dev.zio:zio
dev.zio:zio-test
dev.zio:zio-test-sbt

from 1.0.0-RC17 to 1.0.6.
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!

Applied Migrations

github:zio/zio/CurriedAssert?sha=v1.0.0-RC18

Files still referring to the old version number
The following files still refer to the old version number (1.0.0-RC17).
You might want to review and update them manually.
project/Dependencies.scala

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "dev.zio" } ]

labels: library-update, semver-pre-release, scalafix-migrations, old-version-remains

Superseded by #111.

source: gharchive/pull-request

repo: shankarshastri/scala-proj-template


text:
Request: throw errors or add warnings when operations are attempted with 3D geometry

There have been a few people that have been confused about this:
https://github.com/Toblerity/Shapely/issues/613
https://github.com/Toblerity/Shapely/issues/554
https://github.com/Toblerity/Shapely/issues/388
https://stackoverflow.com/questions/40076962/shapely-is-valid-for-polygons-in-3d
https://stackoverflow.com/questions/47359985/shapely-intersection-point-between-line-and-polygon-in-3d
I was also confused about 3D support - you can construct and operate on 3D objects in shapely, but the results aren't what you would expect.
Is it worth adding a warning?
Warning: shapely operations only work with 2D geometries. You will have unexpected results working in 3D.
Or throw a type error when any of the operations that fail with 3D are attempted? I'd rather have it fail completely than return incorrect results. Documentation has been mentioned, but I think an outright failure would be better.

@chrisranderson I appreciate the suggestion, thank you.
Raising an exception when a 3D object is operated on would be a hugely breaking change for shapely. I'm not even sure there will ever be a shapely 2.0, so I can't consider that right now.
Warnings would be less breaking, but I suspect most Shapely users are going to be 👎 on them. This particular warning, if added, will suddenly appear thousands or millions of times in some applications.
It's possible to add such a warning and install a filter that ignores them by default. Python already does this for a few warnings: https://docs.python.org/3/library/warnings.html#default-warning-filter. You'd have to turn on the 3D warning, which seems like a fair compromise.
@snorfalorpagus what do you think about this idea? I myself don't have the time to implement it before 1.7 and would prefer to spend my time improving documentation. "Manipulation and analysis of geometric objects in the Cartesian plane" is literally the description of this project, but maybe we can do better. That said, I wouldn't be opposed to a PR that warned from the predicate (https://github.com/Toblerity/Shapely/blob/master/shapely/predicates.py) and topology wrappers if it was well tested and had benchmarks that showed very little impact on performance.

I don't like warnings in Python much. They aren't used very frequently and when they are I can never remember the syntax for working with the warnings module and always have to go back to the documentation.
If the warning was added but filtered by default I don't think it would be seen by the users that stumble on this; how would they know to enable it?
I don't have a better solution to this other than making the warning more prominent in the documentation. To some extent I am willing to say that Shapely is (mostly) a wrapper for GEOS, which does not itself raise a warning to the user (nor does PostGIS, the most prominent user of GEOS).

did you find an implementation somewhere which can handle a 3D LineString and a distance to a 3D point?

did you find an implementation somewhere which can handle a 3D LineString and a distance to a 3D point?

Any update?

Note: I deleted a couple of off-topic comments. The current state of things is that shapely algorithms are fundamentally 2D. The computed distance between two points does not involve any third coordinate (Z values). A third coordinate value is mostly a passenger when it comes to operations, although some do interpolate Z values.

authors: chrisranderson lyh458 nyxaria sgillies snorfalorpagus

repo: shapely/shapely


text:
implement extension API

Example taken from the SuperPack specification:
SuperPackTranscoder.extend(
  // extension point: 0 through 127
  0,
  // detect values which require this custom serialisation
  x => x instanceof RegExp,
  // serialiser: return an intermediate value which will be encoded instead
  r => [r.pattern, r.flags],
  // deserialiser: from the intermediate value, reconstruct the original value
  ([pattern, flags]) => RegExp(pattern, flags),
);

We will probably want an OO-ish interface to allow this.

Another example for transcoding TypedArrays:
SuperPackTranscoder.extend(
  // extension point: 0 through 127
  0,
  // detect values which require this custom serialisation
  ArrayBuffer.isView,
  // serialiser: return an intermediate value which will be encoded instead
  a => [a[Symbol.toStringTag], a.buffer],
  // deserialiser: from the intermediate value, reconstruct the original value
  ([ctor, buffer]) => new self[ctor](buffer),
);

Warning: This is not a safe implementation for untrusted inputs.

repo: shapesecurity/superpack-js

license_source: bigquery


text:
feat: ratelimits on market service adapters

this implements rate limits for coingecko and coincap market service adapters
closes #367

@amitojsingh366 as we chatted about before 1:1, and yesterday as specifically related to this PR, please take the time to slow down and not rush with your PRs. more 🐢 less 🐇
in your most recent commit i can see that you haven't run the tests locally as they're failing in CI, after discussing with gomes recently.
with respect to tests, please add a new unit test for the new rate limiting util. if we have tests and confidence the rate limiting works, the market service unit tests should be specific to testing market service functionality, not the integration of the rate limiting and the market service at the same time.
we have three market service adapters, coingecko, coincap, and yearn. how does this address yearn?
before resubmitting this PR for review, please

read the docs and implement the rate limiting correctly for coingecko
look at the precedence the args take for the rate limiting library, and make any required changes accordingly
implement unit tests specific to the rate limiting functionality you've added
ensure that the unit tests are not slowed down in real time testing rate limiting, you will need to investigate mocking timers if necessary.
explain the rationale as to why yearn is not included in this PR

as discussed, 2/3 of my requested changes have not been addressed.
this

slows down the unit tests - you will need to mock timers, and
does not address why yearn has not been included.

additionally the rate limiting logic, including variable naming, is confusing at first glance, and without looking closely, seems wrong.
please leave the PR in draft until these are fully addressed and the logic is clear, or close the PR and stop working on the bounty if you don't wish to proceed.

ok so there's a discovery I made while implementing ratelimiting for the yearn adapter. the yearn api endpoints we use do NOT have ratelimits, and so for this reason I have set the maximum requests per second to 500 requests per minute which should be hard to trigger and should also be good for yearn servers.
here's how I found out yearn api has no ratelimits:

found out the api endpoints that we use, they are listed below:

https://cache.yearn.finance/v1/chains/1/vaults/get
https://cache.yearn.finance/v1/chains/1/ironbank/tokens
https://cache.yearn.finance/v1/chains/1/tokens/supported
https://cache.yearn.finance/v1/chains/1/vaults/tokens

spammed 2 out of these 4 endpoints to see if I get rate limited (only 2 due to time constraints, script I used to spam and results are attached below)

script used:

index.js.txt (was not able to upload .js file so I added .txt at the end)

https://cache.yearn.finance/v1/chains/1/ironbank/tokens:

ironbank-tokens.txt (was not able to upload .json file so I added .txt at the end)

https://cache.yearn.finance/v1/chains/1/vaults/tokens

vaults-tokens.json.txt (was not able to upload .json file so I added .txt at the end)

@0xdef1cafe

[x] slows down the unit tests - you will need to mock timers: I removed timers as a whole
[x] does not address why yearn has not been included: Added yearn adapter support, but yearn api does not have rate limits

time spent working: 6+ hours

hi @amitojsingh366 - i just approved the CI run and your tests still fail. i also took the time to check locally, and they fail there too.
after the extensive detailed guidance i've given here, the multiple attempts from your side, and time i've spent explaining implementation details and reviewing this PR, i'm going to close it.
thank you for the attempted contribution but we can't accept this.

hi @amitojsingh366 - i just approved the CI run and your tests still fail. i also took the time to check locally, and they fail there too.
after the extensive detailed guidance i've given here, the multiple attempts from your side, and time i've spent explaining implementation details and reviewing this PR, i'm going to close it.
thank you for the attempted contribution but we can't accept this.

the tests pass on my laptop ☹

repo: shapeshift/lib


text:
wip: move from reacty-y to lazy savers withdraw input step

Description

Pull Request Type

[ ] :bug: Bug fix (Non-breaking Change: Fixes an issue)
[ ] :hammer_and_wrench: Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
[ ] :nail_care: New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

closes https://github.com/shapeshift/web/issues/5265
Risk

Testing

Engineering

Operations

Screenshots (if applicable)

Current dependencies on/for this PR:

develop

PR #5272   👈

This comment was auto-generated by Graphite.

repo: shapeshift/web


text:
feat: thorchain LP halted pool tag

Description

Pull Request Type

[ ] :bug: Bug fix (Non-breaking Change: Fixes an issue)
[ ] :hammer_and_wrench: Chore (Non-breaking Change: Doc updates, pkg upgrades, typos, etc..)
[ ] :nail_care: New Feature (Breaking/Non-breaking Change)

Issue (if applicable)

closes #
Risk

High Risk PRs Require 2 approvals

What protocols, transaction types or contract interactions might be affected by this PR?

Testing

Engineering

Operations

Screenshots (if applicable)

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

Current dependencies on/for this PR:

develop

PR #6138

PR #6139   👈

This stack of pull requests is managed by Graphite.


text:
By mocking orachestration registry to optimize spring orchestration tests.

Feature Request
For English only, other languages will not accept.
Please pay attention on issues you submitted, because we maybe need more details.
If no response more than 7 days and we cannot make decision by current information, we will close it.
By mocking orachestration registry to optimize spring orchestration tests
I Will use spi method to create registry for spring orchestration tests, therefore we can delete those artifact:
<dependency>
            <groupId>io.shardingsphere</groupId>
            <artifactId>sharding-orchestration-reg-zookeeper-curator</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
</dependency>

finished

authors: terrymanu tristaZero

repo: sharding-sphere/sharding-sphere


text:
服务治理 重新创建 sql执行引擎停止失败后 不能执行新任务 问题

个人小意见：线程池关闭应该平滑过渡
nginx 好像就是就有这一块设计

关于ExecutorEngine的close方法
建议先调用shutdown方法等待已经入队的任务执行完毕
然后调用awaitTermination方法等待一定时间
如果等待结束或出现异常调用shutdownNow
以上执行后还是没有关闭的抛出ShardingJdbcException
其中等待时间和是否调用shutdownNow建议增加配置交给使用者来决定

repo: shardingjdbc/sharding-jdbc


text:
Add docs on repos and init

Goal
Ensure documentation around initialising a repo

Added in 5d57c64

repo: sharingio/pair


text:
Missing is_professional Field in User Schema Prevents Updates via API

The is_professional field was absent from the user_update and user_response schemas, leading to a situation where attempts to update this field via the PUT /users/{user_id} endpoint were unsuccessful. This absence meant that even after users updated their profiles to reflect a professional status, the system did not recognize or save these changes, and the field remained false by default.

Fix:
The inclusion of the is_professional field in the relevant schemas ensures that user data related to professional status is correctly handled and updated in the database.
Add is_professional to UserBase Schema: Ensured that the field is included in the base user schema so that it can be utilized across different functionalities, including updates and responses.
Update UserUpdate Schema: Included the is_professional field to capture any changes submitted via the update endpoint.
Update UserResponse Schema: Ensured that any changes to the is_professional status are accurately reflected in the API responses post-update.


text:
First example in the README breaks

On 0.4, this example breaks:
a = rand(BlockPartition(4000, 4000), 10^4, 10^4)
ERROR: UndefVarError: BlockPartition not defined

Did you do using ComputeFramework?

authors: ViralBShah shashi

license: mit


text:
Only refresh primary key when a sequence is attached

This is for when a column is smallint, bigint, int. Then, we only do a +1 on the PK during swap for those column types. For other column types, there won't be any sequence, so we can rely on this check accordingly
Follow on from: https://github.com/shayonj/pg-osc/pull/72
Closes: https://github.com/shayonj/pg-osc/issues/71

@jfrost

repo: shayonj/pg-osc


text:
🛑 North CTopUp is down

In b9bc45b, North CTopUp (https://north.speedpayplus.com:50506/) was down:

HTTP code: 0
Response time: 0 ms

Resolved: North CTopUp is back up in 81d4c3e.


text:
docs: add link to wiki page

Pretty trivial change, just wanted to see what @ariporad thinks of it. It gives a shoutout to the two most popular projects in the wiki.

@ariporad I rebased this. I changed the wording a little bit. I also removed the docs for the make command, and moved these to the wiki (and a link is provided). The rationale behind this is that I want less junk in the way of the command reference, which is probably the most important part of the README.

LGTM!

authors: ariporad nfischer

repo: shelljs/shelljs


text:
fix: resolve a cylcic-dependency problem

If a plugin was imported before the ShellJS instance was created, the user's script would crash (common.register wouldn't be instantiated yet). Now plugins can be imported either before or after the ShellJS instance is created.
One really cool consequence of this fix is that now plugins are compatible with the shelljs/global script:
require('shelljs-plugin-open');
require('shelljs/global');

open('file.txt'); // it works!

Another cool consequence is that this would allow me to rewrite shelljs-exec-proxy as a ShellJS plugin, which would let it play nicely with other plugins (such as shelljs-plugin-open).

Also, this should have no influence whatsoever on ShellJS when used normally, but would only help make plugins a bit easier :smile:

@ariporad A plugin would require('src/common') (or whatever file we eventually move the plugin utils into) in order to register its own commands (using common.register()).
If the plugin is included before the ShellJS instance is created (require('shelljs-plugin-open') precedes require('shelljs')), then src/common.js is require()ed before shell.js. This is where the problems arise. src/common.js includes shell.js, so if shell.js hasn't yet been require()ed, Node goes and loads in shell.js. This tries to load src/common.js, but since we were in the middle of loading src/common.js, this returns common = {} (the empty object). Then, when shell.js loads in the built-in commands, it tries to common.register() them, but fails. This is because common is still {}, and doesn't have the .register attribute yet (and it won't until the initial require() completes). In essence, common.register() is used before it gets defined.
The problem didn't arise for normal ShellJS use because shell.js is require()ed first, so it is able to load in src/common.js completely before continuing to load each command (so common.register() is defined before it is used).
The solution here is to check if common.register() is defined as soon as shell.js is loaded for the first time. If common.register is not yet defined, invalidating the require-cache will force Node to load all of src/common.js (making sure that common.register() gets defined before it's used).
Hopefully that's a good explanation. I had to draw out dependency graphs to discover what the problem was and how to solve it. From what I've seen, however, it seems to work. I'll update the plugin after this is merged as a proof of concept.

Ahh... That makes sense. Thanks!

Yeah, it's a bit non-intuitive, but hopefully that was a clear enough explanation for all looking into the matter in the future.


text:
Calendar week translation

I Have tested your new release, works like a charm.
As everything else is translated and "calendard week" isn`t. Is it a bug or just a missing translation?

What?
There is no calendar week function in pihole... u on the right repo, buddy?

This one was meant for your worldclock repo ;)

authors: Vipale shells-dw

repo: shells-dw/loupedeck-pihole


text:
Glitch in the select box

I have some glitch in the select box?!

You are overriding the default style somehow. Check out what is happening via chrome developer tools.

@ivanradojevic-web-dev Please reopen issue with reproduction link.

authors: Zyberg akki-jat ivanradojevic-web-dev

repo: shentao/vue-multiselect


text:
README Usage is incomplete

After several hours playing with this gem, I finally got it to work by copying JUnitReporter.js to my spec tree and using absolute paths in my jasmine.yml and JUnitReporter.boot.js. JUnitReporter.boot.js.erb doesn't work at all.
Clearly, this isn't how it's supposed to work, but I don't know where jasmine_rails is looking for reporter files, or how my JUnitReporter.boot.js is supposed to find JUnitReporter.js from the gem. Can you please upgrade the readme to explain where custom reporter files are expected to be, and how to get erb interpreted during rake spec:javascripts?

To verify, you did follow the steps under "Add this to your jasmine.yml", correct?

Yes. I added those four lines to the bottom of a stock jasmine.yml generated by the jasmine_rails gem in spec/javascripts/support. I also created JUnitReporter.boot.js in the same directory, copied from the README except I changed the output directory to "spec/reports", and ran the specs with the REPORTERS environment variable set as described, but junit is ignored.

Here's my jasmine.yml from the only time I've been able to get JUnitReporter to run:
# path to parent directory of src_files
# relative path from Rails.root
# defaults to app/assets/javascripts
src_dir: "app/assets/javascripts"

# path to additional directory of source file that are not part of assets pipeline and need to be included
# relative path from Rails.root
# defaults to []
# include_dir:
#   - ../mobile_app/public/js

# path to parent directory of css_files
# relative path from Rails.root
# defaults to app/assets/stylesheets
css_dir: "app/assets/stylesheets"

# list of file expressions to include as source files
# relative path from src_dir
src_files:
  - "application.{js.coffee,js,coffee}"

# list of file expressions to include as css files
# relative path from css_dir
css_files:

# path to parent directory of spec_files
# relative path from Rails.root
#
# Alternatively accept an array of directory to include external spec files
# spec_dir:
#   - spec/javascripts
#   - ../engine/spec/javascripts
#
# defaults to spec/javascripts
spec_dir: spec/javascripts

# list of file expressions to include as helpers into spec runner
# relative path from spec_dir
helpers:
  - "helpers/**/*.{js.coffee,js,coffee}"

# list of file expressions to include as specs into spec runner
# relative path from spec_dir
spec_files:
  - "**/*[Ss]pec.{js.coffee,js,coffee}"

# path to directory of temporary files
# (spec runner and asset cache)
# defaults to tmp/jasmine
tmp_dir: "tmp/jasmine"

reporters:
  junit:
    - "/home/andrewh/development/hptizzle/hprizzle/spec/javascripts/support/JUnitReporter.js"
    - "/home/andrewh/development/hptizzle/hprizzle/spec/javascripts/support/JUnitReporter.boot.js"

where JUnitReporter.boot.js is
(function() {
  var reporter = new jasmine.JUnitReporter({
      outputDir: "spec/reports"
  });
    jasmine.getEnv().addReporter(reporter);
})();

and JUnitReporter.js is copied from the gem.
How is this supposed to work? Do I need to set up jasmine or some other path properly?

Got it working by putting JUnitReporter.boot.js in my helpers directory as defined in jasmine.yml, not sure why it wasn't working at all before.

not sure why it wasn't working at all before.

But it does seem to be working now? Do you think there is something to update in the README, or should this be closed?

I was also wondering myself this where to put the JUnitReporter.boot.js file. I ended up putting it where my application.js file is located. Can this also be placed under spec/javascript/helpers folder? If so then I think it would be nice if that was mentioned on readme :)

authors: adherr kazooiebombchu shepmaster

repo: shepmaster/jasmine-junitreporter-gem


text:
Change´ 'loc' references to 'pos' in chp03_oscillation/AttractionArrayWithOscillation

Code will not run without these changes. Appears to be an issue introduced with commit 4195df9d5774df4790b1d9d87cad934a82a59b50 "location is now position everywhere"

Thank you!

authors: orangepips shiffman

repo: shiffman/The-Nature-of-Code-Examples


text:
Problems with .Net 5 on Ubuntu 20.04

Hello Everyone,
i tried to use OpenCVSharp with .Net5 on Ubuntu 20.04 but i ran in some trouble (Unable to load shared library 'OpenCvSharpExtern' or one of its dependencies). I saw another issue with 20.04 here on github but that did not help me.
At this moment i'm not sure if the problems are related to my Ubuntu Installation or .Net 5 - maybe you could help me here.
Best Guthom

You need to build native wrapper OpenCvSharpExtern manually. Please follow https://github.com/shimat/opencvsharp#ubuntu-1804-1

Hi hez,
yeah you're right, worked like a charm after building everything from source - thank you very much.
Best Guthom

repo: shimat/opencvsharp


text:
Can't add controls to Toolbox

Can't Place controls into the toolbox
Environment
The project is WPF project and I'm using .NET Framework 4.6.1 (but I tried with 4.6 too).
What did you do when you faced the problem?
Right click under General tab -> Choose Items -> .NET Framework Components tab -> Browse, then selected the OpenCvSharp.UserInterface.dll file.
Output:
The following controls were successfully added to the toolbox but are not enabled in the active designer:

PictureBoxIpl
TrackbarWithLabel

Make sure the controls to add are compatible with the current designer and .NET Framework version.

hi I also recently had the same problem with visual studio 2019 and i tried to fix it but nothing worked. so what i did was i reinstalled visual studio 2017 and now it works perfectly
thanks,
Dasith


text:
C# implementation memory leak

Summary of your issue
I run a method periodically to process images and i have a memory leak.
Environment
windows 32 bit
What did you do when you faced the problem?
repetitive processing an image   after so many loops the program freezes due to memory leak.  disposing of all objects helps, but there is still a memory leak.  Method works fine until I run our of memory
Example code:
private void processImage(string inFName)
        {
            try
            {
                sketchImg = Cv2.ImRead(inFName, ImreadModes.AnyColor);
                bgImg = Cv2.ImRead(@"Bricks1.jpg");
                fgImg = Cv2.ImRead(@"Brushed Steel 2.jpg");
                if (sketchImg != null)
                {
                    Mat img = new Mat(sketchImg.Rows, sketchImg.Cols, MatType.CV_8UC1);
                    Cv2.CvtColor(sketchImg, img, ColorConversionCodes.BGR2GRAY);
                    Mat I = new Mat();
                    Cv2.Threshold(img, I, 50, 255, ThresholdTypes.BinaryInv);
                    //Cv2.Dilate(I, I, Cv2.GetStructuringElement(MorphShapes.Rect, new OpenCvSharp.Size(3, 3)));
                    OpenCvSharp.Point[][] contours;
                    HierarchyIndex[] hierarchyIndexes;
                    Cv2.FindContours(I, out contours, out hierarchyIndexes, RetrievalModes.CComp, ContourApproximationModes.ApproxSimple, null);

                    int mind = -1;
                    double marea = 0;
                    int i = 0;
                    while (i >= 0)
                    {
                        double area = Cv2.ContourArea(contours[i]);
                        if (area > marea)
                        {
                            marea = area;
                            mind = i;
                        }
                        i = hierarchyIndexes[i].Next;
                    }

                    if (mind != -1)
                    {
                        Mat mask1 = new Mat(img.Rows, img.Cols, sketchImg.Type());
                        mask1.SetTo(new Scalar(0, 0, 0));
                        Mat mask2 = new Mat(img.Rows, img.Cols, sketchImg.Type());
                        mask2.SetTo(new Scalar(0, 0, 0));
                        var contour = contours[mind];
                        List<OpenCvSharp.Point> points = contour.ToList();
                        List<List<OpenCvSharp.Point>> cnt = new List<List<OpenCvSharp.Point>>();
                        cnt.Add(points);

                        Cv2.FillPoly(mask1, cnt, new Scalar(255, 255, 255));

                        i = 0;
                        while (i >= 0)
                        {
                            cnt.Clear();
                            if (i == mind)
                            {
                                i = hierarchyIndexes[i].Next;
                            }
                            else
                            {
                                contour = contours[i];
                                points = contour.ToList();
                                cnt.Add(points);
                                Cv2.FillPoly(mask2, cnt, new Scalar(255, 255, 255));

                                i = hierarchyIndexes[i].Next;
                            }
                        }

                        Mat mask = new Mat();
                        Cv2.Subtract(mask1, mask2, mask);

                        if (bgImg == null)
                        {
                            bgImg = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type());
                            bgImg.SetTo(new Scalar(0));
                        }
                        if (fgImg == null)
                        {
                            fgImg = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type());
                            fgImg.SetTo(new Scalar(255));
                        }

                        bgImg = bgImg.Resize(sketchImg.Size());
                        fgImg = fgImg.Resize(sketchImg.Size());
                        Mat res1 = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type());
                        Mat res2 = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type());
                        res = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type());

                        Cv2.BitwiseAnd(fgImg, mask, res1);
                        Cv2.BitwiseNot(mask, mask);
                        Cv2.BitwiseAnd(bgImg, mask, res2);
                        Cv2.Add(res1, res2, res);

                        Cv2.DrawContours(res, contours, -1, new Scalar(0, 0, 0));
                       pictureBox1.BackgroundImage = new Bitmap(res.ToMemoryStream(), false);
                        sketchImg.Dispose();
                        fgImg.Dispose();
                        bgImg.Dispose();
                        mask.Dispose();
                        mask1.Dispose();
                        mask2.Dispose();
                        GC.Collect();
                    }
                    else
                    {
                        MessageBox.Show("Image does not cotains and sketch.");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }

Output:
paste your output

What did you intend to be?

Attempt to add your mat creations and loadings into using clauses or dispose them properly in a finally after the catch
I have taken the time to modify your code for you, hope this helps
        Mat sketchImg;
        Mat bgImg;
        Mat fgImg;
        private void processImage(string inFName)
        {
            try
            {
                using (sketchImg = Cv2.ImRead(inFName, ImreadModes.AnyColor))
                using (bgImg = Cv2.ImRead(@"Bricks1.jpg"))
                using (fgImg = Cv2.ImRead(@"Brushed Steel 2.jpg"))
                {
                    if (sketchImg != null)
                    {
                        using (Mat img = new Mat(sketchImg.Rows, sketchImg.Cols, MatType.CV_8UC1)) {
                            Cv2.CvtColor(sketchImg, img, ColorConversionCodes.BGR2GRAY);
                            Mat I = new Mat();
                            Cv2.Threshold(img, I, 50, 255, ThresholdTypes.BinaryInv);
                            //Cv2.Dilate(I, I, Cv2.GetStructuringElement(MorphShapes.Rect, new OpenCvSharp.Size(3, 3)));
                            OpenCvSharp.Point[][] contours;
                            HierarchyIndex[] hierarchyIndexes;
                            Cv2.FindContours(I, out contours, out hierarchyIndexes, RetrievalModes.CComp, ContourApproximationModes.ApproxSimple, null);

                            int mind = -1;
                            double marea = 0;
                            int i = 0;
                            while (i >= 0)
                            {
                                double area = Cv2.ContourArea(contours[i]);
                                if (area > marea)
                                {
                                    marea = area;
                                    mind = i;
                                }
                                i = hierarchyIndexes[i].Next;
                            }

                            if (mind != -1)
                            {
                                using (Mat mask1 = new Mat(img.Rows, img.Cols, sketchImg.Type()))
                                {
                                    mask1.SetTo(new Scalar(0, 0, 0));
                                    using (Mat mask2 = new Mat(img.Rows, img.Cols, sketchImg.Type()))
                                    {
                                        mask2.SetTo(new Scalar(0, 0, 0));

                                        var contour = contours[mind];
                                        List<OpenCvSharp.Point> points = contour.ToList();
                                        List<List<OpenCvSharp.Point>> cnt = new List<List<OpenCvSharp.Point>>();
                                        cnt.Add(points);

                                        Cv2.FillPoly(mask1, cnt, new Scalar(255, 255, 255));

                                        i = 0;
                                        while (i >= 0)
                                        {
                                            cnt.Clear();
                                            if (i == mind)
                                            {
                                                i = hierarchyIndexes[i].Next;
                                            }
                                            else
                                            {
                                                contour = contours[i];
                                                points = contour.ToList();
                                                cnt.Add(points);
                                                Cv2.FillPoly(mask2, cnt, new Scalar(255, 255, 255));

                                                i = hierarchyIndexes[i].Next;
                                            }
                                        }

                                        using (Mat mask = new Mat())
                                        {
                                            Cv2.Subtract(mask1, mask2, mask);

                                            if (bgImg == null)
                                            {
                                                bgImg = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type());
                                                bgImg.SetTo(new Scalar(0));
                                            }
                                            if (fgImg == null)
                                            {
                                                fgImg = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type());
                                                fgImg.SetTo(new Scalar(255));
                                            }

                                            bgImg = bgImg.Resize(sketchImg.Size());
                                            fgImg = fgImg.Resize(sketchImg.Size());
                                            using (Mat res1 = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type()))
                                            {
                                                using (Mat res2 = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type()))
                                                {
                                                    using (Mat res = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type()))
                                                    {
                                                        Cv2.BitwiseAnd(fgImg, mask, res1);
                                                        Cv2.BitwiseNot(mask, mask);
                                                        Cv2.BitwiseAnd(bgImg, mask, res2);
                                                        Cv2.Add(res1, res2, res);
                                                        Cv2.DrawContours(res, contours, -1, new Scalar(0, 0, 0));

                                                        pictureBox1.BackgroundImage = new Bitmap(res.ToMemoryStream(), false);
                                                    }
                                                }
                                            }

                                        }
                                    }
                                }
                            }
                            else
                            {
                                MessageBox.Show("Image does not cotains and sketch.");
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                GC.Collect();
            }
        }

This worked quite well.  I do see a small memory increase each time I process through the method, but that could be something else.   I am going to transfer this code over my main app and really test well.  Thanks again.
From: willemvs notifications@github.com
Sent: Wednesday, April 8, 2020 3:26 AM
To: shimat/opencvsharp opencvsharp@noreply.github.com
Cc: kane17752 claude.kane@hotmail.com; Author author@noreply.github.com
Subject: Re: [shimat/opencvsharp] C# implementation memory leak (#903)
Attempt to add your mat creations and loadings into using clauses or dispose them properly in a finally after the catch
I have taken the time to modify your code for you, hope this helps
    Mat sketchImg;

    Mat bgImg;

    Mat fgImg;

    private void processImage(string inFName)

    {

        try

        {

            using (sketchImg = Cv2.ImRead(inFName, ImreadModes.AnyColor))

            using (bgImg = Cv2.ImRead(@"Bricks1.jpg"))

            using (fgImg = Cv2.ImRead(@"Brushed Steel 2.jpg"))

            {

                if (sketchImg != null)

                {

                    using (Mat img = new Mat(sketchImg.Rows, sketchImg.Cols, MatType.CV_8UC1)) {

                        Cv2.CvtColor(sketchImg, img, ColorConversionCodes.BGR2GRAY);

                        Mat I = new Mat();

                        Cv2.Threshold(img, I, 50, 255, ThresholdTypes.BinaryInv);

                        //Cv2.Dilate(I, I, Cv2.GetStructuringElement(MorphShapes.Rect, new OpenCvSharp.Size(3, 3)));

                        OpenCvSharp.Point[][] contours;

                        HierarchyIndex[] hierarchyIndexes;

                        Cv2.FindContours(I, out contours, out hierarchyIndexes, RetrievalModes.CComp, ContourApproximationModes.ApproxSimple, null);

                        int mind = -1;

                        double marea = 0;

                        int i = 0;

                        while (i >= 0)

                        {

                            double area = Cv2.ContourArea(contours[i]);

                            if (area > marea)

                            {

                                marea = area;

                                mind = i;

                            }

                            i = hierarchyIndexes[i].Next;

                        }

                        if (mind != -1)

                        {

                            using (Mat mask1 = new Mat(img.Rows, img.Cols, sketchImg.Type()))

                            {

                                mask1.SetTo(new Scalar(0, 0, 0));

                                using (Mat mask2 = new Mat(img.Rows, img.Cols, sketchImg.Type()))

                                {

                                    mask2.SetTo(new Scalar(0, 0, 0));

                                    var contour = contours[mind];

                                    List<OpenCvSharp.Point> points = contour.ToList();

                                    List<List<OpenCvSharp.Point>> cnt = new List<List<OpenCvSharp.Point>>();

                                    cnt.Add(points);

                                    Cv2.FillPoly(mask1, cnt, new Scalar(255, 255, 255));

                                    i = 0;

                                    while (i >= 0)

                                    {

                                        cnt.Clear();

                                        if (i == mind)

                                        {

                                            i = hierarchyIndexes[i].Next;

                                        }

                                        else

                                        {

                                            contour = contours[i];

                                            points = contour.ToList();

                                            cnt.Add(points);

                                            Cv2.FillPoly(mask2, cnt, new Scalar(255, 255, 255));

                                            i = hierarchyIndexes[i].Next;

                                        }

                                    }

                                    using (Mat mask = new Mat())

                                    {

                                        Cv2.Subtract(mask1, mask2, mask);

                                        if (bgImg == null)

                                        {

                                            bgImg = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type());

                                            bgImg.SetTo(new Scalar(0));

                                        }

                                        if (fgImg == null)

                                        {

                                            fgImg = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type());

                                            fgImg.SetTo(new Scalar(255));

                                        }

                                        bgImg = bgImg.Resize(sketchImg.Size());

                                        fgImg = fgImg.Resize(sketchImg.Size());

                                        using (Mat res1 = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type()))

                                        {

                                            using (Mat res2 = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type()))

                                            {

                                                using (Mat res = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type()))

                                                {

                                                    Cv2.BitwiseAnd(fgImg, mask, res1);

                                                    Cv2.BitwiseNot(mask, mask);

                                                    Cv2.BitwiseAnd(bgImg, mask, res2);

                                                    Cv2.Add(res1, res2, res);

                                                    Cv2.DrawContours(res, contours, -1, new Scalar(0, 0, 0));

                                                    pictureBox1.BackgroundImage = new Bitmap(res.ToMemoryStream(), false);

                                                }

                                            }

                                        }

                                    }

                                }

                            }

                        }

                        else

                        {

                            MessageBox.Show("Image does not cotains and sketch.");

                        }

                    }

                }

            }

        }

        catch (Exception ex)

        {

            MessageBox.Show(ex.Message);

        }

        finally

        {

            GC.Collect();

        }

    }

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fshimat%2Fopencvsharp%2Fissues%2F903%23issuecomment-610823987&data=02|01||ee2a56e6f2054f294a0108d7db967321|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637219311521765491&sdata=Y55Xiz%2B9IDkIUIy6pwgE3CH%2F2WaOq0pjKEi%2FIoNolm4%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAPDCZ2MXG2KGOMEQT7QYI6DRLQYI7ANCNFSM4MDNVVDA&data=02|01||ee2a56e6f2054f294a0108d7db967321|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637219311521775486&sdata=6PD9fZAXnOmKxN0vt35%2FX8sLHvMLCbOp%2FLnA7zGgvrk%3D&reserved=0.

The code in my main app is somewhat different that I had posted, But I applied the same principles as you did below.  Unfortunately this helped only slightly. At about 50 images, I reach the 2GB process memory limit.  I even put in a 1 second delay for the collect, but that did not do much good.
Any other thoughts
From: willemvs notifications@github.com
Sent: Wednesday, April 8, 2020 3:26 AM
To: shimat/opencvsharp opencvsharp@noreply.github.com
Cc: kane17752 claude.kane@hotmail.com; Author author@noreply.github.com
Subject: Re: [shimat/opencvsharp] C# implementation memory leak (#903)
Attempt to add your mat creations and loadings into using clauses or dispose them properly in a finally after the catch
I have taken the time to modify your code for you, hope this helps
    Mat sketchImg;

    Mat bgImg;

    Mat fgImg;

    private void processImage(string inFName)

    {

        try

        {

            using (sketchImg = Cv2.ImRead(inFName, ImreadModes.AnyColor))

            using (bgImg = Cv2.ImRead(@"Bricks1.jpg"))

            using (fgImg = Cv2.ImRead(@"Brushed Steel 2.jpg"))

            {

                if (sketchImg != null)

                {

                    using (Mat img = new Mat(sketchImg.Rows, sketchImg.Cols, MatType.CV_8UC1)) {

                        Cv2.CvtColor(sketchImg, img, ColorConversionCodes.BGR2GRAY);

                        Mat I = new Mat();

                        Cv2.Threshold(img, I, 50, 255, ThresholdTypes.BinaryInv);

                        //Cv2.Dilate(I, I, Cv2.GetStructuringElement(MorphShapes.Rect, new OpenCvSharp.Size(3, 3)));

                        OpenCvSharp.Point[][] contours;

                        HierarchyIndex[] hierarchyIndexes;

                        Cv2.FindContours(I, out contours, out hierarchyIndexes, RetrievalModes.CComp, ContourApproximationModes.ApproxSimple, null);

                        int mind = -1;

                        double marea = 0;

                        int i = 0;

                        while (i >= 0)

                        {

                            double area = Cv2.ContourArea(contours[i]);

                            if (area > marea)

                            {

                                marea = area;

                                mind = i;

                            }

                            i = hierarchyIndexes[i].Next;

                        }

                        if (mind != -1)

                        {

                            using (Mat mask1 = new Mat(img.Rows, img.Cols, sketchImg.Type()))

                            {

                                mask1.SetTo(new Scalar(0, 0, 0));

                                using (Mat mask2 = new Mat(img.Rows, img.Cols, sketchImg.Type()))

                                {

                                    mask2.SetTo(new Scalar(0, 0, 0));

                                    var contour = contours[mind];

                                    List<OpenCvSharp.Point> points = contour.ToList();

                                    List<List<OpenCvSharp.Point>> cnt = new List<List<OpenCvSharp.Point>>();

                                    cnt.Add(points);

                                    Cv2.FillPoly(mask1, cnt, new Scalar(255, 255, 255));

                                    i = 0;

                                    while (i >= 0)

                                    {

                                        cnt.Clear();

                                        if (i == mind)

                                        {

                                            i = hierarchyIndexes[i].Next;

                                        }

                                        else

                                        {

                                            contour = contours[i];

                                            points = contour.ToList();

                                            cnt.Add(points);

                                            Cv2.FillPoly(mask2, cnt, new Scalar(255, 255, 255));

                                            i = hierarchyIndexes[i].Next;

                                        }

                                    }

                                    using (Mat mask = new Mat())

                                    {

                                        Cv2.Subtract(mask1, mask2, mask);

                                        if (bgImg == null)

                                        {

                                            bgImg = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type());

                                            bgImg.SetTo(new Scalar(0));

                                        }

                                        if (fgImg == null)

                                        {

                                            fgImg = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type());

                                            fgImg.SetTo(new Scalar(255));

                                        }

                                        bgImg = bgImg.Resize(sketchImg.Size());

                                        fgImg = fgImg.Resize(sketchImg.Size());

                                        using (Mat res1 = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type()))

                                        {

                                            using (Mat res2 = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type()))

                                            {

                                                using (Mat res = new Mat(sketchImg.Rows, sketchImg.Cols, sketchImg.Type()))

                                                {

                                                    Cv2.BitwiseAnd(fgImg, mask, res1);

                                                    Cv2.BitwiseNot(mask, mask);

                                                    Cv2.BitwiseAnd(bgImg, mask, res2);

                                                    Cv2.Add(res1, res2, res);

                                                    Cv2.DrawContours(res, contours, -1, new Scalar(0, 0, 0));

                                                    pictureBox1.BackgroundImage = new Bitmap(res.ToMemoryStream(), false);

                                                }

                                            }

                                        }

                                    }

                                }

                            }

                        }

                        else

                        {

                            MessageBox.Show("Image does not cotains and sketch.");

                        }

                    }

                }

            }

        }

        catch (Exception ex)

        {

            MessageBox.Show(ex.Message);

        }

        finally

        {

            GC.Collect();

        }

    }

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fshimat%2Fopencvsharp%2Fissues%2F903%23issuecomment-610823987&data=02|01||ee2a56e6f2054f294a0108d7db967321|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637219311521765491&sdata=Y55Xiz%2B9IDkIUIy6pwgE3CH%2F2WaOq0pjKEi%2FIoNolm4%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAPDCZ2MXG2KGOMEQT7QYI6DRLQYI7ANCNFSM4MDNVVDA&data=02|01||ee2a56e6f2054f294a0108d7db967321|84df9e7fe9f640afb435aaaaaaaaaaaa|1|0|637219311521775486&sdata=6PD9fZAXnOmKxN0vt35%2FX8sLHvMLCbOp%2FLnA7zGgvrk%3D&reserved=0.

If you are running in a multi thread or task environment, try reducing the amount of images you process at a time, you are more likely to see an improvement reducing your simultaneous processes.
Other than that what is an image's size, the application going out of memory is then not due to a memory leak but rather over utilization of which UWP already limits quite substantially. Try changing the architecture away from UWP and see if you get better results.


text:
n-best 분석 결과 지원

안녕하세요 KOMORAN 3.0 유용하게 잘 사용하고 있습니다.
관련해서 여쭤보고 싶은것이 있는데 2.4버전에서 지원하던
n-best 분석결과는 3.0에서 지원하지 않는지 여쭤보고 싶습니다.
또한 analzeTextfile 을 이용할 때 inputfilename에 들어가는 textfile의 경로를
어디에 위치해야하는지도 궁금합니다.
바쁘시겠지만 답변 부탁드리겠습니다. 감사합니다!
출처: http://shineware.tistory.com/ [To. Me]

#44 @shin285 implemented required feature, close ticket.


text:
Explicit Files & Preload type

Explicit Files & Preload type
Explicit Files
In its current state, gulp-version-number adds version numbers to all elements of the same type. This means that even external dependencies, or dependencies hosted on CDN's are all captured and appended a version number.
This can lead to unintended consequences, such as conflicting query variables, or cache-busting of CDN hosted dependencies that are not affected by our build process.
This PR introduces the ability to explicitly define files you wish target. Using the Object configuration for a type, you can add an array of files in the form of strings or regexps.
eg:
var versionConfig = {
  'value': '%MDS%',
  'append': {
    'cover': 1,
    'key': 'v',
    'to': [
      {
        'type': 'css',
        'files': ['application.css']
      },
      {
        'type': 'js',
        'files': ['application.js']
      },
      {
        'type'  : 'preload',
        'attr'  : ['href'],
        'files': ['application.js', 'application.css']
      }
    ],
  },
}

Preload type
Preloading of assets is increasingly becoming the standard, a preloaded element is defined as a link element with ref="preload". In order for preloaded assets to work as intended the preload href needs to match the asset href.
i.e. :
Not correct:
<link rel="preload" href="/js/application.js" as="script">
<script src="/js/application.js?v=1497c75251306822999749513c13e01c"></script>

Correct:
<link rel="preload" href="/js/application.js?v=1497c75251306822999749513c13e01c" as="script">
<script src="/js/application.js?v=1497c75251306822999749513c13e01c"></script>

By adding the preload type we can make sure preload links and assets match correctly

thanks

authors: codebykenny shinate

repo: shinate/gulp-version-number


text:
Victron Smart Shunt - Falsche Sklierung der Werte über MQTT

In der LiveView übersicht werden die richtigen Werte angezeigt, über MQTT wird der Wert falsch übermittelt. Es muss um Faktor 100 geteilt werden. Umrechung A / mA wäre Faktor 1000
Beim mir läuft aktuell: Battery Safety Controller   V0.7.0_T11
Im Vergleich zum BMS sollte jeweils die geleiche Skalierung übermittelt werden.

Es gibt zu dem Problem schon das Issue #174

ups, sorry übersehen... alles klar!

authors: TheSmartGerman shining-man


text:
xf86drm.h not found error in compilation

make -C release
make: Entering directory '/home/ubuntu/gdev/gdev/release'
make[1]: Entering directory '/home/ubuntu/gdev/gdev/release'
make[2]: Entering directory '/home/ubuntu/gdev/gdev/release'
make[2]: Leaving directory '/home/ubuntu/gdev/gdev/release'
[  2%] Built target cudump
make[2]: Entering directory '/home/ubuntu/gdev/gdev/release'
make[2]: Leaving directory '/home/ubuntu/gdev/gdev/release'
make[2]: Entering directory '/home/ubuntu/gdev/gdev/release'
[  3%] Building C object lib/CMakeFiles/gdev.dir/user/nouveau/nouveau_gdev.c.o
/home/ubuntu/gdev/gdev/lib/user/nouveau/nouveau_gdev.c:32:10: fatal error: xf86drm.h: No such file or directory
#include "xf86drm.h"
^~~~~~~~~~~
compilation terminated.

I think this requires driver patch


text:
When use TLS for deploying shipyard, it can not be visited by windows chrome but macos chrome can.

Shipyard is using TLS and it can not be visited by windows chrome(the latest chrome version), error message: NET::ERR_CERT_INVALID, but macos chrome has no such issue. Any idea what happened here?

updates: chrome windows version: 56.0.2924.87(64-bit)
chrome os version: 55.0.2883.95 (64-bit)
Details error message from chrome windows:
Your connection is not a private connection
Attackers may try to steal your information from ... (eg password, communication content or credit card information). NET :: ERR_CERT_INVALID
... Encryption technology is usually used to protect your information. Google Chrome attempts to connect to ... this time, the site sent an error message. This could be because an attacker was trying to impersonate the connection with ..., or the Wi-Fi login screen. Please be assured that your information is still safe because Google Chrome has stopped connecting without any data exchange.
You are currently unable to access ... because the credentials sent by this site are garbled and can not be processed by Google Chrome. Network errors and aggressive behavior are usually temporary, so this page may return to normal later.

Update: my centos7.2.1511 kernel : 3.10.0-327.el7.x86_64
docker version: 1.12.5
By the way, when using TLS, seems shipyard can not work as expected, i.e

No containers found including local shipyard related containers.
No images found

Figured out that shipyard maybe using SHA-1 and chrome browser does not support SHA-1 since 01/2017 completely, but no idea why chrome os works fine.So can anyone confirm this? And if yes, when will we upgrade to SHA-256? Thank you.

I've updated the upstream ehazlett/certm project to use the SHA-256 signature algorithm.  Can you try to see if this works?  Cert generation appears to be fine:
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            97:b3:a9:52:17:a9:33:aa:b3:54:20:36:04:10:f5:e9
    Signature Algorithm: sha256WithRSAEncryption

Note: I'm not a TLS expert so ymmv ;)
You will need to update to the latest ehazlett/certm (version 0.2.0) to get the update.

@ehazlett Thanks for your quick reply. I have updated the lastest ehazlett/certm (Tag: latest), and the result is not what we expected. Paste the commands I typed below:
`＃ docker run --rm
-v $(pwd)/certs:/certs
ehazlett/certm
-d /certs
bundle
generate
-o shipyard
--host proxy
--host 127.0.0.1
＃ curl -sSL https://shipyard-project.com/deploy | TLS_CERT_PATH=$(pwd)/certs bash -s`

@ehazlett Thanks for your quick reply. I have updated the lastest ehazlett/certm (Tag: latest), and the result is not what we expected. Paste the commands I typed below:

＃ docker run --rm
-v $(pwd)/certs:/certs
ehazlett/certm
-d /certs
bundle
generate
-o shipyard
--host proxy
--host 127.0.0.1

＃ curl -sSL https://shipyard-project.com/deploy | TLS_CERT_PATH=$(pwd)/certs bash -s

If you are still getting the ERR_CERT_INVALID that's probably due to the fact it's a self-signed cert.  Can you check it either by viewing more details from the error or with openssl to check the info on the cert?

I generated another cert by this way:

openssl req     -newkey rsa:4096 -nodes -sha256 -keyout ca.key     -x509 -days 365 -out ca.crt
openssl req     -newkey rsa:4096 -nodes -sha256 -keyout yourdomain.com.key     -out yourdomain.com.csr
echo subjectAltName = IP:192.168.1.103 > extfile.cnf
openssl x509 -req -days 365 -in yourdomain.com.csr -CA ca.crt -CAkey ca.key -CAcreateserial -extfile extfile.cnf -out yourdomain.com.crt

Can you specify How does shipyard work with certs?

Got the same problems.
Found a solution in generating certificates as described here:
http://tech.paulcz.net/2016/01/secure-docker-with-tls/
using the paulczar/omgwtfssl docker image.
replaced /etc/docker/ssl with dockerserver as folder and
replaced ~/.docker with docker as folder
and replaced 172.17.8.101 with a for me valid ip.
copied the cert.pem and key.pem over to docker with server.pem an server-key.pem as names.
and did a chown to my user so files are no longer root. (now i realize i did not do this step the first time)
Next i used the docker folder on installing shipyard. curl -sSL https://shipyard-project.com/deploy | TLS_CERT_PATH=$(pwd)/docker bash -s
now i can continue in browser to login. importing the certificate via ie11 still fails though.
but copying over the ca.pem to windows and renaming that to ca.crt and right click install on that fixes that.

authors: ehazlett joneyhsiao mvdhoning

repo: shipyard/shipyard


text:
Rspec で SimpleCov::Formatter::HTMLFormatter failed

$ rspec
Formatter SimpleCov::Formatter::HTMLFormatter failed with Encoding::CompatibilityError:
 incompatible character encodings: ASCII-8BIT and UTF-8 ((erb):18:in `concat')

その後のテストは通る。

スタックトレースを全て出力してみた:
Formatter SimpleCov::Formatter::HTMLFormatter failed with Encoding::CompatibilityError: incompatible character encodings: ASCII-8BIT and UTF-8
(erb):18:in `concat'
(erb):18:in `block in formatted_source_file'
(erb):14:in `each'
(erb):14:in `each_with_index'
(erb):14:in `formatted_source_file'
/usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/erb.rb:864:in `eval'
/usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/erb.rb:864:in `result'
/usr/local/rvm/gems/ruby-2.3.0/gems/simplecov-html-0.10.0/lib/simplecov-html.rb:56:in `formatted_source_file'
(erb):36:in `block (2 levels) in format'
(erb):35:in `each'
(erb):35:in `block in format'
/usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/erb.rb:864:in `eval'
/usr/local/rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/erb.rb:864:in `result'
/usr/local/rvm/gems/ruby-2.3.0/gems/simplecov-html-0.10.0/lib/simplecov-html.rb:23:in `block in format'
/usr/local/rvm/gems/ruby-2.3.0/gems/simplecov-html-0.10.0/lib/simplecov-html.rb:22:in `open'
/usr/local/rvm/gems/ruby-2.3.0/gems/simplecov-html-0.10.0/lib/simplecov-html.rb:22:in `format'
/usr/local/rvm/gems/ruby-2.3.0/gems/simplecov-0.11.2/lib/simplecov/formatter/multi_formatter.rb:8:in `block in format'
/usr/local/rvm/gems/ruby-2.3.0/gems/simplecov-0.11.2/lib/simplecov/formatter/multi_formatter.rb:6:in `map'
/usr/local/rvm/gems/ruby-2.3.0/gems/simplecov-0.11.2/lib/simplecov/formatter/multi_formatter.rb:6:in `format'
/usr/local/rvm/gems/ruby-2.3.0/gems/simplecov-0.11.2/lib/simplecov/result.rb:47:in `format!'
/usr/local/rvm/gems/ruby-2.3.0/gems/simplecov-0.11.2/lib/simplecov/configuration.rb:172:in `block in at_exit'
/usr/local/rvm/gems/ruby-2.3.0/gems/simplecov-0.11.2/lib/simplecov/defaults.rb:67:in `block in <top (required)>'

app/models/concerns/gws/reference/role.rb のカバレッジを HTML 形式で出力している最中に発生するようだ。

なぜか文字コードが "ASCII-8BIT" になっていて、"UTF-8" の文字列を連結しようとしてエラーになっている。
テストの最中に文字コードを "ASCII-8BIT" に変更して、基に戻していないとかないですか？

さっきのは間違い。
/usr/local/rvm/gems/ruby-2.3.0/gems/simplecov-html-0.10.0/views/source_file.erb の <%= CGI.escapeHTML(line.src.chomp) %> というところでエラーが起きている。
line.src.chomp の文字コードは、常に "ASCII-8BIT" であるのに、CGI.escapeHTML(line.src.chomp) は "ASCII-8BIT" だったり "UTF-8" だったりする。
line.src はソースコード内の行を格納しているが、日本語が含まれる行であったとしても、文字コードは "ASCII-8BIT" である。この仕様が正しいのかどうか...。
CGI.escapeHTML(line.src.chomp) に日本語を含む "ASCII-8BIT" な文字列を与えると、"ASCII-8BIT" のままだったり "UTF-8" になったりする。

repo: shirasagi/shirasagi


text:
Update php@8.4-debug

Build php@8.4-debug

:beers: @BrewTestBot has triggered a merge.

repo: shivammathur/homebrew-php


text:
Remove roundf()

if you dont it can do funky things with the segmente sizing
Not sure why this is in the their in the first place
change:
//CGFloat stringHeight = roundf([self getTextHeight:titleString]);
CGFloat stringHeight = [self getTextHeight:titleString];
and:
//self.segmentHeight = roundf(self.segmentHeight);
self.segmentHeight = self.segmentHeight;

@MobileMon I've removed roundf call. I have no idea why I did this about two years ago :)

authors: MobileMon shkutkov

repo: shkutkov/SMVerticalSegmentedControl


text:
Exceptions are swallowed inside modal

Did someone experience behavior when exceptions are swallowed inside modal dialog ?  Like when:
ngOnInit() {
throw 'test';
}
I see no errors in chrome Console tab. Next time I click button to open dialog it simply doesn't open, console tab is empty.
Angular: 4.0.3, angular2-modal: "2.0.3"
There are no .catch() blocks.
No global exception handlers

Fixed by upgrading zone.js to "0.8.10"


text:
Update eigenfaces.py

made changes in this file #4990

now how to edit code?

have you tested this locally? Because the CI doesn't test these examples

how to test locally?

compile shogun, open the notebook and run it

how to compile shogun
sorry i am new

how to test locally?

please read this, everything you want know is in that.
https://github.com/shogun-toolbox/shogun/blob/develop/doc/readme/DEVELOPING.md

all the information needed is on our GitHub wiki

ok thanks

closing

(feel free to re-open if you continue :)

authors: LiuYuHui gf712 karlnapf mohitmajithia

repo: shogun-toolbox/shogun


text:
Disabled Category displayed in Navigation

PHP Version
7.4.12
Shopware Version
6.4.11.0
Expected behaviour
After the update from 6.4.10.x  all hidden categories which should not be shown will be displayed in main navigation.

Actual behaviour
The category is Shown in the Frontend but it's disabled in the backend. The setting (hide in navigation) doe not solve the problem. It's shown

How to reproduce
Create a category and disable it. Now show in frontend navigation. Normaly it should not be shown but it does.

Duplicates #2462

authors: RevolteSolutions tinect

repo: shopware/platform


text:
Change bg color and border radius of  slider nav arrows outside

1. Why is this change necessary?
If an image slider with navigation arrows positioned "outside" is used on a section with a dark background,
the navigation arrows are no longer visible.
2. What does this change do, exactly?
Change the background color of navigation arrows positioned outside of an image slider to white.
Change the border radius to mirror the appearance of inside positioned arrows.
3. Describe each step to reproduce the issue or behaviour.
In the CMS Layout Editor, create a section with a dark background color or image. Place the CMS block "image slider" inside of it and set the "Arrow navigation" to "outside".
4. Please link to the relevant issues (if any).
https://github.com/shopware/platform/issues/2456
5. Checklist

[x] I have rebased my changes to remove merge conflicts
[ ] I have written tests and verified that they fail without my change
[x] I have created a changelog file with all necessary information about my changes
[ ] I have written or adjusted the documentation according to my changes
[ ] This change has comments for package types, values, functions, and non-obvious lines of code
[x] I have read the contribution requirements and fulfil them.

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

Hey @Lilibell, thanks for your contribution :blue_heart: :tada:
Please make sure you sign the Contributor License Agreement, otherwise we are not able to merge your PR.
It seems that there is a mismatch between the email address you used for comitting your changes, and the eamil you used for GitHub. If you already accepted the CLA for your GitHub user please add the email address you used for comitting as a secondary email address in your GitHub profile, so that the commits are associated with your GitHub user.

Hello @keulinho, thank you for your help -  thanks to you I was FINALLY able to sign this!

Besides it seems like there is also a different fix proposed here: https://github.com/shopware/platform/pull/2731

Before the change, poor contrast on some dark/multicolored backgrounds:

After the change, secured contrast with all backgrounds:

It seems to me that the PR  focuses on fixing the arrow and image position, my fix is about the background only

This PR is focusing on the background color of the arrows only. I don't take care of that in my PR. This issue describes two problems.
The first one is that the arrows are not visible on a dark background.
My PR is focusing on the second problem of the issue which is: "The next and previous image are displayed under the arrow navigation."

@Lilibell & @NinjaArmy thanks for clarifying, then we will take care of both of your PRs.

Hello,
thank you for creating this pull request.
I have opened an issue on our Issue Tracker for you. See the issue link: https://issues.shopware.com/issues/NEXT-23925
Please use this issue to track the state of your pull request.

Thanks again for your contribution, your PR is merged now! :tada: :blue_heart:

authors: CLAassistant Lilibell NinjaArmy keulinho shopwareBot


text:
Storefront theme:dump Command ignore multiple themes in multiple sales channels

PHP Version
8.1
Shopware Version
6.5.5.1
Expected behaviour
The theme:dump command must dump all configurations from all themes from all sales channels.
Actual behaviour
The theme:dump currently get the configuration from the first active theme. If more sales channels with different themes active, the other would be ignored.
How to reproduce
Create multiple sales channels with different themes and run the theme:dump command. After that look into /var/theme-files.json and in the point styles currently one theme are in.

See this pr https://github.com/shopware/shopware/pull/3740

Hi,
thx for your issue we will put it into our new evaluation process and have a look at it again.

[public] Automated response: This issue is linked to the internal issue https://shopware.atlassian.net/browse/NEXT-37917.
[created from NEXT-37917, comment 488809]

authors: MarcelSchmaeing raffaelecarelle shopwareBot wiifree

repo: shopware/shopware


text:
自动获取token状态:失败,更多信息:环境：【test】数据格式出错，请检查

项目是否存在访客用户

项目是否存在访客用户

666 把访客改了就好了 谢谢


text:
the "[^1]:a"  been coverted to nothing

showdown version:showdown v 1.8.6 - 22-12-2017
and code as below
var converter =  new showdown.Converter();
var text      = '[^1]:a';
var html      = converter.makeHtml(text);

but find the output html=""
and I update to var text      = '[^1]a';,
and find the output is "<p>[^1]a</p>",which is correct

verified

This is weird. Every parser in babelmark produces empty string https://johnmacfarlane.net/babelmark2/?normalize=1&text=[^1]%3Aa

After talking with some markdown experts, that is the intended behavior. The commonmark spec is explicit in this regard: https://spec.commonmark.org/0.28/#link-reference-definitions
So it's not a bug, but actually the intended behavior. If you wish to write that specific sequence of characters, you need to escape the opening square brackets: \[^1]:a

authors: garyyan tivie

repo: showdownjs/showdown


text:
Update or delete custom units

Describe the solution you'd like
The custom units created can not be altered or deleted. If the user writes in wrong conversion unit or his units tend to change in future, then the user requires update or delete for his custom conversion.
Additional context
Required to do this

Custom units can now be deleted. I have linked the PR with the issue.


text:
websocket connection missing

Latest reactUI doesn't start websocket to /pushlistener

/pushlistener ist missing for you?
ws.current = new WebSocket((baseURL.substring(0, baseURL.indexOf("//")).includes("https") ? "wss://" : "ws://") + urlSubstr + "/pushlistener?clientId=" + getClientId()
Is in the code, but I'll check tomorrow

I see the log
connecting WebSocket
but there's not request in the network tab of Chrome and also no log on server-side?
Also no other websocket message.

The problem is the clientId. If the id contains a #, it won't work.
You should encode the URL parameter...
Anyway, server now sends another id without # in it.

now encoding url parameter in websocket url, is this closable?

As we talked about, I've added '#' in HttpSessionHandler.java and with encoding it works, without it didn't.

authors: maximilianweidenauer rjahn

repo: sibvisions/reactUI


text:
Add 0000-01-02-sid-version1.md

Added the option to go back. Created a branch, made a commit, created a pull request

Merging the diversion branch with master branch.


text:
String Index Out of Bounds

The error is occurring because of the incorrect regex used for splitting the input into the required format. If you print the "productions" dictionary, you would see that the production rules are incorrectly stored.
So for fixing this error you may either use a correct regex or you may just use the inbuilt split function of python.
Here is what you can do, you can remove the whitespaces and the newline using replace function:
line=line.replace(" ", "").replace("\n", "")
And then split the input at "->" using
l=line.split("->")

It works!

This is only a part of the actual fix. If you only use
line=line.replace(" ", "").replace("\n", "")
l=line.split("->"
you will not be able to parse grammars containing '|' which means OR correctly, which renders the test grammars and string in the code unusable.
You could actually do something like this:
line=line.replace(" ", "").replace("\n", "")
l = line.split("->")
lhs = l[0]
rhs = set((l[1]).split("|"))
place this between the line for and flag if in main.

It works!

how does the pseudo code look like?

It works!

how does it look like when added. im having trouble getting rid of the error


text:
Attractive Footer

make changes in Footer and link them to respective pages

New footer seems to be fine for now
Resolved and Tested locally
Will be updated in next build

license: unlicense


text:
iX colors docs only appear after searching for a color and going back.

What happened?
Hello, when opening this page, iX color docs, the colors don't show initially, they only appear after searching for a color and going back.
Tested on Edge(119.0.2151.58) and Firefox Developer(120.0b9).

Tracked by [IX-617]

Fixed with latest deployment

authors: flxlst09 nuke-ellington thatsBruno

repo: siemens/ix


text:
Documentation question for config.json

*What is the difference in your config_example.json between a type: light and a type: switch ?
both seem to have similar functionality? Are they interchangeable or is there added functionality for 1 or the other that I haven't discovered?

So that would be a no... :)
Just grepped through your code and found this in Homepoint-master/main/fs/ConfigReader.cpp:
if (sceneType == "Light" || sceneType == "Switch")

repo: sieren/Homepoint


text:
Yeah, i know. it's huge. Update module and 1.19 tests

Hi team!
I know, this PR is huge, but it contains a lot of new stuff:
Main changes of this HUGE pr:

Add license checks at CI
Add 1.19.0 testing
Update all modules (including major changes in Grafana)
Add kube-proxy-exporter (daemonset to expose metrics working in all kube setups) (suggested by @lnovara )
Add eks-sm (suggested by @lnovara )
Add grafana internal dashboard
Refactored all dashboards: (suggested by @lnovara )

Before this PR, all dashboards got deployed with Grafana. This can cause some issues having dashboards without metrics/product
With this PR, every product/package has its own serviceMonitor + grafana Dashboard (as configmap).

This caused a lot of changes and headaches. In addition, this update provides a tested upgrade path described in the release notes: docs/releases/v1.10.0.md

PD: Special thanks to @lnovara rises some issues/ways to improve the module.
PD2: Pipeline passing: https://ci.sighup.io/sighupio/fury-kubernetes-monitoring/900

LGTM, awesome work! :shipit: ❤
Minor non-blocking comments follow:
* I think that GlusterFS and Kong stuff need to be moved to a separate repository (which already exists AFAIK) because they're not shipped by default

I was thinking about it. I don't know what to do. Maybe I can delete it, and if someone needs the dashboards, they are available in the previous releases of this module.

* the `kube-proxy-exporter` doesn't fit 100% as a name to me, I would have called it `kube-proxy-metrics` but I do realize I'm just nipicking 😅

Renaming, I think it makes more sense kube-proxy-metrics. my fault!

* did you have any chance to check if dashboards and alerts from the [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus) project got updated as well?

Nop, I'll take a look. If there is something really interesting, I'll include it.

P.S. I do understand the huge effort you put into this PR but I think we should avoid this big PRs since it makes really difficult to do a thorough review even though the PR title really makes up for it! 😄

Ye... I know, it was a huge PR because of various reasons... The next release should be smaller.

I'll remove the kong and glusterfs dashboards. If someone requires it, feel free to recover it from a previous release :)

repo: sighupio/fury-kubernetes-monitoring


text:
Wallet Connection with DApp does not work when having only one account registered

Describe the bug
When only one account is registered, i.e. right after installation and import and/or creation, the connection with a wallet does not work.
To Reproduce
Steps to reproduce the behavior:

Fresh Install and import or create one account
Using a DApp to connect
Nothing happens

Expected behavior
Should open a confirmation window requesting for connection
Additional context
Workaround
As long as no patch is released, it is sufficient to create/import a second account, which triggers storing the accounts publickey.
Solution
After some debugging, I figured out that the initial account's publickey is not stored in local backend storage, which causes and undefined error while trying to fetch the current selected account on connection request. For that initial case, the related storage function has to be called.

You will need to synchronize your wallet and then you debug it

fixed

authors: Yuxanju ohager

repo: signum-network/signum-xt-wallet


text:
feat: compress session automaticlly

There are three configuration items that control automatic session compression
# Compress session messages if tokens exceed this value (valid only >=1000)
compress_threshold: 2000
# The prompt for summarizing session messages
summarize_prompt: 'Summarize the discussion briefly in 200 words or less to use as a prompt for future context.'
# The prompt for the summary of the session
summary_prompt: 'This is a summary of the chat history as a recap: '

When the total number of tokens in the session messages exceeds compress_threshold, aichat will automatically compress the session.
Aichat will send a summarize_prompt with session messages to LLM to summarize the conversation, and then use the summary text prefixed with summary_prompt  and the last two messages as context for the next chat.
close #329  #280
This is a very opinion feature, welcome to test and give feedback.

Just wanted to say thank you - I think this will do nicely!

authors: ahmedre sigoden

repo: sigoden/aichat


text:
ux: consider adding EXAMPLES section to commands

Several flags like -kms are currently hard to infer how to use without exploring docs or source code.
Having EXAMPLES in each cmd would help with CUJs. Might need to shoehorn into Description, or use cobra library to properly do it.

+1!

Only a few left:

download
upload
triangulate

authors: ahmetb dlorenc

repo: sigstore/cosign


text:
cli: update privacy statement and confirmation

Fixes #2796
Summary
This commit includes an update to the privacy statement and confirmation notice in the CLI tool, intended to tie into the Hosted Project Tools policy from LF Projects, LLC (available at https://lfprojects.org/policies/).
Release Note
Updated the privacy statement to align with the new Hosted Project Tools terms and notice from LF Projects, LLC
Documentation
N/A
cc @mkdolan for visibility

Hi @haydentherapper, I pushed 6650bf1 to tweak the wording to address the "Cosign service" and "attestation" points.
For "personal data", I think this is the wording that LF would be inclined to use here.
Does this address the concerns for the PR? Thank you!


text:
Update how-certificate-issuing-works.md

Small text update
Signed-off-by: Hayden B hblauzvern@google.com

Summary

Release Note

Documentation

Codecov Report

Merging #755 (a475511) into main (35e443a) will decrease coverage by 0.13%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #755      +/-   ##
==========================================
- Coverage   54.18%   54.05%   -0.14%
==========================================
  Files          36       36
  Lines        2257     2257
==========================================
- Hits         1223     1220       -3
- Misses        942      944       +2
- Partials       92       93       +1

Impacted Files
Coverage Δ

pkg/ca/fileca/load.go
58.62% <0.00%> (-10.35%)
:arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

authors: codecov-commenter haydentherapper

repo: sigstore/fulcio


text:
How could the current protobuf spec model multiple bundle types ?

Question

By looking at the current protobuf specification, I could identify how the spec reuses the current bundle format relying on Rekor entry logs, and additional fields (verification materials, ...) that aren't included today in the cosign bundle.
However I am wondering how the current spec could model scenarios where Rekor is not in use. For instance, https://github.com/sigstore/cosign/issues/2331 proposes the usage of a Timestamp authority as an alternative guarantee for cosign signing/verification. To support this use case, the current protobuf spec will need additional fields in the TimestampVerificationData, and ignore other fields as well as the tlog entry data.
Wouldn't it make the spec handier to have a Sigstore Bundle as an interface, and two or more types of Bundles such as RekorBundle or TimestampedBundle in the current spec definition ? These two types could model the aforementioned use case, and extend it to future verification mechanisms.
Any thoughts ?
I hope I am not missing any previous discussion done during the creation of this spec.
@kommendorkapten @haydentherapper or others

Timestamp authority as an alternative guarantee for cosign signing/verification. To support this use case, the current protobuf spec will need additional fields in the TimestampVerificationData, and ignore other fields as well as the tlog entry data

I think this issue is specific to timestamping. In my opinion, this is misusing timestamping. There shouldn't be two bundle formats, because timestamping only provides a countersignature over an artifact signature, it doesn't provide auditability and signature transparency.
More generally, I think we should have a single bundle format, and it's up to clients on what to read as part of verification. If a client doesn't need transparency logs for some reason, then they can ignore that part of the bundle. I would really want to avoid multiple bundle formats, that's going to make client logic more complex.

cc @znewman01

Concretely, if the tlog isn't populated, then the bundle simply shouldn't populate this field. Clients should have verification policies that expect or don't expect transparency log entries.

More generally, I think we should have a single bundle format, and it's up to clients on what to read as part of verification. If a client doesn't need transparency logs for some reason, then they can ignore that part of the bundle. I would really want to avoid multiple bundle formats, that's going to make client logic more complex.

I agree. Your client should have some set of default verification options (which we'll prescribe as part of a client specification), like "require membership in Rekor (online) AND require a TSA signature". Then, in specific circumstances, you can override that default behavior.
I don't see why that's incompatible with the bundle spec as written, though.

Will only echo what @haydentherapper and @znewman01 already commented. The bundle is intended to be flexible to cover both many scenarios, such as only Rekor/tlog, signed timestamps and combinations of them, including some thresholds (i.e require the signature to be put on X  different Rekor instances).
It all comes down to the verification policy on what fields to require. Both Rekor entries and signed timestamps are optional, as they are arrays (repeated), and an empty array is valid.
This is not very well specified yet, but as @znewman01 we are working on specifying this in the client specification.

Thanks for the feedback and the detailed explanation. It sounds like there is a strong consensus on keeping a single bundle format for simplicity purposes. I was thinking of scenarios where the future complexity of this verification policy could be easily managed by a sigstore bundle with multiple nested bundle types.
Closing this issue then!

repo: sigstore/protobuf-specs