CᴏᴅɪɴɢNᴇʀᴅ 💸🐾
99 subscribers
118 photos
3 videos
15 files
40 links
༗ हरे कृष्णा ༗
"Lost in my own cosmos 💫 | Coding Need Patience 🥀🐾"

❝Face the failure, Until the Failure fails to face you.❞

— Dreamer

» ChikuX69.netlify.app «

DM ? " @ChikuXBot " : 404;
Download Telegram
Day 13👾:
You are given an integer array arr[]. Your task is to find the smallest positive number missing from the array.

Note: Positive number starts from 1. The array can have negative integers too.
🔥3👏2👍1
» Random Password Generator using Tailwind

Random Password Generator is a web application that allows users to create secure passwords based on their preferences. It is built using HTML, TailwindCSS, and JavaScript.


NOTE: To setup Tailwindcss in your pc follow these instructions.


› Here's HTML Code of it.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Random Password</title>
<link rel="stylesheet" href="style.css">
<link rel="shortcut icon" href="icon.png" type="image/x-icon">
</head>
<body class="p-0 m-0 h-[100vh] w-full grid place-content-center justify-items-center place-items-center text-white bg-blue-400">
<div class="bg-slate-400 h-[95vh] w-[97vw] rounded-2xl flex justify-center items-center">
<div class="bg-slate-600 h-[18rem] w-[25rem] rounded-xl border-b-black p-2 text-center">
<h1 class="font-extrabold font-serif mt-1 select-none cursor-default">
Random Password Generator
</h1>
<div class="h-fit flex justify-center items-center flex-col border-black border-2 m-5 rounded-xl">
<div class="p-2 h-[4rem] border border-black w-[95%] mt-2 rounded-t-xl rounded-b-md flex justify-center items-center">
<code id="pass-gen" class="select-none"></code>
</div>
<div class="mt-1 mb-2 rounded-b-xl rounded-t-md p-2 w-[95%] h-fit border-black border cursor-pointer active:scale-95 hover:bg-gray-500 hover:border-green-300 transition duration-200 ease-in-out" id="copy-item">
<h2 class="font-semibold font-sans select-none">
Copy
</h2>
</div>
</div>
<div class="flex justify-center items-center m-2 select-none">
<div class="px-2 cursor-pointer select-none">
<input type="checkbox" name="Alphabet" id="alphabets" class="cursor-pointer">
<label for="alphabets" class="cursor-pointer select-none">Alphabets</label>
</div>
<div class="px-2 cursor-pointer select-none">
<input type="checkbox" name="Numbers" id="numbers" class="cursor-pointer">
<label for="numbers" class="cursor-pointer select-none">Numbers</label>
</div>
<div class="px-2 cursor-pointer select-none">
<input type="checkbox" name="Symbols" id="symbols" class="cursor-pointer">
<label for="symbols" class="cursor-pointer select-none">Symbols</label>
</div>
</div>
<div class="flex justify-center items-center">
<div class="h-fit w-[90%] p-2 font-bold rounded-3xl bg-green-600 cursor-pointer text-black select-none active:scale-95 hover:bg-green-500 transition duration-200 ease-in-out" id="generate-button">
Generate
</div>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>


• For Full Code Here
• Demo Website is Here


@NotCoding | @CodesSnippet

Happy Coding 👨‍💻
👍2🔥2🫡2👏1
Day 14👾:
Given a string s, the objective is to convert it into integer format without utilizing any built-in functions. Refer the below steps to know about atoi() function.

Cases for atoi() conversion:

1. Skip any leading whitespaces.
2. Check for a sign (‘+’ or ‘-‘), default to positive if no sign is present.
3. Read the integer by ignoring leading zeros until a non-digit character is encountered or end of the string is reached. If no digits are present, return 0.
4. If the integer is greater than 2**31 – 1, then return 2**31 – 1 and if the integer is smaller than -231, then return -231.
👍4🔥3
Day 15👾:
Given two binary strings s1 and s2 consisting of only 0s and 1s. Find the resultant string after adding the two Binary Strings.
Note: The input strings may contain leading zeros but the output string should not have any leading zeros.
3👍2👏2
° Telegram Formatting °

Telegram supports text formatting in messages using Markdown or HTML. This allows you to style your messages with bold, italic, links, inline code, and more.


› Formatting in HTML


1. Bold
<b>Bold Text</b>


<strong>bold</strong>


2. Italic
<i>Italic Text</i>


<em>italic</em>


3. Underline
<u>Underline Text</u>


4. Monospace
<code>Monospace Text<code>


5. Spoiler
<spoiler>Spoiler Text</spoiler>


6. Strikethrough
<s>Strikethrough Text</s>


<strike>strike</strike>


<del>strike</del>


7. URL or Link
<a href="https://telegram.me/NotCoding">text URL</a>


8. Inline Mention
<a href="tg://user?id=5217486447">inline mention</a>


