ESC4 > ESC1 to CERTSRV_E_UNSUPPORTED_CERT_TYPE

amazing tool! but somehow i cant get this working. im not sure what the problem is, maybe the space in the CA Name?
Certificate Authorities
  0
    CA Name                             : testa brotstube GmbH
    DNS Name                            : srv-dc01.testa.local
    Certificate Subject                 : CN=testa brotstube GmbH
    Certificate Serial Number           : <REDACTED>
    Certificate Validity Start          : 2020-03-02 08:16:41+00:00
    Certificate Validity End            : 2030-03-02 09:03:05+00:00
    Web Enrollment                      : Enabled
    User Specified SAN                  : Enabled
    Request Disposition                 : Issue
    Enforce Encryption for Requests     : Disabled
    Permissions
      Owner                             : testa.LOCAL\Administrators
      Access Rights
        ManageCertificates              : testa.LOCAL\Administrators
                                          testa.LOCAL\Domänen-Admins
                                          testa.LOCAL\Organisations-Admins
        ManageCa                        : testa.LOCAL\Administrators
                                          testa.LOCAL\Domänen-Admins
                                          testa.LOCAL\Organisations-Admins
        Enroll                          : testa.LOCAL\Authenticated Users
    [!] Vulnerabilities
      ESC6                              : Enrollees can specify SAN and Request Disposition is set to Issue. Does not work after May 2022
      ESC8                              : Web Enrollment is enabled and Request Disposition is set to Issue
      ESC11                             : Encryption is not enforced for ICPR requests and Request Disposition is set to Issue
Certificate Templates
  0
    Template Name                       : Exchange-SHA256-5y
    Display Name                        : Exchange-SHA256-5y
    Certificate Authorities             : testa brotstube GmbH
    Enabled                             : True
    Client Authentication               : True
    Enrollment Agent                    : True
    Any Purpose                         : True
    Enrollee Supplies Subject           : True
    Certificate Name Flag               : EnrolleeSuppliesSubject
    Enrollment Flag                     : None
    Private Key Flag                    : 16777216
                                          65536
                                          ExportableKey
    Requires Manager Approval           : False
    Requires Key Archival               : False
    Authorized Signatures Required      : 0
    Validity Period                     : 5 years
    Renewal Period                      : 6 weeks
    Minimum RSA Key Length              : 2048
    Permissions
      Object Control Permissions
        Owner                           : testa.LOCAL\Administrator
        Full Control Principals         : testa.LOCAL\Authenticated Users
        Write Owner Principals          : testa.LOCAL\Authenticated Users
        Write Dacl Principals           : testa.LOCAL\Authenticated Users
        Write Property Principals       : testa.LOCAL\Authenticated Users
    [!] Vulnerabilities
      ESC1                              : 'testa.LOCAL\\Authenticated Users' can enroll, enrollee supplies subject and template allows client authentication
      ESC2                              : 'testa.LOCAL\\Authenticated Users' can enroll and template can be used for any purpose
      ESC3                              : 'testa.LOCAL\\Authenticated Users' can enroll and template has Certificate Request Agent EKU set
      ESC4                              : 'testa.LOCAL\\Authenticated Users' has dangerous permissions

certipy req -u<EMAIL_ADDRESS>-p passw0rd -ca 'testa brotstube GmbH' -template Exchange-SHA256-5y -upn<EMAIL_ADDRESS>-debug

Certipy v4.7.0 - by Oliver Lyak (ly4k)

[+] Trying to resolve 'SRV-DC01.testa.LOCAL' at '<IP_ADDRESS>'
[+] Resolved 'SRV-DC01.testa.LOCAL' from cache: <IP_ADDRESS>
[+] Generating RSA key
[*] Requesting certificate via RPC
[+] Trying to connect to endpoint: ncacn_np:<IP_ADDRESS>[\pipe\cert]
[+] Connected to endpoint: ncacn_np:<IP_ADDRESS>[\pipe\cert]
[-] Got error while trying to request certificate: code: 0x80094800 - CERTSRV_E_UNSUPPORTED_CERT_TYPE - The requested certificate template is not supported by this CA.
[*] Request ID is 383

find had some problems aswell but got me the templates and CA info in the end:
[*] Trying to get CA configuration for 'testa brotstube GmbH' via CSRA
[!] Got error while trying to get CA configuration for 'testa brotstube GmbH' via CSRA: CASessionError: code: 0x80070005 - E_ACCESSDENIED - General access denied error.
[*] Trying to get CA configuration for 'testa brotstube GmbH' via RRP
[!] Failed to connect to remote registry. Service should be starting now. Trying again...
[*] Got CA configuration for 'testa brotstube GmbH'

This is mostly because the certificate template you are using is not enabled. Run the certipy find command again with -enabled to get only enabled certificates.

thanks for the reply, but it says:
Enabled                             : True

doesnt that mean its enabled?

Had a similar Issue, for me it has been an error with how certipy changed the certificate.
Try to request the cert manually through the UI if you have access to a Domain joined computer to see what exactly the error is.
If you do not have access, in my case I could not select a CSP so something was wrong there.
What I did was:
Make a copy of the old cert template, run the ESC4 command again (to export the changed template) and then edit the CSP field to the original one. Then we use the command that would be used to restore the backup with our edited file. For me it worked, because a CSP was selected afterwards and I could proceed.

Thanks alot for the response! Sounds like that could work. I will have access to this system in some months and will re-test it then and report back!

same issue. On the windows side, from a domain joined computer, through certmgr, I receive the following error: An error occurred while enrolling for a certificate. A certificate request could not be created. Url: test.local\test-ca Error: No provider was specified for the store or object (CRYPT_E_NO_PROVIDER)

same problem CERTSRV_E_UNSUPPORTED_CERT_TYPE

Same issue here. Can change the certificate to be vuln to ESC1 but then when running the req command I get: Got error while trying to request certificate: code: 0x80094800 - CERTSRV_E_UNSUPPORTED_CERT_TYPE - The requested certificate template is not supported by this CA.

Same issue here. Can change the certificate to be vuln to ESC1 but then when running the req command I get: Got error while trying to request certificate: code: 0x80094800 - CERTSRV_E_UNSUPPORTED_CERT_TYPE - The requested certificate template is not supported by this CA.

Did you try my solution/approach from a few messages up?

Same issue here. Can change the certificate to be vuln to ESC1 but then when running the req command I get: Got error while trying to request certificate: code: 0x80094800 - CERTSRV_E_UNSUPPORTED_CERT_TYPE - The requested certificate template is not supported by this CA.

Did you try my solution/approach from a few messages up?

Yeah copied the original cert, and exported the vuln one then changed the defaultCPS field to the original one but still the same error.

Same issue here. Can change the certificate to be vuln to ESC1 but then when running the req command I get: Got error while trying to request certificate: code: 0x80094800 - CERTSRV_E_UNSUPPORTED_CERT_TYPE - The requested certificate template is not supported by this CA.

Did you try my solution/approach from a few messages up?

Yeah copied the original cert, and exported the vuln one then changed the defaultCSP field to the original one but still the same error.

Do you have access to the gui? Because I would recommend trying to issue the cert via the gui and see where the error is. Maybe you need to adjust another field.


Route model binding fails when additional route parameters are present

Laravel Version
11.17.0
PHP Version
8.3.9
Database Driver & Version
No response
Description
When using a resource controller within a route group that has a route parameter, the wrong parameter is sent to the resource controller method.
For example:
Route::domain('{subdomain}.' . config('app.url'))->group(function() {
    Route::resource('people', PersonController::class);
});

In PersonController::show(Person $person), the subdomain route parameter is passed, instead of the correct Person model. This results in the error "App\Http\Controllers\PersonController::show(): Argument #1 ($person) must be of type App\Models\Person, string given"
Steps To Reproduce
Example repository: https://github.com/colincameron/route-binding-example
Migrate and seed the database
When served using Herd, visit http://test.route-binding-example.test/people and click on one of the names.
This should show the person name from the PersonController::show() method, but instead, the string "test" is passed to the method, causing a type mismatch error.

I've tried to debug this through src/Illuminate/Routing/ControllerDispatcher.php but I'm a bit lost as to what happens in ResolvesRouteDependencies resolveMethodDependencies() and transformDependency(), and why the parameters aren't being mapped correctly in there.

I figured out a fix for this case, however I'm not sure if it'll introduce another bug.  Going to attempt my first PR.

#52261 fixes this issue however tests are failing so there is more to consider. will continue tomorrow.

I've added simpler examples to routes/web.php that show the problem.
Route::get('working/{extraparameter}/people/{person}', function(string $extraparameter, Person $person) {
    return $person->name;
});

Route::get('/fails/{extraparameter}/people/{person}', function(Person $person) {
    return $person->name;
});

In these examples I can see why the behaviour may be expected, but when the extra parameter is captured in a route group as in the original example it feels more like a bug.
Perhaps the solution is to re-order parameters to match the function definition. In ResolvesRouteDependencies.php line 49, we are already iterating through the parameters in the correct order using $reflector->getParameters().

For my specific example, where I use the subdomain parameter in my CaptureSubdomainOrganisation middleware, I can use $request->route()->forgetParameter('subdomain');
I'm happy for this to be closed if it's considered not to be a bug.

This is the expected behaviour. The subdomain param is always passed to the controller method. You need to add it first here: https://github.com/colincameron/route-binding-example/blob/main/app/Http/Controllers/PersonController.php#L41

Thanks for the clarification. In my case, forgetting the parameter works better as I have dozens of methods that would need an unnecessary parameter added.


update_check_no_new_updates pop up not working

Steps to reproduce
go to more - about click on check for updates
Expected behavior
it should show pop up of no new updates
Actual behavior
nothing popped up
Crash logs
No response
Aniyomi version
r7454
Android version
Android 12
Device
Iqoo 3 5G
Other details
there's still string for update_check_no_new_updates in every language so I suppose it's intended to show this and not removed.
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open or closed issue.
[X] I have written a short but informative title.
[X] If this is an issue with an official extension, I should be opening an issue in the extensions repository.
[X] If this is an issue with an official manga extension and this issue can be replicated in the Tachiyomi app, that I should be opening an issue in Tachiyomi's extensions repository.
[X] I have gone through the FAQ and troubleshooting guide.
[X] I have updated the app to version <IP_ADDRESS>.
[X] I have updated all installed extensions.
[X] I will fill out all of the requested information in this form.

I think i see the problem."GetApplicationRelease.Result.NoNewUpdate" in AboutScreen retrieves the string resource but no toast msg.


Double indirection not supported for memories?

I am writing a formal specification for a CPU instruction that performs double indirection. I.e. it does reg = mem[mem[op]];
I am trying to write an assertion like this:
assert (fi_w_data == mem[mem[a_regY] + i_imm5]);

This fails, indicating a logic loop. I have worked around this by rewriting it as:
assert (fi_w_data == mem[$past(mem[a_regY]) + i_imm5]);

