Wednesday, 21 October 2020

Change windows drive from GPT to MBR

 Step 1. Turn off the PC and put in the Windows installation DVD or USB.

Step 2. Boot the PC from the DVD or USB.

Step 3. In Windows Setup, press "Shift + F10" to start Command Prompt.

Step 4. Enter the following command in order:

  • diskpart
  • list disk
  • select disk <disk number>
  • clean
  • convert gpt
  • exit

Step 5. Close Command Prompt.

Step 6. Continue the Windows installation.

Click to copy the command you'll need to convert MBR to GPT throughout the process:

-------

diskpart

list disk

select disk <disk number>

clean

convert gpt

exit

-----

After the conversion, the drive will appear as a single area of unallocated space. Choose the unallocated space and click Next. Windows will begin the installation without sending the same error.

Wednesday, 7 October 2020

LocalStorage Into Deep

 https://javascript.info/localstorage

Basic LocalStorage Full Code Test

PAGE 1

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <input id="qweInputed" value=""><button onclick="qweclick()">Save Me</button>
    <button onclick="qweRemove()">Remove</button>
    <script>
        function qweclick() {
            var getInput = document.getElementById("qweInputed").value;
            alert(getInput + " success");
            localStorage.setItem("qweStorage"getInput);
        }

        function qweRemove() {
            alert("remove succeed");
            localStorage.removeItem("qweStorage");
        }
    </script>
</body>

</html>


PAGE 2
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="loadStorage"></div>
    <script>
        window.onload = alert(localStorage.getItem("qweStorage"));
        window.onload = document.getElementById("loadStorage").innerHTML = localStorage.getItem("qweStorage");
    </script>
</body>

</html>

Basic LocalStorage

 Without reading your code but just your scenario, I would solve by using localStorage. Here's an example, I'll use prompt() for short.

On page1:

window.onload = function() {
   var getInput = prompt("Hey type something here: ");
   localStorage.setItem("storageName",getInput);
}

On page2:

window.onload = alert(localStorage.getItem("storageName"));

You can also use cookies but localStorage allows much more spaces, and they aren't sent back to servers when you request pages.

Monday, 5 October 2020

Link List Of Wordpress Functions 👍

 👉 https://digwp.com/2010/03/wordpress-functions-php-template-custom-functions/

👉 https://wordpress.stackexchange.com/questions/1567/best-collection-of-code-for-your-functions-php-file

Get Input Value. Add into link. Open it. Function. Onclick

  <!--/test/-->

                    <button onclick="fqweOpen()" class="woocommerce-button button woocommerce-form-login__submit">Function</button>

                    <div id="demome">Hello</div>

                    <script>

                    function fqweOpen(){

                    var qwex = document.getElementById("username").value;

                    var qwey = document.getElementById("password").value;

                    var qwez = "u=" + qwex + "&" + "p=" + qwey;

                   document.getElementById("demome").innerHTML = qwez;

                     window.open('https://www.persada.com.my/stock/apiloginasp2v2.asp?'+ qwez, "_blank");

                    }

                    </script>


Get Input Value. Add into link. Open it. Function. Onclick

window.open in Iframe - Iframe window

 

If you want to open a window within an iframe:

  1. Create the iframe with a name.

     <iframe name="theFrame"></iframe>
    
  2. Now use the script this way:

     window.open(url, "theFrame");
    
  improve this answer   

Saturday, 3 October 2020

Custom selector like jquery document.querySelector

 var query = document.querySelector.bind(document);

var queryAll = document.querySelectorAll.bind(document);
var fromId = document.getElementById.bind(document);
var fromClass = document.getElementsByClassName.bind(document);
var fromTag = document.getElementsByTagName.bind(document);

Thursday, 1 October 2020

Wordpress Functions for certain page

  1. add this on functions.php 


function sv_hide_header_footer_for_page() {

  if( is_page( 2662 ) ) {

echo '<div class="coupon-notice">Thanks for visiting! As a gift, here\'s a coupon code you can use in our shop: <code>20off</code></div>';

}

}

add_action( 'wp', 'sv_hide_header_footer_for_page' );

email mailto: pretext

 <a href="mailto:designoutsourced.com+info@gmail.com?subject=Maklumat%20lanjut%20pakej&body=Hai,%20saya%20berminat%20tahu%20lebi...