- fixed login system View
- M web/src/pages/api/product/get-products.ts* M web/src/pages/products.tsx
/** | |
* Everyone is familiar with a television. It is the object we are going to create in this lab. First we need | |
a blueprint. All manufacturers have the same basic elements in the televisions they produce as well as | |
many options. We are going to work with a few basic elements that are common to all televisions. Think | |
about a television in general. It has a brand name (i.e. it is made by a specific manufacturer). The | |
television screen has a specific size. It has some basic controls. There is a control to turn the power on | |
and off. There is a control to change the channel. There is also a control for the volume. At any point in | |
time, the television’s state can be described by how these controls are set. We will write the television | |
class. Each object that is created from the television class must be able to hold information about that | |
instance of a television in fields. So a television object will have the following attributes: |
#include <iostream> | |
#include <sstream> | |
#include <stack> | |
#include <string> | |
// Function implementation, not important for this question | |
double Task3Evaluate(const std::string& expression) { | |
std::stack<double> operands; | |
std::istringstream iss(expression); |
const validWords = ["dog", "dough", "doggy", "doodle", "dig", "door"]; | |
const bigrams = ["do", "og"]; // Example bigram array | |
function generateValidWordsFromBigrams(bigrams, validWords) { | |
const validGeneratedWords = []; | |
for (const word of validWords) { | |
const isValid = bigrams.every(bigram => word.includes(bigram)); | |
if (isValid) { | |
validGeneratedWords.push(word); |
{ | |
"scripts": { | |
"build": "npm run build:es2015 && npm run build:esm && npm run build:cjs && npm run build:umd && npm run build:umd:min", | |
"build:es2015": "tsc --module es2015 --target es2015 --outDir dist/es2015", | |
"build:esm": "tsc --module es2015 --target es5 --outDir dist/esm", | |
"build:cjs": "tsc --module commonjs --target es5 --outDir dist/cjs", | |
"build:umd": "rollup dist/esm/index.js --format umd --name YourLibrary --sourceMap --output dist/umd/yourlibrary.js", | |
"build:umd:min": "cd dist/umd && uglifyjs --compress --mangle --source-map --screw-ie8 --comments --o yourlibrary.min.js -- yourlibrary.js && gzip yourlibrary.min.js -c > yourlibrary.min.js.gz", | |
} | |
} |
const io = require('socket.io-client'); | |
const socket = io('http://localhost:3000', { | |
transportOptions: { | |
polling: { | |
extraHeaders: { | |
'Authorization': 'Bearer abc', | |
}, | |
}, | |
}, |
#!/bin/bash | |
# Reference: http://stdioe.blogspot.com/2012/01/creating-virtual-machine-with.html | |
VM_NAME="Debian Squeeze 2" | |
DEBIAN_CD_IMAGE="debian-6.0.7-amd64-netinst.iso" | |
# Create VM | |
VBoxManage createvm --name "$VM_NAME" --ostype Debian_64 --register | |
# VM Settings |
#!/usr/bin/env python3 | |
# | |
# Copyright 2022, Kabeer's Network (Modified WOFF2TTF utility) (https://kabeersnetwork.tk/) | |
# Initial Copyright 2012, Steffen Hanikel (https://github.com/hanikesn) | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 |
/* | |
******************************************************************************** | |
Golang - Asterisk and Ampersand Cheatsheet | |
******************************************************************************** | |
Also available at: https://play.golang.org/p/lNpnS9j1ma | |
Allowed: | |
-------- | |
p := Person{"Steve", 28} stores the value |
#!/usr/bin/env python | |
import sys | |
from pdfminer.pdfparser import PDFParser | |
from pdfminer.pdfdocument import PDFDocument | |
from pdfminer.pdfpage import PDFPage | |
from pdfminer.pdfpage import PDFTextExtractionNotAllowed | |
from pdfminer.pdfinterp import PDFResourceManager | |
from pdfminer.pdfinterp import PDFPageInterpreter | |
from pdfminer.pdfdevice import PDFDevice |