As I understand, this effectively adds a register, but without the need to explicitly declare variables, expand processes, etc. So this register breaks the logic loop.
As I also understand, the only case where the mem[mem[r]] construct would be absolutely necessary is if you had a dual read port asynchronous memory where the data of the first port is chained to the address of the second port. In all other cases, there is at least one cycle between reads, and so the $past trick will work (although it might get messy with intervening writes..?).
Can you please explain the nature of this limitation? Is this a real logic loop according to Verilog semantics or is this an artifact of the way Yosys lowers Verilog features? Is my workaround 'correct'?
What would I have to do if I had the dual read port asynchronous memory as described above and wanted to verify it? Yes, probably not a very good idea, but I think it is synthesizable with LUTRAM and enough duplication, so this can in principle be encountered in a real world design.

I understand this is due to the nature of the $mem cell, it appears as a logic loop - feedback from the output of the $mem to an input - at the word level, even though no loop exists at the bit level. This is vaguely similar to https://stackoverflow.com/questions/44828776/yosys-logic-loop-falsely-detected.
Running the memory command to explode the RAM to registers and logic removes the logic loop error, but will increase the cost of verification for larger designs.

It would seem like a possible solution would be splitting the single $mem cell with two read ports to two $mem cells each with one read port. But I don't think this exists as a Yosys command at the moment.

Ah, I understand the solution now. I can probably implement such a command.


Fasta/Kernel don't support tear-offs of generic methods specialized for use context

According my sources the code below should be legal in Dart 2.0:
import 'dart:math' as math;

main() {
  print(<int>[1, 2, 3].fold(0, math.max));
}

However it does not run:
$ pkg/vm/tool/dart2 t/l.dart
t/l.dart:5:37: Error: A value of type '<T extends dart.core::num>(dart.math::max::T, dart.math::max::T) → dart.math::max::T' can't be assigned to a variable of type '(dart.core::Object, dart.core::int) → dart.core::Object'.
Try changing the type of the left hand side, or casting the right hand side to '(dart.core::Object, dart.core::int) → dart.core::Object'.
  print(<int>[1, 2, 3].fold(0, math.max));
                                    ^
A value of type '<T extends dart.core::num>(dart.math::max::T, dart.math::max::T) → dart.math::max::T' can't be assigned to a variable of type '(dart.core::Object, dart.core::int) → dart.core::Object'.

/cc @leafpetersen @stereotype441 @kmillikin

Is this a duplicate of #31550?

Looks like it.

Marking as P1 since this issue has now been independently discovered by 3 different people.
This bug is blocked waiting for #31550.  I'll mark that as P1 as well.

I'm working on this now.

cc @vsmenon


v0.32.1 Error executing query - postings is nil for ... It was never fetched.

Thanos, Prometheus and Golang version used:
v0.32.1

Object Storage Provider:
Azure
What happened:
Since updating to v0.32.1 from v0.31.0 we cannot access metrics from the S3 storage. They end up with the error shown in the full log.
Full logs to relevant components:
Logs

Error executing query: expanding series: proxy Series(): rpc error: code = Aborted desc = receive series from Addr: <IP_ADDRESS>:10901 LabelSets: {cluster="ap", prometheus="monitoring/ap", prometheus_replica="prometheus-ap-0", stage="lab"},{cluster="ap", prometheus="monitoring/ap", stage="lab"},{cluster="norc", prometheus="monitoring/norc", prometheus_replica="prometheus-norc-0", stage="lab"},{cluster="norc", prometheus="monitoring/norc", stage="lab"},{cluster="oss-bss", prometheus="monitoring/oss-bss", prometheus_replica="prometheus-oss-bss-0", stage="lab"},{cluster="oss-bss", prometheus="monitoring/oss-bss", stage="lab"},{cluster="self", prometheus="monitoring/self", prometheus_replica="prometheus-self-0", stage="lab"},{cluster="self", prometheus="monitoring/self", stage="lab"},{cluster="sisr", prometheus="monitoring/sisr", prometheus_replica="prometheus-sisr-0", stage="lab"},{cluster="sisr", prometheus="monitoring/sisr", stage="lab"} MinTime:<PHONE_NUMBER>027 MaxTime:<PHONE_NUMBER>000: rpc error: code = Aborted desc = fetch series for block 01H8Y3NK7RBHVJC1WFX79EGEPE: expanded matching posting: expand: postings is nil for {__name__=container_memory_working_set_bytes}. It was never fetched.

Anything else we need to know:
I have downgraded back to v0.31.0 - there everything works fine

Do you use any index cache or it is the default configuration

It is the default configuration that comes with kube-thanos.
With the following common config:
local commonConfig = {
  config+:: {
    local cfg = self,
    namespace: 'thanos',
    version: 'v0.31.0',
    image: 'quay.io/thanos/thanos:' + cfg.version,
    imagePullPolicy: 'IfNotPresent',
    retentionResolutionRaw: '60d',
    retentionResolution5m: '90d',
    retentionResolution1h: '180d',
    objectStorageConfig: {
      name: 'thanos-objectstorage',
      key: 'thanos.yaml',
    },
    // hashringConfigMapName: 'hashring-config',
    volumeClaimTemplate: {
      spec: {
        accessModes: ['ReadWriteOnce'],
        resources: {
          requests: {
            storage: '10Gi',
          },
        },
      },
    },
  },
};

Can we consolidate discussion here: https://github.com/thanos-io/thanos/issues/6660

This should be fixed in 0.32.2

fixed in 0.32.2


Label animation not happening on input

Hello and thank you for your wonderful work!
It appears the label animation on the "Input with label animation" does not work. I have tested on mobile (Safari & Firefox iOS) and desktop (Firefox).

Might be a problem as Firefox does not support all of the transitions. It's working fine on Chrome.
https://github.com/user-attachments/assets/8eccc66e-2c86-4928-b7df-b27d9a56fc14


infallable alternatve should make group optional

this test should pass
#[test]
fn optional_via_pure() {
    let a = short('a').argument::<usize>("A");
    let b = pure(12);
    let parser = construct!([a, b]).to_options();
    assert_usage(parser, "[-a A]");
}

It is trivial to tell if parser is infallable in this case but it might be deeply nested and in general contain guards that might turn it back to failing. I guess I'll leave it as is.


Extend documentation

The documentation needs a lot more sample implementations to make it easier to understand for new developers. Its a struggle to get the needed information, mostly a long search in source code files brings you closer to the answer.
For example, the authentication process for a login should be described in more detail:
How calls the validate function?
What happens in the security logic?
...

Which framework do you use? The README file should give a pretty good understanding how pac4j works. Then, specific configurations may be detailed on the www.pac4j.org website.
For example, using j2e-pac4j, you start reading what it is and what are the main concepts: client, authorizer, SecurityFilter, CallbackFilter and LogoutFilter. Then, you can read the required dependencies, the configuration, how to protect URLs using the security filter...
And especially:
You can protect (authentication + authorizations) the urls of your J2E application by using the SecurityFilter and defining the appropriate mapping. It has the following behaviour:

1) If the HTTP request matches the matchers configuration (or no matchers are defined), the security is applied. Otherwise, the user is automatically granted access.

2) First, if the user is not authenticated (no profile) and if some clients have been defined in the clients parameter, a login is tried for the direct clients.

3) Then, if the user has a profile, authorizations are checked according to the authorizers configuration. If the authorizations are valid, the user is granted access. Otherwise, a 403 error page is displayed.

4) Finally, if the user is still not authenticated (no profile), he is redirected to the appropriate identity provider if the first defined client is an indirect one in the clients configuration. Otherwise, a 401 error page is displayed.

Isn't it clear enough?

Feel free to ask any question on the mailing list: https://groups.google.com/forum/?fromgroups#!forum/pac4j-users


feat(deps): update pkce-challenge to v4

This PR update the pkce-challenge dependency to v4, which ships without unsecure and unmaintened crypto-js library, see https://github.com/crouchcd/pkce-challenge/issues/9 & https://github.com/advisories/GHSA-xwcq-pm8m-c4vf

@Kocal
Thanks for the PR.
I have tried it in my local environment and I am getting the following error when I upgrade the version and start it with yarn develop.
│   Error: Could not load js config file /Users/yasuda/strapi/src/plugins/strapi-plugin-sso/strapi-server.js: require() of ES Module                                                                              │
│   /Users/yasuda/strapi/src/plugins/strapi-plugin-sso/node_modules/pkce-challenge/dist/index.js from /Users/yasuda/strapi/src/plugins/strapi-plugin-sso/server/controllers/azuread.js not    │
│   supported.

I'm a bit pressed for time right now so I'll investigate a bit more at a later date.


No Text Reply, Single File Attachement - Javascript Error

Version
OS
Issues
Tester
Date

3.4.1
Windows 10 64-bit

@tonyD-2016
2016-05-12

I confirm (by marking "x" in the [ ] below):

[X] This is not a troubleshooting question. Troubleshooting questions go here: http://www.mattermost.org/troubleshoot/.
[X] This doesn't reproduce on web browsers (such as in Chrome). If it does, issue reports go to the Mattermost Server repository.
[X] I have read contributing guidelines.

Summary
"Add Comment" does not execute does not execute with no text, single file attachment reply

Steps to reproduce

Select any message.
Click  "...". Pop-up opens.
Select "Reply". Reply sidebar window opens.
Leave Add a comment box empty. Attache a single file.
Click "Add Comment".
ERROR: DEVELOPER MODE: A javascript error has occured. Please use the javascript console to capture and report the error (row: 15 col: 6684).

Expected behavior

File is attached to the comment.
Comment is added to the board.

Observed behavior

App does not attach the single file.
Error Message appears below the menu.

Possible fixes

Screen Capture of Issue

This looks as it has happened inside the webview... It might be a platform issue.
However I was not able to reproduce this on pre-release (using browser OR desktop app).
Does this happen if you try it again?

Thanks @tonyD-2016 for the report and for @jnugh for following up.
Looks like this was fixed by the platform team earlier today, so I'll close this issue as resolved.
Thanks! :)


Nav update proposal

Suggestions based on initial content review:

General comment: Consolidate all 'Prereq' info into the Prerequisites section. There are multiple topics that contain their own prereq info.
Overview topic has prereq info.

Move 'Connecting Runtime Fabric to Anypoint Management Center' info to Network section.

In the Runtime Fabric Architecture topic, move 'Installer lifecycle ' info to requirements and install topics.
Move load balancer log information to the 'View and Configure Logs in RTF' topic.
Combine 'Resource Allocation on Anypoint Runtime Fabric' topic with 'Deploy Applications and API Proxies to Runtime Fabric' topic.
Split 'Application Versioning' topic - move rollback info somewhere else and move remaining info to 'Manage' section.
Move 'Download debug info' out of 'Using Ops Center on RTF' topic.
Move 'Format and Mount Disks' info and 'Install RTF Components' info out of Troubleshooting topic.

Closing this - prereq info consolidated in different PR. Remaining changes TBD.


git sync: configure to merge instead of rebase

The screencast mentions this ability.

configuration to merge the main branch instead of rebasing
configuration to merge perennial branches instead of rebasing

This ticket is only for when it pulls the updates from the remote branch. As an example, right now for the master branch it does that through git rebase origin/master. This ticket is to add a configuration value git-town.pull-branch-strategy. If it has the value merge, then it runs git pull origin/master. In any other case it still runs git rebase origin/master.

