[Sitemaps] Parser assumes file encoding is the same as the one used by default on JVM

SiteMapParser creates Readers from the byte[] content by assuming that the file
encoding is the same as the one use by default on the JVM.

We should use Tika's charset detector (or ICU4J directly) to detect the charset
used prior to creating the Readers.

Will attach a test class shortly.

Original issue reported on code.google.com by digitalpebble on 19 Jan 2015 at 4:51

The attached patch is included in #67 6eb1459.

Hi @sebastian-nagel - first, are you saying that this issue can be closed because of the fix for issue #67?
Second, I agree that creating an issue for using StandardCharsets.UTF_8 (now that we're > Java 1.6) is a good idea.

Afaics, all changes of crawler-commons-63.patch are included in #67 resp. the associated commit. See also #137 which removed further dependencies to system-specific locale.
Ok, I'll open a new issue to use StandardCharsets where applicable (not only UTF-8), and prepare a patch/pr.

@jnioche - since you originally opened this issue, can you confirm what Sebastian is seeing and then close it if this has been subsumed by #67 and #137? Thanks!

@kkrugler this has been covered elsewhere indeed.


Replaced Bootstrap tour by IntroJs in Game of Life Activity

I have migrated the Game of Life activity tutorial from bootstrap-tour to IntroJs
Issue: #1090

Nice. Thanks @dikwickley


High size of MediaStreamRecorder vs RecordRTC

I want to push data after each 3 seconds but the size generated by 2 sec of MediaStreamRecorder is equal to 10 sec of RecordRTC

Did you refer "MediaStreamRecorder.js"?

https://github.com/streamproc/MediaStreamRecorder

i used same but size generated is too high


Change the pdf link

This should fix the #357, Well after experimenting with docsify, even if we move the pdf file to docs/ folder, the pdf will not render itself and still returns a 404. So instead, I just changed the link to go to the pdf file in microsoft.github.io/ML-For-Beginners/pdf/readme.pdf

Let's ship it :)


Allow sorting posts by the author display name V2

Summary

Relevant Technical Choices

To-do

User-facing changes

Testing Instructions

Fixes #1744

Closing in favor of #2345


Feedback and ratings

Problem

Currently, there is no way users can provide feedback or rate resources
Description

Add a feature to allow users to provide feedback and rate resources. This helps users to find the best resources and also provides valuable insights for website administrators.
Alternatives

Additional context

Implementation

[x] I would be interested in implementing this feature.

@tinniaru3005 Thank you for taking the time to submit this! ❤  It's an interesting idea, but goes against the nature of the resource archive operating in a simple fashion, and creates a lot of considerations for bi-directional data flow that seems very much outside the scope of this project. While a good idea in theory, I feel that in the context of this project it's not something we'd hope to add as a feature at this time.
That said, if you feel strongly the other way and have a solid argument please feel free to comment here. In the meantime I'm closing this Issue.


optimize code

I think it's very wasteful to register the formatting method every time you instantiate an object

this conclusively fails the builds :)

Please resolve the merge conflicts and fix the build. Thanks 🎉

After format files refactoring in f1046cd13ee5, the registration no longer occurs during Dataset creation. Thanks for your contribution anyway, it inspired me!


Add ingest count for simple file ingests

https://jira.lib.unc.edu/browse/BXC-2811

Superseded by: https://github.com/UNC-Libraries/Carolina-Digital-Repository/pull/1104


[ClangImporter] Don't import C structs with non-trivial fields

Swift currently assumes that copies and deinitializations of C structs are always "trivial", i.e. a copy can be done by just copying the raw bits of the value, and a deinit requires no work at all. Until we do anything to change that, just don't import any of the new C structs that have non-trivial copy or deinitialization operations (those with ARC references in them).
rdar://problem/35698831

Blocked on <rdar://problem/38421774> NonTrivialToCopy et al not preserved in serialized AST (PCH/PCM).

@swift-ci Please test

@swift-ci Please test source compatibility

Failure on the "source compat" bot should hit the regular macOS bot too: it looks like the Clang-side patch changes the meaning of unions, which it shouldn't.

(but there's also a problem with anonymous fields here that's independent)

Build failed
Swift Test OS X Platform
Git Sha - 5245572c30155cb1bec266ee6107f32e6e977a5d

Okay, maybe the anonymous field assertion is valid. The only reasons a record declaration should fail to import are ones that can't apply to anonymous fields.

Build failed
Swift Test Linux Platform
Git Sha - 5245572c30155cb1bec266ee6107f32e6e977a5d

@swift-ci Please test

@swift-ci Please test source compatibility

(still planning to update the comment before merging)

@swift-ci Please smoke test


Declare more fields as nullable

From a Slack conversation:

Trying to run tap-dbt and I'm running into some issues that I think would apply more generally to other taps too, but I couldn't find an answer in the forums or slack:

Allowing NULL types globally: The expected schema for most of the fields in tap-dbt does not allow NULL values. For example in the runs stream, the field dbt_version is configured to expect a type of string like:

          "dbt_version": {
            "type": "string"
          }

The solution would involve one of two alternatives:

Manually add the "null" type in all the schemas
Refactor the schemas to use the SDK typing helpers, which make fields nullable by default.

Slack
discuss.meltano.com

I think the schema is being derived from the content retrieved from: tap_dbt.client.OPENAPI_URL. For example the following block is retrieved for the Jobs endpoint:
    Job:
      type: "object"
      required:
        - id
        - account_id
        - project_id
        - environment_id
        - dbt_version
        - name
        - execute_steps
        - state
        - triggers
        - settings
        - schedule
      properties:
        id:
          type: integer
          nullable: true
          description: Must be `null` when creating a new Job
...
        dbt_version:
          type: string
          nullable: true
          description: Overrides the dbt_version specified on the attached Environment if provided
          example: 0.17.1

