after hide payment info billing run does not work

Date:2016/05/13
[Steps to reproduce]
set "HIDE_PAYMENT_INFORMATION" to true
subscribe to a service with native billing
start billing run
[Expected result]
billing result for the subscription  will be created
[Observed result]
no billing result

If you set HIDE_PAYMENT_INFORMATION to false, is billing run generates results?

Did you try to reproduce the error? In my Environment it works with HIDE_PAYMENT_INFORMATION is set to false.

No, because the steps are not clear. How do you check billing results?

What is not clear? I did not understang!

I also do not understand. It is easier to talk about the bug rather that wasting whole day to setting up environment from different branch to see that everything is ok. That is why I am asking the questions. I am asking you kindly to answer.

After billing run was executed a billing result for the subscription should exist in the Database.

To see results in DB you have to run billing against subscription which has been subscribed in already closed billing period. If the results are generated for some period it will not be regenerated again. Results has to be cleared out to generate it again.
The configuration setting HIDE_PAYMENT_INFORMATION has nothing in common with results of billing run but only on report. The flag has no impact on generating results.

[Steps to reproduce]
set "HIDE_PAYMENT_INFORMATION" to true
subscribe to a service with native billing
start billing run
for this subscription does not exist any billing result up to now. Of course  you have to start the billing run for the next billing period  This means you have to run it for a date in the future. Do you have the tool for doing this?

No, we do not. We use debugger for that purpose.
In third comment of this topic you wrote you were able to generate results. So I would clear the results in DB and follow the same steps.

Dawid,
when you try to reproduce this,
please check if you have external billing subscriptions.  I have the same problem. My "guess" is that you need to create a subscription that has external billing, and then create a subscription with native billing. Then execute billing run.

Dawid, I think there is a missunderstanding: In my third comment of this topic I wrote:

In my Environment it works with HIDE_PAYMENT_INFORMATION is set to false.>>
This means, that billing run works, before I set the hide payment to true.
For the new subscription there is no billing result up to this time.

[Steps to reproduce]
start with a empty DS
set "HIDE_PAYMENT_INFORMATION" to true
create Service Provider, publish Service
create Customer w/o specifying org E-Mail, addr.
subscribe to a service with native billing
start billing run
-> it seems that this error has something to do with optional fields for the customer organization. It is important to start with an empty db, so that no payment types or email exist. Please check the log file below:
look in System.log:
05/19/2016_15:44:55.824 FSP_INTS-BSS: INFO: ThreadID RMI TCP Connection(17)-<IP_ADDRESS>: BillingServiceBean: 00020: Billing run has started.
05/19/2016_15:44:56.417 FSP_INTS-BSS: WARN: ThreadID RMI TCP Connection(17)-<IP_ADDRESS>: BillingConditionsEvaluator: 40303: Billing result schema validation failed. Billing result for organization 11000 (tkey) and subscription 11000 (tkey) is invalid, SAX parser reported: cvc-complex-type.2.4.a: Invalid content was found starting with element 'Name'. One of '{Email}' is expected. Billing result is: 8d65d984CU1_orgINVOICE
org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 256; cvc-complex-type.2.4.a: Invalid content was found starting with element 'Name'. One of '{Email}' is expected.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:198)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:437)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:325)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(XMLSchemaValidator.java:458)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(XMLSchemaValidator.java:3237)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1796)
at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:746)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:378)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2778)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.jaxp.validation.StreamValidatorHelper.validate(StreamValidatorHelper.java:155)
at com.sun.org.apache.xerces.internal.jaxp.validation.ValidatorImpl.validate(ValidatorImpl.java:116)
at javax.xml.validation.Validator.validate(Validator.java:124)
at org.oscm.billingservice.business.calculation.revenue.BillingConditionsEvaluator.isValidBillingResult(BillingConditionsEvaluator.java:52)
at org.oscm.billingservice.business.calculation.revenue.RevenueCalculatorBean.performBillingRunForSubscription(RevenueCalculatorBean.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5388)
at com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
at com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
at sun.reflect.GeneratedMethodAccessor359.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:861)
at com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:800)
at com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:370)
at com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5360)
at com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5348)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
at com.sun.ejb.containers.EJBLocalObjectInvocationHandlerDelegate.invoke(EJBLocalObjectInvocationHandlerDelegate.java:89)
at com.sun.proxy.$Proxy391.performBillingRunForSubscription(Unknown Source)
at org.oscm.billingservice.service.BillingServiceBean.executeBilling(BillingServiceBean.java:251)
at org.oscm.billingservice.service.BillingServiceBean.startBillingRun(BillingServiceBean.java:131)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

Martin, what should we do if email and address is not provided for customer organization? We have two options:

Make the fields mandatory while creating customer
Print empty tags in billing result

Please use empty tags in billing result.

[Details of fix]
If optional values are not set, empty strings are being used to fullfill mandatory attributes in schema for billing results.

[Build] 2016/08/11 verified


Attempting to add submission or or get API token logs user out

Both of these issues may be related:
API token re-login:

Log into Metriq
Navigate to "Account" -> "API Token"
The "Account" text turns to "Log in" (but the user should be logged in).

Submissions unauthorized

Log into Metriq
Click on "Submit" button once logged in.
This yields to the "log in" page again even though the user should be logged in.
Fill in relevant fields
Attempt to submit yields "Unauthorized error"

I cleared my cookies and attempted this on two different browsers (Chrome/Firefox) but I am seeing the same issues present themselves.
Any thoughts on that @WrathfulSpatula ? Do you happen to notice similar behavior on your end?

At first, I thought this was due to the work that resets the token expiration after every successful authenticated API route call. However, if I revert the code before that point, it doesn't fix this issue. Something might have actively changed under us, about Node.js dependencies and/or browser security standards.
So, there's not a quick fix, here. I can't just roll back the code. Fixing this is top priority, though, and I hope to have a fix today.

There might have been some issue with configuration, but this should be fixed, now. Also, CORS middleware is actually not necessary in our current state of development, and it has been removed.


Deep hierarchies and wiki links

I am not sure if this is a bug or a feature request. It concerns the interaction between Dendron and the wiki links feature of Markdown Notes.
Describe the bug
Scaling of hierarchies when combined with wiki links becomes quickly unworkable.
To Reproduce
Steps to reproduce the behavior:

Create a vault with a hierarchy of files going a few levels deep.
Attempt to set a wiki link between two files

Expected behavior
Being able to select a file from the popup.
Screenshots
You end up with something like this. You can't see the target file title.

Desktop (please complete the following information):

OS: Win10
Browser: Chome
Version: 83

Additional context
Why go so many levels deep? Because you want to set custom keys in the individual files' frontmatter. Should the file titles be shorter and make use of the frontmatter's title key?
Additional issues:

What about spaces? Are they allowed or not? If not, use a hyphen or an underscore?
What about titles with non-latin character sets? Allowed or not?
Small inconvenience: when an option is selected from the wiki links popup, it gets inserted with the ".md" extension. However if you then attempt to navigate there, Dendron looks for "xxx.md.md" and proposes to create it.

Given Dendron's current roadmap which is the safest way forward? Use only latin, hyphenated, short file titles?

Thoughts on deep hiearchies

its true that due to the nature of the the links, the longer the hierarchy, the longer the link

