This file contains 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
db.connect((err)=>{ | |
if (err) { | |
console.log("Database connection Error :"+err); | |
}else{ | |
console.log("Database connected to port 27017"); | |
} | |
}) |
This file contains 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
<table id="tblFruits"> | |
<tr> | |
<td><input id="chkMango" type="checkbox" value="mango"/><label for="chkMango">Mango</label></td> | |
</tr> | |
<tr> | |
<td><input id="chkApple" type="checkbox" value="apple"/><label for="chkApple">Apple</label></td> | |
</tr> | |
<tr> | |
<td><input id="chkBanana" type="checkbox" value="banana"/><label for="chkBanana">Banana</label></td> |
This file contains 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
var express = require('express'); | |
// Import of express-session | |
var session = require('express-session'); | |
// Configure | |
app.use(session({secret:"Key",cookie:{maxAge:600000}})) | |
// Usage | |
app.use("./",(req,res) => { | |
req.session.YOUR_KEY = YOUR_VALUE |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
This file contains 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
[ | |
{ | |
"question": "What is the name of the holy book of Islam?", | |
"answers": ["The Qur'an", "The Bible", "The Vedas", "The Sutras"], | |
"source": "....Quran was revealed as a guide for humanity with clear proofs of guidance and the standard ˹to distinguish between right and wrong˺.... -Qur'an, Surah Al-Baqarah 2:185", | |
"answerIndex": 0 | |
}, | |
{ | |
"question": "Which of the following is not one of the Five Pillars of Islam?", | |
"answers": ["Prayer", "Fasting", "Charity", "Hiking"], |
Problem: When linking to the raw version of a gist, the link changes with each revision.
Solution:
To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/
- Example: https://gist.github.com/atenni/5604522/raw/
- Works even when you change the filename.
To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]
This file contains 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
import 'package:flutter/widgets.dart'; | |
// From https://gist.github.com/ltOgt/3771c824fc1c8811f5ec1a81a9a4937b | |
/// Conditionally wrap a subtree with a parent widget without breaking the code tree. | |
/// | |
/// [condition]: the condition depending on which the subtree [child] is wrapped with the parent. | |
/// [child]: The subtree that should always be build. | |
/// [parentBuilder]: builds the parent with the subtree [child]. | |
/// |