text:
AN EXAMINATION OF A LECTURE DELIVERED BY THE XXTITLEANDNAME On the religious
opinions and faith of the XXLDS, and some of his most prominent errors and
misstatements corrected.

ON Thursday, the seventh of May, A.D. XXYEAR, I left XXCITY, to visit my
friends in the state of XXSTATE. No sooner had I reached XXCITY XXCOUNTY, than
I was informed that the XXTITLEANDNAME, a Presbyterian Priest, of XXCITY
XXSTATE, had made an appointment to deliver a public lecture on Sunday, May
10th, XXYEAR, at four o'clock P.M., in Imlay's Hill meeting house,
refuting the doctrine, or tenets believed by the XXLDS, (Mormons.)

When the hour for meeting had come, several of my friends requested me to go
with them and hear what the Rev. gentleman had to say: accordingly I went. The
meeting was opened by singing and prayer. XXTITLEANDNAME then arose and
commenced his Lecture in a very sanctimonious way, and with a long face,
(Pharisee like,) expressed his pretended desire that his auditors, together
with himself, might be guided by truth and charity.

Indeed, from the drawing of his words, and his apparently half crying tone of
voice, one who was not acquainted with the deception would have supposed he
was all piety from the crown of his head to the soles of his feet. During his
lecture, with a pretended sympathy for the poor deluded Mormons, as he called
them, and with this strange tone of voice, he described the awful delusions
palmed upon the public by the Mormons. Some few of his female auditors, who
sat near me, uttered some tremendous long sighs, as though they or some body
else were on the eve of making an everlasting leap into eternity, to be
tormented with the damned. In this theatrical way he endeavored to work upon
the animal feelings of his auditors: this also being his most effectual way in
getting converts. And, of all the absurdity, contradiction, and nonsense, that
I ever heard drop from the lips of a man who professes literary talents,
XXTITLEANDNAME's. crowned the climax. And in consequence of his profession,
and bold stand, against the faith of the XXLDS, I took my pencil and wrote all
the heads of his discourse; also, several passages of Scriptures, that he
applied as testimony: and by request, I set myself at work to publish them for
the satisfaction of the people residing in the neighborhood where this lecture
was delivered. I do not say that I shall give his words in full; but the real
sense and full extent of his assertions, I shall give. And if there is not
that connection, there might have been; the reader will pardon me, for I wrote
his assertions as he made them. But to proceed.

Text.--"..." XXSCRIP.

Now XXTITLEANDNAME, you applied this text to the Mormons; and you also read
the chapter as far as the ninth verse; but you were very careful not to read
the tenth verse, which says those foolish prophets were to say peace, when
there was no peace. God knows, and so does every body, that ever heard the
XXLDS preach, that they do not cry peace and safety, when there is no peace;
but to the contrary, they warn men to repent of their sins, and embrace the
Gospel, and prepare for the second coming of Christ. It is known to every one
that was present at your Lecture, that you cried peace to the Methodists,
Baptists, and all others, whom you would call Orthodox Societies. Therefore
your text, very appropriately applies to yourself.

'My brethren we have met to consider a new, and strange doctrine that has
come to our ears,--They (the Mormons,) have a new bible, if true, we ought to
know it.'

Now, XXTITLEANDNAME, I deny that we preach any new doctrine, because we preach
verbatim the same doctrine that Christ and the Apostles preached. As for its
being strange, it is what the Prophets have said concerning the coming forth
of the XXBOOKOFMORMON, and the great work of the Lord in the last days. (See
XXSCRIP, and XXSCRIP, XXSCRIP.)

We have no new bible, we are firm believers in the Old and New Testaments; we
do not call the XXBOOKOFMORMON a bible: therefore, XXTITLEANDNAME, you are
guilty of falsehood.

"..."

Well done, XXTITLEANDNAME, who made you so wise as all this comes to? Those
who profess to be so wise as you do, ought to study the Scriptures more
carefully, so as not to make such blunders. Let us see what the Apostles have
said on this subject.

"..."

XXSCRIP.

First, this Holy Spirit was poured out on the Apostles, on the day of
Pentecost; second, Peter quotes the prophecy of XXPROPHET to convince the Jews
that the apostles were not drunken; third, Peter adds his own words by way of
prediction, "..."

consequently he referred it to a generation then unborn, when all shall have
the spirit of prophecy; fourth, Peter promises this spirit on conditions of
repentance and baptism, to all that are afar off.

Every man who makes the Bible his study knows what the effects of that spirit
was, in the apostolic age of the world; and no man but a modern sectarian,
like XXTITLEANDNAME, would have ever dreamed that the effects of the spirit
were to be any different in the nineteenth century, from what they were in the
days of the apostles. Therefore, here is positive testimony that there is to
be both true prophets, and propheteses, in the last days. Peter and you are at
war; therefore, see ye to it. For my part I don't want to have any
controversy with a man like Peter. Did you think, XXTITLEANDNAME that your
auditors were all blind, and because you professed so much wisdom, you could
palm any deception upon them, no matter how absurd, without the least
investigation? If you did, you were mistaken, for there were present men of
intelligence, who have studied the Scriptures with care, and could
instantaneously detect your falsehoods.

XXPROPHET, speaking of the last days said, all shall know the Lord, from the
least, unto the greatest. John says, in his Book of Revelations, that the
angel showed him things which were to come; and one thing he saw was that
those who had the mark of the beast, were to shed the blood of Saints and
Prophets. Now these were to be true prophets, from the fact God is to visit
the nations with his wrath for shedding their blood. It is also said in
John's Revelations, that "..." Then, XXTITLEANDNAME, if you deny the spirit
of prophecy, you have neither the testimony of Jesus, nor the religion of
heaven: consequently, you are in the gall of bitterness, and the bonds of
iniquity, and woe be unto you if you repent not.

"..."

What if you did, is that any reason you should oppose the Scriptures, and make
so many assertions that are diametrically opposed to them. Indeed, sir, it is
not Mormonism alone that is struggling beneath your infidel thrusts, but it is
the whole truth of Heaven.

"..."

If we do, God knows we have a good reason for it; for the prophets have
testified that such a Book should come forth in the last days, (see XXSCRIP,
and XXSCRIP.) and God has raised up men of undoubted veracity, who testify of
these things to a certainty. If God sends forth another Book containing his
word, and testifies from the heavens to the truth of the same, and causes it
to be as well authenticated as any other revelations he has ever given, it
certainly would be equal in authority with the Bible; or what authority has
the Bible more than that?

"..."

We know they were according to your idea of the subject; for any thing like
the administration of angels, and immediate revelation from God, appears
strange to you, for you know nothing of any such things; but to the prophets
and apostles, it would not be strange.

"..."

This is another specimen of your intelligence. Please refer me to the
testimony you have to support such an assertion, either from sacred, or
profane history; then I will believe it. If your assertion be true, the
apostles had in their possession the tables of stone, written upon with the
finger of God; but perhaps you would say they had a transcript, or a
translation from them: then why did you say the original? We are told by
historians that the New Testament Scriptures were not compiled till two
hundred and fifty years after the birth of Christ. Again, the Gospel was
preached to both Jews and Gentiles, several years before the apostles wrote
their epistles in the Greek language: then how could they show the original,
when the original was not in existence. But perhaps you meant the Septuagint,
and if you did, you told a falsehood at any rate, for the Septuagint was
nothing but a translation from the Hebrew, the same as the XXBOOKOFMORMON is a
translation from the Egyptian inscribed on the plates before mentioned. When
you prove your above assertion to be true, I will prove that the moon is made
of green cheese.

"..."