would argue that this is one of those its a feature not a bug cases - if you end up with really long hierarchies, you might have some opporunities to optimize

an alternative to the hierarchy you've proposed

writing.md
writing.part.1.md
writing.part.2.md
writing.chapter.1-1.md
writing.chapter.2-1.md
...

key points to note: instead of going down, we are flattening the hiearchy into distinct parts

you can add links from writing to parts and parts to chapters using journal notes

if you really want to go with the hierarichal means of organizing, you could make each path shorter and use the desc property of the schema for the long name

wr.md
wr.part1.md
wr.part1.chapter1.md
wr.part1.chapter1.section1.md

Additional issues

What about spaces? Are they allowed or not? If not, use a hyphen or an underscore?

spaces are not allowd in the file names. currently, we recommend using '-' for space

What about titles with non-latin character sets? Allowed or not?

non-latin characters sets should be allowed but haven't been extensively tested yet so feel free to file an issue if you encounter one

Small inconvenience: when an option is selected from the wiki links popup, it gets inserted with the ".md" extension. However if you then attempt to navigate there, Dendron looks for "xxx.md.md" and proposes to create it.

this is because there's a different extension that hadnles wiki links vs dendron nav. we ended up forking it so we can make faster updates. can you submit this as an issue?

Thanks for that. A few questions:

how to reference a note's front matter key values from the note's text?
if, instead of using a hierarchy, I structure multiple pieces of text by connecting them with wiki links (or journal notes) how can I display the whole text? Do you plan to support some kind of transclusion mechanism?

how to reference a note's front matter key values from the note's text?
currently not possible but its on the roadmap: https://github.com/orgs/dendronhq/projects/1
if, instead of using a hierarchy, I structure multiple pieces of text by connecting them with wiki links (or journal notes) how can I display the whole text? Do you plan to support some kind of transclusion
mechanism?
You can peek at notes linked by wiki-link. Have also added native transclusion in the roadmap: https://github.com/orgs/dendronhq/projects/1

Great, thanks


代码不理解

elif self.name=='CIFAR10':
for batch_num in [1,2,3,4,5]:
filename=self.name+'/train_batch_'+str(batch_num)+'.p'
with open(filename,mode='rb') as f:
features,labels=pickle.load(f)
for begin in range(0,len(features),batch_size):
end=min(begin+batch_size,len(features))
yield features[begin:end],labels[begin:end]
这段代码是什么意思，怎能对下载的cifar文件做处理

Hello @123123zz, the code you mentioned assumes that cifar10 data is already downloaded to your local drive. Just download the cifar-10-python.tar.gz file from here and unzip it with tar as tar -xvzf cifar-10-python.tar.gz. This will create a folder cifar-10-batches-py. Rename the folder to CIFAR10 and you are good to go. Please make subsequent posts in English since I do not understand Chinese. Cheers!

hello@dataplayer12  I processed the CIFAR file according to the method you said, and there is still a bug.

At the same time, I have done the following processing on the code, and there is still no progress.

I look forward to your reply.

Hi @123123zz, this repo has two branches. Can you please confirm if you are on the master branch or blog branch?

Closing due to lack of activity.


Implement  a new "Browse Candidate" page for employers, enhancing their user experience.

Set up the necessary routes and components for the "Browse Candidate" page.
Design the layout of the page to accommodate the Square Grid style.
Integrate the necessary data retrieval methods to fetch candidate information.
Display candidate details such as name, skills, experience, and education in the Square Grid format.

The task has been completed hence closing it for the sprint.


Added links for used OSS

Great! Thank you!

Great! Thank you!

no problem, love your dashboard!


Launch static site

Hi, it would be nice to see official acknowledgement that launching a static site with 'npx serve -s' (as the startup command) is supported.
For those looking for explanation, the -s argument causes rewrite of all not-found requests to 'index.html'.

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

ID: 896b5d4c-ac3b-f0a2-5102-9e59bbe2ed48
Version Independent ID: 32fd9660-0d08-205c-c7f3-57b00f35e667
Content: Configure Node.js apps - Azure App Service
Content Source: articles/app-service/configure-language-nodejs.md
Service: app-service
GitHub Login: @cephalin
Microsoft Alias: cephalin

@deruss Thanks for the feedback! We are currently investigating and will update you shortly.

@deruss Thanks for reaching here! Could you please share if any specific article you are referring for above info, could you please share more details to help you better on this.

Hi @SnehaAgrawal-MSFT ,
It's just a suggestion for your article. I'm not a Linux user, and it took me a couple hours to find this solution for migrating our React SPA site from Windows deployment to a Linux host. It would be nice if Microsoft verified and supported this approach, with documentation, as I think it would be a common solution for many people.
I don't have any official explanation, but this solution is suggested in many Stackoverflow answers:
eg:
https://stackoverflow.com/questions/66647642/linux-azure-web-app-not-showing-my-reactjs-app
more answers:
https://www.google.com/search?q=azure+"npx+serve+-s"+site:stackoverflow.com

@deruss Thanks for the feedback! I have assigned the issue to the content author to review further and update the document as appropriate.

npx will run an installed package in your Node.js repo. That means whether it will work depends on whether the serve package is available to run and whether your code can be run by serve. This is not something Microsoft can guarantee. But you should be good to go if your codebase supports it.
#please-close


How I am running my device MAX31865 on SPI with a custom CS for workaround

After investigating why I can't read values from the MAX31865 (RTD-to-Digital Converter), I've develop a custom chip select.
The original MRAA custom select, change of state for each bytes sended, so I've develop a custom one, just to demonstrate that could fix in MRAA lib.
The program that should works but....
/*
 *  Max31865 chip on SPI bus with MRAA
 *  http://datasheets.maximintegrated.com/en/ds/MAX31865.pdf
 *
 *  gcc -lmraa -o max31865 max31865.c
 */

#include "mraa.h"
#include <unistd.h>
#include <stdint.h>

