To convert JPG or other image formats to WebP, you can use the WebP command line converter tool provided by Google. You can download the WebP converter tool from https://developers.google.com/speed/webp/download (Click Download for Windows). Once downloaded, extract the folder to C:\ directory or wherever else you like (you will need the path to converter tool later). After extracting the folder, […]
Tag: change
What is the purpose of nameof in C#?
The purpose of nameof is refactoring. For example, when you change the name of a class to which you refer through nameof somewhere else in your code you will get a compilation error which is what you want. If you didn’t use nameof and had just a plain string as a reference you’d have to full-text […]
How to change the style of scrollbar with CSS
::-webkit-scrollbar { width: 12px; } ::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); border-radius: 10px; } ::-webkit-scrollbar-thumb { border-radius: 10px; -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.5); } You can get more detail from here.
Change some value inside List
Let’s say you have a List of T. And there are Property1, Property2, Property3 in T. If you want to change the value of Property2 in T then you can use: var myList = List<T>; foreach (var item in myList) { item.Property2 = newValue; } or var myList = List<T>; myList.ForEach(x => x.Proprty2 = newValue); […]
Rename Report while exporting to PDF or Excel in Microsoft ReportViewer
ReportViewer1.LocalReport.DisplayName = “The_Name_For_My_Report”; or ReportViewer1.ServerReport.DisplayName = “The_Name_For_My_Report”;
Rename column SQL Server
EXEC sp_RENAME ‘TableName.OldColumnName’ , ‘NewColumnName’, ‘COLUMN’
Change Default Value for “Select Top n” and “Edit Top n” Rows in SQL Server Studio
In SQL Server Management Studio, by default you can only Select Top 1000 Rows or Edit Top 200 Rows for a table as shown in the below snippet.
Change format of the Day with Leading zero In DateTime
You can use both methods: DateTime.Now.Day.ToString(“00”); DateTime.Now.ToString(“dd”);
How to change ReportViewer Date Format
=Format(Fields!Date,Value,”dd.MM.yyyy”)