Disqualification in 1 Cor. 9:27

Question: In 1 Cor. 9:27, Paul says:

But I discipline my body and keep it under control, lest after preaching to others I myself should be disqualified. (ESV)

What is meant by being "disqualified"?
Answer: St. Paul is speaking of whether or not he will be a partaker in the gospel (salvation, life in Christ). He compares the people of God in the Old Testament not partaking of what it was they had progressed toward and been enjoying. They had even 'drank of Christ.' They were 'baptized.' Yet they fell into damnable sin and did not repent (Rom 8:13; 11:22; Rev 2:5; 2:16; 2:21 etc.).

1 Corinthians 9:23-10:121
Now everything I do, I do for the gospel, to the end that I might become a partaker in it myself. Do you not know that those who run in the stadium all run but only one recieves the prize? Race you in like manner, that you might take hold of the prize. Now everyone that contends in the race disciplines himself, that he might obtain what is but a corruptable crown: but we, an incorruptable. So then, I race, not irresolutely, nor do I box as one punching air, but instead I punish my body, and subdue it, lest it happen that after preaching to others, I myself should be disqualified.2
For I do not want you to be ignorant, brothers, that our forefathers were all under the one cloud, and all passed through the sea, and all were baptized into Moses in the cloud and the sea, and all ate the same spiritual food and drank the same spiritual drink. For they drank of the same spiritual rock with followed them: and that rock was Christ. Nevertheless, the majority of them did not please God, for they died, and were left strewn across the wilderness. Now these things would utlimately typify things pertaining to us: namely, to teach us not to be ones chasing after evil as they chasted after it, and not to become idolators as some of them, as also it is written: The people sat down to eat and drink, and and rose up to play. Moreover, that we might not commit sexual sins, as some of them did and fell every one in a single day, twenty-three thousand; nor tempt the Lord as some of them tempted and perished by the serpents; nor complain as some of them complained and perished by the destroyer. Yet all these things befell them as an example: they were written for our admonition upon whom the end of ages has come. So that he who thinks himself to stand to should beware, lest he fall.

The reason St. Paul is 'preaching to others' the gospel is to save their souls (1 Cor 9:22). So when he says 'that after preaching to others' (what) 'I myself might become a partaker in,' he clearly means 'the gospel,' which he is preaching; and he expresses that he might not become a partaker in its promises (like the examples he provides of the Old Testament people of God): 'lest it happen that .. I myself should be counted unfit.' He predicates this upon discipline of the body (Rom 11:22; Col 1:24). St. Paul uses a strong word (γαρ) meaning 'because I will prove what I just said' (here and almost always translated 'for') to link disqualification in the race with the destruction of those people of God who apostatized and died in sin.
See also Revelation 2:10.