int main(int argc, char **argv)
{
    mraa_init();
    printf("MRAA Version: %s\n\n", mraa_get_version() );

    // -------------------------------------

    printf("Init SPI (mode 3 - 1MHz)\n\n");

    mraa_spi_context spi;
    spi = mraa_spi_init(0);
    mraa_spi_mode(spi, MRAA_SPI_MODE3);
    mraa_spi_frequency(spi, 1000000);
    usleep(1000);

    // -------------------------------------

    printf("Configure Max31865\n\n");

    uint8_t tx_init[] = {0x80, 0xc3}; // see Table 2. Configuration Register Definition - page 12
    uint8_t *rx_init;

    rx_init = mraa_spi_write_buf(spi, tx_init, 2);
    printf(" > Write 0x%02x%02x -- Read 0x%02x%02x \n", tx_init[0], tx_init[1],  rx_init[0], rx_init[1]);

    usleep(1000);
    printf("\n");

    // -------------------------------------

    printf("Start reading Max31865 from address 0x00 and all the 8 registers\n\n");

    unsigned int i;

    uint8_t tx_read[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
    uint8_t *rx_read;

    rx_read = mraa_spi_write_buf(spi, tx_read, 9);

    printf(" > Write 0x%02x -- Read 0x%02x (Start address 0x00)\n",            tx_read[0], rx_read[0]);
    printf(" > Write 0x%02x -- Read 0x%02x (Reg. Configuration)\n",            tx_read[1], rx_read[1]);
    printf(" > Write 0x%02x -- Read 0x%02x (Reg. RTD MSBs)\n",                 tx_read[2], rx_read[2]);
    printf(" > Write 0x%02x -- Read 0x%02x (Reg. RTD LSBs)\n",                 tx_read[3], rx_read[3]);
    printf(" > Write 0x%02x -- Read 0x%02x (Reg. High Fault Threshold MSB)\n", tx_read[4], rx_read[4]);
    printf(" > Write 0x%02x -- Read 0x%02x (Reg. High Fault Threshold LSB)\n", tx_read[5], rx_read[5]);
    printf(" > Write 0x%02x -- Read 0x%02x (Reg. Low Fault Threshold MSB)\n",  tx_read[6], rx_read[6]);
    printf(" > Write 0x%02x -- Read 0x%02x (Reg. Low Fault Threshold LSB)\n",  tx_read[7], rx_read[7]);
    printf(" > Write 0x%02x -- Read 0x%02x (Reg. Fault Status)\n",             tx_read[8], rx_read[8]);
    printf("\n");

    // -------------------------------------

    printf("Decode Max31865 values\n\n");

    double Rref = 4000; // for PT1000

    unsigned int RTDdata;
    unsigned int ADCcode;
    double R;
    double temp;

    RTDdata = rx_read[2] << 8 | rx_read[3]; // MSB + LSB

    if (RTDdata & 1) {
        printf(" > Sensor connection fault");

    } else {
        ADCcode = RTDdata >> 1;
        R       = (double)ADCcode * Rref / 32768;
        temp    = ((double)ADCcode / 32) - 256;

        printf(" > RTDdata = %04x\n", RTDdata);
        printf(" > ADCcode = %d\n",   ADCcode);
        printf(" > R       = %f\n",   R);
        printf(" > temp    = %f\n",   temp);
    }
}

The result is
$ gcc -lmraa -o max31865 max31865.c

$ ./max31865

MRAA Version: v0.6.0

Init SPI (mode 3 - 1MHz)

Configure Max31865

 > Write 0x80c3 -- Read 0x0000

Start reading Max31865 from address 0x00 and all the 8 registers

 > Write 0x00 -- Read 0x00 (Start address 0x00)
 > Write 0x00 -- Read 0x00 (Reg. Configuration)
 > Write 0x00 -- Read 0x00 (Reg. RTD MSBs)
 > Write 0x00 -- Read 0x00 (Reg. RTD LSBs)
 > Write 0x00 -- Read 0x00 (Reg. High Fault Threshold MSB)
 > Write 0x00 -- Read 0x00 (Reg. High Fault Threshold LSB)
 > Write 0x00 -- Read 0x00 (Reg. Low Fault Threshold MSB)
 > Write 0x00 -- Read 0x00 (Reg. Low Fault Threshold LSB)
 > Write 0x00 -- Read 0x00 (Reg. Fault Status)

Decode Max31865 values

 > RTDdata = 0000
 > ADCcode = 0
 > R       = 0.000000
 > temp    = -256.000000

From the logic analyser you can see the CS change for each bytes
configuration

get values

And now a workaround with a custom chip select
/*
 *  Max31865 chip on SPI bus with MRAA and a custom chip select on pin#8
 *  http://datasheets.maximintegrated.com/en/ds/MAX31865.pdf
 *
 *  gcc -lmraa -o max31865-custom-cs max31865-custom-cs.c
 */

#include "mraa.h"
#include <unistd.h>
#include <stdint.h>

int main(int argc, char **argv)
{
    mraa_init();
    printf("MRAA Version: %s\n\n", mraa_get_version() );

    // -------------------------------------

    printf("Init GPIO for a custom CS (pin #8 - out) \n\n");

    mraa_gpio_context cs;
    cs = mraa_gpio_init(8);
    mraa_gpio_mode(cs, MRAA_GPIO_PULLUP);
    mraa_gpio_dir(cs, MRAA_GPIO_OUT);
    mraa_gpio_write(cs, 1);
    usleep(1000);

    // -------------------------------------

    printf("Init SPI (mode 3 - 1MHz) \n\n");

    mraa_spi_context spi;
    spi = mraa_spi_init(0);
    mraa_spi_mode(spi, MRAA_SPI_MODE3);
    mraa_spi_frequency(spi, 1000000);
    usleep(1000);

    // -------------------------------------

    printf("Workaround for SPI - The first 'mraa_spi_write_buf' change the state of the clock and interfere with custom CS\n\n");

    uint8_t tx_fake[] = {0x00};
    uint8_t *rx_fake;
    rx_fake = mraa_spi_write_buf(spi, tx_fake, 1);

    // -------------------------------------

    printf("Configure Max31865\n\n");

    uint8_t tx_init[] = {0x80, 0xC3}; // see Table 2. Configuration Register Definition - page 12
    uint8_t *rx_init;

    mraa_gpio_write(cs, 0);
    rx_init = mraa_spi_write_buf(spi, tx_init, 2);
    mraa_gpio_write(cs, 1);

    printf(" > Write 0x%02x%02x -- Read 0x%02x%02x \n", tx_init[0], tx_init[1],  rx_init[0], rx_init[1]);

    usleep(1000);
    printf("\n");

    // -------------------------------------

    printf("Start reading Max31865 from address 0x00 and all the 8 registers\n\n");

    unsigned int i;

    uint8_t tx_read[] = {0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00};
    uint8_t *rx_read;

    mraa_gpio_write(cs, 0);
    rx_read = mraa_spi_write_buf(spi, tx_read, 9);
    mraa_gpio_write(cs, 1);

    printf(" > Write 0x%02x -- Read 0x%02x (Start address 0x00)\n",            tx_read[0], rx_read[0]);
    printf(" > Write 0x%02x -- Read 0x%02x (Reg. Configuration)\n",            tx_read[1], rx_read[1]);
    printf(" > Write 0x%02x -- Read 0x%02x (Reg. RTD MSBs)\n",                 tx_read[2], rx_read[2]);
    printf(" > Write 0x%02x -- Read 0x%02x (Reg. RTD LSBs)\n",                 tx_read[3], rx_read[3]);
    printf(" > Write 0x%02x -- Read 0x%02x (Reg. High Fault Threshold MSB)\n", tx_read[4], rx_read[4]);
    printf(" > Write 0x%02x -- Read 0x%02x (Reg. High Fault Threshold LSB)\n", tx_read[5], rx_read[5]);
    printf(" > Write 0x%02x -- Read 0x%02x (Reg. Low Fault Threshold MSB)\n",  tx_read[6], rx_read[6]);
    printf(" > Write 0x%02x -- Read 0x%02x (Reg. Low Fault Threshold LSB)\n",  tx_read[7], rx_read[7]);
    printf(" > Write 0x%02x -- Read 0x%02x (Reg. Fault Status)\n",             tx_read[8], rx_read[8]);
    printf("\n");

    // -------------------------------------

    printf("Decode Max31865 values\n\n");

    double Rref = 4000; // for PT1000

    unsigned int RTDdata;
    unsigned int ADCcode;
    double R;
    double temp;

    RTDdata = rx_read[2] << 8 | rx_read[3]; // MSB + LSB

    if (RTDdata & 1) {
        printf(" > Sensor connection fault");

    } else {
        ADCcode = RTDdata >> 1;
        R       = (double)ADCcode * Rref / 32768;
        temp    = ((double)ADCcode / 32) - 256;

        printf(" > RTDdata = %04x\n", RTDdata);
        printf(" > ADCcode = %d\n",   ADCcode);
        printf(" > R       = %f\n",   R);
        printf(" > temp    = %f\n",   temp);
    }
}

The result is
$ gcc -lmraa -o max31865-custom-cs max31865-custom-cs.c

$ ./max31865-custom-cs

MRAA Version: v0.6.0

Init GPIO for a custom CS (pin #8 - out)

Init SPI (mode 3 - 1MHz)

Workaround for SPI - The first 'mraa_spi_write_buf' change the state of the clock and interfere with custom CS

Configure Max31865

 > Write 0x80c3 -- Read 0x8000

Start reading Max31865 from address 0x00 and all the 8 registers

 > Write 0x00 -- Read 0x00 (Start address 0x00)
 > Write 0x00 -- Read 0xc1 (Reg. Configuration)
 > Write 0x00 -- Read 0x44 (Reg. RTD MSBs)
 > Write 0x00 -- Read 0xd8 (Reg. RTD LSBs)
 > Write 0x00 -- Read 0xff (Reg. High Fault Threshold MSB)
 > Write 0x00 -- Read 0xff (Reg. High Fault Threshold LSB)
 > Write 0x00 -- Read 0x00 (Reg. Low Fault Threshold MSB)
 > Write 0x00 -- Read 0x00 (Reg. Low Fault Threshold LSB)
 > Write 0x00 -- Read 0x00 (Reg. Fault Status)

Decode Max31865 values

 > RTDdata = 44d8
 > ADCcode = 8812
 > R       = 1075.683594
 > temp    = 19.375000

and some snapshots from the analyser.
configuration with custom CS

configuration with custom CS zoomed

get values with custom CS

get values with custom CS zoomed

I put the original signal for CS on the first row.
To conclude
I'm not a specialist of SPI, but I think when you write, the CS still to be down until the end of transmission. And not change after each bytes sended.
Is it a bug from MRAA ?
Before I've writing in C, I've made unsuccessful with JS and PYTHON programs.
I don't understand why before the fist data is write, the clock goes down and up ?

Also an another remark, if you have severals chips on the same SPI bus, how to you fix the CS for each chips. Can the SPI functions in MRAA libs can integrate differents CS in future ? Like choosing the CS pin when transmit data...
A hardware solution can be done with mixing CS from MRAA (pin 10) and the custom CS (your pin) with a OR-gate chip and connect the output to the SPI chip
Regards,
Olivier

What mraa calls a spi context or object really is a SPI Bus + HW CS. So asking for '0' will give you a spidev5.1 we could make '1' give you spidev5.2 with a different CS. I'm reluctant to do any soft CS stuff because on some devices (like galileo gen2 or edison + arduino) doing so could cause the ADC to crash or on some devices (vocore) cause the MMC to be corrupted. With that in mind, no one is stopping you from making a CS manually like you've done :)
I don't think in SPI anything says you have to keep your CS low during the whole transfer period, however as with everything SPI there may some devices that may not like you doing so. We can change this behaviour via the spi_transfer.cs_change flag & spi_transfer.delay_usecs, I admit I don't think anyone has looked at this and what the correct default behaviour should be. Currently we stick to what the default for the driver is, maybe that's not idea. We can definately let users customise those fields with a new API, however I'd like to get an idea of what a sensible delay in usecs would be for yourself (@tingleby, @KurtE any opinions on this?). It looks like on edison we take <10us between transfers so maybe that's a sensible 'default'?

I have had a similar problem, here are my 10 cents:
Depending on Hardware (Intel Edison for example is fine) you can set the number of bits that spi transfers in mraa. I used this to transfer 16bits to the max7219 device (look at the example on github in mraa/examples)
So with the right hardware you may not need to use a custom CS
One thing I wanted to do some day is to to the SPI ioctl to disable CS (so that no other devices are disturbed) to have more than 9 bits on Raspberry Pi. As you are currently working on this, could you try the ioctl? This could make the whole thing a lot saver.

As you said, it works in 16 bits mode without a custom CS. I've made some change in my code to support the new format.
One thing to know, data are sended in LSB mode. I've try to change this with mraa_spi_lsbmode but I've the error : spidev spi5.1: setup: unsupported mode bits 8 ??????
Here the new code for who are interesting
/*
 *  Max31865 chip on SPI bus with MRAA
 *  http://datasheets.maximintegrated.com/en/ds/MAX31865.pdf
 *
 *  gcc -lmraa -o max31865-16bits max31865-16bits.c
 */

#include "mraa.h"
#include <unistd.h>
#include <stdint.h>

int main(int argc, char **argv)
{
    mraa_init();
    printf("MRAA Version: %s\n\n", mraa_get_version() );

    // -------------------------------------

    printf("Init SPI (mode 3 - 1MHz)\n\n");

    mraa_spi_context spi;
    spi = mraa_spi_init(1); // 0 = spidev5.1 / 1 = spidev5.2
    mraa_spi_mode(spi, MRAA_SPI_MODE3);
    mraa_spi_frequency(spi, 1000000);

    //mraa_spi_lsbmode(spi, 0); // don't work : spidev spi5.1: setup: unsupported mode bits 8 ???
    mraa_spi_bit_per_word(spi, 16);

    usleep(1000);

    // -------------------------------------

    printf("Configure Max31865\n\n");

    uint8_t tx_init[] = {0xc3, 0x80}; // see Table 2. Configuration Register Definition - page 12
    uint8_t *rx_init;

    rx_init = mraa_spi_write_buf(spi, tx_init, 2);
    printf(" > Write 0x%02x%02x -- Read 0x%02x%02x \n", tx_init[0], tx_init[1],  rx_init[0], rx_init[1]);

    usleep(1000);
    printf("\n");

    // -------------------------------------

    printf("Start reading Max31865 from address 0x00 and all the 8 registers\n\n");

    unsigned int i;

    uint8_t reg[8];
    uint8_t tx_read[] = {0x00,0x00};
    uint8_t *rx_read;

    for (i = 0; i < 8; i++) {
        tx_read[1] = i;
        rx_read = mraa_spi_write_buf(spi, tx_read, 2);
        reg[i] = rx_read[0];
        //printf(" > Write 0x%02x%02x -- Read 0x%02x%02x\n", tx_read[0], tx_read[1],  rx_read[0], rx_read[1]);
    }
    printf("\n");

    printf(" > Reg. Configuration            = %02x\n", reg[0]);
    printf(" > Reg. RTD MSBs                 = %02x\n", reg[1]);
    printf(" > Reg. RTD LSBs                 = %02x\n", reg[2]);
    printf(" > Reg. High Fault Threshold MSB = %02x\n", reg[3]);
    printf(" > Reg. High Fault Threshold LSB = %02x\n", reg[4]);
    printf(" > Reg. Low Fault Threshold MSB  = %02x\n", reg[5]);
    printf(" > Reg. Low Fault Threshold LSB  = %02x\n", reg[6]);
    printf(" > Reg. Fault Status             = %02x\n", reg[7]);
    printf("\n");

    // -------------------------------------

    printf("Decode Max31865 values\n\n");

    double Rref = 4000; // for PT1000

    unsigned int RTDdata;
    unsigned int ADCcode;
    double R;
    double temp;

    RTDdata = reg[1] << 8 | reg[2]; // MSB + LSB

    if (RTDdata & 1) {
        printf(" > Sensor connection fault");

    } else {
        ADCcode = RTDdata >> 1;
        R       = (double)ADCcode * Rref / 32768;
        temp    = ((double)ADCcode / 32) - 256;

        printf(" > RTDdata = %04x\n", RTDdata);
        printf(" > ADCcode = %d\n",   ADCcode);
        printf(" > R       = %f\n",   R);
        printf(" > temp    = %f\n",   temp);
    }
}

Now the CS is set low state during all the 16 bits transfer (ex. for the configuration)

@arfoll : I understand it's difficult to change the CS by soft because it had repercussion on other parts like you mention, and also on spidev dependance.
Do I close this issue and open one for customer parameters for SPI ?
Thanks for all answers.

@oloynet this is weird, wonder if it's like this on other platforms I'll investigate and get back to you - keeping this bug open is fine, bit long but that's life ehehe!
@michael-ring by disabling cs_change I wonder if we can just disable the HW CS. Again I'll try this and get back, if it's really that easy then it makes sense to do this IMHO.

I guess it is that simple,  search for no-cs in
https://www.kernel.org/doc/Documentation/spi/spidev_test.c
We can make the whole thing (nearly) transparent to the end user if the cs is not needed for more that 32 bits. On the Raspberry it might be that we can use the old CS pin, even though it is reserved by SPI. But I did not do any serious testing on that. If you consider implementing a feature for Soft-CS then I can dig deeper on Raspberry. Which other platforms would benefit? Beaglebone is fine, Edison is fine, both can do 32bits ootb, what about the other intel boards?

I dont understand - "the cs is not needed for more that 32 bits"? Can you explain?

usually I see CS for 8,9,16 and 32 bits on spi devices. For those cases soft-spi could work as a drop in replacement for platforms like Raspberry that can only do 8 or 9 bit cs.
The other usecase I see is to extend the number of available cs pins, but this would need more work because then there is a need to support 'virtual' spi devices that use the real spi device in no_cs mode and do the handling of the assigned gpio pin. This would make it possibe to have a lot more devices on the SPI bus.
The first case is fairly easy to implement, would mean that a device can get initialized with no_cs and there should be a new function that allows you to assign a gpio pin as replacement-CS. Then the whole logic for using cs can get hidden in the functions that send/receive byte,word and (perhaps) long data.

Just to give a small update - this looks like an edison spi kernel issue and not a mraa issue, it's happening only on that platform. We're working on our end on to find out what's wrong there.
@michael-ring on rpi that sounds like the spi kernel driver should fix the CS, alot of platforms (edison included) use a gpio in kernel to replace the HW CS in cases when it's not possible to get the HW to do the right thing. As for adding 'soft-cs' from userspace, let's talk about that in a different issue :)

