Skip to content

Instantly share code, notes, and snippets.

View Jobayer-Ahmed's full-sized avatar

Jobayer Ahmed Mickey Jobayer-Ahmed

View GitHub Profile
const rowsToCols = (rows) => {
	let array = [], array2 = [];
	const makeTowDimentionalArray = (arr) => {
		const DecimalToBinary = (numb) => (numb !== Math.floor(numb) && numb < 0) ? null : parseInt(numb, 10).toString(2);
		arr.map((el, i) => {
			let arrays = DecimalToBinary(el).split('')
			let length = 16 - arrays.length;
			if (length!==0) {
 for(let i = 0; i &lt; length; i++) {
// Bubble Sort Algorithm
const bubbleSort = (arr) => {
	let changePosition;
	do {
		changePosition = false;
		arr.map((elm, i) => {
			if (elm > arr[i+1]) {
				arr[i] = arr[i+1];
				arr[i+1] = elm;
app.use((req, res, next) => {
  res.header("Access-Control-Allow-Origin", "*"); // "*" for public access and www.example.com for specific uses
  res.header(
    "Access-Control-Allow-Headers",
    "Origin, X-Requested-With, Content-Type, Accept, Authorization"
  );
  if (req.method === 'OPTIONS') {
      res.header('Access-Control-Allow-Methods', 'PUT, POST, PATCH, DELETE, GET');
 return res.status(200).json({});
@Jobayer-Ahmed
Jobayer-Ahmed / problem_template.md
Last active November 19, 2017 03:33 — forked from entrptaher/problem_template.md
Fork the snippet below and use it to create issues. This will help debugging the issue in a better way.

Steps to reproduce

Tell us about your environment:

  • Software/Script version: create-react-app
  • Platform / OS version: linux 64 bit
  • URLs (if applicable): Nai.

What steps will reproduce the problem?

Step1:

go to www.google.com and search anything.

Step2:

Open your console. activate your artoo.

Step3:

copy the code and paste it into your console.