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 fakeObjectSymbol = Symbol('fakeObject'); | |
| function getFakeNestedObject(baseName) { | |
| return new Proxy( | |
| { | |
| toString() => baseName, | |
| deps: baseName, | |
| [fakeObjectSymbol]: true, | |
| }, | |
| { |
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 { ChevronUpDownIcon } from '@heroicons/react/24/outline'; | |
| import { PropsWithChildren, useContext, useState } from 'react'; | |
| import { | |
| Button as ButtonBase, | |
| Collection, | |
| Popover, SelectStateContext, | |
| TreeItemProps, | |
| UNSTABLE_Tree as Tree, | |
| UNSTABLE_TreeItem as TreeItem, | |
| UNSTABLE_TreeItemContent as TreeItemContent, |
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 Bun from 'bun'; | |
| import * as ts from 'typescript'; | |
| import { factory } from 'typescript'; | |
| const glob = new Bun.Glob('src/**/*.{ts,js,jsx,tsx}'); | |
| const tImportFactory = factory.createImportDeclaration( | |
| undefined, | |
| factory.createImportClause( |
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
| from django.db import transaction | |
| from ordered_model.serializers import OrderedModelSerializer | |
| from rest_framework import serializers | |
| from rest_framework.serializers import ListSerializer | |
| class ReplaceListSerializer(ListSerializer): | |
| @transaction.atomic() | |
| def update(self, instances, validated_data): | |
| ins_mapping = {ins.id: ins for ins in instances} |
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
| git --no-pager branch --merged main | xargs git branch -d |
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
| #include <iostream> | |
| #include <string> | |
| #include <list> | |
| #include <unordered_map> | |
| #include <set> | |
| using namespace std; | |
| #ifndef CC_CFG_H | |
| #define CC_CFG_H |
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
| package practice; | |
| import java.io.File; | |
| import java.io.FileNotFoundException; | |
| import java.util.ArrayList; | |
| import java.util.LinkedList; | |
| import java.util.Scanner; | |
| public class eliminate_lr { |
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
| let conf = { | |
| flipX: false, | |
| flipY: true, | |
| angle: 180, | |
| }; | |
| function rotate(){ | |
| let theaterButton = $('.ytp-size-button.ytp-button'); | |
| if (theaterButton.title.includes("Theater")) { | |
| setTimeout(rotate, 200); |
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 { Component, createRef, RefObject } from "react"; | |
| import c from 'classnames'; | |
| /*--------------------- | |
| * Component Types | |
| *---------------------*/ | |
| interface State { | |
| years: number[], | |
| selected: string[], |
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 math | |
| def r(x): | |
| return str(round(x, 6)) | |
| def bisection_print(fn, xl, xu, last_xm=None, last_err=None, iter=1): | |
| out_str = f"\\textbf{{Iteration {iter}}}\n\n" | |
| out_str += "\n\\vspace{20pt}\\textbf{Step 1}\n" | |
| out_str += f"$$ x_{{l}} = {r(xl)}, x_{{u}} = {r(xu)} $$\n" |
NewerOlder