Quick notes:
there appear to be issues with SPI with current beta.  Sample program at top of this message tries to work around with output 0 character to get CS right...  Appears to be new power management issue, I talk about in thread: https://communities.intel.com/thread/60326 I also mention a hack to the file I did to get the Adafruit display to work. (Intel_mid_ssp_spi.c)
Actually I think Edison uses normal IO pin in the kernel to do CS for SPIDEV device. (platform_spidev.c)
MRAA: Not currently supporting spi_ioc_transfer.cs_change field.  Also not sure exactly how it is supposed to work.  From Kernel, it looks like if asserted it does not change CS line?  Some places imply that it should leave the CS asserted when the transfer completes.

@KurtE yes edison should use a normal IO pin for cs spidev but it seems it does not in the case of writing bytes which is weird - do you know if the behaviour is the same on arduino code? I haven't tried that. Anyways the edison kernel guys are on it, I'll post an update here.
cs_change does something else you're right, we have to change spi mode thought that doesn't seem to work, I tried with spidev_test like:
root@edison:~# ./spidev_test -D /dev/spidev5.1 -s 1000000 -N
can't set default spi mode: Invalid argument
Aborted

So it seems that changing the spi mode doesn't work on edison - if it works on other platforms then I'm happy to include something like this http://dpaste.com/1N276PZ or similar to disable the HW cs - we can just disable it on platforms where this is not possible.

