text
stringlengths
1
1.11k
source
dict
homework-and-exercises, fluid-dynamics, pressure, gauge $$p = p_0 - \rho g h,$$ where $p_0$ is the pressure at $h=0$ (e.g. the pressure at sea level). As you go up, $h$ increases and therefore the pressure decreases, which physically corresponds to the fact that there is a shorter column of fluid at higher heights. Clearly, when there is no more fluid on top the $p$ must be zero, which leads to the equation $$p_0 = \rho g h$$ in $h$, and the solution is the total height of fluid.
{ "domain": "physics.stackexchange", "id": 18900, "lm_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, fluid-dynamics, pressure, gauge", "url": null }
strings, vba, excel, formatting For Each r In JHACheck.Range("M35:M41") v = r.Value If v <> "" Then If Not r.HasFormula Then r.Value = Trim(v) End If End If Next r For Each r In JHACheck.Range("R35:R41") v = r.Value If v <> "" Then If Not r.HasFormula Then r.Value = Trim(v) End If End If Next r The small amount of data doesn't merit the use of arrays. I agree with R. Roe comment on combining the Ranges. But first: V is a very unhelpful helper variable, I would get rid of it. Personally, I use r to iterate rows row, c to iterate columns and cell to iterate cells in a Range Techiniquelly, the two if statements are more efficient than combining a single If statement. Realistically, it will not make a noticeable difference with your code. I would combine the Ifs and save the clutter.
{ "domain": "codereview.stackexchange", "id": 34368, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "strings, vba, excel, formatting", "url": null }
c#, validation UPDATE (based on comment): As for the displaying exception contents to UI, a better approach would be separate save and validate operation, and use validation result to change UI state, so the Save operation is not allowed in the first place when model is not valid. For example, you could disable the save button. Then you don't need to handle validation exception in Save method. I strongly encourage you to reconsider the practice of displaying exception contents to user. Let me reiterate - non-valid user input should be considered as normal program flow, not en exceptional situation. Consider the following: Is it a vulnerability to display exception messages in an error page? So i would recommend the following workflow: When initializing a form, update the ui based on validation result. Handle every change to the model in the ui:
{ "domain": "codereview.stackexchange", "id": 9506, "lm_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#, validation", "url": null }
# How do I find the minimum and maximum of a multivariable function given two constraints? Find the minimum and maximum of $$f(x, y, z) = y + 4z$$ subject to two constraints, $$3x + z = 5$$ and $$x^2 + y^2 = 1$$. Having a hard time figuring out how to do this problem. I think I'm doing it right but I can't seem to get the correct answer in exact terms. Here's what I got so far (the labels are respectively up and down is left to right so $$g(x,y,z)=3x+z=5$$: $$f_x = g_xλ + h_x\delta$$ $$f_y = g_yλ + h_y\delta$$ $$f_z = g_zλ + h_z\delta$$ $$0 = (3)λ + (2x)\delta$$ $$1 = (0)λ + (2y)\delta$$ $$4 = (1)λ + (0)\delta$$ After doing the calculations I get $$λ = 4$$. Now I solve for $$x$$ and $$y$$ by plugging in that value into the equations. I get: $$x=-\frac{6}{\delta}$$ $$y=\frac{1}{2\delta}$$ Then I plug it into $$f(x,y,z)$$ and get: $$\frac{6}{\delta}^2+\frac{1}{2\delta}^2=1$$ $$\delta = \frac{\sqrt{(145)}}{2}$$ So solving for $$x$$ and $$y$$ again:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9732407199191508, "lm_q1q2_score": 0.8152058521881155, "lm_q2_score": 0.8376199592797929, "openwebmath_perplexity": 252.6227830051991, "openwebmath_score": 0.8149281144142151, "tags": null, "url": "https://math.stackexchange.com/questions/3859767/how-do-i-find-the-minimum-and-maximum-of-a-multivariable-function-given-two-cons/3859807" }
ruby, unit-testing, sorting def checkArguments(stack) stack.each do |element| if element.class != Float && element.class != Fixnum raise ArgumentError, "element detected in stack that is not an integer or double" end end end def iterateThroughStack(stack) newstack = [] currentElement = stack[0] for i in (1...stack.length) if currentElement < stack[i] newstack.push(currentElement) currentElement = stack[i] else newstack.push(stack[i]) end end newstack.push(currentElement) end end Then, after reading about Test Driven Development, I started using this practice and since then, I think code makes more sense with unit tests. So below are the unit test I wrote: require 'test/unit' require 'lib/Sorter' class Test_Sorter < Test::Unit::TestCase def setup @sorter = Sorter.new end def test_emptyStack stack = [] assert_equal(stack, @sorter.sort(stack), "sorting empty stack failed") end
{ "domain": "codereview.stackexchange", "id": 1793, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ruby, unit-testing, sorting", "url": null }
hydrology, soil, soil-moisture The hydraulic diffusivity you search for is then written as $$D = \frac{K}{S}$$ where S is the water storage fraction, with $S \sim \Theta$ (not strictly correct). So in a way this just cancels the $\Theta$ in $K$ and appears in the pressure diffusion equation: $$ \partial_t P = D \Delta P $$ and therefore D gives the local diffusion speed of pressure disturbances (which is interestingly not the speed of sound $c_s$ in aquifers!) We could now say, for educatory purposes that the difference between $K$ and $D$ is only $\Theta$. This makes sense when we look at the context where those two parameters appear: $K$ gives the strength of mass-flow for the fluid, the better filled the volume is, the more mass will flow. Pressure, however does not care for the amount of water that flows, as it exists everywhere where water is sitting at a given moment, so the coefficient for its propagation does not depend on the filling of volume. You can look up the derivations for example here.
{ "domain": "earthscience.stackexchange", "id": 262, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "hydrology, soil, soil-moisture", "url": null }
phase Complex quantization noise (using two real A/D converters in practice; one for the I channel and the other for the Q channel) will also be well approximated by a white noise process where in this case the phase is uniformly distributed as above but unlike the thermal noise example given above where the signed amplitude was approximated as Gaussian distributed, the amplitude for quantization noise is also uniformly distributed over a quantization level.
{ "domain": "dsp.stackexchange", "id": 10110, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "phase", "url": null }
python, beginner, web-scraping, beautifulsoup f.writelines("%s\n" % l for l in tfinalists) There are several layers of non-ideal decisions in the design of this program, so let's peel them off: Layer 1 Assuming that the data-gathering approach is good as-is, which it isn't - but we'll get to that later. Application Design I don't think it's a good idea to chdir() to a hard-coded directory, particularly one in Users. Either accept this as a parameter, or don't do it at all and assume that the current working directory is already correct. if len(diff)<0 makes no sense because a collection length can never be negative. Assuming that this application works correctly, that entire block can be deleted because it will never evaluate to True. Basic Python Move global imperative code into functions. Add PEP484 type hints. Format your Python via PEP8 (get a linter or IDE to suggest how this is done). Put file operations in a context manager, and don't explicitly close; guarantee the close call via with.
{ "domain": "codereview.stackexchange", "id": 43567, "lm_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, beginner, web-scraping, beautifulsoup", "url": null }
python, beginner, python-3.x, tic-tac-toe # Fork: Create an opportunity where the p1ayer has two ways to win (two non-blocked lines of 2). # Blocking an opponent's fork: If there is only one possible fork for the opponent, the p1ayer should block it. Otherwise, the p1ayer should block all forks in any way that simultaneously allows them to create two in a row. # Center: A p1ayer marks the center. # Opposite corner: If the opponent is in the corner, the p1ayer p1ays the opposite corner. # Empty corner: The p1ayer p1ays in a corner square.
{ "domain": "codereview.stackexchange", "id": 43553, "lm_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, beginner, python-3.x, tic-tac-toe", "url": null }
c#, design-patterns, monogame Along with this one: spriteBatch.DrawString(UI.Font, string.Format("Test"), new Vector2(20, 50), Both in ItemBehavior. This isn't a very OOP way of tackling the problem: public static class UI In my opinion you have the dependency upside down, with the model depending on the UI. I would reverse that dependency and let the UI depend on the model; the application logic does not need to know there's a UI in the picture. Now if you wanted to write a unit test for the Behavior classes, I'd be stuck with this static method call that's running code in another assembly. The solution is in the constructor: public ItemBehavior() { UI.SubscribeToUIDraw(PrintUi); isDrawn = false; }
{ "domain": "codereview.stackexchange", "id": 15833, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, design-patterns, monogame", "url": null }
fft, zero-padding This is not an option: X_zeros = [X,zeros(10000,1,41)] because I assign X_zeros to other matrices with only $2$ dimensions. Is there a way? When you sum a three dimensional array over the third dimension, the size is automatically reduced by one: a = rand(2,3,4); % a random 3-d array b = sum(a,3); % sum over the third dimension: the size of b becomes 2 by 3 So the first solution to this is to form the original array with size $10000\times41\times2$ from the beginning (if it is not difficult). If it is not straightforward, there are two options.
{ "domain": "dsp.stackexchange", "id": 4613, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "fft, zero-padding", "url": null }
python, beginner, algorithm, sorting, complexity def bubble_sort_exlinks(self): ... while end != self.start.link: r = p = self.start while p.link != end: q = p.link if p.info > q.info: p.link = q.link q.link = p if p != self.start: r.link = q.link else: self.start = q p, q = q, p r = p p = p.link end = p This is rather complex. I could use some comments to explain the loop invariants and the meanings of p,q,r. def merge1(self, list2): """ Merges two already sorted single linked lists by creating new lists """ merge_list = SingleLinkedList() merge_list.start = self._merge1(self.start, list2.start) return merge_list def _merge1(self, p1, p2): """ Private method of merge1 """ if p1.info <= p2.info:
{ "domain": "codereview.stackexchange", "id": 35746, "lm_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, beginner, algorithm, sorting, complexity", "url": null }
python, python-2.x, template, properties This way, __getattr__ is only called the first time self.environment is accessed and never again. But... Hold on... The only usefull method of this class is __call__... Better write a function instead; this will bring the check back at each call but will make the intent clearer: def load_template(template_name): if not hasattr(load_template, 'environment'): cwd = os.path.dirname(os.path.abspath(__file__)) madlib_dir = os.path.join(cwd, '..', 'templates', 'madlib') loader = jinja2.FileSystemLoader(searchpath=madlib_dir) load_template.environment = jinja2.Environment(loader=loader) return load_template.environment.get_template(template_name)
{ "domain": "codereview.stackexchange", "id": 24578, "lm_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-2.x, template, properties", "url": null }
Yes, it's as you say for a set of one element. The logic is unambiguous - it is true that "whenever condition, result". This shows the importance of considering the set/domain/etc. for definitions like these. I strongly suspect this particular example isn't very interesting though! • Merely a specific example regarding general vs specific criteria to address a general question of mine. Thanks, I'll be sure to note the domain during my final exam tomorrow. :) – GotterdammerunG Apr 22 '13 at 21:12
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9511422199928904, "lm_q1q2_score": 0.8158594630776803, "lm_q2_score": 0.8577681086260461, "openwebmath_perplexity": 395.2899359312661, "openwebmath_score": 0.728226900100708, "tags": null, "url": "https://math.stackexchange.com/questions/369716/equivalence-relation-proofs-general-or-specific" }
inorganic-chemistry, home-experiment, extraction The "thermite reaction" between iron oxides and aluminum under heat is another well-known method of separating the iron and oxygen. The rust and aluminum powder, given some initiating heat, will exchange the oxygen to form alumina (Al2O3) and pure iron, and enough heat to keep the reaction going (with plenty to spare; a thermite reaction is too bright to watch without a welder's mask and in fact is used in some situations to weld iron). Two problems with this; first, it's illegal in the US to make thermite without BATFE approval, and second, the reason it works at all is because aluminum oxide is ridiculously stable, more so than iron oxide, and so it takes even more energy to reduce the oxide back down to the raw metal (about 8.2 kWh/kg for aluminum, theoretical, versus 2.25kWh/kg for iron). This is evidenced by the highly exothermic nature of the thermite reaction itself; if creating aluminum oxide produces far more than enough heat to smelt the iron to get the oxygen, think of how
{ "domain": "chemistry.stackexchange", "id": 14829, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, home-experiment, extraction", "url": null }
inorganic-chemistry, electronegativity Firstly, let's use the equations for the two scales to explain why the halogen electronegativity orders are different: Pauling electronegativity is essentially based on the idea that an atom's electronegativity can be defined by the degree to which it polarizes bonds. Pauling's theorem states that the difference between the experimental bond dissociation enthalpy (BDE) of two atoms and the geometric mean of the BDE of each of those atoms' covalent homonuclear bonds is proportional to the two atoms' difference in electronegativity: $$\Delta=|\chi_{\ce{A}}-\chi_{\ce{B}}|\propto|BDE_{\ce{A-B}}-\sqrt{D_{\ce{A-A}}\cdot D_{\ce{B-B}}}|$$
{ "domain": "chemistry.stackexchange", "id": 6820, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, electronegativity", "url": null }
This is connected to the "Pythagorician comma". (https://en.wikipedia.org/wiki/Pythagorean_comma). Very related : (http://www.math.uwaterloo.ca/~mrubinst/tuning/12.html) • I know the definition of continued fractions, but I never thought it had a link to rational approximation. Oct 20, 2017 at 8:00 • That makes senses since there are 12 musical notes. Oct 20, 2017 at 8:15 • see as well (math.stackexchange.com/q/11669) Oct 20, 2017 at 8:50 • Related (andrewduncan.net/cmt) Oct 20, 2017 at 10:49 • Each term in the continued fraction ($a_n$) corresponds to a convergent. You are giving the "semiconvergents" when you include $\frac53$ and $\frac{11}7$. For their denominators, these are not as close to the number being approximated as the convergents. – robjohn Oct 20, 2017 at 14:11 Here I have written different things in different parts; the first and third are related to each other:
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9724147201714923, "lm_q1q2_score": 0.8284514418700811, "lm_q2_score": 0.8519527982093666, "openwebmath_perplexity": 695.4143125703824, "openwebmath_score": 0.7083476185798645, "tags": null, "url": "https://math.stackexchange.com/questions/2481119/example-of-a-power-of-3-which-is-close-to-a-power-of-2-related-to-music-theory/2481206" }
navigation, rostest, gtest, actionlib, move-base //wait for the action server to come up while(!ac_.waitForServer(ros::Duration(1.0)) && ros::ok()){ ros::spinOnce(); ROS_ERROR("Waiting for the move_base action server"); } But it hangs in the waitForServer loop. I think it have something to do with the fact i am not spinning ros, but i cannot figure out a proper way to do it. I would like to able to test my own class, which works as an action client to move_base. Regards Christian Originally posted by FOXTER on ROS Answers with karma: 153 on 2017-04-05 Post score: 0 I think you are abit confused about how you would want to write your test. There are 2 ways to write test in your case:
{ "domain": "robotics.stackexchange", "id": 27521, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, rostest, gtest, actionlib, move-base", "url": null }
c++, c++14, pthreads native_handle_type native_handle() { return thread_handle; } bool is_joinable() { return joinable; } void join() { if (joinable) { auto join_result = pthread_join(thread_handle, NULL); if (join_result != 0) { throw std::runtime_error{strerror(join_result)}; } } joinable = false; } void detach() { if (!joinable) { throw std::logic_error{"trying to detach already joined/detached thread"}; } joinable = false; } ~thread() noexcept(false) { if (joinable) { throw std::logic_error{"a thread was left not joined/not detached"}; } } }; } #endif //CPP_THREADS_THREAD_HPP #include <iostream> #include <thread>
{ "domain": "codereview.stackexchange", "id": 29685, "lm_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++14, pthreads", "url": null }
homework-and-exercises, thermodynamics, statistical-mechanics, stability After I that I need to show that there is a region of the $T-V^{-1}$ plane where this equation of state is not thermodynamically stable and determine the boundary of this region.
{ "domain": "physics.stackexchange", "id": 21910, "lm_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, thermodynamics, statistical-mechanics, stability", "url": null }
c#, winforms, rubberduck // if we are reordering a property getter, check if we need to reorder a letter/setter too if (_view.Target.DeclarationType == DeclarationType.PropertyGet) { var setter = _declarations.Items.FirstOrDefault(item => item.ParentScope == _view.Target.ParentScope && item.IdentifierName == _view.Target.IdentifierName && item.DeclarationType == DeclarationType.PropertySet); if (setter != null) { AdjustSignatures(setter); } var letter = _declarations.Items.FirstOrDefault(item => item.ParentScope == _view.Target.ParentScope && item.IdentifierName == _view.Target.IdentifierName && item.DeclarationType == DeclarationType.PropertyLet); if (letter != null) { AdjustSignatures(letter); } }
{ "domain": "codereview.stackexchange", "id": 13907, "lm_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#, winforms, rubberduck", "url": null }
bash, web-scraping, sh, curl, pdf Finally, probably try http://shellcheck.net/ before asking for human assistance. It can suggest several of the changes here automatically.
{ "domain": "codereview.stackexchange", "id": 43350, "lm_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, web-scraping, sh, curl, pdf", "url": null }
forces, electrostatics, charge, spring, coulombs-law That means to get a charge that remained constant long enough to perform the experiment Coulomb had to work with small charges and therefore small forces. This requires a very sensitive force balance and a torsion balance is ideal for this. In principle a spring balance could have been used, but it is very hard to make a spring balance as sensitive as a torsion balance. For anyone interested there is a description of Coulomb's experiment here.
{ "domain": "physics.stackexchange", "id": 92520, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "forces, electrostatics, charge, spring, coulombs-law", "url": null }
compilers, parsers I wish to know the reasons for this. If anyone can clarify it to me, please help. Why is this extra production there? Summarizing the comment thread: The state $I_3$ is reached by processing a SHIFT action on the item $A\to \bullet a A$, resulting in the item $A\to a\bullet A$. The original item, with the $\bullet$ at the beginning of the right-hand side, is not "retained". But the new item has the $\bullet$ immediately before the non-terminal $A$ (which happens to be the same non-terminal, but that's irrelevant). So when closure is performed on the itemset, the productions for $A$ are added, with the $\bullet$ at the beginning of each one. Thus, the itemset for $I_3$ will include both the shifted $A\to a\bullet A$ and a new $A\to \bullet aA$, along with the other production for $A$, $A\to \bullet b$.
{ "domain": "cs.stackexchange", "id": 20334, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "compilers, parsers", "url": null }
organic-chemistry, reaction-mechanism, hydrolysis However I do not understand why in the second step, oxygen has a partially negative charge, should it not gain a positive charge as it is bonded to three atoms, furthermore shouldn't the $\text{O}-\text{H}$ bond breaking homolytically form a $\text{H}^-$ ion and not a proton?
{ "domain": "chemistry.stackexchange", "id": 15343, "lm_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, reaction-mechanism, hydrolysis", "url": null }
temperature, kinetic-theory-of-gases Title: Why are some liquids hotter than room temperature gases if liquid and solid molecules move more slowly than gases? We learned in school that state change is a matter of molecules moving faster and faster. And we learned "heat em up, speed em up, spread em out". Why then can some liquids have higher temperatures than some gases? Interactions between molecules determine whether something is a gas, solid or liquid not just temperature You have missed an important component of why some things are gases and others are liquids. While, in general, the hotter things are the more the molecules are spread out and the faster they will move, the specific reason why some things are liquids and other are gases depends on the interactions among those molecules.
{ "domain": "chemistry.stackexchange", "id": 14640, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "temperature, kinetic-theory-of-gases", "url": null }
c#, stream I have two questions based on this: Am I just missing some completely obvious existing utility to do this? It really does seem like a common problem that would have been solved by the framework team ages ago. Aside from the obvious optimization of having some type specific versions of Read that don't do the conversion, are there any suggestions to improve this approach? I don't know if something does that already, but you could mimic StructLayout if you need to read multiple types of 'objects' or need reusability. Basically just set starting point/offset and length for each property and read them. public class Item { // 3 chars starting from 0 [Layout(0, 3)] public int Number { get; set; } // 15 chars starting from 3 [Layout(3, 15)] public string Text { get; set; } // 5 chars starting from 18 [Layout(18, 5)] public float Number2 { get; set; } } reader.Read<Item>()
{ "domain": "codereview.stackexchange", "id": 4028, "lm_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#, stream", "url": null }
javascript, array Too complex Your code is way too complex for the task. The best code is always the simplest. All that needs to be done is check the for the shortest length and removing that length from the longer until you get a square (both edges are the same). Each time you remove a length push it to an array. This can be done in one loop. Rewrite Assuming the inputs are positive integers > 0 the function can be written as... function minSquares(w, h) { const squares = []; var min; while (w > 0) { if (w < h) { squares.push(w); h -= w; } else { squares.push(h); w -= h; } } return squares; } console.log(minSquares(5, 3).join(",")); console.log(minSquares(11, 3).join(",")); Or using a ternary.
{ "domain": "codereview.stackexchange", "id": 42346, "lm_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, array", "url": null }
python, mergesort result += left[left_index:] result += right[right_index:] return result def merge_sort(array): """Merge sort algorithm implementation.""" if len(array) <= 1: # base case return array # divide array in half and merge sort recursively half = len(array) // 2 left = merge_sort(array[:half]) right = merge_sort(array[half:]) return merge(left, right)
{ "domain": "codereview.stackexchange", "id": 24098, "lm_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, mergesort", "url": null }
automata, proof-techniques, computation-models Title: Chomsky hierarchy type determined by language I have some modified automata and the task is to give the type of Chomsky hierarchy to it. All task is between type 3 and 0 noninclusive. For regular languages there are lot of tools and I can check it without problems, Turing Machine equivalent is also easy task, and there will be no such examples. Now the question: is it sufficient to show that automaton can accept specified language of given type? From what I checked it would be sufficient to show equivalence to for example to NPDA, so I assume that if machine handles language that at least NPDA accepts it would be sufficient. For example if machine can accept $a^nb^n$, it is type 2. If machine can accept $a^nb^nc^nd^n$ it is type 1? If not are there better examples of such languages or what steps should I follow? No, a finite set of languages does not (usually) characterise infinite classes of languages. So any such specific tests are probably easy to fool.
{ "domain": "cs.stackexchange", "id": 5012, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "automata, proof-techniques, computation-models", "url": null }
• Define what it means for $$L/K$$ to be separable. • Show that if $$K$$ is a finite field, then $$L/K$$ is always separable. • Give an example of a finite extension $$L/K$$ that is not separable. • $$L/k$$ is separable iff every element $$\alpha$$ is separable, i.e. the minimal polynomial $$m(x)$$ of $$\alpha$$ is a separable polynomial, i.e. $$m(x)$$ has no repeated roots in (say) the algebraic closure of $$L$$ (or just any splitting field of $$m$$). • If $$\operatorname{ch}k = p$$, suppose toward a contradiction that $$L/k$$ is not separable. Then there is some $$\alpha$$ with an inseparable (and irreducible) minimal polynomial $$f(x)\in k[x]$$. • Claim: since $$f$$ is inseparable and irreducible, $$f(x) = g(x^p)$$ for some $$g\in k[x]$$.
{ "domain": "dzackgarza.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9908743636887527, "lm_q1q2_score": 0.8030827774478073, "lm_q2_score": 0.8104789132480439, "openwebmath_perplexity": 362.4303021135475, "openwebmath_score": 0.9997151494026184, "tags": null, "url": "https://quals.dzackgarza.com/10_Algebra/TexDocs/QualAlgebra_stripped.html" }
robotic-arm, ros, joint, urdf <joint name="joint_8" type="fixed"> <parent link="driving_2"/> <child link="motor_3"/> <origin xyz="0.074 0 0"/> </joint> <link name="driven_2"> <visual> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <cylinder radius="0.035" length="0.1143"/> </geometry> <material name="Blue2"> <color rgba="0 0 0.7 1.0"/> </material> </visual> </link> <joint name="joint_9" type="revolute"> <parent link="driving_2"/> <child link="driven_2"/> <origin xyz="-0.073 0 0" rpy="0 0 0"/> <limit lower="-1.57" upper="1.57" effort="10" velocity="3"/> <axis xyz="1 0 0"/> </joint> <link name="motor_4"> <visual> <origin xyz="0 0 0" rpy="0 0 0"/> <geometry> <cylinder radius="0.021" length="0.0889"/> </geometry> <material name="Yellow2"> <color rgba="0.8 0.8 0 1.0"/> </material> </visual> </link>
{ "domain": "robotics.stackexchange", "id": 29122, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "robotic-arm, ros, joint, urdf", "url": null }
telescope if True: extent = [xm.min(), xm.max(), ym.min(), ym.max()] fig = plt.figure(figsize=[14, 7.5]) gs = fig.add_gridspec(nrows=2, ncols=2) ax_clear = fig.add_subplot(gs[0, 0]) ax_obstructed = fig.add_subplot(gs[1, 0]) ax_plot = fig.add_subplot(gs[:, 1:]) ax_clear.imshow(ap_clear, cmap='gray', extent=extent) ax_clear.set_title('clear') ax_clear.set_ylabel('meters') ax_obstructed.imshow(ap_obstructed, cmap='gray', extent=extent) ax_obstructed.set_title('obstructed') ax_obstructed.set_ylabel('meters') ax_plot.plot(thetas_arcsec, np.log10(I_clear), '-', label='clear') ax_plot.plot(thetas_arcsec, np.log10(I_obstructed), '--', label='obstructed') ax_plot.set_xlim(0, 0.03) ax_plot.set_xlabel('arcsec') ax_plot.set_ylabel('log(I)') plt.suptitle('Vera C. Ruben (5.116, 8.360 meters, λ=550nm)') plt.legend() plt.show() # first minimum # clear: .00825 arcsec # obstructed: .00640 arcsec
{ "domain": "astronomy.stackexchange", "id": 6781, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "telescope", "url": null }
c# I already cleaned the following method up a bit by extracting a few methods (RemoveFontColor(), RemoveTextHighlight()). But i am not sure if the few-liners (font-style, font-weight, etc.) should be extracted into a method as well. The advise from the author is to not mix different-levels of abstraction within a function because this could lead to other details creeping in. This would mean that even the two liners will be extracted into their own methods. The partly refactored code example private string Fix(FixPreferences preferences,string value) { if (preferences.IsRemoveBold) { value = value.Replace("font-weight:bold", "font-weight:normal"); value = value.Replace("font-weight: bold", "font-weight:normal"); } if (preferences.IsRemoveItalics) { value = value.Replace("font-style:italic;", "font-style:normal;"); value = value.Replace("font-style: italic;", "font-style:normal;"); } if (preferences.IsRemoveFontColor) {
{ "domain": "codereview.stackexchange", "id": 4276, "lm_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 }
java, design-patterns, android /** lunghezza del percorso*/ private float length; /** tempo di percorrenza stimato */ private int duration; /** URL per la richiesta HTTP */ private String URL; /** contesto dell'Activity principale */ private Context context; /** timeout per la connessione */ private int connectionTimeout; /** timeout per il download */ private int dataTimeout; public Road(Context context, String URL, int connectionTimeout, int dataTimeout) { coordinates = new ArrayList<LatLng>(); this.context = context; this.URL = URL; this.connectionTimeout = connectionTimeout; this.dataTimeout = dataTimeout; build(); } private void build() { PathToTrackAsyncTask pathToTrackAsyncTask = new PathToTrackAsyncTask(); pathToTrackAsyncTask.execute(); } private class PathToTrackAsyncTask extends AsyncTask<Void, Void, String> { private ProgressDialog mDialog;
{ "domain": "codereview.stackexchange", "id": 7856, "lm_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, design-patterns, android", "url": null }
$$g(y)=f_0(x) + \sum_{i=1}^{m}\lambda^*_i(z_i-y_i)$$ or may be $$g(y)=f_0(x)$$ since $z_i = y_i$. But then I can't figure out how should I use the $\lambda^*$ in the eq (1) which is to be derived. The unconstrained problem is $$g(y) = \inf_z g(z).$$ Based on problem definition, it is also true that $g(y) \le g(z)$. But how can (1) be derived from these relations? Or, I am doing something wrong assumptions here?
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9669140235181256, "lm_q1q2_score": 0.8015125543182525, "lm_q2_score": 0.8289388040954683, "openwebmath_perplexity": 177.89223126760947, "openwebmath_score": 0.8998463153839111, "tags": null, "url": "https://math.stackexchange.com/questions/267915/subgradient-of-convex-minimization-duality" }
php, wordpress In php7+, you can even define() the array as a constant since your design will never need to mutate the initial values. Constants have the added benefit of being accessible in any scope so you won't need to pass the array into your function. Now that your data is all in one place, you can write a single function with parameters to drill down to the appropriate subarray or you can use foreach loops to traverse all of the subarrays. When you are isolating your cart ids with foreach(WC()->cart->get_cart_contents() as $key => $values) {... You don't use $key so that declaration can be omitted. You can enjoy the ease of comparison in your next step by storing the ids as keys in your temporary array. Something like this: foreach(WC()->cart->get_cart_contents() as $item) { $class_ids[$item['data']->get_shipping_class_id()] = ''; }
{ "domain": "codereview.stackexchange", "id": 33930, "lm_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, wordpress", "url": null }
ros, lidar, ros-melodic, bag-to-pcd, pcd Original comments Comment by Rasmus2134 on 2019-09-20: You are correct. The timestamps are always zero for the topic. This might be a silly question, but when playing back the bag file I can see that there are timestamps for the whole file (Bag time). Is it possible to either transfer these to the topic or to use those as the filenames when converting to pcd, such that I wouldn't have to redo the recordings? Comment by PeteBlackerThe3rd on 2019-09-23: It is definitely possible, but this may require making a small modification to the pcl_ros package if you're comfortable doing that. You could modify the source file I linked to earlier and add a condition at line 178 which tests for a zero timestamp in the point cloud and copies the time from the bag file into the cloud in this case. Let me know if you want a few more pointers about how to go about this. Unfortunately I don't know of a way to do this without modifying code. Comment by Rasmus2134 on 2019-09-23:
{ "domain": "robotics.stackexchange", "id": 33796, "lm_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, lidar, ros-melodic, bag-to-pcd, pcd", "url": null }
ros, ros-kinetic, bloom-release, release Originally posted by Dirk Thomas with karma: 16276 on 2018-03-09 This answer was ACCEPTED on the original site Post score: 2 Original comments Comment by tfoote on 2018-03-12: There was a regression in opencv that we rolled back gazebo_plugins is building successfully now on Kinetic. https://github.com/ros/rosdistro/pull/17031 Comment by dpkoch on 2018-03-12: This fixes my issues, my prerelease tests now run successfully. Thanks for the info.
{ "domain": "robotics.stackexchange", "id": 30246, "lm_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-kinetic, bloom-release, release", "url": null }
This recursive process ends in two possible ways: We either stop when we find the target number, or we stop if the lower and upper bounds are the same (in which case only one search is performed). Let $F(n)$ represent the expected number of searches needed to find the unknown target number, where $F(0) = 0$ and $F(1) = 1$. Overall, there is a $\frac{M-1}{n}$ probability that $c < M$, a $\frac{1}{n}$ probability that $c=M$, and a $\frac{n-M}{n}$ probability that $c>M$. $$F(n) = \left(\frac{M-1}{n}\right)\left(1+F(M-1)\right) + \left(\frac{1}{n}\right)\left(1\right) + \left(\frac{n-M}{n}\right)\left(1+F(n-M)\right)$$ Multiply by $n$, simplify things a bit, and substitute in the full value for $M$: $$nF(n) = \left(\left\lceil\frac{n}{2}\right\rceil-1\right)F\left(\left\lceil\frac{n}{2}\right\rceil-1\right) + n + \left(n-\left\lceil\frac{n}{2}\right\rceil\right)F\left(n-\left\lceil\frac{n}{2}\right\rceil\right)$$ Let $S(n) = nF(n)$ and $T(n) = S(n) – S(n-1)$, yielding:
{ "domain": "bootmath.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9833429624315189, "lm_q1q2_score": 0.8107288415776958, "lm_q2_score": 0.8244619350028204, "openwebmath_perplexity": 305.1263104361031, "openwebmath_score": 0.8512685298919678, "tags": null, "url": "http://bootmath.com/average-number-of-guesses-to-guess-number-between-1-and-1000.html" }
php It feels weird. You say that it should handle logging errors. But you need an error to handle error logging. But the only thing it does is log an error. So what does the ErrorHandlerController do? It passes everything to the ErrorMapper. So why not use the error mapper? $errorHandler = new ErrorHandlerDatabaseMapper; $errorHandler->log($error);
{ "domain": "codereview.stackexchange", "id": 9343, "lm_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 }
ros, slam, navigation, rgbd6dslam, rgbd-slam Yes, ORB worked even in tougher environment. Comment by Felix Endres on 2012-09-06: The message 'detection of keypoints failed' is a consequence of the missing OpenGL context. I don't know what's the problem with the Mahalanobis distance, sorry. It should be safe to ignore. e-45 is pretty close to zero... Comment by Felix Endres on 2012-09-06: Hm, I don't know what's the problem there, sorry.
{ "domain": "robotics.stackexchange", "id": 10449, "lm_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, slam, navigation, rgbd6dslam, rgbd-slam", "url": null }
ros, catkin-make, face-recognition Title: CMake error : Attempt to add a custom rule to output Hi everybody, I am trying to migrate the face_recognition package to catkin but I have lots of problems. I tried with : http://wiki.ros.org/catkin/migrating_from_rosbuild but it doesn't work. So I create a new catkin workspace and I tried to add every folder one by one as if it was a new project. When I try to do a catkin_make I have this message : CMake Error: Attempt to add a custom rule to output "/home/www/ros/devel/include/face_recognition/FaceRecognitionAction.h.rule" which already has a custom rule. CMake Error: Attempt to add a custom rule to output "/home/www/ros/devel/share/common-lisp/ros/face_recognition/msg/FaceRecognitionAction.lisp.rule" which already has a custom rule. CMake Error: Attempt to add a custom rule to output "/home/www/ros/devel/lib/python2.7/dist-packages/face_recognition/msg/_FaceRecognitionAction.py.rule" which already has a custom rule. -- Configuring incomplete, errors occurred!
{ "domain": "robotics.stackexchange", "id": 18785, "lm_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-make, face-recognition", "url": null }
javascript, jquery I don't like the messy if statement in my areaSelect() method and there must be a better way to keep track of which checkboxes are checked without having to loop through them all after each one has been changed. Can anyone offer some pointers as to how the code can be improved? Your code looks very busy; if there is one thing you should take away from this review : do not namespace your css classes, it makes for hard to read code. regionLabelClick You mention the same CSS class a few times, you should extract those in to a var both for readability and maintainability. You could merge the last two statements since the only difference is eq which is a jQuery function anyway. I would counterpropose this: regionLabelClick = function () { var cssSelected = 'vcs-cb-asset-wizard-region-selected', cssSelectedSelector = '.' + cssSelected, cssWizardRegionSelector = '.vcs-cb-asset-wizard-region'; cssWizardRegionDivSelector = '.vcs-cb-asset-wizard-regions > div';
{ "domain": "codereview.stackexchange", "id": 5883, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery", "url": null }
c++ cube_original->get_cube(cube_initial_values); find_sequence(cube_initial_values, pattern, n, data, out, start, result); } //************************************ // Method: find_sequence // FullName: findsequence::find_sequence // Access: public // Returns: void // Qualifier: const // Parameter: std::string & cube_initial_values // Parameter: std::vector<std::string> & pattern // Parameter: const int n // Parameter: std::vector<std::string> & data // Parameter: std::string & out // Parameter: std::string & start // Parameter: bool & result //************************************ void findsequence::find_sequence(std::vector<face_val<face_val_type>>& cube_initial_values, std::vector<face_val<face_val_type>>& pattern, const int n, std::vector<std::string>& data, std::string& out, std::string& start, bool& result) const { result = false; auto indexlist = std::vector<int>(n, 0); auto done = false; const auto end = data.size();
{ "domain": "codereview.stackexchange", "id": 38762, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++", "url": null }
ros, navigation, costmap, amcl, tutorials * /move_base/TrajectoryPlannerROS/max_vel_theta: 1.0 * /move_base/TrajectoryPlannerROS/max_vel_x: 1.0 * /move_base/TrajectoryPlannerROS/meter_scoring: True * /move_base/TrajectoryPlannerROS/min_in_place_vel_theta: 0.2 * /move_base/TrajectoryPlannerROS/min_vel_theta: -1.0 * /move_base/TrajectoryPlannerROS/min_vel_x: 0.0 * /move_base/TrajectoryPlannerROS/occdist_scale: 0.1 * /move_base/TrajectoryPlannerROS/oscillation_reset_dist: 0.25 * /move_base/TrajectoryPlannerROS/pdist_scale: 0.75 * /move_base/TrajectoryPlannerROS/publish_cost_grid_pc: True * /move_base/TrajectoryPlannerROS/sim_granularity: 0.02 * /move_base/TrajectoryPlannerROS/sim_time: 2.0 * /move_base/TrajectoryPlannerROS/simple_attractor: False * /move_base/TrajectoryPlannerROS/vtheta_samples: 20 * /move_base/TrajectoryPlannerROS/vx_samples: 6 * /move_base/TrajectoryPlannerROS/xy_goal_tolerance: 0.2 * /move_base/TrajectoryPlannerROS/yaw_goal_tolerance: 0.1 * /move_base/base_global_planner: navfn/NavfnROS
{ "domain": "robotics.stackexchange", "id": 23664, "lm_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, navigation, costmap, amcl, tutorials", "url": null }
human-biology, human-anatomy, human-genetics, auxology we know that the brain tells the body to grow, would a shock or something make the brain tell your body to shrink instead of growing? Yes, the brain (hypotalamus) initiates a neuroendocrine response that leads to growth hormone secretion. The secretion is about 700 micrograms/day in a young adolescent, while in a healthy adult it is about 400 micrograms/day [3]. The deficiency in an adult person leads to a tendency of fat mass increase and a relative decrease in muscle mass and, in many instances, decreased energy and quality of life [4]. The brain can't "tell your body to shrink", but the lack of "communication" between the brain and organs leads to less to absolutely no use of that organ, thus inducing atrophy. The lack of both external and internal stimuli leads to atrophy (in general) [5]. References:
{ "domain": "biology.stackexchange", "id": 2503, "lm_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, human-anatomy, human-genetics, auxology", "url": null }
of the angles. Conic Sections Trigonometry The sum and difference formulas for sine and cosine can also be used for inverse trigonometric functions. Trigonometric Graphs and Identities Trigonometric equations that involve a sum (or difference) of two sine terms or two cosine terms can be transformed by applying the corresponding sum to product identity to rewrite the sum as a product. This definition only covers the case of acute positive angles α: 0<α<90°. Conditional equation: An equation in one 10). In this section, we will learn techniques that will enable us to solve problems such as the ones presented  The sum and difference formulas state that Sum and Difference Trigonometric Formulas - Problem Solving. The sum formula for tangent states that the tangent of the sum of two angles equals the sum of the tangents of the angles divided by 1 minus the product of the tangents of the angles. Using Fundamental Identities. In this lesson, we will be working with equations that are not
{ "domain": "jimmec.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9891815523039175, "lm_q1q2_score": 0.8040733530335388, "lm_q2_score": 0.8128673155708975, "openwebmath_perplexity": 564.1065187435921, "openwebmath_score": 0.8320470452308655, "tags": null, "url": "http://jimmec.com/fvh/how-are-sum-and-difference-identities-used-in-solving-trigonometric-equations.html" }
Next, accommodation must be made for the second requirement $$\frac{n}{t}\equiv t\mod{2}$$. In effect, this means that if $$n$$ contains factors of $$2$$ within it, they may not all be included in, or omitted from, $$t$$. If $$n=2^xq$$ where $$q$$ is odd, then with respect to the exponent of $$2$$ we must have $$1\le b\le (x-1)$$. There are two fewer options (i.e. $$0$$ and $$x$$) to choose from. So if $$n$$ is even, we must multiply our previous result (i.e. $$\lfloor \frac{\tau(n)}{2}\rfloor$$) by $$\frac{x-1}{x+1}$$ to replace the incorrect multiplier $$(x+1)$$ with the correct value $$(x-1)$$. Note that if $$2$$ is present in $$n$$ only once, the correction factor $$\frac{x-1}{x+1}=0$$. This correctly shows that any number which is twice an odd number (including the number $$2$$ itself) cannot be expressed as the difference of two squares. This fact is independently known because $$2(2j+1)=4j+2\equiv 2 \mod{4}$$ which cannot be the difference of two squares.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561703644737, "lm_q1q2_score": 0.8094633801606005, "lm_q2_score": 0.8354835371034368, "openwebmath_perplexity": 106.0270063321968, "openwebmath_score": 0.8725554347038269, "tags": null, "url": "https://math.stackexchange.com/questions/2934821/how-many-ways-can-a-number-n2-be-expressed-as-the-difference-of-two-squares/3610054#3610054" }
java, performance, algorithm, ai, sudoku private boolean emptyDomainFlag; public Sudoku_AI_Backtracking_ForwardChecking() { } public void initDomains() { for (int i = 0; i < GRIDSIZE_ROW; i++) { for (int j = 0; j < GRIDSIZE_COLUMN; j++) { //creates 81 domains with the values 1-9 in them int cell = (i * 9) + 1 + j; domains[cell]="123456789"; } } } /** * Largely inefficient, looks through every cell with data assigned and * checks if there are too many assignments of the same value in each row * column and box for that specific cell. */ @Override public boolean isSolvable(Integer[][] currentBoard) { Integer[][] board = new Integer[GRIDSIZE_ROW][GRIDSIZE_COLUMN]; for (int i = 0; i < GRIDSIZE_ROW; i++) { System.arraycopy(currentBoard[i], 0, board[i], 0, GRIDSIZE_COLUMN); }
{ "domain": "codereview.stackexchange", "id": 13590, "lm_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, algorithm, ai, sudoku", "url": null }
c#, recursion public static int ParallelSums(int[] arr) { // variable initialization // manually set number of sub arrays we are looking to use // so we can write code to work for anything and then restrict // it to work for this particular case int numOfSubArr = 2; // determine if we have enough elements in arr to allow for // an even number of elements for each sub array per requirements int evenNumElementsPerArr = arr.Length%numOfSubArr;
{ "domain": "codereview.stackexchange", "id": 41564, "lm_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#, recursion", "url": null }
ros Title: Broken rospy code API docs? The rospy code API docs seem to be broken right now. The "Code API" link on the wiki page for rospy goes to a directory with nothing useful in it. Unless I'm massively missing something and looking in the wrong place, can someone either fix this, or direct me to the correct place to report the problem? Originally posted by Elizabeth C on ROS Answers with karma: 138 on 2012-11-18 Post score: 0 You seem to be right. The docs are broken. Consider sending a mail on the ros-users mailing list in response to the recent wiki crawler update mail. Originally posted by Lorenz with karma: 22731 on 2012-11-19 This answer was ACCEPTED on the original site Post score: 0 Original comments Comment by tfoote on 2012-12-21: It looks to have been fixed.
{ "domain": "robotics.stackexchange", "id": 11786, "lm_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 }
Partial Derivatives. To find the critical points I would set both of these to $0$, but then what does it mean to evaluate f(x, y) at each critical point? second derivatives for functions of one variable. Partial derivative calculator An increasing to decreasing point, or; A decreasing to increasing point. A series of free online engineering mathematics in videos, Chain rule, Partial Derivative, Taylor Polynomials, Critical points of functions, Lagrange multipliers, Vector Calculus, Line Integral, Double Integrals, Laplace Transform, Fourier series, examples with step by step solutions, Calculus Calculator Finding critical numbers is relatively east if your algebra skills are strong; Unfortunately, if you have weak algebra skills you might have trouble finding critical numbers. In this section we will the idea of partial derivatives. useful for tutors. An open-top rectangular box is to have a volume of 6ft^3. In general, you can skip parentheses, but be very careful: e^3x is e^3x, and
{ "domain": "dexa-consult.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9828232930001334, "lm_q1q2_score": 0.8103003896736944, "lm_q2_score": 0.8244619306896956, "openwebmath_perplexity": 322.91804483253173, "openwebmath_score": 0.7786548137664795, "tags": null, "url": "https://www.dexa-consult.com/women-s-djih/d9f4e0-critical-points-of-partial-derivatives-calculator" }
ros, turtlebot, permissions Original comments Comment by Mac on 2011-11-20: Can you explain in more detail? What chown and chmod commands are you running? If you installed from debians (sudo apt-get install ....) then the files are in /opt/ros/.. which is a protected directory. You probably need to use "sudo" in front of your chmod/chown commands (which executes that one command as superuser, after possibly prompting for your password). Now, be aware that the changes will be overwritten when you next update your installation. Therefore, a better solution is probably to copy the launch file into a local working directory in which you do have permissions and modify the setup there -- or create a new launch file altogether that just sets your port parameter for the turtlebot driver. Note: you should never run a "rosrun" or "roslaunch" command with sudo as your superuser account is probably not set up for ROS, and many other bad things could happen.
{ "domain": "robotics.stackexchange", "id": 7354, "lm_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, turtlebot, permissions", "url": null }
statistical-mechanics, renormalization But apparently, there is another fixed point if we demand that $t' = t$ and $L' = L$ which gives rise to different scaling behavior, and I wonder a) why I can apparently choose which parameters should be fixed regardless of their value ($K$ and $L$ in one case, $t$ and $L$ in the other case) b) what the physical meaning of these two different fixed points is...
{ "domain": "physics.stackexchange", "id": 1952, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "statistical-mechanics, renormalization", "url": null }
newtonian-mechanics, energy, work, potential-energy Total Work Done in lifting the body = mgh (force x displacement) Therefore, Potential Energy = mgh. But isnt it true that the least force required to lift the body should be greater than mg. Since the force of gravity acting on that body too will be mg but in opposite directions and these two forces should cancel each other and the net force will be zero, therefore displacement will be zero and the body will remain in equilibrium. I dont know if this is stupid but can anyone pls answer. This is a good question which is really asking as to how you can move a mass $m$ from position $A$ to another position $B$, a distance $h$ above position $A$, whilst at the same time doing no net work on the mass which has a downward force acting on it due to the gravitational attraction of the Earth - the weight of the mass $mg$.
{ "domain": "physics.stackexchange", "id": 41288, "lm_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, energy, work, potential-energy", "url": null }
electromagnetism, electricity, electric-circuits \begin{eqnarray} U+U' &=& (R+R')\,i\, \\ U_{\mathrm{eff}} &=& R_{_{\mathrm{eff}}}\,i, \end{eqnarray} which leads us to \begin{eqnarray} U' = (R_{\mathrm{eff}} - R_{\mathrm{nom}})i\,, \end{eqnarray} where $R_{\mathrm{nom}}$ is the nominal resistance, measured without the external electric field. So, with two measurements, one with and one without the external electric field, it is possible to determine the electric potential and, consequently, the external electric field amplitude and orientation. Is this correct? Thank you very much. No, it won't be perceived as an increased resistance. The resistance of a medium is due to the nature and geometry of the medium itself (and it is linked to irreversible processes that transform energy into heat), and it has nothing to do with the electric field it is immersed in. By the superposition principle, the effect of the external electric field is to provide an additional potential difference, so as to have $$ U + U' = R i' $$
{ "domain": "physics.stackexchange", "id": 52881, "lm_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, electricity, electric-circuits", "url": null }
• Indeed, it deserves to be better known that Du Bois Reymond - not Cantor - is the true discoverer of diagonalization - in this context, i.e. asymptotic growth rates of functions. – Bill Dubuque Nov 11 '10 at 22:53 • Thanks Bill and Yuval. I was looking for series which diverges slower and slower and your answer helps me on that note. – user17762 Nov 11 '10 at 23:09 Another test that applies to series of positive decreasing terms (and in this particular one in a rather elegant fashion) is the following: $$\sum_{n=1}^\infty a_n<\infty \quad\Longleftrightarrow\quad\sum_{k=1}^\infty 2^ka_{2^k}<\infty.$$ In our case $$\sum_{k=1}^\infty 2^ka_{2^k}=\sum_{k=1}^\infty 2^k\frac{1}{2^k(\log 2^k)^s}= \frac{1}{(\log 2)^s}\sum_{k=1}^\infty \frac{1}{k^s},$$ and thus $$\sum_{n=2}^\infty \frac{1}{n(\log n)^s}\quad\Longleftrightarrow\quad \sum_{k=1}^\infty \frac{1}{k^s}\quad\Longleftrightarrow\quad s>1.$$
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9566341987633822, "lm_q1q2_score": 0.8559861945730586, "lm_q2_score": 0.8947894562828416, "openwebmath_perplexity": 365.6433204552242, "openwebmath_score": 0.901950478553772, "tags": null, "url": "https://math.stackexchange.com/questions/9911/convergence-of-the-series-sum-limits-n-2-infty-frac1n-logs-n" }
statistical-mechanics shows the extent of variability in relation to mean of the population However I don't see the connection to physics in this. For example considering nuclear decay, what is the physical meaning of coefficient of variation in this process? Suppose you have some radioactive material with a half life $\tau_{1/2}$. What that term "half life" means is that the amount of material $m(t)$ you have left after a time $t$ is $$m(t) = m(0) \exp[ -t / \tau_{1/2}] . \qquad (*)$$ However, the material is made up of discrete atoms and each one decays in a random way. Therefore, it's not 100% guaranteed that after a time $\tau_{1/2}$ there is exactly half as much material left. It could be a bit more or a bit less. In other words, on any particular trial equation $(*)$ will not necessarily be satisfied. Equation $(*)$ tells you the average amount of material left over. It means basically this:
{ "domain": "physics.stackexchange", "id": 16854, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "statistical-mechanics", "url": null }
electromagnetism, special-relativity, speed-of-light, one-way-speed-of-light $$\ddot{\textbf{B}}=c^2\nabla^2 {\textbf{B}}$$ and these 2 can be obtained from Maxwell's equations in vacuum for $c=\frac{1}{\sqrt{\mu_0\epsilon_0}}$ then you are already assuming that the wave is such that the 1-way speed and 2-way speed are both same. Since the wave equations are linear we can add several solution of it and find a solution moving at different speed. For example if we add two wave equations which are moving in opposite directions, we can get a solution which is a standing wave, that doesn't move at the speed $c$. So even though we got these wave equations directly form Maxwell's equations we can't say that it admits only solutions which are moving such that the 1-way speed of light is $c$. Of course all such solutions satisfy the above wave equations. But they are not the only solutions. And it is perfectly possible that the solutions which corresponds to the physical electromagnetic waves don't have 1-way speed as $c$ but satisfy the above wave equations.
{ "domain": "physics.stackexchange", "id": 99073, "lm_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, special-relativity, speed-of-light, one-way-speed-of-light", "url": null }
gravity, cosmology, big-bang As to whether the "Big Bang created gravity," I think physicists might disagree about whether this is true, false, or a matter of semantics or philosophy that lies outside of physics. Some may take a view that we as scientists are not qualified to speak about matters of the creation of physical laws at the time of the Big Bang, but only about observable and testable-in-principle matters that came into existence after the Bang. Some others would say that such questions are approachable from the point of view of the Multiverse. Some others might say that gravity, as an element of General Relativity, "just is" and it is entirely improper to speak of its creation. There are most likely other scientific points of view.
{ "domain": "physics.stackexchange", "id": 11783, "lm_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, cosmology, big-bang", "url": null }
quantum-field-theory, statistical-mechanics, terminology, soft-question, partition-function Title: Semantic distinction between "Partition Function" and "Generating Functional" in QFT? I am just now learning about these, and I have seen them defined as follows: The generating functional for a set of fields $\phi_i$ is defined by: $$Z[J_i]=\int\mathcal{D}\phi_i e^{i(S[\phi_i]+\int J_i\phi_i)}$$ and the partition function is $Z[0]$, generating the vacuum bubbles. However, as I read more and more about this, I find the semantic distinction between "partition function" and "generating functional" upheld less and less. Many people, such as Wikipedia, equate the two and just call everything "the partition function". Does anybody have any particular knowledge about how important the semantic distinction between the two is at higher levels (i.e. further down the line in QFT, or in certain lines of research, or...)? As I bet you already know, these two names have perfectly good reasons.
{ "domain": "physics.stackexchange", "id": 49015, "lm_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, statistical-mechanics, terminology, soft-question, partition-function", "url": null }
surface-tension, fluid-statics, viscosity Title: Water doesn't flow above the rim, one reason is surface tension. Is another reason viscosity? According to Surface tension, water molecule don't get the force from outside and get little bit outward. Is one reason viscosity? Let's look at the water in a fully filled glass. No part is outside the surface. Now I pour more water, due to friction from lower level, water doesn't flow towards the side and stays there, the more water we add the more surface is build above 0 level. As the level increases, force of friction decreases, and at certain point, force of friction is overcome by water flow and water flows out. So there are some water left above the surface of fully filled glass and one of the reason reason is viscosity? Surface tension is actually the ONLY reason why the water stays in the glass. As George already mentioned, in a static situation there is no viscous effect.
{ "domain": "physics.stackexchange", "id": 10057, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "surface-tension, fluid-statics, viscosity", "url": null }
python, python-3.x, mergesort 'allotment', 'amortization', 'ampules', 'antitheses', 'aquiline', 'barnacle', 'barraged', 'bayonet', 'beechnut', 'bereavements', 'billow', 'boardinghouses', 'broadcasted', 'cheeseburgers', 'civil', 'concourse', 'coy', 'cranach', 'cratered', 'creameries', 'cubbyholes', 'cues', 'dawdle', 'director', 'disallowed', 'disgorged', 'disguise', 'dowries', 'emissions', 'epilogs', 'evict', 'expands', 'extortion', 'festoons', 'flexible', 'flukey', 'flynn',
{ "domain": "codereview.stackexchange", "id": 29433, "lm_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, mergesort", "url": null }
python, beginner, http, socket, server def __init__(self, directory, host="", port=8123): print("Server running on port ", port) self.directory = directory serversocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) serversocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) serversocket.bind((host, port)) serversocket.listen(5) while 1: connection, address = serversocket.accept() print("Connection received") socketfile = connection.makefile("rw") request = socketfile.readline() print(request) url = self.getURL(request) print("Serving ", url) responseBody = None responseCode = 200 try: with open(url, "rb") as requestedFile: responseBody = requestedFile.read() except FileNotFoundError: print("Error 404: File not found") responseBody = b"404 Error Not Found" responseCode = 404 connection.sendall(self.writeResponse(url, responseCode, responseBody)) socketfile.close()
{ "domain": "codereview.stackexchange", "id": 18662, "lm_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, beginner, http, socket, server", "url": null }
# Intersection is Largest Subset ## Theorem Let $T_1$ and $T_2$ be sets. Then $T_1 \cap T_2$ is the largest set contained in both $T_1$ and $T_2$. That is: $S \subseteq T_1 \land S \subseteq T_2 \iff S \subseteq T_1 \cap T_2$ ### General Result Let $T$ be a set. Let $\mathcal P \left({T}\right)$ be the power set of $T$. Let $\mathbb T$ be a subset of $\mathcal P \left({T}\right)$. Then: $\left({\forall X \in \mathbb T: S \subseteq X}\right) \iff S \subseteq \bigcap \mathbb T$ ### Family of Sets In the context of a family of sets, the result can be presented as follows: Let $\family {S_i}_{i \mathop \in I}$ be a family of sets indexed by $I$. Then for all sets $X$: $\displaystyle \paren {\forall i \in I: X \subseteq S_i} \iff X \subseteq \bigcap_{i \mathop \in I} S_i$ where $\displaystyle \bigcap_{i \mathop \in I} S_i$ is the intersection of $\family {S_i}$. ## Proof Let $S \subseteq T_1 \land S \subseteq T_2$. Then:
{ "domain": "proofwiki.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9918120905823452, "lm_q1q2_score": 0.8410246789937467, "lm_q2_score": 0.8479677622198946, "openwebmath_perplexity": 233.37963033032875, "openwebmath_score": 0.9932152032852173, "tags": null, "url": "https://proofwiki.org/wiki/Intersection_is_Largest_Subset" }
How to prove the identity $\prod_{n=1}^{\infty} (1-q^{2n-1}) (1+q^{n}) =1$ for $|q|<1$? Eulers product identity is as follows \begin{align} \prod_{n=1}^{\infty} (1-q^{2n-1}) (1+q^{n}) =1 \end{align} How one can explicitly prove this identity? Note here $q$ deonotes a complex number satisfying $|q|<1$ • what's $q$?.... – voldemort Jan 25 '15 at 15:29 • @voldemort, q is just variable – phy_math Jan 25 '15 at 15:30 • How do you compute an identity? Do you mean proving that it holds? – Wojowu Jan 25 '15 at 15:31 • @Wojowu, yes, it is known as Euler identity – phy_math Jan 25 '15 at 15:32 • Rewrite it as: $$\prod(1+x^n)=\prod\frac{1}{1-x^{2n-1}}$$ Then the left side coefficient of $x^N$ is the number of ways to partition $N$ into distinct positive integers, and the right is the number of ways to partition $N$ into odd not-necessarily distinct integers. This reduces it to a combinatorial question, at least. – Thomas Andrews Jan 25 '15 at 15:37 For $\lvert q\rvert < 1$, define
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9859363713038173, "lm_q1q2_score": 0.8279242589701172, "lm_q2_score": 0.8397339656668286, "openwebmath_perplexity": 659.7724612678295, "openwebmath_score": 0.996915876865387, "tags": null, "url": "https://math.stackexchange.com/questions/1118993/how-to-prove-the-identity-prod-n-1-infty-1-q2n-1-1qn-1-for" }
catkin-make, catkin, cmake Title: Catkin_make complains about non-existing CMakeLists.txt I'm encountering a really strange error: catkin_make complains about a non-existing CMakeLists.txt: andreas@andreas-lab: catkin_make install Base path: /home/andreas/baxter_ws Source space: /home/andreas/baxter_ws/src Build space: /home/andreas/baxter_ws/build Devel space: /home/andreas/baxter_ws/devel Install space: /home/andreas/baxter_ws/install #### #### Running command: "cmake /home/andreas/baxter_ws/src -DCATKIN_DEVEL_PREFIX=/home/andreas/baxter_ws/devel -DCMAKE_INSTALL_PREFIX=/home/andreas/baxter_ws/install" in "/home/andreas/baxter_ws/build" #### CMake Error: The source directory "/home/andreas/baxter_ws/src" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. Invoking "cmake" failed However, the CMakeLists.txt file is clearly there: andreas@andreas-lab: ls -1 src/ baxter baxter_common baxter_examples baxter_interface baxter_tools CMakeLists.txt
{ "domain": "robotics.stackexchange", "id": 20271, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "catkin-make, catkin, cmake", "url": null }
inorganic-chemistry, theoretical-chemistry, organometallic-compounds, ir-spectroscopy, carbonyl-complexes First and foremost, and this should go without saying: If you have experimental data, use it. If you do not have experimental data, go find it. No calculation is good enough to be used without calibration, especially when using DFT (see also DFT Functional Selection Criteria). However, calculations can give you some insight into the molecule's behaviour. The standard methodology to calculating the spectrum is to use the harmonic approximation for the force constants. That won't be good enough for anything else than a qualitative interpretation of an experimental spectrum; for example if you need to identify signals in your spectra. It won't be good enough for something as sensitive as the carbon monoxide stretch. I wouldn't be surprised if you found a couple of different opposing trends when using different calculation techniques. From your example data it seems quite obvious that the values for the two structures are too close together to get any meaningful interpretation.
{ "domain": "chemistry.stackexchange", "id": 15632, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, theoretical-chemistry, organometallic-compounds, ir-spectroscopy, carbonyl-complexes", "url": null }
• Please make your titles informative. We get dozens of "permutations combinations" questions everyday. – Em. Jul 10 '16 at 8:28 • Well, to pair up, the first B/G can choose 5G/B, then 4 and so on, thus it is 5!, not $5!^2$ – Ariana Jul 10 '16 at 8:53 • Did you mean $\binom{10}{5}\binom{12}{5}5!$? – N. F. Taussig Jul 10 '16 at 9:08 • @N.F.Taussig, Yes that's what I meant. That's the answer in book. My reasoning has one more 5!. – amrx Jul 10 '16 at 9:17 • As Mike indicated in his answer, once you have selected five men and five women, you can line up the men in some order, say alphabetically. The first man in the list can be matched with any of the five women, the second man can be matched with one of the four remaining women, and so forth. By multiplying $\binom{10}{5}\binom{12}{5}5!$ by $5!$, you are saying that the order in which the couples are selected matters. – N. F. Taussig Jul 10 '16 at 9:24
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9863631627142339, "lm_q1q2_score": 0.8751059334459905, "lm_q2_score": 0.8872045981907006, "openwebmath_perplexity": 361.3482035019971, "openwebmath_score": 0.783104419708252, "tags": null, "url": "https://math.stackexchange.com/questions/1854795/a-dance-class-consists-of-22-students-10-women-and-12-men-if-5-men-and-5-women/1854801" }
ros, manipulator Title: Recommendations for a hardy, IP67 arm Hi, I'm looking for an IP67 arm for a mobile robot in a harsh environment. Some other wishes are: ROS compatability Small controller (must fit on a ~900mm x 900mm platform) Reach >500mm At least 5 DOF So far, I've just found the Fanuc LR Mate 200iD and possibly an Oceaneering Terabot. But I think the Fanuc's controller is huge. Any other suggestions? Thanks in advance! Originally posted by AndyZe on ROS Answers with karma: 2331 on 2016-10-26 Post score: 0
{ "domain": "robotics.stackexchange", "id": 26059, "lm_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, manipulator", "url": null }
c++, beginner, hash-map Create a main function that handles all user interaction. An interactive menu could be interesting, to let users add contacts and search contacts. The interactive commands read input from stdin and call the naturally named methods of an instance of Contacts. The main function doesn't know or care how Contacts works, that it uses a hash table or a database as a storage, and if the hash table handles collisions or not. Those are implementation details that are encapsulated in Contacts and in the hash table. This is also the only place in the program that prints messages, and that's great.
{ "domain": "codereview.stackexchange", "id": 31605, "lm_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++, beginner, hash-map", "url": null }
Combining these results, we have $$K(n)=\begin{cases} \frac{1}{8}\binom{n^2}{n} + \frac{1}{4}\binom{n^2/4}{n/4} + \frac{3}{8}\binom{n^2/2}{n/2} + \frac{1}{4}S & \text{for n\equiv0\pmod{4}}\\ \frac{1}{8}\binom{n^2}{n} + \frac{1}{4}\binom{(n^2-1)/4}{(n-1)/4} + \frac{1}{8}\binom{(n^2-1)/2}{(n-1)/2} + \frac{1}{2}S & \text{for n\equiv1\pmod{4}}\\ \frac{1}{8}\binom{n^2}{n} + \frac{3}{8}\binom{n^2/2}{n/2} + \frac{1}{4}S & \text{for n\equiv2\pmod{4}}\\ \frac{1}{8}\binom{n^2}{n} + \frac{1}{8}\binom{(n^2-1)/2}{(n-1)/2} + \frac{1}{2}S & \text{for n\equiv3\pmod{4}.} \end{cases}$$ This answer agrees with that of Marko Riedel and the OEIS sequence he cites. (Added: These formulas can be obtained without much difficulty by extracting the relevant coefficient from the final generating function in Marko Riedel's answer.)
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9835969703688159, "lm_q1q2_score": 0.8756907107081253, "lm_q2_score": 0.8902942333990421, "openwebmath_perplexity": 363.27761773168936, "openwebmath_score": 0.9341668486595154, "tags": null, "url": "https://math.stackexchange.com/questions/570003/how-many-unique-patterns-exist-for-a-n-times-n-grid/587729" }
species-identification, mycology, mushroom It was in Central Eastern Sweden (Uppsala) in a pine and birch forest. Autumn has been quite dry so the season may be a bit delayed. They were in bunches of 2-5 mushrooms, they are about 1-4cm across the ball and the stem is quite fat plus about 1-3cm long. They are white through the middle. Given what you've said in the comments, and how much more common they are, I'm going with my first gut reaction of Lycoperdon perlatum. The big give away for me was that you said there was a good taste. L. Perlatum has a rich nutty flavor (my wife grows them), but Handkea excipuliformis (pestle puffballs) don't have much taste if any. They are seriously notably bland. H. excipuliformis can take on the flavor of what ever you cook them with, so if you cooked in a nut oil or with nuts, then you would have given the flavor that way.
{ "domain": "biology.stackexchange", "id": 1420, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "species-identification, mycology, mushroom", "url": null }
Can you find a fraction that, when converted to decimal, lists every $n$ digit number? Note by Sharky Kesa 6 years, 7 months ago This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science. When posting on Brilliant: • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused . • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone. • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge.
{ "domain": "brilliant.org", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9796676514063882, "lm_q1q2_score": 0.8546104907565976, "lm_q2_score": 0.8723473614033683, "openwebmath_perplexity": 1379.2252638521986, "openwebmath_score": 0.9803304672241211, "tags": null, "url": "https://brilliant.org/discussions/thread/the-mysterious-fractions-f/" }
gazebo, rviz, transform, pointcloud Title: Wrong Pointcloud Orientation in Rviz Hey, I am trying to correctly orient the pointcloud data coming from a Kinect 3D camera sensor Gazebo model into the Rviz, but it's not working. In Gazebo, a Pose is of the form: <pose> x y z roll pitch yaw </pose> But, input to the static_transform_publisher node is of the form: static_transform_publisher x y z yaw pitch roll frame_id child_frame_id period_in_ms
{ "domain": "robotics.stackexchange", "id": 38387, "lm_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, rviz, transform, pointcloud", "url": null }
boxplot methods. Default is 1.5. identify_outliers(). IQR is often used to filter out outliers. We'll also construct a standard boxplot using base R. Here's our base R boxplot, which has identified one outlier in the female group, and five outliers in the male group—but who are these outliers? Outliers. Let n be the number of data values in the data set. Through box plots, we find the minimum, lower quartile (25th percentile), median (50th percentile), upper quartile (75th percentile), and a maximum of an continues variable. If an observation falls outside of the following interval, $$[~Q_1 - 1.5 \times IQR, ~ ~ Q_3 + 1.5 \times IQR~]$$ it is considered as an outlier. One of the easiest ways to identify outliers in R is by visualizing them in boxplots. outliers.Rd. Values above Q3 + 1.5xIQR or below Q1 - 1.5xIQR are considered as outliers. In the first boxplot that I created using GA data, it had ggplot2 + geom_boxplot to show google analytics data summarized by day of week.. not
{ "domain": "gridserver.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9441768541530197, "lm_q1q2_score": 0.8151943858231573, "lm_q2_score": 0.8633916222765629, "openwebmath_perplexity": 3128.1684721507904, "openwebmath_score": 0.4893813729286194, "tags": null, "url": "https://s35801.gridserver.com/broum80c/c5cd67-r-boxplot-outliers-identify" }
newtonian-mechanics, string $$\boxed{v_p = \frac{v_1+v_2}{2}}$$ Hence, we have derived the velocity relation. The acceleration relation can be quickly obtained by differentiating the velocity relation with respect to time. Note: As stated explicitly above, the above relation is only true for strings with constant length, not extensible or "real strings". The above formulae can also not be used in a case where an inextensible string slacks, because in doing that the length of the string has changed. Also, do not make the mistake to assume that $v_1$, $v_2$ and $v_p$ are independent variables. They are interdependent, thus the above equation.
{ "domain": "physics.stackexchange", "id": 73895, "lm_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, string", "url": null }
of order 2 are very very easy. Second order differential equations contain second derivatives, but you can find the solution the same way as with first order differential equations. Write out the two equations below. Get Help from an Expert Differential Equation Solver. Graphing calculators, such as the TI-84 Plus, are handy tools that can be customized with programs and applications to serve a wide variety of needs. If y is some exponential form of x, say [math]y = e^{a x}$, then all terms get the same [math]e^{3 a. It is possible to find the polynomial f(x) of order N-1, N being the number of points in the time series, with f(1)=F(1), f(2)=F(2) and so on; this can be done through any of a number of techniques including constructing the coefficient matrix and using the backslash operator. If you require guidance on syllabus for college algebra or even polynomial, Rational-equations. The ideas are seen in university mathematics and have many applications to physics and engineering.
{ "domain": "edra.pw", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9896718459575752, "lm_q1q2_score": 0.809130441062361, "lm_q2_score": 0.8175744761936438, "openwebmath_perplexity": 359.05057508222586, "openwebmath_score": 0.7273454070091248, "tags": null, "url": "http://huup.edra.pw/second-order-differential-equation-solver.html" }
ros, moveit, ros-kinetic, raspberrypi, move-group Thread 1 "move_group" received signal SIGSEGV, Segmentation fault.
{ "domain": "robotics.stackexchange", "id": 26553, "lm_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, moveit, ros-kinetic, raspberrypi, move-group", "url": null }
quantum-mechanics, homework-and-exercises, atomic-physics, orbitals \mathbb{P}(\left|\psi_{2,1,-1}\right>)&=|c_n|^2=\frac{1}{6}\\ \mathbb{P}(\left|\psi_{2,1,0}\right>)&=\frac{1}{6}\\ \mathbb{P}(\left|\psi_{2,1,1}\right>)&=\frac{4}{6}\\ \end{align*} But from here how do i get the energy? since $n=2$ for all cases do i just use the formula? $$E_n=-\left[\frac{m}{2\hbar^2}\left(\frac{e^2}{4\pi\epsilon_0}\right)^2\right]\frac{1}{n^2}=\frac{E_1}{n^2}$$ The short answer is "yes". Can you see why if I remind you:
{ "domain": "physics.stackexchange", "id": 53939, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, homework-and-exercises, atomic-physics, orbitals", "url": null }
c++, strings You should never have to wipe away constness, including converting const_iterators to iterators. The fact that you have to do that is a red flag that your API (or the way you're using it) needs rethinking. Your algorthim and the policy API makes certain assumptions about what kind of transforms you're going to support - in particular, it's in terms of "words" without any general understanding of how things that are not words are to be handled. Currently, the algorithm more-or-less just skips over anything that's not a word (which is why you have to mangle the string to make snake-casing work). None of this is "wrong" - a words-based API is not "incorrect" in any sense - but maybe your API should also include some notion of what to do with the stuff between words: preserve it? remove it? transform it (as in the case of snake-casing)?
{ "domain": "codereview.stackexchange", "id": 31204, "lm_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", "url": null }
$g:P(\mathbb{N}) \to (0,1)$ defined by $g(S) = 0.g_1g_2...g_ng_{n+1}...$ with $g_i=\left\{ \begin{array}{rcl} 1 & \mbox{if}&i\in S\\ 2&\mbox{if} & i \notin S \end{array}\right.$ And so if we have $S_0 = \{1,2,...,n\}$, then $g(S) = 0.\underbrace{11...1}_{\text{n times}}222...$ You guessed it right, sir. I understand it fully now. 5. Originally Posted by novice I feel terribly sorry. It was very sloppy of me. It should have been $S_n=\left\{ \begin{array}{rcl} 1 & \mbox{if}&n\in S\\ 2&\mbox{if} & n \notin S \end{array}\right.$ What's wrong? The idea is to map a set $U\subseteq\mathbb{N}$ to a decimal where each decimal place indicates whether the number is in there or not.
{ "domain": "mathhelpforum.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9808759615719876, "lm_q1q2_score": 0.8257265470625095, "lm_q2_score": 0.8418256532040708, "openwebmath_perplexity": 234.55546963375747, "openwebmath_score": 0.943000853061676, "tags": null, "url": "http://mathhelpforum.com/discrete-math/145210-g-p-n-0-1-a.html" }
encoding, one-hot-encoding Title: What is the difference between one-hot and dummy encoding? I am trying to understand The reason behind encoding (one-hot encoding and dummy encoding) How one-hot and dummy are different from each other Most machine learning models accept only numerical variables. This is the reason behind why categorical variables are converted to number so the model can understand better. Now lets address your second query lets look into what is one-hot encoding and dummy encoding and then see the difference One hot Encoding: Take the example of column name Fruit which can have different types of fruits like Blackberry, Grape, Orange. Here each category is mapped to binary variable containing either 0 or 1. Widely utilized when features are nominal. Fruit Price (dollars per pound) Blackberry 3.82 Grape 1.2 Orange .64 Post one hot encoding the table now looks as shown below One Hot Encoded table Blackberry Grape Orange Price (dollars per pound) 1 0 0 3.82 0 1 0 1.2 0 0 1 .64
{ "domain": "datascience.stackexchange", "id": 9844, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "encoding, one-hot-encoding", "url": null }
java, converting // If going to the unit through this unit is shorter than what was previously there // then search for the destination from that unit if (path == null || path.pathLength() > currentPath.pathLength() + 1) { // Update the path on the other unit, because there is now a shorter way to get there visited.put(conversion.getUnitName(), currentPath.addUnit(conversion.getUnitName())); // Get the path from the new unit to the destination unit ConversionPath newPath = getConversionPath(conversion.getUnitName(), unit2, visited); // If such a path exists and its length is less than the shortest length so far // update the shortest path and smallest length if (newPath != null && newPath.pathLength() < minLength) { minLength = newPath.pathLength(); smallestPath = newPath; } } }
{ "domain": "codereview.stackexchange", "id": 9656, "lm_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, converting", "url": null }
Show Tags 31 Mar 2020, 02:27 00:00 Difficulty: 45% (medium) Question Stats: 63% (03:18) correct 37% (03:06) wrong based on 38 sessions HideShow timer Statistics Three men and eight machines can finish a job in half the time taken by three machines and eight men to finish the same job. If two machines can finish the job in 13 days, then how many men can finish the job in 13 days? A. 10 B. 11 C. 12 D. 13 E. 14 Project PS Butler Are You Up For the Challenge: 700 Level Questions _________________ GMAT Club Legend Joined: 18 Aug 2017 Posts: 6314 Location: India Concentration: Sustainability, Marketing GPA: 4 WE: Marketing (Energy and Utilities) Re: Three men and eight machines can finish a job in half the time taken  [#permalink] Show Tags 31 Mar 2020, 02:49 rate of one machine ; 13*2 ; 26 days and rate of man ; x 3/x+8/26 = 2*(8/x+3/26) solve for x we get x= 169 so in 13 days ; 169/13 ; 13 men would be required IMO D
{ "domain": "gmatclub.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9820137910906878, "lm_q1q2_score": 0.8649548884813651, "lm_q2_score": 0.8807970889295664, "openwebmath_perplexity": 3978.6674939283994, "openwebmath_score": 0.7212691903114319, "tags": null, "url": "https://gmatclub.com/forum/three-men-and-eight-machines-can-finish-a-job-in-half-the-time-taken-319880.html" }
c, validation, openssl, bitcoin #include <stdio.h> #include <string.h> #include <openssl/sha.h> typedef enum {VALID, BAD_CHAR, BAD_LENGTH, BAD_DIGEST} BitcoinAddressState; /** * @fn BitcoinAddressState unbase58(const char *s, unsigned char *out) * @brief Takes a base58 encoded address and decodes it into the receiver. Errors are returned if the argument is not valid base58 or if the decoded value does not fit in the 25 byte address. * @param addr The Bitcoin address * @param out The receiver of the decoded address * @return The state of decoding the Bitcoin address */ BitcoinAddressState unbase58(const char *addr, unsigned char *out) { /* A bitcoin address uses a base58 encoding, which uses an alphabet of the characters 0 .. 9, A ..Z, a .. z, but without the four characters 0, O, I and l. */ const char *tmpl = "123456789" "ABCDEFGHJKLMNPQRSTUVWXYZ" "abcdefghijkmnopqrstuvwxyz"; const char *p;
{ "domain": "codereview.stackexchange", "id": 8688, "lm_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, validation, openssl, bitcoin", "url": null }
pr2 Plugging a live AC cord into the back of the robot can cause arcing, which can deteriorate the power inlet on the PR2. Originally posted by fergs with karma: 13902 on 2013-09-20 This answer was ACCEPTED on the original site Post score: 2 Original comments Comment by dornhege on 2013-09-21: It should be noted that that's actually happened, so it's not just some theoretical safety advise. Comment by Erwan R. on 2013-09-22: Thanks for your answer and sharing your experience. I finally found this quotation in the manual after asking the question. I think It should be more visible on the online documentation (as it is a safety procedure and should not appear only there : http://pr2support.willowgarage.com/wiki/PR2%20Manual/Chapter3#What.27s_in_the_box)
{ "domain": "robotics.stackexchange", "id": 15599, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "pr2", "url": null }
dna, gel-electrophoresis, protocol Title: Protocol to dilute DNA step ladder? I need to run gels that are of not the "most" importance. So I do not want to waste alot of money on step ladder. How do I dilute DNA step ladder? Is there a general procedure, for I have tried googling for one, but I get varying answers, such as a 1:4 dilution, and so on. This is the information on the Step ladder, by Promega, posted as an image, since copy and pasting would mess up readability.
{ "domain": "biology.stackexchange", "id": 4749, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "dna, gel-electrophoresis, protocol", "url": null }
java, performance, interview-questions "Can I assume that the the input x is a reasonably small positive integer, not requiring validation? It doesn't make much sense to print anything larger than 100 × 100 anyway, right?" "I assume that you want the entries to be aligned nicely in a grid?" "I assume that we don't need row and column headings, and that we don't need to print grid lines?" "I assume that you want a reasonable balance of simplicity and speed?" Before you even write a single line of code, you can score points by showing that you know how to negotiate software requirements. Here's a solution that I would have written: public static void printMultTable(int x) { int width = (int)Math.floor(Math.log10(x * x)) + 2; String fmt = "%" + width + "d"; StringBuilder b = new StringBuilder(x * width); for (int row = 1; row <= x; row++) { b.setLength(0); for (int col = 1; col <= x; col++) { b.append(String.format(fmt, row * col)); } System.out.println(b); } }
{ "domain": "codereview.stackexchange", "id": 12979, "lm_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, interview-questions", "url": null }
rosbag Title: How to use rosbag play to paly multiple rosbags which are in a folder with a single command? I have several rosbags in a folder, and I want to use rosbag play to play them one by one automatically. So what should I do with the name of folder or its path so I can make the use of '' rosbag play'' ? Originally posted by metalcell on ROS Answers with karma: 3 on 2015-08-18 Post score: 0 Where exactly is your problem? You can just do a rosbag play *.bag in your directory. Originally posted by NEngelhard with karma: 3519 on 2015-08-18 This answer was ACCEPTED on the original site Post score: 4
{ "domain": "robotics.stackexchange", "id": 22470, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rosbag", "url": null }
electrochemistry, oxidation-state But then again, this doesn't explain how we can calculate for oxygen, which has a 0 charge in it's own gas phase and a -2 in water and -2 in carbon dioxide. So what would be another way to calculate for -12 e- ? In this case, we've to calculate the oxidation states of carbon in the reactant and product side separately, the difference between those two and finally multiply it with the number of carbon atoms. While this is may be a seemlingly simple calculation, things can get uber-tricky because of the mammoth number of exceptional cases. Let's start with the basics; here's a gift for you: $${\begin{array}{|l|c|} \hline \pu{Element} & \pu{Oxidation Number} & \pu{Remarks} \\\hline \pu{Alkali Metals} & \pu{+1} & \pu{Always} \\ \pu{Alkali Earth Metals} & \pu{+2} & \pu{Always} \\ \pu{Flourine} & \pu{-1} & \pu{Always} \\ \pu{Halogen Family} & \pu{-1} & \pu{Generally} \\ \pu{Oxygen Family} & \pu{-2} & \pu{Generally} \\ \pu{Hydrogen} & \pu{+1} & \pu{Generally} \\\hline \end{array}}$$
{ "domain": "chemistry.stackexchange", "id": 8059, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electrochemistry, oxidation-state", "url": null }
python Title: Reduce Sensor Messaging Noise to MQTT I'm running MicroPython on an ESP32 relaying sensor data to my MQTT server for Home Assistant. I only want it to emit a message when state has changed and a motion detected state to hold for a minute before returning to a clear state. I see a lot of examples using sleep, but I don't like the blocking nature of sleep as I will be adding more sensors. Instead I've been using ticks_ms() and ticks_diff() to keep the state from fluttering on/off too much, but I can't help but think there's a better/more elegant way to do this that I'm not seeing. There's some repetition and nesting that sticks out to me from umqtt.robust import MQTTClient from machine import Pin, unique_id from time import ticks_diff, ticks_ms from ubinascii import hexlify
{ "domain": "codereview.stackexchange", "id": 38619, "lm_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", "url": null }
hector-slam, hector [ INFO] [509.019162380]: [hector_exploration_planner] exploration: found 4175579 frontiers! [ INFO] [520.215116211]: [hector_exploration_planner] exploration: plan to a frontier has been found! plansize: 18 [ INFO] [539.910429206]: Exploration Service called [ INFO] [540.176778789]: [hector_exploration_planner] Size of trajectory vector for close exploration 1658 [ INFO] [540.177759956]: [hector_exploration_planner] pushed 52 goals (trajectory) for close to robot frontier search [ INFO] [563.854694200]: [hector_exploration_planner] exploration: found 4174866 frontiers! [ INFO] [574.586802448]: [hector_exploration_planner] exploration: plan to a frontier has been found! plansize: 18 [ INFO] [594.108305776]: Exploration Service called [ INFO] [594.380521360]: [hector_exploration_planner] Size of trajectory vector for close exploration 1874 [ INFO] [594.381335610]: [hector_exploration_planner] pushed 58 goals (trajectory) for close to robot frontier search
{ "domain": "robotics.stackexchange", "id": 26448, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "hector-slam, hector", "url": null }
python, cryptography, aes Title: Encryption/Decryption between Python and Node JS I have created a Python & Node JS encryption/decryption AES 256-CFB. The point of this little project is that I will encrypt a special URL with Python covered with base64 & URL encoding and then the Node JS will decrypt it. For now the Node JS is working perfectly fine that can starts by decoding the URL, decoding the Base64 and then decrypt the AES with special password key. Meaning that I will have the same key for Node JS and Python to be able to decrypt. Something to add, this will not be added to any other clients/users meaning that covering the password is not needed since no one will reach the code ever but me :) import base64 import hashlib import urllib.parse from Crypto import Random from Crypto.Cipher import AES key = "testing" # Will of course be another password
{ "domain": "codereview.stackexchange", "id": 40236, "lm_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, cryptography, aes", "url": null }
inorganic-chemistry, stoichiometry, mixtures &= 0.4513~\text{or}~45.13\% \end{align} $$
{ "domain": "chemistry.stackexchange", "id": 11418, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "inorganic-chemistry, stoichiometry, mixtures", "url": null }
ubuntu In essence, this is the same system as your web browser would use to verify that the site you're looking at is really that of your bank, or that Google is really Google. But before your can do that, you need to have something against which to compare the signature inside the binary ROS packages, and that is what you download to your computer (and install in your machine's local key store) with the command you quoted. Without that public key, apt-get would complain that although the packages it downloads are signed, it cannot verify them: WARNING: The following packages cannot be authenticated! pkg_a pkg_b Install these packages without verification [y/N]? n E: Some packages could not be authenticated
{ "domain": "robotics.stackexchange", "id": 24354, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ubuntu", "url": null }
## Use in physics The radian is widely used in physics when angular measurements are required. For example, angular velocity is typically measured in radians per second (rad/s). One revolution per second is equal to 2π radians per second. Similarly, angular acceleration is often measured in radians per second per second (rad/s2). For the purpose of dimensional analysis, the units of angular velocity and angular acceleration are s−1 and s−2 respectively. Likewise, the phase difference of two waves can also be measured in radians. For example, if the phase difference of two waves is (k⋅2π) radians, where k is an integer, they are considered in phase, whilst if the phase difference of two waves is (k⋅2π + π), where k is an integer, they are considered in antiphase.
{ "domain": "ipfs.io", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9924227578357059, "lm_q1q2_score": 0.8019442857099139, "lm_q2_score": 0.8080672066194945, "openwebmath_perplexity": 1843.8368886165324, "openwebmath_score": 0.9429770112037659, "tags": null, "url": "https://ipfs.io/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/wiki/Radian.html" }
r, ggplot2, graphs I tried this to get rid of the alphabetizing but my bars are very thin when doing so: p2 = ggplot(data=clusters_per_sample_2, aes(x=sample, y=Perc, fill=cluster)) + geom_bar(stat="identity")+ scale_x_discrete(limits=clusters_per_sample_2$sample) + heme_minimal() + labs(y="percentage of total # cells in the sample") + theme(axis.text.x = element_text(angle = 90, face = "bold")) + theme(axis.text.x = element_text(size=12, color="black")) Any suggestions? ggplot2 uses factors on the underlying data frame. To have the data plotted in a custom order, apply a custom ordered factor on the underlying dataset. For example, if clusters_per_sample$sample is your custom-ordered vector, do this: clusters_per_sample$sample <- factor(clusters_per_sample$sample, levels = unique(clusters_per_sample$sample), ordered = TRUE)
{ "domain": "bioinformatics.stackexchange", "id": 1915, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "r, ggplot2, graphs", "url": null }
general-relativity, cosmology, time, reference-frames, cosmic-microwave-background So there's nothing special about the CMB. If you ignored the CMB and measured the Earth's velocity to all the galaxies we can see then you'd expect to get the same result as measuring the Earth's velocity relative to the CMB. The CMB occupies the same frame as everything else because it was created in basically the same way. The only special thing about the CMB is that gravitational interactions haven't given it various peculiar velocities as has happened for large aggregations of matter.
{ "domain": "physics.stackexchange", "id": 56016, "lm_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, cosmology, time, reference-frames, cosmic-microwave-background", "url": null }