@kevgo is this possible, now, or the screencast is talking about the future? :dancers:

@HangingClowns we are currently working on it!  :smiley:

@kevgo what about this vs #699? I personally prefer my working branch (made with git hack) to be rebased on origin/<main-branch> or upstream/<main-branch> rather than merged in... does the --no-edit drop the extra merge commits? I'd prefer --ff-only of all the merge options, if my understanding is correct.


Azure - while processing main_metrics file getting error

processing the main_metrics.zip file to azure (cqube-state-emission) -> aggregate data processor group throwing error
Issue: Azure Credentials are not updated

@padmanabha1234 have u checked this? and then changed the status to ready for QA?

@padmanabha1234 is it ready for testing then?

@chetandg123 please take a retest on this and update

Yes @htvenkatesh

Tested the file processing of the main_metrics.zip, main_metrics.json file is generated in the output folder

@chetandg123 is it working as expected? if so please close this

@htvenkatesh @padmanabha1234 defect is resolved and it is working as expected


Does it support css files

Hi,
Thank you for the plugins, it looks very promising for my use case!
It looks like this plugin prepends a loader to do the modification.
In that case, I am wonder does the plugin work for a .css file (I think css files are also NormalModule)?

Hi. CSS files are modules after they processed with style-loader, so plugin cannot handle raw files before they transformed to NormalModule

If you want to modify CSS files after style-loader and you use multiple loaders on your css files, there is another problem.
{
  plugins: [
    new ModifyModuleSourcePlugin({
      test: /\.css$/
    })
  ],
  module: {
    rules: [
      {
        test: /\.css$/i,
        use: ['style-loader', 'css-loader']
      }
    ]
  }
}

In this case one the same CSS file will be modified twice, because Webpack will create two normal modules:

/node_modules/css-loader/dist/cjs.js ! /path/to/css-file.css
/node_modules/style-loader/dist/cjs.js ! /node_modules/css-loader/dist/cjs.js ! /path/to/css-file.css

And this problem is not only with CSS files. It's how works with all files if they processed with multiple loaders. So, I think we need to find way to modify raw files before they multiply as modules.
And then we should rename our plugin to ModifySourcePlugin, not ModifyModuleSourcePlugin as currently 😄

@matthewma7 You can share more about your use case, so I can try help you

Hi @artemirq , Thank you for the detailed answer!
My use case is relatively simple. I have a css file within a node_module package that has a font defined with url('http://foo.com/font.woff2)', instead of loading the font over the internet, I would like to pack it locally as static media. So I am thinking performing two tasks with a webpack plugin. 1, download the font.woff2 locally, possibly in the same directly along side with the css file. 2, change the url to url('./font.woff2').
Doing these two tasks manually before webpack build does seems to work.
It might be possible to just do literally these two tasks before compile stage, but a loader sounds more systematic.

During the experiments I figured out and fixed all above described problems. Changes is prepared in this PR.
Now I understand that I was wrong with raw modules. Yes, we can modify raw CSS files/modules before they got processed by other loaders :)
I published all changes under 2.0.0-beta.6 version (this version for webpack 5). So you can try it.
I wrote test with css file and external css file, looks like it's working well. Also added some other changes: renamed class to ModifySourcePlugin and slightly changed options format.
@matthewma7 So now you can do something like this
{
  plugins: [
    new ModifySourcePlugin({
      rules: [
        {
          test: /node_modules\/modern-normalize\/modern-normalize\.css$/, // external css
          modify: (src, file) =>
            src + `.myExtraClass { background: gray; /* ${file} */ }`
        }
      ]
    })
  ],
  module: {
    rules: [
      {
        test: /\.css$/i,
        use: ['style-loader', 'css-loader']
      }
    ]
  }
}

Thank you! for the immediate help. 😃
It works for my case. I am curious if it is a huge change from unshift() to push().
I noticed an another small thing, I see two 'Compiled successfully.' message with the plugin. Maybe it has something to do with the fact of dynamic loader addition.

@matthewma7 I'm happy that it's works for you.
Yep, pushing loader to the end of array let's Webpack to use its first (as I understand).
Two messages it's the problem. Maybe there is the way to preload this loader to avoid rebuild, I don't know. I think I will ask the Webpack guys later.

Got it.
Thank you the help! This plugin opens up so many possibilities! 😃
This issue can be closed now. 🙂

@matthewma7 Thank you for the kind words! 😊 ❤

@matthewma7 Hey, I'm started investigating into the issue with two messages and it's looks like it's problem with html-webpack-plugin.
Did you update html-webpack-plugin to latest version with support for webpack 5? Looks like @jantimon already known about this issue

@matthewma7 Hey, I'm started investigating into the issue with two messages and it's looks like it's problem with html-webpack-plugin.
Did you update html-webpack-plugin to latest version with support for webpack 5? Looks like @jantimon already known about this issue

The reason is that html-webpack-plugin is using a new webpack 5 feature which is not working correctly with watchpack.
The webpack core team is trying to fix it:
webpack/webpack#12283

The reason is that html-webpack-plugin is using a new webpack 5 feature which is not working correctly with watchpack.
The webpack core team is trying to fix it:
webpack/webpack#12283


Can't fetch products [BUG]

Hi!
Describe the bug
I'm trying out shopware-pwa with Shopware 6 !
Shopware is running correctly in docker.
Shopware-pwa is running correctly when I'm using demo backend but when I switch to local backend then the only working endpoint is /navigation which setups my navbar correctly.
When home page loads I get 404 saying: Problem with fetching CMS data Request failed with status code 404 What I see is:

When I click on any navigation item, there is reqeust made to the backend /page endpoint with path sent. But I get 404:

Expected behavior
Getting it work like with demo backend.
Actual behavior
As shown on screenshots.

@pawelkarauda to have a given path handled by page resolver, these things need to happen:

