— Diary, Programming — 1 min read
HackOn deployment is done on netlify. I didn't want to install it as a GitHub application for the organization so I'm glad someone else did. I also got an official HackOn E-Mail account. 🎉
There need to be a lot of minor changes in the HackOn website and the most challenging would be to make mailto
tags click to copy with a popover.
The process should be simple though. It just needs some CSS properties when hovered, and then change the text dynamically when clicked.
Made the other changes as well to the meta data, and explored the dev.to
store for stickers! 😛
Yes, I got a pack (thanks to Rishabh). 😬
Time to take a break!
Starting some other changes to the website. Need to change the look of the New Sponsorship
block. It looks like it has to be ignored by the viewers right now.
Break for Valorant! Been a while!
Starting today's Leetcode challenge. The problem looks simple, to toggle each and every alphabet to it's uppercase and lowercase form.
The approach that I decided to go with
1vector<string> letterCasePermutation(string S) {2 vector<string> v;3 v.push_back(S);45 for (int i = 0; i < S.length(); i++) {6 if (isdigit(S[i])) continue;7 8 int sz = v.size();9 for (int j = 0; j < sz; j++) {10 string t = v[j];11 if (t[i] == S[i]) {12 if (isupper(t[i]))13 t[i] = tolower(t[i]);14 else if (islower(t[i]))15 t[i] = toupper(t[i]);16 v.push_back(t);17 }18 }19 }20 return v;21}
Time complexity is O(2^n)
and space complexity O(2^n)
where n
is the length of the string.
Have to get the "Scroll to Top" button working but unable to get the event listener working.
After bashing my head around for approximately 3 hours, I finally figured it out. Turns out the window, or body was never scrolling. Instead, the container was scrolling so the listener had to be added to that. Phew! 👏
Okay, so I'm finally pushing that, and I need rest for now!
Until tomorrow! ^-^