Nice!
I would like to take this code and extend it a little, please keep me posted when you add more functionality to the disable cs code.

Since this thread got too long, #149 is for NOCS discussion. The edison issue of CS going high between every byte is now fixed.

Hello,
I also want to use a custom chipselect.I want the CS to be high initially just before the transfer and go low with the first falling edge of the SCK first bit transfered. How do I achieve this?
My CS (yellow) and SCK (green) should be as in the following diagram.


NiiVue: minimal, modular, fast WebGL visualization

Title
NiiVue: minimal, modular, fast WebGL visualization
Leaders
Chris Drake (@cdrake) Taylor Hanayik (@hanayik) and Chris Rorden (@neurolabusc)
Collaborators
Nell Hardcastle (@nellh), Paul Taylor (@mrneont), Daniel Glen (@afni-dglen), Anthony Androulakis (@AnthonyAndroulakis), Soichi Hayashi (@soichih)
Brainhack Global 2021 Event
Brainhack Washington DC
Project Description

Popular tools like AFNI, FreeSurfer, FSL, SPM use legacy visualization methods.
MRIcroGL and Surfice leverage modern graphics shaders, but are not cloud ready.
Most cloud ready tools are dormant, rely on legacy methods, require many dependencies and do not provide domain specific features.
There is a niche for a minimal, modular, modern domain-specific tool.

Link to project repository/sources

Code: https://github.com/niivue/niivue
Demos: https://niivue.github.io/niivue/

Goals for Brainhack Global

Close an existing issue.
Propose a new issue: feature request, bug report, etc.
Leverage NiiVue for another BrainHack.
Create example in your favorite framework (Angular, React, Vue, Svelte, Jupiter, etc)

Good first issues

Close an existing issue.
Propose a new issue: feature request, bug report, etc..
Leverage NiiVue for another BrainHack.
Create example in your favorite framework (Angular, React, Vue, Svelte, Jupiter, etc)

Communication channels
Github issue or BrainHack lattermost or slack.
Skills

Javascript: basic
Python (for framework): basic
WASM: advanced
GLSL/WebGL: advanced
FSL, AFNI, FreeSurfer, SPM experience to identify new niches: basic

Onboarding documentation

Documentation

What will participants learn?

Advanced visualization

Data to use

Main NiiVue page includes test data. Can load links from OpenNeuro.

Number of collaborators
2
Credit to collaborators
Project collaborators listed on Github.
Image
Leave this text if you don't have an image yet

.
Type
visualization
Development status
2_releases_existing
Topic
data_visualisation
Tools
AFNI, Freesurfer, FSL, SPM
Programming language
javascript
Modalities
DWI, fMRI, MRI, PET, other
Git skills
0_no_git_skills, 1_commit_push
Anything else?
No
Things to do after the project is submitted and ready to review.

[X] Add a comment below the main post of your issue saying: Hi @brainhackorg/project-monitors my project is ready!
[X] Twitter-sized summary of your project pitch.

