Skip to content

Instantly share code, notes, and snippets.

View arif25169's full-sized avatar
🎯
Focusing

Arif Hasan arif25169

🎯
Focusing
View GitHub Profile
@arif25169
arif25169 / Operations in a Linked List.cpp
Last active September 15, 2023 18:33
Write a program that support the following operation in a linked list. Insert at the beginning of the list Insert at the end of the list Display the list Search an item in the List Delete an item from the beginning of the list Delete an item from the end of the list Note: Write your code in OOP approach (write class for the concern Data Structure).
#include <iostream>
using namespace std;
class Node {
public:
int data;
Node* next;
};
@arif25169
arif25169 / Operation in a Sorted List.cpp
Created September 15, 2023 18:02
Write a program that support the following operation in a sorted list. Insert an item search an item delete item from the list Note: Write your code in OOP approach (write class for the concern Data Structure).
#include <iostream>
using namespace std;
class SortedList {
private:
int items[100]; // Fixed-size array to store sorted items
int size;
void recursiveInsert(int item, int low, int high) {
@arif25169
arif25169 / Balance Parentheses Problem.cpp
Created September 15, 2023 16:50
Write a program that determines whether a set of parentheses used in any expression or code are Balanced or Not Balanced. Input: a set of parenthesis, i.e. (()(())) Output: Balanced or Not Balanced. i.e. Balanced (for the above case)
#include <iostream>
#include <string>
using namespace std;
class ParenthesesChecker {
public:
ParenthesesChecker(const string& parentheses) : inputParentheses(parentheses) {}
bool isBalanced() {
@arif25169
arif25169 / Solve.js
Created December 13, 2020 20:05
Solution
/*
* There are some key problems with the React code below.
* Assume fetchUserProfile exists elsewhere.
*/
import React, { Suspense, useState, useEffect } from "react";
const SuspensefulUserProfile = ({ userId }) => {
const [data, setData] = useState({});
useEffect(async () => {
fetchUserProfile(userId).then((profile) => setData(profile));
@arif25169
arif25169 / Codenvy.sh
Last active March 20, 2019 17:15
Codenvy
#!/usr/bin/env bash
function program_doesnt_exist {
local return_=1
type $1 >/dev/null 2>&1 || { local return_=0; }
# return $return_ instead of printing
return $return_
}
# install nodejs
if program_doesnt_exist node; then
@arif25169
arif25169 / id_rsa.pub
Created February 25, 2019 18:37
My SSH PUB Key
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDO5M5V689SVK6WPYbSd0xeEz3JIFV73myzl7y5awUPrwYrdaZUnjPdwZVkvECWSF+z2rnRbOfigCOr9Ec6yKqHSeB3M97TA061RcW9QVaOI5K5lkyTFmNLLdldcsAOj/EVOM3OXss6SBbJNrEZgjclAADLyLED5koAKRaJTYZJyBLTu6SoD5FtwiANIDs+qAmyI90ivFcIbHPSuo30Vd0aX4Qwbi/OpaAN4xfkeMMh7Ag0hB4Tu1zksyAVmyp8WGqD4t5Bzc3BT71zMT642Gj6ysV2/VbAvl7MeU3TyEGrxFTU4XCX+aIN6+f4F8C71WAlUz7zKcD46ZBvDbJmJpbD3DXSpgpTMEsfkmOYkjv6r7Xpps5jWxzJSNuxTXyjOTec3vidmKIaGDfxm47fIMI5T55zCVbJEoChyNHHax0ylCtmd9ehx+K4dyktQbSp3tzbxGeaf88evm8L10Eut2QKTNb466SSexKA8RbrZLCFFq/f7Wq1IzlGP/u48iRloAr/4i9Dq9eBN5RfGTiCMgc6ExUr/cHEupaftC8sCfrUC0cLDmjSuIXCx7DXQ9gXUdDgf81vV1f3U4FUblcSLDgq3GsxFpx0F0yGHoLKs2dDHGkS0bzqv3Q82SXN6VaIQaeBnerl566naLoJ1qhrG6lpJbRXAG8eHHU69uOoZTRdrw== arif25169@gmail.com
@arif25169
arif25169 / Notepad++AdvancedSearch.txt
Created January 7, 2019 10:07 — forked from ramons03/Notepad++AdvancedSearch.txt
Notepad++ Advanced search and replace. Null, Enter char, Tab, Regular Expressions, Etc.
Open the find/replace dialog.
At the bottom will be some Search mode options. Select "Extended (\n \r \t \0 \x...)"
In either the Find what or the Replace with field entries, you can use the following escapes:
\n new line (LF)
\r carriage return (CR)
\t tab character
\0 null character
\xddd special character with code ddd
@arif25169
arif25169 / index.html
Created August 30, 2018 05:38
jspdf-AutoTable issue #93
<button onclick="generate()">Generate PDF</button>
<table id="table" style="display: none;">
<thead>
<tr>
<th>ID</th>
<th>First name</th>
<th>Last name</th>
<th>Email</th>
<th>Country</th>
sudo mysql -u root
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'test';
import React from 'react';
import axios from 'axios';
import ss from './ss.jpg';
import { width } from 'window-size';
class FeaturePage extends React.Component {
constructor(props) {
super(props);
this.state = {temperature: '', weather: ''};
}