Category: Programming
All about programming
MQTT (Message Queue Telemetry Transport) is a publish subscribe messaging protocol for use on top of the TCP/IP protocol. It is designed for connections with remote locations where a small code footprint is required or the network bandwidth is limited. Mosquitto is an open-source message broker service that uses the MQTT protocol to send and […]
The Problem: You have scarce / limited resources and you want to use these in and efficient way in your Code. E.g. You can only create N objects of certain class because of its limitation in terms of Resources or Licenses, and you want to share those Objects across M Consumers. The Solution: One way […]
This Post discusses how you can add Revision Count in Posts Admin Screen in WordPress. In order to show Revision Count as a Column in Posts Page Admin Screen, add below filter and action in functions.php of your theme. // register custom column add_filter( 'manage_posts_columns', 'custom_posts_table_head' ); function custom_posts_table_head( $columns ) { $columns['revisions'] = 'Revisions'; […]
In this post I’ll show you how to add Custom Columns to WordPress Posts Management screen. Also I will show how to make those Columns Sortable. To add Columns in Posts Page in Admin Screen, add filter “manage_posts_columns” and action “manage_posts_custom_column” in functions.php of your theme. // register custom columns add_filter( 'manage_posts_columns', 'custom_manage_post_column_test' ); function […]
This Post discusses how you can track Post Views in WordPress without using Plugin by using Post Meta. Post Views can be shown in Home Page and along with the Post itself but I will show Post Views in Posts page on Admin Screen. In the end, I’ll make this column sortable. Open functions.php of […]
There are many ways to pass Data to the Partial View. I’ll discuss here method which I use in my projects which is passing Strongly Typed Model to the View. View Models public class ParentViewModel { public Id { get; set; } ..... public ChildViewModel Child { get; set; } } public class ChildViewModel { […]
There are many approaches to Generate Dynamic Navigation Menus in ASP.NET MVC Applications, in this post i will discuss one approach using ViewModels and Partial Views which I use in my Applications. First I’ll create a Hard coded Navigation then replace it with based on ViewModel. Lets say we want to create a menu like […]
When an ASP.NET MVC Application is created with “Individual Accounts” authentication, it is set to use Email address to Register and Sign in instead of User Name, so in this Post I’ll show how to use User Name to Register and Login. Open AccountViewModels.cs in Models folder, add below code in LoginViewModel and RegisterViewModel [Required] […]
In this post, I’ll demonstrate controlling couple of LEDs connected to Raspberry Pi GPIO from Web. LEDs could be replaced with any devices so its a kind of basic IoT project too, so this core design can be extended to any scale and many devices can be controlled simultaneously. Programming is done in Python and […]
Sometimes you need APK file from the Android device. Easiest way is to use ADB. You need to connect android device to computer and have the required drivers of Android device installed along with Android SDK tools. Run below command to display all the packages installed on your device. adb shell pm list packages Find […]