Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
Building the Better World By Writing Stuffs...

Maniruzzaman Akash ManiruzzamanAkash

👨‍💻
Building the Better World By Writing Stuffs...
View GitHub Profile
@ManiruzzamanAkash
ManiruzzamanAkash / regex-examples.php
Last active Jun 5, 2021
All Possible basic to advance level regex pattern example in depth example
View regex-examples.php
<?php
/** EXAMPLE 1: With Digit check **/
echo "Digit Check\n-------------------\n";
// Basic Concept : /pattern/i
// / : start delimeter
// pattern : Here will be the pattern, [ eg: \d - Check if one digit match and then space ]
// i :for case insensitive [ eg: mg, mgi, i, m ]
@ManiruzzamanAkash
ManiruzzamanAkash / concat-multiple-row-in-a-row-mysql.sql
Last active May 20, 2021
Concat multiple row data in a single row mysql Complete example
View concat-multiple-row-in-a-row-mysql.sql
-- Approach 1: Add <br /> tag after each row
---------------------------------------------------
SET session group_concat_max_len=20000;
INSERT INTO `terms` (`id`, `category`, `country`, `language`, `menu`, `content`, `page_id`, `footer`, `key`, `en`, `fi`, `se`, `no`, `dk`, `de`, `it`, `fr`, `es`, `pl`, `al`, `ru`, `ar`, `bn`, `so`, `ku`, `vi`, `cn`, `sr`, `tr`, `order_nr`, `ja`, `uk`, `ro`, `nl`, `el`, `ind`, `th`, `pt`, `lt`, `fa`, `hi`, `status`, `created_by`, `updated_by`, `deleted_by`, `deleted_at`, `created_at`, `updated_at`)
VALUES ( 805, NULL, NULL, NULL, '0', '0', NULL, '0', 'pd805', (SELECT GROUP_CONCAT(en SEPARATOR '<br>') FROM terms as t WHERE id IN (811,812,809)), (SELECT GROUP_CONCAT(fi SEPARATOR '<br>') FROM terms as t WHERE id IN (811,812,809)), (SELECT GROUP_CONCAT(se SEPARATOR '<br>') FROM terms as t WHERE id IN (811,812,809)), (SELECT GROUP_CONCAT(`no` SEPARATOR '<br>') FROM terms as t WHERE id IN (811,812,809)), (SELECT GROUP_CONCAT(`dk` SEPARATOR '<br>') FROM terms as t WHERE id IN (8
@ManiruzzamanAkash
ManiruzzamanAkash / GetDatesFromDay.php
Created Apr 18, 2021
Get dates of a day range from input using php
View GetDatesFromDay.php
<?php
/**
Author : MD. Maniruzzaman Akash
Live Link: https://paiza.io/projects/e/TwNe185C_A2kJPZlXE6SGw?theme=twilight
**/
$days = ['Saturday', 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday'];
@ManiruzzamanAkash
ManiruzzamanAkash / App.js
Created Feb 9, 2021
Use of Demo Modal in APp
View App.js
import React, { useState } from "react";
import SimpleModal from "./Components/SimpleModal";
import Task1Form from "./Components/Task1Form";
import Task2Form from "./Components/Task2Form";
export default function App() {
const [show, setShow] = useState(false);
return (
<div className="App">
<h2>Modal Demo</h2>
@ManiruzzamanAkash
ManiruzzamanAkash / Task2Form.jsx
Created Feb 9, 2021
Task2Form For Simple Modal React
View Task2Form.jsx
import React, { useState } from "react";
import SimpleModal from "./SimpleModal";
const Task2Form = () => {
const [task1Show, setTask1Show] = useState(false);
return (
<>
<button
className="btn btn-sm btn-info"
onClick={() => setTask1Show(true)}
@ManiruzzamanAkash
ManiruzzamanAkash / Task1Form.jsx
Created Feb 9, 2021
Simple Modal Component with Form
View Task1Form.jsx
import React, { useState } from "react";
import SimpleModal from "./SimpleModal";
const Task1Form = () => {
const [task1Show, setTask1Show] = useState(false);
return (
<>
<button
className="btn btn-sm btn-info"
onClick={() => setTask1Show(true)}
@ManiruzzamanAkash
ManiruzzamanAkash / App.js
Created Feb 9, 2021
Demo Use of Simple Modal
View App.js
import React, { useState } from "react";
import SimpleModal from "./Components/SimpleModal";
export default function App() {
const [show, setShow] = useState(false);
return (
<div className="App">
<h2>Modal Demo</h2>
<button className="btn btn-info btn-sm" onClick={() => setShow(true)}>Open Modal 1</button>
<hr />
View SimpleModal.jsx
import React from "react";
import { Modal } from "react-bootstrap";
const SimpleModal = (props) => {
const { show, handleClose, size, modalTitle } = props;
return (
<Modal onClose={handleClose} size={size} show={show} onHide={handleClose}>
<Modal.Header closeButton>
<Modal.Title>{modalTitle}</Modal.Title>
<p className="btn-modal-close" onClick={() => handleClose()}>
View index.js
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import reportWebVitals from "./reportWebVitals";
import "bootstrap/dist/css/bootstrap.min.css";
import "./index.css";
ReactDOM.render(
<React.StrictMode>
<App />
View React Components Example For Ecommerce Project.jsx
import "./App.css";
import Footer from "./components/Footer";
import Header from "./components/Header";
import Navbar from "./components/Navbar";
import Product from "./components/Product";
import Sidebar from "./components/Sidebar";
function App() {
return (
<div className="App">