This file contains 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
/** | |
* Modification to the Needleman Wunsch for Binary DNA | |
*/ | |
class NeedlemanWunsch { | |
/** | |
* @param {string} seq1 - First | |
* @param {string} seq2 | |
* @param {string} seq12 | |
* @param {string} seq22 | |
* @param {number} match_score |
This file contains 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
[ | |
{ | |
"AllowedHeaders": [ | |
"*" | |
], | |
"AllowedMethods": [ | |
"GET", | |
"HEAD" | |
], | |
"AllowedOrigins": [ |
This file contains 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 { Client } = require("@notionhq/client"); | |
const axios = require('axios') | |
const notion2md = require("notion-to-md"); | |
const databaseId = 'YOUR_DATABASE_ID'; | |
const notion = new Client({ | |
auth: "YOUR_NOTION_TOKEN", |
This file contains 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 itemQuery = selectorFamily({ | |
key: 'ItemQuery', | |
get: cursor => () => ApiCall(cursor), | |
}); | |
const currentCursorInternal = atom<number>({ | |
key: 'currentCursorInternal', | |
default: 0, | |
}); |
This file contains 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 React, {useState, useEffect} from 'react'; | |
import useLocalStorage from 'use-local-storage'; | |
const AdressBook = () => { | |
const [book , setBook] = useLocalStorage('addressbook', [{}]) | |
const [name, setName] = useState('') | |
const [address, setAddres] = useState('') |
This file contains 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 observable(v){ | |
this.value = v; | |
this.valueChangedCallback = null; | |
this.setValue = function(v){ | |
if(this.value != v){ | |
this.value = v; | |
this.raiseChangedEvent(v); | |
} |
This file contains 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
// add this class to the div | |
.centerAnElement { | |
display: flex; | |
justify-content: center; | |
align-items: center; | |
} |
This file contains 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 { useEffect, useRef } from "react"; | |
export default function App() { | |
// create a ref | |
const divElement = useRef(); | |
// trigger on the first render of the component | |
useEffect(() => { | |
// get the height of the div element | |
console.log( |
This file contains 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 React, { useEffect, useState, useRef, useMemo, useCallback } from 'react'; | |
import { Text, Editor, createEditor, Node, Range, Point, Transforms } from 'slate'; | |
import { | |
Slate, | |
Editable, | |
withReact, | |
useSelected, | |
useFocused, | |
useSlate } from 'slate-react'; | |
import { withHistory } from 'slate-history'; |
This file contains 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 React from 'react'; | |
import type { ExternalToast, ToastT, PromiseData, PromiseT, ToastToDismiss, ToastTypes } from './types'; | |
let toastsCounter = 1; | |
class Observer { | |
subscribers: Array<(toast: ExternalToast | ToastToDismiss) => void>; | |
toasts: Array<ToastT | ToastToDismiss>; | |
constructor() { |
OlderNewer