Wednesday, January 18, 2023

How to make money online

 There are many ways to make money online, some of which include:


Selling products or services: You can create and sell your own products, such as handmade goods, digital products like e-books, or services like tutoring or web development.

Affiliate marketing: You can promote other people's products and earn a commission for each sale that you generate.

Advertising: You can monetize your website or blog by displaying ads and earning money for each click or impression.

Online tutoring or consulting: You can offer your expertise in a particular field and provide online tutoring or consulting services.

Online trading: You can buy and sell stocks, cryptocurrency or other assets through online trading platforms

Online Surveys and Pay-per-click (PPC): You can participate in online surveys and get paid for your opinions or get paid for visiting websites.

Online Gambling: You can play casino games or bet on sports online.

Online freelancing: You can offer your skills as a freelancer on platforms like Upwork, Fiverr or PeoplePerHour


It's important to note that making money online requires effort, patience and sometimes a significant amount of time, it's not a get rich quick scheme. Also, before starting with any of the above options, you should research and make sure the method you choose is legal and feasible in your area.




Uses of Artificial Intelligence

Artificial intelligence (AI) has the potential to transform many industries and aspects of our lives. Some examples of how AI may be used in the future include:

Healthcare: AI-powered diagnostic tools, personalized medicine, and virtual care providers.

Transportation: Self-driving cars, drones, and smart traffic management systems.

Finance: Fraud detection, financial forecasting, and personalized investment advice.

Manufacturing: Predictive maintenance, process optimization, and quality control.

Retail: Personalised product recommendations, automated customer service, and inventory management.

Energy: Predictive maintenance of renewable energy systems, optimizing energy consumption, and smart grid management.

Cyber security: Threat detection, intrusion prevention, and incident response.

Agriculture: Precision farming, crop monitoring, and weather forecasting.

Education: Adaptive learning, personalized tutoring, and automated assessment.

Robotics: Humanoid robots, drones, and other devices that can perform tasks autonomously.

These are just a few examples of how AI can be used in the future. With the development of AI, it's likely that we will see many new and unexpected applications for this technology in the coming years.




Top Technologies in 2023

 It is difficult to predict exactly which technologies will be the most prominent in 2023, as the tech landscape is constantly evolving. However, some areas that are likely to see significant advancement and adoption in the next few years include:

  1. Artificial intelligence and machine learning, which are already being used in a wide range of industries and are expected to become even more prevalent in the coming years.
  2. 5G networks, which will enable faster internet speeds and more reliable connections, making possible new applications and services.
  3. Internet of Things (IoT), as more and more devices are connected to the internet and can communicate with each other.
  4. Blockchain, which is expected to have a wide range of applications beyond just cryptocurrency, such as supply chain management, digital identity, and more.
  5. Quantum computing, which is still in its infancy but has the potential to revolutionise fields such as cryptography, drug discovery, and materials science.
  6. Virtual and augmented reality, which have the potential to change how we interact with computers and the world around us.

Thursday, April 13, 2017

FTP ERROR: 530 USER CANNOT LOG IN, HOME DIRECTORY INACCESSIBLE

Recently trying to connect my new website from FTP and facing this error. Tried a number of things but did not worked.

At last I checked out that I am using the IP of hosting server and not of my website assigned IP. I just changed the IP which is showing against my website and it worked perfectly fine. Hope it helps anyone having this issue.

Tuesday, September 20, 2016

Intellisense in Visual Studio Package Manager Console

I think most of the people know about this but for information "TAB" key can be used to get intellisense help whenever needed.

Normally following commands have been used too often while using Package Manager Console.

Installing a Package:
Install-Package PackageName -Version versionNo

Uninstalling a Package:
Unintsall-Package PackageName -Force

-Force parameter can be used if you want to keep other dependent references for a package like in case of installing a newer version of a package.

Enabling Code First Migrations:
Enable-Migrations

This command can be used to enable code first migrations. Migrations folder gets created in the project which contains a Configuration.cs file having a Seed function and contains all the migration files whenever created.

Code First Migration Commands:
These commands can be found at this post: Code First Migration Commands

Let me know if need any further commands information.

Friday, June 5, 2015

Filezilla: The data connection could not be established: ETIMEDOUT - Connection attempt timed out

I am trying to connect with one of my website from FileZilla and I am getting the following error:

"The data connection could not be established: ETIMEDOUT - Connection attempt timed out"

I have tried many solutions but no solution has been found.

How to Fix:

At last I was able to figure out this issue which was an issue with Ftp connection settings. In FileZilla menu bar click on File=>SiteManager. Below is the image which shows what option needs to be selected in Site Manager:

Select "Only use plain FTP(insecure)" option from Encryption drop down selection.




