A Pen by Laura-Annabel Tombs on CodePen.
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
| """ | |
| smart_time.py — Natural-language date/time parser (IMPROVED). | |
| Keeps the good ideas from jeffmylife's gist (season awareness, word | |
| translations like "few"=3-4, vagueness detection, rich structured output) | |
| but fixes its real flaws: | |
| * FLAW 1 (LLM-only, no fallback): if the API key is missing or the model | |
| returns garbage/empty (we saw 402s + None completions with OpenRouter), | |
| the original CRASHES. This version has a deterministic rule layer |
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
| cmake_minimum_required(VERSION 3.25) | |
| project(ProjectName) | |
| set(CMAKE_CXX_STANDARD 11) | |
| set(CMAKE_CXX_STANDARD_REQUIRED TRUE) | |
| set(OpenCV_DIR "C:/tools/opencv/build/x64/vc16/lib") | |
| set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") | |
| find_package(OpenCV REQUIRED) |
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 agg = [ | |
| { | |
| '$match': { | |
| 'positionInformation.positionStatus': 'Active' | |
| } | |
| }, { | |
| '$unwind': { | |
| 'path': '$positionInformation' | |
| } | |
| }, { |
const { useDispatch, useSelector } = require("react-redux");
// INITIAL STATE
const initital = {
authenticated: false,
token: "",
error: "",
};
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
| require('dotenv').config() | |
| module.exports = { | |
| apps: [ | |
| { | |
| name: 'uhwr.server', | |
| script: './server/app.js', | |
| instances: process.env.INSTANCES_API || 1, | |
| autorestart: true, | |
| watch: process.env.NODE_ENV == 'development' ? ['server', '*.js', '*.ts', '.env'] : false, |
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
| { | |
| "identity": { | |
| "HWID": "", | |
| "uhwr": { | |
| "nationalID": { | |
| "nin": "", | |
| "cardNo": "", | |
| "expiryDate": "" | |
| }, | |
| "passport": { |
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
| //Get all employees from the database | |
| app.get("/employees", (req, res) => { | |
| db.query("SELECT * from employees", (error, data) => { | |
| if (error) { | |
| return res.json({ status: "ERROR", error }); | |
| } | |
| return res.json(data); | |
| }); | |
| }); |
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.post("employees", function (req, res) { | |
| let newEmployee = { ...req.body }; | |
| db.query("INSERT INTO employees SET ?", newEmployee, (error, result) => { | |
| if (error) { | |
| return res.status(500).json({ status: "ERROR", error }); | |
| } | |
| return res.json({ status: "SUCCESS" }); | |
| }); |
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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>Place Autocomplete</title> | |
| <style> | |
| #map { | |
| width: 500px; | |
| max-height: 400px; | |
| height: 100%; |
NewerOlder