This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import ExecutionEnvironment from 'exenv'; | |
/* | |
* Author: Md. Rakibulalam | |
* Dependencies : npm install --save exenv | |
* If you want to exclude render dom releated components from server side render | |
*/ | |
export default (WrappedComponent) => { | |
const hocComponent = ({ ...props }) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$i1 = 2; //m | |
$i2 = 3; //n | |
//your requirement was that you will add 1 to the incoming data, here $i1 and $i2 - so added 1 with $i1 and $i2 in the loop below | |
$matrix = array(); | |
for($j=1;$j<=($i1+1);$j++){ | |
$_row = array_fill(0, ($i2+1), 0); | |
array_push($matrix,$_row); |