the category should be visible and assign to the "storefront" sales channel (it's not handled for headless type yet)
the plugin with page resolver should be installed and enabled (I guess you had it)
the seo_path index should be rebuilt with command dal:refresh:index (manually in shopware CLI or another way)

page resolver look for given path (your case is "beauty/") in the seo_path_url table. Entries in this table are related to the "storefront" sales channel's type which describes the slugs' format.
I hope it will help

Hi, thanks!
Routing started to work!
So when I hit any navigation link I'm able to see products.
Showing single product also works.
New issues:
I can add it to the cart and I can see that request is made but I don't really know what it saves because I'm not logged in. After website reload it is no longer in cart.
But without reloading the product is in the cart, and when I open cart and click on "Go to Checkout" button it does nothing.
I also noticed that I'm not able to register because I receive an error like this:

Is it the case that it is still during development or am I doing something incorectly?

Great news @pawelkarauda, in regards to page resolver issue.
regarding the second problem, please open an issue and fill all required sections, but for now I can tell you that we do know the problem with "losing a session for SSR" :+1: nevertheless the issue will help us better understand the problem.
the problem with registration depending on "hardcoded" salutationId which isn't able to be selected on the register screen. You can grab it from the Shopware instance settings in the admin panel. Select the salutation you want, discover the id and use it on the frontend (@krskibin can describe where to put it)  It's a temporary workaround.
@rmakara, @krskibin - as we can see, picking up the salutation (Mr, Mrs, other) is a really important feature. Shall we start doing it?
thanks again for checking the app :+1:

Home site doesn't work yet. At least it is showing empty page. What should I do to show template?
you can set the right template (chosen in Shopping Experiences) and assign it to the Root Category which is set as entry point in sales channel settings.

page resolver which recognizes the paths, uses the "/" for the root category, being on the top of the navigation.

I am in the same situation, I still can't see the homepage, I maybe didn't properly understand how to assign the right template in shopping experiences.

Closing this issue as troubleshooting https://github.com/DivanteLtd/shopware-pwa/blob/master/TROUBLESHOOTING.md describes the solution.
@CthulhuDev please let us know if you have problems and troubleshooting won't help you.


Find Four Issue

When I send a move to someone in FindFour this happens http://prntscr.com/fmhzfe . No outgoing packet is sent.

What platform are you running on? This works for me on my end.

Windows


Changes for Mobile scope documents and images.

Changelog
Added

Page
Deploy Preview
Comment

Name
Link
Comment

Updated

Page
Deploy Preview
Comment

Name
Link
Comment

Preview This Change
To see how this change looks in production, scroll down to Deploy Preview. Select the link that looks like https://deploy-preview-<num>--cobalt-docs.netlify.app/
Variables
Help us support a “Write once, publish everywhere” single source of truth. If you see a line that looks like:
{{% asset-categories %}}
You’ve found a shortcode that we include in multiple documents.
You’ll find the content of the shortcode in the following directory:
https://github.com/cobalthq/cobalt-product-public-docs/tree/main/layouts/shortcodes
That shortcode has the same base name as what you see in the PR, such as asset-categories.html.
Checklist for PR Author
[ ] Did you check for broken links and alt text?
Be sure to check for broken links and Alt Text issues. We have a partially automated process,
as described in this section of our repository README:
Test Links and Alt Attributes.

Await autorisation from Graham or Molly before approving.

can i get preview links net time? I think these look good though!

@molfinn If you check the Netlify box just above, there is a preview link that appears there.

hm i didn't get it to work. i'll try again next time i guess


Files, attachments, uploading

Some data should not be structured in Atomic Data, but in some existing (binary) format. How should dealing with these files work in Atomic Data?
Some thoughts:

One option is to include the binary as Base64 in the Resources, but that would be very slow to parse / serialize. This might be a good idea for small files such as icons, but for everything else: no.
We could have a File Class that has a bunch of properties containing metadata, such as file title, size and mime type. This File could then link to the actual file URL.
We could host the File Resource on the same URL as the actual file itself, and use HTTP content negotiation to either open the file, or the metadata of the file. However, this might lead to weird UX: imagine opening a File resource in Atomic Data Browser, going to the URL, seeing a nice in-browser preview, then re-opening the page, and getting the full file instead of the metadata thing. Not great.
How does authorization work? If files themselves are resources, we could simply use existing Hierarchies. If the files exist as separate entities, how do we know what the rights are? Do they still have parents?

Classes
The File Class
A File can be any type of information object, such as an image, video, executable or zip file.
In Atomic Data, the actual resource that you want to download is seperate from the metadata.
The File Resource itself only contains the metadata, and links to the actual Resource.
Required:

filename
mimetype. Mimetype string, e.g. audio/mpeg (for MP3). Maybe replace this with the filetype prop, because that would resolve into something more human readable and complete.

Optional:

filetype. Links to a MimeType / FileType instance (see below)
``

The Mimetype / filetype Class
A MimeType describes how a certian filetype should work.
Maybe we could import all the mime types and convert them to atomic data?
That way, all MIME types would be machine readable, which is pretty cool.
However, at this moment most MIME types seem to only be describes as plaintext resources.
https://github.com/jshttp/mime-db
Requires:

Mimetype string
URL of RFC
?

API design thoughts

Add an /upload Endpoint, to which the user can Post (multi-part) Form data.
Or we could POST to any resource, and create an attachment for the newly uploaded item. That way, all files will have some Parent, which helps to deal with rights. However, I kind of like having a really clear endpoint with its own description.
After upload, the server replies with a newly created URL (or a list of URLs if multiple files) that (when accessed in a web browser) downloads the file. If opened in Atomic-Data-Browser, or fetches using application/ad+json it shows the metadata.
If we post to /upload, how do we know what the parent is? We could use a JSON filled multi-part form... Or maybe encode it in the URL as a query parameter, which is how Atomic Endpoints work.

We have a spec and an implementation. Closing for now. https://docs.atomicdata.dev/files.html


Is there solana support yet?

Last year in feb there was talk about solana support. I was looking for docs but I can't find any?

Hi @sherodtaylor! Solana support is being actively worked on, and will be added to the documentation when it is available for testing. Will update this issue when that is!

@sherodtaylor See this blogpost for an update on Solana Support via Substreams https://thegraph.com/blog/indexing-solana-substreams/
I also recommend the following resources

Substreams developer guide
Substreams documentation
Substreams Playground on GitHub
Chains & Endpoints documentation
Devcon 2022: Introducing The Graph Substreams for High-Performance Indexing video
Solana SPL Token Transfers Substream Example Substream

@Web3Slimchance this is awesome thanks! 👍


ar

General information

NodeJS version: x.x.x
NPM version: x.x.x

Problem description
Reproduction steps

Just wondering what the issue here?

@imaaxa Terribly sorry. i can't even remember creating this issue at all. I'm closing it right away.


is AM/PM possible in a datetime? Was this removed?

I recently upgraded from an earlier version and am having to rewrite all of my mask definitions.  Is "mm/dd/yyyy hh:mm xm" no longer an option? I can't seem to get AM/PM to work and the documentation doesn't match up with the release version at all.
Can you offer any help?

@pbarney ,
Which version do you use?

@pbarney ,
Added the definitions in the alias, and updates the readme

I'm using version 4.0.0-100. Thanks for the update to the docs, and ESPECIALLY to the am/pm. That will help a lot. You need a tip jar!


Introductory Guide to Building Tensorflow 2.5.0 from Source

We ask that you please be patient as our team works through approving and publishing all articles/tutorials in a timely manner. Allow 1-3 days for a topic to be reviewed and/or approved - allow 3-7 days for articles to be reviewed and/or published.
Be sure to visit our Resources Page for tools, resources, and example articles to go over.
NOTE: (Please ensure that you have only one open issue + linked pull request at a time. This will ensure that we complete the article in a timely manner from inception to publishing.)
NOTE: We tend to stray away or tend not to publish reviews/comparisons of commercial product offerings.
We're looking for the first 2-3 paragraphs of the article that appropriately summarize what your article will be about.
Proposed title of article
Your title should be descriptive of the article/tutorial. Be Specific. Use keyword research to gain your article a higher ranking.
Introductory Guide to Building Tensorflow 2.5.0 from Source
Introduction paragraph (2-3 paragraphs):
Please write the Introductory paragraph(s) that would be included in your article. We will use this writing snippet to help us assess overall quality before approval. We're looking for the first 2-3 paragraphs of the article that appropriately summarize what your article will be about.
Take your time and write the content as you would intend to get it published.
Building software from source is often mentioned in most of the documentation sites for popular frameworks and packages. In this article, we will understand what it means to build software from source code and why one would want to do the same. As an example, we will install Tensorflow 2.5.0 from the source on both Windows and Ubuntu. The key aspects of this tutorial will include all the places of possible errors that one can run into while installing the package. We conclude the tutorial by using the built package.
Key takeaways:
What are the 3-5 most important things the reader should understand or be able to do after reading this article? Use this area to get your ideas down on the bulk of your article or tutorial.

Building software from source: Why, when, and how?
Installing tensorflow from source on Windows and Ubuntu.
Using the built package to run a short piece of code using TensorFlow.

References:
Please list links to any published content/research that you intend to use to support/guide this article.
N/A
Templates to use as guides

How To Guide Template
Software Review Template
Tutorial Template

Approved - @lalith1403

Closed #2654 via #3097


Cannot execute some automation triggers

Automation triggers like: "convert to account" and "convert to account and opportunity" don't execute. In the admin, when testing the trigger, I see the error: "An error occurred while executing the trigger (see browser console for details): crust.auth.repository.UserNotFound".
Steps to reproduce:

Enter /crm/admin/automation/74999957551054872/edit
Test it on the record:<PHONE_NUMBER>2840196 (this is a test lead that has not been converted yet)

Which line is causing this?
Might be that userID is unset (or 0) and that might be the cause of problems.
This an implementation issue.

Aaaaaa I see. The owner of the record was deleted. Changing the owner on the record and it worked.


mysql.createPool charset doesn't work

I'm using node mysql to connect to database and I have the following createPool setup
const db = mysql.createPool({
    host: process.env.host,
    user: process.env.username,
    password: process.env.password,
    database: process.env.database,
    multipleStatements: true,
    charset: 'UTF8MB4_GENERAL_CI'
});

Now if I use `SHOW VARIABLES LIKE 'character_set%' in phpmyadmin database page I get
character_set_client	utf8mb4
character_set_connection	utf8mb4
character_set_database	utf8
character_set_filesystem	binary
character_set_results	utf8mb4
character_set_server	latin2
character_set_system	utf8
character_sets_dir	/usr/share/mysql/charsets/

On the other hand, if I use same query in node server db.query("SHOW VARIABLES LIKE 'character_set%'", ...) it returns
[
  RowDataPacket {
    Variable_name: 'character_set_client',
    Value: 'latin2'
  },
  RowDataPacket {
    Variable_name: 'character_set_connection',
    Value: 'latin2'
  },
  RowDataPacket {
    Variable_name: 'character_set_database',
    Value: 'utf8'
  },
  RowDataPacket {
    Variable_name: 'character_set_filesystem',
    Value: 'binary'
  },
  RowDataPacket {
    Variable_name: 'character_set_results',
    Value: 'latin2'
  },
  RowDataPacket {
    Variable_name: 'character_set_server',
    Value: 'latin2'
  },
  RowDataPacket {
    Variable_name: 'character_set_system',
    Value: 'utf8'
  },
  RowDataPacket {
    Variable_name: 'character_sets_dir',
    Value: '/usr/share/mysql/charsets/'
  }
]

And I'd expect them to be something related to charset I've set in createPool function. The issue here is that special characters returned by my database turn to � and I looked for solutions but none of them seem to work and I'm starting to think this is the issue.
Also if I use query db.query("SET character_set_client = 'utf8';" + "SET character_set_connection = 'utf8';" + "SET character_set_results = 'utf8';" + "SET character_set_server = 'utf8';" + "SHOW VARIABLES LIKE 'character_set%';", ...) it returns what I'd expect
[
    RowDataPacket {
      Variable_name: 'character_set_client',
      Value: 'utf8'
    },
    RowDataPacket {
      Variable_name: 'character_set_connection',
      Value: 'utf8'
    },
    RowDataPacket {
      Variable_name: 'character_set_database',
      Value: 'utf8'
    },
    RowDataPacket {
      Variable_name: 'character_set_filesystem',
      Value: 'binary'
    },
    RowDataPacket {
      Variable_name: 'character_set_results',
      Value: 'utf8'
    },
    RowDataPacket {
      Variable_name: 'character_set_server',
      Value: 'utf8'
    },
    RowDataPacket {
      Variable_name: 'character_set_system',
      Value: 'utf8'
    },
    RowDataPacket {
      Variable_name: 'character_sets_dir',
      Value: '/usr/share/mysql/charsets/'
    }
  ]

And also if used as multipleStatements in front of select query I'm using to get text from database, db.query("TONS OF SET VARIABLES HERE;" + "SELECT STUFF", ...) the special characters don't turn to � anymore and it works as I think it should.
What am I missing? Why does createPool charset not affect my character_set variables? I also tried utf8, UTF8, utf8mb4, UTF8MB4 as charset.

I tested it locally and the charsrt for the pool works fine when I try it. But there is a way for the server to behave as your described: if your server is configured to ignore the client charset in the handshake https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_character-set-client-handshake

I tested it locally and the charsrt for the pool works fine when I try it. But there is a way for the server to behave as your described: if your server is configured to ignore the client charset in the handshake https://dev.mysql.com/doc/refman/5.7/en/server-options.html#option_mysqld_character-set-client-handshake

I'm not too familiar with SQL, could you maybe elaborate how can I access/change/fix that with phpmyadmin panel?

That setting is set on your server. It would be set in the same location that is setting your server to have a default of latin2, which is definitely custom, as no mysql released has that as the default. It is usually in the server's ini file.
You can read more about how to configure the server here: https://dev.mysql.com/doc/refman/8.0/en/server-configuration.html

I messaged my hosting about it because I don't think I have access to neither console nor config files, but I don't understand how is setting charset in createPool different from manually querying set character_something = 'utf8' since the manual one seems to work. I assume it's because setting charset doesn't insert set character at the beginning of all of my queries and does something different.

It is two separate methods to change the charset in mysql server: as part of the handshake in in a query after connecting. Both of which can be enabled or disabled by the server. The charart configuration in this module sets the value in the handshake, but it is clear the mysql server you are connecting to is configured to ignore that for whatever reason. You can always instead perform the query if that is what your hosted mysql server is configured to require you to do.
I would suggest running a mysql server locally to try out the charaet parameter to see that it does indeed work, just that for a reason I cannot explain the entity who has set up the mysql server you are using does not allow that.

You can use the connection pool event to run SET queries on all your pool connections: https://github.com/mysqljs/mysql#connection


OneDrive Example

Can you please give some examples for OneDrive migrations as well as SharePoint

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

ID: 27475eb6-82f5-1f75-a304-e5696092a3e1
Version Independent ID: e9bd89b2-a04d-5509-5c76-fc0602cc8515
Content: How to format your CSV or JSon file for data content migration - Migrate to SharePoint and OneDrive
Content Source: migration/how-to-format-your-csv-file-for-data-content-migration.md
Service: sharepoint-online
GitHub Login: @JoanneHendrickson
Microsoft Alias: jhendr

@AndyTuke Thank you for submitting feedback and contributing to the docs. We are currently investigating this.

I am interested in this as well. Thank you.

Hi @AndyTuke and @robertcaretta, thank you for your feedback.
This article apply to both (SP and OneDrive), so you should use this format. But maybe I don't understand your suggestion.

The documentation doesn't make a reference to OneDrive usage. So as a reader I can not assume it is supported. I think some basic examples of usage would help, or even add another Q&A to the FAQs section.

Understood now!

Its the formatting of the csv file for OneDrive that isn't clear.  A previous github question that is now closed gives an example, otherwise I doubt I would have worked it out

Hi @AndyTuke,
You just need to add the OneDrive Personal URL, Documents as target library and an optional subfolder. It's no more than that. I tested it and works in this way.

@dariomws Thanks, I know that now.
But the issue was logged here because this is the official Microsoft documentation on this process, and for someone who doesn't know how to do this, they're going to struggle to learn from reading this page.  I was suggesting that the documentation is updated to include a clear csv file and json example for a OneDrive migration.

I am in agreement with this statement.
On Wed, Apr 1, 2020, 5:43 AM Andy Tuke<EMAIL_ADDRESS>wrote:

@dariomws https://github.com/dariomws Thanks, I know that now.
But the issue was logged here because this is the official Microsoft
documentation on this process, and for someone who doesn't know how to do
this, they're going to struggle to learn from reading this page. I was
suggesting that the documentation is updated to include a clear csv file
and json example for a OneDrive migration.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/OfficeDocs-SharePoint/issues/1860#issuecomment-607174571,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAMJ2HIZSDTM6K5QGEOAMCDRKMLEDANCNFSM4LPIET3A
.

@AndyTuke I added an OneDrive example in the CSV section 2 days ago. You can see it in the PR above.

Thanks, I can see it in the PR.  How long till it appears in the docs?  Its not there yet.

Once the state changes from Open to Merged, it would take a couple of hours.

Still no example? I'd love to see once, specially if it has a scenario when copying to a subfolder in the path.

@robertcaretta Thank you for submitting feedback. We understand that this issue has been resolved.
Please feel free to re-open this issue if there is a specific area of the docs that we can improve or make better. Thank you.


Cdshooks textual

Textual and language improvements.
We have some other comments too, they are filed as Jira tickets.

@vadi2 , @bvdh , @brynrhodes - any significant concerns with this PR as is? Otherwise, I'll merge.

@bvdh is good with this, so it's fine to me merged from out side.


test: enable unit tests to work with variable reference fee

High Level Overview of Change
This PR is a continuation of work done in: #5118
Fix remaining unit tests to be able to process reference fee value other than 10.
Context of Change
In preparation for potential reference fee change we would like to verify that fee change works as expected. The first step is to fix all unit tests to be able to work with different reference fee values.
Type of Change
[x ] Tests (you added tests for code that already exists, or your new feature included in this PR)
API Impact
None
Test Plan
Tested following reference fee values: 10, 20, 50, 100, 200, 500, 1000 by changing https://github.com/vvysokikh1/rippled/blob/2f432e812cb773048530ebfaf2e0e6def51e3cc2/src/test/jtx/impl/envconfig.cpp#L47

Test Plan Tested following reference fee values: 10, 20, 50, 100, 200, 500, 1000 by changing https://github.com/vvysokikh1/rippled/blob/2f432e812cb773048530ebfaf2e0e6def51e3cc2/src/test/jtx/impl/envconfig.cpp#L47

Can you pls add a command line option to set this value ? It will probably go somewhere in app/main/Main.cpp (look for sections guarded by #ifdef ENABLE_TESTS )

Test Plan Tested following reference fee values: 10, 20, 50, 100, 200, 500, 1000 by changing https://github.com/vvysokikh1/rippled/blob/2f432e812cb773048530ebfaf2e0e6def51e3cc2/src/test/jtx/impl/envconfig.cpp#L47

Can you pls add a command line option to set this value ? It will probably go somewhere in app/main/Main.cpp (look for sections guarded by #ifdef ENABLE_TESTS )

This is actually quite tricky to do in runtime. Almost all tests allocate the Env' and Config' independently and it would require significant effort to propagate the fee value from startup params.
Feasible option is to make it compile time setting in CMake

Test Plan Tested following reference fee values: 10, 20, 50, 100, 200, 500, 1000 by changing https://github.com/vvysokikh1/rippled/blob/2f432e812cb773048530ebfaf2e0e6def51e3cc2/src/test/jtx/impl/envconfig.cpp#L47

Can you pls add a command line option to set this value ? It will probably go somewhere in app/main/Main.cpp (look for sections guarded by #ifdef ENABLE_TESTS )

This is actually quite tricky to do in runtime. Almost all tests allocate the Env and Config independently and it would require significant effort to propagate the fee value from startup params.
Feasible option is to make it compile time setting in CMake

Yeah in that case just pls add an option to CMake (files RippledSettings.cmake and RippledCore.cmake); it is important that we can run unit tests with an arbitrary fee, so the new features do not revert to the hardcoded default 10.


phone - selecting the Temperature boxes should open numbers keyboard

Is your feature request related to a problem? Please describe.
very low priority:

clicking on a box that needs a number should auto open phone Numbers keyboard.

currently  it opens alpha keyboard and need to manually switch to numbers.

completed and tested on Android and iphone


Check param count

@lucastabelini Hi again! I ran a parameter count with thop on PolyLaneNet (EfficientNetB0), and got 0.87M, do you have a official number recorded on this? I'm not sure if thop is correct about EfficientNet, since the mac count is wrong (< 1G).
I copied speed.py from LaneATT.

Thanks! I got it.


Modelsim simulation shows undefined output for FPGA output lines

Describe the bug
Modelsim simulation shows undefined output for FPGA output lines.

To Reproduce
Steps to reproduce the behavior:

Clone OpenFPGA repository
Execute OpenFPGA task or your own example:
python3 openfpga_flow/scripts/run_fpga_task.py basic_tests/full_testbench/configuration_chain
<task.config>

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
Configuration file for running experiments
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
timeout_each_job : FPGA Task script splits fpga flow into multiple jobs
Each job execute fpga_flow script on combination of architecture & benchmark
timeout_each_job is timeout for each job
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
[GENERAL]
run_engine=openfpga_shell
power_tech_file = ${PATH:OPENFPGA_PATH}/openfpga_flow/tech/PTM_45nm/45nm.xml
power_analysis = true
spice_output=false
verilog_output=true
timeout_each_job = 10*10
fpga_flow=yosys_vpr
#fpga_flow=yosys
[OpenFPGA_SHELL]
openfpga_shell_template=${PATH:OPENFPGA_PATH}/openfpga_flow/openfpga_shell_scripts/write_full_testbench_example_script.openfpga
openfpga_arch_file=${PATH:OPENFPGA_PATH}/openfpga_flow/openfpga_arch/k4_N4_40nm_cc_openfpga.xml
openfpga_sim_setting_file=${PATH:OPENFPGA_PATH}/openfpga_flow/openfpga_simulation_settings/auto_sim_openfpga.xml
#openfpga_vpr_device_layout=
openfpga_vpr_device_layout=--device auto
openfpga_fast_configuration=
[ARCHITECTURES]
arch0=${PATH:OPENFPGA_PATH}/openfpga_flow/vpr_arch/k4_N4_tileable_40nm.xml
[BENCHMARKS]
bench0 =${PATH:OPENFPGA_PATH}/openfpga_flow/benchmarks/micro_benchmark/or2/or2.v
[SYNTHESIS_PARAM]
bench_read_verilog_options_common =
bench0_chan_width  = 300
bench0_top = or2
[SCRIPT_PARAM_MIN_ROUTE_CHAN_WIDTH]
end_flow_with_test=

See error - Follow steps for modelsim simulation under Manual Methods in https://openfpga.readthedocs.io/en/latest/tutorials/design_flow/verilog2verification/
use -suppress 2892 as compiling option.

Expected behavior
When I ran iverilog simulation, simulation ran successfully.  With modelsim I  got undefined output lines on FPGA_out
Screenshots
If applicable, add screenshots to help explain your problem.

Enviornment (please complete the following information):

OS:
Red Hat 11.4.1-2
Compiler:
gcc version 11.4.1 20230605

Additional context

Image1 - iverilog simulation wave

Image2- Simulation using modelsim

bitstream file path in testbench needs to be updated at
$readmemb("fabric_bitstream.bit", bit_mem);
Modelsim could not read file fabric_bitstream.bit, resulted into undefined FPGA output.
I modified above line and mentioned complete path for bitstream file, and it worked.


API/Initial Rest Client

Add dependency to Retrofit (+OKHttp), RxJava, and RxAndroid.
Add RestClient component to wrap API call.
Small PoC: requesting 20 top stories and displaying it.

Updated!


Updating agent version to support Azure SPN

In Sprint 86 we added support for Azure Service principal on agent side, so azure related tasks need to be updated in order to support SPN.

Looks fine.


Use Dialer in Sentinel failover when available

Fixes https://github.com/go-redis/redis/issues/1071

Hi, I pulled the updated master but it is still not working.
Custom dialer gets overridden by default dialer.
This is my client declaration :
	client = redis.NewFailoverClient(&redis.FailoverOptions{ 		MasterName:    masterName, 		SentinelAddrs: []string{clusterNode1, clusterNode2, clusterNode3}, 		Password:      password, 		Dialer: func(ctx context.Context, network, addr string) (net.Conn, error) { 			// This dialer is not used : must be a bug 			fmt.Println("Connecting to SOCKS5 prior to this.") 			dialer, err := proxy.SOCKS5("tcp", socksProxyHost, nil, proxy.Direct) 			if err != nil { 				fmt.Println("Oops, cannot connect to the proxy :", err) 			} 			return dialer.Dial(network, addr) 		}, 	})
I tried to comment out :
opt.Dialer = c.dial in sentinel.go and it finally went through my custom Dialer but unfortunately, "addr" is valued to "FailoverClient" so it can't connect to Redis.


[Event Request] Table 77 Report Selections: OnBeforeGetEmailBodyVendorText

This request #2232 is marked as 'Ships in future update', however is still missing. We also have this requirement. Can you look into this? We need the handled pattern before the 'FindEmailBodyUsageVendor' function.
Originally posted by @lv-janpieter in https://github.com/microsoft/ALAppExtensions/issues/2232#issuecomment-517626793

This is already done for master (=15.X). We have no option to do the same for 14.X.


🐛 Mobile | Quizzes | Incorrect snackbar on the Result page

Describe the Bug
After successfully completing the React quiz, a snackbar appears with incorrect data.
Tasks

[x] Fix the icon
[x] Change wording from "... the React Quiz quiz" to "... the React Quiz"
[x] Change the color of the component where 3/3 is displayed from red to green

Acceptance Criteria

[ ] Meets Definition of Done - https://github.com/SSWConsulting/SSW.Rewards.Mobile/blob/main/_docs/Definition-of-Done.md

More Information

Environment

Device: [e.g. iPhone 12]
OS: [e.g. iOS]

Screenshots

Figure: Snackbar with incorrect data
Thanks!

Done - this no longer shows the incorrect icon.

Figure: Updated quiz results page with trophy icon, fixed text, and green background colour on the score


use 'scikit-learn' rather than 'sklearn'

The 'sklearn' PyPI package is deprecated, use 'scikit-learn', rather than 'sklearn' for pip commands.

Hello, please can you accept this request?
Right now the pip install command fails because of this.

@khuyentran1401 Can this be reviewed, please?


Markdown widget loses focus on initial entry

- Do you want to request a feature or report a bug?
bug
- What is the current behavior?
The markdown editor uses a debounce for updating it's value in the redux store, about 150ms I believe. The first time this debounce runs, the editor loses focus. So usually just after the first character is typed. Only happens that one time in the session, and only if the editor was initially empty.
- If the current behavior is a bug, please provide the steps to reproduce.

Open an entry with an empty markdown widget
Start entering text

- What is the expected behavior?
Markdown widget should not lose focus.
- Please mention your CMS, node.js, and operating system version.

CMS 1.0.2

It's almost certainly due to new logic included with 1.0:
https://github.com/netlify/netlify-cms/blob/master/src/components/EditorWidgets/Markdown/MarkdownControl/VisualEditor/index.js#L52-L58

Closing as stale and/or outdated.


Added mike build and deploy workflow for git-main

Adding a git-main page to the documentation web page would be very useful, so that as changes are pushed to the main branch they can be immediately viewed on the web page. To automate this process, I've added a github actions workflow that will do exactly that: build git-main with mike and then push it to gh-pages, where the changes will then get pulled by the server. Since gh-pages is a protected branch, I needed to setup and use a personal access token.
Currently MIKE_PAT is using a personal access token of mine, but setting up a rosflight bot account with access only to that branch would be a safer solution.

After further research I decided that this isn't a secure approach, as giving github actions the ability to push to protected branches with a PAT means that anyone could create a branch, modify the workflow file, push those changes, and github actions would compete them, even if they were for a protected branch. This could lead to malicious actors pushing malware or dangerous links onto the website, which would obviously be bad. Using a bot account seems like the best solution right now, or manually updating the git-main branch.
This is a problem for quite a few people it seems. Discussion on it can be found here: https://github.com/orgs/community/discussions/25305

Actually, it looks like you can require that Github action workflows have approval before running when pushed by outside collaborators, and disable workflows entirely for pull requests from forks.


Autofind devices results in a JavaScript error

Trying to use "Discover All Devices" results in nothing being returned and an infinite spinner.  Upon further inspection, the index.html is looking for "if (data.windowcoverings.length > 0 ) {", but the list is never set in server.js resulting in a type exception.  Adding         windowcoverings: this.windowcoverings as part of the return statement fixes the problem.

thanks for that 1.7.5 is live and includes that fix


Service creation isn't complete until elb is provisioned

EOM

Irrelevant after switching from ELBs to consul.


tests: [KG-234] backend unit tests

I have added and changed some unit tests that would test the functionality.
Converted existing tests to gomega, seemed simpler
Removed unused function and its tests

Very nice!
So we have one test failing for the time of the queries, which I assume is "normal" because our queries take long. And I have another one: unexpected call to QueryRange, is it normal?

Good job!

Hey, it was actually an error, that we don't check for negative values :D Added the check to the code


Custom href for the RDF file link

Hi there, thanks once again for this great lib !
It seems that the current href link generated for the RDF (
RDF (turtle)
) points to the local file used to generate the doc. Currently I modify the HTML by hand, but it would be great to be able to provide an alternative href directly.
If you think this is useful, I can try to propose a PR (but we should first probably agree on the option name/style then).

Hi @smarie, perhaps we can settle on an RDF property which, if present, will override the auto-generation of that link? I'd like to keep as much config as possible within the RDF file as this ensures that all the information in any HTML documentation is in the RDF too and not added through some hidden process.
Perhaps we can use dcterms:hasFormat since we are already using other DCTERMS annotations for the ontology. That property seems to be for this sort of thing - indicating other formats. We can't use dcterms:source as that's used to indicate non-RDF sources for the ontology/vocabulary itself in many ontologies documented with pyLODE.
If present then, that dcterms:hasFormat property could be expected to be a URI literal indicating a resolvable URI to an RDF version of the ontology. Perhaps like this:
<some-ontology>
    ...
    dcterms:hasFormat "http://somewhere-online.com/my/ont.ttl"^^xds:anyURI ;
    ...
.

Then we can just trigger a replacement of the original "source info" used to make an RDF file link (see common.py:117).
If this sounds sensible or if you can think of a better way, please do put in a PR!

Thanks for the quick feedback @nicholascar ! I'll discuss this and possible alternatives with colleagues and come back to you.

By the way, would this allow for relative links ? Indeed the problem is really related to deployment on a web server. So if we wish the documentation to be testable both on a local web server and the final remote one, a relative one is mandatory.

I think that if we allow an override property like this, then it's up to the deployer to cater for all the possibilities of their environment. Ideally, the URI would be an absolute one so that anyone having the ontology RDF would have a property that works, wherever they put the file, but if a relative URI is used, it would then just be considered a documentation property and that would be ok.
So yes, relative links could work.
I always perform 1, 2 or 3 HTML tidy-up tasks to ontologies produced by pyLODE to put in images and particular links when I deploy them. I have a couple that are auto-tidied through deployment scripting but mostly I only redeploy ontologies every now-and-then so it's not a big just to update a few bits. Not compared to the actual ontology updates themselves usually!

A few thoughts:
Semantically, dcterms:hasFormat seems to mean an alternative source. Here the need is rather "this file" (the source from the html doc generation, so the original rdf file). So I think that this information does not really fit in the file. You would not include in the file a path to itself, would you ? It seems overkill

I always perform 1, 2 or 3 HTML tidy-up tasks to ontologies produced by pyLODE

yes, this is exactly what I am referring to. For example I currently replace the image with a WebVowl iframe. All of these tasks, in my opinion, should be configured by tags in the rdf. Rather, supporting a configuration file such as a custom section in setup.cfg (just like pytest, coverage, flake8, etc.) and/or a .pylode.cfg file to declare these standard operations in a very compact and user friendly way would make more sense

Semantically, dcterms:hasFormat seems to mean...

Well easy for me to not implement it!

...supporting a configuration file such as a custom section in setup.cfg...

This might be the way to go! Just like we have several executable scripts and so on for different use, having a .pylode.cfg file or perhaps even several different one, does seem sensible.
If it's not about the ontology content but just deployment etc., then I'm fine with not using the RDF!
Perhaps you could test a first version cfg file to do all the parameterization that you want and then I'll see if I can adapt that for my needs. Then we can document the different configs.

Perhaps you could test a first version cfg file to do all the parameterization that you want and then I'll see if I can adapt that for my needs. Then we can document the different configs.

Makes sense. Starting small (just the configuration logic and a few options) and adding options later seems a good way to go.
I'll try to propose something in the upcoming weeks. Thanks again @nicholascar !

No worries. I'm always happy to help people extend or implement pyLODE as sometimes I learn things from them!


Fix some french translations

Hello,
This is my first PR on this project. I'm french and I have seen some mistakes, so I corrected them :)

Welcome, @PitouGames and thank you for your contribution! Contributors must sign the Contributor License Agreement before contributions may be accepted.

Thanks! :+1:


PlayStore

What is left to do, that we can say its ready to release?

For me an about page and Licenses is the only thing that comes to mind...

Where should it be released?

I can technically release it via my own playstore-developer-account, but then your name wouldn't be anywhere but the description. (And I'm hesitant to share the password to this acc)


Unable to load PDF file larger than 128K on iOS 10.2

Hi, I am trying to use angular-pdf on my ionic APP to display pdf file.
I set the parameters $scope.pdfUrl to "http://xxx.xxx.xxx.xxx:xx/FileStoreService/DownPDF.ashx?fileNumber=xxxxxxxx".
And it worked very well on iOS 8.2, until I upgraded IOS to 10.2.
I find that when PDF is less than 128K, it works properly.And no errors in the logs too.Why?
Thanks for every help

Hi @jyxzfw , thanks for the issue!
Are you sure you don't have any kind of restrictions on your app, eventually introduced on IOS 10?

Hi @dennybiasiolli , thank you for your prompt reply!
Restrictions on my app? No. I don't even know where to set restrictions.  In my Xcode？
I'll describe my problem in detail again：
At last year, I used angularjs-pdf on iOS 8.2, and it works very well. All my PDF files on the file server, so I took $scope.pdfUrl to "http://xxx.xxx.xxx.xxx:xx/FileStoreService/DownPDF.ashx?fileNumber=xxxxxxxx". Recently, I upgraded my phone to iOS 10.2, and then it didn't work. I checked the console and found It can only load up to 131072 bytes of data. This means that only PDF less than 128KB can be loaded.
This is the progress of the log:
2017-01-17 15:04:19.756391 移动OA[17087:4488448] {"loaded":3511,"total":272348}
2017-01-17 15:04:19.802841 移动OA[17087:4488448] {"loaded":65536,"total":272348}
2017-01-17 15:04:19.820034 移动OA[17087:4488448] {"loaded":65536,"total":272348}
2017-01-17 15:04:19.820183 移动OA[17087:4488448] {"loaded":131072,"total":272348}
See, it should have loaded into the 272348, but it only loaded 131072. And in the console,there is no other log. When the second time I open the PDF, it prompts me an exception:
2017-01-17 15:05:01.591878 移动OA[17087:4488448] UnexpectedResponseException: Unexpected server response (206) while retrieving PDF "http://xxx.xxx.xxx.xxx:xx/FileStoreService/DownPDF.ashx?fileNumber=xxxxxxxx".
I have been suffering by this problem for several days.
Thanks again for your help

According to this issue, it seems a problem with an older version of pdf.js, resolved by this PR
What version of pdf.js do you use?
If you try to update your pdf.js the error remains?

Not only latest version of angarjs-pdf but pdfjs itself.
What version of pdfjs or pdfjs-dist are you using? Latest is 1.6.463,
please try to install this version with npm i pdfjs-dist or bower install pdfjs-dist
On Wed, Jan 18, 2017, 04:22 jyxzfw<EMAIL_ADDRESS>wrote:

Yes, it is also so. I used the latest version(v 1.5.0), and had built a
test ionic project.
log:
2017-01-18 10:37:44.102043 newTestAngularjsPDF[17300:4589611]
{"loaded":2211,"total":272348}
2017-01-18 10:37:44.156635 newTestAngularjsPDF[17300:4589611]
{"loaded":54211,"total":272348}
2017-01-18 10:37:44.175461 newTestAngularjsPDF[17300:4589611]
{"loaded":65536,"total":272348}
2017-01-18 10:37:44.206529 newTestAngularjsPDF[17300:4589611]
{"loaded":65536,"total":272348}
2017-01-18 10:37:44.206900 newTestAngularjsPDF[17300:4589611]
{"loaded":131072,"total":272348}
It also loaded only 131072 bytes.
But I found that the example you provided were good. I set $scope.pdfUrl="
http://xxx.xxx.xxx.xxx:xx/FileStoreService/DownPDF.ashx?fileNumber=xxxxxxxx",
then open with Safari. It works very well!
So I guess angularjs-pdf doesn't support the latest IOS.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/sayanee/angularjs-pdf/issues/170#issuecomment-273372377,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ALHBtweVKT5tqvWk-5adXAM1X93RntTcks5rTYVqgaJpZM4LkUhU
.

I did what you said. I have tried to install this version with npm i pdfjs-dist.
<EMAIL_ADDRESS>node_modules/pdfjs-dist
└──<EMAIL_ADDRESS>But unfortunately, it is still so. : (

Hi @jyxzfw,
Can you provide us an example project so we can inspect more?
Thanks!


Severe framerate issue when running from launchClient.bat

While running a mission (or when in a world created/opened from the client directly), the framerate drops to about 1-4 FPS, even in the first tutorial. This makes it extremely difficult to see what the agent is doing. Anything more than the simplest of agents will cause repeated java.lang.OutOfMemoryException crash reports from the client.
My computer is fairly high-end, enough to run Minecraft with Feed the Beast modpacks (some with over 150 mods) at 60 FPS. Here are my specs:
OS: Windows 10 Home (x64), Version 1511, Build 10586.494, Update KB3172985
Processor: Intel Core i5-4570 @ 3.20GHz
RAM: 16 GB DDR3
GPU: NVidia GeForce GTX 760
Is there a way to raise the max memory via JRE arguments for starting up the client (from 1.6 GB)? I assume doing so could improve the situation.
EDIT: There is a workaround by launching via the Minecraft launcher. However, since the tutorial suggests running via launchClient.bat, this is still an issue.

Hi @einsteinsci, sorry you are having issues. Can I ask whether you installed a pre-built release, or built from source?
A few things to try:
Minecraft should be starting with more than 1.6GB - can you check in your malmo\Minecraft\build.gradle file for a line like the following:
exec.jvmArgs(["-Dfml.coreMods.load=com.microsoft.Malmo.OverclockingPlugin","-Xmx2G"])
You could try upping the 2G to 3 or 4G, though I'm not sure why your system would require extra memory when 2G seems to work elsewhere. Are you running Malmo alongside other mods?
You could also try adding the exact JVM arguments that the Minecraft Launcher uses (hit Edit Profile and the JVM arguments are at the bottom of the dialog box - eg mine appear to be -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M)
If that doesn't help, could you paste in the log you get from Minecraft - eg the console output of launchClient.bat - maybe the Malmo mod is doing something strange.
Finally, if you've already got the forge binaries installed (which I assume you must have, since you have all those modpacks) then you should indeed be able to run the Malmo mod from the Minecraft launcher by building/installing it in the usual way. Please note that we didn't really design the Malmo mod to play nicely with other mods though, and it hasn't been tested against anything except vanilla Minecraft and the particular version of Forge we've been using (currently 1.8-<IP_ADDRESS>3).

I've been using a pre-built release. However, the source is included, and it looks like it runs gradlew build every time launchClient.bat is run anyway, so I'm not sure if that makes much of a difference.
Upping the ram in build.gradle to 4GB somehow fixed the whole thing. Perhaps when it was lagging Java wasn't able to increase the memory from the minimum while gradle was running?

Out of interest, what are the JVM settings in your Minecraft launcher? If that's also set to 4GB then it would explain why running from the launcher worked. If it's something smaller, like 1.6GB, then there must be something else going on...

I tested it with 1600M in the launcher, and it was lagging severely (although slightly less than the original issue). I was getting between 3-15 FPS in short bursts, alternating with 1-second periods of 0 FPS. This happens even after the world has fully loaded.

Strange. The defaults are fine on our machines, we don't have any issues with lag. Your Minecraft log might show something, if you paste it here. Just to be clear - does this happen when running without any other mods installed?

This was without any other mods. Malmo is the only mod installed.

Am going to close this since we've been unable to reproduce it, and @einsteinsci has a workaround. Please feel free to reopen if it's still causing problems.
Brief thought - what do you have your render distance set to?

That's always been at Far (16 chunks), but all the lag seemed to come from the tick and unspecified on the lagometer, not from rendering.


Subarrays with K Different Integers

Problem Link
https://leetcode.com/problems/subarrays-with-k-different-integers/
Coding platform
Leetcode
Programming language

[ ] C
[ ] C++
[ ] Java
[ ] Python

Additional context (OPTIONAL)
I want to solve it in Java

I want to solve it in python

I can solve it in C++

Hi @Nivedita967
I would like to solve it in C. Please assign it to me

@Nivedita967 Please check my pull request


Fixed traversal algorithm to retain closest intersection only.

Fixes #3, the original code did not keep track of the closest intersection and just returned the last intersection which registered a hit, resulting in strange artifacts. This patch uses a local IntersectionInfo to compare against: if the current intersection is closer than the best one so far, update the best one so far with the current one (occlusion is still an early return as before).
I only tested the fix on g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2 but I suppose it will work everywhere.
Before (changing the radius of the spheres from .005 to .075):

With the fix installed:

Looks good. Sorry it has taken forever for me to respond to these. I appreciate the work to fix this!


Add count words plugin

Add count words plugin

There is a conflict
Someone did already a count word plugin
Please fetch upstream and change the plugin name


sharex-dev: Add version <IP_ADDRESS>

Closes #10073

[x] I have read the Contributing Guide.

/verify

/verify

versions bucket


add watch for content, when use as ng-model, the preview function works correct

as title, please try it

Hi @taojoe thanks for the PR!
However may I know what did you encounter that needs this fix?
This is because with the current code base, I've tried adding a button in this plunker that manipulates the $scope.data.content programatically and the preview did get refreshed. It'd be great to know what case you had.

hi Kenny,
I use angular-pagedown as ng-model, so the content isn't init while the
page loaded, it's init when ajax load data to $scope, then the
$scope.$apply() called, without this fix the preview part doesn't refresh.
the progress as below
1, angular route trigger to download the view html part, and init it with
controller
2, the controller start an ajax request , when the ajax done, it will
change the $scope.content, and let angular notice this by calling
$scope.$apply()
3, the editor content is changed, but the preview still be empty.
this fix make sure the 3rd step the preview notice content change and sync.
On Mon, Feb 2, 2015 at 9:57 AM, Kenny Ki<EMAIL_ADDRESS>wrote:

Hi @taojoe https://github.com/taojoe thanks for the PR!
However may I know what did you encounter that needs this fix?
This is because with the current code base, I've tried adding a button in
this plunker http://plnkr.co/edit/1Vxo5UfYpHQdjhWatimU that manipulates
the $scope.data.content programatically and the preview did get
refreshed. It'd be great to know what case you had.
—
Reply to this email directly or view it on GitHub
https://github.com/kennyki/angular-pagedown/pull/4#issuecomment-72397461
.

--
Zhou Xiangtao
Email<EMAIL_ADDRESS>

Cool, verified the issue and updated the plunker accordingly.
Thanks man.


Inheritance mapping issue with abstract class

Whats your runtime?

Dozer version: 6.4.1
OS version: Windows
JDK version: openjdk version "1.8.0_202"

Whats the problem?
Steps to reproduce:

Create following classes:

class S {String a; String b; String c;}
abstract class A {String a}
class B extends A {String b}
class C extends B {String c}

Mapping configuration:

  <mapping>
    <class-a>com.github.dozermapper.core.vo.inheritance.abstractissue.S</class-a>
    <class-b>com.github.dozermapper.core.vo.inheritance.abstractissue.B</class-b>
  </mapping>

  <mapping>
    <class-a>com.github.dozermapper.core.vo.inheritance.abstractissue.S</class-a>
    <class-b>com.github.dozermapper.core.vo.inheritance.abstractissue.C</class-b>
  </mapping>

Dozer produces error for following order of mapping operations:

   S source = newInstance(S.class);
   A destinationA = mapper.map(source, A.class);
   B destinationB = mapper.map(source, B.class);

Observed Results:
  MapId: null
  Type: null
  Source parent class: com.github.dozermapper.core.vo.inheritance.abstractissue.S
  Source field name: c
  Source field type: class java.lang.String
  Source field value: C
  Dest parent class: com.github.dozermapper.core.vo.inheritance.abstractissue.B
  Dest field name: c
  Dest field type: null
com.github.dozermapper.core.MappingException: No read or write method found for field (c) in class (class com.github.dozermapper.core.vo.inheritance.abstractissue.B)

Expected Results:
Mapping should be successful or at least mapping result should be independent of order of mapping operations.
Link to GitHub repo with Unit test
Please see unit test which reproduce the problem
https://github.com/jajajaja/dozer/commit/6b0837118dd0b239dcada069fafac9f1aa587bf8

@garethahealy I believe I'm hitting this same issue in Dozer 6.5.2.  I can't see a commit or related PR, so I'm wondering why it was closed.  Is this fixed or did you just decide to close it without fixing?

@oliverlockwood ; i dont have the time currently to work on the project. if you can raise a PR to fix it, great. if not and this is causing blocking issues, I'd suggest looking at another mapping project:

https://github.com/DozerMapper/dozer#project-activity


how to add mongodb $near to filter

Hello
how to add filter to use $near
my addressBook schema is
import { Schema } from 'mongoose';

export const AddressBook = new Schema({
  title: {
    type: String,
    description: "Title of this address",
  },
  country: {
      type: String,
      description: "Counry of the account",
      indexed: true
  },
  region: {
      type: String,
      description: "Region of the account",
      indexed: true
  },
  city: {
      type: String,
      description: "City of the account",
      indexed: true
  },
  postalcode: {
    type: String,
    description: "City of the account",
    indexed: true
  },
  street: {
      type: String,
      description: "Phisical Address of the account"
  },
  latitude: {
      type: Number,
      description: "latitude",
      indexed: true
  },
  longitude: {
      type: Number,
      description: "longitude",
      indexed: true
  }
}, {
  collection: 'addressbook'
});

and my User Schame
import mongoose, { Schema } from 'mongoose';
import composeWithMongoose from 'graphql-compose-mongoose';
import composeWithRelay from 'graphql-compose-relay';

import { AddressBook } from './addressBook';
export const UserSchema = new Schema({
    name: String,
    email: {
        type: String,
        set: v => v.toLowerCase().trim(),
        unique: true,
        indexed: true
    },
    address:{
      type:[AddressBook],
      indexed:true
    },
}, {
  collection: 'users',
});

export const User = mongoose.model('User', UserSchema);
export const UserTC = composeWithRelay(composeWithMongoose(User));

many thanks in advance

Please read this https://github.com/nodkz/graphql-compose/issues/22
It should help.

I updated my schema for address by replace latitude and longitude with
geo:{
    type: [Number],  // [<longitude>, <latitude>]
    index: '2d'      // create the geospatial index
    }

and use this code from link you share with
  // create complex input type for geo point
  InputTypeComposer.create(`input LonLat {
    lng: Float!
    lat: Float!
  }`);

  export const UserList = UserTC.getResolver('findMany')
  .addFilterArg({
      name: 'geo',
      type: 'LonLat',
      description: 'Search by 5km radius (`2dsphere` index on `geo` field)',
      query: (query, value, resolveParams) => {
        //if (value.lng || value.lat) {
          query.where({
            address: {
                    geo:{
                      $nearSphere: {
                         $geometry: {
                            type: "Point",
                            coordinates: [ value.lng, value.lat ]
                         },
                         $maxDistance: 5000
                   }
                }
              }
          });
          console.log('query:',query);
        //}
      },
    }).getFieldConfig();

but I have an error
"errors": [
    {
      "message": "_query.where is not a function",
      "stack": null
    }
  ]

kindly help me do I have any mistakes in my code ?

Sorry for the inconvenience, was typos in an example. I fixed them.
query is not a mongoose QueryObject it is a simple object, which implicitly passed to the where clause by graphql-compose-mongoose.
Try this code:
  // create complex input type for geo point
  InputTypeComposer.create(`input LonLat {
    lng: Float!
    lat: Float!
  }`);

  export const UserListResolver = UserTC.getResolver('findMany')
  .addFilterArg({
      name: 'geo',
      type: 'LonLat',
      description: 'Search by 5km radius (`2dsphere` index on `geo` field)',
      query: (rawQuery, value, resolveParams) => {
        if (value.lng || value.lat) {
          rawQuery.address = {
                    geo:{
                      $nearSphere: {
                         $geometry: {
                            type: "Point",
                            coordinates: [ value.lng, value.lat ]
                         },
                         $maxDistance: 5000
                   }
                }
              };
          }
      },
    })
    // /* FOR DEBUG */
    // .wrapResolve((next) => (rp) => {
    //   const res = next(rp);
    //   console.log(rp);
    //   return res;
    // })
    .getFieldConfig();

// Also you may replace `findMany` resolver in your UserTC
UserTC.setResolver('findMany', UserListResolver);
// or create new one
UserTC.setResolver('findManyWithGeo', UserListResolver);

// and use them in relations/fields, eg.
GQC.rootQuery().addFields({
  userMany: UserTC.get('$findManyWithGeo'),
});

the man who must say sorry for inconvenience is me .
I tried for two days but the result return  is empty when I use filter 👎

Yep addFilterArg is quite complicated. They combine too many specific things into one function call.
Can you open PR to this file https://github.com/nodkz/graphql-compose-examples/blob/master/examples/user/models/user.js with your code.
Let's solve your problem and improve examples together.

Feel free to extend this model according to your needs.

Main problems were:

$nearSphere mongodb command/filter works only on 2dsphere index (with 2d index it throws error)
nested fields filtering should be provided in dot notation query['address.geo'] = { /* filter */ } (not query.address = { geo: { /* filter */ } }; mongodb does not understand such query)
and of course, my typo in example, which was fixed

Close this issue for now. But feel free to continue the discussion if needed.

Yep, it should work. Add any number of additional args as you need.

This will not work for the pagination resolver:
UserTC.setResolver('findMany', UserTC.getResolver('findMany')
  .addFilterArg({
    name: 'geoDistance',
    type: `input GeoDistance {
      lng: Float!
      lat: Float!
      # Distance in meters
      distance: Float!
    }`,
    description: 'Search by distance in meters',
    query: (rawQuery, value, resolveParams) => {
      if (!value.lng || !value.lat || !value.distance) return;
      // read more https://docs.mongodb.com/manual/tutorial/query-a-2dsphere-index/
      rawQuery['address.geo'] = {
        $near: {
          $geometry: {
            type: 'Point',
            coordinates: [ value.lng, value.lat ],
          },
          $maxDistance: value.distance // <distance in meters>
        }
      };
    },
  })
)

This is because $near is not supported by countDocuments which is used when getting count in the pagination resolver.
https://docs.mongodb.com/manual/reference/method/db.collection.countDocuments
You can work around this using $geoWithin.
UserTC.setResolver('findMany', UserTC.getResolver('findMany')
  .addFilterArg({
    name: 'geoDistance',
    type: `input GeoDistance {
      lng: Float!
      lat: Float!
      # Distance in miles
      distance: Float!
    }`,
    description: 'Search by distance in meters',
    query: (rawQuery, value, resolveParams) => {
      if (!value.lng || !value.lat || !value.distance) return;
      // read more https://docs.mongodb.com/manual/tutorial/query-a-2dsphere-index/
      rawQuery['address.geo'] = {
        $geoWithin: {
            $centerSphere: [[value.lng, value.lat], parseInt(value.distance) / 3963.2],
        }
      };
    },
  })
)

Also see for calculating the radius of the sphere: https://docs.mongodb.com/manual/tutorial/calculate-distances-using-spherical-geometry-with-2d-geospatial-indexes/


Running demos yields ClientError when downloading data

For example, when running https://github.com/ccurtis7/diff_classifier/blob/master/notebooks/averaging_demo.ipynb I run the cell with
for _ in [...]:
    aws.download_s3('{}/geomean_{}.csv'.format(folder, sample_name), 'geomean_{}.csv'.format(sample_name), bucket_name=bucket)

and wind up with an ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden. I'm not sure why this is given the bucket name, nancelab.publicfiles. Here's the traceback:
ClientError                               Traceback (most recent call last)
<ipython-input-3-8fe9ed826390> in <module>()
----> 6     aws.download_s3('{}/geomean_{}.csv'.format(folder, sample_name), 'geomean_{}.csv'.format(sample_name), bucket_name=bucket)

~/anaconda3/lib/python3.6/site-packages/diff_classifier/aws.py in download_s3(remote_fname, local_fname, bucket_name)
---> 35         buckt.download_file(remote_fname, local_fname)

~/anaconda3/lib/python3.6/site-packages/boto3/s3/inject.py in bucket_download_file(self, Key, Filename, ExtraArgs, Callback, Config)
--> 246         ExtraArgs=ExtraArgs, Callback=Callback, Config=Config)

~/anaconda3/lib/python3.6/site-packages/boto3/s3/inject.py in download_file(self, Bucket, Key, Filename, ExtraArgs, Callback, Config)
--> 172             extra_args=ExtraArgs, callback=Callback)

~/anaconda3/lib/python3.6/site-packages/boto3/s3/transfer.py in download_file(self, bucket, key, filename, extra_args, callback)
--> 307             future.result()

~/.local/lib/python3.6/site-packages/s3transfer/futures.py in result(self)
---> 73             return self._coordinator.result()

~/.local/lib/python3.6/site-packages/s3transfer/futures.py in result(self)
--> 233             raise self._exception

~/.local/lib/python3.6/site-packages/s3transfer/tasks.py in _main(self, transfer_future, **kwargs)
--> 255             self._submit(transfer_future=transfer_future, **kwargs)

~/.local/lib/python3.6/site-packages/s3transfer/download.py in _submit(self, client, config, osutil, request_executor, io_executor, transfer_future)
--> 349                 **transfer_future.meta.call_args.extra_args

~/anaconda3/lib/python3.6/site-packages/botocore/client.py in _api_call(self, *args, **kwargs)
--> 314             return self._make_api_call(operation_name, kwargs)

~/anaconda3/lib/python3.6/site-packages/botocore/client.py in _make_api_call(self, operation_name, api_params)
--> 612             raise error_class(parsed_response, operation_name)

ClientError: An error occurred (403) when calling the HeadObject operation: Forbidden

I get this on

pca_demo.ipynb
cloudknot_parallelization_demo.ipynb
averaging_demo.ipynb

I get this error even though my AWS credentials are entered in ~/.aws/credentials as mentioned on the boto docs and on the "example data" documentation page.

Hmmm, this is odd. Let me check on that bucket. The nancelab.publicfiles repo is read-only last time I checked. That might cause problems on demos downstream.
Could you potentially copy the files to a bucket owned by you, and run all the functions in those buckets instead? I think that's probably the best way to approach it.

I just added this to the bucket policy, so I hope you can get the files now?
{     "Version": "2008-10-17",     "Statement": [         {             "Sid": "AllowPublicRead",             "Effect": "Allow",             "Principal": {                 "AWS": "*"             },             "Action": "s3:GetObject",             "Resource": "arn:aws:s3:::nancelab.publicfiles/*"         }     ] }
I still think it would be best if you copied them to a private repo of your own, as the write functions won't work downstream. I should probably add these instructions into the demos so its clear it won't run as-is.

Thanks for resolving this in https://github.com/ccurtis7/diff_classifier/commit/2228ec9b3f3b51ae046a218f6da944ac627f28ea @ccurtis7. That helped a ton, especially with the relevant S3 documentation: https://aws.amazon.com/premiumsupport/knowledge-center/move-objects-s3-bucket/.
I think I'd like to note that mentions example data on https://ccurtis7.github.io/diff_classifier/example_data.html. That's the place I'd expect it, and would also expect a link to the relevant S3 docs.


Webpack exists at start with code 0

Hi,
It's been a few days I upgraded to Rails <IP_ADDRESS>, and around the same time, "foreman -f Procfile.dev" started to exit with code 0 automatically after creating vendor and app bundles. I'm not sure it's linked with Rails version but I can't find a way to fix it. Here are the logs of a typical foreman run.
20:01:13 client.1 | Hash: e493a6d9c109c6144672 20:01:13 client.1 | Version: webpack 1.13.2 20:01:13 client.1 | Time: 9284ms 20:01:13 client.1 |            Asset     Size  Chunks             Chunk Names 20:01:13 client.1 |    app-bundle.js  9.88 MB       0  [emitted]  app 20:01:13 client.1 | vendor-bundle.js  1.85 MB       1  [emitted]  vendor 20:01:13 client.1 |    [0] multi app 484 bytes {0} [built] 20:01:13 client.1 |    [0] multi vendor 76 bytes {1} [built] 20:01:13 client.1 |     + 1024 hidden modules 20:01:14 client.1 | exited with code 0 20:01:14 system   | sending SIGTERM to all processes 20:01:14 web.1    | [8874] - Gracefully shutting down workers... 20:01:14 web.1    | [8874] === puma shutdown: 2016-09-20 20:01:14 +0200 === 20:01:14 web.1    | [8874] - Goodbye! 20:01:14 web.1    | Exiting 20:01:15 web.1    | exited with code 0
After rebooting several times, it happened once that it could launch properly, but webpack wasn't listening to changes made to my reactjs code and I had to launch it again every time.
Did I miss something or has anyone faced this issue before ? I'm running Ubuntu 16.04 if it helps.
Thanks for your help !
Jeremy.

@JrmKrb It sounds like you have some processes that didn't get killed when you restarted. That happens all the time with foreman.
Try this: https://github.com/justin808/justin808-dotfiles/blob/master/zsh/rails.zsh#L37

Thanks for your answer @justin808 !
I tried it but it didn't change anything. I don't think it comes from here because even after rebooting the issue is still here whereas the so-called processes shouldn't be here anymore. I can't even find a pattern of when it exits automatically like here or when it works but without listening properly to changes made to client/ folder. I tried to uninstall npm/node-js/foreman and start again but it didn't work.

@JrmKrb Sounds like you have some 🐑 shaving to do! If you like, http://www.shakacode.com/work/ is ready to help! Please get in touch if you're interested.


Regex not accounting for 'H' in 'Http'?

Trying to beautify a link such as "Http://twitter.com" will result in "Http:/.../twitter.com.  Kinda looks like it has to do with the capital 'H' in the beginning.
The same thing happens if you do 'HTTP://TWITTER.COM' -> 'HTTP:/.../TWITTER.COM'

Thanks for the heads-up @bhtruong93! It's now fixed and shipped with v3.1.2 :)


test: improve ngx meta core module unit tests

Issue or need
Core module unit test is missing the happy scenario where defaults are provided. Also the test setup can be abstracted into a function.

Proposed changes
Add a test about happy scenario & do the test setup abstraction

Quick reminders

🤝 I will follow Code of Conduct
✅ No existing pull request already does almost same changes
👁 Contributing docs are something I've taken a look at
📝 Commit messages convention has been followed
💬 TSDoc comments have been added or updated indicating API visibility if API surface has changed.
🧪 Tests have been added if needed. For instance, if adding new features or fixing a bug. Or removed if removing features.
⚙ API Report has been updated if API surface is altered.

#829  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @davidlj95 and the rest of your teammates on  Graphite