Unable to request a DAT with dockered version on windows

The Problem
My Setup
Microsoft Windows 10 Enterprise 10.0.19042, Build 19042
Docker version 20.10.17, build 100c701
Because I use docker the rest is irrelevant as it is not used anyway.
What I have done up front
The goal was to launch the daps with docker.
Because port 80 is blocked on my machine, I configured different nginx ports in the compose.yml:
...
  nginx:
    image: nginx:latest
    restart: unless-stopped
    ports:
      - 4567:80
      - 8082:443
...

A omedjn.cert is setup correctly.
To add a client, I used the register_connector.sh script. Because it obviously does not work on windows, I used WSL  with Ubuntu-20.04 (also I had to replace all \r\n with \n in the script). I used a custom certificate and it worked properly: A cert file with the NAME was added under the keys folder and a cert file with the CLIENT_ID was added in the clients folder.

keys

clients

D3643F3BD03A0B01FE8E5DC5F397B3E28D403D25keyidB28693B9340F6FCAD41AC03EC6BFE1A0A0D0ED5E.cert

omejdn

omejdn.key

RC Alice.cert

The entry in the clients.yml was also added:
- client_id: D3:64:3F:3B:D0:3A:0B:01:FE:8E:5D:C5:F3:97:B3:E2:8D:40:3D:25:keyid:B2:86:93:B9:34:0F:6F:CA:D4:1A:C0:3E:C6:BF:E1:A0:A0:D0:ED:5E
  client_name: RC Alice
  grant_types: client_credentials
  token_endpoint_auth_method: private_key_jwt
  scope: idsc:IDS_CONNECTOR_ATTRIBUTES_ALL
  attributes:
  - key: idsc
    value: IDS_CONNECTOR_ATTRIBUTES_ALL
  - key: securityProfile
    value: idsc:BASE_SECURITY_PROFILE
  - key: referringConnector
    value: http://RC Alice.demo
  - key: "@type"
    value: ids:DatPayload
  - key: "@context"
    value: https://w3id.org/idsa/contexts/context.jsonld
  - key: transportCertsSha256
    value: 5aab5b7cb396dc49835f1b6f7c842c4e8f37976df3628d87a4d268f71a9d0f44

What I expected to happen
I had two tests:

Get the JWKS with GET http://localhost:4567/auth/jwks.json
Get a DAT with POST http://localhost:4567/auth/token

I expected the first to give my the regular JWKS object and I expected the second to give my a DAT.
The DAT-request must obviously have the correct format and signed with the clients private key.
I did all of that and tried different variations from the IDSA daps documentation and formats that worked on previous implementations. Because that is a little bit too much, here is a request I tried that I aligned to the test.sh script:
DAT request payload:
{
  "iss": "D3:64:3F:3B:D0:3A:0B:01:FE:8E:5D:C5:F3:97:B3:E2:8D:40:3D:25:keyid:B2:86:93:B9:34:0F:6F:CA:D4:1A:C0:3E:C6:BF:E1:A0:A0:D0:ED:5E",
  "sub": "D3:64:3F:3B:D0:3A:0B:01:FE:8E:5D:C5:F3:97:B3:E2:8D:40:3D:25:keyid:B2:86:93:B9:34:0F:6F:CA:D4:1A:C0:3E:C6:BF:E1:A0:A0:D0:ED:5E",
  "aud": "idsc:IDS_CONNECTORS_ALL",
  "iat":<PHONE_NUMBER>, // current posix-time
  "nbf":<PHONE_NUMBER>, // current posix-time
  "exp":<PHONE_NUMBER> // current posix-time + 3600 seconds
}

DAT request:
{
  "url": "http://localhost:4567/auth/token",
  "method": "POST",
  "body": "grant_type=client_credentials" +
    "&client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer" +
    "&client_assertion=eyJhbGciOiJSUzI1NiJ9....OjqeT6Ka323z2I" +
    "&scope=idsc:IDS_CONNECTOR_ATTRIBUTES_ALL"
}

What actually happened
The first test was no problem, I got the jwks with the 1 key I added.
The second test did not work with anything I tried. Instead I got a [400] Bad Request.
The omejdn-server console was not very helpful, it only stated: POST /token HTTP/1.1" 400 63 0.0412.
The response to the failed request was:
{
  "error": "invalid_client",
  "error_description": "Error decoding JWT: No verification key available"
}

The quest of trying to solve it
What were the results of searching for the error on the internet?
As you can see, the filename for the certificate is really wierd, because it replaced the forbidden windows symbol : with a placeholder  ()
In previous versions of the omejdn-daps a base64 encoded CLIENT_ID was used as the filename, so later I also tried that with the filename RDM6N...6NUU=.cert and an entry in the clients.yml for the test client:
...
  certfile: RDM6NjQ6M0Y6M0I6RDA6M0E6MEI6MDE6RkU6OEU6NUQ6QzU6RjM6OTc6QjM6RTI6OEQ6NDA6M0Q6MjU6a2V5aWQ6QjI6ODY6OTM6Qjk6MzQ6MEY6NkY6Q0E6RDQ6MUE6QzA6M0U6QzY6QkY6RTE6QTA6QTA6RDA6RUQ6NUU=.cert

This did not work either.
As I said, I tried different variations that did not work either and I may have suggestions that could improve the API overall. For example proper headers for the request with Content-Type: application/x-www-form-urlencoded;charset=UTF-8, a properly formatted query that is url-encoded (...client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer... instead of ...client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer...), a support for JSON as Content-Type of the request and inclusion of json-ld attributes in the DAT-Request like @context and @type.
I also tried to use the test.sh script after I modified it to use a different port, but I got the same results.
What is your best guess as to what might have happened?
The source of the error can be found in the omejdn-server repo:
https://github.com/Fraunhofer-AISEC/omejdn-server/blob/c767a7a11e2776f1cbdb53f21ae74edd739ed138/lib/client.rb#L100-L112
The client must have been found at that point in time, because otherwise the error would have been Client unknown.
I have no further idea, why the key cannot be found. Maybe it is due to filenames and maybe the previous solution with the certfile in the clients.yml  could make it work again.

Hey :)
You identified correctly that the filename missmatch is the cause for Omejdn not being able to find the certificate and key. If you want to dig deeper, here is a pointer:

https://github.com/Fraunhofer-AISEC/omejdn-server/blob/c767a7a11e2776f1cbdb53f21ae74edd739ed138/lib/client.rb#L171

Originally, the client's certificate was in a base64url encoded location, which was very unintuitive and did cause problems in Kubernetes setups. Hence I changed it to the more intuitive format, which is however causing problems in the IDS, where client ID's contain this windows-incompatible character. It was a trade-off I made based on the realization that no intuitive solution could ever be compatible with all systems (given that client IDs may contain arbitrary printable ASCII characters).
So here is how I envisioned a way out for systems where this problem remains:
Omejdn Plugin System
Note that to load the key, Omejdn calls this function: https://github.com/Fraunhofer-AISEC/omejdn-server/blob/c767a7a11e2776f1cbdb53f21ae74edd739ed138/lib/keys.rb#L17
This is calling a plugin listening for KEY events, and ultimately the default one registered in lib/keys.rb, which implements the actual loading and saving according to the interface described in the documentation.
If your setup is incompatible with the default configuration, you can just disable the default plugin and load your own. You would have to reimplement the three KEYS_* event listeners (to store, load, and enumerate cryptographic key material), but this would allow you to store the certificates and keys anywhere you like (not just files but also e.g. a database).
Speaking of which, there is also a plugin you can pick up to save everything in a PostgreSQL database. See the documentation.
It does not provide a dedicated graphical frontend to insert values, so you will have to do this either manually or via Omejdn's UI or API.

From this implementation I can understand, why a certfile options does not work. The event only gets the CLIENT_ID!
But I don't understand the argument against a base64 encoding of the filename. It really makes sense to encode the filename from a technical standpoint and any confusion with the filenames from a human readable perspective is irrelevant to me for an implementation.
It was quite some work, but I finally solved my problem by implementing my own filesystem_backend that uses base64 encoding for filenames.
I also had to change the compose.yml to integrate plugins at all:
  omejdn-server:
    image: ghcr.io/fraunhofer-aisec/omejdn-server:${OMEJDN_VERSION}
    restart: unless-stopped
    environment:
      - OMEJDN_ISSUER=${OMEJDN_ISSUER}
      - OMEJDN_FRONT_URL=${OMEJDN_ISSUER}
      - OMEJDN_OPENID=true
      - OMEJDN_ENVIRONMENT=${OMEJDN_ENVIRONMENT}
      - OMEJDN_ACCEPT_AUDIENCE=idsc:IDS_CONNECTORS_ALL
      - OMEJDN_DEFAULT_AUDIENCE=idsc:IDS_CONNECTORS_ALL
      - OMEJDN_ADMIN=${ADMIN_USERNAME}:${ADMIN_PASSWORD}
      - OMEJDN_PLUGINS=/opt/${OMEJDN_PLUGINS}
    volumes:
      - ./config:/opt/config
      - ./keys:/opt/keys
      - ./plugins:/opt/plugins

And addition to the .env file:
OMEJDN_VERSION="1.7.0"
OMEJDN_PLUGINS="config/plugins.yml"

The plugins.yml:
plugins:
  filesystem_backend:
    handlers:
      - keys
deactivate_defaults:
  - keys

Then I basically took the postgres_backend class, stripped what I don't needed, replaced the storage_keys.rb with the DefaultKeysDB and added the Base64.urlsafe_encode64.
Now the omejdn.key did not get loaded currectly, but anyway just renamed it to b21lamRu.key and everything works.

Well done :)
I think with that we can close this particular issue.
A bit more about the filenames:
I agree that from a technical standpoint and especially for production deployments, human intuition does not play an important role. But I was seeing two very different groups of users (according to the issues raised here).
One group tried to use Omejdn in production settings. They were unhappy because information was not stored in a persistent database at the time, which is understandable, especially if you consider that many cloud deployments require a read-only filesystem and files with a limited character set.
The other, seemingly larger group was trying to experiment with Omejdn within and outside the IDS, and was having trouble setting everything up. Explaining how base64url works regularly took too much time, and the import_certfile option did cause confusion for being a one-time import instruction. (There was also a certfile option to specify the filename explicitly, but that one was causing trouble and security problems with the Admin API.)
Combined with the need to connect other types of existing databases, the need for a plugin system was unavoidable. The only question was how the default should have been handled. I figured that the intuitive file-based option was uniquely fit, as this avoids having to explain too much stuff to average users while giving a distinct advantage over other hard-to-configure-in-files IDPs like Keycloak.
If you would like to further discuss this decision, you are welcome to do so in this issue: https://github.com/Fraunhofer-AISEC/omejdn-server/issues/37
Or you can contact me directly :)

