This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(JUST IN case : / => frontslash, \ => backslash) | |
Check postgres version: | |
psql --version | |
Connect to postgres: | |
psql -U postgres | |
(the postgres user is default superuser for the postgresSQL) | |
# or the above error showed any socket / Peer Authentication error; then use this; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Setup your React project with Vite. | |
pnpm add -D tailwindcss postcss autoprefixer | |
pnpx tailwindcss init -p | |
Inside tsconfig.json | |
"baseUrl": ".", | |
"paths": { | |
"@/*": ["./src/*"] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Program to find probability for rolling of two dies for getting sums of die faces which are either less than or greater than or equal to given number */ | |
const validateData = (input) => { | |
const result = input.match(/^[<|>|=][1-6]$/); | |
return result != null ? true : false; | |
}; | |
const checkProbability = (sign, number) => { | |
let resultList = []; | |
let noOfExhaustiveEvent = 0; // this means our favorable event. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AnimationBeat { | |
private long started; | |
private long a; // length of phase a | |
private long b; // length of phase b | |
private long c; // length of phase c | |
public AnimationBeat(){ | |
started = System.currentTimeMillis(); | |
this.a = 5000; | |
this.b = 500; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//shows model when document is loaded | |
$( document ).ready(function() { | |
setInterval(3000,showModel); | |
}); | |
function showModel(){ | |
$("#myModel").show(); | |
} |