Ankith Reddy has Published 996 Articles

Get the number of bytes in a file in C#

Ankith Reddy

Ankith Reddy

Updated on 07-Apr-2020 10:04:34

479 Views

FileInfo type has a Length property that determines how many bytes a file has.Firstly, set the file −FileInfo file = new FileInfo("D:ew");Now use the Length property −file.LengthHere is the complete code −Exampleusing System; using System.Linq; using System.IO; class Program {    static void Main() {       FileInfo file ... Read More

Usage of CSS @charset rule

Ankith Reddy

Ankith Reddy

Updated on 16-Mar-2020 07:57:31

142 Views

If you are writing your document using a character set other than ASCII or ISO-8859-1 you might want to set the @charset rule at the top of your stylesheet to indicate what character set the style sheet is written in.The @charset rule must be written right at the beginning of ... Read More

Create an attenuated shadow with CSS

Ankith Reddy

Ankith Reddy

Updated on 16-Mar-2020 07:31:18

155 Views

Shadow filter is used to create an attenuated shadow in the direction and color specified.The following parameters can be used in this filter −S.NoParameter & Description1ColorThe color that you want the shadow to be.2DirectionThe direction of the blur, going clockwise, rounded to 45-degree increments. The default value is 270 (left).0 ... Read More

Role of size property in CSS to set the size and orientation of a page box

Ankith Reddy

Ankith Reddy

Updated on 16-Mar-2020 07:19:41

163 Views

The size property specifies the size and orientation of a page box. There are four values which can be used for page size auto - The page box will be set to the size and orientation of the target sheet.landscape − Overrides the target's orientation. The page box is the same ... Read More

Set Mask Effect with CSS

Ankith Reddy

Ankith Reddy

Updated on 13-Mar-2020 13:22:19

292 Views

Use the mask effect to turn transparent pixels to a specified color and makes opaque pixels transparent. The following parameter is used in this filterSr.NoParameter & Description          1ColorThe color that the transparent areas will become.ExampleYou can try to run the following code to implement mask effect ... Read More

Make any particular color transparent with CSS Filters

Ankith Reddy

Ankith Reddy

Updated on 13-Mar-2020 13:14:21

1K+ Views

To make any particular color transparent, use Chroma Filter. You can use it with scrollbars also.The following parameter can be used in this filterParameterDescriptionColorThe color that you'd like to be transparent.Implementing the CSS Chroma Filter −Live Demo                         Text Example:       CSS Tutorials    

How to import styles from another style sheet in CSS

Ankith Reddy

Ankith Reddy

Updated on 13-Mar-2020 13:12:01

389 Views

To import styles from another style, use the @import rule. It should appear right at the start of the style sheet before any of the rules, and its value is a URL.You can write it like this     The significance of the @import rule is that it allows you ... Read More

Java Program to Convert contents of a file to byte array and Vice-Versa

Ankith Reddy

Ankith Reddy

Updated on 13-Mar-2020 12:56:11

295 Views

The FileInputStream class contains a method read(), this method accepts a byte array as a parameter and it reads the data of the file input stream to given byte array. Assume the file myData contains the following data −Exampleimport java.io.File; import java.io.FileInputStream; public class FileToByteArray {    public static ... Read More

How to find time difference using Python?

Ankith Reddy

Ankith Reddy

Updated on 05-Mar-2020 10:19:02

2K+ Views

It is very easy to do date and time maths in Python using time delta objects. Whenever you want to add or subtract to a date/time, use a DateTime.datetime(), then add or subtract date time.time delta() instances. A time delta object represents a duration, the difference between two dates or ... Read More

How to concatenate a Python dictionary to display all the values together?

Ankith Reddy

Ankith Reddy

Updated on 05-Mar-2020 06:51:37

2K+ Views

You can get all the values using a call to dict.values(). Then you can call ", ".join on the values to concatenate just the values in the dict separated by commas. examplea = {'foo': "Hello", 'bar': "World"} vals = a.values() concat = ", ".join(vals) print(concat)OutputThis will give the output −Hello, WorldRead More

Advertisements