Whereas the extracted schema is:
      "schema": {
        "properties": {
          "id": {
            "description": "Must be `null` when creating a new Job",
            "type": "integer"
          },
...
          "dbt_version": {
            "description": "Overrides the dbt_version specified on the attached Environment if provided",
            "type": "string"
          }

nullable does not appear to be carried over when converting the yaml to the json schema.


Adds handlers

Moves I18NextOptions.defaultFormatter to interpolator.dart
Adds missingKeyHandler and translationFailedHandler to options

Codecov Report

Merging #3 (53214a9) into master (e4d3593) will decrease coverage by 0.16%.
The diff coverage is 81.25%.

@@            Coverage Diff             @@
##           master       #3      +/-   ##
==========================================
- Coverage   75.05%   74.89%   -0.17%
==========================================
  Files           9        9
  Lines         445      458      +13
==========================================
+ Hits          334      343       +9
- Misses        111      115       +4

Impacted Files
Coverage Δ

lib/src/options.dart
61.36% <53.84%> (-1.93%)
:arrow_down:

lib/interpolator.dart
90.69% <100.00%> (+2.60%)
:arrow_up:

lib/src/i18next.dart
100.00% <100.00%> (ø)

lib/src/translator.dart
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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


🐛Create lead - Replace the old endpoint with new Power Automate Flow

Cc: @bradystroud @amankumarrr
Hi Team,
Currently we are using the old endpoint for creating leads. We need to update it to the new Power Automate flow as from the old endpoint, Account Managers would not get any email notifications on the creation of any leads.

Figure: current enquiry form
### Tasks
- [x] Modify the payload schema for the Contact form to match with SSW.Website form
- [x] Replace the endpoint URL with the new Power Automate flow's URL
- [x] Update the Azure pipeline for contact form

Done - the form is now working as expected.


[6.x] Only prepend scheme to PhpRedis host when necessary

Please see https://github.com/laravel/framework/pull/34016

So I suppose the question is whether we want to support this. Do we take the position that you including the scheme in the host file is invalid syntax?

So I suppose the question is whether we want to support this. Do we take the position that you including the scheme in the host file is invalid syntax?

Good point. I'm actually prepending the tls:// scheme to env vars in Terraform config to get this working in the first place. It makes sense to me to specify host and scheme distinctively.
For me, upgrading from v7.25.0 to v7.26.0 was a breaking change (hence the PR), but curious how common this configuration was, if it wasn't what was intended anyway.

@ryzr I understand that in your config you have set the scheme to tls and also the host prefixed with tls://. In previous versions the scheme key did not do anything with the phpredis connector, but now it does prepend the tls:// in front of the host.
@driesvints I'm fine with this PR, as it addresses cases like this, which users have defined the scheme AND prepended the scheme in the host for the phpredis driver.
But configuring redis like this is not really correct, and it would certainly not work with the predis driver: you need to configure either the scheme or prefix the scheme in front of the host, but not both.
If folks need to use different connectors between environments, they could use the REDIS_URL or the REDIS_HOST, or even introduce a REDIS_SCHEME variable.

Maybe it's best that we fix this for 6.x & 7.x and then revert it again for 8.x?
@taylorotwell what are your thoughts?

@driesvints I agree with this, let's merge this but we should be more clear about the correct configuration in the docs. I'll submit a PR to the laravel/docs.

I see no huge need to revert this after merging as long as our docs is correct.

This just caused us to have downtime because we were manually including the scheme since Laravel didn't handle it. So now I assume I'm getting a double scheme. This wasn't a backwards compatible change, especially since digital ocean docs have suggestions to add the scheme yourself.
https://www.digitalocean.com/community/questions/how-to-setup-laravel-with-digitalocean-managed-redis-cluster (also saw this in other places, this was just the first googled result I found... added a comment to see if the author can correct it).


Add support for RPI IDE to work on different versions of the OS

Need to solve shipping the IDE will more of the required libs.

This issue has been mentioned on OpenMV Forums. There might be relevant details there:
https://forums.openmv.io/t/openmv-ide-install-does-not-work-with-newest-raspberry-pi-os/7814/10


Compile error using entropy.h in C++ code

When compiling a C++ application that includes entropy.h, the compiler generates the following error:
include/misc/util.h:53:1: error: template with C linkage
template < class T, size_t N >
This is a result of a couple of include directives within the C linkage wrapper in entropy.h
A fix has been submitted to #16183

thanks for submitting this bug.

fixed in #16183


Self-describing JSON Schema should be optional if --raw

./schema-guru-0.3.0-M1 ddl --raw employee_delivers_package.json
Error in [/vagrant/schema-guru/target/scala-2.10/employee_delivers_package.json]
Error: Function - 'getSelfDescElems' - Schema does not contain all needed self describing elements

Now table name derived from self-describing name. How to derive name without it? Filename?

Filename please!
On 23 Jul 2015 9:44 am, "Anton Parkhomenko"<EMAIL_ADDRESS>wrote:

Now table name derived from self-describing name. How to derive name
without it? Filename?
—
Reply to this email directly or view it on GitHub
https://github.com/snowplow/schema-guru/issues/92#issuecomment-124023635
.


Total commander like multi file replacement - feature request

Info:
Version 1.20.1
Commit f88bbf9137d24d36d968ea6b2911786bfe103002
Date 2018-02-13T15:31:21.019Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64
We can search in two ways for all occurrences:
1, click on main search icon, and search
2, find all occurences
The second option is not that convenient. The popup to edit something is nice and fancy, but it's opening all the files at some point without saving the modification, so you are not sure, what you have modified.
I think, when you change something and click on the next occurrence in a different file, you need to force some save before!
Many times i'm using the first option instead, but what i'm missing is a new text field where you can add replacement similarly how it's working for one file. (There is a place for it, and a big refactor it would be nice and handy)
1, search first
2, add the replacement and click on replace all, or separately jumping to the next file

I don't quite understand. What do you mean by "find all occurences"?

but what i'm missing is a new text field where you can add replacement similarly how it's working for one file.

You can do a find/replace in the text search viewlet

Is that not what you're talking about? It would be helpful if you can include screenshots or more clear steps on what you want to happne.

Somehow it was not there when i looked at, now it seems me available, o r i just missed it. Thanks.


Show option value or optgroup as placeholder when selected

I have a number of optgroups with identical options. When selected, the placeholder text shows only the option, so it is not possible to easily see which optgroup it was chosen from.
It'd be good if there was a placeholder display option that combined the optgroup value and the option text, perhaps separated by ": ".  Something like this is in stale PR  https://github.com/silviomoreto/bootstrap-select/pull/306.
The other option would be to have a data attribute inside the <option> that could be used as placeholder when the text is selected.
<select class="selectpicker" data-selected-text-format="custom">
  <optgroup value="main">
    <option data-placeholder="main: sub">sub</option>
  </optgroup>
</select>

My current workaround is not really elegant:
$('.selectpicker').on('changed.bs.select', function (event, clickedIndex, newValue, oldValue) {
    var text = $(this).find("option").eq(clickedIndex).val();
    $(this).prev().text(text);
});

The final option is to allow the user to pass in a function that formats the text, as in PR https://github.com/silviomoreto/bootstrap-select/pull/1660. That's a bit over the top for my use case.

See http://silviomoreto.github.io/bootstrap-select/examples/#selected-text

Oh great, my bad, don't know how I missed it! Happy to close


Fixed keyword parameters warning with Ruby 2.7

Cleanup a few more Ruby 2.7 issues similar to #521

I can confirm this as still being a bug in master branch, would be nice to have the patch as Daru::DataFrame.write_csv is broken.
I could also solve the issue with Daru::DataFrame.from_csv: https://github.com/SciRuby/daru/issues/543


div removal and type modification

I modified the div by fragment and changed the type text to email so that the HTML check works

Please run test cases after changing codes. Input needs to be highlighted by changing the value of input and type="email" hasn't that functionality.


perfect videos for my pet

Hello, if I want to produce perfect videos for my pet, what should I do? I don't understand complex development knowledge. Please tell me the basic operating principles and procedures. Thank you very much.

By the way, I have successfully deployed and used your project. It's very cool.


show the beam from blue dot

I want show the beam from blue dot, how to set?

This is not currently support, but please feel free to open a feature request for it in the issue tracker:
https://issuetracker.google.com/savedsearches/5446940


Gradle build fails when org.jetbrains.kotlinx.dataframe is present

Two errors are reported see details below

Failed to notify project evaluation listener.
Failed to query the value of property 'buildFlowServiceProperty'.

Possibly due to incompatible version of com.google.devtools.ksp" since adding the dependency id("com.google.devtools.ksp") version "1.9.10-1.0.13" makes the error go away.
build.gradle.kts:

repositories {
    mavenCentral()
}

plugins {
    id("org.jetbrains.kotlinx.dataframe") version "0.11.1"
    kotlin("jvm") version "1.9.0"
}

group = "org.something"
version = "1.0-SNAPSHOT"

repositories {
    mavenCentral()
}

dependencies {
    implementation("org.jetbrains.kotlinx:dataframe:0.11.1")
    testImplementation("org.jetbrains.kotlin:kotlin-test:1.8.10")
}

tasks.test {
    useJUnitPlatform()
}

kotlin {
    jvmToolchain(17)
}

java -version:
openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode)

Output from gradle build
./gradlew clean build

Welcome to Gradle 8.2!

Here are the highlights of this release:
 - Kotlin DSL: new reference documentation, assignment syntax by default
 - Kotlin DSL is now the default with Gradle init
 - Improved suggestions to resolve errors in console output

For more details see https://docs.gradle.org/8.2/release-notes.html

> Configure project :
ksp-1.8.20-1.0.11 is too old for kotlin-1.9.0. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.8.20.
ksp-1.8.20-1.0.11 is too old for kotlin-1.9.0. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.8.20.
ksp-1.8.20-1.0.11 is too old for kotlin-1.9.0. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.8.20.
ksp-1.8.20-1.0.11 is too old for kotlin-1.9.0. Please upgrade ksp or downgrade kotlin-gradle-plugin to 1.8.20.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring root project 'df'.
> Failed to notify project evaluation listener.
   > Cannot query the value of task ':compileKotlin' property 'moduleName' because it has no value available.
   > Cannot query the value of task ':compileTestKotlin' property 'moduleName' because it has no value available.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Failed to query the value of property 'buildFlowServiceProperty'.
> Could not isolate value org.jetbrains.kotlin.gradle.plugin.statistics.BuildFlowService$Parameters_Decorated@36af1184 of type BuildFlowService.Parameters
   > A problem occurred configuring root project 'df'.
      > Failed to notify project evaluation listener.
         > Cannot query the value of task ':compileKotlin' property 'moduleName' because it has no value available.
         > Cannot query the value of task ':compileTestKotlin' property 'moduleName' because it has no value available.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

BUILD FAILED in 408ms

We indeed face incompatibilities with different KSP versions because DataFrame itself uses KSP too for its Gradle Plugin. @koperagen could we make it KSP-version independent or not?

There's now kotlin.dataframe.add.ksp=false in gradle.properties
One should be able to add their own version of KSP and dataframe will work with it

I think we can close it.
I don't think it's readme material though; It's a bit of an internal workaround, so we can suggest this issue whenever it comes up. In most cases users should just add dataframe to their project and dataframe will come with a KSP version we know to be working.
By adding kotlin.dataframe.add.ksp=false, KSP will not be added at all, so if they try to follow our guides, they will fail, unless they happen to have their own KSP version which happens to be compatible with DataFrame.


can not make

when I execute the command of "make" in the directory "crfasrnn_keras/src/cpp"
I got the following error:
make: python: Command not found
make: python: Command not found
/bin/sh: 1: python: not found
expr: missing operand
Try 'expr --help' for more information.
/bin/sh: 1: [: -gt: unexpected operator
g++ -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -shared -fPIC -I -O2  -o high_dim_filter.so high_dim_filter.cc modified_permutohedral.cc
high_dim_filter.cc:25:42: fatal error: tensorflow/core/framework/op.h: No such file or directory
compilation terminated.
In file included from modified_permutohedral.cc:33:0:
modified_permutohedral.h:42:46: fatal error: tensorflow/core/framework/tensor.h: No such file or directory
compilation terminated.
Makefile:49: recipe for target 'high_dim_filter.so' failed
make: *** [high_dim_filter.so] Error 1
can you help me to figure out this problem?

@jovahe, looking at the error message:

make: python: Command not found
make: python: Command not found,

it looks like you don't have "python" in your executable PATH.

@sadeepj ,thanks a lot.According to your prompt, I figure out this problem by modifying Makefile as following:
PYTHON=python3


Configurable Channels

Summary
Channels right now are fairly hardcoded and include references that aren't needed in many discord servers (Namely, Patchwork, which I would like to be removed)
Current Behavior
The Legacy and Patchwork channels are hardcoded to 1.2.5 and 1.14.4 respectively, and are always present
Preferred Behavior
Server owners or bot maintainers should have an easy way to create their own channels through commands or configuration in the bot, and these default alternative channels (besides default and snapshot) should be removed

Yarn's extra channels may now be configured - although Patchwork is the only extra channel that linkie-core supports right now.
Commit: https://github.com/Kord-Extensions/ext-mappings/commit/4c45a299c795fbf7e2f21e389aea84ec749a6928
This hasn't yet been tested, so I'm not closing the issue yet.

Yarn's extra channels may now be configured - although Patchwork is the only extra channel that linkie-core supports right now.
Commit: https://github.com/Kord-Extensions/ext-mappings/commit/4c45a299c795fbf7e2f21e389aea84ec749a6928
This hasn't yet been tested, so I'm not closing the issue yet.

After some testing, I'm going to say this issue is solved. Feel free to let me know if not!


visual artifact in RichTextLabel menu

Version 1.1.beta1.42d41a3fbc
Problem:
The "RichText" menu is drawn on top of the Lock/Unlock object icons
How to reproduce
Create a new RichTextLabel. While it is selected, a small menu appears (parseBBCode, clear) on top, next to the Lock Object icon.
Setup:
On windows Vista, ATI Radeon HD5450

oh this menu is gone in github, so this bug no longer applies i guess


registry/rpc: vendor updates for using simpleBalancer

This PR contains only vendor updates of https://github.com/coreos/fleet/pull/1673.
/cc @hectorj2f

As it's just a part of https://github.com/coreos/fleet/pull/1673, I'll close.


AttributeError: 'DocumentIntelligenceClient' object has no attribute 'begin_analyze_document_from_url'  Version == 1.0.0b1

Azure documentation issue guidance
Thanks for opening an issue in the Azure technical documentation repository.
We use GitHub issues as the primary channel for customer and community feedback about the Azure documentation.
Creating an issue
We prefer that you create documentation feedback issues using the Feedback link on the published article - the feedback control on the doc page creates an issue that contains all the article details so you can focus on the feedback part.
You can also create a feedback issue here in the repo. If you do this, please make sure your issue lists:

[ ] The relevant Azure service or technology.
[ ] A link to the published documentation article that you have feedback about.
[ ] Clear, specific feedback that the author can act on.

Pull requests and article contributions
If you know the change that is needed in an article, we encourage you to submit the changes directly using a pull request. If the change is large, or if you want to contribute an entire article, follow these guidelines:

[ ] Don't surprise us with a big pull request or a pull request with a new article! Submit an issue that describes the details of the proposed large change or new article.
[ ] Include the service or technology area.

We'll route the issue to the appropriate content team for review and discussion.
Tech support and product feedback
If you would like to contact Microsoft about other things, such as product feedback or tech support, please review these guidelines:

If you need technical support using Azure, the paid and free support options are described here: https://azure.microsoft.com/support/options/.

Each article in the Azure technical documentation contains a product feedback button - it's best to submit product feedback directly from a relevant article. Otherwise, you can submit product feedback for most Azure products in the following product feedback forum: https://feedback.azure.com/d365community/forum/79b1327d-d925-ec11-b6e6-000d3a4f06a4.

@pruthviraj90
Thanks for sharing the feedback. Since this channel is for driving improvements towards Docs, could you please provide the URL of the specific documentation that your feedback is applicable to? That way, we can make sure your feedback is addressed by the right team.

@pruthviraj90 Thanks for sharing the feedback. Since this channel is for driving improvements towards Docs, could you please provide the URL of the specific documentation that your feedback is applicable to? That way, we can make sure your feedback is addressed by the right team.

https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/quickstarts/get-started-sdks-rest-api?view=doc-intel-4.0.0&pivots=programming-language-python#layout-model

@pruthviraj90
I've delegated this to @laujan, a content author, to review and share their valuable insights.

The code just needs to be updated to reflect the new SDK. This should include an updated from clause as well as a new AnalyzeDocumentRequest reference that I have included
from azure.core.credentials import AzureKeyCredential
from azure.ai.documentintelligence import DocumentIntelligenceClient
from azure.ai.documentintelligence.models import AnalyzeDocumentRequest

document_analysis_client = DocumentIntelligenceClient(
    endpoint=endpoint, credential=AzureKeyCredential(key)
)

poller = document_analysis_client.begin_analyze_document(model_id="prebuilt-layout",analyze_request=AnalyzeDocumentRequest(url_source=formUrl))


Block quote formatting in distill-style posts

Have you checked that your issue isn't already filed?

[X] I read through FAQ and searched through the past issues, none of which addressed my issue.
[X] Yes, I have checked that this issue isn't already filed.

Bug description
Block quotes aren't formatted properly in distill-style blog posts
How to reproduce the bug
The example blog post with block quotes gives this example
> ##### TIP
>
> A tip can be used when you want to give advice
> related to a certain content.
{: .block-tip }

which is displayed as:

However, the same example in a distill-style blog post looks like:

The former looks much better: Ideally at least, block quotes would support headers that are non-italicized and colored.
(Personally, I think that having the entire quote in non-italics is nicer, but at least the header should be formatted)
Error messages and logs
No response
What operating system are you using?
Mac
Where are you seeing the problem on?
Running locally without Docker
More info
No response

@george-gca hello! 👋
as a long-time al-folio user I'm looking to start contributing back and want to help with this issue.
I do agree with having formatting consistency between distill and non-distill posts, but this would mean hand-tweaking the CSS in template.v2.js and transforms.v2.js.
Is this advisable? Are those autogenerated files? Is formatting parity between distill and non-distill a goal for this theme?

I believe at least for the main parts (like code theme, block quote, maybe others) this is advisable. As for hand-tweaking their CSS, maybe we could add a new scss file that will be imported only in the distill layout overriding the specific rules. This way we don't have to mess inside these files, just look at which overrides will be made.
The distill template works as in this guide, simply by importing these files. These files were probably auto generated a long time ago, since their repository doesn't see an update in years and neither their site. They even posted about taking a long hiatus. So I think it is safe to say that they won't change for the foreseeable future too.

Got it! How have you and the maintainers thought about feature parity between the two kinds of post layouts, standard and distill?
For instance, creating tabs in posts works in standard but not distill.
I've had a quick skim of the post features, and the two that make sense to me to support in distill posts are

custom blockquotes, and
posts that can be cited.

What do you think? I'm happy to open a PR for the two listed above. I just realize it might be good to establish what features are supported where.

I believe it would be useful to support all (if not most) features already implemented for regular posts in the distill template, unless it conflicts with it (for example, the table of contents, or we can have another look at it). At least I see the distill template as a basic template that we shoould customize as we wish.
What do you guys thin @alshedivat, @pourmand1376?


Can you port deband.fx for videoplayers?

Hello and sorry for offtopic :)
Can you port your deband shader for videoplayers or suggest how can user do that?
I know that madVR exists, but it gives worse quality of debanding and worse perfomance - it works bad with smooth video project, which interpolates video frames to 60FPS, it's is true at least on Intel HD4000 card.

Yeah, I can use reshade on videoplayer, but I think it has better perfomance - at least without SVP on fullHD video on mpv with integrated deband glsl shader it loads GPU on ~40%, on reshade ~50%. Also it's not very comfortable to watch with reshade - at least in PotPlayer jumping to next file does not work - screen frezes until you press stop and then play.
Shaders have same syntax like https://github.com/zachsaw/RenderScripts/blob/2ceb62ab6d75ac613eab2674dfade0a42bbafa26/RenderScripts/ImageProcessingShaders/SweetFX/AdvancedCRT.hlsl vs https://github.com/crosire/reshade-shaders/blob/master/Shaders/CRT.fx
I hope it's not very difficult for you to port them
Thanks anyway)

