Skip to content

Instantly share code, notes, and snippets.

View inf-reiaz14's full-sized avatar

Abdul Halim Reiaz inf-reiaz14

  • Student
  • Bangladesh
View GitHub Profile
@rakibulalam
rakibulalam / ClientOnly.js
Created September 23, 2018 09:23
React.js component render for Client Only
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 }) => {
@hasinhayder
hasinhayder / mxn.php
Last active August 3, 2018 00:46
create mxn matrix
<?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);