Skip to content

Instantly share code, notes, and snippets.

View parthamk's full-sized avatar
🎯
Focusing

Partha Mallick parthamk

🎯
Focusing
View GitHub Profile
@parthamk
parthamk / Discord Nitro Code Generator Puzzle.md
Last active August 26, 2023 18:07
**Title: Discord Nitro Code Generator Puzzle**

Title: Discord Nitro Code Generator Puzzle

Problem Statement:

In a quest for Discord Nitro, you stumbled upon an intriguing challenge involving arrays and sequences. As an aspiring JavaScript problem solver, you decided to take up the challenge over the weekend. The challenge revolves around a curious array of codes that supposedly hold the key to Discord Nitro.

You are presented with an array of sample codes, each represented as a string of characters. Your goal is to decipher the hidden pattern behind these codes and create a program that generates potential Discord Nitro codes to try.

Challenge Tasks:

Before diving into Node.js and Express, it's important to have a solid understanding of some key concepts in JavaScript, as these technologies heavily rely on JavaScript for building server-side applications. Here's a list of concepts you should clear up before learning Node.js and Express:

  1. JavaScript Fundamentals:
    • Variables and Data Types
    • Operators
    • Control Structures (if statements, loops)
    • Functions
    • Scope and Closures
    • Arrays and Objects
  • ES6+ Features (Arrow Functions, Promises, async/await)
const express = require('express');
const mongoose = require('mongoose');
require('dotenv').config();
const app = express();
const port = process.env.PORT || 5000;
const mongoURI = process.env.MONGODB_URI;
// Connect
mongoose.connect(mongoURI, { useNewUrlParser: true, useUnifiedTopology: true })

Title: Naruto's Power-Up Training

Problem:

Naruto Uzumaki is determined to master the art of the "Shadow Clone Jutsu" and increase his chakra control. To do this, he plans to continuously multiply his chakra until it reaches a level where he can form 10,000 shadow clones! Help Naruto write a Java program to track his chakra growth and stop the training once he reaches his goal.

Task:

Write a Java program that simulates Naruto's chakra training, where his chakra will keep multiplying until it reaches or exceeds 10,000. Each time his chakra is multiplied, he will perform a certain hand seal and focus harder to amplify his chakra.

@parthamk
parthamk / OpenWithGitBash.reg
Created July 19, 2023 18:16
Open with git bash
Windows Registry Editor Version 5.00
; Open files
; Default Git-Bash Location C:\Program Files\Git\git-bash.exe
[HKEY_CLASSES_ROOT\*\shell\Open Git Bash]
@="Open Git Bash"
"Icon"="C:\\Program Files\\Git\\git-bash.exe"
[HKEY_CLASSES_ROOT\*\shell\Open Git Bash\command]
@="\"C:\\Program Files\\Git\\git-bash.exe\" \"--cd=%1\""
import React from 'react';
import { BrowserRouter as Router, Route, NavLink } from 'react-router-dom';
import { Slide } from 'react-slideshow-image';
import 'react-slideshow-image/dist/styles.css';
import './App.css';
const App = () => {
const cvData = {
name: 'Partha Mallick',
contactNo: '+919916680988',
@parthamk
parthamk / Main.java
Created February 12, 2023 16:55
lucky boys
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int m = scanner.nextInt();
int k = scanner.nextInt();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
@parthamk
parthamk / Main.java
Created January 22, 2023 21:19
Beautiful Paramutation
import java.io.*; // for handling input/output
import java.util.*; // contains Collections framework
// don't change the name of this class
// you can add inner classes if needed
class Main {
public static void main (String[] args) {
// Your code here
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
import React from "react";
class ErrorBoundary extends React.Component {
// state = {error:null, hasError:null}
// componentDidCatch(error, info){
// this.setState({error, hasError:info})
// }
constructor(props) {
super(props);
import java.io.*; // for handling input/output
import java.util.*; // contains Collections framework
// don't change the name of this class
// you can add inner classes if needed
class Main {
public static void main (String[] args) {
// Your code here
Scanner sc = new Scanner(System.in);
String str = sc.nextLine();