This is the SHVDN repository...

Reshade's/reshade-shaders do not have issue section :(

Reshade's/reshade-shaders do not have issue section :(


Update URL of "dWin"

Resolves (partially) https://github.com/arduino/library-registry/issues/1112
NOTE:
The error reported by the bot:
ERROR: Library name dWin not found in the Library Manager index.

is expected. The name change is provided by https://github.com/arduino/library-registry/pull/1114

@ArduinoBot Errors fixed.

For this request I'm waiting for the indexer to pick up the new lib from #1114

Should be solved by #1114


Creating an external table fails when it is given the same options as for the underlying data

spark.range(10).write.format("delta").option("header", "true").save(path)
spark.sql(s"create table mytab (id long) using delta location '$path' options (header=true)")

It fails with the following message:
org.apache.spark.sql.AnalysisException: The specified properties do not match the existing properties at <path>.

== Specified ==
option.header=true
header=true

== Existing ==
  at org.apache.spark.sql.delta.DeltaErrors$.createTableWithDifferentPropertiesException(DeltaErrors.scala:806)
  ...

I'm not sure whether it's a bug or intended. Please close the issue if it's not a bug.
Tested on the latest master (2067d9e0a8860166515df0677de3f6f331d42b78).

I think this issue appears because when we write into delta the configuration = Map.empty (DeltaDataSource.scala line 153) and in DeltaCatalog it sets some properties (DeltaCatalog.scala line 138)
This can be the fix:
diff --git a/core/src/main/scala/org/apache/spark/sql/delta/catalog/DeltaCatalog.scala b/core/src/main/scala/org/apache/spark/sql/delta/catalog/DeltaCatalog.scala
index c0d1687..82460f2 100644
--- a/core/src/main/scala/org/apache/spark/sql/delta/catalog/DeltaCatalog.scala
+++ b/core/src/main/scala/org/apache/spark/sql/delta/catalog/DeltaCatalog.scala
@@ -82,17 +82,6 @@ class DeltaCatalog extends DelegatingCatalogExtension
       writeOptions: Map[String, String],
       sourceQuery: Option[DataFrame],
       operation: TableCreationModes.CreationMode): Table = {
-    // These two keys are tableProperties in data source v2 but not in v1, so we have to filter
-    // them out. Otherwise property consistency checks will fail.
-    val tableProperties = allTableProperties.asScala.filterKeys {
-      case TableCatalog.PROP_LOCATION => false
-      case TableCatalog.PROP_PROVIDER => false
-      case TableCatalog.PROP_COMMENT => false
-      case TableCatalog.PROP_OWNER => false
-      case TableCatalog.PROP_EXTERNAL => false
-      case "path" => false
-      case _ => true
-    }
     val (partitionColumns, maybeBucketSpec) = convertTransforms(partitions)
     var newSchema = schema
     var newPartitionColumns = partitionColumns
@@ -135,7 +124,7 @@ class DeltaCatalog extends DelegatingCatalogExtension
       provider = Some(DeltaSourceUtils.ALT_NAME),
       partitionColumnNames = newPartitionColumns,
       bucketSpec = newBucketSpec,
-      properties = tableProperties.toMap,
+      properties = Map.empty,
       comment = commentOpt)

     val withDb = verifyTableAndSolidify(tableDesc, None)

but DeltaTableBuilderSuite doesn't pass anymore.
Where can I find mode info regarding metaData configuration?
Thank you!
Disclaim: I'm newcomer :)

I have created PR #820 trying to solve this bug. There is another PR #374 to support setting metadata configuration upon write, but the inconsistency remains.
disclaimer: I'm a newcomer


[BUG] The bundled JDK cannot be downloaded

Can I choose not to download this jdk? I AM NOW in China network is not good, has been downloading failure, I have been looking for a long time, this is where to call? I want to modify the call to my local, but I can't find it.

@xiaodizi you can customize the java_home https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#custom-runtime-jdk
and the download logic is here runtime-jdk-provision.gradle
and
JdkDownloadPlugin

Thanks, I found this location and I am trying to change it.

@xiaodizi you can customize the java_home https://github.com/opensearch-project/OpenSearch/blob/main/DEVELOPER_GUIDE.md#custom-runtime-jdk
and the download logic is here runtime-jdk-provision.gradle and JdkDownloadPlugin

Closing this issue since a bunch of alternatives were provided and the issue is unrelated to OpenSearch itself. :)


Failed to start Windows, and Internal Error with Boot Camp

Describe the bug
I followed the Installation Guide step by step. But when I use Boot Camp to install Windows, it hints Boot Camp encountered an internal error.

Then I use WinPE to install Windows, after installing windows, it restart to start with Windows, then Windows hinted "ACPI_BIOS_ERROR".
Also I failed to upgrade to macOS Big Sur in Mojave.
Expected behavior
It should be able to switch macOS and Windows smoothly.
Configuration

HaC Mini version [e.g: 2.0]: latest
OSX version [e.g: 10.14.6]: 10.15.6
NUC model [e.g: NUC8i7HNK]: NUC8i7HVK
Boot SSD model and protocol [e.g: Samsung EVO 860 1TB, SATA]: Samsung PM961 1T NVME macOS
Second SSD model and protocol (if installed) [e.g: HP EX920 1TB, NVMe]: WDC SN550 1T NVME Windows
First DIMM model [e.g: Patriot DDR4-2666 16GB]: Team DDR4-2666 16GB
Second DIMM model (if installed):
Display port(s) used [e.g: USB-C, mini DP]: HDMI
Display resolution(s) [e.g: 4K, 5K]: 2K
Any TB3 devices:
Any USB devices:
Any Wi-Fi/Bluetooth devices [e.g:DW1820A, BCM94360CS2, Intel 8265]:  DW1820A

Modifications
None
Panic log

Dual SSD can’t run boot camp, you have to remove one first

Ok I know，thanks bro.

Closing since this is a macOS issue.


Add --help flag

