text
stringlengths
1
1.11k
source
dict
image-processing, classification, video-processing, object-recognition, video Once you have that small "logo" image, you can then pick up a random frame from your video feed, crop it around the approximate location of the logo and then take that part of the frame and cross-correlate it with the logo. If the logo IS pr...
{ "domain": "dsp.stackexchange", "id": 5809, "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": "image-processing, classification, video-processing, object-recognition, video", "url"...
ros, urdf, collision you can access the length menber such as double leng = cylinder->length; This is my first posting. Sorry if there are something improper. Originally posted by Shishimy with karma: 56 on 2015-03-21 This answer was ACCEPTED on the original site Post score: 4
{ "domain": "robotics.stackexchange", "id": 19899, "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, urdf, collision", "url": null }
c#, tree, winforms foreach(TreeNode n in node.Nodes) { if (n.Checked == true) return true; returns = IsAnyChildChecked(n); } return returns; } } } The method IsAnyChildChecked would always return false if the last child and its subchilds...
{ "domain": "codereview.stackexchange", "id": 24946, "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#, tree, winforms", "url": null }
ros, catkin, boost, 3rd-party-package Comment by gvdhoorn on 2017-10-25: It shouldn't be too difficult: dealing with multiple versions of libraries is something that CMake can do since a long time. Comment by gvdhoorn on 2017-10-25: Keep in mind though that 'the rest' of ROS Kinetic (ie: all libraries that you use) wi...
{ "domain": "robotics.stackexchange", "id": 29179, "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, catkin, boost, 3rd-party-package", "url": null }
newtonian-mechanics, angular-momentum, torque I want to tell myself that the answer is as simple as "sometimes objects are rotating around an axis and sometimes they're not, and you use generalized torque and angular momentum when objects are not just rotating around an axis." But that doesn't seem quite right, either...
{ "domain": "physics.stackexchange", "id": 23016, "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, angular-momentum, torque", "url": null }
matlab, filter-design, infinite-impulse-response, bandpass, biquad for ite=1:(no_of_sos) bpf_output=filter(num_coeff_ch1(ite,:),den_coeff_ch1(ite,:),bpf_output); end figure() plot(output) hold on plot(bpf_output,'c*'); signals=[output ;bpf_output]; error=signals(1,:)-signals(2,:); figure() plot(erro...
{ "domain": "dsp.stackexchange", "id": 11761, "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, filter-design, infinite-impulse-response, bandpass, biquad", "url": null }
proof-techniques, boolean-algebra By an axiom $0\vee \neg 0 = 1$. We know that either $\neg0=0$ or $\neg0=1$. We can't have $\neg0=0$ because $0\vee0=0$. So it must be the case that $\neg0=1$. Actually, let's check that: $0\vee 1=1$. Good.
{ "domain": "cs.stackexchange", "id": 3845, "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": "proof-techniques, boolean-algebra", "url": null }
### Exercise 4 If March sales will be up from February by 10%, 15%, and 20% at Place I, Place II, and Place III, respectively, find the expected number of hot dogs, and corn dogs to be sold in March. Hint: Let RR size 12{R} {} be a 1×31×3 size 12{1 times 3} {} matrix with entries 1.10, 1.15, and 1.20. Find RFRF size 1...
{ "domain": "cnx.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.970687766704745, "lm_q1q2_score": 0.8467769184742756, "lm_q2_score": 0.8723473680407889, "openwebmath_perplexity": 12164.371628068966, "openwebmath_score": 0.8118929862976074, "tags": null, ...
< ~_ Perform row reduction on matrix A by explicitly choosing row operations to use . A row operation can be "undone . " but this feature cannot b~ used in succession . This routine is for small matrices. r~al or complex . Use in the form _a > reduce reduce(A) rowop tol then pic(i,j) : X else pic(i.j) = blank is used ...
{ "domain": "silo.pub", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.97737080326267, "lm_q1q2_score": 0.8080039639783043, "lm_q2_score": 0.8267117876664789, "openwebmath_perplexity": 4465.94787859596, "openwebmath_score": 0.8407867550849915, "tags": null, ...
hamiltonian-formalism, hamiltonian, action, numerical-method, non-locality \tag{1}$$ This Hamiltonian has the associated Hamilton's equations of (as per Q. [2]) : $$ \dot{q}(\tau)=p(\tau),\,\dot{p}(\tau)=q(\tau) \tag{2}$$ -- [1] This question deals with the Legendre transform for non-local Lagrangian formulations. [...
{ "domain": "physics.stackexchange", "id": 20789, "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": "hamiltonian-formalism, hamiltonian, action, numerical-method, non-locality", "ur...
python, protein-structure, pdb, 3d-structure, biopython import numpy as np from Bio.PDB import PDBParser, PICIO, PDBIO ## Step 1 parser = PDBParser() structure = parser.get_structure("", "1enh.pdb") ## Step 2 structure.atom_to_internal_coordinates() chain = list(structure.get_chains())[0] ic_chain = chain.internal...
{ "domain": "bioinformatics.stackexchange", "id": 2251, "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, protein-structure, pdb, 3d-structure, biopython", "url": null }
python, python-3.x, genetic-algorithm cut = random.uniform(0, total_fitness) partial_fitness = 0 idx = 0 while partial_fitness < cut: partial_fitness += self.__pool[idx].fitness idx += 1 return self.__pool[idx] if idx < len(self.__pool) else self.__pool[self.__...
{ "domain": "codereview.stackexchange", "id": 39507, "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, genetic-algorithm", "url": null }
python, csv def test_variable(variable): with open('source.csv', 'r') as source: source_r = csv.reader(source, delimiter=';') sir_s, nic_s, comp_s = set_up_file(source_r, variable) line_s = next(source_r) with open('tested.csv', 'r') as tested: tested_r = csv.reader(test...
{ "domain": "codereview.stackexchange", "id": 32671, "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, csv", "url": null }
python, strings, programming-challenge, python-2.x Here's my take on the same program: def lengthOfLongestSubstring(self, word): if not word: return 0 currentLength = 1 longest = 1 lastSeen = {word[0] : 0} i = 1 while i < len(word): letter = word[i] if letter in last_seen: ...
{ "domain": "codereview.stackexchange", "id": 31119, "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, strings, programming-challenge, python-2.x", "url": null }
java, performance, image initial spike in CPU 65%, then less than 40%. GC negligible. the only thing to dwell on is heap graph. Consumption is too jumpy.
{ "domain": "codereview.stackexchange", "id": 16809, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, performance, image", "url": null }
ros, rosjava, network RosValues.this_host is a string with my IP address, and the NodeExecutor gets initilized like this: private NodeMainExecutor nodeExecutor = DefaultNodeMainExecutor.newDefault(); Originally posted by Rabe with karma: 683 on 2014-11-21 This answer was ACCEPTED on the original site Post score: 2 O...
{ "domain": "robotics.stackexchange", "id": 20108, "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, rosjava, network", "url": null }
python, performance, file-system, neural-network, tensorflow Title: Speech Recognition Part 3: Training the Neural Network The last part of my speech recognition series: finally training my network. Here's the dataset I did it with (self-generated, small I know), and the code I used. After running this code (takes ...
{ "domain": "codereview.stackexchange", "id": 25587, "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, file-system, neural-network, tensorflow", "url": null }
algorithms, data-structures Title: Is there a simpler solution for this recuurence? Consider this recurrence relation, $$T(n)=T(n-\sqrt{n})+1$$ I try to show that $T(n)=O(\sqrt{n})$. Also, I read this link, but my question is, can I claim that, at each step $n$ decreased by at least $\sqrt{\frac{n}{2}}$ to reach $\fr...
{ "domain": "cs.stackexchange", "id": 19863, "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, data-structures", "url": null }
python, sorting, pandas If fixed is None just sort w.r.t given column_names. Else sort w.r.t given column_names but filter filter fixed indices. insert fixed at previous positions. def sort_values(df, column_names, ascending=False, fixed=None): if fixed is None: return df.sort_values(column_names, ascendi...
{ "domain": "codereview.stackexchange", "id": 40181, "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, sorting, pandas", "url": null }
c, strings, parsing, child-process, posix static int runCmd(const char *cmd) { const char *cp; pid_t pid; int status; struct command shellcommand[4]; const char **argv; int argc; int i = 0; char *token; char **new_argv; for (cp = cmd; *cp; cp++) { if ((*cp >= 'a') && (*c...
{ "domain": "codereview.stackexchange", "id": 19647, "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, strings, parsing, child-process, posix", "url": null }
python, python-3.x, game, combinatorics def __init__(self): self.workers = ["boatman", "farmer", "craftsman", "trader"] self.action_spaces = {'farmhouse': ActionSpace(["boatman", "craftsman"]), 'village': ActionSpace(["boatman", "craftsman"]), ...
{ "domain": "codereview.stackexchange", "id": 32600, "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, game, combinatorics", "url": null }
• Read the first chapter of Michael Greenacre's Biplots in Practice. Then read the rest of it when you understand that much! It is in essence a demonstration of how to do the type of interpretation from a biplot that you are asking for. – Andy W Aug 20 '12 at 18:03 • Hi Matt. Some variants of this question are repeated...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. Yes\n2. Yes", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.972830768464319, "lm_q1q2_score": 0.8042506616173591, "lm_q2_score": 0.8267117855317474, "openwebmath_perplexity": 364.8402834808984, "openwebmath_score": 0.8664266467094421, "tags...
general-relativity, gravity, metric-tensor, symmetry, stress-energy-momentum-tensor My proposed strategy is analogous to the derivation of the Kerr metric, but where $r$ changes with time instead of $\phi$. I anticipate having to derive the 4 diagonal elements of the metric in addition to two identical d$r$d$t$ and $\...
{ "domain": "physics.stackexchange", "id": 93007, "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, gravity, metric-tensor, symmetry, stress-energy-momentum-tenso...
rosjava Originally posted by damonkohler with karma: 3838 on 2012-05-10 This answer was ACCEPTED on the original site Post score: 0 Original comments Comment by safzam on 2012-05-10: Thanks. I have a topic t1 which bublishes strings "yes" and sometimes "no". Another topic t2 publishes string "why" only when t1 bublis...
{ "domain": "robotics.stackexchange", "id": 9270, "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 }
Hint: Bioche's rules suggest to use the substitution $$u=\tan x,\;\mathrm d u=\sec^2 x\,\mathrm dx$$ to obtain a polynomial in $$u$$. • Hi most kind Bernard. When you have a bit of your time, can you edit my question math.stackexchange.com/questions/3388691/… to have it more clear, please?. I will remove my comment w...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9553191259110589, "lm_q1q2_score": 0.8081449879254338, "lm_q2_score": 0.8459424353665382, "openwebmath_perplexity": 477.0305120914271, "openwebmath_score": 0.7874348163604736, "tag...
quantum-mechanics, variational-principle, variational-calculus Title: Variational Principle to find Energy Eigenfunctions In Quantum Mechanics one can estimate an upper bound for the ground state energy with the following functional: $$\mathcal{F}[\psi(x)] \equiv \int_{-\infty}^\infty \psi^*(x)\hat{H}\psi(x) \,\, dx ...
{ "domain": "physics.stackexchange", "id": 19854, "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, variational-principle, variational-calculus", "url": null }
a SS value of 5086. This is equivalent to the method numpy. R-squared, often called the coefficient of determination, is defined as the ratio of the sum of squares explained by a regression model and the "total" sum of squares around the mean. Squared differences between actual and predicted X values e. The sum of squa...
{ "domain": "nauticalsas.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9822876992225168, "lm_q1q2_score": 0.8098588108753705, "lm_q2_score": 0.8244619285331332, "openwebmath_perplexity": 608.7188237523523, "openwebmath_score": 0.7077962160110474, "ta...
wrf, wrf-chem, emissions Title: Spatial allocation of road emissions and unit conversion I have a grid shapefile that has a resolution of 1km x 1km. This grid is then used to spatially allocate road emissions. My goal is to get the emissions in the unit: μg m-2 s-1(microgram per square meter per second) since this i...
{ "domain": "earthscience.stackexchange", "id": 1888, "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": "wrf, wrf-chem, emissions", "url": null }
java, comparative-review, rest, spring @NotBlank @Column(name = "description", nullable = false, columnDefinition = "text") private String description; @NotNull @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "account_id", nullable = false, updatable = false) private Account owner; ...
{ "domain": "codereview.stackexchange", "id": 44680, "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, comparative-review, rest, spring", "url": null }
quantum-state, density-matrix, fidelity $$ However, we also have that $$ \text{Tr}(\rho\sigma)=\lambda_1^2+\lambda_2^2 $$ and $$ \text{det}(\rho\sigma)=\lambda_1^2\lambda_2^2, $$ so $\sqrt{\text{det}(\rho\sigma)}=|\lambda_1\lambda_2|$. So, that proves the relation specifically for $2\times 2$ matrices. As you stated, ...
{ "domain": "quantumcomputing.stackexchange", "id": 2784, "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, density-matrix, fidelity", "url": null }
c++, algorithm, comparative-review, random std::random_device rd{}; std::random_device::result_type seed = rd(); ArrayProbabilityDistribution<int> prob_dist1{seed}; LinkedListProbabilityDistribution<int> prob_dist2{seed}; BinaryTreeProbabilityDistribution<int> prob_dist3{seed}; prob_dist1.add_ele...
{ "domain": "codereview.stackexchange", "id": 27192, "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++, algorithm, comparative-review, random", "url": null }
$k=272728$ gives $$(8)\,7+(90904)\,11=1000000$$ $k=285714$ gives $$(142854)\,7+(2)\,11=1000000$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9744347853343059, "lm_q1q2_score": 0.8675336673701763, "lm_q2_score": 0.8902942304882371, "openwebmath_perplexity": 135.12573048093154, "openwebmath_score": 0.9516299962997437, "ta...
complexity-theory, turing-machines, reductions you do the same with $M_2$: run $w$ steps on each of the first $w$ inputs, and verify everything works, or reject otherwise if all checks pass - accept. Otherwise reject. The idea is the following: as long as $M_1$ and $M_2$ behave the same, you will keep accepting all $...
{ "domain": "cs.stackexchange", "id": 5037, "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": "complexity-theory, turing-machines, reductions", "url": null }
gazebo-model, gazebo-tutorial Originally posted by baiju on Gazebo Answers with karma: 15 on 2015-06-14 Post score: 0 In that tutorial, you're making a model which can be placed anywhere in the world, so you don't need to worry about the world coordinates there. Each pose is described with respect to the parent eleme...
{ "domain": "robotics.stackexchange", "id": 3781, "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-model, gazebo-tutorial", "url": null }
python, sorting You can split up the definition of line_numbers into a parse_line function if that nesting is too much for you to read. Your input is 1-indexed but python is 0-indexed. Quit using element-1 everywhere and fix it earlier on. This makes the code slightly longer but more readable and less error-prone. sor...
{ "domain": "codereview.stackexchange", "id": 42199, "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, sorting", "url": null }
The side tiles have 3 ways to move The middle tiles have 4 ways to move 2 3 3 2 2 3 3 3 2 ... 3 4 4 3 3 4 4 4 3 3 4 4 3 3 4 4 4 3 2 3 3 2 3 4 4 4 3 2 3 3 3 2 Then the formula for different ways to make a $2048$ tile on $(n * n)$ square of $1024$ tiles is: $4 * 2 + (n - 2) * 3 * 4 + (n ...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.97364464868338, "lm_q1q2_score": 0.8543505691166549, "lm_q2_score": 0.8774767778695834, "openwebmath_perplexity": 325.9555225890064, "openwebmath_score": 0.4534560441970825, "tags"...
python, python-3.x, computational-geometry def anglerad(self, V): ''' Returns the angle for 2 vectors in radians mode.''' angle = acos(self.inner(V) / (self.norm() * V.norm())) return angle def angledeg(self, V): ''' Returns the angle for 2 vectors in radians mode.''' angle...
{ "domain": "codereview.stackexchange", "id": 7496, "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, computational-geometry", "url": null }
geophysics, climate-change, glaciology The 3 primary drivers do seem to fit past ice ages. The the Andean-Saharan ice age period 425-450 million years ago, CO2 levels were much higher but that long ago the sun was perhaps 3%-4% less luminous and much of the land was over the antarctic circle.
{ "domain": "earthscience.stackexchange", "id": 540, "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": "geophysics, climate-change, glaciology", "url": null }
java, algorithm, state-machine while (scanner.hasNextLine()) { String line = scanner.nextLine(); if (line.trim().equals("end")) { break; } System.out.println(dfa.matches(line)); } } } Java 8 constructs The following function.putIfAbsent(star...
{ "domain": "codereview.stackexchange", "id": 19304, "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, state-machine", "url": null }
c++, performance, algorithm, sorting, reinventing-the-wheel Don't let reinventing-the-wheel prevent you from rewriting or reusing existing abstractions. Bottom-Up Merge Sort As Martin noted, this is a long function and really could benefit from one abstraction. template <typename RandIterator, typename Comparator...
{ "domain": "codereview.stackexchange", "id": 31776, "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, algorithm, sorting, reinventing-the-wheel", "url": null }
vba, ms-word With approvedby.Line .Visible = msoFalse End With Documents.Save NoPrompt:=True, _ OriginalFormat:=wdOriginalDocumentFormat objExcel.Quit Set exWb = Nothing End Sub Your code is basically just a series of sequential instructions, featuring many repeated blocks. Don't worry ...
{ "domain": "codereview.stackexchange", "id": 27178, "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": "vba, ms-word", "url": null }
differential-geometry, gauge-theory, differentiation, yang-mills, qft-in-curved-spacetime However, let's consider the transformation properties of $\psi(x+\epsilon)$. Under a gauge transformation we have that $$\psi(x+\epsilon) \rightarrow V(x+\epsilon)\psi(x+\epsilon) = \bigl( V(x) + \epsilon^\mu\partial_\mu V(x)\bi...
{ "domain": "physics.stackexchange", "id": 81368, "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": "differential-geometry, gauge-theory, differentiation, yang-mills, qft-in-curved-sp...
c++, performance, c++11, inheritance, casting template <typename First,typename Second,typename ... Rest> class ConstVisitor<First,Second,Rest...>:public ConstVisitor<First>,public ConstVisitor<Second,Rest...>{ public: }; template <typename T> class ConstVisitor<T>:public virtual ConstVisitorBase{ public: #ifdef VISI...
{ "domain": "codereview.stackexchange", "id": 26958, "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, c++11, inheritance, casting", "url": null }
electromagnetism, gravity, gravitational-waves, dark-matter Title: Dark matter and gravitation Dark matter does not interact with the electromagnetic force, however does interact with the gravitational force. Do we know if there are any big ‘clumps’ (like a star) of dark matter? If they exist (or could exist) would t...
{ "domain": "physics.stackexchange", "id": 70010, "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, gravity, gravitational-waves, dark-matter", "url": null }
measurement, bloch-sphere, probability As to the latter question, information can be encoded in $\phi$ because other measurements are sensitive to its value. It is true that measuring $|0\rangle$ and $|1\rangle$ does not give any information about $\phi$, but this information can be gleaned from a measurement in a bas...
{ "domain": "quantumcomputing.stackexchange", "id": 3356, "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": "measurement, bloch-sphere, probability", "url": null }
ros, roslaunch, ros-indigo Title: Error when running launch file Marker.launch I study book Programming Robots with ROS Morgan Quigley, Brian Gerkey & William D. Smart I try launch file in chapter14 stuckroom_bot markers.launch in this chapter14 robot is fetchbot, ros version is indigo markers.launch -when launch th...
{ "domain": "robotics.stackexchange", "id": 27431, "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-indigo", "url": null }
java, object-oriented, programming-challenge, design-patterns Test suite: import static org.assertj.core.api.Assertions.assertThat; import org.junit.Test; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; public class SchoolTest { private final School school = new Sch...
{ "domain": "codereview.stackexchange", "id": 19867, "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, object-oriented, programming-challenge, design-patterns", "url": null }
c#, graph, a-star In general, it's not great when exceptions can be thrown at multiple points in a program. So moving the validation of start and goal out of the graph traversal will be an improvement. Finally, InvalidOperationException doesn't seem an appropriate outcome in case the goal cannot be reached. If the goa...
{ "domain": "codereview.stackexchange", "id": 18977, "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#, graph, a-star", "url": null }
javascript Any additional style/optimization/security criticisms you all could offer would be appreciated as well. function callAJAX() {//async communication to server, sends query string(s), and expects a JSON response this.delay = null; this.buildXHR = function() {//overkill? var xhr = false; ...
{ "domain": "codereview.stackexchange", "id": 28403, "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", "url": null }
c++, programming-challenge, c++11, time-limit-exceeded, computational-geometry You could write something like: // https://codereview.stackexchange.com/questions/189441/solving-for-45-degree-angles-of-a-multi-vector-system #include <iostream> #include <vector> #include<cmath>
{ "domain": "codereview.stackexchange", "id": 29758, "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++, programming-challenge, c++11, time-limit-exceeded, computational-geometry"...
cc.complexity-theory, time-complexity For every $ε$, we get an $O(n^{2+ε})$ algorithm by hardcoding all sufficiently small nonhalting machines, and simulating the rest. Now, consider a Turing machine $M$ deciding the language. Let $M'$ (on the empty input) be an efficient implementation of the following: for $n$ in 1,...
{ "domain": "cstheory.stackexchange", "id": 4105, "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, time-complexity", "url": null }
quantum-mechanics, hilbert-space, density-operator, observables Title: Density operator in different bases This may sound like a silly question, and it probably arises from a weak understanding of the concept. What I was wondering is: given a density operator $\varrho=\sum_{i,j}p_{ij}|i\rangle\langle j|$, can we find ...
{ "domain": "physics.stackexchange", "id": 81792, "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, hilbert-space, density-operator, observables", "url": null }
vba, excel For i = 1 To chrCount With myCell.Characters(i, 1) decCol = .Font.Color If decCol <> decLastCol Then htmlTxt = htmlTxt & "<c=#" & fnGetCol(.Font.Color) & ">" decLastCol = decCol End If chrSiz = .Font.Size I...
{ "domain": "codereview.stackexchange", "id": 21559, "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": "vba, excel", "url": null }
data-structures, trees General case: an arbitrary tree To handle an arbitrary tree, we will first build a heavy-light decomposition of the tree. This expresses the edges of the tree as a union of (disjoint) heavy paths, plus some light edges; with the property that any path from the root to some leaf visits at most $...
{ "domain": "cs.stackexchange", "id": 12151, "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": "data-structures, trees", "url": null }
graphs, shortest-path Title: Modifies Dijkstra’s Algorithm to find the maximum cost path In a DAG and all weights are larger than 0. Is it possible to use a max heap to get the maximum cost? This will not work. Consider (a)-4->(b) (a)-1->(c) (b)-2->(d) (c)-6->(d) Looking for the max cost path from (a) to (d), the...
{ "domain": "cs.stackexchange", "id": 14785, "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, shortest-path", "url": null }
newtonian-gravity, simulations, computational-physics, numerical-method Edit: A parallel to what I am asking for is something similar to what is done in Kerbal Space Program, where the orbit is calculated ahead of time, except my game is in two dimensions. For two bodies this is relatively easy as the equations of mot...
{ "domain": "physics.stackexchange", "id": 77576, "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-gravity, simulations, computational-physics, numerical-method", "url":...
astrophysics, main-sequence, protostar, t-tauri-stars Title: Timescale of ignition of a protostar? What is the timescale of start of nuclear fusion as T Tauri type star transforms into a Main Sequence star? Wikipedia article on T Tauri type stars mentions: Their central temperatures are too low for hydrogen fusion. I...
{ "domain": "astronomy.stackexchange", "id": 99, "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": "astrophysics, main-sequence, protostar, t-tauri-stars", "url": null }
c++, parsing, console, boost #include "safe_queue.hpp" #include "message_queue.hpp" #include <boost/smart_ptr/shared_ptr.hpp> #include <boost/smart_ptr/weak_ptr.hpp> #include <string> #include <vector> // Forward Deceleration class Session; typedef boost::shared_ptr<Session> session_ptr; typedef boost::weak_ptr<Ses...
{ "domain": "codereview.stackexchange", "id": 18353, "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, console, boost", "url": null }
ros, gazebo-ros-control jaco.yaml marvin: jaco2_controller: type: effort_controllers/JointTrajectoryController joints: - jaco2_joint_1 - jaco2_joint_2 - jaco2_joint_3 - jaco2_joint_4 - jaco2_joint_5 - jaco2_joint_6 gains: jaco2_joint_1: {p: 500.0...
{ "domain": "robotics.stackexchange", "id": 29803, "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, gazebo-ros-control", "url": null }
sensors, differential-drive, precise-positioning Title: How to make my robot move parallel to edge of the table? I have an autonomous differential drive robot that moves on the floor and its purpose is to always move parallel to the longer edge of the table (just assume that the table never ends). It looks something l...
{ "domain": "robotics.stackexchange", "id": 2224, "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": "sensors, differential-drive, precise-positioning", "url": null }
Some example matrices matching your dimensions: m1 = Array[Subscript[a,##]&, {4,2}]; m2 = Array[Subscript[b,##]&, {4,4}]; m3 = Array[Subscript[c,##]&, {4,6}]; For example: m1 //TeXForm $$\left( \begin{array}{cc} a_{1,1} & a_{1,2} \\ a_{2,1} & a_{2,2} \\ a_{3,1} & a_{3,2} \\ a_{4,1} & a_{4,2} \\ \end{array} \right...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9518632288833653, "lm_q1q2_score": 0.8200665486033996, "lm_q2_score": 0.8615382165412809, "openwebmath_perplexity": 2654.86276327841, "openwebmath_score": 0.34897375106811523, "tag...
graphs, dag, path Title: Find every edge for which every s,t-path in a DAG goes through that edge Given a connected sourced/sinked directed acylic graph $G = (V, E \subseteq V^2, s \in V, t \in V)$, we want to enumerate the edges $e \in \mathsf{Bottleneck}(G) \subseteq E$ for which every $s$,$t$-path contains $e$. I d...
{ "domain": "cs.stackexchange", "id": 18127, "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, dag, path", "url": null }
bash Simplify case patterns In this code: case "$1" in "target1"|"target2"|"target3") target="$1" ;; You can use glob patterns to simplify that expression: case "$1" in "target"[1-3]) target="$1" ;; Why exit 0 at the end? The exit 0 as the last statement is strange: Bash will...
{ "domain": "codereview.stackexchange", "id": 43698, "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", "url": null }
• Thank you for this answer! Oct 1, 2013 at 7:57 • What is q here? I did not understand, how you came up with P=q.b-r. – V K May 12, 2020 at 5:40 • @VK $q$ is $\bigl\lceil\frac{P}{b}\bigr\rceil$. Since we're dealing with $\lceil\,\cdot\,\rceil$ and not with $\lfloor\,\cdot\,\rfloor$, instead of the usual division algor...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9886682468025243, "lm_q1q2_score": 0.8128722862132285, "lm_q2_score": 0.8221891305219504, "openwebmath_perplexity": 158.07915359525487, "openwebmath_score": 0.9018994569778442, "ta...
wavelet, time-frequency, cwt, visualization Above is rather generous for simplicity. Actually generic filterbank: Energy conservation: same, except now the lowest frequencies have a drastic spike, despite the filterbank plot not looking any different. == LP-SUM (with phi) ============================================...
{ "domain": "dsp.stackexchange", "id": 11668, "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": "wavelet, time-frequency, cwt, visualization", "url": null }
homework-and-exercises, electrostatics, electric-fields, vectors Title: Electric field a distance $z$ above the center of a circular loop. The Hard way Problem 2.5: Find the electric field a distance $z$ above the center of a circular loop of radius $r$ which carries a uniform line charge $\lambda$.
{ "domain": "physics.stackexchange", "id": 7954, "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, electrostatics, electric-fields, vectors", "url": null }
javascript, html, css, api, event-handling Solution I have created a small repo using some of your code examples and expanding on them as needed. I did not worry about styling or populating information on the page as the concern was regarding the click event. This line has what I believe you are looking for regarding...
{ "domain": "codereview.stackexchange", "id": 42775, "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, html, css, api, event-handling", "url": null }
ros, ubuntu-lucid, buiding-errors, ubuntu [ rosmake ] [ 27 of 130 Completed ] [rosmake-3] >>> rostest >>> [ make ] [rosmake-3] <<< rostest <<< [PASS] [ 0.59 seconds ] [ rosmake ] [ 28 of 130 Completed ] [rosmake-3] >>> bullet >>> [ make ] [rosmake-0] <<< std_msgs <<< [PASS] [ 3.36 seconds ] [ rosmake ] [ 29 of 130 ...
{ "domain": "robotics.stackexchange", "id": 5039, "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, ubuntu-lucid, buiding-errors, ubuntu", "url": null }
positional-astronomy, python, mathematics # lines of Right Ascention xvals = costh * np.cos(RAs)[:, None] yvals = costh * np.sin(RAs)[:, None] zvals = sinth + np.zeros_like(RAs)[:, None] for x, y, z in zip(xvals, yvals, zvals): plt.plot(x, y, z, '-r', linewidth=0.8) ax.set_xlim(-1.1, 1.1) ax.set_ylim(-1.1, 1.1) a...
{ "domain": "astronomy.stackexchange", "id": 6227, "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": "positional-astronomy, python, mathematics", "url": null }
electromagnetism, nuclear-physics, topology, fusion, nuclear-engineering Title: Nuclear Fusion: Why is spherical magnetic confinement not used instead of tokamaks in nuclear fusion? In nuclear fusion, the goal is to create and sustain (usually with magnetic fields) a high-temperature and high-pressure environment enou...
{ "domain": "physics.stackexchange", "id": 45449, "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, nuclear-physics, topology, fusion, nuclear-engineering", "url"...
newtonian-gravity, rotational-dynamics, acceleration, earth, centrifugal-force Title: Does Acceleration due to Gravity take into consideration the centrifugal acceleration due to Earth's spin? Is the gravitational acceleration we consider only the attraction due to the Earth's gravity or is it that of gravity plus the...
{ "domain": "physics.stackexchange", "id": 67436, "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-gravity, rotational-dynamics, acceleration, earth, centrifugal-force", ...
condensed-matter, electric-current, electrical-resistance, conductors, mean-free-path For example: Say Bob and Mary are the only two electrons in a material. Yep, the electrons have names - whatever. We time for $20$ seconds and find that Bob collided $300$ times while Mary collides $260$ times. That means that Bob is...
{ "domain": "physics.stackexchange", "id": 56540, "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": "condensed-matter, electric-current, electrical-resistance, conductors, mean-free-p...
python, natural-language-processing if sum_english_words / number_words > REQUIRED_ENGLISH_PERCENTAGE: print "Dictionary says English" result.append(sentence) continue if is_english is not None and not is_english: print "French!" else: print "Couldn't decide" return res...
{ "domain": "codereview.stackexchange", "id": 25617, "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, natural-language-processing", "url": null }
beginner, objective-c, ios @end NotesListViewController.m: #import "NotesListViewController.h" #import "Note.h" #import "CreateNotesViewController.h" @interface NotesListViewController () @property (nonatomic, strong) NSMutableArray *notes; @property (nonatomic) NSInteger editedRow; @end @implementation NotesList...
{ "domain": "codereview.stackexchange", "id": 7180, "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, objective-c, ios", "url": null }
ros, rviz, markers, markers.rviz, ros-indigo If you still have any question, just take a look at the video. Cheers. Originally posted by Ruben Alves with karma: 1038 on 2018-01-13 This answer was ACCEPTED on the original site Post score: 2 Original comments Comment by pmuthu2s on 2018-01-13: Hey thanks alot!Video wa...
{ "domain": "robotics.stackexchange", "id": 29727, "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, rviz, markers, markers.rviz, ros-indigo", "url": null }
javascript, game, canvas Stay up to date, especially when you are learning. Writing a snake game A snake game is has deceptively simple code complexity, however as the length of the snakes body grows the amount of work needed to update each frame of the animation quickly becomes overwhelming for the CPU. Looking at yo...
{ "domain": "codereview.stackexchange", "id": 44793, "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, canvas", "url": null }
design, gears I've uploaded to GetHub using the MIT license. If I think this useful, maybe others will also. The user interface needs a lot of work, gear params are still hard coded. Only these two files have any thing to do with gears. gear_gen.h gear_gen.cpp The rest is a CAD drawing interface. Thanks again Sprocket...
{ "domain": "engineering.stackexchange", "id": 1213, "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": "design, gears", "url": null }
$$\mathrm{dist}(F;St_+(n,k))$$ Where $St_+(n,k)$ is the set of $n\times k$ matrices whose columns are nonnegative and orthonormal. If we drop orthonormal condition and compute $\mathrm{dist}(F;\mathbb{R}^{n\times k }_+)$, we obtain $\|F^-\|$ as a lower bound for the above distance. In this term, my question is as foll...
{ "domain": "mathoverflow.net", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9912886163143679, "lm_q1q2_score": 0.8385731120112795, "lm_q2_score": 0.8459424411924673, "openwebmath_perplexity": 284.3626262897365, "openwebmath_score": 0.9735598564147949, "tags...
objective-c, combinatorics, reflection Enumerator.m @implementation Enumerator + (void)enumerateAllStringCombinationsInSet:(NSString*)set toMaximumLength:(NSInteger)maximumLength withBlock:(void(^)(NSString *string))actionBlock { const char *charSet = [set UTF8String]; NSInteger i, j, k; NSInteger setLe...
{ "domain": "codereview.stackexchange", "id": 16052, "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": "objective-c, combinatorics, reflection", "url": null }
gazebo-tutorial Comment by David Jeang on 2013-06-28: I've actually upgraded as I've made some progress on a different machine with 2.6, I have a new problem now that is right here:http://answers.gazebosim.org/question/3395/sdf-version-problems-cause-drcsim26-and-gazebo18/.this topic is still open though. Comment by D...
{ "domain": "robotics.stackexchange", "id": 3291, "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-tutorial", "url": null }
$$a = |OA| = \sqrt{1^2 + 5^2 + 7^2} = \sqrt{75} = 3 \sqrt{5}$$ $$b = |AB| = \sqrt{(10-1)^2 + (10--5)^2 + (5--7)^2} = \sqrt{450} = 15\sqrt{2}$$ $$c = |BO| = \sqrt{10^2+10^2+5^2} = 15.$$ Now you can calculate the semiperimeter $$s$$ which is just $$\frac{1}{2} \left(3 \sqrt{5} + 15 \sqrt2 + 15 \right)$$, and use Heron...
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9744347868191549, "lm_q1q2_score": 0.8243157328830105, "lm_q2_score": 0.8459424314825853, "openwebmath_perplexity": 265.14871407340377, "openwebmath_score": 0.8221341967582703, "ta...
digital Title: What is databending and how does it actually work? http://www.google.com/search?q=databending It is, from what I understand, opening images as audio, applying effects, exporting back as image and voila! glitch-art Example: credit But how does it really work? How/what change in frequencies(?) affect th...
{ "domain": "dsp.stackexchange", "id": 1191, "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": "digital", "url": null }
homework-and-exercises, special-relativity, tensor-calculus, conventions \\ &= v^i \left( \sum_{l=1}^nw_l w^l \right) v_j &&\text{by associativity } \\ &= v^i n v_j &&\text{since $\textstyle w_l w^l = \delta^l_l = \sum_{l=1}^n 1=n$} \\ &= n \delta ^i_j \end{aligned} $$ so it implies $\delta^i_j = 0 $ which is definit...
{ "domain": "physics.stackexchange", "id": 89762, "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, special-relativity, tensor-calculus, conventions", "url"...
ros-kinetic Title: Build a a own navigation using RVIZ for initial and goal position Hey guys, I am right now trying to build up my own navigation solution. I succesfully made it to let my robot start from a initial to a goal position using my own navigation algo. Now I am trying to use RVIZ for setting the initial a...
{ "domain": "robotics.stackexchange", "id": 33894, "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 }
If $f(x)=a_0+a_1x+\cdots+a_nx^n$, it follows from the interpolation conditions that the coefficients are the solution of the linear system $A\mathbf{x}=\mathbf{b}$, where $A=(x_i^j)$ (the element of $A$ at row $i$ and column $j$ is $x_i^j$), $\mathbf{b}=(y_i)$ and $\mathbf{x}$ is the vector of unknowns $a_0,\ldots,a_n$...
{ "domain": "sagemath.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.978712650690179, "lm_q1q2_score": 0.8728267493810961, "lm_q2_score": 0.8918110425624792, "openwebmath_perplexity": 721.4770406587977, "openwebmath_score": 0.7643385529518127, "tags": nu...
php, unit-testing, cache $this->assertSame(true, DatenCache::save("testCacheInvalidateWithParams", $aKonfigEins, $sTestStringEins)); $this->assertSame(true, DatenCache::save("testCacheInvalidateWithParams", $aKonfigZwei, $sTestStringEins)); DatenCache::invalidate("testCacheInvalidateWithParams", $aKonf...
{ "domain": "codereview.stackexchange", "id": 653, "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, unit-testing, cache", "url": null }
general-relativity, gravity, string-theory Given that both have very different assumptions, what do string theorists mean when they say string theory agrees with general relativity in a classical limit? Or more specifically, how does string theory--a fix spacetime background theory-- reconciles with the general relati...
{ "domain": "physics.stackexchange", "id": 8489, "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, gravity, string-theory", "url": null }
electromagnetism, condensed-matter, solid-state-physics, superconductivity, gauge In your answer, you argue that in any gauge which satisfies this condition, $\nabla^2\theta \propto \nabla\cdot j$, which vanishes if the condensate wavefunction is time-independent, which is true. However, you then argue that $\nabla\th...
{ "domain": "physics.stackexchange", "id": 92144, "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, condensed-matter, solid-state-physics, superconductivity, gauge"...
c#, regex, numbers-to-words public string BuildNumberTextOf(decimal value) { var match = regex.Match(Convert.ToString(value)); var sb = new StringBuilder(); foreach (var group in groups) { var capturedValue = match.Groups[group].Value.TrimStart(n...
{ "domain": "codereview.stackexchange", "id": 27321, "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#, regex, numbers-to-words", "url": null }
opencv2 Comment by KDROS on 2014-11-17: try { cv::imshow("view", cv_bridge::toCvShare(msg,"bgr8")->image); cv_ptr = cv_bridge::toCvCopy(msg, enc::BGR8); if ( cv::imwrite("//home//keshav//image.jpg",cv_bridge::toCvShare(msg, "bgr8")->image) ) { ROS_INFO( "Returned true2" ); } else { ROS_INFO( "Returned false2" ); } } C...
{ "domain": "robotics.stackexchange", "id": 20036, "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": "opencv2", "url": null }
optics, electromagnetic-radiation, laser, lenses, experimental-technique You have two options -- you can use multiple lenses (one lens to collimate, then a pair of lenses to step it up to a larger beam width), or you could also get ok results from using a Fresnel lens -- one that is fairly close to what you need is he...
{ "domain": "physics.stackexchange", "id": 19354, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics, electromagnetic-radiation, laser, lenses, experimental-technique", "url"...
electromagnetism, photons, electrons, maxwell-equations, protons Title: How Can Maxwell's Equations Describe Both Photons and Electrons/Protons? As an analogue to an existing question about how Maxwell's equations and photons relate [1], I'm curious how Maxwell's equations relate to charged particles, e.g. electrons a...
{ "domain": "physics.stackexchange", "id": 84642, "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, photons, electrons, maxwell-equations, protons", "url": null }
c Then use it like so: for (int i = 0; i < n_denominations; i++) { count = 0; while (number >= denominations[i]) { count++; number -= denominations[i]; } printf("%d nota(s) de R$ %d,00\n", count, denominations[i]); }
{ "domain": "codereview.stackexchange", "id": 40220, "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 }
polygon is two-dimensional! Of one side needs to be known the denominator will have for times the tangent of power five. As the Octagon within ( the vertices of a regular pentagon has at least one vertex pointing inside then... Rectangle, pentagon, the pentagon IHS, and hexagons are all examples of are. All the sides a...
{ "domain": "hotexl.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9884918509356967, "lm_q1q2_score": 0.812727261909032, "lm_q2_score": 0.8221891370573388, "openwebmath_perplexity": 445.53768278060596, "openwebmath_score": 0.7381290793418884, "tags":...
bash, shell FLIST=file_paths_list.txt COUNTER=0 PIDS=() cat ${FLIST} | while read F; do COUNTER=$((COUNTER + 1)) echo COUNTER $COUNTER sleep 1 scp ${F} root@host:/data/tmp & PID=$! echo Adding PID $PID PID...
{ "domain": "codereview.stackexchange", "id": 5684, "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, shell", "url": null }
c#, programming-challenge, primes if (localSubset[localSubset.Length - 1] != null) { return localSubset; } n++; } } startingIndex++; digits = number.ToString().ToCharArray(); ...
{ "domain": "codereview.stackexchange", "id": 21223, "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#, programming-challenge, primes", "url": null }
python, pandas Or you can use functools.partial with your clean_df: from functools import partial df.groupby('id') \ .apply(partial(clean_df, v_col='value', other_col='other_value')) \ .reset_index(level=0, drop=True)
{ "domain": "codereview.stackexchange", "id": 34112, "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, pandas", "url": null }
For each $\alpha$, let $V_\alpha$ be an open subset of $X$ such that $U_\alpha=V_\alpha \cap Y$. We can now conclude: for every point $t_\alpha$ of $Y$, there exists an open set $V_\alpha$ containing $t_\alpha$ such that $V_\alpha$ contains only countably many points of $Y$. This is the negation of condition 3. $\black...
{ "domain": "wordpress.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9850429107723176, "lm_q1q2_score": 0.8372580846858609, "lm_q2_score": 0.8499711794579723, "openwebmath_perplexity": 128.38624810648136, "openwebmath_score": 0.9707801342010498, "tags":...
optics, waves, photons, polarization, instrument &=& R[\omega t + \varphi_0] \hat{e}_x \end{eqnarray} where $R[\theta]$ is a rotation matrix that rotates by an angle $\theta$ in the $xy$ plane. You can see that the direction of the polarization vector rotates around with a frequency $\omega$, the same as the frequency...
{ "domain": "physics.stackexchange", "id": 80720, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "optics, waves, photons, polarization, instrument", "url": null }
c#, mathematics, reinventing-the-wheel By just setting d[x] = rows[j][x] before the if statement you could reduce this to d[x] = rows[j][x]; if (rows[j][i] != 0) { d[x] = d[x] / rows[j][i]; } The same should be done for if (rows[y][i] != 0) { f[g] = rows[y][g] - rows[i][g]; } else { f[g] = rows[y][g...
{ "domain": "codereview.stackexchange", "id": 11967, "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#, mathematics, reinventing-the-wheel", "url": null }