Skip to main content

Posts

Showing posts from November, 2019

Windows 10 login screen is blank, no password, restart option visible

I came across a problem that my windows 10 login screen was blank with just background. No password field, or restart option visible. I searched across web but didn't find a solution. I tried some key pairs and one worked. It is as follows: windows key then tab then enter windows key then tab key twice then enter I tried these and one of them worked. So if this works for you then let me know in the comments bellow. Thanks.

Creating your own markup language and converting to html

I have this Sentence  " Hi ~r~ I'm the ~b~ BOSS " I want to change string after  "~r~"  by putting it in a span with red color, and string after  " ~b~ "  by putting it in a span with black color.  This example has just 2 colors but I may want to have many more colors with other codes  I want the output string to look something like the following: "Hi" + "<span style='color: red;'>i'm the</span>" + "<span style='color: black;'>BOSS</span>" Answer 1 function addColors ( ele ) { let str = ele ; let hasSpan = false ; let ansStr = "" ; for ( let i = 0 ; i < str . length ; i ++) { if ( str [ i ] === '~' ) { i ++; switch ( str [ i ]) { case 'r' : if ( hasSpan ) { ansStr = str . slice ( 0 , i - 1 ) + "<span><span style='color: red;'>...