9. Emoji
<emoji id="123456789abcdef">🐱</emoji>


10. Pre Formatted
<pre>pre-formatted</pre>


11. Pre Formatted(Specified Language)
<pre language="python">pre-formatted</pre>


12. Quote or Blockquote
<blockquote>Quoted text</blockquote>


@NotCoding | @CodesSnippet

Happy Coding 👨‍💻
🔥2🐳21🌚1
Day 16👾:
Given two strings s1 and s2 consisting of lowercase characters. The task is to check whether two given strings are an anagram of each other or not. An anagram of a string is another string that contains the same characters, only the order of characters can be different. For example, "act" and "tac" are an anagram of each other. Strings s1 and s2 can only contain lowercase alphabets.

Note: You can assume both the strings s1 & s2 are non-empty.
🔥4👍2
° Telegram Formatting °

Telegram supports text formatting in messages using Markdown or HTML. This allows you to style your messages with bold, italic, links, inline code, and more.


Formatting in HTML


› Formatting in MARKDOWN


1. Bold
**bold**


2. Italic
__italic__


3. Underline
--underline--


4. Monospace
`inline fixed-width code`


5. Spoiler
||spoiler||


6. Strikethrough
~~strike~~


7. URL or Link
[text URL](https://telegram.me/NotCoding)


8. Inline Mention
[text user mention](tg://user?id=5217486447)


9. Pre Formatted
```
pre-formatted```


10. Quote or Blockquote
> Quoted text


@NotCoding | @CodesSnippet

Happy Coding 👨‍💻
👍2🔥2🕊2👏1
Day 17👾:
Given a string s consisting of lowercase Latin Letters. Return the first non-repeating character in s. If there is no non-repeating character, return '$'.
Note: When you
return '$' driver code will output -1.
🔥3👍2👏1
All the best to me 😂
Exam Time 🫠 17 Dec - 20 Dec
🔥2🗿2👍1🥰1😢1
Day 18👾:
Given two strings, one is a text string txt and the other is a pattern string pat. The task is to print the indexes of all the occurrences of the pattern string in the text string. Use 0-based indexing while returning the indices.
Note: Return an empty list in case of no occurrences of pattern.
2🔥2🏆2👍1
Day 19👾:
Given a string s, the task is to find the minimum characters to be added at the front to make the string palindrome.

Note: A palindrome string is a sequence of characters that reads the same forward and backward.
👍2🔥2👏21
• Simple Button Effects •

› Simple button with filling effect using HTML and CSS


• HTML
<button class="btn">
<span>
Hover Me
</span>
</button>


• CSS
html,
body {
display: flex;
justify-content: center;
align-items: center;
background-color: #2b2b2b;
height: 100%;
}

.btn {
background-color: #ffffff;
transform: scale(2);
border: none;
color: #000000;
border-radius: 5px;
overflow: hidden;
position: relative;
z-index: 1;
font-family: cursive;
transition: all 1s ease-in-out;
}

.btn::after {
content: "";
background-image: linear-gradient(
45deg,
#4ea8de,
#48bfe3,
#56cfe1,
#64dfdf,
#72efdd,
#80ffdb
);
height: 100%;
width: 0;
position: absolute;
bottom: 0;
left: 0;
z-index: 0;
transition: all 1s ease-in-out;
}

.btn:hover::after {
width: 100%;
}

.btn:hover {
box-shadow: 0px 0px 10px #4ea8de, 0px 0px 10px #48bfe3, 0px 0px 10px #56cfe1,
0px 0px 10px #64dfdf;
}

.btn span {
position: relative;
z-index: 2;
}


For demo visit Here


· Go and check and add more effect using your knowledge and share (●'◡'●)


@NotCoding | @CodesSnippet

Happy Coding 👨‍💻
🔥73👍3🎉3🆒2🕊1💋1
GitHub releases the free version of GitHub Copilot 👾🥳


• Check it out!!
Copilot Chat

VS Code extension for copilot


@NotCoding | @CodesSnippet

Happy Coding 👨‍💻
🔥98👍6🎉4🤯1💘1
Day 20👾:
You are given two strings of equal lengths, s1 and s2. The task is to check if s2 is a rotated version of the string s1.

Note: The characters in the strings are in lowercase.
🔥2🐳2👍1💯1
Day 21👾:
Given an array arr[] containing only 0s, 1s, and 2s. Sort the array in ascending order.
👍2🔥21💋1
° Ages of Operating Systems👾 °

📂 Windows 11 (3 years old)
🪟 Windows 10 (8 years old)
🍎 macOS Yosemite (10 years old)
🐉 Kali Linux (11 years old)
💻 Windows 8 (12 years old)
🌐 Manjaro (11 years old)
💻 Windows 7 (14 years old)
🖥️ Windows Vista (17 years old)
🌿 Linux Mint (18 years old)
🐧 Ubuntu (20 years old)
⚙️ Fedora (20 years old)
🔧 OpenSUSE (20 years old)
⚙️ CentOS (20 years old)
🐧 Arch Linux (22 years old)
🍏 macOS (22 years old)
💻 Windows XP (23 years old)
🖥️ Windows 2000 (24 years old)
📱 Windows 98 (25 years old)
🌍 Windows 95 (28 years old)
💻 Windows 3.1 (29 years old)
🖥️ OS/2 (32 years old)
🐧 Debian (31 years old)
🔴 Red Hat Linux (30 years old)
🎮 AmigaOS (34 years old)
🖥️ Xenix (40 years old)
📀 VMS (44 years old)
💾 MS-DOS (42 years old)
💾 CP/M (49 years old)
🖥️ Unix (54 years old)


Created By :- The Coding Wizard


@NotCoding | @CodesSnippet

Happy Coding 👨‍💻
6🔥5👍3🎉2🕊2
Day 22👾:
Given an integer array citations[], where citations[i] is the number of citations a researcher received for the ith paper. The task is to find the H-index.

H-Index is the largest value such that the researcher has at least H papers that have been cited at least H times.
🔥2👏21👍1
Number Guessing Game

A number guessing game that will give you infinite chance to guess correct number generated by system, and it will count the number of attempts taken by you!!
Let's test it, and have fun!
This is only for fun and for knowledge on error handling, loops, conditionals operators, etc.

Code:
import time
import random

def number_guessing():
comp = random.randint(0, 10)

count = 1
while True:
try:
user_input = int(input("You: "))
if user_input == comp:
print(f"\nCongratulations, You win!!\nThe number is {comp}\nYour number of attempt is {count}")
break
elif user_input > comp:
print("Think smaller number")
count += 1
elif user_input < comp:
print("Think Bigger number")
count += 1
except:
print(f"Invalid input")

def main():
name = input("Enter your name: ")
welcome_msg = f"Hey {name}, This is number guessing gamee developed by Chiku!\nTry it!\nYou have to guess a number from 0 to 10. I'll calculate the number of attempts taken by you!!\nLet's Have fun.\n"
for char in welcome_msg:
print(char, end='', flush=True)
time.sleep(0.05)
print()
number_guessing()


if __name__ == "__main__":
main()


› Try it and do improvement if you have better idea, use your knowledge 🧑‍💻❣️


@NotCoding | @CodesSnippet

Happy Coding 👨‍💻
2👍2🐳2👏1
Are You Feeling Lucky? Try This Python Number Guessing Game! 😁

› Implementation of number guessing game in telegram bot using Pyrofork (a fork repository of pyrogram official)


NOTE: Make sure you created a virtual environment before trying this if you trying in your local mechanic of your existing Pyrogram bot.

If you don't know how to create virtual environment then follow this post on
creation of virtual environment!


· Requirements
pip install pyrofork



· Code (main.py)
from pyrogram import Client, filters
from pyrogram.types import Message, KeyboardButton, ReplyKeyboardMarkup
import random

app = Client(
'bot',
api_id=18551492,
api_hash='9046713fdc162e06212f23e0e2047b4b',
bot_token=''
)

@app.on_message(filters.command('start'))
async def game(client, m: Message):
welcome_msg = f"Hey {m.from_user.first_name}, This is number guessing gamee developed by Chiku!\nTry it!\nYou have to guess a number from 0 to 10. I'll calculate the number of attempts taken by you!!\nLet's Have fun.\n"

button = ReplyKeyboardMarkup(
[
[KeyboardButton("Gamee")]
],
resize_keyboard=True
)
await m.reply(
welcome_msg,
reply_markup=button
)


@app.on_message(filters.regex('Gamee'))
async def gamee(client, m: Message):
comp = random.randint(0, 10)
count = 1
await m.reply("Best of luck buddy!")
while True:
try:
user_input = await client.ask(m.chat.id, "Guess The number: ")
user_input = int(user_input.text)
if user_input == comp:
await m.reply(f"\nCongratulations, You win!!\nThe number is {comp}\nYour number of attempt is {count}")
break
elif user_input > comp:
await m.reply("Think smaller number!")
count += 1
elif user_input < comp:
await m.reply("Think Bigger number!")
count += 1
except:
await m.reply("Invalid Input, Please give a valid number from 0 to 10!")


print("Bot Polling..")
app.run()


· Try to implement and try if you can improvee🧑‍💻


@NotCoding | @CodesSnippet

Happy Coding 👨‍💻
👍7🔥43🎉3🍾1👾1
Day 23👾:
Given an array of integers arr[]. Find the Inversion Count in the array.
Two elements
arr[i] and arr[j] form an inversion if arr[i] > arr[j] and i < j.

Inversion Count
:
For an array, inversion count indicates how far (or close) the array is from being sorted. If the array is already sorted then the inversion count is 0.
If an array is sorted in the reverse order then the inversion count is the maximum.
2👍2👏2