I know, the omejdn-server should be general purpose and not rely on client ids to have the SKI:AKI format.
Otherwise a compromise between readability and usability could be to use dashes instead of colons for the filename:
filename = "#{KEYS_DIR}/#{target_type}/#{target.gsub ':', '-'}"


Psr 12

Use PHP 8.1 on Alpine 3.16 (instead of 8.0 on Alpine 3.15)
Updated Code Style to match PSR-12 standard

Supersedes #13

@SoftCreatR Thanks for the PR! 🤯 Please give us some time to review it.

THANK YOU! All changes merged 🥳
Please reach out to me on our Discord server if you would like to claim your Appwrite swags! As a way of saying thank you, we would also love to invite you to join the Appwrite organization on GitHub. Please share your GitHub username with us on Discord.
You can accept the invite by visiting https://github.com/orgs/appwrite/invitation. By joining our team, you will officially be an Appwrite maintainer on GitHub.
You can change your membership visibility settings, so your new Appwrite team membership badge will show up on your personal GitHub profile.
Please feel free to look for more PRs you might be interested in helping with on our long list of Hacktoberfest friendly issues and help make Appwrite better :)


Add OpenGL's AcceleratedCommand

Partially solves: #31

It is working fine. Two things are missing though:

Possibility to specify the usage for VertexBuffer
Setting uniforms - at least those of type float and vecX.


Next sheets are inheriting formatting from all previous sheets

Prerequisites

[ ] Able to reproduce the behaviour outside of your code, the problem is isolated to Laravel Excel.
[x] Checked that your issue isn't already filed.
[x] Checked if no PR was submitted that fixes this problem.

Versions

PHP version: 7.1.18
Laravel version: 5.6
Package version: 3.0.8

Description
When exporting an excel with multiple sheets, all the new sheets are inheriting formatting of the previous ones.
Steps to Reproduce
public function sheets(): array
{
    return [
        new FirstSheet($company),
        new SecondSheet($company),
        new ThirdSheet($company)
    ];
}

Expected behavior:
Each sheet should have the specified formatting.
Actual behavior:
Next sheets are inheriting formatting from all previous sheets.
See sample: demo.xlsx
Additional information
This behaviour first appeared in v3.0.8.
In 3.0.7 this works as expected.

Can you share a bit more information. E.g. the 3 sheet objects. Are you using any event listeners in there?

Yes, I am adding the data using view's:
return view('reports.sheets.first', [
    'name' => $this->getName(),
    'info' => $this->getInfo()
]);

and then I am using the afterSheet event to apply the styling into the sheet:
public static function afterSheet(AfterSheet $event)
{
    $event->getSheet()->getDelegate()->setShowGridlines(false);

    $event->getSheet()->getDelegate()->getStyle('A1:D13')->applyFromArray([
        'font'      => [
            'size' => 11,
        ],
        'alignment' => [
            'horizontal' => Alignment::HORIZONTAL_CENTER,
            'vertical'   => Alignment::VERTICAL_CENTER,
        ],
    ]);

    $event->getSheet()->getDelegate()->getStyle('B2')->applyFromArray([
        'font'      => [
            'italic' => true,
            'size'   => 18,
        ],
        'alignment' => [
            'horizontal' => Alignment::HORIZONTAL_LEFT,
        ],
    ]);

    $event->getSheet()->getDelegate()->getStyle('D2')->applyFromArray([
        'font'      => [
            'italic' => true,
            'size'   => 18,
        ],
        'alignment' => [
            'horizontal' => Alignment::HORIZONTAL_RIGHT,
        ],
    ]);

    $event->getSheet()->getDelegate()->getStyle('B3')->applyFromArray([
        'font'      => [
            'bold' => true,
            'size' => 24,
        ],
        'alignment' => [
            'horizontal' => Alignment::HORIZONTAL_LEFT,
        ],
    ]);

   // there are additional styling rules...
}

@sfmedion should be fixed in 3.0.9


Upgrade Kitematic.app to v0.7.2

Thank you for the contribution. It was merged directly as cdf065d0b8cf67e81f4c800f4eba421322c17aa4 to keep commit history cleaner. Your contribution is still credited to you.


Stuck on Installation (No Log Info)

Hi I am having trouble with installation.
I've added my Eufy account info (email, password, and country)...Saved...But when I check the logs page there is nothing. I keep hitting refresh and nothing shows up.
I tried using my Eufy Admin account. I've also tried using a shared eufy guest account (That would be specifically for HA if I got it to work).
Are there troubleshooting steps for this?

Are you sure you had started the add on? There should be something visible there

Ya know...I used to always  joke about how when most people have IT issues, the first question help desk usually asks is, "Is the device plugged in?" - I always that was funny.
I think I had one of those moments here....Nope, I never started it. I hit start and sure enough everything was there.
Thanks for the help, back to setup!


0049-repudiation - using asymmetric encryption is vulnerable to QC

https://github.com/hyperledger/aries-rfcs/blob/master/concepts/0049-repudiation/README.md
JFYI, using asymmetric encryption is the weakest link when accounting for Quantum resistance, and this is the first form of encryption to go. This should be a drawback as highlighted. Perhaps using Digital Signatures can work if you sign a hash of the message as the sender or come up with a symmetric key signed by both parties separately using a difference nonce.

@mikelodder7 would you mind taking a look at this one and providing a response?

Sure asymmetric crypto will be the first to go once there is a viable QC that can implement Shor's algorithm. How far away is that? No one knows except that the more we get into QC, the more we realize how hard it is and it will be to implement a crypto algorithm on them.
Signing a hash will not protect you from QC. That's what digital signatures do today. RSA-OAEP, ECDSA or EdDSA. They all do it. The whole point of the signature is only the private key owner should have been able to produce it, no matter what is signed, hash or not. If QC eventually becomes a reality, then we don't have this guarantee because anyone could have produced a valid signature under these schemes.
Symmetric crypto doesn't save you either if you want non-repudiation. The whole point is that more than one party knows the secret. Usually, it's just two, Alice and Bob. Alice knows only Bob could have HMAC'd the message because he's the only other participant that knows secret K. But Alice can't show prove it to anyone else because Alice or Bob could have generated the HMAC signature.
So, for now, I think this system is fine as is. What should be considered is does this RFC allows for any signature scheme including PQCrypto. If so, then we're good and we just need to decide which ones should be implemented like CRYSTALS or Lamport hash sigs.
I don’t think QC is going to be realized for at least another 10 years and even if it does, there are certain algorithms that need to be implemented before worrying about current cryptography being broken.
I'm more concerned with the key management aspects of the agents having sloppy or poorly designed security such that keys are stolen. Just my two cents.

Grover's algorithm can break symmetric encryption but if you use sufficiently large enough keys symmetric is already quantum safe.
I guess if you don't have a private line of communication then no point anyway.
Just thinking out loud if you had a shared secret, you can simply sign a message (the payload hash) authenticating the sender and include next to the payload (message). Encrypting it all via shared symmetric key. But if no secure context is established then you lose ability to communicate shared secret. It's probably fine for now like you said because of key management and ease of use.

Grover's algorithm does not break symmetric crypto. It weakens the keyspace by half, thus 128-bit encryption now is reduced to 64 bits. AES and CHACHA cannot be broken by QC. They just flip and shift bits. By using 256-bit symmetric crypto, you can claim PQ crypto. It also begs the question, "How long do you need the data secured?" In the local agent wallet, probably not very long for individuals. Only 1-5 agents will be accessing an individual's data and when QC becomes a thing, simply stop sharing the data. There are use cases where longevity is necessary like financial, gov't, academia, telco, and medical so investigating PQ crypto now makes sense. But that does not mean they cannot use existing crypto. It isn't broken and isn't likely to be within 10 years.
As long as Aries implementations allow for switching to PQ crypto implementations easily then this isn't a problem either.
The CRYSTALS and PICNIC PQ crypto suites are two I'm investigating right now to put into Ursa. Its my understanding that Aries plans to be compatible with Ursa. Hope that helps.

Thanks mike that makes sense. We are planning on building out using Aries. Do you know what sort of work is involved in making it compatible. Perhaps I can help.


fixed wrong dispatcher permissions

Fixes wrong dispatcher permissions.

🐛 Fix bug

@Cali0707 , please review this PR. It is pretty simple, I added missing permissions to the dispatcher role.

/assign @Cali0707


make RTT buffer size configurable

currently it's fixed to 1 KiB.
coming up with a configuration mechanism is part of this issue. One option is use an env variable, e.g. DEFMT_RTT_BUFFER_SIZE.
as a size power of 2 improves performance it would be good to inform that to user where configuring the size of this buffer

tentatively assigning @spookyvision -- please un-assign yourself if you can't actively work on this


bug(describe): Fix bug to show error if describe is invoked without a name

Signed-off-by: Abhinandan-Purkait<EMAIL_ADDRESS>

Codecov Report

Merging #107 (6e55451) into develop (7143f01) will decrease coverage by 0.07%.
The diff coverage is 0.00%.

@@             Coverage Diff             @@
##           develop     #107      +/-   ##
===========================================
- Coverage    69.00%   68.92%   -0.08%
===========================================
  Files           23       23
  Lines         1768     1770       +2
===========================================
  Hits          1220     1220
- Misses         539      541       +2
  Partials         9        9

Impacted Files
Coverage Δ

pkg/persistentvolumeclaim/debug.go
0.00% <0.00%> (ø)

pkg/persistentvolumeclaim/persistentvolumeclaim.go
0.00% <0.00%> (ø)

pkg/storage/storage.go
0.00% <0.00%> (ø)

pkg/volume/volume.go
12.22% <0.00%> (ø)

Continue to review full report at Codecov.

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


test: do not merge

Signed-off-by: Felipe Zipitria<EMAIL_ADDRESS>

Test done. Closing.


Add a linear layer to squeeze all patch embeddings into a single image embedding?

The current bottleneck of the Unet architecture are patch embeddings, for each section of the image. When we create the embedding of the image, we use an average of all patch embeddgins.
However, this approach is very lossy an smooth version of the image semantics, specially when trying to reconstruct an image from its embedding (location and time). Moreover, each patch embedding does not include the semantics of the patch, rather is trained to capture the self-attention weighted semantics of all other available patches within the image. This also makes the collection of patch embeddings highly redundant.
Can we Introduce one more feedforward layer to aggregate all patch embeddings, location, and time data into a single, image-wide embedding? (one on the encoder to go down from patch semantics into image semantics, and one the decoder to expand from image semantics into patch semantics)
This embedding would encapsulate the entire semantic context of the image at a specific location and time. It would also allow us to reconstruct the image from the image embedding.
I suspect it will also need to convey where in the image the semantics are, so the decoder can place those differences within the image correctly. This is also highly desirable for downstream tasks that need to locate inter-image semantics.

