Overview
Today, we will learn about Cross-Site Request Forgery attacks and how to prevent them in ASP.NET Core, JavaScript and Angular.
Continue readingToday, we will learn about Cross-Site Request Forgery attacks and how to prevent them in ASP.NET Core, JavaScript and Angular.
Continue readingMany business websites show their email addresses and phone numbers so their customers can contact them. In this lesson we will create wrapper classes around ‘mailto’ and ‘tel’ HTML links in C#. Those classes will allow you to read and generate those links with ease.
Continue readingهذه المقالة متوفرة أيضا باللغة العربية، اقرأها هنا.
When you install Windows, it doesn’t automatically install IIS for you. Instead, you have to install it manually. If you have downloaded a new version of IIS from IIS website, you can use the setup file to install IIS on your machine. If you prefer the version of IIS that ships with your Windows edition, you can install it using Windows Components installer, and that what we are going to do next.
To install IIS on Windows XP follow those steps:
Now you can go to Control Panel -> Administrative Tools and run IIS from there. You can also browse to http://localhost and see your new homepage (enjoy!)
Installing IIS on Windows Vista/7 is very similar, just follow those steps:
Now go to Control Panel -> Administrative Tools to run the IIS. You can also go to http://localhost to see your new homepage.
Personally, I don’t like running IIS from Administrative Tools. I like to use the Run command to run everything on my PC and that’s, on my opinion, 3 times faster than everything else (of course when using the keyboard not the mouse.)
To be able to launch IIS from the Run command, you need to add the IIS directory (%windir%System32inetsrv) to the command search path which is available in system environment variables, and that can be done using the following steps:
Now go to Run (Start + R) and write inetmgr (the name of the IIS Manager) to run the IIS Management tool.
Have a nice day!
Just liked to say that I really like Formspring 404 not found page, it’s really cool :P, see it below or try to navigate to any page that doesn’t exist.
I like also to mention this great article by Chris Coyier from CSS-Tricks that talks about 404 pages best practices. You should really read it.
Enjoy your day!
UPDATE 07/09/2011:
Keep yourself updated with brilliant 404 pages by following this blog.
هذه المقالة متوفرة أيضا باللغة العربية، اقرأها هنا.
Contents of this article:
Before we begin our article we need to know first what is decimal and what is hexadecimal.
Using decimal representation means using base-10 representation of numbers which means that every digit of the number can be one of 10 values, 0 through 9.
A good example is 195. It’s is 3 digits and every digit is between 0 and 9.
On the other hand, hexadecimal is base-16 representation which means that there are 16 of base values that every digit in the number can be one of. These base values are 0 through 9 and A through F. From 0 to 9 are the same in dec (the shorthand for decimal). A equals 10, B equals 11, C equals 12, etc.
An example is 14 (decimal). If we need to represent it in hexadecimal we can say D.
Another good example is 9 (decimal). If we need to represent it in hex (the shorthand for hexadecimal,) you can say 9 too.
You already know that a colors consists of 3 values; RGB (Red, Green and Blue). Although, there’re times when we blend it with another value (Alpha) to make color transparent, however it is not common. So we end up with 4 values (ARGB) to represent our color. True? Every value of these four occupies a single byte in memory so every value ranges from 0 to 255.
In HTML for instance you can represent any color by its name (if it is a known color like Red) or by combining the RGB values using hexadecimal (HTML doesn’t support Alpha.) You cannot use decimal values to represent colors in HTML. So you need to know how to convert between every decimal value to its equivalent hexadecimal and vice versa.
You already know that decimal values from 0 to 15 have the hex counterparts 0 through 9 and A through F so conversion will be very easy in this range. For a decimal value greater than 15 you need to apply a simple formula to convert it.
Examples:
- 11 (dec) 11 = B Result = B (hex) - 160 (dec) 160 / 16 = 10 160 mod 16 = 0 10 = A 0 = 0 Result: A0 (hex) - 254 (dec) 254 / 16 = 15 254 mod 16 = 14 15 = F 14 = E Result = FE (hex)
Because every value of ARGB occupies a single byte, then the values range from 0 to 255 so in hexadecimal they range from 0 to FF!
For hex values from 0 through 9 and A through F, they have equivalents in decimal.
For values greater than F (15) all you need is to reverse the steps you did in converting decimal to hex.
Examples:
- B (hex) B = 11 Result = 11 (dec) - A0 A = 10 0 = 0 A * 16 = 160 160 + 0 = 160 Result = 160 (dec) - FE F = 15 E = 14 15 * 16 = 240 240 + 14 = 254 Result = 254 (dec)
Easy, isn’t it? A color like khaki (RGB: 240, 230, 140) in hexadecimal equals FF F0 E6 8C. To represent it in HTML you can say #F0E68C.
You can use Windows Calculator (in scientific mode) to make such conversions.