Skip to content

Instantly share code, notes, and snippets.

@sergeysova
Created March 23, 2022 20:25
Show Gist options
  • Save sergeysova/a7b4d2ba34ba22e16b9e1b25369afcf7 to your computer and use it in GitHub Desktop.
Save sergeysova/a7b4d2ba34ba22e16b9e1b25369afcf7 to your computer and use it in GitHub Desktop.
const phrase = `
This, like a preacher, spoke Yevgeny.
Eyes blinded, as the salt tears choked,
Tatyana, breathless, uncomplaining,
Was listening to him as he spoke.
He gave his arm. Far from ecstatic,
With movements now called “automatic”,
She lent on him (nothing was said),
And languidly inclined her head.
The came back round the kitchen garden,
Strolling together. No one would
Have thought this anything but good,
For rural laxity can pardon
Most things within its happy laws,
As also snooty Moscow does.
Our Northern Winter’s fickle Summer,
Than Southern Winter scarce more bland—
Is undeniably withdrawing
On fleeting footsteps from the land.
Soon will the Autumn dim the heavens,
The light of sunbeams rarer grown—
Already every day is shorter,
While with a smitten hollow tone,
The forest droops its shadow leafage;
Upon the fields the mists lie white,
In lusty caravans the wild geese
Now to the milder South take flight;
Seasons of tedium draw near,
Before the door November drear!
That I should write to you, will tell
Far more than I have words to say—
Will give you power, I know too well,
With scorn my boldness to repay.
But surely if your heart has got
Even one drop of pity, you will not
Leave me alone to my unhappy lot.
Silence seemed best when first you came;
You never would have known by shame,
If I had hoped I only might
Just see you sometimes—once a week,
And say one word and hear you speak;
Then, till next time, enjoy the right
To think about you day and night.
My uncle, following well-tried custom,
When his last illness came to stay,
Sent for me, made himself respected
Nor could have found a better way.
But heavens ! Is there a worse boredom
Than nursing someone day and night
Who will not let you out of sight ?
Is there a cruelty more base
Than cheering someone half-alive,
Pouring his medicine with dejected face,
Shaking his pillow, with a groan,
Sighing; while inwardly you’re thinking:
“ When will the devil fetch his own ? ”
‘When my uncle, a man of the highest principles, fell seriously ill, he made himself respected and could have thought out no better way; his example is a lesson to others. But, my God, what a bore to sit with a sick man day and night without going so much as a pace away! What low cunning to amuse someone half-alive, to adjust his pillows, with gloomy countenance to bring him his medicine, to sigh and to think to oneself “When will the devil take you”’
A person of unblemished morals
“My uncle was. When he fell ill, —
Opposing needless talk and quarrels,
On all he would enforce his will —
Indeed! A standard high to others!
But how, in faith it bores and bothers
To watch sick people night and day,
Not venturing to go away!
Oh ’t is a piece of wildly badness
To entertain a man half-dead,
To change the pillows of his bed
And give him medicine with sadness
And think in secret with a sigh
Oh! bodikins! When will you die?“
Another trouble I foresee:
To save the honor of my land
I shall be forced without a doubt,
To translate Tatyana’s letter.
She hardly knew her native Russian,
Our newspapers she never read,
And could express herself but badly
In her own mother tongue.
Accordingly she wrote in French.—
What’s to be done, again I say?
Down to this day a lady’s love
In Russian ne’er hath been expressed.
Down to this day a lady’s love
In Russian ne’er hath been expressed.
Down to this day our haughty tongue
To prose of letters is not used.
My uncle, rich and well respected,
When his old bones began to ache,
Determined not to be neglected,
(A proper line for him to take).
The moral’s hardly worth exploring,
But, Oh my God! How deadly boring
There at bedside night and day
And never walk a step away !
The meanness and degradation
To smile and keep his spirits up,
Then lay the pillows in their station
And sadly tilt a medicine cup,
To sigh and think at every cough
When will the Devil take him off?
‘MY UNCLE, honouring tradition
When ill, from active life withdrew,
Compelled respect for his position;
’Twas quite the best that he could do.
Example worthy emulating,
But, bless my soul! How irritating
To play nursemaid night and day
And never stir a step a away!
How mean and low, in posture humble,
To entertain the half-alive,
To straighten the half-alive,
To straighten pillows, and contrive
To bring his physic, never grumble,
And, sighing, think but never say:
The devil fly with you away!’
The dawn will come, and every cloud
The sun’s bright rays will swiftly banish,
But I perchance in a cold shroud
From life eternally shall vanish;
The mem’ry of the youthful singer
For one brief summer yet may linger,
The world I know will soon forget,
But will you weep in true regret
Beloved, for my untimely doom,
And whisper thus, “He loved me only,
He gave his life, pathetic, lonely
To earth and death’s eternal gloom?”
O tender friend, O friend so dear,
Come, come, and soothe thy lover’s fear.
`
const komoRebi = (phrase) => {
const ALPHABET_LENGTH = 26;
const CHAR_CODES_OFFSET = 65;
const alphabet = [...Array(ALPHABET_LENGTH)].map((_, i) => String.fromCharCode(i + CHAR_CODES_OFFSET).toLowerCase());
return alphabet.every(char => phrase.toLowerCase().includes(char));
}
const LETTERS_COUNT = 26;
const UPPER_START = 65;
const UPPER_END = 90;
const LOWER_START = 97;
const LOWER_END = 122;
const sergeysova = (phrase) => {
let count = 0;
const letters = Array.from({ length: LETTERS_COUNT });
for (let i = 0; i < phrase.length; i++) {
const charCode = phrase.charCodeAt(i);
let index
if (charCode >= UPPER_START && charCode <= UPPER_END) {
index = charCode - UPPER_START;
} else if (charCode >= LOWER_START && charCode <= LOWER_END) {
index = charCode - LOWER_START;
} else {
continue;
}
if (!letters[index]) {
count++
letters[index] = true
}
}
return count === LETTERS_COUNT;
}
const oserna1 = (phrase) => new Set(phrase.toLowerCase().match(/[a-z]/g)).size === 26;
function diassia(phrase) {
let newString = new Set((phrase.replace(/\W|\d/g, '')).toLowerCase());
if (newString.size == 26) {
return true;
} else {
return false;
}
}
const risavkarna = (phrase) => {
const allLetters = "abcdefghijklmnopqrstuvwxyz";
const allLettersArr = allLetters.split("");
const phraseArr = phrase.toLowerCase().split("");
return allLettersArr.every(alphabet => phraseArr.includes(alphabet));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment