text
stringlengths
1
1.11k
source
dict
# Squarefree polynomials over finite fields I’m trying to figure out how many squarefree polynomials there are of a fixed degree over $\mathbb{F}_2$ specifically (and in general, over any finite field). Looking at some low-degree examples seems to suggest that half of the polynomials of any given degree are squarefree, but I’m not sure how to prove this, or whether the pattern continues at all. I’m considering the possibility of using the formal derivative, and the fact that a polynomial is relatively prime to its formal derivative iff it is squarefree, but I don’t see how to proceed with this. So is there a known formula? #### Solutions Collecting From Web of "Squarefree polynomials over finite fields" Recall that $$M(n, q) = \frac{1}{n} \sum_{d | n} \mu(d) q^{n/d}$$
{ "domain": "bootmath.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9881308761574288, "lm_q1q2_score": 0.8101619268948131, "lm_q2_score": 0.8198933425148213, "openwebmath_perplexity": 130.2332148748843, "openwebmath_score": 0.8808693289756775, "tags": null, "url": "http://bootmath.com/squarefree-polynomials-over-finite-fields.html" }
php, object-oriented, php5, laravel Title: A Search Engine Class I've built a Search Engine class for a website that permits to search companies in base of their locations and their categories (companies pay a plan to be found in the places that they will). In the constructor you can pass an index array cointaining the parameters or you can set them later with setters. All parameters are optional. Basically calling getQueryBuilder() method you obtain a Laravel's Query Builder instance and can treat it as you want (for example use Pagination etc.) Note: I did not designed the structure of the database, I know that it's not the best (comma separated values etc.) but I cannot touch it. I would like to know if the design of the class is good or not, and possibily learn how to build it properly. class SearchEngine { private $region = null; private $province = null; private $zipcode = null; private $municipality = null; private $category = null; private $subcategory = null; private $b2b = false;
{ "domain": "codereview.stackexchange", "id": 20991, "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, php5, laravel", "url": null }
probability-theory, statistics, balls-and-bins Title: Distribution maximizing ratio of expected maximum over the mean I’m looking for a distribution that is non-negative, or has good tail bounds (so non-negative with high probability) and maximizes the ratio between the expected maximum of $n$ iid samples and the mean. That is, if $X_1,\ldots,X_n$ are iid samples from the distribution, $Y = \max(X_1,\ldots,X_n)$, and $X$ is another sample, then I want to maximize $$\frac{E[Y]}{E[X]}.$$ For instance, for a normal distribution $N(\mu,\sigma^2)$, $E[Y]$ is $\Theta(\sigma\sqrt{\log n})$, however for the samples to be non-negative with high probability, because of the tail bound on normal distribution, $\mu$ should grow faster than $\sigma$, so $\frac{E[Y]}{ E[X]}$ will be bounded by $O(\sqrt{\log n})$.
{ "domain": "cs.stackexchange", "id": 19920, "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": "probability-theory, statistics, balls-and-bins", "url": null }
electrostatics, energy, potential, work What force is this external force? Is the external force excluding the force that makes the charge move along the path? Shouldn't the external force be different when the charge is moving in curves? When thinking about moving charges from, let's say infinity to some point $P$, or from any point $A$ to any other point $B$, we do so in a way that doesn't change the velocity, or the "state of motion" of the charged particle. Since a force $ q_0 \vec E $ exists already, an external agent should balance this force.
{ "domain": "physics.stackexchange", "id": 91893, "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, energy, potential, work", "url": null }
ros, roslaunch, ros-hydro Title: Roslaunch won't work after moving catkin_ws directory Hi I am trying to run roslaunch command in my terminal and when I type my package name and roslaunch file that I want to run it breaks and gives me this error: [controls4Planner.launch] is neither a launch file in package [controls] nor is [controls] a launch file name I'm not sure whats wrong with this and can't seem to figure it out help would be great. Also these problems seem to only occur when I moved all my files into another directory and then I went and replaced all the paths with the new path when catkin_make was complaining. Using ROS Hydro, Ubuntu 12.04, EDIT: The problem was when moving my directory that all the paths for my work space didn't work because it pointed to something that wasn't there.
{ "domain": "robotics.stackexchange", "id": 17301, "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, roslaunch, ros-hydro", "url": null }
inorganic-chemistry, physical-chemistry, everyday-chemistry, crystallography, recrystallization Title: Are electronic descalers a scam? It seems there are some electronic kits sold around nowadays by major retailers (e.g., Home Depot and Amazon) claimed to remove built-up scale from water pipes. But, do they actually work? If so, then how? Perhaps, inducing high-frequency eddy currents inside copper piping somehow lessens its ability to support limescale? Or, perhaps it gets broken down by some specific radiation (emitted by the kit) in the limescale's absorption spectrum? These devices have been reported to work in some situations, but not in others. The underlying theory involves altering the growth of calcium carbonate scale with an ordinary magnetic field. The magnetic field changes which form of calcium carbonate crystal (calcite, aragonite, and vaterite) is favored. Certain forms of crystal make tough scale while others can pass through a water system without scaling.
{ "domain": "chemistry.stackexchange", "id": 11697, "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, physical-chemistry, everyday-chemistry, crystallography, recrystallization", "url": null }
quantum-gate, hadamard, qiskit-runtime Title: Where can I find runtime of ibm quantum gates? I'm looking for the runtime of IBM quantum gates. For instance how long does it take to apply an Hadamard gate to a qubit ? and a CNOT gate to two qubits ? I didn't find any answers in the documentation but it's possible that I didn't search hard enough. There are some ways to do this: There is an archived repository of IBM Quantum on GitHub containing some old as well as current backends of Qiskit: https://github.com/Qiskit/ibmq-device-information/blob/master/backends/melbourne/V1/version_log.md Another way to check this is by adding using the commands %_qiskit_backend_overview or by backend.properties(). Basically try playing around with the backend commands. You'll get an output like this: If you want to calculate the runtime of your circuit you can use the Qiskit pulse/compiler scheduler
{ "domain": "quantumcomputing.stackexchange", "id": 3949, "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, hadamard, qiskit-runtime", "url": null }
string-theory, determinism, randomness Title: Can string theory get rid of randomness in quantum processes? I am not a physicist, but I am very much into popular science, especially string theory. I would like to know if it is conceivable that string theory might be able to get rid of the randomness apparent in quantum processes. For example, radioactive decay, could this process be related to the particular phases of the vibrations of the strings composing the particle? Can it be that decay occurs when a certain constructive interference occurs between the strings? No, it's not possible. The reason is that string theory is a quantum theory. That means it includes all of the properties of quantum theory among its basic assumptions. That includes the Born rule, which relates wavefunctions to stochastic probabilities ("randomness") when measurements are made. Because string theory includes quantum randomness as an assumption, it can never hope to explain it.
{ "domain": "physics.stackexchange", "id": 18414, "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": "string-theory, determinism, randomness", "url": null }
and standard deviation calculator. JavaScript is turned off in your web browser. this calculator and other calculators on this site. The basic formula for SD (population formula) is: Basically, standard deviation (useful for QA), identifying the mode, and calculating the sample median calculator is useful when you want to understand the how much individuals Population Standard Deviation Variance: ((1-4) 2 + (8-4) 2 + (-4-4) 2 + (9-4) 2 + (6-4) 2) / N = ((-3) 2 +( 4) 2 + (-8) 2 + (5) 2 + (2) 2) / 5 = (9+16+64+25+4) / 5 = 118 / 5 = 23.6. For example, suppose we have wire cable that is cut to different leng… can be calculated exactly. This calculator computes the standard deviation from a data set: Specify whether the data is for an entire population or from a sample. A wider histogram suggests larger standard deviation, while a narrower one indicates lower standard deviation. For easy entry, you can copy and paste your data into the in a data set, N is the number of values in Looking
{ "domain": "kalpehli.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9744347853343058, "lm_q1q2_score": 0.8182659924349073, "lm_q2_score": 0.8397339716830606, "openwebmath_perplexity": 785.4560996982204, "openwebmath_score": 0.5946274995803833, "tags": null, "url": "http://kalpehli.com/zhc-dax-cmdbk/9d0yg0r.php?tag=standard-deviation-histogram-calculator-6b297a" }
c, parsing, unit-testing, rational-numbers 1 1/3 -1 1/4 1.5 The input code does not require the fraction representation to be minimal. For example: +6 17/3 is valid enough, but corresponds to 11 2/3 or 35/3. The code allows arbitrary sequences of blanks and tabs (but not newlines) between the components of a fraction, but only allows a sign at the start. (That is, neither 6 +17/3 nor 6 17/-3 is a valid fraction, but the 6 would be recognized as a valid integer, and hence fraction; the end of the conversion would be the blank after the 6.) However, the code ensures that values which exceed the range of the int type (assumed to be 32-bit int) are not allowed. For example: 1234567 192214/662391 is invalid because the exact fraction 155375261911 / 662391 cannot be represented with two 32-bit integers.
{ "domain": "codereview.stackexchange", "id": 17208, "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, parsing, unit-testing, rational-numbers", "url": null }
ros-kinetic, rosmsg Originally posted by jjb1220 on ROS Answers with karma: 7 on 2021-09-28 Post score: 0 The pointcloud message doesn't encode a concept of 'in front'. The message header has a frame_id field that should correspond to a link element that exists within your robot description. If your robot is properly set up, you should be able to translate points from the stated reference frame (usually velodyne) to a frame that helps define the orientation of your whole robot (usually called base_link and defined with the convention REP 103). You may want to check out this answer that has a bit of discussion and (potentially old) links for converting point clouds to x,y,z arrays.
{ "domain": "robotics.stackexchange", "id": 36963, "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-kinetic, rosmsg", "url": null }
python, generator Todo: * Do something * Something else Any tips how to make this SHORTER and more neat, closer to a advanced or just better solution will be definitely on point. Thanks in advance! Have a great day! if ("Summary" in config) and (config["Summary"] is not None): Can be simplified to: if config.get("summary") is not None: args = ["Args:"] + [f"\t{arg}: Function argument" for arg in config["Args"]] attr = ["Attributes:"] + [f"\t{attr}: Information about parameter {attr}" for attr in config["Attributes"]] todo = ["Todo:"] + [f"\t{star} {todo}" for todo in config["Todo"]] Can all be moved into a function. You always add f"{Name}:", You always iterate through config[Name], and You always format the value. Which can be provided as a format string (not an f-string). def format_values(config, name, fmt): return [f"{name}:"] + [fmt.format(value) for value in config[name]] format_values(config, "Args", "\t{}: Function argument")
{ "domain": "codereview.stackexchange", "id": 41241, "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, generator", "url": null }
graphs, discrete-mathematics, matching, bipartite-matching If $|P|< |N(P)|$ for all $P\subsetneq U$, then we can let an arbitrary person pick first. After his picking, $N(P)$ is decreased by at most 1 for all $P$, so $|P|\le |N(P)|$ holds for all $P$ in the remaining graph. Therefore there is still a perfect matching in the remaining graph by Hall's marriage theorem, and there is a valid picking sequence by inductive assumption. If there exists $P\subsetneq U$ such that $|P|=|N(P)|$, then there is a perfect matching in the subgraph induced by $P\cup N(P)$, and by inductive assumption there is a valid picking sequence for people in $P$ in this subgraph. We can apply this picking sequence in our orignial graph first, and the result is the same, that is, exactly all items in $N(P)$ are picked. Note there is still a perfect matching in the remaining graph, so we can again use the inductive assumption to complete the picking sequence.
{ "domain": "cs.stackexchange", "id": 11286, "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": "graphs, discrete-mathematics, matching, bipartite-matching", "url": null }
Write $a = u/v$ with $u,v\in\mathbb Z$ and $\gcd(u,v)=1$. Then \begin{align*} \frac{u^2+v^2}{uv} &= a + \frac{1}{a} = t\in \mathbb Z\\ u^2+v^2 &= tuv \end{align*} This shows that $u$ divides $v$ and vice-versa, which is only possible if $u,v = \pm 1$. Therefore $a=1$ or $a= -1$. If $a=-1$, then $tr(A) = -2$. Taking the first squareroot as $R_1$, the formula gives $$tr(R_1)^2 = tr(A) +2 = 0 \implies tr(R_1) = 0$$ But now for the second squareroot $R_2$ we have $$tr(R_2)^2 = tr(R_1)+2 = 2 \implies tr(R_2) = \pm \sqrt{2},$$ contradicting $tr(R_2)\in\mathbb Q$. Therefore the only possibility is $a=1$. We have seen that this results in the family of solution given at the start of this answer. # C2. Case $n=2$ and $c\neq 0$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429116504951, "lm_q1q2_score": 0.8430501129914817, "lm_q2_score": 0.8558511543206819, "openwebmath_perplexity": 176.19978707873526, "openwebmath_score": 0.9992186427116394, "tags": null, "url": "https://math.stackexchange.com/questions/2843910/square-matrix-with-rational-coefficients-having-k-th-root" }
quantum-mechanics, homework-and-exercises, harmonic-oscillator, hamiltonian, eigenvalue $\langle V \rangle=\frac{1}{4}\hbar\omega(\langle n|\hat{a}\hat{a}^{\dagger}|n\rangle + \langle n|\hat{a}^{\dagger}\hat{a}|n\rangle)=\frac{1}{4}\hbar\omega(2n+1)$.
{ "domain": "physics.stackexchange", "id": 80197, "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, homework-and-exercises, harmonic-oscillator, hamiltonian, eigenvalue", "url": null }
acoustics, terminology, absorption, attenuation Attenuation and absorption are both terms used in a variety of different fields. In my own for example, photonics we experience attenuation through absorption, scattering and reflections as well. These three are different processes with results in attenuation of a signal. You can view maybe attenuation as the opposite of gain/amplification.
{ "domain": "physics.stackexchange", "id": 62935, "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": "acoustics, terminology, absorption, attenuation", "url": null }
classical-mechanics, angular-momentum, rotational-dynamics EDIT: Additional point on Gyroscope Intuition Comments suggest that the motion described by the equations is not directly in accord with intuition. This is likely to be because a real Gyroscope has some elements of Friction. This friction has the effect of a damping term in the above equations. The friction will be basically a function of s, but n=n(s) through the equations, and the only acceleration term here is n'. Thus the friction, for a realistic Gyroscope, will damp the Nutation oscillations that otherwise occur. This would make the nutation an approximate constant of motion.
{ "domain": "physics.stackexchange", "id": 452, "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": "classical-mechanics, angular-momentum, rotational-dynamics", "url": null }
electric-circuits, electrons, electric-current, electrical-resistance, light-emitting-diodes Title: Placement of an LED in a circuit When an LED is connected in a circuit it needs a resistor so that excess current does not pass through it, but when a resistor is placed after the LED, it works the same as when the resistor is placed before the LED. Why? It has a high amount of current flowing through it as the resistor opposes the current after it flows through the LED? Ok maybe that part of Kirchoffs law confuses me alot.. where is it applicable in my question
{ "domain": "physics.stackexchange", "id": 32895, "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": "electric-circuits, electrons, electric-current, electrical-resistance, light-emitting-diodes", "url": null }
general-relativity, special-relativity This is kind of like a case of spontaneous symmetry breaking, in fact. The theory itself works the same no matter which reference frame you're in, but the system that the theory applies to does look different from different reference frames. So the system "spontaneously" selects a particular "natural" reference frame, the CM frame, for you.
{ "domain": "physics.stackexchange", "id": 3621, "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, special-relativity", "url": null }
electromagnetism, electromagnetic-radiation, hamiltonian-formalism, hamiltonian, jerk Title: Is the Hamiltonian of a relativistic charged particle in an electromagnetic field only an approximation? Consider a system of two relativistic charged point particles 1 and 2 which interact through their electric and magnetic fields. The equation of motion for the first particle is then given by the Lorentz force. $$\vec{F_1} = \dot{\vec{p_1}} = m_1 \dfrac{\mathrm{d}}{\mathrm{d} t} \left(\gamma\left(\dot{r_1}\right) \dot{\vec{r_1}}\right) = q_1 \left(\vec{E_2} \left(\vec{r_1}\right) + \dot{\vec{r_1}} \times \vec{B_2} \left(\vec{r_1}\right) \right) = q_1 \left(- \left(\vec{\nabla} \phi_2 \right) \left(\vec{r_1}\right) -\dot{\vec{A_2}} \left(\vec{r_1}\right) + \dot{\vec{r_1}} \times \left(\vec{\nabla} \times \vec{A_2}\right) \left(\vec{r_1}\right) \right)$$
{ "domain": "physics.stackexchange", "id": 49948, "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, electromagnetic-radiation, hamiltonian-formalism, hamiltonian, jerk", "url": null }
java, benchmarking private List<MeasuredProcedure> composeComparedProcedures(MeasuredProcedure firstMeasuredProcedure, MeasuredProcedure secondMeasuredProcedure, MeasuredProcedure[] otherMeasuredProcedures) { List<MeasuredProcedure> allMeasuredProcedures = new ArrayList<>(2 + otherMeasuredProcedures.length); allMeasuredProcedures.addAll(List.of( firstMeasuredProcedure, secondMeasuredProcedure )); allMeasuredProcedures.addAll(Arrays.asList(otherMeasuredProcedures)); return allMeasuredProcedures; } private long getSpreadOfAverages(List<MeasuredProcedure> allMeasuredProcedures) { long max = getMaxAverage(new MeasurementInputs(allMeasuredProcedures, timesRun)); long min = getMinAverage(new MeasurementInputs(allMeasuredProcedures, timesRun)); return max - min; }
{ "domain": "codereview.stackexchange", "id": 44781, "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, benchmarking", "url": null }
python, programming-challenge, python-3.x Since a, b can be equal, I wrap this list into a set to produce my code below. Code: T = int(input()) for _ in range(T): n = int(input()) a = int(input()) b = int(input()) a, b = sorted((a, b)) values = sorted(set([(n - i - 1) * a + i * b for i in range(n)])) print(*values) I would like any suggestions to help improve this code. Since a, b can be equal, I wrap this list into a set to produce my code below. Why not just handle this case separately? It's then simple to prove that if a != b, we don't have repeated values, and we can just generate them in increasing order. def last_stone(a, b, n): if a == b: return [a * (n - 1)] if a < b: return last_stone(b, a, n) return [i * a + (n - i - 1) * b for i in range(n)]
{ "domain": "codereview.stackexchange", "id": 9254, "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, programming-challenge, python-3.x", "url": null }
special-relativity, metric-tensor, tensor-calculus, inertial-frames \cosh\omega & \sinh\omega & 0 & 0 \\ \sinh\omega & \cosh\omega & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix} \\ =&\begin{pmatrix} \cosh\omega & -\sinh\omega & 0 & 0 \\ -\sinh\omega & \cosh\omega & 0 & 0 \\ 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 1 \end{pmatrix}^{-1} \end{align}$$ So we finally got the inverse matrix of $\Lambda^\mu{}_\nu$, as it should be.
{ "domain": "physics.stackexchange", "id": 92461, "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": "special-relativity, metric-tensor, tensor-calculus, inertial-frames", "url": null }
and Poisson Equations In the previous chapter we saw that when solving a wave or heat equation it may be necessary to first compute the solution to the steady state equation. I Non-homogeneous IVP. Both basic theory and applications are taught. The Laplace Equations. The PDE is as follows:$$ \frac{{\partial T}}{{\partial t}} = \frac{{{\partial ^2}T Stack Exchange Network Stack Exchange network consists of 175 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. As noted previously, the second solution does not have a Laplace transform. Combine searches Put "OR" between each search query. The Overflow Blog The Overflow #19: Jokes on us. In the above four examples, Example (4) is non-homogeneous whereas the first three equations are homogeneous. 4 Example problem: The Young Laplace equation 1. As with a general PDE, elliptic PDE may have non-constant coefficients and be non-linear.
{ "domain": "danieledivittorio.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787842245938, "lm_q1q2_score": 0.8204867835014967, "lm_q2_score": 0.8311430478583169, "openwebmath_perplexity": 631.7991365899385, "openwebmath_score": 0.8082199096679688, "tags": null, "url": "http://lszy.danieledivittorio.it/laplace-pde-examples.html" }
machine-learning, regression, feature-engineering, supervised-learning Title: Training a regression algorithm with a variable number of features I need to train a regression algorithm with multiple features and a single label (predicted value). The problem is that this algorithm has to be able to do on-line learning and the number of features it will receive will vary. Let me give a clear example: The algorithm is trained on a dataset of shape: [--------Features-----------------] [Label] [-- context11 -- | -- context12 --] [label1] Then, for the next training example, one of the contexts might be missing, so the training example might either be: [--------Features-----------------] [Label] [-- context21 -- ] [label2] or [--------Features-----------------] [Label] [-- context22 --] [label2] How can I deal with this situation? So far, I thought about two possibilities:
{ "domain": "datascience.stackexchange", "id": 3238, "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": "machine-learning, regression, feature-engineering, supervised-learning", "url": null }
c#, performance, linked-list, programming-challenge, interval skipList.Add(tweetsPerSecond[i]); yield return skipList.Last; } } If you don't want to go to the trouble of implementing a skip list, I think you can fake it with a combination of SortedSet<T> and Dictionary<TKey, TValue>. I couldn't find guarantees of the run time of the relevant operations on MSDN, but it runs much faster on this test input: var tweetsPerSecond = Enumerable.Range(0, 100000).Reverse().ToArray(); var windowSize = 10000; Here is the sample code (possibly buggy): public static IEnumerable<int> TweetsPerSecond(int[] tweetsPerSecond, int windowSize) { var size = windowSize + 1; var bag = new SortedBag<int>(); for (var i = 0; i < tweetsPerSecond.Length; i++) { if (i > windowSize) { bag.Remove(tweetsPerSecond[i - size]); } bag.Add(tweetsPerSecond[i]); yield return bag.Max; } }
{ "domain": "codereview.stackexchange", "id": 8075, "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#, performance, linked-list, programming-challenge, interval", "url": null }
quantum-mechanics, quantum-information, quantum-computer The results of psuedo-measurement return |00> and |11>, however, shouldn't the first qubit always be 0 when measured, even if it is in fact a control-qubit, since the control-qubit remains unchanged regardless of what the target qubit's value is? The second hadamard gate should just reverse the first hadamard gate, meaning whatever value that qubit was initialized with (|0>) should be be the same upon measurement (|0>) -- which is what happens when the CNOT gate is not present. Why are these programs flipping the first qubit, the control-qubit, in some cases? The second quantum computing simulation program that does the same is: QCAD 2.0 (qcad.sourceforge.jp).
{ "domain": "physics.stackexchange", "id": 11269, "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, quantum-information, quantum-computer", "url": null }
electric-circuits, potential, voltage, inductance So, beginning with a steady state open circuit (zero current flow), when your circuit is closed there will be a voltage applied by the battery across the series combination of inductor and resistor. Since the inductor will oppose any change in current flow, the battery voltage will appear across the inductor, the voltage across the resistor will be zero and current through the circuit will remain zero... but only for an instant.
{ "domain": "physics.stackexchange", "id": 48836, "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": "electric-circuits, potential, voltage, inductance", "url": null }
organic-chemistry And the reaction $$\ce{CH3^-X+ + CH3OH-> CH3+ + CH3- + XOH}$$ seems bogus to me as alcohol won't have that polarity to break a ionic bond. So nothing seems plausible. Increase of heat and pressure doesn't change the scenario.
{ "domain": "chemistry.stackexchange", "id": 7538, "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": "organic-chemistry", "url": null }
php, object-oriented, parsing, reinventing-the-wheel protected function readFile(string $parFile = null): bool { if ($parFile == null) { $parFile = $this->file; } Why would readFile ever accept null as argument? What if caller did something like $iniConfig = new ObjectController(); $iniConfig->readFile(); You are making it too easy for application to be put into exceptional state here. You should be biased towards being explicit about your dependencies vs. providing multiple ways to to inject dependencies (i.e. via constructor vs. via method call). Consider using is_null() for null comparison. When doing comparisons you should also be biased towards explicit comparison vs. loose comparison. You seem to do this interchangeably throughout your code, which can lead to unexpected behavior. if ($parFile == null) { throw new \BadFunctionCallException("Parameter File must not be null if no filepath has previously been defined"); } Would \InvalidArgumentException be better suited here?
{ "domain": "codereview.stackexchange", "id": 25560, "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, parsing, reinventing-the-wheel", "url": null }
But there is at least one notion of convergence which applies to the functions fn , and that is point-wise convergence — the form of convergence which is the broadest, in the sense that it applies to the most cases (and with which all other notions of convergence must agree, if they show that a sequence of functions converges at all). We may simply show that for each x, we have fn(x) = 0 for sufficiently large n. It then follows that the sequence fn converges to 0. The fact that the sequence fn doesn't converge to 0 under any of the p-norms doesn't matter; ultimately what matters is that the sequence converges point-wise, because what we're interested in is the cardinality of the limit itself, which is defined in terms of point-wise convergence. At worst, from a certain aesthetic point of view, one might say that it doesn't converge particularly gracefully (informally speaking) to 0; but it does indeed converge, and that is all that matters.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9783846710189289, "lm_q1q2_score": 0.8021710674226462, "lm_q2_score": 0.8198933315126792, "openwebmath_perplexity": 331.91490763152404, "openwebmath_score": 0.8755457997322083, "tags": null, "url": "http://math.stackexchange.com/questions/107/paradox-increasing-sequence-that-goes-to-0" }
newtonian-mechanics, harmonic-oscillator, oscillators Notice that, if $\gamma>0$, the term on the right is always negative, and so the "energy" of the system is always decreasing! Now if $\gamma$ is small, we can imagine that we get mostly periodic motion just as before for the same reasons (note that the "potential energy" part is unbounded, so it can't go to infinity), but the energy drains out of the system over time (if $\gamma>0$, otherwise energy is being pumped into the system), so the amplitude of each successive oscillation is smaller. If $\gamma$ is large, we don't even have periodic motion initially- the energy is quickly dissipated.
{ "domain": "physics.stackexchange", "id": 43925, "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, harmonic-oscillator, oscillators", "url": null }
5. Originally Posted by Unknown008 Taking your example, the simple fact of subtracting 4 combinations (that have ascending numbers) from the total will imply that the rest of the combinations are not in ascending order. There are 24 combinations, 4 of which contain ascending numbers. Removing 4 will leave the number of combinations that don't contain ascending numbers. In your problem, 10C4 is the number of combinations with ascending numbers. Another 10C4 is the number of combinations with descending numbers. So, twice that, and subtracted from the total (ie 5040) will give those that contain numbers neither in ascending nor descending. If you want to do it the long way, you can try this: 0 1 2 ? (7 possibilities) 0 1 3 ? (6 more possibilities, for a total of 6+7 possibilities) 0 1 4 ? 0 1 5 ? . 0 1 8 ? (1 more possibility) 0 2 3 ? (6 more possibilities) 0 2 4 ? (5 more possibilities) . . 1 2 3 ? (6 more possibilities) . . 6 7 8 ? (1 possibility) Total should be =
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9845754497285467, "lm_q1q2_score": 0.8139601343412227, "lm_q2_score": 0.8267117919359419, "openwebmath_perplexity": 462.78861652663505, "openwebmath_score": 0.6525946855545044, "tags": null, "url": "http://mathhelpforum.com/discrete-math/163759-counting-methods.html" }
notation, path-integral $$ I feel like this is incorrect, but I don't really understand what's going on enough to say for sure. Introduction For a completely general functional $F[\phi]$ your final equation is not correct. Let's pick a paticular discretization of the $x$ axis $\mathcal D \equiv \{x_1,x_2,...,x_N\}$ where $x_{i+1}-x_i \equiv \Delta x=\frac{x_N-x_1}{N}$ is the distance between consecutive points. Obviously, the continuum limit corresponds to the limit $\Delta x \rightarrow 0$, or equivalently $N \rightarrow + \infty$, which we're going to take at the end of our manipulations. Under this discretization scheme $\mathcal D$, any function $\phi(x)$ simply corresponds to a piece-wise constant function $\tilde \phi_{\mathcal D}$ with value $\phi(x_i)$ at $x_i$, which again approaches the actual function $\phi$ as $\Delta x \rightarrow 0$. Since this is a piece-wise constant function, the set of its values at all points of $\mathcal D$, i.e. $(\phi({x_1}),...,\phi({x_N}))$, uniquely specifies it.
{ "domain": "physics.stackexchange", "id": 53017, "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": "notation, path-integral", "url": null }
quantum-field-theory, momentum, hilbert-space, fourier-transform, normalization Title: Confusion in normalization of position space and momentum space It seems that in LSZ formalism approach, or just Feynman diagram approach, we can compute scattering amplitude of $\langle x_{out} | y_{in}\rangle$ (position space) and $\langle p_{out} | p_{in}\rangle$ (momentum space). However, I read that it is possible that $\langle x,t | y,t\rangle \neq 0$ for $x\neq y$, which suggests that there does not really exist position state. (Assume in scalar QFT that $|x,t\rangle = \phi(x)|0\rangle$)
{ "domain": "physics.stackexchange", "id": 48778, "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-field-theory, momentum, hilbert-space, fourier-transform, normalization", "url": null }
graph-theory, circuit-complexity, lower-bounds Every cut that is not $C$ must contain either the edge from $s$ to the start of path $P$ or the edge from the end of path $P$ to $t$, or else it would not block the path $s$–$P$–$t$. So if $C$ exists, there can be at most three disjoint cuts. And if $C$ does not exist (that is, if all cuts cover more than $n/3$ edges incident to $s$ or to $t$) there can be at most four disjoint cuts. Either way, this is a lot fewer than $k$ cuts.
{ "domain": "cstheory.stackexchange", "id": 1862, "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": "graph-theory, circuit-complexity, lower-bounds", "url": null }
You can easily see that a unique permutation is associated with each $k$ here. EDIT: I went ahead and wrote the code. See this: #!/usr/bin/python import sys def get_perm(n, k): """get permutation corressponding to random number. k < n!""" used = [False] * n fact_arr = [0] * n this_fact = 1 perm = [] for i in range(n): this_fact *= (i + 1) fact_arr[i] = this_fact k1 = k for i in range(n - 1): this_fact = fact_arr[n - 2 - i] p = k1 / this_fact k1 = k1 % this_fact p1 = p idx = 0 while p1 > 0 or used[idx]: if not used[idx]: p1 -= 1 idx += 1 perm.append(idx + 1) used[idx] = True for i in range(n): if not used[i]: perm.append(i + 1) break return perm def main(): perm = get_perm(int(sys.argv[1]), int(sys.argv[2]) - 1) print perm if __name__ == '__main__': main() Now if I run, eg. for i in \$(seq 1 6); do ./permutations.py 3 \$i; done The output is: [1, 2, 3] [1, 3, 2] [2, 1, 3] [2, 3, 1] [3, 1, 2] [3, 2, 1] Here's one way to define such a bijection by recursion on $n$:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105300791785, "lm_q1q2_score": 0.8198411190193826, "lm_q2_score": 0.8397339716830605, "openwebmath_perplexity": 320.08912198677086, "openwebmath_score": 0.833767294883728, "tags": null, "url": "https://math.stackexchange.com/questions/840544/mapping-from-1-ldots-n-to-the-symmetric-group-s-n" }
harmonic-oscillator Title: Why is circular motion "simple harmonic" when there is no restoring force? While this question seems similar to Is uniform circular motion an SHM, the answers there appear to contradict Berg & Stork (2004). Berg & Stork first state that simple harmonic motion (SHM) requires a linear restoring force. And that's apparent with things like a pendulum or a mass on a spring. However, they then describe uniform circular motion as SHM even when there's no restoring force, e.g., a mathematical point moving uniformly in a circle. So is the restoring force not really a requirement for SHM? Is all that's needed to call it SHM the fact that you can describe its motion with a sine wave (which you can do for either x or y in uniform circular motion)? In the role of the "restoring force" there is the cartesian component of the centripetal force. The whole force causes the body to move in circle, the component causes the cartesian coordinate to change as sine function of time.
{ "domain": "physics.stackexchange", "id": 96113, "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": "harmonic-oscillator", "url": null }
quantum-state, measurement, textbook-and-exercises Also, the state post measurement is $|\psi_{post} \rangle = \dfrac{M|\psi\rangle}{\sqrt{3/4}}$. You can extend this to the case where the first qubit is mesured in the state $|1\rangle$ too. In this case, the projective measurement $M = |1\rangle \langle 1| \otimes I$
{ "domain": "quantumcomputing.stackexchange", "id": 2142, "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-state, measurement, textbook-and-exercises", "url": null }
sql, mysql ('Instrumental leasing (NAPH 3 or more)', 20, True, False), ('Graphic design (album sleeve)', 80, True, False), ('Graphic design (full CD & sleeve)', 150, True, False), ('Graphic design (full CD, sleeve & booklet)', 200, True, False), ('Graphic design (flyers)', 40, True, False), ('Graphic design (t-shirt)', 30, True, False), ('Graphic design (logo, sticker, small items)', 25, True, False), ('Rush uplift charge (Basic project)', 10, True, False), ('Rush uplift charge (Advanced project)', 20, True, False) ; -- Invoice Status types CREATE TABLE InvoiceStatus ( InvoiceStatusID INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (InvoiceStatusId), InvoiceStatus VARCHAR(30) ) ; INSERT INTO InvoiceStatus (InvoiceStatus) VALUES ('Open'), ('Paid'), ('Partially Paid'), ('Cancelled') ; -- Transaction types CREATE TABLE TransactionType ( TransactionTypeId INT NOT NULL AUTO_INCREMENT,
{ "domain": "codereview.stackexchange", "id": 8354, "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": "sql, mysql", "url": null }
rna, genomics Title: Number of introns in a genome Humans have approximately 21000 genes but they probably make more proteins than that. This has been explained by many mechanisms like alternative RNA splicing. My question is - If what we call as "introns" and "exons" vary so much, then how is the number of introns present in a genome determined ? Yes, the individual number of exons/introns will vary in a transcript, but what you can do is just count all possible exons of a gene For example, lets say you have an alternative exon in these two isoforms. The XX's are exons XX---XX---XX---XX XX--------XX---XX We would say this gene has 4 exons and 3 introns, even though one isoform only has 3 exons. Its the transcript that varies in number of exons, the gene remains constant. Heres a slightly more complex example. Mutually exclusive exons XX---XX--------XX XX--------XX---XX
{ "domain": "biology.stackexchange", "id": 1368, "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": "rna, genomics", "url": null }
# Binomial distribution : Tennis, anyone? I am trying to brush up my knowledge on probability in the library, and I found this question which got me stumped: Two tennis professionals, A and B, are scheduled to play a match; the winner is the first player to win three sets in a total that cannot exceed five sets. The event that A wins any one set is independent of the event that A wins any other, and the probability that A wins any one set is equal to .6. Let x equal the total number of sets in the match; that is, x = 3, 4, or 5. Find p(x). Here's my take: ## x=3 For the match to end in 3 rounds, I calculated the probability of A winning all three rounds and B winning all three rounds. $$p(x=3) = \binom{3}{3}(0.6^3)(0.4^{0}) + \binom{3}{0}(0.6^0)(0.4^{3}) = 0.2800$$ ## x=4
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9840936110872273, "lm_q1q2_score": 0.8091110768834476, "lm_q2_score": 0.8221891370573386, "openwebmath_perplexity": 181.33395836731611, "openwebmath_score": 0.8162689208984375, "tags": null, "url": "https://math.stackexchange.com/questions/2218963/binomial-distribution-tennis-anyone" }
machine-learning, machine-learning-model, data-science-model In based classifiers as well u can see this. Check class_weight section DT_Classifier. This by default considers it as None i.e all classes have same weightage. There are some other ways to deal with this issue,
{ "domain": "datascience.stackexchange", "id": 11241, "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": "machine-learning, machine-learning-model, data-science-model", "url": null }
molecular-biology, mrna Title: Use of different biotinylated GTP compounds in molecular biology In the Cappable-seq technique 3′-Desthiobiotin-GTP can be used to label the 5′ end of mRNA. However in a commercial technical article on biotinylated-RNA affinity probes I encountered the following biotinylated cap, in which the biotin affinity tag is attached to the 2′-position of the ribose at the 5′ end of the dinucleotide.
{ "domain": "biology.stackexchange", "id": 11860, "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": "molecular-biology, mrna", "url": null }
php, drupal $queryStatement = "SELECT COUNT(`id`) as `HashNumCount` FROM $tbl WHERE `unique_hash` LIKE :unique_hash;"; $args = [ ':unique_hash' => $hash, ]; try { $query = $this->db->query($queryStatement, $args); $result = $query->fetchAssoc(); } catch (\Exception $ex) { \Drupal::logger('SearchesSaved Class')->error('dbIsHashUsed() Exception: ' . $ex->getMessage()); } if ($result) { $numTimesUsed = $result['HashNumCount']; if ($numTimesUsed > 0) { return true; } else { return false; } } else { return false; } }
{ "domain": "codereview.stackexchange", "id": 33849, "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, drupal", "url": null }
java, thread-safety, callback, synchronization try { Class<? extends EventListener> eventListenerClass = listener.getClass(); Method[] classMethods = eventListenerClass.getDeclaredMethods(); for (int i = 0; i < classMethods.length; i++) { Method method = classMethods[i]; if (method.getParameterCount() != 1) continue; EventHandler[] methodAnnotations = method.getDeclaredAnnotationsByType(EventHandler.class); if (methodAnnotations.length == 0) continue; EventHandler eventHandlerAnnotation = methodAnnotations[0]; EventPriority priority = eventHandlerAnnotation.value(); Class<? extends Event> eventClass = (Class<? extends Event>) method.getParameterTypes()[0]; PrioritizedEvents.addRegisteredEvent(new RegisteredEvent(listener, method, eventClass, priority)); } } catch (Exception e) { e.printStackTrace(); }
{ "domain": "codereview.stackexchange", "id": 12426, "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, thread-safety, callback, synchronization", "url": null }
thermodynamics $$u_1 - u_2 = c (T_2 - T_1)$$ Where $u$ is the specific internal energy (ie: kJ/kmol). They call it a molar specific internal energy. Thus, the units for specific heat should be $\frac{[kJ]}{[kmol \cdot K]}$. Are these two valid definitions for specific heat? How can I tell which one is of interest ? Specific values are those normalized to the amount of material (mass in kg or quantity in moles) and are thus useful as material properties. "Specific heat" typically means the heat capacity normalized to the mass, but if "molar" is specified, it means the heat capacity normalized to the number of moles ("molar heat capacity" is also used for the latter). One can easily convert from one to the other for a certain material (e.g., the molar mass of air is 0.02897 kg/mol).
{ "domain": "physics.stackexchange", "id": 82284, "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", "url": null }
pl.programming-languages, type-theory, type-systems Title: Completeness of Constraint Typing (type inference) question regarding $\sigma'$ The theorem of completeness of type inference states the following: Suppose $\Gamma \vdash t:S| _{\mathcal{X}}C$, In other words, I have some term "t" whose type is "S" under the assumptions in Gamma, assuming the constraints "C" is met. The "x" denotes that we assign the typed variable "x" to this inference. And sigma is a mapping of type variables to types. If: $\sigma(\Gamma)\vdash \sigma(t) : T$, and When assume a mapping that Gamma has some t whose type is "T". When we apply sigma to that Gamma, our assumptions are still valid $dom(\sigma)\cap\mathcal{X} = \emptyset$ We want the domain of the type mappings to be disjoint from our type variables. then there is some solution: $(\sigma', T)= T$ and The tuple (sigma', T) is equivalent to T $\sigma'\backslash\mathcal{X}=\sigma$ sigma' set minus type variables will be equal to sigma
{ "domain": "cstheory.stackexchange", "id": 4023, "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": "pl.programming-languages, type-theory, type-systems", "url": null }
homework-and-exercises, lagrangian-formalism, field-theory, variational-calculus Title: Calculation in field theory I am little bit rusty in field theoretical calculations. I am reading the book by Altland Condensed matter field theory 2nd ed. On page 15, he derives the funcional derivative of the action: $$ S[\phi+\epsilon\theta] - S[\phi] = \int_Md^mx(\mathcal{L}(\phi+\epsilon\theta, \partial_\mu\phi+\epsilon\partial_\mu\theta - \mathcal{L}(\phi,\partial_\mu\phi))\\ \stackrel{?}{=} \int_M d^mx \left[\frac{\partial\mathcal{L}}{\partial\phi^i}\theta^i + \frac{\partial\mathcal{L}}{\partial\partial_\mu\phi^i}\partial_\mu\theta^i \right]\epsilon + \mathcal{O}(\epsilon^2). $$ Naturally, my question is how to obtain the second equality. We're just Taylor expanding $\mathcal L$. Hopefully you agree that $$ f(x+\delta x, y+\delta y)=f(x,y)+\frac{\partial f}{\partial x}\delta x+\frac{\partial f}{\partial y}\delta y + \ ... $$ Similarly, we have $$
{ "domain": "physics.stackexchange", "id": 43042, "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, lagrangian-formalism, field-theory, variational-calculus", "url": null }
gazebo Title: How to use for loop in launch file in gazebo? How can implement for loop concept in gazebo to spawn multiple robot model? For example: <include file="$(find manycar)/launch/azcar.launch"> <arg name="robot_num" value="1"/> <arg name="init_pose" value="-x 1 -y 1 -z 0 -Y 1.57 "/> </include> I want to iterate above code n times, variable being robot_num's value. How should I do that? Originally posted by rahul on Gazebo Answers with karma: 53 on 2015-12-25 Post score: 1 Maybe you could use embedded ruby the same way it can be used for SDF. See this SDF example where wheels are generated in a for loop for a cart. Originally posted by chapulina with karma: 7504 on 2015-12-25 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 3843, "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": "gazebo", "url": null }
ros, rospy, pocketsphinx, roscpp Originally posted by joq with karma: 25443 on 2011-12-17 This answer was ACCEPTED on the original site Post score: 2 Original comments Comment by madmax on 2011-12-17: I see, thank you for the explanation! Comment by joq on 2011-12-17: You can return a result message from a simple service. Actionlib provides more sophisticated features, such as cancelling or preempting an earlier request. Comment by madmax on 2011-12-17: So, actionlib when I want to have feedback?
{ "domain": "robotics.stackexchange", "id": 7675, "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, rospy, pocketsphinx, roscpp", "url": null }
$\notag AX - XB = C, \quad A \in \mathbb{C}^{m\times m}, \; B \in \mathbb{C}^{n\times n}, \; C \in \mathbb{C}^{m\times n}.$ This equation is the $(1,2)$ block of the equation $\notag \begin{bmatrix} A & -C \\ 0 & B \end{bmatrix} = \begin{bmatrix} I_m & X \\ 0 & I_n \end{bmatrix} \begin{bmatrix} A & 0 \\ 0 & B \end{bmatrix} \begin{bmatrix} I_m & X \\ 0 & I_n \end{bmatrix}^{-1}.$ If $\mathrm{sign}(A) = I$ and $\mathrm{sign}(B) = -I$ then $\notag \mathrm{sign} \left( \begin{bmatrix} A & -C \\ 0 & -B \end{bmatrix} \right) = \begin{bmatrix} I_m & X \\ 0 & I_n \end{bmatrix} \begin{bmatrix} I_m & 0 \\ 0 & -I_n \end{bmatrix} \begin{bmatrix} I_m & -X \\ 0 & I_n \end{bmatrix} = \begin{bmatrix} I_m & -2X \\ 0 & -I_n \end{bmatrix},$
{ "domain": "nhigham.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787827157819, "lm_q1q2_score": 0.8138913230048442, "lm_q2_score": 0.824461928533133, "openwebmath_perplexity": 232.0640899068836, "openwebmath_score": 0.9777094125747681, "tags": null, "url": "https://nhigham.com/blog/" }
java (Fighter: 3+2) as index 0: (49760 wins, 0 draws, 30240 losses (62,20 %)) vs. (Fighter: 9+0): 3315 wins, 0 draws, 6685 losses (33,15 %) vs. (Fighter: 4+0): 7451 wins, 0 draws, 2549 losses (74,51 %) vs. (Fighter: 5+0): 5925 wins, 0 draws, 4075 losses (59,25 %) vs. (Fighter: 1+0): 10000 wins, 0 draws, 0 losses (100,00 %) vs. (Fighter: 7+0): 4306 wins, 0 draws, 5694 losses (43,06 %) vs. (Fighter: 6+0): 4995 wins, 0 draws, 5005 losses (49,95 %) vs. (Fighter: 8+0): 3768 wins, 0 draws, 6232 losses (37,68 %) vs. (Fighter: 2+0): 10000 wins, 0 draws, 0 losses (100,00 %)
{ "domain": "codereview.stackexchange", "id": 28193, "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", "url": null }
4. ## Re: Square Root = Two Answers Originally Posted by harpazo Why does the sqrt{-1} = i? Why does i^2 = -1? The imaginary unit "i" is defined as $\displaystyle i^2 = -1$ so there is nothing to derive. -Dan 5. ## Re: Square Root = Two Answers Originally Posted by harpazo Ok. Now, the sqrt{-4} = -2i and 2i. The solution set is {-2i, 2i}. Why does the sqrt{-1} = i? Why does i^2 = -1? @harpazo, if you understand the use of definitions & axioms in mathematics this should help. The equation $x^2+1=0$ has no solutions in the system of real numbers because $x^2\ge 0$ for all real numbers $x$. So we postulate the existence, the addition, of one new number $\bf\mathit{i}$ the is a solution for $x^2+1=0$. That leads to the conclusion that $\bf\mathit{i~}^2=-1$. Moreover also that $-\bf\mathit{i}$ is also a solution for $x^2+1=0$ 6. ## Re: Square Root = Two Answers
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9871787830929848, "lm_q1q2_score": 0.8467704794440939, "lm_q2_score": 0.8577681104440172, "openwebmath_perplexity": 358.09629712428006, "openwebmath_score": 0.9164283275604248, "tags": null, "url": "http://mathhelpforum.com/math-topics/282260-square-root-two-answers.html" }
beginner, c, ascii-art, fractals, c99 I'm not convinced that ensure_allocation() should be part of the interface of "helpers.h" - it could equally be a static-linkage function in the implementation. I'm surprised you're rolling your own complex number type rather than using the standard complex numbers introduced by C99. new_complex() and copy_complex() are inconsistent in their approach: the former uses set_complex() to assign to the members, but the latter assigns directly. Both styles work, but it's easier to read if they're consistent. Alternatively, implement copy in terms of new: Complex copy_complex(Complex src) { return new_complex(src.real, src.imaginary); } Consider, though: Complex copy_complex(Complex src) { return src; }
{ "domain": "codereview.stackexchange", "id": 35949, "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, ascii-art, fractals, c99", "url": null }
frequency-domain, math, detection, envelope, amplitude-modulation \begin{align} |x| &= x\cdot \sgn(x)\\ \implies\\ |r(t)|&=r(t)\cdot \sgn(r(t))\\ &= r(t)\cdot \underbrace{\sgn(\sin(2\pi ft))}_{:=w(t)} \end{align} This introduces us to a new function $w(t)$, which is always positive one when the carrier wave is, and negative when the carrier is negative. A square wave with the same frequency as the carrier! Thus, knowing that the square wave has a Fourier series representation $w_f(t)= \frac{4}{\pi} \sum\limits_{k\in\{1,3,5,\ldots\}} \frac{\sin\left(2\pi k ft\right)}k $ \begin{align} |x| &= r(t)\cdot w(t) \\ &= r(t) \cdot \frac{4}{\pi} \sum\limits_{k\in\{1,3,5,\ldots\}} \frac{\sin\left(2\pi k ft\right)}k\\ &= \frac{4}{\pi} s(t) \sin(2\pi f t) \sum\limits_{k\in\{1,3,5,\ldots\}} \frac{\sin\left(2\pi k ft\right)}k\\ &= \frac4\pi s(t){\left[ \frac11\underbrace{\sin(2\pi f t)\sin(2\pi \,1f\, t)}_ {=\frac12(\cos(2\pi (f-f)t)-\cos(2\pi(f+f)t))} + \frac13\underbrace{\sin(2\pi f t) \sin(2\pi \,3f\, t)}_
{ "domain": "dsp.stackexchange", "id": 8288, "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": "frequency-domain, math, detection, envelope, amplitude-modulation", "url": null }
quantum-mechanics, condensed-matter, gauge-theory, research-level, topological-order Title: Perturbative Results Kitaev Model with Magnetic Field I am curious if there are results available for the Kitaev model with a magnetic field -- in his 2006 paper, Kitaev obtains the form of the effective hamiltonian (Eq. 46 in https://arxiv.org/abs/cond-mat/0506438), however does not give the precise prefactors. Also wondering about the 2nd order contribution (which is proportional to the identity) -- I just would like to see what would be the correct counting. Thanks! Yes, the precise result can be found in Eq. (30) of our paper arXiv:1109.4155: $$\kappa = \frac{h_xh_yh_z}{8 u_0^2 J^2},$$
{ "domain": "physics.stackexchange", "id": 39464, "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, condensed-matter, gauge-theory, research-level, topological-order", "url": null }
python, python-3.x, iterator, lazy def isplit(iterable, sep): """Generate the contiguous groups of items from the iterable that are not equal to sep. The returned groups are themselves iterators that share the underlying iterable with isplit(). Because the source is shared, when the isplit() object is advanced, the previous group is no longer visible. So, if that data is needed later, it should be stored as a list. """ for key, group in groupby(iterable, sep.__ne__): if key: yield group
{ "domain": "codereview.stackexchange", "id": 29532, "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, python-3.x, iterator, lazy", "url": null }
javascript, api, vue.js const musicApp = { data() { return { player: new Audio(), trackCount: 0, tracks: [], muted: false, autoAdvance: true, isPlaying: false, currentTime: 0 }; }, methods: { async getTracks() { try { const response = await axios .get( "https://api.napster.com/v2.1/tracks/top?apikey=ZTk2YjY4MjMtMDAzYy00MTg4LWE2MjYtZDIzNjJmMmM0YTdm" ) .catch((error) => { console.log(error); }); this.tracks = response; this.tracks = response.data.tracks; } catch (error) { console.log(error); } }, nextTrack() { if (this.trackCount < this.tracks.length - 1) { this.trackCount++; this.setPlayerSource(); this.playPause(); } }, prevTrack() { if (this.trackCount >= 1) { this.trackCount--; this.setPlayerSource(); this.playPause(); } },
{ "domain": "codereview.stackexchange", "id": 42608, "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, api, vue.js", "url": null }
c# [TestMethod] public void ForwardNxorOperationTest() { Assert.AreEqual(LogicValue.Unknown, LogicOperationUtilities.ForwardNxorOperation(LogicValue.Unknown, LogicValue.Unknown)); Assert.AreEqual(LogicValue.Unknown, LogicOperationUtilities.ForwardNxorOperation(LogicValue.Unknown, LogicValue.False)); Assert.AreEqual(LogicValue.Unknown, LogicOperationUtilities.ForwardNxorOperation(LogicValue.Unknown, LogicValue.True)); Assert.AreEqual(LogicValue.Unknown, LogicOperationUtilities.ForwardNxorOperation(LogicValue.False, LogicValue.Unknown)); Assert.AreEqual(LogicValue.True, LogicOperationUtilities.ForwardNxorOperation(LogicValue.False, LogicValue.False)); Assert.AreEqual(LogicValue.False, LogicOperationUtilities.ForwardNxorOperation(LogicValue.False, LogicValue.True)); Assert.AreEqual(LogicValue.Unknown, LogicOperationUtilities.ForwardNxorOperation(LogicValue.True, LogicValue.Unknown));
{ "domain": "codereview.stackexchange", "id": 16903, "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 }
spacetime, relativity, tensor-calculus, metric-tensor {\bf b}_i\mapsto\beta^i $$ The problem is that this is not a canonical isomorphism, ie it depends on the choice of basis: Use a different one, and you'll generally end up with a different dual vector. So we need another way to specify an isomorphism. Using a non-degenerate bilinear form like the metric tensor to 'lower' indices is such a mapping from vectors to dual vectors, which by definition comes with an inverse ('raising' indices).
{ "domain": "physics.stackexchange", "id": 66186, "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": "spacetime, relativity, tensor-calculus, metric-tensor", "url": null }
What property of metric space you can use to prove that? 2) d(a,b) is the least upper bound. You can prove that $\exists x\in X, |f_a(x) - f_b(x)| = d(a,b)$ Can you choose an x satisfies above? - $|f_a(x)-f_b(x)|=|d(x,a)-d(x,b)|$; clearly this is $d(a,b)$ when $x=b$. Suppose that there is some $x\in X$ such that $|d(x,a)-d(x,b)|>d(a,b)$; then either $d(x,a)-d(x,b)>d(a,b)$ or $d(x,b)-d(x,a)>d(a,b)$. Without loss of generality assume that $d(x,a)-d(x,b)>d(a,b)$. Then $d(x,a)>d(x,b)+d(b,a)$, contradicting the triangle inequality. Thus, $|f_a(x)-f_b(x)|\le d(a,b)$ for all $x\in X$, with equality when $x=b$, and the result is immediate. -
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232902330122, "lm_q1q2_score": 0.8211326828975057, "lm_q2_score": 0.8354835411997897, "openwebmath_perplexity": 93.83334052090537, "openwebmath_score": 0.958175003528595, "tags": null, "url": "http://math.stackexchange.com/questions/133081/functions-in-a-metric-space" }
python, algorithm, python-3.x, ai, connect-four More details ✔ Default PYLINT limit of 100 characters. ✘ The usual limit of 79 characters. (Do I really have to?) ✔ PYLINT shows no warnings ✘ PYLINT reports notices, saying too many return statements and branches(???) ✔ Module, class, function docstrings included. ✘ They're awful. (Recently saw Google's recommendation for python docstrings) ✔ Code is commented, outlining much of the code. ✘ Sometimes comments are sparse, or hard to understand. (I'm unsure whether my comments are acceptable, as sometimes I see very well commented code.) (Make recommendations on what you feel is necessary, and preferably also on the above points.) Other notes. I made this program to try to make a Monte Carlo Tree Search implementation for Python, and the game is just there for you to have a bit of fun with, hence why it's not really that great. There's a bunch of stuff to dislike about your code:
{ "domain": "codereview.stackexchange", "id": 28594, "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, algorithm, python-3.x, ai, connect-four", "url": null }
First, we prove the $\subseteq$ side, i.e. $Y \cap (Z+X) \subseteq X + (Y \cap Z)$: Take any $a \in Y \cap (Z+X)$. That means $a$ is in both $Y$ and $(Z+X)$. The question is: is $a \in X$? • if $a \in X$, that means that it certainly is in $X+(Y\cap Z)$. • if $a\notin X$, then it must be in $Z$ (since it is in $Z+X$). Thus, $a$ is in both $Y$ and $Z$, which means it is in $Y\cap Z$ and therefore it is also in $X+(Y\cap Z)$. Second, prove that $X+(Y\cap Z) \subseteq Y\cap (Z+X)$: Take any $a \in X+(Y\cap Z)$. Then, $a$ is either in $X$ or in the intersection $Y\cap Z$. Since $X$ is a subset of $Y$, we have that $a$ must be in $Y$. Now, the same question: is $a\in X$? • if $a\in X$, it is also in $Z+X$ and we are done. • if $a \notin X$, it must be in $Y\cap Z$, which means it certainly is in $Y\cap (Z+X)$. $\Box$ A collection of hints: Hint: $X + Y = Y$ General hint: if you try to show $A \subset B$ then take a generic element $a \in A$ and show $a \in B$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9719924777713886, "lm_q1q2_score": 0.8057222882749894, "lm_q2_score": 0.8289388104343892, "openwebmath_perplexity": 99.46040801657284, "openwebmath_score": 0.9566383361816406, "tags": null, "url": "https://math.stackexchange.com/questions/919270/let-x-y-z-be-subspaces-of-v-so-that-x-is-a-subspace-of-y-prove-that-y" }
it.information-theory, coding-theory, st.statistics $$ d\left(x^{n}, \hat{x}^{n}\right)=\frac{1}{n} \sum_{i=1}^{n} d\left(x_{i}, \hat{x}_{i}\right) $$ And distortion for a $\left(2^{n R}, n\right)$ code: $$ D=E d\left(X^{n}, g_{n}\left(f_{n}\left(X^{n}\right)\right)\right)=\sum_{x^{n}} p\left(x^{n}\right) d\left(x^{n}, g_{n}\left(f_{n}\left(x^{n}\right)\right)\right) $$
{ "domain": "cstheory.stackexchange", "id": 4905, "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": "it.information-theory, coding-theory, st.statistics", "url": null }
newtonian-mechanics, forces, classical-mechanics, momentum, energy-conservation Title: With two balls connected to a string find minimum upward velocity that can be given to one of the balls such that the other leaves the ground The exact question is given below: Two identical small balls A and B each of mass m connected by a light inextensible cord of length l are placed on a frictionless horizontal floor. With what velocity u must the ball B be projected vertically upwards so that the ball A leaves the floor? Acceleration of free fall is g. $$Answer: u \ge \sqrt{3gl} $$
{ "domain": "physics.stackexchange", "id": 85320, "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, classical-mechanics, momentum, energy-conservation", "url": null }
5. Check that each element of $H$ generates a subgroup of $H$ of order less than $4$. Remember what this means: an element $x$ of a group generates a cyclic subgroup consisting of all the powers of $x$: $\ldots, x^{-2}, x^{-1}, e, x, x^2, \ldots$ If $x$ has finite order $n$, then there will only be finitely many elements in this list, and in fact $\{e, x, \ldots, x^{n - 1}\}$ is the complete list of distinct elements of the subgroup generated by $x$. If you haven't proved this, then you should! Thus $a$ generates a subgroup of order $2$, and so on.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9783846684978779, "lm_q1q2_score": 0.815312011985393, "lm_q2_score": 0.8333245994514084, "openwebmath_perplexity": 111.26720329261789, "openwebmath_score": 0.8854143023490906, "tags": null, "url": "http://math.stackexchange.com/questions/92345/elements-of-order-2-in-an-abelian-group-generating-a-non-cyclic-subgroup" }
matlab, fft, fourier-transform, frequency-spectrum, frequency Title: How to Flip Spectrum Around DC? Is it possible to flip a signal's spectrum around DC? I have a simple spectrum that I made up (MATLAB code): spectrum = [-1+4i 0+3i 1+2i 2+1i 3+0i 4-1i 5-2i 6-3i 7-4i 8-5i] timeDomain = ifft(spectrum); I looked on this website (http://www.dsprelated.com/showarticle/51.php) and the given proof states this can be done in 3 ways: Invert the Q channel (14) Swap the I and Q channels (15) Invert the I channel (16) I tried those 3 ways on my signal: 1) Invert the Q channel negQtd = real(timeDomain) - 1j * imag(timeDomain); negQSpec = fft(negQtd) Output: [-1-4i 8+5i 7+4i 6+3i 5+2i 4+1i 3+0i 2-1i 1-2i 0-3i] 2) Swap the I and Q channels swapTD = imag(timeDomain) + 1j * real(timeDomain); swapSpec = fft(swapTD) Output: [4-1i -5+8i -4+7i -3+6i -2+5i -1+4i -0+3i 1+2i 2+1i 3+0i] 3) Invert the I channel negItd = -1 * real(timeDomain) + 1j * imag(timeDomain); negISpec = fft(negItd)
{ "domain": "dsp.stackexchange", "id": 2980, "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": "matlab, fft, fourier-transform, frequency-spectrum, frequency", "url": null }
In comments, Will Jagy noted that the density of numbers which are sums of two squares is of the shape $Cx/\sqrt{\log x}$, where $C$ is the Landau-Ramanujan constant. It is conjectured that the gaps between numbers which are sums of squares shouldn't deviate too far from what is expected from the density, and in particular is bounded by $x^\epsilon$ for any $\epsilon > 0$. In particular it is conjectured that there is a number which is a sum of two squares in the interval $[x, x + x^{\epsilon})$ for any $\epsilon > 0$, for $x$ sufficiently large. This answer shows that the gap between numbers which are sums of squares is at most $2^{3/2}x^{1/4}$, which is a far cry from $x^{\epsilon}$. In general, there are not good uniform improvements over what's presented above. But there are remarkable on-average bounds due to Hooley, showing for instance that almost all (in the density sense) gaps between sums of squares is no more than $(\log x) (\log \log x)$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.985718068592224, "lm_q1q2_score": 0.8598885742162704, "lm_q2_score": 0.8723473796562744, "openwebmath_perplexity": 110.03396638452213, "openwebmath_score": 0.91339111328125, "tags": null, "url": "https://math.stackexchange.com/questions/2376879/does-the-interval-x-x-10-x1-4-contain-a-sum-of-two-squares" }
swift, ios @@IBAction func upgradeClicker(_ sender: UIButton) { guard cookies < cookieUpgradeCost else { return } cookiesAClick += 1 ... } You have three different views in formatItems that are styled the same way so it will be easier to maintain (and less code) to just separate the styling. I would add it in extension of UIView extension UIView { func addBorder() { layer.borderWidth = 1 layer.cornerRadius = 5 layer.borderColor = UIColor.black.cgColor } and in private func formatItems() you will only have: private func formatItems() { upgradeButton.addBorder() cookieButton.addBorder() numberOfCookies.addBorder() //Set main cookie to bold mainCookie.font = UIFont.boldSystemFont(ofSize: 35.0) } Naming conventions are a bit optional since most of the companies have their own (or don't have at all) but you can find some official style guides
{ "domain": "codereview.stackexchange", "id": 35500, "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": "swift, ios", "url": null }
ros2, ros-bouncy return launch.LaunchDescription([ included_launch, regular_node, ]) Originally posted by lucasw on ROS Answers with karma: 8729 on 2018-10-28 Post score: 3 Original comments Comment by William on 2019-01-17: Yes, that should work. UPDATE by @130s: 4+ years later, there's an official tutorial (docs.ros.org/en/rolling) made that lays out what this answer is explaining. This works but I don't see a way to get arguments in: from ament_index_python.packages import get_package_share_directory ... foo_dir = get_package_share_directory('foo') included_launch = launch.actions.IncludeLaunchDescription( launch.launch_description_sources.PythonLaunchDescriptionSource( foo_dir + '/launch/my_launch.py')) ... return launch.LaunchDescription([ included_launch, regular_node, ])
{ "domain": "robotics.stackexchange", "id": 31971, "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": "ros2, ros-bouncy", "url": null }
special-relativity, inertial-frames, group-theory, mathematics -\gamma v_z & (\gamma-1){v_xv_x\over v^2} & (\gamma-1){v_yv_z\over v^2} & 1+(\gamma-1){v_z^2\over v^2}\\ \end{pmatrix}, $$ such that for any 4-vector $x$, the same vector as observed by the moving observer is given by $Lx$. ($\gamma = 1/\sqrt{1-\mathbf v^2}$.) Now, many resources (like the accepted answer in this former SE post of mine) define a Lorentz transformation matrix (still origin fixed) to be any matrix $\Lambda$, satisfying $\Lambda^T\eta\Lambda = \eta$, for the Minkowski metric $\eta$. I've proved that this is a necessary and sufficient condition for leaving the inner products invariant. But, corresponding to any such $\Lambda$, does there exist an $L$ of the form above? No, the Lorentz group contains all rotations, boosts, and compositions of rotations and boosts. What you have written is the most general form for a boost. However, a pure rotation, like \begin{equation} \begin{pmatrix} 1 & 0 & 0 & 0 \\ 0 & \cos \theta & 0 & \sin \theta \\ 0 & 0 & 1 & 0 \\
{ "domain": "physics.stackexchange", "id": 69259, "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": "special-relativity, inertial-frames, group-theory, mathematics", "url": null }
performance, sql, sql-server, xml, xpath select M.X.value('(MaterialName/text())[1]', 'nvarchar(4000)') as PartNumber, A.X.value('(Name/text())[1]', 'nvarchar(4000)') as NodeName, A.X.value('(Value/text())[1]', 'nvarchar(4000)') as Value from C.BomDataChange.nodes('/TopBomComponents/TopBomComponents/TopBomComponent/BomMaterials/BomMaterial') as M(X) cross apply M.X.nodes('BomMaterialAttributes/CustomBomMaterialAttributes/CustomBomMaterialAttribute') as A(X) ) as N on O.PartNumber = N.PartNumber and O.NodeName = N.NodeName where O.Value <> N.Value ) as T;
{ "domain": "codereview.stackexchange", "id": 22017, "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, sql, sql-server, xml, xpath", "url": null }
graphs QED Some consequences: Let a digraph $G$ be Weakly Connected if the undirected counterpart is connected; define Weakly Connected Components analogously. Any interleaving of the topological orderings of two weakly connected components is a topological ordering of their union. In particular, one can put the entire ordering of one component immediately before or after a given vertex in the other component, so no vertex can be fixed-index (so long as both components are non-empty). Corollary: a DAG with a fixed-index vertex is weakly connected. A more direct and constructive proof: $path(s, v) + path(v, t) = path(s, t)$ where the precise definition of $path$ and $+$ is left as an exercise ;-)
{ "domain": "cs.stackexchange", "id": 8537, "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": "graphs", "url": null }
machine-learning, deep-learning, keras from keras.models import Sequential from keras.layers import Dense from keras.initializers import Constant, Zeros, Ones from keras.metrics import mean_squared_error import matplotlib.pyplot as plt import numpy as np def getData(): n = 200 X = np.random.randn(n, 2) Y = 20 * X[:,0] + 10 * X[:,1] + 100 return X, Y def getModel(bias): m = Sequential() m.add(Dense(1, input_shape=(2,), bias_initializer=bias)) m.compile('adam', loss='mse') return m X, Y = getData() constants = [0, 1, 10, 50, 100, 150, 200] loss_at_start = [] loss_at_end = [] for c in constants: m = getModel(Constant(c)) m.fit(X,Y, epochs=20, validation_split=0.2, validation_steps=20, steps_per_epoch=1000) loss_at_start.append(m.history.history['loss'][0]) loss_at_end.append(m.history.history['loss'][-1])
{ "domain": "datascience.stackexchange", "id": 5036, "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": "machine-learning, deep-learning, keras", "url": null }
string-theory, research-level, supersymmetry, conformal-field-theory, group-representations Such a chiral CFT, if we use the lattice construction, needs an even self-dual lattice of rank 16. There are only two such lattices, corresponding to the two already mentioned above. We can replace the lattice construction with free fermion construction, and we still get the same result. But mathematically speaking, there might still be a chiral CFT of central charge 16, with the correct property, right? Is it studied anywhere? There are plenty of chiral CFTs with central charge 16 and nice properties studied in the mathematics literature. A nice example in this context would be chiral differential operators on a 8-manifold. If you want modularity of the character so that you want a holomorphic vertex algebra then the reference is "Holomorphic vertex operator algebras of small central charge" Dong and Mason. Pacific Journal of Mathematics. Vol 213 (2) 2004. as discussed in the comments and in Lubos' answer.
{ "domain": "physics.stackexchange", "id": 3280, "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": "string-theory, research-level, supersymmetry, conformal-field-theory, group-representations", "url": null }
navigation, odometry The basic check I use for odometry is to have rviz accumulate laser scans in the odometric frame, and verify visually that they're coherent. Set the Fixed Frame to odom (or whatever the name of your odometric frame is) and turn up the decay time on the laser scans (e.g., to 600 seconds). Drive the robot around, and see what happens with the accumulated laser scans. If the odometry is reasonable, you'll see a crude "map" being built. It should be obvious immediately whether there's something seriously wrong.
{ "domain": "robotics.stackexchange", "id": 5125, "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": "navigation, odometry", "url": null }
homework-and-exercises, newtonian-mechanics, forces, drag, free-body-diagram Title: A question on Newton's laws of motion A force of $50N$ is required to push a car on a level road with constant velocity of $10m/s$. The mass of the car is $500kg$. What force should be applied to make the car accelerate at $1m/s^2$? I though that $F=ma=(500)(1)=500N$. But the answer happens to be 550N, also I don't know why the constant velocity was provided. The $50 \text{ N}$ extra is what is being used to overcome whatever losses (friction, air resistance, etc.) to keep the car at a constant velocity. Its stated in the first sentence of your problem. You have: $F_{tot} = F_{app} - F_{loss}$ Initially, $F_{tot} = 0$, and $F_{app} = \text{50 N}$, so $F_{loss} = \text{50 N}$. Assuming the increase in acceleration doesn't introduce any new loss, you are correct that you need to apply $\text{500 N}$ of force, for the total force. To overcome the losses, you need $\text{50 N}$ of additional force. Hence, the force applied is $\text{550 N}$
{ "domain": "physics.stackexchange", "id": 25776, "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, drag, free-body-diagram", "url": null }
CAST RULE: since cosx is negative, the angle is in quadrants two and three: pi-2.09=1.05 pi+2.09=5.23 So we have 1.57, 4.71, 1.05, 5.23 ------------------------------------- However when I check my answer on mathway, it shows the solutions as: 1.57 (correct) 4.71 (correct) 2.09 (?) 4.19 (?) I don't understand why my calculations for the second zero are wrong. If I use quadrants ONE and FOUR (where cosx should be positive), I get 2.09 and 4.19, which is what mathway shows as the correct answers. Can someone tell me where I'm going wrong here? The second zero calculates to cosx=(-1/2), and cosx is negative in quadrants two and three, not one and four ... I don't see my error. 2. Hello, Jeev! Welcome aboard! $2\cos^2\!x+\cos x\:=\:0$ Solve for the domain $(0,\:2\pi)$ to nearest hundredth of a radian. Factor: . $\cos x(2\cos x + 1) \:=\:0$
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9724147209709196, "lm_q1q2_score": 0.8341063289360622, "lm_q2_score": 0.8577681013541613, "openwebmath_perplexity": 847.2976707364236, "openwebmath_score": 0.9220483303070068, "tags": null, "url": "http://mathhelpforum.com/trigonometry/51739-trig-problem-where-am-i-going-wrong.html" }
c++, inheritance However, I want to use the same class type to access those objects. I don't see a reason for that in your example usage. But if you do need to pass something like a pointer to Base along, consider that you don't need inheritance; you can have a separate class that stores a pointer to the array and a size, like std::span for arrays, or std::string_view for strings in particular. Here is an example using std::span that matches your example: #include <array> #include <cstring> #include <iostream> #include <span> void printFoo(std::span<char> base) { std::cout << base.data() << "\nSize is " << base.size() << '\n'; } int main() { std::array<char, 20> foo; strcpy(foo.data(), "Hello world"); printFoo(foo); } If you cannot use std::array and/or std::span on your embedded system, I recommend you try to implement them yourself. Your code already has parts of it, you just need some name changes and to not use the span as a base class for the array anymore.
{ "domain": "codereview.stackexchange", "id": 44110, "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++, inheritance", "url": null }
(sorry for my genetically fixed notation for azimuthal angles ) 3. Apr 25, 2015 ### uzman1243 So my method is valid? so $dS$ = N dr d ∅ 4. Apr 25, 2015 ### Zondrina By the divergence theorem: $$\iint_S \vec F \cdot d \vec S = \iiint_V \text{div}(\vec F) \space dV = \iiint_V 3z \space dV$$ The solid volume $V$ is the cylinder that sweeps the angle $0 \leq \theta \leq 2 \pi$, has radius 3, and height 4. So yes the answer would be $216 \pi$. The question wants you to do this problem a little bit differently though. You need to parametrize the cylinder like so: $$\vec r(\theta, z) = 3\text{cos}(\theta) \hat i + 3\text{sin}(\theta) \hat j + z \hat k$$ Then using this theorem: $$\iint_S \vec F \cdot d \vec S = \iint_D \vec F(\vec r(\theta, z)) \cdot (\vec r_{\theta} \times \vec r_z) \space dA$$ The integral can be evaluated to obtain the same result by using polar co-ordinates. 5. Apr 25, 2015 ### pasmith
{ "domain": "physicsforums.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9693241982893258, "lm_q1q2_score": 0.8180079494323838, "lm_q2_score": 0.8438951084436077, "openwebmath_perplexity": 1277.931259700832, "openwebmath_score": 0.8698258996009827, "tags": null, "url": "https://www.physicsforums.com/threads/using-divergence-theorem.810435/" }
ros, hokuyo-node, laser-assembler, laser-pipeline void scanCallback(const sensor_msgs::LaserScanConstPtr& laser_scan) { if (!ignore_laser_skew_) { ros::Duration cur_tolerance = ros::Duration(laser_scan->time_increment * laser_scan->ranges.size()); if (cur_tolerance > max_tolerance_) { ROS_DEBUG("Upping tf tolerance from [%.4fs] to [%.4fs]", max_tolerance_.toSec(), cur_tolerance.toSec()); assert(tf_filter_); tf_filter_->setTolerance(cur_tolerance); max_tolerance_ = cur_tolerance; } tf_filter_->add(laser_scan); } } private: bool ignore_laser_skew_; laser_geometry::LaserProjection projector_; ros::Subscriber skew_scan_sub_; ros::Duration max_tolerance_; // The longest tolerance we've needed on a scan so far filters::FilterChain<sensor_msgs::LaserScan> filter_chain_; mutable sensor_msgs::LaserScan scan_filtered_; }; } using namespace laser_assembler ;
{ "domain": "robotics.stackexchange", "id": 6977, "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, hokuyo-node, laser-assembler, laser-pipeline", "url": null }
java, javascript, css, jsp /** * The data type of the column. */ public static final String TYPE = "TEXT NOT NULL"; } /** * The SQL statement for creating the note table. */ public static final String CREATE_STATEMENT = "CREATE TABLE IF NOT EXISTS " + TABLE_NAME + " (\n" + " " + ID_COLUMN.NAME + " " + ID_COLUMN.TYPE + ",\n" + " " + EDIT_TOKEN_COLUMN.NAME + " " + EDIT_TOKEN_COLUMN.TYPE + ",\n" + " " + TEXT_COLUMN.NAME + " " + TEXT_COLUMN.TYPE + ",\n" + " PRIMARY KEY(" + ID_COLUMN.NAME + "));"; } /** * Contains all the delete statements. */ public static final class DELETE {
{ "domain": "codereview.stackexchange", "id": 28645, "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, javascript, css, jsp", "url": null }
quantum-field-theory, gauge-theory, topology, duality However, neither of these allows me to compute the topological charge of a magnetic particle. So my question is: How can I conclude that the magnetic particle is a topological excitation? The 't Hooft operator creates a magnetic field which is a delta function smeared along the curve $C$. In this question here it was shown that a gauge transformation which is singular (i.e. multivalued) on a curve $C$ produces a magnetic field that is a delta function smeared along $C$. Therefore, the effect of the 't Hooft operator is to act with a singular gauge transformation of this kind. But such gauge transformations are classified by $\mathbb Z^{N-1}$ ($N$ being the number of colors), which counts the winding of the $(N-1)$ $U(1)$'s of the Cartan subgroup around the curve $C$. So such a singular gauge transformation is said to create a magnetic monopole with charge $m\in\mathbb Z^{N-1}$.
{ "domain": "physics.stackexchange", "id": 92932, "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-field-theory, gauge-theory, topology, duality", "url": null }
java, enum, factory-method private static final Logger SENSITIVE_LOGGER = SensitiveLoggerFactory.getSensitiveLogger(Source2.class); private String configChannel; private Class<? extends Source> clazz; private Source2(String configChannel, Class<? extends Source> clazz) { this.configChannel = configChannel; this.clazz = clazz; } public Class<? extends Source> getClazz() { return clazz; } public String getConfigChannel() { return configChannel; } public Source getSource() { return getAction(clazz); } private Source getAction(Class<? extends Source> source2Class) { try { return source2Class.newInstance(); } catch (InstantiationException | IllegalAccessException e) { SENSITIVE_LOGGER.warn("<< Exception occured during init of {}, returning unkown source.", source2Class); return new SourceUnkown(); } }
{ "domain": "codereview.stackexchange", "id": 36349, "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, enum, factory-method", "url": null }
python, python-3.x, file-system Title: Resolving Paths relative to script file, independent of calling location Idea Consider the following snippet: import inspect from pathlib import Path def path_relative_to_caller_file(*pathparts: str) -> Path: """Provides a new path as a combination of the caller's directory and a subpath. When creating a Path like Path("resources", "log.txt"), the containing Python script has to be called from within the directory where the subdirectory "resources" is found. Otherwise, the relative path breaks with an error. This function provides a new path to always assure those relative paths are found, no matter from where the script containing the relative path definition is called. Example: A/ └── B/ └── C/ ├── script.py └── D/ └── E/ └── config.txt
{ "domain": "codereview.stackexchange", "id": 38073, "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, python-3.x, file-system", "url": null }
conservation-laws, information, determinism at which point the wave function collapses and it is no longer possible to apply a unitary that will tell you what the state was before, deterministically. However, it should be noted that many-world interpreters who don’t believe that measurements are indeterministic don’t agree with this statement, they think that even measurements are deterministic in the grand scheme of quantum mechanics. To quote Scott Aronson:
{ "domain": "physics.stackexchange", "id": 59183, "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": "conservation-laws, information, determinism", "url": null }
java It has a scheduleWithFixedDelay method as well as scheduleAtFixedRate. Using one of these describes what's the developer's purpose. Currently its not completely obvious or explicit. It supports shutdown and awaitTermination. awaitTermination returns immediately when your task finishes, no need to wait complete seconds. awaitTermination returns false on timeout when you can call shutdownNow which interrupts the thread of the task. It does not need manual and error-prone synchronization (see the next point). newScheduledThreadPool can get a ThreadFactory. You can set a UncaughtExceptionHandler to handle uncatched exceptions with that factory. (See also this answer too.) Usage of isDaemonWorking is not thread-safe. It is used by the timer's thread (inside the TimerTask.run method) as well as the ServletContextListener. Without any synchronization you risk that threads will not see each other's modification.
{ "domain": "codereview.stackexchange", "id": 8663, "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", "url": null }
[]. Algorithm to check balanced parentheses: Step 1: Scan the given character expression from left to right. The infinite set of Strings of balanced parenthesis can be defined inductively as follows. If current character is '{', then push it inside stack. to consider them. Enter either the number of moles or weight for one of the compounds to compute the rest. Here's a quick solution to the balanced parentheses kata. We can use recursion to solve this problem. A smiley face ":)" or a frowny face ":(" Write a program that determines if there is a way to interpret his message while leaving the parentheses balanced. Each programming language mode has its own definition of a balanced expression. Where 32 is the code for a space character and 10 for newline. If you have a disability and are having trouble accessing information on this website or need materials in an alternate format, contact [email protected] I recently wanted to get a list of major landmarks, but the text list had the name
{ "domain": "concorsobabyliss.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9532750373915658, "lm_q1q2_score": 0.8315869872875561, "lm_q2_score": 0.8723473862936942, "openwebmath_perplexity": 1221.7287041669401, "openwebmath_score": 0.4182746708393097, "tags": null, "url": "http://plnw.concorsobabyliss.it/balanced-parentheses.html" }
discrete-signals, sampling, interpolation, zoh For $k=0$, e.g., $0≤t<h$ we get $f(t)=f(0)+\frac{t}{h}(f(h)−f(0))=δ(0)−\frac{t}{h}\delta(0)$. So we get $h_{\mathrm{FOH}}(t)\,= \begin{cases} \frac{t + h}{h} \delta(0) & \mbox{if } -h \leq t < 0 \\ \delta(0) - \frac{t}{h} \delta(0) & \mbox{if } 0 \leq t < h \\ 0 & \mbox{otherwise} \end{cases}$ what then follows, is that you have to "see" that this equals the formula with $\text{tri}$ function, as at the start of this message. clear all; close all; clc;
{ "domain": "dsp.stackexchange", "id": 8818, "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, sampling, interpolation, zoh", "url": null }
machine-learning, classification, scikit-learn, machine-learning-model, cross-validation Title: How can precision be less than one in Leave-One-Subject-Out binary classification if each subject contains only one class Say I'm trying to classify a medical condition. Theres only two classes: Sick and Healthy. I build a model and I can't split the data because I don't want data from the same patient being in training and test set. So I elect to use Leave-One-Subject-Out, training the model on all subject except one and testing on the left out subject. So for each test set I have one subject and they are either healthy or sick. So the confusion matrix only contains one class where precision is technically one every time and recall equals accuracy.
{ "domain": "datascience.stackexchange", "id": 9296, "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": "machine-learning, classification, scikit-learn, machine-learning-model, cross-validation", "url": null }
java, optimization, concurrency, netty } }catch(Exception e){ responseCode = 404; s_logger.log(Level.FATAL, "***** Could not Connect to Server ****"); s_logger.log(Level.FATAL, e); e.printStackTrace(); } } try{ if(activeChannel){ System.out.println("Sending to Server using Channel: " + i + " data: " + message); ChannelFuture future = ch.writeAndFlush(messageToSend); }else{ throw new Exception("Unable to connect to Server."); } }catch(Exception e){ responseCode = 404; s_logger.log(Level.FATAL, "***** Could not Connect to Server ****"); s_logger.log(Level.FATAL, e); e.printStackTrace(); } synchronized(this){ for (int j = 0; j < Config.getMaxConnections(); j++) { if (ch == channels[j]) { if (used[j]) {
{ "domain": "codereview.stackexchange", "id": 9775, "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, optimization, concurrency, netty", "url": null }
rosjava W/ActivityManager( 191): Exception thrown during pause W/ActivityManager( 191): android.os.DeadObjectException W/ActivityManager( 191): at android.os.BinderProxy.transact(Native Method) W/ActivityManager( 191): at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:572) W/ActivityManager( 191): at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:859) W/ActivityManager( 191): at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:3465) W/ActivityManager( 191): at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:7162) W/ActivityManager( 191): at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:7052) W/ActivityManager( 191): at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:7714)
{ "domain": "robotics.stackexchange", "id": 9110, "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": "rosjava", "url": null }
But that doesn't not imply that a limit point is a boundary point as a limit point can also be a interior point . Let's check the proof. Let $$\Bbb{S}$$ is our set of which l is a int point . Then for `$$\epsilon$$>0 , N(l, $$\epsilon$$ ) contained in l . Now we will try to prove it contrapositively . Let l is not an int point . Then N(l, $$\epsilon$$ ) is not contained in $$\Bbb{S}$$ . Now let, €>0 then either €< $$\epsilon$$ or €≥ $$\epsilon$$ When, €< $$\epsilon$$ as N(l, $$\epsilon$$ ) is not contained in $$\Bbb{S}$$ , so N(l, €) is not also contained in s . It suggests that, N'(l,€) $${\cap}$$ $$\Bbb{S}$$ = $$\phi$$ So, l is not a limit point of $$\Bbb{S}$$ When, €≥ $$\epsilon$$ , N(l, $$\epsilon$$ ) is contained in N(l, €). So from here also it can be shown that , $$\Bbb{S}$$ $${\cap}$$ N'(l,€) is $$\phi$$ . So l is not a limit point of $$\Bbb{S}$$ .
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9706877700966099, "lm_q1q2_score": 0.8024790216825566, "lm_q2_score": 0.826711787666479, "openwebmath_perplexity": 230.61471554020451, "openwebmath_score": 0.8853532671928406, "tags": null, "url": "https://math.stackexchange.com/questions/1290529/difference-between-boundary-point-limit-point/1290541#1290541" }
Therefore; $$x + 100 = 3y$$ $$x = 3y - 100$$ Substituting value of $$x$$ in equation ($$i$$), we get; $$3y - 100 + y = 1600$$ $$4y = 1600 + 100 = 1700$$ $$y = \frac{1700}{4} = 425$$ Substituting value of $$y$$ in equation ($$i$$), we get; $$x + 425 = 1600$$ $$x = 1600$$ $$-$$ $$425 = 1175$$ Intern Joined: 16 May 2018 Posts: 47 Location: Hungary Schools: Queen's MBA'20 Re: There are 1600 jelly beans divided between two jars, X and Y. If the  [#permalink] ### Show Tags 08 Mar 2019, 17:52 Hi, If X has 100 fewer jelly beans than three times the number of beans in jar Y. Then why did we write X+100 ? Shouldnt it be X-100? Intern Joined: 19 Apr 2017 Posts: 21 Location: Brazil Concentration: Finance, Entrepreneurship GPA: 3 Re: There are 1600 jelly beans divided between two jars, X and Y. If the  [#permalink] ### Show Tags 08 Mar 2019, 19:35 x+y=1600 (I) And 3*y = x-100 Reorganizing it 3*y-100 = x (II) Subs. (II) in (I) 3*y-100+y=1600 4*y=1700 y=425 Then x=1175
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9753900756663374, "lm_q1q2_score": 0.8923853134152235, "lm_q2_score": 0.9149009567332237, "openwebmath_perplexity": 7140.680212017578, "openwebmath_score": 0.6012148857116699, "tags": null, "url": "https://gmatclub.com/forum/there-are-1600-jelly-beans-divided-between-two-jars-x-and-y-if-the-192785.html" }
light, solar-flare, coronal-mass-ejection Title: Are we still in the Solar Maximus stage? Will this winter 2013/14 be a good aurora-viewing season? I remember reading in 2011 that 2013/2014 would be the peak of the current solar maximus, but I want to confirm whether that is still ongoing. Will the upcoming winter season be a good time to see the Northern Lights? From this data here: http://www.swpc.noaa.gov/SolarCycle/ http://solarscience.msfc.nasa.gov/SunspotCycle.shtml We are in a local maximum but the actual values have been lower than predicted for this time. As for getting an idea for the aurora, I would keep an eye on the sunspot numbers and the space weather. http://www.swpc.noaa.gov/today.html http://www.gi.alaska.edu/AuroraForecast
{ "domain": "astronomy.stackexchange", "id": 95, "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": "light, solar-flare, coronal-mass-ejection", "url": null }
quantum-state, mathematics, textbook-and-exercises, linear-algebra Title: Confusion regarding the tensor product usage in book I have recently started with quantum computing, and I've found great book about it - Learn Quantum Computing with IBM Quantum Experience, which explains a lot of things in quite a simple language. There is a section on multi-qubit systems that explains a tensor product and gives few examples. The book states that: $$|\Psi\rangle= |\psi\rangle \otimes|\phi\rangle = (\alpha_0 |0\rangle+\alpha_1 |1\rangle)\otimes(\beta_0 |0\rangle+\beta_1 |1\rangle) $$ This operation results in the vector: $$\begin{pmatrix}\alpha_0\beta_0\\ \alpha_0\beta_1\\ \alpha_1\beta_0\\ \alpha_1\beta_1\\\end{pmatrix}$$ Finally, another way to state multi-qubits by their tensor product is by representing them with their product state. We'll use the same two-vector example described previously. The first is the $|00\rangle$ state: $$|00\rangle = \begin{pmatrix}1\\0\end{pmatrix}\otimes\begin{pmatrix}1\\0\end{pmatrix} = \begin{pmatrix}1\\0\\0\\0\end{pmatrix}$$
{ "domain": "quantumcomputing.stackexchange", "id": 3034, "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-state, mathematics, textbook-and-exercises, linear-algebra", "url": null }
quantum-optics, quantum-information How much information can Alice now send Bob? Is it exactly one qubit, or something else? We all know the plan where Alice transmits vertical for 0 and horizontal for 1, Bob measures exactly vertical or exactly horizontal and one bit per photon is transmitted. Is there any improvement possible? For (1), there is a theorem of Holevo that implies you cannot extract more than one bit of information from one qubit. You can indeed encode one bit of information, since the two inputs $| 0 \rangle$ and $| 1 \rangle$ (or any two orthogonal states) are distinguishable. If the sender and receiver share an entangled state, they can use superdense coding to send two bits using one qubit, but this is the maximum.
{ "domain": "physics.stackexchange", "id": 335, "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-optics, quantum-information", "url": null }
exoplanet, data-analysis, mathematics, modeling (See Eqtn 3.6 for the definition of the covariance function, and the above quote is taken from above Eqtn. 21.) This means that you can take a stationary covariance function and make a periodic one, and then obtain a "quasi-periodic" covariance function from a stationary one and a periodic one. (see here for meaning of stationarity in this context). A link to the paper you're referencing. The authors also state, "Regardless of the number of planets modelled, without the inclusion of this GP the residuals always display correlated behaviour," which can be interpreted as a justification that there is some randomness in the process so the covariance shouldn't be perfectly periodic anyway.
{ "domain": "astronomy.stackexchange", "id": 6151, "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": "exoplanet, data-analysis, mathematics, modeling", "url": null }
quantum-mechanics, time-evolution, rabi-model My suspicion is that somewhere in the analytical solution, one moves into the frame precessing along about the $z$-axis. However, I have no way to prove this nor did I see this anywhere in the derivation. But if this were true then the analytical result above would make sense since it is indeed what one would see in the rotating frame, i.e. the vector simply rotates about the $x$-axis. In any case, I am confused with the analytical result. You are right about the frame. To see this, you can go into how one gets the rotation wave approximation. For Schrodinger equation $H\psi = i\partial_t \psi$ we let $\psi=U(t)\tilde\psi$, by which the equation changes into $\tilde H\tilde\psi=i\partial_t\tilde\psi$ where $\tilde H=U^\dagger(t)HU(t)-iU^\dagger(t)\partial_tU(t)$. Here one choose $U(t)= \mathrm{diag}(e^{-i\omega t/2},e^{i\omega t/2})$ and then $\tilde H=\frac{\hbar(\omega_0-\omega)}{2}\sigma_z+\frac{\hbar \Omega_1}{2}\left[\sigma_x+\left(\begin{array}{cc}0&e^{i2\omega t}\\e^{-2i\omega
{ "domain": "physics.stackexchange", "id": 98245, "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, time-evolution, rabi-model", "url": null }