Recent Questions - Stack Overflow |
- [express,mysql]Question using mysql data in non-app.js files
- Automatically retrieve password for Neo4j from AWS Secret manager using terraform
- authentication for GCP STT Quickstart problem
- Implementing custom in-app keyboard in android
- Currency Exchange Rate API with bid and ask prices
- why the first node has less data than other nodes in TDengine cluster
- How do I allow partial updates via POST request in Django?
- npm command returning 406 Not Acceptable with custom registry
- Create cookies in browser based on object structure
- Primeng carousel diferent height for carousel items
- Removing subdomain in a string in TypeScript
- Type hint issues with Union on a class method signature
- Split and Join with Variable in Javascript
- How to effeciently access subset list of dict that match certain string in Python
- Replace a certain part of the string which matches a pattern in python 2.7 and save in the same file
- Spring boot: check if GeoJson Point in Polygon fails
- Is there a possibility in Java to parametrize classes by integers or general objects instead of types only?
- Topk values in LogQL
- Count unique occurrences within data frame
- Bypass kafka authorization for port 9092 (plaintext)
- How to parse this JSON file using android library volley
- Insert commas delimited string into a string column of Athena table
- How to connect Dapp to Metamask and interact with smart contract deployed on Ropsten via Remix
- Azure services events collection
- After read holding registers with Pymodbus connection is broken in Raspberry Pi
- TypeScript error after upgrading version 4 useParams () from react-router-dom Property 'sumParams' does not exist on type '{}'
- Rails production not work in AWS load balancer
- Laravel 7 verify email adress invalid signature
- Unable to use all cores with mpirun
- Click through transparent xlib windows
[express,mysql]Question using mysql data in non-app.js files Posted: 04 Aug 2021 08:16 AM PDT https://github.com/kimwoon11/nodejs I'd like to make id duplicate check. but it's not working. What did I do wrong? And can we solve this problem in another smarter way? | ||||||||||||||||||||||||||||||
Automatically retrieve password for Neo4j from AWS Secret manager using terraform Posted: 04 Aug 2021 08:16 AM PDT Is there a way that I can automatically retrieve secrets from AWS Secrets Manager that is the password for Neo4j which is provisioned using terraform? | ||||||||||||||||||||||||||||||
authentication for GCP STT Quickstart problem Posted: 04 Aug 2021 08:16 AM PDT I am following the GCP Speech-to-Text Quickstart. As best as I can tell, I have followed all setup criteria. Enabled STT for my project. Generated Service API keys and downloaded the JSON file. Installed SDK and initialized. In Windows CMD shell, I set GOOGLE_APPLICATION_CREDENTIALS to the downloaded JSON file. In Windows CMD shell, I executed gcloud auth activate-service-account --key-file= "mypath/JSON key file". I executed gcloud auth list and I see my project account identifier. I executed the example curl command: curl -s -H "Content-Type: application/json" -H "Authorization: Bearer "$(gcloud auth application-default print-access-token) https://speech.googleapis.com/v1/speech:recognize -d @sync-request.json And get this error: { "error": { "code": 401, "message": "Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.", "status": "UNAUTHENTICATED" } } No where in the Quickstart steps does it mention OAuth As a test, I executed: gcloud auth application-default print-access-token And got this: (gcloud.auth.application-default.print-access-token) File "mypath/JSON key file" was not found. Even though the file exists in the folder I specify. Trying something else, I tried executing the Java example in the SDK. It creates a very simple SpeechClient with no credentials, which seems suspect. I made the GOOGLE_APPLICATION_CREDENTIALS env variable available to the example. I think the example uses gRCP, but not sure. The example hangs at: Looking online, I found the likely suspect is bad authentication, which is the same as trying the CMD line example. Any and all guidance is appreciated. | ||||||||||||||||||||||||||||||
Implementing custom in-app keyboard in android Posted: 04 Aug 2021 08:16 AM PDT | ||||||||||||||||||||||||||||||
Currency Exchange Rate API with bid and ask prices Posted: 04 Aug 2021 08:16 AM PDT I'm looking to automate a daily manual process in my company. Every morning a few people are manually inserting the bid and ask prices for each of our companies base currencies and I was thinking that we can make use of some sort of API from where we can fetch the data daily. Now, for most APIs I stumbled upon, they seem to provide a midpoint value of the bid and ask values and I'm not sure if it's possible to extract the bid and ask from the mid point value. The API that comes closest to my needs is this one: https://docs.openexchangerates.org/docs/bid-ask-prices, but I would like to find more alternatives. Are there any other APIs that might help? | ||||||||||||||||||||||||||||||
why the first node has less data than other nodes in TDengine cluster Posted: 04 Aug 2021 08:16 AM PDT I built a TDengine cluster with 4 nodes, created a database with 3 replicas and inserted some data into this database. I found that the first node always has less data than other nodes. eg: From above example, we can see that node 1 has only 1 vnode, node 2, 3, 4, each has 5 vnodes. why node 1 has less data than other 3 nodes? | ||||||||||||||||||||||||||||||
How do I allow partial updates via POST request in Django? Posted: 04 Aug 2021 08:16 AM PDT Working on a small Django app and I've been asked to set up partial updates via POST request. I'm aware that PATCH works for partial updates out of the box but I don't have access to the front end and that's not what I've been asked to do. I was told it's a quick one line change, so I'm assuming I have to update the serializer as explained in the DRF docs (https://www.django-rest-framework.org/api-guide/serializers/#partial-updates) but I'm not sure where to do that exactly. Serializers: Viewset: | ||||||||||||||||||||||||||||||
npm command returning 406 Not Acceptable with custom registry Posted: 04 Aug 2021 08:16 AM PDT We are having a custom artifcatory repo for npm as I can't directly access https://registry.npmjs.org/ from our lab. Any ideas what could be the wrong here? | ||||||||||||||||||||||||||||||
Create cookies in browser based on object structure Posted: 04 Aug 2021 08:17 AM PDT I need to create several cookies on a web page based on data that's been read by Puppeteer. From my understanding, I can create cookies with However I can't find any way to create the above string based on an Object, or would I have to manually create some kind of function to effectively build up a cookie-based on key/value pairs from my array of objects? My data looks like this: | ||||||||||||||||||||||||||||||
Primeng carousel diferent height for carousel items Posted: 04 Aug 2021 08:16 AM PDT Hi im using primeng carousel but there is problem so carousel height is always based on the highest item. I want to have automatic height for every carousel item. Is this possible? | ||||||||||||||||||||||||||||||
Removing subdomain in a string in TypeScript Posted: 04 Aug 2021 08:16 AM PDT I have a string in TypeScript which is Note: The 'subdomain' part of the URL could be different sizes so it could be 'subdomain.domain.com' or it might be 'sub.domain.com' so I can't do this on character size. The domain might also be different so it could be 'subdomain.domain.com' or it could be 'subdomain.new-domain.com'. So basically I need to just remove up to and including the first '.' - hope that all makes sense. | ||||||||||||||||||||||||||||||
Type hint issues with Union on a class method signature Posted: 04 Aug 2021 08:16 AM PDT I am getting a squiggly line under the As you can see the method can return The error in VSCode reads: I can also reproduce running | ||||||||||||||||||||||||||||||
Split and Join with Variable in Javascript Posted: 04 Aug 2021 08:16 AM PDT I have the ff. JSON payload of an Array { "AuthCode": "12132", "CardId": "************8104" } ] } } And I want to override this payload by renaming CardId to MaskedCardId and adding a new param named CardId with an actual Card id. My code is the ff. below I could already replace the CardId with the renamed parameter named MaskedCardId. with the ff. code But whenever I try to add a new parameter named CardId with a variable value, it is giving an error of.
How do I make this line of code work with my intended purpose?. TIA | ||||||||||||||||||||||||||||||
How to effeciently access subset list of dict that match certain string in Python Posted: 04 Aug 2021 08:16 AM PDT Given a list of dict, access only The code below answer the intended objective. However I wonder whether there exist more efficient approach than proposed here. p.s., I just notice. using Expected output of | ||||||||||||||||||||||||||||||
Replace a certain part of the string which matches a pattern in python 2.7 and save in the same file Posted: 04 Aug 2021 08:16 AM PDT I am trying to achieve something of this sort My input file has this kind of entries I am trying to match the pattern like where Here is my following attempt at solving this problem Here I have taken But still my file is remaining unchanged as the So I want to know where I am going wrong and what can be the possible solution to this. | ||||||||||||||||||||||||||||||
Spring boot: check if GeoJson Point in Polygon fails Posted: 04 Aug 2021 08:15 AM PDT I have a GeoJson polygon and a point and i want to check if the point is in the polygon. Classpaths: I tried with Geometry methods contains and within, but both failed. From google maps I can see, that the point should actually be insinde the polygon. UPDATE: One randomly created point could have been found. | ||||||||||||||||||||||||||||||
Posted: 04 Aug 2021 08:15 AM PDT Assume I want to define classes (or maybe even interfaces) that are similar in structure, but differ in a parameter that could be an integer or could be something else. Is it possible in Java to define a family of classes parametrized by an integer or even an arbitrary object? Consider the following pseudocode (which does not compile): Other even more natural examples that come to my mind are tensor-products in math, so where to put the parameter 'n', if one wants to define e.g. the space R^n as a Java class or in functional programming the 'arity' of a If this is not possible in Java, does this concept exist in other more functional languages and what is the proper name for it? (like maybe 'parametrized class'?) Edit: as a reaction to comments, the last part was just to know the general name of such a concept, not to make a deviation to other languages. | ||||||||||||||||||||||||||||||
Posted: 04 Aug 2021 08:15 AM PDT I need some help with Loki. I`ve got json logs like following And I need to print top N reasons. How can I do this? | ||||||||||||||||||||||||||||||
Count unique occurrences within data frame Posted: 04 Aug 2021 08:16 AM PDT Let the table be as follows:
What i want R to create a table for number of occurences of unique values for each column:
| ||||||||||||||||||||||||||||||
Bypass kafka authorization for port 9092 (plaintext) Posted: 04 Aug 2021 08:16 AM PDT I want to add authentication and authorization for my confluent kafka running with docker. This should only happen on port 9093, 9092 should work as before because the port is blocked for external clients by ip table rules. Therefore I used following config: => 9093 SASL_SSL Here is a part of my config: As I only want to configure the authentication mechanism for the SASL_SSL listener I use following jaas config as described here: https://docs.confluent.io/platform/current/kafka/authentication_sasl/index.html#recommended-broker-jaas-configuration. kafka_jaas.config zookeeper_jaas.config When I run kafka i get the following error: How can I achieve that a client does not need to authentication when connecting to port 9092? | ||||||||||||||||||||||||||||||
How to parse this JSON file using android library volley Posted: 04 Aug 2021 08:15 AM PDT I'm building an android application but I'm not able to parse this JSON file, I am using volley android library. JSON file link : https://api.covid19india.org/v4/min/data.min.json I'm trying to get info for "UT" | ||||||||||||||||||||||||||||||
Insert commas delimited string into a string column of Athena table Posted: 04 Aug 2021 08:16 AM PDT I create an athena table based on CSV in S3. I want to input a row of data which one column include commas. But it truncates the string from the commas each time. For example: insert into table_names (id, key_string)values (1,'{key1=1,key2=3}') Each time, the column key_string only store '{key1=1'. I tried use double quote '"{key1=1,key2=3}"', escape char '"{key1=1,key2=3}"'. All doesn't work. Any suggestion? | ||||||||||||||||||||||||||||||
How to connect Dapp to Metamask and interact with smart contract deployed on Ropsten via Remix Posted: 04 Aug 2021 08:16 AM PDT I deployed a smart contract via remix to the ropsten testnet and now I want to interact with it via website(dapp). I am creating a auction dapp. The user has to input the amount of ETH he want's to bid for the article. After the value is submitted via button click I want metamask to pop up and handle the transaction. I got the js code for connecting to metamask from https://docs.metamask.io/guide/getting-started.html#basic-considerations And it's working fine Metamask is popping up, but the part where I am stuck is how to connect the dapp to the deployed ropsten contract(deployed it via remix and it's visible on ropsten etherscan). I tried to connect it with this js script But I don't know how to connect it to the contract deployed on ropsten. After I have done some reading on the internet I created an infura node to connect to the contract, but I got stuck again. Do I have to connect to infura node when I am only using metamask to interact with the dapp. | ||||||||||||||||||||||||||||||
Azure services events collection Posted: 04 Aug 2021 08:15 AM PDT I'm following this Azure guid : https://docs.microsoft.com/en-us/rest/api/application-insights/events/get-by-type#examples And when I'm trying to use the sample requests : https://api.applicationinsights.io/v1/apps/DEMO_APP/events/traces Instead of getting a valid response I get: {"error":{"message":"Valid authentication was not provided","code":"AuthorizationRequiredError","correlationId":"f5bb5980-26fc-4afb-bfec-b41729a2a81b"}} Any ideas how can I fix it? (I logged in to my Azure account and after that I tried to use the request above) | ||||||||||||||||||||||||||||||
After read holding registers with Pymodbus connection is broken in Raspberry Pi Posted: 04 Aug 2021 08:16 AM PDT This code is working on Windows. But i run it in raspberry pi "client.is_socket_open" is return false after read holding registers. How can i solve this? Or what is the problem in here. I dont force the client to close. | ||||||||||||||||||||||||||||||
Posted: 04 Aug 2021 08:15 AM PDT I get a typeScript error after upgrading to version 4 Used in useParams () from react-router-dom
The project worked great and only after the upgrade does it throw an error | ||||||||||||||||||||||||||||||
Rails production not work in AWS load balancer Posted: 04 Aug 2021 08:16 AM PDT My Rails 6 App work fine with development mode in EC2 instances. But when config to use production mode. The load balancer not able to do health check and not able to run the app. My health check: Security: Load Balancer Security: Rails App(s) Load balancer worked in development Here the development that work with load balancer Start rails: then responded config/environments/development.rb Below is production(that not working) config/environments/production.rb Start rails: then responded: Load Balancer: Health Check not work! I also tried:
It seems nothing about the rails config, but the way it handle production in AWS Help: How to make this Rails 6 work as production in AWS EC2 with load balancer ? | ||||||||||||||||||||||||||||||
Laravel 7 verify email adress invalid signature Posted: 04 Aug 2021 08:15 AM PDT After clicking verify email address button in the email, I got 403 invalid signature. I'm using shared hosting I have read these
but still can't solve my problem | ||||||||||||||||||||||||||||||
Unable to use all cores with mpirun Posted: 04 Aug 2021 08:15 AM PDT I'm testing a simple MPI program on my desktop (Ubuntu LTS 16.04/ Intel® Core™ i3-6100U CPU @ 2.30GHz × 4/ gcc 4.8.5 /OpenMPI 3.0.0) and mpirun won't let me use all of the cores on my machine (4). When I run: I get the following error: But if I run with: everything works fine. I've seen from other answers that I can check the number of processors with and this tells me that I have 4 processors. I'm not interested in oversubscribing, I'd just like to be able to use all my processors. Can anyone help? | ||||||||||||||||||||||||||||||
Click through transparent xlib windows Posted: 04 Aug 2021 08:16 AM PDT I have a transparent, watermark like application that is written with XLib in C. Currently if you click anywhere on the application nothing happens but I would like it to pass mouse input to whatever is below it. e.g. If you click the X to close a window that is below the application it should close the application, not do nothing. |
You are subscribed to email updates from Recent Questions - Stack Overflow. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment