This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Inspired by | |
| https://open-vsx.org/swagger-ui/index.html?urls.primaryName=VSCode%20Adapter#/vs-code-api/extensionQuery | |
| https://gist.github.com/jossef/8d7681ac0c7fd28e93147aa5044bc129 | |
| """ | |
| import itertools | |
| from dataclasses import dataclass | |
| from typing import Any, Optional |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default class CDMA { | |
| WalshCodeSize: number = 3; | |
| data: number[][] = []; | |
| codes: number[][] = []; | |
| public constructor(cdma: Partial<CDMA>) { | |
| Object.assign(this, cdma); | |
| } | |
| private WalshCache: number[][] = []; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @GET | |
| @Produces(MediaType.TEXT_PLAIN) | |
| @PermitAll | |
| public String hello(@Context SecurityContext securityContext) { | |
| final var user = (DefaultJWTCallerPrincipal) securityContext.getUserPrincipal(); | |
| if (user == null){ | |
| return "Hello Anonymous User"; | |
| } | |
| final var email = user.getClaim("email"); | |
| return "hello " + email; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -----BEGIN CERTIFICATE-----\nMIIDHDCCAgSgAwIBAgIIUAu/wmcX4dQwDQYJKoZIhvcNAQEFBQAwMTEvMC0GA1UE\nAxMmc2VjdXJldG9rZW4uc3lzdGVtLmdzZXJ2aWNlYWNjb3VudC5jb20wHhcNMjAw\nNTEzMDkxOTU3WhcNMjAwNTI5MjEzNDU3WjAxMS8wLQYDVQQDEyZzZWN1cmV0b2tl\nbi5zeXN0ZW0uZ3NlcnZpY2VhY2NvdW50LmNvbTCCASIwDQYJKoZIhvcNAQEBBQAD\nggEPADCCAQoCggEBAKsAwNDay6jPuWS/wmtF7vIyrGmg6akt+bI/Yx/baZhEpJm7\nFe7qmMyuS8MrkbhxXiEPIGhZKg5MQ1EKZ2TaSbZ9nXrpxFUUtH2CGop4k/XgmZC6\nsEQPkxblQZrXTy11rj0pUQecklUPImOPR6lV9b2aDTQ/8nhaJ2e2FoknrU4eRWij\n/zO7Z8cx78z3TfakDDG3AkeZo9sBReFIZc5kwHwxaWhqc/rPgGVT/zT3FMB0Lab+\nPSwIMkgLMstBN5x1MTyi5SUcHaq0BT6lxJ6wvATWVDvl6rqd3qjWoF7VgwDsAWAs\n5lrA6qNdc3O7h9P6Cq5SsE1GIhT/WcoFvIu9DucCAwEAAaM4MDYwDAYDVR0TAQH/\nBAIwADAOBgNVHQ8BAf8EBAMCB4AwFgYDVR0lAQH/BAwwCgYIKwYBBQUHAwIwDQYJ\nKoZIhvcNAQEFBQADggEBAHVT7pVhCziNoGGP4wfQ+0fd0p/m5p4E84tZiHquAx+Z\nWnqpBa8YcstXTnaFWm1ValFkehXRPN81PVlIWuo3ba/qCLphu7foFNOpfhsuoiFp\nXfjRJk/2GDnYoQ3tm1Z6VmjsIexHKG/9wHxNpClCzC7D5XHpt50R+zO9hof5+FXi\nKov9ndgfUb0jZZzjnp18fiOQL/PVWIxrBH7SeK/shiNKdHc9kyWHHlgehw37tN7Y\nvRMqb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mp.jwt.verify.issuer=https://securetoken.google.com/<Firebase-Project-Id> | |
| mp.jwt.verify.publickey.location=META-INF/resources/key.pem | |
| quarkus.smallrye-jwt.enabled=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mvn quarkus:add-extension -Dextensions="resteasy-jsonb, jwt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mvn io.quarkus:quarkus-maven-plugin:1.4.2.Final:create \ | |
| -DprojectGroupId=com.pc.firebase \ | |
| -DprojectArtifactId=Quarkus-Firebase-Auth \ | |
| -DclassName="com.pc.firebase.FirebaseAuth" \ | |
| -Dextensions="resteasy-jsonb, jwt" | |
| cd Quarkus-Firebase-Auth |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pragma solidity ^0.6.4; | |
| // pragma solidity ^0.5.0; | |
| contract Election { | |
| struct Voter { | |
| address Sender; | |
| string Name; | |
| // Constituency Code | |
| uint32 Constituency; | |
| // Has User Voted |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def ToStr(string): | |
| return str(string)[2:-1] | |
| import socket | |
| with socket.socket(socket.AF_INET, socket.SOCK_DGRAM) as client: | |
| client.connect(('localhost', 9000)) | |
| string = 'ABCBA' | |
| client.sendall(bytes(string, 'utf-8')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def ToStr(string): | |
| return str(string)[2:-1] | |
| import socket | |
| with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as client: | |
| client.connect(('localhost', 9000)) | |
| string = 'ABCBA' | |
| client.sendall(bytes(string, 'utf-8')) | |
| palindrome = ToStr(client.recv(1024)) |
NewerOlder