Footnotes
1 I provided a fresh translation to eliminate unnecessary inconsistencies which obscure the contextual issues. Italics are to hepl understand what is meant; bold is used for highlighting the significant portions relevant to the question, and my answer.
2 St. Paul, significantly, uses this 'disqualified' elsewhere, such as in Romans 1:28, of which the meaning is 'reprobate; debased:' "And just as they did not see fit to acknowledge God, God gave them up to a reprobate [αδοκιμον] mind to do the unseemly." Even though the context shows that St. Paul is using it in the sense that he is judged not to have succeded in running the race, this overtone may not be overlooked—especially, as I point out in my answer, the race is living according to Christ so that you don't forfeit salvation by unrepentant sin. cf. Phil 2:12.
Comment: Good answer. +1.
Answer: This is a fascinating passage.  In 1 Corinthians 9:24-27, Paul is using an athletic metaphor as both an example of the Christian life and a particular defense of his ministry.  Within that context, we could consider this a reference either to losing (not winning) - verse 24, failing to compete effectively - verse 26, or to being rejected from competition. (Perhaps for breaking the rules?)
The Greek word translated "disqualified" is αδοκιμος (Strongs G0096), meaning "failing the test", "rejected" or "worthless".  This word appears 8 times in the New Testament.  In addition to "disqualified", the NET Bible also translates it "unfit", "useless" or "fail".  This is also the word translated "depraved" or "debased" in Romans 1:28.
(My personal opinion is that it's one of the first two that I mentioned above, since there are already verses in the passage that refer to them.  Also, the two concepts are very closely related - if you don't compete effectively, you can't win.)
See Hebrews 12:1-2 for another passage with a very similar metaphor.
Answer: Here is a little background that I gathered about Corinthian's at the time Paul wrote this letter along with the verse mentioned.  It's helpful to see what many of the new converts were struggling with.  It was one of the largest cities of the Roman empire and many religions were represented there, even a temple which offered 1000 sacred prostitutes.  God had called them out and He would
Confirm them to the end.  So just to be clear in the beginning of Corinthians Paul confirms that it is God who is responsible and He will keep them strong to the end so that they too will be blameless on the day of our Lord Jesus Christ. It was God who had called them in to fellowship with his son Jesus Christ our Lord and He is faithful.

who also shall confirm you unto the end — unblamable in the day of our Lord Jesus Christ; 9faithful [is] God, through whom ye were called to the fellowship of His Son Jesus Christ our Lord. 1 Corinthians 8,9

Salvation is secure .
Paul
is talking about the possibility of being disqualified.   Disqualified from what?  From winning an incorruptible wreath.

24Do you not know that in a race all the runners run, but only one receives the prize? Run in such a way as to take the prize. 25Everyone who competes in the games trains with strict discipline. They do it for a crown that is perishable, but we do it for a crown that is imperishable.  1 Cor. 9:24,25

Paul does not want to be disqualified from winning this wreath, so he says the following.

26Therefore I do not run aimlessly; I do not fight like I am beating the air. 27No, I discipline my body and make it my slave, so that after I have preached to others, I myself will not be disqualified.  1 Cor. 9:26,27

When someone is disqualified, it is  because they have broken a law or rule.

To stop someone from being in a competition or doing something because they are unsuitable or they have done something wrong:
Two top athletes have been disqualified from the championship after positive drug tests.

The Corinthians had the Isthmian athletic games biennially and that was a big deal that they were all very familiar with.  They knew all the training, discipline and denial that would go in to win a prize.  Paul uses this life event to teach the Corinthians that it is possible for them to race and win an imperishable wreath as well.  If they want true rewards that will last then two things are necessary, self control and obedience to the rules of the game. Both are essential to win a wreath.
He is using this as encouragement to them to leave  their old life behind, in the grave through the cross and walk in newness of life and run.  That city has many temptations yet in the Lord they are able to stand against them and move on.  They too needed to discipline their body
So they could win An incredible honor in the future. It would be well worth the discipline they put in their body now for the rewards later.
This section introduces the next portion concerning Old Testament examples of believers who were tempted with various sins (10:1-13). Paul encourages them to exercise self- discipline in their Christian life so they will not be disqualified from the race.
In these days when "success" Is measured by human standards, It is of the upmost importance to press the fact that a violation of the rules absolutely bars the contestant from all hope of a prize.   Service at the expense of truth or conscience, to gain a livelihood or win popularity, no matter how strenuous, wins no prize.  God looks on the motive and method, not on the apparent  results.  Concord Commentary
The Apostle Paul wants to win a wreath and so he too must play by the rules.  Just because he preaches to others and how to "play the game" does not guarantee he would win a wreath if he doesn't practice what he preaches.  That is why he runs in such a way with a goal in mind and makes his body his slave.  The reward would be great.

Now also, if anyone competes, he is not crowned unless he shall have competed lawfully.
2 Tim. 2:5

Now at the end of his life, the discipline had paid off. He was a winner and the fear of being disqualified is behind him.

6For I am already being poured out like a drink offering, and the time of my departure is at hand. 7I have fought the good fight, I have finished the race, I have kept the faith. 8From now on there is laid up for me the crown of righteousness, which the Lord, the righteous Judge, will award to me on that day—and not only to me, but to all who crave His appearing. 2 Tim. 4:6-8
Comment: Thanks, Sherrie! I appreciated the historical context you gave, and your answer helped me understand the passage much better!!
Comment: Great, It's always encouraging to hear that!
Answer: ἀδόκιμος (1 Corinthians 9:27) [1.]
Two primary positions.
(a.) Potential loss of heavenly reward (not including eschatological salvation).
Mark Taylor:

The meaning of "unapproved" is contextually determined and depends on
what is being tested. The immediate context has to do with
subordinating everything to the gospel. To infer that
"disqualification" in this context means the ultimate loss of
salvation is to push the analogy a bit far. [fn. 120: So also
Thiselton, First Corinthians, 716–17. Paul certainly makes the point
earlier in the letter that those who practice idolatry, as well as
other vices, will not inherit the kingdom of God (1 Cor 6:9-11). Paul
also presumes that genuine faith will persevere (cf. 15:2).] An
important consideration in this regard is what Paul has said already
regarding the "testing" of the Day of the Lord (3:5–17), which will
show the quality of one's works. [fn. 121: In 3:13, "... the fire will
test the quality of each man's work." The verb translated "test" is
δοκιμάζω. The notion of "testing" or being "approved" in 3:13 is
similar to Paul's expression of being "unapproved" in 9:27.] The end
result is the loss of reward, but the individual himself is saved yet
only as through fire (3:15). …Likewise, in 4:1-5 Paul reminds the
Corinthians that he himself is not capable of rendering a final
verdict concerning his own ministry and motives. Rather, it is the
Lord who brings to light the secrets of darkness and reveals the
desires of men's hearts. God alone bestows praise on his servants. It
seems reasonable, therefore, to conclude that the primary intent of
the term "disqualified/unapproved" in this context has more to do with
God's final verdict on his people for which there will be both reward
and loss. In terms of ultimate salvation Paul has the highest
expectation for the Corinthian believers. We should recall the
beginning of the letter where Paul addresses them as "those set apart
in Christ Jesus" (1:2). His introductory prayer expressed confidence
that God in his faithfulness would confirm them to the end blameless
on the Day of the Lord (1:8–9). [fn. 122: See also Rom 8:31–39; Phil
1:3–6.] [2.]

(b.) Potential loss of heavenly reward (including eschatological salvation).
Thomas R. Schreiner:

Some interpreters argue that the disqualification (adokimos) meant
that Paul would lose his reward in ministry, while his salvation would
still be secure. Such a reading is understandable, but it strays from
the context since Paul warns his readers about matters relating to
salvation in 10:1–22. Furthermore, the Greek word here (adokimos) is
regularly used by Paul to denote those who are disqualified in some
way from genuine faith. Unbelievers have a 'depraved [adokimon]
mind' (Rom. 1:28). Jesus Christ truly resides in the Corinthians,
unless they 'fail the test' (adokimoi) – unless they are unbelievers
(2 Cor. 13:5). Paul hopes the Corinthians will recognize his genuine
faith (2 Cor. 13:6), 'that we have not failed the test' (ouk esmen
adokimoi). He wants the Corinthians to progress in faith even if they
think Paul has 'failed' (adokimoi, 2 Cor. 13:7). It would be better
for the Corinthians to pass the test, even if they think Paul fails
it! Jannes and Jambres are 'worthless in regard to the faith'
(adokimoi peri tēn pistin, 2 Tim. 3:8, CSB), which clearly means
they are unbelievers. The false teachers in Titus claim to know God
but deny him by how they live, and are 'unfit [adokimoi] for any
good work' (Titus 1:16, CSB). Running the race to win and competing
with intensity are necessary to gain eternal life; thus Paul reminds
the Corinthians that he has the same requirement as they have before
he begins to warn them in chapter 10. [3.]

Gordon D. Fee:

While it is true that at the end of the next turn in the argument
(10:13), after the severe warnings that have preceded (vv. 1-12), he
once again puts his confidence in God to "keep them," it would be
sheer folly to suggest thereby that the warnings are not real. Paul
keeps warning and assurance in tension. Simultaneously he exhorts and,
by this and the following examples, warns the Corinthians of their
imminent danger if they do not exercise "self-control" in the matter
of idolatry; yet, as always (cf. on 5:8 and 6:11), he reminds them of
their security in the prior activity of God, who has committed himself
to them in Christ Jesus. In so doing – and again as always – he puts
his final emphasis on God's activity in our behalf. [4.]

Notes:
[1.] ἀδόκιμος (adokimos) is also found in Rom. 1:28; 2 Co. 13:5, 6, 7; 2 Ti. 3:8; Tit. 1:16; Heb. 6:8. Cf. LXX. (Septuagint) Pro. 25:4; Isa. 1:22.
[2.] Mark Taylor, The New American Commentary: Volume 28: 1 Corinthians, (Nashville: B&H, 2014), pp. 223-224. Cf. Anthony C. Thiselton: "Paul finally notes what an irony it would be if, after all his preaching to others, it should turn out to be the case that he himself should find, when all secrets are disclosed at the day of judgment (4:4-5), that he is not proven to stand the test (αὐτὸς ἀδόκιμος γένωμαι). Although BAGD and most VSS understand this to mean unqualified, as well as not standing the test, this ignores the fact that the semantic content of ἀδόκιμος depends on what it is that is tested (δοκιμάζω). Here Paul indicates the test of subordinating everything to the gospel. The meaning is confirmed by Grimm-Thayer and by Schrage to mean not standing the test, in the sense of that which does not prove itself to be such as it ought (der die Bewährungsprobe nicht bestanden). As a metaphor it may be applied to sterile soil (Heb 6:8) or to base or impure metals or coins (Isa 1:22; Prov 25:6). However, Paul does not specify that he would be not approved (Grimm-Thayer's second main possibility) as if to imply eschatological rejection or loss of salvation. The notion of that which does not prove itself to be such as it ought well captures the notion of purpose in relation to calling and verdict. The test reveals failures of an unspecified nature, not utter rejection. Fail to qualify (Collins) or disqualified (REB, NRSV, NJB) risks such an understanding, although NIV narrows the scope by continuing the metaphor, disqualified for the prize." {Anthony C. Thiselton,  The New International Greek Testament Commentary: The First Epistle to the Corinthians, (Grand Rapids: William B. Eerdmans, 2000), pp. 716-717.}; Mark Taylor: "This reading of 9:27 in no way mitigates the severity of Paul's warnings regarding God's judgment. There are ample warnings in Paul and in the rest of the New Testament to dispel any notions of false security. [fn. 123: For "proving/testing" language in Paul, see also 2 Cor 13:3-5. In terms of the language and the notion of human striving in 1 Cor 9:24–27, compare the striking parallels in Phil 3:7-21; Paul speaks of counting all things as loss and "gaining" Christ, pressing on for the prize of the upward call of God in Christ (3:14). Yet Paul clearly does not have in mind a works righteousness or human striving as a means of securing an eternal inheritance. Righteousness comes by faith (Phil 3:9). In Phil 3:17, as in 1 Cor 11:1, Paul urges others to follow his example. See also 2 Tim 2:5; 4:6-8.] It is certainly the case that there are many in the church who profess faith in Christ but who do not possess genuine faith. [fn. 124: Matt 7:21–27; Jas 2:14-26; 1 John 2:3–5.]" {Mark Taylor, The New American Commentary: Volume 28: 1 Corinthians, (Nashville: B&H, 2014), p. 224.}
[3.] Thomas R. Schreiner, Tyndale New Testament Commentaries: Volume 7: 1 Corinthians: An Introduction and Commentary, (Downers Grove: IVP Academic, 2018), p. 196. Cf. Charles Kingsley Barrett, A Commentary on the First Epistle to the Corinthians, Harper's New Testament Commentaries, (New York and Evanston: Harper & Row, 1968), p. 218; Roy E. Ciampa & Brian S. Rosner: "There is a greater likelihood that the last part of the verse might reflect a return to the athletic metaphor. Sampley argues that the word disqualified is "a technical term of athletics in which a competitor fails the test or is thrown out of the competition." Such a technical usage, however, is not attested in any of the lexicons or dictionaries, Whether understood within the context of the previous athletic metaphor or not, the word clearly refers to God's potential eschatological judgment on Paul (and also on the Corinthians). [fn. 51: Paul's language reflects a concern not to be the kind of person referred to in Sir. 37:19: "One kind of person is clever at teaching others, yet is no good whatever to himself" (NJB).] It suggests being rejected as unworthy by the ultimate judge. Philo describes the history of Israel after receiving the law with its "gentle instructions and exhortations" as well as "threats and warnings" through the use of the image of the athletic contests, and allegorically describes the defeated as "whole lives that fall, which once overthrown can hardly be raised up again." The image of "falling" (as in the previous sentence) is used both in Philo and Paul to refer to ultimate divine rejection. This is an important part of the rhetorical motivation (or parenesis/moral exhortation) essential to keeping the Corinthians from underestimating the dangerous position in which their attitudes  and practices have placed them. As Garland puts it, "Paul is engaged in moral exhortation and not discoursing on the security of the believer." He wants the Corinthians to ask, as does Chrysostom, "Now if Paul feared this, who had taught so many, and feared it after his preaching … ; what can we say?" One of the ways in which God secures the perseverance of believers is by such stern warnings." {Roy E. Ciampa & Brian S. Rosner, The Pillar New Testament Commentary: The First Letter to the Corinthians, (Nottingham: Apollos, 2010), pp. 421-422.}; Cf. David E. Garland, Baker Exegetical Commentary on the New Testament: 1 Corinthians, (Grand Rapids: Baker Academic, 2003), on 1 Cor. 9:27.
[4.] Gordon D. Fee, The New International Commentary on the New Testament: The First Epistle to the Corinthians: Revised Edition, (Grand Rapids: William B. Eerdmans, 2014), p. 486.
Καὶ αὐτός ἐστιν πρὸ πάντων καὶ τὰ πάντα ἐν αὐτῷ συνέστηκεν.
~ Soli Deo Gloria
Answer: This is a good question, for it clearly shows that faith alone, without efforts and discipline on the part of a believer does not suffice for salvation, for "disqualified" here has a strong sense of being disqualified for winning the crown of righteousness and salvation (2 Tim 4:8) for which crown a Christian should athleticize, should run analogously to a sportsman (1 Cor 9:24), for like a sportsman if he slackens and does not run properly will lose the perishable crown, so a Christian unless he labors for fulfilling commandments of Christ will lose the imperishable crown (ibid. 9:25) and this is the meaning of "disqualified".
In fact, one can teach righteousness and use all the repertoire of a good and convincing rhetoric, outdo even the Lord Himself in beautiful tropes of speech, but not try in his inner life to imitate the Lord and be, in fact, inapt for the Kingdom, for Kingdom of Heaven is not conquered by words, but by faith combined with good fight against sins (cf. Luke 16:16), for nobody enters the Kingdom by literature and belles lettres,or even by the best knowledge of the Scripture with all its philological nuances, but by co-operation with power of Lord: "Quia non cognovi literaturam, introibo in potentias Domini" (Psal 71:15) - "For since I have not known literature and belles lettres, I will enter [the Kingdom] in/through the power of Lord".
Paul was strong, though, both in words and in deeds (2 Cor. 10:11).
All this shows a wrongness or rather a lunacy of all those hyper-Augustinian (albeit St Augustine himself is not so uni-lateral on this account, of course) and Calvinist pietist sects who relegate all things only to divine grace and downplay human initiative and efforts in co-operation, συνεργεία with divine operation of grace, for both are necessary for salvation.

Disqualification in 1 Cor. 9:27


Prerequisites for attending Yeshiva as a middle aged Baal Teshuva

Question: What are the prerquisites for attending yeshiva for the first time as a middle aged man without a strong background in Yiddishkeit? The yeshiva graduates I've meet seem very intelligent, does one need to be at that level to study at a yeshiva, particularly as concerns yeshivot geared towards baalei teshuva?
Comment: Channan, for personal advice, I recommend that you talk to an advisor who knows you and with whom you can discuss your personal situation in depth. If you'd like, you could reconfigure this post to ask something more general, like "How smart do you have to be to cut it in a BT yeshiva?" However, that, too, could be a difficult question to answer usefully, as yeshivot differ. I wish you great success in upgrading your Torah studies, however you do it!
Comment: I would recommend going to a *baal teshuvah* yeshiva in Yerushalayim, because it's not just the learning, it's also the spirit, and you won't really get that in *chutz la'aretz*.
Comment: @JoshK you're very learned for having been in yeshiva only a year! Very impressive
Comment: @Channan I am a 41 year old BT who started yeshiva a year ago. There are people of all ages (19-83) in the classes I've attended, and certainly of all ability levels. Feel free to contact me (my email address is on my profile) with any questions you have
Comment: @Channan My father went to ohr somei'ach in Yerushalayim, which is very good. He said people would sometimes arrive on Shabbos (they didn't even know about not flying/driving on Shabbos), but the yeshiva makes them into good Jews. It is a good place which also helps people become more mainstream - some other yeshivos focus more on getting the person frum really fast, but Ohr Somei'ach has a more holistic approach, trying to make the person into a frum person who can integrate with frum communities. If you need help finding resources I can try to help you.
Comment: @Channan Normally in a more mainstream yeshiva (not a baal teshuva yeshiva) you'll need at minimum being able to read and understand hebrew, learn gemara and meforshim (commentaries), a decent knowledge of halacha, and also just being able to fit in (if  one doesn't have a group they fit into, it isn't conducive to growth). That's why yeshivos like Ohr Someiach are great - you can come in with any level of knowledge, and they build you up.
Comment: There are yeshivot geared to this specific public. Netivot Olam in Bnei Brak is one that comes to mind (focused on high-achievers in secular matters who transition to Torah) and there a number in Jerusalem. Would help to know where you are based if you want specific recomendations
Comment: @robev before arriving at yeshiva I spent 2 years online at "Yeshivat Mi Yodeya", they were immensely helpful in shaping my knowledge of Judaism from near 0
Answer: There are many yeshivot geared specifically to both Israeli and foreign balei teshuva in Jerusalem. Admissions criteria vary, but in general their mission is to educate Jews and they are not selective. It would certainly help to have a command of the aleph-bet (Hebrew alphabet) and some knowledge of Chumash (the five books of Moses) before entering a yeshiva, but the only hard and fast rule is that you must be willing to keep Shabbat. Most of the time you will be living in a dorm and/or attending meals and shiurim on Shabbat, and I don't think a single yeshiva would tolerate on-site Melacha Shabbat. Kashrut is not so much of a problem- all yeshivot provide meals, and you can be reasonably confident they're kosher- but you would do best not to be seen eating a dairy ice cream after a meaty lunch!
In terms of raw intellect, the Torah meets everyone at their level. I have seen very learned people in secular subjects struggle with Torah learning, I have seen people who seem rather simple grasp Torah concepts with ease, and everything in between, and, most remarkably, I have seen people who were clearly not born with the highest possible level of innate intellectual ability who have become truly brilliant through years of Torah study. The key is bending your own mind to the Torah rather than trying to bend the Torah to your mind. I.e. accepting, for example, that not keeping chametz in your home over Pesach is not "stupid" or "outdated" but rather that G-d and our sages know and understand something that you don't. This is not an admissions prerequisite but will certainly bring you much success.
Answer: In the intro of Jose Faur's dissertation on the "Guide for the Perplexed" (thanks Alex) it says: A dimension of Hebrew perfection is the desire to share it with others.
In that regard, there will be a place for you. I don't know what stage of life you're in, but as a bal ha'bais, I would go to a local yeshiva several times a week. Fortunately a brilliant bucher was willing to teach me.
On a practical note, I would echo what Josh K said above. You might consider taking some steps on your own as preparation and also to see how much intellectual effort you're willing to commit.
Not that you should necessarily do as I did, but you might begin by teaching yourself lashon kodesh (the Hebrew of the Chumash). There are several such books available, many more so than what I used 40 years ago. Then you can try to translate some of the early parshahs - quite an uplifting experience. Also I used Brown, Driver and Briggs Lexicon which can give you a breadth of the meanings( https://hebrewcollege.edu/wp-content/uploads/2018/10/BDB.pdf) and a grammar (I used Gesenius - http://tmcdaniel.palmerseminary.edu/GeseniusGrammar.pdf).
You can also access a number of daily mishna shiurim on-line.
These are foundational yet exalted. However, in my personal experience, once in the yeshiva curriculum, the focus was on gemara. As you may know that is largely in Aramaic. I preferred to learn l'iyun - which is a glacial pace (along with the commentaries of Rashi and Tosfos found in the side margins of each page (daf).
Studying at that pace, you can do a small section at a time, and really get the flavor (tam Gan Eden). No need to get anywhere - ayn l'dovar sof (no end to the matter) and "swimming in the sea of Talmud" are applicable.
Answer: Only attend one that has classes in basic Torah Judaism: introductory halacha, Hebrew, introduction to the mitzvos, a forum for questions, Mishnah. Some places just toss you into a Gemara shiur and don't even give an introduction to that. Consider staying in America. Toras Dovid in Monsey is a possibility as are the Chabad institutions in NJ, Miami, and Brooklyn. There's also Shar Yashuv in Far Rockaway, NY. Going to Israel is too much for some people. The environment there is very intense, and you'll hear all kinds of propaganda of how you should never leave the yeshiva or Israel. You might also consider just going at night or attending classes online. There are zillions of on-line classes. Disruption of one's life to go full-time is not productive for some people and once you move into the yeshiva building, it's not so easy to leave even if you don't like what you hear there.


Brake pads Discs rotation

Question: Had some  vibration on a turn wheel  while  pressing  my  brake     Mechanic Shop  told me  i need  to replace my  front pods and discs , Took it to a  Pep  boys  for a second opinion and they said pods are  fine for at least a year   just  need to  turn  my discs   57k miles on truck  never got any  brake  service   what's  the deal
Comment: Discs are not "rotated" as you might do with tires.  Either you misunderstood them or they are idiots.  It's not uncommon for brake rotors to warp as they wear out and that's possibly what you're feeling when turning and braking.  But then it make also be  wheel bearings which can generate the same sort of vibration as brakes.  I'm guessing you're not mechanically inclined enough to take on a repair like this on your own.  Go back to the original mechanic, who I assume you trust, and have them do the needed work.
Answer: Did they say rotate your discs or did they say "turn" your discs. Turning means machining.
Comment: yes  Turning  is corect
Comment: They can be turned in place on the car

Brake pads Discs rotation


My Opera can't play videos

Question: I am using Opera 68.0.3618.125 on latest Ubuntu version. But I can't watch videos. For example on Twitter. Everyone says get libffmpeg.so and copy to /snap/opera/current/usr/lib/x86_64-linux-gnu/opera but I can't access this file even I'm in root access. Please help me.
Comment: Try `sudo apt install ffmpeg`, which may install the missing shared libraries.
Comment: https://askubuntu.com/questions/777573/opera-will-not-play-twitter-videos-and-others/1372009#1372009
Answer: Install ffmpeg, which will install the missing shared library libffmpeg.so:
sudo apt install ffmpeg

Sorry for this late answer, I had only just realised my suggestion which I was not 100% certain about worked for you. But here it is.
Answer: In my case ffmpeg didn't worked. I simply search for any possible libffmpeg.so in my system and found some varieties and pick one among them.
I selected from skype directory, and copied to opera directory and voila!! it worked!
Below are the steps.

Update files DB, so it search files better.
$ sudo updatedb

Serach for libffmpeg.so file.
$ locate libffmpeg.so
/home/ravi/sw/Postman/app/libffmpeg.so
/snap/flock-chat/281/libffmpeg.so
/usr/lib/x86_64-linux-gnu/opera/libffmpeg.so <-- This was already there. I just replaced it with skype's libffmpeg.so
/usr/share/code/libffmpeg.so
/usr/share/skypeforlinux/libffmpeg.so

Backup existing libffmpeg.so, just in-case things go wrong we can revert this file.
$ sudo cp /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so.bkp

Overwrite libffmpeg.so
$ sudo cp /usr/share/skypeforlinux/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so

Answer: All problems with streams and Opera comes from .deb installation pack. We all have got .deb from the official Opera download page.
But official Opera has some problems with licences and official .deb Opera cant use latest codecs for playing streams.
Stream works only on snap opera, not .deb
If you have Ubuntu 20.04 u can just use this command
sudo snap install opera

Enjoy.
Comment: Thanks a lot! I was struggled with this issue from years. Installing opera from snap is much faster and clear than chromium codecs and making symlink to libffmpeg
Answer: i had the same problem, just installing ffmpeg didnt work, so my solution is to copy the up to date chromium library to the opera directory. I called it fixopera.sh:
#!/bin/sh
apt-get -y update && apt-get -y install chromium && mv /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so.old && cp /usr/lib/chromium/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/

copied it in /etc/cron.daily/, to make it a root cron job and executable with chmod +x. so in case anything goes wrong you have a backup of your old file named libffmpeg.so.old
Comment: Clever! :) a few questions: are you using 20.04? Did you install with snap, or apt, or any other? Thanks.
Comment: Linux Mint 20.04 (so: yes). I used the officially recommended deb package from opera website, which i think also sets an apt key so opera will be updated along with the other apps on `apt-get update && apt-get dist-upgrade`. Btw maybe setting a cron job on `/etc/cron.daily/` is not the best way, maybe just add the script in your root crontab with `sudo crontab -e`.
Answer: Instead of replacing the existing libffmpeg.so (which might be undone by an update) I would suggest to create sub-directory lib_extra in the opera main directory and copy or symlink the new libffmpeg.so to this directory, e.g. (as root)
cd /usr/lib/x86_64-linux-gnu/opera
mkdir lib_extra
cd lib_extra
ln -s /path_to_other/libffmpeg.so .

Edit 2024-02-24: This solution does not work anymore, at least not on my Debian 12 with Opera 107.0.5045.36. Here I have to replace the file libffmpeg.so in the Opera directory by another file (either link or copy) as mentioned in the posts above.
Answer: Similar to the other answers, except using a symlink instead of copying the library, is this solution from the Opera forums, Solving the problem of the Opera browser with video playback in Ubuntu and similar distributions (Linux Mint, KDE neon):

First of all, you need to install the chromium-codecs-ffmpeg-extra
package. You can do this using the terminal with the following
command:
sudo apt install chromium-codecs-ffmpeg-extra
Usually the second step is to create a symlink for the file
libffmpeg.so, but since now the Opera browser delivers a file with
this name (but not solving the problem), we will delete it and then
create a simlink to the new file. File deletion:
sudo rm /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so
Creating a simlink:
sudo ln -s /usr/lib/chromium-browser/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/
Answer: Yes, it's all about the libffmpeg.so file. I had to download it from a previous version of Ubuntu as explained in this post The Videos Don't Play Topic as none of the files in 20.04 worked.

I did some research and replaced libffmpeg.so with the one I downloaded from https://packages.ubuntu.com/xenial-updates/amd64/chromium-codecs-ffmpeg-extra/download

Find and extract libffmpeg.so in the downloaded package, then save it as libffmpeg.so in /usr/lib/x86_64-linux-gnu/opera (the path may vary), replacing the existing file if it is there. You will need to do this with root privileges.

My Opera can't play videos


How the nucleon structure has been identified experimentally?

Question: It is known that nucleons (proton, neutron) are composed of partons (quarks, etc.). How was this identified experimentally? In particular, how it has been identified that nucleons comprise of more than one constituent?
Answer: As you may know, when particles are scattered off a target, what actually gets measured is the differential cross section $\frac{\mathrm{d}\sigma}{\mathrm{d}\Omega}$. This can basically be thought of as being related to the fraction of particles that come out of the collision in a particular direction. It's possible to calculate this quantity using quantum field theory, and we can then compare the results to the assumptions that go into that calculation.
For the proton specifically, we express the differential cross section in terms of parton distribution functions (PDFs). Each of these functions, written $f_{i/\text{p}}(x, Q^2)$, gives something akin to the probability that a collision will involve a parton (quark or gluon) of type $i$ with a fraction $x$ of the proton's momentum, when the colliding particle has squared transverse momentum $Q^2$. So the overall cross section for, say, an electron hitting a proton has the basic structure
$$\frac{\mathrm{d}\sigma_{\mathrm{ep}}}{\mathrm{d}\Omega} \sim \sum_{i}\int\mathrm{d}x\,f_{i/\text{p}}(x, Q^2)\frac{\mathrm{d}\hat\sigma_{\mathrm{e}i}}{\mathrm{d}\Omega}$$
In words, for each type of parton, you multiply the probability of finding that particular kind of parton with the cross section $\frac{\mathrm{d}\hat\sigma}{\mathrm{d}\Omega}$ for that particular interaction (which can be calculated from QFT). Then integrate the contributions from all possible values of $x$, and add that up for all possible parton types. That gets you the total cross section. (There's some other stuff involved which I'll leave out for simplicity.)
Now, since $\frac{\mathrm{d}\hat\sigma_{\mathrm{e}i}}{\mathrm{d}\Omega}$ can be calculated, and $\frac{\mathrm{d}\sigma_{\mathrm{ep}}}{\mathrm{d}\Omega}$ can be measured, if you do enough different kinds of collisions at different energies, you can reconstruct the PDFs. And since each PDF is related to the density of its particular type of parton within the proton, if you know them all you basically know the composition of the proton. (Specifically, the quantity $xf_{i/\mathrm{p}}$ basically tells you the momentum distribution of parton type $i$.) For example:

Suppose $xf_{\mathrm{u/p}}$ was measured and turned out to be a sharp spike at $x=1$. That means that when something collides with a proton, it only ever interacts with an up quark that carries all the proton's momentum, and that in turn tells you that the proton contains just an up quark and nothing else.

Suppose $xf_{\mathrm{u/p}}$ instead turned out to be a spike at $x = \frac{1}{3}$. That would mean that when something collides with a proton, the only up quarks it ever interacts with carry $\frac{1}{3}$ of the proton's momentum. This would be the case if, for example, the proton was a rigidly bound collection of 3 quarks, each carrying $\frac{1}{3}$ of the total momentum, in which case the binding particles (gluons) would carry very little of the proton's momentum.
You would, of course, have to measure the other PDFs (for down quarks, strange quarks, etc.) to determine what, if anything else, was in the proton. This is how you'd tell the difference between compositions of, say, $\mathrm{uuu}$ and $\mathrm{uud}$: in the latter case $xf_{\mathrm{d/p}}$ would have a spike of half the size, whereas in the former case $xf_{\mathrm{d/p}}$ would be zero everywhere.

On the other hand, suppose you find that $xf_{\mathrm{u/p}}$ is a bump. That tells you that the up quarks in the proton don't have a definite fixed momentum, but rather that they move around with varying velocities. This would be a strong indication that the proton acts kind of like a fluid, with multiple constituent particles bouncing off each other and sharing their momentum around in the process. The peak of the bump would tell you (roughly) what is the most likely momentum fraction for the up quarks to have.
Again, you would have to measure the other PDFs to figure out what other kinds of particles are in this "fluid," and in what proportions - for example, if there are twice as many up quarks as down quarks, you would find that the bump in $xf_{\mathrm{u/p}}$ is twice the height of $xf_{\mathrm{d/p}}$.

It turns out (perhaps unsurprisingly) that this last case is most relevant for a real proton. Now, I couldn't find the picture I really wanted to illustrate this, but I did get to make the following graph using polarized structure function data from SLAC-143, and it makes a similar point.

You can see that there's a wide bump centered around $x = \frac{1}{3}$. This indicates that the partons in the proton are most likely to be carrying a third of the proton's momentum each, and this is the sense in which one might say that there are 3 constituent particles. (Technically, because this is a polarized structure function, it's talking about the difference between particles with opposite spins. But the unpolarized equivalent would look roughly similar.)
Taking into account all the data that has been collected over the last 40 years or so, the current PDFs for the proton look like this:

As you can see, this combines some of the different features I discussed above. Most notably, there's a bump around $x = \frac{1}{3}$, and it's twice as large for up quarks as for down quarks, which means that there 2 valence up quarks and 1 valence down quark. But there is also a sharp rise in all the PDFs as you go to very small $x$, which is kind of like a spike. It indicates that there are a very large number of partons carrying very small fractions of the total momentum.
Comment: They do depend on $Q^2$, which is the momentum (squared) of the thing that interacts with the proton. In that sense, yes, the "number of constituents" depends on the reference frame, but it's not relative to the detector, it's relative to the particle the proton is colliding with at a fundamental level.
Comment: thank you very much for an excellent answer. The link provided by James was also very helpful. Is my understanding correct that PDFs depend on the momentum of the proton? In other words, does the "number of constituents" depend on the reference frame?
Comment: Hi. May I ask yet another question: Is it correct to say that we see the proton as a composite particle because of the bumps around let's say x=1/3, that is that there is a momentum distribution around that value and that means that the probe for the collision, let' s say an electron, will care 1/3 of the proton's momentum? Can we compare then such a result with QED in an analogous manner, saying that in ee scattering we do not have bumps but sharps around x=1 of the electron(or somehow like that)?Thank you again.
Comment: @ConstantineBlack Not the probe (the thing being shot at the proton), but the component particle which the probe hits, is somewhat likely to carry around 1/3 of the proton's momentum. And yes, in QED electron scattering you would have something like a spike around x=1, although the electron does carry a "cloud" of photons and such along with it so it wouldn't be a perfect delta function. This could probably form the basis of a separate followup question if you like.
Answer: Matt Strassler goes into detail with LHC data here:
http://profmattstrassler.com/articles-and-posts/largehadroncolliderfaq/whats-a-proton-anyway/checking-whats-inside-a-proton/
Comment: Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackexchange.com/q/8259) to include the essential parts of the answer here, and provide the link for reference.


Can a decision Tree split on a question with two features?

Question: If I have two classes that are cleanly separated by a single diagonal line as shown below, can I have a depth 1 decision tree using both features on the question x_2 > x_1 or can we not use two features in a single decision query?
Answer: I couldn't comment due to the reputation restriction. I think there are some trees built the way you question. Also, for the data you posted, we can do a rotation of data and use the regular CART.
This post explains the detail and related papers:
Non-perpendicular hyperplane decision trees
Answer: V. Nice question. Since the accepted answer does not directly address the question, I am adding a few points:

With univariate DTs, we can only segregate classes using straight lines. We could therefore build a series of vertical and horizontal lines zig zagging across the entire graph above which successfully bifurcates the two classes. Of course the depth would not be 1
If rotation is allowed, we could rotate all data-points such that a simple straight line can now bisect them and act as the decision boundary as lovemath has suggested
If rotation is not allowed, but the DT is multi-variate, we could in one straight diagonal line segregate the two classes. See for e.g. how https://web.njit.edu/~usman/courses/cs675_fall15/Comparing_Univariate_and_Multivariate_De.pdf seems to have used the weighted avg of the two vectors to draw a decision boundary. To envisage this, we will have to let go off the current vision we have of the traditional DTs where there are decisions taken based on comparison of attributes with certain fixed values and instead imagine using linear combination of weighted vectors to draw lines as we please at each node


Minecraft PE shows Mojang logo, goes black, and reverts to home screen

Question: Every time I go into the Minecraft PE app it displays "Mojang", but then it goes black and goes back to the home screen. This only started as soon as I updated to Minecraft PE 0.15.2 on my iPad Mini, and I went to the app and it happened. I did a hard reset, but it still doesn't work. Is there any way to fix this?
Answer: Your device probably doesn't meet the requirements.
Which iPad Mini do you have and what version of iOS is it running? Get this info, which you can find in the Settings/General/About and next compare it with the minimum requirements to run the Minecraft PE app on the app store or for more detail here: Minecraft Gamepedia PE System Requirements
If your device doesn't meet the requirements, then don't be surprised if it doesn't work.
Here is a solution to backup your Minecraft PE files and put them back on your iPad once you've uninstalled and reinstalled the app:

Step 1 : Press the "Recents" button on your device and swipe Minecraft to close it. This will completely close the game and stop it from running in the background.
Step 2 : Download a File Manager app on your device, or connect it to computer. This will allow you to access the file system of your Android device. There are several free file explorers available on the Play Store. ES File Explorer is one of the most popular. If you connect your device via computer, you can navigate through the folders just like you would with Windows folders.
Step 3 : Start the File Manager app on your device. You will see a list of folders on your device. You may have to open the "sdcard" folder to see all of your system folders, depending on your device. You don't need a file manager app if you connect your device to the computer.
Step 4 : Open the games → .com.mojang → minecraftWorlds folder. If you are using your computer, connect your device and select it from the Computer window (Windows) or your desktop (OS X). This will display a list of folders labeled with all of your created worlds, both Creative and Survival.
Step 5 : Open the folder for the Creative world you want to transfer. You should see a "level.dat" file.
Step 6 : Copy the "level.dat" file. Android - Press and hold the "level.dat" file and select "Copy" from the menu that appears. Computer - Right-click on it and select "Copy".
Step 7 : After the backup you go to the same folder and paste your copied files there. If your daughter(s) boots up minecraft again she should have her worlds again.
NOTE : This only saves the world, the player data might not be saved.
Comment: My ipad mini 2 is running ios the very latest version of ios which is 9.3.2 and my minecraft is latest update and everything should work because it does meet the requirments
Comment: @user153540 Yeah it sounds like it should work fine, did you try to uninstall and reinstall the app?
Comment: I havent tryed that reason being it wont save my worlds but I do have a backup of them in a file on my computer so if it nessesary I will delete reinstall and if it works I will replace the file with my computer, orr do you know if my xbox account will save my worlds and progress?
Comment: If you do have a backup do one, which you will be able to copy back on your iPad Mini afterwards (solution added to my answer). Your minecraft PE and xbox accounts aren't linked last time I checked, so no I don't think your xbox account will save your minecraft PE's progress.
Comment: Ok well I have to go to bed so ill tell you if it works tomorrow thanks for your help
Comment: @user153540 NP, don't forget to validate my answer if it helped you at least your question is marked as solved :)
Comment: Ok thanks for all your help and support you definatly aswered my question and my minecraft pe is working:) It doesnt have my worlds saved but I know exactly how to get them back because I always backup my games folder inside of mcpe and save it on my destop because Im always downloading and creating my own texture packs and puting it in the recource packs folder. All my worlds are saved to whenever I do that because I always save the WHOLE games folder. :) oh and is that validating your answer as solved because it is :)
Comment: @user153540 happy I could help, and to validate the answer you have to click the green tick so that it is green :)