We can consider to store the raw encoder output alongside with the average embeddings. With the raw encoder output any kind of re-combination, including using a linear layer for creating the "best" combination, can be performed.

Tagging here something I learned today, which is that for each self-attention patch, the 13 layers are grouped into 6 groups, and we create one embedding per group.
I still think it would make sense to roll all layers group into a single embedding, at the self-attention patch, and use that as the end of the encoder.

I keep coming up with the need to do this.
@yellowcap and I had a great conversation where we decided NOT to do this for now.
The reason being that currently these band groups represent a wider, capacity to learn features, and grouped by band (e.g. optical features, DEM features, SAR features). This is much richer than just one vector. We don't know if squeezing it further looses quality, and answering that question seems lower priority right now (versus the cost of extra space for the embeddings).
If we do need to squeeze to one vector, we can always make a "decoder" that squeezes these into one vector while keeping most of the information (loss function TBD). We can also take the embeddings instead of the econder.
It is true that doing it this way creates the need to average the patch-level embeddings, or it creates 16x sizes of patch-level embedding, which sometimes we might need, like in #168.

Bumping this up again.
Specially as we move away from fixed bands and band groups, and we focus on e.g. similarly search at the patch level, it seems critical that we do not create embeddings at the neck of the Unet per patch AND per band.
1)how would that even work when the input data can have different bands?
2) when we do an average across bands to create the patch embedding, we are forcing a brute force reduction, of all independent bands into single vector. May be "houses" is a semantic on some dimension on one band, but other dimensions in another, and making the average doesn't even make sense semantically.
I propose (again) the reduce now the neck of the Unet to one embedding per patch.
Cc @yellowcap @srmsoumya

Talking with @yellowcap, it seems we are already merging all bands into a single patch embedding.
@srmsoumya to confirm and close here.

Closing as out of date, feel free to re-open if appropriate.


New ideas

Hi @lukapecnik
I would like to suggest you a new functionality.
Please add a CSV browser so that users can check the data as well
as edit data. Users may want to remove some rows or even columns.
Actually, I believe that one table widget might be the most appropriate solution for this problem.

Hi @firefly-cpp,
thank you, great suggestion. I've added this feature to the GUI.


[WIP] nixos/postfix: enable sanboxing

Motivation for this change
Enable sanboxing and create folders with tmpfiles.rules
Small testing in home mail server.
Warning in logs:
postfix/postfix-script[5729]: warning: not owned by root: /var/lib/postfix/queue/.
postfix/postfix-script[5730]: warning: not owned by root: /var/lib/postfix/queue/pid

postfix/postqueue[19814]: fatal: Queue report unavailable - mail system is down
postfix/postqueue[20626]: fatal: Queue report unavailable - mail system is down

cc @peti @alyssais
Things done

[x] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

Notify maintainers
cc @

Please s/sanbox/sandbox/g :-)

Thanks, fixed)

PR and commit subject still has "sanboxing" typo.


Update install.sh

i added python lxml line to code maybe this will fix it

can confirm this fixes the issue perfectly :)

thanks needo :)


Replace RabbitMQ with an Istio oriented solution

Such as GRPC.

This will be done as part of #8. Specifically, RabbitMQ will be replaced with gRPC. Closing.


String parameters with quotes hang shell

