Categories
Mastering Development

In App Purchase Verify Using Cloud Function

After Researching for last 24 hour i have found a very effective way to verify in app purchase but didn’t get proper Information . I am looking to verify product purchase . I tried to deploy the js file to firebase cloud function but showing i have error in exports.validatePurchases = functions.database method . Can […]

Categories
Mastering Development

Event does not trigger using javafx and mvvmfx

I’ trying to build an application using javafx and mvvmfx framework to compute and display CVRP Problem but when I add an event listener on a Circle, it is never triggered. scope.subscribe(“STOP_LOADED”, (key, payload) -> { stepList.clear(); stopList.clear(); Stop depot = CVRPGraph.getDepot(); stopList.add(new Circle(toUiUnit(depot.getX()), toUiUnit(depot.getY()), 3, Color.BLACK)); stopList.addAll(CVRPGraph.getClientList().stream() .map(stop -> { Circle circle = new […]

Categories
Mastering Development

How to cast interface{} to a map in GO

I am new to Go & I am trying to learn how to cast interface{} to a Map. Here is an example of what I am trying to implement. Playground link : https://play.golang.org/p/3jhKlGKO46Z Thanks for the help. package main import ( “fmt” ) func main() { Map := make(map[string]interface{}) test(Map) for k,v := range Map […]

Categories
Mastering Development

Unable to mount Azure Data Lake Storage Gen 2 with Azure Databricks

I try to mount an Azure Data Lake Storage Gen2 account using a service principal and OAuth 2.0 as explained here: configs = { “fs.azure.account.auth.type”: “OAuth”, “fs.azure.account.oauth.provider.type”: “org.apache.hadoop.fs.azurebfs.oauth2.ClientCredsTokenProvider”, “fs.azure.account.oauth2.client.id”: “<application-id>”, “fs.azure.account.oauth2.client.secret”: dbutils.secrets.get(scope = “<scope-name>”, key = “<key-name-for-service-credential>”), “fs.azure.account.oauth2.client.endpoint”: “https://login.microsoftonline.com/<directory-id>/oauth2/token”} dbutils.fs.mount( source = “abfss://<file-system-name>@<storage-account-name>.dfs.core.windows.net/”, mount_point = “/mnt/<mount-name>”, extra_configs = configs ) The service principal that I […]

Categories
Mastering Development

Trouble loading RSA public key from file

I’ve been using openssl library in my C++ project recently, and I’m facing an issue that i can’t fix by myself. I’m actually trying to load an RSA public key stored in a file and encrypt 64 bytes. My code works when it uses a public key generated using the function RSA_generate_key, but when i’m […]

Categories
Mastering Development

handing dynamic onchange event from database in reactjs

I am trying to handle dynamic onchange name input within an array.I am calling a list from database.Based on the list size no of input boxes will be placed. getCogsList = () => { console.log(“getVisitStatusList colling…”); axios.get( this.state.apiUrl+’/api/v1/cogsType/getAll’, {}) .then((response)=>{ console.log(“response”, response.data.data); this.setState({cogsList:response.data.data }); }).catch((error)=>{console.log(“error”, error); this.setState({cogsList:””}); }); }; handleLevelNum() { const levelNum = []; […]

Categories
Mastering Development

Why is async/await not having any effect here?

So I have these two functions – One is an upload function (uploads file to DB). And the other function needs the url’s of the uploaded files and for some reason I’m not able to wait for the upload function to finish so I can get the url’s of the images uploaded so I can […]

Categories
Mastering Development

MySQL JOIN very slow for no apparent reason

MySQL version 8.0.17: SELECT b.ColB FROM Table2 b JOIN Table1 a ON a.ColA = b.ColA WHERE b.ColB = 1234 — some number With the JOIN, this query takes about 2 seconds to run, without the JOIN it is almost instant. This is just a minimal example, the actual case requires the WHERE condition to cover […]

Categories
Mastering Development

React order is lost when updating Safari only

I have a list of toggle button example. Option one () Option two () Option three () I can toggle each one independently example Option one (selected) Option two () Option three (selected) This works in Chrome and Firefox correctly, but in safari the order gets lost. if I select “option one” it re-renders like […]

Categories
Mastering Development

AWS S3 Bucket indexing using lambda function

I have S3 bucket website which has multiple HTML files, now I have created a lambda function and connected it to S3 trigger. Now I have created a lambda function which I want the first indexAll the current HTML file of S3 bucket to my Elastic search domain indices which I have after that if […]