Is the force exerted by the container on the fluid and the force exerted by the liquid on the container equal?

Question: I came across a question where i was asked to find the force exerted by the walls of a frustum shaped bucket on a liquid inside it . I found the force exerted by the liquid on the walls of the bucket by concepts of hydrostatic force and thought that by newton's third law both the forces will be equal and opposite . But the answer was totally different . I checked the solution in that simple force dynamics (newton's second law) was used considering the weight of the liquid , the normal force by the floor of the bucket, the atmospheric pressure and the force by the walls. Then since the liquid was at equilibrium all the forces were vetorially equated with each other . I am convinced with this solution but i also don't see any problem with my approach . So how should it be ?
Comment: Without you explicitly showing how the two calculations are done, it is difficult to show were the error is.
Answer: Yes!
The explanation is very simple . Frm first law of motion if the net force wasn't zero either the fluid or bucket would move and accelerate.
Answer: I'm guessing that your problem lies in your determination of the force exerted on the slanted walls.  Pressure always acts perpendicular to a surface, so this perpendicular pressure force must be resolved into horizontal and vertical components.  You can then integrate that over the slanted walls (taking into account the hydrostatic changes in pressure with depth) to determine both the horizontal- and the vertical forces on the walls.
Answer: No. Only the sum of the forces are equal. One force (liquid) is active and pushing, the other (container) passive and not pushing, just resisting.