stac-node-validator --help should print the full command synopsis, a brief description of the command, and ideally an example. It should exit with 0. See for example grep --help, vlc --help.
(Moved from #20.)

Dupe of #11.


Upgrade to paramiko 1.16

Among other things, it includes support for SHA-2 based key exchange and ECDSA keys.
http://www.paramiko.org/changelog.html
Reported by @jfryman.

@lakshmi-kannan is taking this over so re-assigning it to him.
We plan to test those changes on our build server for a couple of days and if there are no regressions, merge them into master and include in v1.4.


LIMO example:  scipy.linalg.lstsq() versus scipy.linalg.pinv()

Hello,
My colleagues and I were trying to recreate the results of the LIMO dataset using MNE. Currently there is a tutorial on this on the MNE website. However, the tutorial doesn't separately generate beta parameters for face a and face b as LIMO does in their example. Instead, the beta reflecting face a - face b is used in the MNE tutorial. This is because linear_regression() function (here) used in the MNE implementation of LIMO computes the solution to the least-squares equation, y = XB + e, via scipy's linear algebra least squares function linalg.lstsq() which inverts X in order to compute B. This is different to LIMO's implementation which uses a Moore-Penrose pseudoinverse to compute the beta parameters in order to avoid singular matrix issues which linalg.lstsq() cannot handle. At least, this is our understanding.
Which you can see if you try to produce beta parameters for face a and face b individually via (this part of the tutorial)
predictor_vars = ['face a', 'face b', 'phase-coherence', 'intercept']

design = limo_epochs.metadata[['phase-coherence', 'face']].copy()
design['face a'] = np.where(design['face'] == 'A', 1, 0)
design['face b'] = np.where(design['face'] == 'B', 1, 0)
design['intercept'] = 1
design = design[predictor_vars2]

reg = linear_regression(limo_epochs,
                        design_matrix=design,
                        names=predictor_vars)

resulting in
Traceback (most recent call last):

  File "<ipython-input-124-7db96c3c5024>", line 1, in <module>
    reg = _fit_lm(limo_epochs.get_data(), design, predictor_vars)

  File "...\MNElimo_example.py", line 41, in _fit_lm
    sqrt_noise_var = np.sqrt(resid_sum_squares / df).reshape(data.shape[1:])

  File "C:\...\anaconda3\envs\mne\lib\site-packages\scipy\linalg\basic.py", line 968, in inv
    raise LinAlgError("singular matrix")

LinAlgError: singular matrix

To skirt this issue we created our own versions of the MNE functions linear_regression() and _fit_lm() (again, here) shown below:
"""
Created on Fri Oct 15 15:29:38 2021

@author: Rhys Hobbs<EMAIL_ADDRESS>"""
from inspect import isgenerator
from collections import namedtuple

import numpy as np

from mne.source_estimate import SourceEstimate
from mne.epochs import BaseEpochs
from mne.evoked import Evoked, EvokedArray
from mne.utils import logger, warn
from mne.io.pick import pick_types

def _fit_lm_pinv(data, design_matrix, names):
    """Aux function."""
    from scipy import stats, linalg
    n_samples = len(data)
    n_features = np.product(data.shape[1:])
    if design_matrix.ndim != 2:
        raise ValueError('Design matrix must be a 2d array')
    n_rows, n_predictors = design_matrix.shape

    if n_samples != n_rows:
        raise ValueError('Number of rows in design matrix must be equal '
                         'to number of observations')
    if n_predictors != len(names):
        raise ValueError('Number of regressor names must be equal to '
                         'number of column in design matrix')

    y = np.reshape(data, (n_samples, n_features))

    ################ CHANGED ############################
    betas = linalg.pinv(design_matrix).dot(y)
    yhat = design_matrix.dot(betas).to_numpy()
    resid_sum_squares = np.sum((yhat - y)**2, axis=0)
    #####################################################

    df = n_rows - n_predictors
    sqrt_noise_var = np.sqrt(resid_sum_squares / df).reshape(data.shape[1:])

    ################ CHANGED ############################
    design_invcov = linalg.pinv(np.dot(design_matrix.T, design_matrix))
    #####################################################

    unscaled_stderrs = np.sqrt(np.diag(design_invcov))
    tiny = np.finfo(np.float64).tiny
    beta, stderr, t_val, p_val, mlog10_p_val = (dict() for _ in range(5))
    for x, unscaled_stderr, predictor in zip(betas, unscaled_stderrs, names):
        beta[predictor] = x.reshape(data.shape[1:])
        stderr[predictor] = sqrt_noise_var * unscaled_stderr
        p_val[predictor] = np.empty_like(stderr[predictor])
        t_val[predictor] = np.empty_like(stderr[predictor])

        stderr_pos = (stderr[predictor] > 0)
        beta_pos = (beta[predictor] > 0)
        t_val[predictor][stderr_pos] = (beta[predictor][stderr_pos] /
                                        stderr[predictor][stderr_pos])
        cdf = stats.t.cdf(np.abs(t_val[predictor][stderr_pos]), df)
        p_val[predictor][stderr_pos] = np.clip((1. - cdf) * 2., tiny, 1.)
        # degenerate cases
        mask = (~stderr_pos & beta_pos)
        t_val[predictor][mask] = np.inf * np.sign(beta[predictor][mask])
        p_val[predictor][mask] = tiny
        # could do NaN here, but hopefully this is safe enough
        mask = (~stderr_pos & ~beta_pos)
        t_val[predictor][mask] = 0
        p_val[predictor][mask] = 1.
        mlog10_p_val[predictor] = -np.log10(p_val[predictor])

    return beta, stderr, t_val, p_val, mlog10_p_val

def plinear_regression(inst, design_matrix, names=None):
    """Fit Ordinary Least Squares (OLS) regression.
    Parameters
    ----------
    inst : instance of Epochs | iterable of SourceEstimate
        The data to be regressed. Contains all the trials, sensors, and time
        points for the regression. For Source Estimates, accepts either a list
        or a generator object.
    design_matrix : ndarray, shape (n_observations, n_regressors)
        The regressors to be used. Must be a 2d array with as many rows as
        the first dimension of the data. The first column of this matrix will
        typically consist of ones (intercept column).
    names : array-like | None
        Optional parameter to name the regressors (i.e., the columns in the
        design matrix). If provided, the length must correspond to the number
        of columns present in design matrix (including the intercept, if
        present). Otherwise, the default names are ``'x0'``, ``'x1'``,
        ``'x2', …, 'x(n-1)'`` for ``n`` regressors.
    Returns
    -------
    results : dict of namedtuple
        For each regressor (key), a namedtuple is provided with the
        following attributes:
            - ``beta`` : regression coefficients
            - ``stderr`` : standard error of regression coefficients
            - ``t_val`` : t statistics (``beta`` / ``stderr``)
            - ``p_val`` : two-sided p-value of t statistic under the t
              distribution
            - ``mlog10_p_val`` : -log₁₀-transformed p-value.
        The tuple members are numpy arrays. The shape of each numpy array is
        the shape of the data minus the first dimension; e.g., if the shape of
        the original data was ``(n_observations, n_channels, n_timepoints)``,
        then the shape of each of the arrays will be
        ``(n_channels, n_timepoints)``.
    """
    if names is None:
        names = ['x%i' % i for i in range(design_matrix.shape[1])]

    if isinstance(inst, BaseEpochs):
        picks = pick_types(inst.info, meg=True, eeg=True, ref_meg=True,
                           stim=False, eog=False, ecg=False,
                           emg=False, exclude=['bads'])
        if [inst.ch_names[p] for p in picks] != inst.ch_names:
            warn('Fitting linear model to non-data or bad channels. '
                 'Check picking')
        msg = 'Fitting linear model to epochs'
        data = inst.get_data()
        out = EvokedArray(np.zeros(data.shape[1:]), inst.info, inst.tmin)
    elif isgenerator(inst):
        msg = 'Fitting linear model to source estimates (generator input)'
        out = next(inst)
        data = np.array([out.data] + [i.data for i in inst])
    elif isinstance(inst, list) and isinstance(inst[0], SourceEstimate):
        msg = 'Fitting linear model to source estimates (list input)'
        out = inst[0]
        data = np.array([i.data for i in inst])
    else:
        raise ValueError('Input must be epochs or iterable of source '
                         'estimates')
    logger.info(msg + ', (%s targets, %s regressors)' %
                (np.product(data.shape[1:]), len(names)))

    ################ CHANGED ############################
    lm_params = _fit_lm_pinv(data, design_matrix, names)
    #####################################################

    lm = namedtuple('lm', 'beta stderr t_val p_val mlog10_p_val')
    lm_fits = {}
    for name in names:
        parameters = [p[name] for p in lm_params]
        for ii, value in enumerate(parameters):
            out_ = out.copy()
            if not isinstance(out_, (SourceEstimate, Evoked)):
                raise RuntimeError('Invalid container.')
            out_._data[:] = value
            parameters[ii] = out_
        lm_fits[name] = lm(*parameters)
    logger.info('Done')
    return lm_fits

Our question is this: is there a reason for using linalg.lstsq() over the Moore-Penrose pseudoinverse?
If not, We're happy to make a push request. But I'm not sure what would be the best implementation. I'd imagine something like adding an optional input to linear_regression() which chooses one method over the other.

That does work. But it leaves all the parameters referenced to the intercept. Which is really just moving the issue around. It's fine if you've standardised your data because then you're intercept is 0 anyway.  Using the pseudoinverse skirts this issue. To quote the LIMO paper:

Although the design matrices made up by LIMO EEG are almost always rank deficient (each condition is coded in one column of X), F or T tests are exact, that is, they give identical results to that obtained by applying a standard inverse to a full rank matrix.

So, should I take it that the reason for using linalg.lstsq() over the Moore-Penrose pseudoinverse is that it's a matter of preference?

@JoseAlanis please see


Warnings are surfaced during build when fragments with params are used in queries

Version
4.0.0-beta.1
Summary
failOnWarnings.set(true) Build fails with the message:
connectionqueries.graphql: (1, 23): Apollo: Variable "nextIntrosKey" is unused
The query is defined as:
query IntrosPageQuery($nextIntrosKey: String) {
    me {
        ...ApolloNotificationCounts
        ...ApolloIntros
    }
}

The fragment is defined as:
fragment ApolloIntros on User {
    intros(after: $nextIntrosKey) {
        data {
            ...ApolloIntroUser
            ...ApolloFakeUser
        }
        pageInfo {
            ...ApolloPaging
        }
    }
}

It seems like this should work, if not please let me know what I can do to correct this. Thanks!
Steps to reproduce the behavior
No response
Logs
Execution failed for task ':core-data:generateServiceApolloIr'.
> Apollo: Warnings found and 'failOnWarnings' is true, aborting.

I think this is fixed by https://github.com/apollographql/apollo-kotlin/pull/5290 but hasn't been released yet. In the meantime it can be tried out with the snapshots.

Thank you!

Closing as the fix is available in 4.0.0-beta.2


row vs column vector dimension mismatch in de

Line 136 in de.cpp causes arma to throw a dimension mismatch exception (at least if n_vals is more than 1).
The bug is fixed if I change line 134 to
arma::rowvec prop_rand = arma::randu(1, n_vals)(2par_b) - par_b; // generate a vector of U[-b,b] RVs

Thanks for reporting this (and sorry for the delay). Should be fixed now.


Evaluation code

Hi @minhoooo1, excellent work on self-supervised video pre-training! It is really interesting that such a simple paradigm contributes to superior performances!
Since this repo only contains the pre-training code, I wonder if you have any plans to release the evaluation code on DAVIS-2017 and K-400?

Thank you for your interest. I plan to update the code, paper, and weights this week.
------------------ 原始邮件 ------------------
发件人: @.>;
发送时间: 2023年11月8日(星期三) 上午10:14
收件人: @.>;
抄送: @.>; @.>;
主题: [minhoooo1/CatMAE] Evaluation code (Issue #1)
Hi @minhoooo1, excellent work on self-supervised video pre-training! It is really interesting that such a simple paradigm contributes to superior performances!
Since this repo only contains the pre-training code, I wonder if you have any plans to release the evaluation code on DAVIS-2017 and K-400?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.Message ID: @.***>

Thank you very much for the prompt reply :)

@Haochen-Wang409 Can you provide your email address? I would like to send you the assessment code, as all the content cannot be made public on GitHub at the moment.

Thank you very much!! My e-mail is<EMAIL_ADDRESS>

Hello @minhoooo1
Is it possible to send your codes to my email address ?
I am also interested in your work.
It is<EMAIL_ADDRESS>Regards

@rvandeghen

Hello @minhoooo1!
I enjoyed your work! Thank you for your great contribution to visual self-supervised learning fields :)
Is it possible to send your evaluation code to my e-mail too<EMAIL_ADDRESS>Best,