Wednesday, January 30, 2013

Windows Service: Starting a Service on Installation

I have been working on a Window Service project and I need to start the service after it gets installed since I need to manually run it after installation. This is very frustrating for me since I have been testing the service also.

So I have found the following solution which I am going to share with you which solved my problem and Service gets started after installation.

Below is the code for the Installer class which I have used in my Service project:

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;
using System.ServiceProcess;


namespace Service
{
    [RunInstaller(true)]
    public partial class ProjectInstaller : System.Configuration.Install.Installer
    {
        public ProjectInstaller()
        {
            InitializeComponent();
            this.AfterInstall += new InstallEventHandler(ProjectInstaller_AfterInstall);
        }

        void ProjectInstaller_AfterInstall(object sender, InstallEventArgs e)
        {
            ServiceController sc = new ServiceController(serviceInstaller1.ServiceName);
            sc.Start();
        }

        

    }
}

Hope this will help to resolve such issue.


ASP.Net: Html Text at End of Downloaded File

I am having this issue a few days ago which is quite strange for me since I am new to development in ASP.Net and I have shifted from Windows Application Development in .Net.

Issue:
The issue is when you save a file from any webpage then some html text gets appended with the file which some times makes the file corrupt.

The code which I am using in order to save the file is shown below:

FileStream fStream = new FileStream("C://1.pdf", FileMode.Open, FileAccess.Read);
long FileSize = fStream.Length;

byte[] Buffer = new byte[(int)FileSize];
fStream.Read(Buffer, 0, (int)FileSize);
fStream.Close();

Response.Buffer = true;
Response.Clear();
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment; filename=Output.pdf");
Response.BinaryWrite(Buffer);
Response.Flush();

Solution:
The solution is really simple which I got from google search.

The working code is shown below:

FileStream fStream = new FileStream("C://1.pdf", FileMode.Open, FileAccess.Read);
long FileSize = fStream.Length;

byte[] Buffer = new byte[(int)FileSize];
fStream.Read(Buffer, 0, (int)FileSize);
fStream.Close();

Response.Buffer = true;
Response.Clear();
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment; filename=Output.pdf");
Response.BinaryWrite(Buffer);
Response.End();

The only issue is with the Response.Flush() line which I use often when working as a Desktop developer. But with web its not the case. So we have to call Response.End() and should not call Response.Flush().

Hope many will get benefit from this.

Saturday, January 26, 2013

CSS: Comments

All comments begin with a forward slash and asterisk (/*), and end with the
asterisk followed by the forward slash (*/). This is a very simple and easy to remember method
that you may prefer to use in more complicated or important styles.


Example:
/* Default styling for paragraphs */
p {
color: #F00;
font-size: 12px;
}
/* Make all top-level headings gray and 16px high */
h1 {
color: #333;
font-size: 16px;
}


Another method preferred by many designers further highlights the rule by adding a dashed line
with the comment a great way of carving up the style sheet and making it more visually
manageable.

Example:
/* Default styling for paragraphs
-------------------------------------------------------- */
p {
color: #F00;
font-size: 12px;
}

Friday, January 25, 2013

CSS: Defining a Style

CSS syntax is made up of the following entities:
  1. Selector (the element or tag you wish to control)
  2. Property
  3. Value

Example:
Below I am going to show an example in order to illustrate the style better.

body{
padding: 10px;
}

body - Selector
padding - Property
10px - Value

Always place a semicolon at the end of a property.

Hope you have got a better idea of the entities involved in CSS style.

 

Book: Beginning CSS Web Development


Few days ago I came accross this nice book on CSS which I found very much useful and I have learned a lot from it. Although I am a software devleoper myself but I am not a designer but I always feel lack of good designing capabilities and abilities in me. Although I tried a lot to learn how to design a website but I was not able to do so. The main reason is that I have not found any useful resource which will help me right from the beginning to advance level. But this book helped me a lot and now feel I have better understanding of CSS then before.

I want to share the basic topics which are covered in this book. Table of contents section is shown below. Hope you will got a better idea of what the book covers and if you want to read this book then you can pick it up.

Table of Contents:

PART 1 ■ ■ ■ Get to Know CSS
■CHAPTER 1 Getting Started . . . . . . . . . . .  . . . . . . . . . . . . . . . . . 3
■CHAPTER 2 Core Concepts of CSS . . . . . . . . .. . . . . . . . . . . . . . . . . 17
■CHAPTER 3 CSS Building Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . 39
■CHAPTER 4 Text . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . 55
■CHAPTER 5 Color, Backgrounds, and Images . . . .. . . . . . . . . . . . . . . . . 79
■CHAPTER 6 Lists . . . . . . . . . . . . . . . .  . . . . . . . . . . . . . . . . 103
■CHAPTER 7 Links . . . . . . . . . . . . . . . .  . . . . . . . . . . . . . . . . 129
■CHAPTER 8 Tables and Definition Lists . . . . .  . . . . . . . . . . . . . . . . 145
■CHAPTER 9 Forms . . . . . . . . . . . . . . . .  . . . . . . . . . . . . . . . . 167