Merge 2D irregular shapes to generate 3D solid

Question: I have 2 SVG shapes. Consider them as top and bottom faces of an object. I want to 'blend' one shape to the other to create a 3D solid. They have a differing number of vertices. Am I able to do this in Blender? I have limited understanding of Blender, but from viewing various YouTube videos it strikes me that what I am attempting should be relatively straight forward?
If anyone can point me to a tutorial I'm happy to give it a go.
Thanks, Darren.

Tried the suggestion below and got this:
Are the shapes too complex (hard to believe), note number of vertices? I get the feeling there should be some control vertices that would avoid the cross-over effect?
Comment: Thanks, it looks like I have some other settings to correct
Answer: Join both objects together (Ctrl+J) if not joined.
In Edit mode select outer edges of upper and lower parts, hit Ctrl+E and select Bridge Edge Loop


What's the difference between "insight of something" and "insight into something"?

Question: I use the phrase insight of for the sentence "It gives me an insight of what college life should like." but Grammarly change it into "an insight into". Under which content we use them?
Answer: The noun insight does not take the preposition of.
Grammarly is right.
Answer: Beware of Grammarly and other sites providing software that purports to give advice on how to write English. Grammarly provides no credentials for its staff and purports to be AI driven, a technique that fails to capture the complexity of English idiom.
The Corpora of Contemporary American English finds 46 prepositions that can follow the word insight. Note that the preposition into contributes 75% of the text examples. This is actually an underestimate since what we're really talking about is a preposition that introduces the area illuminated by the insight. The preposition of, for instance, usually reports who has had the insight:

The insight of the researchers into the mechanism of the chemical interactions.

But not always. See example 8 below, from the following list.

ON
IN
TO
ABOUT
REGARDING
CONCERNING
TOWARD
OF

[1] By reminding us that the [Republican P]arty was not always broken, such a history might offer some insight on how to make repairs. (New York Times, 1/4/15)
[2] Longer follow up data in Syrian refugees will provide more insight in the outcome of these patients. (Kidney Blood Pressure Research, 3/1/19)
[3] [S]everal businesses that worked on the reservation before moving their operation over to the WMSP [White Mountain Stewardship Project] provided insight to the Tribe's contributions. (Journal of Forestry, Vol. 115, Iss. 6, Nov 2017)
[4] Sylvia Plath gave mental illness an aura of nonconformity, creativity, and even acute insight about social and political affairs. (Journal of American Culture, March 2014, Vol 37, Issue 1)
[5] Those models may provide insight regarding quantitative changes one might expect on multiple time scales. (Physics Today, 2011)
[6] Analyzing this pre-post measure provides valuable insight concerning the state-of-mind of the individual prior to entering the student experience (Education, Vol 114, Issue 2, Winter 1993)
[7] Educators who value the input from parents providing unique insight toward their children will likely be able to create effective programs.... (Education, Vol 127 Issue 1, Fall 2006)
[8] In order to gain full insight of the informant's perspective and understanding of the course, his journals, midterm examinations, and term papers were examined. (Journal of Instructional Psychology, Vol 41 Issue 1-4, 2014)
Comment: Nevertheless, I think _into_ would be the most idiomatic in the OP's sentence.
Comment: @KateBunting Most natural? Sure. Most common? Sure. (As indicated.) I prefer to reserve *idiomatic* for instances of mandatory licensing. For example, it's not idiomatic to say "married of" when you mean "married to." Of course and as always, YMMV.


Tile Loaded Event in ArcGIS API for JavaScript?

Question: I wanted to know tile loaded event in ArcGIS API for JavaScript. As soon as tile is loaded this event should be called which give me tile specific information like tiles coordinates etc.
Comment: There is no ready made event for this. You'll probably have to make and use a custom layer which gives out these kinds of events.
Answer: You could use aspect oriented programming to intercept the start of end of a function
More info here on dojo aspect. http://dojotoolkit.org/reference-guide/1.10/dojo/aspect.html
<code>aspect.before(tiledLayer, "_addImage", function() {

  // you will have all the info you need in the arguments array

}, true)
</code>


WebPart security

Question: What is best practice to ensure only the correct users can see a webpart in Sharepoint 2007?
Security Groups, and Audiences have both been suggested to me.
Answer: It depends if you are talking about the rendering of Web Parts or adding Web Parts from the Web Part gallery. Let me explain both scenarios:
1) In MOSS 2007, you can indeed use audiences to target the rendering of Web Parts on a given Web Part page. This is exactly what the Audience property on Web Parts is designed for. However, for WSS 3.0 deployments this is not possible as Audiences is a MOSS thing.
2) Hiding Web Parts in the Web Part gallery is also possible, i.e. in case you do not want all users with design permissions to be able to add any WP in the gallery. Use item permissions on the .dwp / .webpart files in the WP gallery to restrict access.
Comment: Easy, goto site settings -> Web Parts. Then locate the .dwp/.webpart file and click the edit icon. On the Edit Item page, click Manage Permissions in the tool bar.
Comment: Great idea on item permissions in the web part gallery.  I had never thought of that!
Comment: How do you setup the item permissions in the .dwp/.webpart file to restrict WP gallery access?
Answer: Although audiences are not a security mechanism, for webpart visability the effect is the same.  The issue with a webpart is others can add that webpart to another page that you are not controlling the audience for if you do not set the protection for the webpart in the gallery, as Lars mentioned.  As he also mentioned, the audiences are only available if you are using MOSS and not just WSS.
An additional security step is to place the logic in the webpart to prevent unauthorized use.  If it is truely a security concern, I would chose this approach.
Answer: As far as best practices go, it depends. If you use Audiences, use them first. This allows for central management of content accessibility. If not, item permissions is probably the next best thing. After that, you have to manage it in the Render() of the webpart itself (bad idea).

WebPart security


Detect abrupt changes in signal

Question: I'm using MATLAB and I'm trying to find the index of the first signal drop as shown in the figure bellow :

I tried the function findchangepts but it didn't give me the exact index, any solutions ?
Answer: A cheap and simple way is to differentiate the signal numerically and threshold the magnitude of differencate to identify the abrupt changes.While deciding the threshold you should take into account the dynamic range of the signal.
Answer: The level of fluctuations looks quite stable. You can estimate it on sliding windows with robust statistics, to limit the influence of dropping data. The simplest ones are the median and the median/mean absolute deviation, the robust  counterparts of the mean and the standard deviation. If you plot them around the signal, it could appear as an envelope following the noise level (at least proportionally).
From that envelope level, with a security factor, drop detection could be possible. May be from a statistics on data above the nosie level.
Signals that are bordeline above the noise level (around 0.8 or 1.2) can be more complicated
Answer: The Noise floor looks pretty flat. So, I can suggest a simple low cost algorithm that should work given you have enough data to learn thresholds.

First, estimate the noise floor of your sequence. Note that you cannot estimate noise floor by simply taking mean of the complete vector. Because that mean will give you biased result due to the impulsive drops. So, you can divide your samples in smaller windows of say, 256 samples each and then calculate the mean. And, then calculate the mean of all these windowed means. That should give you an approximate Noise floor.
Now, define a negative peak (or a Drop) that if a sample value $x[n]$ is less than $x[n-1]$ and $x[n+1]$, then it is a negative peak. You run once through your data samples and store all indices for which this criterion is satisfied. These will be your potential drops.
Once you have Noise floor and negative peaks, you can learn a Threshold from the Noise floor, so that if any of the stored negative peaks is below that threshold, you can store its index as a final set of negative peaks.
First index to survive this thresholding will be your first drop.

It is not the best but can do the job pretty easily. You can study its performance and even optimize the threshold with large number of data vectors to get a very low Probability of False Detection.

Detect abrupt changes in signal


Using a 3 phase step down transformer in reverse