Oh! What a wonderful thing this is! How many witnesses have you the testimony
of, who testify to the resurrection of Christ? I answer, only eight.* But no
doubt you will say above five hundred brethren saw him at once. Who wrote that
account? Answer. Paul. Then you have his testimony only for it. Did you ever
see the apostles? You of course will say no: then how do you know there ever
were such men? You don't know it, except by immediate revelation.--You
believe it from tradition, and the testimony of the Fathers, so called, etc.
Oh! then what a hard thing it is that the Mormons believe from the testimony
of twenty men from the wilderness, as you say, who testify to a certainty:
when you cannot produce one living witness who can testify to an actual
knowledge of the Bible. We know the Bible to be true, because God hath
revealed it in these last days, and we have living witnesses who can testify
to its truth. "..." (Jesus.)

* We have the testimony of but eight of the Apostles.

"..."

One would think, sir, that you understood the art of gold beating and
engraving, when you say it requires a plate the eighth of an inch thick to
admit of engravings. This is too foolish to need any further comment. Every
school boy knows that the Egyptian language is a much shorter one than the
English; so much so, that one page of Egyptian Hieroglyphics, at the least
calculation, will make, when translated, five English pages. You know better;
but no doubt you thought your auditors were all so ignorant that they could
not detect your falsehoods: but you were mistaken.

Now with respect to the several bushels of plates that four men could not turn
over with a handspike;--XXTITLEANDNAME where did you get that idea? Did you
dream it in the night while you were asleep; or did you come to the conclusion
that you would do evil that good may come, and tell as big a falsehood as you
could? Well done for XXTITLEANDNAME, you have told one at last that four men
could not turn over with a hand-spike. Surely you ought to have the premium.

"..."

We know that Jesus, and the apostles worked miracles; but it is no where to be
found, that they worked them, expressly to make men believe. It is not written
that faith comes by miracles; but miracles by faith: and for this reason the
Scripture reads, "..." XXSCRIP. The apostles could not cast out devils,
because of unbelief; but you may say that it required faith on the part of the
administrator; but not on the part of the one administered to. To this I say,
how often did Jesus say, "..." You may refer to instances where men believed
from the seeing of miracles; but that does not prove that miracles were
expressly to make men believe. We are told in Scripture, that miracles were
for the benefit of the Saints; not the unbeliever. (See XXSCRIP. XXSCRIP.
XXSCRIP.)

"..."

Now XXTITLEANDNAME, will you please to inform me what miracles XXPROPHET,
XXPROPHET, XXPROPHET, XXPROPHET, XXPROPHET, XXPROPHET, XXPROPHET, XXPROPHET,
XXPROPHET, XXPROPHET, XXPROPHET, XXPROPHET, XXPROPHET, XXPROPHET, XXPROPHET,
and many other prophets of the Bible did. We are told by Jesus, that a greater
prophet never was born of woman, than John the Baptist. We are also told that
he did no miracles, (See XXSCRIP.): therefore your assertion is false.
According to your rule we shall have to reject all the above mentioned
prophets.

When the Devil sought a sign of Christ, saying, make bread out of a stone, he
rebuked him, saying, ... A set of wicked priests, namely the Pharisees, came
tempting him afterwards, and sought a sign: Jesus saith unto them, "..."

Therefore, XXTITLEANDNAME, seeing that you have followed the example of your
great prototype, (the Devil,) and your predecessors, (the Pharisees,) in
asking a sign, I have no hesitation in believing that you are a child of the
Devil.

"..."

This is a matter of little or no consequence, for it will not effect our
soul's salvation either the one way or the other. You quoted XXSCRIP, "..."
to prove your position. It does not say that the spirit of man was formed at
the time of his birth, or thousands of years before;—your application was
wrong. How such a conclusion as this will follow, I am at a loss to tell.
Indeed sir, according to your logic, Luke wrote a falsehood when he said,
"..." You perverted every passage you read on this subject: for instance,
XXSCRIP and XXSCRIP, you said the spirit that God breathed into Adam was the
living soul; but the passage says "..." The word soul, in the Bible, is
ambiguous: in the above it has reference to the body of man, that was formed
out of the dust: in other places it means the immortal part of man. Your
arguments on this subject were sophistical; therefore they need no further
examination. Let every one search for themselves.

What fault can be found with that, when the Savior hath said, "..." I
perceive, sir, that your kind of faith is that which James said the Devils
had; a faith without works. Every person who knows any thing about the Bible,
ought to know that baptism is a commandment of God,— a necessary work. (See
XXSCRIP, XXSCRIP. XXSCRIP, XXSCRIP.) You said that baptism was not essential.
This is too barefaced an absurdity to need any comment: for when did God ever
give a nonessential commandment. The way you waved the subject of Baptism in
your charity for the Baptists, was a caution.

"..."

Here you are at war with the Bible. (See XXSCRIP, XXSCRIP.)

"..."

Here you make another blunder; for Christ was both circumcised and baptised.
Paul said, neither circumcision, or uncircumcision, availeth any thing. Again,
we should have to exclude the female part of the community, from the right of
being baptised: for none but the males were circumcised.

"..."

This is another blunder of yours. What did Christ mean when he addressed
himself to the Apostles, and said, "..." etc. but perhaps you will say this
was the Regeneration of the Spirit; but it is said that the Holy Ghost was not
yet given: therefore it must have been a regeneration of water.

"..."

This is another false assertion; and one that contradicts the Bible. Now it is
a fact, that the gift of tongues, or speaking in other languages, was given
for two important purposes. First, the Apostles on the day of Pentecost spoke
the different languages of the world, and there were present men that
understood them. Second, the Apostle Paul, mentions the speaking in unknown
tongues, (the tongues of Angels,) which he said they were to use for the
edification of the Church. "..." "..." "..." "..." (See XXSCRIP) Pray
XXTITLEANDNAME, tell me what this gift of interpretation was, or is for? Now
XXTITLEANDNAME, you ridiculed the idea of the Spiritual Gifts being in the
Church in the present age of the world: which is precisely what Peter, and
Paul, have said concerning false teachers, that were to come in the last days.
"..." Peter. "..." XXSCRIP

"..."

You quoted XXSCRIP, to prove a continued succession of the Church of Christ in
its purity. You also stated that the rock, that Christ said he would build his
Church upon, was the confession of Peter. Christ said no such thing. Peter had
just received a Revelation from God, and Christ said upon this* rock, I will
build my Church, and the gates of hell shall not prevail against it: but as
soon as the people ceased to get revelation they ceased to be built upon the
rock. The gates of hell never prevailed against those that were built upon the
rock before mentioned; although the Devil's emissaries have killed their
bodies, yet they will be saved in eternity. Again, as soon as the human family
rejects the plan that Christ hath devised for salvation, and cease to build
upon the rock, then the Church will cease to exist on earth: is the only
logical conclusion that we can come to.

You next referred to XXSCRIP, to prove your position; and you said that it was
fulfilled at the first coming of Christ. Now I say boldly, that it was not
fulfilled then, for the kings, or kingdoms that Daniel describes, and which
were represented by the ten toes of the Image, that Nebuchadnezzar saw in his
dream, was not in existence at the first coming of Christ: neither did they
exist till several hundred years after it. Every man that knows any thing of
the predictions of the Prophets concerning the kingdom of God spoken of by
Daniel, knows that it will not be fully established on earth till the second
coming of Christ. Daniel said this "..." "..." "..."

(See XXSCRIP) John speaking of this kingdom said, "..." In connection with
this, John describes the awful consummation of the wicked, and the binding of
Satan, and the establishment of peace on earth, the commencement of
millennium, etc., all as being in the last days.

