Friday 21 June 2024

free screen recorder tool

 <!DOCTYPE html>

<html lang="en">

<head>

    <meta charset="UTF-8">

  &nbs <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>Screen Recorder Tool</title>

    <link rel="stylesheet" href="styles.css">

</head>

<body>

    <div class="container">

        <h1>Screen Recorder Tool</h1>

        <div class="controls">

            <button id="startBtn">Start Recording</button>

            <button id="stopBtn" disabled>Stop Recording</button>

            <button id="downloadBtn" disabled>Download Recording</button>

        </div>

        <video id="videoPreview" controls></video>

    </div>


    <script src="https://cdn.webrtc-experiment.com/RecordRTC.js"></script>

    <script src="script.js"></script>

</body>

</html>


body { font-family: Arial, sans-serif; background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; color: #333; } .container { background: white; padding: 20px; border-radius: 10px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); text-align: center; width: 100%; max-width: 600px; } h1 { margin-bottom: 20px; color: #ff7e5f; } .controls { margin-bottom: 20px; } button { background-color: #ff7e5f; color: white; border: none; padding: 10px 20px; margin: 5px; border-radius: 5px; cursor: pointer; transition: background-color 0.3s; } button:disabled { background-color: #ccc; cursor: not-allowed; } button:hover:not(:disabled) { background-color: #eb6d4e; } video { width: 100%; border-radius: 10px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); } const startBtn = document.getElementById('startBtn'); const stopBtn = document.getElementById('stopBtn'); const downloadBtn = document.getElementById('downloadBtn'); const videoPreview = document.getElementById('videoPreview'); let recorder; let recordedBlobs; startBtn.addEventListener('click', async () => { startBtn.disabled = true; stopBtn.disabled = false; const stream = await navigator.mediaDevices.getDisplayMedia({ video: true, audio: true }); videoPreview.srcObject = stream; videoPreview.play(); recorder = new RecordRTC(stream, { type: 'video' }); recorder.startRecording(); }); stopBtn.addEventListener('click', () => { stopBtn.disabled = true; downloadBtn.disabled = false; startBtn.disabled = false; recorder.stopRecording(() => { const blob = recorder.getBlob(); recordedBlobs = blob; videoPreview.src = URL.createObjectURL(blob); videoPreview.srcObject = null; videoPreview.play(); }); let tracks = videoPreview.srcObject.getTracks(); tracks.forEach(track => track.stop()); }); downloadBtn.addEventListener('click', () => { if (recordedBlobs) { const url = URL.createObjectURL(recordedBlobs); const a = document.createElement('a'); a.style.display = 'none'; a.href = url; a.download = 'recording.webm'; document.body.appendChild(a); a.click(); setTimeout(() => { document.body.removeChild(a); URL.revokeObjectURL(url); }, 100); } });

Saturday 15 June 2024

WORD AND CHARACTER COUNTER

Word and Character Counter

Word and Character Counter

Words: 0

Characters: 0

/* styles.css */ body { font-family: Arial, sans-serif; background-color: #f0f0f0; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; height: 100vh; } .container { background-color: #ffffff; padding: 20px; border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); width: 90%; max-width: 600px; text-align: center; } h1 { color: #333333; } textarea { width: 100%; height: 150px; padding: 10px; border: 1px solid #dddddd; border-radius: 5px; font-size: 16px; margin-bottom: 20px; } .counts { display: flex; justify-content: space-between; } p { font-size: 18px; margin: 0; } span { font-weight: bold; } // script.js document.getElementById('text-input').addEventListener('input', updateCounts); function updateCounts() { const text = document.getElementById('text-input').value; const wordCount = countWords(text); const charCount = countCharacters(text); document.getElementById('word-count').innerText = wordCount; document.getElementById('char-count').innerText = charCount; } function countWords(text) { const words = text.trim().split(/\s+/); return words.filter(word => word.length > 0).length; } function countCharacters(text) { return text.length; }

JPG and PNG convertor

JPG and PNG Converter

JPG and PNG Converter

Converted Image:

Download
/* styles.css */ body { font-family: Arial, sans-serif; background-color: #f0f0f0; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; height: 100vh; } .container { background-color: #ffffff; padding: 20px; border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); width: 90%; max-width: 600px; text-align: center; } h1 { color: #333333; } .converter { margin: 20px 0; } input[type="file"] { margin: 10px 0; } select { padding: 10px; margin: 10px 0; border: 1px solid #dddddd; border-radius: 5px; font-size: 16px; } button { background-color: #007bff; color: #ffffff; padding: 10px 20px; border: none; border-radius: 5px; font-size: 16px; cursor: pointer; } button:hover { background-color: #0056b3; } .output { margin-top: 20px; } h2 { color: #333333; } canvas { border: 1px solid #dddddd; border-radius: 5px; margin-top: 10px; } #download-link { display: inline-block; margin-top: 10px; padding: 10px 20px; background-color: #28a745; color: #ffffff; text-decoration: none; border-radius: 5px; } #download-link:hover { background-color: #218838; } // script.js document.getElementById('convert-button').addEventListener('click', convertImage); function convertImage() { const input = document.getElementById('image-input').files[0]; const format = document.getElementById('format-select').value; if (!input) { alert('Please select an image file.'); return; } const reader = new FileReader(); reader.onload = function(event) { const img = new Image(); img.onload = function() { const canvas = document.getElementById('output-canvas'); const ctx = canvas.getContext('2d'); canvas.width = img.width; canvas.height = img.height; ctx.drawImage(img, 0, 0); let convertedImage; if (format === 'png') { convertedImage = canvas.toDataURL('image/png'); } else { convertedImage = canvas.toDataURL('image/jpeg'); } document.getElementById('download-link').href = convertedImage; document.getElementById('download-link').download = `converted-image.${format}`; } img.src = event.target.result; } reader.readAsDataURL(input); }

IFSC CODE CHECKER

import re # A dictionary of some example banks and their codes banks = { "HDFC": "HDFC Bank", "ICIC": "ICICI Bank", "SBIN": "State Bank of India", "PUNB": "Punjab National Bank" } def is_valid_ifsc(ifsc_code): # Check the length if len(ifsc_code) != 11: return False, "IFSC code must be 11 characters long." # Check the format using regex if not re.match(r'^[A-Z]{4}0[A-Z0-9]{6}$', ifsc_code): return False, "IFSC code format is incorrect." # Check the bank code bank_code = ifsc_code[:4] if bank_code not in banks: return False, "Invalid bank code." # Assuming branch code validation requires a real database of branch codes # For simplicity, we'll skip this step return True, "Valid IFSC code." # Example usage ifsc_code = "HDFC0001234" is_valid, message = is_valid_ifsc(ifsc_code) print(message)

LANGUAGE TRANSLATOR TOOL

Language Translator Tool

Language Translator Tool

Translation:

/* styles.css */ body { font-family: Arial, sans-serif; background-color: #f0f0f0; margin: 0; padding: 0; display: flex; justify-content: center; align-items: center; height: 100vh; } .container { background-color: #ffffff; padding: 20px; border-radius: 10px; box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); width: 90%; max-width: 600px; text-align: center; } h1 { color: #333333; } .translator { margin: 20px 0; } textarea { width: 100%; height: 100px; padding: 10px; border: 1px solid #dddddd; border-radius: 5px; font-size: 16px; } select { padding: 10px; margin: 10px 0; border: 1px solid #dddddd; border-radius: 5px; font-size: 16px; } button { background-color: #007bff; color: #ffffff; padding: 10px 20px; border: none; border-radius: 5px; font-size: 16px; cursor: pointer; } button:hover { background-color: #0056b3; } .output { margin-top: 20px; } h2 { color: #333333; } #output-text { background-color: #f9f9f9; padding: 10px; border: 1px solid #dddddd; border-radius: 5px; min-height: 50px; text-align: left; white-space: pre-wrap; } // script.js document.getElementById('translate-button').addEventListener('click', translateText); function translateText() { const text = document.getElementById('input-text').value; const targetLang = document.getElementById('language-select').value; if (text.trim() === "") { alert("Please enter some text to translate."); return; } const url = `https://api.mymemory.translated.net/get?q=${encodeURIComponent(text)}&langpair=en|${targetLang}`; fetch(url) .then(response => response.json()) .then(data => { if (data.responseData) { document.getElementById('output-text').innerText = data.responseData.translatedText; } else { document.getElementById('output-text').innerText = "Translation failed."; } }) .catch(error => { console.error('Error:', error); document.getElementById('output-text').innerText = "An error occurred."; }); }

WORD PAD TEXT EDITOR

import tkinter as tk from tkinter import filedialog, messagebox class WordPad: def __init__(self, root): self.root = root self.root.title("Word Pad") self.root.geometry("800x600") # Initialize the text area self.text_area = tk.Text(self.root, undo=True) self.text_area.pack(fill=tk.BOTH, expand=1) # Initialize the menu bar self.menu_bar = tk.Menu(self.root) self.root.config(menu=self.menu_bar) # File menu self.file_menu = tk.Menu(self.menu_bar, tearoff=0) self.menu_bar.add_cascade(label="File", menu=self.file_menu) self.file_menu.add_command(label="New", command=self.new_file) self.file_menu.add_command(label="Open", command=self.open_file) self.file_menu.add_command(label="Save", command=self.save_file) self.file_menu.add_command(label="Save As", command=self.save_as_file) self.file_menu.add_separator() self.file_menu.add_command(label="Exit", command=self.root.quit) # Edit menu self.edit_menu = tk.Menu(self.menu_bar, tearoff=0) self.menu_bar.add_cascade(label="Edit", menu=self.edit_menu) self.edit_menu.add_command(label="Undo", command=self.text_area.edit_undo) self.edit_menu.add_command(label="Redo", command=self.text_area.edit_redo) self.edit_menu.add_separator() self.edit_menu.add_command(label="Cut", command=self.cut_text) self.edit_menu.add_command(label="Copy", command=self.copy_text) self.edit_menu.add_command(label="Paste", command=self.paste_text) # Help menu self.help_menu = tk.Menu(self.menu_bar, tearoff=0) self.menu_bar.add_cascade(label="Help", menu=self.help_menu) self.help_menu.add_command(label="About", command=self.show_about) self.file_path = None def new_file(self): self.text_area.delete(1.0, tk.END) self.file_path = None def open_file(self): self.file_path = filedialog.askopenfilename(filetypes=[("Text Files", "*.txt"), ("All Files", "*.*")]) if self.file_path: with open(self.file_path, "r") as file: self.text_area.delete(1.0, tk.END) self.text_area.insert(tk.END, file.read()) def save_file(self): if self.file_path: with open(self.file_path, "w") as file: file.write(self.text_area.get(1.0, tk.END)) else: self.save_as_file() def save_as_file(self): self.file_path = filedialog.asksaveasfilename(defaultextension=".txt", filetypes=[("Text Files", "*.txt"), ("All Files", "*.*")]) if self.file_path: with open(self.file_path, "w") as file: file.write(self.text_area.get(1.0, tk.END)) def cut_text(self): self.text_area.event_generate("<>") def copy_text(self): self.text_area.event_generate("<>") def paste_text(self): self.text_area.event_generate("<>") def show_about(self): messagebox.showinfo("About", "Word Pad\nCreated using Tkinter") if __name__ == "__main__": root = tk.Tk() app = WordPad(root) root.mainloop()