Question: I have a 30kVA transformer with primary 480V delta to 208V Wye secondary.  I am relocating to a building that has 208 service, and would like to use the above transformer in reverse, so that I can run my 480V equipment without other conversion.
This transformer used in reverse to produce 480V delta output will not have a ground or common terminal on the output side.  My question is: What then are the grounding requirements for the machinery that the transformer would be servicing, and, are there any other wiring requirements for the transformer itself?
Comment: Welcome to EE.SE. If you add your location into your profile page and post you may get some sensible answers to suit your local electrical regulations. This is an international site.
Comment: Currently, is your 480V delta equipment grounded to earth?
Comment: Yes -- is your 480V equipment designed for a corner grounded (2 hots and the 3rd phase is a neutral-of-sorts) or an ungrounded (3 hots, no neutral) delta?
Answer: I will assume you are in the US and therefore under the NEC.  Based on that assumption, my answer is:
There is a difference between grounding and bonding, and this is one of the most confused sections of the NEC.  Grounding is intentionally tieing something to earth, whereas bonding is making everything electrically continuous... so we create a grounding system, and then bond all metallic parts that may become energized under a fault condition to that grounding system (called the grounding electrode system, or GES).  Having said this, your particular equipment will probably still be bonded, but not have a neutral wire, which is normally tied to the ground at the service entrance or the separately derived system.
In my mind, your system would be a "separately derived AC system" as defined by the NEC, and article 250.30 talks about grounding such.  Section E of that article is ttiled "Ungrounded Systems" (so you can already see where the NEC gets very confusing at best, we are talking about grounding an ungrounded separately derived systme, hench the widespread confusion!)  This section has three subparts which define the rules for the grounding electrode conductor, grounding electrodes, and the bonding path.  Most of these rules just reference other parts of the NEC.
I think in short, you will install a grounding electrode system (rebar if accessible, water pipe if metallic and accessible, and building steel; if none of these are available, you will have to install ground rods, rings, plates or something else - typically some sort of combination of all these items will be used) and then run a grounding conductor from the transformer case to this electrode system.  Then all metallic parts will be bonded together and to this system to effectively give you a grounded, ungrounded system.
The NEC really needs to change the verbage to bonded, not grounded, but they don't, from my understanding, for legacy reasons.
Comment: The comment about corner grounding is because in a Delta system, you must EITHER ground one corner, OR provide a ground fault monitoring system. Corner grounding the Delta is by far a lot cheaper. You should be aware however, that Delta power feeds to things like VFDs are risky to the VFDs. Most of them will have MOVs and some add Common Mode Filters, all of which are designed around expecting a Wye power supply where the voltage reference to ground is 58% of the line to line voltage.
Comment: No problem.  Not sure I adequately answered your question, but there is a reason grounding is the most confusing topic in the NEC.
Comment: You answered perfectly.  My reason for the question was that in another forum, someone said that one corner of the 480 delta output would have to be grounded.  I'm not in need of a common for the output - won't be using 277 for anything, so that comment about grounding one corner of the delta completely went over my head.  Can you explain what that would have been about?


Dismiss diary appointment alert

Question: I have set Emacs to alert me via a window 30 minutes before an appointment. This is working as expected. However, every three minutes thereafter, Emacs continues to alert me to the same appointment. How do I dismiss/acknowledge the reminder and prevent it from triggering repeatedly?
Comment: Only a workaround, but what about prolonging the time between reminders?  E.g.: (setq appt-display-interval 10)
Comment: Are you saying that for *any* appointment in your diary, you want *exactly one* notification, 30 minutes beforehand.
Answer: M-x appt-delete is a possibility to delete entries from the appointment list.
See also (info "(emacs) Appointments").

Dismiss diary appointment alert


how to alter sequence in db2 stored procedure by another user

Question: I am using DB2 LUW Version 10.5.0.5 on Linux (x86_64)
I have written a procedure to alter a sequence to restart with a certain number. The procedure takes the sequence name and the number to restart with as parameters.
The procedure got created successfully . I granted a developer connect access on the database and execute access on the procedure. But he is getting SQL -551 (permission issue for alter sequence sql) when he executes the procedure.
Create table works perfectly fine when it is executed in a procedure by anyone who even doesnt have create table access. WHy alter doesn't work then? Is there a way to allow developers to alter a sequence in a database without granting alter access on the sequence itself?
Answer: Effect of DYNAMICRULES bind option on dynamic SQL
You must set the DYNAMICRULES bind option to BIND before the routine creation to make dynamic sql statements of the routine execute with the routine creator authorization. They are executed with authorization of a user who runs the routine otherwise.
You can do it by calling the following statement before the CREATE OR REPLACE PROCEDURE statement in the same session:
CALL SET_ROUTINE_OPTS('DYNAMICRULES BIND')

But you are not able to execute dynamically the following statements with such a bind option as described in Table 2. Definitions of Dynamic SQL Statement Behaviors:
GRANT, REVOKE, ALTER, CREATE, DROP, COMMENT ON, RENAME, SET INTEGRITY, and SET EVENT MONITOR STATE

This means, that you are not able to run dynamically ALTER SEQUENCE with an authorization different from the invoker's one.
You may grant ALTER privilege on sequence to your developer to resolve the issue.
Comment: Thanks Mark. Really appreciate your help. However, the solution didnt work.  I ran call set_routine_opts('DYNAMICRULES BIND') in the same session as create procedure as dbadm user. Upon calling the procedure with dev userid, I am getting error "SQL0549N  The "ALTER" statement is not allowed for "package" ""
because the bind option DYNAMICRULES RUN is not in effect for the "package".
SQLSTATE=42509"
Comment: Sorry, I forgot that some statements can't be executed in such a routine. I've updated the answer.


What are my options to get asynchronous messaging with queues inside PostgreSQL?

Question: I am trying to implement CQRS fully inside a PostgreSQL v15.1 database as it is all what I have for the moment. The implementation will be via asynchronous messages (i.e. events) that needs to be queued somehow for projection processors inside the database. The transaction that produced the event should be separate from the transaction that will consume it asynchronously. This should be done without an application server or a dedicated messaging platform. It is OK to utilize existing and well-maintained PG extensions for that matter. What do you suggest addressing my question and why?
Comment: [PgQ](https://github.com/pgq) because it seems reasonable and if you read it over in this [wiki](https://wiki.postgresql.org/wiki/PGQ_Tutorial) it seems to have some of the requirements you are in seek of for a potential solution. Another good read post on it that may help too [Message Queuing Using Native PostgreSQL](https://www.crunchydata.com/blog/message-queuing-using-native-postgresql) but it might have various flavors to implement per the GitHub.
Answer: Why do you consider application servers off?
Nevermind, as you already said you can use PG extensions.

you can use "pg_notify" to send a message to a background worker whenever an event is generated by a transaction. The background worker can then perform the necessary operations to update the read model, if this is what you mean.

However, pg_notify has its limitations:

Payload size is limited to 8192
The number of listeners is limited to 32
Answer: If you plan to run it completely inside Postgres, there are at least a couple of options you can use:

PgQ as was mentioned above - an out of the box solution
Manual implementation, i.e. a generic queue processor, you can implement it based on a custom table that stores a queue and a routine called using pg_cron for example, i.e. periodical calls triggered by pg_cron that can act either as triggers to run a processor, or you can have a processor called in a long loop and check if that loop is still active using pg_cron and restart if necessary. Basically, it can be either a short polling solution or a long polling solution.


Applying CSS styles to RDL file

Question: Is there any way to apply CSS styles to an SSRS rdl file ?
Note: it's not necessary to BIDS, my main goal is to edit the rdl file regardless of the used tool.
Thanks
Answer: From what I read, an RDL file is written in XML so yes, you can use XSLT to turn it into HTML, to which you can apply CSS.
Answer: Well sort of.  You can do what Mario suggested but you can't really do that to the RDL as is.  You need to CALL IT from a service to HTML and then apply a CSS to that.  The RDL File contains definitions but not the report data.  So if you changed it for markup you would still have to connect to a database and read the RDL language.  As far as I know RDL is a propertiary SSRS langauge that needs a converter to tell it how to display.  This is generally the service at http:// (servername)/ReportServer which has the information built in that can translate it.  You could not alter this file directly without A LOT of work to transform it as it would then need to know a connection string, how the data was presented.
To do what you want I would think you could do this:

Deploy a report
Call a form to be populated in HTML like:
<code><form id="ssrsform" action="http://(servername)/ReportServer/Pages/ReportViewer.aspx(Path)&rs:Command=Render" method="post" target="_self" >
.....(options and settings)....
</form>
</code>
Apply a CSS form to the HTML file directly that is calling the webserivce.

IMHO changing a proprietary language file like RDL before it transmits to HTML would be hard as you need to account for the data you get as well as just the connection string.

Applying CSS styles to RDL file


FakeItEasy ReturnsLazily with out parameter

Question: I'm new to using FakeItEasy and rather stuck at my first attempt. The interface i want to fake has a method like this:
byte[] ReadFileChunk(string path,int offset,int count,out long size);

I would like to see how the arguments are passed on, so I'm using ReturnsLazily. Here is my attempt:
long resSize;
A.CallTo(() => dataAttributesController
     .ReadFileChunk(A<string>.Ignored, A<int>.Ignored, A<int>.Ignored, out resSize))
     .ReturnsLazily((string path, int offset, int count) =>
        {
             return Encoding.UTF8.GetBytes("You requested: " + path + "(" + offset + "," + count + ")");
        })
    .AssignsOutAndRefParameters(123);

This compiles, but when ran it generates this exception:
The faked method has the signature (System.String, System.Int32, System.Int32, System.Int64&), but returns lazily was used with (System.String, System.Int32, System.Int32).

Which is correct, but i can't figure out how to add the out parameter. If I change the ReturnLazily part to this:
.ReturnsLazily((string path, int offset, int count, out long size) =>
   {
      size = 0;
      return Encoding.UTF8.GetBytes("You requested: " + path + "(" + offset + "," + count + ")");
   })

it will not compile, and I don't understand the errors:
error CS1593: Delegate 'System.Func<FakeItEasy.Core.IFakeObjectCall,byte[]>' does not take 4 arguments
error CS1661: Cannot convert lambda expression to delegate type 'System.Func<string,int,int,long,byte[]>' because the parameter types do not match the delegate parameter types
error CS1677: Parameter 4 should not be declared with the 'out' keyword

For a novice like me, this reads like it doesn't like 4 parameters nor understands what to do with 'out'. Can someone please explain me how I should be reading these errors? A working example would be very welcome as well :-)
Thanks a lot!
--- EDIT ---
This seems to work:
A.CallTo(() => dataAttributesController
    .ReadFileChunk(A<string>.Ignored, A<int>.Ignored, A<int>.Ignored, out resSize))
    .ReturnsLazily(x =>
           Encoding.UTF8.GetBytes("You requested: " + x.Arguments.Get<string>(0) + "(" + x.Arguments.Get<int>(1) + "," + x.Arguments.Get<int>(2) + ")"))
    .AssignsOutAndRefParameters((long)123);

A bit less readable then I was hoping for, is this anywhere near the intended use of ReturnsLazily?
Answer: Is that interface under your control?
byte[] ReadFileChunk(string path, int offset, int count, out long size);

if so: Isn't out long size just the same as the size of the returning byte[]?
In that case I would just remove the size parameter from the interface method and use the "nice-to-read" ReturnsLazily method as you intended first.
Answer: Update: the issue I mention below was fixed in FakeItEasy release 1.15, so update to the latest version and you shouldn't have to worry about the out/ref specifiers on the methods when using ReturnsLazily.
Sorry for the delay. I'm glad you found a solution that at least functions for you.
I agree that the syntax you landed on isn't the most readable, but it does appear to be the correct one. The "convenience" versions of ReturnsLazily won't work with out/ref parameters because the lambda can't take the out/ref modifiers.
It doesn't help you today, but I've created FakeItEasy issue 168 to deal with the problem. If you have additional opinions, please drop by and comment or something.


Overide a function that is inside a plugin

Question: I would like to change the behavior of one function in a plugin. Instead of rewriting the file and having to deal with updates I would prefer a solution that works similar to the way add_filter works for the wordpress core. Is this possible using either php or wordpress?
Answer: I think you should send a message to the author of the plugin, so that he would have added hooks do_action() and apply_filters() to a desired location in the code. Then even when you upgrade you will not lose functionality.
Or use that constructions if(function_exists('plugin-function'))
Answer: If there are hooks in the function, this is possible, if not, there may be pluggable functions, where you can replace their function with your own custom function. I have not seen pluggables in plugins frequently, but with most of the more popular plugins, you do see actions and filters.
You may be able to interact with the plugin by changing the behavior of the functions which it calls to your desired effect.  This can be tricky, and often results in hacky solutions, but it's better than nothing.
If there is not a way to interact with the plugin, then you can fork the plugin's code. Naturally, this is the least desirable, but it may be your only option.
Comment: +1 And I would fork the code and send the code back to plugin author to see if they are willing to include it in the main plugin code. This way everyone wins and I am least bothered.


Sleep Apps and Shared Beds

Question: I've seen on the marketplace now several alarm clock applications that claim to analyze your motion patterns in your sleep, so as to determine the ideal time to wake you up such that you feel refreshed.  I am intrigued by this possibility;  however, I do not sleep alone.  Does anyone know if these apps work well, or even at all, if there are multiple individuals in the bed, each presumably moving on their own sleep cycle?
Comment: Can you post a link to the app? It sounds really interesting.
Comment: There are several apps of this category;  here's one example https://market.android.com/details?id=com.kyotoap.android.sleepcyclealarmlite&feature=search_result
Comment: https://market.android.com/search?q=Sleep+Cycle&so=1&c=apps
Comment: Yeah found some now.. too tired to be able to search ;)
Answer: No, it would probably not work if you don't sleep alone unless the one you sleep with don't move at all in their sleep.
Comment: I'd say it depends on the sleeping arrangements. Tempurpedic, for instance, markets heavily on the idea that your partner can jump up and down on the bed and it won't disturb you.
Comment: I think, it is worth trying to use this alarm with some kind of arm strap for your smartphone. These straps are ofter used with MP3 flash players. The divice's accelerometer will register *your* arm movement. But of cource, it wouldn't be able to determine if you moved your arm yourself or someone pushed it.
Comment: Yeah, but that would ruin the idea at the same time. If it won't disturb me that my BF is jumping in the bed, next to me, how is the app going to sense when you move in your sleep?
Answer: In short. It doesn't work.
The movements you have when you sleep indicates "muscle paralyzation", which is one of the factors that indicates your REM sleep cycle. However, this is one of the not-so-accurate ones. If you want real accuracy, you will need those that measure ECG with a headband (Zeo, for example).
In addition, most apps in the market does not give an accurate reading of your movements due to interference and sensor sensitivities.

Sleep Apps and Shared Beds


Android - releasing allocated memory AnimationDrawable is using up

Question: I have a complex Battle system which has 1 parent Activity and then several child classes which access the static variables of the BattleActivity by extending Battle and passing the context to those classes.
This all seems to be working fine, however I am having an issue with releasing all my AnimationDrawables from memory. There can be a total of 24 DrawableAnimations used throughout a battle. This is ok for now, however every time the user encounters a new monster then 4 more AnimationDrawables are added to memory which will slowly but surley cause my App to Crash with anb Out of Memory exception.
Therefore, I really need to find a way to release all the memory my battle system takes up as soon as I exitit. Currently, I am testing on a Sony Z2 and when the user enters a battle the mmeory increases from 91mb to 230mb. I need to get this memory usage back down to 91mb when the battle has compelted. I have added some very basic code snippet to give you an idea of how the app currently flows and what I am trying to do to release the memory.
public class Battle extends Activity
{
     // I have several AnimationDrawables loaded into memory
     // These are then assigned the relevent animation to a button swicthing between these animations throughout my battle
    ImageButton btnChr1;
    AnimationDrawable cAnimHit1;
}

//This is the use of one of those AnimationDrawables
public class Battle_Chr_Anim extends Battle
{
    protected Context ctx;
    private ImageButton btnChr1;
    AnimationDrawable cAnimHit1;

    public Battle_Chr_Anim(Context c, ImageButton _btnChr1, AnimationDrawable _cAnimHit1) {
        this.ctx = c;
        this.btnChr1 = _btnChr1;
        this.cAnimHit1 = _cAnimHit1;
    }

    // Bound the ImageButton
    int id = ctx.getResources().getIdentifier("idle", "drawable", ctx.getPackageName());
    img_chr1.setBackgroundResource(id);
    frameAnimation = (AnimationDrawable)img_chr1.getBackground();
    frameAnimation.start()

    // Loaded into memory ready so I can swicth them over quickly when user attacks
    int ca1 = ctx.getResources().getIdentifier("attack", "drawable", ctx.getPackageName());
    cAnimHit1 = (AnimationDrawable)chrHit1.getBackground();
    cAnimHit1.start();
}

public class Battle_Ended extends Battle
{
    protected Context ctx;

    public Battle_Ended(Context c) {
        this.ctx = c;
    }

    //This is a dialog popup when the user completes the battle closing the battle activty
    void EndBattle()
    {
        ImageButton btnSubmit = (ImageButton)dialog.findViewById(R.id.imgBtnSubmit);
        btnSubmit.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent returnIntent = new Intent();
                setResult(RESULT_CANCELED, returnIntent);
                RecyleAllAnimations();
                dialog.dismiss();
                ((Activity) ctx).finish();
            }
        });
    }

    void RecyleAllAnimations()
    {
        // I want all AnimationDrawables from memory here, I believe the below line removes the one currently in use, however I have no way of releasing the other animations sitting in memory.
        img_chr1.setBackgroundResource(android.R.color.transparent);
        System.gc();
    }
}

Comment: Do you really have static variables which you pass the application context? i think they are going to kill you app much earlier than your drawables
Comment: Yes this is only for my Battle side of things, as I did not want all my code in the same Activity and simply extend this class so that I can still access the UI. As i need to be able to load up all the AnimationDrawables before I load up the Activity so that the animations can be fluent when the user enters a battle
Answer: first of all I think you can not do any recycling for AnimationDrawable unless you leave the scope that they are declared. do not relay on System.gc(); and let GC automatically releases those memory for you.

which access the static variables of the BattleActivity

this is your first mistake. If you use static variable even if you leave your activity they are all there and you will definitely get OOM.

Therefore, I really need to find a way to release all the memory my
  battle system takes up as soon as I exitit.

if you declare all variables as non static variables then you wont get OOM when you leave the scope they are defined. although you may get OOM if you create AnimationDrawable without any bounds during activity is running.
Comment: I have amended my code so that I am no longer using static AnimationDrawable, however am still having an issue of releasing the memory even after the activity is destroyed and the user returned to the Game Map page. Any other ideas?
Comment: what issue do you have now?
Comment: Well simply put the memory is not being released for the AnimatonDrawables
Comment: I am not sure but I think as you leave that activity gc dose not run immediately, I think it only runs when you need more memory and dose not have enough, so play around and see if it will do any cleaning or not.
Answer: Using static Drawable(s) or View(s) will cause a memory leak because drawables are stateful.
You could either check for any other static Drawable(s) or View(s) and get rid of them or call
drawable.setCallback(null);

You cannot recycle Drawable objects and it is not a good practice to call System.gc()
It seems that your app is suffering from a memory leak somewhere, if you tried the above and memory still expands at that rate then consider doing memory analysis to narrow down the problem.
Comment: I don't think it is the fact that I am suffering from memory leak, I think its the shear amount of memory the drawable use. I mean on one load I have 30 AnimationDrawable that need to be loaded up, each consists of roughly 15 images each 256px x 256px. So as expected the memory usage shoots up (It also takes 2-4 seconds to load based on the device). This i can deal with, however ones this is done I need to somehow release that memory. As each time a new monster is encountered a further 5 AnimationDrawables are added to memory
Comment: That's true but if your Activity is not leaked, memory should be released as needed, also if you called System.gc() manually after closing the Activity those Drawable(s) should be cleared off memory unless there is a leak.
What if beside making sure no static Drawable(s) are used and the other things I mentioned make them point to null upon finish to avoid possible Loitering
Comment: I think i will have to look into this tonight as need to remove static from all ImageViews and ImageButtons then can test it properly. What is the vest way to check for a memory leak and memory analysis tool?
Comment: If your memory usage is always going up that indicates a memory leak, check these links for how to find the leaks, http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html and https://developer.android.com/tools/debugging/debugging-memory.html
Comment: Having a static ImageView for example will cause the whole Activity to be leaked (stay on memory), you should get rid of all these static View(s) and Drawable(s)
Comment: Yes I am now working on that, is this the same for all views including things like a TextView?
Comment: Yes all views including TextView(s)


Dissolving textures to animate blink - What am I doing wrong? (Face animation with shaders)