fix: amount sometimes being incorrectly positioned

fix: amount sometimes being incorrectly positioned
Removes the absolute positioning from the nav item amount which caused it to be pulled down with an increase in bottom padding.
chore: removes border bottom from nav items
Removes the functionality for adding a bottom border to certain nav items and tweaks the space between groups of nav items a little to account for it.
Signed-off-by: Philipp Rudloff<EMAIL_ADDRESS>

I think this looks fine.
How much extra work would it be to put props.routeName as a class on each AppNavItem?
It looks like we already do :data-testid="props.routeName", so could we copy that to :class="props.routeName" also? (or if you wanted to be extra namespace-y:class="nav-item-${props.routeName}", either is fine by me)
Lmk, I'd give this a 👍 whichever way.

How much extra work would it be to put props.routeName as a class on each AppNavItem?
It looks like we already do :data-testid="props.routeName", so could we copy that to :class="props.routeName" also? (or if you wanted to be extra namespace-y:class="nav-item-${props.routeName}", either is fine by me)

That would be simple, yes. What do you want to use it for?

Well, it would be handy to have if we wanted to tweak a menu item from the CSS, shall we add that while we are here if its simple?

I’ve added this now.

Sorry one last thing: How comes we needed to add that || undefined in that last commit? I'm asking as we added that for the data-testid and not the className. Is props.routeName ever falsey?

Sorry one last thing: How comes we needed to add that || undefined in that last commit?

It prevents adding an empty data-testid to categories which don’t have a route name.

I'm asking as we added that for the data-testid and not the className. Is props.routeName ever falsey?

I actually need to add the same protection here, too


Removed roles from install-os service since they already called in configure-network service

The edpm_bootstrap and the edpm_kernel roles are already defined and called in the configure-network service [1], so their presence in install-os it's useless.
[1] https://github.com/openstack-k8s-operators/dataplane-operator/blob/130162a8b3727d9dbc7b34ea441c2ea7364db3e6/config/services/dataplane_v1beta1_openstackdataplaneservice_configure_network.yaml#L24-L34

recheck

recheck

/override rdoproject.org/github-check


Added testcase to configure kdump on SAN device

Set dev_path var with SAN device name inside config to run KernelCrash_KdumpSAN tests.

Can one of the admins verify this patch?

20210527070329627417.debug.log
Run log for setup and crash trigger. Verify dump fails as vmcore is not saved on san disk due to below bugs,
https://bugzilla.linux.ibm.com/show_bug.cgi?id=191190
https://bugzilla.linux.ibm.com/show_bug.cgi?id=190831

will review it.

Closing this as this is already merged here https://github.com/open-power/op-test/pull/685/commits/33a5fcebcbb3c83bffaf767abdae6dccc00eb436


[Documentation Bug]: Fix Text in README

Describe the bug ✍
This sentence in README:

This open source repository contains collection of games build on basic tech stacks in web development . Use your creativity and build your own game and contribute to the repository by making PR

can be changed to:

This open source repository contains a collection of games built on basic tech stacks in web development.  Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇


1HE NodeShape backwards compatibility

Relates to #417.
I'm embarrassed to say that my previous PR wasn't entirely complete.  We had some problem with our legacy models and it took some digging to figure out why -- the legacy serialized NodeShape object needs to be massaged a bit at load to work with the new implementation.   This PR adds that massaging.  Sorry I overlooked this the first time!

Oh it looks like some of the python stuff failed right at the beginning.

@clocklear see https://github.com/combust/mleap/pull/431 on why python fails atm.

Alright, I'm going to pin scikit as well to make the build pass.  If we fix that in some other way, I can undo this.


Use and expose --app-port dynamicaly

Fixes #161

@all-contributors add @mcruzdev for  maintenance

Hi @mcruzdev ,
I open

https://github.com/quarkiverse/quarkiverse-devops/pull/276

and thanks a lot for your contributions!


feat(cache): delete a single entity and broadcast

Is your feature request related to a problem? Please describe.
Let's say I have a type Foo, and it's used by many queries, like an example below
type Foo {
  id: ID!
  bar: String
}

type Query {
  getFoos: [Foo]
  getSpeicalFoos:[Foo]
  getMyFoos: [Foo]
  # ... and so on
}

Mutation {
  deleteFoo(id: ID!): Foo
}

My views use many queries with many foo entities.
And if I click a button, it deletes a single entity from database.
So I want to delete the exact entity from the cache, and broadcast this removal to every query which gets Foo as a response.
Currently, it seems not possible, but I believe that'd be so convenient.
Describe the solution you'd like
Something like this.
update: (cache, result) {
  // This would be automatically broadcasted.
  cache.delete(idFields: {
      '__typename': 'Foo',
      'id': '3h34lk5lj6',
     },
  );                                          }
}

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.

This goes both ways:

deleted entries are kept in cached query
newly inserted entries are not added to the cached query

As a workaround I delete it manually from the cache
client.cache.store.delete('$typename:$id');

But you might need to handle the rebroadcast manually as well
client.queryManager.maybeRebroadcastQueries(force: true);

As a workaround I delete it manually from the cache
client.cache.store.delete('$typename:$id');

But you might need to handle the rebroadcast manually as well
client.queryManager.maybeRebroadcastQueries(force: true);

This stopped working on the latest beta version FYI @vincenzopalazzo


Documentation improvements

Introduce a feature to use the unstable rustdoc cfg_attr feature and
classify all public items acoordinoly
Introduce a
i-implement-a-third-party-backend-and-opt-into-breaking-changes
feature flag that is used to hide most of the previously hidden API
behind this feature flag. The idea is that we can use this feature to
communicate some documentation about implementing third party backends
while making clear that we may break those API's potentially
Change the any macro generated code to only use public API's or
explicitly as diesel::internal exported API's
Add a lot documentation in different places
Make diesel_derives use the with-deprecated/without-deprecated
feature flags as well
Simplify the signature of Connection::load even more

Open points:

[x] go again over the documentation
[x] Inspect all ignored doc tests to see if they are building and if we could convert them to tests that are compiled
[x] Fix any test failures
[x] Maybe split up this commit into smaller ones
[x] Fix merge conflict
[x] Remove the doc building for the "special" branch

A preview of the new documentation can be found here: https://docs.diesel.rs/diesel_2.0_documentation_update/diesel/index.html

diesel 2.0 will come soon?

@NateLing We do not give any timeline about this. It will definitive take longer if more people ask this question as we need to answer all those questions, so maybe stop doing that.
I marked your comment as off topic as this PR definitely the wrong place to ask this question.

For anyone coming here from "This week in rust": I want to use this chance to reach out to potential users to get answers to the following questions:

Is there something that is missing from the API documentation in your opinion?
Did you remember searching something longer than expected in our documentation? If yes do you remember details?
Can something else be improved on the existing documentation?
Anything else you want to tell us about the API documentation.

Please leave a comment here or in this users.rust-lang.org thread.

Introduce a feature to use the unstable rustdoc cfg_attr feature and
classify all public items acoordinoly

I'm assuming you mean the doc_cfg feature? Sure I can do that.

@mejrs Just to clarify that: This PR already implements that. Whats left is going over the generated documentation to check if the corresponding boxes appear in all locations.

@mejrs Just to clarify that: This PR already implements that. Whats left is going over the generated documentation to check if the corresponding boxes appear in all locations.

Ah, okay, that wasn't clear to me. I didn't see that this is a pull request rather than an issue and it very much read like a wishlist to me.

@diesel-rs/reviewers This is ready for a review now. Especially I would like to hear opinions on the following points:

Introduction of the i-implement-a-third-party-backend-and-opt-into-breaking-changes feature + classification the corresponding API's?

