Skip to content

Instantly share code, notes, and snippets.

View DragonOsman's full-sized avatar

Osman Zakir DragonOsman

View GitHub Profile
react-timer-hook: { useTimer } Invalid expiryTimestamp settings Invalid Date
at TaskTimer (http://localhost:3000/static/js/bundle.js:552:3)
at li
at ul
at div
at ListTasks (http://localhost:3000/static/js/bundle.js:674:97)
at div
at Home (http://localhost:3000/static/js/bundle.js:434:97)
at RenderedRoute (http://localhost:3000/static/js/bundle.js:40410:5)
at Routes (http://localhost:3000/static/js/bundle.js:41042:5)
Jul 27 04:57:36 AM <--- JS stacktrace --->
Jul 27 04:57:36 AM
Jul 27 04:57:36 AM FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
Jul 27 04:57:36 AM 1: 0xa222f0 node::Abort() [node]
Jul 27 04:57:36 AM 2: 0x96411f node::FatalError(char const*, char const*) [node]
Jul 27 04:57:36 AM 3: 0xb97f1e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
Jul 27 04:57:36 AM 4: 0xb98297 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
Jul 27 04:57:36 AM 5: 0xd52fd5 [node]
Jul 27 04:57:36 AM 6: 0xd53b5f [node]
Jul 27 04:57:36 AM 7: 0xd61beb v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
@DragonOsman
DragonOsman / console_error.txt
Created July 12, 2023 20:09
Browser console errors from React code
react-dom.production.min.js:189 Error
at D (history.ts:480:11)
at components.tsx:643:5
at react.production.min.js:19:182
at react.production.min.js:18:85
at T (react.production.min.js:16:230)
at T (react.production.min.js:17:24)
at A (react.production.min.js:18:52)
at Object.forEach (react.production.min.js:19:165)
at qe (components.tsx:625:18)
import React from "react";
import "./App.css";
import CountdownTimer from "./CountdownTimer";
const App = () => {
const THREE_DAYS_IN_MS = 3 * 24 * 60 * 60 * 1000;
const NOW_IN_MS = new Date().getTime();
const dateTimeAfterThreeDays = NOW_IN_MS + THREE_DAYS_IN_MS;
import React, { ChangeEvent, useState } from "react";
import "./App.css";
interface TaskType {
title: string;
description: string;
time: Date
}
interface TaskFormProps {
const mongoose = require("mongoose");
const articleSchema = new mongoose.Schema({
title: {
type: String,
required: [true, "Title is required"]
},
content: {
type: String,
required: [true, "Content can't be blank"]
@DragonOsman
DragonOsman / errors.txt
Created August 22, 2022 17:21
Errors in React TypeScript App
Property 'name' does not exist on type 'EventTarget'.
Property 'value' does not exist on type 'EventTarget'.
Type '(e: Event) => AxiosStatic' is not assignable to type 'FormEventHandler<HTMLFormElement>'.
Types of parameters 'e' and 'event' are incompatible.
Type 'FormEvent<HTMLFormElement>' is missing the following properties from type 'Event': cancelBubble, composed, returnValue, srcElement, and 7 more.
Type '(e: Event) => void' is not assignable to type 'ChangeEventHandler<HTMLInputElement>'.
Types of parameters 'e' and 'event' are incompatible.
Type 'ChangeEvent<HTMLInputElement>' is missing the following properties from type 'Event': cancelBubble, composed, returnValue, srcElement, and 7 more.
Type '(e: Event) => void' is not assignable to type 'ChangeEventHandler<HTMLInputElement>'.
Type '(e: Event) => void' is not assignable to type 'MouseEventHandler<HTMLButtonElement>'.
bool is_number(const std::string& op);
class Solution {
public:
int calPoints(vector<string>& ops) {
std::vector<int> nums;
for (std::size_t i{}; i < ops.size(); ++i)
{
if (is_number(ops[i]))
{
MongooseServerSelectionError: connection <monitor> to 34.198.25.25:27017 closed
at NativeConnection.Connection.openUri (E:\programming\node-auth\node_modules\mongoose\lib\connection.js:819:32)
at E:\programming\node-auth\node_modules\mongoose\lib\index.js:377:10
at E:\programming\node-auth\node_modules\mongoose\lib\helpers\promiseOrCallback.js:32:5
at new Promise (<anonymous>)
at promiseOrCallback (E:\programming\node-auth\node_modules\mongoose\lib\helpers\promiseOrCallback.js:31:10)
at Mongoose._promiseOrCallback (E:\programming\node-auth\node_modules\mongoose\lib\index.js:1220:10)
at Mongoose.connect (E:\programming\node-auth\node_modules\mongoose\lib\index.js:376:20)
at initiateMongoServer (E:\programming\node-auth\config\db.js:7:20)
at Object.<anonymous> (E:\programming\node-auth\index.js:5:1)
<?php
if (isset($_POST["num1"]) && isset($_POST["num2"]) && isset($_POST["op"]))
{
print_r($_POST);
$first_operand = $_POST["num1"];
$second_operand = $_POST["num2"];
$operator = $_POST["op"];
header("Content-Type: application/x-www-form-urlencoded");
$result = 0;