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
const stripe = require('stripe')((process.env.STRIPE_PRIVATE_SECRET)); | |
productList.forEach(element => { | |
line_items.push({ | |
price_data: { | |
currency: 'usd', | |
product_data: { | |
name: element?.name, | |
}, |
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
//here is document with NESTED Array | |
{ | |
"_id": "xyz-800", | |
"site": "xyz", | |
"user": 800, | |
"timepoints": [ | |
{"timepoint": 0, "a": 1500, "b": 700}, | |
{"timepoint": 2, "a": 1000, "b": 200}, | |
{"timepoint": 4, "a": 3500, "b": 1500} | |
] |
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
app.get('/product/:key', (req, res) => { | |
const key = req.params.key; | |
client = new MongoClient(uri, { useNewUrlParser: true },{useUnifiedTopology: true}); | |
client.connect(err => { | |
const collection = client.db("onlineStore").collection("products"); | |
collection.findOne({key},(err, documents)=>{ | |
if(err){ | |
console.log(err) | |
res.status(500).send({message:err}); | |
} |
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
https://github.com/TangentSolutions/DRF-tutorial/wiki/Setting-up-the-project-with-Docker |
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
import docxpy | |
import codecs | |
# read Input file : Input.docx | |
file = 'text.docx' | |
# extract text from file | |
text = docxpy.process(file) | |
print(text) |
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
ya |
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
nazmul ip |
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
Object.keys(formValue).forEach(key => { | |
if (key !== "steve") { | |
formValueForState[key] = data[key]; | |
} | |
}); |
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
static getInitialProps({ query, res }) { | |
return { query }; | |
} | |
this.props.query; |
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
window.scroll({top: 0}); |