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
Different languages use different writing systems, such as the Latin alphabet, Cyrillic script, or Arabic script. | |
Examining the characters used in the text can provide clues about the language. | |
Identifying common words and phrases in the text can help narrow down the language. | |
Analyzing the patterns of grammar used in the text can help identify the language. | |
Languages have distinct grammar rules, including sentence structure, verb conjugation, and noun declension. | |
The way words are arranged in a sentence can also provide clues about the language. | |
By examining these and other linguistic features of a text, it is possible to make an educated guess about the language in which it is written. | |
Deducing the language of a text involves analyzing various linguistic features of the text and comparing them to patterns and characteristics of different languages. Seeing the name of a language inside the text does not automatically mean it is the language of the text. |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<rss version="2.0" xmlns:atom="https://www.w3.org/2005/Atom"> | |
<channel> | |
<atom:link href="https://www.homecinesolutions.fr/p.rss" rel="self" type="application/rss+xml"/> | |
<title>Notre flux RSS a déménagé !</title> | |
<description>Notre flux RSS a déménagé !</description> | |
<link>https://www.homecinesolutions.fr/p.rss</link> | |
<item> | |
<title>Notre flux RSS a déménagé !</title> | |
<pubDate>Sat, 05 Mar 2022 15:41:16 +0100</pubDate> |
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
# frozen_string_literal: true | |
# Nifty Generators - https://github.com/ryanb/nifty-generators | |
# | |
# copy from Nifty Generators, | |
# markup optimized for bootstrap | |
# | |
# Usage: | |
# <%= f.error_messages %> | |
# <%= error_messages_for(@object) %> |
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
10.32.round(-1) | |
# 10 | |
11.32.round(-1) | |
# 10 | |
19.32.round(-1) | |
# 20 | |
19.32.ceil(-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
# frozen_string_literal: true | |
require "benchmark" | |
array = [4, 5, 6, 11, 12, 20, 40, 64, 65, 66, 81, 83].freeze | |
set = Set.new(array).freeze | |
n = 10_000_000 | |
Benchmark.bm(7) do |x| | |
x.report("array found at position 0") { n.times { array.include?(4) } } |
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
before = Process.clock_gettime(Process::CLOCK_MONOTONIC) | |
50_000.times { tag.span("hey") } | |
after = Process.clock_gettime(Process::CLOCK_MONOTONIC) | |
Rails.logger.debug %(tag.span("hey") } #{after - before}s) | |
before = Process.clock_gettime(Process::CLOCK_MONOTONIC) | |
50_000.times { tag.span { "hey" } } | |
after = Process.clock_gettime(Process::CLOCK_MONOTONIC) | |
Rails.logger.debug %(tag.span { "hey" } } #{after - before}s) |
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
require "benchmark/ips" | |
HASH = ("a".."zz").to_a.shuffle.to_h { |e| [e, "#{e}#{e}#{e}"] } | |
KEY = "zz" | |
def key_fast | |
HASH.key? KEY | |
end | |
def key_slow |
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
# Rewrite all commits without a certain directory | |
java -jar ~/Downloads/bfg-1.13.0.jar --delete-folders "vcr_cassettes" | |
# Remove garbage | |
git reflog expire --expire=now --all && git gc --prune=now --aggressive | |
# Push to your repo | |
git remote add origin [email protected]:my-org/my-repo.git | |
git push -u origin master |
NewerOlder