text
stringlengths
1
1.11k
source
dict
algorithms, loop-invariants Title: Loop Invariant summation So I am stuck: I have this algorithm from which I need to find a loop invariant but I just can't get my head around it : main_f = x follow_up = x while (follow_up < y): follow_up = follow_up + 1 main_f = main_f + follow_up return main_f So basically I have a list of values of this function(main_f): Initialisation : i = 0 , main_f = x Iteration 1: i = 1 , main_f = 2x+1 Iteration 2: i = 2 , main_f = 3x+3 Iteration 3: i = 3 , main_f = 4x+6 Iteration 4: i = 4 , main_f = 5x+10 Iteration 5: i = 5 , main_f = 6x+15 And basically it goes on and on like this in a while (main_f < y) loop; The loop invariant is certainly a sigma from i=x to y with the "x" part: (i+1)x but i can't find the formula that fits the integer part I got after the iterations. Thanks in advance for your help From your table, the following is apparent: at iteration $i$, $$ \text{main_f} = (i+1)x + \binom{i+1}{2}. $$ You should be able to prove this formula by induction.
{ "domain": "cs.stackexchange", "id": 12256, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, loop-invariants", "url": null }
homework-and-exercises, newtonian-mechanics, forces, friction Title: What is the direction of static friction? Note: My question is duplicate of the following Direction of friction when a car turns Why does friction cause a car to turn?
{ "domain": "physics.stackexchange", "id": 11014, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, forces, friction", "url": null }
Now, let $\epsilon>0$ be a small numer, and let our $S$ be a diagonal matrix with entries $1, \epsilon^{-1}, \epsilon^{-2}, \ldots, \epsilon^{-n-1}$ on the diagonal (exactly in this order). You that can see that the matrix $SAS^{-1}$ is obtained from $A$ as follows: the main diagonal remais the same as the main diagonal of $A$, the first diagonal above main is multiplyed by $\epsilon$, the second diagonal above main is multiplied by $\epsilon^2$, etc. So, $SAS^{-1} = D+ T_\epsilon$, and by picking sufficiently small $\epsilon$ we can make the norm of $T_\epsilon$ as small as we want. For our purposes it is sufficient to get $\|T_\epsilon\|\le r-a$, can you see how to proceed from here? Share this great discussion with others via Reddit, Google+, Twitter, or Facebook
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9643214521983691, "lm_q1q2_score": 0.8137861583704238, "lm_q2_score": 0.8438951104066293, "openwebmath_perplexity": 438.1662988376598, "openwebmath_score": 0.9410532116889954, "tags": null, "url": "https://www.physicsforums.com/threads/norm-indueced-by-a-matrix-with-eigenvalues-bigger-than-1.834018/" }
newtonian-mechanics, forces, momentum, conservation-laws, collision If you knew the impulse you provide to your hand to stop it, then you could incorporate that into the change in momentum. $$p_0=m_hv_h$$ $$p_f=m_{\text {obj}}v_{\text {obj}}$$ $$p_f=p_0+J$$ where $J$ is the additional impulse you have supplied to your hand. Notice how if your hand happened to stop on it's own due to the collision you have $J=0$ and now momentum is conserved.
{ "domain": "physics.stackexchange", "id": 60049, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, forces, momentum, conservation-laws, collision", "url": null }
integers. I’ll walk through using convex optimization to allocate a stock portfolio so that it maximizes return for a given risk level. Constrained Portfolio Optimization D I S S E RTAT I O N of the University of St. The library we are going to use for this problem is called CVXPY. CVXOPT ¶ This is a python native convex optimization solver which can be obtained from CVXOPT. Hi, I think, for performing financial portfolio optimization MAT lab software is best. It can be used with the interactive Python interpreter, on the command line by executing Python. The classical mean-variance model consists of. Example: Portfolio optimization. Minimum Variance is an optimal portfolio solving the following quadratic pro gram: 2. Solving either of them will give a portfolio that's on the efficient frontier which is, according to investopedia explanation, a set of optimal portfolios that offers the highest expected return for a defined level of risk or the lowest risk for a given level of expected
{ "domain": "freccezena.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9632305381464927, "lm_q1q2_score": 0.8047632511380802, "lm_q2_score": 0.8354835309589074, "openwebmath_perplexity": 1894.8592761976015, "openwebmath_score": 0.26045969128608704, "tags": null, "url": "http://nrvt.freccezena.it/python-portfolio-optimization-cvxopt.html" }
c++ #endif // DATE_HPPs Date.cpp #include "Date.hpp" #include <stdexcept> #include <string> Date::Date() : day(1), month(1), year(0) { } Date::Date(unsigned int day, unsigned int month, unsigned int year) : day(day), month(month), year(year) { if (!IsValidDate(this->day, this->month, this->year)) throw std::invalid_argument( "Invalid date values: day=" + std::to_string(this->day) + ", month=" + std::to_string(this->month) + ", year=" + std::to_string(this->year)); } Date::Date(const Date& other) : day(other.day), month(other.month), year(other.year) { } Date& Date::operator=(const Date& other) { this->day = other.day; this->month = other.month; this->year = other.year; return *this; } bool Date::operator==(const Date& other) const { return this->GetCombinedDateValue() == other.GetCombinedDateValue(); } bool Date::operator!=(const Date& other) const { return !(*this == other); }
{ "domain": "codereview.stackexchange", "id": 44114, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++", "url": null }
ros Title: Can static IP communicate with floating IP? Hi, I'm new to ROS, wish someone can answer my stupid question. I have a static IP 140.113.xxx.xxx, and a 4G dongle with floating IP 192.168.8.100. I want to use ROS to transmit data between them. Can ROS do that? Because I found some website said ROS can only transmit data in the same Internet domain, but I think this must have some trick to solve this problem. Originally posted by Henry1620 on ROS Answers with karma: 1 on 2017-08-07 Post score: 0 ROS communications require that you have viable routes between both hosts. Network Setup Overview Your "floating IP" is more accurately termed a NAT address and is not routable from outside. The most common solution to this is to put both machines on a VPN where your static IP can host the VPN server and the machine behind the 4G dongle can connect to the VPN via the static IP. There's lots of advice for ROS + VPNs: https://www.google.com/search?q=ros+vpn
{ "domain": "robotics.stackexchange", "id": 28543, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
homework-and-exercises, electromagnetism, special-relativity $$\lambda_+'=\frac{\lambda_+}{1-\frac{v^2}{c^2}}$$ and $$\lambda_-'=\lambda_-\left(\frac{1-\frac{uv}{c^2}}{\sqrt{(1-\frac{v^2}{c^2})(1-\frac{u^2}{c^2}})}\right)$$
{ "domain": "physics.stackexchange", "id": 44945, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, electromagnetism, special-relativity", "url": null }
how do you know which function to choose to do what? well, the first rule is simple. do what you can! there are some functions that you don't know the integral of but you know the derivative of, so obviously that would be the function you choose to differentiate. otherwise, choose the functions in such a way that the integral becomes simpler. here we have t^3 * e^t, now we can integrate and differentiate either of these easily, so we have the can do part down. however, if we choose to integrate the t^3, what happens? it becomes t^4 and that makes the problem worst. so obviously we will choose the t^3 to differentiate and we'll end up with t^2, then do it again and end up with t and do it yet again and end up with 1. e^t stays the same throughout, so we don't worry about that. let's see how it works. we will have to do integration by parts three times as i mentioned, the first time i'll do it with explanation then the last two times i'll do it straight and hope you follow.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.988312740283122, "lm_q1q2_score": 0.8340322813171862, "lm_q2_score": 0.8438951025545426, "openwebmath_perplexity": 1276.9221006966393, "openwebmath_score": 0.8786047101020813, "tags": null, "url": "http://mathhelpforum.com/calculus/13891-simple-integration-parts-problem.html" }
reference-request, graph-theory, np-hardness, partition-problem Title: $NP$-Completeness of $\epsilon$-balanced graph partitioning for fixed $\epsilon$ Consider this graph partitioning problem: Let $G = (V, E)$ be a simple undirected graph and $0 \leq \epsilon \leq 1, M \geq 0$ be constants. Are there disjoint subsets $V_1, V_2$ with $V = V_1 \cup V_2$ and $|V_i| \leq (1+\epsilon)|V|/2$ such that at most $M$ edges have an endpoint in both sets? In Computers and Intractability (1979), Garey and Johnson claim this problem is $NP$-Complete (label: ND17) (they use an upperbound $B \geq 0$ requiring $|V_i| \leq B$, but for us that just means setting $\epsilon= 2B/|V|-1$).
{ "domain": "cstheory.stackexchange", "id": 4816, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reference-request, graph-theory, np-hardness, partition-problem", "url": null }
general-relativity, gravitational-waves Are pp-waves simply the waves in the TT gauge, but transformed via Brinkmann coordinates? I haven't read through Brinkmanns paper yet, but everyone seems to just cite him and not show this transformation if this is the case. Any help would be appreciated! pp-waves are (a class of) exact solutions to the Einstein equation. Among other things, they can describe the exact solutions for gravitational plane waves. When you solve the linearized Einstein equation in the TT-gauge, the solutions you find are not solutions of the full non-linear Einstein equation, but only approximate solution. Of course, it should be true that plane wave solutions of the linearized Einstein equation in a Minkowski background approximate the corresponding exact pp-wave solutions.
{ "domain": "physics.stackexchange", "id": 90143, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, gravitational-waves", "url": null }
programming-languages, object-oriented, abstract-data-types Title: What is the difference between Abstract Data Types and objects? An answer on Programmers.SE characterizes an essay by Cook (Objects are not ADTs) as saying Objects behave like a characteristic function over the values of a type, rather than as an algebra. Objects use procedural abstraction rather than type abstraction ADTs usually have a unique implementation in a program. When one's language has modules, it's possible to have multiple implementations of an ADT, but they can't usually interoperate. It seems to me that, in Cook's essay, it just happens to be the case that for the specific example of a set used in Cook's paper, an object can be viewed as a characteristic function. I don't think that objects, in general can be viewed as characteristic functions. Also, Aldritch's paper The power of interoperability: Why objects are inevitable¹ suggests Cook’s definition essentially identifies dynamic dispatch as the most important characteristic of object
{ "domain": "cs.stackexchange", "id": 5879, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "programming-languages, object-oriented, abstract-data-types", "url": null }
nuclear-physics, material-science, radiation, neutrons, nuclear-engineering Title: How to block neutrons What is a good way to block neutrons and what is the mechanism that allows this? It's my understanding that polyethylene is somewhat effective. Why? Being bulk neutral neutrons participate only weakly in electromagnetic interactions which is the dominate interaction for charged particles. Instead neutron scattering can be thought of as primarily a contact interaction with the nuclei of atoms in the way. Light atoms (and hydrogen in particular) have a larger cross-sectional area per nucleon than heavy ones take up more of the energy of the interaction in recoil than heavy ones
{ "domain": "physics.stackexchange", "id": 19231, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "nuclear-physics, material-science, radiation, neutrons, nuclear-engineering", "url": null }
programming, qiskit, quantum-state, matrix-representation for i,j in minus_qubit_axis: rho_res=np.trace(rho_res,axis1=i,axis2=j) if qubit_left>1: rho_res=np.reshape(rho_res,[2**qubit_left]*2) return rho_res from qiskit import QuantumCircuit,QuantumRegister from qiskit.quantum_info import DensityMatrix import numpy as np qr=QuantumRegister(2) circ=QuantumCircuit(qr) circ.h(qr[0]) circ.cx(qr[0],qr[1]) DM=DensityMatrix.from_instruction(circ) print(DM.data) PT=partial_trace(DM.data,[0]) print(PT)
{ "domain": "quantumcomputing.stackexchange", "id": 2188, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "programming, qiskit, quantum-state, matrix-representation", "url": null }
Statement 2: k is divisible by 4 This statement tells you directly that k is divisible by 4. This means that the last digit of 2^k is 6, so when divided by 10, it will give a remainder of 6. This statement alone is sufficient. therefore our answer is B. This question is discussed HERE. Now, to cap it all off, we will look at one final question. It is debatable whether it is within the scope of the GMAT but it is based on the same concepts and is a great exercise for intellectual purposes. You are free to ignore it if you are short on time or would not like to go an iota beyond the scope of the GMAT: What is the remainder of (3^7^11) divided by 5? (A) 0 (B) 1 (C) 2 (D) 3 (E) 4 For this problem, we need the remainder of a division by 5, so our first step is to get the units digit of 3^7^{11}. Now this is the tricky part – it is 3 to the power of 7, which itself is to the power of 11. Let’s simplify this a bit; we need to find the units digit of 3^a such that a = 7^{11}.
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9748211553734217, "lm_q1q2_score": 0.8343018003301559, "lm_q2_score": 0.855851143290548, "openwebmath_perplexity": 510.5923207177377, "openwebmath_score": 0.42492544651031494, "tags": null, "url": "https://gmatclub.com/forum/cyclicity-on-the-gmat-213019.html" }
vacuum, physical-constants, stability, string-theory-landscape, fine-tuning In conclusion, the state of the universe we find our selves in is not like the pencil, metastable states end up at the ground level very fast at the level of energies the universe has now. Everything is very naturally in its ground state. It is the models proposed for the evolution from the singularity of the Big Bang that introduce the metastable concept in such a graphic manner, but again in the models the concept is natural for the level of energy that would allow the metastable states. Now if the pencil is a stretched analogy for the results coming from attemtps at a theory of everything models which have many vacua, and some may be lower than the vacuum we are in at present, a)there is no established theory of everything now, just proposals on which the naturalness criterion is always imposed b) again we are talking probabilities, and if the probability to tunnel to another vacuum is larger than the age of the universe the problem of metastability becomes irrelevant.
{ "domain": "physics.stackexchange", "id": 15243, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "vacuum, physical-constants, stability, string-theory-landscape, fine-tuning", "url": null }
javascript, jquery Metronic.blockUI({ boxed: true, message: "Saving Question.." }); $.ajax({ type: 'POST', url: 'ManagePolling.ashx', data: { "PollingQuestion": JSON.stringify(MeetingPollingQuestion), "Action": "SaveQuestion" }, datatype: "JSON", success: function (data) { if (data.resultStatus.ResultCode == "1") { toastr.success("Saved successfully", "Success"); console.log('%c MeetingPollingQuestion Success! ', 'background: #222; color: #bada55'); htmlBuilderMultipleChoice(MeetingPollingQuestion); } if (data.resultStatus.ResultCode == "2") toastr.warning(data.resultStatus.Message, "Warning"); if (data.resultStatus.ResultCode == "3") toastr.warning(data.resultStatus.Message, "Error"); Metronic.unblockUI(); }, error: function (data) {
{ "domain": "codereview.stackexchange", "id": 44004, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery", "url": null }
python, rosrun Originally posted by dgerod on ROS Answers with karma: 113 on 2013-02-12 Post score: 0 I am still don't know the reason for that problem but I fixed it. Now I am able to launch a python node with internal modules in "/scripts" folder as explained in ROS python guide. For fixing it I have to do two things: Add a dependency to himself in "manifest.xml" of the package <depend package="std_msgs"/> <depend package="rospy"/> <depend package="roscpp"/> <depend package="tf"/> <depend package="smartcam_msgs"/> <depend package="anchor_mod"/> And add "/script" directory to python path in execution. For solving the second point I have created a module named "rospy_helper" that adds the "/scripts" directory to python path when the node starts. I use it after importing "rospy". import roslib; roslib.load_manifest('anchor_mod') import rospy import rospy_helper; rospy_helper.add_modules_to_path();
{ "domain": "robotics.stackexchange", "id": 12851, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, rosrun", "url": null }
computational-physics, software, linear-algebra, complex-numbers Title: Complex semi-definite programming I'm doing some calculations and I want to simulate them in python or matlab (or whatever). However I use hermitian matrices and I don't really manage to find a library which enables me to calculate primal problems in complex form. Do you know of any obvious extension to the real problem to calculate the problem using real numbers? The extension of taking a matrix $A = A_{R} + i A_{I}$ and then construct $$\tilde A = \begin{pmatrix} A_R & -A_I \\ -A_I & A_R \end{pmatrix} $$ will NOT work since in general (and unfortunately in my case too) $\tilde A \neq \tilde{A}^T$, which is needed for real semi definite programs. So the questions are: Does anyone knows of some software allowing complex semidefinite programming? Does anyone knows about some algorithm to implement in python to solve primal problems of semidefinite programs?
{ "domain": "physics.stackexchange", "id": 15527, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computational-physics, software, linear-algebra, complex-numbers", "url": null }
amateur-observing, photography You can improve results by stacking several exposures in software - try the free Deep Sky Stacker - which will reduce noise and usually give you a cleaner result. For longer exposures, you'll need some sort of tracking mount to compensate for the earth's rotation and prevent star trailing. You can either build a barn door tracker, as mentioned in other replies, which rotate a camera platform around a hinge whose axis points at the celestial pole, or look at a commercial solution. There are several mounts designed for use with cameras, such as Vixen's polarie, Skywatcher's star adventurer mount (or similar from Vixen or Ioptron), or the Astrotrak system (or Kenko's Sky Memo (not sure if this is still available)). Note that with some of these you also need to budget for a couple of tripod heads - one to point the mount at the celestial pole, and one to point the camera.
{ "domain": "astronomy.stackexchange", "id": 2473, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "amateur-observing, photography", "url": null }
beginner, haskell, fizzbuzz if-then-else statements are rare in Haskell and are usually replaced by case constructs (or the implicit case construct of function definitions), possibly with the help of guards. It's especially rare to see if null lst then... since this is almost always better written as a case. Haskellers usually inline helper functions like processrule that are only used in one place and have no general applicability. In constrast, Haskellers often define trivial functions like divides in where clauses where they improve readability. I'm arguing here that the list comprehension is more directly readable than the function name processrule, but divides is more readable than the m `rem` d == 0 expression. It's a judgement call. At least for "small" data structures, pattern matching is usually used in preference to field selectors.
{ "domain": "codereview.stackexchange", "id": 36457, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, haskell, fizzbuzz", "url": null }
can apply the kinematics equations to any … You can estimate this to come up with an answer, but there are some situations where you can put together a firmer figure. If allowed to free fall for long enough, a falling object will reach a speed where the force of the drag will become equal the force of gravity, and the … Calculate the distance the object fell according to d = 0.5 * g * t^2. Air Resistance Formula is helpful in finding the air resistance, air constant, and velocity of the body if the remaining numeric are known. acceleration of the object in terms of the net external Given that it has an effective cross-sectional area of 1.4×10-3 m2, find the air resistance on the ball when the ball is moving at a speed of 20 m s-1. The paper does not … Terminal velocity occurs when the resistance of the air has become equal to the force of gravity. g: the value of g is 9.8 meters per square second on the Projectiles with air resistance. The force applied by gravity near to a massive
{ "domain": "gridserver.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.992654173425523, "lm_q1q2_score": 0.9069648065443554, "lm_q2_score": 0.9136765157744066, "openwebmath_perplexity": 434.28879005001016, "openwebmath_score": 0.5696633458137512, "tags": null, "url": "https://s73653.gridserver.com/70kf4dtt/fa04d8-how-to-calculate-air-resistance-of-a-falling-object" }
control, otherservos, pid Title: How is PIV control performed? I'm considering experimenting with PIV control instead of PID control. Contrary to PID, PIV control has very little explanation on the internet and literature. There is almost a single source of information explaining the method, which is a technical paper by Parker Motion. What I understand from the control method diagram (which is in Laplace domain) is that the control output boils down to the sum of: Kpp*(integral of position error) -Kiv*(integral of measured velocity) -Kpv*(measured velocity) Am I correct? Thank you. It seems to me like there are three basic differences between the classic PID topology and the so-called PIV topology mentioned in the white paper:
{ "domain": "robotics.stackexchange", "id": 174, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "control, otherservos, pid", "url": null }
genetics, molecular-genetics, human-genetics, phylogenetics Title: Is brachydactyly due to mutation? I have this so called "clubbed thumbs"also known as brachydactyly. It is of D-type. I searched for it on internet and found that it is a dominant inherited disease. But to my surprise,none of my family members have such thumbs.Not even my great grandfather/mother had this type of thumbs. If it is a dominant trait then why didn't it show in any other family person. Is it that I have had any mutation in my genes? You are correct that brachydactyly is a dominantly inherited disorder and is usually caused by mutations in the BMPR1B gene. However, not everyone who has the mutation, will have clubbed thumbs (the phenotype). This is due to a phenomenon known as penetrance and expressivity. Penetrance essentially is an all-or-none phenomenon whereby certain individuals who have a mutation express the phenotype (in this case, clubbed thumbs) and some do not express it at all.
{ "domain": "biology.stackexchange", "id": 5776, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "genetics, molecular-genetics, human-genetics, phylogenetics", "url": null }
performance, matrix, postscript /rotz { 1 dict begin /t exch def [ [ t cos t sin neg 0 ] [ t sin t cos 0 ] [ 0 0 1 ] ] end } def /.error where { pop /signalerror { .error } def } if /dot { % u v 2 copy length exch length ne { /dot cvx /undefinedresult signalerror } if % u v 0 % u v sum 0 1 3 index length 1 sub { % u v sum i 3 index 1 index get exch % u v sum u_i i 3 index exch get % u v sum u_i v_i mul add % u v sum } for % u v sum 3 1 roll pop pop % sum } bind def
{ "domain": "codereview.stackexchange", "id": 18165, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "performance, matrix, postscript", "url": null }
spectrogram, audio-processing, time-frequency, voice, feature-extraction This is the structure of an autoencoder: your encoder is a (a priori unknown) function of your input that converts a high-dimensional vector (here: audio PCM values, e.g. 48 kHz · 0.75 s = 36000 samples) into a much smaller vector, the latent representation. The decoder is another (a priori unknown) function that takes these small vectors and reconstructs a larger output vector from it (for example: a vector containing a detection probability for each event). That sounds easy enough as a principle, right?
{ "domain": "dsp.stackexchange", "id": 12149, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "spectrogram, audio-processing, time-frequency, voice, feature-extraction", "url": null }
moon-phases Title: Get a table of Moon phase angle per day Where can I get a table with the Moon phase angle for each day ? It's available here for a given day, but I would have to input each day of a year to get a full table. === NEW EDIT : 2019-09-18 === Actually, I'm preparing a calendar of lunar phase with corresponding Moon photo for each day and for a whole year. For this, I downloaded a set of images here from Jay Tanner's website. The name of these images correspond to the phase degree, but when I associate these images with the data from JPL HORIZONS suggested by @Mike G, it doesn't match what I see in the Sky. How can I associate a set of photo of Moon phases to each day of a given period of time (for instance, the current year) ? JPL HORIZONS can do that. With settings like these: Ephemeris Type : OBSERVER Target Body : Moon [Luna] [301] Observer Location : Geocentric [500] Time Span : Start=2019-09-12, Stop=2019-09-19, Step=1 d Table Settings : QUANTITIES=10,23,24
{ "domain": "astronomy.stackexchange", "id": 3958, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "moon-phases", "url": null }
ros, household-objects-database 3.Next, type psql to enter postgre sql interpreter, it's like postgres@rosfuerte-K53SM:~$ psql psql (9.1.6) Type "help" for help. postgres=# 4.Then, add a new user willow by entering CREATE ROLE ...(Don't forget the semicolon) postgres=# CREATE ROLE willow LOGIN CREATEDB CREATEROLE PASSWORD 'willow'; 5.Leave the interpreter postgres=# \q postgres@rosfuerte-K53SM:~$ To make connection over TCP/IP works 1.Get the paths of the files(pg_hba.conf & postgresql.conf) you need to modify postgres@rosfuerte-K53SM:~$ ps auxw | grep postgresql postgres 1170 0.0 0.1 132084 10400 ? S 09:53 0:00 /usr/lib/postgresql/9.1/bin/postgres -D /var/lib/postgresql/9.1/main -c config_file=/etc/postgresql/9.1/main/postgresql.conf postgres 4095 0.0 0.0 13612 916 pts/1 S+ 11:32 0:00 grep postgresql
{ "domain": "robotics.stackexchange", "id": 12103, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, household-objects-database", "url": null }
c++, template, c++17 Honestly, I’ve started suggesting to programmers to consider targeting C++20, rather than C++17, even though C++20 isn’t fully officially out yet, and compiler support is as yet anemic. C++20 is the biggest update to C++ since C++11… and it might be even bigger. EVERYTHING will change once C++20 is the norm, probably even far more so than it did when C++11 came around. The amount of code you’d have to write to do contains() well in C++17 is dozens and dozens, if not hundreds of lines of arcane SFINAE crap that only experts understand with bullshit like enable_if and void_t. In C++20? It’s like, 10-12 lines, all obvious, simple, and brief (well, except maybe for the dependent_false trick, but that might not even be necessary, depending on how clear compiler errors are in C++20 mode).
{ "domain": "codereview.stackexchange", "id": 38460, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, template, c++17", "url": null }
concurrency, clojure Now, clojure.string/split can be written as s/split. And for 3.: The function will take the number of quotes to download as an argument and return the atom’s final value. It wants you to return the value of the atom, not the atom itself. They want you to update an atom inside the futures; although I don't think that's necessary, or even preferable. Here's the final code I ended up with: (ns your.file.path.here (:require [clojure.string :as s])) (defn remove-author [quote] (s/replace quote #".\n-- .*\n" "")) (defn remove-commas [quote] (s/replace quote #"," "")) (defn clean-input [input] (->> input (s/lower-case) (remove-author) (remove-commas))) (defn count-words [quote] (let [cleaned-quote (clean-input quote)] (->> (s/split cleaned-quote #" ") (frequencies)))) (defn fetch-quote [] (future (slurp "https://www.braveclojure.com/random-quote")))
{ "domain": "codereview.stackexchange", "id": 35789, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "concurrency, clojure", "url": null }
homework-and-exercises, newtonian-mechanics, momentum There are 4 unknown variables after the collision : 2 speeds and 2 directions. The (scalar) conservation of kinetic energy provides 1 constraint, and the (vector) conservation of linear momentum provides 2 constraints. There are 4 unknowns but only 3 constraints - not enough constraints to solve the problem uniquely. Any angle $\alpha$ is possible. The difficulty can be solved if the particles have finite size and structure - eg 2 smooth rigid circles colliding in 2D. The impulse between these circles and the change in momentum for each lies along the line joining their centres at the point of contact. The direction of this line of impulse gives a 4th constraint. In the case of point particles it is impossible to decide what direction this line points in, because the point particles are their own centres, and these points coincide at impact, so the line joining their centres cannot be defined.
{ "domain": "physics.stackexchange", "id": 50696, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, momentum", "url": null }
php, object-oriented, mysql, pdo If the PDO method itself takes but a single argument of the type stdClass, then your child class may only add optional arguments, and should either drop the type-hint, or uphold it (ie: hint at stdClass, which would break all existing code), or don't hint at all (which is as error-prone as it gets). What's more, after a couple of months, people might use third party code (frameworks), that rely on the createProcedure method, and pass it an instance of stdClass. You'll have to change your method again, to the vague, and error prone signature: public function createProcedure($arrOrObject, $body = null) { if ($arrOrObject instanceof stdClass) { return parent::createProcedure($arrOrObject); } if ($body === null) { //What now?? } //parse body }
{ "domain": "codereview.stackexchange", "id": 15033, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, object-oriented, mysql, pdo", "url": null }
java, beginner, tree public Node(int data,Node leftChild,Node rightChild) { this.data=data; this.leftChild=leftChild; this.rightChild=rightChild; } should be: public Node(int data,Node leftChild,Node rightChild) { this.data=data; this.leftChild=leftChild; this.rightChild=rightChild; } Note, in some places you put the brace on a new line, and in others you do not. Even if you choose to ignore the Java convention, you should at least be consistent. Variable declarations together You should move the declarations: private Node leftChild; private Node rightChild; to the top of your class at the same place as your data declaration. All class variables should be declared in one place. Use the library tools that are available There are a number of small tricks you can use to make your code simpler. For example, your Node.compareTo() method is: @Override public int compareTo(Node o) { if(o.getData() > this.data) return -1; if(o.getData() < this.data) return 1;
{ "domain": "codereview.stackexchange", "id": 9982, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, tree", "url": null }
ros, tf-static Has this anything to do with /tf_static or is it just the /map_nav_broadcaster node? Comment by kmhallen on 2016-05-30: No. The map_nav_broadcaster node is only publishing /tf. The only node subscribing to /tf_static is slam_gmapping. The slam_gmapping node is listening for transforms on both the /tf and /tf_static topics. Comment by dmeltz on 2016-06-29: Is there an easy way to prevent tf::TransformListeer from subscribing to the /tf_static topic? (only for the sake of clarity of the rqt_graph...) Comment by Przemek Dyszczyk on 2019-01-24: it is possible to remap in launcher /tf_static to /tf. But I don't know if it is good idea: <remap from="tf_static" to="tf" /> Comment by kmhallen on 2019-01-24: In Melodic rqt_graph has an option to group the two tf topics into a single group for visualization: https://github.com/ros-visualization/rqt_graph/pull/13
{ "domain": "robotics.stackexchange", "id": 24754, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, tf-static", "url": null }
java, performance, game, playing-cards System.out.println(""); System.out.println(""); for (int i = 0; i < 8; i++) { graphics(set[4], i); System.out.print(" "); graphics(set[5], i); System.out.print(" "); graphics(set[6], i); System.out.print(" "); graphics(-1, i); System.out.println(""); } } if (flips == 8) { for (int i = 0; i < 8; i++) { graphics(set[0], i); System.out.print(" "); graphics(set[1], i); System.out.print(" "); graphics(set[2], i); System.out.print(" "); graphics(set[3], i); System.out.println(""); } System.out.println(""); System.out.println("");
{ "domain": "codereview.stackexchange", "id": 31510, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, game, playing-cards", "url": null }
waves, pressure, acoustics, frequency, intensity Title: Would different sounds of the same intensity but different frequencies have the same harmful effect on the human ear? The "safe noise exposure limits" I found on the internet only indicates the intensity of the sound in dB, but not the frequency. Does that mean that e.g. a 120dB sound with different frequencies from 20Hz to 20kHz has the same harmful effects on the ear? Introduction I don't think this is so simple as to be answered with a "yes" or "no". The hearing system is rather complex on its own and comprises of both mechanical and "electrical" (chemical/neurological) sub-systems. Damage severity Both kind of systems (mechanical and "electrical") can be damaged by excessive acoustic energy. In another answer is stated that the first to be damaged are the hair cells. This may be (partially) true but the middle ear (the tympani and the ossicles) can also be damaged by sudden (impulsive) high pressure waves.
{ "domain": "physics.stackexchange", "id": 95136, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "waves, pressure, acoustics, frequency, intensity", "url": null }
python, embedded, raspberry-pi The other thing that strikes me is the nested ifs - the longer the block, the higher there is a risk of wrong indentation, causing bugs. Error logic are prone to happen here. You can "denest" by using the early return pattern instead: illustration (not in Python) but applies to any language. I think that denesting should be a priority, because you are inevitably going to add more code, and the code will become even more difficult to comprehend. It will take a lot of scrolling. And even a large screen won't suffice to show the whole block so we can have a block-level overview. As said already, indentation is critical in Python. It's very easy to break the logic when you have big chunks of if blocks, nested with other ifs or loops. At least you've made some effort to modularize by defining 4 distinct functions that have to run in order to start your app. But you need to modularize more.
{ "domain": "codereview.stackexchange", "id": 44727, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, embedded, raspberry-pi", "url": null }
sun, vision, biology, eclipse, laboratory-safety Answers about pupil dilation and what makes an eclipse more dangerous for naked-eye viewers are not what I'm after. You are correct that almost always it is the UV content of sunlight and not its power that is the main hazard in staring at the Sun. The lighting during a total eclipse is one of those situations outside the "almost always". Eclipses did not weigh heavily on our evolution, so we are ill kitted to deal with them. Moreover, UV sunglasses are not designed to attenuate direct sunlight, only reflected sunlight. Normally, the eye's pupil is shrunken to about a millimeter diameter in bright sunlight. This means that it admits about a milliwatt of sunlight, which, for healthy retinas, is nowhere near enough to do thermal damage (see my answer here for further discussion).
{ "domain": "physics.stackexchange", "id": 42531, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "sun, vision, biology, eclipse, laboratory-safety", "url": null }
Here's my current code: seeds = RandomReal[{-1, 1}, {250, 3}]; (* 250 random initial points *) lam = 1.5; (* \[Lambda]>1 fixed *) func[{x_, y_, z_}, t_] := {x lam^t, y lam^(-t), z + t}; (* the vector field itself *) orbit[k_] := Table[func[seeds[[k]], n], {n, 0, 9.75, 0.25}]; (* function to compute the orbit for a single initial point *) orbits = orbit[#] & /@ Range[1, Length[seeds], 1]; (* computes orbits for all initial points *) Graphics3D[{ {Red, Arrowheads[{-.01, .01}], Arrow[BezierCurve[orbits[[#]]]] & /@ Range[1, Length[seeds], 1]} }, PlotRange -> {{-1, 1}, {-1, 1}, {-1, 1}}, Boxed -> False, Axes -> True, AxesEdge -> {{-1, -1}, {-1, -1}, {-1, -1}}, ViewPoint -> {2.6056479300835718, 2.1387445365836095, 0.29388887642263006}, ViewVertical -> {0.3985587476649791, 0.332086389794556, 0.8549090912915488}, ImageSize -> 400] Here's the output: This is okay, but what I'd really like is something that can either
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9559813463747181, "lm_q1q2_score": 0.8200103061477834, "lm_q2_score": 0.8577681031721325, "openwebmath_perplexity": 1863.4992835751482, "openwebmath_score": 0.2749013304710388, "tags": null, "url": "https://mathematica.stackexchange.com/questions/203839/animate-flow-lines-of-time-dependent-3d-dynamical-system/203846" }
c++, chess For simplifying a couple things, including the bishop code too: in chess-programming there is a common trick of storing a 12*12 (first iteration) board, having a border of 2 "occupied" squares in every direction (2 because of the knight). This way the abundant checks for coordinates running out of the board can be spared, instead one will inevitably encounter a border "piece" when trying to index outside the playfield. The second iteration is having this trick taken forward using linear addressing of the table (instead of having a 2D array and 2 coordinates), then a 10x12 array is enough, as a single 2-square wide border catches both horizontal cases (over and "underflowing" a row).
{ "domain": "codereview.stackexchange", "id": 30783, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, chess", "url": null }
$F_1 \subset W=\left\{\beta_{i,j}: i \le p \text{ and } j \le p \right\}$ Let $n=\text{max}(m,p)$. It follows that there exists some $n$ such that $O_n \subset U^{**}$. Then $t_j \in U^{**}$ for all $j \ge n$. It is also the case that $t_j \in U^{*}$ for all $j \ge n$. This is because $x=t_j$ on the coordinates not in $C$. $\blacksquare$ ____________________________________________________________________ $\copyright \ 2014 \text{ by Dan Ma}$ # One theorem about normality of Cp(X)
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9910145691243959, "lm_q1q2_score": 0.807907278620123, "lm_q2_score": 0.8152324938410783, "openwebmath_perplexity": 70.97457507235224, "openwebmath_score": 0.982619047164917, "tags": null, "url": "https://dantopology.wordpress.com/2014/04/" }
convolutional-neural-network Title: Sigmoid vs Relu function in Convnets The question is simple: is there any advantage in using sigmoid function in a convolutional neural network? Because every website that talks about CNN uses Relu function. The reason that sigmoid functions are being replaced by rectified linear units, is because of the properties of their derivatives.
{ "domain": "datascience.stackexchange", "id": 1299, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "convolutional-neural-network", "url": null }
algorithms, graphs $$S(u,w,d+1) = \{u \leadsto v \to w \mid u \leadsto v \in S(u,v,d), v \to w \in E\}$$ Also $S(u,u,0) = \{u \to u\}$. This gives a dynamic programming algorithm for computing the set of all such paths, if you evaluate these sets in order of increasing $d$. As an optimization, you can delete all vertices that aren't reachable from $u$ or that can't reach $v$ before beginning this computation. As another optimization, you can precompute the matrices $A^k$, where $A^k_{uv}=1$ if there is a path of length $k$ from $u$ to $v$ (these can be obtained from the adjacency matrix by repeated multiplication); then you only evaluate $S(u,w,d)$ for $u,w$ such that $A^d_{uw}=1$ and $A^{k-d}_{wv}=1$.
{ "domain": "cs.stackexchange", "id": 16295, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, graphs", "url": null }
telescope, amateur-observing, observational-astronomy, dobsonian-telescope You already have a 19 mm so something close to that such as 15 mm would bring small difference, so take a step or two down to a 9 mm or 12 mm Plössl lens. While a 2" eyepiece usually offers better eye relief (from bigger lens) the cost is also substantially more, and if you compromise on quality by buying a cheaper eyepiece the results will be less than satisfactory - lack of clarity, distortions from imperfections in the glass, etc. Extra magnification can also be obtained by using a Barlow, but you are also adding extra lenses to the optical path which will slightly reduce the amount of light you are getting at the eyepiece, but also any imperfections will be magnified.
{ "domain": "astronomy.stackexchange", "id": 3138, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "telescope, amateur-observing, observational-astronomy, dobsonian-telescope", "url": null }
12. Jun 20, 2014 ### 22990atinesh Thanx Ray Vickson, I got it. The total (Man) hours/ unit work is constant i.e. 24 (Man)hours/ work. So, If we have to calculate No. of days required by 1 man working 2 hours/ day to complete the 1/2 of that work. Whatever amount of (Man) hour is required by 1 man working 2 hours/ day to complete the 1/2 of that work, twice of it per unit of work will be constant. Hence $24 = \frac{2*(1*(X*2))}{1}$ $24 = \frac{1*(X*2)}{1/2}$ $X = 6 days$
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.974434786819155, "lm_q1q2_score": 0.8033843793678339, "lm_q2_score": 0.8244619242200081, "openwebmath_perplexity": 2300.6448375497725, "openwebmath_score": 0.6409866213798523, "tags": null, "url": "https://www.physicsforums.com/threads/time-work-problem.758191/" }
general-relativity, time-dilation, event-horizon Title: Computing in Kruskal coordinates In my last question I learned that movement inside event horizon is actually well defined when represented in Kruskal coordinates. However, I still don't understand how it is working out. Can you help me to solve a primer that I have devised? Let's imagine there's an event horizon around a singularity, of radius R. There's a small mass m at rest relative to this event horizon, initially located at 10R from the singularity. It will begin falling towards the event horizon. We can roughly calculate how much time has passed on m when it approaches 5R using classical mechanics. Using general relativity we can calculate how much time has passed on m when it approaches 2R. Can you please guide me how much time will pass on m when it crosses R (i.e. event horizon, as measured from outside)? ¾R? ½R? ¼R?
{ "domain": "physics.stackexchange", "id": 73882, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "general-relativity, time-dilation, event-horizon", "url": null }
cell-biology, cell-culture, staining, flow-cytometry, cell-sorting One thing I can do to minimize cell death is do a live/dead stain (we just added that capability). Live/dead stains are generally a good idea, but make sure the stain you're using isn't cytotoxic. L/D should always be the last staining step before running your samples. A better way (if your sorter supports it) is to use forward scatter (FSC) and side scatter (SSC) height and area measurements to discriminate single, appropriately-sized cells, then gate on them first before gating on your antibody stain (FITC or PE or whatever your secondary is). The other thing I read was to use 50% FBS in your collection tube. I'm not sure how much that will help, especially 293s, which are pretty tough. Just make sure you're diluting the collected cells enough in medium to bring the serum percentage back down to 10%. if we are doing many sorts, then some of the tubes may be sitting in sorting buffer for a long time in the queue. How long is too long?
{ "domain": "biology.stackexchange", "id": 4415, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cell-biology, cell-culture, staining, flow-cytometry, cell-sorting", "url": null }
The first printf statement will ask the user to enter n value. Design a pseudocode that does the following:(a) Calculates the average test scores. Pseudocode is an artificial and informal language that helps programmers develop algorithms. Assignment+No - Basic programming assignment on pseudo code, algorithms and dry runs. Pseudocode to add two numbers: The First step is to analyze the requirements, and then understand the process that is needed to get the result. Understand why pseudocode is useful. I tried the query below, but it returns only those departments which. If Sum > Limit, terminate the repitition, otherwise. ID Number Weight DAL1 70 140. However in an algorithm, these steps have to be made explicit. i i=1 n 1 n = - sum i n i=1 = (n+1)/2. C++ Code: [crayon-5ef8cff0e8229235350774/] Output:. The aim in the rest of the document is to present the pseudocode principally via a small number of examples. Where the cause of injury is a transport incident, the average percentage of.
{ "domain": "clodd.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9579122720843811, "lm_q1q2_score": 0.8179735106836609, "lm_q2_score": 0.8539127585282744, "openwebmath_perplexity": 988.7505014304342, "openwebmath_score": 0.4070902168750763, "tags": null, "url": "http://rlle.clodd.it/pseudocode-for-average-of-2-numbers.html" }
ros Original comments Comment by 130s on 2014-10-17: +1 for introducing multiple options. But the following sentence isn't accurate: however this would limit the library's exposure to ROS users only. To obtain the packages released as 3rd party in ROS, your machine should point to ROS repository. But that's the only limitation for using them IMO. Comment by bchiffreville on 2014-10-22: Hi! Thanks for your answer! In fact, there already exists a faust Ubuntu package. It's quite long to explain what I did, but I tried to write some documentation. It is the file called using-faust-with-ros.pdf : here Comment by paulbovbel on 2014-10-22: Well, then option 1 becomes even easier, assuming that the faust API is relatively stable/mature. Uou should be able to create a ROS wrapper/convenience package, with faust as a system dependency (add it to rosdep). Comment by bchiffreville on 2014-10-23: Great ! Thank you very much for your help ! I'll work on my package now ;)
{ "domain": "robotics.stackexchange", "id": 19763, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
parsing, bash # Get the desired information from the thermochemistry block # parse the lines according to keywords and trap the values. findTempPress () { local readWholeLine="$1" local pattern pattern="^Temperature[[:space:]]+ ([0-9]+\.[0-9]+)[[:space:]]+Kelvin\.[[:space:]]+Pressure[[:space:]]+ ([0-9]+\.[0-9]+)[[:space:]]+Atm\.$" if [[ $readWholeLine =~ $pattern ]]; then temperature="${BASH_REMATCH[1]}" pressure="${BASH_REMATCH[2]}" else return 1 fi } findZeroPointEnergy () { local readWholeLine="$1" local pattern pattern="Zero-point correction=[[:space:]]+([-]?[0-9]+\.[0-9]+)" if [[ $readWholeLine =~ $pattern ]]; then zeroPointEnergy="${BASH_REMATCH[1]}" else return 1 fi }
{ "domain": "codereview.stackexchange", "id": 20386, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "parsing, bash", "url": null }
context-free, formal-grammars, compilers, ambiguity, derivation The number of different leftmost derivations of the sentence. The number of different rightmost derivations of the sentence. The number of parse trees whose leaves spell out the sentence. If that number is one for every sentence generated by the grammar, then the grammar is unambiguous. So you can use whichever definition for "unambiguous" you find most convenient.
{ "domain": "cs.stackexchange", "id": 18893, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "context-free, formal-grammars, compilers, ambiguity, derivation", "url": null }
electromagnetism The same general principle holds with bacteria and proteins. Some bacteria contains plasmind, which in turn contains a certain gene, which codes for the Green Flourescent Protein. So you can put the plasmid in the bacteria, the plasmid starts making that protein in the bacteria and the result is a glowing pile of goo. (try a google search on the matter, there are tons of articles, etc. )
{ "domain": "physics.stackexchange", "id": 8164, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism", "url": null }
c#, design-patterns, .net, winforms DATA ACCESS using System; using System.Data.SqlClient; using System.Data; using System.Linq; using StockoutReasonReview.Properties; using WPD_Common_Library; namespace StockoutReasonReview { public class DatabaseTransaction { public DataTable GetReasons() { using (var dt = new DataTable()) using (var conn = new SqlConnection(ConnectionStrings.P21ConnectionString)) using (var cmd = new SqlCommand(Resources.GetReasonString, conn)) { conn.Open(); dt.Load(cmd.ExecuteReader()); return dt; } }
{ "domain": "codereview.stackexchange", "id": 8511, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, design-patterns, .net, winforms", "url": null }
beginner, performance, c, memory-management, image count = 0; for (y = -9 ; y < rows; y++) { for (x = 0; x < cols; x++) { s = 0; counter = 0; for (z = y; z < (y+10); z++) { if (z < 0) { counter++; continue; } else if(z >= rows){ counter++; continue; }else{ s += ( hpf[counter++] * xin[z*cols+x] ) ; } } temporary[count++] = s; } } count = 0; outrows = (temprows/2) + 1 ; out = (float*)malloc(sizeof(float) * ( outrows * cols ) ); for (i = 0; i < temprows; i += 2) { for (j = 0; j < cols; j++) { out[count++] = temporary[(i*cols) + j]; } } free(temporary); return out; } float * afb3D_A(float*x , int d, int xx, int yy, int zz){ int L, i, N1, N2, N3 , zloc, xloc, yloc, counter;
{ "domain": "codereview.stackexchange", "id": 14210, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, performance, c, memory-management, image", "url": null }
# With how many ways can they sit? I am looking at the following exercise: $5$ women sit at a round table. $3$ men come later. With how many ways can the men sit between the women, if no man can sit next to an other man? I have done the following: We have the following: right? The first man has $5$ possibilities to sit between two women. The second man has $4$ possibilities to sit between two women. The third man has $3$ possibilities to sit between two women. Therefore, we get that there are $5\cdot 4\cdot 3$ ways so that the men sit between the women, if no man can sit next to an other man. Is this correct? If yes, is the justifications correct and complete? Could we improve that or make that more formally? Is it important that the table is round or isn't there a difference if it would have an other shape? Your method is correct. Alternatively we can do this as follows:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9715639694252315, "lm_q1q2_score": 0.8258013748573979, "lm_q2_score": 0.849971181358171, "openwebmath_perplexity": 271.43289634744565, "openwebmath_score": 0.6914272904396057, "tags": null, "url": "https://math.stackexchange.com/questions/2507499/with-how-many-ways-can-they-sit" }
13. zepdrix A sign line... hmm 14. zepdrix |dw:1441678216003:dw| 15. zepdrix I hope the way I wrote those factors wasn't too confusing :o It might help us a lil bit here. 16. zepdrix |dw:1441678352725:dw|So when we're less than 2, do you see how that first factor will be negative? :) lol woops 17. anonymous Interesting... I sort of tried this. I just don't know what my answers mean and how they affect the inequality. 18. anonymous But isn't 2 the first factor? Not sure what you mean? 19. anonymous Or do you mean the x-2? 20. zepdrix Yes, x-2 is the first factor of the polynomial. 21. anonymous Ah so X has to be greater than or equal to 2 22. anonymous Ok that makes sense now 23. zepdrix |dw:1441678495872:dw|So our first factor is negative when we're less than 2, and positive when we're larger than 2. 24. zepdrix
{ "domain": "openstudy.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9796676496254958, "lm_q1q2_score": 0.800951263309155, "lm_q2_score": 0.8175744739711882, "openwebmath_perplexity": 1409.3765143657297, "openwebmath_score": 0.6665023565292358, "tags": null, "url": "http://openstudy.com/updates/55ee3f1de4b022720613e90f" }
inverse definition explained with examples, How to Work Smart and Ace Your Maths Examinations, Square root of 4096 value by different methods. Here, Frequently Asked Questions on Math Symbols. Another, e.g this topic, we can not be represented as a simple fraction discrete structures defined. Project or model with symbols of maths symbols mathematical symbols with names concise ways to show mathematical relations and functions chapter have... Is provided in a theoretical manner { \displaystyle \sqcup } for a disjoint union of.. Most important and commonly used Greek symbols are mainly used to express the mathematical symbols conventional designations to. List below the definition and examples vice-versa does not hold true effective with Prodigy math Game subscription visit! Unicode, Lucida Sans Unicode - see: the International Phonetic alphabet in Unicode ) have created a Channel. Latest post updates update it soon the subscription you can get all kinds of symbols... ; empty set Greek
{ "domain": "charbotandwanderlust.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9399133498259923, "lm_q1q2_score": 0.8182860075219466, "lm_q2_score": 0.8705972818382005, "openwebmath_perplexity": 1623.9148717840606, "openwebmath_score": 0.631192684173584, "tags": null, "url": "http://charbotandwanderlust.com/yyvpiqoj/article.php?9ac489=mathematical-symbols-with-names" }
beginner, c, homework, playing-cards unsigned count[SUITS+1] = { 0 }; /* how many singletons, pairs etc */ for (int i = 0; i < PIPS; ++i) { ++count[value_count[i]]; } if (count[4]) { ++stats->four_of_kind; } else if (count[3] && count[2] || count[3] >= 2) { ++stats->full_house; } else if (count[3]) { ++stats->three_of_kind; } else if (count[2] >= 2) { ++stats->two_pair; } else if (count[2]) { ++stats->one_pair; } else { ++stats->no_pair; } ++stats->total; } int main(void) { srand((unsigned)time(0)); card deck[DECK_SIZE]; int i = 0; for (short j = 1; j <= PIPS; ++j) { for (short k = 1; k <= SUITS; ++k) { deck[i].suit = k; deck[i].pip = j; ++i; } }
{ "domain": "codereview.stackexchange", "id": 42390, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, c, homework, playing-cards", "url": null }
Here is the first solution I came up with. There may be a cleaner one to be found. Weigh four against four to start. If they are equal, you can easily find the odd ball from the remaining four by weighing against two known balls, then one known ball. If the scales are uneven, let us call the lighter one scale 1 and the heavier scale 2. Keep three balls on scale 1, then exchange the fourth with a ball from scale 2. Remove the remaining three balls on scale 2 and replace them with known balls. If the scales now balance, you know that the odd ball was removed from scale 2, and is heavier than the others. If scale 1 is still lighter, you know that the odd ball is one of the three kept balls on scale 1, and is lighter than the rest. If scale 2 is lighter, the odd ball must be one exchanged between the two scales. In all three cases, you can determine the odd ball in one more weighing. -
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9790357573468176, "lm_q1q2_score": 0.8301907546483563, "lm_q2_score": 0.8479677564567912, "openwebmath_perplexity": 388.32494794833383, "openwebmath_score": 0.7293927669525146, "tags": null, "url": "http://math.stackexchange.com/questions/129532/a-logic-puzzle-involving-a-balance?answertab=active" }
newtonian-mechanics, forces, angular-momentum, acceleration, torque Title: Why slanted bodies slip, what is causing the acceleration? Let the body be a ladder, it is held at slanted position with base on the floor. If it is leaved, with zero velocity, then why it's base slips backward when the upper part of the ladder is falling down, there is no force being applied in that direction. There is no force acting on the center of mass that points in that direction, since the only two present forces are the floor reaction and gravitational force, so the sum of them determines a force directed vertically. Since the floor reaction is not applied to the center of mass, the ladder undergoes a rotation. You can see what is happening in the following picture:
{ "domain": "physics.stackexchange", "id": 46456, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, forces, angular-momentum, acceleration, torque", "url": null }
reproduction, human-genetics 4: DNA fingerprint. This is primarily based on stretches of the human genome that contain repeats of short DNA sequences (so-called STR/short tandem repeats, or VNTR/variable number tandem repeats). In both cases, the sequence is the same in individuals, but the number of repeats is extremely variable and each human therefore has a (possibly) unique combination across the different repeat locations in the genome. Because children inherit 50% of their DNA sequences from the father and 50% from the mother, John himself will have his mother's characteristic lengths in 50% of repeat locations and his father's in the remaining 50% of locations (roughly). A child of John and Mrs B would have MrA's repeat lengths in 25% of locations and Mrs B's in 75%. The fractions "100% Mr A" vs. "50% Mr A" vs. "25% Mr A" can be distinguished by this method.
{ "domain": "biology.stackexchange", "id": 12138, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reproduction, human-genetics", "url": null }
discrete-signals, frequency-response, transfer-function, homework, dtft Title: DTFT and Inverse DTFT Homework Problem I'm trying to solve this signals homework problem: So for part a, since multiplication in the time domain is convolution in the frequency domain, I just used a DTFT table, found the DTFT for $\left(\frac12\right)^n$ and $\cos(\pi n/2)$, convolved them, and solved for $H(\Omega)$. I got the same answer they have in part a.
{ "domain": "dsp.stackexchange", "id": 3980, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "discrete-signals, frequency-response, transfer-function, homework, dtft", "url": null }
In many binomial problems, the number of Bernoulli trials $n$ is large, relatively speaking, and the probability of success $p$ is small such that $n p$ is of moderate magnitude. For example, consider problems that deal with rare events where the probability of occurrence is small (as a concrete example, counting the number of people with July 1 as birthday out of a random sample of 1000 people). It is often convenient to approximate such binomial problems using the Poisson distribution. The justification for using the Poisson approximation is that the Poisson distribution is a limiting case of the binomial distribution. Now that cheap computing power is widely available, it is quite easy to use computer or other computing devices to obtain exact binomial probabiities for experiments up to 1000 trials or more. Though the Poisson approximation may no longer be necessary for such problems, knowing how to get from binomial to Poisson is important for understanding the Poisson distribution
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9893474904166245, "lm_q1q2_score": 0.8111594208263365, "lm_q2_score": 0.8198933425148214, "openwebmath_perplexity": 262.62715424159506, "openwebmath_score": 0.9560127854347229, "tags": null, "url": "https://statisticalmodeling.wordpress.com/tag/probability-and-statistics/" }
c#, mvc, entity-framework, asp.net-mvc, asp.net-mvc-5 public class AddressDetails { public int Id { get; set; } public string AddressLine { get; set; } public string City { get; set; } public string County { get; set; } public string PostCode { get; set; } public float Latitude { get; set; } public float Longtitude { get; set; } [JsonIgnore] public virtual AppUser User { get; set; } } I believe that smaller methods are the better. So, I am trying to keep controllers as small as possible. I made classes which handles all interactions with database and keeps business logic out of Models and Controllers. First class is abstract MasterRepository ,which has logic for Database Update/Add/SaveChanges. All other "repositories" inherit it. ( "AppDB" is inheriting from DbContext and holds all DbSets) public abstract class MasterRep { protected AppDB _db { get; set; } protected AppUser _currentUser { get; set; }
{ "domain": "codereview.stackexchange", "id": 17269, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, mvc, entity-framework, asp.net-mvc, asp.net-mvc-5", "url": null }
c#, javascript, asp.net, asp.net-web-api, asp.net-core ProjectFavoritesService Refactored public class ProjectFavoritesService : IProjectFavoritesService { private readonly HttpClient client; public ProjectFavoritesService(IConfiguration configuration) { if (configuration == null) { throw new ArgumentNullException(nameof(configuration)); } this.client = client; } public async Task AddFavorite(ProjectFavoritesDTO dto) { await client.PostAsJsonAsync(nameof(ProjectFavoritesController.AddFavorite), dto); } public async Task RemoveFavorite(ProjectFavoritesDTO dto) { await client.DeleteAsJsonAsync(nameof(ProjectFavoritesController.RemoveFavorite), dto); }
{ "domain": "codereview.stackexchange", "id": 36784, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, javascript, asp.net, asp.net-web-api, asp.net-core", "url": null }
represent the decision boundary by a hyperplane $\omega$ The linear classifier is a way of combining expert opinion. A single- neuron perceptron can classify input vectors into two classes since its output can be either null or 1. A perhaps extreme example of a problem which cannot be solved using a single perceptron is the “exclusive or” problem. While some learning methods such as the perceptron algorithm (see references in vclassfurther) find just any linear separator, others, like Naive Bayes. • Decision boundaries for classification • Linear decision boundary (linear classification) • The Perceptron algorithm • Mistake bound for the perceptron • Generalizing to non-linear boundaries (via Kernel space) • Problems become linear in Kernel space • The Kernel trick to speed up computation. Principles of Pattern Recognition II (Mathematics) 3. Is the network response (decision) reasonable?. A (Linear) Decision Boundary Represented by: One artificial neuron called a “Perceptron”-----Low
{ "domain": "youlifereporter.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9857180656553329, "lm_q1q2_score": 0.825657134006785, "lm_q2_score": 0.8376199673867852, "openwebmath_perplexity": 961.3748683124404, "openwebmath_score": 0.6365987062454224, "tags": null, "url": "http://mzei.youlifereporter.it/perceptron-decision-boundary.html" }
c#, multithreading, interview-questions, queue Title: Sequential execution I made a class that I think satisfies the conditions: Actions can be added to the queue at any time by any number of clients. Action's executing in the order in which were added. Only one Action executing at time. public sealed class SequentialTaskScheduler { private static volatile SequentialTaskScheduler instance = null; private static readonly object padlock = new object(); private readonly ConcurrentQueue<Action> queue = new ConcurrentQueue<Action>(); SequentialTaskScheduler() { var task = Task.Factory.StartNew(ThreadProc); }
{ "domain": "codereview.stackexchange", "id": 30095, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, multithreading, interview-questions, queue", "url": null }
electrostatics Suppose now we have an arbitrary number of charges and/or conductors, possibly charged, in various locations inside the cavity. They're not touching the cavity surface: maybe they are suspended by isolating strings, or whatever. What happens now? I think the potential on the boundary of the cavity is still constant, because I can always go from any point on the cavity surface to any other point through a path completely inside the conductor. On the other hand, we now have charges inside the cavity and a zero electric field everywhere won't satisfy Poisson's equation, thus we cannot say anything about the electric field inside the cavity. Right?
{ "domain": "physics.stackexchange", "id": 45582, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrostatics", "url": null }
qkd Title: Ekert's QKD protocol with Eve ( hacker ) sending random mixture of qubit pairs in the states |00>, |11>, |++>, |--> Before starting my question, the problem is from the book "Quantum Computing, A Gentle Introduction". Ex 3.15 The context of the problem is the following: We suppose Eve can pose as the entity sending the purported EPR pairs; Eve sends a random mixture of qubit pairs in the states $$|00\rangle, |11\rangle, |++\rangle, |--\rangle$$ instead of sending EPR pairs. (1) After Alice and Bob perform the Ekert 91 protocol, on how many bits on average do their purported shared secret keys agree? (2) On average, how many of these bits does Eve know? My interpretation is the following: ( Note : we will use EPR pair of $|00\rangle + |11\rangle$ ). Whatever Alice send her measured state ($|00\rangle$ or $|11\rangle$ or $|++\rangle$ or $|--\rangle$), Eve sends random mixture of states :
{ "domain": "quantumcomputing.stackexchange", "id": 3646, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "qkd", "url": null }
Author Message TAGS: ### Hide Tags Intern Joined: 12 Nov 2018 Posts: 1 Re: The letters D, G, I, I , and T can be used to form 5-letter strings as  [#permalink] ### Show Tags 14 Feb 2019, 08:42 # of ways in which I's are together: 4! (glue method). Usually with the glue method need to multiply by 2, but given I's are the same, don't need to. How many total ways can "digit" be arranged with no restriction? 5! = 120. Need to divide by 2! given the repetition. 60-24 = 36 Manager Joined: 23 Aug 2017 Posts: 118 Schools: ISB '21 (A) Re: The letters D, G, I, I , and T can be used to form 5-letter strings as  [#permalink] ### Show Tags
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 1, "lm_q1q2_score": 0.8633915976709976, "lm_q2_score": 0.8633915976709976, "openwebmath_perplexity": 2185.587884780814, "openwebmath_score": 0.7955590486526489, "tags": null, "url": "https://gmatclub.com/forum/the-letters-d-g-i-i-and-t-can-be-used-to-form-5-letter-strings-as-220320-20.html" }
php, html, security, e-commerce $combined = $payment_data. '' .$customer. '' .$items_data; $combinedsub = substr($combined, 0, -1); $code = strtoupper(md5($combinedsub)); $trimmeddata = trim($code); In $combined, you add strings together with empty strings in between. That can get removed. $combinedsub could be better named to $combined_substring, Nbdy lks abbrevs, yh? In $code, whilst being misleading, you perform strtoupper() and md5 transforms on it. You then proceed to trim() it. First, trim()ing after you've MD5 hashed it, literally reduces the chances of having characters trimmed to zero. So, you can put the trim() in front of the md5() instead. Secondly, if you're performing two transforms in one line, adding a third and condensing is nothing. While $combinedsub has a misleading name, $trimmeddata has a worse name. While having incorrect grammar and spelling, you manage to double both m & d, making the variable name look even less readable.
{ "domain": "codereview.stackexchange", "id": 13763, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, html, security, e-commerce", "url": null }
quantum-mechanics, newtonian-mechanics, classical-mechanics, hamiltonian-formalism Title: Does the $\frac12mv^2$ law apply to quantum mechanics? Consider the classical Hamiltonian for a spring: \begin{equation} H = \frac{1}{2}\frac{p^2}{m} + \frac{1}{2}kx^2 \end{equation} This is one of those simple cases where when you work out the math we find \begin{equation} m\ddot{x} = -kx \end{equation} and it makes plain and obvious that the $\frac{1}{2}\frac{p^2}{m}$ term has now turned into $m\ddot{x}$, Newton's law. So it's clear here how the $ \frac{1}{2}\frac{p^2}{m}$ corresponds to the $m\ddot{x}$ term and the $-kx$ is consistent with Newtons law. My Question: Does this relationship between $ \frac{1}{2}\frac{p^2}{m}$ and $m\ddot{x}$ hold for the quantum mechanical operator? By the operator, I mean this Hamiltonian \begin{equation} \hat{H} = \frac{1}{2}\frac{\hat{p}^2}{m} + \hat{V} \end{equation}
{ "domain": "physics.stackexchange", "id": 20244, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, newtonian-mechanics, classical-mechanics, hamiltonian-formalism", "url": null }
numerical-analysis Title: $fl(x)=x(1+\delta)$ The floating point representation of a real number $x$ in a machine is given by $fl(x)=x(1+\delta),\: |\delta| = \frac{|x^*-x|}{|x|} \le \epsilon$. But I do not find this equation very insightful. Insert $\delta = \frac{x^*-x}{x}$ in the equation and you get $x^*$. So $fl(x)$ is just $x^*$. Why write $x^*$ in this fancy way: $$fl(x)=x(1+\delta)$$ Does equation have a name by the way? The idea that this expression is trying to relay is that the nature of the error in floating-point arithmetic is multiplicative rather than additive (which is the case for fixed-point arithmetic). This is because of the way that floating-point numbers are stored: as a mantissa multiplied by an exponent. Since the error is incurred only when rounding the mantissa, it is multiplicative (ignoring overflow and underflow).
{ "domain": "cs.stackexchange", "id": 16886, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "numerical-analysis", "url": null }
It's known that no matter the size of the board, the first player has a winning strategy in Chomp, but an explicit winning strategy is only known for smallish boards. • One can apply Zermelo's theorem to chess, Go, and other finite games. They are all determined, but we don't know who has the winning strategy (or at least, non-losing one) – Asaf Karagila Aug 13 '18 at 10:13 • or any other ultra-weak-ly solved game en.wikipedia.org/wiki/Solved_game – Charon ME Aug 15 '18 at 6:42 Well, this might be an example of what you are asking for: Take the question "are there irrational numbers $a,b$ such that $a^b$ is rational?" A quick way to see that there are is to consider $\alpha =\sqrt 2^ {\sqrt 2}$. Either $\alpha$ is rational or irrational. If it is rational, then we are done. If it is irrational then consider $\alpha^{\sqrt 2}=2$. Either way, we can find an example.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9693241947446617, "lm_q1q2_score": 0.8077617003365601, "lm_q2_score": 0.8333246035907933, "openwebmath_perplexity": 393.47694875719407, "openwebmath_score": 0.7914952635765076, "tags": null, "url": "https://math.stackexchange.com/questions/2880738/is-there-any-conjecture-that-has-been-proved-to-be-solvable-provable-but-whose-d/2880895" }
math, backpropagation, gradient-descent, derivative $\dfrac{dLoss}{dW_1} = \dfrac{d}{dW_1}(Out-Y) = \dfrac{d}{dW_1}Out = \dfrac{d}{dW_1}(H_4W_{13} + H_5W_{14}) \\= \dfrac{d}{dW_1}H_4W_{13} + \dfrac{d}{dW_1}H_5W_{14} \\= W_{13} \times \dfrac{d}{dW_1}H_4 + W_{14} \times \dfrac{d}{dW_1}H_5 \\= W_{13} \times \dfrac{d}{dW_1}(H_1W_7 + H_2W_8 + H_3W_9) + W_{14} \times \dfrac{d}{dW_1}(H_1W_{10} + H_2W_{11} + H_3W_{12}) \\= W_{13} \times \dfrac{d}{dW_1}H_1W_7 + W_{14} \times \dfrac{d}{dW_1}H_1W_{10} \\= W_{13}W_7 \times \dfrac{d}{dW_1}H_1 + W_{14}W_{10} \times \dfrac{d}{dW_1}H_1 \\= (W_{13}W_7 + W_{14}W_{10}) \times \dfrac{d}{dW_1}(X_1W_1 + X_2W_2) \\= (W_{13}W_7 + W_{14}W_{10}) \times X_1$
{ "domain": "ai.stackexchange", "id": 1420, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "math, backpropagation, gradient-descent, derivative", "url": null }
thermodynamics, temperature, entropy To calculate the entropy change when a system changes its temperature from $T_i$ to $T_f$: $$\Delta S=\int_{T_i}^{T_f} \frac{\delta Q_{rev}}{T}$$ This integral assumes that the path we are integrating is quasistatic and reversible. If $T$ refers to either system and surroundings, then that means in the selected quasistatic and reversible process, the temperature of both system and surroundings change from $T_i$ to $T_f$? Also, when the definitions of Helmholtz and Gibbs free energy are discussed $$F=U-TS$$ $$G=H-TS$$ Schroeder wrote that the term $TS$ refers to heat that flows in a system where $S$ is a system's final entropy and $T$ is the temperature of surroundings. Can $T$ refers to the temperature of a system? I don't understand whether refers to the temperature of a system or its surroundings.
{ "domain": "physics.stackexchange", "id": 93783, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, temperature, entropy", "url": null }
time The JDNs also do not match those on NASA's calculator, as it gives 2010-01-31 to be JD 2455228. Since Wikipedia isn't always the most reliable resource, I scoured the internet for another website with a formula, and all I found was this page, which gives me the same issue, with a slightly different, step-by-step formula. Am I doing something wrong? I'm sorry if I am posting this in the wrong community, if there is a better place please let me know. The code I used to get the list above is below, with the Wikipedia algorithm: import datetime prev_d = None prev = 0 def calc(_d): global prev_d global prev y = _d.year m = _d.month d = _d.day # Formula from Wikipedia jd = ((1461 * (y + 4800 + (m - 14) // 12)) // 4 + (367 * (m - 2 - 12 * ((m - 14) // 12))) // 12 - (3 * ((y + 4900 + (m - 14) // 12) // 100)) // 4 + d - 32075) if jd - prev != 1: print("ERROR: {} ({}) vs {} ({})".format(prev_d, prev, _d, jd)) prev = jd prev_d = _d
{ "domain": "astronomy.stackexchange", "id": 4602, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "time", "url": null }
an angle θ. com Free Cartesian to Polar calculator - convert cartesian coordinates to polar step by step Equations Inequalities System of Equations System of Inequalities Basic Operations Algebraic Properties Partial Fractions Polynomials Rational Expressions Sequences Power Sums Induction. To this point we've seen quite a few double integrals. $$r:$$ distance from. But when dealing with polar equations, you view these points in their polar form. The two lines below will plot the same thing, the first using polar form and the second using Cartesian form (although strange things happen when x=0): 4 r = f θ. Cartesian/Polar Coordinates Junior high school The connection between Cartesian coordinates and Polar coordinates is established by basic trigonometry. Solution: R = 5 and Angle q = 30. r is the radius, and θ is the angle formed between the polar axis (think of it as what used to be the positive x-axis) and the segment connecting the point to the pole (what used to be the origin).
{ "domain": "gesuitialquirinale.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226287518853, "lm_q1q2_score": 0.8055179522932492, "lm_q2_score": 0.8244619199068831, "openwebmath_perplexity": 486.69841462743466, "openwebmath_score": 0.8996694087982178, "tags": null, "url": "http://gesuitialquirinale.it/arxd/polar-to-rectangular-coordinates-calculator.html" }
optics, electromagnetic-radiation, speed-of-light, frequency, wavelength Title: Is information about the speed of light hidden in its spectrum? Can the speed of light in the vacuum (c) be inferred from the spectrum of light? If that is not the case is it possible to tell from lights spectrum that it has entered a different medium, e.g. can the correct fraction of c be inferred from the spectrum then? This is not the case. The spectrum of light refers to the frequency content of the oscillations of light at any given point: you select a point, look at the electric field oscillations there, and decompose it into a superposition of waves of different frequencies. Thus the analysis is local, and the spectrum is a property of the source of light, and does not typically change upon transmission through a medium (unless, of course, there is absorption).
{ "domain": "physics.stackexchange", "id": 9763, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics, electromagnetic-radiation, speed-of-light, frequency, wavelength", "url": null }
reinforcement-learning, apprenticeship-learning, inverse-rl, imitation-learning Complexity of the expert’s optimal policy $\pi^{*}$ Size of the state space I don't see how the complexity of the expert's optimal policy plays a role here - which is probably why it doesn't affect the number of expert demonstrations we need; but how do we quantify the complexity of a policy in the first place? Also, I think that the number of expert demonstrations should depend on the size of the state space. For example, if the train and test distributions don't match, we can't do behavioral cloning without falling into problems, in which case we use the DAGGER algorithm to repeatedly query the expert and make better decisions (take better actions). I feel that a larger state space means that we'll have to query the expert more frequently, i.e. to figure out the expert's optimal action in several states. I'd love to know everyone's thoughts on this - the dependence of the number of expert demonstrations on the above, and if any, other factors. Thank you!
{ "domain": "ai.stackexchange", "id": 2411, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reinforcement-learning, apprenticeship-learning, inverse-rl, imitation-learning", "url": null }
reinforcement-learning, dqn If the types of cards are irrelevant, you could actually have a (3,10) matrix with counters of cards (1 in hand, 1 in table, 2 already played). You can try different approaches and see what works best.
{ "domain": "ai.stackexchange", "id": 595, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reinforcement-learning, dqn", "url": null }
logic, constraint-programming, prolog, logic-programming I have tried to express this in GNU Prolog: attend(BM) :- attend(AD). attend(CP) :- attend(AD). attend(AD) :- attend(CP). attend(DD) :- attend(CP). attend(AD) :- attend(EC). attend(BM) :- attend(EC). attend(CP) :- attend(EC). attend(CP) :- attend(FA). attend(DD) :- attend(FA). attend(BM) :- attend(CP),attend(DD). attend(EC) :- attend(CP),attend(DD). attend(FA) :- attend(CP),attend(DD). attend(DD) :- attend(AD),attend(BM). attend(FA). /* try different seed invitees in order to see if all would attend*/ /* input: write('invited:'),nl, attend(X),write(X),nl, fail.*/
{ "domain": "cs.stackexchange", "id": 14284, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "logic, constraint-programming, prolog, logic-programming", "url": null }
waves, solid-state-physics, phonons, dispersion Suppose, a dispersion branch for $\Gamma$-X has two possible frequencies. What is the "real world meaning" of that? Do both these modes exist at a certain excitation frequency? Now assume there are two different branches that occur at the same frequency inside $\Gamma$-X. Does that make it any different than case 1 where the same branch has one frequency twice? I think the short version is that dispersion relations only tell a small part of the story of a phonon. They say nothing about the motion of the corresponding wave; all they tell you is how the oscillatory frequency is related to the wavevector.
{ "domain": "physics.stackexchange", "id": 59940, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "waves, solid-state-physics, phonons, dispersion", "url": null }
inorganic-chemistry, electrons, electronic-configuration Title: Half-Filled Shells and Stability explanation I am reading a book about Advanced Chemistry, and it is discussing the subject of half-filled orbitals. The book notes that Chromium has an electron structure of $1s^2 2s^2 2p^63s^23p^63d^54s^1$ There is also some added stability when a sub-shell is half-full as this minimises the mutual repulsion between pairs of electrons in full orbitals. Now, I'm confused by this explanation. Is it correct to conclude that if a sub-shell is half filled, the repulsion between electrons in the half-filled subshell and other subshells with fully-filled orbitals is reduced (e.g. between the $3d$ and $3p$ subshell in Chromium)? I actually just had this in class, and it confused me as well. This site helped me to understand it a bit better: http://www.chemguide.co.uk/atoms/properties/3d4sproblem.html The author, a retired chemistry professor, states:
{ "domain": "chemistry.stackexchange", "id": 8906, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, electrons, electronic-configuration", "url": null }
apache-spark datasub = datasub.na.fill(0) from pyspark.ml.linalg import Vectors from pyspark.ml.feature import VectorAssembler assembler = VectorAssembler(inputCols = ['feature1', 'feature2', 'feature3', 'feature4', 'feature5', 'feature6', 'feature7', 'feature8', 'feature9', 'feature10', 'feature11','feature12', 'feature13'], outputCol = 'features') output = assembler.transform(datasub) finaldata = output.select('features','yt_1') train_data,test_data = finaldata.randomSplit([0.7,0.3]) finaldata.show(20) dtc = DecisionTreeClassifier(featuresCol='features',labelCol='yt_1') rfc = RandomForestClassifier(featuresCol='features',labelCol='yt_1', numTrees=70) gbt = GBTClassifier(featuresCol='features',labelCol='yt_1') dtc_model = dtc.fit(train_data) rfc_model = rfc.fit(train_data) gbt_model = gbt.fit(train_data)
{ "domain": "datascience.stackexchange", "id": 3979, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "apache-spark", "url": null }
c, aes | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (2) ‘outputptr’ could be NULL: unchecked value from (1) | 275946.c:274:21: warning: dereference of possibly-NULL ‘output’ [CWE-690] [-Wanalyzer-possible-null-dereference] 274 | *output = (*state)[j][i]; | ~~~~~~~~^~~~~~~~~~~~~~~~ ‘fromState’: events 1-3 | | 267 | *outputptr = malloc(sizeof(uint8_t) * 16); | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | | | (1) this call could return NULL |...... | 270 | for(i = 0; i < 4; i++){ | | ~~~~~ | | | | | (2) following ‘true’ branch (when ‘i <= 3’)... | 271 | for(j = 0; j < Nb; j++){ | | ~~~~~ | | | | | (3) ...to here |
{ "domain": "codereview.stackexchange", "id": 45470, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c, aes", "url": null }
chart, see Figure 3-18. Load the file windData. A polar plot works in a very different way, and plots functions in the form where r is the radius, or distance from the origin at 0,0, and θ is the angle. Polar Plot in MATLAB with example A complex number z can be represented as z = re jθ. It is the value of the function R(theta) = 2 cos(2θ) + 4 sin(2θ) polar graph. theta (I have a doubt about the second name pls check, I'm not by my WS ;) Then you can generate your polar plot with r and theta (your vaiables), or the default sys2 references--Good luck Ivar. ; Make a radius vector. Student: Wow! That is a cool graph! Mentor: Nice work. I know it's symmetric but I'm going to I'm going to come up with a test for symmetry and see if it works on this guy. We can plot these points on the plane, and then sketch a curve that fits the points. theta (I have a doubt about the second name pls check, I'm not by my WS ;) Then you can generate your polar plot with r and theta (your vaiables), or the
{ "domain": "latinain.it", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9748211597623861, "lm_q1q2_score": 0.8037029375571277, "lm_q2_score": 0.824461932846258, "openwebmath_perplexity": 1173.9222973916594, "openwebmath_score": 0.7792732119560242, "tags": null, "url": "http://latinain.it/r-polar-plot.html" }
all together they form the angle all the way round a point: Therefore if you have a regular polygon (in other words, where all the sides are the same length and all the angles are the same), each of the exterior angles will have size 360 ÷ the number of sides. the angles are not drawn to scale, so do not try to measure … The angles in a right angle add up to 90 degrees. Rotated by 360 degrees, and not something like 50 or 100 angles in parallelogram. The 30° is 180° = 70° = 110° so sum of all the angles at a add! ( full turn ) do angles in a kite add up to 360 up to 180 degrees will always add up to 360 degrees, and not like. Since a full circle is 360°, we see there is a 4 sided shape ) add to! Four right angles ( angle J and angle M ) angles in a line... = 150° kite is a 4 sided shape until you reach the start you will have of! Full circle is composed of many triangles that make up the quadrant of length. X + 2 * X + 2 * X ) / 2 = so!, triangles add up to 360 degrees, and not
{ "domain": "prestavamkourit.cz", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9793540716711547, "lm_q1q2_score": 0.8343634528419875, "lm_q2_score": 0.851952809486198, "openwebmath_perplexity": 479.04458734549587, "openwebmath_score": 0.5081186294555664, "tags": null, "url": "http://prestavamkourit.cz/bunk-beds-crt/23d4a9-do-angles-in-a-kite-add-up-to-360" }
ions, electrolysis Perhaps you wonder if electrolyzing a solution of NaCl uses up the NaCl and could bring about a complete stop of current flow. No, not really, but things do change. If you could completely flush out the chlorine gas as soon as it is produced, the sodium ion will still remain. If Na$^+$ were reduced to metal, it would react immediately to give H2, but that doesn't even happen (although, if you used a mercury cathode, you could get sodium amalgam, which would slowly decompose to Na$^+$ and H2). The Na$^+$ just carries 4 or 5 or 6 H2O molecules close to the cathode where an electron turns a water molecule into a proton and a hydroxide ion. Eventually, all the NaCl could be converted to NaOH - actually, the conductivity would increase! I suppose you could make the current go to zero by electrolyzing all the water away, to O2 and H2, but the electrolyte would still work if you add more water.
{ "domain": "chemistry.stackexchange", "id": 16552, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ions, electrolysis", "url": null }
ros, git, rosinstall, ros-release, best-practices Title: Can a single git repository release multiple ROS stacks? I am setting up a repository which will contain several ROS stacks. I want rosinstall and ros_release to manage each stack separately. I know how to do it with svn, but git seems to force the whole repository to be managed as a unit. Is there a way to use git that meets these requirements? Do I need a separate git repository for each stack?
{ "domain": "robotics.stackexchange", "id": 5886, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, git, rosinstall, ros-release, best-practices", "url": null }
homework-and-exercises, newtonian-mechanics, forces, vectors, textbook-erratum Title: Are the options correct of this question? Q) An object is being pulled in the west with 50N force and in the east with 20N force. What will be the value of the net force? A) 53.85N B) 63.85N C) 43.85N D) 50.85N I feel that none of the options are correct. Shouldn't the answer be 30N? I did a quick check to see whether the given directions are correct. I believe the intended question has one force to the north or south and the other to the east or west. If you calculate the resultant, it turns out to be $$F = \sqrt{50^2+20^2} \approx 53.85 \ \text{N}$$
{ "domain": "physics.stackexchange", "id": 89038, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "homework-and-exercises, newtonian-mechanics, forces, vectors, textbook-erratum", "url": null }
quantum-gate, universal-gates, clifford-group Claim: $G$ is a unitary 2-group. Proof: Since $G$ is a subgroup of $SU(p^m)$ the commutant of $G$ has to contain the commutant of $SU(p^m)$. Likewise, since $\mathrm{Cl}_p(m)$ is a subgroup of $G$, the commutant of $\mathrm{Cl}_p(m)$ has to contain the commutant of $G$. But the commutant of $\mathrm{Cl}_p(m)$ and $SU(d)$ is the same, since $\mathrm{Cl}_p(m)$ is a unitary 2-group. qed Fact 4: Any finitely generated infinite unitary 2-group is dense in $SU(d)$. [A. Sawicki and K. Karnas, "Universality of single qudit gates", Cor. 3.5; See also Prop. 3 in my paper]
{ "domain": "quantumcomputing.stackexchange", "id": 3572, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-gate, universal-gates, clifford-group", "url": null }
algorithm, c, linked-list, matrix In my opinion, check_number_of_rows and check_number_of_columns are rather obfuscating the underlying code. Since both of these functions consist of a simple check, and their names do not actually convey what is checked, you are actually losing clarity here. Encountering calls to these functions in the code inevitably makes you go back and read their definitions, because the name just suggests that a check is carried out, not what check. My suggestion would be an assert-like method to which you pass a condition and which calls abort if that condition is not met. That way, you abstract a part of the functionality away (the fail-on-error), but retain the self-explaining property of those checks. You can omit the parentheses around the argument of sizeof if it is not a type argument. For example, sizeof(*current_node) can be written as sizeof *current_node. The advantage of removing the parentheses here is to make it clear when the argument is a variable and when it is a type name.
{ "domain": "codereview.stackexchange", "id": 29489, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithm, c, linked-list, matrix", "url": null }
algorithm, c, shell, posix Memory is allocated but never freed, which will cause the process size to grow without bound, eventually leading to some kind of failure. The splitting just proceeds character-by-character without regard to syntax. This means that a command cannot contain a vertical bar, and an argument cannot contain a space. But real shells have quoting, so that we can write pipelines like: echo "This argument has | and spaces" | grep -c "|"
{ "domain": "codereview.stackexchange", "id": 19928, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithm, c, shell, posix", "url": null }
python, errors, pandas, seaborn From the comments. I see whats happening. The easy solution is ... replacement = { "chrI": 1, "chrII": 2, "chrIII": 3, "chrIV": 4, .... } heterozygosity_df['chr'] = heterozygosity_df['chr'].str.replace(replacement, regex=True) From the comments ... good it works ... this is what I would have personally done .. replacement = { "chrI": 1, "chrII": 2, "chrIII": 3, "chrIV": 4, # continue for all chromosomes } heterozygosity_df = pd.read_csv("file.tsv", sep="\t", header=None).set_axis(['chr', 'pos', 'het'], axis=1, copy=False) heterozygosity_df['chr'] = heterozygosity_df['chr'].str.replace(replacement, regex=True).astype('int') Normally str should be in place because when 'chr' is imported its an object. However, if it works thats the only thing that counts.
{ "domain": "bioinformatics.stackexchange", "id": 2582, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, errors, pandas, seaborn", "url": null }
then gives that for $i = 1, 2$, \begin{align*} P(H_i) &= P(H_i \mid H)P(H) + P(H_i \mid F)P(F) + P(H_i \mid T)P(T)\\ &= 1 \times \frac{2}{5} + \frac{1}{2}\times \frac{2}{5} + 0 \times \frac{1}{5} = \frac{3}{5},\\ P(H_1 \cap H_2) &= P(H_1 \cap H_2 \mid H)P(H) + P(H_1 \cap H_2 \mid F)P(F) + P(H_1 \cap H_2 \mid T)P(T)\\ &= 1 \times \frac{2}{5} + \frac{1}{4}\times \frac{2}{5} + 0 \times \frac{1}{5} = \frac{1}{2} \neq \left ( \frac{3}{5}\right )^2 = P(H_1)P(H_2), \end{align*} showing that $H_1$ and $H_2$ are not independent events. Finally, $$P(H_2 \mid H_1) = \frac{P(H_1 \cap H_2)}{P(H_1)} = \frac{1/2}{3/5} = \frac{5}{6}$$ as calculated by the OP's teacher.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9664104914476338, "lm_q1q2_score": 0.8074200616266773, "lm_q2_score": 0.8354835432479661, "openwebmath_perplexity": 438.3109680994702, "openwebmath_score": 0.9861456155776978, "tags": null, "url": "http://math.stackexchange.com/questions/70514/are-the-first-flip-and-second-flip-of-this-problem-independent-events" }
How can that angle be 117°? Thank you! File size: 12.2 KB Views: 24 2. May 6, 2017 ### Daniel Gallimore From your drawing, it looks like you are trying to fit all of the angles into the same plane. Instead, let the angle of depression represent the amount by which the ranger looks down, not side to side. If the ranger looks down $2.5^\circ$ in one direction, turns through some unspecified angle, then looks down $1.3^\circ$ in another direction, his two lines of sight will define a plane. The angle between those lines of sight within that plane is $117^\circ$. You want to find the distance between where those lines of sight encounter the flat ground, a vertical distance $300$ feet below the ranger. 3. May 6, 2017 ### ehild T represents the tower, A and B are the fires. OAB triangle is horizontal, OAT and OBT triangles are vertical. You have to find the distance between A and B, from the triangle ABT. 4. May 6, 2017 ### Vital
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9532750453562491, "lm_q1q2_score": 0.821282877366017, "lm_q2_score": 0.861538211208597, "openwebmath_perplexity": 654.1938488072299, "openwebmath_score": 0.6928207278251648, "tags": null, "url": "https://www.physicsforums.com/threads/understanding-the-size-of-the-angle.913819/" }
so here we need $k \leqslant 2$. But $a_1 \leqslant 1$ requires $c\leqslant 1$, and hence $k = 2$ doesn't work. So we try $k = 1$ and find $a_n = \frac{1}{n}$ works. • Thank you very very much for this answer.Do you mind if I use this answer(with all credits to you) somewhere else?It would help some other people on Brilliant.org if I could.And thanks again for this answer. Nov 7, 2014 at 7:51 • No, I don't mind at all. Go ahead and share. Nov 7, 2014 at 12:52
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9811668690081642, "lm_q1q2_score": 0.8021769868073076, "lm_q2_score": 0.8175744739711883, "openwebmath_perplexity": 699.6980532225607, "openwebmath_score": 0.8323978185653687, "tags": null, "url": "https://math.stackexchange.com/questions/1008934/proving-left1-frac113-right-left1-frac123-right-ldots-left1" }
thermodynamics, electromagnetic-radiation, friction, dissipation Title: Why does friction produce heat? What causes two objects sliding against each other to produce heat? Why don't they generate visible light or something else? They produce heat because the surfaces on small scales are rough like canyons rather than flat like the ocean. As these rough surfaces come into contact with each other they repel. When two atoms are brought very close together they store potential energy. When they move apart that energy becomes kinetic. However, this kinetic energy generally isn't enough to escape the object they are attached to so the energy becomes randomly distributed as kinetic energy exchanged between the atoms of the object also known as thermal energy. In some cases the energy is enough to break bonds and indeed friction can cause objects to deteriorate and fall apart as in a meteor falling through the sky being torn apart by atmospheric friction.
{ "domain": "physics.stackexchange", "id": 32461, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, electromagnetic-radiation, friction, dissipation", "url": null }
# Find the degree of $[F:\mathbb{Q}]$, where $F$ is the splitting field of $x^3-11$ over $\mathbb{Q}$ Find the degree of $[F:\mathbb{Q}]$, where $F$ is the splitting field of $x^3-11$ over $\mathbb{Q}$ Roots are $\sqrt[3]{11}$ and the other $2$ are complex, I think. I don't think that finding the roots and then what field they generate is a good idea. I think it's better to prove this polynomial is irreducible. By Eiseintein criterion, $p=11$ is prime, does divide every $a_i$ except $a_3=1$, $p^2$ does not divide $a_0$. So the polynomial is irreducible over $\mathbb{Q}$ so the degree is $3$. Is this right? There is a more general result: For all prime numbers $p$ the splitting field $F$ of $f=x^3-p$ over $\mathbb{Q}$ has degree 6.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9820137879323497, "lm_q1q2_score": 0.8051465691443461, "lm_q2_score": 0.8198933447152497, "openwebmath_perplexity": 68.20259807347922, "openwebmath_score": 0.9466983079910278, "tags": null, "url": "https://math.stackexchange.com/questions/2455910/find-the-degree-of-f-mathbbq-where-f-is-the-splitting-field-of-x3-11" }