If a string containing a single (') or double (") quote is passed to addCommand the shell instance hangs. It is expecting a matching quote, which may or may not come. In Utils.js there is only a check for whitespace in strings.
PR to come.

Can you give an example that is not solved by using backticks `` around your strings and is not typical of PowerShell's regular behavior?

@BenjaminMichael do you mean me escaping my quotes before invoking PowerShell? If no, not really.
imo, I should be able to pass valid javascript strings to node-powershell and have it correctly format them for PowerShell.
I can see an argument for me having to escape the strings I pass to node-powershell too. I've done the work in my fork for my use case.

No I'm saying use template strings which are new if you are unfamiliar with ES6.  It will give you the equivalent value as if you escaped characters
`\`` === '`' // --> true

If I escape the javascript string myself (ie insert ` before my quotes) the command execute fine. I feel a javascript library should be doing the escaping for me, since I pass in a valid javascript string. The fix was a simple: value.replace(/[\'\"]/g, '$&');`.
In the current version this will hang:
string a = 'hsimah\'s';
string b = "hsimah's";
string c = `hsimah's`;

These will work:
string a = 'hsimah`\'s';
string b = "hsimah`'s";
string c = `hsimah\`'s`;
string d = 'hsimah\'s test'; // node-powershell wraps strings with whitespace in double quotes

ps.addCommand(`write-host "hsimah's"`) //doesn't hang

This is just how PowerShell works.

Yes but if you use the parameter/value syntax it does hang:
ps.addCommand('my-cmdlet', [{Name: "hsimah's"}]); // hangs
Node-powershell doesn't wrap the value in quotes unless it contains a space. PowerShell is inferring it is a string, but it needs to be escaped with a backtick.

My opinions are not those of Rann.  I don't use the prams as JSON I just always use template strings.
ps.addCommand(`./scripts/get-ADUser.ps1 -u1 ${payload.user1Name} -cu ${payload.currentUser}`);

In this example I don't even use quotes because I already sanitized the user names Im gathering.  In my opinion these are merely implementation details.

Yeah, I considered template strings, but some of the cim cmdlets get out of hand with the number of parameters. The array of objects was easier to use in that regard.
I'll add a test to see if my fork affects the pure string commands. I don't think it would as the logic flow is different, but I didn't check that and it's a bad PR if I break your code!

@rannn505 I see this was closed. I no longer use node-powershell (changed jobs).
Is this fixed or not deemed necessary? I have an open PR related that can be closed either way.


Adding more small fixes to the walkthrough & install docs

This is a follow-up to #1163.

One nit and LGTM

Thanks for the review @pmorie

LGTM

waiting on CI....

thanks @duglin


Unable to use on ZkSync testnet

Describe the bug
If I enter the config for zkSync testnet (https://v2-docs.zksync.io/dev/fundamentals/testnet.html#connecting-metamask), requests are failed with error {"status":"FAILED","reasons":[{"field":"chainId","description":"We don't support the chainId you provided: eip155:280"}]}
Config:
const config: ConfigOptions = {
  projectId: '...',
  ethereum: {
    appName: 'web3Modal',
    chains: [
      {
        id: 280,
        name: "zkSync alpha testnet",
        network: "zkSync alpha testnet",
        rpcUrls: { default: 'https://zksync2-testnet.zksync.dev' }
      }
    ],
  },

How can I deal with zkSync network using this widget?

Seems to be fixed by adding
  ethereum: {
    appName: '...',
    chains: [
      {
        id: 421613,
        name: "Arbitrum",
        network: "Arbitrum",
        rpcUrls: { default: 'https://goerli-rollup.arbitrum.io/rpc' }
      },
      {
        id: 280,
        name: "zkSync alpha testnet",
        network: "zkSync alpha testnet",
        rpcUrls: { default: 'https://zksync2-testnet.zksync.dev' },
      }
    ],
    providers: [
      jsonRpcProvider({
        rpc: (chain) => {
          return { http: chain.rpcUrls.default }
        }
      }),
    ]
  },

Indeed, you needed to add custom rpc for this, as default one won't support it. We also made a lot of changes in recent releases where this is now fully configurable via https://wagmi.sh and they have docs describing how to work with custom chains and rpc's as well.
This should help in migrating web3modal to latest beta as well https://docs.walletconnect.com/2.0/web3modal/about


#319 depandabot added

i have also formatted the code and resturctured by placing all the templates in one folder

Bhai @k-deepak04 , file name kyu change kari?

@amanjaiman1 bhai file name change nhi ki
bas sabko 1 folder me daal diya hu

@amanjaiman1 if you want phele jaisa krdu kya?
but folder me sahi rahega proper structure maintain rahega
varna sab github ke andar tha puri files to mixup hora tha
you tell me if phele jaisa hona then i'll do that

@amanjaiman1 if you want phele jaisa krdu kya?
but folder me sahi rahega proper structure maintain rahega
varna sab github ke andar tha puri files to mixup hora tha
you tell me if phele jaisa hona then i'll do that

Chal ab hogaya , next issue dekhlena

okie :)


Alpine wget without --delete-after option

Hi!
I'm using Alpine as a base for my cron container. And wget in Alpine has no option --delete-after which causes an exception on execution.
wget: unrecognized option: delete-after
BusyBox v1.31.1 () multi-call binary.

Usage: wget [-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]
        [-o|--output-file FILE] [--header 'header: value'] [-Y|--proxy on/off]
        [-P DIR] [-S|--server-response] [-U|--user-agent AGENT] [-T SEC] URL...

What I can see is, that you delete the files afterwords anyway.
So it should be no problem to remove that flag.
kind regards
André

Hi there, thanks for reaching out.
We added this, because otherwise t3fetch/wget will take a lot of disk space while running. Sometimes websites have a lot of resources. If we download and store all of these, a lot of disk space would be needed.
From the documentation:

This option tells Wget to delete every single file it downloads, after having done so.

Well, I see your point. But just removing this flag will not really work.
Any other ideas?

Hi @malteriechmann,
I just wonder why not use rm to delete the files afterwords?
kind regards,
André

A filter on images and video files sound nice. Maybe we should add a setting to enable/disable the filter.
Do you want to create a pull request?


ExtendedImage.network headers don't work in web app (Chrome)

Hello!
I am using the following code:
ExtendedImage.network(
                    url,
                    headers: {"token":token },
                    cache: true
                  )

It's work in android app, but don't work in web app (headers are not applied).
In CachedNetworkImageProvider lib it can be fixed by adding imageRenderMethodForWeb parameter:
CachedNetworkImageProvider(
                   url,
                   headers: {"token":token},
                   imageRenderMethodForWeb: ImageRenderMethodForWeb.HttpGet),
              )

How can I fix this in ExtendedImage lib?
Thanks.

you can use CachedNetworkImageProvider .  ExtendedImage(CachedNetworkImageProvider())

@zmtzawqlp . it's works for me, thank you.

Thanks @zmtzawqlp for the answer, to complete the answer for newbie this is the final version:

ExtendedImage(         image: CachedNetworkImageProvider(url,             headers: {"token": "token"},             imageRenderMethodForWeb: ImageRenderMethodForWeb.HttpGet));


How to specify signin error from callback?

I want to display different info to the user for failed logins in based on an extra account validation happening in the signin callback function. Is there a way to specify the error query parameter passed in to the error page from the signin callback? Based on the documentation, the only responses are Promise.resolve(true) or Promise.resolve(false).
If not, is there another place it might make sense to specify this?

Not at the moment, but this is reasonable and I've considered before but there is not currently a mechanism to do this.
Right now the error code is always AccessDenied if you return false from the signin() callback.
Supporting other error codes by rejecting the promise and using the name property of the Error object (or parsing the response it as a simple string) is likely how we would support returning a custom error.

Thanks for the response! For now I'll implement the additional validation on a custom callback page. And if it's not already documented, I guess we can consider this issue a feature request/enhancement.

+1. This would be really helpful.


Consider using a JSON representation instead of the obo file format

Note that have a proposed JSON representation of OBO that would obviate the need for special purpose parsers. Your comments as a developer would be most welcome:

https://github.com/geneontology/obographs/
https://douroucouli.wordpress.com/2016/10/04/a-developer-friendly-json-exchange-format-for-ontologies/

See also: https://github.com/mschubert/python-obo/issues/2

Hey @cmungall -- this is great news! I fully support the deprecation of OBO for a standard serialization format. Of serialization formats that have universal support, I can think of XML, JSON, YAML, and TSV. I think JSON is the best choice, and have myself used it to encode Hetionet v1.0.
Users will still need to understand the data model (what the JSON attributes mean) but will no longer have to struggle with text parsing. The problem with OWL is that it's too complex for most users: you can't just look at the raw text and understand what to do.
I wrote this package and its minimal amount of tests based on my specific use cases. Given the vague and odd specification of the OBO format, I would like to rely on this package as little as possible. So one thing that would be great is if OBOFoundry started releasing their ontologies in the obographs JSON format.
Larger picture, I think there have been two main pain points for ontology adoption. First is documentation and second is readability/operability. The documentation issues are slowly getting better, but the terminology is still daunting for outsiders. For example, I still don't fully understand what an "axiom" is. obographs will do a great job addressing the readability issue. And regarding operability, my hope is that public Neo4j instances (see https://github.com/greenelab/hetontology/issues/3) will allow easy execution of advanced ontology queries via Cypher.
So pardon my ramble, just wanted to jot down my thoughts. Thanks for keeping me in the loop!

In defence of OWL, the intention is that you use Protege or a similar interface to explore it, rather than looking at raw text. But this is a bit of an ivory tower attitude, in reality most coders need fewer levels of abstractions between them and the information they are trying to get at. (the OWL core language is actually amazingly simple - it's just a notation for writing simple set-theoretic expressions over a domain of unary and binary relations - but there is a big gap between this and bioinformatics use cases, and a huge amount of complexity involved in layering this notation onto the RDF/XML concrete form).

I wrote this package and its minimal amount of tests based on my specific use cases. Given the vague and odd specification of the OBO format, I would like to rely on this package as little as possible

Your implementation seems far more robust than other implementations I have seen. But as you point out it's fundamentally hard to check for edge cases given the complexity of the OBO spec (complexity that arises out of the evolution of what was intended to be a simple format - a lesson i there)

So one thing that would be great is if OBOFoundry started releasing their ontologies in the obographs JSON format

Great. We have more work to do to make this a standard, but we can have some release pipelines include this, with the understanding the structure may change, to allow early adopters a chance to test.
Thanks for the comments on the documentation, fully agree

In defence of OWL, the intention is that you use Protege or a similar interface to explore it, rather than looking at raw text.

The people need programmatic ontology access in Python. Out of curiosity, do you know the best way to import OWLs into a Python data structure?

notation for writing simple set-theoretic expressions over a domain of unary and binary relations

Yes "amazingly simple" 😸 .

We have more work to do to make this a standard, but we can have some release pipelines include this, with the understanding the structure may change, to allow early adopters a chance to test.

Awesome, happy to be a tester. Just ping me wherever and whenever the time has come!

On 25 Oct 2016, at 14:51, Daniel Himmelstein wrote:

In defence of OWL, the intention is that you use Protege or a
similar interface to explore it, rather than looking at raw text.

The people need programmatic ontology access in Python. Out of
curiosity, do you know the best way to import OWLs into a Python data
structure?

rdflib is slow, and too low a level of abstraction. It depends what you
want to do. If you need to do serious ontology processing, then
jython+the OWLAPI is the way to go. But if you just need lightweight OWL
operations then the idea is that obographs satisfies the need.

notation for writing simple set-theoretic expressions over a domain
of unary and binary relations

Yes "amazingly simple" 😸 .

Think Venn Diagrams!

We have more work to do to make this a standard, but we can have some
release pipelines include this, with the understanding the structure
may change, to allow early adopters a chance to test.

Awesome, happy to be a tester. Just ping me wherever and whenever the
time has come!

OK, will do

https://github.com/dhimmel/obonet/commit/e22bf7b40763a2cc810d4caee68e6871f5f3820e adds a section to the README that mentions the nxontology.imports.pronto_to_multidigraph function. This allows users to first read an OBO Graphs JSON file using pronto.Ontology and then create a newtorkx.MultiDiGraph via pronto_to_multidigraph. Pronto uses fastobo to load OBO Graphs JSON and .obo files. It has its own RdfXMLParser for .owl files. So users looking to parse formats other than .obo should check that out and the nxontology integration.
I personally use OBO Graphs JSON whenever possible. The sad reality however is that for many ontologies, you'll have to try to parse all three formats and if lucky at least one format will work 😸 .


Fix HTML5Backend intervene functioning of other file drag and drop library.

We notice an issue after integrating react-dnd into our app: Our existing drag-and-drop file upload function (which is not built on top react-dnd) failed to work.
It seems like the event handling code handleTopDragOver in html5 backend will aggressively intervene the functioning of other DnD lib.
if (canDrop) {
...
} else if (this.isDraggingNativeItem()) {
    // Don't show a nice cursor but still prevent default
    // "drop and blow away the whole document" action.
    e.preventDefault()
    e.dataTransfer.dropEffect = 'none'
} else if (this.checkIfCurrentDragSourceRectChanged()) {
...
}

I think it is ok to remove this part of the code, since it is not part this library's concern to prevent "blow way" scenario.
(Please ignore package.json in the change file list 😅, I will remove this file if you think this PR makes sense)

Will this change stop react-dnd from eating all dragend events? If so I'm all for this change.

@kentcdodds Yes :) Glad to know others also experienced this issue.

Did you mention me by mistake? I think you may have meant to mention @kepeterson 😅

@darthtrevino
The made the change in a separated branch and create a new PR.
https://github.com/react-dnd/react-dnd/pull/1008
Will close this PR.


The macOS OpenGL 2.1 software rasterizer isn't detected

macOS provides a software rasterizer supporting OpenGL 2.1. Despite our engine supporting GL 2.1, the engine doesn't find any OpenGL at all.
On the contrary other software like NetRadiant just finds and uses OpenGL 2.1.
Having this working would be helpful to test the game on macOS virtual machines. On the contrary to physical macOS machines, it's easier to snapshot macOS virtual machines or to only keep versions that doesn't contain extra component than the game itself (a good way to test we are not forgetting to bundle any library, for example).

I remember that in the past only GL 2.1 was detected by our engine. We had to change something to get an higher version, maybe that change was in our engine, maybe it was in SDL, I don't know.
So maybe there are two ways to request OpenGL 2.1 in another way. Maybe there are two OpenGL libraries and only one of them is supporting the software rasterizer, the one only supporting GL 2.1.

Until 2022 I used to test Mac stuff in a virtual machine with the software rendering. To get it to run (at 6 SPF) I had to set a cvar, r_glAllowSoftware.

Oh! And it still works! That said, the textures are a bit glitchy but it runs:

I'll see if I can reproduce the bugs we faced with it, it may help if we can catch them this way.

That even says it supports emulated OpenGL 4.1. Great!


Feature/UI performance

Closes #87

WIP: fixing the tests…

@schrooom can you resolve the occuring conflicts in src/app/shared-services/inferences/inference.service.ts before we can merge this PR?

Thanks for the heads-up – conflicts are resolved :)


Links to references return 404

Description
opening links from references leads to a 404 arXiv page
(Optional:) Please add any files, screenshots, or other information here.
For example, clicking on the highlighted link

leads to the following page. This occurs for all such links, generated for the references.

(Required) What is this issue most closely related to? Select one.
Formula
Internal issue ID
54cd3b31-38bd-41a0-9bb5-0d581b92e145
Paper URL
https://arxiv.org/html/2401.06751v1
Browser
Safari/605.1.15
Device Type
Desktop

Thanks for your report. We have fixed this issue in new conversions and will recreate the HTML for existing papers when the next version of LaTeXML is released. I rebuilt the html for this paper with the updated converter and it now appears to work. Thank you for bringing this to our attention - we rely on feedback reports to help prioritize improvements to the html conversions. I will close this issue report -- if the issue persists, please let me know.


[feature] retry request on error

In one of my projects I needed to crawl a large number of web pages, so "socket hangup" errors were very common.
With this pull request it's possible to retry a given request if a some error happens. The new options added are:
var opts = {
  retry_request           : true, // (default: false) if should retry request if some ECONNRESET error happens
  retry_request_max   : 5, // max attempts to be made
  retry_request_wait  : 3000, // how much to wait in ms to retry the request
  retry_request_on_error_code : ['ECONNRESET'] // the errors that should trigger a retry, ECONNRESET only by default
}
needle.get('http://google.com', opts);

Hi,
Thanks for the PR. I think the use case is very limited, though, so I'm not entirely convinced to merge this into master (the whole point of needle is to stay nimble).  Plus it looks like you modified the indentation, which makes this commit affect the blame history for a huge number of lines in the repository... :S

Yeah,
I could probably make it lighter, with only one option. I kinda got carried away :P
I only disagree about being a very limited use case, in my experience ECONNRESET's are usually recoverable after some timeout and happens more the more concurrent requests you have.
I think giving the user a chance to reconnect is a good feature to have, a lot o libs have analogous options to make reconnection/retries, for instance socket.io
The indentation I can fix, I didn't even noticed, sorry about that.

might not be the cleanest implementation, but definitely +1 for the idea!

Seeing not much is happening on something definitely needed for me, I have created a small module based on Needle: https://github.com/Krisa/node-retries - without needle (so that you can always use the latest version of Needle).
All base methods (get, post, put, ...) should work, what is definitely not working are streams and pipes.

@Krisa your module looks good, so I'm closing this issue for the time being.
I might implement this in the future by wrapping the needle get/post/put/etc methods inside of a function that retries the request based on an error code, as proposed by your implementation. I think that's a cleaner approach than inserting all of that logic within send_request.


t-SNE visualization

Hi!  Could you please provide the t-SNE visualization code of MASF which is used in the experiment section?
Thanks!

Hey, we just used tsne matlab implementation (https://lvdmaaten.github.io/tsne/). The hyper-parameters are initial-dims=50, perplexity=30.


Variable used within its own initial value

When we try to run the demo or even with cocoa pods installation, Error comes with "Variable used within its own initial value" inside the library.
I am using Xcode 12.4. Here is a screenshot of it.

Hi! Oh, I’ve made some optimizations that were shipped in 12.5, that don’t seem to work in 12.4.

@nikhilbatra789 If this happens in several parts of the code-base, could you send me a list of all places so that I can fix it in a patch?

I have fixed this in the master branch. It will be released in 4.5.3.

still getting the issue

Can you send me screens of all places it happens at? This works in Xcode 12.5 so I can’t test it myself. Thanks! 🙏

I am running this on Xcode 12.4.

Thank you! I have fixed these and pushed to the master branch. Can you verify?

i cloned the latest code ,tried building the demo keyboard extension but still getting this issue

your changes are not reflected,i dont know why?

Can you check that you are actually using the master branch? If you are, try updating to the latest package versions:

package dependency is keyboardKit 4.5.2

updated swift package from Xcode still the same

i will update my Xcode, hope its works for me also

@shweta-poonia You are using KeyboardKit 4.5.2:

These changes are only in master so far. You have to select the project, go to packages and change SPM to use the master branch instead.

thanks for your help 🙏🏻

I noticed that auto casing is inverted in master. I will try to fix this.

sure

i am new to custom Keyboard Extension

@nikhilbatra789 @shweta-poonia I have fixed this and pushed to master. If you could try to run the master branch from Xcode 12.4 to verify that the problem is gone, that would be 👌

sorry I don't have Xcode 12.4 anymore. Demo is working fine now on my system. thanks for your help


Proposed 0.33.0-rc1

Current coverage is 64.25% (diff: 100%)

Merging #1834 into develop will decrease coverage by <.01%

@@            develop      #1834   diff @@
==========================================
  Files           704        704
  Lines         50786      50786
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
- Hits          32636      32635     -1
- Misses        18150      18151     +1
  Partials          0          0

Powered by Codecov. Last update 802c239...87756b9


Configure runtime augument for java native image

I use kpack 0.9.2 and java-native-image.
From GraalVM Debugging and Diagnostics doc, I want to configure heapdump, see the doc: https://www.graalvm.org/22.3/reference-manual/native-image/guides/create-heap-dump/
In build phase, add BP_NATIVE_IMAGE_BUILD_ARGUMENTS="--enable-monitoring=heapdump"
In runtime phase, I hope to run {command} -XX:+DumpHeapAndExit, but there is no place to pass -XX:+DumpHeapAndExit. I directly run the command in a container, the error shows:

Expected Behavior

Current Behavior
should pass some argument to runtime phase
Possible Solution

Steps to Reproduce

Motivations

I think you want this -> https://buildpacks.io/docs/app-developer-guide/run-an-app/#default-process-type-with-additional-arguments. That will let you add arguments to the default process which should be your application.

You could include a Procfile & specify the command that way but it's not really necessary because of 1.).

I haven't tried it, but you might also try sending the SIGUSR1 signal. That might let you trigger a heap dump without modifying the start command.

I think you want this -> https://buildpacks.io/docs/app-developer-guide/run-an-app/#default-process-type-with-additional-arguments. That will let you add arguments to the default process which should be your application.
You could include a Procfile & specify the command that way but it's not really necessary because of 1.).

I haven't tried it, but you might also try sending the SIGUSR1 signal. That might let you trigger a heap dump without modifying the start command.

Hi @dmikusa set the default process with arguments using https://buildpacks.io/docs/app-developer-guide/run-an-app/#default-process-type-with-additional-arguments do not work well because Java native image layer is not put into the runtime image.

the /layers show only the ca-certificate buildpack layer is put into the final container image.

So it may need the buildpack to do some changes to support the heapdump/jfr shoubleshooting, like the default path for the dump file needs to be changed.
Besides, I didn't use the SIGUSR1 signal because I don't want to send a signal from an application, hope to use a heap dump like in JVM way (e.g. set BPL_HEAP_DUMP_PATH when using JDK)

I'm not sure why they would remove the ability to set the heap dump path. Maybe ask the GraalVM team? We can't really do anything without that option because even if we published the native-image layer, that would be a read-only layer so it couldn't be written to. I'm sure we're not the only ones creating images where the JVM is on a read-only layer. It has to have some way to write the heap dump elsewhere.
You might also ask if they plan to add an option like -XX:+HeapDumpOnOutOfMemoryError. We'd need both of those to enable BPL_HEAP_DUMP_PATH to work the same for a native-image binary.

The default path for heap dump file is  /layers/paketo-buildpacks_native-image/native-image  rather than /workspace， I think it's because the native-image command has params like this:

-H:Name=/layers/paketo-buildpacks_native-image/native-image/io.paketo.demo.DemoApplication

The executable file io.paketo.demo.DemoApplication is finally put into /workspace/io.paketo.demo.DemoApplication
Is it a bug in native-image buildpack? see https://github.com/paketo-buildpacks/native-image/blob/main/native/arguments.go#L159

No, that's intentional. The native-image file is put in the layer so that it can be cached. If you rebuild and your application hasn't changed, then it'll reuse that layer and skip the expensive build.
Could it be done differently? Yes. There are probably 5 different ways you could technically handle this, but presently it's working the way it was designed.


Chapter 9. Error while deploying to Heroku

Hi.
I am at chapter 9.
We will discuss the following topics in this subsection:
1. installing Heroku on Linux-based OS
2. creating app on Heroku dashboard
3. preparing app for deployment
4. configuring env variables
5. deploying app
6. checking logs
7. adding custom domain
I have error on 5th step, when deploying app on Heroku.
Error:
-----> Building on the Heroku-20 stack
-----> Using buildpacks:
1. https://github.com/timanovsky/subdir-heroku-buildpack
2. heroku/nodejs
-----> Subdir buildpack app detected
PROJECT_PATH is undefined
!     Push rejected, failed to compile Subdir buildpack app.
!     Push failed
Can you please give me main points where I should check for errors.
Chapter 9 is little hard for me at the moment. I got source code from chapter-9-end & did everything from beginning but getting this error.
Thanks a lot.

Hi.
Thank you for your answer.
But it didn't help.
I can't figure out what is the problem while deploying on Heroku.
I tried to follow the book again from beginning, but there is many confusing information.
For example, this part

There is no line book suggest to change.
What it means?
I will writer more ...

I meant beginning from chapter 9

We suggest, for the sake of reusability, creating a new getRootUrl() function that contains conditional logic and outputs the proper ROOT_URL depending on the value of process.env.NODE_ENV. Create a new file book/9-begin/lib/api/getRootUrl.js with the following content:
Go ahead and use getRootUrl inside server/server.js as well:
Start your app with yarn dev and look at the terminal:
Error:
export default function getRootURL() {
^^^^^^
SyntaxError: Unexpected token 'export'
So, if we update our yarn, nodejs .. app will crash ?

Open book/9-begin/server/server.ts and mount ...
but there is no server.ts file. is it a typo?
If it is, it is many reference to .ts file at chapter 9.
I can't understand.
Sorry if this questions seem to be dumb. )

@abay-ongar-botabek , regarding your last comment - yes, that is a typo. Thanks for catching. We meant server.js. I will fix any instances where we accidentally wrote server.ts.

@abay-ongar-botabek If you make public repo with your code, I can try deploying it to Heroku. Please share public repo with me and tell me which directory/project you are trying to deploy to Heroku.

Hello.
Thank you guys for your reply.
It is very helpful.
I figured out some mistakes from my side.
I will get back to project again soon.
I will report if there is error, solution ... any information.
Thank you

Firstly, we need to tell Heroku that the 9-end app in the builderbook/builderbook repo is not at the root level, it's actually nested at /book/9-end.
when we write PROJECT_PATH var ... there was problem with value: ... I did as it was written at the  book, but it din't work ... so I pushed all files to (/root_folder) one folder and it did work.
But at the moment I am having trouble with DNS configuration.
I registered domain in my country with Domain service provider and I want to deploy my App at custom domain.
But there is errors at the moment.
My questions:
Is it possible to deploy app on app.heroku.com domain name and check its functionality. Will it be fully working project. Or there will be error?
At the moment it is not possible to login with Google. (app internal error)
Is it because no custom domain?
As I am beginner, it is taking long to me to find errors and fix it.
At the moment I got source code from builderbook 9-end source, and provided my variables at Heroku settings and also at Google OAuth settings, Github Oauth settings.
But I get errors.
Could you please suggest where should I check for errors.
Is there something I should change at code from builderbook 9-end source.
Thanks your in advance.

Async-labs team,
I spent much time following instructions from your book.
And at the time I just want to deploy app online and test it.
Isn't it correct that I just can take source code from builderbook/9-end folder and deploy it on Heroku and make needed settings, also add Config Vars and it should work.

I am having TEST_VARS because written this way.
TEST = LIVE in my case

My private code is same as your builderbook/9-end code.

Hi @abay-ongar-botabek . Thanks for the screenshots and clarifying that you are using 9-end. We will review more today.
A quick check - did you follow the instructions to add a CNAME record to your domains' DNS? You should see that ACM status on Heroku says "Ok".
See step 7 here:
https://builderbook.org/books/builder-book/prepare-project-for-deployment-environmental-variables-production-development-logger-seo-robots-txt-sitemap-xml-compression-and-security-deploy-project-heroku-testing-deployed-project-aws-elastic-beanstalk#heroku

when we write PROJECT_PATH var ... there was problem with value: ... I did as it was written at the book, but it din't work ... so I pushed all files to (/root_folder) one folder and it did work.

this should work if you install two buildpacks in the correct order AND provide correct value for PROJECT_PATH variable:

I registered domain in my country with Domain service provider and I want to deploy my App at custom domain.
But there is errors at the moment.

https://devcenter.heroku.com/articles/automated-certificate-management#dns-provider-timed-out

Is it possible to deploy app on app.heroku.com domain name and check its functionality. Will it be fully working project. Or there will be error?

Does app work locally for you (localhost)? Make sure it works locally first. So if it works locally then it will work in production providing you specified values for all critical env vars.
To answer your question, you can work with heroku domain without adding your domain. Just make sure to provide correct values for PRODUCT_URL_APP.
I suggest you print env vars values using console.log() and make sure app runs and works locally first. After that, web app should work in production providing you added env vars and followed instructions. "DNS provider timed out"  error - please follow Heroku docs on how to resolve it, you may want to contact Heroku about this error. I never faced this particular error.

My private repo code is same as your builderbook/9-end code.

If you have trouble running app locally you may want to hire someone who can screenshare with you and debug with you. We have 1200+ happy readers who completed our books, many of whom customized and deployed their web apps.
Hope this helps.

Hi async-labs team.
I am at the process of checking for my mistakes.
So, I will report parts where it is not understandable for me.
Please, check this part ...
chapter 9-beginning ...

there is no such code to change as claimed at the book

I know there is something that I am missing.
But I tried to follow your book, chapter 9 especially to the exact point.
But I am getting errors.
Could you please, point out critical areas where I should look for.
At the moment I am running the project locally ..
Here is a error now ...

and add two script tags ... but, this codes are already there, in 9-begin document.

Open book/9-begin/app/lib/withAuth.jsx there is no /app folder.
Is it typo?

Hi @abay-ongar-botabek.
First I'll address the typo issues. Thanks for catching!

We do not import getRootUrl into server/models/Book.js, so that instruction is incorrect. I will take it out. That instruction in Chapter 9 should only be for server/server.js and server/stripe.js.
There is no /app folder. That is a typo, and I will fix it.
9-begin/pages/_document.jsx should not already have those script tags for Google Analytics. We accidentally added that code starting from 8-end. I will take it out of 8-end and 9-begin.

I am looking at the other items you reported. In the meantime, can you confirm if you are able to run 9-end locally with your environmental variables?
With my environmental variables, I can run 9-begin and 9-end locally with no issues. If you can run 9-end locally with no issues, then we know your environmental variables are not the problem.

Hi.
Unfortunately I am not able to run 9-end locally with my environmental variables at the moment.
There are big changes between 9-begin and 9-end. Like, updating Next.js version, refactoring class component into functional component, material icons etc.,

It writes, "We only added development-related routes http://localhost:8000**/auth/google**"
did, we really add /auth/google to our Google OAuth app on Google Cloud Platform?
Or is it typo?

I think it is a typo

const getRootUrl = require('../../lib/api/getRootUrl');

think this part needs to be checked

After removing NODE_ENV=production from the dev and build scripts inside book/9-begin/package.json .. if we run yarn dev ... there is error on localhost:8000 and error Unexpected token < in JSON position 0.
Also, connection with Github will be lost. Demo books will no appear.
dev build will not help.

At the end of Environmental variables, production/development part (think, because of yarn build command) I lost connection to GitHub and lost MyBooks page.
So, now it is impossible to make Compression and security part of chapter.

Because there is no MyBooks page anymore

can you confirm if you are able to run 9-end locally with your environmental variables?

I am trying to do everything as written in book.
But this error ... I can't find what I am missing.
it is before deploying the app
I will work until I find it.
Thanks you for your help, async-team.
:)

can you confirm if you are able to run 9-end locally with your environmental variables?

Yes, we tested recently and it works as expected. No other reader complained about this problem.
Please pay attention to values of all environmental variables and values you added to your Google web app at Google Cloud Platform . You can print their values in your terminal with console.log. Your redirect_uri value from the screenshot should not have  undefined in it. In fact it should be:
http://localhost:8000/oauth2callback

Here is Express route to redirect user after successful authentication with Google:
  server.get(
    '/oauth2callback',
    passport.authenticate('google', {
      failureRedirect: '/login',
    }),
    (req, res) => {
      if (req.user && req.user.isAdmin) {
        res.redirect('/admin');
      } else if (req.session.finalUrl) {
        res.redirect(`${ROOT_URL}${req.session.finalUrl}`);
      } else {
        res.redirect('/my-books');
      }
    },
  );

At the end of Environmental variables, production/development part (think, because of yarn build command) I lost connection to > GitHub and lost MyBooks page.
So, now it is impossible to make Compression and security part of chapter.

Again, please pay attention to instructions. Note sure how you lost "connection" to GitHub, likely environmental variables. You have to have one Authorized OAuth app for localhost and one for production:

Hi async-team,
can you confirm if you are able to run 9-end locally with your environmental variables?
here I was answering your colleague klyburke
Yes, it obvious that I am missing something and error on my code.
I just was looking for help.
It is totally ok if my messages ignored.
I don't mind it.
I am trying my best, and will double check my work.
I will come back with any info.
Thanks

So, I remove NODE_ENV=production or leave it in package.json file at this moment?

You have to have 2 sets of environmental variables. One set for running your web app locally (value of NODE_ENV is not production) and second second set for your deployed web app (value of NODE_ENV is production).
I agree that adding NODE_ENV=production to yarn dev command might be confusing. It was suggested for educational purpose only - to see that value of production-level env variables is indeed used instead development (local). Normally you should not have NODE_ENV=production in front of yarn dev.
Just keep in mind that we defined dev variable in Chapter 9. At the start of Chapter 9 you already have set of env vars for development (running app locally, dev is true). In Chapter 9 you define dev variable in multiple location and you have to create second set of env vars for production. NODE_ENV=production yarn dev allows you to confirm that your code uses production level env variables when you run web app locally. After confirming this, you should use yarn dev.
You getting error is likely due to either configuration code error or missing env vars. You gotta try to print env vars one by one to confirm that they are not undefined.

@abay-ongar-botabek I updated the instruction about removing NODE_ENV=production from the dev and build scripts inside 9-begin/package.json. You can read the updated instruction near the end of the Environmental variables, production/development section.
Let us know if that helps.

I was able to log in from localhost and everyhing worked fine.
But I am having problem with my app on Heroku.
I know, again I am doing something wrong. Sorry. Please, assist me if possible.
When I log in on my app on Heroku it is redirecting me to "/" page.
It is asking my Google account login and password.
And I am typing it correctly. So there is no issue with authentication.
But after that it will not open "*/admin" page or "/mybooks" page, it is redirecting me to "/" page.
Here in the left side of the picture is my Google OAuth page from localhost. Where "ituniver-book app" is my Web client app on Google Cloud Platform.
On the right side is Google OAuth page from Heroku app. I want to connect to the same "ituniver-book app" and I provide with Google Client ID (GOOGLE_CLIENTID) & Client Secret (GOOGLE_CLIENTSECRET) same as on localhost.
But I see that it is directing me to ituniver-book.herokuapp.com.
I am beginner. I know I am making mistake with something.
I am spending much time to troubleshoot it. But it is hard to me find the error at the moment.
Can you please direct me what might be my mistake.
Thanks.

can you confirm if you are able to run 9-end locally with your environmental variables?
Yes, I was able to do it. Thanks to your instructions.
Mostly it was my mistake of course.
I forgot what was the exact error, it was few combined I think. I will write when I recall it. later.
Thanks.

@abay-ongar-botabek I updated the instruction about removing NODE_ENV=production from the dev and build scripts inside 9-begin/package.json. You can read the updated instruction near the end of the Environmental variables, production/development section.
Let us know if that helps.

can you confirm if you are able to run 9-end locally with your environmental variables?
Yes, I was able to do it. Thanks to your instructions.
Mostly it was my mistake of course.
I forgot what was the exact error, it was few combined I think. I will write when I recall it. later.
Thanks.

Hi, async-labs team.
I am stuck with this projects ending.
It is working locally on my PC.
I can log in and see my books as admin and change them, and save, everything is seems to working fine.
But, in console, there is no
req.query.redirectUrl:
req.session.finalUrl: null

And I am deploying this project using Heroku Git.
there is some issue with connecting to GitHub via the Heroku dashboard
There problem with deployed project is, it is asking for Google login, password, after creating session and user data on my MongoDB database, but no authenticating to page.
https://ituniver-book.herokuapp.com/login
the link to my deployed app
I am so sorry to bother you and it is mostly my mistake.
Thanks

there is some issue with connecting to GitHub via the Heroku dashboard

I don't think it is your error. GitHub integration is disabled by Heroku:
https://status.heroku.com/incidents/2413
Our book does not explain how to use Git integration (only how to use GitHub integration). So you can learn on your own how to use Git-Heroku integration or wait for GitHub integration to be enabled.

Hi async-labs team.
Thanks you for your help.
I will close the issue at the moment.
as there is onging issue with Heroku-GitHub integration.


Support groups.info API

Adds support for the "groups.info" method.
API description:  https://api.slack.com/methods/groups.info
Feedback is welcome :smile:

Thanks!


Fixed NetworkLoggerPlugin behavior with errors.

Hi!
So the last few days I've been dealing with an API that errors a lot, and I was frustrated to se that when using the NetworkLoggerPlugin, errors would not be correctly displayed.
If using the Alamofire http codes validation and the API responds with a HTTP 500, NetworkLoggerPlugin would just log Received empty network response for ..., without any details put in the response's body by the API. To get them I had to copy the cURL and re-run manually the request in  to get the full response detail.
So I dived in NetworkLoggerPlugin and made a few changes.
First, I now fetch the error's response in the didReceive(:target) if there is any.
Second, I added a "Body: " prefix before the body content so that we can retrieve it more easily from the logs.
Examples using the same request:
Before:
["Moya_Logger: [08/07/2019 16:28:54] Response: Received empty network response for <Here is a description of the target>"]
After:
["Moya_Logger: [08/07/2019 15:56:08] Response: <NSHTTPURLResponse: 0x1c002eaa0> { URL: <Some URL Here> } { Status Code: 500, Headers { <Some headers here>} }", "Body: {\"error\":{\"message\":\"Here is an error message from the API\",\"code\":178912}}"]
edit: I will update tests so that they don't brake.

          3 Warnings

:warning:
PR is classed as Work in Progress

:warning:
Any changes to library code should be reflected in the Changelog. Please consider adding a note there and adhere to the Changelog Guidelines.

:warning:
The library files were changed, but the tests remained unmodified. Consider updating or adding to the tests to match the library changes.

          3 Messages

:book:
iOS: Executed 278 tests, with 0 failures (0 unexpected) in 13.078 (13.215) seconds

:book:
tvOS: Executed 278 tests, with 0 failures (0 unexpected) in 13.228 (13.392) seconds

:book:
macOS: Executed 278 tests, with 0 failures (0 unexpected) in 13.661 (13.794) seconds

  Generated by :no_entry_sign: Danger

Codecov Report

Merging #1880 into development will increase coverage by <.01%.
The diff coverage is 100%.

@@               Coverage Diff               @@
##           development    #1880      +/-   ##
===============================================
+ Coverage        92.13%   92.14%   +<.01%
===============================================
  Files               25       25
  Lines              865      866       +1
===============================================
+ Hits               797      798       +1
  Misses              68       68

Impacted Files
Coverage Δ

Sources/Moya/Plugins/NetworkLoggerPlugin.swift
93.54% <100%> (+0.1%)
:arrow_up:

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 bbe5d2c...13340b6. Read the comment docs.

I've reworked a bit the logging to improve once again the behavior, and also updated tests.
The PR is now ready to be reviewed :)

Hey @amaurydavid, sorry for the delay, didn't see that you finish the work earlier! Really nice improvement, got one question but other than that it looks great. I think many people will appreciate the updates to the NetworkLoggerPlugin, myself included 😉

Hey @amaurydavid, would you be able to also add a changelog entry and check if we need to update our existing documentation for this plugin? Thanks!

I've added a changelog entry, the actual doc seems fine to me.

Awesome @amaurydavid! Do you think you can also resolve the conflicts? Sorry, we released new alpha version in the meantime...

Warnings

:warning:

Any changes to library code should be reflected in the Changelog.
Please consider adding a note there and adhere to the Changelog Guidelines.

Messages

:book:
iOS: 	 Executed 278 tests, with 0 failures (0 unexpected) in 13.384 (13.538) seconds

:book:
tvOS: 	 Executed 278 tests, with 0 failures (0 unexpected) in 13.097 (13.252) seconds

:book:
macOS: 	 Executed 278 tests, with 0 failures (0 unexpected) in 14.224 (14.352) seconds

  Generated by :no_entry_sign: Danger Swift against 8ede1f50b69d70a85ab28c42f4add3c3c1f6424c


dump from a script run from crontab fails with unset USER

Gitea version (or commit ref): 1.4.2
Git version: 2.17.1
Operating system: Debian
Database (use [x]):

