Posts

merge 2

using OfficeOpenXml; using OfficeOpenXml.Style; using System; using System.IO; class Program {     static void Main()     {         // Required by EPPlus         ExcelPackage.LicenseContext = LicenseContext.NonCommercial;         string filePath = @"C:\Temp\input.xlsx";   // Input file         string outputPath = @"C:\Temp\output.xlsx"; // Output file         string sheetName = "Config"; // Target sheet         using (var package = new ExcelPackage(new FileInfo(filePath)))         {             var worksheet = package.Workbook.Worksheets[sheetName];             if (worksheet == null)             {                 Console.WriteLine($"Sheet {sheetName} not found!");         ...

mearge

using OfficeOpenXml; using OfficeOpenXml.Style; using System; using System.IO; class Program {     static void Main()     {         // EPPlus license requirement         ExcelPackage.LicenseContext = LicenseContext.NonCommercial;         string filePath = @"C:\Temp\input.xlsx";   // input file         string outputPath = @"C:\Temp\output.xlsx"; // output file         string sheetName = "Config"; // sheet name         using (var package = new ExcelPackage(new FileInfo(filePath)))         {             var worksheet = package.Workbook.Worksheets[sheetName];             if (worksheet == null)             {                 Console.WriteLine($"Sheet {sheetName} not found!");       ...

pasting

using System.Linq; using System.Text.RegularExpressions; using System.Windows; using System.Windows.Controls; using System.Windows.Input; namespace OnlyCapsNumbers {     public partial class MainWindow : Window     {         // ✅ Allowed chars: A–Z and digits         private static readonly Regex AllowedRegex = new Regex("^[A-Z0-9]$");         public MainWindow()         {             InitializeComponent();         }         // Block invalid typing         private void txtInput_PreviewTextInput(object sender, TextCompositionEventArgs e)         {             e.Handled = !AllowedRegex.IsMatch(e.Text);         }         // Sanitize pasted text (check each character)         private void txtInpu...

timeline

Here’s a structured development task breakdown for building a Wireshark C plugin that decodes payload data by calling an external API and displays it in the packet detail tree. Project Scope Create a C-based dissector plugin for Wireshark. The plugin will: Detect packets matching a custom condition (e.g., specific IP/Port or protocol signature). Extract payload data from the packet. Send this data to an external REST API for decoding. Parse the API response and display it as hierarchical fields in the Wireshark packet detail tree. Key Technical Considerations Wireshark’s dissector thread is not designed for blocking calls — calling an API directly inside packet dissection would freeze the UI. Solution: Implement an asynchronous model : Option 1: Maintain a local cache/database pre-filled from the API. Option 2: Use a background thread to fetch API data, store in memory, and refresh the view when available. Database integration (optional) — store API results in ...

Wireshark

Here’s what I found after checking Wireshark’s official capabilities and development documentation about plugin support—especially regarding integrations with databases: 1. Wireshark Plugin Support Overview Wireshark plugins are primarily used to extend protocol dissection functionality. They come in two flavors: C plugins (compiled dissectors) : Deep integration, high performance, access to Wireshark’s internal APIs and UI. Lua scripts : Easier to write and iterate faster. Great for prototyping, taps (post-dissectors), custom menus, and more . 2. Lua Extension Mechanism & Limitations Wireshark includes an embedded Lua interpreter. Supported Lua versions: Early versions: Lua 5.1 & 5.2 Wireshark 4.4 and later: Lua 5.3 & 5.4 . Lua plugins can register: Dissectors , listener taps , file readers/writers , and custom menus/statistics . Lua does not natively include any database libraries—but you can: Use require() to load shared Lua modules or C-wrappe...

hacthon

Got it — you want an ideation PPT for your AI-based document Q&A chatbot idea. I’ll make you a clear, professional slide structure you can directly put into PowerPoint or Google Slides. AI Document Q&A Chatbot – Ideation Deck Slide 1 – Title "AI-Powered Document Intelligence Chatbot" Ask Anything. Get Instant Answers from Your Documents. Image: AI + document icons Tagline: “Your PDF, Excel, Word — Now Speak Your Language” Slide 2 – Problem Statement Current Challenges Searching through long PDF, Excel, Word docs is slow and inefficient. Manual searching leads to missed information. Teams waste hours in finding the right paragraph, cell, or page. Difficult to integrate across multiple file formats. Slide 3 – Opportunity Every business works with large volumes of documents. Faster information retrieval = faster decisions. Knowledge should be instantly available to anyone in the organization. AI can bridge the gap between data storage and dat...

ok

from sentence_transformers import SentenceTransformer # Use a better embedding model embed_model = SentenceTransformer("BAAI/bge-base-en-v1.5") # larger, better accuracy embeddings = embed_model.encode(texts, normalize_embeddings=True)