Now it is evident from Daniel that God, in the last days, is to commit a
dispensation of the Gospel to the children of men, (which was represented by
the stone cut out of the mountain,) that is to gather in the honest in heart,
that they may be prepared for the coming of Christ; at which time the kingdom
will be fully and completely established. John is plain on this subject; "..."
Paul says: "..." I might multiply quotations on this subject; but I forbear.
(Read the Savior's words on this subject.)

* The word This, is a demonstrative adjective pronoun, which precisely points
out the subject to which it relates. Does it relate to Peter, to Christ, or to
a communication that flesh and blood cannot communicate? Answer; to that which
flesh and blood cannot communicate.

You also referred to XXSCRIP, which is a rod for your own back, "..." Now I
ask, what is, or what was his governments? Answer; "..." Now this organized
order of government, which consisted of Apostles and Prophets, etc., does not
exist on earth except the XXLDS have it: and the fact that the Presbyterians
have not got it, proves to a demonstration that you have no part or lot in the
matter: consequently you must be numbered with those that have the mark of the
Beast. Your argument then falls to the ground, and your false assertions are
disclosed by the light of truth.

XXSCRIP, says, "..." It is evident from the reading of the whole chapter, that
the above relates to the last days. John says; "..." Daniel says the same in
amount.

The fact that the church was anciently organized with Apostles and Prophets,
etc. (See Cor. xii. chap. XXSCRIP. chap.) and then the fact that this order
has not been in existence, for several hundred years, proves to a certainty
that the Church of Christ, in its organized form, has not been on earth for
the last several hundred years. As respects your Bonaparte comparison, it is
too silly for me to bother with.

"..."

Now XXTITLEANDNAME, when did God ever send his servants into the world to
testify of his truth, and then save those who rejected their testimony. Oh!
common sense whither art thou gone? Oh! propriety whither art thou fled? O
Tempora!! O Mores!! Here we need battalions of interjections, to express our
wonder and astonishment at your ignorance. If God hath sent the Presbyterians,
he will damn every person who rejects their testimony, after hearing them: for
he never has but one Church on earth at a time; that is his own. Now,
XXTITLEANDNAME, if you conscientiously believe the Mormons are wrong, and that
they do not testify the truth; why are you so uneasy; as though you were among
nettles? or why do you act like the Ephesian of old? who said, "..." Surely,
if we are wrong you need not fear. Your conduct shows to the world that there
is dubity on your own mind with regard to the truth of your own religion. If
you are on the rock you need not fear.

"..."

The Mormons are not compelled to do any such thing; but to the contrary, we
disfellowship every person that denies the Bible. We are firm believers in the
Bible, and for this reason we cannot give you the right hand of fellowship.

"..."

True; but Paul said there was but one Spirit of God, and that the effects of
it were Revelations, Prophecyings, Tongues, Healings, etc. All spirits that do
not produce these effects are not of God; therefore seeing that you have
denied the workings of miracles, and the other gifts of the Spirit, before
mentioned, and say they are not necessary now-a-days, you have not the Spirit
of God; but a false spirit, and this we know from the many falsehoods you have
told.

"..."

How do you know that? Prove it, and I will believe it. XXPROPHET tells us of
great miracles that are yet to be performed. You, and the prophets for it.
(See XXSCRIP)

"..."

XXTITLEANDNAME, how do you know that God will do that? has he ever told you he
would do so? I say no; for you deny immediate Revelation: therefore your
assertion is a presumptuous one.

"..." Your falsehoods show what a desire you have to do them good. "..."

There is another falsehood.

"..."

Now XXTITLEANDNAME, if you did but know, it was the falsehoods, that have been
put in circulation by priests like yourself, that have caused the blood of
Saints and Prophets to flow in this nineteenth century: and perhaps your
falsehoods, will serve to enliven the spirit of mobocracy, and help to
encourage the rabble and cause the blood of more Saints to be shed, and cry to
God for vengeance against you, and all others engaged in telling falsehoods.

[PRAYER.] "..."

Well done! XXTITLEANDNAME, to crown the climax of all your falsehoods, you
told the Lord one. It is bad enough to lie to man; let alone lying to God. I
challenge you, or any other man, to meet a Latter-Day Saint, face to face, and
prove one item of the doctrine we believe to be false, or in opposition to the
Bible.

To conclude, I say that XXTITLEANDNAME is guilty of falsehoods, of the most
glaring kind, and except he repent, and acknowledge his wickedness, that he
may undeceive those, (if there were any,) who were deceived by his lecture,
God will curse him, and the cloud of iniquity, and falsehoods, will rest upon
his own head: so that he will shudder at the thought of standing in the
presence of God, on the day when the secrets of all hearts shall be made
manifest; and those whom he has deceived will annoy him in eternity: therefore
woe be unto him if he repent not. John says, "..."

XXTITLEANDNAME, in order to get from under these things, may say that I have
misrepresented his assertions; (I have plenty of witnesses to corroborate me,)
and no wonder if he should; for when a man's refuge of lies is disclosed, it
makes him feel very uneasy, and he will get from under the yoke if he can.
Some may think strange of my sharpness, and say that I have not charity; but I
can testify that I have the same kind of charity that Jesus had for the
Pharisees. (See XXSCRIP)

I am determined hereafter, that no man shall get up before a congregation in
my presence, and lie so unaccountably about the truth of God; but that he
shall hear of it again. And if he does not want to be exposed, let him keep
truth on his side; for God hath sent me to proclaim the truth, and disclose
the refuge of lies. Therefore, I pray God, that the sword of truth may be
unsheathed, until it sweeps the refuge of lies from the earth.


text:
import Test from '../../../../../../ui/components/test.jsx';
import fixture from '../../../../../fixtures/components/passed/details-diff.js';
import {render, stubMethod, getChildProps} from '../../../../helpers.js';

describe('Test', function() {
  describe('Children', function() {
    describe('Passed Test with diffs', function() {
      let props, paths, component, expectedPaths;

      beforeEach(function() {
        stubMethod(Test, 'render', null);
        component = render(Test, fixture);
        props = getChildProps(component, 'detailsWithDiff',
            [fixture.paths, fixture.error]);
        paths = props.paths;
        expectedPaths = fixture.paths;
      });

      it('should pass the baseline path', function() {
        expect(paths.baseline).to.equal(expectedPaths.baseline);
      });

      it('should pass the diff path', function() {
        expect(paths.diff).to.equal(expectedPaths.diff);
      });

      it('should pass the screenshot path', function() {
        expect(paths.screenshot).to.equal(expectedPaths.screenshot);
      });

      it('should have the error object undefined', function() {
        expect(props.error).to.be.undefined;
      });
    });
  });
});

redpajama_set_name: RedPajamaGithub


text:
'use strict';

const assert = require('../../utils/assert');
const createDocument = require('domino').createDocument;
const path = require('path');
const fs = require('fs');

const parseDefinitions = require('../../../lib/definitions/parseDefinitions');

function parse(name) {
    const data = fs.readFileSync(path.resolve(__dirname, `../../fixtures/wiktionary/${name}.htm`),
        'utf8');
    return parseDefinitions(createDocument(data), 'en.wiktionary.org', name);
}

function toText(html) {
    return createDocument(html).body.textContent;
}

describe('lib:definitions', () => {
    const avere  = parse('avere');
    const kuulua = parse('kuulua');

    describe('Level 2 headers', () => {
        it('extracts them to language code keys', () => {
            assert.deepEqual(Object.keys(avere), ['ast', 'it', 'la', 'ro', 'roa-tara']);
        });
    });

    describe('parts of speech', () => {
        it('is set', () => {
            assert.deepEqual(avere.it.map(e => e.partOfSpeech), ['Verb', 'Noun']);
        });
    });

    describe('language', () => {
        it('is set on each entry', () => {
            avere.it.forEach(e => assert.deepEqual(e.language, 'Italian'));
        });
    });

    describe('definitions', () => {
        const definitions = kuulua.fi[0].definitions;
        assert.deepEqual(definitions.map(d => toText(d.definition)), [
            'to be heard/audible',
            'to be said',
            "Used to refer to the state of one's life.",
            '( ~ + allative) to belong (showing ownership or location)',
            '( ~ + illative) to belong (to be member of)',
            "( ~ + allative) to concern, to be someone's business"
        ]);
    });

    describe('examples', () => {

        describe('parsed', () => {
            describe('formatted with MediaWiki markup (#:/#::)', () => {
                it('extracts usage examples', () => {
                    const examples = kuulua.fi[0].definitions[5].parsedExamples;
                    assert.deepEqual(examples, [
                        {
                            example: 'Miten tämä sinulle kuuluu?',
                            translation: 'How does this concern you?'
                        },
                        {
                            example: 'Hän kysyi, mistä puhuin Samin kanssa. Sanoin, että se ' +
                                     'ei kuulu hänelle.',
                            translation: 'He asked what I was talking to Sam about. I told him ' +
                                         'it was none of his business.'
                        }
                    ]);
                });
            });

            describe('formatted with microformats', () => {
                it('extracts usage examples', () => {
                    const examples = avere.it.find(e => e.partOfSpeech === 'Verb')
                        .definitions[0].parsedExamples;

                    assert.deepEqual(examples, [
                        {
                            example: "Avevo un'anima.",
                            translation: 'I used to have a soul.'
                        },
                        {
                            example: 'Ho una macchina.',
                            translation: 'I have a car.'
                        },
                        {
                            example: 'Ho diciassette anni.',
                            translation: 'I am 17 years old.',
                            literally: 'I have 17 years.'
                        }
                    ]);
                });
            });
        });

        describe('unparsed/old format', () => {
            describe('formatted with MediaWiki markup (#:/#::)', () => {
                it('extracts usage examples', () => {
                    const examples = kuulua.fi[0].definitions[5].examples;
                    assert.deepEqual(examples, [
                        'Miten tämä sinulle kuuluu?',
                        'Hän kysyi, mistä puhuin Samin kanssa. Sanoin, että se ' +
                        'ei kuulu hänelle.'
                    ]);
                });
            });

            describe('formatted with microformats', () => {
                it('extracts usage examples', () => {
                    const examples = avere.it.find(e => e.partOfSpeech === 'Verb')
                        .definitions[0].examples;

                    assert.deepEqual(examples, [
                        "Avevo un'anima.",
                        'Ho una macchina.',
                        'Ho diciassette anni.'
                    ]);
                });
            });
        });
    });
});


text:
NodeTrack::NodeTrack(std::shared_ptr<Track> _track) : track(_track) {

};

NodeTrack::~NodeTrack() {

}

Handle<Value> NodeTrack::getName(Local<String> property, const AccessorInfo& info) {
  NodeTrack* nodeTrack = node::ObjectWrap::Unwrap<NodeTrack>(info.Holder());
  return String::New(nodeTrack->track->name().c_str());
}

Handle<Value> NodeTrack::getLink(Local<String> property, const AccessorInfo& info) {
  NodeTrack* nodeTrack = node::ObjectWrap::Unwrap<NodeTrack>(info.Holder());
  return String::New(nodeTrack->track->link().c_str());
}

Handle<Value> NodeTrack::getDuration(Local<String> property, const AccessorInfo& info) {
  NodeTrack* nodeTrack = node::ObjectWrap::Unwrap<NodeTrack>(info.Holder());
  return Integer::New(nodeTrack->track->duration()/1000);
}

Handle<Value> NodeTrack::getPopularity(Local<String> property, const AccessorInfo& info) {
  NodeTrack* nodeTrack = node::ObjectWrap::Unwrap<NodeTrack>(info.Holder());
  return Integer::New(nodeTrack->track->popularity());
}

Handle<Value> NodeTrack::getArtists(Local<String> property, const AccessorInfo& info) {
  HandleScope scope;
  NodeTrack* nodeTrack = node::ObjectWrap::Unwrap<NodeTrack>(info.Holder());
  Local<Array> jsArtists = Array::New(nodeTrack->track->artists().size());
  for(int i = 0; i < (int)nodeTrack->track->artists().size(); i++) {
    if(nodeTrack->track->artists()[i]) {
      NodeArtist* nodeArtist = new NodeArtist(std::move(nodeTrack->track->artists()[i]));
      jsArtists->Set(Number::New(i), nodeArtist->getV8Object() );
    } else {
      jsArtists->Set(Number::New(i), Undefined() );
    }
  }
  return scope.Close(jsArtists);
}

Handle<Value> NodeTrack::getAlbum(Local<String> property, const AccessorInfo& info) {
  HandleScope scope;
  NodeTrack* nodeTrack = node::ObjectWrap::Unwrap<NodeTrack>(info.Holder());
  if(nodeTrack->track->album()) {
    NodeAlbum* nodeAlbum = new NodeAlbum(nodeTrack->track->album());
    return scope.Close(nodeAlbum->getV8Object());
  } else {
    return scope.Close(Undefined());
  }
}

Handle<Value> NodeTrack::getStarred(Local<String> property, const AccessorInfo& info) {
  NodeTrack* nodeTrack = node::ObjectWrap::Unwrap<NodeTrack>(info.Holder());
  return Boolean::New(nodeTrack->track->starred());
}

void NodeTrack::setStarred(Local<String> property, Local<Value> value, const AccessorInfo& info) {
  HandleScope scope;
  NodeTrack* nodeTrack = node::ObjectWrap::Unwrap<NodeTrack>(info.Holder());
  nodeTrack->track->setStarred(value->ToBoolean()->Value());
  scope.Close(Undefined());
}

Handle<Value> NodeTrack::isLoaded(Local<String> property, const AccessorInfo& info) {
  NodeTrack* nodeTrack = node::ObjectWrap::Unwrap<NodeTrack>(info.Holder());
  return Boolean::New(nodeTrack->track->isLoaded());
}

Handle<FunctionTemplate> NodeTrack::init() {
  HandleScope scope;
  Handle<FunctionTemplate> constructorTemplate = NodeWrapped::init("Track");
  constructorTemplate->InstanceTemplate()->SetAccessor(String::NewSymbol("name"), getName);
  constructorTemplate->InstanceTemplate()->SetAccessor(String::NewSymbol("link"), getLink);
  constructorTemplate->InstanceTemplate()->SetAccessor(String::NewSymbol("duration"), getDuration);
  constructorTemplate->InstanceTemplate()->SetAccessor(String::NewSymbol("artists"), getArtists);
  constructorTemplate->InstanceTemplate()->SetAccessor(String::NewSymbol("album"), getAlbum);
  constructorTemplate->InstanceTemplate()->SetAccessor(String::NewSymbol("starred"), getStarred, setStarred);
  constructorTemplate->InstanceTemplate()->SetAccessor(String::NewSymbol("popularity"), getPopularity);
  constructorTemplate->InstanceTemplate()->SetAccessor(String::NewSymbol("isLoaded"), isLoaded);
  constructor = Persistent<Function>::New(constructorTemplate->GetFunction());
  return scope.Close(constructorTemplate);
}


text:
namespace konstructs {
    using Eigen::Vector2i;
    using nonstd::optional;
    using nonstd::nullopt;

    class BaseModel : public BufferModel {
    public:
        BaseModel(const GLuint position_attr, const GLuint normal_attr,
                  const GLuint uv_attr);
        virtual void bind();
        virtual int vertices();
    protected:
        int verts;
    private:
        const GLuint position_attr;
        const GLuint normal_attr;
        const GLuint uv_attr;
    };

    class ItemStackModel : public BaseModel {
    public:
        ItemStackModel(const GLuint position_attr, const GLuint normal_attr,
                       const GLuint uv_attr,
                       const std::unordered_map<Vector2i, ItemStack, matrix_hash<Vector2i>> &stacks,
                       const BlockData &blocks);
    };

    class AmountModel : public BaseModel {
    public:
        AmountModel(const GLuint position_attr, const GLuint normal_attr,
                    const GLuint uv_attr,
                    const std::unordered_map<Vector2i, ItemStack, matrix_hash<Vector2i>> &stacks);
    };

    class HudModel : public BaseModel {
    public:
        HudModel(const std::unordered_map<Vector2i, int, matrix_hash<Vector2i>> &background,
                 const GLuint position_attr, const GLuint normal_attr,
                 const GLuint uv_attr);
    };

    class BlockModel : public BaseModel {
    public:
        BlockModel(const GLuint position_attr, const GLuint normal_attr,
                   const GLuint uv_attr,
                   const int type, const float x, const float y,
                   const float size,
                   const BlockData &blocks);
    };

    class HudShader: private ShaderProgram {
    public:
        HudShader(const int columns, const int rows, const int texture,
                  const int block_texture, const int font_texture);
        optional<Vector2i> clicked_at(const double x, const double y,
                                      const int width, const int height);
        void render(const int width, const int height,
                    const float mouse_x, const float mouse_y,
                    const Hud &hud,
                    const BlockData &blocks);

    private:
        const GLuint position;
        const GLuint normal;
        const GLuint uv;
        const GLuint matrix;
        const GLuint offset;
        const GLuint sampler;
        const int texture;
        const int block_texture;
        const int font_texture;
        const int columns;
        const int rows;
        const float screen_area;
    };
};
#endif


text: solution = lambda string: string[::-1]


text:
/* eslint-env node */
module.exports = {
  name: 'ember-cli-textarea-autosize',
  description: '',
  normalizeEntityName: function () {},
  afterInstall: function (/*options*/) {
    return this.addAddonsToProject({
      packages: [{ name: 'ember-cli-text-support-mixins', target: '~1' }],
    }).then(() => {
      return this.addPackagesToProject([{ name: 'autosize' }]);
    });
  },
};


text:
C# Version of SL DoS (Win 7 + )

Program Name: Unknown DoSeR

Reason: Why am I sharing it on Github while It is shared in Google?
Ans: I received this file from the creator and those shared on Google is not working mostly(Patched)

DO NOT RENAME THE .EXE !!

[COMMAND LINE]

You can launch an attack simply by running the program & by setting the options or from a batch file:

"Unknown DoSer release.exe" URL PORT METHOD RANDOMIZE_REQUEST TIMEOUT DURATION MAX_THREADS

URL [default:]: string, website's URL (e.g.: google.com)
PORT [default:80]: int, website's port (e.g.: 80)
METHOD [default:GET]: string, GET or POST (POST to bypass HttpReady) (e.g.: GET)
RANDOMIZE_REQUEST [default:N]: string, randomize request, Y for Yes or N for No (e.g.: N)
TIMEOUT [default:9001]: int, send timeout in seconds (e.g.: 5)
DURATION [default:9001]: int, attack duration in seconds (e.g.: 120)
MAX_THREADS [default:1000]: int, number of threads (e.g.: 250)

"Unknown DoSer release.exe" github.com 80 GET N 5 120 250 (SAMPLE)

[Unknown DDoS.exe]
https://dl.dropbox.com/s/8qh9u3tot1tkm6d/Unknown%20DoSer%20release.exe?dl=0

[.BAT FILE EXECUTABLE]
https://dl.dropbox.com/s/57bifal55puza3x/github%20ddos.bat?dl=0

[SAMPLE & CLEAN]
https://dl.dropbox.com/s/85aeddrrfw3mdyg/SAMPLE%20bat.txt?dl=0

[COMMAND LINE]
https://dl.dropbox.com/s/ogtdx559haw9c9q/Command%20line.txt?dl=0

[TO TEST IF DDOS WORKS]
https://dl.dropbox.com/s/zk7ubeaq5cf44bn/nursyafiera%20ddos%285%20min%29.bat?dl=0

Put all of them in the same folder or else it will not be working !!


text:
package com.cezarykluczynski.stapi.model.comic_strip.repository;

import com.cezarykluczynski.stapi.model.comic_strip.dto.ComicStripRequestDTO;
import com.cezarykluczynski.stapi.model.comic_strip.entity.ComicStrip;
import com.cezarykluczynski.stapi.model.comic_strip.entity.ComicStrip_;
import com.cezarykluczynski.stapi.model.comic_strip.query.ComicStripQueryBuilderFactory;
import com.cezarykluczynski.stapi.model.common.query.QueryBuilder;
import com.cezarykluczynski.stapi.model.common.repository.AbstractRepositoryImpl;
import com.google.common.collect.Sets;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Repository;

@Repository
public class ComicStripRepositoryImpl extends AbstractRepositoryImpl<ComicStrip> implements ComicStripRepositoryCustom {

	private final ComicStripQueryBuilderFactory comicStripQueryBuilderFactory;

	public ComicStripRepositoryImpl(ComicStripQueryBuilderFactory comicStripQueryBuilderFactory) {
		this.comicStripQueryBuilderFactory = comicStripQueryBuilderFactory;
	}

	@Override
	public Page<ComicStrip> findMatching(ComicStripRequestDTO criteria, Pageable pageable) {
		QueryBuilder<ComicStrip> comicStripQueryBuilder = comicStripQueryBuilderFactory.createQueryBuilder(pageable);
		String uid = criteria.getUid();
		boolean doFetch = uid != null;

		comicStripQueryBuilder.equal(ComicStrip_.uid, uid);
		comicStripQueryBuilder.like(ComicStrip_.title, criteria.getTitle());
		comicStripQueryBuilder.between(ComicStrip_.publishedYearFrom, criteria.getPublishedYearFrom(), null);
		comicStripQueryBuilder.between(ComicStrip_.publishedYearTo, null, criteria.getPublishedYearTo());
		comicStripQueryBuilder.between(ComicStrip_.numberOfPages, criteria.getNumberOfPagesFrom(), criteria.getNumberOfPagesTo());
		comicStripQueryBuilder.between(ComicStrip_.yearFrom, criteria.getYearFrom(), null);
		comicStripQueryBuilder.between(ComicStrip_.yearTo, null, criteria.getYearTo());
		comicStripQueryBuilder.setSort(criteria.getSort());
		comicStripQueryBuilder.fetch(ComicStrip_.comicSeries, doFetch);
		comicStripQueryBuilder.fetch(ComicStrip_.writers, doFetch);
		comicStripQueryBuilder.fetch(ComicStrip_.artists, doFetch);
		comicStripQueryBuilder.fetch(ComicStrip_.characters, doFetch);

		Page<ComicStrip> comicStripPage = comicStripQueryBuilder.findPage();
		clearProxies(comicStripPage, !doFetch);
		return comicStripPage;
	}

	@Override
	protected void clearProxies(Page<ComicStrip> page, boolean doClearProxies) {
		if (!doClearProxies) {
			return;
		}

		page.getContent().forEach(comicStrip -> {
			comicStrip.setComicSeries(Sets.newHashSet());
			comicStrip.setWriters(Sets.newHashSet());
			comicStrip.setArtists(Sets.newHashSet());
			comicStrip.setCharacters(Sets.newHashSet());
		});
	}

}


text:
from __future__ import unicode_literals

from django.db import migrations, models

class Migration(migrations.Migration):

    dependencies = [
        ('clients', '0001_initial'),
    ]

    operations = [
        migrations.AlterModelOptions(
            name='client',
            options={'ordering': ['id']},
        ),
        migrations.AlterField(
            model_name='client',
            name='notes',
            field=models.CharField(blank=True, default='', help_text='General notes', max_length=256, null=True),
        ),
        migrations.AlterField(
            model_name='client',
            name='reg_notes',
            field=models.CharField(blank=True, default='', help_text='Registration notes', max_length=256, null=True),
        ),
        migrations.AlterField(
            model_name='historicalclient',
            name='notes',
            field=models.CharField(blank=True, default='', help_text='General notes', max_length=256, null=True),
        ),
        migrations.AlterField(
            model_name='historicalclient',
            name='reg_notes',
            field=models.CharField(blank=True, default='', help_text='Registration notes', max_length=256, null=True),
        ),
        migrations.AlterField(
            model_name='historicalvisit',
            name='visited_at',
            field=models.DateTimeField(blank=True),
        ),
        migrations.AlterField(
            model_name='visit',
            name='visited_at',
            field=models.DateTimeField(blank=True),
        ),
    ]


text:
<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.1.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <servers>
    <server>
      <username>${NEXUS_USERNAME}</username>
      <password>${NEXUS_PASSWORD}</password>
      <id>central</id>
    </server>
    <server>
      <username>${NEXUS_USERNAME}</username>
      <password>${NEXUS_PASSWORD}</password>
      <id>snapshots</id>
    </server>
  </servers>
  <mirrors>
    <mirror>
      <mirrorOf>*</mirrorOf>
      <url>http://repo1.maven.org/maven2/</url>
      <id>central-mirror</id>
    </mirror>
  </mirrors>
</settings>


text:
using System.Threading.Tasks;
using Abp.Application.Services;
using AbpCoreEf6Sample.Sessions.Dto;

namespace AbpCoreEf6Sample.Sessions
{
    public interface ISessionAppService : IApplicationService
    {
        Task<GetCurrentLoginInformationsOutput> GetCurrentLoginInformations();
    }
}


text:
<?php

namespace Fidry\LaravelYaml\Tests\DependencyInjection\Resolver;

use Fidry\LaravelYaml\DependencyInjection\Resolver\BaseParametersResolver;
use Illuminate\Contracts\Config\Repository as ConfigRepositoryInterface;
use Prophecy\Argument;

/**
 * @covers Fidry\LaravelYaml\DependencyInjection\Resolver\BaseParametersResolver
 *
 * @author Théo FIDRY <theo.fidry@gmail.com>
 */
class BaseParametersResolverTest extends \PHPUnit_Framework_TestCase
{
    /**
     * @var ConfigRepositoryInterface
     */
    private $config;

    public function setUp()
    {
        $configRepositoryProphecy = $this->prophesize(ConfigRepositoryInterface::class);
        $configRepositoryProphecy->has(Argument::any())->willReturn(false);
        $this->config = $configRepositoryProphecy->reveal();
    }

    /**
     * @dataProvider provideParameters
     */
    public function testResolveParameters($config, $parameters, $expected)
    {
        $resolver = new BaseParametersResolver($config);
        $actual = $resolver->resolve($parameters);

        $this->assertEquals($expected, $actual);
    }

    /**
     * @expectedException \Fidry\LaravelYaml\Exception\DependencyInjection\Resolver\ParameterCircularReferenceException
     */
    public function testResolveParametersWithLoop()
    {
        $resolver = new BaseParametersResolver($this->config);
        $resolver->resolve([
            'foo' => '%bar%',
            'bar' => '%foo%',
        ]);
    }

    /**
     * @expectedException \Fidry\LaravelYaml\Exception\ParameterNotFoundException
     */
    public function testResolveParametersWithUnexistingParameter()
    {
        $resolver = new BaseParametersResolver($this->config);
        $resolver->resolve([
            'foo' => '%hello.world%',
        ]);
    }

    public function provideParameters()
    {
        $configRepositoryProphecy = $this->prophesize(ConfigRepositoryInterface::class);
        $configRepositoryProphecy->has('locale.default')->willReturn(true);
        $configRepositoryProphecy->get('locale.default')->willReturn('en-GB');
        $configRepositoryProphecy->has(Argument::any())->willReturn(false);

        yield [
            $configRepositoryProphecy->reveal(),
            [
                'boolParam' => true,
                'intParam' => 2000,
                'floatParam' => -.89,
                'objectParam' => new \stdClass(),
                'closureParam' => function () {},
                'class' => 'App\Test\Dummy',
                'lang' => [
                    'en',
                    'fr' => [
                        200,
                        '%class%',
                        '%%foo%%',
                    ],
                ],
                'refToClass' => '%class%',
                'hello' => 'world',
                'escapedVal1' => '%%hello%%',
                'escapedVal2' => '%hello%%',
                'escapedVal3' => '%%hello%',
                'refToNextParam' => '%nextParam%',
                'nextParam' => 'nextVal',
                'configVal' => '%locale.default%',
                'envVal' => '%env.test.value%',
            ],
            [
                'boolParam' => true,
                'intParam' => 2000,
                'floatParam' => -.89,
                'objectParam' => new \stdClass(),
                'closureParam' => function () {},
                'class' => 'App\Test\Dummy',
                'lang' => [
                    'en',
                    'fr' => [
                        200,
                        'App\Test\Dummy',
                        '%foo%',
                    ],
                ],
                'refToClass' => 'App\Test\Dummy',
                'hello' => 'world',
                'escapedVal1' => '%hello%',
                'escapedVal2' => 'world%',
                'escapedVal3' => '%hello%',
                'refToNextParam' => 'nextVal',
                'nextParam' => 'nextVal',
                'configVal' => 'en-GB',
                'envVal' => 'DummyEnvValue',
            ]
        ];
    }
}


text:
define(function() {

  'use strict';

  function Articulator(buffer, byteOffset, byteLength) {
    this.dv = new DataView(buffer, byteOffset, byteLength);
  }
  Articulator.prototype = {
    get connectionBlockCount() {
      return this.dv.getUint32(0, false);
    },
    get connectionBlocks() {
      var list = new Array(this.connectionBlockCount);
      var buffer = this.dv.buffer, byteOffset = this.dv.byteOffset + 4;
      for (var i = 0; i < list.length; i++) {
        list[i] = new ConnectionBlock(buffer, byteOffset, ConnectionBlock.byteLength);
        byteOffset += ConnectionBlock.byteLength;
      }
      Object.defineProperty(this, 'connectionBlocks', {value:list});
      return Object.freeze(list);
    },
  };

  function ConnectionBlock(buffer, byteOffset, byteLength) {
    this.dv = new DataView(buffer, byteOffset, byteLength);
  }
  ConnectionBlock.prototype = {
    get source() {
      return this.dv.getUint16(0, false);
    },
    get control() {
      return this.dv.getUint16(2, false);
    },
    get destination() {
      return this.dv.getUint16(4, false);
    },
    get transform() {
      return this.dv.getUint16(6, false);
    },
    get scalingValue() {
      return this.dv.getInt32(8, false);
    },
  };
  Object.defineProperty(ConnectionBlock, 'byteLength', {value:12});

  return {
    getTypeStruct: function(segment) {
      switch (segment.format.parameters['which']) {
        case 'articulator': return Articulator;
        default: return null;
      }
    },
  };

});


text:
-- options.coords: if true then coords will be shown on the node label rather
--  than the item number
local function getTGF(dungeon, options)
  --might be broken by changes to dungeon format
  options = options or {}

  local result = ""

  for _, room in ipairs(dungeon) do
    local nodeData = options.coords and "(" .. room.coords.x .. ", " .. room.coords.y .. ")" or (room.item or "")
    result = result .. "v" .. room.id .. " " .. room.id .. "," .. nodeData .. "\n"
  end

  result = result .. "#\n"

  for _, room in ipairs(dungeon) do
    for _, edge in ipairs(room.edges) do
      result = result .. "v" .. room.id .. " v" .. edge.targetRoomId .. " " .. edge.condition.keyLevel .. "\n"
    end
  end

  return result
end

return getTGF


text:
const assert = require('chai').assert;
const expect = require('chai').expect;
const validation = require('../src/validation');

describe('validation unit test', function () {

    describe('for item', function () {

        it('предмет проходит валидацию', function () {
            let item = {
                type: 'axe',
                minDmg: 2,
                maxDmg: 3,
                critChance: 20,
                critDmg: 60
            };
            let validationResult = validation.checkItem(item);
            assert(validationResult.isValid === true);
        });

        it('избыточные свойства обрезаются и предмет проходит валидацию', function () {
            let item = {
                type: 'axe',
                minDmg: 2,
                maxDmg: 3,
                critChance: 20,
                critDmg: 60,
                enot: true
            };
            let validationResult = validation.checkItem(item);
            assert(validationResult.item.enot === undefined);
            assert(validationResult.isValid === true);
        });

        it('при ошибке валидации предмета, в результате нет предмета и есть ошибка', function () {
            let item = {
                type: 'enot',
                minDmg: 2,
                maxDmg: 3,
                critChance: 20,
                critDmg: 60
            };
            let validationResult = validation.checkItem(item);
            assert(validationResult.item === undefined);
            assert(validationResult.errors.length === 1);
        });

        describe('errors', function () {

            it('#notValidType: [type]', function () {
                let item = {
                    type: 'enot',
                    minDmg: 2,
                    maxDmg: 3,
                    critChance: 20,
                    critDmg: 60
                };
                let validationResult = validation.checkItem(item);
                expect(validationResult.errors)
                    .to.have.deep.members([
                        {
                            id: "notValidType",
                            properties: ["type"]
                        }
                    ]);
            });

            it('#mustBeNumber: [minDmg]', function () {
                let item = {
                    type: 'axe',
                    minDmg: '2',
                    maxDmg: 3,
                    critChance: 20,
                    critDmg: 60
                };
                let validationResult = validation.checkItem(item);
                expect(validationResult.errors)
                    .to.have.deep.members([
                        {
                            id: "mustBeNumber",
                            properties: ["minDmg"]
                        }
                    ]);
            });

            it('#mustBeNumber: [minDmg, maxDmg, critChance]', function () {
                let item = {
                    type: 'axe',
                    minDmg: '2',
                    maxDmg: '3',
                    critChance: '20',
                    critDmg: 60
                };
                let validationResult = validation.checkItem(item);
                expect(validationResult.errors)
                    .to.have.deep.members([
                        {
                            id: "mustBeNumber",
                            properties: ["minDmg", "maxDmg", "critChance"]
                        }
                    ]);
            });

            it('#mustBeNumber: [maxDmg], mustBePositive: [minDmg]', function () {
                let item = {
                    type: 'axe',
                    minDmg: 0,
                    maxDmg: '3',
                    critChance: 20,
                    critDmg: 60
                };
                let validationResult = validation.checkItem(item);
                expect(validationResult.errors)
                    .to.have.deep.members([
                        {
                            id: "mustBePositive",
                            properties: ["minDmg"]
                        },
                        {
                            id: "mustBeNumber",
                            properties: ["maxDmg"]
                        },
                    ]);
            });

            it('#mustBeLessThan: [minDmg, maxDmg]', function () {
                let item = {
                    type: 'axe',
                    minDmg: 2,
                    maxDmg: 1,
                    critChance: 20,
                    critDmg: 60
                };
                let validationResult = validation.checkItem(item);
                expect(validationResult.errors)
                    .to.have.deep.members([
                        {
                            id: "mustBeLessThan",
                            properties: ["minDmg", "maxDmg"]
                        }
                    ]);
            });

            it('#mustBeLessThan: [minDmg, maxDmg], mustBePositive: [maxDmg]', function () {
                let item = {
                    type: 'axe',
                    minDmg: 2,
                    maxDmg: -1,
                    critChance: 20,
                    critDmg: 60
                };
                let validationResult = validation.checkItem(item);
                expect(validationResult.errors)
                    .to.have.deep.members([
                        {
                            id: "mustBeLessThan",
                            properties: ["minDmg", "maxDmg"]
                        },
                        {
                            id: "mustBePositive",
                            properties: ["maxDmg"]
                        }
                    ]);
            });
            it('#mustBeLessThan: [minDmg, maxDmg], mustBePositive: [maxDmg], mustNotBeNegative[critChance]', function () {
                let item = {
                    type: 'axe',
                    minDmg: 2,
                    maxDmg: -1,
                    critChance: -20,
                    critDmg: 60
                };
                let validationResult = validation.checkItem(item);
                expect(validationResult.errors)
                    .to.have.deep.members([
                        {
                            id: "mustNotBeNegative",
                            properties: ["critChance"]
                        },
                        {
                            id: "mustBeLessThan",
                            properties: ["minDmg", "maxDmg"]
                        },
                        {
                            id: "mustBePositive",
                            properties: ["maxDmg"]
                        },
                    ]);
            });
        });
    });

    describe('for items collection', function () {

        it('предмет проходит валидацию', function () {
            let collection = [
                {
                    type: 'axe',
                    minDmg: 2,
                    maxDmg: 3,
                    critChance: 20,
                    critDmg: 60
                }, {
                    type: 'mace',
                    minDmg: 20,
                    maxDmg: 30,
                    critChance: 0,
                    critDmg: 0
                }
            ];
            let validationResult = validation.checkCollection(collection);
            assert(validationResult.isValid === true);
        });

        it('при ошибке валидации предмета, в результате нет предмета и есть ошибка', function () {
            let collection = [
                {
                    type: 'axe',
                    minDmg: 2,
                    maxDmg: 3,
                    critChance: 20,
                }, {
                    type: 'mace',
                    minDmg: 20,
                    maxDmg: 30,
                    critChance: 0,
                    critDmg: 0
                }
            ];
            let validationResult = validation.checkCollection(collection);
            assert(validationResult.collection === undefined);
            assert(validationResult.isValid === false);
            assert(validationResult.errors.length === 1);
        });

    });

    describe('for char', function () {

        //property testing come soon..
        it('персонаж проходит валидацию', function () {
            let char = {
                atkSpd: 54,
                dmg: 3,
                critChance: 5,
                critDmg: 6
            };
            let validationResult = validation.checkChar(char);
            assert.deepEqual(validationResult, {
                char: {
                    atkSpd: 54,
                    dmg: 3,
                    critChance: 5,
                    critDmg: 6
                },
                isValid: true,
                errors: []
            });
        });

        it('избыточные свойства обрезаются и персонаж проходит валидацию', function () {
            let char = {
                enot: true,
                atkSpd: 54,
                dmg: 3,
                critChance: 5,
                critDmg: 6
            };
            let validationResult = validation.checkChar(char);
            assert(validationResult.char.enot === undefined);
            assert(validationResult.isValid === true);
        });

        it('при ошибке валидации персонажа, в результате нет персонажа и есть ошибка', function () {
            let char = {
                atkSpd: '54',
                dmg: 3,
                critChance: 5,
                critDmg: 6
            };
            let validationResult = validation.checkChar(char);
            assert(validationResult.char === undefined);
            assert(validationResult.errors.length === 1);
        });

        describe('errors', function () {

            it('#mustBeNumber: [dmg, critChance]', function () {
                let char = {
                    atkSpd: 54,
                    dmg: '3',
                    critChance: undefined,
                    critDmg: 6
                };
                let validationResult = validation.checkChar(char);
                expect(validationResult.errors)
                    .to.have.deep.members([
                        {
                            id: "mustBeNumber",
                            properties: ["dmg", "critChance"]
                        }
                    ]);
            });
        });
    });

    describe('for user', function () {

        it('должен зарегистрировать пользователя', function () {
            let user = {
                email: 'userEmail',
                name: 'userName',
                password: 'userPass'
            };
            let validationResult = validation.checkSignUp(user);
            assert(validationResult.isValid === true);
        });

        it('должен обрезать лишние свойства и зарегистрировать пользователя', function () {
            let user = {
                email: 'userEmail',
                name: 'userName',
                password: 'userPass',
                enot: true
            };
            let validationResult = validation.checkSignUp(user);
            assert(validationResult.isValid === true);
            assert(validationResult.user.enot === undefined);
        });

        it('при ошибке валидации пользователя, в результате нет пользователя и есть ошибка', function () {
            let user = {
                email: 'userEmail',
                name: 'userName',
                password: 123,
            };
            let validationResult = validation.checkSignUp(user);
            assert(validationResult.isValid === false);
            assert(validationResult.user === undefined);
            assert(validationResult.errors.length === 1);
        });

        describe('errors', function () {

            it('#mustBeString: [name, password]', function () {
                let user = {
                    email: 'userEmail',
                    password: 123,
                };
                let validationResult = validation.checkSignUp(user);
                expect(validationResult.errors)
                    .to.have.deep.members([
                        {
                            id: "mustBeString",
                            properties: ["name", "password"]
                        }
                    ]);
            });

        });
    });
});


text:
// Make 'globalvar' lookup working.
#pragma GCC user_expression

void
_gdb_expr (void)
{
  globalvar = 3;
  globalvar += 4;
}


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <title>www/application/js/core/controllers/LeapMotion.js - Documentation de l'outil de démonstration JavaScript du Gaia-Project</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="shortcut icon" type="image/png" href="../assets/favicon.png">

            API Docs for: 1.0

APIs

Classes

Modules

                            <input type="search" id="api-filter" placeholder="Type to filter APIs">

app

app.client.socketclient

app.controllers.chatservice

app.controllers.login

app.controllers.modules.chat.people

app.controllers.modules.game.CubeCtrl

app.controllers.modules.game.ShootCtrl

app.controllers.modules.game.SpaceCtrl

app.controllers.modules.game.SpaceShipCtrl

app.controllers.modules.login.login

app.controllers.modules.login.register

app.controllers.modules.menu.menu

app.modules.servers.SocketServer

app.objects.email

app.objects.user

app.security.diffie-helman

app.servers.HTTPServer

app.services.chat

app.services.login

app.storage.mongodb

app.storage.mysql

app.storage.query

app.utils.checkers

app.utils.date

config

ConfigModel

KeyboardServices

LanguageModel

LeapMotionController

resize

                    Show:

                        <input type="checkbox" id="api-show-inherited" checked>
                        Inherited

                        <input type="checkbox" id="api-show-protected">
                        Protected

                        <input type="checkbox" id="api-show-private">
                        Private

                        <input type="checkbox" id="api-show-deprecated">
                        Deprecated

File: www/application/js/core/controllers/LeapMotion.js

                        define([
                            'angular'
                        ], function(angular) {
                            'use strict';

                            /**
                             * Manager for LeapMotion
                             * @class LeapMotionController
                             */

                            var fct = function() {
                                //init leapmotion
                                var controller, lastPosition, mainhand, gestures;

                                var debug = true;

                                /**
                                 * Launch the LeapMotion connection and set the handlers for frame event and gesture event
                                 * @constructor
                                 */
                                var lmcontroller = function(callback) {
                                    this.controller = new Leap.Controller({enableGestures:true});

                                    this.lastPosition = {
                                        leftHand: {
                                            x: 0,
                                            y: 0,
                                            z: 0
                                        },
                                        rightHand: {
                                            x: 0,
                                            y: 0,
                                            z: 0
                                        }
                                    };

                                    this.gestures = [];

                                    var that = this;
                                    this.controller.on('frame', function(frame) {
                                        if (frame.hands.length > 0) {
                                            if (debug) {
                                                console.log('frame handler');
                                                console.log(frame);
                                            }

                                            var interactionbox = frame.interactionBox;

                                            var position;

                                            for (var h in frame.hands) {
                                                if (typeof frame.hands[h] !== 'undefined') {
                                                    var position = frame.hands[h].palmPosition;
                                                    var direction = frame.hands[h].direction;
                                                    //check hand r or l
                                                    if (typeof position === 'object' && position.length >= 1)
                                                        callback(position[0], position[1], position[2], direction[0], direction[1], direction[2]);
                                                }
                                            }
                                        }
                                    });

                                    //add gesture handler
                                    /*this.controller.on('gesture', function(frame) {
                                        if (debug) {
                                            console.log('gesture handler');
                                            console.log(frame);
                                        }
                                        //check what we have
                                        for (var g in that.gestures) {
                                            if (typeof that.gestures[g] !== 'undefined') {
                                                var tmp = that.gestures[g];
                                                //check to do
                                                tmp.handler();
                                                if (debug) {
                                                    console.log('gesture handler for: '+tmp.gesture);
                                                }
                                            }
                                        }
                                    });*/
                                    this.controller.connect();
                                };

                                /**
                                 * Method to use in order to define right (R) or left (L) hand as controller
                                 * @method setMainHand
                                 * @param {String} mainhand Must be R or L
                                 */

                                lmcontroller.prototype.setMainHand = function(mainhand) {
                                    this.mainhand = mainhand;
                                };

                                /**
                                 * Add a handler to a specific hand gesture
                                 * @method setGestureHandler
                                 * @param {Object} gesture
                                 * @param {Function} handler The handler should take one argument as parameter
                                 */
                                lmcontroller.prototype.setGestureHandler = function(gesture, handler) {
                                    this.gestures.push({'gesture': gesture, 'handler': handler});
                                };

                                /**
                                 * Get last known position
                                 * @method getPosition
                                 * @retun {Object}
                                 */

                                lmcontroller.prototype.getPosition = function() {
                                    return {
                                        x: (this.mainhand === 'L') ? lastPosition.leftHand.x : lastPosition.rightHand.x,
                                        y: (this.mainhand === 'L') ? lastPosition.leftHand.y : lastPosition.rightHand.y,
                                        z: (this.mainhand === 'L') ? lastPosition.leftHand.z : lastPosition.rightHand.z
                                    };
                                };

                                /**
                                 * Debug function, display hands motions
                                 * @method debug
                                 * @param {String} domElement Element where to display the video
                                 * @param {Boolean} state Activate or deactivate debug
                                 */

                                lmcontroller.prototype.debug = function(domElement, state) {
                                    if (state === true) {
                                        //launch debug
                                        var debugContainer = document.getElementById(domElement);
                                        var videoObj = { 'video': true };

                                        var errorcallback = function(e) {
                                            console.log(e);
                                        };

                                        var drawHand = function(w, h) {
                                            //set the canvas for hands representation
                                        };

                                        if (typeof debugContainer !== 'undefined') {
                                            if (navigator.getUserMedia) { // Standard
                                                navigator.getUserMedia(videoObj, function(stream) {
                                                    video.src = stream;
                                                    video.play();
                                                    drawHand(w, h);
                                                }, errorcallback);
                        				    } else if (navigator.webkitGetUserMedia) { // WebKit-prefixed
                                                navigator.webkitGetUserMedia(videoObj, function(stream){
                                                    video.src = window.webkitURL.createObjectURL(stream);
                                                    video.play();
                                                    drawHand(w, h);
                        					   }, errorcallback);
                        				    } else if (navigator.mozGetUserMedia) { // Firefox-prefixed
                                                navigator.mozGetUserMedia(videoObj, function(stream){
                                                    video.src = window.URL.createObjectURL(stream);
                                                    video.play();
                                                    drawHand(w, h);
                                                }, errorcallback);
                                            } else {
                                                drawHand(w, h);
                                            }
                                        }
                                    }
                                }
                                return lmcontroller;
                            };

                            return fct;
                        });