Hi @brainhackorg/project-monitors my project is ready!


ques in Compile the C++ extension modules for python located in cpp_wrappers.

Here are terminal result in pycharm
(sem) C:\Users\Aragaki Yui\Desktop\transformers\KPConv-PyTorch-master\cpp_wrappers\cpp_neighbors>build.bat
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
请按任意键继续. . .

I think it's fail to compile.
Enviroment:
Win10  Python==3.6  scikit-learn==0.24.1  numpy ==1.19.1
Compilers set as follow

Did I make mistakes？

Hi @huixiancheng,
I don't know what the problem is here, but it seems that it comes from a python library missing indeed. Is your environment a virtual env or a docker? If yes, are you sure you were inside your environment when trying to compile the wrappers?
Best,
Hugues

yes I use virtual env of conda and sure that i'm in this env.
Actually when firstly run build.bat,it's look like is working like follow but I doubt if it really worked
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
building 'grid_subsampling' extension
creating build\temp.win-amd64-3.8
creating build\temp.win-amd64-3.8\cpp_utils
creating build\temp.win-amd64-3.8\cpp_utils\cloud
creating build\temp.win-amd64-3.8\Release
creating build\temp.win-amd64-3.8\Release\grid_subsampling
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Anoconda\lib\site-packages\numpy\core\include -IC:\Anoconda\include -IC:\Anoconda\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /EHsc /Tp../cpp_utils/cloud/cloud.cpp /Fobuild\temp.win-amd64-3.8\Release\../cpp_utils/cloud/cloud.obj -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0
cl: 命令行 warning D9002 :忽略未知选项“-std=c++11”
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Anoconda\lib\site-packages\numpy\core\include -IC:\Anoconda\include -IC:\Anoconda\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /EHsc /Tpgrid_subsampling/grid_subsampling.cpp /Fobuild\temp.win-amd64-3.8\Release\grid_subsampling/grid_subsampling.obj -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0cl: 命令行 warning D9002 :忽略未知选项“-std=c++11”
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Anoconda\lib\site-packages\numpy\core\include -IC:\Anoconda\include -IC:\Anoconda\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /EHsc /Tpwrapper.cpp /Fobuild\temp.win-amd64-3.8\Release\wrapper.obj -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0
cl: 命令行 warning D9002 :忽略未知选项“-std=c++11”
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Anoconda\libs /LIBPATH:C:\Anoconda\PCbuild\amd64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.28.29333\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.18362.0\um\x64 /EXPORT:PyInit_grid_subsampling build\temp.win-amd64-3.8\Release\../cpp_utils/cloud/cloud.obj build\temp.win-amd64-3.8\Release\grid_subsampling/grid_subsampling.obj build\temp.win-amd64-3.8\Release\wrapper.obj /OUT:C:\Users\Aragaki Yui\Desktop\transformers\KPConv-PyTorch-master\cpp_wrappers\cpp_subsampling\grid_subsampling.cp38-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.8\Release\../cpp_utils/cloud\grid_subsampling.cp38-win_amd64.lib
请按任意键继续. . .

Why do you doubt if it really worked? Did you try to run the code after this first build? Is there an error message?
Note that I tried the code on Windows only once to verify that it worked, but I mainly use Linux. You should use Linux if you still have problems with windows

Will  It looks like I made a mistake and I will follow your advice. :see_no_evil: Thanks for your quick reply

Will It looks like I made a mistake and I will follow your advice. 🙈 Thanks for your quick reply

Hello,did u run this code on windows successfully? I just run it on linux, and are u study point clouds too?

sorry for long time pass, i miss the detail. In my memory, it could compile and train successfully in windows.

Thanks!

抱歉过了很久，我错过了细节。在我的记忆中，它可以在Windows中成功编译和训练。

are you chinese?

Would you please post the way to solve this problem? Thanks！

Thanks! I finally run it in windows!

Would you please post the way to solve this problem? Thanks！

@UncleSan
sure! You may change these two areas
-Change '/' to '\'  in trainer and tester

May add a type transformer when the code produces "target type error"

@GeoSur Thank you for your reply. I mean how to compile the C++ extension modules for python located in cpp_wrappers in win10.  when I use the command "python setup.py build_ext --inplace" to compile the extension modules, some similar errors are shown, like
 running build_ext INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils building 'radius_neighbors' extension creating build creating build\temp.win-amd64-3.8 creating build\temp.win-amd64-3.8\cpp_utils creating build\temp.win-amd64-3.8\cpp_utils\cloud creating build\temp.win-amd64-3.8\Release creating build\temp.win-amd64-3.8\Release\neighbors INFO: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\Hostx64\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -ID:\Software\Anaconda3\envs\kpconv\lib\site-packages\numpy\core\include -ID:\Software\Anaconda3\envs\kpconv\include -ID:\Software\Anaconda3\envs\kpconv\Include /EHsc /Tp../cpp_utils/cloud/cloud.cpp /Fobuild\temp.win-amd64-3.8\Release\../cpp_utils/cloud/cloud.obj -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 cl: 命令行 warning D9002 :忽略未知选项“-std=c++11” cloud.cpp D:\F\NJT\Codes\GitClone\SUMS-Semantic-Urban-Mesh-Segmentation-public-main-5stars\competing_methods\my_KPConv\cpp_wrappers\cpp_utils\cloud\cloud.h(22): fatal error C1083: Could not open the file: #include <vector>: No such file or directory error: Command "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\Hostx64\x64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -ID:\Software\Anaconda3\envs\kpconv\lib\site-packages\numpy\core\include -ID:\Software\Anaconda3\envs\kpconv\include -ID:\Software\Anaconda3\envs\kpconv\Include /EHsc /Tp../cpp_utils/cloud/cloud.cpp /Fobuild\temp.win-amd64-3.8\Release\../cpp_utils/cloud/cloud.obj -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0" failed with exit status 2
Or, could you please share the compiled results?
Thanks again.

@GeoSur I will try this method. Thank you!

Thanks! I finally run it in windows!

Please help me how much, thank you very much, my QQ3454136228

@hongzhiqiang67 看一下你的报错，是不是C++编译出了问题？


Expose a method to interrupt an audio stream

Requested functionality to expose the ability to interrupt an audioStream

Codecov Report

Merging #26 into master will not impact coverage.

@@         Coverage Diff          @@
##           master   #26   +/-   ##
====================================
  Coverage       0%    0%
====================================
  Files           1     1
  Lines         148   148
  Branches        9     9
====================================
  Misses        148   148

Continue to review full report at Codecov.

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

👏


update readme.md

TS should not transform the import statement, otherwise this plugin will not work, because the import has been already transform to the require.
Fix https://github.com/Brooooooklyn/ts-import-plugin/issues/51

Coverage remained the same at 100.0% when pulling 14c0a6900e83caa723e1822242007c38f6329d7b on WingGao:patch-2 into 7791867c9111a760f4ba9feb55e26253016573c5 on Brooooooklyn:master.

Thank you


[Snyk] Upgrade @aurodesignsystem/webcorestylesheets from 4.1.1 to 4.1.2

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to upgrade @aurodesignsystem/webcorestylesheets from 4.1.1 to 4.1.2.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.

