Your browser (Internet Explorer 6) is out of date. It has known security flaws and may not display all features of this and other websites. Learn how to update your browser.
X
article

5 Interesting projects you can build with your kid(s) this summer holiday (Ages 3 to 6)

I was consulted by a toddlers' school to help teach their pupils, age-appropriate technological and engineering projects that would be fun, to get kids thinking outside the box and elicit a “wow” from them.

I must confess it was an interesting time for me and my team.…

article

Generating Bitcoin Wallet Address from Public Key with PHP

Recently, I have been working on some interesting Bitcoin projects and I ran into the issue of converting my public key to a wallet address. I was initially using bitwasp/bitcoin module to achieve this but when I moved the project to a shared host it wasn't working because it needed a PHP Library my host will not allow me install because it is shared. Below is a solution to this. It follows the algorithm stated in Bitcoin documentation on step by step way of generating wallet…

article

[SOLVED] message: use of undefined constant intl_idna_variant_uts46 - assumed 'intl_idna_variant_uts46'

I was working on a project that works perfectly on my local. I moved the project to a shared server and I start getting this funny error "message: use of undefined constant intl_idna_variant_uts46 - assumed 'intl_idna_variant_uts46'". I checked everywhere and it seems it is a known issue but very few fix worked. I got this fix below to work so I decided to keep this here for myself later and anyone looking for a solution that worked

In system/libraries/Email.php, change the valid_email…

article

Ogaranya: The future of e-Commerce in Africa is SMS

While driving on Awolowo road on one of my trips to a Client's office in December 2017, something caught my attention that I couldn't help but wait to take a snapshot.

article

AYITI Code Generals internship at OT&T Consulting and Konga Online Shopping

Here is the Epic video of my Code Generals during their internship at OT&T Consulting and Konga Online Shopping. I appreciate everyone who has made their experience worthwhile.

These whiz-kids have differentiated themselves and they have proven that the future is bright for Africa; if only we would engage them.

I have always said that training…

article

Distributed guessing attacks against online card payments

Report [PDF] - Does the online card payment landscape unwittingly facilitate fraud? Ali et al., IEEE Security & Privacy 2017

The headlines from this report caused a stir on the internet when the story broke in December of last year: there’s an easy way to obtain all of the details from your Visa card needed to make online purchases…

article

SOLVED: SQLSTATE[42000]: Syntax error or access violation: 1139 Got error 'this version of PCRE is compiled without UTF support

article

LeetCode: Is Subsequence (2ms)

 