PART 2 ■ ■ ■ Logical Layouts
■CHAPTER 10 Layout Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209
■CHAPTER 11 Classic Layouts . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
■CHAPTER 12 Layout Manipulation . . . . . . . . . . . . . . . . . . . . . . . . . 275
■CHAPTER 13 The Journey from Layout to Template . . . . . . . . . . . . . . . . . 291
■CHAPTER 14 Usability and Accessibility Enhancements .  . . . . . . . . . . . . . 315
■CHAPTER 15 Tips, Tricks, and Troubles . . . . . . . . .. . . . . . . . . . . . . 329
■CHAPTER 16 Case Study: The Dead Goods . . . . . . . . .. . . . . . . . . . . . . 347
■APPENDIX CSS Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
■INDEX . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . 387


CSS: Types of CSS Styles

There are 3 types of CSS Styles which have been used in Web pages which are listed below:
  1. Inline Styles
  2. Embedded Styles
  3. External Styles
Now I am going to explain each one of them one by one.
Inline Styles:
Inline styles make use of the style attribute applied to specific tags within the document,
where the actual style value is declared using the form name:value, or property:value, if you
want to use the correct terminology.

Example:
Replace this:

With:
.
This very simple declaration will ensure that the paragraph text will be red.

Embedded Styles:
Embedded styles still have you working exclusively within the (X)HTML template, but this time
all styles are grouped together in the head of the document, as part of one element.

Example:
Within the head section of the html page place below line:
.
This results in text contained within paragraphs on the web page to be red.

External Styles:
External Styles have been placed in a separate external style sheet and it contains are the styles which are required for the full site even if it contains thousands of pages.

Example:
Place below line within the head section of the web page:


Create an external.css style sheet file and place the below line inside it.
p {color: #F00;}

The result of this will be that all the web pages which contains link inside the head section written above paragraphs text becomes red.

If you want to read about the benefits of External Styles then follow the below link:
Benefits of External Styles




CSS: Benefits of External CSS Styles

What are External CSS Styles?
External Styles are the css styles which are placed in a separate file with css extension. Most of the sites over the internet use External Styles since it has many benefits. I just want to discuss what are the benefits.

Below is a list of benefits of External Styles:
  1. One external style sheet only, and not the markup.
  2. Sitewide style changes are one-sheet.
  3. Once the browser accesses the style sheet, it is cached and need not be downloaded.
  4. Pages gets rendered faster due to style sheet caching.
  5. Saving on bandwidth due to style sheet caching.
  6. One CSS file replacing the same or similar code that would be needed in each and every (X)HTML page if working with embedded CSS.
  7. Markup can be devoid of any presentational information, keeping it lean and content-only.
Hope you have got a better idea of External style sheets.


 

Thursday, January 24, 2013

The type 'System.Web.Mvc.ModelClientValidationRule' exists in both

I think you may have often got this error when ever you are getting started working on MVC projects. Especially this occurs when you install MVC4 framework and you have MVC3 also installed so when ever you create a MVC3 project you might get this error on building the project in AccountController class:

The type 'System.Web.Mvc.ModelClientValidationRule' exists in both '....System.Web.WebPages.dll' and '........\System.Web.Mvc.dll'    .......................AccountModels.cs

Solution:

I just wanted to tell you the simple solution for this:

Open you project .csproj file in Notepad or any other text editor and replace this line with the new line which I will show you.

Previous Line:


Replace With:


After saving the file and reloading the project and then building the project again you will get surprised that you issue got resolved automatically.

Hope this might help many developers getting this issue.


Wednesday, January 23, 2013

Javascript: Show and Hide Controls By ID


Navigation section



Below is the code which you can copy within html form body to test it.
**********myprogrammingzone.blogspot.com************



Navigation section
**********myprogrammingzone.blogspot.com************

Wednesday, January 9, 2013

Code First Migration Commands

Code First:
"Whether you have an existing database or not, you can code your own classes and properties that correspond to tables and columns and use them with the Entity Framework without an .edmx file. That's why you sometimes see this approach called code only, although the official name is Code First. The mapping between the store schema and the conceptual model represented by your code is handled by convention and by a special mapping API. If you don't yet have a database, the Entity Framework can automatically create the database for you, or drop and re-create it if the model changes."

Hope you have got the idea of Code First Development approach.

There are two commands which are used too much for the migration and updation of database. I want to share the two commands since I myself use to forget the syntax when I write them in Package Manager in Visual Studio. Although its simple to press Tab Key if you forget someting then Package Manager will show intellisense for you.

Migration Command:
Add-Migration NameOfMigrationFile -StartUpProjectName ProjectName

NameOfMigrationFile - Give name to Migration cs File
ProjectName - Project which contains your Model classes

Update Database Command:
Update-Database -StartUpProjectName ProjectName

ProjectName - Project which contains your Model classes

Revert a Migration Command:
Update-Database -StartUpProjectName ProjectName -TargetMigration NameOfMigrationFile

ProjectName - Project which contains your Model classes
NameOfMigrationFile - Migration file name which needs to be reverted without .cs extension


Hope this helps you in your Code First migrations.

Tuesday, January 8, 2013

The Web server is configured to not list the contents of this directory.

Yesterday I am working on a project and I got the following error when I run the application:

HTTP Error 403.14 - Forbidden

The Web server is configured to not list the contents of this directory.

Logon MethodAnonymous

Logon UserAnonymous

0x00000000

But the solution was really simple and was provided within the error page.
I am copying the steps which are shown on the page:

  • If you do not want to enable directory browsing, ensure that a default document is configured and that the file exists.
  • Enable directory browsing using IIS Manager.
    1. Open IIS Manager.
    2. In the Features view, double-click Directory Browsing.
    3. On the Directory Browsing page, in the Actions pane, click Enable.
  • Verify that the configuration/system.webServer/directoryBrowse@enabled attribute is set to true in the site or application configuration file.





I have followed the above steps and my issue gets resolved. Screen shots have been attached for easier solution. Hope it will help you also.




Monday, January 7, 2013

ExtJs Learning Useful Site Urls

ExtJs is know as Extended JavaScript and a lot of newer projects are moving towards this new technology. Its quite close to the conventional JavaScript language with some advanced features like MVC model. If you are interested to learn about this then I am going to share some useful links which I followed myself and found them very useful.

ExtJs Introduction:
In order to learn some thing its better to understand the its basics. Below is the link which I have followed myself and is really beneficial for you.
http://docs.sencha.com/architect/2/#!/guide

ExtJs Examples:
You can find a lot of examples and sample code at the below link and I also found it very much useful.
http://dev.sencha.com/deploy/ext-4.0.0/examples/#sample-16


Hope you will find a lot from the above links.




Saturday, January 5, 2013

SQL: Replace String

Sometimes we need to replace some word from SQL Database table fields. In order to do that you have to follow the below query syntax:

Syntax:
Update TableName
set ColumnName = replace(ColumnName, 'String to be Replaced', 'String to be replaced With');

Example:
I am giving an example for this:

Update Post
set PostDescription = replace (PostDescription , '&', 'and');

This will replace '&' with 'and' whereever it founds this in the given column.


Hope now you can easily do it.

Book: Professional ASP.NET MVC 4

I have read this very nice book for MVC 4. I want to share the contents of the book with you.

Authors:
Jon Galloway (Author), Phil Haack (Author), Brad Wilson (Author), K. Scott Allen (Author)

Chapters:
CHAPTER 1 Getting Started -------------------------------------------------------------------------- 1
CHAPTER 2 Controllers ----------------------------------------------------------------------------- 31
CHAPTER 3 Views ----------------------------------------------------------------------------------- 47
CHAPTER 4 Models ---------------------------------------------------------------------------------- 71
CHAPTER 5 Forms and HTML Helpers ----------------------------------------------------------- 95
CHAPTER 6 Data Annotations and Validation --------------------------------------------------- 119
CHAPTER 7 Membership, Authorization, and Security ---------------------------------------- 137
CHAPTER 8 Ajax ------------------------------------------------------------------------------------ 189
CHAPTER 9 Routing --------------------------------------------------------------------------------- 221
CHAPTER 10 NuGet --------------------------------------------------------------------------------- 249
CHAPTER 11 ASP.NET Web API ------------------------------------------------------------------ 279
CHAPTER 12 Dependency Injection --------------------------------------------------------------- 297
CHAPTER 13 Unit Testing --------------------------------------------------------------------------- 341
CHAPTER 14 Extending MVC ---------------------------------------------------------------------- 365
CHAPTER 15 Advanced Topics --------------------------------------------------------------------- 365
CHAPTER 16 Real-World ASP.NET MVC: Building the NuGet.org Website ---------------- 423



I think this book covers all the basics of ASP.Net MVC 4 right from the start explaining MVC pattern and then discussing the advanced topics. A chapter for Web API is also included which is the new technique for replacing Web Services and it could be used with both the web and desktop applications. I hope you will surely learn a lot if you are a beginner.