text
stringlengths
49
10.4k
source
dict
ds.algorithms Title: Constructing integer sets in which a certain equation has no solution Given some linear equation, e.g., $$x+2y=3z+4u+5w,$$ I would like to construct a set $S$ of $n$ positive integers so that equation has no solution in $S$. Two questions: 1) How big must the integers in $S$ be? That is, how large...
{ "domain": "cstheory.stackexchange", "id": 3868, "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": "ds.algorithms", "url": null }
algorithms, recurrence-relation, heap-sort Title: Please provide me a solution of Max-Heapify using Recursion Tree I tried my best to solve the recurrence relation. $T(n) \le T(2n/3) + \Theta(1)$ Using the recursion tree. I could reach out the boundary condition when at depth i: $i= \log_{3/2}n$ Can someone please hel...
{ "domain": "cs.stackexchange", "id": 14677, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, recurrence-relation, heap-sort", "url": null }
c++, multithreading auto func = [](auto val) { // do something with val... }; auto f1 = utils::async_for_each<decltype(data), decltype(func)>{}; f1(data, func); So I have to give the type of both the data and the function when constructing the object… well that’s clunky. Worse, because those types are now embed...
{ "domain": "codereview.stackexchange", "id": 38159, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, multithreading", "url": null }
javascript, jquery, html, form Title: jQuery range slider change text based on hidden field value I am working on a jQuery ratings function that uses the Foundation range slider. My current implementation works correctly on 2 of 7 of my range sliders. However, I am quickly realising that my implementation will become ...
{ "domain": "codereview.stackexchange", "id": 14418, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, html, form", "url": null }
python, performance, algorithm, python-3.x, clustering return total_sum def calc_new_centroids(self): # we calculate new centroids by obtaining the centers of each #(each) cluster centers = np.ndarray(shape=self.centroids.shape) for key, samples in self.clusters.items(): ...
{ "domain": "codereview.stackexchange", "id": 21806, "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, performance, algorithm, python-3.x, clustering", "url": null }
equivalent to being the same point every R > 0, let X be arbitrary... As usual, let ( X, d ) be a metric space, X n is an such:! Spaces could also have a special name for metric spaces where Cauchy sequences converge, sequences, matrices,.. All singleton subsets of X set is open in X all singleton of! Usual, let us giv...
{ "domain": "gridserver.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9458012762876287, "lm_q1q2_score": 0.8165968949606517, "lm_q2_score": 0.8633916187614823, "openwebmath_perplexity": 663.4398473845879, "openwebmath_score": 0.8302062749862671, "tags":...
php, classes, security, authentication /* A function to handle the Forgot Password process */ public function forgotPassword(){ $curStatus = "initial"; // The Current Status of Forgot Password process $identName = $this->emailLogin === false ? "Username" : "Username / E-Mail"; if( !isset(...
{ "domain": "codereview.stackexchange", "id": 16487, "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, classes, security, authentication", "url": null }
astronomy, stars, luminosity, binary-stars, eclipse Title: Binary stars' apparent magnitude If you plot the apparent magnitude of a binary system (so you are unable to see 2 distinct stars) against time, it gives a repeating 'M' effect. (from http://accessscience.com/) Assuming one star is brighter (and bigger in siz...
{ "domain": "physics.stackexchange", "id": 2996, "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": "astronomy, stars, luminosity, binary-stars, eclipse", "url": null }
c++, multithreading Title: Passing a member function in pthread_create I have to use a C++ member function in pthread_create. Also, the member function needs to be able to get the argument. So, I have implemented a launcher function, which with help of a launcher object which stores the member function's address and t...
{ "domain": "codereview.stackexchange", "id": 654, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, multithreading", "url": null }
organic-chemistry Title: Why do chlorophyll need to be dissolved in organic solvents to observe fluorescence? First, chlorophyll extraction was done with ethanol. I used my phone's flash light to see the fluorescence which was a little pinkish red. Then, I added an ether solvent to the extracted chlorophylls(which con...
{ "domain": "chemistry.stackexchange", "id": 16937, "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 }
quantum-mechanics, quantum-field-theory, group-theory, noethers-theorem Title: Is spin angular momentum conserved? According to the Noether theorem, we only have the conserved quantity $$J+S,$$ where $J$ is the orbital angular momentum and $S$ is the spin angular momentum. But I am always impressed that the spin is a...
{ "domain": "physics.stackexchange", "id": 27428, "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-field-theory, group-theory, noethers-theorem", "url":...
electromagnetic-radiation, thermal-radiation, radiation, quantum-gravity, gravitational-waves As for black holes and thermal GW radiation. If we trust tree-level quantization of gravitational perturbations, then yes, a black hole will emit a thermal-like spectrum of gravitons (with the appropriate corrections due to B...
{ "domain": "physics.stackexchange", "id": 94858, "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": "electromagnetic-radiation, thermal-radiation, radiation, quantum-gravity, gravitat...
bash, linux I would go one step further and rename the variables as FILENAME=test_monitor FQFN=/tmp/$FILE now FILENAME contains the name of the file without the path and FQFN is he "Fully Qualified File Name" and is the one you will mostly use. tips for nagios plugin writers For writing a nagios plugin in any languag...
{ "domain": "codereview.stackexchange", "id": 18283, "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": "bash, linux", "url": null }
c++, c++11, graph, dijkstra friend std::ostream& operator<<(std::ostream& stream, const Graph& g) { for (size_t i = 0; i < g.adjList.size(); i++) { stream << "node " << i << "\n"; for (const arc& p : g.adjList[i]) { stream << "connected with " << p.first << " cost: " << ...
{ "domain": "codereview.stackexchange", "id": 39890, "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++, c++11, graph, dijkstra", "url": null }
In 2001, Larson and Todorcevic [3] showed that it is consistent with ZFC that every compact $X$ with hereditarily normal $X^2$ is metrizable. In other words, there is a model of set theory that is consistent with ZFC in which Theorem 3 can be improved to assuming $X^2$ is hereditarily normal. Thus it is impossible to s...
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9817357195106374, "lm_q1q2_score": 0.8049185740550521, "lm_q2_score": 0.8198933359135361, "openwebmath_perplexity": 100.52160425469535, "openwebmath_score": 0.9672622084617615, "tags":...
- If the limit is infinite, then $f$ is not differentiable at $x$. –  Arturo Magidin Apr 1 '11 at 16:18 I used the term "f is differentiable at x" just for convienience. I mean the limit exists in extended real number system. –  zzzhhh Apr 1 '11 at 16:23 @Arturo: I think it was intended using an "extended" definition o...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9840936078216783, "lm_q1q2_score": 0.8022650794510209, "lm_q2_score": 0.8152324871074608, "openwebmath_perplexity": 302.7438587779643, "openwebmath_score": 0.9918537735939026, "tag...
that sum of numbers rolled is either 5 or 12 is. What's the probability of the second card also being a king?. P(2 twos and 2 ones and the other two different ) + P(2 sixes and 2 ones and 2 of some other number). There is only one way to get a total of 12. The sum of the two numbers rolled are shown below:. We want sum...
{ "domain": "salesianipinerolo.it", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9766692339078751, "lm_q1q2_score": 0.846807163041299, "lm_q2_score": 0.8670357718273068, "openwebmath_perplexity": 260.607987939569, "openwebmath_score": 0.6550420522689819, "ta...
python, python-3.x, compression if __name__ == '__main__': generate_file() print(f"File size before compression: {get_file_size(UNCOMPRESSED_FILE)}") compress_file(UNCOMPRESSED_FILE) print(f"File size after compression: {get_file_size(COMPRESSED_FILE)}") decompress_file(COMPRESSED_FILE) print(f...
{ "domain": "codereview.stackexchange", "id": 35322, "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, compression", "url": null }
Going further, this MO question has a hint about how to make an example $q$ that is $C^\infty$. -
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.977370800955675, "lm_q1q2_score": 0.814467135267604, "lm_q2_score": 0.8333246035907933, "openwebmath_perplexity": 112.94384271264231, "openwebmath_score": 0.9605397582054138, "tags...
physics Title: Which physics engine is used by gazebosim? Gazebo supports 4 physics engines. How do I find out which one of these four my compilation is using? I would be pleased if you can help me out. Kind regards Andi Originally posted by nerdOmat on Gazebo Answers with karma: 1 on 2014-01-31 Post score: 0 The G...
{ "domain": "robotics.stackexchange", "id": 3543, "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": "physics", "url": null }
filters, filter-design, lowpass-filter, parks-mclellan, gnuradio Title: How to manipulate attenuation in Parks MClellan algorithm? I am using GNU Radio C++ source code in my app (pm_remez()) for generating FIR filters coefficients. Input parameters here are: bands[], des[] and weight[]. How I can manipulate stop band ...
{ "domain": "dsp.stackexchange", "id": 2502, "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": "filters, filter-design, lowpass-filter, parks-mclellan, gnuradio", "url": null }
fvz, 1ozw, hno, 3f, tydx, 3pve, lje, mz, zfq, s6, taop, qsyi, uv, fie, 19yh,
{ "domain": "lgc2.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9869795110351222, "lm_q1q2_score": 0.8137270204482905, "lm_q2_score": 0.8244619177503205, "openwebmath_perplexity": 637.926889986448, "openwebmath_score": 0.9391229748725891, "tags": nu...
Now, suppose the statement is valid for all $m$ with $2\leq m \leq n$. We will show it holds for $n+1$. Indeed, let \begin{align}\tag{4}\label{induc1} \sum_{i=1}^{n+1}c_iv_i=0 \end{align} be a linear combination of the $v_i$ that equals $0$. Then \begin{align}\tag{5}\label{induc2} A\left(\sum_{i=1}^{n+1}c_iv_i\right...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471661250913, "lm_q1q2_score": 0.8155490891427624, "lm_q2_score": 0.8289387998695209, "openwebmath_perplexity": 140.96743120701245, "openwebmath_score": 0.9358901381492615, "ta...
python, json ######################Check 3 ################################ # check 3: If all empty jiu dont call this part if (key3EntryName.get() or key3EntryStartIndex.get() or key3EntryEndIndex.get()) == "": pass # check 3: start index and end ind...
{ "domain": "codereview.stackexchange", "id": 40914, "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, json", "url": null }
organic-chemistry, electronic-configuration, transition-metals, reference-request, catalysis My question is, why $\ce{Pt, Ru, Rh, Pd}$ all being transition metals still show different chemoselectivity in hydrogenation reactions? 1st edit: (After reading ringo's comment I think I should add something more) Well, I firs...
{ "domain": "chemistry.stackexchange", "id": 8425, "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, electronic-configuration, transition-metals, reference-request...
Change the chapter Question Jogging on hard surfaces with insufficiently padded shoes produces large forces in the feet and legs. (a) Calculate the magnitude of the force needed to stop the downward motion of a jogger’s leg, if his leg has a mass of 13.0 kg, a speed of 6.00 m/s, and stops in a distance of 1.50 cm. (Be ...
{ "domain": "collegephysicsanswers.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9869795114181106, "lm_q1q2_score": 0.8267137421647455, "lm_q2_score": 0.8376199633332891, "openwebmath_perplexity": 381.14239352031996, "openwebmath_score": 0.565946936607360...
ros, colcon, ros-kinetic, ubuntu, cuda [0.132s] ERROR:colcon.colcon_core.entry_point:Exception loading extension 'colcon_core.package_identification.python_setup_py': invalid syntax (dist.py, line 585) Traceback (most recent call last): File "/usr/lib/python3/dist-packages/colcon_core/entry_point.py", line 120, in l...
{ "domain": "robotics.stackexchange", "id": 36579, "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, colcon, ros-kinetic, ubuntu, cuda", "url": null }
php, mysql, mvc, pdo, session return $query->execute(); } /* * @returns void */ public function delete(Session $session){ } } I would like to focus on my SessionDataMapper::create() method. As you can see I added a bit logic to make it remove the expired sessions when a session is re...
{ "domain": "codereview.stackexchange", "id": 26972, "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, mysql, mvc, pdo, session", "url": null }
human-biology, cell-biology, bacteriology, cell-membrane Title: Can general soap kill bacteria? I have read that general soap can kill bacteria by opening holes in the bacterial membrane. http://questions.sci-toys.com/node/90 However, I found some articles as well saying that it cannot. http://goaskalice.columbia.edu/...
{ "domain": "biology.stackexchange", "id": 4654, "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": "human-biology, cell-biology, bacteriology, cell-membrane", "url": null }
graph-theory, graph-algorithms, np-hardness Then $\mathcal{F} \cup \{e'\} \setminus \{e\}$ is also a FES with weight at most the weight of $\mathcal{F}$, and hence a MWFES. Iterating this argument, we can show that there exists a MWFES without edges from $\mathcal{T}$.
{ "domain": "cstheory.stackexchange", "id": 4212, "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, graph-algorithms, np-hardness", "url": null }
interference Title: Can interference occur between two waves that are parallel but separated by a small distance? This is a image of diffraction in crystal. My doubt is how the parallel waves coming out interfere if they are seperate? In answering your question, a lot could be said about the art of mathematical mode...
{ "domain": "physics.stackexchange", "id": 31467, "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": "interference", "url": null }
electromagnetism, energy, electric-circuits, integration Title: Electromagnetic converters, differentials and integrals In the context of electromagnetic converters, a converter can be modeled by a system that receives electrical energy and outputs mechanical energy. At some point in my textbook, the authors present t...
{ "domain": "physics.stackexchange", "id": 40769, "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, energy, electric-circuits, integration", "url": null }
quantum-mechanics, operators, hilbert-space, unitarity Title: Unitary time condition I have a confusion with regards to the principle of QM that states that time evolution must be unitary. In particular, given that states transform through time as $|\Psi(t)\rangle = U(t)|\Psi(0)\rangle$; does the condition: $$\langle\...
{ "domain": "physics.stackexchange", "id": 43424, "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, operators, hilbert-space, unitarity", "url": null }
the-moon, orbit Title: Shouldn't all moon orbits be inherently unstable? A hypothetical simulation starts with a planet called Earth in a perfectly circular orbit around a star called Sol. There is also a moon called Luna in a perfectly circular orbit around Earth. Question: Can Luna's orbit remain perfectly circular ...
{ "domain": "astronomy.stackexchange", "id": 1962, "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": "the-moon, orbit", "url": null }
5 years ago. 7th and 8th Grades. Embed size: Start at: (e.g. You can sign in to vote the answer. View solution in original post. A line segment starting from the locus passing through the center and end on the locus is known as the diameter. Report an issue . The radian is determimed by the circumference of a circle th...
{ "domain": "swagger-media.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9372107914029487, "lm_q1q2_score": 0.8191946080933685, "lm_q2_score": 0.8740772253241803, "openwebmath_perplexity": 1141.1894267134733, "openwebmath_score": 0.7430127859115601, "ta...
ros, ros-canopen and vcan0 000 [2] 82 01 vcan0 000 [2] 02 01 and [ INFO] [1510308088.698080279]: Initializing XXX [ INFO] [1510308088.698592687]: Current state: 1 device error: system:0 internal_error: 0 (OK) [ INFO] [1510308088.701974798]: Current state: 2 device error: system:0 internal_error: 0 (OK) [ INFO...
{ "domain": "robotics.stackexchange", "id": 29315, "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, ros-canopen", "url": null }
quantum-mechanics, atomic-physics Title: $(2L+1)(2S+1)$-fold degeneracy of the energy eigenvalues of many-electron atoms in absence of spin-orbit interaction In the case of many-electron atoms, the Hamiltonian (neglecting the spin-orbit interaction) is given by $$H=H_c+H_1$$ where $H_c$ is the Hamiltonian in the centr...
{ "domain": "physics.stackexchange", "id": 98519, "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, atomic-physics", "url": null }
c++, performance, programming-challenge, time-limit-exceeded std::cout << josephus(num_students, start_index, steps) << '\n'; } } The biggest issues I can think of are the insertion and the iteration. With insertion I mean setting the value of each node grows with the size of num_students and is thus \$\mathcal{O...
{ "domain": "codereview.stackexchange", "id": 31373, "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, programming-challenge, time-limit-exceeded", "url": null }
If $r$ is not known to be positive, then you shoudl replace the $r^3$ and the $r$ in the last step with $|r|^3$ and $|r|$. $g$ must be positive for the original expression to be sensible; if $h$ is not known to be positive, then you should replace the $h$ at the end with $|h|$. - Don't forget that "for $a$ and $b$ pos...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9525741268224331, "lm_q1q2_score": 0.8038726441854684, "lm_q2_score": 0.843895106480586, "openwebmath_perplexity": 729.5632790712407, "openwebmath_score": 0.9997932314872742, "tags...
# Evaluating the integral $\int_C \text{Re }z\,dz$ from $-4$ to $4$ via lower half of the circle I want to evaluate the integral $\int_C \text{Re }z\,dz$ from $-4$ to $4$ via the contour being the lower half of the circle of radius $4$ centered at the origin. So I can take: $$z=4e^{i\theta},\quad\pi\leq\theta\leq2\p...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9787126488274566, "lm_q1q2_score": 0.8069113200427108, "lm_q2_score": 0.8244619306896955, "openwebmath_perplexity": 269.81291807883156, "openwebmath_score": 0.7834986448287964, "ta...
homework-and-exercises, newtonian-mechanics, forces, potential-energy, spring Title: What is the potential energy of the spring? What is the potential energy of the spring? On the left side there is a gravitational force $mg$ acts on the spring, same on for the right side. So, If force $mg$ streches the spring $x$ un...
{ "domain": "physics.stackexchange", "id": 64514, "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, potential-energy, spring", ...
1−r an Diverges NO ALTERNATING SERIES Does an =(−1)nbn or an =(−1)n−1bn, bn ≥ 0? We can only use it to evaluate if a series diverges. If the limit of a [ n] is not zero, or does not exist, then the sum diverges. The Divergence Theorem is critically important as it provides us with a test to see whether a series is dive...
{ "domain": "com.br", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9653811611608242, "lm_q1q2_score": 0.8186120936461352, "lm_q2_score": 0.8479677526147223, "openwebmath_perplexity": 270.15471625117243, "openwebmath_score": 0.9249815940856934, "tags": null, ...
thermodynamics, statistical-mechanics, probability, partition-function Title: Confusion regarding the use of partition function Suppose we have a system filled with $N$ particles. There are $k$ energy levels in this system, labeled by $\epsilon_i$, each with a degeneracy of $g_i$. Let us imagine $n_j$ particles out of...
{ "domain": "physics.stackexchange", "id": 84017, "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, statistical-mechanics, probability, partition-function", "url": ...
quantum-field-theory, quantum-electrodynamics, gauge-theory, path-integral, gauge Title: What is the constraint on the Gauge Potential in the Covariant Gauges? One of the most common gauges in QED computations are the $R_{\xi}$ gauges obtained by adding a term \begin{equation} -\frac{(\partial_\mu A^{\mu})^2}{2\xi} \...
{ "domain": "physics.stackexchange", "id": 12153, "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, quantum-electrodynamics, gauge-theory, path-integral, gauge"...
gravity, black-holes, astrophysics, quantum-gravity, neutron-stars Title: Upper limit of neutron star mass and collapse to a black hole I was reading answers regarding a question (https://astronomy.stackexchange.com/questions/748/how-does-neutron-star-collapse-into-black-hole) ; and I had two major questions: What is...
{ "domain": "physics.stackexchange", "id": 74989, "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": "gravity, black-holes, astrophysics, quantum-gravity, neutron-stars", "url": null...
qiskit, programming, circuit-construction qr = QuantumRegister(num_qubits, 'q') qc = QuantumCircuit(num_qubits) if measure or conditional: cr = ClassicalRegister(num_qubits, 'c') qc.add_register(cr) if reset: one_q_ops += [Reset] if seed is None: seed = np.random.rand...
{ "domain": "quantumcomputing.stackexchange", "id": 5072, "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": "qiskit, programming, circuit-construction", "url": null }
ros, installation, package Title: How do I set up a ROS mirror? At my university, we have several computers that have ROS installed on them. If I have access to a server, how do I set up a mirror of the ROS Ubuntu repository to speed up installing ROS packages? Originally posted by mjcarroll on ROS Answers with kar...
{ "domain": "robotics.stackexchange", "id": 4832, "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, installation, package", "url": null }
algorithms, optimization, network-flow, set-cover Title: Optimal covering of 2D matrix elements given spatial constraints I have a particular problem I need to solve, but I'm not sure how to classify the problem or pick the right algorithm to solve it. I'm hoping someone here can lead me in the right direction. I've g...
{ "domain": "cs.stackexchange", "id": 9446, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, optimization, network-flow, set-cover", "url": null }
c++, object-oriented, embedded, device-driver break; case MAX22190RegisterType::kCfg: data = readCfgRegCfgData(device); break; case MAX22190RegisterType::kInEn: data = readInEnRegCfgData(device); break; case MAX22190RegisterType::kFault2: data = 0; break; case MAX22190Regi...
{ "domain": "codereview.stackexchange", "id": 40154, "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++, object-oriented, embedded, device-driver", "url": null }
beginner, c, strings Title: Word Inverter in C I've just made this program and I want to know how to improve it. It just receives a word and prints it backwards. Sequences of numbers are also accepted, but not white spaces (that's why I used scanf). #include <stdio.h> #include <string.h> int main(void) { const u...
{ "domain": "codereview.stackexchange", "id": 19734, "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, strings", "url": null }
timer void callmyfunction(const ros::TimerEvent& event) { // <= New signature here... for the same function // function body same as above } Using that timer the function is going to be called indipendently and at another (or you want the same) frequency than your main routine. It doesn't need to be with the main sy...
{ "domain": "robotics.stackexchange", "id": 20366, "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": "timer", "url": null }
python, memory-management, simulation [13] 1 = 1, 2, 3, 4, 5, 6, 7 2 = 8, 9, 10, 11, 12, 13, 14 3 = 15, 16, 17, 18, 19, 20, 21 4 = 22, 23, 24, 25, 26, 27, 28 5 = 29, 30 ,31, 32, 33, 34, 35 6 = 36, 37, 38, 39, 40, 41, 42 7 = 43, 44, 45, 46, 47, 48, 49 8 = 1, 3, 5, 7, 9, 11, 13 9 = 2, 4, 6, 8, 10, 12, 14 10 = 15, 17, 19...
{ "domain": "codereview.stackexchange", "id": 581, "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, memory-management, simulation", "url": null }
java, algorithm, swing, computational-geometry Title: Implementing Mitchell's best candidate algorithm I have written an implementation of Mitchell's best candidate algorithm. Mitchell’s best-candidate algorithm generates a new random sample by creating k candidate samples and picking the best of k. Here the “best” sa...
{ "domain": "codereview.stackexchange", "id": 13230, "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, algorithm, swing, computational-geometry", "url": null }
algorithms, graphs Size of knapsack is $t$, however we are allowed to cross it once. minimize $w^*$. However, I think this won't work, mainly because we can't order the nodes by $value/weights$, and secondly because of ability to exceed knapsack size. This problem is NP-hard. Let $S = \{x_1, \dots, x_n\}$ be an insta...
{ "domain": "cs.stackexchange", "id": 17686, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, graphs", "url": null }
ds.algorithms Title: "A simple linear time algorithm" by Klawe I try to implement the algorithm described in "A simple linear time algorithm for concave one-dimensional dynamic programming" by Maria M. Klawe, 1989. However, right at the beginning there is possibly a typo: i ← 0; r ← 0; While i < 2^⎡log(n + 1)⎤ and r <...
{ "domain": "cstheory.stackexchange", "id": 1193, "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": "ds.algorithms", "url": null }
c) Compute \begin{equation*} \begin{aligned} & \det \frac{\partial f}{\partial (x_1,x_2)}(\textbf{a}) = 0 & & \det \frac{\partial f}{\partial (x_1,x_3)}(\textbf{a}) = 1 & & \det \frac{\partial f}{\partial (x_1,x_4)}(\textbf{a}) = 2 \\ & \det \frac{\partial f}{\partial (x_1,x_5)}(\textbf{a}) = -4 & & \det \frac{\partial...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429098941399, "lm_q1q2_score": 0.8121303665576788, "lm_q2_score": 0.8244619177503205, "openwebmath_perplexity": 34.88981396002264, "openwebmath_score": 0.9973302483558655, "tag...
• 10,000 nodes/second • each node requires 1000 bytes of storage Depth Nodes Time Memory 2 1100. Breadth First Search: visit the closest nodes first. , we’ll no longer require that an action from a given state leads to the same state each time and will. To that purpose, we introduce a new parameter, called. This again ...
{ "domain": "solotango.it", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702398991698342, "lm_q1q2_score": 0.9075105082061864, "lm_q2_score": 0.9353465147977104, "openwebmath_perplexity": 1105.8471170780324, "openwebmath_score": 0.5393127202987671, "tags": ...
newtonian-mechanics, rotational-dynamics, rotation Title: The Forces of Rolling and Rolling Without Sliding In Halliday's Fundamentals of Physics textbook the author says: "If a wheel rolls at constant speed, it has no tendency to slide at the point of contact P, and thus no frictional force acts there."
{ "domain": "physics.stackexchange", "id": 86187, "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, rotational-dynamics, rotation", "url": null }
In addition, any argument that argues by saying "No matter how complicated the union..." is likely to be at least a little bit informal. The result you are trying to prove can be established without invoking that rather strong result. Here's a hint: since the rational numbers are dense in $\mathbb{R}$, if $A$ is any ...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9881308807013051, "lm_q1q2_score": 0.8276781580695948, "lm_q2_score": 0.8376199694135332, "openwebmath_perplexity": 365.5102139443925, "openwebmath_score": 0.9451795220375061, "tag...
thermodynamics, statistical-mechanics Starting from $E_0$, put one particle in each energy level whilst $\sum E_i < \hat{E}$. We need to distribute the remaining particles. Starting from $E_0$, again put one particle in each energy level whilst $\sum N_i E_i < \hat{E}$. The lowest energy level, $E_0$, now has 2 parti...
{ "domain": "physics.stackexchange", "id": 17399, "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, statistical-mechanics", "url": null }
black-holes, event-horizon, free-fall Title: Shouldn't all things falling into a black hole meet at the horizon? Consider two observers starting to fall toward a black hole from rest at different distances from the black hole with their worldlines shown on the Kruskal-Szekeres chart below On the diagram, it looks as ...
{ "domain": "physics.stackexchange", "id": 98459, "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": "black-holes, event-horizon, free-fall", "url": null }
deep-learning, reinforcement-learning, open-ai, pytorch, gym Title: Why is this deep Q agent constantly learning just one action? I'm trying to implement deep q learning in the OpenAI's gym "Taxi-v3" environment. But my agent only learns to do one action in every state. What am I doing wrong? Here is the Github reposi...
{ "domain": "ai.stackexchange", "id": 1644, "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": "deep-learning, reinforcement-learning, open-ai, pytorch, gym", "url": null }
rust, dependency-injection fn start(&mut self) { println!("starting"); } fn stop(&mut self) { println!("stopping"); } } impl EngineImpl { pub fn new() -> Self { EngineImpl {} } } } ...
{ "domain": "codereview.stackexchange", "id": 40072, "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": "rust, dependency-injection", "url": null }
newtonian-mechanics, potential, potential-energy, equilibrium, stability It is also clear that some equilibria are stable and some are not; given a small displacement at $x_2$ the system will return to equilibrium, whereas this would not happen at $x_3$. Hence, we can say that for $\frac{\partial ^2U}{\partial ^2x}>0$...
{ "domain": "physics.stackexchange", "id": 44418, "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, potential, potential-energy, equilibrium, stability", "url"...
java, beginner, number-guessing-game /* Tells the user their win/loss status and asks them to play again */ private static void playAgain() { String userInput; Scanner scanner = new Scanner(System.in); if (attempts > 0) { System.out.println("You won!"); } else { System.out.prin...
{ "domain": "codereview.stackexchange", "id": 34743, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, beginner, number-guessing-game", "url": null }
speech-recognition, neural-network Title: Keyword spotting - constant phoneme length I wish to implement a keyword spotting algorithm (in speech), on the basis of what was published in this article (Apple's Machine Learning Journal). The article describes a neural-network-based method for keyword spotting, in which ...
{ "domain": "dsp.stackexchange", "id": 5729, "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": "speech-recognition, neural-network", "url": null }
quantum-field-theory, lagrangian-formalism, conservation-laws, feynman-diagrams Title: How do I know which Feynman diagram is right? ($s,t,u$-channel) Following the Lagrangian: $$\tag{1} \mathcal{L} = \mathcal{L}_{initial}-M^2 \varphi^* \varphi - g\varphi^*\varphi -g\phi^3$$ where $\phi$ is a particle associated with ...
{ "domain": "physics.stackexchange", "id": 68131, "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, lagrangian-formalism, conservation-laws, feynman-diagrams", ...
ros, kinect, opencv2, depth Originally posted by Wolf with karma: 7555 on 2014-11-24 This answer was ACCEPTED on the original site Post score: 0 Original comments Comment by Aylin COŞKUN on 2014-11-24: I will look at them. when ı use opencv the range of kinect is 5 m but my view is not detected after about 1.5 m. I ...
{ "domain": "robotics.stackexchange", "id": 20124, "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, kinect, opencv2, depth", "url": null }
electric-current, voltage Title: Using Kirchhoff to solve circuits with more than one cell source Hello guys, I've been trying to understand this but I'm facing difficulties. I do not know how my lecturer got those equations and why isn't any equation from "a". Thanks guys Your lecturer is simply showing two alternat...
{ "domain": "physics.stackexchange", "id": 50132, "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-current, voltage", "url": null }
quantum-field-theory, energy, hamiltonian, antimatter, klein-gordon-equation Title: How can the Klein-Gordon equation have negative-energy solution if its Hamiltonian is positive-definite? In a lesson about the introduction of classical field theory it was mentioned the Klein-Gordon equation $$(\Box + m^2) \phi(x) = 0...
{ "domain": "physics.stackexchange", "id": 99570, "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, energy, hamiltonian, antimatter, klein-gordon-equation", "...
ros-kinetic Title: I am getting cmake error Straight dump of the error message: Traceback (most recent call last): File "/home/ubuntu/helloworld_ws/build/catkin_generated/generate_cached_setup.py", line 22, in <module> code = generate_environment_script('/home/ubuntu/helloworld_ws/devel/env.sh') File "/opt/ro...
{ "domain": "robotics.stackexchange", "id": 33105, "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", "url": null }
sql, mysql, join Title: Fetching all the project's items for a specific project id In the following query, I am fetching all the projects items with specific project id. At the same time, I am using a join in Select to fetch the delivered quantity of items of this project only. The delivered quantity join feels very c...
{ "domain": "codereview.stackexchange", "id": 17680, "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, join", "url": null }
classical-mechanics, newtonian-gravity, integration, multipole-expansion Title: Why does this volume integral vanish? I am stuck on this problem concerning the gravitational potential of a body. The body has a mass density $\rho(\mathbf x)$ and I have to calculate a contribution to the total gravitational potential de...
{ "domain": "physics.stackexchange", "id": 72092, "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, newtonian-gravity, integration, multipole-expansion", "url"...
c#, optimization, design-patterns, entity-framework /// <returns>Type T</returns> public static T InsistOnValidInput<T>(string message, string errorMessage, TryParse<T> validator) { Console.Write(message); T result; while (!validator(Console.ReadLine(), out result)) { ...
{ "domain": "codereview.stackexchange", "id": 2628, "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#, optimization, design-patterns, entity-framework", "url": null }
python, pygame, performance btype='block' select=3 if key[K_4]: blocksel=texdir+"\\sand.png" btype='block' select=4 if key[K_5]: blocksel=texdir+"\\woodplank.png" btype='block' select...
{ "domain": "codereview.stackexchange", "id": 4717, "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, pygame, performance", "url": null }
interpolation, equalization, lte, channel-estimation Does anybody know if interpolating the PSS channel responses is a good way to obtain an estimation for the SSS? In case no, does anybody has any idea how to get a good estimation for the SSS using the PSS channel responses? The following picture visualises the blo...
{ "domain": "dsp.stackexchange", "id": 12338, "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": "interpolation, equalization, lte, channel-estimation", "url": null }
quantum-field-theory, field-theory, classical-field-theory $$ \Gamma(\varphi) = \sum_{\ell=0}^{\infty}\Gamma_{\ell}(\varphi), $$ where $\ell$ denotes the loop order. The $\ell=0$ term is usually a manifestly local action and the higher order ($\ell>0$) terms are often highly non-local (especially in massless theories)...
{ "domain": "physics.stackexchange", "id": 46789, "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, field-theory, classical-field-theory", "url": null }
javascript, game, html5 // randomly get a selection from each array var randomSelectionF = Math.floor(Math.random() * femaleSelections.length); var randomSelectionM = Math.floor(Math.random() * maleSelections.length); // get the male and fem...
{ "domain": "codereview.stackexchange", "id": 22679, "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, game, html5", "url": null }
cc.complexity-theory, oracles, relativization Title: Relativized world where ${\bf P^A}={\bf NP^A}\not = {\bf PP^A}$ I would like to know if there exists a relativized world where ${\bf P^A}={\bf NP^A}\not = {\bf PP^A}$. I am also interested to know if there exists a relativized world where ${\bf P^B} \not = {\bf NP^B...
{ "domain": "cstheory.stackexchange", "id": 1989, "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": "cc.complexity-theory, oracles, relativization", "url": null }
general-relativity, relativity As examples: the Schwarzschild solution is static, while the Kerr solution is stationary. So the question then is: are there solutions to the EFEs which are neither static nor stationary? Yes, there are: for instance the FLRW metric which is a pretty important solution.
{ "domain": "physics.stackexchange", "id": 65803, "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, relativity", "url": null }
quantum-mechanics, electromagnetism, quantum-field-theory Title: How does a photon mediate both electric attraction and repulsion? The answer to this question probably lies in QFT, which I know just enough about to appreciate my current lack of understanding of the subject, if you follow me. About a year ago I asked o...
{ "domain": "physics.stackexchange", "id": 22769, "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, electromagnetism, quantum-field-theory", "url": null }
ros, boost, multithreading Title: Creating continous tf broadcaster with Boost::Thread This is a bit of a continuation from a previous question here:here. Basically, I want to create a class that allows me to continuously publish frames to tf. I have no experience at all in multithreaded programming, but I found a de...
{ "domain": "robotics.stackexchange", "id": 18760, "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, boost, multithreading", "url": null }
c, object-oriented, array for (i = 0; i < dynArr->length; i++) { newArr[i] = dynArr->arr[i]; } } void DynArray_insert(DynArray* dynArr, int val) { if (dynArr->length == dynArr->capacity) { dynArr->extend(dynArr); } dynArr->arr[dynArr->length] = val; dynArr->length = dynArr->length...
{ "domain": "codereview.stackexchange", "id": 2420, "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, object-oriented, array", "url": null }
thermodynamics, electricity, temperature I'm not defending either model but merely showing how different dependencies can arise from various assumptions and idealizations. More generally, we could write the heat equation as $$k\frac{\partial^2 T}{\partial x^2}+\frac{I^2\rho}{(\pi r^2)^2}-\frac{2[h(T-T_\infty)+\sigma\e...
{ "domain": "physics.stackexchange", "id": 99431, "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, electricity, temperature", "url": null }
java, queue Please, review it from perspective of implementation and performance. Update: I improved(thanks to @Vogel612) this code a little bit. Improved version Learn from what already exists There is an interface defined in java.util.Queue. It makes sense to implement it in your solution. If you don't need some of ...
{ "domain": "codereview.stackexchange", "id": 8361, "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, queue", "url": null }
But one way to quickly see that no such choice is possible is to notice that vertices $1$ and $4$ must both be in $S$ or both in $T$, since there is no edge between them, and the same is true for the pairs $\{2,5\}$ and $\{3,6\}$. But we'd need an even number of vertices in $S$ and $T$ to keep all three of these pairs ...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9759464443071381, "lm_q1q2_score": 0.802412560606938, "lm_q2_score": 0.8221891327004133, "openwebmath_perplexity": 129.18517389025945, "openwebmath_score": 0.7657751441001892, "tag...
ros Title: tf::poseKDLToMSG throwing errors I am trying to convert a KDL::Frame to a geometry_msgs::Pose so I can stream the original KDL::Frame data to ros topics using rtt_ros_integration. I can stream orocos ports to ros topics correctly when the ports have type <vector>, however I need to stream ports that are of...
{ "domain": "robotics.stackexchange", "id": 24712, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
php class view_message extends view { function __construct($type) { $this->invoke($type); } private function invoke($type) { $this->message($type); } private function message($type) { $type_message = array( 'empty' => '<si_f>Please complete all fields.', 'name'=...
{ "domain": "codereview.stackexchange", "id": 825, "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", "url": null }
The equation comes out to this: $x(4)=8+20(4)+\frac{1}{2}(-8.75)(4^2)$ The math comes out to 18 meters. However, according to the curriculum I used, the answer to the first part is 38 meters and the answer to the second part is 16 meters. How can this be the case? Did I fail to apply the position equation correctly? ...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9748211604938802, "lm_q1q2_score": 0.8058961484089702, "lm_q2_score": 0.8267117919359419, "openwebmath_perplexity": 189.72357405507137, "openwebmath_score": 0.8224222660064697, "ta...
= \binom{i}{j} .$$ Permutation matrix if its columns are a permutation of the columns of the identity matrix $${\bf P}^{-1} = {\bf P}^{\mathrm T}$$ Positive A real matrix is positive if all its elements are strictly >0 Positive definite if alll eigenvalues are positive $${\bf x}^{\mathrm T} \,{\bf A} \, {\bf x} >0$$ Si...
{ "domain": "brown.edu", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9941800417952515, "lm_q1q2_score": 0.8009434386734297, "lm_q2_score": 0.8056321843145405, "openwebmath_perplexity": 224.55710427261508, "openwebmath_score": 0.9133614897727966, "tags": nul...
kinect, collision-map, collision-object, arm-navigation, environment-server But this code only check with the world at the time of planning calculation and if I move the object to do a collision, isn't detected. That is my really issue, I hope you understand better. Thanks EDIT2: my problem with solution2 is very stra...
{ "domain": "robotics.stackexchange", "id": 10066, "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": "kinect, collision-map, collision-object, arm-navigation, environment-server", "...
electricity, reference-frames, electronics Title: Floating Voltage Referenced to Ground So, I came across something interesting today at work that is completely confusing me. We have floating 130V battery backups, and I am told there is neither any ground reference, nor any center tap on the bank of batteries. As norm...
{ "domain": "physics.stackexchange", "id": 62194, "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": "electricity, reference-frames, electronics", "url": null }
ros, python, quaternion, tf-conversions, transformations Title: Quaternion transformations in Python I'm trying to place some Markers in RViz, using a node written in Python. To this end, I need to create a geometry_msgs.mgs.Pose with an orientation Quaternion. But I can't for the life of me find the utility and conv...
{ "domain": "robotics.stackexchange", "id": 15089, "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, python, quaternion, tf-conversions, transformations", "url": null }
quantum-mechanics, atomic-physics, schroedinger-equation, hydrogen, spherical-harmonics My approach lacks rigour, but I think it shows the idea: For the equation $\newcommand{\Ket}[1]{\left|#1\right>}$ $\newcommand{\Bra}[1]{\left<#1\right|}$ $\newcommand{\Braket}[2]{\left<{#1}|{#2}\right>}$ \begin{equation} \hat{H}\Ke...
{ "domain": "physics.stackexchange", "id": 85394, "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, atomic-physics, schroedinger-equation, hydrogen, spherical-harm...
c++, reinventing-the-wheel, simulation, gui cout << "Bus #" << bus.get_bus_numberplate() << " brand " \ << bus.get_brand() << " with capacity " << bus.get_capacity() << endl; /*cout << "Coordinate x: " << bus.get_x_bus() << endl; cout << "Coordinate y: " << bus.get_y_bus() << endl;*/ cout << "N...
{ "domain": "codereview.stackexchange", "id": 10859, "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++, reinventing-the-wheel, simulation, gui", "url": null }
ros, ros-melodic, build, jenkins Title: Jenkins fails to document because of an dependency to a not yet released package Hi I have multiple packages indexed. Some of them are even released but not all. Now a have a indexed package which depends on a indexed but not yet released package and the Jenkins build complains...
{ "domain": "robotics.stackexchange", "id": 31780, "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, ros-melodic, build, jenkins", "url": null }
javascript, performance, algorithm, tree, complexity // find depth of each node // recursion would be called for each node but // it would return immidiately hence we can ignore that call? // if yes then recur would be called N times exactly. Hence, // Theta(N) for (vertex = 0; vertex < N; vertex++) recu...
{ "domain": "codereview.stackexchange", "id": 22494, "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, performance, algorithm, tree, complexity", "url": null }
And unfortunately, your spherical shell is not of a fixed distance from the axis. The parts at the "poles" are very close to the axis, and the parts at the equator really are the maximum distance $$r$$. So you can't really put in any number here, you'll have to slice your sphere up into pieces that are of a uniform dis...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9770226354423304, "lm_q1q2_score": 0.8304410836605911, "lm_q2_score": 0.849971181358171, "openwebmath_perplexity": 166.70410531597332, "openwebmath_score": 0.9150753617286682, "tag...
c++, c++11, windows The ALL_CAPS convention was originally invented for macros. At least as far as I can tell, it was originally for function-like macros, to give a subtle warning that it might evaluate its argument more than once, so you needed to be careful about exactly how and where you applied it (especially to a...
{ "domain": "codereview.stackexchange", "id": 6391, "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++, c++11, windows", "url": null }
c#, linq, file-system, wpf, xaml private List<string> LoadXML(string filePath, string descendant, string element) { return XDocument.Load(filePath) .Root .Descendants(descendant) .Where(c => c.Element("type").Value == "TV") ...
{ "domain": "codereview.stackexchange", "id": 18059, "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#, linq, file-system, wpf, xaml", "url": null }