public class Solution {
    public boolean isSubsequence(String s, String t) {
        int pos = 0;
        int prevPos = 0;
        
        for(int i = 0; i < s.length(); i++) {
            
            if (t.indexOf(s.charAt(i), pos) == -1 || prevPos > t.indexOf(s.charAt(i), pos)) {
                return false;
            }
            
            prevPos = t.indexOf(s.charAt(i), pos);
            pos = prevPos + 1;
        }
     …

article

LeetCode: Maximum Subarray (14ms)


public class Solution {
    public int maxSubArray(int[] nums) {
        
        int maxSoFar=nums[0], maxEndingHere=nums[0];
        
        for (int i = 1; i < nums.length; ++i){
        	maxEndingHere = Math.max(maxEndingHere + nums[i], nums[i]);
        	maxSoFar = Math.max(maxSoFar, maxEndingHere);	
        }
        
        return maxSoFar;
    }
}

article

LeetCode: Maximum Product Subarray (1ms)


public class Solution {
    public int maxProduct(int[] nums) {
        
        int max = 1;
        int leftToRightMax = nums[0];
        int rightToLeftMax = nums[0];

        //Transverse from left to right keeping the max
        for (int j = 0; j < nums.length ; j++) {
             max = max * nums[j];

             if (max > leftToRightMax) {
                 leftToRightMax = max;
             }
             
             if (max == 0) {
…

article

LeetCode: Reverse Words in a String (2ms)


public class Solution {
    public String reverseWords(String s) {
        s = s.trim();

        List spl = split(s);
        StringBuilder sb = new StringBuilder();

        for(int i = spl.size() - 1; i >= 0; i--) {
                sb.append(spl.get(i));
                sb.append(" ");
        }

        if ( sb.length() > 0 ) {
            sb.deleteCharAt(sb.length() - 1);
        }

        return sb.toString();
    }

    public static List…

article

Getting Response from Interswitch WebPay API in C#

I got one of my well respected colleagues trying to fix Interswitch Webpay for a client and it looks like I have been so lucky to have got this same endpoint implemented in PHP because we seems not be able to get the right response from Webpay. After intense debugging we got the C# code working and I decided to document our observations. Find below what worked


HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://stageserv.interswitchng.com/test_paydirect/api/v1/gettransaction.json?"…

article

Fidelity PayGate migrating to Microsoft Azure Cloud from September 18, 2016 - Payment & transaction status URLs changed.

Fidelity PayGate has is migrating their payment gateway to Microsoft Azure and their payment API URLs are changing. It might save you some stress to start changing this URLs in your applications. Below is the mail from Fidelity Bank to Customers:

 

Dear Customer,

We are migrating our web payment platform PayGate onto Microsoft Azure Cloud.

With Microsoft Azure, PayGate has created a cloud infrastructure that’s…

article

[Solved] Fatal error: Allowed memory size of 134217728 bytes exhausted - Magento 2

If you keep getting this error when you run below code.

php bin/magento setup:static-content:deploy

The fix is super easy. Run below code and thank me later

php -dmemory_limit=6G bin/magento setup:static-content:deploy

Hope this helps someone.

 

article

Making Payment Module Available for Virtual Products - Prestashop Cart

I ran into a funny bug by a client. He bought my QuickTeller module for Prestashop and he kept complaining the module is not showing up on checkout. I was so confused because I have never gotten a complaint like this before, ever.

After so any days of looking for what really went wrong, checking the carriers and every single preference I can find, I couldn't just understand…

article

How to place the ~/.composer/vendor/bin directory in your PATH

To put this folder on the PATH environment variable type

export PATH="$PATH:$HOME/.composer/vendor/bin"

This appends the folder to your existing PATH, however, it is only active for your current terminal session.

If you want it to be automatically set, it depends on the shell you are using. For bash you can append this line to $HOME/.bashrc using your favourite editor or type the following on the shell

article

Complete guide to integrate X-Debug into PhpStorm for XAMPP

This post is a continuation of the guide to installing X-Debug on MacOS X. Please refer to the former post to install the X-Debug first.

To integrate X-Debug into PhpStorm IDE, please follow the following steps:

1. Go to PhpStorm → Preferences → Languages & Framework → PHP

2. Set your php interpreter for debug. You can either add a default interpreter…

article

Complete guide to installing X-Debug on MacOS X

I have been surviving without X-Debug for a long time (I still don't know how I do it, so don't ask me how). Almost everyone who uses X-Debug can't remember how they got it to work on their box so I decided to pen this down so if I need to go through this route again I won't be found wandering.

Follow the following steps and you would be alright:

1. Get your PHP version first... open your terminal and type


php -version

2.…

article

Top 5 Questions on Nigeria Payment Gateway I have received and my Answers

I received questions about payment gateways in Nigeria almost every week and I have decided to put together, top 5 of those questions. It will interest you what these questions are and what functionalities people are looking for. I think we are not doing so much with our software products in Nigeria because we lack research and the knowledge of what people really want. Building payment gateways is not enough, building payment gateways for real people is the big deal. Please read on.

 

Question…

article

With Developer, On Developers. #1 – Nick Sagona

Early 2015, I was searching for a PHP framework that is light, modern in features and would easily install on a shared host without no out of the box support. You know what I mean? Light in weight, just extract to the server and see happiness. I have noticed advanced developers are having this same issues more these days because I have heard more than two friends asking for a light weight framework and would still be badass. I will recommend Pop PHP for you if you are reading this.

I was…