- Open
.git/configfile. - Add
autocrlf = falseandsafecrlf = trueto[core]section. - Save the file.
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
| //// ES 5 | |
| function onlyUnique(value, index, self) { | |
| return self.indexOf(value) === index; | |
| } | |
| // usage example: | |
| var a = ['a', 1, 'a', 2, '1']; | |
| var unique = a.filter(onlyUnique); | |
| console.log(unique); // ['a', 1, 2, '1'] |
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
| -- Query to convert table and all its column type to utf8 | |
| ALTER TABLE <Table_Name> CONVERT TO CHARACTER SET utf8; | |
| -- Query to generate Alter Table for all tables | |
| SELECT CONCAT("ALTER TABLE ", TABLE_SCHEMA, '.', TABLE_NAME," CONVERT TO CHARACTER SET utf8;") AS ExecuteTheString | |
| FROM INFORMATION_SCHEMA.TABLES | |
| WHERE TABLE_SCHEMA="<Database_Name>" | |
| AND TABLE_TYPE="BASE TABLE"; |
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 { useMousePosition } from "~/hooks/useMousePosition"; | |
| /** Component to cover the area between the mouse cursor and the sub-menu, to allow moving cursor to lower parts of sub-menu without the sub-menu disappearing. */ | |
| export function MouseSafeArea(props: { parentRef: React.RefObject<HTMLDivElement> }) { | |
| const { x = 0, y = 0, height: h = 0, width: w = 0 } = props.parentRef.current?.getBoundingClientRect() || {}; | |
| const [mouseX, mouseY] = useMousePosition(); | |
| const positions = { x, y, h, w, mouseX, mouseY }; | |
| return ( | |
| <div |
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
| input.datetime { | |
| position: relative; | |
| width: 158px; | |
| height: 38px; | |
| color: white; | |
| } | |
| input.datetime:before { | |
| position: absolute; | |
| top: 8px; |
mysql --u root --p
SET global
net_buffer_length=1000000; --Set network buffer length to a large byte number
SET global
max_allowed_packet=1000000000; --Set maximum allowed packet size to a large byte number
SET foreign_key_checks=0; --Disable foreign key checking to avoid delays, errors and unwanted behaviourOlderNewer