Thursday, October 25, 2018

Change Fonts and Colors in Visual Studio

Change the background color of your code editor

Change the Color Theme of the IDE

On the menu bar, choose Tools, Options.



In the options list, choose Environment, General.



In the Color theme list, choose either the default Blue theme, Dark or Light.

To change the font and size of all text in the IDE

1.On the menu bar, choose Tools, Options.

2.In the options list, choose Environment, Fonts and Colors.

3.In the Show settings for list, choose Environment Font.

4.In the Font list, choose a font.

5.In the Size list, choose a text size, and then choose the OK button.

Tuesday, October 23, 2018

JQuery: how to replace all between certain characters?

Syntax:
string.replace(/abc.+xyz/,"abc"+newString+"xyz");


Input value :
 var inputString="(10.00%)(20.00%)(10.00%)Testing Value";

 var   Output =inputString.replace(/\(.*%\)/ig,"");

Result value :
    Testing Value


SQL replace all characters between two strings

How can I use replace statement in SQL query to replace/remove all the text inside the square bracket and the square bracket itself. I have many similar text like that with square bracket in my database, can I use regular expression or something similar?

Solution :
declare @str varchar(100)
select @str='This is Sql testing Text [23/10/2018 12:23 - admin]'
select stuff(@str,patindex('%(%',replace(@str,'[','(')),LEN(@str),'')

Result :  This is testing Text 

Mixed Content: The page at xxx was loaded over HTTPS, but requested an insecure

 Mixed Content: The page at ' https ://www.test.com/signup.aspx' was loaded over HTTPS, but requested an insecure script ' http ...