Posts

Showing posts from 2020

Electron - How to load/update the current browser window with a new html file?

Image
 A couple of days ago my superior of my current job told me to create a cross-platform desktop application with certain requirements. After some digging, I came to know about electron js which is currently the most popular javascript framework to create a cross-platform desktop app with HTML, CSS, and Javascript. At first, I was thinking to start the development process with the help of some front-end framework like Vue or angular along with electron. But after some time I made a decision to dig deep into electron first without getting my hand dirty with those front-end frameworks.  Oh boy, that was quite a decision.  After some quick digging in official electron docs, I faced a problem of changing the entire view aka changing the source Html file of the current browser window. It's easy a create a new browser window instance but changing the source file of the current browser window at runtime is a little bit complicated but not that much. I googled a lot to find a solut...

Difference between __dirname vs __filename vs process.cwd() : once and for all

Image
Recently I started working with nodejs, one of the most popular backend technologies in today's era. After spending some time with nodejs , I quickly realised that I am facing some difficulties figuring out the tiny differences among three of node's global objects, i.e __dirname, __filename and process.cwd . The main reason of causing this confusion is that they are closely related to each other and behave almost equally in certain scenarios. That's why I sat down today to clear the confusion and figure out the differences . This post is about writing down all those details for future references and helping out people who are in the same shoe now, in the past or in the near future. At first lets see what the official documentation of node says about these three global objects. __dirname It will return the directory name of the current module. I like to remember it as it returns the absolute directory path of the script or js file (the one which we run using node com...

Violation of Inappropriate Ads Policy : One Stop Solution

Image
If you are like me who recently gets an inappropriate ad violation policy notice from google play and as a result of it , google play removed your app from play store, then we are in the same ship and there is no doubt that this post is written for you people. Google does like to play with us a lot , I must say it's a learning for me as I am getting more acquainted with all those hidden policy violations. It does increased my knowledge a lot while trying to find the solution for this kind of problem. Well, enough jibber jabber, lets dive into the main solution part. In this post I will show you how you can get rid of this mighty policy violation and put your app back on play store. What it looks like Here is the glimpse of an email regarding ad violation policy in case you are not sure what I am talking about. What's the effect If you don't take actions within one day then you will also get an admob action required as a consequence of this policy violation error...