Posts

Bootsrap-select for Bootrap 5

Image
Bootstrap-select for Bootstrap 5  (At least it work at Feb 2023)   Due to the recent update from bootstrap 4 to bootstrap 5 , it cause the boostrap-select not working. Any due to change from cdn to webpack pre-compiled So the fix is using webpack .. I think. First update the package json to use beta version. "bootstrap-select": "snapappointments/bootstrap-select#v1.14-dev" Second at the main compile script add the following: const bootstrap = window.bootstrap = require('bootstrap'); require('bootstrap-select/js/bootstrap-select'); then compiled.( do Remember remove the existing bootstrap import else the compiles will failed.

Retrieve password from Jetbrain IDE (Datagrip) Windows OS only

Image
 If you are using the IDE from JetBrains like PyCharm, DataGrip, WebStorm but you forgot the password you still able to retrieve back by using the KeePass. The Jetbrain is using the keepass to store the password. I will skip the download and install step of KeePass and direct go to the important part. First Open the IDE according to the password you want to retrieve, then click File menu -> Settings. Search for password. If radio button selected is the “Do not save, forgot password after restart” then you may leave now as there is no password saved. Input the password you want which will use it later. After you set the password, then you can navigate to the path show at the Database label file path. Then you open the file c.kdbx at the path as mentioned above. Check the master password and input the password you set just now. Then the list of passwords saved entry is show below. Then you could just right click the entry and New dialog box will show, then you just need to click the

VueJs way to implement debounce click

Well, I assume that you don't need me to explain what is debounce or something like this. And assume you using the lodash library. If you are looking for an explanation then this article is not for you. I found that could have multiple ways to implemented this . Each method has pros and cons, but I don't know which one has the best performance.👻 Vuejs is good, but it still lacks customize features like modifiers. I cannot found any example of a custom modifier for the @click, it only has the once/prevent/passive, etc..... I would like a modifier to prevent it from executing multiple times of clicking. After study about the debouncing, there are multiple ways. All using lodash as  1) Directly put before the function in front of the function like the example below. methods: { clickHandler: _.debounce(function(e) { // implementation of the function }, 400) } 2) Put in Directive, after many testing it finally work and have some limitations. const debounce = {   bind (el, binding,

The resource DLL can not be loaded

Image
When starting the Microsoft word (2016), the loading screen will hang in Processing...  There will be a pop up with text "The resouce dll can not be loaded!" if you are able to enter the Microsoft word, then you could just proceed by clicking any document and the following step: Go to File > Options > Add-In. At the very bottom of the settings page, there's a dropdown menu. Select "COM Add-ins". Press Go... button. Find any Add-ins that were enabled, and untick the checkmarks next to them. Go to File > Options > Add-In. At the very bottom of the settings page, there's a dropdown menu. Select "COM Add-ins". Press Go... button. Find any Add-ins that were enabled, and untick the checkmarks next to them. If you cannot open the application then you should follow the step below : Windows Key + R. Type "winword /safe". Press Enter. Check and make sure no error dialog appears. Go to File > Opti

Oneplus 5T Flashing from Hydrogen OS to Oxygen OS

Image
How to Convert Hydrogen OS to Oxygen OS in One plus 5T I just bought One Plus 5T, Is very easy but it will be hard if you did the wrong thing (that me ). I have done many mistakes from converting the Hydrogen os to Oxygen os.  But I try to let you all avoid the mistake I have done. Ok, First download the Oxygen OS from the official website. (link: http://downloads.oneplus.net/devices/oneplus-5t/ ) (VERY VERY Important)  After finishing download from the website. Open the PowerShell.  (Win + R => Type in "Powershell" => Enter) Then try to locate the zip that you have just download.  then type in the following in the PowerShell. Get-FileHash <filepath> -Algorithm MD5 (Replace the <filepath> with the file path of the zip you just download. Wait the result come out. The value must same as the value of md5 hash show on the website. If not same then redownload the rom. Then you need to create a ha

Disable Shutdown button

Image
I accidentally shut down the remote server, so  I was looking for a way to disable the remote user to shutdown. There is a method to prevent the user to shutdown according to user and access but I do not recommend it. Below is the method to disable shutdown: 1)  (Win+ R) Run "gpedit.msc" 2) go to User configuration => Administrator template -> Start Menu and Taskbar 3) Find "Remove and Prevent access to shutdown, Restart ...." and double click 4) You will see the setting is not configure 5) all you need to do is click enable and apply. Done That simple. you should not able to see shutdown and restart. However, you can do it with command prompt or set the setting back to not configure. PS: shutdown -s now Feel free to leave a comment below if you have a better solution! Thank you ~~

Content Security Policy CSP

What is Content Security Policy? Content Security Policy is internet security standard to prevent the known attack like Cross-site scripting XSS, click hijacking and code injection. For example like, if your visiting website is http://www.example.com  then you only able to access the data come from http://www.example.com, others URL or script and CDN like http://google.com/jquery.js also will be blocked. Beside that, it also contain some inline script <button onclick="testing()">Click Me!</button> will also be blocked. unless you do some configuration on the header. In short, it will do the following: 1) Whitelist to tell the client (Normally is Browser) what's allowed and what is not allowed. 2) Learn what directives are available 3) Learn the keywords they take 4) Inline code and eval () are considered harmful 5) Report Policy violations to your server before enforcing them. How to implement Content Security Policy (CSP)? <system.webS