The recommended version is 1 version ahead of your current version.
The recommended version was released 23 days ago, on 2022-11-30.

Release notes

Package name: @aurodesignsystem/webcorestylesheets

4.1.2 - 2022-11-304.1.2 (2022-11-30)
Bug Fixes

upgrade sass from 1.55.0 to 1.56.0 (cf18f0c)

4.1.1 - 2022-10-064.1.1 (2022-10-06)
Bug Fixes

demo: address incorrect value for max-width on the body (fd0de6b)

    from @aurodesignsystem/webcorestylesheets GitHub release notes

Commit messages

Package name: @aurodesignsystem/webcorestylesheets

f103bc5 chore(release): 4.1.2 [skip ci]
788d546 build(ci): update versions of build deps
cf18f0c fix: upgrade sass from 1.55.0 to 1.56.0
854c208 chore(github): remove deprecated dependency on node v12
4f8b951 chore(deps): update security vulnerabilities
dd97166 chore(deps): bump marked from 0.6.3 to 4.1.0
afdfb70 chore(deps): bump ajv from 4.11.8 to 6.12.6

Compare

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs

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


Add more test in mix mode

What problem does this PR solve?
Issue Number: ref #3594
Problem Summary:
What is changed and how it works?

full case is

p1, r2 > 1, d1 ,d2

During this process, it may break somewhere in the middle.
So add some tests for it.

Check List
Tests

[ ] Unit test
[ ] Integration test
[ ] Manual test (add detailed scripts or steps below)
[ ] No code

Side effects

[ ] Performance regression: Consumes more CPU
[ ] Performance regression: Consumes more Memory
[ ] Breaking backward compatibility

Documentation

[ ] Affects user behaviors
[ ] Contains syntax changes
[ ] Contains variable changes
[ ] Contains experimental features
[ ] Changes MySQL compatibility

Release note

None

/run-all-tests

/run-all-tests

/run-all-tests

/run-all-tests

/merge


Accept raw enode in admin namespace for add/remove peers

Describe the feature
currently we require a NodeRecord:
https://github.com/paradigmxyz/reth/blob/422b8f8e75d80e7f311f1f4812851c33131e1b82/crates/rpc/rpc-api/src/admin.rs#L19-L21
that fails serialization if address info is missing:
https://github.com/paradigmxyz/reth/blob/422b8f8e75d80e7f311f1f4812851c33131e1b82/crates/rpc/rpc-types/src/net.rs#L146-L148
geth supports raw enodes:
https://github.com/ethereum/go-ethereum/blob/b590cae89232299d54aac8aada88c66d00c5b34c/node/api.go#L95-L95
where IP info is optional
missing would break our peer model that requires an address:
https://github.com/paradigmxyz/reth/blob/422b8f8e75d80e7f311f1f4812851c33131e1b82/crates/net/network/src/peers/manager.rs#L904-L908
we can however solve this in several ways:
a) make addr optional
b) add an additional marker and use loopback address
a) seems more appropriate
TODO

accept string input in admin rpc functions
parse enode, add API functions for enode (Enr): https://github.com/paradigmxyz/reth/blob/422b8f8e75d80e7f311f1f4812851c33131e1b82/crates/net/network-api/src/lib.rs#L78-L79

not for this issues, but perhaps we should consider storing the raw Enr values, even though we don't need additional fields
ref #7001
Additional context
No response

Can I give it a try?

@AbnerZheng just checking in, do you have the bandwidth to work on this?

Yes, but I think I need some help.

accept string input in admin rpc functions.

There are methods in AdminApi , like  fn add_peer(&self, record: NodeRecord) -> RpcResult<bool>, which accept string by NodeRecord::from_str. So for accepting string input, which way do you prefer:

change the exiting method fn add_peer(&self, record: NodeRecord) -> RpcResult<bool> to fn add_peer(&self, url:String) -> RpcResult<bool>, which is similar to geth.
extend existing method of NodeRecord::from_str to support enode.

parse enode, add API functions for enode (Enr)

Looks like there are two things, supporting incomplete enode(no ip and port information) and supporting Enr protocol, should I finish both of them?

fn add_peer(&self, url:String)

this seems fine, and then add additional API function that accept the enr node instead of the NodeRecord

this is related to https://github.com/sigp/discv5/blob/04ac0042a345a9edf93b090007e5d31c008261ed/src/service.rs#L1386-L1389
I wouldn't make the socket optional in NodeRecord, I would rather make a new type that doesn't have the socket. in sigp/discv5  the distinction is made between
(i) peers with which a session is established and then go into the kbuckets, and
(ii) peers that just have a session.
only peers with contactable enrs (i.e. with a socket on node record), should go into kbuckets, because those are the peers we put into Neighbours messages. what should a peer do with a node in a Neighbours response that doesn't have a socket on which it can be contacted on? hence, strongly encourage the type safety here to help us separate logic for kbucket peers and trusted peers that I assume we are waiting for a complete node record from? @mattsse

this will be possible via #7155


[Swift+WASM] Adopt SwiftABIInfo for WebAssembly.

This is part of super early days exploration of what is required for WASM support. Given the open-ended nature of it, and the instability of WASM itself and the LLVM implementation, I haven't really tried to make this a very principled implementation but rather am trying to work through the minimal changes needed to start getting end-to-end wasm objects out of Swift.
LMK if you think this is a reasonable approach & way to land...

@swift-ci please smoke test

@DougGregor do we have smoke testing for Clang changes? Is merging into stable the right thing to do?

Hmm from looking at other PRs I guess I’m supposed to go to upstream-with-swift maybe?

Switch to be a PR against upstream-with-swift

@swift-ci please test

@swift-ci please test linux platform

@swift-ci please test MacOSX platform

Closing this, this code has been upstreamed to Clang (https://github.com/llvm-mirror/clang/commit/c72bf467c95d38f437f2dbacddf38611c21aa99a)


Dependency update for failed security audit, plus additional version bump

Description
Changed cookiejar version, as was flagged by security audit.
npm outdated flagged multiple other modules which were due a version bump, so made all immediately applicable version changes
Tested locally, everything appears to work correctly (Booking, cancelations, searches, view visits by date)

@hutcheonb-moj just doing the updated modules will bump cookiejar as required, so get rid of cookiejar and just do the other updates and the usual delete package-lock.json and reinstall.


AutoGenerateInterface Does not work with .NET 6 namespaces

Describe the bug
namespace NetTilt.Auth;
    [AutoGenerateInterface]
    public class AuthUrl : IAuthUrl
    {
    public int? Decrypt(string token){

    }
    }

raises an error and does not generate the interface.
Steps to reproduce
See above example
Expected behaviour
generate interface IAuthUrl with Decrypt function

Ah yes that's probably true that we expect a different namespace setup.
Unfortunately as I'm not much in the .NET space currently I probably won't have time to fix this. If anyone wants to submit a PR, I'd be happy to accept it.


Add github_changelog_generator

All our extensions should maintain a changelog.
This gem helps to do that.
Closes #3

@tvdeyen thanks! Could you add a few lines in the readme about this? :)

@aldesantis done

This is perfect, thanks!


Warning in console

There is a warning in the console when DevTools is opened.
Error:
It looks like you're using the development build of the Firebase JS SDK.
When deploying Firebase apps to production, it is advisable to only import
the individual SDK components you intend to use.

