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
| "use client"; | |
| import { useRouter } from "next/navigation"; | |
| import type { ReactNode } from "react"; | |
| import { useCallback, useEffect, useState } from "react"; | |
| interface ProximityPrefetchProps { | |
| children: ReactNode; | |
| threshold?: number; | |
| predictionInterval?: number; |
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
| export default function createDetectElementResize(nonce, hostWindow) { | |
| // Check `document` and `window` in case of server-side rendering | |
| let _window; | |
| if (typeof hostWindow !== 'undefined') { | |
| _window = hostWindow; | |
| } else if (typeof window !== 'undefined') { | |
| _window = window; | |
| } else if (typeof self !== 'undefined') { | |
| _window = self; | |
| } else { |
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
| export default function createDetectElementResize(nonce, hostWindow) { | |
| // Check `document` and `window` in case of server-side rendering | |
| var _window; | |
| if (typeof hostWindow !== 'undefined') { | |
| _window = hostWindow; | |
| } else if (typeof window !== 'undefined') { | |
| _window = window; | |
| } else if (typeof self !== 'undefined') { | |
| _window = self; | |
| } else { |
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 * as React from 'react'; | |
| import createDetectElementResize from './detectElementResize'; | |
| import {useEffect, useLayoutEffect, useRef, useState} from "react"; | |
| // type Size = { | |
| // height: number, | |
| // width: number, | |
| // }; | |
| // | |
| // type Props = { |
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
| error: A hook (`orm`) failed to load! | |
| verbose: Lowering sails... | |
| verbose: Sent kill signal to child process (18868)... | |
| verbose: Shutting down HTTP server... | |
| verbose: HTTP server shut down successfully. | |
| error: Error (E_UNKNOWN) :: Encountered an unexpected error | |
| : ER_BAD_FIELD_ERROR: Unknown column 'chat_messages.chatId' in 'field list' | |
| at Query.Sequence._packetToError (D:\projects\test-server\test-api\node_modules\sails-mysql\node_modules\mysql\lib\protocol\sequences\Sequence.js:48:14) | |
| at Query.ErrorPacket (D:\projects\test-server\test-api\node_modules\sails-mysql\node_modules\mysql\lib\protocol\sequences\Query.js:83:18) | |
| at Protocol._parsePacket (D:\projects\test-server\test-api\node_modules\sails-mysql\node_modules\mysql\lib\protocol\Protocol.js:280:23) |
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
| /** | |
| * Created by mr47 on 03.03.2016. | |
| */ | |
| 'use strict'; | |
| var _ = require('lodash'); | |
| const xor_encrypt = (bytes, key)=>{ | |
| const key_len = key.length; |
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
| this.listenToOnce(Backbone.history, 'route', function() { | |
| this.listenTo(Backbone.history, 'route', function() { | |
| // stuff that needs to happen on all routes apart from the inital page load one | |
| }); | |
| }); |
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
| function getExt(filename) | |
| { | |
| return filename.substr((~-filename.lastIndexOf(".") >>> 0) + 2); | |
| } |
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
| var http = require("http"), | |
| url = require("url"), | |
| path = require("path"), | |
| fs = require("fs") | |
| port = process.argv[2] || 8888; | |
| http.createServer(function(request, response) { | |
| var uri = url.parse(request.url).pathname | |
| , filename = path.join(process.cwd(), uri); |