- Pull Request to website (March 22, 2018) - https://pagure.io/fedora-websites/pull-request/793
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
#!/bin/zsh | |
set -euo pipefail | |
# yarn.lock 문제의 해소는 크게 3단계로 나뉩니다. | |
# | |
# 1. 먼저 conflict 난 파일 목록에 yarn.lock 외의 다른 파일이 없는지 봅니다. | |
# 2. 없다면, yarn.lock을 고칩니다. | |
# 3. 고쳐졌다면, 현재 작업이 merge/rebase인지 확인하고 알맞게 동작합니다. | |
# Copyright (c) 2024 Software Freedom Conversancy |
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 { xxh32 } = require('@node-rs/xxhash-win32-x64-msvc'); // change it if you use another platform | |
xxh32('1'); |
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 { Img, HTMLChakraProps } from '@chakra-ui/core'; | |
import NextImage from 'next/image'; | |
import { forwardRef, Ref } from 'react'; | |
type NextImageProps = Parameters<typeof NextImage>[0]; // should be replaced with import from next when it exports its type | |
export type ImageProps = Omit< | |
HTMLChakraProps<'img'>, | |
'src' | 'srcSet' | 'ref' | 'width' | 'height' | 'loading' | 'w' | 'h' // TODO let it work with Chakra width/height props | |
> & | |
NextImageProps; |
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
struct Fibonacci(usize, usize); | |
impl Iterator for Fibonacci { | |
type Item = usize; | |
fn next(&mut self) -> Option<Self::Item> { | |
let second = self.1; | |
self.1 = self.0 + self.1; | |
self.0 = second; | |
Some(self.1) | |
} | |
} |
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
use std::io::{stdin, stdout, BufRead, BufWriter, Write}; | |
fn main() { | |
let stdin = stdin(); | |
let mut stdin = stdin.lock(); | |
let stdout = stdout(); | |
let mut stdout = BufWriter::new(stdout.lock()); | |
// your code here | |
} |
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
/// Recursive | |
fn gcd<T>(a: T, b: T) -> T where T: std::ops::Rem<Output = T> + Eq + From<u8> + Copy { | |
if b == T::from(0u8) { | |
a | |
} else { | |
gcd(b, a % b) | |
} | |
} | |
/// Iterated |
Only tested in CP-949.
- This will only work on the codepages below.
- Windows codepages: 874, 1250-1258
- IBM codepages: 437, 737, 775, 808, 850, 852, 855-858, 860-866, 869, 922, 1046, 1124, 1125, 1129, 1133, 1161-116
- Multi-byte: 932, 936, 949, 950
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 { styled as original } from 'linaria/react' | |
import { JSX, ComponentType, FunctionComponent } from 'preact' | |
// | |
// Preact Types | |
// Literally copied from Preact source code. | |
// see https://github.com/preactjs/preact/blob/master/src/index.d.ts | |
// The MIT License (MIT), Copyright (c) 2015-present Jason Miller | |
// ----------------------------------- |
This C code recieves a CSV data from stdin, and returns the result via stdout. You can pipe your data to put and extract both input and output.
- Supports automatic numberic conversion. (decimal only)
- Supports real-time output right from stdout.
- Does not support double quoted items (therefore not RFC 4180 compatiable)
NewerOlder