For the module builds, these are available in the following manner
(replace <PACKAGE> with the name of a component - i.e. auth, database, etc):

CommonJS Modules:
const firebase = require('firebase/app');
require('firebase/<PACKAGE>');

ES Modules:
import firebase from 'firebase/app';
import 'firebase/<PACKAGE>';

Typescript:
import firebase from 'firebase/app';
import 'firebase/<PACKAGE>';

That's how it works. Resolving the warning crashes the app


Added .travis.yml file

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Remove vulnerability xss hack

Fixes # https://github.com/DigitalCurationCentre/DMPonline-Service/issues/603.
Changes proposed in this PR:
Callback was added to user and plan models. 'before_save' was added with a function sanitise a number of field before data was saved into the db

was out of sync with development so rebased via GitHub

">] ">]


Update job service deploy prod swarm

@dermot-hardy and @mulhollandc I've made a number of updates to all the files.  Hopefully these cover off all of Dermot's comments and it is worth reviewing again now.


Add getDuration method to AccumuloConfiguration

This PR:

adds a getDuration() method to AccumuloConfiguration and subsequently ConfigurationTypeHelper. This new method returns a Duration object
refactors getTimeInMillis() to use this new method in order to share code
adds test cases that cover the same functionality as the getTimeInMillis() test cases. All passing.

This new method was identified as potentially helpful here. I did not refactor any usages of getTimeInMillis() since the places that use it seem to be built around using ms. In the future I see this method being useful to allow development independent of time units. It is also an improvement over returning a long in terms of being a stronger type.

it doesn't seem like it is used anywhere in 2.1 (were you planning to use it in another change?)

I don't have anywhere specific in mind for this change in 2.1 but seems like moving forward it would be nice to have.

Assuming there's no substantial overhead cost for using Duration, I wonder if it would be cleaner to follow this up with removing the getTimeInMillis() method, and push the toMillis() calls into the calling code.

This seems like a good idea. I can look into what the overhead is for using Duration.

I ran a benchmark and here are the results:
Benchmark                                   Mode  Cnt        Score       Error  Units
TimeParserBenchmark.testNewMethod          thrpt    5  1295632.623 ±  8961.727  ops/s
TimeParserBenchmark.testNewMethodDuration  thrpt    5  1359587.680 ± 33716.367  ops/s
TimeParserBenchmark.testOldMethod          thrpt    5  1822320.742 ± 14720.405  ops/s

testNewMethod called getDuration(str).toMillis() for each input.
testNewMethodDuration called getDuration(str) for each input.
testOldMethod called the original getTimeInMillis() code for each input.
I constructed the test data like this:
    private static final String[] baseUnits = {"d", "h", "m", "s", "ms"};
    private static final String[] baseValues = {"1", "2", "3", "4", "5", "66", "777", "8888", "99999"};

    private static final List<String> testStrings = generateTestStrings();

    private static List<String> generateTestStrings() {
        List<String> result = new ArrayList<>();
        for (String value : baseValues) {
            for (String unit : baseUnits) {
                result.add(value + unit);
            }
        }
        return result;
    }

There is a clear difference between the old and new methods. I am not sure whether this would cause any issues in practice though.

There is a clear difference between the old and new methods. I am not sure whether this would cause any issues in practice though.

It has the potential to cause issues if its called really frequently.  Using Duration object will reduce bugs, so should try to use it as much as possible.   If we find current code that is currently calling it really frequently we can either refactor that code to call it less frequently or if that is not possible look into adding  long getDuration(Property p, TimeUnit unit)  which would be similar in efficiency to the current getTimeInMillis but a slightly better API for code correctness.

Superseded by #4890


Video PiP not working properly in Fancyzones

Microsoft PowerToys version
0.74.1
Installation method
PowerToys auto-update
Running as admin
Yes
Area(s) with issue?
FancyZones
Steps to reproduce
in fancyzones, enable: move newly created windows to their last know zone
open youtube at chrome in i.e. fancy zone 1
open PiP view
move PiP popup to i.e. fancy zone 3
close all
open youtube at chrome in fancy zone 1
open PiP at the right upper corner
✔ Expected Behavior
when disabled, it launches with popup window with no padding around, in the last place i placed it (zone 3)

❌ Actual Behavior
when enabled, it launches in a window with padding (fits to zone) and in the same zone as the chrome window (zone 1)
when next item in the playlist is played, screen doubles in size, extending beyond zone 1

Other Software
No response

Are you still experiencing this issue? /needinfo


Easy auto-update

I see you have auto-update as one of the suggested improvements for your Help workflow, but you say you won’t necessarily implement it.
I know how bothersome adding auto-updating features to Alfred workflows is, which is why I made OneUpdater. In just a few quick steps, you can have an updater up and running and you will be able to set it and forget it. That is to say you configure it once (you’ll really need to change only two values) and it’ll work on it’s own without further intervention.
If you ever want to get rid of it, you just delete its node, and it’s done.
Take a look at it, if you want. If you have any doubts or need help implementing it, just ask.

Thank you for your suggestions, Vítor! 👍 I'll have a look at your solution soon. Auto-updating was actually one of the items I did plan to implement.


Implemented EnumerateStuff methods

Implemented:

EnumerateDirectories()
EnumerateDirectories(string)
EnumerateDirectories(string, SearchOption)
EnumerateFiles() replaced existing implementation
EnumerateFiles(string)
EnumerateFiles(string, SearchOption)
EnumerateFileSystemInfos()
EnumerateFileSystemInfos(string)
EnumerateFileSystemInfos(string, SearchOption)

Every one of these is simply a call to the equivalent GetStuff method and immediately returning the result with no extra work. I have replaced the implementation of Enumerate files so that it calls out to GetFiles, the previous implementation seemed to be broken - as far as I can tell it would always return all files!
Added test coverage for most of these methods, which essentially just consisted of copying and pasting the appropriate GetStuff method and modifying it to call EnumerateStuff instead. Changed the MockDirectoryInfo_EnumerateFiles_ShouldReturnAllFiles test method so that it has some additional files (i.e. ones which should not be returned).
Important: I noticed that there is a commit from this time last year which I evidently never submitted a PR for and has been inadvertently included here. If you don't want those changes (adding GetFileSystemEntries, targetting .net4.0 Client) feel free to reject this PR and I'll submit a new one with just the Enumerate stuff :)

Rebased the latter commit as eca6e7608de571de4586ce4b65ceee1552233c94
Pushed to http://www.nuget.org/packages/System.IO.Abstractions/<IP_ADDRESS>


vampire eyes not working?

so all the npc eyes have changed but the main character stays the same and was wondering when this could be updated

Also having this same problem


The script uses "sleep N" instead of "wait"

For example:
https://github.com/cryinkfly/Autodesk-Fusion-360-for-Linux/blob/7ce47fb79edc2027e8e228e0d577277a4c3c11a4/files/builds/stable-branch/bin/install.sh#L1051
The script uses "sleep 5" to supposedly wait for the process running in the background. Use shell built-in wait instead to continue waiting if the background process is not ready after 5 seconds AND to skip waiting if background process is ready faster.
The script contains other sleep commands, too, and I assume those have similar reasons and should be fixed, too.

You mean this one here: https://www.networkworld.com/article/3632395/sleeping-and-waiting-on-linux.html