Category: Programming

  • Javascript Base64 Encode, Decode for UTF-8/unicode string

    Complete article that works for me : https://developer.mozilla.org/en-US/docs/Web/JavaScript/Base64_encoding_and_decoding  Part where we encode from unicode/utf-8 is function utf8_to_b64( str ) { return window.btoa(unescape(encodeURIComponent( str ))); } function b64_to_utf8( str ) { return decodeURIComponent(escape(window.atob( str ))); } // Usage: utf8_to_b64(‘✓ à la mode’); // “4pyTIMOgIGxhIG1vZGU=” b64_to_utf8(‘4pyTIMOgIGxhIG1vZGU=’); // “✓ à la mode”  This is one of most used thing…

  • C#: Code to load Object from Database

    It is often when managing old project that do not use ORM coding, we need to load object from database. In such scenarios it is quite boring to code all 30-40 property to load from DB. So, I wrote this simple code which does it quite well for me, the only catch is you need…

  • Some Cool WordPress Plugin

    Lately, I got lot of wordpress site, that were not just blog or business website. But they are ecommerce, Restaurant Ordering, Video streaming and much more. Been a developer I always remain engage in making some sort of plugin for them. Though following list of plugin assist me a big time in saving time to…

  • Reading Large Binary Files: Child Play

    Yes, that was funny title, but after your experience it you will agree to me. So, here is the story. I have been working on a software that read some recording from hardware device to database, we have 45 records per second for 30 days, so it is about 30x24x60x60 record entry with 45 columns…

  • Self Hosted Web Service: WebServiceHost

    So today I learn about WebServiceHost. Just a normal class but it does a lot for me today. This host the web service within you Desktop/Windows Service application. i.e. you don’t need to install any Web server or other stuff, just create a Service Contract Class and use WebServiceHost to host it within your application. …

  • WPF ComboBox: DataBinding with DataTable

    Well it seems easy thing, but it took a while for me to get it working. Frankly I still don’t know why it works this way, but at least it works. With WPF I was expecting something as easy as giving DataTable object to ComboBox by it’s property and define the Data Field and Value…

  • MDI Window: C# way

    So how can we make MDI Parent and Child Window in C#. The answer I found was that there is nothing inbuilt for it. So, I have two choice, either I modify the Window class and add MDI [Multiple Document Interface] coding in them or I found a alternative interface.  It took less than 5…