Tuesday, December 4, 2018

How to change page title archive page in Wordpress



1.) Install Yoast SEO Plugin
2. ) Go to /wp-admin/admin.php?page=wpseo_titles
3. ) Click Post-Types
4. ) Scroll down and find the custom post type that you want to change the URL and click it.
5. ) After the panel scrolls down abit look for the settings for the archive page .
6. ) Change the SEO-Title field and Save
7.) Done

Sunday, September 18, 2016

Yii2 : Quoting table and column names

To avoid column quoting when creating a query string , use [[columnName]] for columns and {{table_name}} for tables for example $result = \Yii::$app->db ->createCommand("SELECT COUNT([[id]]) FROM {{tbl_user_accounts}}") ->queryScalar();

Thursday, August 25, 2016

Yii2 GridPageSize

Found a gem today Here's a snippet ... What this does is it allows user to choose number of records to show in a gridview.

Tuesday, August 23, 2016

Functional Testing vs Acceptance Testing


Notes for me by me:


Its safe to say that
Functional testing = headless acceptance test , the gist here is to test quickly .
Acceptance Test = involves multiple real web browser.

Friday, July 1, 2016

How to view connected devices on my own pldtmydsl router/wifi



How to view connected devices on my own pldtmydsl router/wifi


You can view list of connected devices on your pldt wifi router by going to
http://192.168.1.1/wlstatbl.htm


Step #1 . Open your web browser and browse http://192.168.1.1/wlstatbl.htm

Step #2 . Login your credentials.

Done : You can now view devices that are connected to your router. EZ


Friday, April 17, 2015

How to remap hjkl in sublime text 2 vintage mode



First go to

Preference >> Browse Package

It would open up your package folder
open


Default.sublime-keymap

Open that and use your analytical skills ....

Im now using
j = left
k = down
l = right
i  = up

using these confirguration ... and ohh.... If you want to go back to insert mode ... use    " a"


Sunday, February 1, 2015

how to upload csv file to server via ajax in javascript


how to upload csv file to server via ajax in javascript




dropContainer.addEventListener('drop',function(evt){
    evt.stopPropagation();//stop event bubble
    evt.preventDefault(); // stop event bubble
    //iterate through the files
    Array.prototype.forEach.call(evt.dataTransfer.files, function (currentData) {
        //currentData - File - current file object of evt.dataTransfer.files
        filereader = new FileReader; // create a file reader
        //define when load ends listener
        filereader.onloadend = function(){
            contenArea.innerHTML += filereader.result;
        }
        filereader.readAsText(currentData);//start reading the file

      //=====   IF you want to send the form data to server ===
        // create a form data , you can retrieve the file in  PHP    via  $_FILES['uploadedFile']
        var tempFormData = new FormData;
        tempFormData.append("uploadedFile", currentData);
        // prepare ajax content and sendfile
        xhr = new XMLHttpRequest();
         //gets called everytime there is a state change
        xhr.onreadystatechange = function () {
            if (xhr.status === 4) {
                console.log("done uploading");
            }
        };
         // configure the xhr
        xhr.open("POST", "http://localhost:8000");
        // send the form data
        xhr.send(tempFormData);
    });

});