Skip to content

Instantly share code, notes, and snippets.

View theabhayprajapati's full-sized avatar
:electron:

Abhay Prajapati theabhayprajapati

:electron:
View GitHub Profile
@theabhayprajapati
theabhayprajapati / chrome.md
Created September 23, 2023 13:48
Removing "Mangaged By Google Tag" from fedora Google Chrome.
removing /etc/opt/chrome/policies/managed/00_gssapi.json works only until next OS (Fedora 35) reboot.

go to /etc/opt/chrome and check if policies is having file similar to 00_gssapi.json or *.json

then come back and delete that folder

cd ../..
@theabhayprajapati
theabhayprajapati / gcm.md
Created September 23, 2023 13:01
Downloading GCM( GIT credintial manager ) on fedora 38
@theabhayprajapati
theabhayprajapati / main.md
Created September 15, 2023 16:58
If you are working on a projects in spring boot that has it's own packages custom built and if you make changes to those files, folder how to use start using that one?

If you are working on a projects in spring boot that has it's own packages custom built and if you make changes

to those files, folder how to use start using that one?

if you make changes on your packages(modules) java packages like common, every java projects larger ones have have there own custom version of packages like common, it generatlly includes common classes, auth method.

If your are working on sometype of featues which need changes in that you should make the changes in that then move to your terminal and root dir of your project.

@theabhayprajapati
theabhayprajapati / .zshrc.md
Last active February 7, 2024 18:24
Make zsh shell to load faster. if you have nvm install

MAKE ZSH load faster

#.zshrc
export NVM_DIR="$HOME/.nvm"
#[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
# alias nvm="unalias nvm; [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"; nvm $@"

setState Methods

setState is having 2 params first is for updating the state and the second is the callback function which only update if this setState is updated and rendered into the DOM.

    () => {
    this.setState((state, props) => {
        return {name: "Abhay"}
 }, () => {
create table student(rno int(5) primary key, name varchar(10) not null, address varchar(30), phone varchar(10));
create table marks(rno int(5), maths int(3), cs int(3), phy int(3), bio int(5), chem int(5));
insert into student values (1, "Abhay", "Bengaluru", "1000000000"), (2,"Arin","Hyderabad", "2000000000"), (3,"Om", "Pune", "3000000000"),(4, "Asha", "Mumbai", "5000000000"), (5, "Kapil", "Delhi", "5000000000");
insert into marks values (1, 234, 432,354, 456, 343), (2,453,655,654,765,134), (3, 382,891,329,839,177),(4,928,314,533,242,659),(5,392,432,565,732,676);
select s.rno "Roll Number", name "Name", SUM(maths+cs+phy+bio+chem) "Total Marks" from student s inner join marks m on s.rno=m.rno group by s.rno;
@theabhayprajapati
theabhayprajapati / Main.java
Created September 6, 2022 14:28
CODE THAT HELPED ME TO MAKE THE COMPANIES.MD FILE GIST Written in Java.
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
public class Main {
public static void main(String[] args) {
/*read lines from fle adn conver in tor array*/
String[] lines = new String[0];
@theabhayprajapati
theabhayprajapati / Companies.md
Last active June 17, 2024 07:49
List of 300+ Companies paying 12LPA+ base for SDE-1 role in India.

List of 300+ Companies paying 12LPA+ base for SDE-1 role in India.

source

Companies have been listed with their URLs so you can easily access their website. We would appreciate it if you could comment below with the correct URL if you find any that are broken.

  1. Acko
  2. Adobe
  3. Airbase
  4. Airbnb
  5. Airbus
@theabhayprajapati
theabhayprajapati / induction.py
Created September 2, 2022 06:55
Prove by mathematical induction n(n+1)(n+2) is divisible by 24
""" prove by mathematical induction n(n+1)(n+2) is divisible by 24 """
def main(n):
""" main function """
if n * (n + 1) * (n + 2) % 6 == 0:
print(n, "is divisible by 6")
return main(n + 1)
else:
print(n, "is not divisible by 6")
n += 1
return main(n)
@theabhayprajapati
theabhayprajapati / CaesarCipher.java
Created September 1, 2022 14:29
Made a Algorithm for cryptography using principles of Caedar Cipher, where we want to encrypt a message then for that we make a key and for every letter in the message we increase it's alphabet with +key letter e.g for "a" and key is 10 then the encrypt word will be "k".
package DataStructures;
public class CaesarCipher {
static String encrypt(String msg, int key){
StringBuilder encrypted = new StringBuilder(msg);
String alphabets = "ABCDEFGHIJKLMNOPQRSTVUWXYZ";
String smallalphabets = alphabets.toLowerCase();
String shiftedAplhabets = alphabets.substring(key) + alphabets.substring(0, key);
for( int i =0; i< encrypted.length(); i++){
char curChar = encrypted.charAt(i);