Question: I'm trying to animate a blink using textures and I am using a two image texture connected to a mix colour node and when I move the "fac" slider the textures do not change. I do not know what I have done wrong, any help please? (Keep in mind, I am a beginner so I don't really know that much about Blender)
Comment: @moonboots Hello, I tried this however I didn't work I'm pretty sure I'm doing it wrong, Is there any way you could attach a screenshot of how it should look like?
Comment: maybe pack your images (File > External Data > Pack All Into .blend) and share your file here (read the instructions): https://blend-exchange.giantcowfilms.com/ or https://pasteall.org/blend/
Comment: @moonboots  [](https://blend-exchange.giantcowfilms.com/b/YZZ2R4gK/)
Comment: @moonboots like this? [](https://blend-exchange.giantcowfilms.com/b/d9Jmewkl/) sorry about this, i'm not really used to blender thanks for the help tho the slider won't change the texture tho?
Comment: ok so I've corrected my answer, I thought you were using a Mix Shader but you are using a MixRGB so the setup I show is correct
Answer: Ok so as you're using a MixRGB, you can indeed mix the 2 Image Texture nodes into the MixRGB, then you need to plug the MixRGB into a Diffuse, then the Diffuse into an Output:

MixRGB is used to mix 2 colors and/or images, but you need to tell Blender what kind of shader it is supposed to be, between Diffuse (which will be affected by light and shadows) and Emission (which emits light). In your case I guess you need Diffuse.
Another equal solution would be to use the Mix Shader, in that case you need this setup, as Mix Shader doesn't directly accept images or colors:
Comment: thank you so much! the place where i went wrong was that i wasn't in rendered view i was just in the standard one so that is why it wasn't showing! tysm tho :D
Comment: oh ok, anyway the Diffuse and Output were missing so you wouldn't have been able to see anything
Comment: yeah i just added that in :)


MariaDB on MacOS: where is the default ibdata1 file?

Question: Using Homebrew, I install MariaDB. It installs fine, but where is the ibdata1 file stored?
Answer: On M1 Mac, Homebrew installs files into the /opt/homebrew/ folder.
So with MySQL/MariaDB installed by Homebrew, default data directory is /opt/homebrew/var/mysql/.
It contains all databases and ibdata1 and other files previously placed in /usr/local/var/mysql/.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).
Answer: From your MySQL Command Prompt, after root login,
SELECT @@datadir;     should reveal the folder name
Answer: /usr/local/var/mysql is the default data directory for MariaDB.
It includes the ibdata1 file, log files, etc


symbolic execution and model-checking

Question: What is the difference between symbolic execution and model checking (for example in model transformation)? I don't understand difference of them. Are they the same?!
Comment: Many programs may do both.  If you need to specify everything in an alternate language, the model checker is most likely the technology.  It is good for verifying high level designs.  It requires little expertise.  Symbolic execution can work on existing code.  It typically uses some SAT/SMT solver to validate constraints on execution.  For example, this is what 'klee' does.  Most of these require annotations or alteration of the code to prove/disprove some property.
Comment: Here is one definition of symbolic execution  from CPAChecker, "The symbolic execution analysis is similar to the value analysis. But instead of overapproximating variable values to the top element, it can introduce symbolic values and track constraints over these."  Value analysis (like Frama-C EVA) will use ranges to evaluate under/over flow.  With Klee, it also uses UBSan, which triggers over/underflow.  'Model checking' is usually equivalent to a Kripke structure (FSM with propositions).  But many programs will be inspired by one, but often have elements of each (and theorem provers).
Answer: In model checking, you have to encode your system as a Finite State Machine and provide that FSM to the model checker as well as a specification. The model checker will then make sure that the specification always holds in that system.
In symbolic execution you only provide your program and the symbolic execution engine will examine all the feasible paths to generate test inputs or check assertions.
A simple example of their difference: concurrency. Model checking can handle multi-thread systems because it is specified in the FSM provided as input, however, symbolic execution cannot handle more than one thread.
Comment: Thanks for your kind help. Java Path Finder is model checking tool or symbolic execution tool or both?!
Is there any symbolic execution tool that doesn't use model checking?
Comment: Why can't symbolic execution handle more than one thread?
Comment: @StevenShaw  Symbolic execution is based on 'logic'.  Logic has only one flow and is 'timeless'.  You need 'computational timed logic' (CTL), which is what all model checkers are based on.  The underlying CTL mathematics has a notion of 'path' or evolution.
Comment: @artlessnoise, Maybe you meant "Computational Tree Logic"
Comment: @SuraajKS Yes, confusing as LTL is Linear Temporal Logic, where I replace with temporal with time.  In reality most tools are fusing both concepts.  Also the concepts are based on [Temporal logic](https://en.wikipedia.org/wiki/Temporal_logic).  You can see that most of the time logics use temporal.
Answer: Model Checking:
A method to formally verify that a program satisfies a specification. The specification is usually given in a temporal logic formula like: "if input is x output must be y - holds for all executions (globally) of the program" (see e.g. Edward A Lee).
Symbolic model checking versus explicit state checking:
Programs can be finite state machines (FSM). Here explicit state checking is sufficient. But luckily model-checkers exist also for extended FSM's, concurrent, probabilistic, real-time applications. To help prevent state explosion in those systems with very large (infinite) number of states, symbolic model checking is used.
In symbolic model checking the states and inputs etc. are treated as symbols and as propositional formulas (or sets of states, set operations etc.). To perform model checking a reachability analysis is needed and to do this the program transitions are executed symbolically. These checkers can't make use of the normal execution of instrumented native code.
Symbolic execution:
There exist different methods of encoding during symbolic execution. Some are very specific to model checking and some are modular and used in a stand-alone symbolic execution framework, as it was defined by the inventors of symbolic execution. A symbolic execution framework often uses also some elements (exploration, search) of symbolic model checking to be usable for testing etc.
Finally some examples:
JPF, Java-Pathfinder: Model-checker, explicit state checking, input: java byte code
SPF, Symbolic Pathfinder: Symbolic execution, extension of JPF
JCBMC: Bounded Model Checker, extension of JPF, SPF
XRTs: Exploration and symbolic execution, input: CIL byte code
IntelliTest: Parameterized Unit Tests uses XRTs
Spec Explorer: Model-based Testing uses XRTs

symbolic execution and model-checking


Monitor Windows event logs for an event and execute a VBS script

Question: I need a free way to monitor the Windows event logs and when a particular event is logged I need to kick off a VBS script.  Is there a tool that can do this?
Comment: Did you find an answer to your question? If so, awarding the answer and an upvote would be helpful to future readers.
Answer: You can roll your own using PowerShell 2.0 if it is installed on your server. Take a look at the Get-EventLog and Send-MailMessage cmdlets. Brush up on how PowerShell prefers to handle logical loops while you're at it.
From there, you can easily call any script that you want with cscript.exe
If you don't want to make your own log parsing script (it's not hard, promise!) then take a look at EventReporter which is a paid tool.
Answer: This might be to over the top for what you are after but SCOM can do this type of thing
http://www.microsoft.com/systemcenter/en/us/operations-manager.aspx
It has the ability to execute VB Script and also Powershell, the only thing with Powershell you have to use the Authoring Console, as the standard SCOM console does not support Powershell.
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=14989
SCOM is a pretty good system and we use it at my work so we use it for this type of thing but as stated it might be to much for what you want.
Comment: SCOM is not free however, he is looking for a free tool.
Answer: If you already speak vbscript, you can expand the script you have and monitor the event log directly over WMI. Here's what I use:
<code>Set objWMIService = GetObject("winmgmts:" & _
    {impersonationLevel=impersonate,(Security)}!\\.\")

Set colMonitoredEvents = objWMIService.ExecNotificationQuery _
("Select * from __instancecreationevent where TargetInstance isa 'Win32_NTLogEvent'")
Do
  Set objLatestEvent = colMonitoredEvents.NextEvent
  strTimeWritten = objLatestEvent.TargetInstance.TimeWritten
  strSource  = objLatestEvent.TargetInstance.SourceName
  strType  = objLatestEvent.TargetInstance.Type
' etc
loop
</code>
Hope this helps.
Comment: These are great responses! Thank you!  I'll review them tonight to see which ones are the best fit!


Syntax Highlighting with mod_dav_svn

Question: I am looking for a simple way to present code in the browser via Apache's mod_dav_svn Subversion module that is syntax highlighted (my instance is Ruby, but it shouldn't matter since mode of these modules support all the major languages).  Does anyone know a quick way to do this?  In a world of Geshi, noone wants to look at black text code.  Apache 2.2 with Red Hat.
Answer: I've got a working solution, but it's not "easy".
I tried to redirect file rendering through PHP for some time, but authentication, and read access rights, is an issue. My current solution involves using SVNIndexXSLT for loading JSHS.

Syntax Highlighting with mod_dav_svn


Nielsen extension of Riemann surface

Question: Let $S$ be a riemann surface.
If S has idea boundary curves,then the intrinsic metric on $S$ can be defined by the restriction to $S$ of poincare metric of the double of $S$.
Also this metric can be derived from the restriction to $S$ of the poincare metric of $S^N$,where $S^N$ is the Nielsen extension of $S$.I don't know what the Nielsen extension of $S$ is
Comment: I suggest you rewrite the question as follows:  'What is the Nielsen extension of a Riemann surface?'
Answer: The below is a cut and paste from a paper from Noemi Goldberg, PAMS, 1986. I blame Preview for the typesetting quality (= not knowing about mathjax). However, the original poster could also have googled "nielsen extension".
Let So be a Riemann surface of genus g with n punctures and m holes. Assume that 6<7- 6 + 2n + 3m > 0 and that m > 0. Then So can be represented as U/G where U is the upper half-plane and G is a torsion-free Fuchsian group of the second kind. There is an infinite set I of open intervals of R U {oo} on which G acts discontinuously.    Let fi = U U L U I, where L denotes the lower half-plane. The quotient S$ = U/G is the double of So- It is a compact surface, except for finitely many punctures. The surface Sq can be represented as U/G', where G' is a torsion-free Fuchsian group of the first kind. Let D be a component of the preimage of So under the natural projection U —>U/G' and let Gi be the stabilizer of D in G'. Then the surface Si = U/Gi is the Nielsen extension of So- Given a surface So, let Sfebe the Nielsen extension of Sk-i, for k G N. Define the infinite Nielsen extension of So to be Sqo= SoUSi US2U•••.
Comment: Thank you for your answer,although i am puzzled with some notation

Nielsen extension of Riemann surface