Is that a good idea?
Are there API's missing?
Are there any API's that you would consider useful for the usage outside of implementing custom connections/backends? (So that we would guarantee stability for them as well)
Should that feature flag be a raw cfg flag instead, so noone could accidentally depend on it? (I think no, as it mostly hides stuff that's just useful for implementing a backend/connection, which is something almost no user will do. So there is only a minor chance that someone accidentally depends on a unstable item)

What do you you think of DieselReserveSpecialization to reserve us the right to specialize certain QueryFragment impls later on? (That might be useful for allowing custom backends to provide custom implementations for stuff, or to specialize stuff in diesel itself)
What do you think about passing a reference to the Backend type into the query builder? The idea there is to be able to use some runtime information as part of the query building process. Examples here are the version of the backend (so is it sqlite 3.27 or sqlite 3.37?) or possibly in the future even something like which backend at all is used there for a theoretical AnyConnection implementation (I have some rough ideas about that, but nothing written down or even implemented yet)
What do you think about the added documentation how to implement a custom connection/backend?

@diesel-rs/reviewers I would like to move on with this PR and plan to merge this at 21.2 if there are no fundamental issues till then.

@diesel-rs/reviewers I would like to merge this tomorrow if there are no objectives.

On the other topics I'll definitely trust you on writing the doc and moving stuff around to make it more private ^^

:heart:

What do you think about passing a reference to the Backend type into the query builder? The idea there is to be able to use some runtime information as part of the query building process. Examples here are the version of the backend (so is it sqlite 3.27 or sqlite 3.37?) or possibly in the future even something like which backend at all is used there for a theoretical AnyConnection implementation (I have some rough ideas about that, but nothing written down or even implemented yet)

I feel like typically, new versions of backends may introduce new syntaxes, but do not modify behavior of old syntaxes.
Because we work as a query builder, we typically map to SQL syntax, and not to functionality.
So for this to be useful, we'd need a new backend version to be released in such a way that makes us want to change the mapping of one syntax to another without just introducing a new function name for that new syntax (e.g. if mysql or sqlite introduced an = ANY( syntax as well in a new version), and even then, if whether the query can be cached from its type is a const we probably won't get the true benefit from it, so we'd need to find a scenario where this is really useful.
I'm not sure to what extent this scenario is likely enough that we want to have the additional complexity of passing a ref to the typically-zst around.

Let me try to motivate the current change with some more details.
I see two use cases here:

Providing something like:

#[derive(MultiConnection)]
enum MultiConnection {
    Pg(PgConnection),
    Mysql(MysqlConnection),
    // …
}

where #[derive(MultiConnection)] should "magically" generate a Connection/Backend implementation that works for all of the provided connection types. This would require at some point providing QueryFragment<MyMultiConnectionBackend> impls, which need to know for what backend they need to generate SQL.  That's probably my main motivation to include this at all and that's something I would like to try after releasing diesel 2.0.
(To be clear here: That's not something that I would see in diesel itself, but rather as third party helper crate.)
2. Providing fall back solutions for newer SQL features for some database system. That's the point you've discussed above. My motivating example here are sqlite returning clauses. Even if that turned out to be not feasible due to sqlite's limitations, there where some ideas to emulate support for returning clauses using CTE's. That would have required that we generate different queries based on the sqlite version. Again we would need to pass some argument to the querybuiding process there to customize it.
So now both motivating use cases are not directly relevant yet, but that's both something that I could imaging to happen while diesel 2.x is the current major diesel version. As that would be a breaking change we can do that either now, or later requiring another major version bump or later by finding another clever solution (for example by marking the corresponding functions as "private"/"i-implement-a-third-party-backend-and-opt-into-breaking-changes".
To address some on for concerns:

I'm not sure to what extent this scenario is likely enough that we want to have the additional complexity of passing a ref to the typically-zst around.

As of this change we wrap the reference into AstPass. That's already a non-zerosized type so putting a bit more information in there should not hurt anything.  Additionally I would expect that this reference currently is just removed by the compiler as dead code (haven't checked that…).

What would be a scenario where we need to update the to_sql impl based on backend version but not whether stuff is cacheable and how likely is it? (if super unlikely, solution 1 below is maybe not the best complexity/functionality compromise and I think we'd probably prefer 2 or 3)

Caching already involves more than one layer of stuff. There is QueryId::HAS_STATIC_QUERY_ID and there is AstPass::unsafe_to_cache_prepared. The first one says how something can be cached (either by type id or by sql string), while the second one states if something could be checked. That means the second one (available inside of QueryFragment::walk_ask) always overwrites the first one. Let's go through several potential issues here:

Cacheability changes depending on the passed backend data -> That can be addressed by calling unsafe_to_cache_prepared conditionally, as it's already done by several query fragment impls (For example here).
The metadata change if a query could be cached by type id or by sql string. -> Just always cache by sql string and accept the minor performance hit which seems to be only relevant for sqlite in memory connections.

That means the second one (available inside of QueryFragment::walk_ask) always overwrites the first one

Alright that looks good for me then :)

Thanks for the feedback :+1:. I will move on and merge this now.


Update icons to use latest product logos

These icons appear to be managed in the /admin. Giorgos confirms this:

We should confirm that the size of the icons is remaining the same, or if it is changing for the new UI, and then we can track down the necessary images.

https://github.com/mozilla/kitsune/projects/3


MaxFileSize per file in multiples

Hi, I would like to know if it is possible to configure MaxFileSize for each file sent with multiples, because currently it is the size plus all the files and not per file, a solution?
Thank you !

I think that options.maxFileSize should be per file currently. Can you give an example?
Also, I think you can use the file event and throw in it if the size is exceeded.

@tunnckoCore Exemple, I send an array with several images in my body "files", but it adds the sizes, I don't know if it's because the images are in the same body or not

Hi,
I'm having the same issue.
EXAMPLE:
In my frontEnd I check the file is not greater than 10mb, and in formidable I have maxFileSize: 20 * 1024 * 1024,
When I append onto the formData several files lighter than 10 mb, but in over all geather than 20mb, say 5 files of 9 mb, the formidable api sends the error:
FormidableError: options.maxFileSize (20971520 bytes) exceeded, received 20987106 bytes of file data
So certainly the maxFileSize is not per file, as the param naming make someone beliefe, but for the whole package like maxAllFilesSize.
Any idea or something i'm not considering?
Thanks!

I will look into it

fixed in 3.2.0


Wrong node-gyp library path resolving for VS2012

The property "libraries" is expected to be a relative path to the binding.gyp file. When the VS2012 Pro project type is selected, the library is resolved from the folder "build", not from the folder where the binding.gyp is.
Example:
binding.gyp:
{
  "targets": [
    {
      "target_name": "MyLib",
      "type": "shared_library",
      "sources": [ ... ],
      "conditions": [
        [ "OS=='win'", { "libraries": [
          "..\\Library\\binaries\\x64\\Release\\mylib.lib"
        ] } ]
      ]
    }
  ]
}

c:\...> dir ..\\Library\\binaries\\x64\\Release\\mylib.lib
   shows file info
c:\...> node-gyp configure --msvs_version=2012 && node-gyp build
   ...
   LINK : fatal error LNK1181: cannot open input file '..\Library\binaries\x64\Release\mylib.lib'
   ...

Adding one more "../" to the library path is workaround for this issue.
c:\...>node-gyp -v
v0.10.10

It seems like perhaps this should be closed. Feel free to re-open (or leave a comment requesting that it be re-opened) if you disagree. I'm just tidying up and not acting on a super-strong opinion or anything like that.

@JayBeavers The former. Paths in libraries are still relative to build/….vcxproj, not binding.gyp.


Huge refactoring and Prometheus integration

Coverage increased (+0.06%) to 15.256% when pulling aa2766c23dbbd13485b487d318edb16e75d0a7dd on corny:prometheus into ddb856a52985345578d5d96adf89ab6ea0c36a32 on taktv6:master.

Coverage increased (+1.8%) to 16.966% when pulling 265cb18509fc989f67eb67954969145e557534cd on corny:prometheus into ddb856a52985345578d5d96adf89ab6ea0c36a32 on taktv6:master.

Coverage increased (+1.8%) to 16.966% when pulling b6afa1e4edffff2a3d46697d54bb7cb5d937d08b on corny:prometheus into ddb856a52985345578d5d96adf89ab6ea0c36a32 on taktv6:master.

Coverage increased (+1.8%) to 16.966% when pulling 9410dff9bc664042ea40747a075cffb60953c4ab on corny:prometheus into ddb856a52985345578d5d96adf89ab6ea0c36a32 on taktv6:master.

Coverage increased (+1.8%) to 16.966% when pulling 9410dff9bc664042ea40747a075cffb60953c4ab on corny:prometheus into ddb856a52985345578d5d96adf89ab6ea0c36a32 on taktv6:master.

Coverage increased (+1.8%) to 16.951% when pulling e5a05647325d6ec88c8c5e6ef5127412ef5eb23f on corny:prometheus into ddb856a52985345578d5d96adf89ab6ea0c36a32 on taktv6:master.

Coverage increased (+1.8%) to 16.951% when pulling e5a05647325d6ec88c8c5e6ef5127412ef5eb23f on corny:prometheus into ddb856a52985345578d5d96adf89ab6ea0c36a32 on taktv6:master.

Coverage increased (+1.8%) to 16.966% when pulling d5f51d3687d322e41631343241ee08d4827991be on corny:prometheus into ddb856a52985345578d5d96adf89ab6ea0c36a32 on taktv6:master.

Coverage increased (+1.8%) to 16.974% when pulling 37d889ea431386febf908058fca8c2d47e52a959 on corny:prometheus into ddb856a52985345578d5d96adf89ab6ea0c36a32 on taktv6:master.

Coverage increased (+1.7%) to 16.929% when pulling 8f2f762f4d64e921afcfa57dee40ed206e849a3f on corny:prometheus into ddb856a52985345578d5d96adf89ab6ea0c36a32 on taktv6:master.

Coverage increased (+1.7%) to 16.892% when pulling 7ad05b10b6064809f9aa510fd8d60510ca7fc581 on corny:prometheus into ddb856a52985345578d5d96adf89ab6ea0c36a32 on taktv6:master.

Coverage increased (+1.7%) to 16.892% when pulling 7ad05b10b6064809f9aa510fd8d60510ca7fc581 on corny:prometheus into ddb856a52985345578d5d96adf89ab6ea0c36a32 on taktv6:master.

Coverage increased (+1.7%) to 16.877% when pulling 109fab504384410a0d8ab023229dd469c96541ed on corny:prometheus into ddb856a52985345578d5d96adf89ab6ea0c36a32 on taktv6:master.

Coverage increased (+1.7%) to 16.892% when pulling be4ba8d66ae85c07249a9056ee2f1b60bc76b6df on corny:prometheus into ddb856a52985345578d5d96adf89ab6ea0c36a32 on taktv6:master.

Coverage increased (+1.7%) to 16.892% when pulling 387d111d328bbdc3a0259fd9543b61c5092df16d on corny:prometheus into ddb856a52985345578d5d96adf89ab6ea0c36a32 on taktv6:master.


Update DistroSpecial.h

Upgrade to Alpine v3.14.0

@agowa338, any movement on this? Seems like a pretty straight forward merge to me.

At this point I'm more than a few point-releases behind. Maybe I should re-commit with the latest :)

Good point. Security patches are pretty important.
Not sure how to proceed if @agowa338 doesn't respond though. I don't know how the WSL team handles stagnant distros, and whether they'd be willing to let someone else publish to the Windows Store.

Good point. Security patches are pretty important.
Not sure how to proceed if @agowa338 doesn't respond though. I don't know how the WSL team handles stagnant distro launchers, and whether they'd be willing to let someone else publish to the Windows Store.

No idea. I doubt I'm the person for this since my competency is pretty much tapped out with adjusting those lines, haha. I doubt I'd ever be able to triage meaningful issues nor feautre requests :(

Good point. Security patches are pretty important.

@EccentricVamp Just a reminder for you. You'll have to run a system update via apk anyway. Updating the WSL package only affects new installations. It doesn't change the data within the filesystem after it has been installed and launched once.
I don't see any security issue, as long as updating via apk works.

@agowa338  understood. I actually bumped this issue because I was setting up WSL on a new system and noticed the outdated version. Thanks for the advice though!


chore: switch default keyring backend

[x] closes https://github.com/celestiaorg/celestia-app/issues/405
[x] manually test that default value is switched

Codecov Report

Merging #1141 (7bb4bba) into main (c16d6e7) will increase coverage by 0.28%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1141      +/-   ##
==========================================
+ Coverage   47.98%   48.27%   +0.28%
==========================================
  Files          71       71
  Lines        3995     3994       -1
==========================================
+ Hits         1917     1928      +11
+ Misses       1909     1899      -10
+ Partials      169      167       -2

Impacted Files
Coverage Δ

pkg/shares/share_splitting.go
73.56% <100.00%> (+13.33%)
:arrow_up:

x/blob/types/payforblob.go
80.35% <100.00%> (ø)

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


map_rect allows _rng functions

Summary:
The stan compiler allows to use _rng functions with map_rect, but the program cannot compile (and it should not even parse).
Description:
The map_rect can be used with parallelism enabled. As such the parallelized function must not call any rng as this will otherwise require handling random streams with parallelism. This is not yet supported and as such the map_rect parsers needs to reject and function with a _rng suffix.
Reproducible Steps:
The following Stan program translates, but fails to compile:
functions {
  // logistic regression lpmf
  vector lr(vector beta, vector theta, real[] x, int[] y) {
    real lp = bernoulli_logit_lpmf(y | beta[1] + to_vector(x) * beta[2]);
    return [lp]';
  }
  vector lr_rng(vector beta, vector theta, real[] x, int[] y) {
    int draw = bernoulli_rng(inv_logit(sum(beta[1] + to_vector(x) * beta[2])));
    return [ draw ]';
  }
}
data {
  // N = 12 data points
  int y[12];
  real x[12];
}
transformed data {
  // K = 3 shards
  int ys[3, 4] = { y[1:4], y[5:8], y[9:12] };
  real xs[3, 4] = { x[1:4], x[5:8], x[9:12] };
  vector[0] theta[3];
}
parameters {
  vector[2] beta;
}
model {
  beta ~ normal(0, 1);
  target += sum(map_rect(lr, beta, theta, xs, ys));
}
generated quantities {
  vector[12] out = map_rect(lr_rng, beta, theta, xs, ys);
}

Data for the program:
x <-
c(-0.0950975784183072, 0.439459508843735, 0.456727631025774, -0.682256473834409, -0.136250176411917,
-0.249300158948066, 0.23367488898078, 0.838578027991903, 1.03590847440499, -1.3742813878688, -0.160658830059433,
-0.588358254227975)
y <-
c(1, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0)

error message from compiler:
In file included from <built-in>:1:
In file included from ./examples/map_rect/logistic_rng.hpp:3:
In file included from stan/src/stan/model/model_header.hpp:4:
In file included from /Users/sebi/work/math/stan/math.hpp:4:
In file included from /Users/sebi/work/math/stan/math/rev/mat.hpp:12:
In file included from /Users/sebi/work/math/stan/math/prim/mat.hpp:255:
In file included from /Users/sebi/work/math/stan/math/prim/mat/functor/map_rect.hpp:13:
In file included from /Users/sebi/work/math/stan/math/prim/mat/functor/map_rect_concurrent.hpp:6:
/Users/sebi/work/math/stan/math/prim/mat/functor/map_rect_reduce.hpp:46:12: error: no matching function for call to object of type
      'logistic_rng_model_namespace::lr_rng_functor__'
    return F()(shared_params, job_specific_params, x_r, x_i, msgs).transpose();
           ^~~
/Users/sebi/work/math/stan/math/prim/mat/functor/map_rect_concurrent.hpp:76:29: note: in instantiation of member function
      'stan::math::internal::map_rect_reduce<logistic_rng_model_namespace::lr_rng_functor__, double, double>::operator()' requested here
      chunk_f_out.push_back(ReduceF()(
                            ^
/Users/sebi/work/math/stan/math/prim/mat/functor/map_rect.hpp:175:20: note: in instantiation of function template specialization
      'stan::math::internal::map_rect_concurrent<2, logistic_rng_model_namespace::lr_rng_functor__, double, double>' requested here
  return internal::map_rect_concurrent<call_id, F, T_shared_param, T_job_param>(
                   ^
./examples/map_rect/logistic_rng.hpp:397:36: note: in instantiation of function template specialization 'stan::math::map_rect<2,
      logistic_rng_model_namespace::lr_rng_functor__, double, double>' requested here
            stan::math::assign(out,map_rect<2, lr_rng_functor__>(beta, theta, xs, ys, pstream__));
                                   ^
stan/src/stan/io/random_var_context.hpp:80:15: note: in instantiation of function template specialization
      'logistic_rng_model_namespace::logistic_rng_model::write_array<boost::random::additive_combine_engine<boost::random::linear_congruential_engine<unsigned int, 40014,
      0,<PHONE_NUMBER>>, boost::random::linear_congruential_engine<unsigned int, 40692, 0,<PHONE_NUMBER>> > >' requested here
        model.write_array(rng,

.....

Current Output:
NA
Expected Output:
The Stan parser should reject any _rng function passed to map_rect. This is not supported at the moment.
Additional Information:
Provide any additional information here.
Current Version:
develop, 28. March 2018

Good catch.
We should also prohibit _lp functions as they need access to the target accumulator.
The probability functions (_lpdf, _lpmf, _lcdf, _lccdf) should be OK.

We need to prohibit any function which has an effect outside of the function body. So _lp as well, yes.
I noticed that I never tested this when coding up the cmdstan things for MPI. Better safe than sorry.

fixed by https://github.com/stan-dev/stan/pull/2531
closing


Update README.md

Good catch, @mariosplen. That's a change made necessary by the switch to fully support all of the platforms.


fix/reload-api-resources-on-ctx

fixes PR-347
resources needs to be cleared and we need to ignore timestamp

LGTM!
Nice catch, so many edge cases. I'm going to start with some better error handling tomorrow probably, wouldn't have helped with this but for all the<PHONE_NUMBER> null checks


Questions about readme

What is/are the allowed type(s) for 'hash' in Condition condition1 = Condition.of(hash)? 32-bytes, just like for Fulfillment.of(preimage), I guess?
What is/are the allowed type(s) for 'destinationAmount' and for 'data' in InterledgerPayment.builder().destinationAmount? And I guess 'address' there has to be an InterledgerAddress object? Or can it also be a String?

What is/are the allowed type(s) for 'destinationAmount' and for 'data' in InterledgerPayment.builder().destinationAmount?

destinationAmount must be a BigInteger, and data is a byte[] (an array of bytes).

And I guess 'address' there has to be an InterledgerAddress object? Or can it also be a String?

The address is always of type InterledgerAddress, which is basically just a wrapper for a String that enforces everything from the RFC, like max-length, and offers some utility functions like, "is this a prefix?" and such.

What is/are the allowed type(s) for 'hash' in Condition condition1 = Condition.of(hash)? 32-bytes, just like for Fulfillment.of(preimage), I guess?

Condition.of(hash) is validated to be 32 bytes


Fix #2042 allowing python/c++ randomizer smiles generator

Reference Issue
Fix #2042 the code was developped during Cambridge RDKit UGM 2018 by Guillaume GODIN and Takayuki Serizawa.
What does this implement/fix? Explain your changes.
We implement a new option to generate pure random smiles from a given rootAtoms number. This parameters doRandom is set by default to false to have rule based rdkit smiles generator. Setting it to True allows user to generate more smiles.
Any other comments?
basically this is the command to run to produce more random smiles:
t= Chem.MolToSmiles(m, rootedAtAtom=n, canonical=False, doRandom=True)
complete example to show that the number of generated smiles increase:
from future import print_function
import random
from rdkit import Chem
from rdkit import rdBase
def allsmiles(smil, doRandom):
m = Chem.MolFromSmiles(smil) # Construct a molecule from a
if m is None:
return smil
N = m.GetNumAtoms()
if N==0:
return smil
try:
n= random.randint(0,N-1)
t= Chem.MolToSmiles(m, rootedAtAtom=n, canonical=False, doRandom=doRandom)
except :
return smil
return t
Smi = set()
for i in range(1,100):
Smi.add(allsmiles('CC(C)1CCCC1',True))
print(list(Smi))
Smi = set()
for i in range(1,100):
Smi.add(allsmiles('CC(C)1CCCC1',False))
print(list(Smi))

I'm not sure if this is fully necessary.
Here is a python script that will generate random smiles and it doesn't involve modifying any source code:
from rdkit import Chem
import random

def randomSmiles(m1):
    m1.SetProp("_canonicalRankingNumbers", "True")
    idxs = list(range(0,m1.GetNumAtoms()))
    random.shuffle(idxs)
    for i,v in enumerate(idxs):
        m1.GetAtomWithIdx(i).SetProp("_canonicalRankingNumber", str(v))
    return Chem.MolToSmiles(m1)

m1 = Chem.MolFromSmiles("CNOPc1ccccc1")
s = set()
for i in range(1000):
  smiles = randomSmiles(m1)
  s.add(smiles)

print(s)

The downside is that this isn't thread safe.

I would suggest another modification: if doRandom is true and rootedAtAtom is <0 (the default value), then pick the starting atom randomly. This saves the user from having to do that themselves.

ok good idea to force to pick a random value for rootedAtAtom if rootedAtAtom <0.

ok I will do thoses modfications, thanks.
Le ven. 28 sept. 2018 à 14:51, Greg Landrum<EMAIL_ADDRESS>a
écrit :

@greglandrum requested changes on this pull request.
A couple minor-ish changes requested.
In Code/GraphMol/SmilesParse/test.cpp
https://github.com/rdkit/rdkit/pull/2059#discussion_r221239973:

BOOST_LOG(rdInfoLog)

 << "Testing the random Generator for SMILES\n"

 << std::endl;

{
std::srand(1); // be sure we use it for testcase!
const char *benzenes[1] = {

   "c1ccncc1C"};

const char *rulesmiles[7] = {

  "c1ccncc1C","c1cc(C)cnc1","c1ccc(C)cn1","n1cccc(C)c1",

   "c1ncccc1C","c1(C)cccnc1","Cc1cccnc1"};

const char *randomsmiles[7] = {

 "c1ccncc1C","c1cc(cnc1)C","c1ccc(cn1)C","n1cccc(c1)C","c1ncccc1C",

 "c1(cccnc1)C","Cc1cccnc1"};

In order to have the random numbers be reproducible, I think you need to
call std::srand() here before you start calling std::rand() inside of
MolToSmiles().
In Code/GraphMol/Canon.cpp
https://github.com/rdkit/rdkit/pull/2059#discussion_r221240242:

@@ -672,8 +684,15 @@ void dfsBuildStack(ROMol &mol, int atomIdx, int inBondIdx,
rank += (hsh % MAX_NATOMS) * MAX_NATOMS * MAX_NATOMS;
}
}

 // std::cerr<<"   p: "<<otherIdx<<" "<<colors[otherIdx]<<"

 // "<<theBond->getBondType()<<" "<<rank<<std::endl;

 // std::cerr<<"after the rules rings:  p: "<<otherIdx<<" "<<colors[otherIdx]<<" "<<theBond->getBondType()<<" "<<rank<<std::endl;

if (doRandom) {

 // set the seed for rand function (1 by default if not usinig srand call function)

you certainly shouldn't seed the RNG in here. so I think this comment
should go
In Code/GraphMol/Canon.cpp
https://github.com/rdkit/rdkit/pull/2059#discussion_r221241228:

@@ -661,6 +670,9 @@ void dfsBuildStack(ROMol &mol, int atomIdx, int inBondIdx,
continue;
}
unsigned long rank = ranks[otherIdx];

This is doing work it doesn't need to do. I think it makes sense to
replace this piece of code:
  unsigned long rank = ranks[otherIdx];
  if (theBond->getOwningMol().getRingInfo()->numBondRings(
          theBond->getIdx())) {
    if (!bondSymbols) {
      rank += static_cast<int>(MAX_BONDTYPE - theBond->getBondType()) *
              MAX_NATOMS * MAX_NATOMS;
    } else {
      const std::string &symb = (*bondSymbols)[theBond->getIdx()];
      boost::uint32_t hsh = gboost::hash_range(symb.begin(), symb.end());
      rank += (hsh % MAX_NATOMS) * MAX_NATOMS * MAX_NATOMS;
    }
  }

with this:
  unsigned long rank = ranks[otherIdx];
  if (!doRandom) {
    if (theBond->getOwningMol().getRingInfo()->numBondRings(
            theBond->getIdx())) {
      if (!bondSymbols) {
        rank += static_cast<int>(MAX_BONDTYPE - theBond->getBondType()) *
                MAX_NATOMS * MAX_NATOMS;
      } else {
        const std::string &symb = (*bondSymbols)[theBond->getIdx()];
        boost::uint32_t hsh = gboost::hash_range(symb.begin(), symb.end());
        rank += (hsh % MAX_NATOMS) * MAX_NATOMS * MAX_NATOMS;
      }
    }
  } else {
    // randomize the rank
    seed = std::rand();
  }

instead of what you've done.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/rdkit/rdkit/pull/2059#pullrequestreview-159842657,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABIbYt8ZSOapSPjcT7QWcJ0kf1ISA3RMks5ufhs1gaJpZM4W1LfN
.


Users have the same rank in the user stats

I've noticed that different users with the same number of tokens have the same overall rank in the user stats.
To be more detailed,
if I go to http://localhost:8000/api/retrieve/leaderboard-data/
I get the following result:

Then I go to localhost:8000/docs, log in as spiderman, then go to retrieve/stats, I get this:

So, in the leaderboard-data spiderman has rank 8, but in the user stats his rank is 9. And it is the same for every user with the same number of tokens as a spiderman.
I don't know if it should be like that or if this needs to be fixed. Leaderboard hilhlighting is not displayed correclty in some cases and it seems like it is because of this rank in user stats.

@joemarct Could you take a look at this?

I've tested it on the master and I have the same values in the leaderboard-data and stats.
Also, I completely remade leaderboard-data in the performance branch, so I prefer to wait for the merge and after that develop the changes if required.
And a question, @shawnlauzon is it correct that users with the same points have a different rank?

Ok, that seems reasonable. @alexdashkov please create a PR for merging into master and ask @joemarct to review it.
Yes, users with same points will have different ranks; the ranking can be arbitrary (although ideally the first user who earned a certain number of points should be ranked higher), but consistent.

@shawnlauzon do you mean a PR with the leaderboard data? @realrhys has said that that he will merge a performance branch to the master by the end of testing.

Yes, with the leaderboard data. Now this is more than a performance fix, it's possibly a correctness fix. So I want it in master so that we can complete our integration testing. Performance testing can happen in parallel in the performance branch, and if there are additional performance fixes, they can be merged later.

@shawnlauzon I'm not sure yet that this a bug fix as I can't reproduce the problem. I'm waiting for the @Lyncis's response. Does it make sense?

I pulled the last changes on the server, still have the same issue,
Trying to explain it again.
I go to http://localhost:8000/docs/
Authenticate as ironman:

Then I retrieve leaderboard-data with this user, I see that his rank is 10.

Then I go to retrieve user stats and see that his overall_rank is 10

Then if I log in as spiderman and retrieve leaderboard-data, his rank is 9 here

But if I go to the user stats, his overall_rank is 10 as it was for ironman

Same is for hawkeye and other who has the same number of tokens. As for other users, their rank is displayed correctly.
I also noticed that when I am retrieving leadreboard for these users, they quite often have different ranks. For example, spiderman can have rank 9, and on the next time he can have rank 7. In the user_stats though, it is always the same for all of them.

Seems like this is an issue only locally, everything works fine on uat and dev.


Add template system

Create a template system that is suitable for building web pages, possibly using components separately?

Current template
This isnt ideal as it uses require_once and namespacing, i would like this to just use namespacing if possible.
`
view("index.html",[
    'title' => 'My Page Title',
    'content' => 'Hello, world!',
]);

?>`


properly configuration for user based setting

Hi,
i've read the documentation and wanted to try out the package but i'm not sure on how to configure it properly, the only thing that i saw in readme is that i need to add this:
setting()->setExtraColumns(['user_id' => Auth::user()->id]);
but i don't need to update also the migration file with the new column for settings table?
should ialso specifi in setting.php config file the new user_id field?
i've tried also to look in the net but nothing popup to my eyes, so if someone have a more complete and deep tutorial it would be great.
Thanks

Yes, this is enough setting()->setExtraColumns(['user_id' => auth()->user()->id]);

i've put setting()->setExtraColumns(['user_id' => auth()->user()->id]); in middleware and setting() helper function work well, problem is when i have to override config default function because it doesn't find user_id, where can i put the setting()->setExtraColumns(['user_id' => auth()->user()->id]); in order to let it read from config function?


Make parent  a link, navigate and expand children upon clicking.

Is this doable? The current behavior will ignore any  placed inside the parent
tag and just expand the list. It would be great for each list item to have the capability to have a link AND an expand button.

is  tag inside of the  tag? If not, it does not work.

Apologies, I was referencing the wrong tag, I've edited my question. Is it possible to add a clickable link to the parent '' tag that will expand the children list and navigate to the linked page?

  Parent Page

Child Page

Child Page

Child Page

Child Page

@onokumus do you understand what I'm trying to accomplish? I'd really love to use metismenu! Is it possible for the parent to link to a page or hash (www.site.com/current/page#section45) and expand the children?

@ChaseGiunta
Please see following links.
http://www.w3schools.com/jsref/prop_loc_hash.asp
https://developer.mozilla.org/en-US/docs/Web/API/URLUtils.hash
See sample pages
https://gist.github.com/onokumus/224181ad4627b709cdc0

I am asking for the same thing and you didn't give an answer to the question

I would like the exact same functionality. When I click an expanding-menu, I want the menu to expand also to be redirecting to a page. In some cases, I would like to make sublinks like @adi10ain is doing. In other cases, I would like something like the following, where when I click the top-level menu item, it takes me to to the top of the page "link.html", and the sub-menu items provide links to bookmarks elsewhere on link.html

    Parent item

item 2.1

item 2.2

I found a kind of work-around. How easy this is depends on what engine you're using to create your site. I'm using Flask, so it's pretty easy with blocks. On your main page (page1.html), you just include a link to the other page (page2.html) in the menu, with no sub-menu options. Then on the page2.html, include the sub-menus in the menu definition
page1.html

    Parent item

page2.html

    Parent item

item 2.1

item 2.2

ridiculous no answer to the question from the owner that's sad.

Looking for the same answer also

any updates on this?  I need this feature also.

Hi,
Sorry for the belated answer.
First take a look at https://github.com/onokumus/metisMenu#doubletaptogo
For example .

    Parent item

item 2.1

item 2.2


Traitors can spawn with the singular objective of escaping to centcomm.

Description

On a recent lizard round a traitor spawned with just one objective: "Escape to centcomm alive and unrestrained". I am not sure that's intended.
Reproduction

Become traitor
Win rng lottery.(Or lose it depending on your interpretation.

yeah check logs it will say what objectives it tried to add and failed, if theyre all steal and hit the limit then it wont give any

Didn't know that left logs. Anyways they got the same objective thrice.

it should still say in debug log level what objs it attempted to add, unless gamer was just obscenely unlucky

I went to check logs in game. As it turns out SS14-admin lied to me and all the mind logs appeared thrice.  There is a singular log of the person I mentioned just getting the escape objective.

Unless it is not in the mind logs I can find no logs about failing to add an objective.

its logged by SharedObjectivesSystem so probably as "system.objectives" or something

In a recent leviathan round a traitor had no objectives at all, they had the mind role and the briefing however no logs showing objectives were added.

ill add more debug logging in a bit to help pinpoint the issue


Linux certificate issue

Describe the bug
On Linux can't upload documents using DOT NET 6 and AWSSDK.S3 <IP_ADDRESS>
Expected Behavior
Upload the file to the bucket. This can be done from S3 CLI successfully.
Current Behavior
The file doesn't get uploaded. The error received is "System.Security.Authentication.AuthenticationException: The remote certificate is invalid according to the validation procedure: RemoteCertificateNameMismatch"
Reproduction Steps
 private AmazonS3Client GetS3Client()
        {
            string clientAccessKey = _config["AWSSettings:AccessKey"];
            string clientSecretKey = _config["AWSSettings:SecretKey"];

            var configS3 = new AmazonS3Config
            {
                ServiceURL = _config["AWSSettings:Endpoint"],
                DisableHostPrefixInjection = true,
                UseHttp = bool.Parse(_config["AWSSettings:UseHttp"])
            };

            if (bool.Parse(_config["AWSSettings:SetEndpoint"]))
            {
                return new AmazonS3Client(clientAccessKey, clientSecretKey, configS3);
            }
            else
            {

                return new AmazonS3Client(clientAccessKey, clientSecretKey, Amazon.RegionEndpoint.EUWest2);
            }

        }

        public async Task<string> UploadStream(Stream stream, string key)
        {
            try
            {
                stream.Position = 0;
                string bucketName = _config["AWSSettings:BucketName"];

                using var client = GetS3Client();
                using var transferUtility = new TransferUtility(client);

                var request = new PutObjectRequest
                {
                    BucketName = bucketName,
                    Key = key,
                   InputStream = stream
                };

                //var request = new TransferUtilityUploadRequest
                //{
                //    BucketName = bucketName,
                //    Key = key,
                //    InputStream = stream
                //};

                try
                {
                    //  await transferUtility.UploadAsync(request);
                    var response = await client.PutObjectAsync(request);
                    if (response.HttpStatusCode == System.Net.HttpStatusCode.OK)
                    {
                        Console.WriteLine($"Successfully uploaded {key} to {bucketName}.");
                        return "done";
                    }
                    else
                    {
                        Console.WriteLine($"Could not upload {key} to {bucketName}.");

                        return $"Could not upload {key} to {bucketName}. {response}";
                    }
                }
                catch (Exception ex)
                {
                    Console.WriteLine($"Exception encountered on server when uploading file with key {key}. Message:'{ex}'");
                    return $" Upload exception2:{ex}";
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine($"Error creating the S3 client. Message:'{ex}'");
                return $" Upload exception1:{ex}"; ;
            }
        }

The client is using StorageGRID S3
Possible Solution
The certificate is present on the server so resolve the RemoteCertificateNameMismatch or allow me to set the path to the certificate. But again, from AWS CLI everything is working as expected.
Additional Information/Context
I need to use a different endpoint than aws. Also I need to disable the host prefix injection.
AWS .NET SDK and/or Package version used
AWSSDK.S3 <IP_ADDRESS>
Targeted .NET Platform
.NET 6
Operating System and version
Linux RedHat 8.1

Hi @monicatudor,
Good afternoon.
Looks like you are using 3rd party service StorageGRID S3 that simulates AWS S3 like operations. We do not support troubleshooting issues related to 3rd party service. AWS CLI might work fine, not sure if is doing any certificate validation.
Thanks,
Ashish

Hi,
Thanks for your quick reply. I appreciate the fact that this is a 3rd party but it is actually using s3.
We know for sure that the AWS CLI is using the certificate. Before adding the certificate on the server, we had to run it with no-verify-ssl. After adding the certificate, the command works without it.
Is there a way with the currect dot net s3 sdk to maybe stop it from verifying the certificate?

Closed by mistake

The remote certificate is invalid according to the validation procedure

@monicatudor No, it might not be possible since the underlying HttpClient implementation is not exposed. Refer https://github.com/aws/aws-sdk-net/issues/686#issuecomment-313287324.