[X] PostgreSQL
[ ] MySQL
[ ] MSSQL
[ ] SQLite

Can you reproduce the bug at https://try.gitea.io:

[ ] Yes (provide example URL)
[ ] No
[X] Not relevant

Log gist:

Description
Running dump from a shell script from crontab will fail as the user check in go checks for USER which can be unset
sample:
crontab

0 0 * * *  git /bin/backup_gitea.sh

backup_gitea.sh
#!/bin/bash
cd "/backup/gitea/"
/usr/local/bin/gitea dump -c /etc/gitea/app.ini

will fail with "empty user"
2018/06/19 01:00:02 ...s/setting/setting.go:994 NewContext()] [E] Expect user 'git' but
current user is:
adding 'export USER=$(whoami)' before the gitea dump will make the dump work
Reference in code:
https://github.com/go-gitea/gitea/blob/71dee6b7c09242707028cdfe23373a1f88d6a663/modules/user/user.go#L11
Something like this might be a better approach to get the user
https://golangcode.com/get-the-current-username-name-and-home-dir-cross-platform/

I have the same problem.
Thank you very much @gullevek for providing a solution!


Meta: Implementing package spec proposal (.packages)

Collects all the implementation issues for the package spec proposal.
Main issue: https://github.com/dart-lang/dart_enhancement_proposals/issues/5
Proposal: https://github.com/lrhn/dep-pkgspec/blob/master/DEP-pkgspec.md

dart2js has filed their merge request for this new functionality.

Since I don't see it linked anywhere here, the issue tracking the VM's implementation is #23369.

Blocked by https://github.com/dart-lang/pub/issues/1294

@sethladd When adding new sub-issues to meta-issues, it would be nice to include them in the master list as well (I've done so for this one).

Sure. I didn't know if you wanted blockers that came up after we filed the meta issue, since they weren't original implementation issues.

I think the main function of the meta-issue is to give people a single place to see "what is the current status of X", so having everything in the main list is a good idea. I'll mention it in the wiki entry.

sgtm!

Meta bug, assigning to self to drive to completion for 1.12.

Marking #23373 as complete in checlist

Moved #24093 to 1.13

Created a new issue #24112 to tracks the second phase for this feature targeted for 1.13. Deleting 1.13 work items from present issue that is bound to 1.12.

Marking testing task complete as #24092 was closed.

Marking this feature complete for 1.12. We will expand on this in 1.13, see #24112

Note, there are many open issues around the implementation of this feature. A sample:
https://github.com/dart-lang/sdk/issues/24126
https://github.com/dart-lang/sdk/issues/24127
https://github.com/dart-lang/sdk/issues/24122
https://github.com/dart-lang/sdk/issues/24116


[Perplexity API] Feature request to have an AI chat conversation

Extension
https://www.raycast.com/ilian/perplexity-api
Description
Would love to have the feature to have a full AI chat conversation with follow up requests to responses. Similar to how this extension works with Chatgpt (https://www.raycast.com/abielzulio/chatgpt) Or gemini (https://www.raycast.com/EvanZhouDev/raycast-gemini)
Who will benefit from this feature?
Users to be able to have back and forth chat conversation along with history
Anything else?
No response

Chat conversation will definitely happen in the future.
However, I cannot provide a specific date.

It would be great to merge Perplexity API with the ChatGPT extension, as the ChatGPT extension allready allows to define an alternative endpoint and the Perplexity API is OpenAI compatible.

Good point. How do you that ? How can we use perp API with chatgpt extensionSent from my  iphone On 5 Apr 2024, at 2:59 PM, renehuber @.***> wrote:
It would be great to merge Perplexity API with the ChatGPT extension, as the ChatGPT extension allready allows to define an alternative endpoint and the Perplexity API is OpenAI compatible.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

@raycastbot reopen this issue

@raycastbot close this issue


enhance window behavior

Enhance the hover doc window behavior. try close #50  #48
@elianiva  @akinsho Hi can you test this patch

Will try in a few hours not by my computer at the moment

Will try in a few hours not by my computer at the moment

Okay,not a complete patch. need support scroll in doc buffer.

Okay,not a complete patch. need support scroll in doc buffer.

use lua require('lspsaga.hover').scroll_in_hover() to scroll hover doc

use lua require('lspsaga.hover').scroll_in_hover() to scroll hover doc

I believe this is still a WIP because the window stays there when I move my cursor :laughing:

Here's the error message.
Error executing vim.schedule lua callback: ...site/pack/packer/opt/lspsaga.nvim/lua/lspsaga/window.lua:321: Cannot convert given lua table

I believe this is still a WIP because the window stays there when I move my cursor :laughing:

Here's the error message.
Error executing vim.schedule lua callback: ...site/pack/packer/opt/lspsaga.nvim/lua/lspsaga/window.lua:321: Cannot convert given lua table

@elianiva  can you test now?

@elianiva  can you test now?

Great! It works now.

Great! It works now.

@glepnir I still haven't tried it yet and it doesn't have to be part of this change but it looks like the scrolling only goes in one direction, why not take an argument like -1 or 1 so you can map to different keys and go up and down

@glepnir I still haven't tried it yet and it doesn't have to be part of this change but it looks like the scrolling only goes in one direction, why not take an argument like -1 or 1 so you can map to different keys and go up and down

I forget scroll up support it later

I forget scroll up support it later

Awesome just tried this out @glepnir and it works nicely 🚀 great work.
When you get to doing scrolling (no rush) just a small recommendation would be to do it similarly to how coc handles the mapping e.g.
  map("n", "<C-f>", [[coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"]], nowait)

basically it provides a utility function to see if the floating window for the plugin is open then allows you to map it in a way that you can use normal scroll commands but if the hover window is open then it will scroll that instead

Awesome just tried this out @glepnir and it works nicely 🚀 great work.
When you get to doing scrolling (no rush) just a small recommendation would be to do it similarly to how coc handles the mapping e.g.
  map("n", "<C-f>", [[coc#float#has_scroll() ? coc#float#scroll(1) : "\<C-f>"]], nowait)

basically it provides a utility function to see if the floating window for the plugin is open then allows you to map it in a way that you can use normal scroll commands but if the hover window is open then it will scroll that instead

Sorry one last point, also just realised that this doesn't apply to the finder window

Sorry one last point, also just realised that this doesn't apply to the finder window

Probably not related but is there any way to attach an autocmd to lsp_finder? I want to attach an autocmd that hides my cursor but the filetype is plaintext and the buftype is nofile which isn't specific to lsp finder.

Probably not related but is there any way to attach an autocmd to lsp_finder? I want to attach an autocmd that hides my cursor but the filetype is plaintext and the buftype is nofile which isn't specific to lsp finder.

@akinsho  @elianiva  new change

custom finder action keymap

finder_action_keys = {
   open = 'o', vsplit = 's',split = 'i',quit = 'q'
},

smart height width of finder and hover doc so I think can remove max_hover_doc_width
support scoll hover doc not jump into it

lua require('lspsaga.hover').has_saga_hover() --true mean has hover doc --false not
lua require('lspsaga.hover').scroll_in_hover(1 or -1)  -- 1 mean scroll down -1 mean scroll up

when test ok I will merge.

🤔 just tested it out and the finder window is still really long not sure if I'm missing something

now should be  works.

Awesome that works now 👍🏿

@akinsho  If no other problems I will merge this pr.

Sounds good to me, this resolves my height issues 💯

ditto, everything works well.

For the future @glepnir I just noticed the signature window behaves the old way, maybe that could needs updating as well

support it tomorrow

@akinsho  done.

smart scroll hover doc, if window has hover doc it will scroll hover , if not it will do
-- scroll down hover doc
nnoremap <silent> <C-f> <cmd>lua require('lspsaga.hover').smart_scroll_hover(1)<CR>
-- scroll up hover doc
nnoremap <silent> <C-b> <cmd>lua require('lspsaga.hover').smart_scroll_hover(-1)<CR>

Just tested this out @glepnir I still see

It looks like it's moved but the width is still really small. You can reproduce by typing print(<cursor>.

echo winwidth(0) output

should be works now.

@glepnir yep that's fixed it thanks 👍🏿


About Exercise 7.13

at line 10, add a condition statement
if(!is)      break;
will make the program better, which deals with the last input and avoid the meaningless"0 0 0" output.

@myk502
Sorry, you mean add the statement at here?
https://github.com/Mooophy/Cpp-Primer/blob/master/ch07/ex7_13.cpp#L10
and I cannot get the "0 0 0" output, could you please show the sequences of the inputs?

Sorry about the line 10, because that was on my own editor. My new version of ex7_13 is as below:
`//
//  ex7_13.cpp
//  Exercise 7.13
//
//  Created by pezy on 11/9/14.
//
#include "Sales_data.h"
int main()
{
Sales_data total(std::cin);
if (!total.isbn().empty())
{
std::istream &is = std::cin;
while (is) {
Sales_data trans(is);
if(!is)
break;
if (total.isbn() == trans.isbn())
total.combine(trans);
else {
print(std::cout, total) << std::endl;
total = trans;
}
}
print(std::cout, total) << std::endl;
}
else
{
std::cerr << "No data?!" << std::endl;
return -1;
}
return 0;

}
`
And the meaningless output occurs when you want to end your input by typing a ctrl + D(unix) or ctrl + z(windows) for Simulation of EOF; or in the case when you read redirection.

Ok, I see the " 0 0" output at last.
But added your statement, it still output that... Can you check about that ?

//
//  ex7_13.cpp
//  Exercise 7.13
//
//  Created by pezy on 11/9/14.
//

#include "Sales_data.h"

int main()
{
    Sales_data total(std::cin);
    if (!total.isbn().empty())
    {
        std::istream &is = std::cin;
        while (is) {
            Sales_data trans(is);
			if(!is)
				break;
            if (total.isbn() == trans.isbn())
                total.combine(trans);
            else {
                print(std::cout, total) << std::endl;
                total = trans;
            }
        }
        print(std::cout, total) << std::endl;
    }
    else
    {
        std::cerr << "No data?!" << std::endl;
        return -1;
    }

    return 0;
}

This is my version, only changed the name of header file to "Sales_data.h"

I got it,  thanks for your contribute. 💯


Missing hipLaunchParm after hipify

When I convert below code from CUDA to HIP by hipify (hipconvertinplace.sh)
# kernel.cu
__global__
void kernel(double z[], const double x[], const double y[])
{
	const auto i = (blockIdx.x * blockDim.x + threadIdx.x);

	z[i] = x[i] + y[i];
}

and compile them, I got an error.
kernel.cu:8:27: error: hc_grid_launch function must have grid_launch_parm type as first parameter, 'double *' type is not compatible
void kernel(double z[], const double x[], const double y[])
                          ^
kernel.cu:19:34: error: no matching function for call to 'kernel'
        hipLaunchKernel(HIP_KERNEL_NAME(kernel), dim3(block), dim3(thread), 0, 0, z, x, y);
                                        ^~~~~~
/opt/rocm/include/hip/hcc_detail/hip_runtime.h:529:30: note: expanded from macro 'HIP_KERNEL_NAME'
#define HIP_KERNEL_NAME(...) __VA_ARGS__
                             ^
/opt/rocm/include/hip/hcc_detail/hip_runtime.h:552:3: note: expanded from macro 'hipLaunchKernel'
  _kernelName (lp, ##__VA_ARGS__);\
  ^
kernel.cu:8:13: note: candidate function not viable: requires 3 arguments, but 4 were provided
void kernel(double z[], const double x[], const double y[])

"hipLaunchParm" seems missing so I can solve this error by manually adding "hipLaunchParm lp" at kernel's first argument.
Is it hard to automatically add "hipLaunchParm lp" by hipify converter?

The hipify tool is a perl script and converts code using find and replace. So adding the hipLaunchParm as the kernel's first argument is a manual step as noted in this blog post.
However, there is a newer experimental tool based on clang that is available in the repo under the clang-hipify folder. Refer to clang-hipify README.md for instructions on building and using this tool.

@mangupta
Thank you.
clang-hipify works fine but it cannot convert *.c and *.cpp which uses CUDA Runtime API (e.g. cudaMalloc or cudaMemcpy).
So we need

clang-hipify for *.cu
(original) hipify for other files using CUDA Runtime API

Is it right?

clang-hipify should be able to consume *.c, *.cpp, *.cu, or any other extensions that you might be using. However it does expect a .cu extension in the output filename. Can you try again by specifying -o  instead of using the -inplace option?

@mangupta
"-inplace" option works and "-o" too.
# NG
$ /opt/rocm/hip/bin/hipify-clang main.cpp
Input .cu file was not specified.

# OK
$ /opt/rocm/hip/bin/hipify-clang main.cpp -o main.hip.cpp

# OK
$ /opt/rocm/hip/bin/hipify-clang main.cpp -inplace

In my understanding, hipify-clang always needs output file name. so

"/opt/rocm/hip/bin/hipify-clang [A] -o [B]" works instead of "hipify [A] > [B]"
"/opt/rocm/hip/bin/hipify-clang [A] -inplace" works instead of "hipify [A] -inplace"
"/opt/rocm/hip/bin/hipify-clang [A]" doesn't works.

Current version of clang-hipify works fine with any file extension if -- delimeter is specified at the end of command line after all clang-hipify options. Clang options (if needed, for instance -I) should be specified after -- delimeter.

Output filename (-o) is optional.
To feed clang-hipify files with any extension or without extension at all, please specify "-x cuda" option after "--" delimeter.
Directories are not supported.


Added paging to query and fixed readme

fixes issue #40 and #31

Coverage increased (+0.3%) to 59.343% when pulling fa8c8c581179de55f00e2ca80dfd5e808952868d on issue-40 into a79f7958f5389c935246188878aa8ec345beeac5 on master.

@massdosage

Consider going for a minor version bump as we've kind of added a feature
We're already on a planned major release, so that's fine. We'll go to 3.0.0


HTTP PUT support (idempotent RPCs)

gRPC originally used POST. For idemponent RPCs, we could use PUT instead, which would be clearer to proxies and enable faster QUIC startup if using something like Cronet.
This is a tracking issue across languages. This should not be closed until there is a way to specify it in a proto, the protocol is defined, interop test defined, and implemented on client and server on all languages with passing interop tests.

Please comment in this issue if this work would actually benefit you. Bear in mind that QUIC is still hard to roll out on most servers, which means if it existed today we're uncertain that anyone would be benefited.


test(go/adbc/driver/snowflake): fix flaky integration tests

It's not happy about trailing whitespace


Unable to compile inside docker container with golang:1.13-alpine3.11 image

Hi,
I'm trying to compile frontend with make frontend but always get following error somehow:
Running "clean:dist" (clean) task
>> 1 path cleaned.

Running "copy:src_to_dist" (copy) task
Created 14 directories, copied 73 files

Running "copy:metadata" (copy) task
Copied 2 files

Running "packageModules:dist" (packageModules) task
<EMAIL_ADDRESS>/go/src/github.com/grafana/kairosdb-datasource/dist
`--<EMAIL_ADDRESS>(git://github.com/grafana/grafana-sdk-mocks.git#8022ff1856048f8716d00b15b4423795b81f8369)

[                 .] - runTopLevelLifecycles: sill install printInstalled
Running "tslint:files" (tslint) task
>> 54 files lint free. runTopLevelLifecycles: sill install printInstalled

Running "tslint:test" (tslint) task
>> 18 files lint free. runTopLevelLifecycles: sill install printInstalled

Running "typescript:build" (typescript) task
180 files created. js: 60 files, map: 60 files, declaration: 60 files (2272ms)
[                 .] - runTopLevelLifecycles: sill install printInstalled
Running "babel:distTestsSpecsNoSystemJs" (babel) task

Running "karma:unit" (karma) task
25 02 2020 18:11:10.758:INFO [karma]: Karma v1.7.1 server started at http://<IP_ADDRESS>:9876/
25 02 2020 18:11:10.763:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
25 02 2020 18:11:10.777:INFO [launcher]: Starting browser PhantomJStalled
25 02 2020 18:12:10.780:WARN [launcher]: PhantomJS have not captured in 60000 ms, killing.
25 02 2020 18:12:12.785:WARN [launcher]: PhantomJS was not killed in 2000 ms, sending SIGKILL.
25 02 2020 18:12:14.787:WARN [launcher]: PhantomJS was not killed by SIGKILL in 2000 ms, continuing.
Warning: Task "karma:unit" failed. Use --force to continue.

Aborted due to warnings.
make: *** [Makefile:5: frontend] Error 3

# cat /etc/hosts
<IP_ADDRESS>	localhost
<IP_ADDRESS>	build-container

Can anyone help with this to compile, please ? I have read some issues and tried to do some recommendation from karma upstream project but without success. Really strange bug.
Env info:
/go/src/github.com/grafana/kairosdb-datasource # go version
go version go1.13.8 linux/amd64
/go/src/github.com/grafana/kairosdb-datasource # node --version
v12.15.0
/go/src/github.com/grafana/kairosdb-datasource # grunt --version
grunt-cli v1.3.2
grunt v1.0.4

The problem related to the issue with phantomjs-prebuilt and how it works on alpine linux.
Didn't find the workaround for alpine yet just switched to golang:1.13-buster (Debian) docker image.


should npm scripts pass through to the cli or explicitly specify scripts?

a) put cli commands in npm scripts, e.g.
"scripts": {
    "cli": "ts-node src/cli.ts",
    "build": "ts-node src/cli.ts build",
    "test": "ts-node src/cli.ts test",
    "fmt": "ts-node src/cli.ts fmt",
    "clippy": "ts-node src/cli.ts clippy",
    "instantiate": "ts-node src/cli.ts instantiate",
    "clean": "npm run chown && rm -rf ../target",
    "chown": "sudo chown -R $(whoami):$(whoami) ../target || true"
},

b) put a single npm script in pointing at the cli
"scripts": {
    "cli": "ts-node src/cli.ts",
},

The benefit with option b is that commands only need to be specified in the cli ts code, not in both cli ts code and npm scripts (which means we have to maintain the same thing in two spots)

b)

done in protocol

Closing due to inactivity


Some things that I have to do on the current version

hi:
I noticed that in the README.rst, the command
./scripts/eval_on_all.py
should changed to the latest one?
./scripts/evaluate_on_all.py -f  -p
Also, in line 77 of scripts/evaluate_on_all.py
I added these line of code to ensure no error when running glove word embedding:
load_kwargs = {"vocab_size": vocab_size, "dim": dim}
Lastly, can you please add the YP130 data set to the word-embedding-benchmark? thank you :)

Thanks!
I am afraid now I am not able to work on this project, but if you propose a PR, I will be more than happy to review it and merge


fix: migrate fixes

:tada: This PR is included in version 1.0.4 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


TensorFlow on Windows logs an error when using GPUs: "Could not identify NUMA node"

I use one GPU card now,  tensorflow(0.12) reports follow error, but the process run correctly.   How to suport  if we use multi-gpu on windows ?
E c:\tf_jenkins\home\workspace\release-win\device\gpu\os\windows\tensorflow\core\common_runtime\gpu\gpu_device.cc:586] Could not identify NUMA node of /job:localhost/replica:0/task:0/gpu:0, defaulting to 0.  Your kernel may not have been built with NUMA support.

This error should be a warning. Multiple GPUs work today on Windows, and they should work with a NUMA setup (although we haven't tested this). However, the stream executor code will not take advantage of NUMA topology if it is available.

@poxvoculi I think you know most about the more complex bus topologies we use. What are we missing if we don't have GPU-to-NUMA-node mapping information in stream executor?

The code and comments in gpu_device.cc clarify what's going on.  We use the StreamExecutor interface to get NUMA affinity for a GPU, then use that to set a (PCI) bus identifier for the GPU.  In the generic open-source version of TensorFlow, the bus id is of no consequence because there are no adaptations for multi-bus architectures.    It would be possible to utilize this feature to customize TF for higher performance in some kinds of multi-bus architecture.

Should we remove this log statement from tensorflow/stream_executor then? Or should we even remove the code for querying the NUMA affinity, since the bus ID is never used?

That should probably be a LOG(INFO), not an error.


Handle positive time gaps

E.g. return "about 10 minutes from now" when given the current time and a future time.

Done in v0.0.2